Skip to content

Instantly share code, notes, and snippets.

View kabeer11000's full-sized avatar
💭
Adding Bugs to fix later

Kabeer Jaffri kabeer11000

💭
Adding Bugs to fix later
View GitHub Profile

RanForte Changelog

ed60ec997fcbacfde397c4397c2d77816ed51a5d (2024-03-26)

  • fixed login system View

File Changes:

  • M web/src/pages/api/product/get-products.ts* M web/src/pages/products.tsx

8f29fbcb56fadd0df4d7c1b2bf79ef95f2ab0a71 (2024-03-25)

/**
* Everyone is familiar with a television. It is the object we are going to create in this lab. First we need
a blueprint. All manufacturers have the same basic elements in the televisions they produce as well as
many options. We are going to work with a few basic elements that are common to all televisions. Think
about a television in general. It has a brand name (i.e. it is made by a specific manufacturer). The
television screen has a specific size. It has some basic controls. There is a control to turn the power on
and off. There is a control to change the channel. There is also a control for the volume. At any point in
time, the television’s state can be described by how these controls are set. We will write the television
class. Each object that is created from the television class must be able to hold information about that
instance of a television in fields. So a television object will have the following attributes:
#include <iostream>
#include <sstream>
#include <stack>
#include <string>
// Function implementation, not important for this question
double Task3Evaluate(const std::string& expression) {
std::stack<double> operands;
std::istringstream iss(expression);
@kabeer11000
kabeer11000 / bi-grams.js
Created August 30, 2023 00:46
Scrabble Bi-Grams based word prediction
const validWords = ["dog", "dough", "doggy", "doodle", "dig", "door"];
const bigrams = ["do", "og"]; // Example bigram array
function generateValidWordsFromBigrams(bigrams, validWords) {
const validGeneratedWords = [];
for (const word of validWords) {
const isValid = bigrams.every(bigram => word.includes(bigram));
if (isValid) {
validGeneratedWords.push(word);
@kabeer11000
kabeer11000 / package.json
Created September 12, 2022 16:43 — forked from jayphelps/package.json
TypeScript output es2015, esm (ES Modules), CJS, UMD, UMD + Min + Gzip. Assumes you install typescript (tsc), rollup, uglifyjs either globally or included as devDependencies
{
"scripts": {
"build": "npm run build:es2015 && npm run build:esm && npm run build:cjs && npm run build:umd && npm run build:umd:min",
"build:es2015": "tsc --module es2015 --target es2015 --outDir dist/es2015",
"build:esm": "tsc --module es2015 --target es5 --outDir dist/esm",
"build:cjs": "tsc --module commonjs --target es5 --outDir dist/cjs",
"build:umd": "rollup dist/esm/index.js --format umd --name YourLibrary --sourceMap --output dist/umd/yourlibrary.js",
"build:umd:min": "cd dist/umd && uglifyjs --compress --mangle --source-map --screw-ie8 --comments --o yourlibrary.min.js -- yourlibrary.js && gzip yourlibrary.min.js -c > yourlibrary.min.js.gz",
}
}
@kabeer11000
kabeer11000 / client.js
Created September 12, 2022 10:14 — forked from naoki-sawada/client.js
Simple socket.io room and auth example
const io = require('socket.io-client');
const socket = io('http://localhost:3000', {
transportOptions: {
polling: {
extraHeaders: {
'Authorization': 'Bearer abc',
},
},
},
@kabeer11000
kabeer11000 / install_debian.sh
Created July 28, 2022 06:32 — forked from seandenigris/install_debian.sh
VirtualBox: Programmatically Create Debian VM
#!/bin/bash
# Reference: http://stdioe.blogspot.com/2012/01/creating-virtual-machine-with.html
VM_NAME="Debian Squeeze 2"
DEBIAN_CD_IMAGE="debian-6.0.7-amd64-netinst.iso"
# Create VM
VBoxManage createvm --name "$VM_NAME" --ostype Debian_64 --register
# VM Settings
#!/usr/bin/env python3
#
# Copyright 2022, Kabeer's Network (Modified WOFF2TTF utility) (https://kabeersnetwork.tk/)
# Initial Copyright 2012, Steffen Hanikel (https://github.com/hanikesn)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
@kabeer11000
kabeer11000 / values_pointers.go
Created July 7, 2022 11:20 — forked from josephspurrier/values_pointers.go
Golang - Asterisk and Ampersand Cheatsheet
/*
********************************************************************************
Golang - Asterisk and Ampersand Cheatsheet
********************************************************************************
Also available at: https://play.golang.org/p/lNpnS9j1ma
Allowed:
--------
p := Person{"Steve", 28} stores the value
@kabeer11000
kabeer11000 / ucsc_pdf_bbox_parser.py
Created June 15, 2022 02:12 — forked from alexpreynolds/ucsc_pdf_bbox_parser.py
Extract the bounding box of the first, leftmost rectangle dividing labels and annotations in a PDF-formatted UCSC genome browser shot
#!/usr/bin/env python
import sys
from pdfminer.pdfparser import PDFParser
from pdfminer.pdfdocument import PDFDocument
from pdfminer.pdfpage import PDFPage
from pdfminer.pdfpage import PDFTextExtractionNotAllowed
from pdfminer.pdfinterp import PDFResourceManager
from pdfminer.pdfinterp import PDFPageInterpreter
from pdfminer.pdfdevice import PDFDevice