I hereby claim:
- I am skywritergr on github.
- I am stefanisg (https://keybase.io/stefanisg) on keybase.
- I have a public key whose fingerprint is 6DBC 0CFB 4DF0 805F 3C9A 33B6 9E3C 7B4E C849 6FBC
To claim this, I am signing this object:
pub fn merge_sort(array: Vec<uint>) -> Vec<uint> { | |
let resultArray = array; | |
let mut leftArray = Vec::new(); | |
let mut rightArray = Vec::new(); | |
let middle : uint = resultArray.len()/2; | |
if resultArray.len() <= 0{ | |
return resultArray; | |
} |
I hereby claim:
To claim this, I am signing this object:
maybeFireSelectionChange: function(fireEvent) { | |
var me = this; | |
if (fireEvent && !me.bulkChange) { | |
me.fireEvent('selectionchange', me, me.getSelection()); | |
} | |
} |
I'm using BackbonePouch with RequireJS. | |
1. I did create the database initially and i inserted a mixed bag of random data (they were not consistent). | |
2. I then decided i wanted to delete everything from the database so i did: | |
new PouchDB('brainip').destroy().then(function(){console.log('done!');}); | |
3. Database was corrupted. I had to change the name to be able to re-enter data. | |
Here is my RequireJS config file where i do the creation/deletion: | |
{ | |
"faint": { | |
"_id": "123efdsfs", | |
"keywords": [ | |
"white", | |
"unconscious", | |
"dizzy" | |
], | |
"thingsToCheck": [ | |
"breathing", |
var recursivelyToggle = function recursivelyToggleChildren(array){ | |
var localArray = array; | |
for(var i=0;i<localArray.length;i++){ | |
var node = localArray[i]; | |
toggleFlag(node); // toggles the flag of the node. | |
if(node.children){ | |
node.children = recursivelyToggleChildren(node.children); | |
} |
{ | |
"id": 123, | |
"name": "Awesome TV series", | |
"watched": false, | |
"children": [ | |
{ | |
"id": 4324, | |
"name": "Season 1", | |
"watched": false, | |
"children": [ |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>React Tutorial</title> | |
<!-- Not present in the tutorial. Just for basic styling. --> | |
<link rel="stylesheet" href="css/base.css" /> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.14.0/react.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.14.0/react-dom.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.6.15/browser.js"></script> |
var gulp = require('gulp'), | |
requireDir = require('require-dir'); | |
requireDir('./gulp'); | |
gulp.task('default', ['browserify']); |
var gulp = require('gulp'); | |
var source = require('vinyl-source-stream'); // Used to stream bundle for further handling | |
var browserify = require('browserify'); | |
var watchify = require('watchify'); | |
var reactify = require('reactify'); | |
var concat = require('gulp-concat'); | |
gulp.task('browserify', function() { | |
var bundler = browserify({ | |
entries: ['./public/js/render.jsx'], // Only need initial file, browserify finds the deps |