if one yellow facing up, put in on the front so that we see another yellow facing toward.
toward stikers right: R U R' U R U2 R'
toward stikers left : L' U' L U' L' U2 L (anti sune)
#!/bin/sh | |
[ $# -eq 0 ] && echo "Usage $0 REPOSITORY ..." && exit 1 | |
for repo in $@; do | |
if [ ! -d $repo ] || [ ! -d $repo/.git ]; then | |
echo "$repo: Is not a repository" | |
continue | |
fi |
import os | |
import requests | |
from bs4 import BeautifulSoup | |
url_base = "http://tldp.org/HOWTO/NCURSES-Programming-HOWTO" | |
dir_name = "ncurses_howto" | |
respond = requests.get("http://tldp.org/HOWTO/NCURSES-Programming-HOWTO") | |
if respond.status_code != 200: | |
raise IOError |
__kernel void function(__global char *data) | |
{ | |
data[0] = 'H'; | |
data[1] = 'e'; | |
data[2] = 'l'; | |
data[3] = 'l'; | |
data[4] = 'o'; | |
data[5] = '\n'; | |
data[6] = '\0'; | |
} |
#include <cassert> | |
#include <iostream> | |
#include <string> | |
#include <GL/glew.h> | |
#include <GLFW/glfw3.h> | |
static | |
unsigned int compileShader(unsigned int type, const std::string& source) | |
{ | |
unsigned int id = glCreateShader(type); |
hi |
with Ada.Numerics.Discrete_random; | |
with Ada.Text_io; use Ada.Text_io; | |
with Ada.Integer_Text_io; use Ada.Integer_Text_io; | |
procedure Craps is | |
subtype Interval is Integer range 1..6; | |
package IntRandom is new Ada.Numerics.Discrete_random(Interval); | |
use IntRandom; | |
gen: Generator; |
; Only need to save reg if we use them after | |
; caller rules: | |
; 1. save caller-saved reg r10, r11 | |
; /!\ all param reg | |
; 2. pass param with regs rdi, rsi, rdx, rcx, r8, r9 | |
; if there is more pass them onto the stack in reverse order | |
; 3. use call | |
; 4. restore stack state by removing passed on the stack param | |
; 5. return value of callee in rax |
unsigned char rotate_left(unsigned char b) | |
{ | |
unsigned char first = b & 0x80; | |
b <<= 1; | |
b |= first >> 7; | |
return b; | |
} | |
unsigned char rotate_right(unsigned char b) | |
{ |