One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
// to see more: https://stackoverflow.com/a/79051433/5881669 | |
import 'dart:math'; | |
import 'package:collection/collection.dart'; | |
void main() { | |
print(compareVersion('1.2.3', '12.3')); // -1 | |
print(compareVersion('12.3', '1.2.3')); // 1 | |
print(compareVersion('1.2.3', '1.2.3')); // 0 | |
} |
#!/usr/bin/env python | |
""" | |
Fast duplicate file finder. | |
Usage: duplicates.py <folder> [<folder>...] | |
Based on https://stackoverflow.com/a/36113168/300783 | |
Modified for Python3 with some small code improvements. | |
""" | |
import os | |
import sys |
pipeline { | |
agent { | |
docker { | |
image 'python:3-alpine' | |
} | |
} | |
stages { | |
stage('build') { | |
steps { | |
echo 'build....' |
import {CustomError} from "./error/custom-error.interface"; | |
require('dotenv').config(); | |
import {RequestHandler} from 'express'; | |
import {MongoClient} from 'mongodb'; | |
let client: MongoClient; | |
const connectToClientIfDropped: () => Promise<void> = async () => { | |
if (client && client.isConnected()) { |
[{ | |
"name": "Afghanistan", | |
"dial_code": "+93", | |
"emoji": "🇦🇫", | |
"code": "AF" | |
}, | |
{ | |
"name": "Aland Islands", | |
"dial_code": "+358", | |
"emoji": "🇦🇽", |
# Combine multiple images into one. | |
# | |
# To install the Pillow module on Mac OS X: | |
# | |
# $ xcode-select --install | |
# $ brew install libtiff libjpeg webp little-cms2 | |
# $ pip install Pillow | |
# | |
from __future__ import print_function |
/* Simple Stepper Motor Control Exaple Code | |
* | |
* by Dejan Nedelkovski, www.HowToMechatronics.com | |
* | |
*/ | |
// defines pins numbers | |
const int stepPin = 3; | |
const int dirPin = 4; | |
void setup() { |
//Check a +ve Int is 2^n where n is non -ve Int | |
func check(_ i: Int) -> Bool { | |
guard i != 1 else { return true } | |
guard i % 2 == 0 else { return false } | |
return check(i / 2) | |
} | |
print(check(1024)) | |
print(check(1023)) |
from pytube import YouTube | |
links = [ | |
'https://www.youtube.com/watch?v=S_0kr_CtdmY', | |
'https://youtu.be/1Qwx6PVfzjE', | |
'https://www.youtube.com/watch?v=jdAXaXg44S0', | |
'https://www.youtube.com/watch?v=DZX5fndRHSg', | |
'https://www.youtube.com/watch?v=RxZ3rjQn9dQ', | |
'https://youtu.be/4C7sanyeShY', | |
'https://youtu.be/T-BOPr7NXME', |