Posts by EliandroRibeiro • 191 points
5 posts
-
0
votes1
answer31
viewsA: I am unable to register the student in the list laluno, when I show the list it is empty
The list is empty because after choosing an option and filling in with the data, the program is terminated. You missed placing your logic inside a while True: to ensure that the program will only be…
python-3.xanswered EliandroRibeiro 191 -
0
votes2
answers150
viewsA: Add Objects within a Javascript Array
Have a variable to control if you are doing another data.alunos.push() for the same student. Declare this variable before of for. Example: var alu_id_anterior = null Once you’ve processed the…
-
0
votes2
answers1378
viewsA: Read java strings within a while or do-while repetition structure
Instead of Scanner ler = new Scanner (System.in); // ... char op = (char) ler.nextByte(); you could use BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); // ... String s =…
-
1
votes1
answer361
viewsA: Java - read XML from a URL
You can simply pass your URL to Saxbuilder. Thus: d = sb.build(url);
-
2
votes1
answer147
viewsA: Javascript error opening page - Uncaught Syntaxerror
As you are using XHTML, you need to encapsulate javascript code with CDATA, as per the excerpt below: <script type="text/javascript"> // <![CDATA[ ... // ]]> </script> However, it…