Snippets Collections
# Before you run the Python code snippet below, run the following command:
# pip install roboflow autodistill autodistill_grounded_sam scikit-learn

from autodistill_grounded_sam import GroundedSAM
from autodistill.detection import CaptionOntology
from autodistill.helpers import sync_with_roboflow

BOX_THRESHOLD = 0.75
CAPTION_ONTOLOGY = {
    "0": "0",
    "1": "1",
    "5": "5",
    "green_car": "green_car",
    "gray_car": "gray_car",
    "Dent": "Dent",
    "scratch": "scratch",
    "red_car": "red_car",
    "undefined": "undefined",
    "yellow_car": "yellow_car",
    "Scratch": "Scratch",
    "blue_car": "blue_car",
    "white_car": "white_car",
    "black_car": "black_car"
}
TEXT_THRESHOLD = 0.70

model = GroundedSAM(
    ontology=CaptionOntology(CAPTION_ONTOLOGY),
    box_threshold=BOX_THRESHOLD,
    text_threshold=TEXT_THRESHOLD,
)

sync_with_roboflow(
    workspace_id="ofg8aFKE2OOmwddkN81tXUntmPr1",
    workspace_url="myassistant",
    project_id = "imperfections",
    batch_id = "aAre0tKc5Ja3ggoUkfda",
    model = model
)
#include <stdio.h>
#include <dos.h>
#include <conio.h>



int main()
{
    float sales, salary;
    clrscr();
    
    gotoxy(22, 10);
    printf("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");
    gotoxy(22, 11);
    printf("X                                 X");
    gotoxy(22, 12);
    printf("X                                 X");
    gotoxy(22, 13);
    printf("X                                 X");
    gotoxy(22, 14);
    printf("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");
    
    gotoxy(25, 11);
    printf("Enter sales in dollars: ");
    scanf("%f", &sales);

    salary = 200 + (sales * .09);
    
    gotoxy(25, 12);
    printf("Salary is: %.2f", salary);
    
    getch();
    return 0;
}
#include <stdio.h>
#include <dos.h>
#include <conio.h>
 
int main()
{
 
   float bal, charge, cred, limit, account, newbal;
   clrscr();
  
   gotoxy(20, 2);
   printf("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");
   gotoxy(20, 3);
   printf("X                                       X");
   gotoxy(20, 4);
   printf("X                                       X");
   gotoxy(20, 5);
   printf("X                                       X");
   gotoxy(20, 6);
   printf("X                                       X");
   gotoxy(20, 7);
   printf("X                                       X");
   gotoxy(20, 8);
   printf("X                                       X");
   gotoxy(20, 9);
   printf("X                                       X");
   gotoxy(20, 10);
   printf("X                                       X");
   gotoxy(20, 11);
   printf("X                                       X");
   gotoxy(20, 12);
   printf("X                                       X");
   gotoxy(20, 13);
   printf("X                                       X");
   gotoxy(20, 14);
   printf("X                                       X");
   gotoxy(20, 15);
   printf("X                                       X");
   gotoxy(20, 16);
   printf("X                                       X");
   gotoxy(20, 17);
   printf("X                                       X");
   gotoxy(20, 18);
   printf("X                                       X");
   gotoxy(20, 19);
   printf("X                                       X");
   gotoxy(20, 20);
   printf("X                                       X");
   gotoxy(20, 21);
   printf("X                                       X");
   gotoxy(20, 22);
   printf("X                                       X");
   gotoxy(20, 22);
   printf("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");


  
  
  
  gotoxy(26, 5);
   printf("Enter beginning balance:");
   scanf("%f", &bal);
  
   gotoxy(29, 7);
   printf("Enter total charge:");
   scanf("%f", &charge);
  
   gotoxy(28, 9);
   printf("Enter total credits:");
   scanf("%f", &cred);
  
   gotoxy(29, 11);
   printf("Enter credit limit:");
   scanf("%f", &limit);
  
   gotoxy(34, 13);
   printf("Account:");
   scanf("%f", &account);
  
  
   newbal=bal+charge-cred;
 
   gotoxy(30, 15);
   printf("Credit limit: %.2f\n", limit);
  
   gotoxy(34, 17);
   printf("Balance: %.2f\n", newbal);
  
   gotoxy(28, 19);
   (newbal>limit)? printf("Credit Limit Exceeded"): printf("Credit Limit not Exceeded");
  
  

   getch();
   return 0;
}
���
���
(
���
+
1
)
=
∑
���
∈
���
���
���
ℎ
���

ℎ
���
(
���
+
1
)
=
GRU
(
���
���
(
���
+
1
)
,
ℎ
���
(
���
)
)
using System;
using System.Linq;


public class Kata
{
  public static int PositiveSum(int[] arr)
  {
    return arr.Where(x => x > 0).Sum();
  }
}
import cProfile

# Use `profile` if `cProfile` isn't available on your OS
# import profile


def adder(x, y):
	return x + y


cProfile.run('adder(10, 20)')
import timeit


def adder(x, y):
	return x + y


t = timeit.Timer(setup='from __main__ import adder', stmt='adder(10, 20)')
t.timeit()
function MyPage() {
  const [theme, setTheme] = useState('dark');
  return (
    <ThemeContext.Provider value={theme}>
      <Form />
      <Button onClick={() => {
        setTheme('light');
      }}>
        Switch to light theme
      </Button>
    </ThemeContext.Provider>
  );
}
SELECT DISTINCT  V1.SKU AS SKU, V2.DESCR AS ItemName, SUM(V1.SHIPPEDQTY) 
FROM SCE.vw_ORDERDETAIL_1 V1
INNER JOIN SCE.vw_SKU V2 ON V1.SKU = V2.SKU 
WHERE V1.ACTUALSHIPDATE BETWEEN '2024-01-01 00:00:00' AND GETDATE()
GROUP BY v1.SKU, V2.DESCR
HAVING SUM(V1.SHIPPEDQTY) > 0
#!/bin/bash

# install the EPEL repo to access Redis
yum install -y epel-release
yum install -y redis

# fix redis background saves on low memory
sysctl vm.overcommit_memory=1 && cat <<SYSCTL_MEM > /etc/sysctl.d/88-vm.overcommit_memory.conf
vm.overcommit_memory = 1
SYSCTL_MEM

# increase max connections
sysctl -w net.core.somaxconn=65535 && cat <<SYSCTL_CONN > /etc/sysctl.d/88-net.core.somaxconn.conf
net.core.somaxconn = 65535
SYSCTL_CONN

sysctl -w fs.file-max=100000 && cat <<SYSCTL_FILEMAX > /etc/sysctl.d/88-fs.file-max.conf
fs.file-max = 100000
SYSCTL_FILEMAX

sed -i "s|^tcp-backlog [[:digit:]]\+|tcp-backlog 65535|" /etc/redis.conf

# enable redis service on reboot
systemctl enable redis

# start service
(service redis status > /dev/null && service redis restart) || service redis start
#!/bin/bash

# make sure the SRC_NODE_VERSION is set
if [[ -z $SRC_NODE_VERSION ]]; then
  echo "You must specify a node version using \$SRC_NODE_VERSION";
else
  # Select node version to install
  curl --silent --location https://rpm.nodesource.com/setup_$SRC_NODE_VERSION.x | bash -
  
  # install via yum
  yum install -y git gcc-c++ make nodejs
fi

# PM2 - install as global
npm install pm2@latest -g
print("THE ULTIMATE BLAND RICE RECIPE GENERATOR")
print("Answer the few questions given below to create a perfect recipe for you")
name = input("What's your name?")
step = input("What's the necessary step required before you start cooking the rice (answer in one word)?")
ratio = input("The ratio of water to rice should be_____for the rice to be cooked perfectly")
utensil = input("What's your prefered utensil for rice cooking?:")
minutes = input("How long should the rice be cooked for?(Answer in minutes)")
serve = input("What would you serve the rice with?")
print(name, "thinks that in order to cook rice you need to first" ,step, "it" ,"You should then add water and rice in the ratio of" ,ratio, "into a", utensil, "and allow it to cook for" ,minutes, "After that you should serve the rice with" ,serve,)
print("You" ,name, "should be prepared to eat alone😂.")
print()
print("Thank you for rolling out with this programme😁")
import './style.css';
import React, { useState } from 'react';
import Nav from './components/nav/Nav';
import Filter01 from './components/Filters/Filter01/Filter01';
import Filter02 from './components/Filters/Filter02/Filter02';
import DateFilter from './components/Filters/datafilter/DateFilter';
import Filter04 from './components/Filters/Filter04/Filter04';
import Filter05 from './components/Filters/Filter05/Filter05';
import MyTable from './components/chart/MyTable';

function App() {
  const [filter01, setFilter01] = useState('');
  const [filtersSubmitted, setFiltersSubmitted] = useState(false);

  const handleFilterSubmit = () => {
    setFiltersSubmitted(true);
  };

  return (
    <>
      {/* ... (other components remain unchanged) */}
      <Filter01 setFilterValue={(value) => setFilter01(value)} />
      <button onClick={handleFilterSubmit}>Submit Filters</button>
      <MyTable filterValues={{ filter01 }} filtersSubmitted={filtersSubmitted} />
      
    </>
  );
}

export default App;
/**Reference and Control the conveyor item from the script*/
Conveyor conveyor = Model.find("DP23").as(Conveyor.DecisionPoint).conveyor;
Object enteringItem = Model.find("DP23").as(Conveyor.DecisionPoint).activeItem;
Conveyor.Item conveyorItem = conveyor.itemData[enteringItem];
applicationcommand("showconsole", CONSOLE_OUTPUT);
clearconsole;

// conveyor item properites
print(conveyorItem.entrySpace);
print(conveyorItem.movingSpace);
print(conveyorItem.currentDistance);
print(conveyorItem.destination);
print(conveyorItem.position);
print(conveyorItem.totalDistance);

// conveyor item methods=
conveyorItem.turn();
conveyorItem.stop();
conveyorItem.resume();
print("""Hello! Welcome and for today , we would like to know you more...if you don't mind that is😁""")
mind = input("Do you mind?")
name = input("What's your name?:")
print("Wow! That's a cool name you got there!")
eyecolour = input("What's your eye colour?:")
print("Too common😂")
food = input("What's your favourite meal?:")
print()
print("So you're" , name, "with " , eyecolour, "eyes and you're probably hungry for" , food, "right now." )
input("Is that correct?")
print("")
print("Thank you for your time and have a nice day!")
>>> import datetime
>>> datetime.date(2010, 6, 16).strftime("%V")
'24'
output = [json.dumps(json_output, indent=2)]
def rss_parser(
        xml: str,
        limit: Optional[int] = None,
        json_format: bool = False,
) -> str:
class Msg
{
    public void Show(String name)
    {
        ;;;;; // 100 line code

        synchronized(this)
        {
            for(int i = 1; i <= 3; i++)
            {
                System.out.println("how are you " + name);
            }
        }
        ;;;;; // 100 line code
    }
}

class Ourthread extends Thread
{
    Msg m;
    String name;

    Ourthread(Msg m, String name)
    {
        this.m = m;
        this.name = name;
    }

    public void run()
    {
        m.Show(name);
    }
}

class Death
{
    public static void main(String[] args)
    {
        Msg msg = new Msg(); // Create an instance of the Msg class
        Ourthread t1 = new Ourthread(msg, "om");
        Ourthread t2 = new Ourthread(msg, "harry");

        t1.start();
        t2.start();
    }
}
import React, { useEffect, useState } from 'react';

const MyTable = ({ intradata }) => {
  const [data, setData] = useState(null);
  const [selectedGroup, setSelectedGroup] = useState('summary');
  const [loading, setLoading] = useState(true);
  const [error, setError] = useState(null);
  const [columns, setColumns] = useState([]);

  useEffect(() => {
    const fetchData = async () => {
      try {
        const response = await fetch('http://5.34.198.87:8000/api/options/intradatacols');

        if (!response.ok) {
          throw new Error(`HTTP error! Status: ${response.status}`);
        }

        const contentType = response.headers.get('content-type');
        if (!contentType || !contentType.includes('application/json')) {
          throw new Error('Invalid content type. Expected JSON.');
        }

        const jsonData = await response.json();
        console.log('API Response for intradatacols:', jsonData);
        setData(jsonData);

        const validGroups = Object.keys(jsonData.groups);
        const initialColumns = jsonData.groupscolumn[selectedGroup] || [];
        setColumns(initialColumns);

        if (!validGroups.includes(selectedGroup)) {
          console.error(`Invalid selectedGroup: ${selectedGroup}`);
          return;
        }
      } catch (error) {
        console.error('Error fetching data:', error);
        setError(error.message || 'An error occurred while fetching data.');
      } finally {
        setLoading(false);
      }
    };

    fetchData();
  }, [selectedGroup]);

  useEffect(() => {
    console.log('intradata:', intradata);
    console.log('columns:', columns);
    console.log('data:', data);
  }, [intradata, columns, data]);

  if (loading) {
    return <div>Loading...</div>;
  }

  if (error) {
    return <div>Error: {error}</div>;
  }

  if (!data || !data.groups || !data.groupscolumn) {
    return <div>No data available</div>;
  }

  const validGroups = Object.keys(data.groups);

  if (!validGroups.includes(selectedGroup)) {
    console.error(`Invalid selectedGroup: ${selectedGroup}`);
    return <div>No data available</div>;
  }

  return (
    <div className="container mt-4">
      <div className="btn-group mb-3">
        {validGroups.map((groupKey) => (
          <button
            key={groupKey}
            type="button"
            className={`btn ${selectedGroup === groupKey ? 'btn-primary' : 'btn-secondary'}`}
            onClick={() => setSelectedGroup(groupKey)}
          >
            {data.groups[groupKey]}
          </button>
        ))}
      </div>

      <div className="table-container" style={{ overflowY: 'auto', maxHeight: '500px' }}>
        <table className="table table-bordered table-striped">
          <thead className="thead-dark">
            <tr>
              {columns.map((column, index) => (
                <th key={index}>{data.fields[column]}</th>
              ))}
            </tr>
          </thead>
          <tbody>
            {intradata && Array.isArray(intradata) ? (
              intradata.map((item, itemIndex) => (
                <tr key={itemIndex}>
                  {columns.map((column, columnIndex) => (
                    <td key={columnIndex}>{item[column]}</td>
                  ))}
                </tr>
              ))
            ) : (
              <tr>
                <td colSpan={columns.length}>{intradata === null ? 'Loading...' : 'No data available'}</td>
              </tr>
            )}
          </tbody>
        </table>
      </div>
    </div>
  );
};

export default MyTable;




import React, { useEffect, useState } from 'react';
import MyTable from './MyTable';

const DataTableFetcher = () => {
  const [intradata, setIntradata] = useState(null);
  const [loading, setLoading] = useState(true);
  const [error, setError] = useState(null);

  useEffect(() => {
    const fetchData = async () => {
      try {
        const response = await fetch('http://5.34.198.87:8000/api/options/intradata');

        if (!response.ok) {
          throw new Error(`HTTP error! Status: ${response.status}`);
        }

        const contentType = response.headers.get('content-type');
        if (!contentType || !contentType.includes('application/json')) {
          throw new Error('Invalid content type. Expected JSON.');
        }

        const jsonData = await response.json();
        console.log('API Response:', jsonData);
        setIntradata(jsonData.data);
      } catch (error) {
        console.error('Error fetching intradata:', error);
        setError(error.message || 'An error occurred while fetching intradata.');
      } finally {
        setLoading(false);
      }
    };

    fetchData();
  }, []);

  if (loading) {
    return <div>Loading...</div>;
  }

  if (error) {
    return <div>Error: {error}</div>;
  }

  return <MyTable intradata={intradata} />;
};

export default DataTableFetcher;
curl --request POST \
  --url https://{{your-gtm-ss-url}}/com.snowplowanalytics.snowplow/enriched \
  --header 'Content-Type: application/json' \
  --header 'x-gtm-server-preview: {{your-preview-header}}' \
  --data '{
  "app_id": "example-website",
  "platform": "web",
  "etl_tstamp": "2021-11-26T00:01:25.292Z",
  "collector_tstamp": "2021-11-20T00:02:05Z",
  "dvce_created_tstamp": "2021-11-20T00:03:57.885Z",
  "event": "unstruct",
  "event_id": "c6ef3124-b53a-4b13-a233-0088f79dcbcb",
  "txn_id": null,
  "name_tracker": "sp1",
  "v_tracker": "js-3.1.6",
  "v_collector": "ssc-2.3.0-stdout$",
  "v_etl": "snowplow-micro-1.1.2-common-2.0.1",
  "user_id": "jon.doe@email.com",
  "user_ipaddress": "92.231.54.234",
  "user_fingerprint": null,
  "domain_userid": "de81d764-990c-4fdc-a37e-adf526909ea6",
  "domain_sessionidx": 3,
  "network_userid": "ecdff4d0-9175-40ac-a8bb-325c49733607",
  "geo_country": "US",
  "geo_region": "CA",
  "geo_city": "San Francisco",
  "geo_zipcode": "94109",
  "geo_latitude": 37.443604,
  "geo_longitude": -122.4124,
  "geo_location": "37.443604,-122.4124",
  "geo_region_name": "San Francisco",
  "ip_isp": "AT&T",
  "ip_organization": "AT&T",
  "ip_domain": "att.com",
  "ip_netspeed": "Cable/DSL",
  "page_url": "https://snowplowanalytics.com/use-cases/",
  "page_title": "Snowplow Analytics",
  "page_referrer": null,
  "page_urlscheme": "https",
  "page_urlhost": "snowplowanalytics.com",
  "page_urlport": 443,
  "page_urlpath": "/use-cases/",
  "page_urlquery": "",
  "page_urlfragment": "",
  "refr_urlscheme": null,
  "refr_urlhost": null,
  "refr_urlport": null,
  "refr_urlpath": null,
  "refr_urlquery": null,
  "refr_urlfragment": null,
  "refr_medium": null,
  "refr_source": null,
  "refr_term": null,
  "mkt_medium": null,
  "mkt_source": null,
  "mkt_term": null,
  "mkt_content": null,
  "mkt_campaign": null,
  "contexts_org_w3_performance_timing_1": [
    {
      "navigationStart": 1415358089861,
      "unloadEventStart": 1415358090270,
      "unloadEventEnd": 1415358090287,
      "redirectStart": 0,
      "redirectEnd": 0,
      "fetchStart": 1415358089870,
      "domainLookupStart": 1415358090102,
      "domainLookupEnd": 1415358090102,
      "connectStart": 1415358090103,
      "connectEnd": 1415358090183,
      "requestStart": 1415358090183,
      "responseStart": 1415358090265,
      "responseEnd": 1415358090265,
      "domLoading": 1415358090270,
      "domInteractive": 1415358090886,
      "domContentLoadedEventStart": 1415358090968,
      "domContentLoadedEventEnd": 1415358091309,
      "domComplete": 0,
      "loadEventStart": 0,
      "loadEventEnd": 0
    }
  ],
  "se_category": null,
  "se_action": null,
  "se_label": null,
  "se_property": null,
  "se_value": null,
  "unstruct_event_com_snowplowanalytics_snowplow_link_click_1": {
    "targetUrl": "http://www.example.com",
    "elementClasses": [
      "foreground"
    ],
    "elementId": "exampleLink"
  },
  "tr_orderid": null,
  "tr_affiliation": null,
  "tr_total": null,
  "tr_tax": null,
  "tr_shipping": null,
  "tr_city": null,
  "tr_state": null,
  "tr_country": null,
  "ti_orderid": null,
  "ti_sku": null,
  "ti_name": null,
  "ti_category": null,
  "ti_price": null,
  "ti_quantity": null,
  "pp_xoffset_min": null,
  "pp_xoffset_max": null,
  "pp_yoffset_min": null,
  "pp_yoffset_max": null,
  "useragent": null,
  "br_name": null,
  "br_family": null,
  "br_version": null,
  "br_type": null,
  "br_renderengine": null,
  "br_lang": null,
  "br_features_pdf": true,
  "br_features_flash": false,
  "br_features_java": null,
  "br_features_director": null,
  "br_features_quicktime": null,
  "br_features_realplayer": null,
  "br_features_windowsmedia": null,
  "br_features_gears": null,
  "br_features_silverlight": null,
  "br_cookies": null,
  "br_colordepth": null,
  "br_viewwidth": null,
  "br_viewheight": null,
  "os_name": null,
  "os_family": null,
  "os_manufacturer": null,
  "os_timezone": null,
  "dvce_type": null,
  "dvce_ismobile": null,
  "dvce_screenwidth": null,
  "dvce_screenheight": null,
  "doc_charset": null,
  "doc_width": null,
  "doc_height": null,
  "tr_currency": null,
  "tr_total_base": null,
  "tr_tax_base": null,
  "tr_shipping_base": null,
  "ti_currency": null,
  "ti_price_base": null,
  "base_currency": null,
  "geo_timezone": null,
  "mkt_clickid": null,
  "mkt_network": null,
  "etl_tags": null,
  "dvce_sent_tstamp": null,
  "refr_domain_userid": null,
  "refr_dvce_tstamp": null,
  "contexts_com_snowplowanalytics_snowplow_ua_parser_context_1": [
    {
      "useragentFamily": "IE",
      "useragentMajor": "7",
      "useragentMinor": "0",
      "useragentPatch": null,
      "useragentVersion": "IE 7.0",
      "osFamily": "Windows XP",
      "osMajor": null,
      "osMinor": null,
      "osPatch": null,
      "osPatchMinor": null,
      "osVersion": "Windows XP",
      "deviceFamily": "Other"
    }
  ],
  "domain_sessionid": "2b15e5c8-d3b1-11e4-b9d6-1681e6b88ec1",
  "derived_tstamp": "2021-11-20T00:03:57.886Z",
  "event_vendor": "com.snowplowanalytics.snowplow",
  "event_name": "link_click",
  "event_format": "jsonschema",
  "event_version": "1-0-0",
  "event_fingerprint": "e3dbfa9cca0412c3d4052863cefb547f",
  "true_tstamp": "2021-11-20T00:03:57.886Z"
}'
import React, { useEffect, useState } from 'react';

const MyTable = () => {
  const [data, setData] = useState(null);
  const [selectedGroup, setSelectedGroup] = useState('summary');
  const [loading, setLoading] = useState(true);
  const [error, setError] = useState(null);

  useEffect(() => {
    const fetchData = async () => {
      try {
        const response = await fetch('http://5.34.198.87:8000/api/options/intradatacols');

        if (!response.ok) {
          throw new Error(`HTTP error! Status: ${response.status}`);
        }

        const contentType = response.headers.get('content-type');
        if (!contentType || !contentType.includes('application/json')) {
          throw new Error('Invalid content type. Expected JSON.');
        }

        const jsonData = await response.json();
        console.log(jsonData);
        setData(jsonData);
      } catch (error) {
        console.error('Error fetching data:', error);
        setError(error.message || 'An error occurred while fetching data.');
      } finally {
        setLoading(false);
      }
    };

    fetchData();
  }, []);

  if (loading) {
    return <div>Loading...</div>;
  }

  if (error) {
    return <div>Error: {error}</div>;
  }

  if (!data || !data.groups || !data.groupscolumn) {
    return <div>No data available</div>;
  }

  const validGroups = Object.keys(data.groups);

  if (!validGroups.includes(selectedGroup)) {
    console.error(`Invalid selectedGroup: ${selectedGroup}`);
    return <div>No data available</div>;
  }

  const columns = data.groupscolumn[selectedGroup] || [];
  const groupData = data[selectedGroup] || {};

  return (
    <div className="container mt-4">
      <div className="btn-group mb-3">
        {validGroups.map((groupKey) => (
          <button
            key={groupKey}
            type="button"
            className={`btn ${selectedGroup === groupKey ? 'btn-primary' : 'btn-secondary'}`}
            onClick={() => setSelectedGroup(groupKey)}
          >
            {data.groups[groupKey]}
          </button>
        ))}
      </div>

      <div className="table-container" style={{ overflowY: 'auto', maxHeight: '500px' }}>
        <table className="table table-bordered table-striped">
          {/* Table headers */}
          <thead className="thead-dark">
            <tr>
              {columns.map((column, index) => (
                <th key={index}>{data.fields[column]}</th>
              ))}
            </tr>
          </thead>
          {/* Table body */}
          <tbody>
            {Object.values(groupData).map((group, groupIndex) => (
              <tr key={groupIndex}>
                {Array.isArray(group) ? (
                  group.map((item, itemIndex) => (
                    <td key={itemIndex}>{item}</td>
                  ))
                ) : (
                  <td>{group}</td>
                )}
              </tr>
            ))}
          </tbody>
        </table>
      </div>
    </div>
  );
};

export default MyTable;
// index.js
const express = require("express");
const bodyParser = require("body-parser");
var mysql = require("mysql");

const app = express();
const port = 3000;

app.use(bodyParser.json());

var con = mysql.createConnection({
  host: "localhost",
  user: "jevin",
  password: "2090",
  // database: "testDB",
});

con.connect(function (err) {
  if (err) {
    console.error("Error connecting to MySQL:", err);
    return;
  } else {
    console.log("Connected!");
    con.query("CREATE DATABASE IF NOT EXISTS todolist", function (err, result) {
      if (err) throw err;
      con.query("USE todolist", function (err, result) {
        if (err) throw err;
      });
      console.log("Database created");
    });
  }
});
// const notes =  getNotes()
// console.log(notes);

app.get('/tasks', (req, res) => {
  // Retrieve tasks from the database
  con.query('SELECT * FROM tasks', (err, results) => {
    if (err) {
      console.error('Error fetching tasks:', err);
      res.status(500).json({ error: 'Internal Server Error' });
    } else {
      res.json(results);
    }
  });
});

app.post('/tasks', (req, res) => {
  const { title, description } = req.body;

  // Insert a new task into the database
  con.query(`INSERT INTO tasks (title, description) VALUES (?, ?)`, [title, description], (err, results) => {
    if (err) {
      console.error('Error adding task:', err);
      res.status(500).json({ error: 'Internal Server Error' });
    } else {
      res.json({ id: results.insertId, title, description });
    }
  });
});

app.put('/tasks/:id', (req, res) => {
  const taskId = req.params.id;
  const { title, description } = req.body;

  // Update the task in the database
  con.query('UPDATE tasks SET title = ?, description = ? WHERE id = ?', [title, description, taskId], (err, results) => {
    if (err) {
      console.error('Error updating task:', err);
      res.status(500).json({ error: 'Internal Server Error' });
    } else if (results.affectedRows === 0) {
      res.status(404).json({ error: 'Task not found' });
    } else {
      res.json({ id: taskId, title, description });
    }
  });
});

// // Start the server
app.listen(port, () => {
  console.log(`Server is running on http://localhost:${port}`);
});
#include <stdio.h>

int main()
{
    int i, j; 
    for(i = 1; i <= 3; i++)
    {
        for(j = 1; j <= i; j++)
        {
            printf("%d", j); 
        }
        printf("\n"); 
    }

    return 0;
}
#include <stdio.h>
#include <conio.h>
#include <dos.h>

int main()
{
    clrscr();
    gotoxy(30, 10);
    
    printf("▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓");
    
    gotoxy(30, 14);
    
    printf("▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓");
    
    gotoxy(35, 12 );
    printf("Hello World");
    
    getch();
    return 0;
}
#include<stdio.h>
void main()
{
    int a[10][10],b[10][10],c[10][10],r1,c1,r2,c2,r3,c3,i,j,k;
    printf("enter no.of row and colums of matrix a\n");
    scanf("%d%d",&r1,&c1);
    printf("enter no.of row and colums of matrix b\n");
    scanf("%d%d",&r2,&c2);
    if(r1==c2&&c1==r2)
    {
    printf("enter elements of 1st matrix\n");
    for(i=0;i<r1;i++)
    {
    for(j=0;j<c1;j++)
    {
    scanf("%d",&a[i][j]);
    }
    }
    printf("enter elements of 2nd matrix\n");
    for(i=0;i<r2;i++)
    {
    for(j=0;j<c2;j++)
    {
    scanf("%d",&b[i][j]);
    }
    }
    r3=r1;
    c3=c2;
    for(i=0;i<r3;i++)
    {
        for(j=0;j<c3;j++)
        {
            c[i][j]=0;
            for (k=0;k<r3;k++)
            {
                c[i][j]=c[i][j]+a[i][k]*b[k][j];
            }
        }
    }
    for(i=0;i<r3;i++)
    {
    for(j=0;j<c3;j++)
    {
    printf("%d ",c[i][j]);
    }
    printf("\n");
    }
    
}
}
let i = 1;

let num = 5;

do {
  console.log(i);
  i++;
  
} while 
  (i <= num);
public static string AsTimeAgo(this DateTime dateTime)
{
  TimeSpan timeSpan = DateTime.Now.Subtract(dateTime);

  return timeSpan.TotalSeconds switch
  {
    <= 60 => $"{timeSpan.Seconds} seconds ago",

    _ => timeSpan.TotalMinutes switch
    {
      <= 1 => "about a minute ago",
      < 60 => $"about {timeSpan.Minutes} minutes ago",
      _ => timeSpan.TotalHours switch
      {
        <= 1 => "about an hour ago",
        < 24 => $"about {timeSpan.Hours} hours ago",
        _ => timeSpan.TotalDays switch
        {
          <= 1 => "yesterday",
          <= 30 => $"about {timeSpan.Days} days ago",

          <= 60 => "about a month ago",
          < 365 => $"about {timeSpan.Days / 30} months ago",

          <= 365 * 2 => "about a year ago",
          _ => $"about {timeSpan.Days / 365} years ago"
        }
      }
    }
  };
}
#include<stdio.h>

int main(){

    int num,i,count,n;
    printf("Enter max range: ");
    scanf("%d",&n);

    for(num = 1;num<=n;num++){

         count = 0;

         for(i=2;i<=num/2;i++){
             if(num%i==0){
                 count++;
                 break;
             }
        }
        
         if(count==0 && num!= 1)
             printf("%d ",num);
    }
  
   return 0;
}
Conveyor.DecisionPoint current = ownerobject(c);
Object item = param(1);
Conveyor conveyor = param(2);
Conveyor.Item conveyorItem = conveyor.itemData[item];
/**send Item*/

// 1. send item by percentage
if(bernoulli(30, 1, 0)){
	Conveyor.sendItem(item, current.outObjects[1]);
}


// 2. send item by item type (label)
Array dpArray = current.outObjects.toArray();
//int itemType = item.Type;
for (int index = 1; index <= dpArray.length; index++){
	if(item.Type == index){
		Conveyor.sendItem(item, current.outObjects[index]);
	}
}

// 3. same as previous but shorter

Conveyor.sendItem(item, current.outObjects[item.Type]);
#include<stdio.h>
void main()
{
   int n,i,count=0;
   scanf("%d",&n);
   for(i=2;i<=n/2;i++)
   {
       if (n%i==0)
       {
           count=1;
           break;
           
       }
   }
   if(count==0)
   {
       printf("prime");
   }
   else 
   {
       printf("non prime");
   }
}
jQuery(document).ready(function($) {
  var fieldSelector = '.fn_froala_front textarea';
  var froalaActivationKey = 'vYA6mA5C4C4I4I4B9A8eMRPYf1h1REb1BGQOQIc2CDBREJImA11C8D6E6B1G4H3F2H3A8=='; 

  if (typeof FroalaEditor !== 'undefined') {
    $(fieldSelector).each(function() {
      new FroalaEditor(this, {
        // Add your Froala editor options here
        key: froalaActivationKey,
        zIndex: 99999,
        attribution: false,
        charCounterCount: false,
        toolbarInline: true,
        placeholderText: 'Type something beautiful...',
        toolbarVisibleWithoutSelection: true,
        quickInsertEnabled: false,
        dragInline: false,
        imageUploadURL: 'https://forestnation.com/upload.php',
        imageEditButtons: ['imageReplace', 'imageAlign', 'imageDisplay', 'imageStyle', 'imageRemove'],
        imageInsertButtons: ['imageBack', '|', 'imageUpload', 'imageByURL'],
        imageStyles: {
          fnFrImgShadow: 'Shadow',
          fnFrImgBackBlur: 'Background Blur'
        },
        fontSizeDefaultSelection: '20',
        fontFamily: {
          "Roboto,sans-serif": 'Roboto',
          "Oswald,sans-serif": 'Oswald',
          "Montserrat,sans-serif": 'Montserrat',
          "'Open Sans Condensed',sans-serif": 'Open Sans',
          'Arial,Helvetica,sans-serif': 'Arial',
          'Georgia,serif': 'Georgia', 'Impact,Charcoal,sans-serif': 'Impact',
          'Tahoma,Geneva,sans-serif': 'Tahoma',
          "'Times New Roman',Times,serif": 'Times New Roman',
          'Verdana,Geneva,sans-serif': 'Verdana'
        },
        fontFamilySelection: true,
        linkInsertButtons: ['linkBack'],
        paragraphStyles: {
          fnFrPclasskaraoke1: 'karaoke 1',
          fnFrPclassGreenBack: 'Green Back',
          fnFrPclassWhiteBack: 'White Back',
          fnFrPclassBlackBack: 'Black Back',
          fnFrPclassTransparency: 'Transparent Back'
        },
        toolbarButtons: {
          'moreText': {
            'buttons': ['align', 'fontSize', 'textColor', 'backgroundColor', 'bold', 'italic', 'underline', 'fontFamily'],
            'buttonsVisible': 4
          },
          'moreRich': {
            'buttons': ['insertImage', 'insertLink', 'emoticons', 'paragraphStyle'],
            'buttonsVisible': 0
          },
        }
      });
    });

    if (typeof acf !== 'undefined') {
      acf.addAction('append', function($el) {
        $el.find(fieldSelector).each(function() {
          new FroalaEditor(this, {
            // Add your Froala editor options here
            key: froalaActivationKey,
            zIndex: 99999,
            attribution: false,
            charCounterCount: false,
            toolbarInline: false,
            placeholderText: 'Type something beautiful...',
            toolbarVisibleWithoutSelection: true,
            quickInsertEnabled: false,
            dragInline: false,
            imageUploadURL: 'https://forestnation.com/upload.php',
            imageEditButtons: ['imageReplace', 'imageAlign', 'imageDisplay', 'imageRemove'],
            imageInsertButtons: ['imageBack', '|', 'imageUpload', 'imageByURL'],
            fontSizeDefaultSelection: '20',
            linkInsertButtons: ['linkBack'],
            paragraphStyles: {
              fnFrPclasskaraoke1: 'karaoke 1',
              fnFrPclassGreenBack: 'Green Back',
              fnFrPclassWhiteBack: 'White Back',
              fnFrPclassBlackBack: 'Black Back',
              fnFrPclassTransparency: 'Transparent Back'
            },
            toolbarButtons: {
              'moreText': {
                'buttons': ['align', 'fontSize', 'textColor', 'backgroundColor', 'bold', 'italic', 'underline', 'fontFamily'],
                'buttonsVisible': 4
              },
              'moreRich': {
                'buttons': ['insertImage', 'insertLink', 'emoticons', 'paragraphStyle'],
                'buttonsVisible': 0
              },
            }
          });
        });
      });
    }
  }

  // Add the new code here
  // Function to convert RGB to hex within the editor content
  function rgbToHex(rgbColor) {
    const rgb = rgbColor.match(/\d+/g);
    const hex = rgb.map(x => parseInt(x).toString(16).padStart(2, '0')).join('');
    return `#${hex}`;
  }
  
  // Function to convert RGB to hex within the editor content
function convertRgbToHex(editor) {
  const elements = editor.$el[0].querySelectorAll('[style*="rgb("]');

  elements.forEach((element) => {
      const style = element.getAttribute('style');
      const updatedStyle = style.replace(/rgb\(\d+,\s?\d+,\s?\d+\)/g, (rgbColor) => rgbToHex(rgbColor));
      element.setAttribute('style', updatedStyle);
  });

  // Update the editor's content state
  editor.html.set(editor.$el[0].innerHTML);
}


  // Add the event listener to all submit buttons
  const submitButtons = document.querySelectorAll('.acf-button.froalaconvertRgbToHex');

  submitButtons.forEach((button) => {
    button.addEventListener('click', () => {
      // Loop through all Froala editor instances on the page
      FroalaEditor.INSTANCES.forEach((editorInstance) => {
        // Convert RGB to hex for each instance
        convertRgbToHex(editorInstance);
      });
    });
  });
});
#include <stdio.h>
int binary(int);
int main() {
   int num,bin;
   printf("enter a decimal number:");
   scanf("%d",&num);
   bin=binary(num);
   printf("the binary rquivalent of %d %d",num,bin);
   
}
int binary(int num)
{
    if(num==0)
    {
        return 0;
    
    }
    else 
    {
        return (num%2)+10*binary(num/2);
    }
}
function search() {
  matchingMembers.value = props.story.content.members.filter((member) => {
    return (
      member.tags.some((tag) => {
        return tag.text.toLowerCase().includes(query.value.toLowerCase());
      }) ||
      member.name.toLowerCase().includes(query.value.toLowerCase()) ||
      member.role.toLowerCase().includes(query.value.toLowerCase()) ||
      member.description.toLowerCase().includes(query.value.toLowerCase()) ||
      member.desk.toLowerCase().includes(query.value.toLowerCase())
    );
  });
}
https://filetransfer.io/data-package/7DTAA9aK#link

https://filetransfer.io/data-package/No4U22go#link
https://filetransfer.io/data-package/flYoUGD7#link 

https://community.dynamics.com/forums/thread/details/?threadid=58f9c824-d2d0-4f21-b47b-28550390329c

https://www.dynamicsuser.net/t/how-to-create-purchase-agreement-via-job/60843/2

https://filetransfer.io/data-package/syh2BNQi#link

"AccountNumber": "PNJ01",
   "D_VALN_AS_OF": "2022-06-30 00:00:00.0",
     "T_DTL_DESC": "EWTP ARABIA TECHONLOGY INNOVATION FUND ILP",
       "N-INV-SUB-CATG": "Partnerships",
         "Asset Super Category Name": "Venture Capital and Partnerships",
           "A_ADJ_BAS_BSE": "47947573",
             "A_UNRL_MKT_GNLS": "50275681",
               "ProprietarySymbol": "993FD3998",
              
              
              86e7ad1e-c84f-438a-a309-cd1216565dab 

"Success": "True",
    "Error": "",
    "results": [
        {
            "ID": 88,
            "LASTNAME": "Duhaish                                                         ",
            "FIRSTNAME": "Hamad                                                           ",
            "MIDNAME": "                                ",
            "SSNO": "27079        ",
            "DAYNAME": "Sunday         ",
            "DAYNUM": 23,
            "MONTHNAME": "June           ",
            "MONTHNUM": 6,
            "QUARTER": 2,
            "YEAR": 2024,
            "DATE": "2024-06-23",
            "ATTENDANCESTATUS": 1,
            "TIMEIN": "09:02:32",
            "DATETIMEIN": "2024-06-23 09:02:32.0",
            "TIMEOUT": "16:48:18",
            "DATETIMEOUT": "2024-06-23 16:48:18.0",
            "NUMBEROFTIMEIN": 2,
            "NUMBEROFTIMEOUT": 1,
            "WEEKEND": 0,
            "EARLYACCESSIN": 0,
            "EARLYACCESSINHOURS": 0.00,
            "LATEACCESSIN": 0,
            "LATEACCESSOUT": 0,
            "LATEACCESSOUTHOURS": 0.00,
            "EARLYACCESSOUT": 0,
            "TOTALHOURS": 7.77,
            "ACTUALTOTALWORKINGHOURS": 7.77,
            "RECID": null
        },
        {
            "ID": 88,
            "LASTNAME": "Duhaish                                                         ",
            "FIRSTNAME": "Hamad    


https://filetransfer.io/data-package/QFOWGJiY#link
[3:31 PM] Ahmed Saadeldin
IBAN = SA0380000000608010167519
 
[3:31 PM] Ahmed Saadeldin
Account Num = 000000608010167519
 
[3:31 PM] Ahmed Saadeldin
SABBSARI 
 
https://filetransfer.io/data-package/e6Y8IQRT#link
https://filetransfer.io/data-package/n9iLVidY#link
https://filetransfer.io/data-package/yzmQNeGK#link
https://filetransfer.io/data-package/NuQIKmYd#link
https://usnconeboxax1aos.cloud.onebox.dynamics.com/api/services/NW_AttachementServiceGroup/NW_AttatchementService/getAttachment
?cmp=shc&mi=sysclassrunner&cls=NW_UpdateVendTrans
public void processReport()
    {
        NW_GeneralContract              contract;
        PurchTable                      PurchTable;
        PurchLine                       PurchLine;
        //LOGISTICSELECTRONICADDRESS      LOGISTICSELECTRONICADDRESS;
        VendTable                       VendTable;
        DirPartyTable                   DirPartyTable;
        PurchTotals                 PurchTotals;
        HcmWorker                   HcmWorker;
        //DLVMODE DLVMODE;
        //PURCHREQTABLE PURCHREQTABLE;
        //DlvTerm                     DlvTerm;
        //VENDPAYMMODETABLE VENDPAYMMODETABLE;
        //PAYMTERM PAYMTERM;
        //PURCHRFQCASETABLE PURCHRFQCASETABLE;
        //PURCHREQLINE PURCHREQLINE,PURCHREQLINESelected;
        //LOGISTICSPOSTALADDRESS LOGISTICSPOSTALADDRESS;
        //VendPurchOrderJour VendPurchOrderJour;
        //LOGISTICSLOCATION LOGISTICSLOCATION;
        //DIRPARTYLOCATION DIRPARTYLOCATION;
        //TaxOnItem TaxOnItem;
        //TAXDATA TAXDATA;
        contract = this.parmDataContract() as NW_GeneralContract;
    
        select PurchTable
           where PurchTable.RecId == contract.parmRecordId();
       
        while select PurchLine where PurchLine.PurchId == PurchTable.PurchId
        {   
            PurchTableTmp.clear();

            PurchTableTmp.PurchId = PurchTable.PurchId;
            PurchTableTmp.DeliveryDate = PurchTable.DeliveryDate;
            PurchTableTmp.PurchName = PurchTable.PurchName;
            PurchTableTmp.Payment = PurchTable.Payment;
            PurchTableTmp.AdditionalNotes = PurchTable.AdditionalNotes;

            PurchTableTmp.PURCHQTY = PurchLine.PURCHQTY;
            PurchTableTmp.PURCHPRICE = PurchLine.PURCHPRICE;
            PurchTableTmp.LINEPERCENT = PurchLine.LINEPERCENT;
            PurchTableTmp.PurchUnit = PurchLine.PurchUnit;
            PurchTableTmp.LineAmount = PurchLine.LineAmount;
            PurchTableTmp.NameDescription = PurchLine.itemName();

            HcmWorker = HcmWorker::find(PurchTable.Requester);
            PurchTableTmp.Requester = HcmWorker.name();
            PurchTableTmp.RequesterAdd = HcmWorker.primaryAddress();
            PurchTableTmp.RequesterPhone = HcmWorker.phone();
            PurchTableTmp.RequesterDep = PurchTable.DepartmentName();

            VendTable = VendTable::find(PurchTable.OrderAccount);
            PurchTableTmp.Phone = VendTable.phone();
            PurchTableTmp.Email = VendTable.email();
            PurchTableTmp.VendName = PurchTable.PurchName;
            PurchTableTmp.Fax = PurchTable.NonPrimaryVendPhone();
            PurchTableTmp.Termnote = PurchTable.ContcatPersonName();
            PurchTableTmp.Warranty = PurchTable.Warranty;

            PurchTotals = PurchTotals::newPurchTable(PurchTable);
            PurchTotals.calc();

            PurchTableTmp.SubTotal = PurchTotals.purchBalance(); // sub
            PurchTableTmp.Total = PurchTotals.purchTotalAmount(); // total
            PurchTableTmp.Currency = PurchTotals.purchCurrency();
            PurchTableTmp.VAT = PurchTotals.taxTotal();
            PurchTableTmp.TotalTxt = numeralsToTxt(PurchTableTmp.Total);
            PurchTableTmp.SubTotalTxt = numeralsToTxt(PurchTableTmp.SubTotal);
            PurchTableTmp.TaxCode = any2Str((PurchTableTmp.VAT / PurchTableTmp.SubTotal)*100);
            //select PURCHREQTABLE where PURCHREQTABLE.PURCHREQID==PURCHLINE.PURCHREQID;
            //Select  DLVMODE where DLVMODE.CODE==PURCHREQTABLE.DLVMODE;
            //Select  DlvTerm where DlvTerm.Code == PurchTable.DlvTerm;

            //Select  VENDPAYMMODETABLE  where VENDPAYMMODETABLE.PAYMMODE==PURCHREQTABLE.PAYMMODE;
            //Select  PAYMTERM where PAYMTERM.PAYMTERMID==PURCHREQTABLE.PAYMENT;

            PurchTableTmp.DlvModeTxt = DlvMode::find(PurchTable.DlvMode).Txt;
            PurchTableTmp.DlvTermTxt = DlvTerm::find(PurchTable.DlvTerm).Txt;
            //PurchTableTmp.PayModeName=VENDPAYMMODETABLE.NAME;
            PurchTableTmp.PAYTERMNAME = PaymTerm::find(PurchTable.Payment).DESCRIPTION;
            //PurchTableTmp.Termnote=PURCHREQTABLE.termsnote;
            PurchTableTmp.Address = CompanyInfo::find().postalAddress().Address;

            //select PURCHREQLINE where PURCHREQLINE.PURCHREQTABLE == PURCHREQTABLE.RECID;
            //select PURCHRFQCASETABLE where PURCHRFQCASETABLE.RFQCASEID == PURCHREQLINE.PURCHRFQCASEID;

            //PurchTableTmp.RFQCASEID=PURCHRFQCASETABLE.RFQCASEID;

            //select PURCHREQLINESelected where PURCHREQLINESelected.LINEREFID==PURCHLINE.PURCHREQLINEREFID;
            //PurchTableTmp.Name=PURCHREQLINESelected.ITEMIDNONCATALOG;
            //PurchTableTmp.NameDescription=PURCHREQLINESelected.ITEMIDNONCATALOG + ' - ' + PURCHREQLINESelected.NAME;
            //PurchTableTmp.Currency=PURCHREQLINESelected.CurrencyCode;



            //Select  firstonly VendPurchOrderJour   where VendPurchOrderJour.purchid==PURCHTABLE.purchid;
            //PurchTableTmp.DateConf=VendPurchOrderJour.PurchOrderDate;

            //Select LOGISTICSPOSTALADDRESS where PURCHTABLE.DELIVERYPOSTALADDRESS==LOGISTICSPOSTALADDRESS.RECID;

            //PurchTableTmp.ShipingAddress=LOGISTICSPOSTALADDRESS.ADDRESS;

            //select DIRPARTYTABLE where VENDTABLE::find(PurchTable.OrderAccount).PARTY==DIRPARTYTABLE.RECID;
            //select DIRPARTYLOCATION  where DIRPARTYTABLE.RECID == DIRPARTYLOCATION.PARTY;
            //select  LOGISTICSLOCATION where DIRPARTYLOCATION.LOCATION == LOGISTICSLOCATION.RECID;
            //select LOGISTICSPOSTALADDRESS where LOGISTICSPOSTALADDRESS.Location==LOGISTICSLOCATION.RECID;

            //PurchTableTmp.VendAdress=LOGISTICSPOSTALADDRESS.Address;

            //select TaxOnItem where TaxOnItem.TAXITEMGROUP==PURCHLINE.TaxItemGroup;

            //select TAXDATA where TAXDATA.TAXCODE==TAXONITEM.TAXCODE
            //    && TAXDATA.TAXFROMDATE<=PURCHTABLE.ACCOUNTINGDATE && TAXDATA.TAXTODATE>=PURCHTABLE.ACCOUNTINGDATE;

           
            PurchTableTmp.insert();

                
        }


        
    }
System.debug('Password: '+InternalPasswordGenerator.generateNewPassword('userId'));
slider.addEventListener('mousedown', (e) => {
      isDown = true;
      startX = e.pageX - slider.offsetLeft;
      scrollLeft = slider.scrollLeft;
    });
    slider.addEventListener('mouseleave', () => {
      isDown = false;
    });
    slider.addEventListener('mouseup', () => {
      isDown = false;
    });
    slider.addEventListener('mousemove', (e) => {
      if(!isDown) return;
      e.preventDefault();
      const x = e.pageX - slider.offsetLeft;
      const walk = (x - startX) * 1;
      slider.scrollLeft = scrollLeft - walk;
    });
// Avia Layout Builder in custom post types

function avf_alb_supported_post_types_mod( array $supported_post_types )
{
  $supported_post_types[] = 'case_studies';
  return $supported_post_types;
}
add_filter('avf_alb_supported_post_types', 'avf_alb_supported_post_types_mod', 10, 1);

function avf_metabox_layout_post_types_mod( array $supported_post_types )
{
 $supported_post_types[] = 'case_studies';
 return $supported_post_types;
}
add_filter('avf_metabox_layout_post_types', 'avf_metabox_layout_post_types_mod', 10, 1);
class Table 
{
    public synchronized void printtable(int n)
    {
        for(int i=1;i<=10;i++)
        {
            System.out.println(n+"X"+i+"="+(n*i));
        }
    }
}
class Thread1 extends Thread
{
    Table t;
    Thread1(Table t)
    {
        this.t=t;
    }
    public void run()
    {
        t.printtable(5);
    }
}
class Thread2 extends Thread
{
    Table t;
    Thread2(Table t)
    {
        this.t=t;
    }
    public void run()
    {
        t.printtable(7);
    }
}

class D
{
    public static void main(String[] args)
    {
        Table r= new Table();
        
        Thread1 t1= new Thread1(r);
        Thread2 t2= new Thread2(r);
        
        t1.start();
        t2.start();
    }
}
// The following code can provide you a generic way to update a table when you only have the tableId.
public Common findRecord(TableId _tableId, RecId _recId, Boolean _forUpdate = false)
{
    Common      common;
    DictTable   dictTable;
    ;
    dictTable = new DictTable(_tableId);
    common = dictTable.makeRecord();
 
    common.selectForUpdate(_forUpdate);
 
    select common
    where common.RecId == _recId;
 
    return common;
}

// If you want, you can even update fields in this common record. You can Access/edit these fields by using their Name or FieldNum. The method below will update a specific field in a table.

public void updateValue(TableId _tableId, RecId _recId, str _field, AnyType _value)
{
    Common      common;
    Int         fieldId;
    ;
    ttsbegin;
    common = findRecord(_tableId, _recId, true);
    fieldId = fieldname2id(_tableId,_field);
 
    if (fieldId &amp;&amp; _value)
    {
        common.(fieldId) = _value;
        common.update();
    }
    ttscommit;
}
public class NW_ContractRenewalServiceEntity extends common
{
    /// <summary>
    ///
    /// </summary>
    public void postLoad()
    {
        DocuRef     DocuRef;
        DocuValue   DocuValue;
        NW_ContractRequest NW_ContractRequest;
        super();
        changecompany('SHC')
        {
            select DocuRef
                where DocuRef.RefRecId == this.ContractRecId
                && DocuRef.RefTableId == tableNum(NW_ContractRenewalRequest);

            //select DocuValue where DocuValue.RecId == DocuRef.ValueRecId;
            if(DocuRef)
            {
                //DocuRef docuref;
                //ITSGetFileFromDocMgmtInVariousFormats runnable = ITSGetFileFromDocMgmtInVariousFormats::construct();
                //runnable.readfromDocuRefAttachments(docuref);
                //BitMap fileContents =  DocumentManagement::getAttachmentAsContainer(DocuRef);
                //str fileBase64Str = con2base64str(fileContents);
                BinData BinData;
                using(System.IO.Stream fileStream = DocumentManagement::getAttachmentStream(DocuRef))
                {
                    using(System.IO.MemoryStream memoryStream = new System.IO.MemoryStream())
                    {
                        fileStream.CopyTo(memoryStream);
                        this.Attach = System.Convert::ToBase64String(memoryStream.ToArray());
                    }
                }
              // or use this.Attach = DocuRef.getFileContentAsBase64String() insted of the above code from "ElectronicReporting" model
                this.FileName = DocuRef.filename();
                this.FileType = DocuRef.fileType();
            }
        }
    }

}
Run alpine docker gradely

docker build -f build/deploy/Dockerfile -t main-api .

docker run -p 8081:8080 main-api

Execute sql script

docker exec -i gradely-db mysql -u gradely -ptoor main < questions.sql
star

Thu Jan 25 2024 07:44:15 GMT+0000 (Coordinated Universal Time)

@odaat_detailer

star

Thu Jan 25 2024 05:26:08 GMT+0000 (Coordinated Universal Time) https://en.wikipedia.org/wiki/Graph_neural_network

@odaat_detailer

star

Thu Jan 25 2024 05:26:02 GMT+0000 (Coordinated Universal Time) https://en.wikipedia.org/wiki/Graph_neural_network

@odaat_detailer

star

Thu Jan 25 2024 05:02:07 GMT+0000 (Coordinated Universal Time) https://www.nadcab.com/exchange-listing

@ExchangeListing

star

Thu Jan 25 2024 04:26:17 GMT+0000 (Coordinated Universal Time)

@aguest #c#

star

Thu Jan 25 2024 04:09:57 GMT+0000 (Coordinated Universal Time)

@aguest #performance #python

star

Thu Jan 25 2024 04:06:09 GMT+0000 (Coordinated Universal Time)

@aguest #performance #python

star

Wed Jan 24 2024 22:51:04 GMT+0000 (Coordinated Universal Time) https://react.dev/reference/react/useContext

@Z3TACS #react.js #javascript

star

Wed Jan 24 2024 21:07:14 GMT+0000 (Coordinated Universal Time)

@darshcode #sql

star

Wed Jan 24 2024 20:20:43 GMT+0000 (Coordinated Universal Time) https://www.justinsilver.com/technology/node-js-pm2-nginx-redis-centos-7/

@djlsme

star

Wed Jan 24 2024 20:20:39 GMT+0000 (Coordinated Universal Time) https://www.justinsilver.com/technology/node-js-pm2-nginx-redis-centos-7/

@djlsme

star

Wed Jan 24 2024 18:29:32 GMT+0000 (Coordinated Universal Time)

@Realencoder

star

Wed Jan 24 2024 17:14:47 GMT+0000 (Coordinated Universal Time)

@taharjt

star

Wed Jan 24 2024 16:54:56 GMT+0000 (Coordinated Universal Time)

@FlexSimGeek #flexscript #dp #conveyor

star

Wed Jan 24 2024 16:25:12 GMT+0000 (Coordinated Universal Time)

@Realencoder

star

Wed Jan 24 2024 15:24:23 GMT+0000 (Coordinated Universal Time) https://stackoverflow.com/questions/2600775/how-to-get-week-number-in-python

@webdeveloper_

star

Wed Jan 24 2024 15:16:08 GMT+0000 (Coordinated Universal Time) https://anvil.works/forum/t/getting-users-location-from-mobile-device/810/3

@webdeveloper_

star

Wed Jan 24 2024 13:21:14 GMT+0000 (Coordinated Universal Time)

@infinityuz

star

Wed Jan 24 2024 13:20:38 GMT+0000 (Coordinated Universal Time)

@infinityuz

star

Wed Jan 24 2024 11:35:39 GMT+0000 (Coordinated Universal Time)

@E23CSEU1151 #java

star

Wed Jan 24 2024 10:57:44 GMT+0000 (Coordinated Universal Time)

@taharjt

star

Wed Jan 24 2024 10:10:18 GMT+0000 (Coordinated Universal Time) https://docs.snowplow.io/docs/destinations/forwarding-events/google-tag-manager-server-side/snowplow-client-for-gtm-ss/

@thomaslangnau #bash

star

Wed Jan 24 2024 09:36:04 GMT+0000 (Coordinated Universal Time)

@taharjt

star

Wed Jan 24 2024 09:26:19 GMT+0000 (Coordinated Universal Time)

@Jevin2090

star

Wed Jan 24 2024 04:20:38 GMT+0000 (Coordinated Universal Time)

@pvignesh

star

Wed Jan 24 2024 02:46:50 GMT+0000 (Coordinated Universal Time)

@kervinandy123 #c

star

Wed Jan 24 2024 01:09:16 GMT+0000 (Coordinated Universal Time)

@pvignesh

star

Tue Jan 23 2024 22:17:02 GMT+0000 (Coordinated Universal Time)

@Sephjoe

star

Tue Jan 23 2024 21:52:16 GMT+0000 (Coordinated Universal Time)

@Sephjoe

star

Tue Jan 23 2024 18:11:04 GMT+0000 (Coordinated Universal Time)

@abhikash01

star

Tue Jan 23 2024 14:51:23 GMT+0000 (Coordinated Universal Time)

@pvignesh

star

Tue Jan 23 2024 14:34:57 GMT+0000 (Coordinated Universal Time)

@FlexSimGeek #flexscript #dp #conveyor

star

Tue Jan 23 2024 13:52:57 GMT+0000 (Coordinated Universal Time)

@pvignesh

star

Tue Jan 23 2024 13:50:38 GMT+0000 (Coordinated Universal Time)

@FOrestNAtion

star

Tue Jan 23 2024 13:42:53 GMT+0000 (Coordinated Universal Time)

@hardikraja #commandline #git #pdf

star

Tue Jan 23 2024 13:08:33 GMT+0000 (Coordinated Universal Time) undefined

@mdfaizi

star

Tue Jan 23 2024 11:22:58 GMT+0000 (Coordinated Universal Time)

@Paloma #js

star

Tue Jan 23 2024 11:14:10 GMT+0000 (Coordinated Universal Time)

@MinaTimo

star

Tue Jan 23 2024 10:11:55 GMT+0000 (Coordinated Universal Time)

@atsigkas #apex #java

star

Tue Jan 23 2024 10:01:23 GMT+0000 (Coordinated Universal Time)

@Pirizok

star

Tue Jan 23 2024 09:50:46 GMT+0000 (Coordinated Universal Time) https://www.zakmedios.com/

@aman123 ##corporate ##video

star

Tue Jan 23 2024 09:50:08 GMT+0000 (Coordinated Universal Time)

@omnixima #javascript #php

star

Tue Jan 23 2024 09:13:19 GMT+0000 (Coordinated Universal Time)

@E23CSEU1151 #java

star

Tue Jan 23 2024 08:51:31 GMT+0000 (Coordinated Universal Time)

@MinaTimo

star

Tue Jan 23 2024 08:34:39 GMT+0000 (Coordinated Universal Time)

@MinaTimo

star

Tue Jan 23 2024 05:50:15 GMT+0000 (Coordinated Universal Time)

@IfedayoAwe

star

Mon Jan 22 2024 21:11:20 GMT+0000 (Coordinated Universal Time) https://conundrumer.com/facets/

@spekz369

Save snippets that work with our extensions

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