This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Variable declaration | |
MYSQL_ROOT_USER=root | |
MYSQL_ROOT_PASSWD=admin | |
HOME_DIR=/export/home | |
TMP_FILE=/tmp/LIST_OF_USER.txt | |
SQL_FILE=/tmp/SQL_FILE.sql | |
# Function declaration |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Implementasi custom calculator dengan menggunakan algoritma Shunting-Yard | |
// Referensi Algoritma : http://en.wikipedia.org/wiki/Shunting-yard_algorithm | |
// Contoh : http://www.chris-j.co.uk/parsing.php | |
// Custom calculator untuk melakukan conversi rumus menjadi nilai akhir | |
// @param String rumus: Informasi tentang rumus yang ingin dihitung. | |
// Contoh rumus adalah : | |
// - a+b*c | |
// - ((a+b)*c*d/(e+f)) | |
// - a/b/c*d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package id.web.martinusadyh.iso8583.helper; | |
public class DecimalHexBinaryConverter { | |
public static String decimalToHexa(Integer decimalNumber) { | |
return Integer.toHexString(decimalNumber); | |
} | |
public static String decimalToBinary(Integer decimalNumber) { | |
StringBuilder binaryNumber = new StringBuilder(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package id.web.martinusadyh.iso8583.helper; | |
public class ISOUtil { | |
/** Mencari panjang dari Bitmap 16 karakter atau 32 karakter, jika bit pertama | |
* nilai-nya == 1 (active/TRUE) maka secondary bitmap active dan otomatis | |
* panjang bitmap menjadi 32 karakter. | |
* @param originalMsg message asli ISO beserta dengan MTI-nya | |
* @return panjang bitmap yang harus di potong / diambil. | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package id.web.martinusadyh.iso8583.socket; | |
import id.web.martinusadyh.iso8583.helper.ISOUtil; | |
import java.io.IOException; | |
import java.io.InputStreamReader; | |
import java.io.PrintWriter; | |
import java.net.ServerSocket; | |
import java.net.Socket; | |
import java.util.HashMap; | |
import java.util.Map; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package id.web.martinusadyh.iso8583.socket; | |
import id.web.martinusadyh.iso8583.helper.ISOUtil; | |
import java.io.IOException; | |
import java.io.InputStreamReader; | |
import java.io.PrintWriter; | |
import java.net.Socket; | |
import java.net.UnknownHostException; | |
import java.text.SimpleDateFormat; | |
import java.util.Date; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
<!DOCTYPE isopackager SYSTEM "genericpackager.dtd"> | |
<!-- packager/iso93ascii.xml --> | |
<!-- ISO 8583:1993 (ASCII) field descriptions for GenericPackager --> | |
<isopackager> | |
<isofield | |
id="0" | |
length="4" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package id.web.martinusadyh.iso8583.jpos; | |
import org.jpos.iso.IFA_AMOUNT; | |
import org.jpos.iso.IFA_BINARY; | |
import org.jpos.iso.IFA_BITMAP; | |
import org.jpos.iso.IFA_LLCHAR; | |
import org.jpos.iso.IFA_LLLCHAR; | |
import org.jpos.iso.IFA_LLNUM; | |
import org.jpos.iso.IFA_NUMERIC; | |
import org.jpos.iso.IFB_BINARY; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Untuk packager bertipe xml | |
ISOPackager packager = new GenericPackager("packager/iso93ascii.xml"); | |
// Untuk packager bertipe class | |
ISOPackager packager = new CustomPackager(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
ASCIIChannel channel = new ASCIIChannel(hostname, portNumber, packager); | |
... |
OlderNewer