This file contains hidden or 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
make_qry(Chl) -> | |
%% First we compose two strings: | |
%% ChlKey = Challenge + Client-Key | |
%% ChlPid = Challenge + Client-Id zero padded to even 8 | |
Key = "CFHUR$52U_{VIX5T", | |
Pid = "PROD0101{0RM?UBW", | |
ChlKey = Chl ++ Key, | |
ChlPid0 = Chl ++ Pid, | |
ChlPadL = 8 - (length(ChlPid0) rem 8), | |
ChlPid1 = ChlPid0 ++ lists:duplicate(ChlPadL, $0), |
This file contains hidden or 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
(msnerl@localhost)1> {DOM, _} = xmerl_scan:string("<a apa=\"1\"><b>hello</b></a>"). | |
{{xmlElement,a,a,[], | |
{xmlNamespace,[],[]}, | |
[],1, | |
[{xmlAttribute,apa,[],[],[],[],1,[],"1",false}], | |
[{xmlElement,b,b,[], | |
{xmlNamespace,[],[]}, | |
[{a,1}], | |
1,[], | |
[{xmlText,[{b,1},{a,1}],1,[],"hello",text}], |
This file contains hidden or 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
Imports System.Text | |
Imports System.Security.Cryptography | |
Public Class MSNChallenge | |
Public Shared Function GetChallengeResponse(ByVal ProductKey As String, ByVal ProductID As String, ByVal ChallengeData As String) As String | |
'Step 1: Build Hash String | |
Dim Hash As String = CreateMD5HexString(ChallengeData & ProductKey) |
This file contains hidden or 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
./pit3.sh | |
Buildfile: Pit3/build.xml | |
clean: | |
[delete] Deleting directory /proj/sgsn-program/work/qandale/Pit3/bin | |
[delete] Deleting directory /proj/sgsn-program/work/qandale/Pit3/doc | |
resolve: | |
[ivy:retrieve] :: Ivy 2.1.0-rc2 - 20090704004254 :: http://ant.apache.org/ivy/ :: | |
[ivy:retrieve] :: loading settings :: file = /proj/sgsn-program/work/qandale/Pit3/ivysettings.xml |
This file contains hidden or 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
class PitTree[T](val children : Map[String, PitTree[T]], val value : Option[T]) extends Map[String, T] { | |
def this() = this(Map(), None) | |
def this(value : T) = this(Map(), Some(value)) | |
def update(path : String, upVal : T) : PitTree[T] = update(splitPath(path), upVal) | |
def update(path : List[String], upVal : T) : PitTree[T] = path match { | |
case Nil => | |
new PitTree[T](upVal) | |
case h :: t => | |
val child = children.getOrElse(h, new PitTree[T]()).update(t, upVal) | |
new PitTree[T](children + (h -> child), value) |
This file contains hidden or 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 scala.collection.Map | |
class PitTree[+T](val children : Map[String, PitTree[T]], val value : Option[T]) extends Map[String, T] { | |
def this() = this(Map(), None) | |
def this(value : T) = this(Map(), Some(value)) | |
def update[T1 >: T](path : String, upVal : T1) : PitTree[T1] = this.+(path -> upVal) | |
override def empty = new PitTree[T] |
This file contains hidden or 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
$(document).ready(function() { | |
var chart; | |
var cats = []; | |
var pass = []; | |
var fail; | |
var tr; | |
$.get('lsv_builds.html', function(data) { | |
var page = $(data); | |
var table = $("table", page)[0]; |
This file contains hidden or 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
#!/bin/sh | |
L=`dirname $0`/lib | |
cp=`echo $L/*.jar|sed 's/ /:/g'` | |
exec scala -savecompiled -classpath $cp $0 $@ | |
!# | |
// /* */ */ | |
val cmd1 = Cmd("ping localhost") | |
val cmd2 = Cmd("vmstat 1") |
This file contains hidden or 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
#!/bin/sh | |
ME=`readlink -f $0` | |
ROOT=`dirname $ME` | |
PREFIX=$ROOT/target | |
ERL_TOP=$ROOT/otp | |
cd $ERL_TOP | |
./otp_build autoconf | |
./configure --prefix=$PREFIX | |
gmake |
This file contains hidden or 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
-(void)updateTextLabel { | |
[self fetchTextAndThen:^(NSString *result){ | |
self.textLabel.text = result; | |
}]; | |
} | |
-(void)fetchTextAndThen:(void (^)(NSString *result))block { | |
NSString *current = [[NSUserDefaults standardUserDefaults] objectForKey:@"Text"]; | |
dispatch_async(webQueue, ^{ | |
NSString *response = [self requestToURL:@"http://192.168.0.108:8888/getText" withData:@"" withMethod:@"GET"]; |
OlderNewer