Defining Eloquent model (will assume that DB table named is set as plural of class name and primary key named "id"):
class Shop extends Eloquent {}
Using custom table name
protected $table = 'my_shops';
| #!/usr/bin/perl -w | |
| use strict; | |
| while (my $line=<>) { | |
| my ($date, $host, $url_with_method, $status, $size, $referrer, $agent) = $line =~ | |
| m/^\S+\s+\S+\s+\[(\S+\s+[\-|\+]\d{4})\]\s+(\S+)\s+\S+\s+\S+\s+\S+\s+\S+\s+"(\S+\s+\S+\s+[^"]+)"\s+(\d{3})\s+\S+\s+(\d+|-)\s+\d+\s+\d+\s+\d+\s+"(.*?)"\s+"(.*?)"/; | |
| # Print relevant bits | |
| } |
| import android.accounts.Account; | |
| import android.accounts.AccountManager; | |
| import android.annotation.TargetApi; | |
| import android.content.Context; | |
| import android.content.SharedPreferences; | |
| import android.content.SharedPreferences.Editor; | |
| import android.os.Build; | |
| import android.preference.PreferenceManager; | |
| public final class AccountUtils { |
| -----BEGIN PGP SIGNED MESSAGE----- | |
| Hash: SHA1 | |
| // Generated on: 2012-04-13 23:44:46 GMT+00:00 | |
| // ************** Tweet 1 of 47455 ************** | |
| { | |
| "in_reply_to_screen_name": null, |
| #!/bin/sh | |
| SHORTCUT="[Desktop Entry] | |
| Name=Sublime Text 2 | |
| Comment=Edit text files | |
| Exec=/usr/local/sublime-text-2/sublime_text | |
| Icon=/usr/local/sublime-text-2/Icon/128x128/sublime_text.png | |
| Terminal=false | |
| Type=Application | |
| Encoding=UTF-8 | |
| Categories=Utility;TextEditor;" |
| codestyle.co examples |
| /**This is example works with only jQuery | |
| * @usecase, if you have an array with empty values (ex: ["I", "", "want", "", "to", "go", "" ]) | |
| * but you want to return this array as a string. | |
| */ | |
| var myRoom = { | |
| myAction: function(array){ | |
| garray = $.grep(array,function(n){ | |
| return(n); | |
| }); |
| var directionsService = new google.maps.DirectionsService(); | |
| directionsService.route(request, function (response, status) { | |
| if (status == google.maps.DirectionsStatus.OK) { | |
| var polyline = new google.maps.Polyline(polylineOptions); | |
| var path = response.routes[0].overview_path; | |
| for (var x in path) { |
| #!/bin/bash | |
| sudo apt-get --yes purge xserver* x11-common x11-utils x11-xkb-utils x11-xserver-utils xarchiver xauth xkb-data console-setup xinit lightdm libx{composite,cb,cursor,damage,dmcp,ext,font,ft,i,inerama,kbfile,klavier,mu,pm,randr,render,res,t,xf86}* lxde* lx{input,menu-data,panel,polkit,randr,session,session-edit,shortcut,task,terminal} obconf openbox gtk* libgtk* alsa* nano python-pygame python-tk python3-tk scratch tsconf | |
| sudo apt-get -y purge aspell hunspell-en-us iptraf libaspell15 libhunspell-1.2-0 lxde lxsession lxtask lxterminal squeak-vm whiptail zenity gdm gnome-themes-standard python-pygame | |
| apt-get --yes purge xdg-tools desktop-file-utils omxplayer python3-numpy python3 | |
| sudo apt-get remove xserver-xorg | |
| sudo apt-get purge ^lx | |
| sudo apt-get --yes autoremove | |
| sudo apt-get --yes autoclean | |
| sudo apt-get --yes clean |