Real unit test (isolation, no children render)
Calls:
- constructor
- render
var i, j, | |
arr = [2,5,1,0], | |
max = 0, | |
n = arr.length; | |
for (i = 1; i < n; i++) | |
for (j = 0; j < n - 1 ; j++) { | |
max = arr[j + 1]; | |
if (arr[j] > max) { |
/** | |
* An implementation for Quicksort. Doesn't | |
* perform as well as the native Array.sort | |
* and also runs the risk of a stack overflow | |
* | |
* Tests with: | |
* | |
* var array = []; | |
* for(var i = 0; i < 20; i++) { | |
* array.push(Math.round(Math.random() * 100)); |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-type" content="text/html; charset=utf-8"> | |
<title>Testing Pie Chart</title> | |
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js?2.1.3"></script> | |
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.geom.js?2.1.3"></script> | |
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.layout.js?2.1.3"></script> | |
<style type="text/css"> |
Router.map(function () { | |
this.route('index', { | |
controller: 'BasicController', | |
layoutTemplate: 'indexLayout', | |
path: '/', | |
waitOn: function () { | |
return Meteor.subscribe('Channels'); | |
} | |
}); |
function Gauge(placeholderName, configuration) | |
{ | |
this.placeholderName = placeholderName; | |
var self = this; // for internal d3 functions | |
this.configure = function(configuration) | |
{ | |
this.config = configuration; | |
function createList(array) { | |
var list = createNext(0, array); | |
return list; | |
} | |
function createNext(i, array) { | |
var result; | |
if (i < array.length) { |
#!/bin/bash | |
# Functions ============================================== | |
# return 1 if global command line program installed, else 0 | |
# example | |
# echo "node: $(program_is_installed node)" | |
function program_is_installed { | |
# set to 1 initially | |
local return_=1 |
const mongoose = require('mongoose') | |
mongoose.Promise = Promise | |
mongoose.connection.on('connected', () => { | |
console.log('Connection Established') | |
}) | |
mongoose.connection.on('reconnected', () => { | |
console.log('Connection Reestablished') |
In /usr/share/pulseaudio/alsa-mixer/paths/analog-input-internal-mic.conf
and /usr/share/pulseaudio/alsa-mixer/paths/analog-input-mic.conf
:
[Element Internal Mic Boost]
set volume to zero
.[Element Int Mic Boost]
set volume to zero
.[Element Mic Boost]
set volume
to zero
Find your source name from the following command; mine is alsa_input.pci-0000_00_1f.3.analog-stereo
$ pacmd list-sources | grep 'name:.*input'
Edit /etc/pulse/default.pa
and add the following lines, where INPUT_NAME
is name of the input source from above step: