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';
| // Assume Coord has members x(), y() and z() and supports arithmetic operations | |
| // that is Coord u + Coord v = u.x() + v.x(), u.y() + v.y(), u.z() + v.z() | |
| inline Point | |
| dot(const Coord& u, const Coord& v) | |
| { | |
| return u.x() * v.x() + u.y() * v.y() + u.z() * v.z(); | |
| } | |
| inline Point |
| #!/bin/sh | |
| filename="$1" | |
| extension=${filename##*.} | |
| if [ ${extension} = "doc" ] | |
| then | |
| # Use cat doc for older document formats | |
| catdoc "$filename" | |
| else |
| codestyle.co examples |
| /* | |
| Draw Rectangles | |
| @include <canvas> | |
| @use fillRect() or fill() or stroke() to render to canvas | |
| */ | |
| function drawRects() { | |
| var ctx = document.getElementById('canvas').getContext('2d'); | |
| ctx.fillStyle = "rgb(200,0,0)"; | |
| ctx.fillRect(10, 10, 55, 50); |
I loved Virgil's Dribble shot and decided to remake it with some SVG animations :) I didn't really want to recreate the curvy line since I believe straight lines are more accurate. Sorry Virgil, I might make them curvy one day :)! With a bit of time on my hands I could make it even more detailed. I hope you like it and post some feedback on how to make this better :)! Don't forget to check out the original at http://goo.gl/0aKiS0
Kudos Virgil!
Forked from Jonas Badalic's Pen Stats animation..
| /**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 |