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
@interface Number : NSObject{ | |
double real; | |
double imaginary; | |
} | |
-(void) setReal : (double) r; | |
-(void) setImaginary : (double) i; | |
-(void) setAll : (double) r : (double) i; | |
-(void) print; |
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
@implementation Number | |
-(void) setReal : (double) r{ | |
real = r; | |
} | |
-(void) setImaginary : (double) i{ | |
imaginary = i; | |
} | |
-(void) setAll:(double)r :(double)i{ | |
real = r; |
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 <Foundation/Foundation.h> | |
@interface Number : NSObject{ | |
double real; | |
double imaginary; | |
} | |
-(void) setReal : (double) r; | |
-(void) setImaginary : (double) i; | |
-(void) setAll : (double) r: (double) i; |
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 com.test.opencv; | |
import android.app.Activity; | |
import android.os.Bundle; | |
import android.widget.TextView; | |
public class Opencvtest extends Activity { | |
/** Called when the activity is first created. */ | |
public native void setimage(); | |
static{ |
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
#include <jni.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <opencv/cv.h> | |
#include <opencv/highgui.h> | |
extern "C"{ | |
JNIEXPORT void JNICALL Java_com_test_opencv_Opencvtest_setimage | |
(JNIEnv *env, jobject obj) { | |
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
APP_STL := gnustl_static | |
APP_CPPFLAGS := -frtti -fexceptions | |
APP_ABI := armeabi |
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
LOCAL_PATH := $(call my-dir) | |
include $(CLEAR_VARS) | |
include OpenCV-2.3.1/share/OpenCV/OpenCV.mk | |
LOCAL_MODULE := imagefea | |
LOCAL_SRC_FILES := image.cpp | |
LOCAL_LDLIBS += -llog -ldl |
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
function tweet(){ | |
var accessTokenKey = Ti.App.Properties.getString('twitterAccessTokenKey'), | |
accessTokenSecret = Ti.App.Properties.getString('twitterAccessTokenSecret'); | |
var Twitter = require('twitter').Twitter; | |
var client = Twitter({ | |
//REMEMBER TO CHANGE THE KEY AND SECRET CODE HERE | |
consumerKey: "INSERT KEY HERE", | |
consumerSecret: "INSERT SECRET HERE", |
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
function(url, callback) { | |
var xhr = Ti.Network.createHTTPClient(); | |
xhr.open('GET', url); | |
xhr.onload = function() { | |
var parsedData = JSON.parse(this.responseText); | |
callback(parsedData); | |
}; | |
xhr.onerror = function(e) { | |
alert('something wrong') | |
} |
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
Titanium.Facebook.requestWithGraphPath(ID + CONNECTION_TYPE, { | |
message : 'hello~' | |
}, "POST", function(e) { | |
if(e.success) { | |
alert('success'); | |
} else if(e.error) { | |
alert(e.error); | |
} else { |
OlderNewer