Skip to content

Instantly share code, notes, and snippets.

package main
import (
"fmt"
"flag"
)
func main() {
flag.Parse()
s := ""
for i:= 0;i<flag.NArg();i++ {
@6LYTH3
6LYTH3 / gist:1016928
Created June 9, 2011 15:11
line count
package main
import (
"io/ioutil"
"bytes"
"os"
"fmt"
)
func main() {
@6LYTH3
6LYTH3 / gist:1018231
Created June 10, 2011 04:28
line count use bufio
package main
import (
"fmt"
"os"
"bufio"
)
func main() {
lCount := 0
@6LYTH3
6LYTH3 / gist:1084093
Created July 15, 2011 04:50
git clone - abbreviation[String]
package main;
import java.io.File;
import java.util.Scanner;
public class hello {
public static void main(String[] args)throws Throwable /*ท่าไม้ตาย*/ {
File file = new File("test.txt");
@6LYTH3
6LYTH3 / gist:1084178
Created July 15, 2011 06:08
git clone - Misspelling [String]
package main;
import java.io.File;
import java.util.Scanner;
public class Misspelling {
public static void main(String[] args) throws Throwable {
File file = new File("txt");
Scanner scan = new Scanner(file);
int Tc = 0;
@6LYTH3
6LYTH3 / gist:1084281
Created July 15, 2011 07:58
git clone - FakeTickets
package main;
import java.io.File;
import java.util.Scanner;
public class Fake {
public static void main(String[] args) throws Throwable {
File file = new File("txt");
Scanner scan = new Scanner(file);
@6LYTH3
6LYTH3 / gist:1085965
Created July 16, 2011 03:23
ACM_Problem E
package main;
import java.io.File;
import java.util.Scanner;
public class Relation {
public static void main(String[] args) throws Throwable {
File file = new File("txt");
Scanner sc = new Scanner(file);
@6LYTH3
6LYTH3 / gist:1085988
Created July 16, 2011 03:58
ACM_A Tale from the Dark Side of The Moon
package main;
import java.io.File;
import java.util.Scanner;
public class TheMoon {
public static void main(String[] args)throws Throwable{
File file = new File("txt");
Scanner sc = new Scanner(file);
String str;
@6LYTH3
6LYTH3 / gist:1086089
Created July 16, 2011 07:01
Problem_D2
package main;
import java.io.File;
import java.util.Scanner;
import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;
public class Exp {
@6LYTH3
6LYTH3 / Transformation.java
Created July 17, 2011 05:44
Transformation
package main;
import java.util.Scanner;
import java.util.Vector;
public class M {
public static void pro() {
Scanner sc = new Scanner(System.in);
int c = 1;