Posts by Alexandre Borela • 658 points
15 posts
-
0
votes1
answer22
viewsA: Do not check PHP property value
You can use the get_object_vars that if called out of class, will show only public properties. <?php class foo { private $a; public $b = 1; public $c; private $d; static $e; public function…
phpanswered Alexandre Borela 658 -
1
votes2
answers271
viewsA: Arduino Traffic Light with PWM
From what I understand, the problem is that you’re counting calls from the loop function. They are not at equal intervals as the Adian does a number of extra things that can delay execution, and…
arduinoanswered Alexandre Borela 658 -
3
votes2
answers147
viewsA: Memory and pointer allocation
The error is in that line: for(int column = row; column = row + sudoku->size; column++) The loop never ends because column is not being compared, just change to: for(int column = row; column ==…
-
7
votes2
answers2741
viewsA: How to identify a specific number in any numerical value?
Convert to string and search for substring. #include <stdio.h> #include <string.h> int ProcuraNumero (int NumeroProcurado, int NumeroAlvo) { char NumeroProcuradoString[16]; char…
-
2
votes1
answer122
viewsA: A bit mask can/should be typed?
How they work: Bit masks will always have values based on 2, the sequence would be basically: 1, 2, 4, 8... up to the maximum number of bits. Imagine for example if you had to choose your favorite…
language-designanswered Alexandre Borela 658 -
8
votes2
answers6202
viewsA: How does the C++ layer work on the Web system?
The reason they use C, C++ or even Assembly is when they need performance, not security because these languages give more control of the processor, so you can better plan the execution. But unless…
-
2
votes1
answer1291
viewsA: The method or Operation is not implemented error
Most likely you used code generators where you generate methods in the following format: void MeuNovoMetodo () { throw new NotImplementedException (); } They do this so that your code can compile…
-
0
votes4
answers3237
viewsA: Calculate and convert byte file size to kB, MB, GB, etc
First it is important to define that KB NO is 1024, it was already solved long ago. To avoid confusion, because Kilo means 1000, they defined the prefix Kibi that has the multiplier 1024. Soon, we…
phpanswered Alexandre Borela 658 -
4
votes1
answer360
viewsA: Make text editor with syntax Highlight
The implementation of this in itself is by no means a simple task, if it is only coloring the text but without allowing the user to edit, regular expressions serve as you have done, now for editing…
-
1
votes1
answer322
viewsA: Opengl: what is the basic "package" of shaders to create elements of a 3D scene
If the goal is to try to program an engine for learning purposes recommend Benny’s tutorials: https://www.youtube.com/watch?v=0xcmTZPoJtM&list=PLEETnX-uPtBXP_B2yupUKlflXBznWIlL5 He even has a…
-
2
votes1
answer47
viewsA: Problems with Regular Expression
If the goal is to extract the bank name and the name of the database, this would be simpler: Create Function ([^.]+)\.([^\(]+) A good site to test regular expressions is this: http://www.regexr.com/…
-
2
votes3
answers1212
viewsA: Why can’t we destroy [using unset in] a static variable?
Variables declared in class body are estates, Imagine you program a class: class Cachorro { public $Altura; public $Idade; } Height and age are properties of all dog-like objects, so any function…
-
8
votes3
answers48471
viewsA: Apache does not start the service in windows 10
If you have followed the tutorial and changed the port apache is listening to, then you will need to type: localhost:1234 where 1234 is the new port you have configured.
-
1
votes1
answer634
viewsA: Conditional formatting on a gridView
Use the Cellformating event. private void DataGridView1_CellFormatting (object Sender, DataGridViewCellFormattingEventArgs Arguments) { if (this.DataGridView1.Columns [Arguments.ColumnIndex].Name !=…
-
2
votes1
answer173
viewsA: Techniques to maintain data consistency in the front end
The correct way is the one you are already doing, trying to validate directly in the browser and still have another validation on the server before executing the commands sent by the user. This type…