This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Str::orderedUuid(); | |
// 9603db6c-8b2c-4cbc-9f59-f161a2224879 | |
// Hex 9603db6c-8b2c to Decimal 164943310392108 | |
// Decimal 1649433103 to date 4/8/2022, 9:21:43 PM |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ❌ | |
function getUserData(name) { | |
const username = username || "Vinesh Gopi"; | |
//.... | |
} | |
// ✔️ | |
function getUserData(name = "Vinesh Gopi") { | |
// .... | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ❌ | |
const car = { | |
carMake: "Tata", | |
carModel: "Nexon", | |
carColor: "Green" | |
}; | |
function paintCar(car, color){ | |
car.carColor = color; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import moviepy.editor | |
video = moviepy.editor.VideoFileClip('Intro.mp4') | |
audio = video.audio | |
audio.write_audiofile('Intro.mp3') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ❌ | |
import 'rxjs/add/operator/map'; | |
import 'rxjs/add/operator/take'; | |
iAmAnObservable | |
.map(value => value.item) | |
.take(1); | |
// ✔️ | |
import { map, take } from 'rxjs/operators'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pyqrcode | |
import png | |
from pyqrcode import QRCode | |
qr = "vigowebs.com" | |
url = pyqrcode.create(qr) | |
url.svg("myqr.svg", scale = 8) | |
url.png("myqr.png", scale = 6) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cv2 | |
img=cv2.imread("myqr.png") | |
det=cv2.QRCodeDetector() | |
val, pts, st_code=det.detectAndDecode(img) | |
print(val) | |
# Output - vigowebs.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import OS | |
OS.system("shutdown /r /t 1") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Old root API: React 17 | |
import ReactDOM from 'react-dom'; | |
import App from 'App'; | |
ReactDOM.render(<App />, document.getElementById('root')); | |
// New root API : React 18 | |
import ReactDOM from 'react-dom'; | |
import App from 'App'; |