This file contains 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 getShortestFragment(str){ | |
for(var k=1;k<=str.length;k++){ | |
for(var i=0;i<str.length-k+1;i++){ | |
var lowerSet = new Set(); | |
var upperSet = new Set(); | |
var temp = str.substring(i,i+k); | |
for(var ch of temp){ | |
if(ch === ch.toLowerCase()) | |
lowerSet.add(ch); | |
else |
This file contains 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 Dictionary = new Set([ | |
"a", | |
"aah", | |
"aardvark", | |
"aardvarks", | |
"ab", | |
"aback", | |
"abacus", | |
"abacuses", | |
"abaft", |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Adding Stream to Audio</title> | |
<!-- Load the polyfill to switch-hit between Chrome and Firefox --> | |
<script src="adapter.js"></script> | |
<style> | |
button { | |
font: 18px sans-serif; | |
padding: 8px; |
This file contains 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
/******************************************************************************** | |
* draw with data | |
********************************************************************************/ | |
drawData:function(data){ | |
var _self=this; | |
var event=data.ev; | |
var e=data.e; |
This file contains 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 app = require('express')() | |
, server = require('http').createServer(app) | |
, io = require('socket.io').listen(server); | |
server.listen(80); | |
app.get('/', function (req, res) { | |
res.sendfile(__dirname + '/index.html'); | |
}); |