$ 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
Senin, 26 Agustus 2019
Jumat, 09 Agustus 2019
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:
masih di Variable Name. klik Path/Edit/ isi
C:\SDK\platform-tools
E:\gradle\bin
%JDK_HOME%\bin
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)
atauJRE_HOME
jika yang diinstal adalah JRE (Java Runtime Environment)
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
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
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
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]
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]
Jumat, 24 Agustus 2018
Mengatasi kolom id yang kosong.
jika di kolom id ada beberapa data yang kosong, maka bisa di isi dengan di lanjutkan dari id yang besar (desc). caranya seperti dibawah ini
WITH T
AS (SELECT ISNULL((SELECT MAX(id) FROM nama_table), 0) +
ROW_NUMBER() OVER (ORDER BY id) AS id_baru,
id
FROM nama_table
WHERE id is null or id='')
UPDATE T
SET id = id_baru
WITH T
AS (SELECT ISNULL((SELECT MAX(id) FROM nama_table), 0) +
ROW_NUMBER() OVER (ORDER BY id) AS id_baru,
id
FROM nama_table
WHERE id is null or id='')
UPDATE T
SET id = id_baru
Selasa, 31 Juli 2018
update ID yang sama.
pertama buat table temporary untuk menyimpan ID yang unik atau sama.
SELECT
PFN_ID
into temp_table
FROM
PFM_TEMP_PENILAIAN
GROUP BY
PFN_ID
HAVING
COUNT (pfn_id) > 1
setelah itu lanjut dengan script di bawah ini
SELECT a.PFN_ID,b.NIP,'PFN-' + RIGHT (
'z0000000000000' + CONVERT (
VARCHAR (30),
(
(
SELECT
dbo.nvl (
CAST (
dbo.substr (MAX(PFN_ID), 5, 6) AS INTEGER
),
0
)
FROM
PFM_TEMP_PENILAIAN
) + (
row_number () OVER (ORDER BY a.PFN_ID)
)
)
),
6
) AS PFN_ID_BARU INTO temp_table2 from temp_table AS a LEFT JOIN PFM_TEMP_PENILAIAN AS b ON a.PFN_ID=b.PFN_ID
Sekarang update ID baru.
UPDATE T
SET t.PFN_ID = r.PFN_ID_BARU
FROM
PFM_TEMP_PENILAIAN AS T
LEFT JOIN temp_table2 AS r ON T.NIP = r.NIP
AND T.PFN_ID = r.PFN_ID
WHERE
r.PFN_ID IS NOT NULL
SELECT
PFN_ID
into temp_table
FROM
PFM_TEMP_PENILAIAN
GROUP BY
PFN_ID
HAVING
COUNT (pfn_id) > 1
setelah itu lanjut dengan script di bawah ini
SELECT a.PFN_ID,b.NIP,'PFN-' + RIGHT (
'z0000000000000' + CONVERT (
VARCHAR (30),
(
(
SELECT
dbo.nvl (
CAST (
dbo.substr (MAX(PFN_ID), 5, 6) AS INTEGER
),
0
)
FROM
PFM_TEMP_PENILAIAN
) + (
row_number () OVER (ORDER BY a.PFN_ID)
)
)
),
6
) AS PFN_ID_BARU INTO temp_table2 from temp_table AS a LEFT JOIN PFM_TEMP_PENILAIAN AS b ON a.PFN_ID=b.PFN_ID
Sekarang update ID baru.
UPDATE T
SET t.PFN_ID = r.PFN_ID_BARU
FROM
PFM_TEMP_PENILAIAN AS T
LEFT JOIN temp_table2 AS r ON T.NIP = r.NIP
AND T.PFN_ID = r.PFN_ID
WHERE
r.PFN_ID IS NOT NULL
Langganan:
Postingan (Atom)