Cara Crawl / Index Site ke Google
Kunjungi alamat https://search.google.com/search-console
Klik Menu dibawah ini lalu pilih add properties
Lalu isikan alamatnyaJika sudah klik verify jika berhasil lanjut ke step selanjutnya
Isikan alamatnya seperti gambar di bawah ini
jika sudah tunggu proses maka muncul page di bawah ini
setelah itu Klik Request Indexing
MySQL Pelajari Penting
- Limit ... Offset...
- Group_Concat
- Self Join (https://www.educba.com/mysql-self-join/)
-
MySQL LAST_INSERT_ID() how it works at multi-users environment
Untuk mengambil data id yang terakhir di insertkan bisa memakai fungsi berikut
LAST_INSERT_ID()
LAST_INSERT_ID() gives you the last autogenerated id on the connection you execute it on, it does not return the last insert id globally produced by the MySQL server.
sauce : https://stackoverflow.com/questions/5835677/last-insert-id-how-it-works-at-multi-users-environment
MySQL Stored Procedure : Create a procedure to insert and update table header and details in mysql
DELIMITER //CREATE PROCEDURE insert_update_table (IN p_header_value VARCHAR(50), IN p_detail_value VARCHAR(50))BEGIN-- Check if the header already exists in the tableIF EXISTS (SELECT * FROM your_table WHERE header_column = p_header_value) THEN-- Update the existing recordUPDATE your_table SET detail_column = p_detail_value WHERE header_column = p_header_value;ELSE-- Insert a new recordINSERT INTO your_table (header_column, detail_column) VALUES (p_header_value, p_detail_value);END IF;END //DELIMITER ;
CALL insert_update_table('Header Value', 'Detail Value');
Displaying URL parameter values as text in an element on webpage
source https://stackoverflow.com/questions/71727647/displaying-url-parameter-values-as-text-in-an-element-on-webpage-question-from
<!-- example url https://exampleurl.com/?birthdate=22091977&pdflink=yourlink123.pdf-->
<html>
<body>
<span id="birthdate"></span>
</br>
<span id="pdflink"></span>
</body>
</html>
<script>
const queryString = window.location.search;
const urlParams = new URLSearchParams(queryString);
const birthdate = urlParams.get('birthdate');
const pdflink = urlParams.get('pdflink');
document.getElementById("birthdate").innerHTML = birthdate;
document.getElementById("pdflink").innerHTML = pdflink;
</script>
MySQL Stored Procedure : Insert Data in Header and Detail within 1 Transaction
This is Generated by ChatGPT 2023-11-01
To insert data into a single-row header table and multiple-row detail table using a stored procedure in MySQL, you can follow these steps. In this example, we'll create two tables: header and detail, with a one-to-many relationship, and then create a stored procedure to insert data into both tables.
Assuming you have the following tables:
CREATE TABLE header (
header_id INT AUTO_INCREMENT PRIMARY KEY,
header_data VARCHAR(255)
);
CREATE TABLE detail (
detail_id INT AUTO_INCREMENT PRIMARY KEY,
header_id INT,
detail_data VARCHAR(255),
FOREIGN KEY (header_id) REFERENCES header(header_id)
);
Here's a stored procedure to insert data into both tables:
DELIMITER $$
CREATE PROCEDURE InsertHeaderAndDetails(
IN headerData VARCHAR(255),
IN detailDataArray JSON
)
BEGIN
DECLARE done INT DEFAULT FALSE;
DECLARE detailValue VARCHAR(255);
DECLARE cur CURSOR FOR SELECT value FROM JSON_TABLE(detailDataArray, '$[*]' COLUMNS(value VARCHAR(255) PATH '$'));
-- Insert data into the header table
INSERT INTO header (header_data) VALUES (headerData);
SET @lastHeaderID = LAST_INSERT_ID(); -- Get the last inserted header ID
-- Insert data into the detail table
OPEN cur;
read_loop: LOOP
FETCH cur INTO detailValue;
IF done THEN
LEAVE read_loop;
END IF;
INSERT INTO detail (header_id, detail_data) VALUES (@lastHeaderID, detailValue);
END LOOP;
CLOSE cur;
END $$
DELIMITER ;
This stored procedure takes two parameters:
headerData: The data to be inserted into the header table.
detailDataArray: A JSON array containing the data to be inserted into the detail table.
You can call the stored procedure like this:
CALL InsertHeaderAndDetails('Header Data', '["Detail 1", "Detail 2", "Detail 3"]');
Radmin VPN Alternative
ZeroTier
Freelan
Hamachi
sc https://www.saashub.com/zerotier-one-alternatives https://www.saashub.com/radmin-vpn-alternatives
Log USB insert / Eject Using USBLogView by nirsoft
USBLogView is a small utility that runs in the background and records the details of any USB device that is plugged or unplugged into your system. For every log line created by USBLogView, the following information is displayed: Event Type (Plug/Unplug), Event Time, Device Name, Description, Device Type, Drive Letter (For storage devices), Serial Number (Only for some types of devices), Vendor ID, Product ID, Vendor Name, Product Name, and more...
You can easily select one or more log records and then export them into csv/tab-delimited/xml/html file.
To Download Click This link
http://www.nirsoft.net/utils/usb_log_view.html
or This Direct Link
Visual Studio Code - Removing Lines Containing criteria
This method dont need any Extension
1. Ctrl+F to open find.
2. Paste your string.
3. Alt+Enter to select all of the instances of the string on the page.
4. Ctrl+L to broaden the selection to the entire line of each instance on the page.
5. Delete/Backspace to remove those lines.
This method u need this extension https://marketplace.visualstudio.com/items?itemName=qcz.text-power-tools
[Fix Error] Kode Error 0x0000011b Windows 10 Sharing Printer
Kode error 0x0000011b muncul saat ingin melakukan sharing printer pada windows 10. Error tersebut disebabkan oleh update terbaru windows 10 2021-09 Cumulative Update for Windows 10 Version 21H1 for x64-based Systems (KB5005565).
Cara mengatasi problem tersebut yaitu :
Buka Windows Registry Editor (regedit)
Kemudian arahkan ke HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print
Kemudian buat DWORD-32 baru dengan nama RpcAuthnLevelPrivacyEnabled set Value Data : 0
Selanjutnya Restart PC / Laptop
Error 0x0000011b akan hilang dan sharing printer bisa digunakan kembali.
source : https://pdsi.unisayogya.ac.id/fix-error-kode-error-0x0000011b-windows-10-sharing-printer/
PowerShell merubah nama file extensi tertentu dengan tambahan tanggal dalam 1 folder
Contoh diatas adalah file awal saat sebelum di rename, anda bisa menggunakan script dibawah ini untuk menambahkan prefix/suffix pada filenya
Get-ChildItem |Foreach-Object { Rename-Item $_ -NewName ("{0}-{1}{2}" -f $_.LastWriteTime.ToString('yyyyMMdd'),$_.BaseName,$_.Extension) }
jika ingin nama file tetap di depan anda bisa menggunakan script dibawah ini
Get-ChildItem |Foreach-Object { Rename-Item $_ -NewName ("{0}-{1}{2}" -f $_.BaseName,$_.LastWriteTime.ToString('yyyyMMdd'),$_.Extension) }
Menghapus File Ukuran Besar pada Git History
Git filter branch |
Fungsi git filter-branch
Cara menggunakannya adalah sebagai berikut
git filter-branch --force --index-filter \
'git rm --cached --ignore-unmatch lokasi/ke/file.exe' \
--prune-empty --tag-name-filter cat -- --all
Jika sudah dijalankan maka akan muncul gambar seperti di atas
file.exe adalah file yang ingin di hapus dari semua history github repo yang telah disimpan, cara ini dapat menghemat banyak sekali space pada local repo sehingga ukuran repo tidak membengkak.
setelah proses selesai maka eksekusi command di bawah ini
git push origin --force --all
Git Push Force |
jika git menemukan file lain yang ukurannya besar maka akan diberikan peringatan tetang file tersebut
Git Bash Info |