Passing and receiving array object between Node.js and C++ binding
$ g++ -dynamiclib -o mylib.dylib main.cpp
$ node index.js
[matrix size: 100x100; n_nonzero: 4; density: 0.04%]
(1, 1) 2.0000
Neo4j install OS X | |
$ brew install neo4j | |
To have launchd start neo4j now and restart at login: | |
brew services start neo4j | |
Or, if you don't want/need a background service you can just run: | |
neo4j start | |
DB Folder |
/* global expect jest */ | |
const delay = ms => fn => setTimeout(fn, ms); | |
const mockGlobalProperty = globalObject => key => value => { | |
// save original implementation in order to unmock later | |
const original = globalObject[key]; | |
// mock key on the global object | |
Object.defineProperty(globalObject, key, { value, writable: true }); |
// | |
// UITextViewPlaceholder.swift | |
// TextViewPlaceholder | |
// | |
// Copyright (c) 2017 Tijme Gommers <tijme@finnwea.com> | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a copy | |
// of this software and associated documentation files (the "Software"), to deal | |
// in the Software without restriction, including without limitation the rights | |
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
// a typescript implement of hindley-milner type inference | |
// reference http://smallshire.org.uk/sufficientlysmall/2010/04/11/a-hindley-milner-type-inference-implementation-in-python/ | |
/// <reference path="./lib.es6.d.ts" /> | |
// ... | |
interface AstNode { | |
} | |
class Id implements AstNode { |
ACTION | |
AD_HOC_CODE_SIGNING_ALLOWED | |
ALTERNATE_GROUP | |
ALTERNATE_MODE | |
ALTERNATE_OWNER | |
ALWAYS_SEARCH_USER_PATHS | |
ALWAYS_USE_SEPARATE_HEADERMAPS | |
APPLE_INTERNAL_DEVELOPER_DIR | |
APPLE_INTERNAL_DIR | |
APPLE_INTERNAL_DOCUMENTATION_DIR |
Updated for Rails 4.0.0+
Set up the bower
gem.
Follow the Bower instructions and list your dependencies in your bower.json
, e.g.
// bower.json
{
# | |
# This config file is a combination of ideas from: | |
# http://www.37signals.com/svn/posts/1073-nuts-bolts-haproxy | |
# http://www.igvita.com/2008/05/13/load-balancing-qos-with-haproxy/ | |
# http://wiki.railsmachine.com/HAProxy | |
# http://elwoodicious.com/2008/07/15/nginx-haproxy-thin-fastcgi-php5-load-balanced-rails-with-php-support/ | |
# http://upstream-berlin.com/2008/01/09/using-haproxy-with-multiple-backends-aka-content-switching/ | |
# http://wiki.railsmachine.com/HAProxy | |
# http://gist.github.com/raw/25482/d39fb332edf977602c183194a1cf5e9a0b5264f9 | |
# |
#Model | |
@user.should have(1).error_on(:username) # Checks whether there is an error in username | |
@user.errors[:username].should include("can't be blank") # check for the error message | |
#Rendering | |
response.should render_template(:index) | |
#Redirecting | |
response.should redirect_to(movies_path) |
class ZendeskTicketsJob | |
extend Resque::Plugins::ExponentialBackoff | |
@queue = :low | |
FIELDS = ['zendesk_id', 'requester_id', 'assignee_id', 'group', 'subject', 'tags', 'status', 'priority', 'via', 'ticket_type', 'created_at', 'assigned_at', 'solved_at', 'resolution_time', 'satisfaction', 'group_stations', 'assignee_stations', 'reopens', 'replies', 'first_reply_time_in_minutes', 'first_reply_time_in_minutes_within_business_hours', 'first_resolution_time_in_minutes', 'first_resolution_time_in_minutes_within_business_hours', 'full_resolution_time_in_minutes', 'full_resolution_time_in_minutes_within_business_hours', 'agent_wait_time_in_minutes', 'agent_wait_time_in_minutes_within_business_hours', 'requester_wait_time_in_minutes', 'requester_wait_time_in_minutes_within_business_hours', 'reservation_code', 'requires_manual_closing'] | |
def self.perform(url) | |
`rm /tmp/zendesk_tickets*` | |
`wget #{url} -O /tmp/zendesk_tickets.csv.zip` | |
`unzip -p /tmp/zendesk_tickets.csv.zip > /tmp/zendesk_tickets.csv` | |