Skip to content

Instantly share code, notes, and snippets.

View hungtrn75's full-sized avatar
🎯
Focusing

Hung Tran hungtrn75

🎯
Focusing
View GitHub Profile
import { Header, Icon, Left } from "native-base";
import React, { Component } from "react";
import {
ActivityIndicator,
Image,
Keyboard,
Platform,
StyleSheet,
View
} from "react-native";
import PropTypes from "prop-types";
import React, { PureComponent } from "react";
import { Animated, Easing, TouchableWithoutFeedback, View } from "react-native";
import { radius, styles } from "./styles.js";
export default class Ripple extends PureComponent {
static defaultProps = {
...TouchableWithoutFeedback.defaultProps,
rippleColor: "rgb(0, 0, 0)",
{
"Import React-Redux": {
"prefix": "importReactRedux",
"body": [
"import { connect } from 'react-redux';",
"import { bindActionCreators, compose } from 'redux';"
],
"description": "Import react-redux"
},
"mapStateToProps": {
{
"workbench.iconTheme": "material-icon-theme",
"editor.formatOnSave": true,
"editor.tabSize": 2,
"editor.wordWrap": "on",
"editor.renderWhitespace": "none",
"git.enableSmartCommit": true,
"git.autofetch": true,
"terminal.integrated.fontFamily": "MesloLGM Nerd Font",
"color-highlight.markerType": "outline"
m = [{
type: "amex",
pattern: /^3[47]/,
format: /(\d{1,4})(\d{1,6})?(\d{1,5})?/,
length: [15],
cvcLength: [4],
luhn: true
}, {
type: "jcb",
pattern: /^35/,
handleDownloadAttachment = (file) => {
Alert.alert(
'Tải tệp đính kèm', `Tải tệp: ${file.filename}?`,
[{
text: 'Hủy',
onPress: () => {}
},
{
text: 'Tải',
onPress: () => RNFetchBlob
function distance(lat1, lon1, lat2, lon2, unit) {
var radlat1 = Math.PI * lat1 / 180
var radlat2 = Math.PI * lat2 / 180
var theta = lon1 - lon2
var radtheta = Math.PI * theta / 180
var dist = Math.sin(radlat1) * Math.sin(radlat2) + Math.cos(radlat1) * Math.cos(radlat2) * Math.cos(radtheta);
if (dist > 1) {
dist = 1;
}
dist = Math.acos(dist)
platform :ios, '9.0'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
target 'demo_app' do
# Pods for demo_app
pod 'React', :path => '../node_modules/react-native/'
pod 'React-Core', :path => '../node_modules/react-native/React'
pod 'React-DevSupport', :path => '../node_modules/react-native/React'
pod 'React-fishhook', :path => '../node_modules/react-native/Libraries/fishhook'
pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'
import React, { Component, useState } from "react";
import {
Text,
StyleSheet,
TouchableOpacity,
TouchableNativeFeedback
} from "react-native";
import Animated, { Easing } from "react-native-reanimated";
import { Block } from "../../components/common";
import LottieView from "lottie-react-native";
function immutableMove(arr, from, to) {
return arr.reduce((prev, current, idx, self) => {
if (from === to) {
prev.push(current);
}
if (idx === from) {
return prev;
}
if (from < to) {
prev.push(current);