Given a set of documents, each associated with multiple tags, how can I retrieve the documents tagged with an arbitrary set of tags?
My solution
<script> | |
function curry(f) | |
{ | |
if (typeof f != "function" || f.length < 2) | |
return f; | |
return mkHelper(f, []); | |
} | |
function mkHelper(f, args) |
The diff output is more specific:
[I]f a whole block of text is moved, then all of it, rather than just the beginning and end, is detected as changed.
>The algorithm described here avoids these difficulties. It detects differences that correspond very closely to our intuitive notion of difference.
var module = angular.module( 'my.resource', [ 'ngResource' ] ); | |
module.factory( 'Resource', [ '$resource', function( $resource ) { | |
return function( url, params, methods ) { | |
var defaults = { | |
update: { method: 'put', isArray: false }, | |
create: { method: 'post' } | |
}; | |
methods = angular.extend( defaults, methods ); |
/** @jsx React.DOM */ | |
var ReactDropzone = React.createClass({ | |
componentDidMount: function() { | |
var options = {}; | |
for (var opt in Dropzone.prototype.defaultOptions) { | |
var prop = this.props[opt]; | |
if (prop) { | |
options[opt] = prop; | |
continue; |
# Built application files | |
/*/build/ | |
# Crashlytics configuations | |
com_crashlytics_export_strings.xml | |
# Local configuration file (sdk path, etc) | |
local.properties | |
# Gradle generated files |
git fetch --all | |
git reset --hard origin/master | |
git pull origin master |
/** | |
* Handles form errors from server. | |
*/ | |
app.factory('formErrors', function () { | |
return { | |
/** | |
* Creates $error.errorKey (String) and sets validity | |
* for every failing model validation received from the server. | |
* E.g. 'form.message.$error.errorKey' can be accessed in the view. |
#!/bin/sh | |
UNIVERSAL_OUTPUTFOLDER=${BUILD_DIR}/${CONFIGURATION}-universal | |
# make sure the output directory exists | |
mkdir -p "${UNIVERSAL_OUTPUTFOLDER}" | |
# Step 1. Build Device and Simulator versions | |
xcodebuild -target "${PROJECT_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${CONFIGURATION} -sdk iphoneos BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}" clean build | |
xcodebuild -target "${PROJECT_NAME}" -configuration ${CONFIGURATION} -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}" clean build |