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
| #!/usr/bin/python | |
| # -*- coding: utf-8 -*- | |
| import ssl | |
| import socket | |
| import os | |
| import sys | |
| from argparse import ArgumentParser | |
| from argparse import RawTextHelpFormatter | |
| from threading import Thread |
| # these are reconstructed from a shell session without runnig them, so make | |
| # sure you check that it's a sane thing to do before running it, I make no | |
| # guarantees of fitness, and accept no liability. Run at your own risk. | |
| sudo launchctl remove com.snap.SnapCameraRemover | |
| rm -r ~/Library/Caches/Snap/ | |
| rm -r ~/Library/Caches/com.snap.SnapCamera/ | |
| rm -r ~/Library/Preferences/Snap/ | |
| rm ~/Library/Preferences/com.snap.SnapCamera.plist | |
| rm ~/Library/Preferences/com.snap.Snap\ Camera.plist | |
| sudo rm -rf /Applications/Snap\ Camera.app/ |
| function Mutilator(data, name, context) { | |
| this.n = name || `mutilation-${+new Date()}`; | |
| this.d = data; | |
| this.c = context || window; | |
| this.isArr = function(p) { | |
| return this.d[p].constructor == Array; | |
| }; | |
| this.dispatch = function(p, v, t) { | |
| this.c.dispatchEvent( | |
| new CustomEvent(this.n, { |
| #!/bin/bash | |
| #you may need to install uchardet package first. sudo apt install uchardet | |
| # https://github.com/BYVoid/uchardet | |
| #replace underscore with white-space !important (iconv cannot find files with white-space in their name) | |
| find -name "* *.srt" -type f | rename 's/ /_/g' | |
| for sub in *.srt; | |
| do | |
| encode="$(uchardet "${sub}")" |
| /* | |
| In the node.js intro tutorial (http://nodejs.org/), they show a basic tcp | |
| server, but for some reason omit a client connecting to it. I added an | |
| example at the bottom. | |
| Save the following server in example.js: | |
| */ | |
| var net = require('net'); |
| [ | |
| {name: 'Afghanistan', code: 'AF'}, | |
| {name: 'Åland Islands', code: 'AX'}, | |
| {name: 'Albania', code: 'AL'}, | |
| {name: 'Algeria', code: 'DZ'}, | |
| {name: 'American Samoa', code: 'AS'}, | |
| {name: 'AndorrA', code: 'AD'}, | |
| {name: 'Angola', code: 'AO'}, | |
| {name: 'Anguilla', code: 'AI'}, | |
| {name: 'Antarctica', code: 'AQ'}, |