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 Interactable, { IDragEvent, INativeDragEvent } from 'react-native-interactable'; | |
import { StyleSheet, TouchableOpacity, View, FlatList, GestureResponderEvent } from 'react-native'; | |
export type InteractableListItemRefType = React.Component<Interactable.IInteractableView, {}, any> | null | undefined; | |
export interface ICommonProps { | |
onPress?: (event: GestureResponderEvent) => void | null, | |
rightButtons: Array<React.ReactElement<any>>, | |
leftButtons: Array<React.ReactElement<any>>, |
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
// You can use maven-publish-helper.gradle script without changes and even share it between multiple | |
// modules. Just place the maven-publish-helper.gradle file in the root directory of your project, | |
// then apply it at the bottom of your module's build.gradle file like this: | |
// ...content of module's build.gradle file... | |
apply from: '../maven-publish-helper.gradle' | |
publishing { | |
publications { |
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
(add-hook 'typescript-mode-hook | |
(lambda () | |
(tide-setup) | |
(flycheck-mode +1) | |
(eldoc-mode +1) | |
(company-mode) | |
(setq fill-column 120) | |
(local-set-key "\C-j" 'newline) | |
(local-set-key "\r" 'newline-and-indent) ;Auto-indent. | |
(local-set-key "\M-o" 'one-line-section-break) |
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
private static WritableMap convertJsonToMap(JSONObject jsonObject) throws JSONException { | |
WritableMap map = new WritableNativeMap(); | |
Iterator<String> iterator = jsonObject.keys(); | |
while (iterator.hasNext()) { | |
String key = iterator.next(); | |
Object value = jsonObject.get(key); | |
if (value instanceof JSONObject) { | |
map.putMap(key, convertJsonToMap((JSONObject) value)); | |
} else if (value instanceof JSONArray) { |
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
require 'ipaddr' | |
IPAddr.new('1.2.3.4').to_i | |
IPAddr.new(16909060, Socket::AF_INET).to_s | |