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
object DynamicElvis { | |
class DynamicImpl( x: AnyRef ) extends Dynamic { | |
def _select_(name: String): DynamicElvis = { | |
val mName = name.substring(0, name.length - 1 ) | |
val mVal = x.getClass.getMethod(mName).invoke( x ) | |
new DynamicElvis( if( mVal != null ) Some( mVal ) else None ) | |
} | |
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
#!/usr/bin/python | |
# authored by Pratul Kalia in January 2011. | |
# Released into the public domain. | |
import sys | |
# Chaldean-Hebrew Kabala Numberical Alphabet. | |
# Taken from the book "Star Signs" by Linda Goodman. | |
kabala = {'a': 1, 'b': 2, 'c': 3, 'd': 4, | |
'e': 5, 'f': 8, 'g': 3, 'h': 5, |
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
/* | |
* Added additional null checks when closing the ResultSet and Statements. | |
* | |
* Thanks to pihug12 and Grzegorz Oledzki at stackoverflow.com | |
* http://stackoverflow.com/questions/5332149/jdbc-scriptrunner-java-lang-nullpointerexception?tab=active#tab-top | |
*/ | |
/* | |
* Modified: Use logWriter in print(Object), JavaDoc comments, correct Typo. | |
*/ | |
/* |
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 java.util.Arrays; | |
import java.util.HashSet; | |
import java.util.Set; | |
public class Mastermind { | |
public int[] solve(String[] guess, String[] secret) { | |
int bonBienplace = 0; | |
int bonMalplace = 0; | |
Set<String> setSecret = new HashSet<String>(Arrays.asList(secret)); |
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
% -*- mode: prolog; -*- | |
fact(1, 0). | |
fact(F, N) :- | |
N > 0, | |
N1 is N - 1, | |
fact(F1, N1), | |
F is F1 * N. |
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
000100 IDENTIFICATION DIVISION. | |
000200 PROGRAM-ID. HELLOWORLD. | |
000300 | |
000400* | |
000500 ENVIRONMENT DIVISION. | |
000600 CONFIGURATION SECTION. | |
000700 SOURCE-COMPUTER. RM-COBOL. | |
000800 OBJECT-COMPUTER. RM-COBOL. | |
000900 | |
001000 DATA DIVISION. |
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 client; | |
import java.io.DataOutputStream; | |
import java.io.FileInputStream; | |
import java.io.IOException; | |
import java.net.Socket; | |
public class FileClient { | |
private Socket s; |
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
URL | User | Repo | |
---|---|---|---|
https://github.com/0install/hello-ceylon | 0install | hello-ceylon | |
https://github.com/0x10c-crap/DCPU-Stress-Test | 0x10c-crap | DCPU-Stress-Test | |
https://github.com/0x10c-dev/stdlib | 0x10c-dev | stdlib | |
https://github.com/0x10cAtlas/AtlasOS | 0x10cAtlas | AtlasOS | |
https://github.com/0x10cStandardsCommittee/0x10c-Standards | 0x10cStandardsCommittee | 0x10c-Standards | |
https://github.com/0x42c/0x42c-kernel | 0x42c | 0x42c-kernel | |
https://github.com/0x42c/0x42c-multithread | 0x42c | 0x42c-multithread | |
https://github.com/1508/Deployment-Utilities | 1508 | Deployment-Utilities | |
https://github.com/280north/cappuccino | 280north | cappuccino |
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
SELECT | |
CAST(t.tabname AS VARCHAR(15)) AS tabla, | |
CAST(colname AS VARCHAR(15)) AS campo, | |
CASE | |
WHEN coltype >= 256 THEN cast(coltype-256 AS VARCHAR(4)) | |
ELSE cast(coltype AS VARCHAR(4)) | |
END AS tipo, | |
collength AS lon | |
FROM syscolumns c, systables t | |
WHERE c.tabid=t.tabid AND t.tabname[1,2]='fa' |
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(booleans, [and/2, or/2]). | |
:- op(1000, xfy, and). | |
:- op(1000, xfy, or). | |
and(P, Q) :- P , Q. | |
or(P, Q) :- P ; Q. |
OlderNewer