Posts by Adriano Martins • 454 points
11 posts
-
1
votes1
answer75
viewsA: My C code contains some errors (Data Structure List)
Your code has several mistakes, let’s go in pieces: 1 - You forgot to include the <stdlib.h> in your code (for malloc function); 2 - Your struct should be like this: typedef struct Music {…
-
0
votes4
answers95
viewsA: Optimization in sql
No, because there are two different lines being searched. The best solution here would be to redo the tables, avoiding the comparison of strings of attributes (which even with indexed strings, would…
-
0
votes1
answer18
viewsA: What is the error of this code? the animation should only work once
The easiest way to solve this problem is by using a global variable, indicating whether you have already performed the animation or not. In this example: var animado = false; $(document).ready(…
-
6
votes4
answers158
viewsA: Javascript pass by value
Just use Object.assign(alvo, obj), so the values of obj properties will be made a simple copy (Shallow copy). Example: var A={valor:0, bola: 1} var B={valor:0, bola: 2} A = Object.assign({}, B};…
javascriptanswered Adriano Martins 454 -
3
votes2
answers868
viewsA: What is Port Knocking?
What is Port Knocking? Port Knocking is known as the act of visiting / knocking / sending data on specific doors, thus allowing another door to be opened after sequence of correct doors have been…
-
0
votes2
answers727
viewsA: Calculate inputs with Jquery
The easiest way is to modify the code to directly access each field, then do whatever you want with them. Then I’d be: <!DOCTYPE html> <html> <head> </head> <body>…
jqueryanswered Adriano Martins 454 -
1
votes2
answers1318
viewsA: Make one method wait for the end of the other
The easiest way here is to use Autoresetevent that basically "warns" that something happened. public void ExecutaTasksAsync() { SomeClass someObj = new SomeClass() AutoResetEvent waitHandle = new…
-
1
votes1
answer1006
viewsA: Chat Python - Errno 9 - Bad File Descriptor
The problem is quite simple. Once a client connects, you use the following method/function: def adicionar_cliente(conn, _id): while 1: message2 = conn.recv(1024) if message2 == "": continue if…
-
1
votes1
answer74
viewsA: Do the crawlers/bots/web-Spiders of search engines copy and access the href of a link, or "click" on <a></a> to be redirected?
I think the most important thing here is to remember that most search services try to value usability/navigability/user experience - not as the site itself was made. That said, everything varies…
-
1
votes1
answer1156
viewsA: Difference between Pipes, Fork and Threads
Fork Effectively, you copy the entire memory stack of the program, creating two distinct processes. The code is executed on the next line by executing the command that created Fork. Usually, Forks…
-
4
votes2
answers9582
viewsQ: Position of blocks in Bootstrap
Hello, I’m trying to make a template in bootstrap (due to its responsiveness) but I’m stuck in a situation that I can’t find output without using javascript (which would be bad in my case). I need…