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
var temp = [1, 2, 4, 5, 6, 8, 2, 7, 2]; | |
var encountered = []; | |
function f(a) { | |
let min = -1; | |
for (let i = 0; i < a.length; i++) { | |
let id = i + 1; | |
while (id !== 0) { | |
id = a.indexOf(a[i], id) + 1; |
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> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<script id="jsbin-javascript"> |
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> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<script id="jsbin-javascript"> |
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 doDownloadPDF = () => async dispatch => { | |
let filename_attachment = '1'; | |
let ext = '.pdf'; | |
let base64Str = res.base64(); | |
let pdfLocation = DocumentDir + '/' + filename_attachment + ext; | |
await RNFetchBlob.fs.writeFile(pdfLocation, base64Str, 'base64').then((res) => { | |
// eslint-disable-next-line no-console | |
console.log(res) | |
}, (err) => { |
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
defaultConfig { | |
applicationId "com.vicinia.tinmen" | |
minSdkVersion rootProject.ext.minSdkVersion | |
targetSdkVersion rootProject.ext.getVersionCode() | |
versionCode vcode | |
versionName "4.0" | |
multiDexEnabled 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
buildscript { | |
ext { | |
buildToolsVersion = "28.0.3" | |
minSdkVersion = 19 | |
compileSdkVersion = 28 | |
targetSdkVersion = 28 | |
supportLibVersion = "28.0.0" | |
googlePlayServicesVersion = "16.0.0" | |
getVersionCode = { -> | |
try { |
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
#Update build number with number of git commits if in release mode | |
if [ ${CONFIGURATION} == "Release" ]; then | |
buildNumber=$(git rev-list HEAD | wc -l | tr -d ' ') | |
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" "${PROJECT_DIR}/${INFOPLIST_FILE}" | |
fi; |
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 convertOrdersToDeliveryTags = async (orders, address) => { | |
const deliveryTags = _.map(orders, (order) => { | |
return { | |
userName: order.get('user').get('name'), | |
productName: order.get('product').get('name'), | |
orderNumber: order.get('orderNumber'), | |
isPicked: !_.isEmpty(order.get('pickedAt')), | |
isDelivered: !_.isEmpty(order.get('deliveredAt')), | |
isReturned: !_.isEmpty(order.get('returnedAt')), |
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
if (Text.defaultProps == null) { | |
Text.defaultProps = {}; | |
Text.defaultProps.allowFontScaling = false; | |
} | |
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
cardViewAndroid: { | |
elevation: 3, | |
width: width - 80, | |
height: width * 0.5, | |
shadowColor: colors.black, | |
shadowOpacity: 0.3, | |
shadowRadius: 3, | |
shadowColor: 'rgba(0,0,0,0.2)', | |
shadowOffset: {width: 1, height: 1}, |
NewerOlder