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
### INSTALLATION NOTES ### | |
# 1. Install Homebrew (https://github.com/mxcl/homebrew) | |
# 2. brew install zsh | |
# 3. Install OhMyZsh (https://github.com/robbyrussell/oh-my-zsh) | |
# 4. brew install reattach-to-user-namespace --wrap-pbcopy-pbpaste && brew link reattach-to-user-namespace | |
# 5. Install iTerm2 | |
# 6. In iTerm2 preferences for your profile set: | |
# Character Encoding: Unicode (UTF-8) | |
# Report Terminal Type: xterm-256color | |
# 7. Put itunesartist and itunestrack into PATH |
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
# Ignore all | |
* | |
# Unignore all with extensions | |
!*.* | |
# Unignore all dirs | |
!*/ | |
### Above combination will ignore all files without extension ### |
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
g++ m.cpp -o app `pkg-config --cflags --libs opencv` |
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
g++ <your_file.c> -framework GLUT -framework OpenGL |
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
#include <iostream> | |
#include <fstream> | |
#include <pthread.h> | |
using namespace std; | |
//---------------------------------------------------- | |
/* Initialization */ | |
//---------------------------------------------------- | |
string filename[4]={"testdata1.txt", |
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
Re: How to compile OpenCL example in GCC? | |
Precisely, the kernel compilation in OpenCL is make in running time (library call). | |
In Gcc, for compilation, you only need the headers (aviables on Kronos site). But for linkage, you have to install OpenCL compatible driver. | |
in the Makefile : | |
for Mac OSX : -framework OpenCL | |
for Linux : -lOpenCL |
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
Download Link: | |
http://www.adakoda.com/adakoda/android/asm/ | |
termainl: | |
brew install android-sdk | |
android update sdk --no-ui --filter 'platform-tools' | |
java -jar asm.jar |
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
There is a Javascript interpreter in the JavaScriptCore framework that comes with OS X. The interpreter is called jsc and can be found at the following path: | |
/System/Library/Frameworks/JavaScriptCore.framework/Resources/jsc | |
There is a built-in function, quit(), which will exit interactive mode. | |
If you want to make it easier to use I suggest creating a symlink to a location in your path, e.g.: | |
sudo ln -s /System/Library/Frameworks/JavaScriptCore.framework/Resources/jsc /usr/bin |
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
class Course < ActiveRecord::Base | |
mount_uploader :CourseData, CourseDataUploader | |
validates :year, :name, :teacher, :grade, :category, :grade_id, :semester_id, :presence => true | |
validates :CourseData, :presence => true | |
belongs_to :grade | |
belongs_to :semester |
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
reference: http://m13253.blogspot.tw/2013/04/solve-corrupted-chinese-filename-for-wget.html | |
其实不必要像那样修改源代码,wget 的 man 页面里就有解决方法。 | |
正解是参数 --restrict-file-names=nocontrol | |
Update: +筱百合 提供了他的 ~/.wgetrc 文件,方便大家借鉴: | |
# 不要乱转义中文 | |
--restrict-file-names=nocontrol | |
# 使用重定向后的文件名 | |
--trust-server-names=on |