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
;; Elpa initialization. | |
(require 'package) | |
(setq package-archives | |
'(("gnu" . "http://elpa.gnu.org/packages/") | |
("marmalade" . "http://marmalade-repo.org/packages/") | |
("melpa" . "http://melpa.milkbox.net/packages/"))) | |
(package-initialize) | |
;; Configuration of elpy for Python development. | |
;; https://github.com/jorgenschaefer/elpy. |
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 url = require('url'), | |
crypto = require('crypto'), | |
querystring = require('querystring'), | |
http = require('http'), | |
port = 18080; | |
var token = '***your token'; | |
http.createServer(function(req, res) { |
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
(require 'company) | |
(setq company-idle-delay 0.3) | |
(setq company-tooltip-limit 20) | |
(setq company-minimum-prefix-length 2) | |
(setq company-echo-delay 0) | |
(setq company-auto-complete nil) | |
(global-company-mode 1) | |
(add-to-list 'company-backends 'company-dabbrev t) | |
(add-to-list 'company-backends 'company-ispell t) | |
(add-to-list 'company-backends 'company-files t) |
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 main | |
/* producer-consumer problem in Go */ | |
import ("fmt") | |
var done = make(chan bool) | |
var msgs = make(chan int) | |
func produce () { |
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 main | |
import "fmt" | |
func fibonacci(c, quit chan int) { | |
x, y := 0, 1 | |
for { | |
select { | |
case c <- x: | |
x, y = y, x+y |
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
import xlrd | |
import xlwt | |
data = xlrd.open_workbook('input.xls') | |
table = data.sheets()[0] | |
nrows = table.nrows | |
ncols = table.ncols | |
print data.nsheets |
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
apply plugin: 'com.android.application' | |
android { | |
compileSdkVersion 21 | |
buildToolsVersion "21.1.2" | |
defaultConfig { | |
applicationId "com.your.application.id" | |
minSdkVersion 15 | |
targetSdkVersion 21 |
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
apply plugin: 'java' | |
apply plugin: 'eclipse' | |
apply plugin: 'application' | |
mainClassName = 'hello.HelloWorld' | |
// tag::repositories[] | |
repositories { | |
mavenCentral() | |
} |
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
import android.opengl.Matrix; | |
import android.util.Log; | |
/** | |
* 矩阵变换工具类 | |
* | |
* @author tinker <[email protected]> | |
*/ | |
public class TSMatrixState { | |
private static final int MATRIX_F4V_SIZE = 16; |
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
import android.opengl.GLES20; | |
import java.nio.ByteBuffer; | |
import java.nio.ByteOrder; | |
import java.nio.FloatBuffer; | |
import java.util.ArrayList; | |
import xyz.sunting.opengles.light.model.TSApplication; | |
import xyz.sunting.opengles.light.model.util.TSMatrixState; | |
import xyz.sunting.opengles.light.model.util.TSShaderUtil; |
OlderNewer