Senin, 26 Agustus 2019

Error ketika melakukan git pull

$ git pull
remote: Counting objects: 175, done.
remote: Compressing objects: 100% (116/116), done.
error: inflate: data stream error (unknown compression method)
error: unable to unpack 0db989973be9077d883442f400d41780d8b61cc5 header
fatal: SHA1 COLLISION FOUND WITH 0db989973be9077d883442f400d41780d8b61cc5 !
fatal: index-pack failed

Solusi:

git reflog expire --expire-unreachable=now --all

git gc --prune=now

Jumat, 09 Agustus 2019

Query Format Tanggal

http://www.sql-server-helper.com/tips/date-formats.aspx

Kamis, 25 Juli 2019

Cek Spesial Karakter dengan Javascript

var cek_hasil_pekerjaan2 = cek_hasil_pekerjaan.replace(/[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]+/,'');

Selasa, 16 April 2019

Set JAVA_HOME

di windows run, ketik Environment Variables di

Windows 7 – Right click My Computer and select Properties > Advanced
Windows 8 – Go to Control Panel > System > Advanced System SettingsWindows 10 – Search for Environment Variables then select Edit the system environment variables
Click the Environment Variables button.
Dibawah System Variables, click New.


di Variable Name field, isi:
  • JAVA_HOME jika yang diinstal adalah JDK (Java Development Kit)
    atau
  • JRE_HOMEjika yang diinstal adalah JRE (Java Runtime Environment) 
di kolom Variable Value, isi lokasi JDK or JRE yang mana telah di install .contoh: C:\Program Files\Java\jdk1.8.0_201

masih di Variable Name. klik Path/Edit/ isi

C:\SDK\platform-tools
E:\gradle\bin
%JDK_HOME%\bin

Senin, 15 April 2019

Define SDK

Ketika membuat projek baru react native. buka file, di ProjekBaru/android/local.properties

copy dan past 2 baris di bawah ini. sesuai dengan lokasi kita install SDK
ndk.dir=C\:\\SDK\\ndk-bundle
sdk.dir=C\:\\SDK

Kamis, 21 Maret 2019

koneksi adb ke devices (reac-native node js)

Untuk pertama kali koneksi ke hp, pastikan laptop dan HP 1 jaringan. colok kabel data dari hp ke laptop atau pc.masuk ke directory dimana aplikasi mobile disimpan.

D:\www\aplikasi_android>adb devices

setelah itu allow notifikasi di hp. ketik lagi adb devices
D:\www\aplikasi_android>adb devices

buat port
D:\www\aplikasi_android>adb tcpip 12345

konek ke ip hp.
 D:\www\aplikasi_android>adb connect 171.0.0.1:12345

aktifkan dan running android
 D:\www\aplikasi_android>react-native run-android

Kamis, 21 Februari 2019

Port 80 in use by "Unable to open process" with PID 4!

jika terjadi masalah ketika mengaktifkan Apache seperti kasus ini ( Port 80 in use by "Unable to open process" with PID 4! )

ubah port 80 menjadi 8080 di directory  C:\xampp\apache\conf

Senin, 04 Februari 2019

Execute File *.sql

Fungsi untuk eksekusi beberapa table di dalam database.

sqlcmd -s MSSQLSERVER\DESKTOP-PNHNPC9 -i E:\data\spasi\SIMFOSIA_part3.sql

contoh isi file

USE [nama_db]

GO
/****** Object:  Table [dbo].[nama_table]    Script Date: 04/02/2019 13.39.52 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[nama_table](
    [ID] [numeric](38, 0) NULL,
    [TGL_AKTIF] [date] NULL,
    [TGL_END] [date] NULL,
    [JNS_KANTOR] [numeric](38, 0) NULL,
    [KET_KANTOR] [varchar](100) NULL,
    [CMP_ID] [varchar](10) NULL,
    [KETERANGAN] [text] NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]