A Datacentre is a group of Servers
Servers can be grouped in a Datacentre
A Server (Instance) is a single Rethink process
A Database is a logical grouping for Tables - Tables may sit on different Servers
A Shard is a partition of a Table
A Datacentre is a group of Servers
Servers can be grouped in a Datacentre
A Server (Instance) is a single Rethink process
A Database is a logical grouping for Tables - Tables may sit on different Servers
A Shard is a partition of a Table
r.db("user1").table("others").filter(function(user) { | |
return user.hasFields('contact_id') | |
}).eqJoin("contact_id", r.db("user1").table("contacts")) |
:20] <jakcharlton> Is there a simple way of renaming that doesnt need to iterate data (inefficiently) ? | |
[10:20] <@neumino> You can chain your eqJoin/innerJoin/outerJoin with | |
[10:20] <@neumino> map( r.row.merge({ contact: r.row("left"), organisation: r.row("right") }).without("left", "right") ) | |
[10:20] <@neumino> And that should do the trick | |
[10:20] <@neumino> There is not a sugar syntax for renaming field yet |
class Product < ActiveRecord::Base | |
# our hstore column, make sure gem 'activerecord-postgres-hstore' is in your Gemfile | |
# and you've run: rails g hstore:setup | |
serialize :data, ActiveRecord::Coders::Hstore | |
# name is a string col | |
attr_accessible :data, :name | |
def self.search(query) |
def perform(email_job_id, recipient_ids) | |
job = EmailJob.find(email_job_id) | |
recipients = Person.where("email IS NOT NULL and email <> ''").where(id: recipient_ids) | |
to = [] | |
substitues = [] | |
sub_fields = ["title", "first_name", "last_name", "email", "telephone_number", "website"] | |
recipients.each do |r| | |
recipient = {} | |
recipient["_rcpt"] = "[#{r.full_name}](mailto:#{r.email})" |
Hi Jak, | |
Not a problem, you do raise some good points. First off, I would like to point out that uniqueness of credit cards is determined across your entire gateway account, since credit cards are not linked to specific merchant accounts in the gateway. Once stored, a credit card can be used on any merchant account in the gateway, but attempting to store that card again, if you’re doing duplicate card checking, wouldn’t be possible. | |
Regarding the use cases you’ve brought up, they do bring some of the inherent limitations of doing duplicate checking to light. If merchants are looking to ensure that duplicate cards are kept out of their vault, they’ll have to find some way to allow for joint credit cards. One way I can think to manage this would be to find a way to allow people to link their account to someone else’s account in your application, then give them access to the other user’s payment methods. Of course, there is potential for malicious users to take advantage of this, so you would have to be extreme |
// using self - this seems the most obvious, esp coming from Rails | |
var self = this; | |
this.create({ | |
myModel: { | |
email: $('#email').val() | |
} | |
}, | |
{ | |
wait: true, |
git log --pretty=format:"%h %ad | %s%d [%an]" --graph --date=short | |
[alias] | |
hist = log --pretty=format:\"%h | %ad | %s%Cred%d%Creset %Cgreen[%an]%Creset\" --graph --date=short |
require 'net/https' | |
require 'json' | |
set :stages, %w(production staging) | |
set :default_stage, "staging" | |
require 'capistrano/ext/multistage' | |
require 'bundler/capistrano' | |
default_run_options[:pty] = true |
#!/bin/sh | |
# Just copy and paste the lines below (all at once, it won't work line by line!) | |
# MAKE SURE YOU ARE HAPPY WITH WHAT IT DOES FIRST! THERE IS NO WARRANTY! | |
function abort { | |
echo "$1" | |
exit 1 | |
} | |
set -e |