Posts

Take Photo From Webcam Using Javascript (Example Code)

Image
If you want to take a picture from your computer or laptop webcam, you can easily do that using Javascript, there's a library called webcamjs, it's really simple and easy to use.  Here's an example code of how you can take a picture from a webcam and then upload it to the server. 1. First grab the Webcamjs CDN and paste it before body tag of your HTML <script src="https://cdnjs.cloudflare.com/ajax/libs/webcamjs/1.0.26/webcam.js" integrity="sha256-JTH6WxFs/GvXkgGMSYlAXBawtdhTdyYA3+7hhkBG6/o=" crossorigin="anonymous"></script> 2. Now create the HTML for camera preview and camera result <div id="my_camera"></div> <input type=button value="Configure" onClick="configure()"> <input type=button value="Take Snapshot" onClick="take_snapshot()"> <div id="results" ></div> <input type=button value="Save Snapshot" onClick="saveSnap()...

The server requested authentication method unknown to the client [caching_sha2_password]

Image
database related logos This time i got this PHP error after upgrading my MYSQL from version 5 to 8. Error says: The server requested authentication method unknown to the client [caching_sha2_password] This is because of the changing of default authentication password mechanism from previous MySQL to newest MySQL 8. The newest version uses an authentication plugin called caching_sha2_password meanwhile the older version is mysql using native password. So I guess it's a security thing, but don’t worry the older version I believe is already secure enough, you just need to make your password really strong (for your production server). So if you execute SQL query below select User,plugin from mysql.user ; You will see what the plugin is being used for the user password, something like +------------------+-----------------------+ | User             | plugin                | +------------------+---...

Mysqli::real_connect(): Server sent charset (255) unknown to the client - PHP and MySQL 8

Image
mariadb and mysql logo, most popular dbms Below is the PHP error occured when developing PHP apps using upgraded version MySQL 8, before that I used MySQL 5. mysqli::real_connect(): Server sent charset (255) unknown to the client. Please, report to the developers This PHP error happens after i upgrade MySQL version from 5 to 8, it happens because the utf8 is being replaced by utf8mb4. So if you use this SQL queries, you will see what the default charset is being used by MySQL: show global variables like 'character_set_server'; In MySQL version 8, it showing something character_set_server | utf8mb4 . So the easiest way to solve this problem is to change it back the way it is before, to change it to utf8. So here’s the query to change it back from utf8mb4 to utf8. You can change the character set by putting or changing this in your my.ini : [client] default-character-set=utf8 [mysql] default-character-set=utf8 [mysqld] collation-server = utf8_unicode_...

What You Need To Know About Java Platform - For Beginner

Image
What You Need To Know About Java Platform - For Beginner Java is an amazing platform, both as a language and its JVM. The language is not that beautiful but it is concise and can be easily integrated with IDE. The VM may not be that good either, some say it's a clumpy-memory hunger program, but surely the cross-platform thing makes it fascinating. Here's some Java related terminology in Java you need to know if you are beginer in Java application development. 1. Java the language It’s a full object oriented language, which means everything must be written in a class style. So after the class is initiated then you treat them as an object where you can do some operation using its properties and methods. 2. JDK (Java Development Kit) JDK is a set of tools mainly for compiling Java code into binary JVM bytecode. So then you can ship your product in a binary either JAR or WAR after your code is successfully compiled by the javac command included in JDK. 3. JVM (Java...

Must-have Windows appplication for software developer fresh OS install

Image
Must-have Windows appplication for software developer fresh OS install 1. Gimp Gimp is an open source lightweight very capable image editor, sometimes we need to just resize, cropping, or layering an image, Gimp can do many things to alter images. It is a free and fast application, also the learning curve is easier than let’s say Adobe products with many hidden little buttons we don’t even want to know about it. 2. Git Git is the most popular version control, every software developer using Git nowadays, its command line is simple and we can use it to clone as many cool open source projects as we want. I mean not just cloning, you can use git for your daily routine developing your app in your  professional tech company. 3. Google chrome If you are using windows there’s already have two ugly web browser by default (explorer and edge), such a waste of disk space, if i could get rid of it i would definitely uninstall it from the beginning of OS installation, it’s an F ...

How to install Mac OS Catalina on VMWare on Windows 10

Image
Mac OS Catalina 10.15.4 on VMWare player 15 Yes it is possible to install Mac OS on VMWare, or even whatever OS you want to, VMWare can handle it. It just sometimes VMWare doesn't want to load your OS image perfectly, so it needs special tricks to handle the situation to make it work. In this tutorial, we are going to use VMWare player version 15.5.1, so pay attention if you don’t have the similar version like i use, it may not work. You must have a WMDK image of Mac OS, you can find them on Geekrar dot com A patch tool / VMWare Mac OS unlocker, to make Mac OS available on the list of OSes when we are trying to create new, also available from Geekrar So here’s steps how to install Mac OS on VMWare Download and extract the patch tool, then Install the patch tool, by right click on ‘win-install.bat’ and run as administrator After finishing install the patch, close and reopen VMWare Now create new Virtual Machine Configuration, select Typical Install from, I wil...

How To Backup Your VMWare Player On Windows

Image
VMWare Player 15 Logo Actually backuping your VM ware player data is very straightforward and easy, all you need to do is copy your VM  folder, move it somewhere safe. Then after reinstalling your VM ware, create a new VM with a similar OS and version, and then replace it with your backed up VM. Opening your new created VM will work just like it, there’s no special or customization you need to do. It works just fine by replacing your new empty OS with your old backed up VM data. As long as the operating system and the version is the same. VMWare is one my favorite virtualization tools, it works amazing, you can create and  virtualize an entire operating system. I have probably used other virtualization tools like Vitualbox, but i don’t remember since it’s been so long ago. VMWare is not just desktop virtualization, I've heard that it is also used for virtualization for running a web server. A lot of customers from individual to large scale businesses have been using VMWare in ...

Popular posts from this blog

How To Create Spring Boot Project Using Netbeans

Spring Kafka - How to use ReplyingKafkaTemplate send and reply synchronously

ERROR 1348 Column Password Is Not Updatable When Updating MySQL Root Password