A validator for Iranian (Persian) national identifier or social number
c#
, java
, javascript
, php
parameter: string (It doesn't support arabic or persian numbers)
return: boolean
# Name it whatever you want. I like `y` because in my keyboard layout it's close to `;` | |
function y() { | |
previous=$? | |
if [ $previous -eq 0 ]; then | |
osascript -e "display notification \"Done\" with title \"Terminal Task\"" && say "it is done"; | |
else | |
osascript -e "display notification \"Failed\" with title \"Terminal Task\"" && say "it went to the trees"; | |
fi | |
} |
var str = 'class ಠ_ಠ extends Array {constructor(j = "a", ...c) {const q = (({u: e}) => {return { [`s${c}`]: Symbol(j) };})({});super(j, q, ...c);}}' + | |
'new Promise((f) => {const a = function* (){return "\u{20BB7}".match(/./u)[0].length === 2 || true;};for (let vre of a()) {' + | |
'const [uw, as, he, re] = [new Set(), new WeakSet(), new Map(), new WeakMap()];break;}f(new Proxy({}, {get: (han, h) => h in han ? han[h] ' + | |
': "42".repeat(0o10)}));}).then(bi => new ಠ_ಠ(bi.rd));'; | |
try { | |
eval(str); | |
} catch(e) { | |
alert('Your browser does not support ES6!') | |
} |
#!/bin/bash | |
cd "$(git rev-parse --show-toplevel)" | |
ESLINT="node_modules/.bin/eslint" | |
pwd | |
if [[ ! -x "$ESLINT" ]]; then | |
printf "\t\033[41mPlease install ESlint\033[0m (npm install eslint)\n" | |
exit 1 | |
fi |
// This will open up a prompt for text to send to a console session on digital ocean | |
// Useful for long passwords | |
(function () { | |
var t = prompt("Enter text to be sent to console, (This wont send the enter keystroke)").split(""); | |
function f() { | |
var character = t.shift(); | |
var i=[]; | |
var code = character.charCodeAt(); | |
var needs_shift = "!@#$%^&*()_+{}:\"<>?~|".indexOf(character) !== -1 |
Quite a few big new features, improvements, and bug fixes made their way into Firefox Developer Edition 39. Update your Firefox [Developer Edition][dev-ed], or [Nightly][nightly] builds to try them out!
The [Inspector][inspector] now allows you to move elements around via [drag and drop][dnd]. Click and hold on an element and then drag it to where you want it to go. This feature was added by contributor Mahdi Dibaiee.
[![Drag and Drop][dnd-poster]][dnd-video]
Back in [Firefox 33][fx33], a tooltip was added to the rule view to allow editing curves for cubic bezier CSS animations. In Developer Edition 39, we've greatly enhanced the tooltip's UX by adding various standard curves you can try right away, as well as cleaned up the overall appearance. This was added by new contributor John Giannakos.
# install dependencies | |
sudo apt-get update | |
sudo apt-get install -y build-essential | |
sudo apt-get install -y cmake | |
sudo apt-get install -y libgtk2.0-dev | |
sudo apt-get install -y pkg-config | |
sudo apt-get install -y python-numpy python-dev | |
sudo apt-get install -y libavcodec-dev libavformat-dev libswscale-dev | |
sudo apt-get install -y libjpeg-dev libpng-dev libtiff-dev libjasper-dev | |
/** | |
* @constructor | |
*/ | |
function WebGLRenderingContext() { | |
} | |
WebGLRenderingContext.prototype = { | |
ACTIVE_ATTRIBUTES: 35721, | |
ACTIVE_TEXTURE: 34016, | |
ACTIVE_UNIFORMS: 35718, |
#delete all my jobs, | |
# only do this if you have fewer than a few hundred jobs. | |
qdel $(qselect -u $USER) | |
#delete all my queued jobs | |
qdel $(qselect -u $USER -s Q) | |
#delete all my jobs submiting with the wrong account | |
qdel $(qselect -u $USER -A wrongaccount) |
The trick? pass the file descriptor from a parent process and have the server.listen reuse that descriptor. So multiprocess in their own memory space (but with ENV shared usually)
It does not balance, it leaves it to the kernel.
In the last nodejs > 0.8 there is a cluster module (functional although marked experimental)