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 "Cache.h" | |
#import <WebKit/Webkit.h> | |
static NSInteger expireCacheMilliSeconds = 300000; // expire content cached longer than 5 minutes | |
@interface CacheOperation : NSOperation <UIWebViewDelegate, WKNavigationDelegate> | |
{ | |
BOOL executing; | |
BOOL finished; | |
} |
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 random | |
import sys | |
def random01(): | |
return random.randint(0,1) | |
# if 1+1 !=2 is false, it's easy, everything is normal | |
# but if 1+1 != 2 is true, what value should it be? | |
def baseRuleWhenOneMeetOne(): | |
# In binary |
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 React from "react"; | |
import { Button, View, Text } from "react-native"; | |
import { createStackNavigator, createAppContainer } from "react-navigation"; | |
class HomeScreen extends React.Component { | |
render() { | |
return ( | |
<View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}> | |
<Text>Home Screen</Text> | |
<Button |
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 React from "react"; | |
import { Button, View, Text, WebView } from "react-native"; | |
import { createStackNavigator, createAppContainer } from "react-navigation"; | |
class HomeScreen extends React.Component { | |
render() { | |
return ( | |
<View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}> | |
<Text>Home Screen</Text> | |
<Button |
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
{ | |
"name": "FancyLibs", | |
"version": "0.0.0", | |
"private": true, | |
"dependencies": { | |
"react": "^16.6.3", | |
"react-native": "^0.57.8" | |
}, | |
"devDependencies": { | |
"babel-loader": "7.1.4", |
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 BatchedBridge from "react-native/Libraries/BatchedBridge/BatchedBridge"; | |
import AppRegistry from 'react-native'; | |
export class CommonInterface { | |
helloworld(message) { | |
alert("Hello World\n" + message); | |
} | |
} | |
const exposed = new CommonInterface(); |
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 UnifiedSDK { | |
private static ReactInstanceManager manager; | |
public static void init(Activity activity) { | |
if (manager == null) { | |
manager = ReactInstanceManager.builder() | |
.setApplication(activity.getApplication()) | |
.setCurrentActivity(activity) | |
.setBundleAssetName("unifiedsdk.bundle") | |
.setJSMainModulePath("index") |
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
{ | |
"name": "UnifiedSDK", | |
"version": "0.0.0", | |
"private": true, | |
"scripts": { | |
"build-android": "react-native bundle --platform android --dev false --entry-file js/index.js --bundle-output android/fancylib/src/main/assets/unifiedsdk.bundle --assets-dest android/fancylib/src/main/res" | |
}, | |
"dependencies": { | |
"react": "^16.6.3", | |
"react-native": "^0.57.8" |
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
{ | |
"name": "UnifiedSDK", | |
"version": "0.0.0", | |
"private": true, | |
"scripts": { | |
"build-android": "react-native bundle --platform android --dev false --entry-file js/index.js --bundle-output android/fancylib/src/main/assets/unifiedsdk.bundle --assets-dest android/fancylib/src/main/res" | |
}, | |
"dependencies": { | |
"react": "^16.6.3", | |
"react-native": "^0.57.8" |
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
# Uncomment the next line to define a global platform for your project | |
# platform :ios, '9.0' | |
target 'FancyLibiOS' do | |
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks | |
# use_frameworks! | |
# Pods for FancyLibiOS | |
pod 'React', :path => '../../node_modules/react-native', :subspecs => [ | |
'Core', |
OlderNewer