Install express and nodemon.
sudo npm install -g express
sudo npm install -g nodemon
Create express project.
def get_data_and_labels(images_filename, labels_filename): | |
print("Opening files ...") | |
images_file = open(images_filename, "rb") | |
labels_file = open(labels_filename, "rb") | |
try: | |
print("Reading files ...") | |
images_file.read(4) | |
num_of_items = int.from_bytes(images_file.read(4), byteorder="big") | |
num_of_rows = int.from_bytes(images_file.read(4), byteorder="big") |
Packages: | |
"Package Control" | |
"Gist" | |
"Clipboard History" | |
"Emmet" | |
"AdvancedNewFile" | |
"Nettuts+ Fetch" | |
"Goto Documentation" | |
"Prefixr" | |
"SublimeLinter" |
var image = new Image(); | |
image.src = "sample.jpg"; | |
$(image).load(function() { | |
ctx.drawImage(image, 0, 0); | |
}); | |
$(canvas).click(function(e) { | |
var canvasOffset = $(canvas).offset(); | |
var canvasX = Math.floor(e.pageX-canvasOffset.left); | |
var canvasY = Math.floor(e.pageY-canvasOffset.top); |
import java.io.InputStream; | |
import java.net.Socket; | |
import java.util.Date; | |
public class Rdate { | |
public static void main(String[] args) { | |
try { | |
Socket s = new Socket("ntp1.arnes.si", 37); | |
InputStream input = s.getInputStream(); |
# Load environment variable into Django settings. | |
# Usage: SOME_SECRET_KEY = get_env_variable("SOME_SECRET_KEY") | |
import os | |
from django.core.exceptions import ImproperlyConfigured | |
def get_env_variable(var_name): | |
""" Get the environment variable or return exception """ | |
try: | |
return os.environ[var_name] |
import imaplib | |
import StringIO | |
import rfc822 | |
obj = imaplib.IMAP4_SSL("imap.gmail.com", "993") | |
obj.login("[email protected]", "pass") | |
print obj.list() | |
obj.select("[Gmail]/Vsa po&AWE-ta") | |
m = obj.search(None, "ALL")[1][0] | |
alli = m.split() |
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> | |
<script> | |
$(document).ready(function() | |
{ | |
$("#toggle_link").click(function(event){ | |
event.preventDefault(); | |
var heightExpanded = $("#box").get(0).scrollHeight - 2 * parseInt($("#box").css('padding')); |
HTML: | |
<a href="#" data-lang-string='{"show":"{{ Lang::get('header.show_menu') }}", "hide":"{{ Lang::get('header.hide_menu') }}"}' id="toggle_navigation">{{ Lang::get('header.show_menu') }}</a> | |
JAVASCRIPT: | |
$("#toggle_navigation").data('lang-string').show; |
.selector { | |
/* Positioning */ | |
position: absolute; | |
z-index: 10; | |
top: 0; | |
right: 0; | |
/* Display & Box Model */ | |
display: inline-block; | |
overflow: hidden; |