Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Chukkrit Visitsaktavorn jukbot

🏠
Working from home
Block or report user

Report or block jukbot

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jukbot
jukbot / RandomColorBG.css
Last active Aug 29, 2015 — forked from anonymous/my.css
Windows 8 random background color animate with CSS3 Animation
View RandomColorBG.css
background: linear-gradient(131deg, #1b9475, #1b7e94, #1b4894, #281b94, #531b94, #891b94, #941b1f, #94411b, #948c1b, #51941b, #1b9430);
background-size: 2200% 2200%;
-webkit-animation: AnimationName 60s ease infinite;
-moz-animation: AnimationName 60s ease infinite;
-o-animation: AnimationName 60s ease infinite;
animation: AnimationName 60s ease infinite;
@-webkit-keyframes AnimationName {
    0%{background-position:2% 0%}
    50%{background-position:99% 100%}
    100%{background-position:2% 0%}
@jukbot
jukbot / JukFullDate.java
Last active Aug 29, 2015
Java Fulldate format for GUI
View JukFullDate.java
import java.util.Calendar;
import java.util.GregorianCalendar;
class JukFullDate {
public static void main (String args[]) {
int timeRun = 0;
//initComponents();
new Thread() {
public void run() {
@jukbot
jukbot / KiloToMile.java
Last active Aug 29, 2015
Convert kilimeter into mile unit
View KiloToMile.java
import java.io.*;
import java.util.*;
public class KiloToMile {
public static void main(String[] args) {
System.out.println("Miles Kilometers");
System.out.println("----------------------------------------------");
int kilo = 0;
while(kilo < 100) {
kilo++;
float result = kilo*1.609344f;
@jukbot
jukbot / GetLoopTime.java
Created Jan 22, 2015
Display time with interval 1 second loop
View GetLoopTime.java
import java.util.Date; //import Date class
class GetLoopTime {
public static void main (String [] args) {
while (true) { // Run infinity print
try {
Date now = new Date();
String ab;
switch (Integer.parseInt(String.format("%te",now))%10) { // Find case of some days that ended with 1, 2, or 3
case 1 : ab = "st";
break;
@jukbot
jukbot / Arraylab.java
Created Jan 25, 2015
Cut array indexs and insert array
View Arraylab.java
package arraylab;
public class Arraylab {
public static void main(String[] args) {
int arr[] = new int[100];
// add 2^i to the array where 0 <= i <= 20
// EX: arr[1,2,4,8,16,32,64,... 2^30]
int expo=1;
for (int i=0; i < 100; i++) {
arr[i] = expo;
View ReverseStack
import java.util.Stack;
public class ReverseStack {
public static void main(String[] args) {
Stack<Integer> stack = new Stack<Integer>();
stack.push(5);
stack.push(4);
stack.push(3);
stack.push(2);
View application.html.slim
doctype html
html
head
title
| Shopper2
= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true
= javascript_include_tag 'application', 'data-turbolinks-track' => true
= csrf_meta_tags
body
View SimpleDateString
import java.util.Date;
class JukSimpleDate {
public static void main (String args[]) {
java.util.Date date = new java.util.Date();
int n = 100000000;
while(true) {
System.out.println(date.toString());
}
}
}
View IsNull?
public class JukIsNull {
private String name;
public void setName (String name) {
if(name == null ) {
String name2 = "JukHappy";
}
this.name = (name == null) ? name : name2; // <<-- check that is null?
}
}
View GCD-recursive
import java.util.Scanner;
public class GCD {
public static void main (String[] args) {
Scanner input = new Scanner(System.in);
System.out.println("Give me 2 numbers for GCD question: ");
int x = input.nextInt();
int y = input.nextInt();
int z = gcd1(x,y);
System.out.println("GCD of " + x + " and " + y + " are " + z);
You can’t perform that action at this time.