Skip to content

Instantly share code, notes, and snippets.

@nommy
nommy / AlertDialogExample1
Created November 15, 2011 04:22
android,UI,AlertDialog(3buttons)
package com.alertdialog;
import android.app.Activity;
import android.os.Bundle;
import android.widget.LinearLayout;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.view.View.OnClickListener;
import android.app.AlertDialog;
@nommy
nommy / android,UI,AlertDialog(3buttons)
Created November 15, 2011 04:35
android,UI,AlertDialog(3buttons),shortcode version
package com.DialogTest;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.os.Bundle;
public class AlertDialogTest2Activity extends Activity {
/** Called when the activity is first created. */
@nommy
nommy / regep java 1
Created December 2, 2011 05:28
Todays Java Code (regep)
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class regep {
/**
* @param args
*/
public static void main(String[] args) {
@nommy
nommy / gist:1467937
Created December 12, 2011 15:43
Techno100Selection Plain Text Ver
ABCDEFGHIJKLMNOPQRSTUVWXYZ
A:
Adam Beyer & Lenk - Drum Code No.1 (Planetary Assault Systems Remix 1)
http://www.youtube.com/watch?v=Pk7kYDR0OFk
The Advent - Distract (Original Mix)
http://www.youtube.com/watch?v=GYlLGMlEMEI
Akufen - Deck the House
@nommy
nommy / qq.rb
Created May 23, 2012 03:21
AOJ Problem Volume0 0000 - QQ
for i in 1..9
for j in 1..9
product = i * j
puts i.to_s + "x" + j.to_s + "=" + product.to_s
end
end
@nommy
nommy / listof.rb
Created May 23, 2012 03:49
AOJ Problem Volume0 0001 - List of Top 3 Hills
sample_input = [1819, 2003, 876, 2840, 1723, 1673, 3776, 2848, 1592, 922]
puts sample_input.sort.reverse[0..2]
@nommy
nommy / x_cubic.rb
Created May 23, 2012 04:10
AOJ Problem Volume100-10001 - X Cubic
x = gets.chomp
puts x.to_i ** 3
@nommy
nommy / Rectangle.rb
Created May 23, 2012 04:45
AOJ Problem Volume100-10002 - Rectangle
x = gets.chomp
s = x.split(nil)
a = x.split[0].to_i
b = x.split[1].to_i
area = a * b
compass = a**2 + b**2
puts area.to_s + " " + compass.to_s
@nommy
nommy / Small, Large, or Equal.rb
Created May 25, 2012 12:28
AOJ Problem Volume100-10003 - Small, Large, or Equal
x = gets.chomp
s = x.split(nil)
a = x.split[0].to_i
b = x.split[1].to_i
if a < b
puts "a < b"
elsif a > b
puts "a > b"
else a == a
@nommy
nommy / hello.rb
Created May 26, 2012 16:00
AOJ Problem Volume100-10005 - Print Many Hello Worl
for i in 1..1000
puts "Hello World"
end