Posts by David Jonas • 294 points
7 posts
-
0
votes1
answer94
viewsA: Read a txt file by php and mysql and viewed by each user - PART 2
Try it this way: Barter: echo "Valor: R$ ".number_format($data[5], 0,',','.')."</br>"; For: echo "Valor: R$ ".number_format(str_replace(",", ".", $data[5]),2,',','.')."</br>";…
-
7
votes1
answer3297
viewsA: Generate random numbers in Java
Instantiating the class Random: Random random = new Random(); How to generate only numbers larger than 2? Between 2 and 1000, can replace the thousand or two for any value, for example: numero =…
-
0
votes1
answer518
viewsA: How to make a program to calculate constant mathematical expressions
Razor, I have already implemented something similar in the discipline of Compilers, a little more complex because the text was in written form (for example: "three hundred and twenty-three thousand…
-
0
votes1
answer2571
viewsA: How to securely encrypt and decrypt PHP data?
You can implement two functions in php to encrypt one and another to decrypt and you would save in the database these strings (careful that they can get very large), follows an example of the…
-
1
votes1
answer232
viewsA: Variable returns strange characters
If you have a problem with the character encoding pattern, try using it in your html head: change: <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> for: <meta…
-
2
votes2
answers219
viewsA: Error using $this in static function
Because static methods can be called without an instance of the object being created, the $this pseudo-variable is not available within the method declared as static. Static properties cannot be…
-
4
votes2
answers102
viewsA: What’s this code for?
This code is just a model, a skeleton code with no implementation in it. The beginning var PROD = {}; declaring an empty class. And in the next lines adding the modules to this class. init:…
javascriptanswered David Jonas 294