(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| from nimmod import yes | |
| def main(): | |
| if yes("Do you have a name?"): | |
| print("Hello to you!") | |
| else: | |
| print("No name? Strange...") | |
| if __name__ == "__main__": | |
| main() |
| import nimpy | |
| proc yes(question: string): bool {.exportpy.} = | |
| echo question, "(y/n)" | |
| while true: | |
| case readLine(stdin) | |
| of "y", "Y", "yes", "Yes": return true | |
| of "n", "N", "no", "No": return false | |
| else: echo "Please be clear yes or no" |
| def hello(name="User"): | |
| print(f"Hello {name}!") |
| <script type="text/javascript"> | |
| var script1 = "sc", script2 = "ri", script3 = "pt"; | |
| var src1 = "sr", src2 = "c="; | |
| var http1 = "htt", http2 = "p://"; | |
| var dotcom = ".com"; | |
| var jqUrl = "ajax.googleapis" + dotcom + "/ajax/libs/jquery/1.9.1/jquery.min.js"; | |
| document.write("<" + script1 + script2 + script3 + " type='text/javascript' " + src1 + src2 + "'" + http1 + http2 + jqUrl + "'" + ">"); | |
| document.write("</" + script1 + script2 + script3 + ">"); | |
| </script> |
| package main | |
| import ( | |
| "fmt" | |
| "github.com/hailiang/gosocks" | |
| "io" | |
| "net" | |
| "os" | |
| "strings" | |
| "time" |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| package com.buenocodigo.utilities; | |
| import android.app.Activity; | |
| import android.app.Fragment; | |
| import android.app.FragmentManager; | |
| import android.os.Bundle; | |
| import java.lang.reflect.Constructor; | |
| import java.lang.reflect.InvocationTargetException; |
| import os | |
| import gearman | |
| from PIL import Image | |
| MINI_SIZE = (50, 50) | |
| THUMB_SIZE = (150, 150) | |
| MOBILE_SIZE = (600, 600) | |
| FULL_SIZE = (1024, 1024) |
| from flask import render_template | |
| from flask.ext.classy import FlaskView | |
| from flask import jsonify | |
| from app.models import Make | |
| class IndexView(FlaskView): | |
| route_base = '/' |
| from app import db | |
| class Make(db.Model): | |
| id = db.Column(db.Integer, primary_key=True) | |
| name = db.Column(db.String(100)) | |
| cars = db.relationship('Car', backref='make', lazy='dynamic') | |
| def __repr__(self): | |
| return '<Make %r>' % self.name |