Skip to content

Commit 21271b6

Browse files
done
1 parent a2471d2 commit 21271b6

115 files changed

Lines changed: 6570 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Deploy static content to Pages
2+
3+
on:
4+
# Runs on pushes targeting the default branch
5+
push:
6+
branches: ["main"]
7+
8+
# Allows you to run this workflow manually from the Actions tab
9+
workflow_dispatch:
10+
11+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
12+
permissions:
13+
contents: read
14+
pages: write
15+
id-token: write
16+
17+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
18+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
19+
concurrency:
20+
group: "pages"
21+
cancel-in-progress: false
22+
23+
jobs:
24+
# Single deploy job since we're just deploying
25+
deploy:
26+
environment:
27+
name: github-pages
28+
url: ${{ steps.deployment.outputs.page_url }}
29+
runs-on: ubuntu-latest
30+
steps:
31+
- name: Checkout
32+
uses: actions/checkout@v4
33+
34+
- name: Setup Pages
35+
uses: actions/configure-pages@v5
36+
37+
- name: Upload artifact
38+
uses: actions/upload-pages-artifact@v3
39+
with:
40+
# Upload entire repository
41+
path: '.'
42+
43+
- name: Deploy to GitHub Pages
44+
uses: actions/deploy-pages@v4
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Update README File List
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- '**.php'
9+
10+
jobs:
11+
update-readme:
12+
runs-on: ubuntu-latest
13+
permissions:
14+
contents: write
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v4
18+
19+
- name: Generate File List
20+
id: file_list
21+
run: |
22+
echo "Generating file list..."
23+
# Find all .php files, sort them, and format as Markdown links
24+
# Format: - [Filename](URL)
25+
FILES=$(find . -maxdepth 1 -name "*.php" -type f | sort | sed 's|^\./||' | while read -r file; do echo "- [📄 $file](https://github.com/${{ github.repository }}/blob/main/$file)"; done)
26+
27+
# Export to environment variable (multiline safe)
28+
echo "FILES<<EOF" >> $GITHUB_ENV
29+
echo "$FILES" >> $GITHUB_ENV
30+
echo "EOF" >> $GITHUB_ENV
31+
32+
- name: Update README.md
33+
uses: actions/github-script@v7
34+
with:
35+
script: |
36+
const fs = require('fs');
37+
const readmePath = 'README.md';
38+
const startMarker = '<!-- FILES_START -->';
39+
const endMarker = '<!-- FILES_END -->';
40+
41+
if (fs.existsSync(readmePath)) {
42+
let content = fs.readFileSync(readmePath, 'utf8');
43+
const newContent = `${process.env.FILES}`;
44+
45+
const regex = new RegExp(`${startMarker}[\\s\\S]*?${endMarker}`);
46+
if (regex.test(content)) {
47+
const updatedContent = content.replace(regex, `${startMarker}\n${newContent}\n${endMarker}`);
48+
fs.writeFileSync(readmePath, updatedContent);
49+
console.log('README.md updated successfully.');
50+
} else {
51+
console.log('Markers not found in README.md');
52+
}
53+
} else {
54+
console.log('README.md not found');
55+
}
56+
57+
- name: Commit and Push changes
58+
run: |
59+
git config --global user.name "github-actions[bot]"
60+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
61+
git add README.md
62+
# Only commit if there are changes
63+
git diff --quiet && git diff --staged --quiet || (git commit -m "docs: auto-update file list in README" && git push)
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"type": "msedge",
9+
"request": "launch",
10+
"name": "Open muneer.html",
11+
"file": "c:\\xampp\\htdocs\\kumud\\muneer.html"
12+
}
13+
]
14+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<html>
2+
<head>
3+
<title>
4+
Addition Program
5+
</title>
6+
</head>
7+
<body>
8+
<h1>Addition Program</h1>
9+
<?php
10+
$a=100;
11+
$b=200;
12+
$c=$a+$b;
13+
14+
echo "Addition of ₹".$a." and ₹".$b." is: ₹".$c;
15+
16+
?>
17+
</body>
18+
<footer style="position:fixed; left:0; right:0; bottom:0; background:#f8f8f8; padding:10px 0; text-align:center; border-top:1px solid #e0e0e0; font-family:Arial, sans-serif;">
19+
<strong>Code Is Writen By <a href="https://www.linkedin.com/in/parasgupta-binary0101">Paras Gupta</a></strong>
20+
</footer>
21+
</html>

Lab PHP Program Codes/Constant.php

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<html>
2+
<head>
3+
<title>
4+
PHP CONSTANTS
5+
</title>
6+
</head>
7+
<Body>
8+
<center>
9+
<h1>PHP CONSTANTS</h1>
10+
<?php
11+
define('PI',3.14);
12+
echo PI;
13+
/***
14+
* Now This Code Will Give Warning Now
15+
* Not Because Constant Cannot That Variable
16+
*
17+
* define('PI',13.14);
18+
* echo PI;
19+
***/
20+
21+
// Now If We To Calculate Area See The Code:
22+
$r=12.45;
23+
$a=PI*$r*$r;
24+
echo "<br><b>Area Is: </b>", $a;
25+
26+
// Now If We To Calculate Circumference For Circle See The Code:
27+
$c=2*PI*$r;
28+
echo "<br><b>Circumference Is: </b>",$c;
29+
?>
30+
</center>
31+
</Body>
32+
<footer style="position:fixed; left:0; right:0; bottom:0; background:#f8f8f8; padding:10px 0; text-align:center; border-top:1px solid #e0e0e0; font-family:Arial, sans-serif;">
33+
<strong>Code Is Writen By <a href="https://www.linkedin.com/in/parasgupta-binary0101">Paras Gupta</a></strong>
34+
</footer>
35+
</html>
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<html>
2+
<head>
3+
<title>
4+
PHP CONSTANTS
5+
</title>
6+
</head>
7+
<body>
8+
<?php
9+
10+
define("GREETING","Hello World!");
11+
echo GREETING;
12+
echo "\n";
13+
14+
/***
15+
* This Constants Will Give Warning Becouse
16+
* we Can't Change The Varable See The Code Below:
17+
*
18+
* //echo greeting;
19+
*
20+
***/
21+
22+
?>
23+
</body>
24+
<footer style="position:fixed; left:0; right:0; bottom:0; background:#f8f8f8; padding:10px 0; text-align:center; border-top:1px solid #e0e0e0; font-family:Arial, sans-serif;">
25+
<strong>Code Is Writen By <a href="https://www.linkedin.com/in/parasgupta-binary0101">Paras Gupta</a></strong>
26+
</footer>
27+
</html>
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<html>
2+
<head>
3+
<title>Data Type In PHP</title>
4+
</head>
5+
<body>
6+
<?php
7+
/** Data Types In PHP Are 👇
8+
* Int
9+
* Float
10+
* String
11+
* Boolean
12+
* Array
13+
* Object
14+
* Null
15+
*/
16+
17+
$a=120; //Integer
18+
$b=12.56; //Float
19+
$c="Hello World"; //String
20+
$d=TRUE; //Boolean
21+
$ar=array("Indore","Pune","Mumbai"); //Array
22+
$e=null; //Null
23+
24+
# Output For All Data Type Are:
25+
echo $a."<BR>"; //Integer
26+
echo $b."<BR>"; //Float
27+
echo $c."<BR>"; //String
28+
echo $d."<BR>"; //Boolean
29+
print_r($ar); //Array
30+
echo $e."<BR>"; //Null
31+
?>
32+
</body>
33+
<footer style="position:fixed; left:0; right:0; bottom:0; background:#f8f8f8; padding:10px 0; text-align:center; border-top:1px solid #e0e0e0; font-family:Arial, sans-serif;">
34+
<strong>Code Is Writen By <a href="https://www.linkedin.com/in/parasgupta-binary0101">Paras Gupta</a></strong>
35+
</footer>
36+
</html>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<html>
2+
<head>
3+
<title>Dot Operator Example</title>
4+
</head>
5+
<body>
6+
<center>
7+
<h1>Using the Dot Operator in PHP</h1>
8+
<?php
9+
$a=100;
10+
echo "This Is The Value: ".$a;
11+
?>
12+
</center>
13+
</body>
14+
<footer style="position:fixed; left:0; right:0; bottom:0; background:#f8f8f8; padding:10px 0; text-align:center; border-top:1px solid #e0e0e0; font-family:Arial, sans-serif;">
15+
<strong>Code Is Writen By <a href="https://www.linkedin.com/in/parasgupta-binary0101">Paras Gupta</a></strong>
16+
</footer>
17+
</html>

Lab PHP Program Codes/Even_Odd.php

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?php
2+
/**
3+
* Program: Even or Odd
4+
* Description: Checks if a given number is even or odd.
5+
*/
6+
7+
$number = 15; // You can change this value
8+
9+
echo "<h2>Even or Odd Checker</h2>";
10+
echo "Number: " . $number . "<br>";
11+
12+
if ($number % 2 == 0) {
13+
echo "<p style='color: #238636; font-weight: bold;'>$number is an EVEN number.</p>";
14+
} else {
15+
echo "<p style='color: #da3633; font-weight: bold;'>$number is an ODD number.</p>";
16+
}
17+
18+
// Additional demonstration with a loop
19+
echo "<h3>Checking numbers from 1 to 5:</h3>";
20+
for ($i = 1; $i <= 5; $i++) {
21+
$status = ($i % 2 == 0) ? "Even" : "Odd";
22+
echo "Number $i is $status<br>";
23+
}
24+
?>
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?php
2+
/**
3+
* Program: Factorial Calculation
4+
* Description: Calculates the factorial of a number using a for loop.
5+
*/
6+
7+
$num = 5;
8+
$factorial = 1;
9+
10+
echo "<h2>Factorial Calculator</h2>";
11+
12+
if ($num < 0) {
13+
echo "Factorial is not defined for negative numbers.";
14+
} else {
15+
for ($i = 1; $i <= $num; $i++) {
16+
$factorial = $factorial * $i;
17+
}
18+
echo "The factorial of <strong>$num</strong> is: <strong>$factorial</strong>";
19+
}
20+
21+
echo "<hr>";
22+
echo "<h3>Formula:</h3>";
23+
echo "n! = n × (n-1) × (n-2) × ... × 1";
24+
?>

0 commit comments

Comments
 (0)