Skip to content

Instantly share code, notes, and snippets.

View vbcupu's full-sized avatar

Martin Eko Setiawan vbcupu

View GitHub Profile
<?php
require_once 'vendor/autoload.php';
/* function decrypt dan kompresi dijadikan satu */
function stringDecrypt($key, $string)
{
$encrypt_method = 'AES-256-CBC';
// hash
$key_hash = hex2bin(hash('sha256', $key));
@vbcupu
vbcupu / pemutarfilewav
Created July 8, 2021 02:13
pemutar file wav dengan vb6
Option Explicit
Private Const SND_APPLICATION = &H80 ' look for application specific association
Private Const SND_ALIAS = &H10000 ' name is a WIN.INI [sounds] entry
Private Const SND_ALIAS_ID = &H110000 ' name is a WIN.INI [sounds] entry identifier
Private Const SND_ASYNC = &H1 ' play asynchronously
Private Const SND_FILENAME = &H20000 ' name is a file name
Private Const SND_LOOP = &H8 ' loop the sound until next sndPlaySound
Private Const SND_MEMORY = &H4 ' lpszSoundName points to a memory file
Private Const SND_NODEFAULT = &H2 ' silence not default, if sound not found
Private Const SND_NOSTOP = &H10 ' don't stop any currently playing sound
Private Sub Command1_Click()
Dim sfc As New FileSystemObject 'Inisialisasi komponen file system object
If sfc.FolderExists(App.Path & "\folderku") = False Then 'Cek apakah folderku ada di folder aplikasi
sfc.CreateFolder (App.Path & "\folderku") 'Jika Tidak Ada, Maka Buat folder dengan nama folderku di folder aplikasi
Call MsgBox("Folderku Sudah Di Buat")
End If
End Sub
Private Sub cmdKirim_Click()
On Error Resume Next
TotalKirim = 0
iPost = 0
txtresult.Text = ""
Call openConnection(dbconn)
strSQL = "select * from V_KetersediaanKamarSIRSNew2020 order by KelasSIRS"
Call msubRecFO(rs, strSQL, dbconn)
statcovid = "0"
Private Function kirimSirs(id_tt, NamaRuangan, jumlahruang, jmlkamar, terpakai, prepare, prepareplan, covid As String) As Boolean
On Error GoTo ErrorNda
Dim unixtime As String
Dim url As String
Dim xUserrs As String
Dim xPassrs As String
Dim tPost As String
Dim req As WinHttp.WinHttpRequest
Dim hasil As String
Private Function ConvertToTglUnix(tgl As Date) As String
ConvertToTglUnix = (tgl - DateSerial(1970, 1, 1)) * 86400
End Function
Private Function xtime(time As Date) As String
Dim the_date As Date
Dim system_time As SYSTEMTIME
Dim local_file_time As FILETIME
Dim utc_file_time As FILETIME
' Get the local time.
Option Explicit
Private Type FILETIME
dwLowDateTime As Long
dwHighDateTime As Long
End Type
Private Type SYSTEMTIME
wYear As Integer
wMonth As Integer
wDayOfWeek As Integer
<?php
date_default_timezone_set('Asia/Jakarta');
$Xrsid = ""; //koders
$Xpass = ""; //password sirs
$currentDate = time();
$now = new DateTime();
$unixTime = $now->getTimestamp();
$url = "http://sirs.kemkes.go.id/fo/index.php/Fasyankes";
@vbcupu
vbcupu / gist:9ff2f1a7ef62f5b733b7a2d4c79a76c9
Last active February 11, 2019 08:53
convert flexgrid ke excel di visual basic 6
Private Sub cmdConvertExcell_Click()
''Flex2Excel fgData, "Export of Data"
'
Dim xlObject As Excel.Application
Dim xlWB As Excel.Workbook
@vbcupu
vbcupu / gist:37a03ea7a054ea2b9c1a2fb51e22d105
Created February 11, 2019 08:42
load form inside picturebox
Option Explicit
Private Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long
Private Sub Command1_Click()
Call tutupsemua
Form2.Show
SetParent Form2.hWnd, Picture1.hWnd ' You could also substitute a Frame for the picturebox
Form2.Move 0, 0
End Sub
Private Sub tutupsemua()
Unload Form2