Posts by Hitmasu • 61 points
4 posts
-
1
votes1
answer680
viewsA: How to check if it already exists in the database and update
What you can do is: On condition of existence, check if there is and if is different from the Id being updated, for example: public function existsFunction($name,$id){ try{ $command = ("SELECT *…
-
0
votes1
answer50
viewsA: How to convert the positive value of an aob into a negative value?
Try to do with Complement of 2 in binary. Transform the value you want to convert into binary: 0A = 1010 Now do the inversion (NOT) of the binary, that is, the where is 0 will be and 1 and the where…
hexadecimalanswered Hitmasu 61 -
1
votes2
answers6881
viewsA: How to find splitters of a number quickly
I did it this way and it was pretty quick: //Utilizei como teste o seu comentário que o maior número seria 10^9 int number = 1000000000; int count = 1; int pow = 0; int lastDivisor = 2; for (int i =…
-
1
votes2
answers3609
viewsA: "The process cannot access the file because it is being used by another process"
First, when you have the using, no need to call the method Dispose followed by the same object. The instruction using calls the Dispose method on the object in the right way and it also causes the…