For the given sample database, the following example illustrates a possible interface for joining SQL tables within Minimongo.
Table classes
id | name | teacher |
---|---|---|
1 | algebra | 1234 |
ben@x131e:~/meteor$ meteor create velocity-core-issue-114 | |
velocity-core-issue-114: created. | |
To run your new app: | |
cd velocity-core-issue-114 | |
meteor | |
ben@x131e:~/meteor$ cd velocity-core-issue-114/ | |
ben@x131e:~/meteor/velocity-core-issue-114$ meteor add numtel:velocity-tinytest velocity:html-reporter | |
added velocity:html-reporter at version 0.2.4 | |
added coffeescript at version 1.0.4 |
#!/usr/bin/env node | |
var determineDb = function(lines, startIndex){ | |
// Look backward from statement at startIndex to find database name used | |
var result; | |
for(var i = startIndex; i >= 0; i--){ | |
result = lines[i].match(/^use (`([^\.]+)`|[^\.\/]+)?/i); | |
if(result === null) continue; | |
if(result[2] === undefined){ | |
return result[1]; |
From what I can tell, accomplishing a more automatic lazy-loading system would require the current file bundling scheme to be amended to support applications written with explicit source file dependency trees.
With the dependency tree, an intelligent lazy-loader could decide which files are necessary for which routes/templates.
In order to not break compatibility with existing applications, the directories used must become configurable.
The default configuration could be described in a file such as .meteor/dirmap.json
:
{
var ZongJi = require('zongji'); | |
var RETRY_TIMEOUT = 4000; | |
function zongjiManager(dsn, options, onBinlog) { | |
var newInst = new ZongJi(dsn, options); | |
newInst.on('error', function(reason) { | |
newInst.removeListener('binlog', onBinlog); | |
setTimeout(function() { | |
// If multiple errors happened, a new instance may have already been created |
'use strict'; | |
const asyncProgressPromise = fetchNPM('progress-promise', '0.0.5'); | |
exports.handler = (event, context, callback) => { | |
asyncProgressPromise | |
.then(ProgressPromise => { | |
console.log(ProgressPromise); | |
callback(); | |
}) |
'use strict'; | |
(function() { | |
// inspired by cloudping.info | |
var regions = { | |
'us-east-1': 'US-East (Virginia)', | |
'us-east-2': 'US East (Ohio)', | |
'us-west-1': 'US-West (California)', | |
'us-west-2': 'US-West (Oregon)', | |
'ca-central-1': 'Canada (Central)', | |
'eu-west-1': 'Europe (Ireland)', |
Follow these instructions to start an EC2 instance running Ubuntu that will run rai_node on startup
Select Ubuntu Server 16.04 LTS (HVM), SSD Volume Type. A t2.small or larger instance type is recommended.
Configure the security group to match the screenshot.
Download install_rai_node.sh
below, update the URLs with their latest versions.
Get latest rai_node archive URL from https://github.com/clemahieu/raiblocks/releases.
Get latest gdrive-linux-x64 version URL from https://github.com/prasmussen/gdrive#downloads
function genPow(hash, timeout) { | |
timeout = timeout || 15000000; | |
const start = Date.now(); | |
const hashBytes = hex_uint8(hash); | |
let i=0; | |
while(Date.now() - start < timeout) { | |
const workBytes = nacl.randomBytes(8); | |
for(let j=0;j<256;j++) { | |
workBytes[7] = j; |