Skip to content

Instantly share code, notes, and snippets.

View khannedy's full-sized avatar
👀
Orang Ganteng dan Intelek

Eko Kurniawan Khannedy khannedy

👀
Orang Ganteng dan Intelek
View GitHub Profile
@khannedy
khannedy / ExcelConverter.java
Created May 19, 2011 04:29
Java Converter to Microsoft Excel
/*
* Copyright 2011 Eko Kurniawan Khannedy.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@khannedy
khannedy / xbmc.sh
Created May 21, 2011 14:23
Installing XBMC
sudo add-apt-repository ppa:team-xbmc
sudo apt-get update
sudo apt-get install xbmc
sudo apt-get update
sudo apt-get upgrade
@khannedy
khannedy / install.sh
Created May 21, 2011 14:51
Installing XBMC
sudo apt-get update
sudo apt-get install xbmc
sudo apt-get update
sudo apt-get upgrade
@khannedy
khannedy / create-table.sql
Created July 19, 2011 09:11
MySQL Create Table Account Temp
create table accounts_temp(
cust_no varchar(255),
acctno varchar(255),
cycle varchar(255),
lsstdt date,
bk1 varchar(255),
abc varchar(255),
open date,
crelim varchar(255),
hibal varchar(255),
@khannedy
khannedy / load-data.sql
Created July 19, 2011 09:12
Load data from file to mysql
LOAD DATA LOCAL INFILE '/home/echo/Desktop/CCBD007.txt' INTO TABLE accounts_temp FIELDS TERMINATED BY '|' LINES TERMINATED BY '\n' IGNORE 1 LINES (cust_no , acctno , cycle , @lsstdt , bk1 , abc , @open , crelim , hibal , @purdt , @pymdt , dqamcr , dqamx , dqam30 , dqam60 , dqam90 , dqam120 , dqam150 , dqam180 , dqam210 , dqamto , hist24 , @pydudt , amlspy , stcode , @dtstch , sex , @dob , @stdt , newbl , cycdu , bi , tot_currbal , cardno , bkc , @blockdtc, basu , @expdtc , chargeoff , name1 , name2 , haddr1 , haddr2 , haddr3 , city , hposc , hphone1 , hphone2 , mobile_phone_1 , employer_1 , offaddr1 , offaddr2 , offaddr3 , offcity, offposc , offphone1 , offphone2 , ecname , ecadr1 , ecadr2 , echph , ecoph , agnttag , pcode , logo , due ) SET lsstdt = str_to_date( @lsstdt , '%d/%c/%Y'), open = str_to_date( @open , '%d/%c/%Y'), purdt = str_to_date( @purdt , '%d/%c/%Y'), pymdt = str_to_date( @pymdt , '%d/%c/%Y'), pydudt = str_to_date( @pydudt , '%d/%c/%Y'), dtstch = str_to_date( @dtstch , '%d/%c/%Y'), dob = str_
@khannedy
khannedy / about.md
Created August 12, 2011 13:36 — forked from jasonrudolph/about.md
Programming Achievements: How to Level Up as a Developer
@khannedy
khannedy / Browse.java
Created August 30, 2011 08:20
Mengubah Tombol JOptionPane di Java
int result = MessageBoxCreator.showQuestionBox(this, "Buka Website", "Aplikasi akan membuka website StripBandunk \nhttp://stripbandunk.com/", new String[]{"Buka Website", "Batalkan"}, 0);
if (result == 0) {
try {
Desktop desktop = Desktop.getDesktop();
desktop.browse(new URI("http://stripbandunk.com/"));
} catch (IOException ex) {
Logger.getLogger(Form.class.getName()).log(Level.SEVERE, null, ex);
} catch (URISyntaxException ex) {
Logger.getLogger(Form.class.getName()).log(Level.SEVERE, null, ex);
}
@khannedy
khannedy / Connection6.java
Created August 31, 2011 15:42
Project Coin
Connection connection = null;
try {
connection = DriverManager.getConnection("url");
// proses SQL
} catch (SQLException e) {
e.printStackTrace();
} finally {
try {
connection.close();
} catch (SQLException e) {
@khannedy
khannedy / MultiCatchAfter.java
Created September 3, 2011 08:42
Fitur Baru di Java 7 – Project Coin (Bagian 2)
FileInputStream stream = null;
try {
stream = new FileInputStream("");
URL url = new URL("");
} catch (FileNotFoundException | MalformedURLException ex) {
ex.printStackTrace();
} finally {
try {
stream.close();
} catch (IOException ex) {
@khannedy
khannedy / AddMenu.java
Created September 3, 2011 12:09
Eksplorasi Fitur JButtonPopup pada Framework JWidget StripBandunk
JMenuItem menuItem = jButtonPopup1.addMenuItem("Menu Item Satu");
JMenuItem menuItem1 = jButtonPopup1.addMenuItem("Menu Item Dua");
JMenuItem menuItem2 = jButtonPopup1.addMenuItem("Menu Item Tiga");
JMenuItem menuItem3 = jButtonPopup1.addMenuItem("Menu Item Empat");
JMenuItem menuItem4 = jButtonPopup1.addMenuItem("Menu Item Lima");
JMenuItem menuItem5 = jButtonPopup1.addMenuItem("Menu Item Enam");
JMenuItem menuItem6 = jButtonPopup1.addMenuItem("Menu Item Tujuh");