Skip to content

Instantly share code, notes, and snippets.

View adarsh-chakraborty's full-sized avatar
💻
I'm probably learning something right now. wbu?

Adarsh Chakraborty adarsh-chakraborty

💻
I'm probably learning something right now. wbu?
  • Bilaspur, Chhattisgarh.
  • 18:25 (UTC +05:30)
  • X @adarshgq
View GitHub Profile
@adarsh-chakraborty
adarsh-chakraborty / readme.md
Created March 1, 2024 05:20
Winrar license key

Create a file named rarreg.key in the Winrar Installation folder and the paste the following data

RAR registration data
WinRAR
Unlimited Company License
UID=4b914fb772c8376bf571
6412212250f5711ad072cf351cfa39e2851192daf8a362681bbb1d
cd48da1d14d995f0bbf960fce6cb5ffde62890079861be57638717
7131ced835ed65cc743d9777f2ea71a8e32c7e593cf66794343565
@adarsh-chakraborty
adarsh-chakraborty / Proto in JavaScript.txt
Last active October 27, 2023 06:06
Prototype in javascript
arr.__proto__ = object
arr.prototype is same is arr.__proto__ which is a object.
and each and every object in javascript has a prototype.
that means arr.__proto__ also has a prototype
arr.__proto__.__proto__ which is actually Object.prototype which is again an object
arr.__proto__.__proto__.__proto__
@adarsh-chakraborty
adarsh-chakraborty / 1920x1080p Resolution.md
Created February 11, 2023 17:44
1920x1080p Resolution for External Monitor Fix (Ubuntu)
@adarsh-chakraborty
adarsh-chakraborty / search.js
Created January 16, 2023 16:56
Write a function that takes two strings (a and b) as arguments. Return the number of times a occurs in b.
/*
Write a function that takes two strings (a and b) as arguments. Return the number of times a occurs in b.
Test Cases:
myFunction('m', 'how many times does the character occur in this sentence?')
Expected 2
myFunction('h', 'how many times does the character occur in this sentence?')
Expected 4
@adarsh-chakraborty
adarsh-chakraborty / script.js
Created January 3, 2023 12:16
Transpose an array of strings in 2D
let strs = ["abc" , "def", "ghi"];
console.log(strs);
let strs2 = strs.map(item => {
return item.split('');
});
let transposed = transpose(strs2);
@adarsh-chakraborty
adarsh-chakraborty / activate_msoffice16.md
Last active February 19, 2023 20:40
Ms Office 16 Activation Script using command prompt.

Microsoft Office 2016 Activation Script

Open command promt as admin.

Check if Ms Office Directory exists and change the current directory.

if exist "C:\Program Files (x86)\Microsoft Office\Office16\ospp.vbs" cd /d "C:\Program Files (x86)\Microsoft Office\Office16"

Check current activation status

cscript ospp.vbs /dstatus
@adarsh-chakraborty
adarsh-chakraborty / copy2clipboard.md
Created October 16, 2022 10:52
Quick JavaScript code to copy to clipboard.

Copy to Clipboard javascript code.

function copy2Clipboard(text){
  return navigator.clipboard.writeText(text);
}

22 JUL 2022

Topics

  1. Dom
  2. Document
  3. Elements
  4. Html
  5. Events
  6. Event Listeners

Assignment #1

Node.js JSON Cleaning In the JavaScript file, write a program to perform a GET request on the route https://coderbyte.com/api/challenges/json/json-cleaning and then clean the object according to the following rules: Remove all keys that have values of N/A, -, or empty strings. If one of these values appear in an array, remove that single item from the array. Then console log the modified object as a string.

Example Input {"name":{"first":"Daniel","middle":"N/A","last":"Smith"},"age":45}

Example Output {"name":{"first":"Daniel","last":"Smith"},"age":45}

@adarsh-chakraborty
adarsh-chakraborty / loopnested.js
Created May 21, 2022 08:19
Loop through nested objects in JS.
/* Solution by Suraj Yadav */
let obj = {
name: "adarsh",
id: 98,
roll: "sfd",
num2: {
name: "num_adarsh2",
id: 98,
roll: "sfd",