Posts by Gabplay • 502 points
27 posts
-
0
votes1
answer560
viewsA: Error while uploading image (Cordova-plugin-file-transfer)
After trying several solutions and nothing works, I decided to remove the Cordova plugins and add again, I don’t know exactly why but it finally worked! cordova plugin remove cordova-plugin-file…
-
4
votes3
answers309
viewsA: Fibonacci sequence does not work
The second conditional block was incorrect, because the variable i was different from 1 or 2 would enter the else, so Fib[0] was wrong. #include <stdio.h> #include <stdlib.h> int main(){…
-
1
votes1
answer560
viewsQ: Error while uploading image (Cordova-plugin-file-transfer)
I’m using the same code as documentation, but when sending to PHP, no file appears. JS function uploadPhotoRevendedor(imageURI) { var success = function (r) { app.alert("Code = " + r.responseCode +…
-
0
votes2
answers57
viewsA: Restrict . htacess rules to a single folder
I will leave the solution here as it may be useful for other users. After many searches I found that it is necessary to create an httpd.conf file with the tag directory to limit rules only to the…
-
0
votes2
answers57
viewsQ: Restrict . htacess rules to a single folder
I need to optimize a page that is inside a folder /website and would like to enable cookies, but they cannot be enabled for other folders. How can I make a condition or rule that limits only to that…
-
1
votes1
answer52
viewsA: Double menu with jQuery
To make this "second menu" effect, you can change the CSS when the page position is greater than x. With that jQuery: $(window).scroll(function(){ x = 100; if ($(this).scrollTop() > x){ //…
-
1
votes2
answers155
viewsA: How do I not get the site bugged when I lower the screen and have a problem with a button going up in CSS?
As for your first question, try to put a percentage for each space. Create a div to store the texts and thus separate a size in percentage. Example: #wrap{ max-width: 100%; } #foto-f-society{ width:…
-
1
votes1
answer96
viewsA: Doubt Nesting of Structs
I think it would be right to use &vcarrinho[posicaovenda].estoque.codigo, because the struct Carrinho that has the struct Product. Maybe some error occurs by creating vectors with different…
-
1
votes2
answers264
viewsA: Add code before the </head> and after the <body>
Using jQuery is much simpler. Could use the function .append(), to insert into "head", thus: $("head").append("<link rel='stylesheet' type='text/css'…
javascriptanswered Gabplay 502 -
1
votes1
answer893
viewsQ: How to optimize iframe load time?
I have a page with several "iframes" youtube that are taking considerably to load. I wonder if it is possible to decrease this loading time or if it is not possible, how to put an animation until…
-
0
votes3
answers87
viewsA: How to make animation to show the rest of the paragraph?
You can select the element and use .slideDown() to show it, or .slideToggle() if you want to show and hide on the same button. $("#paragrafo").click(function()){ $("#detalhes").slideDown(); });…
-
1
votes2
answers1513
viewsA: Calculating Series in Python
According to your serial example and using the same variables (x and n): serie = 0 x = int(input("Digite o valor de x: ")) n = int(input("Digite o valor de n: ")) for i in range(1,n + 1): serie += x…
python-2.7answered Gabplay 502 -
0
votes1
answer61
viewsA: How to disable Jquery script on mobile devices? Is it possible?
You can put a condition if the width of the screen is greater than 768, run the script, otherwise nothing will be executed. if ($(window).width() > 768) { //Codigo }…
-
4
votes1
answer179
viewsA: Form does not appear
You are hiding all inputs inside the div that has the "scroll" class in this CSS code: .scroll input{ display: none; } When you don’t allow the central content to be on top of the header, you can…
-
0
votes2
answers5472
views -
0
votes3
answers624
viewsA: How to add a scroll bar in Popup with css?
Use the attribute overflow: auto, this will cause a scroll bar to appear as soon as the height or width of the div exceeds the defined height or width.
-
1
votes1
answer1958
viewsA: How to make the automatic animated scroll effect?
The side menu with the items is fixed by CSS: position: fixed and the line height indicating which item is currently appearing is modified with each scroll of the page. Just like the function of…
-
1
votes1
answer234
viewsA: Print all results of a vector with a given value
I could follow that logic: case 5: //MOSTRA POR CARGO printf("Digite o codigo do cargo:\n"); printf("\n 100\tEngenheiro\n 200\tMestre de Obras\n\300\tPedreiro\n 400\tEstagiario\n"); scanf("%i",…
-
2
votes1
answer591
viewsA: Responsive image adjustment in div box
Just use the property max-width and set to 100%. This will cause the div to adjust the width of the screen, but will never be larger than the original. Take a look:…
-
1
votes1
answer70
viewsA: I can’t get this program to work. It always says the numbers are divisible
For a number to be considered divisible by another rest of the division (%) between them has to be equal to 0. Ex: 6 / 3 = 2 and rest = 0. When you do if (a%b), this condition will be true if the…
-
1
votes1
answer73
viewsA: Validate form if variable1 is greater than variable2
The logical operator and if the first one is not correct, so it is always falling in Else. The right thing would be && instead of &. It also seems that there is a } unnecessary at the…
-
1
votes1
answer111
viewsA: Hide only daughter lines
Your selection is probably not working properly. The function .Closest("tr") looks for the predecessor "tr" element, while .next() looks for all successor sibling elements, ie toggle is being…
-
0
votes6
answers906
viewsA: Convert text from div to number
The above answers already solve your problem well, but if you want to take a look at this library http://openexchangerates.github.io/accounting.js/. I have used to convert text in USD in a game, it…
-
1
votes1
answer57
viewsA: toogle menu not returning to desktop media query
Don’t forget to include the meta tag in the html head: <meta name="viewport" content="width=device-width" /> The menu is enabled / deactivated with jQuery, so when deactivated at a lower…
-
1
votes1
answer60
viewsA: Navbar with scroll using Semanticui
I don’t know this framework, but maybe it helps this example in jQuery: $(window).scroll(function() { var alturaInicial = 200; // Valores de Exemplo var alturaReduzida = 75; if ($(this).scrollTop()…
-
0
votes1
answer75
viewsQ: CSS / jQuery - How to select the next element after main?
Basically, I’m giving a margin-top on the first content after the header, according to the header size. The problem is that each page of the site has different elements after the main (div or…
-
2
votes2
answers70
viewsA: I can’t place a list
It’s probably because of the css of the submenus... Try to place each li #menu -> position: relative After that, you adjust each submenu (position: Absolute) with top and left. EDIT: I created an…