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
package com.example.touch; | |
import android.app.Activity; | |
import android.os.Bundle; | |
import android.os.Handler; | |
import android.util.Log; | |
import android.view.MotionEvent; | |
import android.view.View; | |
import android.webkit.ConsoleMessage; | |
import android.webkit.WebChromeClient; |
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>Test</title> | |
<style> | |
body { | |
background-color: darkkhaki; | |
width: 360px; | |
height: 600px; | |
} |
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
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
import sys | |
import cv2 | |
im = cv2.imread('h.png') | |
cv2.imshow('你好', im) | |
cv2.waitKey() |
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
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
import sys | |
import cv2 | |
cap = cv2.VideoCapture(0) | |
while True: | |
ret,im = cap.read() | |
cv2.imshow('video test',im) |
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
#!/usr/bin/python | |
# -*- coding: UTF-8 -*- | |
packageCounts='600,500,300,100'.split(',') | |
packageSum=0 | |
temp=[] | |
subPackageCounts=[] | |
for i in range(len(packageCounts)): | |
currentCount=int(packageCounts[i]) |
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
#!/usr/bin/env python | |
# | |
# | |
# 3.1.3 added toggle on for shader by pressing "g" (for glsl). Doesn't seem to | |
# want to toggle back off. plVShader looks identical to phong. To see toon | |
# shader change lines 163 and 164 to vShader = toonVShader | |
# and fShader = toonFShader | |
# | |
# 3.1.4 Attempting to add a more complex shader! I may add some more lights | |
# too |
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 cluster=require('cluster'); | |
if(cluster.isMaster){ | |
console.log('is master'); | |
var worker=cluster.fork(); | |
worker.on('message',function(message){ | |
console.log('master recieve message: '+message); | |
}); | |
process.on('exit',function(){ | |
console.log('process exit'); |
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
package marshal.opencvproto; | |
import org.opencv.core.Mat; | |
import android.util.Log; | |
import com.google.gson.Gson; | |
import com.google.gson.JsonObject; | |
import com.google.gson.JsonParser; |
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 mqtt = require('mqtt'); | |
//{'topicName':[clientObj,clientObj ..]} | |
var subscribeTopics={}; | |
//创建服务器对象 | |
var server = mqtt.createServer(function(client) { | |
//建立连接时触发 | |
client.on('connect', function(packet) { |
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
#!/bin/bash | |
safeRunCommand() { | |
typeset cmnd="$*" | |
typeset ret_code | |
echo cmnd=$cmnd | |
eval $cmnd | |
ret_code=$? | |
if [ $ret_code != 0 ]; then |
OlderNewer