Posts

jstl object not getting paramaters from jsp -

i have bean linked correctly in jsp page: <jsp:usebean id = "productmanager" scope = "session" class = "smithd81.inventorymanager"> <jsp:getproperty name = "productmanager" property = "productlist" /> </jsp:usebean> i can verify works, because following line allows me length: products in list = <%= productmanager.getproductlist().size() %> the end goal here iterate on objects in list display values, why coming blank?! any potential welcome, however, of mention package name has capital letter, i've attempted refactor , change twice now, , when breaks whole project. in following block, first line shows how many items in list. next lines, however, nothing. <p>it ${fn:length(productmanager.productlist)}</p> <c:foreach var="p" items="${productmanager.productlist}"> <div> <form action="inventory" method="post"...

ios - Programmatically create UIToolbar with default height -

there number of questions regarding height of uitoolbar , don't see 1 height obtained dynamically. there way create uitoolbar correct default height? create toolbar 0 height, call sizetofit . toolbar have default height. uitoolbar *toolbar = [[uitoolbar alloc] initwithframe:cgrectmake(0, 0, width, 0)]; [toolbar sizetofit];

java - Zend Studio 10 crashes with Android SDK and ADT -

i downloaded new zend studio 10 trial version , under it's welcome page included android developer tools. after has made update, tried create sample android project upon received error android sdk missing. went android developer website , downloaded latest android sdk (for linux (im running ubuntu 12)). told zend studio folder was, on received error adt outdated. entered repository ( https://dl-ssl.google.com/android/eclipse/ ) in install new software , performed android adt update version 22. after proceed link sdk zendstudio 10. marvelous , got access android manager (if i'm correct) download different api versions etc. performed update tools well.. after update made zend studio restart (i still couldnt make sample project). upon loading of ide, crashes in 5 seconds. so, looked @ errorlog (zend's) , hint got was: a fatal error has been detected java runtime environment: sigsegv (0xb) @ pc=0xaeba3e08, pid=32629, tid=2867575616 jre version: 6.0_27-b27 java vm: ope...

compiler construction - C - program throwing segmentation fault -

i trying write compiler program in c (ubuntu, gcc) using jack crenshaw's tutorial http://compilers.iecc.com/crenshaw/ . however, written in pascal, , relatively new c, tried write 1 best could. i need help. segmentation fault occuring. see valgrind's output: ==3525== invalid read of size 1 ==3525== @ 0x80484c0: getchar (in /home/spandan/codes/compiler_1) ==3525== 0x8048aad: init (in /home/spandan/codes/compiler_1) ==3525== 0x8048acd: main (in /home/spandan/codes/compiler_1) ==3525== address 0x0 not stack'd, malloc'd or (recently) free'd ==3525== ==3525== ==3525== process terminating default action of signal 11 (sigsegv) ==3525== access not within mapped region @ address 0x0 ==3525== @ 0x80484c0: getchar (in /home/spandan/codes/compiler_1) ==3525== 0x8048aad: init (in /home/spandan/codes/compiler_1) ==3525== 0x8048acd: main (in /home/spandan/codes/compiler_1) i post part of code here relevant valgrind's stack trace. rest can foun...

audio - Opening files in another computer c# -

i have program button, when clicked, executes sound located in download folder. question how execute sound on computer if path finding different. you need path file run it. if don't have path - have search it. pick base directory think file is. if don't know - whole drive. write recursive function search said folder recursively. test each file ever search condition is, i.e. file name, file hash, etc. for example: string searchforfile(string searchpath, func<string, bool> searchpredicate) { try { foreach (string filename in directory.enumeratefiles(searchpath)) { if (searchpredicate(filename)) { return filename; } } foreach (string dirname in directory.enumeratedirectories(searchpath)) { var childresult = searchforfile(dirname, searchpredicate); if (childresult != null) { return childresult; ...

java - why the setIsrunning(false) method ‘s caller is "main" Thread -

public class run { public static void main(string[] args) { try{ runthreas runthreas=new runthreas(); runthreas.start(); //thread.sleep(2000); runthreas.setisrunning(false); system.out.println("已经赋值为false"); }catch (exception e){ e.printstacktrace(); } } } class runthreas extends thread{ private boolean isrunning=true; public boolean isrunning(){ return isrunning; } public void setisrunning(boolean isrunning){ system.out.println(thread.currentthread().getname()+"set"); this.isrunning=isrunning; } @override public void run() { super.run(); system.out.println(thread.currentthread().getname()+"run"); system.out.println("进入run"); while(isrunning){ system.out.println("i running"); } system.out.println("线程被停止了"); } } the setisrunnning() method belongs runthread ,so think should called instanse of runthread , invoked ...

C++ | List iterator not incrementable -

i trying iterate through list , then, if object's plate number matches 1 given through parameters, , if toll (calculated in toll()) less or equal given cents, remove/erase object list. keep getting error list iterator cannot incremented , i'm clueless how fix it. void one_time_payment(string& plate_number, int cents) { // todo: rewrite function std::list<licensetrip>:: iterator it; (it = listlicense.begin(); != listlicense.end(); std::advance(it, 1)) { if (it->plate_number().compare(plate_number) == 0) { cout << "matching plate found" << endl; if (it->toll() <= cents) { cout << "can paid" << endl; = listlicense.erase(it); //error: list iterator cannot incremented } } } cout << "end of iterator" << endl; } this is, i'm guessing, not compile error rather assertion triggere...