$ rails g model User
belongs_to
has_one
| // This seems way too difficult for what you would expect to be a pretty common task; | |
| // taking a search string from the user and finding documents which contain some or all of the terms | |
| // in the search string. | |
| // This function naively splits a search string into terms and finds documents | |
| // which contain some or all of the terms. Does not handle quoted terms as or ignore case as it should. | |
| public IEnumerable<SearchResult> Search(string searchString, string[] fields) | |
| { | |
| // Spit the search string and return an empty list if no search string was provided. | |
| if (string.IsNullOrEmpty(searchString)) return new List<SearchResult>(); |
| #!/bin/bash | |
| # Functions | |
| ok() { echo -e '\e[32m'$1'\e[m'; } # Green | |
| EXPECTED_ARGS=3 | |
| E_BADARGS=65 | |
| MYSQL=`which mysql` | |
| Q1="CREATE DATABASE IF NOT EXISTS $1;" |
| { | |
| "$schema": "http://json-schema.org/draft-04/schema#", | |
| "title": "propertyEditors", | |
| "description": "An array of Umbraco Property Editors", | |
| "type": "object", | |
| "properties": { | |
| "name": { | |
| "description": "The friendly name of the property editor, shown in the Umbraco backoffice", | |
| "type": "string" | |
| }, |
$/
artifacts/
build/
docs/
lib/
packages/
samples/
src/
tests/
| module DapperFSharp = | |
| open System.Data.SqlClient | |
| open System.Dynamic | |
| open System.Collections.Generic | |
| open Dapper | |
| let dapperQuery<'Result> (query:string) (connection:SqlConnection) = | |
| connection.Query<'Result>(query) | |
| let dapperParametrizedQuery<'Result> (query:string) (param:obj) (connection:SqlConnection) : 'Result seq = |
| import React, { Component } from 'react'; | |
| import { createStore, combineReducers, applyMiddleware, bindActionCreators } from 'redux'; | |
| import { provide, connect } from 'react-redux'; | |
| import thunk from 'redux-thunk'; | |
| const AVAILABLE_SUBREDDITS = ['apple', 'pics']; | |
| // ------------ | |
| // reducers | |
| // ------------ |
| query IntrospectionQuery { | |
| __schema { | |
| queryType { name } | |
| mutationType { name } | |
| subscriptionType { name } | |
| types { | |
| ...FullType | |
| } | |
| directives { |
git remote add upstream https://github.com/whoever/whatever.git
git fetch upstream
| // https://raw.githubusercontent.com/donnut/typescript-ramda/master/ramda.d.ts | |
| // https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/master/lodash/lodash.d.ts | |
| declare namespace fp { | |
| interface Dictionary<T> { | |
| [index: string]: T; | |
| } | |
| interface CurriedFunction1<T1, R> { |