Posts

Showing posts from 2015

Code For Showing the path on google Map Using the html and java script

code for the showing the path on the google map

A NEW ERA OF ECOMMERCE INNOVATION Magento launch the version 2.0

Magento announced the general availability of there next generation open source digital commerce platform, Magento 2.0.  The new platform empowers brands, retailers, and businesses across B2C and B2B industries to quickly and cost-effectively deliver engaging omnichannel shopping experiences. Magento 2.0 also offers enhanced performance and scalability,  new features to boost conversion rates, and business agility and productivity improvements. The new platform also builds on our open source heritage and offers unmatched flexibility and innovation opportunities to our global ecosystem of partners and developers. Two new products based on this powerful platform are available for download today: Magento Enterprise Edition 2.0 and Magento Community Edition 2.0. 

Various platform for PHP Development

Cross-platform Aptana Studio – Eclipse-based IDE, able to use PDT plugins, visual JS editor. Open-source, free project. (Community edition merged in). Bluefish – A multipurpose editor with PHP syntax support, in-line PHP documentation, etc. With GVFS, supports SFTP, FTP, WebDAV, and SMB. CodeLite – an open source, cross platform IDE for C/C++ and PHP. The built-in plugins supports SVN, SSH/SFTP access, Git database browsing and others. Eclipse – PHPEclipse and PHP Development Tools projects. With additional plugins supports SVN, CVS, database modelling, SSH/FTP access, database navigation, Trac integration, and others. Editra – Versatile open source editor. Syntax highlighting and (partial) code completion for PHP + HTML and other IDE-like features like code browser etc. Emacs – Advanced text editor. The nXhtml addon has special support for PHP (and other template languages). The major mode web-mode.el is designed for editing mixed HTML templates. Geany – Syntax highlighting for HTML +

What’s New in PhpStorm 10

PhpStorm 10 brings improvements in PHP language support, editing experience, debugging, code analysis, and many other powerful features. you should get all the detail regarding the php storm 10 in the below link and also you should be download it from the below link  Go To The Link

Send a post Request With the Help Of PHP curl Operation

function fetch_data(){ $ch = curl_init();         curl_setopt($ch, CURLOPT_URL, "url for the post method");         curl_setopt($ch, CURLOPT_POST, 1);         curl_setopt($ch, CURLOPT_POSTFIELDS,                     "postfieldname=postfieldvalue");               // receive server response ...         curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);         $server_output = curl_exec($ch);         curl_close($ch);              return  $server_output; }

google map distance finder

var  map ; var directionsService = new  google . maps .DirectionsService( ); var directionsDisplay = new  google . maps . DirectionsRenderer(); var map_center; var map_zoom;

Microsoft Windows keyboard shortcut

Keyboard Shorcuts (Microsoft Windows) 1. CTRL+C (Copy) 2. CTRL+X (Cut) 3. CTRL+V (Paste) 4. CTRL+Z (Undo) 5. DELETE (Delete)

Complete pincode database – India

if you need the pincode database for the india please visit the given link and you will get a excel file of the pincode listing and you should easily download the excel and pdf file from here. http://vimalmanavalan.com/?p=1514 http://pincode.city/

WordPress 4.2.4 Security and Maintenance Release

WordPress 4.2.4 is now available. This is a  security release  for all previous versions and we strongly encourage you to update your sites immediately. This release addresses six issues, including three cross-site scripting vulnerabilities and a potential SQL injection that could be used to compromise a site, which were discovered by  Marc-Alexandre Montpas  of Sucuri,  Helen Hou-Sandí  of the WordPress security team,  Netanel Rubin  of Check Point, and  Ivan Grigorov . It also includes a fix for a potential timing side-channel attack, discovered by  Johannes Schmitt  of Scrutinizer, and prevents an attacker from locking a post from being edited, discovered by  Mohamed A. Baset . Our thanks to those who have practiced  responsible disclosure  of security issues. WordPress 4.2.4 also fixes four bugs. For more information, see the  release notes  or consult the  list of changes . Download WordPress 4.2.4  or venture over to Dashboard → Updates and simply click “Update Now.” Si

Rollback your previous query of a particular event If any of the listed query fails

CodeIgniter utilizes an approach to transactions that is very similar to the process used by the popular database class ADODB. We’ve chosen that approach because it greatly simplifies the process of running transactions. In most cases all that is required are two lines of code. Traditionally, transactions have required a fair amount of work to implement since they demand that you keep track of your queries and determine whether to commit or rollback based on the success or failure of your queries. This is particularly cumbersome with nested queries. In contrast, we’ve implemented a smart transaction system that does all this for you automatically (you can also manage your transactions manually if you choose to, but there’s really no benefit). example $this->db->trans_start(); $this->db->query('AN SQL QUERY...'); $this->db->query('ANOTHER QUERY...'); $this->db->query('AND YET ANOTHER QUERY...'); $this->db->trans

Get online decryption different type of iso8583 message

https://iso8583.info/lib/ ACI :  ACI Worldwide, Inc. AMEX :  American Express Payment Services Ltd. ATOS :  Atos Wordline Transactional Services CB :  Groupement des Cartes Bancaires Compass :  Compass Plus Ltd. CUP :  China UnionPay DCI :  Diners Club International Ltd. Elavon :  Elavon Merchant Services Ltd. EMV :  Europay, MasterCard, Visa GICC :  General ISO-8583 Credit Card Hypercom :  Hypercom ISO :  International Organization for Standardization JCB :  Japan Credit Bureau Nets :  Nets A/S NFC :  NFC Forum Technical Specifications OmniPay :  OmniPay, Ltd OpenWay :  OpenWay Group PCSC :  Personal Computer/Smart Card (PC/SC) Workgroup RFC :  Request for Comments RS2 :  RS2 Software Group SafeNet :  SafeNet, Inc SCM :  SCM Microsystems Inc VISA :  Visa International

Basic commads for operating the amazon server files on linux bia putty

cd .. vim for creating file vim filename i for insert editing mode rm to remove mv to move cp to copy -rf recurrsive function for creating tar cvfx nam.tgz foldername tar -xvf filename service httpd status service https restart service mysqld check load command top kill -9 process id ps aux ps aux |grep httpd ps aux |grep mysqld df -h checking space du -sh* tar -xvf file name /etc/httpd/conf/httpd.conf cron crontab -e > /dev/null& lsof -i:port21 vim /etc/vsftpd/vsftpd.conf

C++: Controlling the Decimal places to be shown

While dealing with some scientific calculations, I came across a problem that no of digits that were represented after the decimal were not as per the in-file(8 digits). It was only taking 4 digits after the decimal. I had gone through various forums and discovered <iomanip>. IOMANIP  is a header file that is being used to represent the number of decimal places to be used. #include<iomanip> void main() {         cout<<setiosflags(ios::fixed)<<setprecision(8);         ......         ......         ...... } Using the above code you can represent as many digits you want to represent after the decimal.

Check Your Website Particular Section Execution Time In codeigniter

CodeIgniter has a Benchmarking class that is always active, enabling the time difference between any two marked points to be calculated. For using the Benchmark Class you have to : Mark a start point Mark an end point Run the "elapsed time" function to view the results Here's the example of the code $this->benchmark->mark('code_start'); // Some code happens here $this->benchmark->mark('code_end'); echo $this->benchmark->elapsed_time('code_start', 'code_end'); For reference please use thebelow link https://ellislab.com/codeigniter/user-guide/libraries/benchmark.html

Create a log of your Database Queries that are getting executed while running a application written in Codeigniter

First of all enable the hooks from your config file . Just Open the config.php in you application/cofig folder $config['enable_hooks'] = TRUE; Now open the hooks.php and write down the code $hook['post_controller'] = array( // 'post_controller' indicated execution of hooks after controller is finished 'class' => 'Db_log', // Name of Class 'function' => 'logQueries', // Name of function to be executed in from Class 'filename' => 'db_log.php', // Name of the Hook file 'filepath' => 'hooks' // Name of folder where Hook file is stored ); Now we will create the hook with name db_log.php which we have set above and save it in application/hooks/ folder. Then we simply put the following code in this file. // Name of Class as mentioned in $hook['post_controller] class Db_log { function __construct() { // Anything except exit()

How To Design Email In html News letter

The biggest pain when coding HTML email is that so many email services likeEudora, Outlook, AOL, Thunderbird, Lotus Notes, Yahoo!, Hotmail, and Google Mail, to email apps on phones and tablets. The software used to render HTML for each email software tool determines what HTML and CSS code works and doesn’t work. If you thought it was difficult to ensure the cross-browser compatibility of your web sites, be aware that this is a whole new game — each of these email software tools can display the same email in vastly different ways. And even when these tools do display an HTML email properly, accounting for variances in, for example, the widths at which readers size their windows when reading emails makes things even trickier. http://www.sitepoint.com/how-to-code-html-email-newsletters/

Codeigniter slug library for making Url seo friendly

Codeigniter Slug Library With the Help of thi s library you should convert your codeigniter websites URL as Seo friendly examples are mysite.com/post/my-post-title Please note that these fields map to your database table fields.

Few validation sites for html validation

http://validator.w3.org/

Use ordering in group_concat mysql function

SELECT  group_concat(couloumname order by couloumname) AS views FROM tablename GROUP BY couloumname you should use different order by condition for the  multiple  group_concat condition below is the example of using the multiple group_concat with order by condition SELECT  group_concat(couloumname1 order by couloumname1) AS views , group_concat(couloumname2 order by couloumname2) AS views2 FROM tablename GROUP BY couloumname you should also use the seperator if you want to change the comma seperated value from the select query SELECT  group_concat(couloumname1 order by couloumname1   desc SEPARATOR ' ') AS views , group_concat(couloumname2 order by couloumname2) AS views2 FROM tablename GROUP BY couloumname

checking the detail of database table in codeigniter

These functions let you fetch table information. $this->db->list_tables(); Returns an array containing the names of all the tables in the database you are currently connected to. Example: if ($this->db->table_exists('table_name')) {    // some code... }

Get all detail from ip address

function ip_details($ip) { $json = unserialize(file_get_contents("http://ip-api.com/php/".$ip."")); return $json; } and you get a response like Array (     [city] => city name     [timezone] => timezone     [status] => success     [regionName] => State     [lat] => 26.223600387573     [isp] => your operator name     [as] => operator registration     [query] => ipaddress     [region] => statecode     [zip] => zipcoe     [org] => your broadband organizxatio     [country] => country name     [countryCode] => country code     [lon] => 78.17919921875 )

create index in the database table to make your result response faster

The CREATE INDEX statement is used to create indexes in tables. Indexes allow the database application to find data fast; without reading the whole table. An index can be created in a table to find data more quickly and efficiently. The users cannot see the indexes, they are just used to speed up searches/queries. here in the below you find a video how to create the indexes in database https://www.youtube.com/watch?v=zmAMXSr8zio

Get location detail from the ip address

function ip_details($ip) {     $json = file_get_contents("http://ipinfo.io/{$ip}");     $details = json_decode($json);     return $details; }

Build, test, and document your APIs faster organize your collection of webservices

With Postman, you can construct simple as well as complex requests quickly, save them for later use and analyze the responses sent by the API. Postman can dramatically cut down the time required to test and develop APIs. Postman adapts itself for individual developers, small teams or big organizations equally well.

Merge JS and CSS file to make your codeigniter website faster using CARABINER library

Carabiner is a library for managing JavaScript and CSS assets. It's different from others that currently exist (for CodeIgniter, anyway) in that it acts differently depending on whether it is in a  production  or  development  environment. In a production environment, it will combine, minify, and cache assets. (As files are changed, new cache files will be generated.) In a development environment, it will simply include references to the original assets.

set focus to the next text box

<form action="" method="post">      <h4>change focus</h4>     <input type="text" class="change_focus" name="textboxnumber-0" />     <input type="text" class="change_focus" name="textboxnumber-1" />     <input type="text" class="change_focus" name="textboxnumber-2" />     <input type="text" class="change_focus" name="textboxnumber-3" /> </form> <script> $('.change_focus').keyup(function(e){         $(this).next('.change_focus').focus(); }); </script>

showing iframe on a click of a anchor tag or an image

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script> <script src="colorbox/jquery.colorbox.js"></script> <link rel="stylesheet" href="colorbox.css"/> <script>     $(function ()     {         $(".example6").colorbox({iframe:true, innerWidth:425, innerHeight:344});       }) </script> <a class='example6' href="http://google.com">Outside Webpage (Iframe)</a>

Wordpress New version release dates

Version 4.2 Month of Release April 2015 4.3 August 2015 4.4 December 2015 Get all the information related the wordpress new release Please click the below link https://wordpress.org/about/roadmap/

WordPress 4.2 Beta 4 is now available!

This software is still in development .  you should get all the information related to these version in below link  and update your self in wordpress for development. https://wordpress.org/news/2015/04/wordpress-4-2-beta-4/

use or_like with where condition in codeigniter

$this -> db -> like ( 'body' ,  $body ); $this -> db -> or_like ( 'author' ,  $author ); You can do it like this $this -> db -> where ( 'id' , $id ); $this -> db -> where ( '(`title` LIKE \' % '.$title.' % \ ' OR `body` LIKE \' % '.$body.' % \ ' OR `author` LIKE \' % '.$author.' % \ ')' ,  NULL ,  FALSE );

codeigniter 3 change log

General Changes PHP 5.1.6 is no longer supported. CodeIgniter now requires PHP 5.2.4 and recommends PHP 5.4+ or newer to be used. Changed filenaming convention (class file names now must be Ucfirst and everything else in lowercase).

html phonecode dropdown with country listing

International Telephone Input A jQuery plugin for entering and validating international telephone numbers. It adds a flag dropdown to any input, which lists all the countries and their international dial codes next to their flags. https://github.com/Bluefieldscom/intl-tel-input

PHP 5.6.6 is available now

The change log of 5.6.6 Core: Removed support for multi-line headers, as they are deprecated by RFC 7230. Fixed bug #67068 (getClosure returns somethings that's not a closure). Fixed bug #68942 (Use after free vulnerability in unserialize() with DateTimeZone). (CVE-2015-0273)

Google will begin ranking mobile-friendly sites higher starting April 21

Big changes to Google’s search algorithms are coming: beginning April 21, the company will increase the ranking of sites that are mobile-friendly and surface app results much higher. The company says that the change will have a “significant impact” on all mobile searches in all languages worldwide, but as a result Google says that users will find higher quality results. for more detail please visit  http://thenextweb.com/insider/2015/02/26/google-will-rank-your-site-higher-if-its-mobile-friendly-starting-april-21/

For new and advanced html code

Below link provides you a great html ,css and js work .you should test your modification online .just get the work and modified according to your use and use it http://codepen.io/

Register a subdomain in amazon ec2 server

Assume that you have a domain of example.com that you have purchase. 1 Find the external IP or DNS for your EC2 instance. You probably want to associate an Elastic IP to your instance, otherwise the IP of your instance will change on reboots. 2  Create a DNS record for your domain, for instance a CNAME record to point to your Elastic IP/DNS name: subdomain.example.com => ec2-xx-xxx-xxx-xxx.eu-west-1.compute.amazonaws.com 3  Make sure your httpd.conf contains a line to allow virtual hosts: NameVirtualHost *:80 4  Create a virtual host directive: httpd.conf: <VirtualHost *:80>   ServerName subdomain.example.com   ServerAdmin webmaster@subdomain.example.com   DocumentRoot /var/www/example.com/subdomain   <Directory /var/www/example.com/subdomain>     Options Indexes FollowSymLinks MultiViews     AllowOverride All     Order allow,deny     allow from all   </Directory>   ErrorLog /var/log/apache2/subdomain.example.com.error.log   LogLevel warn   CustomLog /

check your laptop processor quality

http://www.cpubenchmark.net/ laptop.html

upload a csv file in database from your system

LOAD DATA LOCAL INFILE 'C:\\temp\\yourfile.csv' INTO TABLE database.table FIELDS TERMINATED BY ';' ENCLOSED BY '"' LINES TERMINATED BY '\r\n' (field1, field2);

regex validation for php

Validation library for the php here you find all the regex validation which we  are using in the validation of our text field.

Send variable with location.reload in jquery

// Store localStorage.setItem("lastname", "Smith"); // Retrieve document.getElementById("result").innerHTML = localStorage.getItem("lastname");

capitalize first letter using the codeigniter query

$this->db->select(' *,CONCAT(UCASE(LEFT(couloum_name, 1)),                              SUBSTRING(couloum_name, 2)) as alias_name',FALSE); $this->db->from('table_name'); $response=$this->db->get(); return $response->result();

Use concat function in codeigniter select query

$this->db->select(' *,CONCAT(coloumname,couloumname2) as  alias_name ',FALSE); $this->db->from (tablename); $this->db->where('columname',value); $response=$this->db->get(); return $response->result();

adds a unique CSS class to a single, specific nav menu item.

function my_special_nav_class( $classes, $item ) { if ( is_single() && $item->title == 'Blog' ) { $classes[] = 'special-class'; } return $classes; } add_filter( 'nav_menu_css_class', 'my_special_nav_class', 10, 2 );

Create menu for bootstrap in wordpress

create a file of name wp_bootstrap_navwalker.php  and put this code in it

show loader till the last ajax request is not completed

ajaxstop  :  Whenever an Ajax request completes, jQuery checks whether there are any other outstanding Ajax requests. If none remain, jQuery triggers the  ajaxStop  event $(document).ajaxStop(function () {         // jquery to hide your loader }

check uniqueness in codeigniter formvalidation when editing

<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed'); class MY_Form_validation extends CI_Form_validation {     function __construct(){         parent::__construct();     }     function error_array(){         return $this->_error_array;     }     public function is_unique($str, $field) {         $field_ar = explode('.', $field);               $query = $this->CI->db->get_where($field_ar[0], array($field_ar[1] => $str), 1, 0);         if ($query->num_rows() === 0) {             return TRUE;         }         return FALSE;     } function unique_check($str, $field) { list($field,$exclude)=explode(',', $field); list($table, $field) = explode('.', $field); if(!empty($exclude)) { list($field_name, $post_field) = explode('.', $exclude); $value= $this->CI->input->post($post_field); $this->CI->db->where_not_in($field_name,$value);   }

Add more function in codeigniter form validation library

add library of MY_Form_validation and add function that you want to add in form validation library <?php if ( ! defined ( 'BASEPATH' )) exit ( 'No direct script access allowed' ); class MY_Form_validation extends CI_Form_validation { function __construct(){ parent :: __construct (); } function error_array(){ return $this -> _error_array ; } } and call function in your controller if ( $this -> form_validation ->run()){ }else{ $this->form_validation->error_array(); } error_array will return all the required parameter that you will getfrom  form_error('field_name')

google api to find path between two places

A simple example of using google map to find a path between two places http://jsfiddle.net/gHK7s/2/

Disable click outside of bootstrap modal area to close modal view

There are various method for disable click of Bootstrap modal area to close modal 1) $ ( '#myModal' ). modal ({ backdrop : 'static' }) ; 2) <button data-target = "#myModal" data-toggle = "modal" data-backdrop = "static" > show modal </button> ` 3) $ ( '#myModal' ). modal ({ backdrop : 'static' , keyboard : false })

Database for the world currency

get the database of the world currency in the below link https://drive.google.com/file/d/0B7Y5R-pYvksgbXdlZ1NLZDlIeFk/view?usp=sharing

currency converter

if you want to get current rate of currency use this url  this will provide you current rate of currency in respect to the  FromCurrency  to the  ToCurrency  have a try  in xml format http://www.webservicex.net/CurrencyConvertor.asmx/ConversionRate?FromCurrency=USD&ToCurrency=INR

merging the two table in my sql

UPDATE firsttablename SET coloum_name = ( SELECT coloum_name FROM second_table b WHERE firsttablename . coloum_name = b . coloum_name )

codeigniter unique check on editing a field

function unique_check( $str , $field , $exclude = '' ) { list ( $table , $field ) = explode ( '.' , $field ); if (! empty ( $exclude )){ list ( $field_name , $value ) = explode ( '.' , $exclude ); $this -> db ->where_not_in( $field_name , $value ); } if ( isset ( $this -> db )) { $query = $this -> db ->limit( 1 )->get_where( $table , array ( $field => $str )); return $query ->num_rows() === 0 ; } return FALSE ; } $this ->unique_check( 'test@domain.com' , 'tablename.coloum_name' , 'coloum_name.coloum_value' );

for using the subdomain in codeigniter

$subdomain_arr = explode ( '.' , $_SERVER [ 'HTTP_HOST' ], 2); //creates the various parts          $subdomain_name = $subdomain_arr [0]; //assigns the first part          echo $subdomain_name ;