Search This Blog

Saturday, August 04, 2018

What is the difference between 'git pull' and 'git fetch'?

In the simplest terms, git pull does a git fetch followed by a git merge.

You can do a git fetch at any time to update your remote-tracking branches under refs/remotes/<remote>/.

This operation never changes any of your own local branches under refs/heads, and is safe to do without changing your working copy. I have even heard of people running git fetch periodically in a cron job in the background (although I wouldn't recommend doing this).

A git pull is what you would do to bring a local branch up-to-date with its remote version, while also updating your other remote-tracking branches.

git pull = git fetch + git merge.

Friday, August 03, 2018

Blockchain Research Papers

I would like to welcome all the new and returning audience to my collected research paper Library. I wish you a happy and successful academic research.

I will be glad to sincerely help you gain the maximum benefit through using this collection resources. Should any of you have an inquiry, problem or any sort of inconvenience when attempting to get any of the Library resources, feel free to contact me for help and support.

BTW you are more that welcomed if you would like to share with me any other research paper to update the Library.

My Ph.D in Blockchain so that I am open to co-work with any of you to gain the maximum benefit. 

Library Resource URL:




Just two important points for your attention:
    - As always, I value the feedback you provide to me. Please be free to point me any miss named/grouped paper.
    - You are more than welcomed if you have any research paper not listed in my library and want to share it with  us.

Ahmad Gohar 
M.Sc, MIBA, TOGAF 9.1 L2, OpenGroup Mater IT specialist Certified
Blockchain Developer - Mastery Award | Blockchain Developer - Author Award

Wednesday, July 25, 2018

Warning Message cannot validate component with empty value

"BeanValidator W cannot validate component with empty value: xxxComponent" is generated in server console logs coming from javax.faces.validator.BeanValidator class with JSF2.1 for multiple components. 

Error Messages

BeanValidator W cannot validate component with empty value: xxxComponent

Steps to Reproduce

Use any component without binding to bean variable and use the value from FacesContext, RequestParameterMap in bean or phase listener

Root Cause

A third-party product issue with Trinidad. This happens when the Trinidad tag is missing the value attribute. The value attribute binds between the input and the bean.  


On binding the component with bean variable, the warning message does not appear in the logs. 

If there are no functionality issues while executing the custom use case then these warning messages can be ignored. Alternatively, the logging can be configured to Severe level such that it is not logged in the server log. Configuring warning message related to JSF2 has been documented in Chordiant_JSF guide, page number-46. Refer the below text snippet: 

Note: To disable JSF 2.0 warnings from displaying at the server startup, add the properties org.apache.myfaces.level = SEVERE and javax.faces.validator.level = SEVERE in the default Java file located in JAVA_HOME/jre/lib. 

Thursday, May 31, 2018

How to rename terminal tab title in Ubuntu 16?

A lot of programs will overwrite the title so you can't rely on the title being fixed or not duplicated by other windows. This is especially so with remote ssh sessions in a gnome-terminal.
It still helps a lot but its not reliable enough for window managers to do matching against , so this ability has been taken out with the newest gnome-terminal, however there is still a possibility to change the title, you can do it by command.

To achieve this easily edit your ~/.bashrc file and add the following lines:

Create a function in ~/.bashrc:

function set-title() {
  if [[ -z "$ORIG" ]]; then
Then use your new command to set the terminal title. It works with spaces in the name too

set-title my new tab title 

With this you then can set the title of your terminal window by simply using the command set-title <name you want to set it to>. This is possible due to ANSI escape codes so any program can output them regardless of where the code is run. 

Wednesday, April 04, 2018

Ubuntu - How do I change my username?

Unix-like operating systems decouple the user name from the user identity, so you may safely change the name without affecting the ID. All permissions, files, etc are tied to your identity (uid), not your username.

To manage every aspect of the user database, you use the usermod tool.

1- To change username (it is probably best to do this without being logged in):
sudo usermod -l newUsername oldUsername

This however, doesn't rename the home folder.

2- To change home-folder, use
sudo usermod -d /home/newHomeDir -m newUsername

after you changed the username.

For instance, you could logout, drop to a console (Ctrl+Alt+F1), and sudo su - to become true root (as opposed to sudo -s, where $HOME is still /home/yourname.) Maybe you also have to kill some still running processes from this user first. To do so, enter ps -u username, look for the matching PID and kill them by kill PID-number.

Update: as arrange mentioned, some files may reference your old home directory. You can either keep a symlink for backward compatibility, e g ln -s /home/newname /home/oldname or you can change the file contents with sed -i.bak 's/*oldname*/*newname*/g' *list of files* It creates a backup for each file with a .bak extension.

Some additional information for not so experienced users like me:
As I only have ONE user account (administrator), it would not let me change the username ("you are already logged in" was the response in TTY1 (Ctrl+Alt+F1). To get around this:

  1. Login with your old credentials and add a new user, e.g. "temporary" in TTY1:
    sudo adduser temporary
    set the password.
  2. Allow the temporary user to run sudo by adding the user to sudo group:
    sudo adduser temporary sudo
  3. Log out with the command exit.
  4. Return to tty1: Login with the 'temporary' user account and password. Change your username and folder as mentioned above. exit (until you get the login prompt)
  5. Go back to TTY7 (Ctrl+Alt+F7) to login on the GUI/normal desktop screen and see if this works.
  6. Delete temporary user and folder:
    sudo deluser temporary
    sudo rm -r /home/temporary

NB: Copied from several resources. Thanks for the contribution.