This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //---------------------------------------------------- AJAX Search Company Name --------------------------------------------------- | |
| $( "#company_by_name" ).autocomplete({ | |
| source: function( request, response ) { | |
| $.ajax( { | |
| data: { | |
| keyword: request.term // This will add "?keyword=typedValue" in below url | |
| }, | |
| url: "/datamining/public/ajax_comp", | |
| method: "get", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>regex test</title> | |
| </head> | |
| <body> | |
| <script type="text/javascript"> | |
| var regex = /((http|https)\:\/\/)?[a-zA-Z0-9\\/\?\:@\-_=#]+\.([a-zA-Z0-9\&\.\/\?\:@\-_=#])+/g ; | |
| str = "lorem ipsum www.google.com lorem ipusm dolor http://yahoo.com/something ... abc.com .. ... hearted. eu.com com."; | |
| var myArray = str.match(regex); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php die('This file is not really here!'); | |
| /** | |
| * ------------- DO NOT UPLOAD THIS FILE TO LIVE SERVER --------------------- | |
| * | |
| * Implements code completion for CodeIgniter in phpStorm | |
| * phpStorm indexes all class constructs, so if this file is in the project it will be loaded. | |
| * ------------------------------------------------------------------- | |
| * Drop the following file into a CI project in phpStorm | |
| * You can put it in the project root and phpStorm will load it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| laravel update error solution | |
| Simply delete storage/framework/compiled.php and rerun composer install/composer update. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //php time difference am and pm | |
| $startTime=6:45 PM; | |
| $endTime=7:00 PM; | |
| var_dump($endTime ); | |
| var_dump($endTime ); | |
| $d1= strtotime($startTime); | |
| var_dump($d1); | |
| $d2= strtotime($endTime); | |
| var_dump($d2); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| jQuery(function($) { | |
| $.mask.definitions['~']='[+-]'; | |
| $('#phone').mask('(999) 999-99999999'); | |
| $("#ssn").mask("999-99-9999"); | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //laravel database settings with and without homestead | |
| /* below is standard mysql settings for Homestead | |
| 'mysql' => [ | |
| 'driver' => 'mysql', | |
| 'host' => env('DB_HOST', 'localhost'), | |
| 'database' => env('DB_DATABASE', 'comments'), | |
| 'username' => env('DB_USERNAME', 'root'), | |
| 'password' => env('DB_PASSWORD', ''), | |
| 'charset' => 'utf8', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * An helper file for Laravel 4, to provide autocomplete information to your IDE | |
| * Generated for Laravel 4.2.16 on 2014-12-24. | |
| * | |
| * @author Barry vd. Heuvel <barryvdh@gmail.com> | |
| * @see https://github.com/barryvdh/laravel-ide-helper | |
| */ | |
| namespace { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| function getWorkingDays($startDate,$endDate,$holidays) { | |
| // do strtotime calculations just once | |
| $endDate = strtotime($endDate); | |
| $startDate = strtotime($startDate); | |
| //The total number of days between the two dates. We compute the no. of seconds and divide it to 60*60*24 | |
| //We add one to inlude both dates in the interval. | |
| $days = ($endDate - $startDate) / 86400 + 1; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| How to install mongo in sails.js | |
| First Install Mongo DB in your Operationg system. | |
| http://docs.mongodb.org/manual/tutorial/install-mongodb-on-os-x/ | |
| http://docs.mongodb.org/manual/tutorial/install-mongodb-on-windows/ | |
| Getting Started with MongoDB |