Posts

icecast - Is it possible to schedule a Liquidsoap source at a specific date and time? -

i'd attempting schedule liquidsoap streaming source played @ specific date , time in future. believe can accomplished using liquidsoap switch command i'm having trouble understanding documentation described here: http://liquidsoap.fm/doc-1.2.0/reference.html#switch is possible using liquidsoap? i'd nice if pass timestamp. i'm not sure can pass absolute timestamp switch , can pass time of day or week. see "time intervals" section: http://savonet.sourceforge.net/doc-svn/language.html i think best bet using playlist file rewritten via cron, or using request.dynamic custom external script determines play based on time. see documentation playlist here: http://savonet.sourceforge.net/doc-svn/reference.html#playlist

r - Reduce space between axis and geom -

Image
i have plot looks this: how can remove space between laft edge of line , y axis without cutting off directlabels? the code: library(ggplot2) library(scales) labs <- c("special ed., charter school", "gen. ed., charter school", "special ed., public school", "gen. ed., public school") pot <- data.frame(engagement = c(643, 793, 590, 724, 735, 928, 863, 662), classroom = rep(rep(c("special ed.", "gen. ed."), each = 2), 2), gender = factor(rep(c("male", "female"), 4), levels = c("male", "female")), school = rep(c("charter", "public"), each = 4), id = factor(rep(1:4, each = 2)), labs = factor(rep(labs, each=2), levels=labs) ) library(directlabels) xout <- ggplot(pot, aes(y = engagement, x = gender, group = id)) + geom_line(aes(color=labs), size=2) + theme_classic() + scale_x_discrete(expand = c(.1, .3)) ...

arrays - Excel List Top Occuring Numbers -

i've search haven't found example finds top 3 occurring numbers in list. code text, top scoring or top 3 biggest values. i have list of orders part numbers , prices occurred during year. -a---------b---------c-------d-------e 60470 $58 60470 $58 89038 $60 31859 $37 60470 $58 29079 $78 35568 $40 82677 $92 69172 $37 31859 $37 89038 $60 31859 $37 31859 $37 60470 $58 31859 $37 60470 $58 31859 $37 column has part numbers , column b has prices. in column d list top 3 occurring part numbers column , then in column e sum total occurrences. in example above, column d , e show following respectively: 31859 $222.00 60470 $290.00 89038 $120.00 i can't sort or add "helper" columns trying accomplish using array formula. any assistance appreciated. thank you. i...

unit testing - How to test node.js websocket server with mocha? -

i need test poker game server, based on websocket. so, if player1 send message server, server should send message other players. i write test block below: describe('protocol', () => { before(() => { player1 = new websocket('ws://xxxxxx'); player1 = new websocket('ws://xxxxxx'); player2 = new websocket('ws://xxxxxx'); player3 = new websocket('ws://xxxxxx'); }); it('player1 send message1 player3 should receive' (done) => { //block1 let message1 = { id: 'message1', data: 'message1' }; player1.send(json.stringify(message1)); player3.once('message', (message) => { //block2 expect(message).equal(json.stringify(message1)), done(); }); }); it('player2 send message2 player3 should receive' (done) => { //block3 let message2 = { id: 'message2', data: 'message2' }; ...

c# - Format number to string with custom group and decimal separator without changing precision -

i format numbers strings in c# custom group/thousands separator , decimal separator. group , decimal separator can change based on user input use numberformatinfo object instead of hardcoded formatting string. code below gets proper separators, changes precision of number 2 decimal places, whereas want keep full precision of number , show decimal places when needed (so integer values dont have decimal places). how can achieve this? guessing need change "n" parameter, change what? double n1 = 1234; double n2 = 1234.5; double n3 = 1234567.89; double n4 = 1234.567; var nfi = new numberformatinfo(); nfi.numberdecimalseparator = ","; nfi.numbergroupseparator = " "; string s1 = n1.tostring("n", nfi); //want "1 234" "1 234,00" string s2 = n2.tostring("n", nfi); //want "1 234,5" "1 234,50" string s3 = n3.tostring("n", nfi); //correct output of "1 234 567,89" string s4 = n4.t...

javascript - Programmatically focus on a form element after mounting -

i have form component (formcomponent) need programmatically focus on when sibling button component clicked. used able call this.refs.myform.focus() (given myform formcomponent) written call .focus() on first form field inside. however, i've refactored , abstracted behavior higher order component wraps formcomponent now, .focus() method on formcomponent intercepted wrapper component. using react 0.14.x (so don't need reactdom.finddomnode() dom components): // formcomponent class formcomponentbase extends react.component { focus() { this.refs.firstfield.focus(); } render() { return ( <form ...> <input ref="firstfield" /> </form> ); } } // wraps formcomponent in wrapper component abstracted/reusable functionality const formcomponent = hocwrapper(formcomponent); // othercomponent class othercomponent extends react.component { handleclick(ev) { // ...

data structures - Asterisk:- How to achieve Autodialling in Asterisk box in context with java -

i have web app, connects user asterisk box via sip , allow user call mobile or landlines number, want make automatic, in current scenario user have manually click on html button called dial dial number, want achieve "as user logged in, asterisk automatically call 3 nos campaign list allocated user , gives user call when client connected it. means caller given call when receiver receives it. any configuration or java code help, algorithm also, know english poor so, sorry mistakes, hope people understand trying achieve above para. i higly recomend use dialler code. becuase there more issues never thought about. http://www.vicidial.org or other. if still think qualified enought write own code, can read page: http://www.voip-info.org/wiki/view/asterisk+auto-dial+out