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
| // gcc 01.hello-world.c -o 01.hello-world && ./01.hello-world | |
| #include <stdio.h> | |
| int main(int argc, char ** argv) { | |
| printf("Hello World!"); | |
| return 0; | |
| } |
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 isFullWidth (char) { | |
| // 【文档】 | |
| // Unicode区块查询: https://unicodelookup.com | |
| // 字符到HEX: '!'.charCodeAt(0).toString(16) | |
| // HEX到字符: String.fromCharCode('0xff58') | |
| // 【易弄错半宽】 | |
| // 半宽中文标点1: (2013|–)~(201d|”) | |
| // 半宽中文标点2(。)、半宽片假名katakana(ヲ)、半宽韩文字母hangul(ᄀ): (ff61|。)~(201d|”) | |
| // 【全宽字符】 |
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 socket = require('socket.io-client')('http://localhost:3000'); | |
| socket.on('connect', function(){ | |
| console.log('Connection success!') | |
| }); | |
| socket.on('event', function(data){ | |
| console.log('Recieved data: ', data) | |
| }); | |
| socket.on('disconnect', function(data){ | |
| console.log('Connection closed, resean: ', data) |
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
| diamond! |
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
| package main | |
| import ( | |
| "github.com/yuin/gopher-lua" | |
| ) | |
| func main () { | |
| L := lua.NewState() | |
| defer L.Close() | |
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
| import tensorflow as tf | |
| hello = tf.constant('Hello, TensorFlow!') | |
| sess = tf.Session() | |
| print(sess.run(hello)) | |