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
; code for project euler problem 1 | |
(defn returnIfFactor | |
[x] | |
(if (or (= (mod x 5) 0) (= (mod x 3) 0)) | |
x | |
0)) | |
(defn problem1 | |
[x] | |
(if (= x 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
' apostrophes denote comments | |
REM keyword also does this | |
' VB6 is case insensitive | |
Option Explicit | |
' this ensures that you only use variables you have declared | |
' (avoiding typos creating new variables) | |
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
public class Hello { | |
public static void main(String[] args) { | |
System.out.printf("Hello World!%n"); | |
} | |
} |
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
;;; moo.el --- comint-based emacs interface for MOOs. | |
;;; Copyright (C) 1993 Noah S. Friedman | |
;;; Author: Noah Friedman <[email protected]> | |
;;; Maintainer: Noah Friedman <[email protected]> | |
;;; Keywords: games, extensions | |
;;; $Id: moo.el,v 1.0 1993/11/15 05:26:49 friedman Exp $ |
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
#!/usr/bin/python | |
import os | |
import lxml.etree | |
def tld_to_word(node, hyphenated=False): | |
# convert text of the form 'ret<tld>ejo' | |
assert node != None | |
# beginning |
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
# these words are from http://reta-vortaro.de/tgz/index.html | |
# ĉi tiuj vortoj estas el http://reta-vortaro.de/tgz/index.html | |
-a | |
-ac | |
-aĉ | |
-ad | |
-aĵ | |
-ebl | |
-ec | |
-ed |
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
#!/usr/bin/python | |
import os | |
import lxml.etree | |
def get_words_from_kap(node): | |
flat_string = flatten_kap(node) | |
# now this is either one word 'foo' or multiple 'foo, bar' | |
words = flat_string.split(', ') |
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
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
def compare_esperanto_strings(x_mixed_case, y_mixed_case): | |
# case insensitive alphabetical sort | |
# permitting whole latin alphabet | |
if type(x_mixed_case) == str: | |
x = x_mixed_case.decode('utf8').lower().strip() | |
else: | |
x = x_mixed_case.lower().strip() |
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
# every word in REVO which has more than one definition | |
# ĉiu vorto en REVO kiu havas pli ol unu difino | |
alburno | |
aro | |
asekura agento | |
babilaĉi | |
babilejo | |
babilema | |
babili | |
babilulo |
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
## | |
## An ASCII potato | |
## | |
$the_cow = <<EOC; | |
$thoughts ~??+, | |
$thoughts ,????????? | |
$thoughts =???????????~ | |
$thoughts ==????????????= | |
=+?????????????: | |
:=+?????????????? |