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
var YourGlobal = { | |
namespace: function(ns) { | |
var parts = ns.split("."), | |
object = this, | |
i, len; | |
for(i = 0, len=parts.length; i < len; i++) { | |
if(!object[parts[i]]){ | |
object[parts[i]] = {}; | |
} |
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
;2. | |
(cons 'a '(b c)) | |
(cons 'a (cons 'b (cons 'c nil))) | |
(cons 'a (cons 'b '(c))) | |
;3. | |
(defun fourth_number (x) | |
(car (cdr (cdr (cdr x))))) | |
;4. |
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
@ = WINKEY | |
+ = SHIFT | |
^ = CTRL | |
% = ALT | |
{ADD} = VK_ADD | |
{APPS} = VK_APPS | |
{AT} = @ | |
{BACKSPACE} = VK_BACK | |
{BKSP} = VK_BACK |
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
package main | |
import ( | |
"fmt" | |
"os" | |
) | |
const ( | |
DIM = 1024 | |
DM1 = DIM - 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
import sys | |
import subprocess | |
from urlparse import urlparse, parse_qs | |
def main(script, plate): | |
url = urlparse(plate) | |
query_string = parse_qs(url.query) | |
application = r'D:\Program Files\HeidiSQL\heidisql.exe' | |
command = [application, |
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
#encoding:utf-8 | |
import Image | |
img = 'c5c07bd19d6a01def7a8920a805b5376_m.jpg' | |
im = Image.open(img) | |
im = im.resize((8, 8), Image.ANTIALIAS).convert('L') | |
print im.getdata() |
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
#!/usr/bin/python | |
import glob | |
import os | |
import sys | |
from PIL import Image | |
EXTS = 'jpg', 'jpeg', 'JPG', 'JPEG', 'gif', 'GIF', 'png', 'PNG' |
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 UIKit | |
import AVFoundation | |
class QRScanViewController: UIViewController, AVCaptureMetadataOutputObjectsDelegate { | |
var captureSession: AVCaptureSession? | |
var videoPreviewLayer: AVCaptureVideoPreviewLayer? | |
var qrCodeFrameView: UIView? | |
// Added to support different barcodes |
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
SELECT CONCAT(table_schema, '.', table_name), | |
CONCAT(ROUND(table_rows / 1000000, 2), 'M') rows, | |
CONCAT(ROUND(data_length / ( 1024 * 1024 * 1024 ), 2), 'G') DATA, | |
CONCAT(ROUND(index_length / ( 1024 * 1024 * 1024 ), 2), 'G') idx, | |
CONCAT(ROUND(( data_length + index_length ) / ( 1024 * 1024 * 1024 ), 2), 'G') total_size, | |
ROUND(index_length / data_length, 2) idxfrac | |
FROM information_schema.TABLES | |
ORDER BY data_length + index_length DESC | |
LIMIT 10; |
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
version: '3.1' | |
services: | |
mongo: | |
image: mongo | |
restart: always | |
environment: | |
MONGO_INITDB_ROOT_USERNAME: root | |
MONGO_INITDB_ROOT_PASSWORD: 123456 |
OlderNewer