Skip to content

Instantly share code, notes, and snippets.

View wingyplus's full-sized avatar
😶‍🌫️
Burned out

Thanabodee Charoenpiriyakij wingyplus

😶‍🌫️
Burned out
View GitHub Profile
@wingyplus
wingyplus / test.java
Created July 5, 2011 11:03
lab test for Nong Ying
public class test {
public static void main(String args[]) {
int x = 1;
while(x != 0) {
x = Integer.valueOf(System.console().readLine("enter number: "));
switch (x) {
case 1: oddnum();
break;
case 2: evennum();
@wingyplus
wingyplus / process.php
Created July 11, 2011 08:34
for mid exam
<?php
$start = 2;
$end = 12;
echo "<pre>1234567890123456789012345678901234567890";
for ($i = 1; $i <= $end; $i++) {
if ($i >= 10)
echo "<br>&nbsp;&nbsp;&nbsp;$i&nbsp;&nbsp;&nbsp;$i";
@wingyplus
wingyplus / form.html
Created July 11, 2011 14:56
lab midterm exam
<html>
<body>
<form action="process.php" method="post">
<center>
Input a number(1-99)
<input type="text" name="num" size="2" maxlength="2"/><br/>
<input type="submit" value="Submit It!"/>
<input type="reset" value="Clear It!"/>
</center>
</form>
package Main;
import java.util.Scanner;
public class gweans {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
int testCase = s.nextInt();
s.nextLine();
package Main;
import java.util.ArrayList;
import java.util.Scanner;
public class Doublets {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
ArrayList<String> l = new ArrayList<String>();
boolean b = false;
package Main;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.Scanner;
public class ImageTransformation {
public static void main(String[] args) {
File file = new File("case.in");
Scanner sc;
package Main;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class MyDijkstra {
@wingyplus
wingyplus / Node.java
Created July 22, 2011 06:53
Topology Sorting (convert code from python)
import java.util.LinkedList;
public class Node {
private LinkedList<Node> edges;
private char name;
Node(char name) {
this.name = name;
edges = new LinkedList<Node>();
@wingyplus
wingyplus / Main.java
Created July 24, 2011 06:32
MovieMania
import java.io.File;
import java.io.FileNotFoundException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Scanner;
import java.io.File;
public class ls {
public static void main(String[] args) {
if (args.length == 0) System.out.println("please input path ...");
else {
dirlist(args[0]);
}
}