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
| # coding: UTF-8 | |
| __author__ = 'masahiro' | |
| class User(object): | |
| def __init__(self, name,): | |
| self.name = name | |
| def greet(self): | |
| print "my name is %s!" % self.name | |
| nico = User("Nico") |
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
| # coding: UTF-8 | |
| # 関数 | |
| def hello(name, num=5): | |
| print "hello %s! " % name * num | |
| def hello2(name, num=4): | |
| return "hello %s!" % name * num | |
| #pass | |
| def hello3(): |
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
| # coding: UTF-8 | |
| # HelloWorld | |
| print "Hello World" | |
| # 変数データについて | |
| # 大文字、小文字は区別される | |
| #ex) | |
| msg = "Hello World2" | |
| print msg |
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
| // 通常の文字列 | |
| int para_cnt = document.Paragraphs.Count; | |
| for (int para_index = 1; para_index <= para_cnt; para_index++) | |
| { | |
| Range rng = document.Paragraphs[para_index].Range; | |
| document.Paragraphs[para_index].Format.BaseLineAlignment = WdBaselineAlignment.wdBaselineAlignCenter; | |
| // 選択 | |
| rng.ParagraphFormat.Alignment = WdParagraphAlignment.wdAlignParagraphCenter; | |
| rng.Select(); | |
| } |
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 <android/log.h> | |
| #define LOG_TAG "AndroidClient/nativelogic" ← ログのタグをつける。ファイルやクラスで分けてつけると良い | |
| #define LOGD(...) ((void)__android_log_print(ANDROID_LOG_DEBUG, LOG_TAG, __VA_ARGS__)) | |
| // == ここまでインクルード | |
| // == ログ出力の記述 | |
| LOGD("output log !"); |
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
| LOCAL_PATH := $(call my-dir) | |
| include $(CLEAR_VARS) | |
| OPENCV_CAMERA_MODULES:=off | |
| include C:/opencv241/OpenCV2.4.1/OpenCV-2.4.1/share/opencv/OpenCV.mk | |
| ifeq ("$(wildcard $(OPENCV_MK_PATH))","") | |
| #try to load OpenCV.mk from default install location | |
| #include $(TOOLCHAIN_PREBUILT_ROOT)/user/share/OpenCV/OpenCV.mk |
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
| try { | |
| request.setCharacterEncoding("UTF-8"); | |
| String type = request.getParameter("type"); | |
| System.out.println(type); | |
| if (type == null) { | |
| response.getWriter().println("type parameter failed."); | |
| } else { | |
| OutputStream out = null; | |
| InputStream in = null; | |
| try { |
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
| JNIEXPORT void JNICALL | |
| Java_jp_sprix_jni_ImageRecognize_setMMajarVersion(JNIEnv *env, jobject thisObj, jint val){ | |
| jclass clazz = env->GetObjectClass(thisObj); | |
| jfieldID fid = env->GetFieldID(clazz, "mMajarVersion", "I"); | |
| env->SetIntField(thisObj, fid, val); | |
| } | |
| JNIEXPORT void JNICALL | |
| Java_jp_sprix_jni_ImageRecognize_setMRevision(JNIEnv *env, jobject thisObj, jint val){ | |
| jclass clazz = env->GetObjectClass(thisObj); |
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: jp_sprix_jni_ImageRecognize | |
| * Method: setMMajarVersion | |
| * Signature: (I)V | |
| */ | |
| JNIEXPORT void JNICALL Java_jp_sprix_jni_ImageRecognize_setMMajarVersion | |
| (JNIEnv *, jobject, jint); | |
| /* | |
| * Class: jp_sprix_jni_ImageRecognize |
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
| public class ImageRecognize { | |
| private int mMajarVersion = 1; | |
| protected int mMinorVersion = 9; | |
| private static int mRevision = 980; | |
| public void printVersion() { | |
| System.err.println("Version: " + mMajarVersion + "." + mMinorVersion + "_" + mRevision); | |
| } | |
| public native void setMMajarVersion(int val); |