Snippets Collections
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>

int main()
{
  int i1;
  printf("i1=%d\n",i1);

  i1 = 5;
  printf("i1=%d\n",i1);

  i1 = -3;
  printf("i1=%d\n",i1);

  i1 = 3.5;
  printf("i1=%d\n",i1);

  double d1 = 3.5;
  printf("d1=%lf\n",d1);

  d1=0;
  printf("d1=%lf\n",d1);

  float f1 = 3.7;
  printf("f1=%f\n",f1);

  char c = 'A';
  printf("%c\n",c);

  c=65;
  printf("%c\n",c);

  int code ='A';
  printf("%d\n\n",code);

  _Bool b=0;
  printf("b=%d\n",b);

  b=1;
  printf("b=%d\n",b);

  b=2;
  printf("b=%d\n",b);

  b=-1;
  printf("b=%d\n",b);

  b=false;
  printf("using keywords b=%d\n",b);
  b=true;
  printf("using keywords b=%d\n\n",b);

  char name[]="Tharaka Weerasena";
  printf("%s\n",name);

  int x = sizeof (int);
  printf("number of bytes of an int:%d bytes\n",x);
  printf("number of bits:4*8=32 bits\n");
  printf("we can store 2^32 in an integer"); //429496796


    system("pause");
    return 0;
}
#include <stdio.h>

//Sum
float sum(float x, float y);
float difference(float x, float y);
float product(float x, float y);
float quotient(float x, float y);


int main()
{
    float n1, n2;
    float S, D, P, Q;
    char symbol;
    
    printf("Enter two numbers:\n");
    scanf("%f", &n1);
    scanf("  %f", &n2);
    
    printf("[+]Sum [-]Difference [*]Product [/]Quotient [x]Exit\n");
    
    printf("Enter Choice:");
    scanf("%s", &symbol);
    switch(symbol)
    {
    case'+':S=sum(n1, n2);printf("Sum:%.2f", S);
    break;
    case'-':D=difference(n1, n2);printf("Difference:%.2f", D);
    break;
    case'*':P=product(n1, n2);printf("Product:%.2f", P);
    break;
    case'/':Q=quotient(n1, n2);printf("Quotient:%.2f", Q);
    break;
    case'x':printf("Exit!");
    break;
    }

}

float sum(float x, float y)
{
return (x+y);
}
float difference(float x, float y)
{
return (x-y);
}
float product(float x, float y)
{
return (x*y);
}
float quotient(float x, float y)
{
return (x/y);
}
#include <stdio.h>

float sum( float n1, float n2);
int main()
{
    float m, n, total;
    printf("Enter first number:");
    scanf("%f", &m);
    printf("Enter second number:");
    scanf("%f", &n);
    total=sum(m ,n);
    
printf("The sum of the two numbers is %.2f", total);
    
    
}
float sum(float n1, float n2)
{
return (n1+n2);
}
    
    
#Nonprod
curl -k -H "Host: ds-colpilot-nonprod.sb.se.com" "http://172.24.44.8/relevancy?application=ResourceAdvisor&utterance=Hello"

#PreProd
curl -k -H "Host: ds-colpilot-preprod.sb.se.com" "http://172.24.52.8/relevancy?application=ResourceAdvisor&utterance=Hello"

#Prod
curl -k -H "Host: ds-copilot-prod.sb.se.com" "http://172.24.52.8/relevancy?application=ResourceAdvisor&utterance=Hello"
import { useEffect, useState } from "react";
import { useSupabaseClient } from "@supabase/auth-helpers-react";
import { HeadingLink, MinimalPage, PageHeading, Spinner } from "ui";
import type { Database } from "../../../types";
import dayjs from "dayjs";

const ShiftTable = () => {
  const [usersOnShift, setUsersOnShift] = useState<
    Array<{ user: string; shift_start: string | null }>
  >([]);
  const [loading, setLoading] = useState(true);
  const [error, setError] = useState("");
  const [offlineUserCount, setOfflineUserCount] = useState(0);
  const supabaseClient = useSupabaseClient<Database>();

  useEffect(() => {
    const fetchUsers = async () => {
      setLoading(true);
      setError("");

      try {
        // Fetch users on shift and their emails
        const { data: usersOnShiftData, error: onShiftError } =
          await supabaseClient
            .from("UserLastWorkedOn")
            .select("shift_start, user, users_view (email)")
            .not("shift_start", "is", null);

        // Fetch count of users not on shift (offline users)
        const { count: offlineCount, error: offShiftError } =
          await supabaseClient
            .from("UserLastWorkedOn")
            .select("user", { count: "exact" })
            .is("shift_start", null);

        if (onShiftError || offShiftError) {
          setError(
            onShiftError?.message ||
              offShiftError?.message ||
              "Failed to fetch user shift data"
          );
          return;
        }

        // Sort the users on shift by their email address
        const sortedUsersOnShift = (usersOnShiftData ?? [])
          .map((user) => ({
            shift_start: user.shift_start,
            user: Array.isArray(user.users_view)
              ? user.users_view[0].email
              : user.users_view?.email ?? user.user,
          }))
          .sort((a, b) => a.user.localeCompare(b.user));

        setUsersOnShift(sortedUsersOnShift);
        setOfflineUserCount(offlineCount ?? 0);
      } catch (err) {
        setError("Failed to fetch user data");
        console.error(err);
      } finally {
        setLoading(false);
      }
    };

    fetchUsers();
  }, [supabaseClient]);

  return (
    <MinimalPage
      pageTitle="Shift Table | Email Interface"
      pageDescription="Spot Ship Email Interface | Shift Table"
      commandPrompt
    >
      <div className="flex w-full flex-col items-center justify-center">
        <HeadingLink icon="back" text="Home" href="/secure/home" />
        <PageHeading text="Spot Ship Shift Table" />
        <div className="mb-4 text-sm text-gray-400">
          {usersOnShift.length} user(s) currently on shift. Offline users:{" "}
          {offlineUserCount}.
        </div>
        {loading ? (
          <Spinner />
        ) : error ? (
          <p className="text-red-500">Error: {error}</p>
        ) : usersOnShift.length ? (
          <div className="overflow-hidden overflow-x-auto rounded-3xl border-transparent shadow-lg">
            <table className="table-auto rounded-xl bg-gray-800">
              <thead className="bg-gray-700 text-gray-400">
                <tr>
                  <th className="px-6 py-3 text-left text-xs font-medium uppercase tracking-wider">
                    User Email
                  </th>
                  <th className="px-6 py-3 text-left text-xs font-medium uppercase tracking-wider">
                    Shift Started
                  </th>
                </tr>
              </thead>
              <tbody className="divide-y divide-gray-700">
                {usersOnShift.map((user, index) => (
                  <tr key={index}>
                    <td className="whitespace-nowrap px-6 py-4 text-sm">
                      {user.user}
                    </td>
                    <td className="whitespace-nowrap px-6 py-4 text-sm">
                      {dayjs(user.shift_start).format("DD-MM-YYYY | HH:mm")}
                    </td>
                  </tr>
                ))}
              </tbody>
            </table>
          </div>
        ) : (
          <p className="text-gray-400">No users are currently on shift</p>
        )}
      </div>
    </MinimalPage>
  );
};

export default ShiftTable;
// Apply force - More up assist depending on y position
var assistPoint = Mathf.InverseLerp(0, _maxY, _rb.position.y);
var assistAmount = Mathf.Lerp(_maxUpAssist, 0, assistPoint);
var forceDir = -transform.forward * _forceAmount + Vector3.up * assistAmount;
if (_rb.position.y > _maxY) forceDir.y = Mathf.Min(0, forceDir.y);
_rb.AddForce(forceDir);

// Determine the additional torque to apply when swapping direction
var angularPoint = Mathf.InverseLerp(0, _maxAngularVelocity, Mathf.Abs(_rb.angularVelocity.z));
var amount = Mathf.Lerp(0, _maxTorqueBonus, angularPoint);
var torque = _torque + amount;

// Apply torque
var dir = Vector3.Dot(_spawnPoint.forward, Vector3.right) < 0 ? Vector3.back : Vector3.forward;
_rb.AddTorque(dir * torque);
Private Sub CreateMyListView()
    ' Create a new ListView control.
    Dim listView1 As New ListView()
    listView1.Bounds = New Rectangle(New Point(10, 10), New Size(300, 200))

    ' Set the view to show details.
    listView1.View = View.Details
    ' Allow the user to edit item text.
    listView1.LabelEdit = True
    ' Allow the user to rearrange columns.
    listView1.AllowColumnReorder = True
    ' Display check boxes.
    listView1.CheckBoxes = True
    ' Select the item and subitems when selection is made.
    listView1.FullRowSelect = True
    ' Display grid lines.
    listView1.GridLines = True
    ' Sort the items in the list in ascending order.
    listView1.Sorting = SortOrder.Ascending

    ' Create three items and three sets of subitems for each item.
    Dim item1 As New ListViewItem("item1", 0)
    ' Place a check mark next to the item.
    item1.Checked = True
    item1.SubItems.Add("1")
    item1.SubItems.Add("2")
    item1.SubItems.Add("3")
    Dim item2 As New ListViewItem("item2", 1)
    item2.SubItems.Add("4")
    item2.SubItems.Add("5")
    item2.SubItems.Add("6")
    Dim item3 As New ListViewItem("item3", 0)
    ' Place a check mark next to the item.
    item3.Checked = True
    item3.SubItems.Add("7")
    item3.SubItems.Add("8")
    item3.SubItems.Add("9")

    ' Create columns for the items and subitems.
    ' Width of -2 indicates auto-size.
    listView1.Columns.Add("Item Column", -2, HorizontalAlignment.Left)
    listView1.Columns.Add("Column 2", -2, HorizontalAlignment.Left)
    listView1.Columns.Add("Column 3", -2, HorizontalAlignment.Left)
    listView1.Columns.Add("Column 4", -2, HorizontalAlignment.Center)

    'Add the items to the ListView.
    listView1.Items.AddRange(New ListViewItem() {item1, item2, item3})

    ' Create two ImageList objects.
    Dim imageListSmall As New ImageList()
    Dim imageListLarge As New ImageList()

    ' Initialize the ImageList objects with bitmaps.
    imageListSmall.Images.Add(Bitmap.FromFile("C:\MySmallImage1.bmp"))
    imageListSmall.Images.Add(Bitmap.FromFile("C:\MySmallImage2.bmp"))
    imageListLarge.Images.Add(Bitmap.FromFile("C:\MyLargeImage1.bmp"))
    imageListLarge.Images.Add(Bitmap.FromFile("C:\MyLargeImage2.bmp"))

    'Assign the ImageList objects to the ListView.
    listView1.LargeImageList = imageListLarge
    listView1.SmallImageList = imageListSmall

    ' Add the ListView to the control collection.
    Me.Controls.Add(listView1)
End Sub
' Declare the Listview object.
Friend WithEvents myListView As System.Windows.Forms.ListView

' Initialize the ListView object with subitems of a different
' style than the default styles for the ListView.
Private Sub InitializeListView()

    ' Set the Location, View and Width properties for the 
    ' ListView object. 
    myListView = New ListView
    With (myListView)
        .Location = New System.Drawing.Point(20, 20)

        ' The View property must be set to Details for the 
        ' subitems to be visible.
        .View = View.Details
        .Width = 250
    End With

    ' Each SubItem object requires a column, so add three columns.
    Me.myListView.Columns.Add("Key", 50, HorizontalAlignment.Left)
    Me.myListView.Columns.Add("A", 100, HorizontalAlignment.Left)
    Me.myListView.Columns.Add("B", 100, HorizontalAlignment.Left)

    ' Add a ListItem object to the ListView.
    Dim entryListItem As ListViewItem = myListView.Items.Add("Items")

    ' Set UseItemStyleForSubItems property to false to change 
    ' look of subitems.
    entryListItem.UseItemStyleForSubItems = False

    ' Add the expense subitem.
    Dim expenseItem As ListViewItem.ListViewSubItem = _
        entryListItem.SubItems.Add("Expense")

    ' Change the expenseItem object's color and font.
    expenseItem.ForeColor = System.Drawing.Color.Red
    expenseItem.Font = New System.Drawing.Font _
        ("Arial", 10, System.Drawing.FontStyle.Italic)

    ' Add a subitem called revenueItem 
    Dim revenueItem As ListViewItem.ListViewSubItem = _
        entryListItem.SubItems.Add("Revenue")

    ' Change the revenueItem object's color and font.
    revenueItem.ForeColor = System.Drawing.Color.Blue
    revenueItem.Font = New System.Drawing.Font _
        ("Times New Roman", 10, System.Drawing.FontStyle.Bold)

    ' Add the ListView to the form.
    Me.Controls.Add(Me.myListView)
End Sub
public class ListView : System.Windows.Forms.Control
background-color: rgba(255, 255, 255, 0.4);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
function scrolling(event) {
  let scrollPercent =
    (event.target.scrollTop /
      (scrollableElement.value.scrollHeight -
        scrollableElement.value.clientHeight)) *
    100;
}

window.addEventListener("scroll", function () {
  let st = window.pageYOffset || document.documentElement.scrollTop;
  if (st > window.innerHeight / 2 && st > lastScrollTop) {
    isMenuOpen.value = false;
  } else if (st > window.innerHeight / 2 && st < lastScrollTop) {
    isMenuOpen.value = true;
  }
  lastScrollTop = st <= 0 ? 0 : st;
});

function storeTouchPosition() {
  initialTouchPosition.value = event.touches[0].clientY;
  // initialBottomPosition.value =
  //   draggableElement.value.getBoundingClientRect().bottom;
}
function resizeSublinks() {
  document.body.style.overflow = "hidden";
  let delta = event.touches[0].clientY - initialTouchPosition.value;
  let maxScrollDistance = draggableElement.value.scrollHeight - 130;
  let top = draggableElement.value.getBoundingClientRect().top;

  if (delta > 0) {
    //element is being dragged down
    if (draggableElement.value && top <= 392) {
      draggableElement.value.style.transform = `translateY(${delta}px)`;
    }
  } else if (draggableElement.value && delta * -1 <= maxScrollDistance) {
    draggableElement.value.style.transform = `translateY(${delta}px)`;
  }
}
function stopDragging() {
  document.body.style.overflow = "auto";
  initialTouchPosition.value = null;
}
def generate_file(file_size_mb, file_name):
    file_size = file_size_mb * 1024 * 1024
    with open(file_name, 'wb') as f:
        f.write(b'\b' * file_size)


generate_file(file_size_mb=2, file_name='test.test')
<!-- Google tag (gtag.js) -->

<script async src="https://www.googletagmanager.com/gtag/js?id=G-HTKNHG"></script>
3
<script>
4
  window.dataLayer = window.dataLayer || [];
5
  function gtag(){dataLayer.push(arguments);}

  gtag('js', new Date());

​
8
  gtag('config', 'G-H34TKNH5G8');

</script>
import mongoose from "mongoose"
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;

import {ERC20} from "solmate/tokens/ERC20.sol";

contract MyToken is ERC20 {
    constructor(
        string memory name,
        string memory symbol,
        uint8 decimals,
        uint256 initialSupply
    ) ERC20(name, symbol, decimals) {
        _mint(msg.sender, initialSupply);
    }
}
$ forge create --rpc-url <your_rpc_url> \
    --constructor-args "ForgeUSD" "FUSD" 18 1000000000000000000000 \
    --private-key <your_private_key> \
    --etherscan-api-key <your_etherscan_api_key> \
    --verify \
    src/MyToken.sol:MyToken
# Enable gzip compression for text-based files
http {
   gzip on;
   gzip_types text/plain text/css text/javascript;
}
$(document).ready(function () {
	$('a[data-scroll]').click(function () {
		$('html, body').animate(
			{
				scrollTop: $('.conatct-us').offset().top,
			},
			1000,
		);
	});
});
User Name
anmol.tyagi
Password
|Kzkd#OB;|5jjp?
Notes
account id- satmodo username-
anmol.tyagi-at-877029150039
password-
fYJeCK78H9C5XDaAX92B8+lEv0h0X1+GgC5dt7cYCVU=


login : 
anmol.tyagi
pass: 
Anmol.t2b.tyagi@123

Server 2 branch name:

master-> master-no-cron
staging-> stgaing-no-cron

stop backend process:

sudo kill PID
<!DOCTYPE html>
<html>
<head>
<style>
.button {
  border: none;
  color: white;
  padding: 15px 32px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 16px;
  margin: 4px 2px;
  cursor: pointer;
}

.button1 {background-color: #04AA6D;} /* Green */
.button2 {background-color: #008CBA;} /* Blue */
</style>
</head>
<body>

<button class="button button1">Green</button>
<button class="button button2">Blue</button>

</body>
</html>
<div>
			<h1>GeeksforGeeks</h1>
			<h3>Click on the button to see image</h3>
			<!-- img element without src attribute -->
			<img id="image" src="" />
		</div>
		<button type="button" onclick="show()" id="btnID">
			dixwell
		</button>	
		<script>
			function show() {
				/* Get image and change value 
				of src attribute */
				let image = document.getElementById("image");
				image.src = "495+Dixwell+Avenue.jpeg"
				document.getElementById("btnID")
					.style.display = "none";
			}
		</script>
import { useEffect, useState } from "react";
import { useSupabaseClient } from "@supabase/auth-helpers-react";
import { HeadingLink, MinimalPage, PageHeading, Spinner } from "ui";
import type { Database } from "../../../types";
import dayjs from "dayjs";

const ShiftTable = () => {
  const [usersOnShift, setUsersOnShift] = useState<
    Array<{ user: string; shift_start: string | null }>
  >([]);
  const [loading, setLoading] = useState(true);
  const [error, setError] = useState("");
  const supabaseClient = useSupabaseClient<Database>();

  useEffect(() => {
    const fetchUsersOnShift = async () => {
      setLoading(true);
      try {
        const { data: usersData, error: usersError } = await supabaseClient
          .from("UserLastWorkedOn")
          .select("shift_start, user, users_view (email)")
          .not("shift_start", "is", null);

        if (usersError) {
          setError(usersError.message ?? "Failed to fetch user shift data");
          console.error(usersError);
        }

        const mappedUsers = usersData?.map((user) => {
          const mappedUser: { user: string; shift_start: string | null } = {
            shift_start: user.shift_start,
            user: Array.isArray(user.users_view)
              ? user.users_view[0].email
              : user.users_view?.email ?? user.user,
          };
          return mappedUser;
        });

        setUsersOnShift(mappedUsers ?? []);
      } catch (err) {
        setError("Failed to fetch user shift data");
        console.error(err);
      } finally {
        setLoading(false);
      }
    };

    fetchUsersOnShift();
  }, [supabaseClient]);

  return (
    <MinimalPage
      pageTitle="Shift Table | Email Interface"
      pageDescription="Spot Ship Email Interface | Shift Table"
      commandPrompt
    >
      <div className="w-full">
        <HeadingLink icon="back" text="Home" href="/secure/home" />
      </div>
      <PageHeading text="Spot Ship Shift Table" />
      <div className="flex w-full flex-col">
        {loading ? (
          <Spinner />
        ) : error ? (
          <p className="text-red-500">Error: {error}</p>
        ) : usersOnShift.length ? (
          <table className="mt-4 min-w-full">
            <thead>
              <tr>
                <th className="px-6 py-3 text-left text-xs font-medium uppercase tracking-wider text-gray-500">
                  User Email
                </th>
                <th className="px-6 py-3 text-left text-xs font-medium uppercase tracking-wider text-gray-500">
                  Shift Started
                </th>
              </tr>
            </thead>
            <tbody className="divide-white-200 divide-x ">
              {usersOnShift.map((user, index) => (
                <tr key={index}>
                  <td className=" text-white-500 px-6 py-4 text-sm">
                    {user.user}
                  </td>
                  <td className=" text-white-500 px-6 py-4 text-sm">
                    {dayjs(user.shift_start).format("DD-MM-YYYY | HH:mm")}
                  </td>
                </tr>
              ))}
            </tbody>
          </table>
        ) : (
          <p>No users are currently on shift</p>
        )}
      </div>
    </MinimalPage>
  );
};

export default ShiftTable;
abstract class Shape{
    abstract void draw();
    int size;
    abstract void remove();
}

class Rectangle extends Shape {

    void draw(){
        System.out.println("Drawing a rectangle "+size);
    }
    void remove(){
        System.out.println("removing what we drew");
    }

}


public class Second {
    public static void main(String[] args) {
        Rectangle obj=new Rectangle();
        obj.draw();
        obj.remove();
    }
}
1. git branch
2. git checkout ... (dev oder master)
3. git pull origin dev (master) 
4. git add .(oder separat alle Dateien mit dem Pfad)
5. git commit - m 'dein commit hier'
6. git tag -a TAGNUMMER -m 'tagnummer'
7. git push --tags origin dev (master).
<?xml version="1.0" encoding="UTF-8"?>
<Flow xmlns="http://soap.sforce.com/2006/04/metadata">
    <actionCalls>
        <name>Email_Change_Confirmation</name>
        <label>Email Change Confirmation</label>
        <locationX>176</locationX>
        <locationY>335</locationY>
        <actionName>emailSimple</actionName>
        <actionType>emailSimple</actionType>
        <flowTransactionModel>CurrentTransaction</flowTransactionModel>
        <inputParameters>
            <name>emailBody</name>
            <value>
                <elementReference>EmailChangeTemplate</elementReference>
            </value>
        </inputParameters>
        <inputParameters>
            <name>emailAddresses</name>
            <value>
                <elementReference>$Record__Prior.Email</elementReference>
            </value>
        </inputParameters>
        <inputParameters>
            <name>sendRichBody</name>
            <value>
                <booleanValue>true</booleanValue>
            </value>
        </inputParameters>
        <inputParameters>
            <name>senderAddress</name>
            <value>
                <stringValue>noreply_energy@britishgas.co.uk</stringValue>
            </value>
        </inputParameters>
        <inputParameters>
            <name>senderType</name>
            <value>
                <stringValue>OrgWideEmailAddress</stringValue>
            </value>
        </inputParameters>
        <inputParameters>
            <name>emailSubject</name>
            <value>
                <stringValue>Please activate your new email address</stringValue>
            </value>
        </inputParameters>
    </actionCalls>
    <apiVersion>56.0</apiVersion>
    <environments>Default</environments>
    <interviewLabel>Email Change Confirmation {!$Flow.CurrentDateTime}</interviewLabel>
    <label>Email Change Confirmation</label>
    <processMetadataValues>
        <name>BuilderType</name>
        <value>
            <stringValue>LightningFlowBuilder</stringValue>
        </value>
    </processMetadataValues>
    <processMetadataValues>
        <name>CanvasMode</name>
        <value>
            <stringValue>AUTO_LAYOUT_CANVAS</stringValue>
        </value>
    </processMetadataValues>
    <processMetadataValues>
        <name>OriginBuilderType</name>
        <value>
            <stringValue>LightningFlowBuilder</stringValue>
        </value>
    </processMetadataValues>
    <processType>AutoLaunchedFlow</processType>
    <start>
        <locationX>50</locationX>
        <locationY>0</locationY>
        <connector>
            <targetReference>Email_Change_Confirmation</targetReference>
        </connector>
        <filterFormula>AND(NOT(ISBLANK({!$Record__Prior.Email})),NOT(ISBLANK({!$Record.Email})),ISCHANGED({!$Record.Email}) )</filterFormula>
        <object>Contact</object>
        <recordTriggerType>Update</recordTriggerType>
        <triggerType>RecordAfterSave</triggerType>
    </start>
    <status>Active</status>
    <textTemplates>
        <name>EmailChangeTemplate</name>
        <isViewedAsPlainText>false</isViewedAsPlainText>
        <text>&lt;p style=&quot;text-align: right;&quot;&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;background-color: rgb(255, 255, 255); font-size: 18px; font-family: Calibri, Calibri_EmbeddedFont, Calibri_MSFontService, sans-serif; color: rgb(0, 0, 0);&quot;&gt;You changed your email address&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;background-color: rgb(255, 255, 255); font-size: 16px; font-family: Calibri, Calibri_EmbeddedFont, Calibri_MSFontService, sans-serif; color: rgb(0, 0, 0);&quot;&gt;Please set up&amp;nbsp;your&amp;nbsp;new password&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: rgb(255, 255, 255); font-size: 18px; font-family: Calibri, Calibri_EmbeddedFont, Calibri_MSFontService, sans-serif; color: rgb(0, 0, 0);&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 11pt; font-family: Calibri, Calibri_EmbeddedFont, Calibri_MSFontService, sans-serif;&quot;&gt;Hello {!$Record.FirstName},&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 11pt; font-family: Calibri, Calibri_EmbeddedFont, Calibri_MSFontService, sans-serif;&quot;&gt;Thanks&amp;nbsp;for updating your email address to {!$Record.Email}.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 11pt; font-family: Calibri, Calibri_EmbeddedFont, Calibri_MSFontService, sans-serif;&quot;&gt;When you next&amp;nbsp;log in,&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;https://www.britishgas.co.uk/identity&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;https://www.britishgas.co.uk/identity&lt;/a&gt; &lt;span style=&quot;font-size: 11pt; font-family: Calibri, Calibri_EmbeddedFont, Calibri_MSFontService, sans-serif;&quot;&gt;you’ll need to&amp;nbsp;set up a new&amp;nbsp;password to get started.&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;strong style=&quot;font-size: 11pt; font-family: Calibri, Calibri_EmbeddedFont, Calibri_MSFontService, sans-serif;&quot;&gt;Didn’t request this?&amp;nbsp;&lt;/strong&gt;&lt;span style=&quot;font-size: 11pt; font-family: Calibri, Calibri_EmbeddedFont, Calibri_MSFontService, sans-serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 11pt; font-family: Calibri, Calibri_EmbeddedFont, Calibri_MSFontService, sans-serif;&quot;&gt;If&amp;nbsp;you didn’t&amp;nbsp;ask us to make&amp;nbsp;this change,&amp;nbsp;please&amp;nbsp;get in touch.&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;https://www.britishgas.co.uk/energy/contact-us&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot; style=&quot;font-size: 11pt; font-family: Calibri, Calibri_EmbeddedFont, Calibri_MSFontService, sans-serif;&quot;&gt;https://www.britishgas.co.uk/energy/contact-us&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;strong style=&quot;font-size: 11pt; font-family: Calibri, Calibri_EmbeddedFont, Calibri_MSFontService, sans-serif;&quot;&gt;Just a reminder:&lt;/strong&gt;&lt;span style=&quot;font-size: 11pt; font-family: Calibri, Calibri_EmbeddedFont, Calibri_MSFontService, sans-serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-family: Calibri, Calibri_EmbeddedFont, Calibri_MSFontService, sans-serif;&quot;&gt;Never share your password or security questions with anyone&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: Calibri, Calibri_EmbeddedFont, Calibri_MSFontService, sans-serif;&quot;&gt;Create passwords that are hard to guess and don’t use personal information&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: Calibri, Calibri_EmbeddedFont, Calibri_MSFontService, sans-serif;&quot;&gt;Use different passwords for each of your online accounts&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: Calibri, Calibri_EmbeddedFont, Calibri_MSFontService, sans-serif;&quot;&gt;Your passwords&amp;nbsp;need:&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-family: Calibri, Calibri_EmbeddedFont, Calibri_MSFontService, sans-serif;&quot;&gt;To be between 8 and 32 characters&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: Calibri, Calibri_EmbeddedFont, Calibri_MSFontService, sans-serif;&quot;&gt;To&amp;nbsp;contain at least one upper case&amp;nbsp;letter and&amp;nbsp;one lower case letter&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: Calibri, Calibri_EmbeddedFont, Calibri_MSFontService, sans-serif;&quot;&gt;To contain at least one number&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: Calibri, Calibri_EmbeddedFont, Calibri_MSFontService, sans-serif;&quot;&gt;Symbols are optional, but are a good way to make a password more secure&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;span style=&quot;font-size: 11pt; font-family: Calibri, Calibri_EmbeddedFont, Calibri_MSFontService, sans-serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 11pt; font-family: Calibri, Calibri_EmbeddedFont, Calibri_MSFontService, sans-serif;&quot;&gt;Th&lt;/span&gt;&lt;span style=&quot;font-size: 11pt; font-family: Calibri, Calibri_EmbeddedFont, Calibri_MSFontService, sans-serif; color: rgb(68, 68, 68);&quot;&gt;anks for being with us for your energy,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 11pt; font-family: Calibri, Calibri_EmbeddedFont, Calibri_MSFontService, sans-serif; color: rgb(68, 68, 68);&quot;&gt;Your British Gas Energy Team&amp;nbsp;&lt;/span&gt;&lt;/p&gt;</text>
    </textTemplates>
</Flow>
<ul class="context-menu" data-bind="visible: contextMenu, , style: { left: contextMenuPosition().x + 'px', top: contextMenuPosition().y + 'px' }">
    <li class="context-link" data-bind="click: openInNewTab">
        <span data-bind="attr: { class: 'fa fa-external-link-alt' }"></span>
        <span class="new-tab" data-bind="i18n: 'Open in a new tab'"></span>
    </li>
    <hr>
    <li class="context-link" data-bind="click: copyInClipboard">
        <span data-bind="attr: { class: 'fa fa-copy' }"></span>
        <span class="copy-link" data-bind="i18n: 'Copy in clipboard'"></span>
    </li>
    <li class="context-link" data-bind="click: saveLinkAs">
        <span data-bind="attr: { class: 'fa fa-download' }"></span>
        <span class="save-link" data-bind="i18n: 'Save link as'"></span>
    </li>
    <li class="context-link" data-bind="click: goBack">
        <span data-bind="attr: { class: 'fa fa-arrow-left' }"></span>
        <span class="go-back" data-bind="i18n: 'Back'"></span>
    </li>
    <li class="context-link" data-bind="click: goForward">
        <span data-bind="attr: { class: 'fa fa-arrow-right' }"></span>
        <span class="go-forward" data-bind="i18n: 'Forward'"></span>
    </li>
    <hr>
    <li class="context-link" data-bind="click: refreshPage">
        <span data-bind="attr: { class: 'fa fa-sync' }"></span>
        <span class="refresh-page" data-bind="i18n: 'Refresh'"></span>
    </li>
</ul>
$(document).ready(function ($) {
	$('body .description-form').on(
		'change',
		'.gchoice input[type="radio"]',
		function () {
			if ($(this).is(':checked')) {
				$(this)
					.closest(
						'.gform_page:nth-child(1),.gform_page:nth-child(2),.gform_page:nth-child(3)',
					)
					.find('.gform_next_button')
					.click();
			}
		},
	);
});
//Here is signleton - that means you can create an object of a class outside it

class singleton{
  
  static let shared = singleton()
  init(){} //(Optional to do it or not)
  
  let temp = 5

}

//Usage

viewDidLoad(){
  let num = singleton.shared.temp
  
  //but also you can create object
  let obj = singleton()
  let num = obj.temp
}


//Here is Signleton - that means you cannot create an object of a class outside it

class Singleton{
  
  static let shared = singleton()
  private init(){} //(Optional to do it or not)
  
  let temp = 5

}

//Usage

viewDidLoad(){
  let num = singleton.shared.temp
  
  //but you cannot create object
  //let obj = singleton()
  //let num = obj.temp
}
//replace any element of an array with the provided element(prevoius element will be deleted)
#include <stdio.h>

int main() {

    int size, element, pos;
    
    // Input the size of the array
    printf("Enter size of array: ");
    scanf("%d", &size);

    int arr[size];

    // Input array elements
    printf("Enter elements of array:\n");
    for (int i = 0; i < size; i++) {
        scanf("%d", &arr[i]);
    }

    // Input the number to be inserted
    printf("Enter the number to insert: ");
    scanf("%d", &element);


    // get the position from user and authenticate it
    printf("enter the position to insert (0 to %d): ", size - 1);
    scanf("%d",&pos);
    if(pos < 0 || pos >= size){
        printf("\nInvalid Position");
        return 1;
        }

    arr[pos] = element;

    // Print the updated array
    printf("Array after insertion:\n");
    for (int i = 0; i < size; i++) {
        printf("%d ", arr[i]);
    }

    return 0;
}
#include<stdio.h>
void main(){
    int n;

    printf("enter number of element in an array: ");
    scanf("%d",&n);

    int arr[n];

    printf("enter elements in array: ");
    for(int i=0;i<n;i++){
        scanf("%d",&arr[i]);
    }
    printf("entered array: ");
     for(int i=0;i<n;i++){
        printf("%d",arr[i]);
    }

    printf("\nreversed array: ");
    for(int i=n-1;i>=0;i--){
        printf("%d",arr[i]);
    }
}
#include <stdio.h>

void by_ptr(int *rows, int *cols) {
    int matrix[*rows][*cols];

    printf("Enter the elements of the matrix:\n");
    for (int i = 0; i < *rows; i++) {
        for (int j = 0; j < *cols; j++) {
            scanf("%d", &matrix[i][j]);
        }
    }

    // Transpose the matrix in-place
    for (int i = 0; i < *rows; i++) {
        for (int j = i+1; j < *cols; j++) {
            // Swap matrix elements
            int temp = matrix[i][j];
            matrix[i][j] = matrix[j][i];
            matrix[j][i] = temp;
        }
    }

    // Display the transposed matrix
    printf("Transposed Matrix:\n");
    for (int i = 0; i < *cols; i++) {
        for (int j = 0; j < *rows; j++) {
            printf("%d ", matrix[i][j]);
        }
        printf("\n");
    }
}

int main() {
    int row,cols;
    printf("enter  number of rows: ");
    scanf("%d",&row);
    printf("enter number of columns: ");
    scanf("%d",&cols);
    by_ptr(&row, &cols);
    return 0;
}
//insert element at specific position in an array without deleting the existing element
//size of array will increase and the next element will shift by one position
#include <stdio.h>

int main() {
    int size, i, pos, element;

    // Input the size of the array
    printf("Enter size of array: ");
    scanf("%d", &size);

    // Create an array with given size
    int arr[size];

    // Input elements of the array
    printf("Enter elements of the array:\n");
    for (i = 0; i < size; i++) {
        scanf("%d", &arr[i]);
    }

    // Input position and element to insert
    printf("Enter position to insert: ");
    scanf("%d", &pos);
    if (pos < 0 || pos > size) {
        printf("Invalid position.\n");
        return 1;
    }
    
    printf("Enter element to insert: ");
    scanf("%d", &element);

    // Shift elements to the right to make space for the new element
    for (i = size; i > pos; i--) {
        arr[i] = arr[i - 1];
    }

    // Insert the element at the specified position
    arr[pos] = element;

    // Increment the size of the array
    size++;

    // Print the updated array
    printf("Array after insertion:\n");
    for (i = 0; i < size; i++) {
        printf("%d ", arr[i]);
    }
    printf("\n");

    return 0;
}
//insert from end of array and no element is removed(size of array is increased)
#include <stdio.h>

int main() {
    int size, element;

    // Input the size of the array
    printf("Enter size of array: ");
    scanf("%d", &size);

    int arr[size];
    
    // Input array elements
    printf("Enter elements of array:\n");
    for (int i = 0; i < size; i++) {
        scanf("%d", &arr[i]);
    }

    // Shift elements to make space for the new element
    for (int i =  - 1; i >= size; i--) {
        arr[i + 1] = arr[i];
    }

    // Input the number to be inserted
    printf("Enter the number to insert: ");
    scanf("%d", &element);

    // Insert the number at the beginning
    arr[size] = element;

    // Increment the size of the array
    size++;

    // Print the updated array
    printf("Array after insertion:\n");
    for (int i = 0; i < size; i++) {
        printf("%d ", arr[i]);
    }

    return 0;
}
//insert from beginning of array and no element is removed
//size of array is increased by one
#include <stdio.h>

int main() {
    int size, element;

    // Input the size of the array
    printf("Enter size of array: ");
    scanf("%d", &size);

    int arr[size];
    
    // Input array elements
    printf("Enter elements of array:\n");
    for (int i = 0; i < size; i++) {
        scanf("%d", &arr[i]);
    }

    // Input the number to be inserted
    printf("Enter the number to insert: ");
    scanf("%d", &element);

    // Shift elements to make space for the new element
    for (int i = size - 1; i >= 0; i--) {
        arr[i + 1] = arr[i];
    }

    // Insert the number at the beginning
    arr[0] = element;

    // Increment the size of the array
    size++;

    // Print the updated array
    printf("Array after insertion:\n");
    for (int i = 0; i < size; i++) {
        printf("%d ", arr[i]);
    }

    return 0;
}
//insert node at the end of singly circular linked list
#include<stdio.h>
#include<stdlib.h>
struct node{
    int data;
    struct node *next;
};

void main(){
    struct node *head;
    head=malloc(sizeof(struct node));
    head->data=45;
    head->next=NULL;

    struct node *node2;
    node2=malloc(sizeof(struct node));
    node2->data=98;
    node2->next=NULL;
    head->next=node2;

    node2=malloc(sizeof(struct node));
    node2->data=3;
    node2->next=NULL;
    head->next->next=node2;
    node2->next=head;



    //insert node at the end of singly circular linked list
    struct node *newnode;
    newnode=malloc(sizeof(struct node));
    newnode->data=67;
    newnode->next=NULL;

    struct node *ptr;
    ptr=head;
    while(ptr->next != head){
        ptr=ptr->next;
    }

    newnode->next=head;
    ptr->next=newnode;

    ptr=head;
    
    while(ptr->next != head){
        printf("%d ",ptr->data);
        ptr=ptr->next;
    }
    printf("%d",ptr->data);
}
//insert node at the beginning of singly circular linked list
#include<stdio.h>
#include<stdlib.h>
struct node{
    int data;
    struct node *next;
};

void main(){
    struct node *head;
    head=malloc(sizeof(struct node));
    head->data=45;
    head->next=NULL;

    struct node *node2;
    node2=malloc(sizeof(struct node));
    node2->data=98;
    node2->next=NULL;
    head->next=node2;

    node2=malloc(sizeof(struct node));
    node2->data=3;
    node2->next=NULL;
    head->next->next=node2;
    node2->next=head;

    struct node *newnode;
    newnode=malloc(sizeof(struct node));
    newnode->data=67;
    newnode->next=NULL;

    struct node *ptr;
    ptr=head;
    while(ptr->next != head){
        ptr=ptr->next;
    }

    newnode->next=head;
    ptr->next=newnode;

    head=newnode;
    ptr=head;
    
    while(ptr->next != head){
        printf("%d ",ptr->data);
        ptr=ptr->next;
    }
    printf("%d",ptr->data);
}
#include<stdio.h>
#include<stdlib.h>

struct node {
    struct node *prev;
    int data;
    struct node *next;
};

int main() {
    struct node *head;
    head = malloc(sizeof(struct node));
    head->prev = NULL;
    head->data = 45;
    head->next = NULL;

    struct node *node2;
    node2 = malloc(sizeof(struct node));
    node2->prev = head;
    head->next = node2;
    node2->data = 98;
    node2->next = NULL;

    struct node *node3;
    node3 = malloc(sizeof(struct node));
    node3->data = 3;
    node3->next = NULL;
    node3->prev = node2;
    node2->next = node3;
    
    struct node *node4;
    node4=malloc(sizeof(struct node));
    node4->data=67;
    node4->prev=node3;
    node4->next=NULL;
    node3->next=node4;


    //reversing doubly linked list
    //(by printing them in reverse and not really reversing list)
    struct node *temp;
    temp=head;
    while(temp->next != NULL){
        temp=temp->next;
    }
    head=temp;
    temp=NULL;

    struct node *ptr;
    ptr = head;
    while (ptr != NULL) {
        printf("%d ", ptr->data);
        ptr = ptr->prev;
    }

}
//delete node from specific position in a doubly linked list
#include<stdio.h>
#include<stdlib.h>

struct node {
    struct node *prev;
    int data;
    struct node *next;
};

int main() {
    struct node *head;
    head = malloc(sizeof(struct node));
    head->prev = NULL;
    head->data = 45;
    head->next = NULL;

    struct node *node2;
    node2 = malloc(sizeof(struct node));
    node2->prev = head;
    head->next = node2;
    node2->data = 98;
    node2->next = NULL;

    struct node *node3;
    node3 = malloc(sizeof(struct node));
    node3->data = 3;
    node3->next = NULL;
    node3->prev = node2;
    node2->next = node3;
    
    struct node *node4;
    node4=malloc(sizeof(struct node));
    node4->data=67;
    node4->prev=node3;
    node4->next=NULL;
    node3->next=node4;


    //delete node from specific position in a doubly linked list
    struct node *temp1,*temp2,*temp3;
    temp1=head;
    temp2=head;
    temp3=head;

    while(temp1->next != NULL){
        temp1=temp1->next;
    }

    int pos=4;
    pos--;
    while(pos != 1){
        temp2=temp2->next;
        pos--;
    }

    pos=3;
    pos--;
    while(pos != 1){
        temp3=temp3->next;
        pos--;
    }

    temp3->next=temp1;
    temp1->prev=temp3;
    temp2->prev=NULL;
    temp2->next=NULL;
    free(temp2);
    temp2=NULL;

    struct node *ptr;
    ptr = head;
    while (ptr != NULL) {
        printf("%d ", ptr->data);
        ptr = ptr->next;
    }
}
//delete node from starting in a doubly linked list
#include<stdio.h>
#include<stdlib.h>
struct node{
    struct node *prev;
    int data;
    struct node *next;
};

void main(){
    struct node *head;
    head=malloc(sizeof(struct node));
    head->prev=NULL;
    head->data=45;
    head->next=NULL;

    struct node *current;
    current=malloc(sizeof(struct node));
    current->prev=head;
    head->next=current;
    current->data=98;
    current->next=NULL;
    
    struct node *node3;
    node3=malloc(sizeof(struct node));
    head->next->next=node3;
    node3->data=3;
    node3->next=NULL;
    node3->prev=current;



    //delete from starting in a doubly linked list
    struct node *temp;
    temp=head;
    int pos=3;
    pos--;
    while(pos != 1){
        temp=temp->next;
        pos--;
    }

    temp->prev=NULL;
    free(head);
    head=temp;
    temp=NULL; 

    struct node *ptr;
    ptr=head;
    while(ptr != NULL){
        printf("%d ",ptr->data);
        ptr=ptr->next;
    }
}
//delete node from end of doubly linked list
#include<stdio.h>
#include<stdlib.h>
struct node{
    struct node *prev;
    int data;
    struct node *next;
};

void main(){
    struct node *head;
    head=malloc(sizeof(struct node));
    head->prev=NULL;
    head->data=45;
    head->next=NULL;

    struct node *current;
    current=malloc(sizeof(struct node));
    current->prev=head;
    head->next=current;
    current->data=98;
    current->next=NULL;
    
    struct node *node3;
    node3=malloc(sizeof(struct node));
    head->next->next=node3;
    node3->data=3;
    node3->next=NULL;
    node3->prev=current;



    //delete node from end in a doubly linked list
    struct node *temp1,*temp2;
    temp1=head;
    temp2=head;

    int pos=3;
    pos--;
    while(pos != 1){
        temp1=temp1->next;
        pos--;
    }
    while(temp2->next != NULL){
        temp2=temp2->next;
    }

    temp1->next=NULL;
    temp2->prev=NULL;
    free(temp2);
    temp2=NULL;

    struct node *ptr;
    ptr=head;
    while(ptr != NULL){
        printf("%d ",ptr->data);
        ptr=ptr->next;
    }
}
//insert node at specific position in doubly linked list
#include<stdio.h>
#include<stdlib.h>
struct node{
    struct node *prev;
    int data;
    struct node *next;
};

void main(){
    struct node *head;
    head=malloc(sizeof(struct node));
    head->prev=NULL;
    head->data=45;
    head->next=NULL;

    struct node *current;
    current=malloc(sizeof(struct node));
    current->prev=head;
    head->next=current;
    current->data=98;
    current->next=NULL;
    
    struct node *node3;
    node3=malloc(sizeof(struct node));
    head->next->next=node3;
    node3->data=3;
    node3->next=NULL;
    node3->prev=current;



    //insert at specific position in doubly linked list
    struct node *newnode;
    newnode=malloc(sizeof(struct node));
    newnode->data=67;

    struct node *temp1,*temp2;
    temp1=head;
    temp2=head;

    while(temp1->next !=  NULL){
        temp1=temp1->next;
    }

    int pos=3;
    pos--;
    while(pos != 1){
        temp2=temp2->next;
        pos--;
    }

    temp2->next=newnode;
    newnode->prev=temp2;
    newnode->next=temp1;
    temp1->prev=newnode;

    struct node *ptr;
    ptr=head;
    while(ptr != NULL){
        printf("%d ",ptr->data);
        ptr=ptr->next;
    }
}
//insert node at specific position in doubly linked list
#include<stdio.h>
#include<stdlib.h>
struct node{
    struct node *prev;
    int data;
    struct node *next;
};

void main(){
    struct node *head;
    head=malloc(sizeof(struct node));
    head->prev=NULL;
    head->data=45;
    head->next=NULL;

    struct node *current;
    current=malloc(sizeof(struct node));
    current->prev=head;
    head->next=current;
    current->data=98;
    current->next=NULL;
    
    struct node *node3;
    node3=malloc(sizeof(struct node));
    head->next->next=node3;
    node3->data=3;
    node3->next=NULL;
    node3->prev=current;



    //insert at specific position in doubly linked list
    struct node *newnode;
    newnode=malloc(sizeof(struct node));
    newnode->data=67;

    struct node *temp1,*temp2;
    temp1=head;
    temp2=head;

    while(temp1->next !=  NULL){
        temp1=temp1->next;
    }

    int pos=3;
    pos--;
    while(pos != 1){
        temp2=temp2->next;
        pos--;
    }

    temp2->next=newnode;
    newnode->prev=temp2;
    newnode->next=temp1;
    temp1->prev=newnode;

    struct node *ptr;
    ptr=head;
    while(ptr != NULL){
        printf("%d ",ptr->data);
        ptr=ptr->next;
    }
}
//adding node at the end of doubly linked list
#include<stdio.h>
#include<stdlib.h>
struct node{
    struct node *prev;
    int data;
    struct node *next;
};

void main(){
    struct node *head;
    head=malloc(sizeof(struct node));
    head->prev=NULL;
    head->data=45;
    head->next=NULL;

    struct node *current;
    current=malloc(sizeof(struct node));
    current->prev=head;
    head->next=current;
    current->data=98;
    current->next=NULL;


    //adding node at end of a doubly linked list
    struct node *newnode;
    newnode=malloc(sizeof(struct node));
    newnode->data=3;
    newnode->prev=NULL;
    newnode->next=NULL;

    struct node *ptr;
    ptr=head;
    while(ptr->next != NULL){
        ptr=ptr->next;
    }

    ptr->next=newnode;
    newnode->prev=ptr;
  
    ptr=head;
    while(ptr != NULL){
        printf("%d ",ptr->data);
        ptr=ptr->next;
    }

}
//adding node at the beginning of a doubly linked list
#include<stdio.h>
#include<stdlib.h>
struct node{
    struct node *prev;
    int data;
    struct node *next;
};

void main(){
    struct node *head;
    head=malloc(sizeof(struct node));
    head->prev=NULL;
    head->data=45;
    head->next=NULL;

    struct node *current;
    current=malloc(sizeof(struct node));
    current->prev=head;
    head->next=current;
    current->data=98;
    current->next=NULL;
    
    struct node *node3;
    node3=malloc(sizeof(struct node));
    head->next->next=node3;
    node3->data=3;
    node3->next=NULL;
    node3->prev=current;

    //adding node at beginning of doubly linked list
    //newnode
    struct node *newnode;
    newnode=malloc(sizeof(struct node));
    newnode->data=67;
    head->prev=newnode;
    newnode->next=head;
    head=newnode;
    newnode=NULL;

    struct node *ptr;
    ptr=head;
    while(ptr != NULL){
        printf("%d ",ptr->data);
        ptr=ptr->next;
    }

}
//single linked list searching of an element
#include<stdio.h>
#include<stdlib.h>
struct node{
    int data;
    struct node *next;
};

void main(){
    struct node *head;
    head=malloc(sizeof(struct node));
    head->data=45;
    head->next=NULL;

    struct node *node2;
    node2=malloc(sizeof(struct node));
    node2->data=98;
    node2->next=NULL;
    head->next=node2;

    node2=malloc(sizeof(struct node));
    node2->data=3;
    node2->next=NULL;
    head->next->next=node2;


    //search element in a single linked list
    struct node *ptr;
    ptr=head;
    int target=3;
    int count=1;
    while(ptr->data != target){
        ptr=ptr->next;
        count++;
    }
    printf("%d",count);
    
}
#include<stdio.h>
#include<stdlib.h>

struct node{
    int data;
    struct node *link;
};

void main(){
    struct node *head=NULL;
    head=malloc(sizeof(struct node));
    head->data=45;
    head->link=NULL;

    struct node *current=NULL;
    current=malloc(sizeof(struct node));
    current->data=98;
    current->link=NULL;
    head->link=current;

    current=malloc(sizeof(struct node));
    current->data=3;
    current->link=NULL;
    head->link->link=current;

    current=malloc(sizeof(struct node));
    current->data=67;
    current->link=NULL;
    head->link->link->link=current;

    struct  node *ptr;
    ptr=head;
    while(ptr != NULL){
        printf("%d ",ptr->data);
        ptr=ptr->link;
    }

    printf("\n");



//delete at specific position in a single linked list
/* LOGIC: using first pointer traverse till last node stop when first pointer points to last node
using second pointer traverse till the node to be deleted
using third pointer traverse till second node
update third pointer's link with third pointer value to join last node with second node 
and to cut link with third node
update second pointer's link to NULL in order to cut third node's link with last node
free second pointer to delete third node 
and update it with NULL so that it donot randomly point to anyone  */

    struct node *nextnode;
    nextnode=head;
    while(nextnode->link != NULL){
        nextnode=nextnode->link;
    }

    struct node *delnode;
    delnode=head;
    while(delnode->link->link != NULL){
        delnode=delnode->link;
    }

    struct node *prevnode;
    prevnode=head;
    while(prevnode->link->link->link != NULL){
        prevnode=prevnode->link;
    }

    prevnode->link=nextnode;
    delnode->link=NULL;
    free(delnode);
    delnode=NULL;

    ptr=head;
    while(ptr != NULL){
        printf("%d ",ptr->data);
        ptr=ptr->link;
    }

}
star

Thu Apr 11 2024 06:41:15 GMT+0000 (Coordinated Universal Time)

@HTPrince

star

Thu Apr 11 2024 06:41:12 GMT+0000 (Coordinated Universal Time)

@kervinandy123 #c

star

Thu Apr 11 2024 06:05:06 GMT+0000 (Coordinated Universal Time)

@kervinandy123 #c

star

Thu Apr 11 2024 01:28:02 GMT+0000 (Coordinated Universal Time) https://urvsso.urv.cat/cas/idp/profile/SAML2/Callback?entityId

@Dasaju

star

Thu Apr 11 2024 01:01:22 GMT+0000 (Coordinated Universal Time)

@CarlosR

star

Wed Apr 10 2024 23:03:10 GMT+0000 (Coordinated Universal Time)

@rafal_rydz

star

Wed Apr 10 2024 22:41:07 GMT+0000 (Coordinated Universal Time)

@v0xel #c#

star

Wed Apr 10 2024 14:30:39 GMT+0000 (Coordinated Universal Time) https://learn.microsoft.com/fr-fr/dotnet/api/system.windows.forms.listview.-ctor?view

@demelevet

star

Wed Apr 10 2024 14:28:47 GMT+0000 (Coordinated Universal Time) https://learn.microsoft.com/fr-fr/dotnet/api/system.windows.forms.view?view

@demelevet #colors

star

Wed Apr 10 2024 14:26:49 GMT+0000 (Coordinated Universal Time) https://learn.microsoft.com/fr-fr/dotnet/api/system.windows.forms.listview.view?view

@demelevet

star

Wed Apr 10 2024 14:25:41 GMT+0000 (Coordinated Universal Time) https://learn.microsoft.com/fr-fr/dotnet/api/system.windows.forms.listview?view

@demelevet

star

Wed Apr 10 2024 13:22:40 GMT+0000 (Coordinated Universal Time)

@divyasoni23 #css

star

Wed Apr 10 2024 11:24:10 GMT+0000 (Coordinated Universal Time)

@Paloma #js

star

Wed Apr 10 2024 07:07:17 GMT+0000 (Coordinated Universal Time) https://chen-studio.co.il/wp-admin/admin.php?page

@chen #undefined

star

Wed Apr 10 2024 05:44:26 GMT+0000 (Coordinated Universal Time)

@naeemi7

star

Wed Apr 10 2024 05:35:15 GMT+0000 (Coordinated Universal Time) https://book.getfoundry.sh/forge/deploying

@katyno

star

Wed Apr 10 2024 05:35:11 GMT+0000 (Coordinated Universal Time) https://book.getfoundry.sh/forge/deploying

@katyno

star

Wed Apr 10 2024 05:34:43 GMT+0000 (Coordinated Universal Time) https://medium.com/@saadjamilakhtar/optimizing-django-performance-tips-and-techniques-for-blazing-fast-applications-ab6e5d5af799

@viperthapa #python

star

Wed Apr 10 2024 05:34:17 GMT+0000 (Coordinated Universal Time)

@divyasoni23 #jquery

star

Wed Apr 10 2024 03:45:09 GMT+0000 (Coordinated Universal Time)

@anmoltyagi

star

Wed Apr 10 2024 02:56:08 GMT+0000 (Coordinated Universal Time) https://www.w3schools.com/tags/tag_button.asp

@skatzy

star

Wed Apr 10 2024 02:55:46 GMT+0000 (Coordinated Universal Time) https://www.geeksforgeeks.org/how-to-show-images-on-click-using-html/#

@skatzy

star

Tue Apr 09 2024 23:29:21 GMT+0000 (Coordinated Universal Time)

@rafal_rydz

star

Tue Apr 09 2024 17:53:39 GMT+0000 (Coordinated Universal Time)

@wayneinvein

star

Tue Apr 09 2024 11:28:28 GMT+0000 (Coordinated Universal Time)

@zaki

star

Tue Apr 09 2024 10:27:03 GMT+0000 (Coordinated Universal Time)

@MrSpongeHead

star

Tue Apr 09 2024 10:07:45 GMT+0000 (Coordinated Universal Time)

@zaki

star

Tue Apr 09 2024 07:47:41 GMT+0000 (Coordinated Universal Time)

@divyasoni23 #jquery

star

Tue Apr 09 2024 07:34:17 GMT+0000 (Coordinated Universal Time) https://wordpress.stackexchange.com/questions/228591/to-perform-the-requested-action-wordpress-needs-to-access-your-web-server-pleas

@ioVista

star

Tue Apr 09 2024 07:24:08 GMT+0000 (Coordinated Universal Time)

@Saurabh_Lodhi #swift #inapppurchase

star

Tue Apr 09 2024 03:15:39 GMT+0000 (Coordinated Universal Time) https://www.google.com/maps/@42.0201354,-70.9238472,3a,19.7y,180.8h,93.99t/data

@docpainting

star

Tue Apr 09 2024 02:16:44 GMT+0000 (Coordinated Universal Time)

@wayneinvein

star

Tue Apr 09 2024 02:16:19 GMT+0000 (Coordinated Universal Time)

@wayneinvein

star

Tue Apr 09 2024 02:15:57 GMT+0000 (Coordinated Universal Time)

@wayneinvein

star

Tue Apr 09 2024 02:15:32 GMT+0000 (Coordinated Universal Time)

@wayneinvein

star

Tue Apr 09 2024 02:15:00 GMT+0000 (Coordinated Universal Time)

@wayneinvein

star

Tue Apr 09 2024 02:14:30 GMT+0000 (Coordinated Universal Time)

@wayneinvein

star

Tue Apr 09 2024 02:12:53 GMT+0000 (Coordinated Universal Time)

@wayneinvein

star

Tue Apr 09 2024 02:12:24 GMT+0000 (Coordinated Universal Time)

@wayneinvein

star

Tue Apr 09 2024 02:11:47 GMT+0000 (Coordinated Universal Time)

@wayneinvein

star

Tue Apr 09 2024 02:11:09 GMT+0000 (Coordinated Universal Time)

@wayneinvein

star

Tue Apr 09 2024 02:10:38 GMT+0000 (Coordinated Universal Time)

@wayneinvein

star

Tue Apr 09 2024 02:10:09 GMT+0000 (Coordinated Universal Time)

@wayneinvein

star

Tue Apr 09 2024 02:09:40 GMT+0000 (Coordinated Universal Time)

@wayneinvein

star

Tue Apr 09 2024 02:09:40 GMT+0000 (Coordinated Universal Time)

@wayneinvein

star

Tue Apr 09 2024 02:09:08 GMT+0000 (Coordinated Universal Time)

@wayneinvein

star

Tue Apr 09 2024 02:08:34 GMT+0000 (Coordinated Universal Time)

@wayneinvein

star

Tue Apr 09 2024 02:07:45 GMT+0000 (Coordinated Universal Time)

@wayneinvein

star

Tue Apr 09 2024 02:07:02 GMT+0000 (Coordinated Universal Time)

@wayneinvein

Save snippets that work with our extensions

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