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
module.exports = { | |
//... | |
find: function(req, res) { | |
Items | |
.find() | |
.exec(function(err, items) { | |
if (err) { | |
res.send(err); | |
} else if (items) { | |
items.forEach( |
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
find: function(req, res) { | |
Items.find().done(function (err, val) { | |
if (err) { | |
res.send(err); | |
} | |
res.send(val); | |
}); | |
}, |
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
all: function(params, callback) { | |
var async = require('async'); | |
var reviews = null; | |
async.series([ | |
function load_reviews(cb) { | |
Reviews.find().exec(function (err, result) { | |
reviews = result; | |
cb(null, reviews); | |
}); | |
}, |
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
filename: /lib/modules/3.13.0-24-generic/kernel/drivers/net/wireless/iwlwifi/iwlwifi.ko | |
license: GPL | |
author: Copyright(c) 2003-2013 Intel Corporation <ilw@linux.intel.com> | |
version: in-tree: | |
description: Intel(R) Wireless WiFi driver for Linux | |
firmware: iwlwifi-100-5.ucode | |
firmware: iwlwifi-1000-5.ucode | |
firmware: iwlwifi-135-6.ucode | |
firmware: iwlwifi-105-6.ucode | |
firmware: iwlwifi-2030-6.ucode |
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
Sep 14 15:50:34 mypc NetworkManager[736]: <info> Activation (wlan0) starting connection 'LessWire' | |
Sep 14 15:50:34 mypc NetworkManager[736]: <info> (wlan0): device state change: disconnected -> prepare (reason 'none') [30 40 0] | |
Sep 14 15:50:34 mypc NetworkManager[736]: <info> NetworkManager state is now CONNECTING | |
Sep 14 15:50:34 mypc NetworkManager[736]: <info> Activation (wlan0) Stage 1 of 5 (Device Prepare) scheduled... | |
Sep 14 15:50:34 mypc NetworkManager[736]: <info> Activation (wlan0) Stage 1 of 5 (Device Prepare) started... | |
Sep 14 15:50:34 mypc NetworkManager[736]: <info> Activation (wlan0) Stage 2 of 5 (Device Configure) scheduled... | |
Sep 14 15:50:34 mypc NetworkManager[736]: <info> Activation (wlan0) Stage 1 of 5 (Device Prepare) complete. | |
Sep 14 15:50:34 mypc NetworkManager[736]: <info> Activation (wlan0) Stage 2 of 5 (Device Configure) starting... | |
Sep 14 15:50:34 mypc NetworkManager[736]: <info> (wlan0): device state change: prepare -> config (reason 'none') [40 50 |
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
Sep 16 20:12:13 mypc wpa_supplicant[905]: wlan0: CTRL-EVENT-SCAN-STARTED | |
Sep 16 20:12:14 mypc wpa_supplicant[905]: nl80211: send_and_recv->nl_recvmsgs failed: -33 | |
Sep 16 20:12:32 mypc kernel: [ 711.959905] cfg80211: Calling CRDA for country: US | |
Sep 16 20:12:32 mypc kernel: [ 711.962582] cfg80211: Regulatory domain changed to country: US | |
Sep 16 20:12:32 mypc kernel: [ 711.962585] cfg80211: DFS Master region: unset | |
Sep 16 20:12:32 mypc kernel: [ 711.962586] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp) | |
Sep 16 20:12:32 mypc kernel: [ 711.962588] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2700 mBm) | |
Sep 16 20:12:32 mypc kernel: [ 711.962589] cfg80211: (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 1700 mBm) | |
Sep 16 20:12:32 mypc kernel: [ 711.962591] cfg80211: (5250000 KHz - 5330000 KHz @ 40000 KHz), (300 mBi, 2000 mBm) | |
Sep 16 20:12:32 mypc kernel: [ 711.962592] cfg80211: (5490000 KHz - 5600000 KHz @ 40000 KHz), (300 mBi, 2000 mBm) |
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
➜ combinatorial-algorithms git:(master) ✗ java RandomSubsetSimulation 4 12800 | |
Frequencies of chosen subsets .... | |
[1, 2, 3] : 1011, -211, 7.90 | |
[1] : 344, 456, 2.69 | |
[1, 2, 4] : 2214, -1414, 17.30 | |
[1, 3] : 2178, -1378, 17.02 | |
[1, 2] : 1568, -768, 12.25 | |
[1, 4] : 2064, -1264, 16.13 | |
[1, 2, 3, 4] : 2531, -1731, 19.77 | |
[1, 3, 4] : 890, -90, 6.95 |
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
➜ combinatorial-algorithms git:(master) ✗ java RandomSubsetSimulation 4 1280 | |
Frequencies of chosen subsets .... | |
[1, 2, 3] : 111, -31, 8.67 | |
[1] : 63, 17, 4.92 | |
[1, 2, 4] : 232, -152, 18.13 | |
[1, 3] : 261, -181, 20.39 | |
[1, 2] : 199, -119, 15.55 | |
[1, 4] : 246, -166, 19.22 | |
[1, 2, 3, 4] : 108, -28, 8.44 | |
[1, 3, 4] : 60, 20, 4.69 |
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
/** | |
* Problem: Print the statistics of RandomSubset algorithm when the experiment | |
* of choosing a subset at random is done the specified number of times. | |
*/ | |
import java.util.*; | |
class RandomSubsetSimulation { | |
static final Random r = new Random(System.currentTimeMillis()); //fix for the bug in the SO thread (see below) | |
public static void main(String[] args) { | |
// arg[0] = the max number n in the set: {1, 2, 3, ... n} | |
// arg[1] = the number of times the experiment is to be done |
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
Experiment a billion times: | |
➜ combinatorial-algorithms git:(master) ✗ java -ea RandomSubset 4 1000000000 | |
Frequencies of chosen subsets .... | |
[3] : 68566736, 6.856674 | |
[] : 79538193, 7.953819 |
OlderNewer