Tuesday, 29 July 2014

Solution : Can't quit Packagekit - adding software package in OpenSuse 4

Problem We can't run 2 updaters at the same time so if packagekit is running then you can't run Yast update or zypper. So, it will through confirm message to stop packageKit process. PackageKit is blocking software management. This happens when the updater applet or another software management application is running. Ask PackageKit to quit? if you click on 'Yes', it will try to stop the process of packageKit. If it is still busy, it will again arise the popup with this message.  PackageKit...

Monday, 28 July 2014

Resize jqGrid based on number of rows 0

To resize grid based on number of rows, Just we need to say this in configuration settings of jqGrid. Yes. we need to set like this below. $("#mygrid").jqGrid({     ...,     ...,     ...,     height:'auto',     ...,     ... });   simply set height property to auto. How it actually works? This height configuration...

Sunday, 27 July 2014

Convert CSV to Two dimensional array (2D Array) - PHP 2

When you get the data from CSV file, It will return return array of each row. To work with this, we need to convert it as 2D array. So, this following code snippet will help you to covert CSV array to 2D array. In this we used PHP's array_combine function. FUNCTION DEFENITION function get2DArrayFromCsv($file, $delimiter) { if (($handle = fopen($file, "r+")) !== FALSE) { $i = 0; $data2DArray = array(); while (($lineArray = fgetcsv($handle, 0, $delimiter)) !== FALSE)...

Monday, 21 July 2014

Add border-bottom / border-top to table row using CSS 0

We can do it with table's border-collapse property. Collapse In which both the space and the borders between table cells collapse. So, there is only one border and no space between cells. Just change the table border-collapse style into collapse using this following css table { border-collapse: collapse; } Now the each cells are independent. So, you can apply border-bottom or border-top style for each td like bellow CSS. To...

Saturday, 19 July 2014

24 jQuery UI themes 0

Here we listed 24 jQuery UI themes... Click on the names to get raw code of themes. Black tie Blitzer  Cupertino Dark Hive Dot luv Egg plant Excite bike Flick Hot Sneaks Humanity Le frog Mint Choc Overcast Pepper grinder  Redmond  Smoothness  South Street  Start  Sunny  Swanky purse Trontastic UI Darkness UI Lightness Vader   Click...! Download...!! Enjoy... !!! ...

Thursday, 17 July 2014

Uncaught TypeError: Cannot read property 'integer' of undefined - jqGrid 0

This sounds "Language supporting file is missing". * One get the error message typically if one don't included required language file grid.locale-xx.js (for example grid.locale-en.js). * You can Include it before jquery.jqGrid.min.js or jquery.jqGrid.src.js. See the example of the usage of jqGrid in Documentation * If you don't have that file, Click Here to download. Have any doubt? Feel free to comment here!!! Related post : jqGrid "reloadGrid" using Local Data...

Wednesday, 16 July 2014

Convert CSV to JSON with header row as key - PHP 1

When you get the data from CSV file, It will return return array of each row. If we want this array in JSON as header row as key and cell value as value, We can use PHP's array_combine function. So, We can use this following function to achieve this task. FUNCTION DEFENITION function getJsonFromCsv($file,$delimiter) { if (($handle = fopen($file, 'r')) === false) { die('Error opening file'); } $headers = fgetcsv($handle, 4000, $delimiter); $csv2json = array(); while...

Saturday, 12 July 2014

Strict Standards: Non-static method DOMDocument::load() should not be called statically - PHP 0

In PHP recently I faced this issue. When I tried to use my xml file using php's document load() function. Problem $dom = DOMDocument::load('myXml.xml'); It works perfectly. But I throws error Strict Standards: Non-static method DOMDocument::load() should not be called statically Solution The reason why it's happening is because I called a load() method in the DOMDocument class in which is not static.  Instead of calling it with :: We need to call...

Thursday, 3 July 2014

Get all the dates between two dates - Javascript 7

We can do this using Javascript's Date() object. You can use this following function to get between two dates. It will return array. Here we are using isDate() and isValidRange() functions to make sure is the given string is Date and end date is not greater then start date. If the given string is not date, then it will return "error occured!!!... Please Enter Valid Dates" in browser console and it will return empty array. ...