For smart Primates & ROBOTS (oh and ALIENS ).

Wednesday, November 12, 2014

How to show place in Google map

Real Life Coding Stuff
How to show place in Google map----------------------------------- 1) Create a table "latandlon" in Mysql/Oracle/Sqlserver/DB2 in which you feel easy.CREATE TABLE latandlon (  id int(11) NOT NULL auto_increment,  lat decimal(10,6) NOT NULL...
Share:

Tuesday, November 11, 2014

Exact string comparison in C#

PROBLEM: Exact string comparison in C# ,Case sensitive login in C#. Suppose you are storing login in database table as "Admin" and on the webpage or winform you are trying to compare it as "admin" then it is pass.But if you want to compare it as exact "Admin" the follow below steps: Store "admin" in database table. So "admin" and "Admin" is not same SOLUTION:  String...
Share:

Read excel file in PHP

Problem: How to read Excel 2003 or 2007 or 2010 format microsoft excel file in PHP Solution: Use  PHPExcel library to read Excel 2003 or 2007 or 2010 format microsoft excel file in PHP. Download it from it's website Example: Below the code that will read excel file. <?php require_once './PHPExcel/IOFactory.php'; $objReader = PHPExcel_IOFactory::createReader('excel2007');//excel2007...
Share:

Sunday, November 09, 2014

Extract text from docx in php

Problem: Sometime you need to store Microsoft word 2007 file's content to Database, for this you will open docx file;copy it's content and paste in webpage and click submit button then after data will store in database. it is the solution but it is not a good smart solution. Solution: The good smart solution is that you select your docx file by...
Share:

Saturday, November 08, 2014

Get Current Page Name in PHP

PROBLEM: During coding in php, some time you need to Get Current Page Name in PHP. So How to Get Current Page Name in PHP? SOLUTION: Create a file "b.php" and save below content and open in browser. you will see "b.php" as page name. <?php function getScript() { $file = $_SERVER["SCRIPT_NAME"]; $break = explode('/', $file); $pfile = $break[count($break)...
Share:

mail using PHPMailer

PROBLEM: How to send using PHPMailer SOLUTION: PHPMailer is the good option to send email in PHP. To use PHPMailer first download it from https://github.com/PHPMailer/PHPMailer extract and paste entire folder. paste below code: <?php require_once('phpMailer/class.phpmailer.php'); public function sendEMail($tto, $fFrom, $sSubject, $bBody) { ...
Share:

latitude and longitude by zip in php

PROBLEM: How to get latitude and longitude by zip/pin in php SOLUTION: Here I am demonstrating to you that how can you get latitude and longitude by zip code or pin code in php. $pin="208017"; $full_url = "http://maps.googleapis.com/maps/api/geocode/json?address=".$pin."&sensor=false"; $details=file_get_contents($full_url); $rs = json_decode($details,true); $lat=$rs['results'][0]['geometry']['location']['lat']; $lng=$rs['results'][0]['geometry']['location']['lng']; echo...
Share:

Replace in mysql

PROBLEM: How to Replace in mysql? SOLUTION: If you have a table in my sql database which having '('    ')'   or  any other character and you want to replace it then use as: UPDATE tble_nm  SET taluk = REPLACE(taluk, '(', '')  WHERE taluk LIKE '%)%...
Share:

Error while import sql file in sqlyog

PROBLEM: Sometime when you import sql file then you may surprise that error show any time.The sqlyog is the good tool to import or export mysql database, You may get error while import sql file in sqlyog. So how to tackle it? SOLUTION: This is because your insert statement is too big to execute. to solve these problem follow listed below statement: open...
Share:

Configure codeigniter in wamp 2.5

PROBLEM: If you are a PHP Developer the WAMP is a good environment. You can do the things easily with WAMP.. You can download WAMP from it's website. Recently WAMP have made many changes, in past WAMP version you simply web ste in the "www" folder and eailsy open the site. For example: While working on codeigniter with wamp server you just past the...
Share:

Friday, November 07, 2014

Show sql query in Codeigniter

Problem: While working in Codeigniter framework and execution some sql query. but the sql query result is not coming as you want. In this case there are something wrong with your sql queries. Then what you will do? the answer is that you will see the what exact sql query you are executing in Codeigniter. So how can you show or see sql query in...
Share:

Pass sql result in codeigniter view

Problem: PHP Codeigniter framework is a good MVC framework for PHP developer. While passwing result to it's view you may face the sql result problem. The problem is that you can not see sql result in the "View". You can face the belwo error: ----------------------------------------------------- A PHP Error was encountered Severity: Notice Message:...
Share:

get selected text of select from jquery

Problem: How to get selected text of select from jquery? While working in web programming sometime you need to get text from select box or combobox along with it's value. Solution: You will use .val() method to get value and use .text() method to get text from select box or combo box in jquery. Example: Use listed below code: To get value: var...
Share:

replace all space in javascript

Problem: How to replace all space in javascript? Solution: You will use "replace" method to replace in javascript Example: replace all spaces with "_" sign use: statename=statename.replace(/ /g, "_"); replace all occurance in javascript replace all spaces with "abc" sign wirh "_" use: statename=statename.replace(/abc/g, "_"...
Share:

Remove index.php in Codeigniter

Remove index.php from url in Codeigniter Just copy these listed below 4 line of code ".htaccess" file in the root directory of codeigniter framework. if you have not then create it. After this restart your Server and check it. RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule .* index.php/$0...
Share:

Ads Inside Post

Powered by Blogger.

Archive