This file contains 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
Nov 13 21:18:39 cell /bsd: wd0a: uncorrectable data error reading fsbn 272768 of 272768-272831 (wd0 bn 272831; cn 33 tn 106 sn 41), retrying | |
Nov 13 21:20:04 cell /bsd: wd0a: uncorrectable data error reading fsbn 272768 of 272768-272831 (wd0 bn 272831; cn 33 tn 106 sn 41), retrying | |
Nov 13 21:20:04 cell /bsd: wd0a: uncorrectable data error reading fsbn 272768 of 272768-272831 (wd0 bn 272831; cn 33 tn 106 sn 41), retrying | |
Nov 13 21:20:05 cell /bsd: wd0a: uncorrectable data error reading fsbn 272768 of 272768-272831 (wd0 bn 272831; cn 33 tn 106 sn 41), retrying | |
Nov 13 21:20:05 cell /bsd: wd0a: uncorrectable data error reading fsbn 272788 of 272768-272831 (wd0 bn 272851; cn 33 tn 106 sn 61), retrying | |
Nov 13 21:20:05 cell /bsd: wd0a: uncorrectable data error reading fsbn 272788 of 272768-272831 (wd0 bn 272851; cn 33 tn 106 sn 61) | |
Nov 13 21:20:05 cell /bsd: wd0a: uncorrectable data error reading fsbn 272768 of 272768-272799 (wd0 bn 272831; cn 33 tn 106 sn 41), retrying | |
Nov 13 21:20:06 cell /bsd: wd0a: uncorrectable |
This file contains 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 <UIKit/UIKit.h> | |
#import "LDMAdit.h" | |
@interface SimpleAdView : UIView { | |
NSString *wantedPageId; | |
LDMAdit *ldmAdit; | |
} | |
- (void) switchToEstatGroup: (NSString *) estatGroup andPage: (NSString *) estatPage; |
This file contains 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
OpenBSD 4.9 (GENERIC.MP) #807: Wed Feb 16 13:22:14 MST 2011 | |
[email protected]:/usr/src/sys/arch/amd64/compile/GENERIC.MP | |
real mem = 3475476480 (3314MB) | |
avail mem = 3368943616 (3212MB) | |
mainbus0 at root | |
bios0 at mainbus0: SMBIOS rev. 2.6 @ 0xcf49c000 (78 entries) | |
bios0: vendor Dell Inc. version "1.5.3" date 10/22/2010 | |
bios0: Dell Inc. PowerEdge R410 | |
acpi0 at bios0: rev 2 | |
acpi0: sleep states S0 S4 S5 |
This file contains 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
-module(adku). | |
-export([adku/1]). | |
adku({ Width, Height }) -> adku({ Width - 1, Height - 1 }, [ ], { 0, 0 }). | |
adku({ Max_X, Max_Y } = Borders, Queue, Pos) -> | |
InList = lists:member(Pos, Queue), | |
if InList -> 0; | |
Pos =:= { Max_X, Max_Y } -> 1; | |
true -> |
This file contains 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
Browse: | |
https://oauth.twitter.com/2/authorize?oauth_callback_url=http://www.example.com/&oauth_mode=flow_web_client&oauth_client_identifier=7ynojZQ3uVE2DifWftbS3w | |
After authentication, user gets redirected to: | |
http://www.example.com/#oauth_access_token=RnEJAQAAAABpYH8NAAAAAGKSBQAAAAAAr9G2hLrnXaznri8LlSIaR0HuNBI=HLx1r47oqpobPncAm9DNeRCdySaMqoTKJcCLwnhIP&oauth_bridge_code=2wxWDd3IIZ0UW1y4oFpioWfbzTeaAlSGoJk5L6qMpGQ | |
...Use the API: |
This file contains 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
sys = require "sys"; | |
http = require "http"; | |
url = require "url"; | |
connect = require "connect"; | |
redis = require "redis"; | |
hashRing = require "hash_ring"; | |
Sharding = { | |
servers = { "127.0.0.1 10000 6378": 1 }; | |
ring = new hashRing.HashRing servers; |
This file contains 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
* Results | |
ruby json: 19,777,781 bytes | |
ruby msgpack: 14,757,439 bytes | |
php serialize(): 33,777,792 bytes | |
php igbinary: 18,757,571 bytes | |
php json_encode: 19,777,781 bytes | |
msgpack vs json (MRI 1.9.2) speed: |
This file contains 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
#if MYSQL_VERSION_ID < 40100 || defined(USE_OLD_MYSQL_SCRAMBLING) | |
unsigned long hash_res[2]; | |
char scrambled_password[MYSQL_CRYPT_LEN]; | |
# if MYSQL_VERSION_ID < 40100 | |
hash_password(hash_res, password); | |
# else | |
hash_password(hash_res, password, strlen(password)); | |
# endif | |
snprintf(scrambled_password, sizeof scrambled_password, "%08lx%08lx", |
This file contains 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
git clone https://github.com/kevinweil/elephant-bird.git | |
ant nonothing | |
cp lib/google-collect*jar lib/json-simple*jar /tmp/x | |
cd build/classes | |
jar -cf /tmp/x/elephant-bird.jar com | |
REGISTER google-collect-1.0.jar; | |
REGISTER json-simple-1.1.jar; | |
REGISTER elephant-bird.jar; |
This file contains 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
SET = [ 3, 4, 9, 14, 15, 19, 28, 37, 47, 50, 54, 56, 59, 61, 70, 73, 78, 81, 92, 95, 97, 99 ] | |
def find_with(set, target, expr = [ ], res = [ ]) | |
lowset = set.select { |e| e <= target } | |
lowset.each do |n| | |
expr2 = expr + [n] | |
if n == target | |
res << "#{expr2.sort.join(' + ')} = #{expr2.inject(:+)}" unless expr.empty? | |
else | |
find_with(lowset - [n], target - n, expr2, res) |
OlderNewer