Skip to content

Instantly share code, notes, and snippets.

View endymuhardin's full-sized avatar

Endy Muhardin endymuhardin

View GitHub Profile
@endymuhardin
endymuhardin / keybase.md
Last active October 31, 2024 02:26
keybase.md

Keybase proof

I hereby claim:

  • I am endymuhardin on github.
  • I am endymuhardin (https://keybase.io/endymuhardin) on keybase.
  • I have a public key whose fingerprint is 1E7B 083C 3A70 7C7D AE8D 4B3C BBA4 76BB C1FB C266

To claim this, I am signing this object:

@endymuhardin
endymuhardin / DemoTransaksiPpob.java
Last active July 10, 2019 10:09
Konfigurasi Mapping COA ke Jurnal Transaksi
String kode = "transaksi-ppob";
List<BigDecimal> nilai = new ArrayList<>();
nilai.add(new BigDecimal(100000)); // pulsa
nilai.add(new BigDecimal(1000)); // fee ks
nilai.add(new BigDecimal(400)); // fee biller
nilai.add(new BigDecimal(600); // fee bank
nilai.add(new BigDecimal(102000)); // pengurangan saldo anggota
postingJurnal(kode, nilai);
@endymuhardin
endymuhardin / DynamicInputController.java
Created February 20, 2019 05:07
Contoh Dynamic Input Field
@Controller
public class DynamicInputController {
@GetMapping("/dynamic-input")
public void displayForm(){}
@PostMapping("/dynamic-input")
public String processForm(@RequestParam Map<String, String> semuaParameter){
// penampungan hasilnya
@endymuhardin
endymuhardin / belajar-embed-gmap.html
Created August 24, 2016 03:09
Contoh HTML untuk menampilkan Google Map
<html>
<head><title>Belajar Geolocation</title></head>
<body>
<h1>Belajar Embed Google Map</h1>
Masukkan koordinat :
<input id="koordinat" type="text" value="-6.2420783,106.8469983">
<button onclick="updatePeta()">Tampilkan di Peta</button>
public class MultivalueReturn {
public static void main(String [] xx){
// bagaimana supaya method ini mengembalikan banyak value?
// value yang diinginkan : kode, nama, harga
cariProduk("biskuit");
// jawaban : buatkan classnya
Produk p = cariProduk("biskuit");
@endymuhardin
endymuhardin / Union.java
Created November 27, 2012 09:23
Cara union dua hasil query
class DtoSaya {
private String tanggal;
private Integer yes;
private Integer no;
// getter setter
}
// nantinya ini hasil query database
Map<String, DtoSaya> query1 = new HashMap<String, DtoSaya>();
@endymuhardin
endymuhardin / PpobClient.java
Created November 26, 2012 10:12
Cara mengakses aplikasi ppob melalui Android
import org.apache.http.impl.client.BasicCookieStore;
import org.apache.http.protocol.BasicHttpContext;
import org.apache.http.protocol.HttpContext;
import org.apache.http.client.CookieStore;
import org.apache.http.client.protocol.ClientContext;
import org.apache.http.client.method.HttpPost;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.NameValuePair;
import org.apache.http.HttpResponse;
import org.apache.http.message.BasicNameValuePair;
@endymuhardin
endymuhardin / log4j.properties
Created July 30, 2012 06:51
Contoh Konfigurasi Log4J
# by default, levelnya adalah INFO, tampilkan ke System.out
log4j.rootLogger=INFO,Konsole
# untuk package com.artivisi, tampilkan level DEBUG ke System.out
log4j.logger.com.artivisi=DEBUG,Konsole
# untuk spring, error saja yang ditampilkan
log4j.logger.org.springframework=ERROR,Konsole
# Appender Konsole adalah System.out
@endymuhardin
endymuhardin / hibernate-statistics.xml
Created July 28, 2012 06:31
Hibernate Spring JMX
<bean id="sessionFactory"
class="org.springframework.orm.hibernate4.LocalSessionFactoryBean"
p:dataSource-ref="dataSource">
<property name="hibernateProperties">
<props>
<prop key="hibernate.generate_statistics">true</prop>
</props>
</property>
<property name="packagesToScan" value="com.artivisi.belajar.restful.domain" />
</bean>
@endymuhardin
endymuhardin / applicationContext.xml
Created July 28, 2012 06:25
Konfigurasi JavaMelody
<bean id="facadeMonitoringAdvisor"
class="net.bull.javamelody.MonitoringSpringAdvisor">
<property name="pointcut">
<bean class="net.bull.javamelody.MonitoredWithInterfacePointcut">
<property name="interfaceName"
value="com.artivisi.belajar.restful.service.MonitoredService"
/>
</bean>
</property>
</bean>