Posts by Velasco • 953 points
36 posts
-
4
votes2
answers887
viewsA: How to insert text at cursor position?
Just use the tag <a> with the href="#" that it will keep the cursor position by inserting in the way you want, this in my view is the simplest possible solution.…
-
0
votes1
answer32
viewsA: Ajax function with php is not working
Your class is declared in vizCliente.class.php, however there is no instance of the class in this file, you must instantiate the class and fill in its values.
-
0
votes1
answer54
viewsA: Registration confirmation
The extent mysql is obsolete, in its place use the mysqli. For more details see documentation…
-
1
votes0
answers54
viewsQ: What is output buffering and how does it work?
What is output buffering and how does it work in PHP? When should it be used?
-
2
votes3
answers87
viewsA: PHP - Loop accentuation problem in a string
Use the utf8_decode to convert the string and after this the utf8_encode to make the impression in the right way. <?php $letras = utf8_decode('nós'); $numero = strlen($letras); for($j = 0; $j…
-
0
votes1
answer30
viewsA: I cannot use a query method when using a connection class
When you use $pdo_conn = new Connection(); you just instance an object from the Connection class, you are not creating the connection to your database. To get your connection to the database, do:…
-
4
votes1
answer236
viewsQ: What are the differences between Adodb and PDO?
What are the differences between Adodb and PDO? Which one has the best performance?
-
0
votes0
answers32
viewsQ: Why does this mysqli_fetch_assoc return null?
When I run the code below, when I reach the line $user_image = $row['user_image'];, the variable $row is set to null and the loop is terminated, however, if I remove Else the code runs normally and…
-
1
votes3
answers175
viewsA: INSERT with prepare does not work
The error happens in your method bind_param, the method tells SQL what is the type of data being sent to the query and it is mandatory to have one for each parameter you send in the bind. The s…
-
7
votes1
answer1874
viewsQ: What are the differences between properties and attributes in HTML?
When trying to use this code: $(document).ready(function(){ $("#selectAllBoxes").on("click", function(){ if(this.checked){ $('.checkBoxes').each(function(){ $(this).attr("checked", true); }); } else…
-
1
votes2
answers6513
viewsA: How to implement a close (close) screen event?
Give an id to the button: <Button fx:id="fecharTela" onAction="#closeButtonAction"> In your class that controls Scene, add the following code: @FXML private javafx.scene.control.Button…
-
0
votes1
answer45
viewsQ: Is there a function for arrays in Java like PHP Join()?
Is there a function in Java that is equal (or similar) to Join PHP? If yes, demonstrate your use.
-
3
votes3
answers2030
viewsQ: How to create an empty object in PHP?
With an array you can do this: $arrayVazio = array(); $arrayVazio[key1][var1] = "PHP"; It is possible to do this with an object: (object)$objetoVazio = ""; $objetoVazio->key1->var1 = "PHP";…
-
6
votes1
answer401
viewsQ: What is the difference between exec(), system() and passthru()?
What are the differences between these functions? Is there any specific situation to use each function? If there is, give examples of these situations.
-
0
votes1
answer1825
viewsA: How to resize images before uploading?
This code can help: include("resize-class.php"); // *** 1) Inicializar Imagem $resizeObj = new resize('sample.png'); // *** 2) Redimensionar imagens (Opções: exato, retrato, paisagem, auto, crop)…
-
2
votes1
answer55
viewsA: Two Systems on the same server
You can create another http instance and have it listen to the port of your interest. Example: var http = require('http'); http.createServer(onRequest_a).listen(9011);…
-
0
votes2
answers908
viewsA: How to enable or show a php button after a registration?
You can do it like this: <?php if(isset($_POST['btnCadastrar'])){ ?> <script> window.addEvent('domready', function() { $('#opcao').removeClass('hidden'); }); </script> <?php }…
-
0
votes2
answers868
views -
0
votes1
answer151
viewsA: How to enter data from a form in the database [Pdostatment - CRUD]
Placeholders (:email, :password) do not need quotes, they serve as substitutes for the values you will pass. <?php require_once(__DIR__."../../helpers/Connection.php"); class User { public $id;…
-
0
votes1
answer117
viewsA: Java database insertion problem
Your connection is never started, your connection method is returning true or false, you must use the connected method to return the connection to the database and then send the data to your…
-
1
votes2
answers800
viewsA: Issue with updating mysql to mysqli
The problem is because you are using obsolete functions (mysql_connet, mysql_query...). Instead use mysqli functions such as: mysqli_query and mysqli_connect. Check out more in the documentation:…
-
0
votes1
answer168
viewsA: Remove messages from validate() jquery
You can use the method resetForm() var validator = $("#myform").validate( ... ... ); $(".cancel").click(function() { validator.resetForm(); }); Source:…
-
-1
votes2
answers6190
viewsA: Passing parameter via href php
Instead of passing the parameter by a href, pass it by a Session: <?php session_start(); $_SESSION['user_id'] = $obCont-getId(); header("Location: edita.php");
-
0
votes1
answer44
viewsA: Does not redirect
According to PHP documentation: Remember that header() needs to be called before any content whether sent by HTML tags, blank lines in a file or from PHP itself. So, do not alert on the screen,…
-
0
votes2
answers2260
viewsA: error in sendSMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
You are using the Gmail server and using a Hotmail account, use a Gmail account, as in the example: function __construct() { $this->isSMTP(); $this->isHTML(true); $this->CharSet = 'UTF-8';…
-
2
votes1
answer864
viewsA: Access information in Multidimensional Associative array (PHP)?
You are forgetting the index of the array, you can access it as follows: echo $arrDados[0]["NumeroEmpenhoNumero"]["size"]; // Acessando de forma fixa foreach ($arrDados as $key => $value) {…
-
2
votes3
answers224
viewsA: remove first array from an array
<?php $cars = array ( array("Volvo",22,18), array("BMW",15,13), array("Saab",5,2), array("Land Rover",17,15) ); array_shift($cars); //Retira o primeiro elemento do array ?>…
-
1
votes2
answers99
viewsQ: Datatable data is not displayed, even with loading of Arraylist running correctly
Guys, I am loading a JSF datatable with an Arraylist, but the result is not displayed in any way, follow as my code: index.xhtml <h:body> <h1>Novo Jogo</h1> <j:form>…
-
3
votes1
answer47
viewsQ: How does Pattern Object Linked to Other Objects work?
What is Pattern OLOO? How does it work? What is its difference to Prototype Pattern? What is the advantage of using each one?
-
4
votes1
answer264
viewsQ: What is the difference between Lexical Scope and Dynamic Scope in Javascript?
What’s the difference between Lexical Scope and Dynamic Scope? What are the advantages of using each of them? When they should be used?…
javascriptasked Velasco 953 -
0
votes1
answer228
viewsA: Docker - An error occurred
The problem is that Hyper-V is disabled or the Hypervisor agent is not running. Open Powershell as administrator and use:1. To enable Hyper-V: Dism.exe /Online /Enable-Feature:Microsoft-Hyper-V /All…
-
2
votes2
answers294
viewsQ: How does Junit work?
How does the Junit open-source framework work? Does it guarantee the quality of the software? It is recommended to write unit tests on a daily basis?
-
1
votes1
answer98
viewsQ: Is Linden Scripting Language a robust programming language?
LSL is an event-oriented programming language that is used within Second Life. Is it possible to consider a programming language appropriate to Turing principles? The development of interesting…
-
4
votes1
answer376
viewsQ: What is Multi-version Concurrency Control in Postgresql?
What is Multi-version Concurrency Control (MVCC) in Postgresql and how it works?
-
9
votes1
answer568
viewsQ: How does inheritance work in Postgresql?
How does inheritance work in Postgresql? Is it a good practice in relational databases? How to use it?
-
1
votes1
answer143
viewsA: Problems acquiring data from a Javafx Label
Unknow Source error means it could not find the fxml you specified, check the file name.