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
<MapView | |
style={{...StyleSheet.absoluteFillObject}} | |
ref={map => { | |
this.map = map; | |
}} | |
minZoomLevel={2} | |
maxZoomLevel={20} | |
provider={MapView.PROVIDER_GOOGLE} | |
initialRegion={this.state.initialRegionState} | |
showsUserLocation={true} |
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
const redis = require("redis"), | |
client = redis.createClient(); | |
var myLocation = { latitude : 13.617531, longitude : 100.623084 } | |
var taxi1 = { name : "taxi1" , latitude : 13.627457, longitude : 100.627518} | |
var taxi2 = { name: "taxi2" , latitude : 13.744965, longitude : 100.638121 } | |
var taxi_all = [ taxi1 , taxi2 ] | |
console.log('taxi_all :: ' , taxi_all); |
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
// ในทุกอน่าสามารถแทรก onNavigatorEvent ให้มันเพื่อดัก event แต่ละหน้า | |
// วิธีการคือ นำ Backhandler ของ react-native core มาใช้เพื่อสร้าง event ก่อนที่จะแสดงหน้าผลปัจจุบัน | |
// ที่นี่ ในหน้าที่แสดงหน้าแรก จะมี event backhandler โผล่มา ที่นี่ถ้าจะ push ไปหน้าอื่น ก็ลบทิ้งซะ จบบบ | |
constructor(props){ | |
if(Platform.OS === 'android'){ | |
this.props.navigator.setOnNavigatorEvent(this.onNavigatorEvent.bind(this)); | |
} |
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
# You Podfile should look similar to this file. React Native currently does not support use_frameworks! | |
source 'https://github.com/CocoaPods/Specs.git' | |
platform :ios, '8.0' | |
target 'taxiDriverApp' do | |
rn_path = '../node_modules/react-native' | |
pod 'yoga', path: "#{rn_path}/ReactCommon/yoga/yoga.podspec" | |
pod 'React', path: rn_path , :subspecs => [ |
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
constructor(props) { | |
super(props); | |
this.props.navigator.setOnNavigatorEvent( | |
this.onNavigatorEvent.bind(this) | |
); | |
} | |
// If this screen was the first screen app (like a slash or login page), you will need do this | |
// componentWillMount() { | |
// this.props.navigator.setDrawerEnabled({ |
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
เลือกสร้าง Cluster ใน zone ที่ยังไม่เคยใช้เพื่อไม่ให้เกินข้อจำกันฟรีที่ 8vCPUs 100GB disk | |
Master: 4 vCPUs 15GB 40 GB disk | |
2 workers: 2 vCPUs 7.5GB 30 GB disk | |
Image version: 1.2 | |
Initialization actions: | |
gs://dataproc-initialization-actions/zeppelin/zeppelin.sh | |
gs://dataproc-initialization-actions/hue/hue.sh | |
(ดู Initialization actions เพิ่มเติมที่ https://github.com/GoogleCloudPlatform/dataproc-initialization-actions) |
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, { Component } from "react"; | |
import moment from 'moment'; | |
import { Alert, Platform, StyleSheet, View, Dimensions, BackHandler, ToastAndroid, TouchableOpacity , FlatList , NativeModules, LayoutAnimation, } from "react-native"; | |
import { Container, Grid, Row, Spinner, Col, Header, Title, Content, Footer, Input, Item, Button, Icon, Text, Thumbnail ,Card , CardItem , Left , Right , Body } from "native-base"; | |
import {Loading} from "../CommonComponent"; | |
import { Navigation, ScreenVisibilityListener } from "react-native-navigation"; | |
import {observer} from 'mobx-react/native' | |
const DEFAULT_PADDING = { top: 300, right: 60, bottom: 300, left: 60 }; | |
const { width, height } = Dimensions.get("window"); |
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, { Component } from 'react'; | |
import { Text, View, FlatList, Dimensions, Button, StyleSheet } from 'react-native'; | |
const { width } = Dimensions.get('window'); | |
const style = { | |
justifyContent: 'center', | |
alignItems: 'center', | |
width: width, | |
height: 50, |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Document</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.6.5/angular.js"></script> | |
</head> |
OlderNewer