For smart Primates & ROBOTS (oh and ALIENS ).

Tuesday, December 01, 2015

Remove version number from JS and CSS in WordPress

Problem: How to Remove version number / querystring from JS and CSS in WordPress. Solution: goto your active theme folder and open functions.php file and add below lines at the bottom. function del_queryandversion_from_css_js( $style_or_js_url ) { if ( strpos( $style_or_js_url, 'ver=' ) ) $css_js = remove_query_arg( 'ver', $style_or_js_url...
Share:

Tuesday, November 17, 2015

How to use ON DUPLICATE KEY in insert statement

How to use ON DUPLICATE KEY in insert statement Problem: In case of inserting or updating record we use separate logic using if statement or case statement: e.g.: if(i==0) insert here if(i=1) update here we can terminate the above if statement by using On Duplicate Key. by using this only one statement can be use for insert and update record. *note: user_nm...
Share:

Saturday, October 31, 2015

Mysql Database access using PDO

How to access Mysql Database using PDO: PHP is changing day by day. in old days we were use mysql_connect(...) but now in current days it is not supported. current days we can use mysqli_connect(...). but it is better if we use PDO (PHP Data Object). PHP Data Objects (PDO) is a very lightweight, consistent interface for accessing different types...
Share:

Thursday, October 29, 2015

PDOException' with message 'SQLSTATE[42000 Syntax error or access violation: 1064

Problem: How to fix following PHP PDO error exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line Solution: It means you are missing small brackets ')' in your...
Share:

Tuesday, October 20, 2015

Video Watermark Remover

Real Life Coding Stuff
Problem: Some time you have many videos that has watermark. you just hate that watermark and need to delete it. There are many watermark remover software but all are not free. so if you want a free video watermark remover then you are at present here right place. Solution: I...
Share:

Monday, October 19, 2015

Microsoft Office Interop Outlook

Problem: Where to find library of Microsoft.Office.Interop.Outlook? Solution: To locate library of Microsoft.Office.Interop.Outlook you should look into below 2 folders: C:\Program Files (x86)\Microsoft Visual Studio 12.0\Visual Studio Tools for Office\PIA\Office14 C:\Program Files (x86)\Microsoft Visual Studio 12.0\Visual Studio Tools...
Share:

Friday, October 16, 2015

mongoDB on windows 7

Problem: While installing mongoDB on windows 7 you will get the same message as below: I CONTROL  Hotfix KB2731284 or later update is not installed, will zero-out data files I STORAGE  [initandlisten] exception in initAndListen: Data directory C:\data\db\ not found., terminating I CONTROL  [initandlisten] dbexit:  rc: 100Solution: Solution: you...
Share:

Wednesday, October 14, 2015

how to check if visitor is a robot or bot

Problem: how to check if visitor is a robot or bot? Solution: Please use below code Example: $user_agent=''; if( !isset( $_SERVER['HTTP_USER_AGENT'])){ echo 'i m a Robot!'; die(); } else { $user_agent=strtolower($_SERVER['HTTP_USER_AGENT']); } $robot='N'; if(strpos($user_agent,'bot')>0 || strpos($user_agent,'Bot')>0) {    ...
Share:

Tuesday, October 13, 2015

Currency convertor

Problem:   Some time you need to convert currency into different countries, so what you will do? Solution:  You can use yahooapi Example:  Use below code. the code is in PHP ou can easily convert it into VB.Net, Java, C# etc if you are good programmer. function curr_convert($ffrom,$tto,$iinput) { $yql_url = "http://query.yahooapis.com/v1/public/yql";  ...
Share:

Monday, September 21, 2015

How to change or add some extra js file in Joomla

Problem: How to change or add some extra js file in Joomla Solution: Open file from this location libraries\joomla\document\html\renderer\head.php ...
Share:

Product color drop down is not sort order in magento admin panel

Real Life Coding Stuff
Problem: In Magento admin Manage product section drop down is not in sort order. Product color drop down is not sort order in magento admin panel Go into backend magento admin ----> catalog ----> Manage Products --- under product colour when you click on a colour...
Share:

Saturday, September 19, 2015

is it safe to remove version numbers from .js in vBulletin

Problem: is it safe to remove version numbers from .js in vBulletin? Solution: yes, it is safe to delete version number from .js in vBulleti...
Share:

Sunday, August 09, 2015

Unable to access an error message corresponding to your field name

Problem: While working with CodeIgniter in-build set validation with text box for ex: invalid email or empty filed you may face this error "Unable to access an error message corresponding to your field name" It means you have not set correctly error setup. $this->form_validation->set_rules('blink', 'Link', 'required|trim|'...
Share:

Tuesday, June 16, 2015

filezilla Error Connection timed out Error File transfer failed after transferring

Problem: While uploading more that 100 KBs file size FileZilla could show you error message as below: "filezilla Error Connection timed out Error File transfer failed after transferring" Solution: This is the due to timeout connection. so increase it. Example: Goto Edit-->Setting...-->Connection In timeout section change Timeout in seconds...
Share:

Saturday, June 06, 2015

The system cannot find the file specified. Exception from HRESULT:0x80070002

Problem: While working with ASP.Net MVC 5 when you create a web project get the error and project will not create: "The system cannot find the file specified. Exception from HRESULT:0x80070002" Solution: Repair you Visual Studio 2013 or 2015 and problem will gone...
Share:

Monday, June 01, 2015

Parse XML in PHP with Attributes

Problem: How to Parse XML in PHP with Attributes Listed below the XML data. Suppose you have a url which produce below XML data on request and you want to parse it in PHP including it's attribute for ex:  spell id="168839" minCount="1" maxCount="1" etc. See below XML for full information: <?xml version="1.0" encoding="utf-8"?> <wowhead><item...
Share:

Sunday, May 31, 2015

How to use jquery dataTables

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <link href="jquery.dataTables.min.css"...
Share:

Thursday, May 28, 2015

How to fix any HTML tag at any position

Problem: How to fix any HTML tag at any position for ex: fix a div at right bottom corner? Solution: Use style z-index, bottom, right attribute Example: <div id="loading_msg" style="position: fixed; z-index: 99;  bottom: 15px; right: 10px;     display:; background-color:#CC99FF">Loading now Please wait...</div&g...
Share:

Tuesday, May 26, 2015

Scrolling paging in PHP

Problem: Database paging without paging page number.  This is same as Facebook and Tumblr like paging. Solution: By using Ajax you can achieve that like scroll paging. Example: Use below code. Assuming 1 to 10th records already showing. index.php <script type="text/javascript" src="jquery-1.6.js"></script> <div id="mydiv"> <p>Database...
Share:

Monday, May 11, 2015

Message: Undefined variable: 0 in CodeIgniter PHP

Problem: Sometime while working with CodeIngiter / PHP you may encounter "Undefined variable: 0" error. It surprise to that is "0" (Zero) could be a variable! Solution: This "Undefined variable: 0" error come when you use double dollar sign in variable. so remove one dollar ($) sign from variable and error will gone. Example: See the below code,...
Share:

Wednesday, May 06, 2015

How to convert eps file to jpg file

Problem: How to convert .eps file to .jpg file Solution: It is simple, use ImageMagick and below java code. if you expert in PHP or .Net then you can easily convert it same as me. Example: import="java.util.*"%>  import="java.io.*"%>  try    {        Runtime runTime = Runtime.getRuntime();   ...
Share:

Ads Inside Post

Powered by Blogger.

Archive