Posts

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…

Java Map And Filter, A lambda or anonymous expression example

Image
It’s been a while since JDK 8 release, since that version of Java the language, it adopted many new nicer syntax, the one that i love is the Lambda expressions. 
Lambda or anonymous function can make you write in a nice looking functional one liner code, for example below is a Java way of looking for keywords if they match in an Array, true if match and false otherwise.
//given array
List<String> words = Arrays.asList( "foo", "bar", "cool" );
//check if 'cool' exists
boolean isCool = words.stream().anyMatch(word -> word.equals("cool"));
1. MapMap objects to another value as specified by a Function object, example below to Reduce List of object Person, to just List of person names.
2. FilterFilter objects that match a Predicate object. Example below is an example to filter people with certain age.
import lombok.Data;
import java.util.Arrays;
import java.util.List;
import java.util.logging.Logger;
import java.util.stream.Collectors;

public cla…

How to Develop Intellij Plugin Part 1 - My First Time Experiences To Develop Plugin

Image
It is fun to develop a plugin for Jetbrains IDE platform, you know Intellij, PhpStorm, Pycharm and the like.
As you may already know, Intellij is one of the smartest IDE in the world, especially for Java and Kotlin and frameworks like Spring. I believe it's their main concern. 
If you are using Spring, Intellij will act so smart to detect any bugs you may introduce in your program, giving you completion, symbol references, even recommendation for the best possible code it might be.
If you are not a Spring user, maybe because your company you work at doesn’t like it, or they are just happy with the framework or even language they already use, and Intellij doesn’t support it, then you may need to create your own plugin.
Intellij provides an API for you to work on your framework or even your own language that they didn’t have support on, The API is i believe complete enough to get things done the way you want to, but the lack of documentation makes it really hard to get things fast, some…

Start Using Docker Great Video Tutorial For Beginners

Image
It’s not gonna be a post about a testimonial or using Docker as an expert docker user, contrary i don’t even know how to use it, i am just starting to use it. So there will be no useful tips or tricks provided on this post about docker.
It's been a while since i've first heard about Docker, i tried to use it several times but didn't get any reason on what is docker can be used for, then i uninstalled it, and reinstalled it many many times, still not getting any idea how useful docker is.
Then I watched a really good presentation about Docker, this is the most basic Docker that made me amaze how cool docker is. Here’s the link of the video.

I am still kind of unsure how to properly use docker though, because my software development career is usually not involving something like a mission critical system that we need to care about hardware level, and also the language and the platform i am mostly used like Java is already handling the cross platform part.
Docker helps developers…

How To Start PHP Storm Plugin Development For The First Time

Image
I was impressed by how smart Intellij IDEA and other jetbrains IDE products can be. If you use a framework, library or tool that the IDE doesn’t support, they also provide you with an API to develop your own plugin to support that framework or tool. 
Problem is, it is not as easy as flipping your hand. In fact it’s pretty much night mare, because the lack of documentation and also plugin development is usually a very complex thing, that sometimes your framework that you want to develop the plugin is radically different from the simple example they provide, so you need to figure it out yourself.
Recently I learned to develop a PHP framework plugin for PhpStorm, the framework is called Codeigniter. The framework is pretty much popular in the PHP world although kind of old and irrelevant to modern web application development using PHP compared to Symfony or Laravel.
But I decided to keep going and with spirits in mind that if anyone can then i’ll learn in the end i can accomplish it. I am r…

What current level of Artificial Intelligent do we have today?

Image
AI or ML is probably the hottest tech jargon in current development of technological advancement. From individuals to large corporations they put so much effort into this field to invent some kind of sophisticated robot that, so advanced that they can learn by themselves, we just need to program their brain, and feed them some initial data and then their algorithm will do the rest.
AI has been used by major tech companies like Google, Amazon and Microsoft for their and user products. they made their own AI system themselve, it so far works but probably far from perfect.
I read hacker news today and found at the top list titled Shirt Without Stripes, which basically shows some flaws from the current AI system used by the company I mentioned above, their neural system is still for some queries that didn't work. They may be really good at some queries but there are still  many flaws so they can’t understand the word 'Without'.
I tested it myself and found that this is really tru…

Difference Between Windows 10 Home Pro and Windows Enterprise

Image
Windows 10 is my favorite OS, why? firstable because it is the most widely used operating system, so for example application or game developers will likely target Windows as their target user because it has big users. So Windows has lots of programs that sometimes other OSes don't.
That the main reason, the second reason is, because i've been using Windows as my main Os for very long time, along the way i learn how to customize the Os (not really customizing the core part, because unlike linux, windows is very much commercialized, you get what microsoft give).
By customize i mean just deliberately keep programs that only useful for me, remove if they are just consuming my computer resources. So now I have almost full control over my computer.
Not to be bragging, but i know many aspects of window OS, like what is services, command lines, etc. I don’t really know that much, but enough for me to stick to the OS.
There are three main branches of Windows 10, the Windows home, professio…

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

How To Uninstall Angular CLI, The Angular Framework

ASUS Battery Health Charging Software To Make Your Battery Life Longer

Flutter AppBar, With Icon, Title and Actions Link