Posts by Raizant • 2,316 points
61 posts
-
2
votes1
answer38
viewsA: I cannot create an iterator class with Ienumerable<T>
No stackoverflow in English has a question similar to yours, follows the free translation of the accepted answer Like IEnumerable<T> implements IEnumerable you need to implement this interface…
-
2
votes2
answers94
viewsA: How to call a function within the setTimeOut() method by passing parameters?
Just like that, right? btn1.onclick = () => { setTimeout(() => msg("BOTÃO 1"), 1000); }; btn2.onclick = () => { setTimeout(() => msg("BOTÃO 2"), 1000); }; https://jsfiddle.net/5sgwnk0u/…
javascriptanswered Raizant 2,316 -
0
votes2
answers103
viewsQ: My container with Springboot is climbing before the container with Mysql finishes climbing
Docker-Compose.yml version: '3.5' services: marvel-api: build: my-api container_name: my-api depends_on: - my-api-bd restart: always ports: - 8080:8080 my-api-bd: build: my-api-bd restart: always…
-
0
votes1
answer58
viewsA: Creating an Uber Jar with Gradle is not working
Although I see in several places that the way to create Shade is to use the shadow something must have changed in the last version, because I got the Uber jar using implementation in place of shadow…
-
1
votes1
answer58
viewsQ: Creating an Uber Jar with Gradle is not working
I’m using the plugin johnrengelman / shadow to create a Uber with some local dependencies, but for some reason unknown is not working. build.Gradle /* * This file was generated by the Gradle 'init'…
-
2
votes1
answer104
viewsQ: Pass a variable as parameter, not its value
I have the following code, and in the change function, I want to pass a variable as a parameter, not its value, and I don’t know how to do that. Because I want the function to do the "Listen" of the…
javascriptasked Raizant 2,316 -
0
votes3
answers386
viewsA: Change tab title with script, how do you do?
You are picking up an array of classes with the getElementsByClassName which is normal, since there may be more than one class with the same name, then this returns an array of classes, since…
-
12
votes2
answers1125
viewsQ: Should I encrypt the password before sending it to the server?
I am in doubt if I should encrypt a password before sending it to the server, and on the server save the hash in the bank, or if I should encrypt only on the server...
-
2
votes2
answers434
viewsA: How to know if a person has visited a page in the last 2 days
You create a cookie using the setcookie("nome_do_cookie", "valor_do_cookie", validade_do_cookie) To check out: if(isset($_COOKIE['visitante'])) { if(!($_COOKIE['visitante'] === null)) { //O usuário…
-
1
votes1
answer153
viewsQ: MVC in C#, separate by folders or class library?
I saw some examples that separate by folders, and others that separate by a class library and then create the note in the references. Both forms can be used?
-
5
votes3
answers3023
viewsQ: Compilation and execution error difference
A build error would be the one the IDE already warns about even before compiling, such as missing a semicolon, correct? But what about the error of execution? It would be for example a Exception?…
-
26
votes3
answers1419
viewsQ: Comparison of integers in Java
Integer valor = 127; Integer valor2 = 127; System.out.printIn(valor == valor2); Output: true Integer valor = 128; Integer valor2 = 128; System.out.printIn(valor == valor2); Output: false Why does…
-
0
votes1
answer444
viewsA: Blurred text when activating Canvas
I decided to increase the reference resolution, from 800x600 to 1920x1080. But I can’t tell the cause of the image is blurred only when I activated Canvas by command, because it started normal.…
-
2
votes1
answer444
viewsQ: Blurred text when activating Canvas
Image as it should be: Blurred image after deactivating first Canvas, and activate another Canvas: I use two Canvas in the same Scene, one for the login, which starts enabled, another for the…
-
0
votes1
answer29
viewsQ: Appropriate way to handle data received from the server
Send something, a username for example writer.WriteLine(Username.text); And after processing the data on the server, I return something like: stwSend.WriteLine("a2|Cadastro efetuado com sucesso!");…
-
5
votes1
answer1652
viewsA: Check that reCAPTCHA has been marked
Stackoverflow Response Translation in English: Google has a call back option for when the checkbox is checked. Google has a return for when the checkbox is checked. In the div who makes the call…
-
2
votes1
answer255
viewsA: How do I make the notification appear to allow Flash Player?
Well, it basically works just like in the example you quoted: <a href="https://get.adobe.com/flashplayer/" target="_blank">Clique aqui para habilitar o Flash</a> When clicking, if the…
-
1
votes2
answers104
viewsQ: Time for shutdown, or immediate shutdown?
Worrying about the user experience, observing great systems such as Facebook, Gmail, among others... in these systems, at the time of erasing the account, the system always warns about a right of…
-
10
votes4
answers236
viewsQ: Comparison syntax referring to the same variable
Let me give you an example in C#: namespace Compare { class Program { static void Main(string[] args) { string name = "Girl"; if(name == "Girl" || == "girl") //... } } } This form clearly contains…
-
29
votes2
answers539
viewsQ: How does antivirus scan my program?
I had a class in college that left me "kind of" puzzled, my teacher was talking about the differences of interpreted languages and compiled languages and pointed out that interpreted languages could…
-
3
votes3
answers189
viewsA: Is there any way to write a function on the screen other than by onclick?
function fazerAlgo() { //código aqui } // em alguma parte do seu código mais tarde... fazerAlgo(); In HTML: <script src="minhafuncao.js"></script> <div id="">Em alguma parte do seu…
-
2
votes2
answers42
viewsA: Is there any way you can use volume buttons to browse the site?
See this question on StackOverflow in English Is it possible to bind to hardware Buttons of mobile device using jQuery mobile? You can link your mobile device hardware buttons using jQuery mobile?…
javascriptanswered Raizant 2,316 -
42
votes5
answers2375
viewsQ: Should I show generic error messages like, wrong password or user, or specific messages?
It is common in many systems when entering the user and the incorrect password, the system informs us that one of them is wrong, but not exactly what (it happens also here in Stack Overflow). Does…
-
2
votes1
answer257
viewsQ: Error trying asynchronous connection
I’m trying to do this way not to crash the application while waiting for the server to accept the connection. I saw that you can do with async and the await. But while trying to use them to wait for…
-
6
votes3
answers1105
viewsQ: App being recognized as potentially dangerous
I usually copy the exe of the way: C: Users Username source Chatwinforms Appname bin Debug Appname.exe But when sending it to my colleagues for testing, the browser says that the file is usually…
-
6
votes2
answers5191
viewsA: HTML and SQL connection
As you’ve already spoken of PHP I’ll give a minimal example using PHP + Mysql. Using PHP you should create a file .php and set in it your connection to the database. Ex: <?php define("HOST",…
-
1
votes1
answer2964
viewsQ: PHP Parse error: Invalid literal Numeric
Migrating to PHP 7 I’m getting the following error: Invalid numeric literal For example: $itau = new Conta(1620, 030818); PHP will return an error Parse error: Invalid Numeric literal in index.php…
-
4
votes1
answer1795
viewsA: Lockscreen lock screen
Yes, it is possible. Using the method setTimeout of Javascript you can program so that the screen lock runs at the given time, and also created the function to "restart" the time if the user is…
-
3
votes2
answers4666
viewsA: Remove disabled attribute when a condition is met
Do you want when the field has the correct number of characters, it is enabled again right? Note that the $(document).keyup(function(){}); will check whenever a key is pressed. My example code:…
-
0
votes2
answers53
viewsQ: Find key and corresponding value in text file
I have a text file: 0 GATO 1 CACHORRO 2 COELHO 3 RATO And I want to take the id and the corresponding value, for example: when I enter 0 return "Cat" and so on. $text =…
-
0
votes1
answer869
viewsQ: Is it possible to configure the display errors in . htaccess?
In the information about my hosting service, there is a line that informs that I cannot change the php.ini, but that I can change most settings through .htaccess. I would like to enable errors…
-
7
votes3
answers1777
viewsQ: PHP picking up Cloudflare IP instead of user IP
I’m having a problem using the: $_SERVER["REMOTE_ADDR"]; eventually he catches a IP which is not the user’s, in case it started after I started using the Cloudflare... Does anyone know why this…
-
5
votes3
answers1793
views -
2
votes1
answer1437
viewsQ: Transform result into array and take all values in "select"
I’m having a problem when creating a system, I need to make a select: $select = $mysqli->query("SELECT * FROM `guild` WHERE `user_id`='$userid'"); $row = $select->num_rows; $get =…
-
3
votes3
answers80
viewsA: Effects with jquery
That’s what you want: $("#elemento").animate({left: "200px"}, 2000, function(){ $(this).toggle(); }); Example in Jsfiddle…
-
1
votes1
answer58
viewsQ: How to remove HTML and Scripts in user-written messages?
I created a messenger, and after the user writes the message it is saved in the database in format sweep, when the recipient sees the message, if it has been written with tags HTML, and tags of…
-
2
votes1
answer103
viewsQ: Problem with JS/Jquery/Ajax
I have a button that when clicked it performs a function: function searchTradeItems() { var uid = $("#useruniqid").val(); var iusername = $("#username").html(); var userid = $("#balmung-id").val();…
-
2
votes1
answer1041
viewsA: Notification API does not return data
The error was in the way I was trying to get the data because I didn’t quite understand how the notification api worked. Instead of the variable being $pagamento = $_GET['transaction_id']; era…
-
0
votes1
answer1041
viewsQ: Notification API does not return data
I’m having a problem with the Pagseguro Notification API, it’s not returning the XML in no way am I testing in HTTP, for in HTTPS also did not work. Someone knows how to fix this? Code: <?php…
-
1
votes1
answer1424
viewsQ: Force https using . htaccess on a given domain and domain only
I would like to know how to force HTTPS using .htaccess in only one domain/domain. The code I use is forcing https on all subdomains... and one of my subdominios does not have SSL, so I wish it does…
-
0
votes2
answers60
viewsQ: Create custom variables
Well, I’ve got a flea here behind my ear and I’m having trouble solving the following problem: $select = $mysqli->query("SELECT * FROM payments WHERE client_email='$xemail'"); $row =…
-
3
votes1
answer4700
viewsQ: Parser error : Start tag expected, '<' not found
I can understand the script, except for the part that he works on XML... so I can’t tell if the mistake is in the script, or in the XML that he tries to get. Code: <?php require…
-
1
votes1
answer300
viewsA: Imprimir Alert PHP
Try it like this: echo '<div id="alert">Dados Digitados Incorretos</div>';
-
2
votes3
answers616
viewsQ: How to hide the title bar? Crash when changing android:Theme="@style/Apptheme"
I’m breaking my head here to hide the bar that gives the name of the app... I’ve tried everything I’ve seen on the Internet, nothing works... and when I change the android:theme="@style/AppTheme"…
-
2
votes3
answers16590
viewsA: Align side-by-side fields in a form
Well, if that’s what I understood, if you want to align the text with the check box, you can’t close the tag on the text and then put the checkbox, you have to put the checkbox inside the text tag,…
-
16
votes4
answers3142
views -
0
votes1
answer94
viewsQ: PHP System to heal x user in x minutes
Good morning guys! I’m creating a little role-playing game and I’m not figuring out how to get it to heal the x user in x minutes. I managed to do via ajax, but it’s not safe right? Easily the user…
-
0
votes1
answer106
viewsQ: Problem with ("select username, points from data order by points desc limit 10");
I am trying to make a ranking system, where the username and the score appear. I am doing as follows: $select = $mysqli->query("select username, pontos from data order by pontos desc limit 10");…
-
1
votes1
answer166
viewsQ: PHP How to pick a random value like Rand($min, $max) but with a query?
For example, in a browser game I want when the user clicks attack to return another user who has +- the same battle power as him. $select = $mysqli->query("select * from data order by rand()");…
-
1
votes1
answer271
viewsQ: Document.getElementsByClassName("x"). innerText is not working
I’m trying to use the document.getElementsByClassName().innerText but it does not replace the text contained in the class. This text comes from a php echo: echo "<div…