php artisan vendor:publish --tag=laravel-pagination
and then add the links method to the view
{!! $foo->links('vendor.pagination.bootstrap-4'); !!}
Reference: https://iwader.co.uk/post/bootstrap-4-pagination-with-laravel
defmodule Json do | |
def flatten(%{} = json) do | |
json | |
|> Map.to_list() | |
|> to_flat_map(%{}) | |
end | |
def flatten(%{} = json) when json == %{}, do: %{} | |
defp to_flat_map([{_k, %{} = v} | t], acc), do: to_flat_map(Map.to_list(v), to_flat_map(t, acc)) | |
defp to_flat_map([{k, v} | t], acc), do: to_flat_map(t, Map.put_new(acc, k, v)) |
php artisan vendor:publish --tag=laravel-pagination
and then add the links method to the view
{!! $foo->links('vendor.pagination.bootstrap-4'); !!}
Reference: https://iwader.co.uk/post/bootstrap-4-pagination-with-laravel
download and install Solr from http://lucene.apache.org/solr/.
you can access Solr admin from your browser: http://localhost:8983/solr/
use the port number used in installation.
#!/bin/bash | |
if [ $# -ne 2 ]; then | |
echo "Usage: $0 file partSizeInMb"; | |
exit 0; | |
fi | |
file=$1 | |
if [ ! -f "$file" ]; then |
'use strict'; | |
const data = [{ | |
name: "Schumacher", | |
races: 97 | |
}, { | |
name: "Vettel", | |
age: 45 | |
}, { | |
name: "Hamilton", |
# This config will host your main [Laravel] GUI application at /, and any additional [Lumen] webservices at /api/v1 and /api/v2... | |
# This also works perfectly for all static file content in all projects | |
# This is full of debug comments so you can see how to print debug output to browser! Took me hours to nail this perfect config. | |
# Example: | |
# http://example.com - Main Laravel site as usual | |
# http://example.com/about - Main Laravel site about page as usual | |
# http://example.com/robots.txt - Main Laravel site static content as usual | |
# http://example.com/api/v1 - Lumen v1 api default / route | |
# http://example.com/api/v1/ - Lumen v1 api default / route |
#!/bin/sh | |
DATABASE_NAME='wordpress' | |
DATABASE_USER='wordpress' | |
ROOT_MYSQL_PASSWORD=`dd if=/dev/urandom bs=1 count=32 2>/dev/null | base64 -w 0 | rev | cut -b 2- | rev` | |
WORDPRESS_MYSQL_PASSWORD=`dd if=/dev/urandom bs=1 count=32 2>/dev/null | base64 -w 0 | rev | cut -b 2- | rev` | |
# Write Passwords to File. |
var x = | |
{ | |
toString: function() | |
{ | |
return "foo"; | |
}, | |
valueOf: function() { | |
return 42; | |
} | |
}; |
//var csv is the CSV file with headers | |
function csvJSON(csv){ | |
var lines=csv.split("\n"); | |
var result = []; | |
var headers=lines[0].split(","); | |
for(var i=1;i<lines.length;i++){ |