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
maximum [x*y |x <- [100..999], y <- [100..999], isPalindrome (x*y)] |
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
weasel> let x = Debug.Trace.trace "hi" True | |
weasel> x | |
hi | |
True | |
weasel> x | |
True | |
weasel> |
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 Debug.Trace | |
isMultiple :: (Integral a) => a -> a -> Bool | |
isMultiple divisor number | |
| divisor > number = False | |
| otherwise = (number `mod` divisor) == 0 | |
l_factors :: (Integral a) => a -> a -> [a] -> [a] | |
l_factors _ 1 list = list |
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
isDivisor :: (Integral a) => a -> a -> b | |
isDivisor number divisor = ((number `mod` divisor) == 0) | |
l_factors :: (Integral a) => a -> a -> [a] -> [a] | |
l_factors 1 target list = list | |
l_factors divisor target list | |
| isDivisor target divisor = (l_factors divisor-1 target/divisor divisor:list) | |
| otherwise = (l_factors divisor-1 target divisor:list) |
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
DEBUG src/connection.c:656: parsing | |
'GET /wsstream HTTP/1.1 | |
Upgrade: WebSocket | |
Connection: Upgrade | |
Host: localhost:6767 | |
Origin: http://localhost:6767 | |
Sec-WebSocket-Key1: m 4 115S8 g8if m aLD T8 yd124 | |
Sec-WebSocket-Key2: 9 %F8 s]6129' ^ 3 C 76 | |
t�C"���`' |
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
Done from a fresh reboot of the mongrel2 server. | |
#========================= TRY 1 WORKS ======================= | |
#MONGREL2 SERER SESSION | |
shows nothing... it's happy | |
# HANDLER SESSION | |
xavierlange@pelorus:~/code/mongrel2/handler$ make && ./mongrel_handler | |
gcc -lzmq -ljson mongrel_handler.o bstrlib.o bstraux.o -o mongrel_handler | |
======NETSTRING====== |
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
# cURL to test mongrel2 handler | |
me@pelorus:~/code/dds_mongrel2/deployment$ curl localhost:6767 -v | |
* About to connect() to localhost port 6767 (#0) | |
* Trying ::1... connected | |
* Connected to localhost (::1) port 6767 (#0) | |
> GET / HTTP/1.1 | |
> User-Agent: curl/7.19.7 (i486-pc-linux-gnu) libcurl/7.19.7 OpenSSL/0.9.8k zlib/1.2.3.3 libidn/1.15 | |
> Host: localhost:6767 | |
> Accept: */* | |
> |
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
grammar Debian | |
rule package_list | |
(package "\n"?)+ | |
end | |
rule package | |
(tag / value)+ <DebianSyntaxNode::Package> | |
end | |
rule tag | |
tag_value tag_stop | |
end |
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
Package: acct | |
Priority: optional | |
Section: admin | |
Installed-Size: 352 | |
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> | |
Original-Maintainer: Mathieu Trudel <mathieu.tl@gmail.com> | |
Architecture: i386 | |
Version: 6.5.4-2ubuntu1 | |
Depends: dpkg (>= 1.15.4) | install-info, libc6 (>= 2.4) | |
Filename: pool/main/a/acct/acct_6.5.4-2ubuntu1_i386.deb |
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
grammar Debian | |
rule collection | |
entry+ | |
end | |
rule entry | |
(tag space value) | |
end | |
rule package_details | |
tag value &[^$] |
NewerOlder