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 ...

How to restore a SQL Server backup file (bak) database using SSMS

Image
Microsoft SQL Server It is not a hard task to restore our backuped SQL Server database data, but it's a bit tricky for a newbie because sometimes the error message provided by SQL Server is sometimes not straightforward and can lead to confusion for beginners. The first time I tried to restore a database was literally quite a stressful experience. so i don't want you to spinning your head like i did, these are main advice for doing restoring database in SQL server using SSMS: - Don't create the database - Put the backup file in the right location In my machine it is C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\MSSQL\Backup (It depends on your version of Sql-server) It is easy to restore database from SSMS, here’s how: 1. Right click on the ' Databases ' then ' Restore database ' 2. After popup open, on the Source field, select Device 3. Then click the three dotted button to browse your backup database 4. After that just press...

Coronavirus positive impact on people become aware to live more hygienic

Image
Photo by Michael Amadeus on Unsplash This corona virus named Covid-19 originated from Wuhan, mainland China has been spreading the last couple weeks, believed to be started at late 2019 and still spreading till this day. Since the news about the virus is coming out everywhere on TV, on the internet, I notice that people around me are starting to be aware about their personal higenity. They wash their hands frequently like I've rarely seen before. I think we should thank the internet because people are able to find a way by searching on how to prevent Covid 19 or any other disease related to the virus infected them. Also social media which i frequently use people posting positive to encourage people on their personal hygiene. Coronavirus impacts on people hygienity, they are becoming aware that if they don’t wash their hands for example they can be infected and it’s kind of a positive impact of the virus for the people who are not infected by it. But I hope this awarene...

Social Media is an addictive innovation of early 21st century

Image
Photo by Sara Kurfeß on Unsplash This is the early 21st century. Social media nowadays is like a basic need for the majority of people on this planet. With the help of our fast processing device called smartphone, social media now has made people using it kind of out of control. Social media is not to be blamed for making people addicted to it, because it’s fun to use it. Especially when we don’t have anything to do, we only have a smartphone in our hand, social media is like a friend when we don’t have any friends to talk to. Of course there's a lot of options, lots of apps we can use, games, but sometimes other apps are just too boring. Social media is like watching our friends or someone far away we don’t know, what were they doing, even though they are not present, we feel like we are connected to them. Social media is winning in the smartphone apps world, because we don’t want to be alone, even if it's not perfected yet, current platforms like Facebook are still h...

Candlestick for dummies, 90% Accuracy. What i know little bit about how to predict stock price

Image
It never guarantees that all these candlestick patterns can work all the time, because predicting stock market using technical analysis is not enough, there’s also one important factor, a fundamental of the company, that plays a significant role of its stock prices. But below candlestick is what I call common sense, after years of years reading the candlestick chart, these are what comes to my conclusion of whether the price will go up or down. There’s human psychology involved in determining stock prices so by reading candlestick, i believe know about 90% accuracy where the price will move (but again not always). GREEN CANDLE BIGGER THEN 3-4 PREVIOUS READ (SUPPORT) NOT BIG ENOUGH GREEN CANDLE (RESISTANT) NOT HAVE BIG GREEN BODY, BUT THE STICK IS LONGER THAN PREV POSITION DEFINITELY SUPPORT HAMMER CONSOLIDATION (HOLD UNTIL FURTHER INDICATOR FOR SUPPORT OR RESISTANT) Sometimes none of those things works, but most of the time it can work, because st...

Is React the future of web front end technology?

Image
React Logo We used to write web page using straight HTML code, now there’s come React, rather than writing it in HTML, we write in React component, it is much more reusable, because with this approach, a component we can separated each of it, and then when we want to use it, we just need to provide its props and state. Prop and state is how a component will behave, for example a Button component can be reused to have different color, different shape and different behavior when its clicked. HTML tag is predefined and standardised, meanwhile React component we can create it by yourself, name it with whatever we like. React codes can’t be executed directly by Web browser, so React developer created a tool to transpiles our react code to native HTML, Javascript, and CSS to syntax so that Web browser can display our application in web platform, and behave as we’ve already told in React/javascript codes. The thing i like about React is already i told you above, we can write a co...

Born too late to explore the earth, too soon to explore the galaxy

Image
Photo by Bryan Goff on Unsplash The question of what I want in life is a defining question I've always struggled to answer. All the knowledge I have, political views, and beliefs will be gone anyway when i die. It doesn’t matter what I want, in the end it just gone. So why do I care anyway, i already have a job, not a steady one, but it’s enough to pay the bill, to feed me and my family, so why do i need to care about anything anymore? I mean why should I care about climate change, why should I care about global war, why should I care about human civilization can colonize the entire milky way in the near future. I’ve always loved to watch movies or tv shows about sci-fi, you know like star wars and stuff. It is amazing seeing humans can explore the unknown, creating giant dyson sphere to harvest some star energy, go as fast as speed of light, it’s all amazing. When humans can colonize the galaxy, they can go from one star to another just blink of an eye, we have infinite...

Don’t Just Hope For Something Can Get Better By Itself, Create Plans and Act On It

Image
taking action, Photo by Fonsi Fernández on Unsplash As I am still at a young age, I have many dreams and I still have the chance to achieve all of my dreams, to have a better life, happy, healthy and financially secure. Then I just realized that all those things i want in life mathematically can be achieved, if i am not just hope for anything to happen by itself, rather if i make a proper planning, with good strategy with all my knowledge and skills, it all can happen. I shouldn’t just sit and wait for any opportunity to come to me, I should go actively seeking for those opportunities. Don’t be passive, to improve your life, to get better for yourself, you should have full energy, actively looking for opportunities, if the opportunity is coming to you, then take it, act on it. You do not jost hope for something to exactly match your expectation. You should do something about it. If you are fat, don’t just hope you're gonna get slim tomorrow or the next day without doin...

Watching Video Experiences In Windows 10 Movies and TV

Image
Watching Movie Windows 10 Movies and TV This is like in the middle of the night, while everyone fell asleep, no cars, no any other noise except from my computers speaker with 80% volume, watching this movie from 2014, John Wick. I don't know i can't sleep, so i decided to order iced McCoffee, a 24 hour resto. Watching movies in the middle of the night is a quite experience. I don't have Netflix, it's expired while ago, i don't continue the subscription, too expensive. So instead i am doing something i don't know if it's ethical or not, whether it is i am doing illegal action that could jail me, i downloaded movie from hacked movies website. And watched it offline using Windows video player. A very satisfying computer operating system, Windows is amazing, it is my favorite OS I've ever used, I've tried different Linux OSes, also Mac OS, it is not as fast as Windows. The responsiveness, the UI, everything is just works perfect satisfied all ...

Grep Simple Command Example, Learn To Filter Results In Linux Terminal

Image
Grep is one of the most used command line utilities in either Linux, Windows or Mac OS. Grep is used for searching a specific text from the command line output, we combine grep with other commands, grep is basically to find and filter the output of the command we executed. So understanding Grep command is a must for a back end developer or server admin, because it can be very useful for managing our server. You don’t need to know all the available, only some basic grep options is probably enough to do most of basic terminal operation, usually filtering large results. Here’s example of a simple grep command in Linux to filter list of files using LS command inside folder /etc: ls - a | grep -i 'php' Normally we use LS to list all files, but if inside directory there's too many files, we can use grep to filter the output LS with grep filter word 'PHP' But if you want to know more on how you can do advanced filtering using grep, just type grep --help...

Why is it so hard to start doing things that to finish the tasks we have

Image
not feel to do anything Photo by Roberto Nickson on Unsplash Many factors can prevent us from doing the things we really want to do, like laundry, wake up in the morning and exercise, eating healthy, finish the tasks in office, sleep early, and many daily activities sounds simple but in actual fact it can be done easily. So why are we not doing all those things, even though it will give you significant impact for our life, getting rise, life healthier longer, happier. Why don't we do that, why is it so difficult? Our psychology is both blessed and cursed, sometimes it tells us to stay away from danger, but on the other hand it also prevents us from improving our life. Small things around us can prevent us from starting doing the tasks in our list, we need to finish it soon but we don’t even touch it. Some factor that may starting something is hard are for example : - Not enough lighting in your room, or too bright - Spaciousness of work desk, or too big - Tidiness of...

Asian Market Improve A Bit After Monday Plunges Cause Of The Corona Virus

Image
Today’s Asian Market is in green after starting the week in a total red, because of the Corona Virus. This is the Shanghai composite index looks like showing the performance of the last week charts. It’s in a crazy dive, plunging about 8.6% at Monday's closing. Shangai composite index fell over 8% cause of corona virus Today, all of the Asian market trying to recover the damage, overthought the sentiment about the virus is still covered in most of public mass media. Tuesday February 4, 2020, Shanghai composite index tries to stabilize its position by going up about +1.34% to level 2,783.29 after a massive loss in Monday. Japan’s Nikkei NIK gained as little as +0.49% , compared with South Korea’s KOSPI a bit better, a +1.84% strong gains. FBMKLCI in Malaysia up about  +0.91% , Taiwan Y9999 gained in, +1.77%   , Singapore STI, +1.29%    and Indonesia JAKIDX, +0.65%  . Australia’s S&P/ASX 200 XJO, +0.37%    rose 0.3% as the Res...

How You Can Start In The Stock or Forex Market If You Are Beginner

Image
Forex Euro / US Dollar Fibonacci Retracement Today I spent my day looking at the stock market chart, i open different companies, look and study how the prices move. So basically I am not doing any other things beside buying and selling stock my stock shares. Instead of dealing with my real day to day  job, which today i don’t have, i learnt so many fascinating stuff about how to trade in the stock market, I learn staring at the chart, analyze the movement, and then analyze when I should put a stop loss, when the price will go bad. And learn how to use many other indicators that can be used to predict the price movement. It started to make sense for me, i feel that i am beginning to be a real trader. I’ve already stated before that I am just a beginner trader, but not actually beginner, I've been doing online trading before, in the Forex market, but keep ended up lose my money, because i don’t learn it seriously, I am still very young, I don't have enough money and en...

Maybe I am Just Gonna Blow My Money In Stock Market That I Just Start

Image
Photo by Jason Briscoe on Unsplash This last couple of weeks I've been doing intensive Stock trading, it is not my first time doing this kind of activity, I’ve been doing similar online trading in the past, but not stock, it’s Forex trading, which is for me much easier to enter the Forex market because there's a lot of Forex brokers out there offering Forex trading with only requirements But this Stock market, i am doing local stock trading in my country, not in the US, the requirement i need to provide to register a stock account is and Identity card, and of course email and Phone number, but it’s more formal because it’s not instantly accepted, i need to wait for about two days. The trades I've been doing so far is not profitable, it’s just gain small up, and the market is actually in a down trend because of the Corona virus, so the last Friday i don’t even enter the market at all. I don’t have big money in my account, but i am still keep pouring my money int...

Popular posts from this blog

Coding On Your Android Phone Using Termux

How to Install Microsoft Office on Your PC: A Step-by-Step Guide

The Hidden Disk Hogs on Windows Developers Keep Ignoring (And How to Move Them to D:)