Skip to content

Instantly share code, notes, and snippets.

View hammoudeh's full-sized avatar

Hammoudeh Alamri hammoudeh

View GitHub Profile
@hammoudeh
hammoudeh / ios_toast.m
Last active November 5, 2017 22:32
ios Toast
+(void)displayToastWithMessage:(NSString *)toastMessage
{
[[NSOperationQueue mainQueue] addOperationWithBlock:^ {
UIWindow * keyWindow = [[UIApplication sharedApplication] keyWindow];
UILabel *toastView = [[UILabel alloc] init];
toastView.text = toastMessage;
toastView.font = [MYUIStyles getToastHeaderFont];
toastView.textColor = [MYUIStyles getToastTextColor];
toastView.backgroundColor = [[MYUIStyles getToastBackgroundColor] colorWithAlphaComponent:0.9];
toastView.textAlignment = NSTextAlignmentCenter;
@hammoudeh
hammoudeh / SampleRecognizeKairos.cs
Created January 25, 2016 19:49
Sample Recognize Kairos
KairosClient Client = new KairosClient("your_app_id", "your_app_key");
string result = Client.recognize("http://www.link.to/your/image.jpg", "gallery1",null,null,null,"10");
@hammoudeh
hammoudeh / SampleEnrollKairos.cs
Last active January 25, 2016 19:48
Sample to enroll Kairos
KairosClient Client = new KairosClient("your_app_id", "your_app_key");
string result = Client.enroll("http://www.link.to/your/image.jpg", "gallery1",null,null,null,"10");
@hammoudeh
hammoudeh / AndroidManifest.xml
Created January 12, 2016 09:33
Android camera intent don't retrieve data
<activity
android:name=".AddNewImage"
android:label="@string/title_activity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:theme="@style/Theme.NoActionBar"
android:windowSoftInputMode="stateHidden" />