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
| + (void)maskView:(UIView *)targetView withImageView:(UIImageView *)maskingImageView { | |
| CALayer *maskingLayer = [CALayer layer]; | |
| maskingLayer.frame = CGRectMake(maskingImageView.frame.origin.x - targetView.frame.origin.x, | |
| maskingImageView.frame.origin.y - targetView.frame.origin.y, | |
| maskingImageView.frame.size.width, | |
| maskingImageView.frame.size.height); | |
| maskingLayer.contents = (id)maskingImageView.image.CGImage; | |
| targetView.layer.mask = maskingLayer; | |
| } |
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
| appdir() { | |
| dir=$(ps ax | grep $1.app | grep -v grep | grep -v AppCode | awk '{print "\""$5" "$6" "$7"\""} ' | sed "s/$1\.app\/$1//g") | |
| eval cd "$dir" | |
| } |
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
| @interface A : NSObject | |
| - (int)foo; | |
| @end |
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
| import org.tensorflow.contrib.android.TensorFlowInferenceInterface; | |
| /** One time initialization: */ | |
| TensorFlowInferenceInterface tensorflow = new TensorFlowInferenceInterface(); | |
| tensorflow.initializeTensorFlow(getAssets(), "file:///android_asset/model.pb"); | |
| /** Continuous inference (floats used in example, can be any primitive): */ | |
| // loading new input | |
| tensorflow.fillNodeFloat("input:0", INPUT_SHAPE, input); // INPUT_SHAPE is an int[] of expected shape, input is a float[] with the input data |
OlderNewer