This file contains hidden or 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 ( | |
"net" | |
) | |
func main() { | |
ln, err := net.Listen("tcp", ":8080") | |
if err != nil { | |
// handle error |
This file contains hidden or 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
acc = 1 | |
for i in range(1, 5 + 1): | |
acc *= i | |
print(acc) |
This file contains hidden or 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 | |
if len(sys.argv) < 3: | |
print("Must specify file name") | |
sys.exit(0) | |
in_fname = sys.argv[1] | |
out_fname = sys.argv[2] | |
with open(in_fname, "r") as in_file: |
This file contains hidden or 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" | |
"reflect" | |
) | |
//function types | |
type mapf func(interface{}) interface{} |
This file contains hidden or 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
{types: [ | |
{ name: "post", | |
backend_visible: false, | |
fields: [{ | |
name: "name", | |
type: {name: "Int", max: 250, ...}, | |
required: true | |
}, | |
{ |
This file contains hidden or 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
function viewport() { | |
var e = window | |
, a = "inner"; | |
if ( !( "innerWidth" in window ) ) { | |
a = "client"; | |
e = document.documentElement || document.body; | |
} | |
return { width : e[ a+"Width" ] , height : e[ a+"Height" ] }; | |
} |
This file contains hidden or 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
class Person: | |
def __init__(self, name): | |
self.name = name | |
def rap(self): | |
print("Whuddup bitch, this is MC " + self.name) | |
chode = Person("Jackson") | |
# |
This file contains hidden or 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
<?php | |
define('BASE_PATH', '/cafe'); | |
define('DB_USER', 'root'); | |
define('DB_PASS', 'password'); | |
?> |
This file contains hidden or 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
RNode Object ( [action:RNode:private] => Closure Object ( ) [children:RNode:private] => Array ( [menu] => RNode Object ( [action:RNode:private] => Closure Object ( ) [children:RNode:private] => Array ( [item] => RNode Object ( [action:RNode:private] => [children:RNode:private] => [var_child:RNode:private] => RNode Object ( [action:RNode:private] => Closure Object ( [parameter] => Array ( [$args] => ) ) [children:RNode:private] => [var_child:RNode:private] => ) ) ) [var_child:RNode:private] => RNode Object ( [action:RNode:private] => Closure Object ( [parameter] => Array ( [$args] => ) ) [children:RNode:private] => [var_child:RNode:private] => ) ) [json] => RNode Object ( [action:RNode:private] => [children:RNode:private] => Array ( [menu] => RNode Object ( [action:RNode:private] => [children:RNode:private] => Array ( [item] => RNode Object ( [action:RNode:private] => [children:RNode:private] => [var_child:RNode:private] => RNode Object ( [action:RNode:private] => Closure Object ( [parameter] => Array ( [$args |
This file contains hidden or 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
def fib(a,b): | |
print a; | |
if a < 100: | |
fib(b, a + b) | |
return | |
else: | |
return | |
return | |