Skip to content

Instantly share code, notes, and snippets.

View bobo's full-sized avatar

Mikael Sundberg bobo

View GitHub Profile
@bobo
bobo / gist:420cf51bc2f2dac73c0c
Created August 8, 2014 06:38
BTH's lösenordskrav
Lösenordet måste uppnå följande krav:
måste vara exakt 8 tecken
måste innehålla minst en liten bokstav (a-z)
måste innehålla minst en stor bokstav (A-Z)
måste innehålla minst en siffra (0-9)
första tecknet får inte vara något av följande specialtecken: = ( ) !
måste innehålla minst ett av följande specialtecken: ! " # % & / ( ) = ? + - * @ { [ ] } , . ; : _
får inte innehålla ditt användarnamn
A Mathematician, a Physicist, and an astronomer were travelling north by train. They had just crossed the border into Scotland, when the Astronomer looked out of the window and saw a single black sheep in the middle of a field. "All Scottish sheep are black," he remarked. "No, my friend," replied the Physicist, "Some Scottish sheep are black." At which point the Mathematician looked up from his paper and glanced out the window. After a few second's thought he said blandly: "In Scotland, there exists at least one field, in which there exists at least one sheep, at least one side of which is black."
11 * * *
12 Episode.IV (206.214.251.1) 195.520 ms 190.397 ms 196.700 ms
13 A.NEW.HOPE (206.214.251.6) 189.582 ms 193.097 ms 188.889 ms
14 It.is.a.period.of.civil.war (206.214.251.9) 204.646 ms 199.292 ms 198.866 ms
15 Rebel.spaceships (206.214.251.14) 209.090 ms 208.934 ms 211.015 ms
16 striking.from.a.hidden.base (206.214.251.17) 187.814 ms 185.249 ms 188.532 ms
17 have.won.their.first.victory (206.214.251.22) 186.223 ms 190.611 ms 196.419 ms
18 against.the.evil.Galactic.Empire (206.214.251.25) 206.362 ms * 199.727 ms
19 During.the.battle (206.214.251.30) 199.981 ms * 200.091 ms
20 Rebel.spies.managed (206.214.251.33) 199.608 ms 198.052 ms 197.093 ms
@bobo
bobo / gist:3775798
Created September 24, 2012 12:49 — forked from anonymous/gist:3775688
# -*- coding: iso-8859-15 -*-
import sys
month=input ("Skriv in ett månadsnummer:")
if(month<1):
print "fealktig månad"
sys.exit(0)
day=input ("Skriv in ett dagnummer inom månaden:")
if(day<1):
print "felaktig dag"
sys.exit(0)
(defmapping com.vxcompany.clojuremvc.MyMapping
("/index.html"
[:index {:info "Life's so much cooler with macros!"}])
("/another.html"
[:another {:info "It's really cooler!"}]))
def convert_time(self, date_string):
if '-' in date_string: split_char = '-'
else: split_char = '+'
dt = datetime.strptime(''.join(date_string.split(split_char)[:-1]), '%Y%m%dT%H:%M:%S.%f')
return dt
function productParamsHasOptions(){
$(".lens-params-table td select").each(function(){
if ($(this).has("option").length == 0){
$(this).attr("disabled", true);
}
});
}
Hej alla arbetssökande! Jag efterlyser fina personligheter som har glöden inne och vill tjäna lite extra pengar!
Lensway.se kommer att ställa till med ett stort event på Centralstationen i Stockholm mellan den 23-29 April.
Detta är för att pressa de höga glasögonpriser som vi besitter i detta land. Vi kommer att erbjuda fina priser på
glasögon, glas och alla de tillval som behövs för de mest optimala glasögonen för just dig.
Arbetet innefattar marknadsföring i form av handutdelning av värdecheckar.
Platsen varierar allt ifrån inne i
Centralstionen till utanför och i angärnsande transportlinjer till Centralstionen.
Hör av dig till vår eventkoordinator Alexander på alebuu@lensway.com
om du känner dig manad eller om du är intresserad av mer info. Då ärendet är
public class HashCodeTest {
@Test
public void testHashCode() {
int loopCount = 0;
HashSet<Integer> hashSet = new HashSet<Integer>();
for (int outer = 0; outer < 18; outer++) {
for (int inner = 0; inner < 2; inner++) {
loopCount++;
hashSet.add(new SimpleClass(inner, outer).hashCode());
@Test
public void testCallHashCodeMultiple() {
int loopCount = 0;
for (int outer = 0; outer < 32; outer++) {
for (int inner = 0; inner < 2; inner++) {
loopCount++;
cacheableTestInterface.callHashCodeCacheKeyGeneratorMultiple(inner, outer);
}
}