- npm install
- node index.js ba 1000000
Result will be 13
<html lang="en"> | |
<head> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> | |
<script type="text/javascript"> | |
$(document).ready(function () { | |
var audioElement = document.createElement("audio"); | |
audioElement.setAttribute("src", "https://www.soundjay.com/human/sounds/applause-01.mp3"); | |
audioElement.addEventListener("ended", function () { audioElement.currentTime = 0; }, false); |
export class Utils { | |
static maxItemOfArray = (arr: any) => [...arr].sort((a, b) => b - a).slice(0, 1)[0]; | |
static areAllEqual = (array: any) => array.every((item: any) => item === array[0]); | |
static averageOf = (...numbers: any) => numbers.reduce((a: any, b: any) => a + b, 0) / numbers.length; | |
static intersection = (arr1: number[], arr2: number[]) => arr1.filter(num => arr2.includes(num)); | |
// following will be applicable only if the arrays are sorted |
Result will be 13
Settings
> About Phone
-- Tap Build Number
row seven times
-- Go back one step and Developer Options
will be open [Based on Android variants, it might be on top menu or under additional settings]
-- Then from Developer Options
enable the two items:NSArray *imageList = @[@"http://www.thinkgeek.com/images/products/frontsquare/jvkn_sw_beak_back_buddy.jpg", | |
@"https://images-na.ssl-images-amazon.com/images/I/41yAU9p60jL._SY300_.jpg"]; | |
NSDictionary *props = @{@"images" : imageList}; | |
RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge | |
moduleName:@"ImageBrowserTest" | |
initialProperties:props]; |
#import <React/RCTBridgeModule.h> | |
@interface CalendarManager : NSObject <RCTBridgeModule> | |
@end |
/** | |
* This exposes the native EmpManToast module as a JS module. This has a | |
* function 'show' which takes the following parameters: | |
* | |
* 1. String message: A string with the text to toast | |
* 2. int duration: The duration of the toast. May be ToastExample.SHORT or | |
* ToastExample.LONG | |
*/ | |
import {NativeModules} from 'react-native'; |
mobile web app
, an HTML5 app
, or a hybrid app
. You build a real mobile app that's indistinguishable from an app built using Objective-C
or Java
.import React, { Component } from 'react'; | |
import { Image, ScrollView, Text } from 'react-native'; | |
class AwkwardScrollingImageWithText extends Component { | |
render() { | |
return ( | |
<ScrollView> | |
<Image | |
source={{uri: 'https://i.chzbgr.com/full/7345954048/h7E2C65F9/'}} | |
style={{width: 320, height:180}} |