Snippets Collections
// postcss.config.js
const { join } = require('path');

module.exports = {
  plugins: {
    tailwindcss: {
      config: join(__dirname, 'tailwind.config.js'),
    },
    autoprefixer: {},
  },
};
var $cont = document.querySelector(".cont");

var $elsArr = [].slice.call(document.querySelectorAll(".el"));

var $closeBtnsArr = [].slice.call(document.querySelectorAll(".el__close-btn"));

​

setTimeout(function () {

 $cont.classList.remove("s--inactive");

}, 0);

​

$elsArr.forEach(function ($el) {

 $el.addEventListener("click", function () {

  if (this.classList.contains("s--active")) return;

  $cont.classList.add("s--el-active");

  this.classList.add("s--active");

 });

});

​

$closeBtnsArr.forEach(function ($btn) {

 $btn.addEventListener("click", function (e) {

  e.stopPropagation();
20
  $cont.classList.remove("s--el-active");

  document.querySelector(".el.s--active").classList.remove("s--active");

 });

});
engine = db.create_engine('sqlite:///datacamp.sqlite')
conn = engine.connect()
metadata = db.MetaData()

Student = db.Table('Student', metadata,
              db.Column('Id', db.Integer(),primary_key=True),
              db.Column('Name', db.String(255), nullable=False),
              db.Column('Major', db.String(255), default="Math"),
              db.Column('Pass', db.Boolean(), default=True)
              )

metadata.create_all(engine)
from sqlalchemy import create_engine
engine = create_engine("sqlite+pysqlite:///:memory:", echo=True)

connection = engine.connect()
print("Connected to the database successfully")
connection.close()
class Solution:
    def insert(
        self, intervals: List[List[int]], newInterval: List[int]
    ) -> List[List[int]]:
        res = []

        for i in range(len(intervals)):
            if newInterval[1] < intervals[i][0]:
                res.append(newInterval)
                return res + intervals[i:]
            elif newInterval[0] > intervals[i][1]:
                res.append(intervals[i])
            else:
                newInterval = [
                    min(newInterval[0], intervals[i][0]),
                    max(newInterval[1], intervals[i][1]),
                ]
        res.append(newInterval)
        return res
.gelatine {
  animation: gelatine 0.5s infinite;
}
@keyframes gelatine {
  from, to { transform: scale(1, 1); }
  25% { transform: scale(0.9, 1.1); }
  50% { transform: scale(1.1, 0.9); }
  75% { transform: scale(0.95, 1.05); }
}
#include <stdio.h>

int main() {
    int a;
    int b;
    
    printf("Enter marks from part 1 :");
    scanf("%d",&a);
    
    printf("Enter marks from part 2: ");
    scanf("%d",&b);
    
    int totalMarks =(a+b)/2;
    printf("Total marks of the paper: %d\n",totalMarks);
    
if(totalMarks>=75){
        printf("Grade: A");
    }
    else if(totalMarks>=65){
        printf("Grade: B");
    }else if(totalMarks>=55){
        printf("Grade: C");
    }else if(totalMarks>=35){
        printf("Grade: S");
    }else{
        printf("fail");
    }
    return 0;
}
#include <stdio.h>

int main() {
    int a;
    int b;
    
    printf("Enter marks from part 1 :");
    scanf("%d",&a);
    
    printf("Enter marks from part 2: ");
    scanf("%d",&b);
    
    int totalMarks =(a+b)/2;
    printf("Total marks of the paper: %d\n",totalMarks);
    
if(totalMarks>=75){
        printf("Grade: A");
    }
    else if(totalMarks>=65){
        printf("Grade: B");
    }else if(totalMarks>=55){
        printf("Grade: C");
    }else if(totalMarks>=35){
        printf("Grade: S");
    }else{
        printf("fail");
    }
    return 0;
}
rm -rf ~/.cache/JetBrains/PyCharm2024.1/cythonExtensions
<p><span id="docs-internal-guid-6f29315e-7fff-b55c-15a8-27e737606363"> </span></p>
<p dir="ltr">&nbsp;</p>
<p dir="ltr"><a href="https://fubar.com/help-blogs/b361314-1318694"><span><span><img src="https://lh7-us.googleusercontent.com/Bhc96hvMZnMbG6LVt-xUg_HBnnNEl0OwZjCtiVKU7-VmeZKZJ8W1JjcobC6Ugm37BpKW4r62Vc4HEI1vfQ9a9eG54ehL-lPai42PtclP96-QJBvy-NatFkSg9Gah7UTX6PqCKAQEkE2yaWcDSQFbTY8" alt="" width="172" height="29" /></span></span></a><a href="https://fubar.com/quick-like-polish-list/b373141"><span><span><img src="https://lh7-us.googleusercontent.com/BfE_Vu-IoKQ8RMa0wSINl6AYJdUqP-U0y79v92_GXBkspSg9pd_-XX9O7ecwRJH0svXVpKcTbE9WJOLsmOUqo0L3fBfkn10U4lHrCAM__UVdJn2_XxkKDOpCk48ZoglHmcJrWvB8o9v-I0hboeZ5X6o" alt="" width="204" height="29" /></span></span></a><a href="https://fubar.com/help.php"><span><span><img src="https://lh7-us.googleusercontent.com/tahv4Cbm08xNSdjT88DwsJwqGaJvP1FoQSXRdoitfSe-Lw2Dd-5tk7Z7wLmyhOIiV_WqJuWSSlz_IZs2fEDnilHZ7oJ50-BPr_1GfptvEoRUrXVuUayxfmqt6CSUuIZPg0PBy5UtNOkR0FTi9JLekAs" alt="" width="178" height="29" /></span></span></a><a href="https://fubar.com/bible.php"><span><span><img src="https://lh7-us.googleusercontent.com/ndhbaL4t8eBeWvSKf5MT4V38ZydpPdAFBg-aNGykWF7FDzuk8fRfeKFs7w5j_lw4AcgHnp1nZzexyvJ0biiZSCcMKbZbGMFmSfNkM8MCTdOF9Spgk3zHV5ScxF7dKKnoK9vghf0y0pRwJct3aLYhyxk" alt="" width="127" height="29" /></span></span></a><a href="https://www.fubar.com/tos.php"><span><span><img src="https://lh7-us.googleusercontent.com/DJ7XJK7yGWWFgRE5fAFORSRWTYcMD970AEYWhnDntD_VKg2kAQLxIohvBy4k6oF89PDyKZPdGcermOxVCZ4Vzl8yrh9xaHirqSlM_wJPvqOKHY1lu32ZttzAghY1r2gsSHP0ApYZoQPQADLgpSWdEKI" alt="" width="118" height="29" /></span></span></a><a href="http://fubar.com/blast_list.php"><span><span><img src="https://lh7-us.googleusercontent.com/HZM1yiLSYZY5pDtWVKj1TBdeW6zuxu-Yo39mBzeNKjfUbXsrX5RKl6xkNk0ytyki5yWvw4NQrZzohiaONb8ODV9dotNn24VG8yczRg6rPqqJknjeQP7beVdEPSAWX3-cXJ8qGHdKK4tAsvQp6m2MeDs" alt="" width="136" height="29" /></span></span></a><a href="http://www.fubar.com/emotes.php"><span><span><img src="https://lh7-us.googleusercontent.com/XeuFUnLnXQVvZ3DwVcaK-XhtwUdX6NKANmrtWViAkaZF99W9cJIcH1YwzP-GVi_vLrlaC7rSUNLljWTN7CDfsLCNk3VoVkIdDGPY-JXYd1B0DQxwPunxKI1u5WlKSwbbgBwzK-jO7uK97md-e9RZDJU" alt="" width="144" height="29" /></span></span></a><a href="https://fubar.com/bling.php?sent=1"><span><span><img src="https://lh7-us.googleusercontent.com/e-Ba-qefqHZKcfEmKULRqlGCsxpUixeM4O4pkae274pMswwNKjLFb_eQA0Zld5rX79hLFLnqiLxQZSD8MEAvxFPfbp_2YcMWTRU2FhNrr3MLX4bRQhsC2HV5L5s9OMDT6RrkgdAXYZBJviedPehhem0" alt="" width="162" height="29" /></span></span></a><a href="http://fubar.com/marriage.php"><span><span><img src="https://lh7-us.googleusercontent.com/0eMylWECNNjDddeTztE3yWlJCAzw1BlJ6jB-vz0i4RYfodA-OiXlEKGFDeS9CPS4pezTtwP3m5H6F_N6fM_f4R40rEmKZvgMyqebKatwhSdlRqeX8r-KC7F7ZamGUvakcSXiMMjbDPDNIPohhN_FQ34" alt="" width="117" height="29" /></span></span></a><a href="https://fubarswag.myspreadshop.com/"><span><span><img src="https://lh7-us.googleusercontent.com/X4vRibtwdEnWz3fdLMJO1-4yCYkxJ6KnqdTPZi7-HWsz2N5h-oWytjcpOlhJc8kl92kTflWT1favNk6ACCQZPNYDf3cnQUWu1n_TrByN4xOdHh528kgax_McbgWntvF83faQItNCpiYIwW7C9n37rfM" alt="" width="127" height="29" /></span></span></a><a href="https://fubar.com/vip.php"><span><span><img src="https://lh7-us.googleusercontent.com/8PVUHAnW4XuMQkBmytMBxvwo8AIwAILhHZT3Q4Ayn9aJsZuh8e-l9zygyHlFT93I0wYgBJejGD9b5F5ew36d9T-BPmG6Ns4PPqHWLB7ktp37hAPOSxH_VRY5wtRNnGTltFmHviOWHcdGPIXmnObgmrg" alt="" width="98" height="29" /></span></span></a><a href="https://fubar.com/lounge/support"><span><span><img src="https://lh7-us.googleusercontent.com/79MRkP11vV5xspKJd0ooJ_dt7n3KXxUWjsoJleCAxCuBGcwPsgqGhiPMVPj5Pp9veNaKcuEiXL-tLu0GP0yZMfow5AeQGZW7DXuVKcuooltSP3wQY3BGf5kgY_772LUWSdryyOMMA1z0jt75lLQLjTg" alt="" width="207" height="29" /></span></span></a><a href="https://fubar.com/blogs.php?u=22"><span><span><img src="https://lh7-us.googleusercontent.com/i-fDHpQdS9yDffiVTmbVlLx70azD7_F2uRO4j4Fc6YSfhGXi6fb_iNBdjqxknsZCY-3wz12-l4Q2Z-hlitN0pcoV1SqVxbjMSIEEcp45Kzh4wcr9iAWBqRYbVh-lGNCEVhF9uBkmp7-DyYeXiUjkf1w" alt="" width="151" height="29" /></span></span></a></p>
<p>&nbsp;</p>
0 0.961847 0.151807 0.945783 0.151807 0.929719 0.166265 0.923695 0.180723 0.923695 0.207229 0.903614 0.243373 0.853414 0.26506 0.833333 0.279518 0.799197 0.289157 0.787149 0.289157 0.783133 0.284337 0.781124 0.255422 0.7751 0.243373 0.773092 0.166265 0.76506 0.151807 0.746988 0.159036 0.692771 0.207229 0.668675 0.209639 0.654618 0.216867 0.620482 0.216867 0.592369 0.207229 0.574297 0.207229 0.568273 0.214458 0.568273 0.240964 0.580321 0.26747 0.580321 0.279518 0.568273 0.296386 0.554217 0.344578 0.53012 0.383133 0.502008 0.414458 0.447791 0.513253 0.413655 0.595181 0.385542 0.689157 0.373494 0.780723 0.383534 0.807229 0.381526 0.850602 0.395582 0.872289 0.437751 0.891566 0.475904 0.901205 0.516064 0.903614 0.556225 0.915663 0.588353 0.908434 0.594378 0.889157 0.586345 0.860241 0.616466 0.824096 0.630522 0.79759 0.648594 0.742169 0.648594 0.689157 0.65261 0.684337 0.662651 0.693976 0.668675 0.739759 0.676707 0.761446 0.686747 0.773494 0.712851 0.778313 0.722892 0.766265 0.728916 0.744578 0.722892 0.66747 0.708835 0.631325 0.680723 0.60241 0.688755 0.566265 0.710843 0.53494 0.730924 0.46506 0.746988 0.440964 0.787149 0.404819 0.821285 0.392771 0.85743 0.366265 0.893574 0.325301 0.953815 0.26988 0.96988 0.209639 0.96988 0.168675
coco/
└── annotations/
    └── coco_annotations.json
coco_to_yolo.py
coco_converted/
├── images/
└── labels/
    └── coco_annotations/
        └── image1.txt
        └── image2.txt
python coco_to_yolo.py
.\venv\Scripts\activate.ps1
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
 
typedef struct
{
    char **arr;
    int size;
} Arr;
 
typedef struct
{
    char *Name;
    int Count;
    float Rating;
} Product;
 
Arr input(FILE *f);
 
int main(void)
{
    Arr nouns;
    Arr adj;
 
    Product pr1;
 
    FILE *fn;
    FILE *fa;
    FILE *out;
 
    char *name;
    int i;
    int j;
    int n;
    int a;
 
    srand(time(NULL));
 
    fn = fopen("noun.txt", "r");
 
    if (fn == NULL)
    {
        printf("Error openning file");
        return 1;
    }
 
    fa = fopen("adj.txt", "r");
    
    if(fa == NULL)
    {
        printf("Error openning file");
        fclose(fn);
        return 1;
    }
 
    out = fopen("output.txt", "w");
 
    if(fgetc(fn) == EOF || fgetc(fa) == EOF)
    {
        fclose(fn);
        fclose(fa);
        fclose(out);
        printf("file is empty!");
        return 1;
    }
    else
    {
        fseek(fn, 0, SEEK_SET);
        fseek(fa, 0, SEEK_SET);
    }
 
    nouns = input(fn);
    adj = input(fa);
 
    n = rand() % nouns.size;
    a = rand() % adj.size;
 
    pr1.Count = rand() % 100;
    pr1.Rating = (float)(rand() % 100) / 10.0; // Generating a float rating between 0 and 10
 
    name = malloc(sizeof(char));
 
    i = 0;
    j = 0;
 
    while (1)
    {
        if (adj.arr[a][i] != '\0')
        {
            name = realloc(name, sizeof(char) * (i + 1));
            name[i] = adj.arr[a][i];
            i++;
        }
        else
        {
            name = realloc(name, sizeof(char) * (i + 1));
            name[i] = ' ';
            i++;
            break;
        }
    }
 
    while (1)
    {
        if (nouns.arr[n][j] != '\0')
        {
            name = realloc(name, sizeof(char) * (i + 1));
            name[i] = nouns.arr[n][j];
            i++;
            j++;
        }
        else
        {
            name = realloc(name, sizeof(char) * (i + 1));
            name[i] = '\0';
            break;
        }
    }
    pr1.Name = name;
 
    fprintf(out, "%s %d %.1f", pr1.Name, pr1.Count, pr1.Rating);
 
    free(name);
    for (int k = 0; k < nouns.size; k++)
    {
        free(nouns.arr[k]);
    }
    for (int k = 0; k < adj.size; k++)
    {
        free(adj.arr[k]);
    }
    free(nouns.arr);
    free(adj.arr);
 
    fclose(fn);
    fclose(fa);
    fclose(out);
 
    return 0;
}
 
Arr input(FILE *f)
{
    char **arr;
    char r;
    int size_w = 0;
    int count_w = 0;
 
    arr = malloc(sizeof(char *));
    arr[0] = malloc(sizeof(char));
 
    while ((r = fgetc(f)) != EOF)
    {
        if (r != '\0' && r != ' ')
        {
            if (r == '\n')
            {
                arr[count_w] = realloc(arr[count_w], (size_w + 1) * sizeof(char));
                arr[count_w][size_w] = '\0';
                count_w += 1;
                arr = realloc(arr, (count_w + 1) * sizeof(char *));
                arr[count_w] = malloc(sizeof(char));
                size_w = 0;
            }
            else
            {
                arr[count_w] = realloc(arr[count_w], (size_w + 1) * sizeof(char));
                arr[count_w][size_w] = r;
                size_w += 1;
            }
        }
    }
    count_w++;
    return (Arr){arr, count_w};
}
cd path\to\your\project\directory
coco/
└── annotations/
    └── coco_annotations.json
coco_to_yolo.py
from ultralytics.data.converter import convert_coco
convert_coco(labels_dir='annotations', use_segments=True)
coco/
└── annotations/
    └── coco_annotations.json
 {
      "id": 9,
      "width": 359,
      "height": 269,
      "file_name": "dog.4121.jpg",
      "license": 0,
      "flickr_url": "",
      "coco_url": "",
      "date_captured": 0
    },
    {
      "id": 10,
      "width": 200,
      "height": 297,
      "file_name": "dog.4123.jpg",
      "license": 0,
      "flickr_url": "",
      "coco_url": "",
      "date_captured": 0
    }
  ],
  "annotations": [
    {
      "id": 1,
      "image_id": 1,
      "category_id": 1,
      "segmentation": [
        [
          479.0, 63.0, 471.0, 63.0, 463.0, 69.0, 460.0, 75.0, 460.0, 86.0,
          450.0, 101.0, 425.0, 110.0, 415.0, 116.0, 398.0, 120.0, 392.0, 120.0,
          390.0, 118.0, 389.0, 106.0, 386.0, 101.0, 385.0, 69.0, 381.0, 63.0,
          372.0, 66.0, 345.0, 86.0, 333.0, 87.0, 326.0, 90.0, 309.0, 90.0,
          295.0, 86.0, 286.0, 86.0, 283.0, 89.0, 283.0, 100.0, 289.0, 111.0,
          289.0, 116.0, 283.0, 123.0, 276.0, 143.0, 264.0, 159.0, 250.0, 172.0,
          223.0, 213.0, 206.0, 247.0, 192.0, 286.0, 186.0, 324.0, 191.0, 335.0,
          190.0, 353.0, 197.0, 362.0, 218.0, 370.0, 237.0, 374.0, 257.0, 375.0,
          277.0, 380.0, 293.0, 377.0, 296.0, 369.0, 292.0, 357.0, 307.0, 342.0,
          314.0, 331.0, 323.0, 308.0, 323.0, 286.0, 325.0, 284.0, 330.0, 288.0,
          333.0, 307.0, 337.0, 316.0, 342.0, 321.0, 355.0, 323.0, 360.0, 318.0,
          363.0, 309.0, 360.0, 277.0, 353.0, 262.0, 339.0, 250.0, 343.0, 235.0,
          354.0, 222.0, 364.0, 193.0, 372.0, 183.0, 392.0, 168.0, 409.0, 163.0,
          427.0, 152.0, 445.0, 135.0, 475.0, 112.0, 483.0, 87.0, 483.0, 70.0
        ]
      ],
var xmlResponse = '<?xml version="1.0" encoding="UTF-8"?> <data code="0" name="piece-shipment-list" request-id="f1fc982b-fd81-4b63-92ae-eb60d1dd9262"> <data airway-bill-number="" delivery-event-flag="1" dest-country="DE" division="DPEED" domestic-id="" error-status="0" event-country="DE" event-location="" ice="DLVRD" identifier-type="2" international-flag="0" leitcode="" matchcode="" name="piece-shipment" order-preferred-delivery-day="false" origin-country="DE" pan-recipient-address="Heinrich-Brüning-Str. 7 53113 Bonn" pan-recipient-city="53113 Bonn" pan-recipient-name="Deutsche Post DHL" pan-recipient-postalcode="53113" pan-recipient-street="Heinrich-Brüning-Str. 7" piece-code="00340434161094022115" piece-customer-reference="" piece-id="8e464a3e-219a-459b-823b-07d9d92732e3" piece-identifier="340434161094022115" product-code="00" product-key="" product-name="DHL PAKET (parcel)" pslz-nr="5066934803" recipient-city="53113 Bonn" recipient-id="5" recipient-id-text="different person present" recipient-name="Kraemer" recipient-street="Heinrich-Brüning-Str. 7" ric="OTHER" routing-code-ean="" ruecksendung="false" searched-piece-code="00340434161094022115" searched-ref-no="" shipment-code="" shipment-customer-reference="" shipment-height="0.0" shipment-length="0.0" shipment-weight="0.0" shipment-width="0.0" shipper-address="" shipper-city="" shipper-name="No sender data has been transferred to DHL." shipper-street="" short-status="Delivery successful" standard-event-code="ZU" status="The shipment has been successfully delivered" status-liste="0" status-timestamp="18.03.2016 10:02" upu=""> <data _build-time="2017-01-14 19:56:42.000775" leitcode="5311304400700" name="piece-event-list" order-preferred-delivery-day="false" piece-id="8e464a3e-219a-459b-823b-07d9d92732e3" piece-identifier="340434161094022115" pslz-nr="5066934803" routing-code-ean="" ruecksendung="false"> <data event-country="Germany" event-location="Bremen" event-short-status="Posting at PACKSTATION" event-status="The shipment has been posted by the sender at the PACKSTATION" event-text="The shipment has been posted by the sender at the PACKSTATION" event-timestamp="17.03.2016 11:43" ice="SHRCU" name="piece-event" ric="PCKST" ruecksendung="false" standard-event-code="ES" /> <data event-country="Germany" event-location="Bremen" event-short-status="Transportation to parcel center of origin" event-status="The shipment has been taken from the PACKSTATION for onward transportation" event-text="The shipment has been taken from the PACKSTATION for onward transportation" event-timestamp="17.03.2016 13:53" ice="LDTMV" name="piece-event" ric="MVMTV" ruecksendung="false" standard-event-code="AA" /> <data event-country="Germany" event-location="" event-short-status="Pick-up successful" event-status="The shipment has been picked up" event-text="The shipment has been picked up" event-timestamp="17.03.2016 13:55" ice="PCKDU" name="piece-event" ric="PUBCR" ruecksendung="false" standard-event-code="AE" /> <data event-country="Germany" event-location="Bremen" event-short-status="Parcel center of origin" event-status="The shipment has been processed in the parcel center of origin" event-text="The shipment has been processed in the parcel center of origin" event-timestamp="17.03.2016 15:49" ice="LDTMV" name="piece-event" ric="MVMTV" ruecksendung="false" standard-event-code="AA" /> <data event-country="Germany" event-location="Neuwied" event-short-status="Destination parcel center" event-status="The shipment has been processed in the destination parcel center" event-text="The shipment has been processed in the destination parcel center" event-timestamp="18.03.2016 03:35" ice="ULFMV" name="piece-event" ric="UNLDD" ruecksendung="false" standard-event-code="EE" /> <data event-country="" event-location="" event-short-status="In delivery" event-status="The shipment has been loaded onto the delivery vehicle" event-text="The shipment has been loaded onto the delivery vehicle" event-timestamp="18.03.2016 09:00" ice="SRTED" name="piece-event" ric="NRQRD" ruecksendung="false" standard-event-code="PO" /> <data event-country="Germany" event-location="Bonn" event-short-status="Delivery successful" event-status="The shipment has been successfully delivered" event-text="The shipment has been successfully delivered" event-timestamp="18.03.2016 10:02" ice="DLVRD" name="piece-event" ric="OTHER" ruecksendung="false" standard-event-code="ZU" /> </data> </data> </data>';

// Parse the XML response
var parser = new XMLDocument2();
parser.parseXML(xmlResponse);

// Get the value of the "short-status" attribute from the <data> element
var shortStatus = parser.getNode('/data/data').getAttribute('short-status');;

// Print the value of the "short-status" attribute
gs.info("Short Status: " + shortStatus);
import React from 'react'
import { CardElement, Elements, StripeProvider } from '@stripe/react-stripe-js'
import { loadStripe } from '@stripe/stripe-js'

const stripePromise = loadStripe('<YOUR_STRIPE_PUBLISHABLE_KEY>')

const PaymentForm = () => {
  return (
    <CardElement />
  )
}

const App = () => {
  return (
    <StripeProvider stripe={stripePromise}>
      <Elements>
        <PaymentForm />
      </Elements>
    </StripeProvider>
  )
}

export default App
get 
app.get('/products', (req, res) => {
  const products = [
    {
      id: 1,
      name: 'Furniture 1',
      price: 1000,
      size: 'L',
      fabricTexture: 'Smooth',
      woodTexture: 'Polished',
      woodType: 'Oak',
      fabricType: 'Cotton',
    },
    // ... more products
  ];

  res.send(products);
});

post
app.post('/products', (req, res) => {
  const newProduct = {
    id: Date.now(),
    name: req.body.name,
    price: req.body.price,
    size: req.body.size,
    fabricTexture: req.body.fabricTexture,
    woodTexture: req.body.woodTexture,
    woodType: req.body.woodType,
    fabricType: req.body.fabricType,
  };

  const products = [
    {
      id: 1,
      name: 'Furniture 1',
      price: 1000,
      size: 'L',
      fabricTexture: 'Smooth',
      woodTexture: 'Polished',
      woodType: 'Oak',
      fabricType: 'Cotton',
    },
    // ... more products
  ];

  products.push(newProduct);

  res.send(newProduct);
});

get by id 
app.get('/products/:id', (req, res) => {
  const products = [
    {
      id: 1,
      name: 'Furniture 1',
      price: 1000,
      size: 'L',
      fabricTexture: 'Smooth',
      woodTexture: 'Polished',
      woodType: 'Oak',
      fabricType: 'Cotton',
    },
    // ... more products
  ];

  const product = products.find((p) => p.id === parseInt(req.params.id));

  if (!product) {
    return res.status(404).send({ error: 'Product not found' });
  }

  res.send(product);
});

put
app.put('/products/:id', (req, res) => {
  const products = [
    {
      id: 1,
      name: 'Furniture 1',
      price: 1000,
      size: 'L',
      fabricTexture: 'Smooth',
      woodTexture: 'Polished',
      woodType: 'Oak',
      fabricType: 'Cotton',
      updated: false,
    },
    // ... more products
  ];

  const product = products.find((p) => p.id === parseInt(req.params.id));

  if (!product) {
    return res.status(404).send({ error: 'Product not found' });
  }

  product.name = req.body.name || product.name;
  product.price = req.body.price || product.price;
  product.size = req.body.size || product.size;
  product.fabricTexture = req.body.fabricTexture || product.fabricTexture;
  product.woodTexture = req.body.woodTexture || product.woodTexture;
  product.woodType = req.body.woodType || product.woodType;
  product.fabricType = req.body.fabricType || product.fabricType;

  res.send(product);
});
---------------------------------------------------------------------------------------------------
https://www.slideshare.net/AvinashKumar896/a-seminar-report-on-artificial-intelligence
---------------------------------------------------------------------------------------------------
https://www.slideshare.net/sachinkumar831/sophia-robot
---------------------------------------------------------------------------------------------------
  
green comuting --> 
 
  https://blogs.nvidia.com/blog/what-is-green-computing/#:~:text=Green%20computing%2C%20or%20sustainable%20computing,software%20are%20designed%20and%20used.
---------------------------------------------------------------------------------------------------
  
// Online C compiler to run C program online
#include <stdio.h>

int main() {
    int a;
    int b;
    
    printf("Enter marks from part 1 :");
    scanf("%d",&a);
    
    printf("Enter marks from part 2: ");
    scanf("%d",&b);
    
    int totalMarks =(a+b)/2;
    printf("Total marks of the paper: %d\n",totalMarks);
    
if(totalMarks>=75){
        printf("Grade: A");
    }
    else if(totalMarks>=65){
        printf("Grade: B");
    }else if(totalMarks>=55){
        printf("Grade: C");
    }else if(totalMarks>=35){
        printf("Grade: S");
    }else{
        printf("fail");
    }
    return 0 ;
}
# Remove break line in sequences
awk '/^>/ { print (NR==1 ? "" : RS) $0; next } { printf "%s", $0 } END { printf RS }' input.fa > output.fa
// Assuming you have a model for the table you want to insert into
$model = new YourModel;
$model->packages = json_encode(request('packages')); // Store the selected packages as a JSON array
$model->save();


===================
  $packages = json_decode($model->packages);
#include<stdio.h>
int main(){
     int a;
     int b;
     
     
     printf("Enter number for a:");
     scanf("%d",&a);
     
     printf("Enter number for b:");
     scanf("%d",&b);
     
     int value = a+b;
     printf("The value is: %d\n",value);
    
    
    
    return 0;
}
#include<stdio.h>
int main(){
    
    int item1Code;
    printf("Enter item 01 code:");
    scanf("%d",&item1Code);
    
    int item1Name;
    printf("Enter item 01 name:");
    scanf("%s",&item1Name);

    int item1Price;
    printf("Enter item 01 price:");
    scanf("%d",&item1Price);
    
    int item2Code;
    printf("\nEnter item 02 code:");
    scanf("%d",&item2Code);
    
    int item2Name;
    printf("Enter item 02 name:");
    scanf("%s",&item2Name);

    int item2Price;
    printf("Enter item 02 price:");
    scanf("%d",&item2Price);
    
    int item3Code;
    printf("\nEnter item 03 code:");
    scanf("%d",&item3Code);
    
    int item3Name;
    printf("Enter item 03 name:");
    scanf("%s",&item3Name);

    int item3Price;
    printf("Enter item 03 price:");
    scanf("%d",&item3Price);
    
    int totalValue = (item1Price+item2Price+item3Price);
    printf("\nTotal price = %d\n",totalValue);
    
    
    printf("Inventory list:\n");
    printf("01.%d\n",item1Code);
    printf("02.%d\n",item2Code);
    printf("03.%d\n",item3Code);
    
    
    
    return 0;
}
<div class="enhanceable_content tabs" title="ingesloten inhoud">
    <ul style="list-style-type: none; padding: 0; margin: 0;">
        <li style="display: inline-block; background-color: red; padding: 10px 20px; border-radius: 10px;"><a style="text-decoration: none; color: white; font-family: 'Arial', sans-serif;" href="#fragment-1">Tabblad 1</a></li>
        <li style="display: inline-block; background-color: red; padding: 10px 20px; border-radius: 10px;"><a style="text-decoration: none; color: white; font-family: 'Arial', sans-serif;" href="#fragment-2">Tabblad 2</a></li>
        <li style="display: inline-block; background-color: red; padding: 10px 20px; border-radius: 10px;"><a style="text-decoration: none; color: white; font-family: 'Arial', sans-serif;" href="#fragment-3">Tabblad 3</a></li>
        <li style="display: inline-block; background-color: red; padding: 10px 20px; border-radius: 10px;"><a style="text-decoration: none; color: white; font-family: 'Arial', sans-serif;" href="#fragment-4">Tabblad 4</a></li>
        <li style="display: inline-block; background-color: red; padding: 10px 20px; border-radius: 10px;"><a style="text-decoration: none; color: white; font-family: 'Arial', sans-serif;" href="#fragment-5">Tabblad 5</a></li>
    </ul>
    <div id="fragment-1">
        <p>INHOUD 1</p>
    </div>
    <div id="fragment-2">
        <p>INHOUD 2</p>
    </div>
    <div id="fragment-3">
        <p>INHOUD 3</p>
    </div>
    <div id="fragment-4">
        <p>INHOUD 4</p>
    </div>
    <div id="fragment-5">
        <p>INHOUD 5</p>
    </div>
</div>
<div class="enhanceable_content tabs" title="ingesloten inhoud">
    <ul>
        <li><a href="#fragment-1">Regulier traject</a></li>
        <li><a href="#fragment-2">Afstandstraject</a></li>
    </ul>
    <div id="fragment-1">
        <p>INHOUD REGULIER TRAJECT</p>
    </div>
    <div id="fragment-2">
        <p>INHOUD AFSTANDSTRAJECT</p>
    </div>
</div>
//Groene knop (OLO)
<a href="HIER JOUW LINK" class="btn btn-large btn-primary" style="background-color: #5ab946;">Voorbeeld 1</a>
//Lichtgroen knop (OLO)
<a href="HIER JOUW LINK" class="btn btn-large btn-primary" style="background-color: #bfd200;">Voorbeeld 2</a>
//Donkergroene knop (OSO)
<a href="HIER JOUW LINK" class="btn btn-large btn-success" style="background-color: #008b00;">Voorbeeld 3</a>
//Oranje knop
<a href="HIER JOUW LINK" class="btn btn-large btn-warning" style="background-color: #f26a34;">Voorbeeld 4</a>
//Blauwe knop
<a href="HIER JOUW LINK" class="btn btn-large btn-primary">Voorbeeld 5</a>
#include <stdio.h>

int main (){
    
    int index;
    int mark1;
    int mark2;
    
    printf("Enter index number :");
    scanf("%d",&index);
    
    printf("Enter mark1 :");
    scanf("%d",&mark1);
    
    printf("Enter mark2 :");
    scanf("%d",&mark2);
    
    int avg = (mark1+mark2)/2;
    printf("Average of marks :%d\n",avg);
    
    if(avg>=35){
        printf("Grade = c");
    }else{
        printf("fail");
    }

    return 0;
}
#include<stdio.h>

int main(){
    
    int index;
    int mark1;
    int mark2;
    
    printf("Enter index number:");
    scanf("%d",&index);
    
    printf("Enter mark1:");
    scanf("%d",&mark1);
    
    printf("Enter mark2:");
    scanf("%d",&mark2);
    
    int avg = (mark1+mark2)/2;
    printf("Average of marks:%d\n",avg);
    
    if(avg>=35){
        printf("Grade : C-");
    }else{
        printf("\nYou are fail idiot.!");
    }

    
    
    
    
    return 0;
}
git filter-branch --tree-filter 'rm -f test_data_recommendation.csv' HEAD
git clone -b minha-branch https://gitlab.com/seu_usuario/seu_repositorio.git

git rm --cached nome_do_arquivo

jennyca@htb[/htb]$ tree .

.
└── Penetration-Testing
	│
	├── Pre-Engagement
	│       └── ...
    ├── Network-Pentesting
	│       ├── Linux
	│       │   ├── Information-Gathering
	│		│   │   └── ...
	│       │   ├── Vulnerability-Assessment
    │       │   │	└── ...
    │       │	└── ...
    │       │    	└── ...
    │		├── Windows
    │ 		│   ├── Information-Gathering
    │		│   │   └── ...
    │		│   └── ...
    │       └── ...
    ├── WebApp-Pentesting
	│       └── ...
    ├── Social-Engineering
	│       └── ...
    ├── .......
	│       └── ...
    ├── Reporting
    │   └── ...
	└── Results
	    └── ...
jennyca@htb[/htb]$ tree .

.
└── Penetration-Testing
	│
	├── Pre-Engagement
	│       └── ...
    ├── Network-Pentesting
	│       ├── Linux
	│       │   ├── Information-Gathering
	│		│   │   └── ...
	│       │   ├── Vulnerability-Assessment
    │       │   │	└── ...
    │       │	└── ...
    │       │    	└── ...
    │		├── Windows
    │ 		│   ├── Information-Gathering
    │		│   │   └── ...
    │		│   └── ...
    │       └── ...
    ├── WebApp-Pentesting
	│       └── ...
    ├── Social-Engineering
	│       └── ...
    ├── .......
	│       └── ...
    ├── Reporting
    │   └── ...
	└── Results
	    └── ...
const str = 'abcab';

const freq = (str) => 
    str.split('').reduce((obj, char) => {
        obj[char] = (obj[char] || 0) + 1;
        return obj;
    }, {})

console.log(freq('zCu3zezCaX'));
function generate_gallery_tab_navigation($atts)
{
    $args = array(
        'taxonomy' => 'gallery_category',
        'hide_empty' => -1,
        'orderby' => 'name',
        'order' => 'ASC'
    );

    $categories = get_categories($args);

    ob_start(); ?>

    <div class="project-tabs-wrapper">
        <ul class="nav nav-pills mb-3" id="pills-tab" role="tablist">
            <?php if (!empty ($categories)): ?>
                <?php $nav_counter = 1; ?>
                <?php foreach ($categories as $category): ?>
                    <li class="nav-item" role="presentation">
                        <button class="nav-link <?php echo ($nav_counter === 1) ? 'active' : ''; ?>"
                            id="pills-<?php echo $category->slug; ?>-tab" data-bs-toggle="pill"
                            data-bs-target="#pills-<?php echo $category->slug; ?>" type="button" role="tab"
                            aria-controls="pills-<?php echo $category->slug; ?>"
                            aria-selected="<?php echo ($nav_counter === 1) ? 'true' : 'false'; ?>">
                            <?php echo $category->name; ?>
                        </button>
                    </li>
                    <?php $nav_counter++; ?>
                <?php endforeach; ?>
            <?php endif; ?>
        </ul>
    </div>

    <?php
    return ob_get_clean();
}
add_shortcode('gallery_tab_navigation', 'generate_gallery_tab_navigation');

function generate_gallery_tab_content($atts)
{
    $args = array(
        'post_type' => 'gallery',
        'posts_per_page' => -1,
        'order' => 'ASC',
    );

    $gallery_posts = new WP_Query($args);

    ob_start(); ?>

    <div class="tab-content" id="pills-tabContent">
        <?php if ($gallery_posts->have_posts()): ?>
            <?php 
            $active_set = false;
            while ($gallery_posts->have_posts()): $gallery_posts->the_post();
                $categories = get_the_terms(get_the_ID(), 'gallery_category');
                if ($categories): ?>
                    <?php foreach ($categories as $category): ?>
                        <div class="tab-pane fade <?php echo (!$active_set) ? 'show active' : ''; ?>"
                             id="pills-<?php echo $category->slug; ?>" role="tabpanel"
                             aria-labelledby="pills-<?php echo $category->slug; ?>-tab">
                            <div class="gallerys">
                                <div class="row">
                                    <?php 
                                    $category_posts_args = array(
                                        'post_type' => 'gallery',
                                        'posts_per_page' => -1,
                                        'tax_query' => array(
                                            array(
                                                'taxonomy' => 'gallery_category',
                                                'field' => 'term_id',
                                                'terms' => $category->term_id,
                                            ),
                                        ),
                                    );
                                    $category_posts = new WP_Query($category_posts_args);
                                    if ($category_posts->have_posts()): ?>
                                        <?php while ($category_posts->have_posts()): $category_posts->the_post(); ?>
                                            <div class="col-md-4 gall-img">
                                                <div class="gallery_inner">
                                                    <a class="fancybox" data-fancybox="gallery"
                                                       href="<?php echo wp_get_attachment_url(get_post_thumbnail_id()); ?>">
                                                        <?php the_post_thumbnail(); ?>
                                                    </a>
                                                </div>
                                            </div>
                                        <?php endwhile; ?>
                                    <?php endif; ?>
                                </div>
                            </div>
                        </div>
                        <?php 
                        $active_set = true;
                        ?>
                    <?php endforeach; ?>
                <?php endif; ?>
            <?php endwhile; ?>
        <?php endif; ?>
    </div>

    <?php
    wp_reset_postdata();
    return ob_get_clean();
}
add_shortcode('gallery_tab_content', 'generate_gallery_tab_content');

n=int(input("enter no.of elements: "))
m1=[]
for i in range (n):
    x=int(input())
    m1.append(x)
print (m1)
c=int(input("enter no.of elements present in list"))
r=int(input("enter no.of elements presend in sub list"))
m1=[]
for i in range (c):
    n=[]
    for j in range (r):
        x=int(input())
        n.append(x)
    
    m1.append(n)
print (m1)
return typePref && typePref === "OSV" ? (
    <OffshoreVessels />
  ) : (
<!-------- // -------- FareHarbor Lightframe API and Floating Book Now Button -------- // -------->
<script src="https://fareharbor.com/embeds/api/v1/?autolightframe=yes"></script>

<!-- Fareharbor floating button on specific pages only -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
    var allowedPages = [
        "https://chateaufeely.com/visits/feely-organic-wine-tours-options/",
        "https://chateaufeely.com/visits/",
        "https://chateaufeely.com/visits/courtes/",
        "https://chateaufeely.com/visits/half-day/",
        "https://chateaufeely.com/visits/day-tours/",
        "https://chateaufeely.com/fr/visites/",
        "https://chateaufeely.com/fr/visites/courtes/",
        "https://chateaufeely.com/fr/visites/demie-journee/",
        "https://chateaufeely.com/fr/visites/journee/"
    ];

    function isAllowedPage() {
        var currentPage = window.location.href;
        return allowedPages.includes(currentPage);
    }

    if(isAllowedPage()) {
        var buttonText;
        if (window.location.href.includes("/fr/")) {
            buttonText = "RÉSERVEZ";
        } else {
            buttonText = "BOOK NOW";
        }

        var buttonDesktop = $('<a>', {
            href: "https://fareharbor.com/embeds/book/chateaufeely/?full-items=yes",
            text: buttonText,
            class: "fh-hide--mobile fh-font--inherit fh-color--white fh-fixed--side fh-icon--cal fh-button-true-flat-color",
            style: "font-weight:bold !important; letter-spacing: .7px !important; border-radius: 3px !important; box-shadow:none !important; transform:rotate(0deg) !important; margin-top: 8em !important; padding: .5em 1.4em .3em 1.4em !important;"
        });
        var buttonMobile = $('<a>', {
            href: "https://fareharbor.com/embeds/book/chateaufeely/?full-items=yes",
            text: buttonText,
            class: "fh-hide--desktop fh-size--small fh-fixed--side fh-button-true-flat-color fh-color--white",
            style: "font-family: !important; font-weight:bold !important; letter-spacing: .7px !important; box-shadow:none !important; padding: 0em 2em !important;"
        });

        $('body').append(buttonDesktop);
        $('body').append(buttonMobile);
    }
});
</script>
// Online C compiler to run C program online
#include<stdio.h>
int main(){
     int a;
     int b;
     
     
     printf("Enter number for a:");
     scanf("%d",&a);
     
     printf("Enter number for b:");
     scanf("%d",&b);
     
     int value = a+b;
     printf("The value is: %d\n",value);
    
    
    
    return 0;
}
star

Fri Mar 29 2024 06:06:52 GMT+0000 (Coordinated Universal Time) https://stackoverflow.com/questions/64032166/tailwindcss-not-working-with-next-js-what-is-wrong-with-the-configuration

@jaimin #javascript

star

Fri Mar 29 2024 05:07:07 GMT+0000 (Coordinated Universal Time) https://codepen.io/Jondar/pen/LYGKbBG/a87e75f9c27590e683578f712253bd29

@Jondar #undefined

star

Fri Mar 29 2024 04:50:38 GMT+0000 (Coordinated Universal Time) https://chat.openai.com/c/3b5c2278-473d-438e-9e61-751049b61730

@nisarg #python #alchemy

star

Fri Mar 29 2024 04:31:15 GMT+0000 (Coordinated Universal Time) https://docs.sqlalchemy.org/en/20/tutorial/engine.html

@nisarg #python #alchemy

star

Fri Mar 29 2024 04:17:35 GMT+0000 (Coordinated Universal Time) https://docs.sqlalchemy.org/en/20/intro.html#installation

@nisarg #python #alchemy

star

Fri Mar 29 2024 01:30:36 GMT+0000 (Coordinated Universal Time) https://leetcode.com/problems/insert-interval/description/

@playadust

star

Thu Mar 28 2024 18:00:42 GMT+0000 (Coordinated Universal Time)

@Jondar

star

Thu Mar 28 2024 15:37:58 GMT+0000 (Coordinated Universal Time)

@chanuth

star

Thu Mar 28 2024 15:36:48 GMT+0000 (Coordinated Universal Time)

@chanuth

star

Thu Mar 28 2024 12:52:42 GMT+0000 (Coordinated Universal Time)

@hardikraja #commandline #pycharm

star

Thu Mar 28 2024 12:36:52 GMT+0000 (Coordinated Universal Time)

@Anomoly

star

Thu Mar 28 2024 12:25:02 GMT+0000 (Coordinated Universal Time)

@cvataicode #python

star

Thu Mar 28 2024 12:23:26 GMT+0000 (Coordinated Universal Time)

@cvataicode #python

star

Thu Mar 28 2024 12:22:11 GMT+0000 (Coordinated Universal Time)

@cvataicode #python

star

Thu Mar 28 2024 12:11:20 GMT+0000 (Coordinated Universal Time)

@cvataicode #python

star

Thu Mar 28 2024 12:00:43 GMT+0000 (Coordinated Universal Time)

@cvataicode #python

star

Thu Mar 28 2024 11:59:48 GMT+0000 (Coordinated Universal Time)

@cvataicode #python

star

Thu Mar 28 2024 11:06:44 GMT+0000 (Coordinated Universal Time)

@Shmotyu

star

Thu Mar 28 2024 10:44:21 GMT+0000 (Coordinated Universal Time)

@cvataicode #python

star

Thu Mar 28 2024 10:43:21 GMT+0000 (Coordinated Universal Time)

@cvataicode #python

star

Thu Mar 28 2024 10:42:05 GMT+0000 (Coordinated Universal Time)

@cvataicode #python

star

Thu Mar 28 2024 10:39:35 GMT+0000 (Coordinated Universal Time)

@cvataicode #python

star

Thu Mar 28 2024 10:37:46 GMT+0000 (Coordinated Universal Time)

@cvataicode

star

Thu Mar 28 2024 10:35:39 GMT+0000 (Coordinated Universal Time)

@cvataicode #json

star

Thu Mar 28 2024 09:18:02 GMT+0000 (Coordinated Universal Time)

@felipems #javascript

star

Thu Mar 28 2024 09:08:48 GMT+0000 (Coordinated Universal Time)

@Jevin2090

star

Thu Mar 28 2024 08:50:59 GMT+0000 (Coordinated Universal Time)

@Jevin2090

star

Thu Mar 28 2024 08:48:38 GMT+0000 (Coordinated Universal Time)

@Jevin2090

star

Thu Mar 28 2024 07:28:03 GMT+0000 (Coordinated Universal Time)

@HTPrince

star

Wed Mar 27 2024 23:43:17 GMT+0000 (Coordinated Universal Time)

@rogueta #bash

star

Wed Mar 27 2024 16:58:44 GMT+0000 (Coordinated Universal Time)

@Lester695 #html

star

Wed Mar 27 2024 16:55:25 GMT+0000 (Coordinated Universal Time)

@Lester695 #html

star

Wed Mar 27 2024 16:48:52 GMT+0000 (Coordinated Universal Time)

@Lester695 #html

star

Wed Mar 27 2024 15:53:26 GMT+0000 (Coordinated Universal Time)

@CarlosR

star

Wed Mar 27 2024 15:49:15 GMT+0000 (Coordinated Universal Time) https://tusd.schoology.com/home

@HG_Entertain

star

Wed Mar 27 2024 14:43:29 GMT+0000 (Coordinated Universal Time)

@jdeveloper #php

star

Wed Mar 27 2024 14:11:45 GMT+0000 (Coordinated Universal Time) https://academy.hackthebox.com/module/87/section/880

@jennyca1974 #shell-session

star

Wed Mar 27 2024 14:07:40 GMT+0000 (Coordinated Universal Time) https://academy.hackthebox.com/module/87/section/880

@jennyca1974 #shell-session

star

Wed Mar 27 2024 11:34:25 GMT+0000 (Coordinated Universal Time)

@Harsh #javascript #string

star

Wed Mar 27 2024 10:47:34 GMT+0000 (Coordinated Universal Time)

@BilalRaza12

star

Wed Mar 27 2024 10:31:02 GMT+0000 (Coordinated Universal Time)

@pvignesh

star

Wed Mar 27 2024 10:30:45 GMT+0000 (Coordinated Universal Time)

@pvignesh

star

Wed Mar 27 2024 10:21:33 GMT+0000 (Coordinated Universal Time)

@Jacko

star

Wed Mar 27 2024 08:48:33 GMT+0000 (Coordinated Universal Time)

@Shira

Save snippets that work with our extensions

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