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
//Code found at http://stackoverflow.com/questions/19209781/ios-7-status-bar-with-phonegap | |
- (void)viewWillAppear:(BOOL)animated { | |
// View defaults to full size. If you want to customize the view's size, or its subviews (e.g. webView), | |
// you can do so here. | |
// Lower screen 20px on ios 7 | |
if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7) { | |
CGRect viewBounds = [self.webView bounds]; | |
viewBounds.origin.y = 20; | |
viewBounds.size.height = viewBounds.size.height - 20; |
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 maths = (function(){ | |
function trigonometry(whichIsIt, xOrY, radius, angle){ | |
if(whichIsIt == "X"){ | |
var trigonometryX = xOrY + (radius*Math.cos(angle*(Math.PI/180))); | |
return trigonometryX; | |
} else if(whichIsIt == "Y"){ | |
var trigonometryY = xOrY + (radius*Math.sin(angle*(Math.PI/180))); | |
return trigonometryY; |
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
{ | |
"big" : ["http://i.imgur.com/CRSzQ4r.png", "http://i.imgur.com/l94Rfsj.png", "http://i.imgur.com/304PJ9p.png", "http://i.imgur.com/mOnnvms.png", "http://i.imgur.com/k5Eif3W.png", "http://i.imgur.com/xSVGJu4.png"], | |
"evil" : ["http://i.imgur.com/4s6OJQj.png", "http://i.imgur.com/su9edl7.png", "http://i.imgur.com/bCgGgBM.png"], | |
"grumpy" : ["http://i.imgur.com/EPGllv4.png", "http://i.imgur.com/DKFbRQ0.png", "http://i.imgur.com/bIqsqSK.png"], | |
"inHats" : ["http://i.imgur.com/6XcjacS.png", "http://i.imgur.com/GC3lgzg.png", "http://i.imgur.com/q7MZgiG.png", "http://i.imgur.com/VkfIH4a.png", "http://i.imgur.com/zy9cJgS.png", "http://i.imgur.com/OA4rZbW.png", "http://i.imgur.com/w0SzOoY.png", "http://i.imgur.com/zVZXKK4.png", "http://i.imgur.com/ZTn8bgI.png", "http://i.imgur.com/iVWFUlj.png"], | |
"kitten" : ["http://i.imgur.com/KqFuFSQ.png", "http://i.imgur.com/H3YmnA3.png", "http://i.imgur.com/qqWyfvA.png", "http://i.imgur.com/GS6HUnP.png", "http://i.imgur.com/bTvoEeb.png"] | |
} |
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
navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia; |
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
ffmpeg -f gdigrab -framerate 30 -i desktop -s 2880x1800 -r 15 -offset_x 10 -offset_y 20 -video_size 1280x800 -show_region 1 -c:v libx264 -preset fast -pix_fmt yuv420p -threads 0 -f flv "rtmp://live-lhr.twitch.tv/app/[YOUR TWITCH STREAM KEY]" |
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
ffmpeg -f avfoundation -i "1:0" -s 1920x1200 -r 15 -c:v libx264 -preset fast -pix_fmt yuv420p -s 1280x800 -threads 0 -f flv "rtmp://live-lhr.twitch.tv/app/[YOUR STREAM API KEY]" |
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
from pygame import image as PGI | |
import time | |
def take_screenshot(Surface): | |
outputDir = './screenshots/' | |
if not os.path.exists(outputDir): | |
os.makedirs(outputDir) | |
PGI.save(Surface, outputDir + str( int(time.time()) ) + '.png' ) | |
def on_key_down(key): |
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> | |
<style> | |
html, body, canvas{width: 100%; height: 100%;margin:0;padding:0;} | |
</style> | |
</head> | |
<body> |
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
[{"id":"146f4acc.4733c5","type":"function","z":"ceee673f.122fb8","name":"Determine File Path","func":"if (msg.req.files) {\n var files = Object.keys(msg.req.files);\n msg.payload.filePath = msg.req.files[files[0]][0].path; \n}\nreturn msg;","outputs":1,"noerr":0,"x":278.5,"y":452,"wires":[["c4cd6b26.2acfc8"]]},{"id":"3bf669a6.9b88e6","type":"httpInMultipart","z":"ceee673f.122fb8","name":"","url":"/analyse","method":"post","fields":"[ { \"name\": \"video\", \"maxCount\" : 1 } ]","swaggerDoc":"","x":145,"y":387,"wires":[["146f4acc.4733c5"]]},{"id":"e1f10989.eab7c8","type":"visual-recognition-v3","z":"ceee673f.122fb8","name":"Analyse frame","apikey":"50a86834a2d8947a442a1ba81e9dde323f074786","image-feature":"classifyImage","lang":"en","x":628,"y":652,"wires":[["1a442f8b.94618","5f0f5910.f08c08"]]},{"id":"5f0f5910.f08c08","type":"function","z":"ceee673f.122fb8","name":"Make Sense","func":"\nconst jobData = flow.get(msg.analysisUUID);\nconst frameData = {\n time : msg.keyframeTimeoffset,\n result : |
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
Array.from(table.querySelectorAll('tr')).map(tr => {tds = Array.from(tr.querySelectorAll('td') ); return `${tds[0].querySelector('input').value}=${tds[1].querySelector('textarea').value}` }).join('\n') |