Posts

java - jsp not working on linux ec2 -

i have set amazon linux ec2. new it, want set up. have domain pointed, elastic ip, php/apache/mysql. wanting run java on instance well, assume possible. php stuff works, when hit .jsp page, looks simple html. i log instance through console, , these: [ec2-user@ip-* ~]$ java -version java version "1.7.0_25" openjdk runtime environment (amzn-2.3.10.3.29.amzn1-x86_64) openjdk 64-bit server vm (build 23.7-b01, mixed mode)` echo $path /usr/local/bin:/bin:/user/bin:/usr/local/sbin:/usr/sbin:/sbin:opt/aws/bin:/home/ec2-user/bin:/usr/lib/jvm/java/bin and when hit my_domain:8080 tomcat page. so know java installed, , tomcat running. else missing? my .jsp file looks this: <%@page contenttype="text/html" pageencoding="utf-8"%> <!doctype html> <html> <head> ...

time - Batch: Trying to get a command to execute at a specific amount of seconds -

this works hours, running in loop hits 13 hours executes. @echo off :time echo %time% /f "tokens=1*delims=0" %%a in ("$0%time:~0,2%") set /a hh=%%b if %hh% equ 13 goto success goto time :success echo success pause goto time but if run seconds in loop execute @ 13 seconds keeps running in loop , doesn't execute command. @echo off :time echo %time% /f "tokens=1*delims=0" %%a in ("$0%time:~5,2%") set /a ss=%%b if %ss% equ 13 goto success goto time :success echo success pause goto time this doesn't work either for /f "tokens=1*delims=0" %%a in ("$0%time:~6,2%") set /a ss=%%b i need execute @ specified amount of seconds. instead of instance executing @ 13:00:00.00. can execute @ 13:00:13.00 or that. needs 6 not 5 offset. %time:~6,2% it not have complex. works, unless provide more details trying accomplish cannot provide best help. :time echo %time% if %time:~6,2% equ 13 goto success goto t...

tokbox - Blinding other audio inputs with opentok stream -

i'm trying create audio chat using opentok webrtc. there 1 publisher. publisher able upload music file, start speaking, , have music , voice published opentok session. possible opentok? currently, there no way blend music , microphone output , publish using opentok, since opentok receives input publishing mic or webcam. 1 thing play uploaded file on site audio file, , able hear file along microphone input opentok's stream. to publish audio using opentok, can set publishvideo false when initialize publisher. documentation here .

unit testing - How to write jasmine test to check update -

i'm trying write jasmine test check view changing time or not it 'ticks time', -> @time = parseint($('#timer h1').text()) settimeout (-> @after = parseint($('#timer h1').text()) expect(@time).tobelessthan(@after) ), 1000 the problem when time of settimeout jasmine finished job, no html code on page related test @ moment. jasmine has solutions kind of task: it 'ticks time', -> runs -> @time = parseint($('#timer h1').text()) waits(1000) runs -> @after = parseint($('#timer h1').text()) expect(@time).tobegreaterthan(@after)

javascript - Grammar rules for comments -

i working reflect.js (a nice javascript parser) zach carter on github; trying modify behavior of parser handle comments normal tokens should parsed else. default behavior of reflect.js keep track of comments (the lexer grabs them tokens) , append list of them end of ast (abstract syntax tree) creates. however, these comments included in-place in ast. believe change involve adding grammar rules grammar.y file here . there no rules comments -- if understanding correct, why ignored main parsing code. how write rules include comments in ast? the naive version modifies each rule of original grammer: lhs = rhs1 rhs2 ... rhsn ; to be: lhs = rhs1 comments rhs2 comments ... comments rhsn ; while works in abstract, screw parser generator if ll or lalr based, because can't see far enough ahead next token decide do. you'd have switch more powerful parser generator such glr. a smarter version replaces (only and) every terminal t nonterminal: ...

javascript - Extjs Combo return array and not only integer -

i use combobox extjs. when submit form return of combobox array. need string... the return : {"data":{"idapourmutuelle":"","idorganisme":["","1"],"idpersonne":"3","mutuelle":""}} and combobox: xtype: 'combobox', anchor: '100%', fieldlabel: 'nom', name: 'idorganisme', allowblank: false, editable: false, displayfield: 'mutuelle', hiddenname: 'idorganisme', store: 'mutuelle', valuefield: 'idorganisme'

jvm - How to measure stack memory in Java? -

there single core class used in transaction engine. did test high number of concurrent transaction resulted in deadly stack-overflow exception. know if there way measure how stack memory available in order avoid exception. i looking dynamic way of doing setting hard limit on number of concurrent transactions not ideal. give java visualvm try. it's oracle, , included jdk. can find here: ${jdk}/bin/jvisualvm.exe almost want know java application's performance can observed through this. here's quick tutorial if need it, although doesn't need of explanation.