WHAT'S NEW?
Loading...
When working with Laravel in Windows, we need php-cli to be accessed from command line globally. So, here is how I installed 7.0 version of php in windows and able to run composer update for my laravel project.
1. Download zip version of php from here: http://windows.php.net/download/
2. Extract it to somewhere in our disk. I have extracted it to C:\php7
3. Inside the directory find php.ini-developement to php.ini and do the following:
    find extension_dir and un comment it as:
   
; On windows:
; extension_dir = "ext"
to
  
; On windows:
extension_dir = "ext"
Make another changes:
; extension=php_mbstring.dll
to
extension=php_mbstring.dll
The final one is to enable php_openssl extension by changing:
; extension=php_openssl.dll
 to
extension=php_openssl.dll
4. To access php-cli from command line, open Windows Explorer. On left pane, right click Computer and goto Properties >  Advanced System Settings > Environment Variables. Under system variables section select PATH variable and click  to  edit it.
Please note each path in the PATH variable is terminated with a semicolon(;). If you add any directory path in this variable, the commands in the directory can be accessed from anywhere inside command prompt.
So, for my case, I appended C:\php7 to the PATH variable.
Here's another thing to notice:
If you have previously installed WAMP, XAMPP or other packages for creating server on your machine, then make sure to add the path of your php7 directory before the path added by the installation of WAMP, XAMPP, etc.
I had installed WAMP Server previously and there was something like: C:\wamp\bin\php\php5.3.13 in the VALUE field of PATH variable. This can be removed if you no longer use this php version and add the new path.
Now navigate to command prompt and check your php version by: 
php -v
The new php is accessible from your command prompt.
Then navigate to your laravel directory and run: 
composer update

THE DEPENDENCIES FOR YOUR PROJECT ARE DOWNLOADED AND YOU ARE NOW READY TO RUN php artisan COMMAND.
There are many softwares built with java that require jvm to run.  For developers,  mainly IDEs are of great concern.  But with the Oracle java jre,  the font rendering looks so weird that the fonts look so much pixelated even after trying some tweaks that are found everywhere on internet on this issue. 

What is the problem?
 
This is the problem of Oracle java version. Most IDEs come with included jvm these days. And they contain the Oracle java version.  Most of IDEs come in a zip or tar.gz bundle and most of us extract them and start using them directly. If some configuration can be made before that,  we can feel the nice font rendering in them even in Linux. 

More detail about problem

This font rendering is fixed in open-jdk version of Java.  Even after installing and selecting open-jdk as currently active java in our system,  the IDEs don't use the jvm installed on our system. They are still using the jvm that is included in the IDE home directory.  During runtime, there is a script that checks for using which jvm.  If some environment variable is set to your system required by the IDE,  the IDE will use the open-jdk version of jvm and if it isn't set,  it uses the jvm that is bundled with the IDE. If there is open-jdk version already bundled with the IDE,  it is not necessary to configure environment variable. This was found in the Linux distribution of Android Studio 2.2 preview 1 version. The version of open-jdk required for proper font rendering is open-jdk-8.

How to install open-jdk and select it as default java in Ubuntu Linux?

Add the repo for openjdk-8
sudo add-apt-repository ppa:openjdk-r/ppa
Run update and install openjdk-8
sudo apt-get update 

sudo apt-get install openjdk-8-jdk
If you have more than one java versions installed, select the default java with this command.
sudo update-alternatives --config java
Select java version from the prompt displayed. Do the same for javac with this command
sudo update-alternatives --config javac 

How to set environment variable?

Go to home directory of user by
cd ~
edit .bashrc file 
vi .bashrc

navigate to the end of file and add following paths, path is the path to your openjdk installation
JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
export JAVA_HOME
For jetbrains products,
WEBIDE_JDK=/usr/lib/jvm/java-8-openjdk-amd64
export WEBIDE_JDK
For netbeans,
netbeans_jdkhome=/usr/lib/jvm/java-8-openjdk-amd64
export netbeans_jdkhome
 
How to run from terminal?
 
Navigate to the directory than contains the launcher script.  The following are launcher scripts for popular IDEs in use:
Now, the command is like:
./script.sh

This will now give you the expected font rendering for IDEs like NetBeans,  PhpStorm,  WebStorm,  IntelliJIdea,  etc. 

Wait,  Still problem running from desktop entry? 

Yes,  even after making these changes and configuration,  you will be unable to run the IDEs from desktop entry launchers.  For this find the desktop entry launcher in your system. 

It is located in /usr/share/applications folder if the desktop entry was created for all users.  If it is created only for current user it is located in ~/. local/share/applications.  For editing desktop entry,  use a text editor.  To make changes go desktop entry in /usr/share/applications,  you need root access. 
Find the line with exec command and modify it to:
Exec=bash -i "path_to_script.sh" %f

ENJOY THE BETTER RENDERED FONT AND BETTER OPERATING SYSTEM

Dynamic UI at browser side is more of my concern these days. I need to add controls with different events dynamically to meet my system requirements and features. One major issue I observed in past and again in this time is that I am not able to handle click event to the dynamically created buttons.

Yes, I had to add events to the buttons in order to define what statements to be executed in the click of a button.

So dynamic controls in HTML must be assigned with events before defining what to do on those events.

I never realized to validate my HTML markup till this day. I just tested my code with different browsers and if it worked, I continued my work and finally deploy it into production environment. Today I was following the same practice and I got two different results for same code. I had a circular label in my code that had circular view in chrome but not in firefox. Unknown of the issue. Finally I found somewhere that code validation failure may cause this. I headed to http://validator.w3c.org and validated my code. Oh no, there are a lot of error in my code. The fixing of those validation errors corrected my view in boh of the browsers.

"HTML SCRIPT MUST BE WRITTEN WITHIN GUIDELINES OF W3C.ORG FOR EXPECTED RESULT"

I. Configuration

git config --global user.name "your_username"
git config --global user.email "your_email"
this sets the author's identity inside git.

Initializing and Starting Tracking Projects
to initialize a directory as the directory to be tracked for changes, navigate to the directory that is to be tracked and run the command
git init

what this does is create a folder named .git into your the current directory which git uses to track the changes made.

now you can start making changes to the current directory. you can add files, delete them or edit some files. All these activities are tracked and git is informed about the changes made.

suppose you add a file named test.html
to observe the changes made, you can run this command
git status

to add the changed file to the staging index (before you make commit, you should stage the files), simply run the command
git add test.html

to commit the changes, run this command
git commit test.html -m "Your commit message is here"
e.g. git commit test.html -m "Initial commit"

Viewing logs of commits
git log   #displays all commit logs
git log -n 5  #displays 5 latest commit logs
git log --since=2015-04-05  #displays commits since the date specified
git log --until=2015-05-07  #displays commits until the date specified
git log --since=2015-04-05 --until=2015-05-07  #combination of since and until
git log --author="Bikash"  #displays commit logs by the specified author
git log --grep="Init"  #regular expression based searching of logs; search is made on commit messages

suppose we have a commit message "New file created"
we can search for log of this commit  as:
git log --grep="New*"
more information about regular expressions will be in a session in this blog.

Life was easy, projects were small; there weren't more files to handle and tracked for changes. Many project files got misplaced and many got deleted. A part of hard work couldn't be saved because of lack of knowledge. Saved works couldn't be indexed so that I could access different versions of my code within same repository.

HEARD OF VERSION CONTROL SOFTWARE LONG AGO, BUT COULDN'T GRAB THEM FOR PRACTICAL USE.

Now here comes the requirement of version control software and lets get started.

Git is the  most popular version control software that helps to track different versions of  our code and let us move back and forward to different versions. So, in case we get messed up with our code and need to get some previous working versions of our code, its GIT that provides us the power to get our requirement.

GIT helps us to track every changes made in our project directory. It creates something like mapping of the changes made in our projects. And we can navigate to different locations in the map created by git to undo changes or redo changes made.

GIT uses three layer architecture for version control mechanism namely working, staging index and repository. When we make some changes in our project directory, the files are in the "working" state. After we call "git add" command these changes are shifted to the "staging index" and finally on "git commit" command, they are moved to the "repository". Likewise all the files use this three layer workflow.
AJAX provides faster performance and dynamic user experience.

Working on many web projects at both front end and back end, implementing AJAX for communicating with the server about the user interactions in the browser at client side is always something I used to imagine in my applications when I was fresh at web development. I had been working with $.AJAX() function to do such AJAX posting of data of forms and other message passing between server and client. But I never returned an object from server to client so that i could convert the response from server directly to something like objects in javascript and prevent the parsing of response from the server.

Being specific, the response I am talking is the JSON response from server that is the result of json_encode() function in PHP. We do some task of retrieving the data as per the request from client to server, then collect them in a PHP array and finally json_encode($array). The result of this is a JSON response.

WHY JSON over traditional XML for cross-platform message passing?
XML Parsing is so much tough and takes heavy cost in terms of executing the parser. There are open tags and close tags for objects and properties of objects. Moreover, there are attributes that increase the complexity and time in parsing. But JSON is simple to parse. JSON requires less storage than XML for same message representation.

This is to my knowledge.

But I also experienced another usability of JSON response. To those platforms where data size has to be reduced for communication, JSON is the best approach. Exactly, I am talking about the mobile platform where size of data to be communicated should be as much less as possible.

Another thing of concern is, JSON Response from an API. A scenario where we need to built a web service or we need to develop some multiple software products from the use of a single database. The database should be accessible from web, mobile apps and so on. In such scenario, there can re-usability of same API functions for all software products of a Business Concern.

HENCE JSON OVER XML!

To the point!
Now, lets get more advanced to the functionality I am providing currently in my applications: "get some data from server as JSON response and dynamically generate html elements to provide full dynamic user experience to the response user wants". Get the JSON response and use javascript eval() function to generate the object representation of the JSON response. No bother of parsing the response to extract data from response.

The use is as:
Server side script in PHP:
<?php
/*here are some operations to get data from server like price, qty, color of a product the user wants to view. Instead a simple assignment is shown here.*/

$price = 50;
$qty = 100;
$color = 'white';

$arr = array('price' => $price,
                      'qty' => $qty,
                      'color' => $color
            );
echo json_encode($arr);
?>

The response from server of this script is:
{"price":50,"qty":100,"color":"white"}

Now,
After AJAX posting, I evaluate the response as:
var product = eval("("+reponse_text+")");

Here response_text is the response from the server.
So, by this time I can access the data items of object product as: product.price, product.qty and product.color in javascript.

ALL I WANT FOR MAKING USER EXPERIENCE BETTER IN SIMPLE WAY!