This was tested using Ruby 2.0.0 and Rails 4.0.0.rc1.
-
Set the install directory for Bower components:
// .bowerrc {
"directory": "app/assets/components"
(function(){ | |
function multiply_by_two(num){ | |
if (typeof num === 'number'){ | |
return num * 2; | |
} else { | |
return num + ' is not a valid number'; | |
} | |
} | |
// If the value is equal write '.' to the page if not write 'F' |
package com.company; | |
import java.util.Arrays; | |
public class Main extends TestCase { | |
static public void main(String[] args) { | |
// Assessment 0: Multiples of 3 and 5 in n | |
assertEqual(multiplesOf3And5(1000), 233168); | |
assertEqual(multiplesOf3And5(500), 0); |
library form; | |
import 'dart:html'; | |
class Form { | |
static String formType = window.location.hash.replaceFirst('#', ''); | |
Form(){ | |
importForm(formType); | |
} |
required_fields = $('[required="required"], .required') | |
$('.validate').click () -> | |
validate_form() | |
if $('.input-error').length == 0 | |
$('form').submit() | |
false | |
required_fields.blur () -> | |
validate_input(@) |
#! /bin/bash | |
### BEGIN INIT INFO | |
# Provides: unicorn | |
# Required-Start: $local_fs $remote_fs $network $syslog | |
# Required-Stop: $local_fs $remote_fs $network $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: starts the unicorn web server | |
# Description: starts unicorn |
#environment.rb | |
Date::DATE_FORMATS.merge!(:default => "%m/%d/%Y") |