This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function writeUTFBytes(dataview, offset, string) { | |
for(let i = 0; i < string.length; i++) { | |
dataview.setUint8(offset + i, string.charCodeAt(i)); | |
} | |
} | |
function mergeBuffers(buffer, length) { | |
const result = new Float32Array(length); | |
let offset = 0; | |
for(let i = 0; i < buffer.length; i++) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var audioContext = new (window.AudioContext || window.webkitAudioContext)(); | |
navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia; | |
// Using arrow functions from ES 6 | |
navigator.getUserMedia({ audio: true }, (stream) => { | |
// API works in a pipe mechanism | |
const gain = audioContext.createGain(); | |
const audioSource = audioContext.createMediaStreamSource(stream); | |
// we connect the gain pipe to the audio source pipe. | |
var gainNode = audioSource.connect(gain); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var audioContext = new (window.AudioContext || window.webkitAudioContext)(); | |
navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia; | |
// Using arrow functions from ES 6 | |
navigator.getUserMedia({ audio: true }, (stream) => { | |
// API works in a pipe mechanism | |
const gain = audioContext.createGain(); | |
const audioSource = audioContext.createMediaStreamSource(stream); | |
// we connect the gain pipe to the audio source pipe. | |
var gainNode = audioSource.connect(gain); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict" | |
var UniversalTruth = require("./UniversalTruth.js").UniversalTruth; | |
class EnergyMatter extends UniversalTruth{ | |
constructor(hypothesis){ | |
super(hypothesis) | |
this.energy = 100; //finite energy | |
this.matter = 0; //finite mass | |
this.inverseFlag = true; | |
} | |
execution() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var man = { | |
"attributes": ["Sadness", "Anger", "Happiness", "Loneliness"] | |
}; | |
var walk = function(person){ | |
while(true){ | |
console.print("Walk of Life"); | |
} | |
} | |
walk(man); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var you = {}; | |
var others = []; | |
// If you can keep your head when all about you | |
// Are losing theirs and blaming it on you, | |
if (keepYourHead(you)){ | |
looseTheirHead(others); | |
blame(you); | |
} | |
// If you can trust yourself when all men doubt you, | |
// But make allowance for their doubting too; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module['exports'] = function echoHttp (hook) { | |
var body = hook.params; // This gives all the JSON body parameters in an object. | |
//Using a small security measure ;) | |
if(body.secret != "dgfdg45345jf0248234234"){ | |
hook.res.end("Unauthorized"); | |
return; | |
} | |
var https = require('https'), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Exact sequence name as below should be there. This name is used inside the API implementation in Synapse --> | |
<sequence xmlns="http://ws.apache.org/ns/synapse" name="_resource_mismatch_handler_"> | |
<log level="full"/> | |
<property name="HTTP_SC" value="404" scope="axis2"></property> | |
<respond/> | |
<drop></drop> | |
</sequence> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="header"> | |
<h1>Jaggery intro</h1> | |
<ul ng-repeat="todo in todos"> | |
<li><input type="checkbox" ng-model="todo.status"> <span ng-model="todo.text">{{todo.text}}</span></li> | |
</ul> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
The objective of this class is to manage localization options in CDM. | |
2 types Use cases:- | |
1) Localize the product based on a configuration | |
2) Localize components based on user preference. | |
Use case 2:- Localize the license file | |
*/ |
NewerOlder