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/env python | |
| class Node( object ): | |
| def __init__( self, end_node = False ): | |
| self.end_node = end_node | |
| self.prefix_count = 0 | |
| self.children = {} | |
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
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <unistd.h> | |
| #include <termios.h> | |
| int main(){ | |
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 java.io.*; | |
| public class stdinReader1 { | |
| public static void main( String args[] ){ | |
| System.out.println( "Moi kaikki!" ); | |
| try { | |
| BufferedReader reader = new BufferedReader( new InputStreamReader( System.in ) ); |
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 java.io.*; | |
| import java.util.Iterator; | |
| import java.util.HashMap; | |
| import java.util.SortedMap; | |
| import java.util.TreeMap; | |
| import java.util.ArrayList; | |
| import java.util.Collections; |
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 java.io.*; | |
| import java.util.HashMap; | |
| import java.util.ArrayList; | |
| import java.util.Collections; | |
| // Linkki kahden noden välillä | |
| class Edge { | |
| private String fromNode, toNode; | |
| private double weight; // weight == etäisyys noiden kahden noden välillä |
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/env python | |
| class HtmlDocument( object ): | |
| TAGS = ['html', 'head', 'body', 'div', 'link', 'script', | |
| 'title', 'meta', 'p', 'a', 'span', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', | |
| 'ul', 'li', 'ol', 'pre', 'code', 'footer', 'article', 'canvas', 'img', 'text' ] | |
| def __init__( self ): |
NewerOlder