Posts

Showing posts from May, 2017

Dynamic Responsive Pinterest Style Columns Layout with Pure CSS

Image
When Im searching for casarole  layout I found the following which is really helped me. I further improved and shared herewith. http://www.cssscript.com/dynamic-responsive-pinterest-style-columns-layout-with-pure-css/ HTML <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>jquery实现瀑布流效果</title> <link rel="stylesheet" type="text/css" href="../css/style.css" /> <script src="../js/jquery.js"></script> <script src="../js/waterfalls.js"></script> </head> <body> <section id="title"> <h2>jquery瀑布流效果特效代码</h2> </section> <div id="warp"> <div class="box"> <div class="pic"> <img src="../images/img_1.jpg" /> </div> </div> <div class="box"> <div cla

jQuery Validator with Loding GIF

Image
I had to add Loding GIF   form submmit but it was not trigger at the exact event due to form validations. However as fallows it can be achieved easy .I use jQuery form validator (not HTML 5) . CSS div#spinner {     display: none;     width:160px;     height: 160px;     position: fixed;     top: 50%;     left: 50%;     background:url(../images/page-loader.gif) no-repeat center ;     text-align:center;     padding:10px;     font:normal 16px Tahoma, Geneva, sans-serif;     margin-left: -50px;     margin-top: -50px;     z-index:2;     overflow: auto; } HTML  <div id="spinner"></div> JS $(document).ready(function() {    $("form[name='registerRefer']").validate({     rules: {        name: {            required: true,        } },                                  submitHandler: function (form) {                                   $("div#spinner").fadeIn("fast");                            

Laravel using Cookies to Save URL Question Mark Parameter

Image
In Laravel most of the time cookies are set by the response .Further most of the posts does not directly tell how to retire URL Get  parameters. Eg: https://www.blogger.com/? blogID=1441573773987640178 To retrieve the value we can take the value in routes >>web.php Route::get('/', function(){      $term = Input::get(' blogID ');       if(isset($term)){         Cookie::queue(Cookie::make(' blogID ',$term, 60*24*365));       }     return view('home'); }); In here cookies are save using (Cookie::make) . In the next response the cookie value get saved in client browser.               e.g.  $cookie = Cookie :: make ( $name , $value , 60 ); http://laravel-recipes.com/recipes/48/creating-a-new-cookie To retrieve the Cookies value is simple       $request->cookie(' blogID ');

Laravel Customize Auth RegisterController Step By Step

Image
In Laravel Default RegisterController located in Auth/RegisterController can be customized to to meet another requirement. It use the user table of Laravel and not use any e.g. : send the account activation mail with other detail namespace App\Http\Controllers\Auth; use App\User; use App\Http\Controllers\Controller; use Illuminate\Support\Facades\Validator; use Illuminate\Foundation\Auth\RegistersUsers; class RegisterController extends Controller {     /*     |--------------------------------------------------------------------------     | Register Controller     |--------------------------------------------------------------------------     |     | This controller handles the registration of new users as well as their     | validation and creation. By default this controller uses a trait to     | provide this functionality without requiring any additional code.     |     */     use RegistersUsers;     /**      * Where to redirect users after registr

Comple Guilde on Setup Laravel Bitbucket clone

Image
Guide  https://laravel.com/docs/5.3/installation 1. sudo git clone https://kanchanainterlec@bitbucket.org/interlectivesg/bme_app.git 2. composer install 3.config debug true 4 .create .env mv .env.sample .env 5. php artisan key : generate   6.see error 7. Set permission :chmod -R 777 8.Set the database detail on .env file 9.  php artisan migrate : refresh run the application by moving to public

Remove MySql Strick Mode

Image
I have installed MySql in my Mac OSx using home brew. However when I was going to execute query like below it iilll gives a error Query : `comment_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', Error :  #1067 - Invalid default value for 'comment_date' The reason is My Sql has been installed in Strict mode Where User could not do some database actions ,which are prmiited in old version. This  article helps to remove strict mode permemtly as well as tempory  : http://nickbartlett.com/how- to-turn-off-mysql-strict-mode/ Simply run the query with following in the begin SET @@global.sql_mode= ”;