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 NSString(MD5) | |
-(NSString*)md5sum; | |
@end |
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 "NSString+MD5.h" | |
@implementation NSString(MD5) | |
-(NSString*)md5sum; | |
{ | |
NSTask *task = [[NSTask alloc] init]; | |
[task setLaunchPath:@"/sbin/md5"]; | |
[task setArguments:@[@"-q", self]]; | |
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
NSAffineTransform *trans1 = [NSAffineTransform transform]; | |
[trans1 translateXBy: 10 yBy: 10]; | |
[trans1 concat]; | |
[self drawLineWithColor:[NSColor redColor]]; | |
[trans1 concat]; | |
[self drawLineWithColor:[NSColor greenColor]]; | |
// ..... |
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 Update () { | |
if (Application.platform == RuntimePlatform.Android) | |
{ | |
if (Input.GetKey(KeyCode.Home) || Input.GetKey(KeyCode.Escape) || Input.GetKey(KeyCode.Menu)) | |
{ | |
Application.Quit(); | |
return; | |
} | |
} |
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 org.nunocky.ocrtest01; | |
import java.io.File; | |
import java.io.FileOutputStream; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.io.OutputStream; | |
import android.app.AlertDialog; | |
import android.content.DialogInterface; |
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
void calcWorldSize() { | |
final float screenRatio = ((float)Gdx.graphics.getWidth()) / Gdx.graphics.getHeight(); | |
final float worldRatio = W / H; | |
if (screenRatio > worldRatio) { | |
worldBottomLeft.y = 0; | |
worldTopRight.y = H; | |
float w = screenRatio * H; |
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 org.nunocky.gdxcamera.android; | |
import android.content.Context; | |
import android.hardware.Camera; | |
import android.view.SurfaceHolder; | |
import android.view.SurfaceView; | |
import java.io.IOException; | |
; |
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
public class PlaceholderFragment extends Fragment { | |
private MediaPlayer mp; | |
public PlaceholderFragment() { | |
} | |
@Override | |
public View onCreateView(LayoutInflater inflater, ViewGroup container, | |
Bundle savedInstanceState) { | |
mp = MediaPlayer.create(getActivity().getApplicationContext(), R.raw.decision17); | |
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
> LIBNFC_LOG_LEVEL=3 nfc-list | |
debug libnfc.config key: [allow_intrusive_scan], value: [yes] | |
debug libnfc.config Unable to open directory: /usr/local/Cellar/libnfc/1.7.0/etc/nfc/devices.d | |
debug libnfc.general log_level is set to 3 | |
debug libnfc.general allow_autoscan is set to true | |
debug libnfc.general allow_intrusive_scan is set to true | |
debug libnfc.general 0 device(s) defined by user | |
nfc-list uses libnfc 1.7.0 | |
debug libnfc.general 0 device(s) found using arygon driver | |
debug libnfc.general 0 device(s) found using pn532_uart driver |
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
> LIBNFC_LOG_LEVEL=3 nfc-list | |
debug libnfc.config key: [allow_intrusive_scan], value: [yes] | |
debug libnfc.config Unable to open directory: /usr/local/Cellar/libnfc/1.7.0/etc/nfc/devices.d | |
debug libnfc.general log_level is set to 3 | |
debug libnfc.general allow_autoscan is set to true | |
debug libnfc.general allow_intrusive_scan is set to true | |
debug libnfc.general 0 device(s) defined by user | |
nfc-list uses libnfc 1.7.0 | |
debug libnfc.general 0 device(s) found using arygon driver | |
debug libnfc.general 0 device(s) found using pn532_uart driver |
OlderNewer