Skip to main content

Posts

Showing posts from 2013

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 knowing that same thing is wo

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

Privacy Policy

This blog does not share personal information with third parties nor do we store any information about your visit to this blog other than to analyze and optimize your content and reading experience through the use of cookies. You can turn off the use of cookies at anytime by changing your specific browser settings. We are not responsible for republished content from this blog on other blogs or websites without our permission. This privacy policy is subject to change without notice and was last updated on March, 03, 2013. If you have any questions feel free to contact me directly here: amoldoblogging@gmail.com

How to login into postgres without root password?

I am not a postgres guy I hardly know anything about it but when the duty calls you have to do anything to get it working. So today duty called :) where I need to take the dump of a postgres database and import it on another machine now the biggest challenge was logging into the postgres and run the command when you don't know the root user password and the sad thing was I installed that postgres long back but didn't kept the password. Now I have to first find the password (which was not possible) or find a way to access it somehow. Luckily I found one solution to my problem :) . According to the article we can allow any user to do operation without any password, okayyy this was interesting. I tried them and bingo it worked :) So I would like to share those steps here so that it will help some needful like me. Step 1. Stop the postgres. > service postgres stop Step 2. Reset the authentication mechanism (assuming defaults are already being used)

Deep Cloning In Java

I have already mentioned about cloning in my previous post and also the types of cloning in java i.e. 1. Shallow cloning and 2. Deep cloning We have already seen what is shallow cloning, how to use it and the example to demonstrate it in my previous post you can read about it here . In this post we will discuss about deep cloning in java. Deep cloning basically refers to creating an exact copy of an object that means if we have a object class Person() {  String name;  Address address; //rest of the code } class Address () {  String state;  String city; //rest of the code } Now if I create a deep clone of the object "Person" then it will also create a new object of the "Address" and not a reference. Just to verify you can try making changes to the new "Address" object and then see if you still having the same value in the main object. That will be different if not then something is wrong. For creating a Deep clone you can use ei

Shallow cloning in Java

Cloning basically refers to creating an identical copy of an existing object.  The term  clone  is derived from  κλών , the Greek word for "twig, branch", referring to the process whereby a new plant can be created from a twig. The word 'Cloning' in java refers to the same meaning. When we say we have created a clone object in java we mean we have created a new object with identical values in the object. There are two type of cloning in java as below : 1. Shallow cloning 2. Deep cloning Since this article is about shallow cloning will give description about that only and will include about the deep cloning in my next post. Shallow cloning : So shallow cloning is nothing but creating a clone of the object but not in detail. Now what does that mean? It means that if you have a object with referenced object in your main object then shallow cloning will not clone them, it will just clone the attribute of the main object.  Let's take an example : I