The Way Of Life
Google

Friday, December 15, 2023

How to avoid warning “Sorry, this file is infected with a virus” on Google Drive

Google Drive - Sorry, this file is infected with a virus

Today, I want to share my personal experience with Google Drive. I uploaded my setup file from my app that I’ve made. I know precisely that my app is clean from malicious code. But Google detects that setup files are a kind of virus when someone downloads my share link. Google shows the warning message “Sorry, this file is infected with a virus. Only the owner is allowed to download infected files.”

Maybe, It’s hard for us to search for lines of code that are suspected by Google as virus or because of other reasons. So I make a simple trick for this and remember, this is for a good reason. Don’t upload a dangerous app or file using this trick.

My trick is, I compressed the setup file with Winrar, checked the Encrypt file names  option and add password for ex: 1234 or abcd or up to you. Then re-upload .rar file to Google Drive.

 

compress with password

If you want to use the “official way”, you can request to Google Trust & Safety team to review your file, from my experience, it takes about a few weeks or months, or maybe your files cannot pass the review.

After that you can re-share your download link on Google Drive.

Please use these tips for Good Things.


Good Luck.


software :

Google Drive

WinRAR

 

Labels: , , , ,

Monday, November 20, 2023

Aplikasi untuk Mengirim Pesan WhatsApp Otomatis

Kali ini saya akan sharing tentang bagaimana cara untuk mengirim pesan WhatsApp secara otomatis menggunakan aplikasi yang kita buat sendiri. Ada banyak cara yang bisa anda temukan di internet. Artikel yang saya tulis ini adalah salah satu caranya dan sudah saya buktikan berhasil.

Langkah langkahnya antara lain :

  1. Proses pengambilan data. Pada proses ini ada beberapa cara, antara lain menggunakan koneksi ke database langsung atau menggunakan API ( Application Programming Interface). Cara yang terakhir ini biasanya dipergunakan jika kita mengakses sistem yang dibuat oleh orang/pihak lain.
  2. Proses pengolahan data. Pada proses ini data yang sudah diterima harus diolah dahulu. Misal dalam tema kali ini adalah pengiriman pesan. Maka data mentah yang berupa misal nama,  alamat dan nomor telepon, perlu ditambah kalimat pesan sesuai dengan kebutuhan yang diinginkan.
  3. Proses pengiriman pesan. Pengiriman pesan WA untuk broadcast khususnya saat ini dimungkinkan melalui API yang disediakan rekanan WhatsApp yang ada di indonesia. Untuk saat ini karena kebetulan saya menggunakan produk dari Maxchat. Bukan karena saya ingin mempromosikan maxchat.

IMPLEMENTASI

Karena kebetulan aplikasi yang saya buat adalah menarik data dari sistem pihak lain, maka saya menggunakan API yang telah disediakan oleh vendor. Aplikasi yang saya buat adalah aplikasi Notifikasi WA di sebuah sekolah internasional. Aplikasi ini mengirimkan data ke orang tua murid jika salah satu anaknya masuk ke klinik di sekolah karena sudah hal.

  1. Proses memanggil fungsi API ke Skyward ( Sistem Informasi Akademik yang digunakan sekolah tersebut) saya kebetulana menggunakan bahasa pemogramaman Microsoft Visual Basic. Sebenarnya dengan bahasa pemrograman apa saja juga memungkinkan asal ada fungsi HTPP Request. Proses ini biasanya memerlukan beberapa parameter yaitu, alamat URL, user, password dan token. Ada bisa membaca detailnya ditulisan saya sebelumnya disini.
  2. Pengolahan data. Setelah data diterima aplikasi (biasanya dalam bentuk JSON ) melalui http request yaitu berupa field student id, student name, status orang tua ( Ayah, Ibu, Guardian, Lain-nya ), Nama Ayah, nomor HP Ayah, Nama Ibu nomor HP Ibu, Nama Guardian, Nomor HP Guardian, Kelas, tanggal transaksi, alasan masuk klink, treatment, comment, dsb.  Maka perlu ditambahkan pesan tambahan agar pesan enak dan layak dibaca oleh orang tua murid yang nantinya akan menerima pesan WA. Juga untuk penyimpanan data ke database (MySQL/MariaDB) untuk mencatat log error serta mengecek apakah pesan tersebut sudah dikirim atau belum sehingga tidak ada duplikasi pengiriman pesan WA. 
  3. Proses pengiriman data. Kebetulan saya menggunakan API WA dari Maxchat. Sebanarnya ada banyak vendor rekanan WA di Indonesia selain Maxchat. Hanya karena kebetulan saya menggunakan API dari Maxchat maka fitur fitur dari maxchat yang akan saya bahas. Parameter yang akan diperoleh dari maxchat adalah url endopoint untuk API.

Jika anda sudah mendaftar di maxchat maka anda akan mendapatkan link url dan authorization key, lalu dokumentasi API yang bisa anda explore. Contoh link ada di bawah ini.

URL : https://core.maxchat.id/ nama-perusahaan /api/messages?skipBusy=true

Authorization : passkey

Dokumentasi : https://core.maxchat.id/nama-perusahaan/docs

  

Contoh format pesan text yang dikirim dalam bentuk JSON:

 {

"to":"0810000000000",

"type":"text",

"text":"Dear, *Mr. xxxx*\n \nWe would like to inform you that *Your Son* has visited school clinic.\n \nDate: 00 Nov 2023\nTime: 07:48:32 am\nOffice Visit Reason(s): Runny Nose\nTreatment(s): Apply Vicks VapoRub\nDisposition(s): Return to Class\nExamined By: Nurse \nComment: \nNotes: \n \n \nThank You.\n School Name \nFor further information please contact the school admin at\nhttps://wa.me/628200000000\n*This is an automated message - do not reply*",

"useTyping": true

}

Di maxchat juga disediakan fitur untuk mengecek apakah sebuah nomor wa aktif atau tidak dengan URL API : https://core.maxchat.id/nama-perusahaan/api/check?phone=081000000000'


Dengan respon balik exists  : true (artinya nomornya Aktif)  / false (Nomornya tidak aktif)

Juga karena ini adalah sebuah sekolah, maka tidak setiap waktu aplikasi ini aktif, program akan mulai aktif jam 7.30 pagi dan non aktif atau "tidur" jam 17.00, pada jam 12.00 siang hanya untuk mengecek bahwa program ini masih aktif berjalan saja. Pesan WA biasanya dikirim ke admin untuk mengetahui program masih berjalan atau error karena banyak sebab.

Demikian gambaran jika anda ingin membuat aplikasi notifikasi WA menggunakan bahasa pemogroman apapun dan API WA dari vendor apapapun karena pada intinya prosesnya akan sama.

Semoga bermanfaat.

 

Software :

Microsoft Visual Basic 6.0

MySQL / MariaDB

WhatsApp

Operating System : Windows 10

API Data : Skyward

API WA : Maxchat

Related links:

API Call Using Visual Basic 6 (JSON Response)

How to Make WhatsApp Office Visit / Clinic Notification on Skyward


Labels: , , , ,

Tuesday, November 07, 2023

Cara Memasang Bearing Kipas Angin


Mengganti bearing kipas angin kita di rumah merupakan salah satu cara agar kipas angin kita menjadi lebih awet / tidak cepat rusak.

Ketika anda mulai mencoba mencari berbagai cara di internet tentu akan menemukan banyak cara/solusi, dari yang paling sederhana sampai yang paling rumit ( dalam sudut padang seorang user yang awam ). Karena tidak semua orang mempunyai kemampuan / skill yang sama dalam membongkar kipas angin. Atau bahkan di tema yang akan kita bahas ini yaitu mengganti bearing kipas angin. Kadang ada yang membuat alat press untuk dudukan bearing, jujur bagi saya pribadi ini kurang pas.

Karena tingkat kesulitan cukup tinggi  bagi orang awam, dan harus dilakukan oleh seorang yang berpengalaman, yang ada kita keburu kepanasan karena kipas angin masih rusak dan kita sibuk membuat alat press untuk pasang bearing. 

Jadi kita akan cari cara praktisnya saja dan tentu saja terbukti berhasil.

Saya akan menjelaskan cara yang menurut saya paling bisa dilakukan sebagai seorang yang tidak cukup mahir dalam hal kerajinan tangan. Cara ini saya serap dari beberapa video tutorial yang saya tonton di youtube dan akhirnya saya modifikasi sedikit sesuai dengan bahan yang saya punya.


Obyek : Kipas Angin 16 inch merk SANEX

Alat  dan Bahan :

  1. Bearing 608z 2 pcs.
  2. Lem Dektone.
  3. Lakban kertas 24 mm
  4. Obeng Plus
  5. PVC Elbow ½ Inch.


Langkah langkah pemasangan :

  1. Bongkar cover depan dan belakang dinamo kipas angin.

  2. Copot bushing kipang angin.


  3. Masukan bearing 608z ke as rotor, jika kurang pas bisa diamplas sendikit. Bearing seri 608z diameter lubangnya paling pas untuk as rotor kipas 16 inch yang ada di pasaran yaitu 8 mm. Jika terlalu longgar juga tidak bagus karena bearing justru tidak akan berputar sempurna karena longgar.



  4. Potong Elbow PVS kira kira lebih tinggi sedikit atau minimal sama dari tinggi bearing, karena fungsi utama dari potongan dari Elbow ini adalah untuk dudukan bearing di cover dinamo depan dan belakang.

  5. Kemudian masukan bearing ke Elbow PVC, memang jika dicoba, bearing akan langsung pas masuk. Saya melapisi lagi dengan lakban kertas ( 1  lapis ) di bagian luar bearing agar tidak goyang / oblak. Karena jika tidak presisi ada kemungkinan rotor bisa bergesekan dengan dinding stator.

  6. Lapisi bagian rotor kipas angin dengan 1 lapis lakban kertas, hal ini tergantung pada lebar celah antara rotor dan dinding stator dinamo. Jika memang cukup luas maka bisa diberi 2 lapis lakban kertas. Trik ini merupakan trik paling simpel dan presisi untuk memasakan as rotor lurus / center.

  7. Siapkan lem Dektone, kemudian lapisi secara merata di penampang pipa elbow yang akan ditempel ke besi cover dinamo. Usahakan yang ditempat adalah bagian yang tidak digergaji ( cetakan pabrik).  Karena cenderung lebih rata dan presisi dibanding dengan potongan yang kita gerjaji jika ditempel ke plat cover dinamo.

  8. Kemudian  pasang besi kumparan pada  cover dinamo depan, setelah pas baru masukan rotor yang sudah terpasang bearing dan potongan pipa elbow yang sudah dilapisi lem, masukan secara perlahan sampai pipa elbow menempel pada plat cover depan.                                                    Jika anda seorang amatir dan tidak cekatan seperti saya, maka usahakan adonan lem dekton dibuat secara bertahap ( pvc untuk bearing depan dahulu, ketika sudah ditempel baru dibuat adonan untuk bearing belakang) , karena jika terlalu lama maka lem sudah agak mengental dan sulit dioleskan pada pipa pvc.                                                                                                      Pada saat memasang rotor pada bearing depan, bisa dicoba diputar putar untuk memastikan rotor tidak bergesek pada dinding stator. Jika sudah OK ( tidak bergesek dan lancar ) maka pasang bearing belakang lalu kemudian pasang cover belakang lalu setelah menutup putar kembali as rotor dan pastikan lancar dan tidak bergeser.                                                                                Jika sudah lalu baut ke empat ujung cover depan belakang agar merekat pada besi kumparan dan biarkan selama 30 menit.

  9. Setelah 30 menit kemudian bongkar lagi lalu tambahkan lem pada pinggiran pipa PVC agar melekat lebih kuat di bagian cover depan dan belakang. Anda bia melihat prosesnya di video di bawah ini, hanya saya merubah dudukan dengan pipa PCV ½ inch ( Elbow).


Nah setelah langkah ke-9 jika spul dinamo anda tidak rusak, seharusnya kipas angin bisa dipakai kembali. Nah Pada kasus yang saya alami, yang terjadi adalah spul dinamo juga rusak / terbakar, sehingga putaran menjadi lemah meskipun sudah pakai level 3 speed-nya.

Hal ini adalah kasus yang umum terjadi dimana spul dinamo terbakar karena bushing sudah aus sehingga putaran dinamo menjadi berat. Sekring (warna putih) yang terpasang juga tidak berefek / memutus aliran listrik ketika spul / kumparan dinamo sudah panas.

Akhirnya saya coba mencari spul dinamo secara online, adapun harganya cukup mahal jika dibandingkan kita membeli dinamo baru ( after market ) yang sudah dipasang bearing. Kemudian kemungkinan kedua adalah cocok tidak nya dengan casing dinamo yang lama.

Dinamo baru plus bearing ( MX )


Akhirnya saya pun membeli dinamo yang dilengkapi bearing secara utuh secara offline di toko onderdil kipas angin dekat rumah ( gambar di atas )



Memang ada beberapa penyesuaian antara lain dudukan dinamo yang harus disolder sedikit. Yang lain semuanya pas saja.
Dudukan dinamo baru lebih rendah sehingga harus disolder dudukan bautnya.

Nah, bagi pembaca yang ingin ganti bearing kipas angin, saran saya adalah ganti bearing ketika kipas belum rusak, karena jika kipas angin anda merk yang “biasa” saja bukan terkenal akan sulit mencari persamaan partnya.

Dinamo Kipas Angin Midea


Akhirnya saya berniat memasang bearing pada kipas angin saya yang satu lagi ( yang belum rusak ), merk Midea ternyata eh ternyata dinamo-nya dibuat agar ketika rusak tidak bisa diganti, karena plat casing dinamo dibuat model klem, bukan dibaut.

Demikian pemgalama saya, semoga bisa memberi pencerahan bagi pembaca.


Kipas Angin : Merk SANEX dan Midea

Bearing : Tipe 608z

Dinamo Baru : Merk MX


Labels: , ,

Sunday, September 17, 2023

MySQL - Error 1062 duplicate entry For Primary

Error 1062 duplicate entry For Primary

Sometimes if you work with MySQL/MariaDB database, you’ve got "suprises". One day ago I’ve got MySQL Error when I de-activated primay key on one table, and then re-activate. I’ve got an error like the image above.

When I check the record that show on error message, I found that record is already unique. It shouldn't be cause an error. 

Unique Record


Then, how I did solve those problem.

Well, maybe Solution Number one below solution is not quite practical or good enought but it's work for me.

Solution Number One

        Step 1. First  Backup your Database, if something goes wrong.

        Step 2. run SQL : SELECT DISTINCT * FROM sourcetable

        Step 3. Export or Copy Paste the query result to Excel File

        Step 4. Create SQL Script to inserting data


        Step 5. DELETE source table 

        Step 6. Run SQL Script that we have created on Excel to inserting data.

Re-Active Primary Key

        Step 7. Re-Activate Primary Key on source table


Solution Number Two:

This is quite similiar with solution number one, but this is more "advanced" and  using with pure SQL.

        Step 1. "Clone" table from source table with SQL to clone table

                    INSERT TNTO clone_table SELECT * FROM source_table

        Step 2. DELETE source table 

        Step 3. Insert table source from clone table using SELECT DISTINCT

                    INSERT TINO source_table SELECT DISTINCT * FROM clone_table

        Step 4.  Re-Activate Primary key on source table

Re-Active Primary Key


Maybe it's a MariaDB bug or MariaDB/MySQL still keeps primary key records when we deactivate the primary key on another table/system that we don't know yet if we are not cleaning the data ( delete all). Then when we re-activate the primary key, it causes the error message above.

Good Luck. Hope this is useful.

Software :

MySQL / MariaDB ver 10.4.25



Labels: , , , , ,

Sunday, July 16, 2023

MySQL Connection Run Time error -2147467259 (80004005)

Run Time error -2147467259 (80004005)

Sometimes, when we are trying to connect MySQL/MariaDB database, it returns an error “[Microsoft] [ODBC Driver Manager] Data source name not found and no default driver specified”

In my case, When I’m using Visual Basic 6 and I never change the line of codes for the connection module, suddenly it returns an error like the above. I’m trying to find the error through the error message. 

Then, after I googled the solution, I found that I must add New Data Source on ODBC. So, I open the ODBC and add New Data Source on the System DSN tab, but it still returned an error. 


Another thought is MySQL Connector driver installed is for 32-bit, but when I checked the version it’s for 64-bit.


Again, adding a parameter on the connection string: Persist Security Info=true, inspired by my old case about the SQL Server connection string, and still not solved.

Finally, IT SOLVED by changing MySQL ODBC Driver from MySQL 8.0 Unicode Driver to MySQL ODBC 5.1 Driver.

MySQL ODBC 5.1 Driver

My Conclusion is that the MySQL ODBC 8.0 Unicode Driver has bugs, that cause when Visual Basic try to connect through the driver, the MSADO library doesn’t recognize the driver and returns an error  “[Microsoft] [ODBC Driver Manager] Data source name not found and no default driver specified”

With the same error pattern, maybe you can change the MySQL driver as I did, and you can also downgrade the driver version. I'm using version 5.01.6 (mysql-connector-odbc-5.1.6-winx64) that works to my case.


Software :

Microsoft Visual Basic 6.0
Microsoft ActiveX Data Object 6.1 Library
Microsoft Windows 10 Pro 64 bit

Labels: , , , , ,

Friday, June 30, 2023

How to Make Custom Sort on Google Data Studio


In many cases, by default, Google Data Studio uses alphabetical order to sort the data. For example, sorting names like below :

  1. Aaron
  2. Harper
  3. Jack
  4. James
  5. Noah
  6. Oliver


But how if we want to make custom sort without using alphabetical order because in many cases we can’t use alphabetical sort. For example for sorting grades from Pre-K to K12 grades.


 And here are the steps on how we make a custom sort on Google Data Studio.

    1. On the Data pane add a new field



    2. Let’s say we make our field “Grade PG-K12”, and add the code below on the formula box.

        CASE

             WHEN REGEXP_MATCH(Grade,'PG') THEN 1

             WHEN REGEXP_MATCH(Grade,'PK') THEN 2

             WHEN REGEXP_MATCH(Grade,'K1') THEN 3

             WHEN REGEXP_MATCH(Grade,'K2') THEN 4

             WHEN REGEXP_MATCH(Grade,'G1') THEN 5

             WHEN REGEXP_MATCH(Grade,'G2') THEN 6

             WHEN REGEXP_MATCH(Grade,'G3') THEN 7

             WHEN REGEXP_MATCH(Grade,'G4') THEN 8

             WHEN REGEXP_MATCH(Grade,'G5') THEN 9

             WHEN REGEXP_MATCH(Grade,'G6') THEN 10

             WHEN REGEXP_MATCH(Grade,'G7') THEN 11

             WHEN REGEXP_MATCH(Grade,'G8') THEN 12

             WHEN REGEXP_MATCH(Grade,'G9') THEN 13

             WHEN REGEXP_MATCH(Grade,'G10') THEN 14

             WHEN REGEXP_MATCH(Grade,'G11') THEN 15

             WHEN REGEXP_MATCH(Grade,'G12') THEN 16

        END

As you can see, we are using CASE, and it works the same way as IF-THEN function.  It means WHEN the field “Grade” value is  "PG” then it returns 1 and so on ( 2, 3, 4, 5,..).

Then Save and click Finished.


    3.  On the Chart pane, change the Sort Option using our new Field, and set it to Ascending, and by             default google normally pickup “SUM”. But remember this option can vary related to each case.

    4.  And now we can sort our data using our custom sort.


Good Luck.


Software :

Google Data Studio

Labels: , ,

How to Remove Password from Protected Sheet on Ms. Excel


There are several ways to remove password from the protected sheet, but I am choosing one that is simplest and easier. That is Using Google Sheets.

  1. Open Google sheet on your browser
  2. Click File – Import, and upload your protected Excel files. Choose an option: Replace Spreadsheet.

  3. Then Click File – Download as Microsoft ( .xlsx ) files.

  4. Open downloaded Excel files and you have unprotected Excel files from your original protected Excel files. It’s Worked!

For your information, I already tried using VBA Editor.

  1. Open the Excel file.
  2. Press "Alt + F11" to open the VBA editor.
  3. In the VBA editor, click on "Insert" and then choose "Module" to insert a new module. In the module window, paste the following code:

            Sub UnprotectSheet()

                Dim ws As Worksheet

                    For Each ws In ActiveWorkbook.Worksheets

                        ws.Unprotect

                    Next ws

            End Sub

Then Press "F5" to run the code. This will unprotect all sheets in the workbook and Save the file


But it still asks you for the password like the image above. So today with this method, we can’t use it anymore.

And the third way is by save as your protected Excel files to .zip files and then edit the .xml files. Yes maybe it works but it’s too complicated for some users.


Good Luck.

Hope this is useful.


Software :

Microsoft® Excel® for Microsoft 365 MSO (Version 2305 Build 16.0.16501.20074) 64-bit

Windows 10 Pro 64 bit.


Labels: , , , ,

Wednesday, May 31, 2023

How to Find the Web Server of Any Website


Today, I will show you 3 ways to find web server type from any website. So, what is it used for? Well, sometimes we want to know about the technologies behind them. As a computer geeks or whatever we want to know what technologies they used. Is it Apache or nginx? Well without further ado, let’s do this.

1. Using a random path. Did you ever have an experience? When you type the wrong addresses or path after the URL name from a website. It returns a 404 error and shows the webserver type on the screen browsee. So, with this pattern of errors, we can using this for achieve our goal, see the web server type. 

                    www.websitename.com/sdsaddfsfortypeanything

But this kind of tricks, won’t work on a website that has a redirect 404 error setting. So when you type the wrong address or path it always redirects to the same page. For example, Google, when we type:www.google.com/sdhkjshk

It returns an error message like below.


2. Using the curl command. Type curl -I www.websitename.com and press Enter. On Windows you must install curl first, you can see here. But you can use a free online Linux terminal on https://bellard.org/

Free Linux Terminal with JSLinux.

Here you can use the curl command without installing anything on your machine.

curl command

3. Using Browser Development tools. On Google Chrome, we are using Inspect Element menu, On Microsoft Edge, you can use Developer Tools ( Crlt + Shift + I ). On Both Browser, you can right-click on the screen, and click pop up menu Inspect.

  • With Chrome, you can choose Network then refresh the web page with F5 or refresh button. Then choose the list component on Name Windows on the left. And see Headers information, here you can scroll down and find the Server Information, like the image below.


  • With Edge, it is totally the same as Chrome. Why? Because they are built on the same framework that is Chromium.

Hope it is useful. Good Luck

Software : 
  • Google Chrome
  • Microsoft Edge
  • Windows 10
  • JSLinux

Labels: , ,