I hereby claim:
- I am johncrisostomo on github.
- I am johncrisostomo (https://keybase.io/johncrisostomo) on keybase.
- I have a public key ASAh5aiooh4CROSQ5hQpK9sqS2FRtFPknkZPl0QSM_-bngo
To claim this, I am signing this object:
const options = { startFromBeginning: true }; |
const CosmosClient = require('@azure/cosmos').CosmosClient; | |
const cosmosClient = new CosmosClient({ | |
endpoint: '', // connection url | |
auth: { | |
masterKey: | |
'' // master key | |
} | |
}); |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using System.Net.Http; | |
using System.Net; | |
namespace HTTP_Test |
import React, { Component } from 'react'; | |
import TextField from 'components/base/TextField'; | |
const WAIT_INTERVAL = 1000; | |
const ENTER_KEY = 13; | |
export default class TextSearch extends Component { | |
constructor(props) { | |
super(); |
I hereby claim:
To claim this, I am signing this object:
function permAlone(str) { | |
if (str.length === 1) { | |
return 1; | |
} | |
var factorial = fact(str.length); | |
var permutations = computePermutations(str.split(''), factorial); | |
var unique = permutations.filter(function (perm) { | |
return !perm.match(/(.)\1{1,}/); | |
}); |
// This code uses the SoftwareSerial library. | |
// It can be obtained here: http://arduino.cc/en/Reference/SoftwareSerial | |
unsigned int timeout=0; | |
unsigned char state=0; | |
char val; // variable to receive data from the serial port | |
int ledpin = 13; // LED connected to pin 13 | |
// Timer2 service |
it('should set SAVING_ERROR with the error message', () => { | |
const Meteor = {uuid: () => 'id', call: stub()}; | |
const LocalState = {set: spy()}; | |
const FlowRouter = {go: spy()}; | |
const err = {message: 'Oops'}; | |
Meteor.call.callsArgWith(4, err); | |
actions.create({Meteor, LocalState, FlowRouter}, 't', 'c'); | |
expect(LocalState.set.args[1]).to.deep.equal([ 'SAVING_ERROR', err.message ]); | |
}); |
create({Meteor, LocalState, FlowRouter}, title, content) { | |
if (!title || !content) { | |
return LocalState.set('SAVING_ERROR', 'Title & Content are required!'); | |
} | |
LocalState.set('SAVING_ERROR', null); | |
const id = Meteor.uuid(); | |
Meteor.call('posts.create', id, title, content, (err) => { |
it('should call Meteor.call to save the post', () => { | |
const Meteor = {uuid: () => 'id', call: spy()}; | |
const LocalState = {set: spy()}; | |
const FlowRouter = {go: spy()}; | |
actions.create({LocalState, Meteor, FlowRouter}, 't', 'c'); | |
const methodArgs = Meteor.call.args[0]; | |
expect(methodArgs.slice(0, 4)).to.deep.equal([ | |
'posts.create', 'id', 't', 'c' |