Posts by Sveen • 1 point
68 posts
-
0
votes1
answer27
viewsA: How to resolve duplicate mainpage on the site?
Your html document has an invalid rel="Canonical". This ends up making the robot read duplicately. https://web.dev/canonical/? utm_source=lighthouse&utm_medium=devtools Should be…
-
2
votes3
answers63
viewsA: Vue JS - How to display a list interspersed between property and value?
<table> <tr v-for="(value, name, index) in lista"> <td class="propriedade">{{name}}</td> <td class="valor">{{valor}}</td> </tr> </table> If the item…
-
-2
votes1
answer22
viewsQ: Actions On Google does not persist data from conv.user.params
When creating an Action for Google Assistant, in Backend (Webhook Fulfillment) I am using conv.user.params (User Storage) to store user data (as it is in the documentation). A simple example of use…
-
0
votes1
answer22
viewsA: Actions On Google does not persist data from conv.user.params
It turns out that some users, in their Google account, in the "Web Activites" part comes disabled by default the "Include Chrome history and activity on websites" option, so Action will never save…
-
0
votes1
answer162
viewsA: How to style an option selector
I believe that it is not possible to style, because it is rendered internally by the browser, that is, in some browsers it can work, and others it cannot. You can try styling an option for whole.…
-
3
votes1
answer1298
viewsQ: FULL OUTER JOIN generates errors
I am trying to run the following Mysql script SELECT `AccessDayClass`.`total` AS 'em aula', `AccessDayNotClass`.`total` AS 'em casa', `AccessDayClass`.`DateOnly` AS 'week' FROM `AccessDayNotClass`…
-
1
votes1
answer109
viewsA: help setting char inside the if in C
if(opcaoPersonagem == 1){ FILE *fptr; char c; char filename[100] = "personagem1.txt"; fptr = fopen(filename, "r"); c = fgetc(fptr); while(c != EOF){ printf("%c", c); c = fgetc(fptr); } fclose(fptr);…
-
2
votes1
answer803
viewsA: Sorted list C++ struct
There are some things wrong with your code, the unordered list would be so struct mundial { int ano; const char* sede; //usar ponteiro em vez de array const char* campeao; //usar ponteiro em vez de…
-
1
votes4
answers71
viewsA: Repeat zebra style color only 5 by 5
You can do it using only css with Nth-Child var collection = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]; var html=''; for (var i in collection) {…
-
0
votes2
answers244
viewsA: Do you have the ability to make a toggle button with two buttons?
Puts a class for the two Buttons , type toggle-btn function applyTheme (theme) { document.getElementById("mypage").className = theme; //localStorage.setItem ("theme", theme); } function…
-
-1
votes2
answers88
viewsQ: Unrecognized keyword "as"
I am using MYSQL together with Phpmyadmin 4.7.4, and it accuses that the keyword 'as' is not recognizable, but when running it is in infinite loop, and shows no result. SELECT c.`nome`, case…
-
2
votes2
answers263
viewsA: How to avoid array overflow in C++?
Complementing the Maniero solution. This is a problem of dynamic semantics, in which it is only possible to know if a critical error will be generated during execution, so it does not become a…
-
0
votes1
answer300
viewsA: Exception error in Dynamic List C++
The problem is here Celula x; The value of x in the constructor is lost when exiting the function as it is a local variable. With this origem and fim become uninitialized values generating access to…
-
0
votes1
answer49
viewsA: Open Dynamics Engine does not recognize collision between cylinders
Thanks for the help of the comments. To solve this problem I needed to recompile the library ODE (Open Dynamics Engine) together with the application libccd (Library for collisions between convex…
-
2
votes1
answer49
viewsQ: Open Dynamics Engine does not recognize collision between cylinders
I’m using the library ODE (Open Dynamics Engine) to simulate physics in my application. To create the bounding box and cylinder geometry I am using the following code dMass m1;…
-
0
votes1
answer41
viewsA: How to improve the performance of a program by dividing executions into C-linked processes?
It is difficult to divide a task into several processes, because it needs the data to be very independent (only for flags and some pointers to avoid competition problems), and that the processes run…
-
4
votes2
answers39
viewsA: Function reference
You are accessing the scope of the function funcaoObj, however, as it was not found it rises one level to the global scope, the object itself does not have a scope as if it were a Class. To access…
javascriptanswered Sveen 1 -
0
votes1
answer232
viewsA: Successive loops in Assembly
Using the MOV from the x86 instruction set you can recover a word (WORD, 2 bytes) memory from an address. We assume that in the address 0200 and 0201 the value for AX is stored, and 0202 and 0203 is…
-
1
votes1
answer649
viewsA: Query in very long delay tables? Mysql
Storing arrays in tables is a good programming practice? Database does not save Array, but String, such as JSON. Then see that it gives in the same as saving as string. The problem is in maintenance…
-
1
votes1
answer21
viewsA: Help with SQL query
Use the clause LEFT JOIN, because it will take all independent tag registrations or not. Also, using JOIN it is no longer necessary to make projection between the tables filtering by WHILE, that is…
-
1
votes1
answer413
viewsA: Extending Parent Class method in C++
Object Orientation in C++ is quite different from Java, you need to make the method mostrar0 of the Father class also as virtual to be possible to define it in the Son class. The public does not…
-
0
votes1
answer75
viewsA: Multiples Inserts with JS (works in the browser but in the app generated by phonegap build not)
Explanation Whenever you run a loop, the variable value query is changed (even before it is executed), so when the first transaction is executed it will take the value that has already been changed…
-
3
votes1
answer104
viewsA: each() discontinued in PHP
Use foreach instead of while and each foreach($arr as $v) {
-
0
votes3
answers421
viewsA: Effects together with smooth scroll
Refer to the easing types to change the shape that Animate takes on. https://api.jqueryui.com/easings/ var easing = "easeOutBounce"; $doc.animate({ scrollTop: $( $.attr(this, 'href') ).offset().top…
-
5
votes3
answers624
viewsA: Doubt about recursiveness in C
Changing only the call order, but keeping the same direction: return (soma(n/10) + (n % 10)); Each time you will call the same function again, you are passing the number without the first digit on…
-
0
votes1
answer91
viewsA: Submit button only updates the BD after pressing F5
Header does not transfer $_POST or $_GET data between PHP pages, only sets the HTTP header and redirects the user. http://php.net/manual/en/function.header.php You should use a include, that…
-
2
votes2
answers209
viewsA: Repetitive snippets of HTML
Put html inside a PHP file and do include, it will print everything in it. Basic example of user listing: profileLayout.php (to perform include) <img src='<?= $usuario['foto_perfil']…
-
1
votes2
answers1557
viewsA: Change the color of an SVG by a button
The tag 'Img' does not have this support (to change components) for SVG, it simply renders as a matrix image for your html. It is only possible to change SVG color if you change the code within the…
-
1
votes2
answers524
viewsA: Settimeout does not work
They wait the 3 seconds however, all timeouts will be released after 3 seconds, at the same time. You must use a counter, so that the second timeout comes out after 6 seconds. var cont = 1;…
javascriptanswered Sveen 1 -
0
votes1
answer26
viewsA: Variable returning null value
Make sure you are calling the Precedent correctly: SET @id = 1; CALL armazena_nome(@id,@alimento); SELECT @alimento;
-
1
votes1
answer69
viewsA: Script "more beautiful"
There is no certain, not always making the code smaller can help you (example: the lack of Try Catch can harm the handling of errors). Other Examples: Create a class to store Scripts SQL separate…
-
2
votes1
answer123
viewsA: When to do unit tests in Javascript?
Starting from Software Engineering (but summarizing). Unit tests are derived from test cases, which in turn are based on use cases. You would need to have a documentation of your system with: List…
-
4
votes1
answer3432
viewsA: Is there any risk in using "SET FOREIGN_KEY_CHECKS = 0"?
I wouldn’t say it would cause problems for your database, in 100% of cases, making sure that it doesn’t bring harm in the future. I use this functionality only to recover backups, but never during…
-
0
votes1
answer166
viewsA: What are these sql modes for in mysql?
They are setting flags or settings for the next queries to be executed. They are usually automatically placed while exporting the database to avoid incompatibility or problems in other older…
-
0
votes1
answer701
viewsA: Thread - Shared Memory Access Violation
Thanks for the tip in the comments. According to the opengl documentation, glTexImage2D can generate error during transfer if the image is 4-bit size. You create Storage for a Texture and upload…
-
0
votes1
answer241
viewsQ: Object doesn’t support Property or method 'prepend'
I am trying to make my WEB application compatible with Edge Browser. But I get the message "Object doesn’t support Property or method 'prepend'" on the console when I try to run the following code:…
-
0
votes3
answers167
viewsA: Doubt about C pointers
I believe the other statements are incorrect. Not being a variable statement: *ponteiro would mean access to the first memory address, where the value is stored; ponteiro would mean the value stored…
-
1
votes2
answers102
viewsA: My first Javascript code doesn’t work. Now what?
document.body.innerHTML += "<h1>Teste1 foi acionado!!!</h1> "; Missing the quote button. And the script goes on Body <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 5.0//EN"…
-
0
votes1
answer207
viewsA: Static modifier in an attribute
public class Stuff { public final static String NAME = "I'm a static variable"; } And in another package, since it was correctly performed the import public class Application { public static void…
-
2
votes2
answers253
viewsA: How many decimal places does the Browser accept or recognize?
Each browser works in a different way with floating points. To ensure it works properly, you can work with fractions and Calc. For example: width: calc(100% / 3); Source:…
-
0
votes1
answer56
viewsA: In the vector category pair<string, int>: When adding a new string, check whether a future string has the same value as an already added string
It is possible to work with vector, but the search would be linear. But with map you are using Red-Black Trees, which allows a faster search of pairs already inserted.…
-
1
votes1
answer3783
viewsA: GENERATE PHP REPORT
Below an example working with mPDF with codeigniter, in case I import PDF controller, and send $data to the views report/pdf/body and report/pdf/body, where I store the PHP that will generate the…
-
0
votes1
answer701
viewsQ: Thread - Shared Memory Access Violation
I use a library to retrieve data from an Image (in unsigned char*), and use it to allocate to an Opengl Buffer (Texture). Since the image can be large, Opengl by default creates another thread to…
-
1
votes1
answer348
viewsA: How to cascade an Insert into several tables at once, when one works the other?
Using Mysql PDO con = new PDO( ... dados da conexão ...); you start the transaction with con->beginTransaction(); after each sql execute (as you wish), you recover the ID of the last inserted…
-
1
votes2
answers353
viewsA: How to test site on screens of different sizes
In addition, you can use the Android SDK, that can be installed through Android Studio, to simulate the application on the Smartphone or in a virtual machine. This may take a long time to download,…
-
1
votes2
answers124
viewsA: How to organize an Array in order of Time?
Search for Split String in C# (to split the string into string array, separating by ":"(colon)), then turn the 3 string into a single integer value (creating a list of integers) hora = array[0];…
-
3
votes1
answer2013
viewsA: Open link in another HTML browser
By security it is no longer possible for a browser to access other applications within your operating system. Unless the goal is to get some file or access read devices, the browser cannot run…
-
1
votes1
answer2100
viewsA: Include in file with include
All the includes calls must have the same relative path as the parent file. If you did include "../header.php", all includes within header.php should be include "../../acoes/arquivo.php" So in your…
-
1
votes2
answers867
viewsA: Navbar changing color to scroll
use document.body.onscroll = () => { //... função igual aqui ... } And missing ID on navbar <div class="navbar" id="nav">
-
1
votes1
answer89
viewsA: Opengl Unbind Texture?
Three Alternatives I Found and Worked: First Alternative: Different Shaders Use a different Shader for objects with specular and diffuse texture, and another Shader for objects with only diffuse…