Count() is O(n).
This can send a new developer running to the hills, as it seems like a trivial problem, however it is not. While we hope this gets addressed in the future (even in a non ideal way), there are work arounds.
Relevant Issues:
| // I little bot that I've made for the game Kuku Kube | |
| // I found 2 bots so far and they were a lot slower than this one :) | |
| // Start the game and paste the code in the browser's console. Hit enter and... don't watch! You can be hypnotized! :D | |
| // You can play (or cheat) the game here http://106.186.25.143/kuku-kube/en-3/ | |
| // Have fun! | |
| console.log('I\'m a bot') | |
| var init = function () { | |
| var color_arr = [], |
| ... | |
| "ssl": { | |
| "pem": "./ssl.pem", | |
| // When the ssl terminator finish its job it will redirect the request to 8080 | |
| // where our nginx will listen and proxy the request to our meteor app on port 3002 for example | |
| // meteor-up uses stud for ssl temination so nginx will not deal with ssl at all | |
| "backendPort": 8080 | |
| } | |
| ... |
| // start should be 0 or 1 because by definition fibonacci sequence is starting from 0 element with 0,1 or from the first element with 1,1 | |
| var start = 0// or 1; | |
| var results = start == 0 ? [0, 1] : [1, 1]; | |
| var i = 0; | |
| var end = 10; // how far you want to go | |
| while(i < end) { | |
| var len = results.length; | |
| var next = results[len-1] + results[len-2]; | |
| results.push(next); |
| // https://en.wikipedia.org/wiki/Sieve_of_Eratosthenes | |
| var sieve = []; | |
| var primes = []; | |
| var i, j; | |
| var end = 1000; | |
| for(i=2; i <= end; i++) { | |
| if (!sieve[i]) { | |
| primes.push(i); | |
| server { | |
| listen 80; | |
| server_name domain.com; | |
| location /rethinkdb-admin/ { | |
| auth_basic "Restricted"; | |
| auth_basic_user_file /etc/nginx/.rethinkdb.pass; | |
| proxy_pass http://127.0.0.1:8080/; | |
| proxy_redirect off; | |
| proxy_set_header Authorization ""; |
| // All examples are using the request npm module | |
| // Get | |
| const qs = querystring.stringify({ | |
| email: email, // email of the user registered in xendo | |
| service_name: 'asana', | |
| access_token: access_token, // asana's access token for this user | |
| refresh_token: refresh_token // asana's refresh token for this user | |
| }); | |
| const url = 'https://xen.do/api/v1/provisioning/service/?' + qs; |
Count() is O(n).
This can send a new developer running to the hills, as it seems like a trivial problem, however it is not. While we hope this gets addressed in the future (even in a non ideal way), there are work arounds.
Relevant Issues:
| 'use strict'; | |
| import React, { | |
| AppRegistry, | |
| Component, | |
| StyleSheet, | |
| Text, | |
| View, | |
| TouchableOpacity, | |
| LayoutAnimation, | |
| } from 'react-native'; |
| /* eslint-disable no-console, no-shadow */ | |
| const exec = require('child_process').exec; | |
| const fs = require('fs'); | |
| // const type = process.argv[2] || 'icons'; | |
| const path = `./assets/svgs/originals`; | |
| const svgoOptions = { | |
| plugins: [ | |
| { collapseGroups: true }, | |
| { convertPathData: true }, |
| // approach 1: define action object in the component | |
| this.props.dispatch({ | |
| type : "EDIT_ITEM_ATTRIBUTES", | |
| payload : { | |
| item : {itemID, itemType}, | |
| newAttributes : newValue, | |
| } | |
| }); | |
| // approach 2: use an action creator function |