Posts by eightShirt • 649 points
14 posts
-
0
votes1
answer488
viewsQ: jQuery - How to remove row from dynamically created table?
I am starting my studies in jQuery and I have the following question: I have a table created in HTML. This table contains only one row with th's. Records are entered by jQuery. Through user…
jqueryasked eightShirt 649 -
0
votes1
answer53
viewsA: Shell: Draw file whose name contains blank space
The parameter -e was incorrectly used. It indicates that each argument passed will be treated as an input. This way, relatorio is an argument and mensal.pdf is another. The command that solves the…
shell-scriptanswered eightShirt 649 -
0
votes1
answer53
viewsQ: Shell: Draw file whose name contains blank space
Using shell script, I am creating a file script.sh that automates some tasks for me. In it I need to draw a file from the current directory to perform some tasks. I’m drawing the file with the…
shell-scriptasked eightShirt 649 -
1
votes3
answers73
viewsA: Field inside a variable dynamically?
I suppose you need a code like that: function foobar() { this.img1 = false; this.img2 = true; var img = this['img'.concat(1)]; if (img == false) { alert("Falso!"); } else { alert(img); } } new…
-
0
votes1
answer977
viewsA: Id returned 1 Exit status
While executing your code the error that appeared was /tmp/ccXQBEq3: in function `ler_capicua': file. c:(.text+0x25c): indefinite reference to `print' collect2: error: Ld returned 1 Exit status I…
canswered eightShirt 649 -
1
votes1
answer71
viewsA: Segmentation Fault (Dumped Core) Print Numbers
Your code contained some errors. An example is the first if. I believe you wanted to make a comparison (==), and not an assignment (=). Another mistake was the lack of & at the time of reading…
canswered eightShirt 649 -
4
votes3
answers208
viewsA: Repetition of elements
If I understand correctly, you want the number that repeats in the vector. Example: {1, 2, 3, 3, 3} must return that 1 number repeats (the three). The vector {1, 3, 3, 2, 2, 1, 4, 4, 5} must return…
canswered eightShirt 649 -
2
votes1
answer2550
viewsQ: Is it possible to change the color of the marker marker in Google Maps?
I am using the Google Maps API (JS) marker without problems in my application. The code below works perfectly: var mapa = new google.maps.Map(document.getElementById("mapa"), { center: {lat:…
google-mapsasked eightShirt 649 -
5
votes2
answers174
viewsA: Doubt in recursive function
Assuming you wanted the parameter --1: This generates a build error: fat2.c:10:27: error: lvalue required as decrement operand return n * fatqua(--1) ; Just to be clear, lvalue is the same as…
-
1
votes1
answer763
viewsQ: Filewriter and Fileoutputstream: when should I work with each of them?
Often we find codes that could be solved with the use of objects of the type FileWriter or FileOutputStream. For example, a simple code that writes "Teste" in the archive /tmp/arquivo: With…
-
2
votes1
answer259
viewsA: What algorithm is that?
As far as I can tell, this algorithm is Quick Sort. My implementation in Haskell is quite similar to yours, although the statement did not make it clear in what language you are working. An example…
-
2
votes1
answer670
viewsQ: Printing extended ASCII in C
Look at this simple code written in C: unsigned char *palavra = "fantástica"; int tamanho = strlen(palavra); int i; for (i = 0; i < tamanho; i++) printf("%i ", palavra[i]); printf("\n"); Output…
-
5
votes1
answer709
viewsQ: Why is strcpy() insecure?
I’m reading about secure programming, and I read that function strcpy(), of the C language, is an example of insecure. I also read that there is a secure version of this function, which would be the…
-
4
votes1
answer368
viewsQ: Overflow by multiplying two integers in Biginteger
I am starting studies in Java and have a task: generate two random integers and store their multiplication. For this, I tried to use long and BigInteger. But the result of this multiplication is…