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
var surf = newScreenSurface(800, 600) | |
var r: TRect = (0, 0, 900, 900) | |
# Draw the shapes | |
surf.fillRect(r, colWhite) | |
surf.drawLineAA((100, 170), (400, 471), colTan) | |
surf.drawLine((100, 170), (400, 471), colRed) | |
surf.drawEllipse(200, 300, 200, 30, colSeaGreen) | |
surf.drawHorLine(1, 300, 400, colViolet) |
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 times | |
proc longRun(i: int) = | |
if i < 9999999999: | |
longRun(i + 1) | |
var t = getStartmilsecs() | |
for i in 0 .. 5: | |
longRun(0) |
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 times | |
var t = getStartmilsecs() | |
var tt = getTime() | |
var s = "" | |
for i in 0 .. 50000: | |
s.add("ss") | |
var s1 = "" |
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
# Copyright 2010 (C) Dominik Picheta - Read license.txt for the license. | |
# 30 May 2010 | |
# REPL - A nice REPL for nael. | |
import interpreter, os | |
when isMainModule: | |
if paramCount() == 0: | |
var dataStack = newStack(200) | |
var vars = newVariables() # 'main' variables(They act as both local and global) |
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
try: | |
raise newException(EInvalidValue, "") | |
except EOverflow: | |
echo("Error caught") |
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
#include <stdio.h> | |
int main() | |
{ | |
while (1) | |
{ | |
int c; | |
while ((c = getchar()) != EOF) | |
putchar(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
import xchat, sys, dbus | |
__module_name__ = "Exaile" | |
__module_version__ = "1.0" | |
__module_description__ = "Exaile now playing script" | |
def getSongInfo(): | |
bus = dbus.SessionBus() | |
try: | |
remote_object = bus.get_object("org.exaile.Exaile","/org/exaile/Exaile") | |
iface = dbus.Interface(remote_object, "org.exaile.Exaile") |
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
intersperse' :: Char -> [String] -> String | |
intersperse' _ [] = "" | |
intersperse' sep (x:xs) = if not (null rest) | |
then x ++ ([sep] ++ rest) | |
else x | |
where rest = intersperse' sep xs |
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
Exception in thread "main" java.lang.NoClassDefFoundError: clojure/core$drop_while$step__3734 (NO_SOURCE_FILE:0) | |
at clojure.lang.Compiler.eval(Compiler.java:5435) | |
at clojure.lang.Compiler.eval(Compiler.java:5386) | |
at clojure.core$eval.invoke(core.clj:2370) | |
at clojure.main$eval_opt.invoke(main.clj:235) | |
at clojure.main$initialize.invoke(main.clj:254) | |
at clojure.main$script_opt.invoke(main.clj:270) | |
at clojure.main$main.doInvoke(main.clj:354) | |
at clojure.lang.RestFn.invoke(RestFn.java:458) | |
at clojure.lang.Var.invoke(Var.java:377) |
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
dominik@ubuntu:~$ nmap irc.freenode.net -p 6667 | |
Starting Nmap 5.00 ( http://nmap.org ) at 2010-07-30 17:28 IST | |
Warning: Hostname irc.freenode.net resolves to 18 IPs. Using 213.179.58.83. | |
Interesting ports on 16ldjqj.ip.ssc.net (213.179.58.83): | |
PORT STATE SERVICE | |
6667/tcp open irc | |
Nmap done: 1 IP address (1 host up) scanned in 0.31 seconds |
OlderNewer