The install of Node.js is pretty straight forward, with on gotcha when it comes to installing node packages that I will detail at the end.
If you haven’t already installed developer tools, you will need to do that now.
Now install Node.js.
Problem installing node packages with sudo
To install node packages you have a little problem if you are using sudo. On Fedora and CentOS 6.2 (and probably versions less than this), sudo has a secure path set secure_path = /sbin:/bin:/usr/sbin:...
You can bookmark the article and use the code whenever you need them.
Click here for the online demo.
This is an simple example to show you how to create a viewport in ExtJs4.
The Viewport renders itself to the document body, and automatically sizes itself to the size of the browser viewport and manages window resizing. There may only be one Viewport created in a page.
The Viewport does not provide scrolling, so child Panels within the Viewport should provide for scrolling if needed using the autoScroll config.
Unlike the panel component of Ext JS, Viewport does not have a tbar option. ...
I am working on a Ext-JS web application which needs to send data to the PHP server side to store. It took me a while to find out how to decodes the receiving JSON string in PHP.
Assume you have a model and calling save to send a ajax request.
If you use $_POST variable to pass the JSON string, you won’t see anything. It is just an empty array. This is because the Content-Type in the Request packet is different now, application/json. The JSON expression string in the...
The way to create a custom menu in mouse right click event function in ExtJS 4 is little different with pre-version. It seems in Ext 4.0.2 they changed event name and arguments order.
First, let's see how we create the menu in Ext 3. I get this example from aditia rahman:
Let's write a DataView to add a listener.
When the data view is rendered it disabling the default right click web browser menu, this is called in listeners “render” event and “contexmenu” event is for detectin...
This example will show you how to declare a global var and arrays in Extjs MVC application.
You know where to find this code :
Global application variable :
Simple, right? Now you can access this variable everywhere in your mvc application.
If you need arrays , try this:
Passing in a function reference into array.sort()
As touched on already, array.sort() accepts an optional parameter in the form of a function reference (lets call it sortfunction). The format of this function looks like this:
When such a function is passed into array.sort(), the array elements are sorted based on the relationship between each pair of elements "a" and "b" and the function's return value. The three poss...
Thank you for taking the time to visit my blog! Take a second to peek around and check out some of my previous posts. Of course, I would love to find out what you think as well, so make sure to comment. See you around!