Snippets Collections
{
	"blocks": [
		{
			"type": "header",
			"text": {
				"type": "plain_text",
				"text": ":xero-hackathon: :xero-hackathon: :xero-hackathon: Get Ready Xeros: Hackathon is BACK! :xero-hackathon::xero-hackathon::xero-hackathon:",
				"emoji": true
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "Hey Xeros! *Brisbane*\n\nOur October Hackathon kicks off next week starting on *Monday 20 to Friday 24 October*.\n\n:battery: The theme is *“Power up with AI, and unlock customer delight!”*\n\nThis Hackathon is all about powering up our customers and our Xeros through AI, innovation, and connection."
			}
		},
		{
			"type": "divider"
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "*Here’s what we’ve got lined up for the week:*"
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": ":croissant: *Hackathon Boost Lunch on Monday 20th October at 12pm*\n*Theme:* The Data Burger \nJoin us for a shared meal in the *Kitchen* to connect with fellow Hackers, recharge, and get inspired."
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": ":brainstorm: *Brainstorming Booths and Breakout Spaces*\nDedicated Hackathon spaces have been booked to support your collaboration and creative sessions.\n\n:teamworkhands1: *Hackathon Breakout Space* - All Hands space"
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": ":apple: *Snacks and Juices*\nKeep those ideas flowing with snacks and juices available in the *kitchen* to Hackathon participants all week."
			}
		},
		{
			"type": "divider"
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": ":speech_balloon: *Stay Connected*\nJoin the conversation in <https://join.slack.com/share/enQtOTY1NTEzNTcwODQ3MC1lYTI0Njg1M2MxY2ZlODE5ODdlOWNkMmI2NmY2YTViOTc2NGQ0OWQ5ZjU1ZjA2NzJkODY5NjM2ODM2NDE4OTQ0 /|*#xero-hackathon*> to stay up to date, share ideas, and see what’s happening globally."
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "Let’s power up, Xeros! :zap: \nLove,\nWX :party-wx:"
			}
		}
	]
}
STEP 1: Launch Hive

Open the Terminal in Cloudera and type:

hive


You should see:

Logging initialized using configuration in /etc/hive/conf/hive-log4j.properties
Hive>

STEP 2: Create or Use a Database
SHOW DATABASES;
CREATE DATABASE IF NOT EXISTS company;
USE company;


Confirm:

SELECT current_database();

STEP 3: Create a Table

Create a simple table to hold employee data.

CREATE TABLE employees (
  id INT,
  name STRING
)
ROW FORMAT DELIMITED
FIELDS TERMINATED BY ','
TBLPROPERTIES ("skip.header.line.count"="1");

STEP 4: Create a CSV File

Exit Hive (type exit;) and in the terminal run:

cd /home/cloudera/
gedit employees.csv


Paste the data below:

id,name
101,satvik
102,rahul
103,rishi
104,nithish


Save and close the file.

STEP 5: Load Data into the Hive Table

Reopen Hive:

hive
USE company;
LOAD DATA LOCAL INPATH '/home/cloudera/employees.csv' INTO TABLE employees;


Check the data:

SELECT * FROM employees;


✅ Output:

101	satvik
102	rahul
103	rishi
104	nithish

STEP 6: Create a Hive UDF (Java File)

Exit Hive and go back to terminal.

Create a new Java file:

gedit CapitalizeUDF.java


Paste the code:

import org.apache.hadoop.hive.ql.exec.UDF;
import org.apache.hadoop.io.Text;

public class CapitalizeUDF extends UDF {
    public Text evaluate(Text input) {
        if (input == null) return null;
        String str = input.toString().trim();
        if (str.isEmpty()) return new Text("");
        String result = str.substring(0, 1).toUpperCase() + str.substring(1).toLowerCase();
        return new Text(result);
    }
}


Save and close.

STEP 7: Compile the Java File

In the terminal:

javac -classpath $(hadoop classpath):/usr/lib/hive/lib/* -d . CapitalizeUDF.java


If successful, it won’t show any error and will create a .class file.

STEP 8: Create a JAR File
jar -cvf CapitalizeUDF.jar CapitalizeUDF.class


Check:

ls


You should see:

CapitalizeUDF.java  CapitalizeUDF.class  CapitalizeUDF.jar

STEP 9: Add JAR to Hive

Open Hive again:

hive
USE company;
ADD JAR /home/cloudera/CapitalizeUDF.jar;


You’ll get:

Added resources: /home/cloudera/CapitalizeUDF.jar

STEP 10: Create a Temporary Function
CREATE TEMPORARY FUNCTION capitalize AS 'CapitalizeUDF';

STEP 11: Use the Function
SELECT id, capitalize(name) AS capitalized_name FROM employees;
Installing kafla tgz file:
https://archive.apache.org/dist/kafka/0.8.2.2/kafka_2.10-0.8.2.2.tgz
Copy using win scp
Stop zookeeper:
sudo service zookeeper-server stop
Steps:
1. Terminal 1: Start Zookeeper
cd ~/kafka_2.10-0.8.2.2
bin/zookeeper-server-start.sh config/zookeeper.properties
2. Terminal 2: Start Kafka broker
cd ~/kafka_2.10-0.8.2.2
bin/kafka-server-start.sh config/server.properties
3. Terminal 3: Create a topic
cd ~/kafka_2.10-0.8.2.2
bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --
partitions 1 --topic events-topic
Checking if topic is created or not:
bin/kafka-topics.sh --list --zookeeper localhost:2181
4. Terminal 4: Start Kafka producer
cd ~/kafka_2.10-0.8.2.2
bin/kafka-console-producer.sh --broker-list localhost:9092 --topic events-topic
# Type messages like: hi, hello, event1
5. Terminal 5: Start Kafka consumer (optional to verify messages)
cd ~/kafka_2.10-0.8.2.2
bin/kafka-console-consumer.sh --topic events-topic --from-beginning --zookeeper
localhost:2181
6. Terminal 6: Create and run Spark Streaming subscriber
gedit spark-socket-consumer.py
spark-submit --master local[2] spark-socket-consumer.py
spark-socket-consumer.py
from pyspark import SparkConf, SparkContext
from pyspark.streaming import StreamingContext
# Setup Spark
conf =
SparkConf().setAppName("SocketKafkaForwardConsumer").setMaster("local[2]")
sc = SparkContext(conf=conf)
ssc = StreamingContext(sc, 2) # 2-second batch interval
# Listen to socket (Kafka messages will be forwarded to this socket later)
lines = ssc.socketTextStream("localhost", 9999)
def process(rdd):
 count = rdd.count()
 if count > 0:
 print("received & count: {} records in this batch".format(count))
 for i, record in enumerate(rdd.take(10)):
 print("[{}] {}".format(i, record))
 else:
 print("no records in this batch")
lines.foreachRDD(process)
ssc.start()
ssc.awaitTermination()
Common HDFS Commands

| *1. Copy file to HDFS*             | hdfs dfs -put /home/cloudera/localfile.txt /user/cloudera/   
| *2. Copy file from HDFS*           | hdfs dfs -get /user/cloudera/localfile.txt /home/cloudera/   
| *3. List directories/files*        | hdfs dfs -ls /user/cloudera/                                 
| *4. Display file contents*         | hdfs dfs -cat /user/cloudera/localfile.txt                   
| *5. Create a directory*            | hdfs dfs -mkdir /user/cloudera/newdir                         
| *6. Remove directory/file*         | hdfs dfs -rm -r /user/cloudera/newdir                         
| *7. Count number of files*         | hdfs dfs -count /user/cloudera/                               
| *8. Merge files*                   | hdfs dfs -getmerge /user/cloudera/folder/* /home/cloudera/merged.txt
| *9. Concatenate two files in HDFS* | hdfs dfs -cat /user/cloudera/file1.txt /user/cloudera/file2.txt | hdfs dfs -put - /user/cloudera/merged.txt

| *10. Find checksum*                | hdfs dfs -checksum /user/cloudera/localfile.txt               
%%configure -f
{
    "conf": {
        "spark.jars": "s3://memob-scripts/allpings/references/postgresql-42.7.7.jar"
    }
}

function custom_sp_wpspro_transient_expiration( $expiration ) {
    return 30 * MINUTE_IN_SECONDS;
}
add_filter( 'sp_wpspro_transient_expiration', 'custom_sp_wpspro_transient_expiration' );
//para cualquier campo usar:
'headerOptions' => ['style' => 'text-align:center;'],
'contentOptions' => ['style' => 'text-align:center; width:2%; vertical-align:middle;'],
//para casos donde el campo venga del modelo 
$columns[] = [
        'attribute' => 'nombre_proyecto',
        'label' => 'Nombre del Proyecto',
        'headerOptions' => ['style' => 'text-align:center; width:10%;text-color:white;'],
        'contentOptions' => ['style' => 'text-align:center; vertical-align:middle;'],
        'value' => function ($data) {
            // Encoded to avoid XSS, then insert line breaks cada 40 caracteres
            $name = Html::encode($data->nombre_proyecto);
            return nl2br(wordwrap($name, 40, "\n", true));
        },
        'format' => 'raw',
    ];
 // para casos donde se use la funcion listar
 'id_indicador' => [
        'attribute' => 'id_indicador',
        'label' => 'Indicador',
        'headerOptions' => ['style' => 'text-align:center;'],
        'contentOptions' => ['style' => 'text-align:center; width:2%; vertical-align:middle;'],
        'filter' => app\models\Indicadores::listAcuatico(),
        'value' => function ($data) {
            $s = app\models\Indicadores::find()->where(['id_indicador' => $data->id_indicador])->one();
            if (!$s) {
                return '';
            }
            // Encoded to avoid XSS, then insert line breaks cada 20 caracteres
            $name = Html::encode($s->nombre_indicador);
            return nl2br(wordwrap($name, 40, "\n", true));
        },
        'format' => 'raw',
    ],
   
   
[https://www.uniccm.com/course/postgraduate-professional-diploma-in-leadership-coaching-and-mentoring]
{
	"blocks": [
		{
			"type": "header",
			"text": {
				"type": "plain_text",
				"text": ":xero-hackathon: :xero-hackathon: :xero-hackathon: Get Ready Xeros: Hackathon is BACK! :xero-hackathon::xero-hackathon::xero-hackathon:",
				"emoji": true
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "Hey *Melbourne* Xeros\n\nOur October Hackathon kicks off next week starting on *Monday 20 to Friday 24 October*.\n\n:battery: The theme is *“Power up with AI, and unlock customer delight!”*\n\nThis Hackathon is all about powering up our customers and our Xeros through AI, innovation, and connection."
			}
		},
		{
			"type": "divider"
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "*Here’s what we’ve got lined up for the week:*"
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": ":burger: *Hackathon Boost Lunch on Wednesday 22nd October at 12pm*\n*Theme*: Build your own Bot burger :robot:\nJoin us for a shared meal in the *Wominjeka Breakout Space* to connect with fellow Hackers, recharge, and get inspired."
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": ":brainstorm: *Brainstorming Booths and Breakout Spaces*\nDedicated Hackathon spaces have been booked to support your collaboration and creative sessions.*\n\n:teamworkhands1: *Hackathon Breakout Space* - Level 3 Wominjeka Breakout Space \n:bulb: *Brainstorming Booths* - Level 3 - Fitzgerald meeting room"
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": ":apple: *Snacks and Juices*\nKeep those ideas flowing with snacks and juices available in the *Level 3 kitchen* to Hackathon participants all week."
			}
		},
		{
			"type": "divider"
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": ":speech_balloon: *Stay Connected*\nJoin the conversation in <https://join.slack.com/share/enQtOTY1NTEzNTcwODQ3MC1lYTI0Njg1M2MxY2ZlODE5ODdlOWNkMmI2NmY2YTViOTc2NGQ0OWQ5ZjU1ZjA2NzJkODY5NjM2ODM2NDE4OTQ0 /|*#xero-hackathon*> to stay up to date, share ideas, and see what’s happening globally."
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "Let’s power up, Xeros! :zap: \nLove,\nWX :party-wx:"
			}
		}
	]
}
If you need reliable and secure proxies for your online projects, check out Proxy4Free — a professional provider offering residential, static residential, datacenter, and unlimited proxies. With 90 million of IPs from over 220 countries, Proxy4Free helps users access global data safely and efficiently.

Our residential proxies come from real household IPs, ensuring high anonymity and low detection — perfect for web scraping, SEO tracking, ad verification, and market research. Datacenter proxies deliver high-speed performance for bulk tasks, while static residential proxies offer stable long-term connections.

All proxies support HTTP and SOCKS5 protocols and can be easily managed through a user-friendly dashboard and API for rotation and access control.

Whether you’re a marketer, developer, or data analyst, Proxy4Free gives you the flexibility, speed, and privacy you need for success.

 Visit www.proxy4free.com
 to explore more!
{
	"blocks": [
		{
			"type": "header",
			"text": {
				"type": "plain_text",
				"text": ":Star: :x-connect: Boost Days: What's on this week :x-connect: :Star:"
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "Good morning Brisbane, \n\n See below for what's on this week!"
			}
		},
		{
			"type": "divider"
		},
		{
			"type": "header",
			"text": {
				"type": "plain_text",
				"text": ":calendar-date-13: Monday, 13th October",
				"emoji": true
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "\n :meow-coffee: *Café Partnership*: Enjoy free coffee and café-style beverages from our Cafe partner *Industry Beans*.\n\n :Lunch: *Lunch*: provided from *12pm* in the kitchen.\n\n:massage:*Wellbeing*: Pilates at *SP Brisbane City* is bookable every Monday!"
			}
		},
		{
			"type": "header",
			"text": {
				"type": "plain_text",
				"text": ":calendar-date-15: Thursday, 15th October",
				"emoji": true
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "\n\n :meow-coffee: *Café Partnership*: Enjoy free coffee and café-style beverages from our Cafe partner *Industry Beans*. \n\n:lunch: *Morning Tea*: provided from *9am* in the kitchen!"
			}
		},
		{
			"type": "header",
			"text": {
				"type": "plain_text",
				"text": ":calendar-date-17: Friday, 17th October",
				"emoji": true
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "\n\n :Drink: *Social*: Wind down for the week with drinks & Nibbles from *3pm-4pm*"
			}
		},
		{
			"type": "divider"
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "Stay tuned to this channel for more details, check out the <https://calendar.google.com/calendar/u/0?cid=Y19uY2M4cDN1NDRsdTdhczE0MDhvYjZhNnRjb0Bncm91cC5jYWxlbmRhci5nb29nbGUuY29t|*Brisbane Social Calendar*>, and get ready to Boost your workdays!\n\nLove,\nWX Team :party-wx:"
			}
		}
	]
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace val2
{
    public partial class WebForm1 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            ValidationSettings.UnobtrusiveValidationMode = UnobtrusiveValidationMode.None;
        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            if (Page.IsValid)
            {
                Label1.Text = "Valid Email and Phone";
            }
        }
    }
}


<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="val2.WebForm1" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <div>
            Email:
            <asp:TextBox ID="txtEmail" runat="server"></asp:TextBox>
            <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtEmail" ErrorMessage="Enter a valid email" ForeColor="Red" ValidationExpression="^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$"></asp:RegularExpressionValidator>
        </div>
        Phone:
        <asp:TextBox ID="txtPhone" runat="server"></asp:TextBox>
        <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ControlToValidate="txtPhone" ErrorMessage="Enter a valid phone number" ForeColor="Red" ValidationExpression="^\d{10}$"></asp:RegularExpressionValidator>
        <p>
            <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Submit" />
        </p>
        <asp:Label ID="Label1" runat="server" Text="Status"></asp:Label>
    </form>
</body>
</html>
using System;

public class Employee
{
    public string Name { get; set; }
    public int EmployeeID { get; set; }
    public double Salary { get; set; }

    public virtual void CalculateSalary() {}

    public virtual void Display()
    {
        Console.WriteLine($"Name: {Name}");
        Console.WriteLine($"Employee ID: {EmployeeID}");
        Console.WriteLine($"Salary: {Salary}");
    }
}

public class FullTimeEmployee : Employee
{
    public double BasicSalary { get; set; }
    public int NumberOfDays { get; set; }
    public double HRA { get; set; }
    public double DA { get; set; }

    public override void CalculateSalary()
    {
        Salary = (BasicSalary * NumberOfDays) + HRA + DA;
    }
}

public class PartTimeEmployee : Employee
{
    public double DailyWages { get; set; }
    public int NumberOfDays { get; set; }

    public override void CalculateSalary()
    {
        Salary = DailyWages * NumberOfDays;
    }
}

class Program
{
    static void Main()
    {
        FullTimeEmployee fte = new FullTimeEmployee
        {
            Name = "John",
            EmployeeID = 10001,
            BasicSalary = 500,
            NumberOfDays = 20,
            HRA = 1500,
            DA = 900
        };
        fte.CalculateSalary();
        Console.WriteLine("Full Time Employee Details:");
        fte.Display();
        
        Console.WriteLine();

        PartTimeEmployee pte = new PartTimeEmployee
        {
            Name = "Jane",
            EmployeeID = 20002,
            DailyWages = 300,
            NumberOfDays = 15
        };
        pte.CalculateSalary();
        Console.WriteLine("Part Time Employee Details:");
        pte.Display();

        Console.ReadLine();
    }
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Mail;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace smtp1
{
    public partial class WebForm1 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            try
            {
                // Create the email
                MailMessage mail = new MailMessage();
                mail.To.Add(TextBox1.Text);  // Recipient email (from input)
                mail.From = new MailAddress("helloeventplanner2025@gmail.com");
                mail.Subject = TextBox2.Text; // Subject from input
                mail.Body = TextBox3.Text;    // Body from input

                // Configure SMTP
                SmtpClient smtp = new SmtpClient("smtp.gmail.com", 587);
                smtp.Credentials = new System.Net.NetworkCredential(
                    "helloeventplanner2025@gmail.com",
                    "lmrpnnsvmdlhexxp" // Gmail App Password
                );
                smtp.EnableSsl = true;

                // Send email
                smtp.Send(mail);

                Label1.Text = "✅ Email sent successfully!";
            }
            catch (Exception ex)
            {
                Label1.Text = "❌ Error: " + ex.Message;
            }
        }
    }
}












<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="smtp1.WebForm1" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <div>
            To&nbsp;&nbsp;
            <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
            <br />
            Sub
            <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
            <br />
            Body
            <asp:TextBox ID="TextBox3" runat="server" Height="129px" Width="255px"></asp:TextBox>
            <br />
            <br />
            <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Send" />
        </div>
        <asp:Label ID="Label1" runat="server" Text="Status"></asp:Label>
    </form>
</body>
</html>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Net.Mail;



namespace TASK11
{
    public partial class WebForm1 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            try
            {
                MailMessage mail = new MailMessage();
                mail.To.Add(TextBox1.Text);
                mail.From = new MailAddress("youremail@domain.com"); // Replace with your email
                mail.Subject = TextBox2.Text;
                mail.Body = TextBox3.Text;

                SmtpClient smtp = new SmtpClient();
                smtp.Host = "smtp.gmail.com"; // Replace with your SMTP server
                smtp.Port = 587; // Replace with SMTP port
                smtp.Credentials = new System.Net.NetworkCredential("username", "password"); // Replace with your credentials
                smtp.EnableSsl = true;
                smtp.Send(mail);
                Label4.Text = "Email sent successfully!";
            }
            catch (Exception ex)
            {
                Label4.Text = "Error: " + ex.Message;
            }
        }
    }
    }
using System;


class Employee
{
    public string Name { get; set; }
    public int EmployeeID { get; set; }
    public double Salary { get; protected set; }

    public Employee(string name, int id)
    {
        Name = name;
        EmployeeID = id;
    }

    public virtual void DisplayDetails()
    {
        Console.WriteLine("Employee ID: " + EmployeeID);
        Console.WriteLine("Name: " + Name);
        Console.WriteLine("Salary: " + Salary);
    }
}


class FullTimeEmployee : Employee
{
    public double BasicSalary { get; set; }
    public int NumberOfDays { get; set; }
    public double HRA { get; set; }
    public double DA { get; set; }

    public FullTimeEmployee(string name, int id, double basicSalary, int numberOfDays, double hra, double da)
        : base(name, id)
    {
        BasicSalary = basicSalary;
        NumberOfDays = numberOfDays;
        HRA = hra;
        DA = da;
    }

    public void CalculateSalary()
    {
        Salary = (BasicSalary * NumberOfDays) + HRA + DA;
    }

    public override void DisplayDetails()
    {
        base.DisplayDetails();
        Console.WriteLine("Employee Type: Full-Time");
        Console.WriteLine("Basic Salary: " + BasicSalary);
        Console.WriteLine("Number of Days: " + NumberOfDays);
        Console.WriteLine("HRA: " + HRA);
        Console.WriteLine("DA: " + DA);
        Console.WriteLine();
    }
}


class PartTimeEmployee : Employee
{
    public double DailyWages { get; set; }
    public int NumberOfDays { get; set; }

    public PartTimeEmployee(string name, int id, double dailyWages, int numberOfDays)
        : base(name, id)
    {
        DailyWages = dailyWages;
        NumberOfDays = numberOfDays;
    }

    public void CalculateSalary()
    {
        Salary = DailyWages * NumberOfDays;
    }

    public override void DisplayDetails()
    {
        base.DisplayDetails();
        Console.WriteLine("Employee Type: Part-Time");
        Console.WriteLine("Daily Wages: " + DailyWages);
        Console.WriteLine("Number of Days: " + NumberOfDays);
        Console.WriteLine();
    }
}

class Program
{
    static void Main()
    {
        FullTimeEmployee fte = new FullTimeEmployee("Abhi", 101, 1000, 20, 500, 300);
        fte.CalculateSalary();
        fte.DisplayDetails();

        PartTimeEmployee pte = new PartTimeEmployee("Abh", 102, 500, 15);
        pte.CalculateSalary();
        pte.DisplayDetails();
    }
}

using System;
using System.Threading;
class Program
{
    public delegate int MathOperation(int a, int b);
    public static int Add(int a, int b)
    {
        Thread.Sleep(2000); 
        return a + b;
    }
    static void Main(string[] args)
    {
        Console.WriteLine("Main Started");
        MathOperation add = Add;
        Console.WriteLine("\nSynchronous call:");
        int syncResult = add(5, 3);
        Console.WriteLine($"Synchronous result: {syncResult}");
        Console.WriteLine("\nAsync call using BeginInvoke:");
        IAsyncResult asyncResult = add.BeginInvoke(20, 20, null, null);
        Console.WriteLine("Main thread continues to run...");
        int asyncResultValue = add.EndInvoke(asyncResult);
        Console.WriteLine($"Asynchronous result: {asyncResultValue}");
        Console.WriteLine("Main Ended");
    }
}
site1.master 

<!DOCTYPE html>
<html>
<head runat="server">
<title>College Info</title>
</head>
<body>
<form runat="server">
<div style="background-color:lightblue; padding:10px;">
<h1>My College</h1>
<a href="Home.aspx">Home</a> |
<a href="About.aspx">About</a>
</div>
<hr />
<asp:ContentPlaceHolder ID="MainContent" runat="server"></asp:ContentPlaceHolder>
<hr />
<footer>© 2025 My College</footer>
</form>
</body>
</html>

content pages: home
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
<h2>Welcome to My College</h2>
<p>We offer B.Tech and M.Tech courses in CSE, ECE, and ME.</p>
</asp:Content>

content page: about
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
<h2>About Our College</h2>
<p>Established in 2001, our college provides quality technical education.</p>
</asp:Content>
using System;
class Program {
    static void Main() {
        Console.Write("Enter number: ");
        int n = int.Parse(Console.ReadLine());
        int min = 9;
        while(n > 0) {
            int d = n % 10;
            if(d < min) min = d;
            n /= 10;
        }
        Console.WriteLine("Smallest digit: " + min);
    }
}
using System;
using System.Linq;
class Program {
    static void Main() {
        Console.Write("Enter string: ");
        string str = Console.ReadLine();
        var maxChar = str.GroupBy(c => c)
                         .OrderByDescending(g => g.Count())
                         .First().Key;
        Console.WriteLine("Max Occurring: " + maxChar);
    }
}
using System;
class Program {
    static void Main() {
        Console.Write("Enter number: ");
        int n = int.Parse(Console.ReadLine()), count = 0;
        while(n != 0) {
            int d = n % 10;
            if(d % 2 == 1) count++;
            n /= 10;
        }
        Console.WriteLine("Odd digits: " + count);
    }
}
using System;
class Program {
    static void Main() {
        Console.Write("Enter string: ");
        string str = Console.ReadLine();
        Console.Write("Enter start and length: ");
        int start = int.Parse(Console.ReadLine());
        int length = int.Parse(Console.ReadLine());
        string sub = str.Substring(start, length);
        Console.WriteLine("Substring: " + sub);
    }
}
using System;
using System.Text;
class Program {
    static void Main() {
        string str = "hello";
        Console.WriteLine(str.ToUpper());
        Console.WriteLine(str.Replace('l','x'));
        StringBuilder sb = new StringBuilder(str);
        sb.Append(" world");
        Console.WriteLine(sb.ToString());
        sb.Remove(0,2);
        Console.WriteLine(sb);
        sb.Insert(0, "hi ");
        Console.WriteLine(sb);
    }
}
using System;
class Program {
    static void Main() {
        Console.Write("Enter string: ");
        string str = Console.ReadLine();
        int count = str.Count(c => "aeiouAEIOU".Contains(c));
        Console.WriteLine("Vowels: " + count);
    }
}
using System;
class Program {
    static void Main() {
        Console.Write("Enter a number: ");
        int n = int.Parse(Console.ReadLine()), sum = 0;
        while(n > 0) {
            sum += n % 10;
            n /= 10;
        }
        Console.WriteLine("Sum: " + sum);
    }
}
using System;
class Program {
    static void Main() {
        Console.Write("Enter a number: ");
        int n = int.Parse(Console.ReadLine());
        int rev = 0;
        while(n > 0) {
            rev = rev * 10 + n % 10;
            n /= 10;
        }
        Console.WriteLine("Reversed: " + rev);
    }
}
using System;
using System.Linq;
class Program {
    static void Main() {
        Console.Write("Enter string: ");
        string str = Console.ReadLine();
        string rev = new string(str.Reverse().ToArray());
        Console.WriteLine(str == rev ? "Palindrome" : "Not palindrome");
    }
}
using System;
class Program {
    static void Main() {
        Console.Write("Enter terms: ");
        int n = int.Parse(Console.ReadLine());
        int a=0, b=1, c;
        for(int i = 0; i < n; i++) {
            Console.Write(a + " ");
            c = a + b;
            a = b;
            b = c;
        }
    }
}
using System;
class Program {
    static void Main() {
        Console.Write("Enter a number: ");
        int n = int.Parse(Console.ReadLine());
        bool isPrime = n > 1;
        for(int i = 2; i <= Math.Sqrt(n); i++) {
            if(n % i == 0) {
                isPrime = false; break;
            }
        }
        Console.WriteLine(isPrime ? "Prime" : "Not prime");
    }
}
Step 1: Create the ASP.NET Web Application

Open Visual Studio → Create New Project → ASP.NET Web Application (.NET Framework).

Name it: EmployeeManagementSystem.

Select Web Forms → Click Create.

Step 2: Create the Master Page

Add → New Item → Master Page → Name: Site1.Master

<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Site1.master.cs" Inherits="employee.Site1" %>

<!DOCTYPE html>
<html lang="en">
<head runat="server">
    <title>Employee Management System</title>
    <asp:ContentPlaceHolder ID="head" runat="server"></asp:ContentPlaceHolder>
</head>
<body>
    <form id="form1" runat="server">
        <!-- Header -->
        <div class="header">
            <h1>Employee Management System</h1>
            <nav>
                <a href="Default.aspx">Home</a> |
                <a href="AddEmployee.aspx">Add Employee</a> |
                <a href="ViewEmployee.aspx">View Employee</a>
            </nav>
        </div>

        <!-- Main Content -->
        <asp:ContentPlaceHolder ID="MainContent" runat="server"></asp:ContentPlaceHolder>

        <!-- Footer -->
        <div class="footer">
            <p>&copy; 2025 Employee Management System</p>
        </div>
    </form>
</body>
</html>

Step 3: Create the Home Page

Add → Web Form using Master Page → Name: Default.aspx → Select Site1.Master

<%@ Page Title="Home" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="employee.Default" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <h2>Welcome to the Home Page</h2>
    <p>Use the menu above to navigate through the Employee Management System.</p>
</asp:Content>

Step 4: Create Add Employee Page

Add → Web Form using Master Page → Name: AddEmployee.aspx → Select Site1.Master

AddEmployee.aspx
<%@ Page Title="Add Employee" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true" CodeBehind="AddEmployee.aspx.cs" Inherits="employee.AddEmployee" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <h2>Add Employee</h2>

    <asp:TextBox ID="empName" runat="server"></asp:TextBox><br /><br />
    <asp:TextBox ID="position" runat="server"></asp:TextBox><br /><br />
    <asp:TextBox ID="sal" runat="server"></asp:TextBox><br /><br />

    <asp:Button ID="btn" runat="server" Text="Add Employee" OnClick="btn_AddClick" /><br /><br />

    <asp:Label ID="lblMessage" runat="server" Text=""></asp:Label>
</asp:Content>

AddEmployee.aspx.cs
using System;
using System.Collections.Generic;

namespace employee
{
    public partial class AddEmployee : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                empName.Attributes["placeholder"] = "Enter employee name";
                position.Attributes["placeholder"] = "Enter employee position";
                sal.Attributes["placeholder"] = "Enter employee salary";
            }
        }

        protected void btn_AddClick(object sender, EventArgs e)
        {
            string name = empName.Text;
            string pos = position.Text;
            string salary = sal.Text;

            List<Employee> employees = Session["Employees"] as List<Employee> ?? new List<Employee>();
            employees.Add(new Employee { Name = name, Position = pos, Salary = salary });
            Session["Employees"] = employees;

            lblMessage.Text = "Employee added successfully!";

            empName.Text = position.Text = sal.Text = "";
        }
    }

    [Serializable]
    public class Employee
    {
        public string Name { get; set; }
        public string Position { get; set; }
        public string Salary { get; set; }
    }
}

Step 5: Create View Employee Page

Add → Web Form using Master Page → Name: ViewEmployee.aspx → Select Site1.Master

ViewEmployee.aspx
<%@ Page Title="View Employees" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true" CodeBehind="ViewEmployee.aspx.cs" Inherits="employee.ViewEmployee" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <h2>All Employees</h2>
    <asp:GridView ID="gv" runat="server" AutoGenerateColumns="true"></asp:GridView>
</asp:Content>

ViewEmployee.aspx.cs
using System;
using System.Collections.Generic;

namespace employee
{
    public partial class ViewEmployee : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                List<Employee> employees = Session["Employees"] as List<Employee> ?? new List<Employee>();
                gv.DataSource = employees;
                gv.DataBind();
            }
        }
    }
}
WebForm1.aspx

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="userreg.WebForm1" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>User Registration</title>
    <style>
        .error { color: red; }
        .form-field { margin-bottom: 10px; }
    </style>
</head>
<body>
    <form id="form1" runat="server">
        <div>
            <h2>Registration Form</h2>

            <div class="form-field">
                Name: 
                <asp:TextBox ID="txtName" runat="server" AutoPostBack="true" OnTextChanged="txtName_TextChanged"></asp:TextBox>
                <asp:RequiredFieldValidator ID="rfvName" runat="server" 
                    ControlToValidate="txtName" ErrorMessage="Name is required" CssClass="error"></asp:RequiredFieldValidator>
            </div>

            <div class="form-field">
                Age:
                <asp:TextBox ID="txtAge" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="rfvAge" runat="server"
                    ControlToValidate="txtAge" ErrorMessage="Age is required" CssClass="error"></asp:RequiredFieldValidator>
                <asp:RangeValidator ID="rvAge" runat="server" 
                    ControlToValidate="txtAge" MinimumValue="20" MaximumValue="30" Type="Integer" 
                    ErrorMessage="Age must be between 20 and 30" CssClass="error"></asp:RangeValidator>
            </div>

            <div class="form-field">
                Email ID:
                <asp:TextBox ID="txtEmail" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="rfvEmail" runat="server"
                    ControlToValidate="txtEmail" ErrorMessage="Email is required" CssClass="error"></asp:RequiredFieldValidator>
                <asp:RegularExpressionValidator ID="revEmail" runat="server"
                    ControlToValidate="txtEmail"
                    ErrorMessage="Invalid Email"
                    ValidationExpression="^([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$"
                    CssClass="error">
                </asp:RegularExpressionValidator>
            </div>

            <div class="form-field">
                User ID:
                <asp:TextBox ID="txtUserID" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="rfvUserID" runat="server"
                    ControlToValidate="txtUserID" ErrorMessage="UserID is required" CssClass="error"></asp:RequiredFieldValidator>
                <asp:RegularExpressionValidator ID="revUserID" runat="server"
                    ControlToValidate="txtUserID"
                    ErrorMessage="UserID must contain a capital letter and a digit, 7-20 chars"
                    ValidationExpression="^(?=.*[A-Z])(?=.*\d).{7,20}$"
                    CssClass="error">
                </asp:RegularExpressionValidator>
            </div>

            <div class="form-field">
                Password:
                <asp:TextBox ID="txtPassword" runat="server" TextMode="Password"></asp:TextBox>
                <asp:RequiredFieldValidator ID="rfvPassword" runat="server"
                    ControlToValidate="txtPassword" ErrorMessage="Password is required" CssClass="error"></asp:RequiredFieldValidator>
                <asp:RegularExpressionValidator ID="revPassword" runat="server"
                    ControlToValidate="txtPassword"
                    ErrorMessage="Password must be 7-20 chars"
                    ValidationExpression="^.{7,20}$"
                    CssClass="error">
                </asp:RegularExpressionValidator>
            </div>

            <div class="form-field">
                <asp:Button ID="btnSubmit" runat="server" Text="Register" OnClick="btnSubmit_Click" />
            </div>

            <asp:Label ID="lblMessage" runat="server" ForeColor="Green"></asp:Label>

        </div>
    </form>
</body>
</html>




WebForm1.aspx.cs

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace userreg
{
    public partial class WebForm1 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            UnobtrusiveValidationMode = UnobtrusiveValidationMode.None;
        }

        protected void txtName_TextChanged(object sender, EventArgs e)
        {

        }

        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            if (Page.IsValid)
            {
                lblMessage.Text = "Registration Successful!";
                // Optional: Save data to database here
            }
        }
    }
}




Steps:

1. Choose ASP.NET Web Application (.NET Framework)
2. Choose empty and Check the Web Forms
3. Right click on solution explorer and add a new item web forms and edit the codes and paste the above 2 codes
4. make sure to right click on webform1.aspx and click set as start page
5. click run
Form1.cs

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WindowsFormsApp2
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            using (WebClient client = new WebClient())
            {
                string url = textBox1.Text;
                string filePath = @"C:\Users\Koyya\OneDrive\Desktop\example.txt";

                client.DownloadFile(url, filePath);

                MessageBox.Show("dome");


            }
        }
    }
}

========================



Steps

1. Create a new project using Windows Forms App (.NET Framework)
2.Add Controls to the Form using ToolBox

	TextBox → for entering URL (textBox1)

	Button → for DOWNLOAD (buttonDownload)

	Button → for UPLOAD (button1)

	Label → to show status (label1)


3. Double click on both the buttons and paste the above functions in those functions of respective buttons
Step - 1

=====================

Site1.Master

<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Site1.master.cs" Inherits="StudentApplication.Site1" %>

<!DOCTYPE html>
<html>
<head runat="server">
    <title>College Information</title>
    <link rel="stylesheet" href="style.css" />
    <asp:ContentPlaceHolder ID="head" runat="server">
    </asp:ContentPlaceHolder>
</head>
<body>
    <form id="form1" runat="server">
        <!-- Header -->
        <header style="background-color:#f5f5f5; padding:20px; text-align:center;">
            <h1>CVR College of Engineering</h1>
        </header>

        <!-- Menu -->
        <asp:Menu ID="menu1" runat="server" Orientation="Horizontal">
            <Items>
                <asp:MenuItem NavigateUrl="~/Home.aspx" Text="HOME" Value="HOME" />
            </Items>
        </asp:Menu>

        <!-- College Image -->
        <div style="text-align:center; margin:20px;">
            <asp:Image ID="Image1" runat="server" ImageUrl="~/Images/cur.jpg" Width="50%" />
        </div>

        <!-- Content Area -->
        <div class="content-area" style="margin:20px;">
            <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server" />
        </div>

        <!-- Footer -->
        <footer style="background-color:#eee; text-align:center; padding:15px; font-size:12px;">
            © 2025 Student Management System. All rights reserved
        </footer>
    </form>
</body>
</html>


==================

WebForm1.aspx

<%@ Page Title="Home" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="StudentApplication.WebForm1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <h2>Welcome to CVR College of Engineering</h2>
    <p>This student management system helps in managing student records efficiently.</p>
</asp:Content>

===================


Steps:

1. Select ASP.NET Web Application(.NET Framework) with C#
2. Name it StudentApplication
3. Click Create and select empty and tick WebForms checkbox
4. Click Create
5. Right click on solution explorer and click add -> new item -> web forms master page -> add
6. Paste the above Site1.Master code in it
7. Right click on solution explorer and click add -> new item -> web forms with master page -> add -> site1.master -> ok
8. paste the above WebForm1.aspx code in it
9. Right click on WebForm1.aspx in solution explorer and click set as start page
10. Run the code


=====================

Note: If you set another name to your project, change it in the first line of Inherits attribute
 using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WindowsFormsAppFinal
{
    public partial class Form1 : Form
    {
        WebClient client = new WebClient();

        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            try
            {
                string url = textBox1.Text.Trim();
                if (string.IsNullOrEmpty(url))
                {
                    label1.Text = "Please enter a download URL.";
                    return;
                }

                string savePath = "C:\\Users\\AKHILESH\\OneDrive\\Desktop\\download.txt";


                client.DownloadFile(url, savePath);
                label1.Text = "File downloaded to " + savePath;
            }
            catch (Exception ex)
            {
                label2.Text = "Error: " + ex.Message;
            }
        }

        private void button2_Click(object sender, EventArgs e)
        {
            try
            {
                string url = textBox2.Text; // Example: https://httpbin.org/post
                string filePath = "C:\\Users\\AKHILESH\\OneDrive\\Desktop\\dummy.txt";

                client.UploadFile(url, "POST", filePath);
                MessageBox.Show("File uploaded successfully!");


                label2.Text = "Upload completed";
            }
            catch (Exception ex)
            {
                label2.Text = "Error: " + ex.Message;
            }
        }
    }

}
 
        https://raw.githubusercontent.com/vinta/awesome-python/master/README.md
https://httpbin.org/post
using System;

namespace practice
{
    public delegate int MathOperation(int x, int y);

    public class DelegateExample
    {
        public static int Add(int x, int y)
        {
            return x + y;
        }

        public static void Main()
        {
            MathOperation d = Add;
            int res = d(2, 3);
            Console.WriteLine("Result: "+res);
        }
    }
}
using System;

namespace practice
{
    interface IEmployee
    {
        void empdisplaydetails();
    }

    interface IManager : IEmployee
    {
        void Managerdetails();
    }

    class Departmentdetails : IManager
    {
        void IEmployee.empdisplaydetails()
        {
            Console.WriteLine("Employee Details");
        }

        void IManager.Managerdetails()
        {
            Console.WriteLine("Manager is working in sales department");
        }
    }

    class Program
    {
        public static void Main(string[] args)
        {
            Departmentdetails d = new Departmentdetails();

            IEmployee emp = d;
            emp.empdisplaydetails();

            IManager mg = d;
            mg.Managerdetails();
        }
    }
}
using System;
using System.Text.RegularExpressions;

class Program
{
    static void Main()
    {
        Console.Write("Enter an email: ");
        string email = Console.ReadLine();

        string pattern = @"^[^@\s]+@[^@\s]+\.[^@\s]+$";

        if (Regex.IsMatch(email, pattern))
            Console.WriteLine("Email is in proper format.");
        else
            Console.WriteLine("Email is NOT in proper format.");
    }
}
//Step 1: Create the Private Assembly (Class Library)

//Open Visual Studio → Create a new project → select Class Library (.NET Framework).

//Name it: MyMathLibrary.

//Replace the default class code with:

using System;

namespace MyMathLibrary
{
    public class MathOperations
    {
        public int Add(int a, int b)
        {
            return a + b;
        }

        public int Multiply(int a, int b)
        {
            return a * b;
        }
    }
}


//Build the project → This generates MyMathLibrary.dll in bin\Debug\net6.0\.

//Step 2: Create the Console Application

//Open Visual Studio → Create a new project → Console App.

//Name it: UseMyMathLibrary.

//Step 3: Add Reference via Dependencies

//In Solution Explorer, expand the console app project (UseMyMathLibrary).

//Right-click Dependencies → Add Project Reference -> Browse -> MyMathLibrary->bin->Debug->.dll

//Check MyMathLibrary → click OK


//Step 4: Use the Assembly in Your Console App
using System;
using MyMathLibrary;

class Program
{
    static void Main()
    {
        MathOperations math = new MathOperations();

        int sum = math.Add(10, 20);
        int product = math.Multiply(5, 4);

        Console.WriteLine("Sum: " + sum);
        Console.WriteLine("Product: " + product);
    }
}
using System;

class Program
{
    static void Main()
    {
        Console.Write("Enter a number: ");
        int num = Convert.ToInt32(Console.ReadLine());

        int smallest = 9;

        while (num > 0)
        {
            int digit = num % 10;
            if (digit < smallest)
                smallest = digit;
            num /= 10;
        }

        Console.WriteLine("Smallest digit: " + smallest);
    }
}
using System;

class Program
{
    static void Main()
    {
        Console.Write("Enter a string: ");
        string str = Console.ReadLine().ToLower();

        int[] freq = new int[256]; 

        foreach (char ch in str)
        {
            if (ch != ' ')
                freq[ch]++;
        }

        int max = 0;
        char maxChar = ' ';

        for (int i = 0; i < 256; i++)
        {
            if (freq[i] > max)
            {
                max = freq[i];
                maxChar = (char)i;
            }
        }

        Console.WriteLine("Maximum occurring character: " + maxChar);
        Console.WriteLine("Occurrences: " + max);
    }
}
//Site1.Master
 <style>
     body {
         font-family: Arial, sans-serif;
         margin: 0;
         padding: 0;
     }

     header {
         background-color: #003366;
         color: white;
         padding: 15px;
         text-align: center;
         font-size: 24px;
     }

     nav {
         background-color: #005599;
         overflow: hidden;
     }

     nav a {
         float: left;
         display: block;
         color: white;
         text-align: center;
         padding: 14px 20px;
         text-decoration: none;
     }

     nav a:hover {
         background-color: #003366;
     }

     footer {
         background-color: #003366;
         color: white;
         text-align: center;
         padding: 10px;
         position: fixed;
         bottom: 0;
         width: 100%;
     }

     .content {
         padding: 20px;
         margin-bottom: 60px; /* space for footer */
     }
 </style>

//inside form tag
 <header>
     Welcome to ABC College of Engineering
 </header>

 <nav>
     <a href="Home.aspx">Home</a>
     <a href="Aboutus.aspx">About</a>
     
     <a href="Contactus.aspx">Contact</a>
 </nav>

 <div class="content">
     <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
     </asp:ContentPlaceHolder>
 </div>

 <footer>
     &copy; 2025 ABC College | All Rights Reserved
 </footer>
//Aboutus.apsx
    <h2>About Our College</h2>
<p>Founded in 1990, ABC College of Engineering is one of the premier institutions offering quality education.</p>
<p>Our mission is to produce skilled engineers and leaders capable of addressing global challenges.</p>
//similarly Contactus.aspx
using System;

class Program
{
    static void Main()
    {
        Console.Write("Enter a string: ");
        string str = Console.ReadLine();

        Console.Write("Enter the starting index: ");
        int start = Convert.ToInt32(Console.ReadLine());

        Console.Write("Enter the length of substring: ");
        int length = Convert.ToInt32(Console.ReadLine());

        string sub = str.Substring(start, length);

        Console.WriteLine("Extracted Substring: " + sub);
    }
}
using System;
using System.Text; // Required for StringBuilder

class Program
{
    static void Main()
    {
        // --- String Class Methods ---
        Console.WriteLine("=== String Class Methods ===");
        string str = "Hello World";

        Console.WriteLine("Original String: " + str);
        Console.WriteLine("To Upper Case: " + str.ToUpper());
        Console.WriteLine("To Lower Case: " + str.ToLower());
        Console.WriteLine("Substring (0,5): " + str.Substring(0, 5));
        Console.WriteLine("Replaced 'World' with 'C#': " + str.Replace("World", "C#"));
        Console.WriteLine("Contains 'Hello'? " + str.Contains("Hello"));
        Console.WriteLine("Length: " + str.Length);

        // --- StringBuilder Class Methods ---
        Console.WriteLine("\n=== StringBuilder Class Methods ===");
        StringBuilder sb = new StringBuilder("Hello");

        sb.Append(" World");
        Console.WriteLine("After Append: " + sb);

        sb.Insert(5, " C#");
        Console.WriteLine("After Insert: " + sb);

        sb.Replace("World", "Developers");
        Console.WriteLine("After Replace: " + sb);

        sb.Remove(5, 3);
        Console.WriteLine("After Remove: " + sb);

        sb.Clear();
        sb.Append("New String");
        Console.WriteLine("After Clear and Append: " + sb);
    }
}
using System;

class Program
{
    static void Main()
    {
        Console.Write("Enter a string: ");
        string str = Console.ReadLine().ToLower();

        int count = 0;

        foreach (char ch in str)
        {
            if (ch == 'a' || ch == 'e' || ch == 'i' || ch == 'o' || ch == 'u')
            {
                count++;
            }
        }

        Console.WriteLine("Number of vowels: " + count);
    }
}
class Program
{
    static void Main()
    {
        Console.WriteLine("Enter a Number: ");
        int num = Convert.ToInt32(Console.ReadLine());

        int sum = 0;

        while (num > 0)
        {
            int digit = num % 10;
            sum += digit;
            num /= 10;
        }

        Console.WriteLine("Sum of digits: " + sum);

    }
}
class Program
{
    static void Main()
    {
        Console.WriteLine("Enter a Number: ");
        int num = Convert.ToInt32(Console.ReadLine());

        int reversed = 0;

        while (num > 0)
        {
            int digit = num % 10;
            reversed = reversed * 10 + digit;
            num /= 10;
        }

        Console.WriteLine("Reversed Num: " + reversed);

    }
}
star

Wed Oct 15 2025 09:36:46 GMT+0000 (Coordinated Universal Time) https://innosoft-group.com/sportsbook-software-providers/

@johnstone #sportbetting software provider

star

Wed Oct 15 2025 03:54:37 GMT+0000 (Coordinated Universal Time)

@FOHWellington

star

Tue Oct 14 2025 18:50:09 GMT+0000 (Coordinated Universal Time)

@rcb

star

Tue Oct 14 2025 18:48:31 GMT+0000 (Coordinated Universal Time)

@bdaplab2025 #python

star

Tue Oct 14 2025 18:47:16 GMT+0000 (Coordinated Universal Time)

@bdaplab2025

star

Tue Oct 14 2025 06:56:26 GMT+0000 (Coordinated Universal Time)

@Saravana_Kumar #postgres

star

Tue Oct 14 2025 05:30:21 GMT+0000 (Coordinated Universal Time)

@Pulak

star

Mon Oct 13 2025 18:21:47 GMT+0000 (Coordinated Universal Time)

@ddover

star

Mon Oct 13 2025 15:14:35 GMT+0000 (Coordinated Universal Time)

@jrg_300i #yii2

star

Mon Oct 13 2025 14:37:30 GMT+0000 (Coordinated Universal Time) https://www.uniccm.com/course/postgraduate-professional-diploma-in-leadership-coaching-and-mentoring

@bubbleroe

star

Mon Oct 13 2025 11:26:39 GMT+0000 (Coordinated Universal Time) https://www.addustechnologies.com/blog/chicken-road-clone-script

@brucebanner #clone #javascript

star

Mon Oct 13 2025 11:08:10 GMT+0000 (Coordinated Universal Time) https://medium.com/coinmonks/what-is-nft-staking-and-how-it-works-96650af544d1

@LilianAnderson #nftstaking #passiveincomecrypto #defirewards #blockchainearning #cryptoinvestment

star

Mon Oct 13 2025 06:58:32 GMT+0000 (Coordinated Universal Time)

@FOHWellington

star

Mon Oct 13 2025 06:30:19 GMT+0000 (Coordinated Universal Time)

@proxy4free #proxy4free

star

Sun Oct 12 2025 22:19:47 GMT+0000 (Coordinated Universal Time)

@FOHWellington

star

Sun Oct 12 2025 18:27:44 GMT+0000 (Coordinated Universal Time)

@vplab2025 #c#

star

Sun Oct 12 2025 18:04:07 GMT+0000 (Coordinated Universal Time)

@vplab2025 #c#

star

Sun Oct 12 2025 17:53:16 GMT+0000 (Coordinated Universal Time)

@vplab2025 #c#

star

Sun Oct 12 2025 17:37:00 GMT+0000 (Coordinated Universal Time)

@final

star

Sun Oct 12 2025 17:34:48 GMT+0000 (Coordinated Universal Time)

@final

star

Sun Oct 12 2025 17:22:45 GMT+0000 (Coordinated Universal Time)

@final

star

Sun Oct 12 2025 17:19:03 GMT+0000 (Coordinated Universal Time)

@robo

star

Sun Oct 12 2025 17:10:31 GMT+0000 (Coordinated Universal Time)

@final

star

Sun Oct 12 2025 17:10:07 GMT+0000 (Coordinated Universal Time)

@final

star

Sun Oct 12 2025 17:09:46 GMT+0000 (Coordinated Universal Time)

@final

star

Sun Oct 12 2025 17:09:25 GMT+0000 (Coordinated Universal Time)

@final

star

Sun Oct 12 2025 17:09:03 GMT+0000 (Coordinated Universal Time)

@final

star

Sun Oct 12 2025 17:08:40 GMT+0000 (Coordinated Universal Time)

@final

star

Sun Oct 12 2025 17:08:20 GMT+0000 (Coordinated Universal Time)

@final

star

Sun Oct 12 2025 17:07:54 GMT+0000 (Coordinated Universal Time)

@final

star

Sun Oct 12 2025 17:07:32 GMT+0000 (Coordinated Universal Time)

@final

star

Sun Oct 12 2025 17:06:35 GMT+0000 (Coordinated Universal Time)

@final

star

Sun Oct 12 2025 17:06:05 GMT+0000 (Coordinated Universal Time)

@final

star

Sun Oct 12 2025 17:02:11 GMT+0000 (Coordinated Universal Time)

@vplab2025 #c#

star

Sun Oct 12 2025 17:01:54 GMT+0000 (Coordinated Universal Time)

@vplab2025 #c#

star

Sun Oct 12 2025 17:01:25 GMT+0000 (Coordinated Universal Time)

@vplab2025 #c#

star

Sun Oct 12 2025 17:00:58 GMT+0000 (Coordinated Universal Time)

@vplab2025 #c#

star

Sun Oct 12 2025 16:31:03 GMT+0000 (Coordinated Universal Time)

@rcb

star

Sun Oct 12 2025 14:55:28 GMT+0000 (Coordinated Universal Time)

@vplab2025 #c#

star

Sun Oct 12 2025 14:47:58 GMT+0000 (Coordinated Universal Time)

@vplab2025 #c#

star

Sun Oct 12 2025 14:41:38 GMT+0000 (Coordinated Universal Time)

@vplab2025 #c#

star

Sun Oct 12 2025 14:37:27 GMT+0000 (Coordinated Universal Time)

@vplab2025 #c#

star

Sun Oct 12 2025 13:47:45 GMT+0000 (Coordinated Universal Time)

@vplab2025 #c#

star

Sun Oct 12 2025 13:46:39 GMT+0000 (Coordinated Universal Time)

@vplab2025 #c#

star

Sun Oct 12 2025 13:45:23 GMT+0000 (Coordinated Universal Time)

@rcb

star

Sun Oct 12 2025 13:42:21 GMT+0000 (Coordinated Universal Time)

@vplab2025 #c#

star

Sun Oct 12 2025 13:37:27 GMT+0000 (Coordinated Universal Time)

@vplab2025 #c#

star

Sun Oct 12 2025 13:34:25 GMT+0000 (Coordinated Universal Time)

@vplab2025 #c#

star

Sun Oct 12 2025 13:33:31 GMT+0000 (Coordinated Universal Time)

@vplab2025 #c#

star

Sun Oct 12 2025 13:32:35 GMT+0000 (Coordinated Universal Time)

@vplab2025 #c#

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension