The idea is simple: pass the session cookie from the old domain to the new one.
$ go run server.go
Go to http://session
and http://nosession
.
#! /usr/bin/env python | |
import sys | |
import argparse | |
import cv2 | |
import numpy | |
from picamera import PiCamera | |
from picamera.array import PiRGBArray | |
import RPi.GPIO as GPIO | |
import time | |
import math |
import RPi.GPIO as GPIO | |
from picamera import PiCamera | |
GPIO.setmode(GPIO.BCM) | |
laser_pin = 22 | |
GPIO.setup(laser_pin, GPIO.OUT) | |
print(GPIO.VERSION) |
bins = [ | |
'01010000', | |
'01101100', | |
'01110101', | |
'01100111', | |
'00100000', | |
'01101001', | |
'01101110', | |
'01110100', | |
'01101111', |
package main | |
import ( | |
"fmt" | |
"os" | |
"path" | |
"path/filepath" | |
"strings" | |
) |
package singleton | |
var Instance *_Singleton | |
type _Singleton struct { | |
SharedResource int | |
} | |
func _Load() { | |
Instance = &_Singleton{SharedResource: 1} |
package main | |
import ( | |
"testing" | |
"testing/quick" | |
"unicode/utf8" | |
) | |
func reverseUsingBytes(a string) string { | |
b := make([]byte, len(a)) |
package main | |
import "fmt" | |
type F func(*State) F | |
type State int | |
func Begin(s *State) F { | |
*s = 1 |
package main | |
import ( | |
"fmt" | |
"reflect" | |
) | |
type T struct { | |
Message string | |
} |
Programming interview practice of the week (October 25)
Write a function that accepts four arguments. The first two arguments are the size of the grid (h x w), filled with ascending integers from left to right, top to bottom, starting from 1. The next two arguments are is the starting positions, the row (r) and column (c).
Return an array of integers obtained by spiraling outward anti-clockwise from the r and c, starting upward.