Posts by Bins • 3,586 points
229 posts
-
0
votes2
answers150
viewsA: Number count according to page scroll using jQuery!
There is a plugin called Waypoints that facilitates this type of action. Here is an example of how to use: $(document).ready(function() { var waypoints = $('#circle').waypoint(function(direction) {…
-
0
votes1
answer29
viewsA: Split my Cod HTML into separate HTML’s
If you have html files and want to insert them into another page, you can use Jquery for this. Here’s an example: <!DOCTYPE html> <html> <head> <script…
-
1
votes1
answer103
viewsA: How to leave a field to select names in alphabetical order
If you want to create a checkbox with names in alphabetical order, you can use an array. You can sort an array in alphabetical order using the Sort method. Here is an example: var vetor = Array…
-
1
votes1
answer439
viewsA: How to Fill In My Fields with Data Selected by Picker and Update Data - React Native
As I don’t know the return of your "Tasks" object, I’m guessing it has the status, description and value On that basis, the amendments would be as follows:: 1 - Add description and value in the…
-
0
votes1
answer504
viewsA: Insert array into database using PHP and SQL
From what I saw, you make a query in the product table to recover the id, then add the item in the item_box table . Since your inputs are arrays, a way to add to the item_box table would be as…
-
0
votes1
answer46
viewsA: Problem to submit form from Javascript
When you do Submit() by javascript, it will reload the page. An easy way to do this would be using Jquery. Here is an example you can use to change your form: function SubmitFormData() { var nome =…
-
0
votes1
answer511
viewsA: How popular a Database Data Picker (Firebase) - React Native
From what I’ve seen of your code, Picker elements are from an array called "title" within your state. I recommend you create in the state a field called "selectedtitulo_" to save the chosen value in…
-
1
votes1
answer9
viewsA: Put sample codes in a Wordpress post
To add source code programming languages to your posts, you can use a Syntax Highlight plugin. Here is an example of one of these plugins:…
-
0
votes1
answer22
viewsA: When hovering over the images, the text of the "name" property should be displayed, as in the first image, with the title Twitter
To add a text that will be displayed by hovering over the image you use the ALT attribute. Example: <img src="img/screen_1.png" alt="Tela 1"/> If you want to add images to the page using the…
-
0
votes1
answer77
viewsA: Checked radio button with sql query listing
If "lista_platform_don" is an array, a way to mark the first element would be like this: foreach($list_platform_don as $index => $donate): if ($index == 0) { echo '<input type="radio"…
-
0
votes1
answer705
viewsA: Error in the request
This may be related to the Firebase Cloud plan. There is a limitation of access to Apis when the plan is free. This post describes a problem like yours:…
-
1
votes1
answer26
viewsA: syntax error in login system - PHP
Missing a semicolon on this line: include("config/config.php"); There’s an extra space on this line: $email = $mysqli ->escape_string($_POST['email']); The correct is: $email =…
-
4
votes1
answer4677
viewsA: Undefined is not an Object (evaluating '_this.props.navigation.navigate') React Native
What should be happening is the following, when you use React Navigation, "navigation" is passed as props to the pages you put on the route. However, within this page, the components do not have…
-
1
votes1
answer59
viewsA: Hide an element when the screen is in a certain pixel in Javascript
You could solve this using CSS. If for example your DIV has applied a class called "my_div", you could hide it in this way: @media only screen and (max-device-width: 375px) {…
-
0
votes1
answer27
viewsA: Help to insert data into the table
If you want to update the user table after inserting a record in the invitation table, you can use a TRIGGER. Here’s an example: DELIMITER $$ CREATE TRIGGER update_convite AFTER INSERT ON convite…
-
0
votes2
answers28
viewsA: List in Mysql tables that do not have AVG
Try to do it this way SELECT local.nome, AVG(nota_local.nota) AS nota FROM local LEFT JOIN nota_local ON local.id = nota_local.id_local GROUP BY local.nome ORDER BY local.nome…
-
0
votes1
answer41
viewsA: Calculation of two BD fields in a function
From what I’ve seen of your structure, you could try to do two things: 1 - In the table mats_por_servicos, check that the fields mat_id and serv_id are indexed. 2 - In your query, you made a CAST to…
-
1
votes2
answers299
viewsA: Send the value of one input to another input that is readonly
Make the following change in your script: $( document ).ready(function() { $("#btnNomes").click(function () { console.log('teste'); var nome = $("#inputNome"); $("#textNome").val(nome.val()); });…
-
1
votes2
answers256
viewsA: Subtract value using JS
Try to do it this way - const inputs = [...document.querySelectorAll("input[class='serv']")]; const res = document.getElementById("resultado"); const total = res.querySelector('[name="total"]');…
-
1
votes2
answers56
viewsA: Show div containing search content
Here is an example with Jquery: $('.contact-name').hide(); $('#search').click(function(){ $('.contact-name').hide(); var txt = $('#search-criteria').val(); $('.contact-name').each(function(){…
-
4
votes1
answer51
viewsA: receive what is written from an input
You can do this using javascript. With Jquery it is very easy to do, here is an example: <html> <head> <meta charset="utf-8"> <title>One-way Data Binding com…
-
2
votes1
answer36
viewsA: SQL for specific page
In Mysql, you can continue using LIMIT to do this. LIMIT can work with initial position and number of records. Here are some examples: SELECT * FROM minha_tabela ORDER BY id LIMIT 0, 15 SELECT *…
-
2
votes2
answers31
viewsA: Select as a result of one day of the week
You can try to do that: SELECT DAYOFWEEK(data) as dia, SUM(valor) as total FROM pedidos WHERE YEARWEEK(data) = YEARWEEK(NOW()) GROUP BY DAYOFWEEK(data) ORDER BY DAYOFWEEK(data)…
-
0
votes2
answers64
viewsA: How to count weekly single accesses in Mysql
If you do this query, you will create an analytical table with the distinct ones in a given week, filtering by date range SELECT id_usuario, week(dia) as semana FROM acesso WHERE dia BETWEEN…
-
-1
votes2
answers64
viewsA: How to count weekly single accesses in Mysql
If you want to know only the total of accesses in the last 7 days, you can do so: SELECT COUNT(DISTINCT id_usuario) AS total FROM acesso WHERE dia >= (DATE(NOW()) - INTERVAL 7 DAY)…
-
0
votes1
answer54
viewsA: How to overwrite a file with php/jquery database information
Using PHP and the FPDF library, you can open a template file and fill in information. Here is an example of how the code looks: <?php /*************************** Sample using a PHP array…
-
4
votes2
answers3248
viewsA: Capture repeated elements from a Javascript array
To make it easier to understand, you can try doing this in two operations, first creating the array of repeated elements, and then creating an array of unique elements. An example of how to find the…
-
0
votes1
answer207
viewsA: Problems with accentuation in Postgresql and PHP characters
Before saving form information, use UTF8_DECODE. Here’s an example: <?php $nome = $_POST["nome"]; $StrSQL = "INSERT INTO minha_tabela (nome) VALUES ('" . utf8_decode($nome) . "')"; //Programação…
-
0
votes1
answer425
viewsA: How to read txt file and mount php json?
If you use the FILE command, each row of your file will be stored in an array. This way, you can separate the contents into two array. According to what I understood, it would look this way:…