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 Foundation | |
| // Complete the countApplesAndOranges function below. | |
| func countApplesAndOranges(s: Int, t: Int, a: Int, b: Int, apples: [Int], oranges: [Int]) -> Void { | |
| var countApple: Int = 0 | |
| var countOranges: Int = 0 | |
| for apple in apples { | |
| if (a + apple) >= s && (a + apple) <= t { |
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
| // Find nth Fibonacci number | |
| func fibonaci(_ n: Int) -> Int { | |
| if (n == 1 || n == 2) { return 1 } | |
| return (fibonaci(n-1) + fibonaci(n-2)) | |
| } |
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
| // | |
| // ViewController.swift | |
| // ImagePicker_Pickup_Photo_and_Image | |
| // | |
| // Created by Van Le on 3/27/20. | |
| // Copyright © 2020 Van Le. All rights reserved. | |
| // | |
| import UIKit |
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
| #!/usr/bin/env ruby | |
| icon_list = "alligator, anteater, armadillo, auroch, axolotl, badger, bat, beaver, buffalo, camel, chameleon, cheetah, chipmunk, chinchilla, chupacabra, cormorant, coyote, crow, dingo, dinosaur, dolphin, duck, elephant, ferret, fox, frog, giraffe, gopher, grizzly, hedgehog, hippo, hyena, jackal, ibex, ifrit, iguana, koala, kraken, lemur, leopard, liger, llama, manatee, mink, monkey, narwhal, nyan cat, orangutan, otter, panda, penguin, platypus, python, pumpkin, quagga, rabbit, raccoon, rhino, sheep, shrew, skunk, slow loris, squirrel, turtle, walrus, wolf, wolverine, wombat" | |
| for icon in icon_list.split ', ' do | |
| element = icon.sub ' ', '' | |
| `curl https://ssl.gstatic.com/docs/common/profile/#{element}_lg.png -o icons/#{element}.png` | |
| 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 React, { Component } from 'react'; | |
| import { View, Text, TouchableOpacity, Image } from 'react-native'; | |
| import FastImage from 'react-native-fast-image'; | |
| import { withNavigation } from 'react-navigation'; | |
| // import Moment from "moment"; | |
| class BookingItem extends Component { | |
| constructor(props) { | |
| super(props); | |
| this.state = { |
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 React, { Component } from 'react' | |
| import { StyleSheet, Text, View, Dimensions, FlatList } from 'react-native' | |
| import { TabView, SceneMap } from 'react-native-tab-view'; | |
| import BookingItem from './BookingItem'; | |
| export default class BookingList extends Component { | |
| constructor(props) { | |
| super(props); |
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 React, { Component } from 'react' | |
| import { Text, View, ScrollView } from 'react-native' | |
| import BookingList from './BookingList'; | |
| export default class TabViewDemoScreen extends Component { | |
| constructor(props) { | |
| super(props) |
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 React from 'react'; | |
| import { StyleSheet, Text, View, Image } from 'react-native'; | |
| export default class App extends React.Component { | |
| render() { | |
| return ( | |
| <View style={styles.container}> | |
| <View style={{ backgroundColor: 'white', marginTop: 50, flexDirection: 'row' }}> | |
| <Image | |
| style={{ width: 69, height: 69, borderRadius: 69 / 2 }} |
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
| const { createStore } = require('redux'); | |
| const defaultState = { value: 0 }; | |
| const reducer = (state = defaultState, action) => { | |
| if (action.type === 'UP') { | |
| return { value: state.value + 1 }; | |
| } | |
| if (action.type === 'DOWN') { | |
| return { value: state.value - 1 }; |