Posts by Wtrmute • 2,359 points
84 posts
- 
		1 votes1 answer1043 viewsA: Segmentation failure (recorded nucleus image)You are forgetting to initialize a lot of local variables as well as check the sizes of the entries you are receiving, and this can generate segmentation failure depending on what input you write to… 
- 
		5 votes3 answers1013 viewsA: What is blockchain and how does it work?Blockchain, As the English name says, it’s a chain of blocks. It serves as a distributed database whose validity can be verified by anyone so that the security and transparency of the system are… 
- 
		0 votes1 answer382 viewsA: Open, read and write csvThe function int feof(FILE *), stated in stdio.h, returns 0 if the file still has bytes to read, and 1 if you have found the end of the file. With this, you can execute a loop and transcribe the… 
- 
		0 votes2 answers560 views
- 
		2 votes3 answers406 viewsA: Disable input sequence with jQueryTaking advantage of the @Leandrosilva’s cue above, you can simplify the code by keeping the name of the class of fields you have to disable in the checkbox: $(document).ready(function() {… 
- 
		0 votes1 answer251 views
- 
		7 votes1 answer1721 viewsA: How to find private bitcoin address key?You do not. An asymmetric key algorithm is specially developed for that private key nay can be found from the public key. If you could guess the private key of a wallet, it would be the same as you… 
- 
		3 votes2 answers574 viewsA: How to consume JSON files in PHP in different ways?JSON is a notation-based form of object serialization used to describe object literals in javascript. Therefore, the notation should be flexible enough to reproduce any* type of object that can be… 
- 
		0 votes4 answers488 viewsA: How to treat this NullreferenceexceptionOk, the Nullreferenceexception is raised in the following line: pessoaJuridica.InscricaoEstadual = viewmodel.PessoaJuridica.InscricaoEstadual; This means that the indirect operator . is being called… 
- 
		5 votes3 answers1323 viewsA: Why do pointers have a fixed size independent of the pointed type?Because a pointer keeps in itself a memory address, and these all have the same size regardless of the type of data with which to interpret the object at that address. On a 32-bit platform, memory… 
- 
		0 votes1 answer138 viewsA: Jquery returns "0" in divYou seem to be wearing this jQuery Form Plugin. If that’s the case, I’m surprised that you use option-based both the property target, that "... identifies the element to be updated with the server… 
- 
		1 votes4 answers1252 viewsA: What are ASAX extensions for?The archive Global.asax is a file that contains the application level events (hence the extension, Asp.net Application). Its syntax is not particularly different from an ASPX file, except that it… 
- 
		3 votes1 answer26 viewsA: How do I calculate to convert a Codepoint to UTF-16?The 16-bit (UTF-16) Unicode transformation format is defined in section 2.5 of the Unicode standard, as well as in the RFC 2781. It works like this: Be the Codepoint U the value you want to encode.… 
- 
		2 votes1 answer884 viewsA: How to fill out form from the combobox, with database information?When the user selects an element from the combobox, it is an activity that occurs on the client side (i.e., from the browser), and the code that runs on the server, PHP, does not and cannot be aware… 
- 
		4 votes2 answers91 viewsA: How to make the code not catch the ASCII Code from a variable?ASCII has a feature that the digits are in order, starting with the '0' and ending in the '9'. Thus, the ASCII value of the '0' is 0x30, the '1' is 0x31, etc., up to the '9' being 0x39. Therefore,… 
- 
		4 votes1 answer41 viewsA: Doubt regarding the passage of parametersNo, the code is wrong. Probably the inductive step should be return foo1t(n-1, n*resp); Functions in C can be declared "no parameters", and can have a variable amount of parameters (functions… 
- 
		3 votes2 answers512 viewsA: Error creating child - Process scheduling using ForkThe logic you are using is wrong; to facilitate, we will break the code into multiple functions using the informal description you made: #include <iostream> #include <unistd.h> void… 
- 
		3 votes1 answer54 viewsA: How to maintain the rotation of images, even with mouse Hover?The page uses a component called "Revolution Responsive jQuery Slider". According to the documentation, there is a boot parameter called onHoverStop responsible for stopping the timer (which changes… 
- 
		2 votes1 answer187 viewsA: How to draw 2 images on canvas with different fpswindow.requestAnimationFrame() actually only invokes the function passed per parameter every 16.67 milliseconds (that is, 60 times per second). The responsibility of the function passed as parameter… 
- 
		1 votes4 answers7433 viewsA: Reverse vector position/valueThere’s absolutely no reason for you to use two for to scan a one-dimensional vector... #include <stdio.h> #include <stdlib.h> #define TAM_VET 5 int main(void) { int cc[TAM_VET],… 
- 
		4 votes1 answer81 viewsA: What’s going on here on this C show?Whenever you create a local variable to a function, it is allocated to a memory area called "the stack". It contains the local variables and some more information that allows the computer to know,… 
- 
		3 votes3 answers138 viewsA: Is it possible to use for loop to reduce C code?Although ordinarily I follow Lacobus' response, this is a good place to remember that the compiler tcc has a dynamic link library that allows dynamic code compilation: #include "libtcc.h" void… 
- 
		29 votes2 answers1602 viewsA: What is Inter Process Communication (IPC)?Multiprocessor operating systems are operating systems that are capable of executing more than one process at a time. Examples are UNIX systems, Windows version 95 onwards, and macos Classic (Macos… 
- 
		1 votes1 answer1074 viewsA: How to replace a middle character of a string and swap for two characters?There is no escape: you will have to allocate another place to store your result. By doing this you can then replace your string and have enough space to store it all: char * substituir(char *… 
- 
		2 votes1 answer361 viewsA: Import multiple libs into a single include in cIt doesn’t exist; Preprocessor C is a very primitive macro language, and little integrated with the rest of the language (like Dennis Ritchie himself states). What you can do is create a separate… 
- 
		7 votes1 answer391 viewsA: Site view internet speedThe account is simple, and any language serves to implement it on the server (on the browser side, it obviously has to be on javascript). Essentially you have to have one or several files of known… 
- 
		0 votes2 answers4985 viewsA: How to read string with space in a repeat structure?Your problem when it comes to using the scansets (the name of those structures "%[^\n]") is that, as you imagine, in time for him to pick up the first item he reads until the first car return, but… 
- 
		0 votes1 answer1079 viewsA: Compare integer and pointergetc() returns a int, not a char *. In this int is the ASCII value of the next character in the file. And, really, when you say while (ch != EOF), you are comparing the value of that character with… 
- 
		2 votes3 answers8342 viewsA: SELECT in a table using NOT EXISTS SQL (SERVER 2012)Yeah, you’re trying to select lines in tb1 that don’t exist in tb2, but that’s not what you wrote. What you wrote was to select lines from tb1 when there is no line in tb2 (NOT EXISTS (SELECT * FROM… 
- 
		4 votes4 answers224 viewsA: Code Optimization / Image ProcessingOkay, given the code snippet shown and the characteristics of the algorithm I was able to apprehend, there are some observations that you can make: First, if you want to avoid the ifs nested, you… 
- 
		2 votes3 answers281 viewsA: Problem with pointer and recursive functionThe problem is that you do the search(&(*root)->esq, mats); and the search(&(*root)->dir, mats); and then throw away the recursion return value, so unless you happen to look for the… 
- 
		4 votes3 answers899 viewsA: Angularjs Date SubtractionAngularjs stores the values of data type controls using the date object Javascript. To subtract two dates, you can use the method .getTime() which returns the number of milliseconds passed between… 
- 
		0 votes2 answers199 viewsA: code implementationThe most important thing when creating a program in parts, each part by a different person, as you are doing, is to establish between you what will be the interface between the code of the two: that… 
- 
		1 votes3 answers3223 viewsA: How to use the "fread" function in c to read a txt file string and store that string in an array?You are copying 5 bytes of your file to a buffer (vetor) and then calling strlen() in it, which is a function that counts at which position of the vector it receives is the first byte '\0'. But you… 
- 
		1 votes3 answers977 viewsA: How to know the size of an object in memory?If your object is Serializable, you can use a java.io.ObjectOutputStream associated with a java.io.ByteArrayOutputStream to measure the size of your object when serialized: class Tamanho { public… 
- 
		2 votes1 answer374 viewsA: How to take the least significant bit of a character and hide in an image file?You’re caught up in the concept of steganography. Let me try to explain a little here, and with that you should understand enough to start an implementation: First, an image can be understood as a… 
- 
		2 votes3 answers235 viewsA: How to check by javascript if you have entered a new li tag through setInterval?There’s a little library called insertionQuery that detects the creation of nodes using a macumba of CSS animation, so it does not generate weight. The interface is not jQuery, although it is… 
- 
		1 votes1 answer2314 viewsA: Create a recursive function in C that returns the largest and smallest value of a vectorI don’t know from which version of the C pattern one can allocate an array on the stack, as you did, using a variable as size index; or it’s C99 or C11. But if you want more C89-compatible code… 
- 
		6 votes3 answers199 viewsA: How to make a look-Behind using quantifiers such as the " d+"?Instead of using lookbehind, you are best served using a capture group to get a reference to the sequence test: /^\d+(test)/ Then you access group 1 to get the string test. All right it’s kind of… 
- 
		4 votes1 answer45 viewsA: Seg Fault Core DumpedI think you got caught up: there on line 15, you say: if (lA != cB) { printf("\nImpossivel fazer a operação!!!"); return 0; } But to multiply matrices, the amount of columns of the first matrix has… 
- 
		6 votes1 answer53928 viewsA: How to resolve Object Reference Not Set To An Instance Of An ObjectThis exception occurs when you call a method (or, more generally, reference) to an object null. In the case of the line where the error occurs, one of the objects (tabela, dataGridView1,… 
- 
		1 votes1 answer12103 viewsA: How to make a transposed matrix of user-chosen dimensions in c?The problem is that you are transposing the matrix in-place, Then the order of operations makes a difference. When you transpose the first half of the matrix, you no longer have the first half of… 
- 
		0 votes1 answer147 viewsA: How to divide 2 numbers represented by a circular list into C?I don’t understand why a list should be circulated, but come on. As you passed pseudocode in the question, I will answer with pseudocode too; if later have difficulty in converting pseudocode into… 
- 
		1 votes1 answer115 viewsA: Function count left treeint qtd_niveis_esq(tipo_arvore * raiz) { return 1 + qtd_niveis(raiz->esq); } The problem is you just want to ignore the right son from the root node. From the left child of the root, you want to… 
- 
		2 votes1 answer116 viewsA: How to use Lock Functions (Lock Routines) from Openmp?The difference between the two specified functions, omp_init_lock_with_hint() and omp_init_nest_lock_with_hint() is that it initializes a lock simple and this initializes a lock nestled. The… 
- 
		4 votes3 answers11315 views
- 
		0 votes1 answer393 viewsA: Double Chained List Removal Doubt (C/ Ordered Insertion)When we analyze what happens if we pass a list with a single node, the problem becomes obvious: Just a reminder: when the list has only one node, **inicio == **fim and (*inicio)->prox ==… 
- 
		0 votes2 answers520 viewsA: Give a select to return the exclusive valuesAlternatively, by using clauses WITH (some find it easier to reason like this): with diferentes as ( select chave from teste where status = 'DIFERENTE' ), diferenciados as ( select chave from teste… 
- 
		2 votes1 answer129 viewsA: How to reuse a function correctly in C?If the divisibility functions need return true and false, so you really can’t return any information that allows you to verify the number by 9. But there’s a trick: int divisibilidade9(int num) { //… 
- 
		2 votes2 answers2122 viewsA: Lock letters and special charactersThe truth is, although practice has shown that the function printf() is quite useful for multiple purposes, unfortunately the function scanf() it’s not that useful. Particularly, it doesn’t handle…