<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>
-
URL
<The URL Structure (path only, no root url)>
-
Method:
# Call scopes directly from your URL params: | |
# | |
# @products = Product.filter(params.slice(:status, :location, :starts_with)) | |
module Filterable | |
extend ActiveSupport::Concern | |
module ClassMethods | |
# Call the class methods with the same name as the keys in <tt>filtering_params</tt> | |
# with their associated values. Most useful for calling named scopes from |
const exec = require('child_process').exec; | |
exports.handler = function(event, context, callback) { | |
const child = exec('./ruby_wrapper ' + "'" + JSON.stringify(event) + "'", (error, stdout, stderr) => { | |
callback(null, JSON.parse(stdout)); | |
}); | |
child.stdout.on('data', console.log); | |
child.stderr.on('data', console.error); | |
}; |
# DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
# Version 2, December 2004 | |
# | |
# Copyright (C) 2004 Sam Hocevar | |
# 14 rue de Plaisance, 75014 Paris, France | |
# Everyone is permitted to copy and distribute verbatim or modified | |
# copies of this license document, and changing it is allowed as long | |
# as the name is changed. | |
# | |
# DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
/* | |
Quicksort! | |
Name your function quickSort. | |
Quicksort should grab a pivot from the end and then separate the list (not including the pivot) | |
into two lists, smaller than the pivot and larger than the pivot. Call quickSort on both of those | |
lists independently. Once those two lists come back sorted, concatenate the "left" (or smaller numbers) | |
list, the pivot, and the "right" (or larger numbers) list and return that. The base case is when quickSort |
{ | |
"body": { | |
"devices": [ | |
{ | |
"_id": "70:ee:50:00:00:14", | |
"co2_calibrating": false, | |
"firmware": 91, | |
"last_status_store": 1441872001, | |
"last_upgrade": 1440507643, | |
"module_name": "ind", |
#Country Codes This uses the CIA World Factbook compendium of country codes to convert one type of code to another easily and programmatically. The table on this website was converted into JSON format on 20/11/2014.
As an example, enter the input code type, a code, and the output code type (separated by commas) above. Choose between the following options (Case sensitive)
- name
- GEC
- ISO_ALPHA_2
- ISO_ALPHA_3
{ | |
"AF":"AFG", | |
"AX":"ALA", | |
"AL":"ALB", | |
"DZ":"DZA", | |
"AS":"ASM", | |
"AD":"AND", | |
"AO":"AGO", | |
"AI":"AIA", | |
"AQ":"ATA", |
// app/transforms/array.js | |
import Ember from 'ember'; | |
import DS from 'ember-data'; | |
export default DS.Transform.extend({ | |
deserialize: function(value) { | |
if (Ember.isArray(value)) { | |
return Ember.A(value); | |
} else { | |
return Ember.A(); |
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |