Skip to content

Instantly share code, notes, and snippets.

View zaidmukaddam's full-sized avatar
:shipit:
Focusing

Zaid Mukaddam zaidmukaddam

:shipit:
Focusing
View GitHub Profile
function memoryUsed() {
gc();
const mbUsed = process.memoryUsage().heapTotal / 1024 / 1024;
return mbUsed;
}
function getRandomString() {
// stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript
return (
Math.random().toString(36).substring(2, 15) +
# 3 Digit Karprekar's Number
number = int(input("Enter a number: "))
num = 0
while number != 495:
num_arr = list(str(number))
num_arr.sort()
num1 = int(''.join(num_arr))
package main
import (
"fmt"
)
type employeee struct {
ID int
designation string
yearOfBirth int
import cv2
import pytesseract
import numpy as np
from PIL import ImageGrab
import time
pytesseract.pytesseract.tesseract_cmd = 'C:\\Program Files\\Tesseract-OCR\\tesseract.exe'
img = cv2.imread('sample.png')
img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
pytesseract
type BubbleSort<
A extends any[], Curr extends number = A["length"]
> = Curr extends 1
? A
: A extends [infer F, infer S, ...infer Rest]
? BubbleSort<
[
...(M.Comparator<M.Num<F>, M.Num<S>> extends true
? [S, ...BubbleSort<[F, ...Rest], M.Sub<Curr, 1>>]
: [F, ...BubbleSort<[S, ...Rest], M.Sub<Curr, 1>>])
day outlook temp humidity wind play
D1 Sunny Hot High Weak No
D2 Sunny Hot High Strong No
D3 Overcast Hot High Weak Yes
D4 Rain Mild High Weak Yes
D5 Rain Cool Normal Weak Yes
D6 Rain Cool Normal Strong No
D7 Overcast Cool Normal Strong Yes
D8 Sunny Mild High Weak No
D9 Sunny Cool Normal Weak Yes
We can't make this file beautiful and searchable because it's too large.
Sentence,Label
,1
""" or pg_sleep ( __TIME__ ) --",1
create user name identified by pass123 temporary tablespace temp default tablespace users; ,1
%29,1
"' AND 1 = utl_inaddr.get_host_address ( ( SELECT DISTINCT ( table_name ) FROM ( SELECT DISTINCT ( table_name ) , ROWNUM AS LIMIT FROM sys.all_tables ) WHERE LIMIT = 5 ) ) AND 'i' = 'i",1
" select * from users where id = '1' or @ @1 = 1 union select 1,version ( ) -- 1'",1
" select * from users where id = 1 or 1#"" ( union select 1,version ( ) -- 1",1
' select name from syscolumns where id = ( select id from sysobjects where name = tablename' ) --,1
select * from users where id = 1 +$+ or 1 = 1 -- 1,1
DROP database social_media;
CREATE DATABASE social_media;
USE social_media;
CREATE TABLE users (
user_id INTEGER AUTO_INCREMENT PRIMARY KEY,
username VARCHAR(255) UNIQUE NOT NULL,
profile_photo_url VARCHAR(255) DEFAULT 'https://picsum.photos/100',
bio VARCHAR(255),
export const onMessage = {};
export const initialize = (id, container) => {
onMessage[id] = messageHandler(container);
};
const messageHandler = (container) => (message, value) => {
switch (message) {
case "display-text":
const p = document.createElement('p');
My-Interface : type {
ui :: UI
}
[context]
my-interface :: My-Interface
my-interface : crash "`my-interface` used outside `with-my-interface`"
with-my-interface : syntax {
with-my-interface 'body -> {