- Enable debugging over usb
--
Settings
>About Phone
-- TapBuild Number
row seven times -- Go back one step andDeveloper Options
will be open [Based on Android variants, it might be on top menu or under additional settings] -- Then fromDeveloper Options
enable the two items:
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
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]; |
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
/** | |
* 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'; |
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
sudo apt-get update | |
sudo apt-get upgrade | |
sudo apt-get install gcc autoconf bison flex libtool make libboost-all-dev libcurl4-openssl-dev curl libevent-dev uuid-dev | |
cd ~ | |
wget https://launchpad.net/gearmand/1.2/1.1.12/+download/gearmand-1.1.12.tar.gz |
- npm install
- node index.js ba 1000000
Result will be 13
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
<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); |
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
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 |
OlderNewer