Snippets Collections
#include <stdio.h>

// Define the structure Triangle
struct Triangle {
    int height;
    char inner_symbol;
};

// Function to print the inverted triangle
void print_inverted(struct Triangle inverted_triangle) {
    int height = inverted_triangle.height;
    char symbol = inverted_triangle.inner_symbol;

    // Print the top line
    for (int i = 0; i < 2 * height; i++) {
        printf("_");
    }
    printf("\n");

    // Print the inverted triangle
    for (int i = 0; i < height; i++) {
        // Print leading spaces
        for (int j = 0; j < i; j++) {
            printf(" ");
        }
        
        // Print the left side of the triangle
        printf("\\");
        
        // Print the inner symbols
        for (int j = 0; j < 2 * (height - i - 1); j++) {
            printf("%c", symbol);
        }
        
        // Print the right side of the triangle
        printf("/\n");
    }
}

int main() 
{
    struct Triangle my_triangle;
    
    // Query the user for the desired inverted triangle height and symbol
    printf("Inverted triangle's height?\n");
    scanf("%d", &my_triangle.height);
    
    printf("Inverted triangle's symbol?\n");
    scanf(" %c", &my_triangle.inner_symbol);
    
    // Call the print_inverted function
    print_inverted(my_triangle);
    
    return 0;
}
vector<int> pf(int n)
{
    vector<int> v;
    for(int i=2;i<=n;++i)
    {
        while(n%i==0)
        {
            v.push_back(i);
            n/=i;
        }
    }
    return v;
}
#include <stdio.h>

float dot_product(float v1[3], float v2[3]) //add this
{
    return (v1[0] * v2[0]) + (v1[1] * v2[1]) + (v1[2] * v2[2]);
}

int main(void)
{
	float vec_a[3];
	float vec_b[3];

	vec_a[0] = 1.5f;
	vec_a[1] = 2.5f;
	vec_a[2] = 3.5f;
	vec_b[0] = 4.0f;
	vec_b[1] = 5.0f;
	vec_b[2] = 6.0f;

	printf("%f\n", dot_product(vec_a, vec_b));

	return 0;
}
#include<stdio.h>

char convert_percent_to_grade(float input)
{
    if(input>=80.0f)
    {
        return 'A';
    }
    else if(input>=60.0f && input <80.0f)
    {
        return 'B';
    }
    else if(input>=50.0f && input < 60.0f)
    {
        return 'C';
    }
    else 
    {
        return 'D';
    }

}

int main()
{
    float input;
    
    printf("What's the percentage:\n");
    scanf("%f",&input);
    
    char output = convert_percent_to_grade(input);
    
    printf("%.2f%% is %c Grade",input,output);
    
    
}
function onEdit(e) {
  if (!e) return;

  var sheet = e.source.getActiveSheet();
  var range = e.range;
  var editedValue = e.value;
  var previousValue = e.oldValue;

  // Define the start columns and start rows for each sheet
  var config = {
    "Pengajuan Konten": { columns: [5, 6, 19, 23, 28], startRow: 3 },
    "Timeline Wilayah": { columns: [8, 9], startRow: 2 },
    "Akun Media Partnership": { startColumn: 7, startRow: 5 }
    // Add more sheets and their configurations here
  };

  var sheetName = sheet.getName();
  if (!config[sheetName]) return; // Exit if the sheet is not configured

  var sheetConfig = config[sheetName];
  var startColumns = sheetConfig.columns || [sheetConfig.startColumn];
  var startRow = sheetConfig.startRow;

  if (startColumns.indexOf(range.getColumn()) !== -1 && range.getRow() >= startRow) {
    if (previousValue == null || previousValue === "") {
      range.setValue(editedValue);
    } else {
      var previousValues = previousValue.split(', ');

      var index = previousValues.indexOf(editedValue);

      if (index === -1) {
        previousValues.push(editedValue);
      } else {
        previousValues.splice(index, 1);
      }

      range.setValue(previousValues.join(', '));
    }
  }
}
#include <stdio.h>
#include <math.h>

struct Point3D
{
    float x;
    float y;
    float z;
};

float compute_distance3d(struct Point3D p1, struct Point3D p2);

int main(void)
{
    struct Point3D p1;
    struct Point3D p2;

    // Initialize the structures with test values
    p1.x = 1.0;
    p1.y = 2.0;
    p1.z = 3.0;

    p2.x = 4.0;
    p2.y = 5.0;
    p2.z = 6.0;

    // Calculate the distance between the test values
    float distance = compute_distance3d(p1, p2);

    // Query user for input coordinates
    printf("Enter coordinates for Point1 (x y z): ");
    scanf("%f %f %f", &p1.x, &p1.y, &p1.z);

    printf("Enter coordinates for Point2 (x y z): ");
    scanf("%f %f %f", &p2.x, &p2.y, &p2.z);

    // Calculate and print the distance based on user input
    distance = compute_distance3d(p1, p2);
    printf("Distance between the two points is %f.\n", distance);

    return 0;
}

float compute_distance3d(struct Point3D p1, struct Point3D p2)
{
    return sqrt(pow(p2.x - p1.x, 2) + pow(p2.y - p1.y, 2) + pow(p2.z - p1.z, 2));
}
EXEC sp_spaceused N'[dbo].[MY_TABLE]'
<nav class="navbar navbar-expand-md bg-light">
    <div class="container">
      <a href="#" class="navbar-brand">Navbar</a>
      <button class="navbar-toggler" data-bs-toggle="collapse" data-bs-target="#nav-collapse"">
        <span class="navbar-toggler-icon"></span>
      </button>
      <div class="collapse navbar-collapse" id="nav-collapse">
        <ul class="navbar-nav ms-auto">
          
          <li class="nav-item">
            <a href="#" class="nav-link active">Home</a>
          </li>  
          <li class="nav-item">
            <a href="#" class="nav-link ">About</a>
          </li>  
          <li class="nav-item">
            <a href="#" class="nav-link ">Contact</a>
          </li>  
      
        </ul>
      </div>
    </div>
  </nav>
setenv ANDROID_HOME ~/Library/Android/sdk
setenv PATH $PATH\:$ANDROID_HOME/tools\:$ANDROID_HOME/tools/bin\:$ANDROID_HOME/platform-tools
  
setenv ANDROID_HOME ~/Library/Android/sdk
setenv PATH $PATH\:$ANDROID_HOME/tools\:$ANDROID_HOME/tools/bin\:$ANDROID_HOME/platform-tools
  
setenv ANDROID_HOME ~/Library/Android/sdk
setenv PATH $PATH\:$ANDROID_HOME/tools\:$ANDROID_HOME/tools/bin\:$ANDROID_HOME/platform-tools
  
import java.util.*;

public class BinarySearchTree3<T extends Comparable<T>> {

    class Node {

        T key;

        Node left, right;

        

        public Node(T item) {

            key = item;

            left = right = null;

        }

    }

    

    private Node root;

    

    public BinarySearchTree3() {

        root = null;

    }

    

    public void insert(T key) {

        root = insertKey(root, key);

    }

    

    private Node insertKey(Node root, T key) {

        if (root == null) {

            root = new Node(key);

            return root;

        }

        

        if (key.compareTo(root.key) < 0) {

            root.left = insertKey(root.left, key);

        } else if (key.compareTo(root.key) > 0) {

            root.right = insertKey(root.right, key);

        }

        

        return root;

    }

    

    public void inorder() {

        inorderRec(root);

    }

    

    private void inorderRec(Node root) {

        if (root != null) {

            inorderRec(root.left);

            System.out.print(root.key + " ");

            inorderRec(root.right);

        }

    }

    

    public void deleteKey(T key) {

        root = deleteRec(root, key);

    }

    

    private Node deleteRec(Node root, T key) {

        if (root == null) return root;

        

        if (key.compareTo(root.key) < 0) {

            root.left = deleteRec(root.left, key);

        } else if (key.compareTo(root.key) > 0) {

            root.right = deleteRec(root.right, key);

        } else {

            if (root.left == null) return root.right;

            else if (root.right == null) return root.left;

            

            root.key = minValue(root.right);

            root.right = deleteRec(root.right, root.key);

        }

        

        return root;

    }

    

    public T minValue(Node root) {

        T minv = root.key;

        while (root.left != null) {

            minv = root.left.key;

            root = root.left;

        }

        return minv;

    }

    

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        BinarySearchTree3<Integer> bst = new BinarySearchTree3<>();

        String ch = "";

        

        do {

            System.out.print("Enter the element to be inserted in the tree: ");

            int n = sc.nextInt();

            sc.nextLine();

            bst.insert(n);

            System.out.print("Do you want to insert another element? (Say 'yes'): ");

            ch = sc.nextLine();

        } while (ch.equals("yes"));

        

        System.out.println();

        System.out.print("Inorder Traversal : The elements in the tree are: ");

        bst.inorder();

        System.out.println();

        System.out.print("Enter the element to be removed from the tree: ");

        int r = sc.nextInt();

        sc.nextLine();

        System.out.println();

        bst.deleteKey(r);

        System.out.print("Inorder traversal after deletion of " + r + ": ");

        bst.inorder();

        System.out.println();

    }

}
<section class="fascia-form-ricerca fascia-form-ricerca__nowrap theme__blue" style="width:100%">
    <div class="wrapper">
        <div class="row">
            <div class="col-xs-12 intestazione_ricerca">
                <p class="heading heading__3">Trova la tua prossima auto a noleggio</p>
            </div>

            <div class="col-xs-12 ">
                <form action="{{{PATH}}}" id="_cerca3">
                    <input type="hidden" name="_tkn" value="{{{tokenCSRF}}}">
                    <input type="hidden" id="_srcctg" name="_srcctg" value="">
                    <div class="flex-row-space-between">
                        <div class="fields-container fields-container__nowrap">


                            <div class="select-wrapper" id="_divAutonomia" style="display:none"><select id="_frsrc_autonomia" name="_frsrc_autonomia">
                                </select>
                            </div>
                            <div class="select-wrapper"><select id="_frsrc_tipo" name="_frsrc_tipo">
                                    <option value="">Tipo di veicolo</option>
                                </select></div>


                            <div class="select-wrapper"><select id="_frsrc_marca" name="_frsrc_marca">
                                    <option value="">Marca</option>
                                </select></div>

                            <div class="select-wrapper" id="_divAlim"><select id="_frsrc_alim" name="_frsrc_alim">
                                    <option value="">Alimentazione</option>
                                </select>
                            </div>

                            <!--div class="select-wrapper" id="_divCambio"><select id="_frsrc_cambio" name="_frsrc_cambio">
                                    <option value="">Cambio</option>
                                </select>
                            </div-->


                            <!--div class="select-wrapper" id="_divCanone"><select id="_frsrc_canone" name="_frsrc_canone">
                                    <option value="">Fascia di canone</option>
                                </select>
                            </div-->
                        </div>
                        <!--button class="btn btn__icon" type="submit"><img alt=""
                                src="{{{PATH}}}_img/icons/find.svg" />Cerca auto</button-->
                        <div class="button-container">
                            <button class="btn btn__icon" style="background-color: #53a653" type="submit"> <img src="{{{PATH}}}_img/icons/find.svg" alt="">Cerca auto </button>

                            <div class="col-xs-12">
                                <h3 style="text-align: center;" id="link_mobile"> <a href="https://www.finrent.it/pronta-consegna/">Scopri le offerte in Pronta
                                        Consegna</a>
                            </div>
                            </h3>
                        </div>
                    </div>



            </div>
            </form>
        </div>
    </div>

    </div>
</section>
<script type="text/javascript" nonce="{{{nonce}}}">
    _automatico = "";
    _ini_aut = "";
    _ini_cb = "";
    _ini_tp = "";
    _ini_mod = "";
    _ini_mar = "";
    _ini_ali = "";
    _ini_fas = "";
    _caricaTipi = true;
    var mtcf = [];
    $(document).ready(function () {
        addlink = "";
        if ($("#_automatico").val() == "1") {
            _ini_aut = $("#_automatico").attr("_aut");
            _ini_cb = $("#_automatico").attr("_cb");
            _ini_tp = $("#_automatico").attr("_tp");
            _ini_mod = $("#_automatico").attr("_mod");
            _ini_mar = $("#_automatico").attr("_mar");
            _ini_fas = $("#_automatico").attr("_fas");
            _ini_ali = $("#_automatico").attr("_ali");
            _automatico = "1";
        }
        $("#_srcctg").val($("#_ctg").val());
        if ($("#_ctg").val() == "1") { addlink = "#privati"; }
        if ($("#_ctg").val() == "2") addlink = "#partitaiva";
        if ($("#_ctg").val() == "5") { addlink = "#elettriche"; setAutonomia(); $("#_divAutonomia").show(); $("#_divCambio").hide(); }
        if ($("#_ctg").val() == "10") {
            addlink = "#ibride";
            //setAutonomia(); $("#_divAutonomia").show(); $("#_divCambio").hide(); 
        }
        if (location.href.indexOf("cambio-manuale") > 0) { addlink = "#cambio-manuale" + addlink; }
        if (location.href.indexOf("cambio-automatico") > 0) { addlink = "#cambio-automatico" + addlink; }
        if (addlink != "") {
            $(".linkmodello").each(function () {
                $(this).attr("href", $(this).attr("href") + addlink);
            });
        }
        if (_caricaTipi) {
            loadMatriceRicerca();
        }
        $("#_btnsearchofferte").on("click", function () {
            window.open("{{{PATH}}}noleggio-lungo-termine-offerte-speciali/", "_self");
        });
        return false;
    });
    
    
    function setAutonomia() {
        /*strx='<option value="">Scegli l\'autonomia</option><option value="100|200">da 100 a 200km</option><option value="200|300">da 200 a 300km</option><option value="300|400">da 300 a 400km</option><option value="400|500">da 400 a 500km</option><option value="500|600">da 500 a 600km</option><option value="600|700">da 600 a 700km</option><option value="700|9999">oltre 700km</option>';
       $("#_frsrc_autonomia").html(strx);
     */
        $("#_frsrc_tipo").val("");
        _caricaTipi = false;
        jQuery.ajax({
            data: "",
            url: "/api/getAutonomiaOption.php?_tkn={{{tokenCSRF}}}&_ctg=" + $("#_srcctg").val() + "&tm=" + Date.now(),
            type: 'POST', timeout: 20000,
            dataType: "html",
            error: function (r) { nocl(); /*alert(r); openAlert("Errore durante la lettura dell'autonomia", "KO");*/ },
            success: function (r) {
                $("#_frsrc_autonomia").html(r);
                if (_ini_aut != "") { $("#_frsrc_autonomia").val(_ini_aut); $("#_frsrc_autonomia").trigger("change"); } else loadTipiVeicolo();
                _ini_aut = "";
            }
        });
    }
    
    var _matrice;
    
    function loadMatriceRicerca() {
        jQuery.ajax({
            data: "_tkn={{{tokenCSRF}}}&_ctg=" + $("#_srcctg").val() + "&_el=" + $("#_frsrc_autonomia").val(),
            url: "/api/getMatriceRicerca.php?el=" + $("#_frsrc_autonomia").val() + "&tm=" + Date.now(),
            type: 'POST', timeout: 20000,
            dataType: "html",
            error: function (r) { nocl(); /*alert(r); openAlert("Errore durante la lettura della matrice", "KO");*/ },
            success: function (r) {
                //eval(r);
                _matrice = JSON.parse(r);
                setFilters(true, true, true, true);
                if (_ini_tp != "") { $("#_frsrc_tipo").val(_ini_tp); setFilters(false, true, true, true); }
                if (_ini_mar != "") { $("#_frsrc_marca").val(_ini_mar); setFilters(false, false, true, true); }
                if (_ini_aut != "") $("#_frsrc_autonomia").val(_ini_aut);
                if (_ini_ali != "") { $("#_frsrc_alim").val(_ini_ali); setFilters(false, false, false, true); }
                if (_ini_cb != "") { $("#_frsrc_cambio").val(_ini_cb); setFilters(false, false, false, false); }
                if (_ini_fas != "") $("#_frsrc_canone").val(_ini_fas);
                _ini_tp = ""; _ini_aut = ""; _ini_cb = ""; _ini_mod = ""; _ini_mar = ""; _ini_ali = ""; _ini_fas = "";
            }
        });
    }
    
    
    $("#_frsrc_marca").on("change", function () {
        setFilters(false, false, true, true);
        return false;
    });
    $("#_frsrc_tipo").on("change", function () {
        setFilters(false, true, true, true);
        return false;
    });
    $("#_frsrc_cambio").on("change", function () {
        setFilters(false, false, false, false);
        return false;
    });
    
    $("#_frsrc_alim").on("change", function () {
        setFilters(false, false, false, true);
        return false;
    });
    $("#_cerca3").on("submit", function () { return cercaModelli('_frsrc_tipo', '_frsrc_marca', '_frsrc_modello', '_srcctg', '_frsrc_autonomia', '_frsrc_cambio', '_frsrc_alim', '_frsrc_canone'); });
    
    function loadMarche() {
        $("#_frsrc_modello").html("<option value=''>Scegli il modello</option>");
        //alert("_tkn={{{tokenCSRF}}}&_ctg="+$("#_srcctg").val()+"&_tp="+$("#_frsrc_tipo").val()+"&_el="+$("#_frsrc_autonomia").val()+"&_cb="+$("#_frsrc_cambio").val());
        jQuery.ajax({
            data: "_tkn={{{tokenCSRF}}}&_ctg=" + $("#_srcctg").val() + "&_tp=" + $("#_frsrc_tipo").val() + "&_el=" + $("#_frsrc_autonomia").val() + "&_cb=" + $("#_frsrc_cambio").val(),
            url: "/api/getMarcheOption.php?tm=" + Date.now(),
            type: 'POST', timeout: 20000,
            dataType: "html",
            error: function (r) { nocl(); /*alert(r); openAlert("Errore durante la lettura delle marche", "KO");*/ },
            success: function (r) {
                $("#_frsrc_marca").html(r);
                if (_ini_mar != "") { $("#_frsrc_marca").val(_ini_mar); $("#_frsrc_marca").trigger("change"); }
                _ini_mar = "";
            }
        });
    }
    
    function loadTipiVeicolo() {
        jQuery.ajax({
            data: "_tkn={{{tokenCSRF}}}&_ctg=" + $("#_srcctg").val() + "&_el=" + $("#_frsrc_autonomia").val(),
            url: "/api/getTipiVeicoloOption.php?el=" + $("_frsrc_autonomia").val() + "&tm=" + Date.now(),
            type: 'POST', timeout: 20000,
            dataType: "html",
            error: function (r) { nocl(); /*alert(r); openAlert("Errore durante la lettura dei tipi veicolo", "KO");*/ },
            success: function (r) {
                $("#_frsrc_tipo").html(r);
                if (_ini_cb != "") { $("#_frsrc_cambio").val(_ini_cb); }
                if (_ini_tp != "") { $("#_frsrc_tipo").val(_ini_tp); $("#_frsrc_tipo").trigger("change"); } else loadMarche();
                _ini_tp = "";
            }
        });
    }
</script>
<style>
    @media screen and (max-width:600px) {
        #link_mobile {
            display: block !Important;
        }
    }
    
    #link_mobile {
        display: none;
    }
</style>
int main() {
    std::vector<int> vec = {1, 2, 2, 3, 4, 4, 5};

    // Sort the vector
    std::sort(vec.begin(), vec.end());

    // Use unique to remove duplicates
    auto last = std::unique(vec.begin(), vec.end());

    // Erase the unused elements
    vec.erase(last, vec.end());

    // Print the result
    for(int n : vec) {
        std::cout << n << " ";
    }

    return 0;
}
 vector<vector<int>> v;

    void f(int i, int tar, vector<int>& nums, vector<int>& can) {
        if ( tar == 0) {
            v.push_back(nums);
            return;
        }
        if (i == can.size() || tar < 0)
            return;
     

        nums.push_back(can[i]);
        f(i, tar - can[i], nums, can);
        nums.pop_back();

        f(i + 1, tar, nums, can);
        
    }

    vector<vector<int>> combinationSum(vector<int>& candidates, int target) {
        vector<int> ds;
        f(0, target, ds, candidates);
        return v;
    }
# Log in to Azure  
az login  
  
# Show current subscription  
az account show --output table  
#Show all subscriptions 
az account list --output table
#Pick subscription
az account set --subscription "Subscription Name or ID".
#include <stdio.h>
#include <string.h>

struct Student
{
    char name [50]; //declare as character array with space for 50 characters
    float lecture_attendance;
    float lab_attendance;
};

int main(void)
{
    struct Student student;
    
    sprintf(student.name,"Jane Doe"); //use sprintf to format and store the string into the name array of the student structure.
    student.lecture_attendance = 0.33f;
    student.lab_attendance = 1.00f;
    printf("Successful!!!");
    return 0;
}
#include <stdio.h>

struct Movie
{
    char title [50];
    int minutes;
    float tomatometer;
};

void print_movie(struct Movie a_super_hero);

int main(void)
{
    struct Movie movie;

	sprintf(movie.title, "Batman Returns");
	movie.minutes = 126;
	movie.tomatometer = 0.81f;

	print_movie(movie);
	
	return 0;
}

void print_movie(struct Movie a_movie)
{
    printf("Movie title:        %s\n",a_movie.title);
    printf("Runtime in minutes: %d\n",a_movie.minutes);
    printf("Tomatometer Score:  %.2f",a_movie.tomatometer);
}
#include <stdio.h>

enum Monster_Type
{
    ZOMBIE, WEREWOLF, VAMPIRE, MUMMY, CHANGELING
};

struct Monster
{
    char type [20];
    int age; 
    int power; 
    float speed;
    int stamina;
};

struct Monster create_monster(enum Monster_Type type);

void print_monster(struct Monster monster);

int main(void)
{
	struct Monster monster1 = create_monster(CHANGELING);
	print_monster(monster1);

	struct Monster monster2 = create_monster(MUMMY);
	print_monster(monster2);

	struct Monster monster3 = create_monster(WEREWOLF);
	print_monster(monster3);

	struct Monster monster4 = create_monster(VAMPIRE);
	print_monster(monster4);

	struct Monster monster5 = create_monster(ZOMBIE);
	print_monster(monster5);

	return 0;
}

// TODO: Define functions here:
struct Monster create_monster(enum Monster_Type type)
{   
    struct Monster monster;
    
    if(type == CHANGELING)
    {
        sprintf(monster.type,"Changeling");
        monster.age = 21;
        monster.power = 86;
        monster.speed = 6.77;
        monster.stamina = 4057;
    }
    if(type == MUMMY)
    {
        sprintf(monster.type,"Mummy");
        monster.age = 3793;
        monster.power = 97;
        monster.speed = 0.37;
        monster.stamina = 492;
    }
    if(type == WEREWOLF)
    {
        sprintf(monster.type,"Werewolf");
        monster.age = 70;
        monster.power = 144;
        monster.speed = 20.53;
        monster.stamina = 4628;
    }
    if(type==VAMPIRE)
    {
        sprintf(monster.type,"Vampire");
        monster.age = 89;
        monster.power = 260;
        monster.speed = 10.08;
        monster.stamina = 3926;
    }

    if(type==ZOMBIE)
    {
        sprintf(monster.type,"Zombie");
        monster.age = -1;
        monster.power = 1;
        monster.speed = 0.30;
        monster.stamina = 173;
    }
    return monster;
}

void print_monster(struct Monster monster)
{
    printf("Monster Type: %s\n",monster.type);
	printf("         Age: %d years\n",monster.age);
	printf("       Power: %d \n",monster.power);
	printf("       Speed: %.2f \n",monster.speed);
	printf("     Stamina: %d \n",monster.stamina);
}
#include <stdio.h>

struct Student
{
    char first_name [20];
    char last_name [20];
    int stream_code ;
};

struct Student query_student(void)
{
	// TODO: Declare a local Student variable.
    struct Student student;

	printf("Input first name: \n");
	// TODO: Scan for user input...
	scanf("%s",student.first_name);
    

	printf("Input last name: \n");
	// TODO: Scan for user input...
    scanf("%s",student.last_name);

	printf("Input stream code: \n");
	// TODO: Scan for user input...
    scanf("%d",&student.stream_code);

	// TODO: Return the local Student variable.
	return student;

}

int main(void)
{
    struct Student query;

	query = query_student();

	printf("%s ", query.first_name);
	printf("%s ", query.last_name);
	printf("is in stream %d.", query.stream_code);

	return 0;
}
sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
echo -e "[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com/yumrepos/vscode\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" | sudo tee /etc/yum.repos.d/vscode.repo > /dev/null
#include <stdio.h>
 // TODO: Declare a Quadratic_Solution enumerated type here:
enum Quadratic_Solution
{
    TWO_COMPLEX,
    ONE_REAL,
    TWO_REAL
};
enum Quadratic_Solution get_solution_type(float a, float b, float c);
void print_solution_type(enum Quadratic_Solution qs);

int main(void) 
{
  float a_coefficent = 0.0f;
  float b_coefficent = 0.0f;
  float c_constant = 0.0f;
  printf("y = ax^2 + bx + c\n");
  printf("a? \n");
  scanf("%f", & a_coefficent);
  printf("b? \n");
  scanf("%f", & b_coefficent);
  printf("c? \n");
  scanf("%f", & c_constant);
  enum Quadratic_Solution result = get_solution_type(a_coefficent,
    b_coefficent,
    c_constant);
  print_solution_type(result);
  return 0;
}
// TODO: Define the get_solution_type function here:
enum Quadratic_Solution get_solution_type(float a, float b, float c)
{
    float result = b * b - 4 * a * c;
    if(result>0)
    {
        return TWO_REAL;   
    }
    else if(result==0)
    {
        return ONE_REAL;
    }
    else
    {
        return TWO_COMPLEX;
    }
}
// TODO: Define the print_solution_type function here:
void print_solution_type(enum Quadratic_Solution qs)
{
    switch(qs)
    {
        case TWO_COMPLEX:
        {
            printf("Two complex solutions.\n");
            break;
        }
        case ONE_REAL:
        {
            printf("One real solution.\n");
            break;
        }
        case TWO_REAL:
        {
            printf("Two real solutions.\n");
            break;
        }
    }
}
{
   "associationId":11,
   "associationTypeId":1,
   "associationIndustryId":2,
   "associationCategoryTypeId":8,
   "name":"Sphoorti Foundation",
   "address1":"Netaji Subhash Marg, Daryaganj, New Delhi, Delhi, India",
   "cityId":281,
   "registrationDate":"2024-01-01T00:00:00.000",
   "website":"https://sphoorti.org/",
   "contactEmailId":"info@sphoorti.org",
   "phonecode":null,
   "contactPhoneNumber":0,
   "logoUrl":"https://s3.ap-south-1.amazonaws.com/myassociation-dev-objects/Spoorthi/download.png",
   "coverPicUrl":"",
   "registrationActId":0,
   "memberSizeRangeId":13,
   "about":"Founder/Director of Sphoorti Foundation\n Founded Sphoorti in 2006\n Responsible for Administration, Day-to-Day Affairs, Hiring, Planning and Procuring essentials for children and the organization\n Fundraising - Online and Conventional Fundraising, Proposal writing and preparation of Presentation material\n Developing Linkages with corporate and non-profit organizations\n Social Media Management.",
   "geolocation":{
      "x":28.6411903,
      "y":77.2405826
   }
}
Blockchain is one of the key technologies that drive business transformation. Blockchain may have gained huge momentum in the marketplace concerning cryptocurrency, but people still need clarification about the terminology. They still see blockchain as a synonym for bitcoin and often use the terms interchangeably. Blockchain technology provides multiple advantages to businesses and introduces new ways to revamp existing business models while reducing costs, lowering intermediaries’ time consumption, and strengthening a higher level of trust in an ecosystem.

When it comes to upgrading your existing business by harnessing the power of blockchain or starting a new startup, it is always recommended to contact the best blockchain app development company. Maticz Technologies, an enterprise blockchain development company, has an impressive track record of assisting businesses globally with top-notch solutions backed by disruptive technologies like blockchain. To get more information about startup blockchain ideas for business then tap the link here >> https://maticz.com/blockchain-business-ideas 
 vector<int> parent;
    vector<int> rank;
    // path compression code 
    int find(int i){
        if(i == parent[i]) return i;
       return parent[i] = find(parent[i]);
    }
    // optimised Union fn 
    void Union(int x, int y){
        int x_parent = find(x);
        int y_parent = find(y);
        
        if(x_parent == y_parent){
            return;
        }else if(rank[x_parent] > rank[y_parent]){
            parent[y_parent] = x_parent;
        }else if(rank[y_parent] > rank[x_parent]){
            parent[x_parent] = y_parent;
        }else{
            parent[x_parent] = y_parent;
            rank[y_parent]++;
        }
    }
/* single checkbox */

body.snapform .form-group .snap-field .check-box-label{
    padding-left: 40px!important;
}


body.snapform .form-group .snap-field span.checkbox.custom-checkbox label:before{
	width: 32px;
    height: 32px;
    visibility: visible;
    content: " ";
    display: block;
    position: absolute;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    background-repeat: no-repeat;
    z-index: 100;
    left: 0px;
    left: 0rem;
    border: 2px solid transparent;
    top: 0;
    background-color: transparent;
    border-color: var(--QLD-color-light-designAccent);
    background-image: none !important;
}

body.snapform .form-group .snap-field span.checkbox.custom-checkbox label:after{
	width: 32px;
    height: 32px;
    visibility: visible;
    content: " ";
    display: block;
    position: absolute;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    background-repeat: no-repeat;
    z-index: 100;
    left: 0px;
    left: 0rem;
    border: 2px solid transparent;
    top: 0;
}


body.snapform .form-group .snap-field span.checkbox.custom-checkbox input[type="checkbox"]:checked+label:before{
	width: 32px!important;
    height: 32px!important;
    visibility: visible;
    content: " ";
    display: block;
    position: absolute;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    background-repeat: no-repeat;
    z-index: 100;
    left: 0px;
    left: 0rem;
    border: 2px solid transparent;
    top: 0;
    background-color: transparent!important;
    border-color: var(--QLD-color-light-designAccent)!important;
    background-image: none !important;

}


body.snapform .form-group .snap-field span.checkbox.custom-checkbox input[type="checkbox"]:checked+label:after{
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath fill='var(--QLD-color-light-text)' d='M25.6,11.4c0.2-0.2,0.2-0.5,0-0.7l-2.3-2.3c-0.2-0.2-0.5-0.2-0.7,0L14,17l-3.6-3.6c-0.2-0.2-0.5-0.2-0.7,0l-2.3,2.3 c-0.2,0.2-0.2,0.5,0,0.7l6.3,6.3c0.2,0.2,0.5,0.2,0.7,0L25.6,11.4L25.6,11.4z'/%3E%3C/svg%3E");
    background-size: 30px!important;
    background-position: -2px -2px!important;
    font-size: 20px !important;
    left: 0px!important;

}
function custom_mini_cart() {
    if ( function_exists('WC') && WC()->cart ) {
        ?>
        <div class="custom-mini-cart">
            <a class="cart-contents" href="#" title="<?php _e( 'View your shopping cart', 'text-domain' ); ?>">
				<svg width="800px" height="800px" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" fill="#000000" class="bi bi-cart2">
				  <path d="M0 2.5A.5.5 0 0 1 .5 2H2a.5.5 0 0 1 .485.379L2.89 4H14.5a.5.5 0 0 1 .485.621l-1.5 6A.5.5 0 0 1 13 11H4a.5.5 0 0 1-.485-.379L1.61 3H.5a.5.5 0 0 1-.5-.5zM3.14 5l1.25 5h8.22l1.25-5H3.14zM5 13a1 1 0 1 0 0 2 1 1 0 0 0 0-2zm-2 1a2 2 0 1 1 4 0 2 2 0 0 1-4 0zm9-1a1 1 0 1 0 0 2 1 1 0 0 0 0-2zm-2 1a2 2 0 1 1 4 0 2 2 0 0 1-4 0z"/>
				</svg>
                <span class="cart-contents-count"><?php echo WC()->cart->get_cart_contents_count(); ?></span>
            </a>
            <div class="widget_shopping_cart_content">
                <?php woocommerce_mini_cart(); ?>
            </div>
        </div>
        <?php
    } else {
        echo '<p>' . __( 'Cart is empty.', 'text-domain' ) . '</p>';
    }
}
add_shortcode('custom_mini_cart', 'custom_mini_cart');

function add_to_cart_fragment( $fragments ) {
    if ( function_exists('WC') && WC()->cart ) {
        ob_start();
        ?>
        <span class="cart-contents-count"><?php echo WC()->cart->get_cart_contents_count(); ?></span>
        <?php
        $fragments['.cart-contents-count'] = ob_get_clean();
    }
    return $fragments;
}
add_filter( 'woocommerce_add_to_cart_fragments', 'add_to_cart_fragment' );
 import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

class Product {
    private int id;
    private String name;
    private double price;
    private String type;
    private double rating;

    public Product(int id, String name, double price, String type, double rating) {
        this.id = id;
        this.name = name;
        this.price = price;
        this.type = type;
        this.rating = rating;
    }

    public double getRating() {
        return rating;
    }

    public double getPrice() {
        return price;
    }

    public String getType() {
        return type;
    }

    @Override
    public String toString() {
        return "Product{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", price=" + price +
                ", type='" + type + '\'' +
                ", rating=" + rating +
                '}';
    }
}

public class ProductStreamExample {
    public static void main(String[] args) {
        List<Product> products = Arrays.asList(
                new Product(1, "Laptop", 1500.0, "Electronics", 4.5),
                new Product(2, "Smartphone", 800.0, "Electronics", 4.2),
                new Product(3, "Watch", 300.0, "Fashion", 3.8),
                new Product(4, "Headphones", 100.0, "Electronics", 4.8),
                new Product(5, "Shoes", 50.0, "Fashion", 3.5),
                new Product(6, "Camera", 2000.0, "Electronics", 4.7)
        );

        // i) Find all the products having rating between 4 and 5
        List<Product> productsRatingBetween4And5 = products.stream()
                .filter(p -> p.getRating() >= 4 && p.getRating() <= 5)
                .collect(Collectors.toList());
        System.out.println("Products with rating between 4 and 5: " + productsRatingBetween4And5);
		System.out.println();
        
        // ii) Find first n products having price > 10000
        int n = 2;
        List<Product> firstNProductsPriceGreaterThan1000 = products.stream()
                .filter(p -> p.getPrice() > 1000)
                .limit(n)
                .collect(Collectors.toList());
        System.out.println("First " + n + " products with price > 1000: " + firstNProductsPriceGreaterThan1000);
		System.out.println();
        
        // iii) Find the number of products under each type (map containing type and count)
        Map<String, Long> productCountByType = products.stream()
		.collect(Collectors.groupingBy(Product::getType, Collectors.counting()));
        System.out.println("Number of products under each type: " + productCountByType);
		System.out.println();
        
        // iv) Find average rating of products with type = "Electronics"
        double averageRatingElectronics = products.stream()
                .filter(p -> p.getType().equals("Electronics"))
                .mapToDouble(Product::getRating)
                .average()
                .orElse(0.0);
        System.out.println("Average rating of products with type 'Electronics': " + averageRatingElectronics);
    }
}
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

class Person {
    private String name;
    private int age;
    private double income;

    public Person(String name, int age, double income) {
        this.name = name;
        this.age = age;
        this.income = income;
    }

    public String getName() {
        return name;
    }

    public int getAge() {
        return age;
    }

    public double getIncome() {
        return income;
    }
}

public class PersonExample {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        List<Person> setA = new ArrayList<>();

        System.out.print("Enter the number of persons: ");
        int n = scanner.nextInt();
        scanner.nextLine(); // consume newline character

        for (int i = 0; i < n; i++) {
            System.out.println("Enter details for person " + (i + 1) + ":");
            System.out.print("Name: ");
            String name = scanner.nextLine();
            System.out.print("Age: ");
            int age = scanner.nextInt();
            System.out.print("Income: ");
            double income = scanner.nextDouble();
            scanner.nextLine(); // consume newline character

            Person person = new Person(name, age, income);
            setA.add(person);
        }

        List<Person> setB = new ArrayList<>();
        List<Person> setC = new ArrayList<>();
        List<Person> setBC = new ArrayList<>();

        for (Person person : setA) {
            if (person.getAge() > 60) {
                setB.add(person);
            }
            if (person.getIncome() < 10000) {
                setC.add(person);
            }
            if (person.getAge() > 60 && person.getIncome() < 10000) {
                setBC.add(person);
            }
        }

        System.out.println("Set A: ");
        for (Person person : setA) {
            System.out.println("Name: " + person.getName() + ", Age: " + person.getAge() + ", Income: " + person.getIncome());
        }

        System.out.println("\nSet B (age > 60): ");
        for (Person person : setB) {
            System.out.println("Name: " + person.getName() + ", Age: " + person.getAge() + ", Income: " + person.getIncome());
        }

        System.out.println("\nSet C (income < 10000): ");
        for (Person person : setC) {
            System.out.println("Name: " + person.getName() + ", Age: " + person.getAge() + ", Income: " + person.getIncome());
        }

        System.out.println("\nSet B and C (age > 60 and income < 10000): ");
        for (Person person : setBC) {
            System.out.println("Name: " + person.getName() + ", Age: " + person.getAge() + ", Income: " + person.getIncome());
        }
    }
}
$ curl --head -H "Authorization: Bearer $TOKEN" https://registry-1.docker.io/v2/ratelimitpreview/test/manifests/latest
$ TOKEN=$(curl --user 'username:password' "https://auth.docker.io/token?service=registry.docker.io&scope=repository:ratelimitpreview/test:pull" | jq -r .token)
$ TOKEN=$(curl "https://auth.docker.io/token?service=registry.docker.io&scope=repository:ratelimitpreview/test:pull" | jq -r .token)
cd `brew --repository`
git remote set-url origin https://github.com/mistydemeo/tigerbrew.git
git fetch origin
git reset --hard origin/master
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Cefi/Defi Arbitrage Trading Telegram Bot</title>
    <!-- Bootstrap CSS -->
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
    <!-- Custom CSS -->
    <link rel="stylesheet" href="styles.css">
</head>
<body>
    <!-- Header Section -->
    <header>
        <!-- Navbar code goes here -->
    </header>

    <!-- Main Content Section -->
    <section id="main-content" class="text-center">
        <!-- Main content code goes here -->
    </section>

    <!-- Features Section -->
    <section id="features">
        <!-- Features code goes here -->
    </section>

    <!-- Contact Form -->
    <section id="contact">
        <!-- Contact form code goes here -->
    </section>

    <!-- Bootstrap & jQuery JS -->
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
    <!-- Custom JS -->
    <script src="script.js"></script>
</body>
</html>
# Quotes API
from fastapi import FastAPI, Request
from slowapi.util import get_ipaddr
from slowapi.errors import RateLimitExceeded
from slowapi import Limiter, _rate_limit_exceeded_handler

import json

def get_quotes():
    return json.load(open('quotes.json', 'r'))

app = FastAPI()
limiter = Limiter(key_func = get_ipaddr)
app.state.limiter = limiter
app.add_exception_handler(RateLimitExceeded, _rate_limit_exceeded_handler)

@app.get('/')
@limiter.limit('10/minute')
def home(request: Request):
    return {'msg': 'Hello, World'}


@app.get('/quotes')
@limiter.limit('10/minute')
def quote(request: Request):
    return get_quotes()
vector<vector<int>> subset;
 
  void gen(vector<int>& nums,int i,vector<int> sub)
  {
     if(i==nums.size())
        {
            subset.push_back(sub);
            return;
        }
        gen(nums,i+1,sub);

        sub.push_back(nums[i]);
        gen(nums,i+1,sub);

        
  }
DATA: zvorna TYPE vorna,
      znachn TYPE nachn,
      sep(1) TYPE c,
      adres1 TYPE PAD_STRAS,
      adres2 TYPE PAD_LOCAT,
      ZCTTYP TYPE CTTYP,
      BEGDA16 TYPE DATS,
      ZCTEDT TYPE DATS,
      lv_datum_ext TYPE char25,
      lv_exdatfm   TYPE xudatfm,
      ZGESCH TYPE GESCH, " جنسيت
      ZGBDAT TYPE GBDAT, " تاريخ تولد
      ZFAMST TYPE FAMST, " وضعيت تاهل
      ZSLART TYPE SLART, " مدرک تحصيلي 22
      ZFACH TYPE FACH1, " کد رشته تحصيلي
      ZPRBZT TYPE PRBZT, " عدد مدت قرارداد
      ZPRBZTS(3) TYPE C, " کاراکتر کردن براي کانکت عدد مدت قرارداد
      ZPRBEH TYPE EINHTXT, " زمان (ماه، روز و...) قرارداد
      ZTXTD(5) TYPE C, " ماه روز سال
      ZORGEH TYPE ORGEH,
      ZTEXTPOS TYPE STEXT,
      ZSTELL TYPE STELL.
*--------------قرارداد-------- PA0016
  SELECT SINGLE CTTYP BEGDA CTEDT PRBZT PRBEH FROM PA0016 INTO ( ZCTTYP, BEGDA16, ZCTEDT, ZPRBZT, ZPRBEH ) WHERE pernr = pernr AND begda le DATE AND endda ge DATE.
    IF sy-subrc NE 0. " اگر قرارداد نداشت خارج شود
      REJECT.
    ENDIF.
    clear lv_datum_ext.
    TRY. " تاريخ شمسي شروع قرارداد
      CALL METHOD cl_abap_datfm=>conv_date_int_to_ext
        EXPORTING
          im_datint    = BEGDA16
          im_datfmdes  = 'C'
        IMPORTING
          ex_datext    = lv_datum_ext
          ex_datfmused = lv_exdatfm.
    CATCH cx_abap_datfm_format_unknown .
  ENDTRY.
ZFULL-AZMODAT = lv_datum_ext.
clear lv_datum_ext.
    TRY. " تاريخ شمسي پايان قرارداد
      CALL METHOD cl_abap_datfm=>conv_date_int_to_ext
        EXPORTING
          im_datint    = ZCTEDT
          im_datfmdes  = 'C'
        IMPORTING
          ex_datext    = lv_datum_ext
          ex_datfmused = lv_exdatfm.
    CATCH cx_abap_datfm_format_unknown .
  ENDTRY.
ZFULL-TAMODAT = lv_datum_ext.
ZFULL-ZPERNR = pernr.
*--------------------- مشخص شدن مدت قرارداد
CASE ZPRBEH.
  WHEN '010'.
   ZTXTD = 'روز'.
  WHEN '011'.
   ZTXTD = 'هفته'.
  WHEN '012'.
   ZTXTD = 'ماه'.
  WHEN '013'.
   ZTXTD = 'سال'.
  WHEN OTHERS.
   ZTXTD = '-'.
ENDCASE.
ZPRBZTS = ZPRBZT.
CONCATENATE ZTXTD '-' ZPRBZTS INTO ZFULL-MODAT SEPARATED BY sep. " مثال 6 - ماه
*-------------------------------- select infotype 0002 -------------
SELECT SINGLE vorna nachn GESCH GBDAT ANZKD FAMST
  FROM PA0002 INTO ( zvorna, znachn, ZGESCH, ZGBDAT, ZFULL-FARZANDNUM, ZFAMST )
  WHERE pernr = pernr AND begda le BEGDA16 AND endda ge BEGDA16.
CONCATENATE zvorna znachn INTO ZFULL-NAMEFAMILY SEPARATED BY sep.

*---------------- تاريخ تولد
clear lv_datum_ext.
    TRY.
      CALL METHOD cl_abap_datfm=>conv_date_int_to_ext
        EXPORTING
          im_datint    = ZGBDAT
          im_datfmdes  = 'C'
        IMPORTING
          ex_datext    = lv_datum_ext
          ex_datfmused = lv_exdatfm.
    CATCH cx_abap_datfm_format_unknown .
  ENDTRY.
ZFULL-BORNDATE = lv_datum_ext.
*  *------------ جنسيت
IF ZGESCH EQ '1'.
ZFULL-ZJENSIAT = 'آقای'.
ELSE.
ZFULL-ZJENSIAT = 'خانم'.
ENDIF.
*-------------- وضعيت تاهل
CASE ZFAMST.
  WHEN '0'.
    ZFULL-VAZIATTAHOL = 'مجرد'.
  WHEN '1'.
    ZFULL-VAZIATTAHOL = 'متاهل'.
  WHEN '2'.
    ZFULL-VAZIATTAHOL = 'معيل'.
  WHEN '3'.
    ZFULL-VAZIATTAHOL = 'مطلقه'.
  WHEN '4'.
    ZFULL-VAZIATTAHOL = 'بيوه'.
  WHEN OTHERS.
    ZFULL-VAZIATTAHOL = '-'.
ENDCASE.

*################## ------------- کد ملي و شماره شناسنامه
  SELECT SINGLE ICNUM FROM PA0185 INTO ZFULL-SHOMARESHENAS WHERE subty eq '01' AND pernr = pernr AND begda le BEGDA16 AND endda ge BEGDA16.
  SELECT SINGLE ICNUM FROM PA0185 INTO ZFULL-CODEMELI WHERE subty eq '02' AND pernr = pernr AND begda le BEGDA16 AND endda ge BEGDA16.

*################## ------------- تحصيلات
  SELECT SINGLE SLART SLTP1 FROM PA0022 INTO ( ZSLART, ZFACH ) WHERE pernr = pernr AND begda le BEGDA16 AND endda ge BEGDA16.
SELECT SINGLE STEXT FROM T517T INTO ZFULL-MADRAKTAHSIL WHERE SLART EQ ZSLART AND SPRSL EQ 'E'.
SELECT SINGLE FTEXT FROM T517X INTO ZFULL-RESHTEH WHERE FAART EQ ZFACH AND LANGU EQ 'E'.

*------------------- آدرس
    SELECT SINGLE STRAS LOCAT FROM PA0006 INTO ( adres1, adres2 ) WHERE subty eq '1' AND pernr = pernr AND begda le BEGDA16 AND endda ge BEGDA16.
   CONCATENATE adres1 ' - ' adres2 INTO ZFULL-NESHANI SEPARATED BY sep.

*   ------------- موبايل
  SELECT SINGLE USRID FROM PA0105 INTO ZFULL-MOBILE WHERE subty EQ '0002' AND pernr = pernr AND begda le BEGDA16 AND endda ge BEGDA16 .


*    ----------------- حقوق پايه ############################ ماده چهار

INFOTYPES: 0000,0001,0002,0008,0021, 0007.
         data: it0008 type table of PBWLA WITH HEADER LINE,
               ws_0008 type PBWLA,
               _JAM TYPE zamount,
               _amt TYPE zamount,
               _maskan TYPE zamount,
               _bon TYPE zamount,
               wa_pa0000       TYPE pa0000,
               itab_pa0000     TYPE TABLE OF pa0000.
    CALL FUNCTION 'RP_FILL_WAGE_TYPE_TABLE_EXT'
   EXPORTING
     APPLI                              = 'E'
    BEGDA                              = BEGDA16
    ENDDA                              = BEGDA16
     INFTY                              = '0008'
     TCLAS                              = 'A'
     PERNR                              = PERNR
     SUBTY                              = '0   '
     DLSPL                              = 'X'

     CONV_CURR                          = 'X'
   TABLES
     PP0001                             = p0001
     PP0007                             = p0007
     PP0008                             = p0008
     PPBWLA                             = it0008
   .
     clear _JAM.

    loop at it0008 into ws_0008 .
  _JAM = _JAM + ws_0008-BETRG * 100.
   ZFULL-HOGHOGHPAYE = + ws_0008-BETRG * 100.
endloop.
  clear _amt.
select single BETRG from pa0014 into _amt where LGART = '3000' and pernr = PERNR and begda le BEGDA16 and endda ge BEGDA16.
  _JAM = _JAM + _amt * 100.
  _maskan = _amt * 100.
  clear _amt.
  select single BETRG from pa0014 into _amt where LGART = '3003' and pernr = PERNR and begda le BEGDA16 and endda ge BEGDA16.
  _JAM = _JAM + _amt * 100.
  _bon = _amt * 100.
    clear _amt.
  select single BETRG from pa0014 into _amt where LGART = '3002' and pernr = PERNR and begda le BEGDA16 and endda ge BEGDA16.
  _JAM = _JAM + _amt * 100.
  ZFULL-HAGHMASOLIAT = _amt * 100.
    clear _amt.
  select single BETRG from pa0014 into _amt where LGART = '3026' and pernr = PERNR and begda le BEGDA16 and endda ge BEGDA16.
  _JAM = _JAM + _amt * 100.
  ZFULL-HAGHROTBEH = _amt * 100.
    clear _amt.
  select single BETRG from pa0014 into _amt where LGART = '3001' and pernr = PERNR and begda le BEGDA16 and endda ge BEGDA16.
  _JAM = _JAM + _amt * 100.
  ZFULL-HAGHOLAD = _amt * 100.

  ZFULL-JAMMAZAYA = _JAM.
  ZFULL-HAGHMASKANB = _maskan + _bon.



*  ------------ *--------------- واحد سازماني و عنوان شغلي
SELECT SINGLE ORGEH STELL FROM PA0001 INTO ( ZORGEH, ZSTELL ) WHERE pernr = pernr AND begda le BEGDA16 AND endda ge BEGDA16.
SELECT SINGLE ORGTX FROM T527X INTO ZFULL-ZPOSITION WHERE ORGEH EQ ZORGEH AND SPRSL EQ 'E'.
SELECT SINGLE STLTX FROM T513S INTO ZFULL-ZONVANJOB WHERE STELL EQ ZSTELL AND SPRSL EQ 'E'.

*  ------------------- تاريخ استخدام
      SELECT * FROM pa0000 INTO TABLE itab_pa0000 WHERE pernr EQ pernr
          AND ( massn EQ '01' or massn EQ '12' ) . "پيدا کردن حکم استخدام يا بازگشت به کار
    SORT itab_pa0000 BY endda DESCENDING.
    READ TABLE itab_pa0000 INTO wa_pa0000 INDEX 1.
    TRY.
        CALL METHOD cl_abap_datfm=>conv_date_int_to_ext
          EXPORTING
            im_datint    = wa_pa0000-begda
            im_datfmdes  = 'C'
          IMPORTING
            ex_datext    = lv_datum_ext
            ex_datfmused = lv_exdatfm.
      CATCH cx_abap_datfm_format_unknown .
    ENDTRY.
    ZFULL-ESTEKHDAM = lv_datum_ext.

BREAK pmohammadi.
*    -------------------------------------- barcode signiture mohr ******************
    DATA: end type dats,
barcodetext type c LENGTH 200,
    START_DATE  TYPE  CHAR10,
    END_DATE  TYPE  CHAR10,
      text type c LENGTH 20,
      _emzaDate type ZTARKHCON.
PerNum = pernr.
*------------------------------------------------------------------------ barcode
SELECT SINGLE CTEDT ZZTARIKH FROM PA0016 INTO ( end, _emzaDate ) WHERE PERNR = PERNR AND BEGDA LE DATE AND CTEDT GE DATE.
if _emzadate is not initial or _emzadate ne '00000000'.
       TRY.
      CALL METHOD cl_abap_datfm=>conv_date_int_to_ext
        EXPORTING
          im_datint    = _emzaDate
          im_datfmdes  = 'C'
        IMPORTING
          ex_datext    = emza_date.
*          ex_datfmused = lv_exdatfm.
    CATCH cx_abap_datfm_format_unknown .
  ENDTRY.
  barcodetext = 'شماره پرسنلي:'.
  CONCATENATE  barcodetext pernum into barcodetext SEPARATED BY ' '.
  text = 'تاريخ شروع قرارداد:'.
  CONCATENATE  barcodetext text START_DATE into barcodetext SEPARATED BY ' '.
  text = 'تاريخ پايان قرارداد:'.
  CONCATENATE  barcodetext text end_DATE into barcodetext SEPARATED BY ' '.
 text = 'تاریخ امضای کارمند:'.
  CONCATENATE  barcodetext text emza_DATE into barcodetext SEPARATED BY ' '.

  barcode = barcodetext.
 endif.

* --------------------------------------------------------------------------- mohr
 CONSTANTS : gc_btype TYPE tdbtype VALUE 'BCOL',
gc_id TYPE tdidgr VALUE 'BMAP',
gc_object TYPE tdobjectgr VALUE 'GRAPHICS'.
 DATA: gv_name TYPE tdobname,
        kcompany TYPE BUKRS,
        sabtnum TYPE char10,
        sabtdate TYPE char10,
        COMPANY TYPE char64,
        emptype TYPE char12,
gv_name_mohr TYPE tdobname,
gv_name_sign TYPE tdobname,
gv_logo TYPE xstring ,
gv_bmp TYPE xstring.
 SELECT SINGLE BUKRS FROM PA0001 INTO  kcompany  WHERE PERNR = PERNR AND BEGDA LE DATE AND endda GE DATE.
if kcompany eq '1200' .
  gv_name = 'MECO'.
  gv_name_mohr = 'MECOMOHR'.
  gv_name_sign = 'SIGNATURE'.
  sabtnum = '70826'.
  sabtdate = '72/10/12'.
  concatenate 'شرکت ' company into company separated by ' '.
 endif.

 CALL METHOD cl_ssf_xsf_utilities=>get_bds_graphic_as_bmp
EXPORTING
p_object = gc_object " GRAPHICS
p_name = gv_name_MOHR " Name of the Logo
p_id = gc_id " BMAP
p_btype = gc_btype " BCOL for color, 'BMON' for Black & White
RECEIVING
p_bmp = gv_bmp
EXCEPTIONS
not_found = 1
internal_error = 2
OTHERS = 3.
mohr = gv_bmp.

*------------------------------------------------------------------------ signiture
DATA: saghff type char7,
      KARKARDSA TYPE char3,
zsaghf TYPE THOUR.
SELECT SINGLE anzhl FROM pa2012 INTO zsaghf WHERE pernr EQ pernr AND begda LE DATE AND endda GE DATE AND subty EQ 'ZEMH'.
saghff = zsaghf.
KARKARDSA = saghff+0(3).
CONDENSE KARKARDSA.
*getting sinature pic
CALL METHOD cl_ssf_xsf_utilities=>get_bds_graphic_as_bmp
EXPORTING
p_object = gc_object " GRAPHICS
p_name = gv_name_sign " Name of the Logo
p_id = gc_id " BMAP
p_btype = gc_btype " BCOL for color, 'BMON' for Black & White
RECEIVING
p_bmp = gv_bmp
EXCEPTIONS
not_found = 1
internal_error = 2
OTHERS = 3.
SIGNATURE = gv_bmp.
#include <stdio.h>

enum Contains_Result
{
 ABSENT,
 PRESENT
};

enum Contains_Result contains(char* cstring, char find);

int main(void)
{
    char buffer1[] = "Hello Programming 1 Students";
    char buffer2[] = "Learn to program using arrays and pointers!";
    int found_d = contains(buffer1, 'd');
 
    if (found_d == PRESENT)
    {
        printf("buffer1 contains d\n");
    }
    else
    {
        printf("buffer1 does not contain d\n");
    }
 
    found_d = contains(buffer2, 'd');
 
    if (found_d == PRESENT)
    {
        printf("buffer2 contains d\n");
    }
    else
    {
        printf("buffer2 does not contain d\n");
    }
 
 	// The following function tests your code.
	// Do not modify the following code.
	test();
	
    return 0;
}

enum Contains_Result contains(char* cstring, char find)
{
 // TODO: Insert your code here...
 while (*cstring != '\0')
    {
        if (*cstring == find)
        {
            return PRESENT;
        }
        cstring++;
    }
    return ABSENT;
}
#include <stdio.h>

void draw_inverted_triangle(int height) {
    for (int i = 0; i < height; ++i) {
        // Print leading spaces
        for (int j = 0; j < i; ++j) {
            putchar(' ');
        }

        // Print backslash
        putchar('\\');

        // Print inner spaces
        for (int j = 0; j < 2 * (height - i - 1); ++j) {
            putchar(' ');
        }

        // Print forward slash
        putchar('/');

        // Move to the next line
        putchar('\n');
    }
}

int main() {
    int height;

    // Get the height from the user
    printf("enter height: \n");
    scanf("%d", &height);

    // Print the top line of underscores
    for (int i = 0; i < 2 * height; ++i) {
        putchar('_');
    }
    putchar('\n');

    // Draw the inverted triangle
    draw_inverted_triangle(height);

    return 0;
}
#include <stdio.h>

enum Day
{
    MONDAY,
    TUESDAY,
    WEDNESDAY,
    THURSDAY,
    FRIDAY,
    SATURDAY,
    SUNDAY
};

    
void print_day_category(enum Day day)
{
    if((day==MONDAY)||(day==TUESDAY)||(day==WEDNESDAY)||(day==THURSDAY)||(day==FRIDAY))
    {
        printf("Weekday\n");
    }
    else
    {
        printf("Weekend\n");
    }
}
void print_day_name(enum Day day)
{
    
    
        if(day==MONDAY)
        {
            printf("Monday");
            
        }
        if(day==TUESDAY)
        {
            printf("Tuesday");
           
        }
        if(day==WEDNESDAY)
        {
            printf("Wednesday");
           
        }
        if(day==THURSDAY)
        {
            printf("Thursday");
           
        }
        if(day==FRIDAY)
        {
            printf("Friday");
            
        }
        if(day==SATURDAY)
        {
            printf("Saturday");
            
        }
        if(day==SUNDAY)
        {
            printf("Sunday");
            
        }

}

int main(void)
{
    //keep this
	for (int i = 0; i < 70; i++)
	{
		print_day_name(i%7);
		printf(" is a ");
		print_day_category(i%7);
		printf("\n");
	}
	return 0;
}
#include <stdio.h>

enum Day
{
    MONDAY,
    TUESDAY,
    WEDNESDAY,
    THURSDAY,
    FRIDAY,
    SATURDAY,
    SUNDAY
};

    
void print_day_category(enum Day day)
{
    if((day==MONDAY)||(day==TUESDAY)||(day==WEDNESDAY)||(day==THURSDAY)||(day==FRIDAY))
    {
        printf("Weekday\n");
    }
    else
    {
        printf("Weekend\n");
    }
}
void print_day_name(enum Day day)
{
    
    
        if(day==MONDAY)
        {
            printf("Monday");
            
        }
        if(day==TUESDAY)
        {
            printf("Tuesday");
           
        }
        if(day==WEDNESDAY)
        {
            printf("Wednesday");
           
        }
        if(day==THURSDAY)
        {
            printf("Thursday");
           
        }
        if(day==FRIDAY)
        {
            printf("Friday");
            
        }
        if(day==SATURDAY)
        {
            printf("Saturday");
            
        }
        if(day==SUNDAY)
        {
            printf("Sunday");
            
        }

}

int main(void)
{
    //keep this
	for (int i = 0; i < 70; i++)
	{
		print_day_name(i%7);
		printf(" is a ");
		print_day_category(i%7);
		printf("\n");
	}
	return 0;
}
#include <stdio.h>

void print_array(int *p_array, int num_elements);
void zero_out_array(int *p_array, int num_elements);
int main(void)
{
	int main_array[] = { 15, 24, 33, 42, 51 };

	// TODO: Insert code here...
	int num_elements = sizeof(main_array)/sizeof(main_array[0]);
	
	print_array(main_array,num_elements);
    zero_out_array(main_array,num_elements);
    print_array(main_array,num_elements);
	return 0;
}

void print_array(int *p_array, int num_elements)
{
	printf("print_array called:\n");
	// TODO: Insert code here...
	for(int i = 0; i < num_elements; i++)
	{
	    printf("%d ",p_array[i]);
	}
	printf("\n\n");
}

void zero_out_array(int *p_array, int num_elements)
{
	printf("zero_out_array called:\n\n");
	// TODO: Insert code here...
	for(int i = 0; i < num_elements; i++)
	{
	    *(p_array+i) = 0;
	}
}
#include <stdio.h>

int find_min_index(int* numbers, int length);

int main(void)
{
    int array1[] = { 1, 3, 5, 7, 9, 11 };
    int array2[] = { 2, -4, 6, -8, 10, -12, 14, -16, 4 };
    int array3[] = { 6, 4, 1, 4, 5, 3, 2 };
 
    printf("Min's index in array1 is: %d\n", find_min_index(array1, 6));
    printf("Min's index in array2 is: %d\n", find_min_index(array2, 9));
    printf("Min's index in array3 is: %d\n", find_min_index(array3, 7));
 
    return 0;
}

int find_min_index(int* numbers, int length)
{
    // TODO: Insert your code here!
    
    int min_index = 0;
    
    for(int i = 0; i < length; i++)
    {
        if( numbers[i] < numbers[min_index] )
        {
            min_index = i;
        }
    }
    return min_index;
}
#include <stdio.h>

int count_odds(int* data_array, int size);

int main(void)
{
	int data_array_1[] = { 1, 3, 5, 7, 9, 11 };
	int data_array_2[] = { 2, -4, 6, -8, 10, -12, 14, -16 };
	int data_array_3[] = { 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 };

	int result_1 = count_odds(data_array_1, 6);
	printf("data_array_1 has %d odd numbers.\n", result_1);
	
	int result_2 = count_odds(data_array_2, 8);
	printf("data_array_2 has %d odd numbers.\n", result_2);
	
	int result_3 = count_odds(data_array_3, 11);
	printf("data_array_3 has %d odd numbers.\n", result_3);
	
	return 0;
}

// TODO: Insert your function definition here!
int count_odds(int* data_array, int size)
{
    int count = 0;
    
    
    for(int i =0; i < size ;i++)
    {
        if(data_array[i] > 0 && data_array[i] % 2 != 0)
        {
            count++;
        }
    }
    return count;
}
#include <stdio.h>

void cube(float* number);

int main(void)
{
	float x = 0.0f;

	printf("> ");
	scanf("%f", &x);

	// TODO: Call cube with x by reference...
	cube(&x);
	
	printf("x holds %f\n\n", x);

	return 0;
}

// TODO: Define cube function:
void cube(float* number)
{
    *number = (*number)*(*number)*(*number);
    
}
star

Tue Jun 11 2024 08:54:09 GMT+0000 (Coordinated Universal Time)

@meanaspotato #c #struct

star

Tue Jun 11 2024 07:16:52 GMT+0000 (Coordinated Universal Time)

@ayushg103 #c++

star

Tue Jun 11 2024 06:34:32 GMT+0000 (Coordinated Universal Time)

@meanaspotato #c #function

star

Tue Jun 11 2024 05:45:35 GMT+0000 (Coordinated Universal Time) https://www.coindeveloperindia.com/p2p-crypto-exchange-development

@jamesright #p2p #p2pcryptoexchange #cryptocurrencyexchange #peertopeer #cryptoexchangedevelopment

star

Tue Jun 11 2024 05:19:27 GMT+0000 (Coordinated Universal Time)

@meanaspotato #c #function

star

Tue Jun 11 2024 04:38:24 GMT+0000 (Coordinated Universal Time) https://keep.google.com/

@fazmukadar #javascript

star

Tue Jun 11 2024 04:02:57 GMT+0000 (Coordinated Universal Time)

@meanaspotato #c #struct

star

Tue Jun 11 2024 03:42:53 GMT+0000 (Coordinated Universal Time) https://www.sqlshack.com/using-sql-server-cursors-advantages-and-disadvantages/

@joshjohn1984 #sql #space

star

Tue Jun 11 2024 01:57:19 GMT+0000 (Coordinated Universal Time) https://www.udemy.com/course/bootstrap-from-scratch/learn/lecture/38476088#overview

@Joe_Devs #frontend #bootstrap

star

Mon Jun 10 2024 22:56:02 GMT+0000 (Coordinated Universal Time) https://developer.android.com/tools/variables#envar

@curtisbarry

star

Mon Jun 10 2024 22:55:59 GMT+0000 (Coordinated Universal Time) https://developer.android.com/tools/variables#envar

@curtisbarry

star

Mon Jun 10 2024 22:55:39 GMT+0000 (Coordinated Universal Time) https://developer.android.com/tools/variables#envar

@curtisbarry

star

Mon Jun 10 2024 19:18:13 GMT+0000 (Coordinated Universal Time)

@signup

star

Mon Jun 10 2024 15:15:38 GMT+0000 (Coordinated Universal Time) undefined

star

Mon Jun 10 2024 15:10:23 GMT+0000 (Coordinated Universal Time)

star

Mon Jun 10 2024 13:47:10 GMT+0000 (Coordinated Universal Time)

@ayushg103 #c++

star

Mon Jun 10 2024 12:57:12 GMT+0000 (Coordinated Universal Time)

@ayushg103 #c++

star

Mon Jun 10 2024 12:45:13 GMT+0000 (Coordinated Universal Time)

@CarlosR

star

Mon Jun 10 2024 12:26:16 GMT+0000 (Coordinated Universal Time)

@meanaspotato #c #struct

star

Mon Jun 10 2024 12:15:06 GMT+0000 (Coordinated Universal Time)

@meanaspotato #c #enum #struct

star

Mon Jun 10 2024 12:06:37 GMT+0000 (Coordinated Universal Time)

@meanaspotato #c #enum #struct

star

Mon Jun 10 2024 11:07:09 GMT+0000 (Coordinated Universal Time)

@meanaspotato #c

star

Mon Jun 10 2024 10:48:23 GMT+0000 (Coordinated Universal Time) https://code.visualstudio.com/docs/setup/linux#_rhel-fedora-and-centos-based-distributions

@mdevil1619

star

Mon Jun 10 2024 10:40:07 GMT+0000 (Coordinated Universal Time)

@meanaspotato #c

star

Mon Jun 10 2024 10:30:35 GMT+0000 (Coordinated Universal Time)

@Ranjith

star

Mon Jun 10 2024 09:34:31 GMT+0000 (Coordinated Universal Time) https://maticz.com/blockchain-business-ideas

@jamielucas #drupal

star

Mon Jun 10 2024 08:07:28 GMT+0000 (Coordinated Universal Time) https://myassignmenthelp.com/uk/mathematics-assignment-help.html

@josephinelinnea ##mathmatics ##educational ##tutor

star

Mon Jun 10 2024 07:02:50 GMT+0000 (Coordinated Universal Time)

@divay6677 ##c++

star

Mon Jun 10 2024 06:44:01 GMT+0000 (Coordinated Universal Time)

@zaki

star

Mon Jun 10 2024 06:43:34 GMT+0000 (Coordinated Universal Time)

@zaki

star

Mon Jun 10 2024 06:09:03 GMT+0000 (Coordinated Universal Time)

@davidmchale #css #forms #custom #radio

star

Mon Jun 10 2024 04:17:05 GMT+0000 (Coordinated Universal Time)

@quanganh141220 #html

star

Mon Jun 10 2024 02:01:20 GMT+0000 (Coordinated Universal Time)

@python

star

Mon Jun 10 2024 01:59:43 GMT+0000 (Coordinated Universal Time)

@python

star

Mon Jun 10 2024 01:43:03 GMT+0000 (Coordinated Universal Time) https://docs.docker.com/docker-hub/download-rate-limit/

@calazar23

star

Mon Jun 10 2024 01:42:53 GMT+0000 (Coordinated Universal Time) https://docs.docker.com/docker-hub/download-rate-limit/

@calazar23

star

Mon Jun 10 2024 01:42:39 GMT+0000 (Coordinated Universal Time) https://docs.docker.com/docker-hub/download-rate-limit/

@calazar23

star

Mon Jun 10 2024 00:15:30 GMT+0000 (Coordinated Universal Time) https://github.com/Smoyam11/tigerbrew

@calazar23

star

Sun Jun 09 2024 18:14:35 GMT+0000 (Coordinated Universal Time) https://codepal.ai/live-webpage-generator/query/4gZTMvZq/html-css-javascript-cefi-defi-arbitrage-trading-telegram-bot

@david

star

Sun Jun 09 2024 13:17:54 GMT+0000 (Coordinated Universal Time)

@ayushg103 #c++

star

Sun Jun 09 2024 11:52:22 GMT+0000 (Coordinated Universal Time)

@payammhmd

star

Sun Jun 09 2024 11:45:30 GMT+0000 (Coordinated Universal Time)

@meanaspotato #c #pointer

star

Sun Jun 09 2024 11:36:42 GMT+0000 (Coordinated Universal Time)

@meanaspotato #c

star

Sun Jun 09 2024 11:35:40 GMT+0000 (Coordinated Universal Time)

@meanaspotato #c

star

Sun Jun 09 2024 11:35:40 GMT+0000 (Coordinated Universal Time)

@meanaspotato #c

star

Sun Jun 09 2024 11:33:11 GMT+0000 (Coordinated Universal Time)

@meanaspotato #c #pointer

star

Sun Jun 09 2024 11:32:00 GMT+0000 (Coordinated Universal Time)

@meanaspotato #c #pointer

star

Sun Jun 09 2024 11:30:52 GMT+0000 (Coordinated Universal Time)

@meanaspotato #c #pointer

star

Sun Jun 09 2024 11:29:47 GMT+0000 (Coordinated Universal Time)

@meanaspotato #c #pointer

Save snippets that work with our extensions

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