A school stores records of Class XII students using a list that contains multiple lists as its elements. The structure of each such element is [Student_Name, Marks, MainSubject]. Crate user-defined functions to perform the operations as mentioned below:
Wednesday, 9 April 2025
6. A school stores records of Class XII students using a list that contains multiple lists as its elements.
8. Write a program in Python to input 5 words and push them one by one into a list named All.
Write a program in Python to input 5 words and push them one by one into a list named All.
5. Priyanka has created a dictionary 'emeployee_data' containing EmpCode and Salary as key value pairs
Priyanka has created a dictionary 'emeployee_data' containing EmpCode and Salary as key value pairs for 5 Employees of Cyber Intratech. Write a program, With separate user defined function, as mentioned below, to perform the following operations:
3. Write a program in Python, with separate user defined functions to perform the following operations on Stack 'City'.
Write a program in Python, with separate user defined functions to perform the following operations on Stack 'City'.
2. A School has created a dictionary containing top players and their runs as key value pairs of cricket team.
A School has created a dictionary containing top players and their runs as key value pairs of cricket team. Write a program with separate user defined functions to perform the following operations:
1. Suppose L = [3, 4, 5, 20, 4, 5], What is L after L.pop()?
1. Suppose L = [3, 4, 5, 20, 4, 5], What is L after L.pop()?
- [3,4,5,20,4]
- [3,5,20,4,5]
- [3,5,20,5]
- Error
Sunday, 6 April 2025
How to Host Multiple Next.js Applications on a Single VM with Nginx and Custom Domains
If you're working with multiple Next.js applications and want to host them all on a single virtual machine (VM) while assigning different domains or subdomains to each, this guide is for you. We'll walk through setting up PM2, Nginx, domain pointing, and even HTTPS using Let's Encrypt.
๐งฑ Step 1: Set Up Each Next.js Application
1. Build Each App
First, navigate to each app directory and build it for production:
# App 1
cd /path/to/your/nextjs-app1
npm install
npm run build
# App 2
cd /path/to/your/nextjs-app2
npm install
npm run build
# App 3
cd /path/to/your/nextjs-app3
npm install
npm run build
2. Manage Your Apps Using PM2
Create an ecosystem.config.js
file to manage your apps:
module.exports = {
apps: [
{
name: "app1",
script: "npm",
args: "run start",
cwd: "/path/to/your/nextjs-app1",
env: {
NODE_ENV: "production",
PORT: 4300
}
},
{
name: "app2",
script: "npm",
args: "run start",
cwd: "/path/to/your/nextjs-app2",
env: {
NODE_ENV: "production",
PORT: 4301
}
},
{
name: "app3",
script: "npm",
args: "run start",
cwd: "/path/to/your/nextjs-app3",
env: {
NODE_ENV: "production",
PORT: 4302
}
}
]
};
Start all apps using PM2:
pm2 start ecosystem.config.js
๐ Step 2: Install and Configure Nginx
1. Install Nginx
sudo apt update sudo apt install nginx
2. Create Nginx Configuration for Each Domain
Create a configuration file for each app in /etc/nginx/sites-available/
.
Example: app1.yourdomain.com
server {
listen 80;
server_name app1.yourdomain.com ;
location / {
proxy_pass http://localhost:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}
Repeat the same for other domains like app2.yourdomain.com
and app3.yourdomain.com
using the corresponding ports.
3. Enable the Sites
sudo ln -s /etc/nginx/sites-available/app1.yourdomain.com /etc/nginx/sites-enabled/
sudo ln -s /etc/nginx/sites-available/app2.yourdomain.com /etc/nginx/sites-enabled/
sudo ln -s /etc/nginx/sites-available/app3.yourdomain.com /etc/nginx/sites-enabled/
4. Test and Restart Nginx
sudo nginx -t sudo systemctl restart nginx
๐ Step 3: Point Your Domains to the VM
Log in to your domain provider (e.g., GoDaddy, Namecheap) and update the DNS records:
app1.yourdomain.com → [Your VM IP]
app2.yourdomain.com → [Your VM IP]
app3.yourdomain.com → [Your VM IP]
Add A records for each subdomain, pointing to the public IP of your VM.
๐ Step 4: Enable SSL with Let's Encrypt (Recommended)
1. Install Certbot
sudo apt install certbot python3-certbot-nginx
2. Obtain SSL Certificates
sudo certbot --nginx -d upload.inditechit.com -d app2.yourdomain.com -d app3.yourdomain.com
Follow the prompts to complete the setup.
3. Test Renewal (Optional)
sudo certbot renew --dry-run
✅ Done!
Now you have multiple Next.js apps running on a single VM, each served on a custom domain with HTTPS. Nginx handles the routing via reverse proxy, while PM2 keeps your apps alive and running in the background.

Saturday, 29 March 2025
Class 12 Computer Science 2025 CBSE Question Paper Solution
SECTION - A
1-False
2-C-20
3-D-ValueError
4-B-Break
5-B
6-D
7-is
8-A
9-A-UNIQUE
10-A - 25$$15
11-B
12-A-dict()
13-A-UPDATE
14-B-count()
15-C-FLOAT
16-True
17-C-Repeater
18-D-VoIP
19-Advanced Research Project Agency Network
20-C
21-B
SECTION - B
22:
The return statement in a function is used to send a value back to the caller. If a function does not have a return statement, it returns None by default.
def square(num):
return num * num
result = square(5)
print(result) # Output: 25
23.
(i) Syntax Error in Python:
A Syntax Error in Python occurs when the code violates the rules of the Python language. These errors prevent the program from running because Python cannot interpret the incorrect syntax.
Example of Syntax Errors:
- Missing or Mismatched Parentheses
- Misuse of Keywords
- Incorrect Indentation
- Using Reserved Keywords as Variable Names
- Missing Colon (:) in Control Statements
(ii) Implicit Type Conversion in Python:
Implicit Type Conversion, also known as Type Promotion, occurs when Python automatically converts one data type into another without explicit intervention by the programmer.
Example: Integer to Float Conversion
a = 10 # Integer
b = 2.5 # Float
c = a + b # Integer is automatically converted to Float
print(c) # Output: 12.5
print(type(c)) # Output: <class 'float'>
24 (i)
(a) D['Raj']
(b) len(D1)
(ii)
(a) D1.update(D)
(b) D1.pop('Amit') OR del D1['Amit']
25 - A - Spade#Diamond
26
def Sum(N):
S=0
for I in range(1,N+1):
S=S+I
return S
print(Sum(10))
first line me last me : add hoga
second line add hogi S=0
range me (1,N+1) likha jayega isme (0, N+1) bhi likh sakte hai
print wali line me ) add hoga
27 (i)
(a) EMPNO
(b) NOT NULL
(ii)
(a) Alter table EMPLOYEES modify column BASICSAL float(7,2);
(b) drop table EMPLOYEES
28
(a) URL - Uniform Resource Locator
(b) PPP - Point to Point Protocol
PPP is a data link layer protocol used to establish a direct connection between two network nodes primarily for dial-up internet access, DSL and VPNs
SECTION - C
31
(a) The new string is: g0n2Ge
(b)
SYNTAX ERROR of Indentation in the for loop
OR
(If Syntax Error will remove output should be)
[1, 2, 3]
['ONE', 'TWO', 'THREE']
{1: 'ONE', 2: 'TWO', 3: 'THREE'}
SECTION - D
32.
(a)
(i) Select WNAME, WAGE from worker where WAGE between 800 and 1500;
(ii) Select * from worker where SITEID is NULL;
(iii) Select WNAME, WAGE, HOURS from worker where TYPE = "Skilled";
(iv) Update worker set WAGE=1200 where TYPE="Semiskilled";
(b)
(i)
wname | wage*hours |
+---------+------------+
| Ahmed J | 300000 |
| Anju S | 156000 |
+---------+------------
(ii)
count(distinct type) |
+----------------------+
| 3 |
+----------------------
(iii)
max(wage) | min(wage) | type |
+-----------+-----------+-------------+
| 1500 | 780 | Unskilled |
| 1200 | 520 | Skilled |
| 1200 | 1200 | Semiskilled
(iv)
+---------+--------+
| wname | siteid |
+---------+--------+
| Jacob B | 101 |
| Ahmed J | 103 |
+---------+--------+
34.
(i) Select * from Articles order by price desc;
(ii) Select * from Articles where YEAR(DOC)= 2020;
(iii) DESC Artists;
(iv)
(a) Select Artists.Name from Articles Join Artists on Articles.A_Code=Artists.A_code Where Articles.Article='Painting';
(b) Select Name from Articles natural join artists where article = 'Painting';
SECTION - E
(i) Server should be placed in PSYCHIATRY Block, because it has the maximum number of computers
(ii) Switch
(iii)
Star Topology based on Server location
OR you can design using BUS topology for minimum distance
(iv) Router should be placed in PSYCHIATRY Block
(v)
(a) Telnet
(b) LAN
Sunday, 9 February 2025
เคฒเค्เคท्เคฏ เคा เคจिเคฐ्เคงाเคฐเคฃ
Wednesday, 15 January 2025
Features of YouTube Shorts
As of October 2024, the maximum length of a YouTube Short is 3 minutes. Previously, the maximum length was 60 seconds.
Explanation
- YouTube Shorts are short-form videos that are intended to be highly consumable and quick.
- The default length for a YouTube Short is 15 seconds.
- A YouTube Short can be a single video or a combination of multiple 15-second clips.
- YouTube Shorts are intended to be viewed on mobile devices in a portrait orientation.
- YouTube Shorts have a 9:16 aspect ratio and a resolution of 1920 pixels by 1080 pixels.
- You can use audio from YouTube's library, other videos, or your own in a YouTube Short.
- You can create YouTube Shorts in the YouTube app or upload premade videos.
- You can add text, filters, effects, and stickers to your YouTube Short.
-
SECTION - A 1-False 2-C-20 3-D-ValueError 4-B-Break 5-B 6-D 7-is 8-A 9-A-UNIQUE 10-A - 25$$15 11-B 12-A-dict() 13-A-UPDATE 14-B-count() 15-C...
-
'''Practical No: 9: WAP in Python to create a binary file with roll_no, name and marks of the students and update the marks of...
-
List of Python with CS practical for class 12 Part – 1 Python with CS 1) WAP in Python to find the factorial of a number using fun...