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
// SPDX-License-Identifier: GPL-3.0 | |
pragma solidity >=0.4.22 <0.9.0; | |
library TestsAccounts { | |
function getAccount(uint index) pure public returns (address) { | |
address[15] memory accounts; | |
accounts[0] = 0x5B38Da6a701c568545dCfcB03FcB875f56beddC4; | |
accounts[1] = 0xAb8483F64d9C6d1EcF9b849Ae677dD3315835cb2; |
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
/** | |
* Boolean | |
* | |
* The most basic datatype is the simple true/false value, | |
* which JavaScript and TypeScript (as well as other languages) call a 'boolean' value. | |
*/ | |
var isDone: boolean = false; | |
/** | |
* Number |
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 XLSX = require('xlsx') | |
const path = require('path') | |
const fs = require('fs') | |
const file = path.join(__dirname, '/rental_units.xlsx') | |
fs.readFile(file, (err, data) => { | |
var wb = XLSX.readFile(file) | |
/* generate array of arrays */ | |
data = XLSX.utils.sheet_to_json(wb.Sheets[wb.SheetNames[0]], { header: 1 }) |
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
Object.defineProperty(Array.prototype, "first", { | |
get: function() { | |
return this[0]; | |
} | |
}); | |
Object.defineProperty(Array.prototype, "last", { | |
get: function() { | |
return this[this.length - 1]; | |
} |
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
'use strict'; | |
import { v1 as neo4j } from 'neo4j-driver'; | |
import crypto from 'crypto'; | |
import uuidv4 from 'uuid/v4'; | |
import middleware from 'lambda-utilities/lib/middleware'; | |
import { filterWarmUpEvent } from 'lambda-utilities/lib/middleware/filterWarmUpEvent'; | |
import { ErrorUnauthorized } from 'lambda-utilities/lib/error'; | |
import { jsonResponse } from '../utils/util'; | |
import errorResponse from '../utils/errorResponse'; |
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
'use strict'; | |
import middleware from 'lambda-utilities/lib/middleware'; | |
import { filterWarmUpEvent } from 'lambda-utilities/lib/middleware/filterWarmUpEvent'; | |
import { ErrorUnauthorized } from 'lambda-utilities/lib/error'; | |
import { | |
jsonResponse, | |
getMidNight, | |
getBeforeMidNight, | |
getNextDay, |
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
// images are from the properties.. | |
downloadImages = async ({ images }) => { | |
const newImage = images.map(image => { | |
return RNFetchBlob.fetch('GET', image.url) | |
.then(res => { | |
return { | |
title_en: image.title_en, | |
type: image.type, | |
image: `data:image/png;base64,${res.base64()}`, |
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
RCT_CUSTOM_VIEW_PROPERTY(showNextButton, BOOL, RCTTextField) | |
{ | |
if (json && ([RCTConvert BOOL:json])) { | |
UIToolbar* toolbar = [[UIToolbar alloc] init]; | |
[toolbar sizeToFit]; | |
UIBarButtonItem* flex = [[UIBarButtonItem alloc] | |
initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace | |
target:nil action:nil]; | |
UIBarButtonItem* doneButton = [[UIBarButtonItem alloc] |
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 { Animated } from 'react-native'; | |
import CircularProgress from './CircularProgress'; | |
const AnimatedProgress = Animated.createAnimatedComponent(CircularProgress); | |
class AnimatedCircularProgress extends React.Component { | |
constructor() { | |
super(); | |
this._animatedValue = new Animated.Value(0); |
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 { PanResponder, View, Platform } from 'react-native'; | |
import Svg,{ Path, Circle, G,Text } from 'react-native-svg'; | |
class CircularSlider extends Component { | |
constructor(props){ | |
super(props); | |
this.handlePanResponderMove = this.handlePanResponderMove.bind(this); | |
this.cartesianToPolar = this.cartesianToPolar.bind(this); | |
this.polarToCartesian = this.polarToCartesian.bind(this); |
NewerOlder