BOOL -> Bool
NSInteger -> Number
float -> Number
double -> Number
CGFloat -> Number
NSString -> String
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
if (Build.VERSION.SDK_INT >= 23) { | |
/* code to run on API 23 or above */ | |
} |
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
$ adb shell | |
generic_x86: # su | |
generic_x86: # cd data/data/<PACKAGE_ID> |
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 Utils { | |
public static void readAsset(String filename) { | |
AssetManager assetManager = context.getAssets(); | |
try { | |
InputStream inputStream = assetManager.open(filename); | |
File outFile = new File(context.getFilesDir(), filename); | |
FileOutputStream out = new FileOutputStream(outFile); | |
copyFile(inputStream, out); | |
} catch (IOException e) { |
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 static WritableArray toWritableArray(ResultSet resultSet) { | |
WritableArray writableArray = Arguments.createArray(); | |
for (Result result : resultSet) { | |
Map<String,Object> map = result.toMap(); | |
WritableMap writableMap = Arguments.makeNativeMap(map); | |
writableArray.pushMap(writableMap); | |
} | |
return writableArray; | |
} |
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
String wildcardMatch = String.format("%%%s%%", location); |
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 { Navigation } from "react-native-navigation"; | |
import Hotels from './ui/Hotels'; | |
import BookmarkedHotels from './ui/BookmarkedHotels'; | |
Navigation.registerComponent('HotelFinder.BookmarkedHotels', () => BookmarkedHotels); | |
Navigation.registerComponent('HotelFinder.Hotels', () => Hotels); | |
export const startApp = () => { | |
Navigation.startSingleScreenApp({ | |
screen: { |
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
#!/usr/bin/env bash | |
OUTPUT_FILE=${1} | |
if [[ ! -z ${1} ]]; then | |
fi |
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> | |
#import "React/RCTBridgeModule.h" | |
@interface RCT_EXTERN_MODULE(HotelFinderNative, NSObject) | |
+ (BOOL)requiresMainQueueSetup | |
{ | |
return YES; | |
} | |
@end |
-
brew install libgcrypt
-
npm install nodegit
Source: nodegit/nodegit#1037
OlderNewer