Posts

Javascript loop through array of audio files, playing one after another -

i have array of audio urls want loop through , play 1 after other, little bit of space in-between. i'm using angular2 , typescript. currently happening plays first track, switches , plays second track, not switch next track continues play second one. never stops playing second track , play each once , stop. my array of audio urls stored in this.listenservice.messagesrcs so ["http://localhost:8000/5827a34e88554c09a7c0d182", "http://localhost:8000/5827a35088554c09a7c0d183", "http://localhost:8000/5827a35288554c09a7c0d184"] and here attempt @ looping through them loopmessages() { if (this.listenservice.card && this.listenservice.messagesrcs) { console.log(this.listenservice.messagesrcs); let message = new audio(); message.setattribute('src', this.listenservice.messagesrcs[0]); message.load(); settimeout(function() { message.play(); }, 5000); if (this.listenservice.messagesrc...

ubuntu - What's the /path/to means -

i beginner in caffe. in tutorials see "/path/to". i'm confuse that. what's means. specific path in computer? here part of a tutorial . prepare data images: put images in folder (i'll call here /path/to/jpegs/). labels: create text file (e.g., /path/to/labels/train.txt) line per input image . it's telling you should specify path, , giving example of path format. /path/to/labels/train.txt the tutorial or instructions expect replace own path, can want as long it's in path format /hanbing/data/train.txt /documents/cafe/example_app/train.txt

javascript - Passing data and submit functions between controllers -

basically when user submits calculation done data , stored in variable. had working when in 1 controller, need split between pages. want service. see, i'm confused , know i'm doing wrong. not sure going astray or maybe should better handle on misunderstanding - appreciated. basic pointer nice: .factory('meals', function() { var data = { baseprice: 0, taxrate: 0, tippercentage: 0, mealcount: 0, tiptotal: 0, averagetip: 0, subtotal: 0, tip: 0, tiptotal: 0, total:0 } function set(data) { saveddata = data; } function get(){ return saveddata; } return { set: set, get: } }) .controller('homectrl', [function(meals) { }]) .controller('mealctrl', [function(meals) { var ws = this; meals.set(); ws.data = meals.get(); ws.submit = function(){ ws.tax_rate= ws.taxrate/100; ws.tip_rate= ws....

c# - Cannot convert from 'System.IO.FileStream' to 'int' when reading text file into a List -

this question has answer here: how read text file , add data int array in c#? 4 answers all want have program read .txt file, take whatever in file, , input list. tell me can't convert (no matter if set variable var, string, int, or whatever) tried using int.tryparse, convert.toint32(), etc. while convert.toint32 shuts up, when run program crashes. static void main(string[] args) { string listpath = @"k:\listdata\listdata.txt"; int listdatasum = 0; int listdatamax = 0; int listdatamin = 0; string userinput = null; var numerallistdata = system.io.file.openread(listpath); var listdata = new list<int>(numerallistdata); listdatasum = listdata.sum(); listdatamax = listdata.max(); listdatamin = listdata.min(); console.writeline( "please input...

python - tensorflow works in ipython command line but not in notebook -

Image
tensorflow works me in both python , ipython in command line, when loading tensorflow using import tensorflow , gives following errors: importerror: /usr/lib64/libstdc++.so.6: version `glibcxx_3.4.19' not found (required /usr/local/packages/python/2.7.10-anaconda/lib/python2.7/site-packages/tensorflow/python/_pywrap_tensorflow.so) error importing tensorflow. unless using bazel, should not try import tensorflow source directory; please exit tensorflow source tree, , relaunch python interpreter there. here screenshot shows tensorflow works in command line here screenshot shows doesn't work in notebook interface so why work in command line not in notebook interface? i've compared environment variable using os.environ , looks same in command line , in notebook. system information: linux qb2 2.6.32-358.23.2.el6.x86_64 #1 smp sat sep 14 05:32:37 edt 2013 x86_64 x86_64 x86_64 gnu/linux tensorflow version: 0.11.0rc0 i don't think relevant, ipython ...

sublimetext3 - Configuring Emmet to Work on EJS files (Sublime Text 3) -

i've begun writing nodejs web app .ejs files templating views. i'm trying emmet work on .ejs extensions .html extensions in sublime text 3. have ideas how this? i assumed installed emmet , configured key binding emmet-sublime https://packagecontrol.io/packages/emmet . in other make emmet work .ejs install ejs package: https://packagecontrol.io/packages/ejs . then close .ejs files reopen them. can #root , hit tab in .ejs files.

java - Cucumber test for Spring Boot can run in "mvn test" but not in "mvn verify" -

summary: i running tests using cucumber against spring boot application. cucumber test running fine when execute them using "mvn test" fails when execute them in "mvn verify" lifecycle. details: my cucumber runner class looks this: @runwith(cucumber.class) @cucumberoptions( features = {"src/test/resources/features/creditcardsummary.feature"}, glue = {"th.co.scb.fasteasy.step"}, plugin = { "pretty", "json:target/cucumber-json-report.json" } ) public class creditcardrunnertest { } when execute "mvn test", can see in logs cucumber runner instantiated before maven spring boot plugin instantiates spring boot instance: ------------------------------------------------------- t e s t s ------------------------------------------------------- running creditcardrunnertest @creditcards feature: post /creditcards/summary user, basic infor...