Skip to main content

Posts

What is the difference between fail-safe and fail-fast?

These properties applies to java collections and difference from synchronized collection to un-synchronized collections. In case of fail-safe property, the iterator working on a collection works on the clone of a collection rather than working on the actual collection. Due to this even if there is a change in the underlying collection it is not affected and hence fail-safe iterator will never throw a ConcurrentModificationException. By design all the collection that comes under java.util.concurrent package are fail-safe. On the other hand in case of fail-fast property, the iterator works directly on the collection. So every time we try to get next element from the collection it will check for modification and if found will throw ConcurrentModificationException. This property applies to all the collection that comes under java.util package.

Not able to connect Nexus 5 to PC : Solved

Yes, this is the post which will get you working on this problem. Even I was working on this problem few hours trying to find out solutions for it but none actually helped me but then I got it working. In my case the problem was Android USB drivers. Basically, you don't have to install any drivers for getting it to work but if you are a developer then this might be the case. Though I am not exactly an android developer but sometime you want to try lot of things and mess up other things. So, in my case I installed these Acer ADB drivers which is basically used for debugging your application on real android devices than testing it on drivers. This was the reason my PC was not able to show storage. Solution : Uninstall the Acer ADB drivers. Since, I didn't needed them it was okay for me to uninstall it. How to do that ? Open your explorer -> right click on "This PC" -> click on "manage" -> look for acer adb drivers and right click on it -...

How to install VLC on ubuntu.

I just installed virtual machine on windows 8.1 which had some other setof problems but I successfully managed to get it working. Now its time to set up some basic application. Use below 2 commands from terminal to update and install vlc on your ubuntu. > sudo apt-get update > sudo apt-get install vlc browser-plugin-vlc    Once you are done with above commands just search for VLC and now you can use VLC :)

How to associate a file type with editor in Eclipse?

Recently, I was working on a node.js project and there were few new file types like .jade (basically an template file for Jade template engine). Before I started to work with this file in eclipse I was using notepad++ for reading them so now the default editor was set to notepad++ so every time I tried to open a jade file in eclipse it use to open in notepad++. This was kind of frustrating so I was looking for a way to open this file in eclipse and here is what I found : Please let me know if like/hate the video, I'll try to improve :)

Resolved : TypeError: dhtmlx.extend is not a function

TypeError: dhtmlx.extend is not a function I was working with dhtmlxDataView and created an individual application for testing my requirements. So, everything was working fine and was happy that my most of the work was done. Now it was time to integrate it with the project. When I included it, it started giving me  TypeError : dhtmlx.extend is not a function error and I had no idea what went wrong so now it was time to google it and start my quest for getting a solution. The most obvious way was to try it on the dhtmlx support forum but for some reason I do not get solutions for such answers. After searching for a while I got a hint and tried the solution and it worked. So here is the simple solution : The problem was happening because where I included my application already had other components of dhtmlx and in such case the order of the libraries included does matter a lot. So after trying few combinations with the order it started working. So that's it that's the solu...

ReferenceError: dhtmlXGrid is not defined : Resolved

For the errors like : ReferenceError: dhtmlXDataView is not defined ReferenceError: dhtmlXGrid is not defined ReferenceError: dhtmlXTree is not defined ReferenceError: dhtmlXTreeGrid is not defined etc I have been working on dhtmlx for long time now and this is one of the most basic exception faced by the developer and which in fact is very easy to resolve. Reasons: 1. You are actually referring to a wrong location of the JS file.    - This is a very common mistake done and most of the time we are so damn sure that we don't even care about checking the path once. Even though you have copied it from your existing project where it is working, if you face this issue don't forget to check the path once, it won't harm you. 2. Check for relative path.    - So now you have copied it and paste it in your new file where you are going to use the dhtmlx component and when you open your file you get this error and it becomes frustrating kn...

Hello World : Backbone.js

Firstly, a brief introduction about Backbone.js. Backbone.js is a very light weight javascript framework which allows you to organize your code in a MVC fashion. In conventional methods we use to keep on adding javascript code in the jsp or in separate js files at first this method looks simple and well organized but afterwards it's a pain to keep the code organized. Here backbone.js comes to rescue. It avoids all Javascript spaghetti and let you arrange your code in MVC fashion i.e. you have Model, View and Controller. Model : This basically let you retrieve the data and populates it. View : It's nothing but what you will be showing on GUI (Graphical User Interface). Controller : In this case it lets you save the state of the application via a hashback URL. We will have more information on the Controller in later post. For now, let's just concentrate on Hello world program. Backbone.js allows you to develop a single page application that means there is a singl...