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
Private Function GetOpenConnection() As SqlConnection | |
Dim conn As SqlConnection = Nothing | |
Try | |
' . = localhost | |
' sqlexpress2008 = instance sql server | |
' retail = nama database | |
Dim strConn = "Data Source=.\sqlexpress2008;Initial Catalog=Retail;Integrated Security=True" | |
conn = New SqlConnection(strConn) |
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
<?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) { |
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
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; |
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
// get edittext | |
EditText txtHargaVoucher = (EditText)findViewById(R.id.txtHargaVoucher); | |
// add text change listenr | |
txtHargaVoucher.addTextChangedListener(new NumberTextWatcher(txtHargaVoucher)); |
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
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(); |
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
public partial class Form1 : Form | |
{ | |
public Form1() | |
{ | |
InitializeComponent(); | |
} | |
private void Form1_Load(object sender, EventArgs e) | |
{ | |
txtThousandSeparator.TextAlign = HorizontalAlignment.Right; |
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"?> | |
<configuration> | |
<system.web> | |
<compilation debug="true" targetFramework="4.0" /> | |
<customErrors mode="Off"/> | |
</system.web> | |
<system.webServer> |
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
// sumber : https://social.msdn.microsoft.com/Forums/en-US/923ccb2e-857e-429d-90ae-00f73e32eba4/getting-usb-flash-drive-serial-number-in-c?forum=wdk | |
// tambahkan namespace System.Management | |
public class USBSerialNumber | |
{ | |
string _serialNumber; | |
string _driveLetter; | |
public string getSerialNumberFromDriveLetter(string driveLetter) | |
{ | |
this._driveLetter = driveLetter.ToUpper(); |
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
namespace DemoDynamicInput | |
{ | |
public partial class Form1 : Form | |
{ | |
public Form1() | |
{ | |
InitializeComponent(); | |
Button[] btn = new Button[3]; |
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
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 |
OlderNewer