Posts

How To Add A New MySQL User, For Beginner Database Admin And Backend Developer

Image
Adding new MySQL is not something we usually do on a daily basis as we are just stuck using a single user. I constantly forget how to add users because we don’t need to add users all the time. Maybe this article can help.Here’s how you add a new user to your MySQL database using terminal.1. Create new user with username newuser, and host localhost, it can be an IP address
CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'YourP@ssword123';
2. Add our new user permission, in this case we use asterisk symbol, mean this new user has root privileges
GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost';
3. Commit or Reload the changes
FLUSH PRIVILEGES;
Adding a new MySQL user is a very basic command, every database admin or developer must know these commands.It’s much easier to add new user by using some database management tools like MySQL workbench, you don’t need to remember MySQL command, but it is sometimes you face some environment, server or cloud t…

Gitlab Or Github, Which One Should You Choose

Image
I really like Gitlab, one of the best platforms for hosting our codes, if you are much familiar with Github, then Gitlab is the same. Only with Github, they are limited for public repositories, meaning your codes are open for public, everyone can see it, even though your code isn’t supposed to be open source.
That’s why I use Gitlab, unlike Github, in Gitlab you can create unlimited private repositories. 
1. GitlabMost of the time, I don't want to expose my code to other people, because it’s something that I really work hard on, so i need to keep it secret. I am not ready for open sourcing.
If you're just an individual developer like me, or a small startup team that still struggles with getting stable revenue yet.  Maybe you want to minimize your startup budget, so Gitlab is the  wisest choice for your team.
Gitlab as I know as I have been using it for more than 2 years now, is a free platform for your team to collaborate using Git version control.
Not only for hosting your code fo…

In Just One Month, Hackers Took Millions From Bitcoin Transfer

Image
After some famous public figures' accounts on Twitter got hacked, and tweeted some bitcoin giveaway scam. The hacker announces that the account giving away a lot of cryptocurrency for free, as long as they send them some cryptocurrency first. This leads to an estimate of hundreds of thousands of dollars in total, that user sends a bitcoin to this fake tweet.


The cyber attack trends continue, now they targeted a smartwatch based company, Garmin, with a ransomware attack.
Few days ago, CWT, a travel management company, got hacked too, by an anonymous hacker using ransomware asking for 10 million dollar. Although the deal ended with only CWT paying the ransom for $4.5 Million dollars in Bitcoin, it’s still considered a major loss.
This CWT hacking is interesting because we can see the deal between CWT and the hackers, which the negotiation between CWT and the hacker was left on a Live chat conversation. So we can see how the deal is happening and the situation in which the hacker frees …

Develop Web Based Application Faster Using PHP

Image
I’ve been developing apps using many different frameworks, across different languages, so I can tell you which one is best for building web based applications the quickest, simplest and easiest.
For me PHP is the easiest way to build web based applications, you don’t need to compile the codes, you don’t have to use classes with long namespaces, etc. 
And PHP is widely known, it’s actually very popular, so if you have some troubles while writing your codes, you can just do some quick search and find the answers right away. 
Web based app using WordpressIf you just want to build a Web blog, company profile, no need complex business process, just using Wordpress is enough.
Wordpress is not just a blogging platform, it can be much more complex than that. The way you do customization is by developing a custom plugin.
Many developers in the Wordpress community already build themes, templates and set of complex features, for example for Ecommerce purpose, Inventory management, Payment gateway and…

How To Create An Import Excel/Spreadsheet Data Using PHP, Laravel and Phpspreadsheet

Image
If you build a data management app using PHP and Laravel Framework, maybe you need to have a feature to import data from spreadsheet files. Follow these steps below.
We are gonna create a user interface form to upload the spreadsheet file and then process the data and insert them into our database.
1. Database table schema for our dataIn this example we are gonna use an example with Users data, it can be Customers, employees or anything. Here’s an example of the table schema that we are gonna use in our database.
2. Spreadsheets templateWe must define a valid spreadsheet template, an Excel file with XLSX extensions, and a set of headers to guide our user to fill the cell in the correct order. Here’s an example.
3. Install the libraryWe are using a library called phpoffice/phpspreadsheet, it’s available on composer, so simply using composer command to include the library into our project.
composer require phpoffice/phpspreadsheet
4. Set routes to map a controller for our UI and data processi…

Heroku Free Cloud Platform, Start Develop Your Personal Project For Free

Image
I’ve been switching my projects lately from a Bare Metal VPS Server to Cloud or Platform as a service kind of type, as it is much more simpler, all i needed now is to focus more on the codes and the business logic, not on the infrastructure.
As you may already know if you follow Tech news, people nowadays talk a lot about Clouds. And that’s why there's so many companies trying to compete as a cloud provider. 
So now, we have many options to choose to deploy our project for the public user much faster because of the Clouds. 
I see big companies like Google, Amazon, Alibaba and so many I can't mention offering Cloud. Some of them offer unlimited trials, but with limitations in storage and bandwidth. For hoby or individual projects, it’s okay to use free trials since we didn’t have any customers yet, we wouldn’t need so much resources in our cloud.
Heroku CloudHeroku is one of my favorite cloud providers. I've tried Google Cloud, but I just found the simplicity offered by Heroku …

The Internet Distractions We Face Day To Day

Image
Because I often get distracted by many things when I am in front of the internet, I've been thinking why this happens to me? Or if it also happens to you, then why does it happen to us?
So why were we distracted?It is because as our brains evolved and became large and complex, and the easiness of information we can get from the internet, we are thinking about many things simultaneously, we want to improve this, improve that, basically everything, and it’s not wrong, that’s how we human species survive until this moment. 
Our survival mechanism requires us to improve ourselves day by day, so we must learn new things in order to survive, we must be the smartest and the strongest in order to survive and to pass our genetics to our offspring.
Also as we grow into adults, day to day, we face different people each time, and we face many problems too, and if we want to solve that problem, we need to learn how to solve it. What is most effective to minimize solving something like that proble…

Notice: Undefined index: name in test.php on line 3 Error On PHP 7

Image
Writing a PHP application is so simple and fun because the PHP is interpreted, you don’t need to compile first your program to run it. As soon as you save the project file you are working on, you can just execute from the browser.
Consider this PHP file named test.php below
<?php
$array = array();
echo $array['name'];
For really beginners PHP Programmers, some little error warning can be frustrating because most of them don't know how to handle and overcome the error.
The error Notice: Undefined index: name in test.php on line 3 from the code above is telling you two possible situations: the variable doesn’t have the name key, the variable is empty, so it doesn’t the name key
SolutionBefore accessing a variable key that may not exist, or the array itself is a Null or empty, you can first check the availability of the key using the EMPTY function.
From the code example above that shows error notification, you can fix the problem so that the notice warning disappears using this cod…

Blogging is hard, writing content for public readers is really hard, consistency is the key

Image
When I was in High school and learning for the first time about creating a website or blog, I really enjoyed designing and writing on that blog which I lost. It's a fun activity when you are doing the thing that you really like, for me working with a computer is the thing that I am very good at and enjoy spending time with.I am kind of introverted and have very few friends, so the outside world is not attracting me.Now I have grown up and blogging is not just a hobby anymore. Somehow I need to make a living because the job I currently work in is really not enjoyable. Then Blogging becomes less fun and somewhat intimidating. Writing content for public readers is really hard, you are forced to have one level of knowledge above your readers, if they find you somewhat incapable of your writing, they’ll just leave and without recurring visitors, your number of visitors will be very limited.It’s a lot harder writing as an independent blogger, it’s easy to start but it’s so hard to keep …

Tree Traversal in Java using Visitor pattern and For loop Example Codes

Image
Writing codes in Java is supposed to be reusable, it means that your code can be reused by yourself and other people working on similar things you do without rewriting the same code block  over and over.
This is an example of object oriented passion on how you can use an object that could possibly have infinite children. You can use this class so you don’t need to write a loop over and over.
Firstable given data person with children and grandchildren below.
Now we can use for loop and visitor pattern to visit all the children recursively.
1. For loopThe first example is a usual, easy to understand Example of how you write a Recursive method to visit tree traversal children using for loop.

Using for loop is really really simple but Somewhat looks not an elegant way, and it could lead into bugs if you misplace variables before and after calling the recursive method. When the code gets bigger it becomes a mess.
2. Visitor PatternAnd here’s the Object oriented way, using a Visitor pattern. 

Beli…

Popular posts from this blog

Is Nox Player a Malware? Nox Android Emulator

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

ASUS Battery Health Charging Software To Make Your Battery Life Longer

How To Uninstall Angular CLI, The Angular Framework

Flutter AppBar, With Icon, Title and Actions Link