Skip to content

Instantly share code, notes, and snippets.

write-host "this script will convert Fanalab Configuration files from UK format to US format"
write-host "(UK numbers like 84,7 will be replaced with 84.7)"
write-host "Run this from the same directory as the profiles you want to convert"
write-host "They will be placed in a new folder named NA"
$filelist = get-childitem -filter "*.pws" -Path . -File
if ($(test-path -path "NA" ) -ne $true)
{
new-item -path "NA" -ItemType Directory
}
$(document).ready(function () {
//register a click handler
$('#Button1').click(ResetPanel);
$('#Button2').click(ResetPanel);
});
<?
$music()->
filter(function ($value,$key) {
if(strtolower($key) == 'music type' && strtolower($value) == 'jazz')
{
return true;
} else {
return false;
})->
pluck('title')->
$(document).ready(function () {
//register a click handler
$('#Button1').click(function() {
$.ajax("/admin/import/fuel/deleteStageData", {
success: function (data) {
$('#importresults').DataTable().ajax.reload();
ResetPanelsForNoData();
},
error: function () {
alert('error purging data, please refresh the page');

#Comments

In the above code, assigning the anonymous functions to variables in the same code block works, if I assign them above.

If I assign them below, no go.

I'd like to be able to define those helper functions (ShowGreatThanZero and displayoutput) elsewhere, so that the code is neat and clean.

@jackfruh
jackfruh / BladeTemplate.php
Created March 14, 2016 02:03
Using Select dropdowns with Laravel Form Model Binding LV5
{!! Form::model($event, array('route' => array('admin.event.update', $event->id), 'method' =>'PATCH')) !!}
<div class="form-group">
{!! Form::label('organization_name', 'Organization') !!}
{!! Form::select('organization_name', $organizations, $event->organization_id) !!}
<!-- note above, the select takes the array we made in the controller ($organizations) and it also takes the field from the model that matches
(In this case $event->organization_id)
from this we can expect:
- that we have an event table with a field for the organization ID.
- that on the our form, when viewed in a browser, we'll see a drop down with the NAMES of the organizations from the organization table
- that when we select an organization by NAME from the select dropdown in the browser,
<?php namespace App\Http\Controllers;
Use DB;
use App\Http\Requests;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use App\Models\Event;
class MobileController extends Controller
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"laravel/framework": "5.1.*",
"guzzlehttp/guzzle": "~5.0",
"laravelcollective/html": "5.1.*"
public function create()
{
//note the 'lists' command and the two fields, the name to be displayed, and the key:
$events = Event::lists('event_name', 'id');
return view('admin.presentations.create')->with('events', $events);
}
Route::controllers([
'auth' => 'Auth\AuthController',
'password' => 'Auth\PasswordController'
]);