Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Chukkrit Visitsaktavorn jukbot

🏠
Working from home
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 / 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 / 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 / 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 Package Control Sublime Settings
{
"bootstrapped": true,
"in_process_packages":
[
],
"installed_packages":
[
"AdvancedNewFile",
"All Autocomplete",
"AngularJS",
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?
}
}
You can’t perform that action at this time.