Posts by MagShania • 353 points
15 posts
-
0
votes0
answers54
viewsQ: I need to inform a user and show if this user exists or not using Shell Script with CGI and Apache2
#!/bin/bash echo "content-type: text/html" echo " <html> <head> <meta charset='utf-8' /> <title> Shell Script com CGI </title> </head> <body> <h1>…
shell-scriptasked MagShania 353 -
0
votes1
answer161
viewsQ: Import txt to postgresql
I created the following txt file: 'Granada', current_timestamp 'Grecia', current_timestamp 'Guatemala', current_timestamp 'Guiana', current_timestamp 'Guine', current_timestamp 'Guine Esquatorial',…
postgresqlasked MagShania 353 -
-1
votes2
answers1693
viewsQ: Make PHP show sum and multiplication
<?php class Calculadora { # Definindo função soma public function somar($num1, $num2){ $resultado=$num1+$num2; return $resultado; } # Definindo função multiplica function multiplicar($num1,…
-
1
votes3
answers637
viewsQ: Make PHP print the result of the Factorial class
<?php class Fatorial { function calcular(){ $fat = $_GET['fat']; $resultado = 1; for($i = $fat; $i >= 1; $i--){ $resultado *= $fat; $fat--; return $resultado; } } } # Instancia a classe…
-
2
votes1
answer558
viewsQ: Search file and display content
I need to get a arquivo.txt, print it on screen and enter the total lines, but would like to "search" the file in any system directory <?php $arquivo = fopen('arquivo.txt', 'r'); while (!feof…
-
0
votes1
answer219
viewsQ: I would like to understand how to configure ports (port, ddr, pin) using avr atmega328p Assembler
Example that was testing, configure output ports and input ports, to be able to perform a sum, but are not working: ldi r21, 0x0a ldi r22, 0x0b out PINB, r16 out DDRB, r16 out PORTB, r17 add r21,…
-
5
votes2
answers33940
viewsQ: How to hide sidebar and vertical bar with CSS
I would like to hide these two bars (Vertical and Horizontal), I have configured my . css file with the settings below, but they are not working: @charset "UTF-8"; section#conteudo{ width: 1000px;…
-
3
votes1
answer46
viewsQ: Error Parameter 5
When I try to change the already performed record, issues the No value specified for parameter 5. The code: private void alterar() { String sql = "UPDATE tbusuarios SET usuario = ?, telefone = ?,…
-
0
votes1
answer318
viewsQ: Doubts Assembly mips
Could someone explain to me how to use And, Andi, Or, Ori, Nor in Assembly mips? Because I would like to do something like this: se (num1 > 0) e (num2 > 0) entao se (num1 <= 10) e (num2…
-
0
votes1
answer3451
viewsQ: How can I compare values in this calculator algorithm
The objective of this algorithm is to be a small calculation game, where it compares the result of the operation informed by the user with the correct value of the same and so say whether or not the…
-
6
votes1
answer1312
viewsQ: Doubt in substituting string Assembly (MIPS)
I have to make a code in Assembly mips requesting a sentence and if the sentence contains the character - is replaced by the character *. So far I’ve only managed to reach that code: .data buffer:…
-
1
votes1
answer332
viewsQ: Nullpointerexception when removing stack element
I am trying to implement a stack structure in Java, but when I try to remove an element I get the following error: > Exception in thread "main" java.lang.NullPointerException at…
-
0
votes1
answer1929
viewsQ: Implementation of a Linkedlist
I’m having trouble implementing a LinkedList for the discipline of Data Structure. The code is giving this error: Exception in thread "main" java.lang.NullPointerException, and I don’t really…
-
1
votes1
answer1673
viewsQ: Scanner.nextLine does not pick up information after Scanner.nextInt
I’m having trouble with this code, I’m starting in programming, this is just an activity for practice. I do not understand why when executing the code the field 'Campus' does not allow the entry of…
-
0
votes1
answer575
views