=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
BrainFuck Programming Tutorial by: Katie
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
package cache | |
import ( | |
"time" | |
"errors" | |
"github.com/tinylib/msgp/msgp" | |
"github.com/vmihailenco/msgpack/v5" | |
"github.com/dgraph-io/ristretto" |
create new game: | |
localhost:8080/new?players_count=2&dimension=4 | |
// this will return json with gameboard name | |
join game: | |
localhost:8080/join?roomname=weaselginger&username=uparmar&color=%FF1744 | |
//color is hexadecimal color code. we accept only colors declared in constant package | |
// this will return json object with gameboard containing details about current turn and initial game board | |
play game: |
int even_ones(unsigned x) | |
{ | |
x ^= x>>16; | |
x ^= x>>8; | |
x ^= x>>4; | |
x ^= x>>2; | |
x ^= x>>1; | |
return !(x & 1); | |
} |
# uparmar @ uparmar-mbp in ~/gosrc/src/cmd/go on git:master x [11:33:09] | |
$ cat diff.diff | |
diff --git a/src/cmd/go/alldocs.go b/src/cmd/go/alldocs.go | |
index 2561f5b2f8..ebbead5d31 100644 | |
--- a/src/cmd/go/alldocs.go | |
+++ b/src/cmd/go/alldocs.go | |
@@ -110,13 +110,11 @@ | |
// The default is the number of CPUs available. | |
// -race | |
// enable data race detection. |
echo -e "\e[1;40m" ; clear ; while :; do echo $LINES $COLUMNS $(( $RANDOM % $COLUMNS)) $(( $RANDOM % 72 )) ;sleep 0.05; done|awk '{ letters="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#$%^&*()"; c=$4; letter=substr(letters,c,1);a[$3]=0;for (x in a) {o=a[x];a[x]=a[x]+1; printf "\033[%s;%sH\033[2;32m%s",o,x,letter; printf "\033[%s;%sH\033[1;37m%s\033[0;0H",a[x],x,letter;if (a[x] >= $1) { a[x]=0; } }}' |
info:
title: Lifehacks
description: API to hack your life!
object:
image:
id: string
height: int
width: int
class Node: | |
def __init__(self, val): | |
self.data = val | |
self.next = None | |
class LinkedList: | |
def __init__(self): | |
self.head = None | |
def addNode(self, data): |
https://c7049648-8093-4335-8687-3e18bb7c5db2.ws-ap0.gitpod.io |