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:
passwd | |
systemctl enable sshd.service | |
systemctl start sshd.service | |
parted -s /dev/sda mklabel gpt | |
parted -s /dev/sda mkpart "primary" "fat16" "50MB" "60MB" | |
parted -s /dev/sda mkpart "primary" "ext4" "1%" "99%" | |
parted -s /dev/sda set 1 bios_grub on | |
mkfs.ext4 /dev/sda2 |
# The "query" configuration is adapted from this gist: https://gist.github.com/techniq/4609063 | |
.directive 'remoteSelectPlugin', ['$http', ($http) -> | |
{ | |
restrict: 'A' | |
link: (scope, elem, attr) -> | |
angular.element(elem).select2({ | |
placeholder: attr.remoteSelectPlugin | |
minimumInputLength: 1 | |
query: (options) -> |
if(Meteor.isServer){ | |
Meteor.methods({ | |
myMeteorMethod: function() { | |
// load Future | |
Future = Npm.require('fibers/future'); | |
var myFuture = new Future(); | |
// call the function and store its result | |
SomeAsynchronousFunction("foo", function (error,results){ |
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:
$("[data-provide='select2']").each(function () { | |
var $element = $(this); | |
$element.select2({ | |
placeholder: $element.data("placeholder"), | |
minimumInputLength: 0, | |
allowClear: true, | |
initSelection: function (element, callback) { | |
callback({ | |
id: $(element).val(), |
/* | |
Usage: npm run convert-svgs <type:icons|logos> | |
*/ | |
/* eslint-disable no-console, no-shadow */ | |
const exec = require('child_process').exec; | |
const fs = require('fs'); | |
const type = process.argv[2] || 'icons'; | |
const path = `./src/assets/svg/${type}`; |
// 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 |
// http://www.html5rocks.com/en/tutorials/es6/promises/ | |
function get(url) { | |
// Return a new promise. | |
return new Promise(function(resolve, reject) { | |
// Do the usual XHR stuff | |
var req = new XMLHttpRequest(); | |
req.open('GET', url); | |
req.onload = function() { |
'use strict'; | |
import React, { | |
AppRegistry, | |
Component, | |
StyleSheet, | |
Text, | |
View, | |
TouchableOpacity, | |
LayoutAnimation, | |
} from 'react-native'; |