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 UIKit | |
import PlaygroundSupport | |
func degree2radian(a:CGFloat)->CGFloat { | |
let b = CGFloat(Double.pi) * a/180 | |
return b | |
} | |
func polygonPointArray(sides:Int,x:CGFloat,y:CGFloat,radius:CGFloat,adjustment:CGFloat=0)->[CGPoint] { | |
let angle = degree2radian(a: 360/CGFloat(sides)) |
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
/* A Minos style html theme for Pandoc, thanks for http://blog.zhangruipeng.me/hexo-theme-minos/ */ | |
/* Usage this them by: | |
pandoc test.md -c minos-style.css --self-contained -o demo.html | |
*/ | |
body { | |
font: 16px 'PT Serif', 'STZhongsong', '华文中宋', 'Microsoft Yahei', serif; | |
max-width: 760px; | |
margin: auto; |
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
/*! normalize.css v2.1.3 | MIT License | git.io/normalize */ | |
/* ========================================================================== | |
HTML5 display definitions | |
========================================================================== */ | |
/** | |
* Correct `block` display not defined in IE 8/9. | |
*/ |
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
1. The texture target needs to be GLES20.GL_TEXTURE_EXTERNAL_OES instead of GL_TEXTURE_2D, e.g. in the glBindTexture calls and glTexParameteri calls. | |
2. In the fragment shader define a requirement to use the extension: | |
#extension GL_OES_EGL_image_external : require | |
3. For the texture sampler used in the fragment shader, use samplerExternalOES instead of sampler2D. | |
Everything below here is all in the C code, no more Java. | |
4. In the C code, use glEGLImageTargetTexture2DOES(GL_TEXTURE_EXTERNAL_OES, eglImage) to specify where the data is, instead of using glTexImage2D family of functions. |
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
configurations { | |
codequality | |
} | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
codequality 'com.puppycrawl.tools:checkstyle:5.6' |
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
(autoload 'markdown-mode "markdown-mode.el" "Major mode for editing Markdown files" t) | |
(add-to-list 'auto-mode-alist '("\\.text" . markdown-mode)) | |
(add-to-list 'auto-mode-alist '("\\.md" . markdown-mode)) | |
;; 日本語出力用 | |
(add-hook 'markdown-mode-hook | |
(lambda () | |
(make-local-variable coding-system-for-write) | |
(setq coding-system-for-write 'utf-8))) |