Skip to content

Instantly share code, notes, and snippets.

var _ = require('lodash');
/**
* `isValidationError`
*
* Is this a waterline validation error?
*/
function isWaterlineValidationError (err) {
if (_.isPlainObject(err)) {
@johnnncodes
johnnncodes / error
Created February 17, 2014 02:36
errors
{
"ValidationError": {
"title": [
{
"data": "",
"message": "Validation error: \"\" Rule \"required(true)\" failed.",
"rule": "required",
"args": [
true
]
each item in data.level.exam.questionsMultiChoice
p= item.question
each choice in item.choices
p= choice.choice
// need to output
<p>Question</p>
<!DOCTYPE html>
<html>
<head>
<title>Example of Twitter Bootstrap</title>
<!-- Include the bootstrap stylesheets -->
<link href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<div class="container">
-- PostgreSQL 9.2 beta (for the new JSON datatype)
-- You can actually use an earlier version and a TEXT type too
-- PL/V8 http://code.google.com/p/plv8js/wiki/PLV8
-- Inspired by
-- http://people.planetpostgresql.org/andrew/index.php?/archives/249-Using-PLV8-to-index-JSON.html
-- http://ssql-pgaustin.herokuapp.com/#1
-- JSON Types need to be mapped into corresponding PG types
--
package main
import (
"net/http"
"database/sql"
"fmt"
"log"
"os"
)
'use strict';
/**
*
* An Angular Jasmine testing utility
*
* @copyright 2013 Chris Sattinger
* MIT License
*
* automatically injects these services:
* '$httpBackend', '$rootScope', '$controller', '$compile'
## Customized for Laravel 4
# setting worker_processes to CPU core count
worker_processes 1;
daemon off;
events {
worker_connections 1024;
}
## Customized for Laravel 4
# setting worker_processes to CPU core count
worker_processes 1;
daemon off;
events {
worker_connections 1024;
}
/**
* Interceptor
* Implements functionality to catch various requests and fire events when they happen. This is generally to ensure
* that responses from the server are handled in a uniform fashion across the application. Also, by firing events
* it allows to have any number of handlers attach to the response.
*
* @author Kirk Bushell
* @date 28th March 2013
*/
var module = angular.module('core.interceptor', []);