2015年12月9日 星期三

Google Script

https://developers.google.com/apps-script/overview?csw=1

PC Control Codes

Function Code Data

POWER ON 02H 00H 00H 00H 00H 02H

POWER OFF 02H 01H 00H 00H 00H 03H

INPUT SELECT COMPUTER 1 02H 03H 00H 00H 02H 01H 01H 09H

INPUT SELECT COMPUTER 2 (Digital) 02H 03H 00H 00H 02H 01H 1AH 22H

INPUT SELECT COMPUTER 2 (Analog) 02H 03H 00H 00H 02H 01H 02H 0AH

INPUT SELECT VIDEO 02H 03H 00H 00H 02H 01H 06H 0EH

INPUT SELECT S-VIDEO 02H 03H 00H 00H 02H 01H 0BH 13H

PICTURE MUTE ON 02H 10H 00H 00H 00H 12H

PICTURE MUTE OFF 02H 11H 00H 00H 00H 13H

SOUND MUTE ON 02H 12H 00H 00H 00H 14H

SOUND MUTE OFF 02H 13H 00H 00H 00H 15H

2015年11月29日 星期日

像原生應用程式一樣的 WebApp?趕快學起來!

http://tech.mozilla.com.tw/posts/4803/%E5%83%8F%E5%8E%9F%E7%94%9F%E6%87%89%E7%94%A8%E7%A8%8B%E5%BC%8F%E4%B8%80%E6%A8%A3%E7%9A%84-webapp%EF%BC%9F%E8%B6%95%E5%BF%AB%E5%AD%B8%E8%B5%B7%E4%BE%86%EF%BC%81

firefox webapp開發網頁

jSocket code

<div id='mySocket'>
<button type="button" onclick="openTCP()">TCP Open</button>
<button type="button" onclick="closeTCP()">TCP Close</button>
</div>

<script src="https://jsocket.googlecode.com/svn-history/r119/trunk/jsocket/src/jsocket.js"></script>



<script>
var socket = null;

function openTCP() {
    socket = new jSocket();  
    socket.onReady = function(){
       socket.connect('192.168.27.245', 7142);          
    }
 
    // Connection attempt finished
        socket.onConnect = function(success, msg){
                if(success){
                        // Send something to the socket
                        console.log("TCP connection established sucessfully");
                        socket.write('Hello world');          
                }else{
                        console.log("TCP connection established fail");
                        alert('Connection to the server could not be estabilished: ' + msg);          
                }    
        }

        socket.onData = function(data){
                alert('Received from socket: '+data);
        }
     
        // Setup our socket in the div with the id="socket"
        socket.setup('mySocket');  
}

function closeTCP() {
    socket.halfClose();
    socket.close();
    if (socket.closed) {
      console.log("TCP socket has been cleanly closed");
    };
}

</script>

jSocket 實驗

jSocket

Connecting to TCP Socket from browser using javascript

r119 of jSocket

jsocket

jSocket Introduction

jsocket google code

jSocket.js raw file

jSocket.js file (2014)

jSocket開源中國社區

TCP test

<script>
var mySocket = null;

function openTCP() {
    mySocket = new navigator.TCPSocket("www.tsvs.ntpc.edu.tw", 80);
    if (mySocket.opened) {
        console.log("TCP connection established sucessfully");
        mySocket.writeable.write("Hello World");
    } else {
       console.log("TCP connection established fail");
    };
};

function closeTCP() {
    mySocket.halfClose();
    mySocket.close();
    if (mySocket.closed) {
      console.log("TCP socket has been cleanly closed");
    };
};

</script>


<a class="v001" href="#" >櫻樹 變 櫻花</a>
<br>
<button type="button" onclick="openTCP()">TCP Open</button>
<button type="button" onclick="closeTCP()">TCP Close</button>

2015年11月28日 星期六

javascript socket api

javascript socket api

Mozilla MDN WebSockets

Writing WebSocket client applications

WebSocket in HTML5

SOCKET.IO 1.0 IS HERE

HTML5 WebSocket Security (wss) is Strong

http://stackoverflow.com/questions/12407778/connecting-to-tcp-socket-from-browser-using-javascript

http://www.w3.org/TR/raw-sockets/ 


W3C WebIDL 中文說明

https://developer.mozilla.org/en-US/docs/Web/API/TCPSocket


whiteout-io/tcp-socket · GitHub

javascript tcp socket:

WebTCP: Making TCP connections from Browser

WebIDL bindings

WebIDL Extended Attribute 大解密

Web IDL interfaces

Web IDL slides

WebIDL 簡介

Re: WebIDL 簡介

小y的小檔案

gasolin的小檔案

愛聞插低的小檔案

Connecting to TCP Socket from browser using javascript

stackoverflow.com/.../connecting-to-tcp-socket-from-brow...

翻譯這個網頁
2012年9月13日 - I have a vb.net application that opens a socket and listens on it. I need ... As for your problem, currently you will have to depend on XHR or ...

Node.js tcp client and server example · GitHub

https://gist.github.com/tedmiston/5935757

翻譯這個網頁
2015年11月20日 - In the node.js intro tutorial (http://nodejs.org/), they show a basic tcp... http://www.hacksparrow.com/tcp-socket-programming-in-node-js.html.) */.

net Node.js v5.1.0 Manual & Documentation

https://nodejs.org/api/net.html

翻譯這個網頁
This object is an abstraction of a TCP or local socket. net. ... or they can be created by Node.js and passed to the user through the 'connection' event of a server.

TCPSocket API - Gecko DOM 參考| MDN

developer.mozilla.org › MDN › Gecko DOM 參考

2013年8月27日 - 此處將以JavaScript 格式存取原始的TCP socket API。此API 目前僅可用於FirefoxOS 許可/認證的App。

WebTCP: Making TCP connections from Browser - {cool_title}

artemyankov.com/tcp-client-for-browsers

翻譯這個網頁
2012年11月27日 - There is no simple way to create TCP sockets in Javascript on a browser side. Although solutions like Websockets allow to create something ...

TCP Socket Programming in Node.js - Hack Sparrow

www.hacksparrow.com/tcp-socket-programming-in-node-...

翻譯這個網頁
2011年10月26日 - Programming TCP Sockets in Node.js Eager to know how socketsare programmed in Node? There are three variants of sockets in Node - i.

Comet Daily » Blog Archive » Sockets in the Browser

cometdaily.com/2008/07/01/sockets-in-the-browser/

翻譯這個網頁
2008年7月1日 - The name of the API is TCPSocket and you can use it like this: .... client in JavaScript that uses TCPSocket and runs in the browser, so you can ...

How to Form a TCP Connection Between a JavaScript ...

pharos.ece.utexas.edu/.../How_to_Form_a_TCP_Connecti...

翻譯這個網頁
2011年10月6日 - How to Form a TCP Connection Between a JavaScript Program and Java ... <head> <title>TCP Socket test</title> <script type="text/javascript" ...

SimpleExample - Google Code

https://code.google.com/p/jsocket/wiki/SimpleExample

翻譯這個網頁
<script type='text/javascript'> // Host we are connecting to var host = 'localhost'; // Port we are connecting on var port = 3000; var socket = new jSocket();

TCPSocket: Sockets in the browser - Ajaxian

ajaxian.com/archives/tcpsocket-sockets-in-the-browser

翻譯這個網頁
2008年7月1日 - javascript. < view plain text >. var conn = new TCPSocket(hostname, port). conn.onopen = function() { alert('connection opened!') } conn.onread ...

開關機控制碼

開機碼(點圖放大)



關機碼(點圖放大)


20151128 科展研究