Posts by Bruno Bermann • 1,267 points
49 posts
-
3
votes2
answers233
viewsA: How to know how many "black" pixels you have in a letter x, using an x font?
Icarus, I developed the following solution based on a Bitmap where a text is written in black pixels and soon after a scan is made on the same image counting the black and white pixels. Follows the…
c#answered Bruno Bermann 1,267 -
0
votes1
answer266
viewsA: SELECT of 2 FK in the same table
You should make two relationships with the same table, nicknamed them differently, this way: SELECT A.Id, V.Dsc_Vento As Dir_Vento, O.Dsc_Vento As Dir_Ondulacao FROM tabela_A A INNER JOIN…
-
1
votes1
answer244
viewsA: Build error -lpthread
You are using the Mingw32 compiler that uses the Windows API (which has no reference to Posix Thread, vulga pthread). To solve your build problem you must install Pthreads for Windows which will…
-
2
votes2
answers1642
viewsA: How do you convert an Enum guy into a list?
You can use the following syntax: Enum.GetValues(typeof(MeuEnumerador)).Cast<MeuEnumerador>(); And this will return a specialized Ienumerable interface to the type Meuenumerador. To convert…
-
4
votes4
answers13213
viewsA: Textbox accept numbers and commas
You should check the Keychar being received through the event in this way: private void textbox11_num(object sender, KeyPressEventArgs e) { if (!char.IsDigit(e.KeyChar) && e.KeyChar !=…
-
1
votes1
answer106
viewsA: Send multiple variables at once socket
Icarus, according to the answer given in this question here: Yes, it is possible. Just know the size in bytes of your content. So imagine that you sent a 32-bit integer and a string containing 10…
-
2
votes1
answer293
viewsA: What if I want to send and receive a "package"?
Icarus, To read data that are not strings you cannot use a Streamreader as in the example you put. It is possible to contain values also within the string, but this will depend on the implementation…
-
2
votes1
answer73
viewsA: Problem in C code running a function
gmorikawa this question really was hard to understand, but here goes: The concept of pointers is the same concept as the arrays in c, when the data is stored in the stack (stack) they are sequenced…
canswered Bruno Bermann 1,267 -
2
votes1
answer506
viewsA: Fill in Combobox without repetitions
Use a DISTINCT in his SELECT. In this way: SELECT DISTINCT NomeInv FROM tbFev; All completely identical lines will be joined by the expression "distinct".…
-
8
votes4
answers635
viewsA: Why can objects other than the same class access private fields from each other?
As you yourself mentioned guiwp, based on the English OS response in this link here: The private member of a class aims at code encapsulation. This serves both to maintain the organization and to…
-
2
votes1
answer78
viewsA: Tcp Server stops "responding"
Your server is unanswered as it is listening/waiting for a new connection. This method is called Blocking Mode of sockets. If you need to perform some task while the server listens for a new…
-
4
votes1
answer526
viewsA: Identify if a particular program is the focus by C#
Diego, to accomplish such a task you will need to interact with the Operating System API, in this case Windows. When you start a new instance of Internet Explorer you will need to get Handler…
c#answered Bruno Bermann 1,267 -
1
votes1
answer421
viewsA: FEED TABLES (SQL SERVER )
You need a restrictive relationship between the tables, as an example below: SELECT pessoa.*, credencial.* FROM pessoa INNER JOIN pessoa_credencial ON pessoa_credencial.id_pessoa = pessoa.id INNER…
sqlanswered Bruno Bermann 1,267 -
0
votes1
answer107
viewsA: Separate code regions using Sublime Text 3
Stringnome, the same feature is available in Sublime Text 3. The difference in usage is that the sublime only identifies blocks of code with the # in front if the line identifying the block (#block)…
-
1
votes2
answers828
viewsA: How to connect a Mysql database with QT on a local network?
Yuri, I noticed that at the opening of your Mysql connection driver you specify the same Databasename (database name) as the table that you try to perform the SELECT ahead (log_user). I believe the…
-
1
votes1
answer224
viewsA: relationship between SQL tables
Roberto, in the current context your question I believe you have two lines with the same product and I would like to add the stock contained in both, presenting the value in only one line by…
-
2
votes1
answer712
viewsA: Distinct does not work
distinct groups lines completely equal, which is not the case according to the results that were shown on the grid you posted. As you are using a grouping function (the Count) the appropriate would…
mysqlanswered Bruno Bermann 1,267 -
2
votes1
answer1483
viewsA: How to create a TCP port scanner using the SYN (TCP SYN) method?
Paul, a TCP SYN (Synchronize) package needs a process called a three-part handshake (Handshaking). They are they: 1) Sending an initial package (SYN) from the client to the server 2) Sending a…
-
4
votes2
answers101
viewsA: Like warping a button?
Pekita, the best that can be done with the standard Winforms Button (at least to my understanding) is to set your style to Flat (Flatstyle = Flat), remove its edges (Flatappearence.Bordersize = 0)…
-
0
votes2
answers295
viewsA: Multiple device connections using Sockets
Dear Jcsaint, A socket implementation is not such a simple task, even with the various abstractions . NET offers. It is possible to start a new thread per connection but this is not the recommended…
-
0
votes1
answer48
viewsA: Tcp Server adds the client name to a lisbox
Peter, To show the IP address of the connected client you are using: tcpClient.ToString() The correct thing would be to use: tcpClient.Client.LocalEndPoint I hope I’ve helped, despite the short…
-
1
votes3
answers1376
viewsA: Retrieve data in Mysql DB using AJAX/PHP to create a badge containing DB item count
In your code jQuery has a key lock more than one opening. With the correction it’s like this: $(document).ready(function(){ $('#badgewel').empty(); //Limpa a tabela $.ajax({ type:'get', //método…
-
1
votes1
answer33
viewsA: string.find(), what if I want to create something similar?
Icarus, From what I understand you already know how to use functions, but still do not have the knowledge of object orientation. The string.find() for example that you quoted would be the call of a…
-
0
votes1
answer631
viewsA: Bootstrap Datepicker with Codeigniter
Matheus, your datepicker-data.js file code is not functional, it replaces this excerpt (commented to make you understand the modifications) and tests please, because I can’t access your includes…
-
4
votes1
answer113
viewsA: Life of threads in java
According to the Java documentation in System.Threading.Thread: It is not necessary to retain a Reference to a Thread Object Once you have Started the thread. The thread continues to execute until…
-
1
votes1
answer4352
viewsA: Doubt how to use IF in a TRIGGER in mysql
Mysql triggers do not allow an INSERT to be aborted, as in other DBMS like Postgresql. What you can do is check with a Trigger AFTER INSERT (fired after entering the line) if the student’s code…
-
4
votes1
answer44
viewsA: How many terminal instances are called for each exec() function call in PHP?
For each PHP "exec" call you create a new shell instance in a Linux environment, with your own environment variables. In Windows I believe the behavior is similar.
phpanswered Bruno Bermann 1,267 -
0
votes1
answer40
viewsA: Simple jsf project plus error
You are calling the constructor Control, this in turn calls the constructor Funcio (no parameters), which is parameterized to trigger an exception if called, so your code will always generate an…
javaanswered Bruno Bermann 1,267 -
1
votes1
answer583
viewsA: How to update to table with Foreign key
Arthur, the ideal is that since there is a relationship between both tables only one of them (the discipline table) contains the name of the discipline. The relationship is just this... the teacher…
-
1
votes1
answer758
viewsA: identify basic geometric shapes in image
Using C you can study the Opencv library, widely used for image processing. This type of pattern you want to detect involves techniques like Feature Detection and a good knowledge in image…
image-processinganswered Bruno Bermann 1,267 -
1
votes2
answers62
viewsA: Loop is not listing images as expected
Muril, The fastest implementation for what you want to do would be to load all the images from the database into an array, as you may notice you have two Divs with the "photos-slide" class inside…
-
1
votes3
answers87
viewsA: Modal jQuery or Bootstrap that receives email and name, automatically displayed when loading the page
Make a jQuery call after page loading, this way: $(document).ready(function(){ $('#modal').modal('show'); });
-
2
votes5
answers19859
viewsA: Is it possible to include a Javascript file within another Javascript file?
Possible is, but this is not a native feature. There are no @import, #include, include() or similar directives for Javascript. What is possible to do (I consider gambiarra) is to create an element…
javascriptanswered Bruno Bermann 1,267 -
0
votes2
answers668
viewsA: Asynchronous Call to a Restfull Webservice
Miguel, I’m no expert on Java, but considering the concept of Threads you are using "Thread.Sleep(1000)" for what reason? If your class is making an asynchronous request and you’re waiting a second…
-
1
votes1
answer263
viewsA: Group data related to a column
An example in Mysql would be GROUP_CONCAT that concatenates a column, with value in N rows in a single column and a row, provided that the GROUP BY clause is used in the other non-cracker columns,…
-
1
votes1
answer689
viewsA: Call C++ from Lua
First in your C or C++ code you must declare this function with the specific syntax for integration with LUA. The header "lua. h" defines the prototype lua_CFunction this way: typedef int…
-
2
votes1
answer281
viewsA: Error when compiling project with QT
Edson, this image you linked shows 2 warnings, warning that you are overwriting build targets. In this case you have specifically set the name of your project’s main window to "main", which is the…
-
2
votes2
answers96
viewsA: Decimal counting in nodes
You can implement a "for" in your code where the incremental condition is a sequence modified by the current value of the variable being incremented, as follows: var min_inicial = 1.0 for(var min =…
node.jsanswered Bruno Bermann 1,267 -
0
votes2
answers26234
viewsA: SELECT INSERT in Oracle using Sesquence nextval and group by
Try to query the query in a sub-query, this way. The sequence query should always occur on the DUAL object in Oracle. Edited: I believe this is the query that will result in what you are waiting for…
-
0
votes1
answer24
viewsA: What is the best way to take advantage of the database data for functions related to the recovered content?
Math, the best option among those listed is the third, from the performance point of view (database queries are costly for performance), maintainability (each function performs a task, if an error…
-
6
votes2
answers2090
viewsA: What is the IL code and where can I find this code?
The IL code Maniero refers to is the Common Intermediate Language, an intermediate language equivalent to Assembly in compiled programming languages. Since C# is an interpreted language the…
-
2
votes1
answer88
viewsA: Socket C++ Read Error
Pedro, I have an http server implemented with cross-platform sockets in c++ but I do not use the read function you are using, although I use recv which has similar structure. int recv (int __fd,…
-
0
votes3
answers122
viewsA: How to install rvm in Debian
Rafael, I don’t have debian to test. At present with Mint installed any test done would not be valid. So I suggest you try to install a version compatible with the latest debian distribution…
-
2
votes1
answer1368
viewsA: How to find Null values without specifying attribute (Mariadb)
Lucas, to perform the procedure you want a bit of manual work is required (or a stored Procedure, which escapes some of my knowledge in Mysql). To do so you can follow the following steps: 1) Run…
-
8
votes2
answers1287
viewsA: What is the purpose of a static constructor?
A static constructor in C# can never be called directly through code (in case your application has created a non-static constructor implicit by the compiler). The static constructor is called before…
-
3
votes2
answers1283
viewsA: Java socket issues, how to send and receive messages simultaneously between client and server?
My main language is not Java, so I will try to help you So I was able to interpret your server code kills the connection to the client as soon as the first message is sent ("Server: Java is a good…
-
1
votes1
answer420
viewsA: Problem with operator overload
Marv, Your code isn’t complete, so it’s impossible to evaluate it. Still I exemplify below the implementation of both operators in any class. It is important to remember that for the Compile example…
-
0
votes1
answer128
viewsA: Error importing class C++
Pedro, the problem is because Windows does not distinguish between upper and lower case, so "string. h" and "String. h" are the same thing. Since the default library (Std) is a preferred include…
c++answered Bruno Bermann 1,267 -
2
votes3
answers5495
viewsA: Display the values of the c++ vector on the screen
Vanusa, you need to keep in mind first that you are using three arrays to store product information and this imposes a limit to the registration of 10 products in your case. To store an indefinite…