Skip to content

Instantly share code, notes, and snippets.

Working from home

Kamarudin k4m4r82

Working from home
View GitHub Profile
View vb_koneksi_sqlserver_menggunakan_user_windows.vb
Private Function GetOpenConnection() As SqlConnection
Dim conn As SqlConnection = Nothing
' . = localhost
' sqlexpress2008 = instance sql server
' retail = nama database
Dim strConn = "Data Source=.\sqlexpress2008;Initial Catalog=Retail;Integrated Security=True"
conn = New SqlConnection(strConn)
View tes_akses_webservice.php
header('Content-Type: text/plain');
$wsdl = 'http://localhost/ServiceKoperasi/ServiceBarang.svc?wsdl';
$client = new SoapClient($wsdl);
$result = $client->GetAll();
foreach ($result->GetAllResult->Barang as $barang) {
import java.text.DecimalFormat;
import java.text.ParseException;
import android.text.Editable;
import android.text.TextWatcher;
import android.widget.EditText;
public class NumberTextWatcher implements TextWatcher {
private DecimalFormat df;
// get edittext
EditText txtHargaVoucher = (EditText)findViewById(;
// add text change listenr
txtHargaVoucher.addTextChangedListener(new NumberTextWatcher(txtHargaVoucher));
private void bacaFileJson(String fileName) {
try {
InputStream inputStream = this.context.getAssets().open(fileName);
InputStreamReader streamReader = new InputStreamReader(inputStream);
BufferedReader reader = new BufferedReader(streamReader);
while (reader.ready()) {
String json = reader.readLine();
View DemoThousandSeparator.cs
public partial class Form1 : Form
public Form1()
private void Form1_Load(object sender, EventArgs e)
txtThousandSeparator.TextAlign = HorizontalAlignment.Right;
View web.config
<?xml version="1.0" encoding="utf-8"?>
<compilation debug="true" targetFramework="4.0" />
<customErrors mode="Off"/>
View USBSerialNumber.cs
// sumber :
// tambahkan namespace System.Management
public class USBSerialNumber
string _serialNumber;
string _driveLetter;
public string getSerialNumberFromDriveLetter(string driveLetter)
this._driveLetter = driveLetter.ToUpper();
k4m4r82 / DynamicInput.cs
Created May 7, 2015
Contoh Dynamic Input
View DynamicInput.cs
namespace DemoDynamicInput
public partial class Form1 : Form
public Form1()
Button[] btn = new Button[3];
View ParseYmsg
Private Sub ParseYmsg(Data As String)
On Error Resume Next
Dim PckTyp As Long, YChal() As String
PckTyp = (256 * Asc(Mid$(Data, 11, 1)) + Asc(Mid$(Data, 12, 1)))
Select Case PckTyp
Case Is = 6
Dim arrmsg() As String
You can’t perform that action at this time.