Posts by Bins • 3,586 points
229 posts
-
0
votes1
answer27
viewsA: Parameter php server
You can try to make the code unreadable (obfuscate), but this can also be undone. An example of this type of code: protected function F8798a4a9($V4ba49586, $Vd75b70be=array()) { $Vcdbd1ded =…
-
2
votes1
answer78
viewsA: PHP form creation
A solution to this problem would be as follows:: <?php for ($x =400; $x<=545; $x++){ if ($x % 2 == 0){ echo $x . "<br>"; } } ?>
-
1
votes1
answer743
viewsA: How to insert a character at a given position of a string?
Here’s an example of how to do this: var a = "abcdefg"; var b = ","; var position = 5; var output = [a.slice(0, position), b, a.slice(position)].join(''); console.log(output);…
-
0
votes1
answer38
viewsA: How to send the chosen value within an option that has a query in the database
From what I’ve seen of your code, you want to put together a list of options based on the contents of a table called CNAE. If this table has the fields "id_cnae" and "Description", the code to…
-
1
votes1
answer65
viewsA: Doubt about hybrid platform
The idea of hybrid development is you can build your app by programming only once without the need to develop for each platform (Android or IOS). As you yourself mentioned, there are several…
-
0
votes1
answer47
viewsA: How to rank the most useful comments from a table?
From what I understand of your explanation, for each record in Customerreview I may have one or more records in the Likereview table, some of which may be marked with the islike field as true. To…
-
2
votes1
answer149
viewsA: Paging within a div
In your database query, after LIMIT you have two parameters, the first is the starting position, the second is the amount of records that will be returned. The problem is in the first parameter, you…
-
1
votes2
answers49
viewsA: Multiple delimiters in PHP gives error, Phpmyadmin does not
Using Mysqli, you can use the command mysqli_multi_query(). You must pass queries separated by semicolons. Here is an example: <?php…
-
2
votes1
answer902
viewsA: Sending e-mail through Nodejs
This "Cannot POST /index" error message is because the index route should not be accepting access by the POST method Here is an example of a route that receives a form post: let express =…
-
0
votes2
answers70
viewsA: Unidentified database: "No database Selected"
In your connection file, Voce needs to enter the name of the database. Here is an example: <?php $conn = mysql_connect(“localhost”, “root”, “123”); $db = mysql_select_db(“dados”, $conn); $query =…
-
2
votes2
answers935
viewsA: How to Debug Classic ASP in Visual Code
In Visual Code, what you will achieve is to activate the Highlight syntax. Here is a plugin that does this: https://marketplace.visualstudio.com/items?itemName=ilich8086.classic-asp And here’s a…
-
1
votes4
answers2698
viewsA: How to pass php array to javascript
Here’s an example based on the content you reported: <?php $quantidade = [10, 15, 8, 5, 6, 9, 10, 7, 8, 11, 4, 5]; ?> <div class="container"> <div class="row"> <div…
-
4
votes2
answers3906
viewsA: How to add values related to a line, searched with the Index + Corresp function in Excel?
According to your spreadsheet, the formula that will be inserted from cell F74 would look like this: =SOMA(ÍNDICE($B$70:$E$72;CORRESP($F$73;$B$70:$B$72;0);0))
-
0
votes1
answer31
viewsA: Subtract -1 from the mysql field’s own value
Following what you said, the query would be this way: "UPDATE tblQtd SET qtdItens = qtdItens-1 WHERE idItenRef = ".$id;
-
0
votes2
answers565
viewsA: Get Header information, javascript
By making a post using Jquery, you can get the status in case of error. From Jquery 3.0, you would do so: $.ajax("minha_pagina.php") .done(function(data) { //Sucesso console..log(data); })…
-
3
votes3
answers180
viewsA: Mysql - Create an alias by concatenating multiple fields
Another way to do that would be this: SELECT CONCAT_WS(" ", u.nome, u.sobrenome) AS nome_completo FROM usuarios u; The difference with CONCAT is that the separate is defined in the first parameter.…
-
0
votes2
answers30
viewsA: How do I make this list in the image
According to Victor’s response, you should import your CSS file into your HTML page. To change the bottom of the list, here is an example: <html> <head> <style type="text/css"> li…
-
3
votes1
answer2953
viewsA: Does anyone know how to resolve Error: "Failed to lookup view" in nodejs?
By the description of the error, it is not locating the admin/index path because it is inside the views folder, it would have to inform this path. Above the line where you activate the…
-
1
votes1
answer32
viewsA: How to create a function to add in php and save in mysql?
You can do this directly in Mysql If you have a "number" table and it has a "number" field, you can first add a record with the value zero INSERT INTO numeros (numero) values (0) In this way, you…
-
0
votes2
answers117
viewsA: How to get lower value without aggregation function - SQL
You would do this in SQL Server: SELECT TOP 1 * FROM estudante ORDER BY idade Mysql would look like this: SELECT * from estudante ORDER BY idade LIMIT 1…
-
0
votes2
answers329
viewsA: Javascript: remove accents and spaces
Here’s an example of a function that does this: <script type="text/javascript"> function remover_acentos_espaco(str) { str = str.replace(/^\s+|\s+$/g, ''); // remover espaco do comeco e do fim…
-
3
votes2
answers3919
viewsA: Check Even Numbers
Increment the variable "x" out of your IF. Change the code as follows: function pares(x, y) { while (x <= y) { if (x % 2 == 0) { console.log(x); } x++; } } pares(32, 321);…
javascriptanswered Bins 3,586 -
0
votes1
answer80
viewsA: Problem reading json file using PHP
According to the colleague’s comment, JSON is invalid. As it is an array, it is missing the [], the correct would be:…
-
2
votes1
answer39
viewsA: Reactjs doubt about nomenclatures
The translation of "Handle" would be "handle", this term is used when you want to link a certain programming (function) to some event of your system (eg "handleClick" would be the programming…
-
0
votes1
answer42
viewsA: Add Transition to Code
As commented, you can use Jquery for this, here is a small example. <!DOCTYPE html> <html> <head> <title>Animação com Jquery</title> <script…
javascriptanswered Bins 3,586 -
1
votes2
answers157
viewsA: Search that shows the contents of a div
Here’s an example of how to do this with Jquery: <html> <head> <title>Pesquisar</title> <script src="https://code.jquery.com/jquery-3.4.0.min.js"…
-
0
votes1
answer344
viewsA: Insert multiple columns and tables into a variable in mysql
You can select by joining the membership and order tables and use the result to add to the Caixaent table. According to the structure you showed, the query would look like this: insert into…
-
2
votes1
answer481
viewsA: Error Invalid 'EXAMPLE' column in the selection list because it is not contained in an aggregation function or in the GROUP BY clause
You need to insert the client column into your GROUP BY, the updated query is as follows: SELECT B.CLIENTE, A.CODCLI, SUM(A.VALOR-A.VALORPAGO) AS 'A RECEBER' FROM ARGCONTASRECEBER A INNER JOIN…
-
0
votes3
answers214
viewsA: Change style of the last two characters of the string
Here is an example using Jquery. It will take the content inside Strong and create a new HTML. In the example, a font tag was applied to change the color of the last 3 characters. <script…
-
0
votes1
answer2368
viewsA: How to change input value within div with Avascript
I tested your code. If you remove this line: document.getElementById('building_view').value = newVal; The two inputs you want to change receive the values. This is because the code is being blocked…
-
1
votes1
answer97
viewsA: Is there a Master Page in PHP?
You can use a template engine to do this, Smarty is one of the most popular. With it, you create template pages with the extension. tpl, and within these pages, you place the HTML and markup codes,…
-
1
votes2
answers1925
viewsA: Take Input values and insert into Onclick
If I understand your code, you want to send parameters to an external link at the same time you post form data to the internal page Whatsapp.php. You can try this with jquery, first access the link,…
-
0
votes2
answers68
viewsA: Query is not updating null values
It seems to me that this operator does not consider null values. To work, its UPDATE it should be like this: UPDATE base SET nacionalidade = 'Brasileira' WHERE (nacionalidade not in ('Americana',…
-
2
votes2
answers445
viewsA: How do I clear a list in Javascript?
Using Jquery, you can do it this way: <script src="https://code.jquery.com/jquery-3.4.0.slim.min.js" integrity="sha256-ZaXnYkHGqIhqTbJ6MB4l9Frs/r7U4jlx7ir8PJYBqbI="…
javascriptanswered Bins 3,586 -
1
votes1
answer18
viewsA: Save filter to tablesorter
If you are using a tablesorter version greater than or equal to 2.9 you can save the filter in the browser’s Storage location, then when the page is reloaded, the records remain in the same order.…
-
0
votes2
answers43
viewsA: Correlation in Javascript lists
There is a typo in your getMostEffective function, when you loop the array, it is legth instead of length . Make the following change: function getMostEffective(scores,costs,highScore){ var…
javascriptanswered Bins 3,586 -
1
votes1
answer401
viewsA: Hide columns in responsive mode
Using datatables.js you can set the display priority of columns by marking the header cells (tag th) with "data-Priority". Here is an example: <table id="example" class="display nowrap"…
answered Bins 3,586 -
0
votes1
answer43
viewsA: Procedure SQL Serve c/ ASP
What may be occurring is that Procedure may not be returning the result. Try to do it this way: <% sql = "EXEC despesasRatearBuscaPercentualDespesas" set bd = Conn.execute(sql) if not bd.eof then…
-
1
votes1
answer36
viewsA: Check that all items have the same value
From what I’ve seen of your code, you’re doing a foreach on "stockLevel", but it’s not an array, it’s within each item of the "Find Modes" array. I made a loop based on your object for you to have…
-
0
votes3
answers107
viewsA: Receiving e-mail without data
There are two ways you can avoid this, the first is the one already mentioned, which would generate Recaptcha. Here is a step by step example:…
-
1
votes2
answers162
viewsA: FREE components (Upload, Email and Jpeg) in ASP 3
For sending email, no component required, in ISS you have CDO.SYS, it is part of IIS from version 6. Here is an example of how to send a message with it: https://ajuda.locaweb.com.br/wiki/cdosys/…
-
0
votes1
answer492
viewsA: Export HTML table to dynamic Excel with the user
You can try to do the following, create a form separately from the table, when you click on export it first copies what was reported in the form to the table and then exports. I made a small…
-
1
votes1
answer192
viewsA: How to remove a certain element when making the site responsive?
You can use media queries to do this. It would be something like this: @media screen and (max-width: 300px) { //Ocultar colunas } There are two alternatives, one is the one you mentioned in the…
-
1
votes1
answer190
viewsA: Difficulty in select distinct sum
You can try to do this way SELECT email, MAX(totalcopias) as total FROM dados GROUP BY email This query will show you the largest total of each email. In case your need was to sum up all the copy…
-
0
votes1
answer114
viewsA: Insert Mysql Automatic Data
Using PHP, you can create a script that connects to the FTP server and reads the files. Here you have an example of connection using the ftp_connect function $servidor = 'endereco_do_servidor';…
-
0
votes1
answer239
viewsA: My php code for sending email is not being loaded
I ran a test using Xampp and the.php upload page was executed, but it showed an error message. On the sending page, make the following change in line 31 mail($destino, $assunto, $body, $headers); In…
-
1
votes1
answer43
viewsA: What does this cursor/pointer syntax mean in SQL?
SQL_MODE serves to define how SQL commands will be treated. For example, NO_ZERO_IN_DATE controls whether it will accept a date with month 0, and NO_ZERO_DATE defines whether it will accept a date…
-
2
votes1
answer27
viewsA: Total digit check in Mysql
You’d do it this way: SELECT * from minha_tabela where meu_campo between 10000 and 19999 and mod(meu_campo ,10) = 0
-
1
votes2
answers36
viewsA: How to select change <a> according to <select> with PHP
You can do this with Jquery, when you select something in the metric field, change the link address. You just need to put an ID on it. Follow an example: $(document).ready(function(){…
-
0
votes1
answer40
viewsA: Develop PHP or Javascript theme system
To create a theme, the concept is the same as an email marketing, IE, you have a layout that has markers that will be replaced by custom content at the time of shooting. Here is a tutorial that…