# This example does an AJAX lookup and is in CoffeeScript
$('.typeahead').typeahead(
# source can be a function
source: (typeahead, query) ->
# this function receives the typeahead object and the query string
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/************************************************************************** | |
* OSM2GEO - OSM to GeoJSON converter | |
* OSM to GeoJSON converter takes in a .osm XML file as input and produces | |
* corresponding GeoJSON object. | |
* | |
* AUTHOR: P.Arunmozhi <[email protected]> | |
* DATE : 26 / Nov / 2011 | |
* LICENSE : WTFPL - Do What The Fuck You Want To Public License | |
* LICENSE URL: http://sam.zoy.org/wtfpl/ | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Execute BAQ with parameter | |
using (var session = new Epicor.Mfg.Core.Session("user", "secret", "AppServerDC://server:port")) | |
{ | |
// DynamnicQuery for BAQ | |
var dynamicQuery = new Epicor.Mfg.BO.DynamicQuery(session.ConnectionPool); | |
// Build Parameters DS | |
QueryExecutionDataSet executionDS = new QueryExecutionDataSet(); | |
// Actual parameter row |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
// Charles Lawrence - Feb 16, 2012. Free to use and modify. Please attribute back to @geuis if you find this useful | |
// Twitter Bootstrap Typeahead doesn't support remote data querying. This is an expected feature in the future. In the meantime, others have submitted patches to the core bootstrap component that allow it. | |
// The following will allow remote autocompletes *without* modifying any officially released core code. | |
// If others find ways to improve this, please share. | |
//User clicked some value by Adrian Hove | |
var autocomplete = $('#searchinput').typeahead() | |
.on('keyup', function(ev){ | |
//User clicked some value |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Event::listen('404', function() | |
{ | |
$username = URI::segment(1); | |
$user = User::where_username($username) | |
->where_type('account') | |
->first(); | |
if ($user != null) { | |
if ($user->username != '') { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var o = $({}); | |
$.subscribe = o.on.bind(o); | |
$.publish = o.trigger.bind(o); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
So you want to accept payments online with PHP? | |
- Well, you probably don't want to handle that process manually. Too dangerous and risky. | |
- So learn the Stripe API. Works great! | |
- But you'll still need to setup SSL. So go learn how to do that. | |
- Stripe provides a PHP package, so download that through Composer. If you're not familiar with Composer, you'll need to learn that too. | |
- If you want the most flexibility, you'll want to manually create the payment form. | |
- So you'll need to send an AJAX request with a special token to Stripe's API. jQuery makes this easy, so go learn jQuery. | |
- Once the payment completes, you'll likely want to send the buyer a "Purchased" email, so learn how to send email. | |
- But don't make the user wait for the email to send. That takes too long. Add that to a background job. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@foreach (array_slice($posts->toArray(), 0, 5) as $post) | |
<h1>{{ $post['title'] }}</h1> | |
@endforeach |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.btn-primary { | |
background-color: #08c; | |
border-color: #08c; | |
color: #fff; | |
background-color: #007ab8; | |
background-image: -moz-linear-gradient(top, #08c, #006699); | |
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#08c), to(#006699)); | |
background-image: -webkit-linear-gradient(top, #08c, #006699); | |
background-image: -o-linear-gradient(top, #08c, #006699); | |
background-image: linear-gradient(to bottom, #08c, #006699); |
OlderNewer