This is the reference point. All the other options are based off this.
|-- app
| |-- controllers
| | |-- admin
| #server | |
| import socket | |
| import threading | |
| import time | |
| SIZE = 4 | |
| soc = socket.socket(socket.AF_INET,socket.SOCK_STREAM) | |
| soc.bind(('127.0.0.1',5432)) | |
| soc.listen(5) |
| #!flask/bin/python | |
| from flask import Flask, jsonify, abort, request, make_response, url_for | |
| from flask_httpauth import HTTPBasicAuth | |
| app = Flask(__name__, static_url_path = "") | |
| auth = HTTPBasicAuth() | |
| @auth.get_password | |
| def get_password(username): | |
| if username == 'miguel': |
Press minus + shift + s and return to chop/fold long lines!
Single-line comments are started with //. Multi-line comments are started with /* and ended with */.
C# uses braces ({ and }) instead of indentation to organize code into blocks.
If a block is a single line, the braces can be omitted. For example,
| #!/bin/bash | |
| ##################################################### | |
| # Name: Bash CheatSheet for Mac OSX | |
| # | |
| # A little overlook of the Bash basics | |
| # | |
| # Usage: | |
| # | |
| # Author: J. Le Coupanec | |
| # Date: 2014/11/04 |
| /* | |
| (c) by Thomas Konings | |
| Random Name Generator for Javascript | |
| */ | |
| function capFirst(string) { | |
| return string.charAt(0).toUpperCase() + string.slice(1); | |
| } | |
| function getRandomInt(min, max) { |
| # For http://stackoverflow.com/a/7296873/396458 | |
| student: student_id, first_name, last_name | |
| classes: class_id, name, teacher_id | |
| student_classes: class_id, student_id # the junction table | |
| students: | |
| id | first | last | |
| ===================== | |
| 1 | John | Lee |
| from flask import Flask, Response | |
| app = Flask(__name__) | |
| @app.route("/wav") | |
| def streamwav(): | |
| def generate(): | |
| with open("signals/song.wav", "rb") as fwav: | |
| data = fwav.read(1024) |
| # coding: utf-8 | |
| from objc_util import * | |
| NSAKDeserializer = ObjCClass('NSAKDeserializer') | |
| NSAKDeserializerStream = ObjCClass('NSAKDeserializerStream') | |
| NSAKSerializer = ObjCClass('NSAKSerializer') | |
| NSAKSerializerStream = ObjCClass('NSAKSerializerStream') | |
| NSAbstractLayoutGuide = ObjCClass('NSAbstractLayoutGuide') | |
| NSAddressCheckingResult = ObjCClass('NSAddressCheckingResult') | |
| NSAffineTransform = ObjCClass('NSAffineTransform') |