Posts by MarceloBoni • 6,385 points
228 posts
-
2
votes1
answer1065
viewsQ: Get the div from within to "overlap" the father
I have this following structure: .containerNome{ width: 97px; height: 23px; border: 1px rgb(0, 0, 0) solid; background: rgb(0, 0, 255); border-top-left-radius: 10px; border-top-right-radius: 10px;…
-
2
votes1
answer532
viewsA: Input with multiple HTML values
You can achieve the desired using the element input type='checkbox' JS code taken from here: https://stackoverflow.com/a/17422484 function teste() { var choices = []; var els =…
htmlanswered MarceloBoni 6,385 -
5
votes1
answer290
viewsA: Progress Bar to follow input text
In HTML5 there is an element called progress, you can use it to achieve your goal: $(function(){ $(".maxlength").keyup(function(event){ document.getElementById("progress").value =…
-
0
votes2
answers64
viewsA: Query Query 1:N
I believe it would work that way: SELECT e.nome FROM estoque e INNER JOIN atributos a ON e.id_estoque = a.id_estoque WHERE e.id_estoque = 'Z' AND a.nome like '%X' AND a.nome like '%Y'…
-
1
votes1
answer116
viewsA: Is it possible to add Owlcarousel to Highcharts?
Yes, it’s possible, you’re already working with div's, just put them all inside one another div and add the class that create that effect.... USING THE FLICKITY <div class="main-gallery">…
-
1
votes1
answer458
viewsQ: Inner Join table on 1 = 1 can be considered a gambiarra?
I have a table of provas and a table of alunos who have no direct relationship, I still have a table of inscrição aluno and a table of escolas, as follows in the modeling below: I need to create a…
-
1
votes1
answer107
viewsQ: Invert y value on canvas
I wonder if there is a way to reverse the y axis of the canvas so that the point (0,0) is actually the point (0,500).... That is, if I play the value 20 in the Y, instead of starting from top to…
-
1
votes1
answer844
viewsA: Complexity analysis
In analyzing the complexity of algorithms we must add the logical structures: Conditional; Repetitions; Entrances - Exits; Recursion Call for other Functions; Basically speaking, for any structure…
javaanswered MarceloBoni 6,385 -
6
votes4
answers82876
viewsA: Not IN or Not EXISTS which to use?
EXISTS is more performatic than the IN, but it is not a good practice, it depends on your need.... The in "creates" a structure of or’s in its sql condition, Exp: select * from tabela1 where…
-
1
votes1
answer165
viewsQ: Working with arrays, choosing only one data
I can have a composition of N elements in an array that can be arranged as follows for example: array with A, B, C and D... 12 possibilities. arr1 =…
-
6
votes2
answers4961
viewsQ: Calculate how long it takes to execute a function
I have to create a function in JavaScript that takes all id’s from one table and makes a draw with id’s from the same table so that the same id does not fall with itself, and there is a possibility…
-
1
votes2
answers923
viewsA: Merge table using a Subquery
Well, I don’t know if it’s really the great solution, but I managed to solve... Instead of trying to create this crazy logic of creating ONE left join with a case inside, I created two left's join:…
-
2
votes2
answers923
viewsQ: Merge table using a Subquery
I have 3 tables: inscricaoaluno, inscricaoescola and prova, with the following structures: PROOF IDPROVA | DESCPROVA | TYPE | QTDEMAX ENROLLED TEACHER | SCHOOL(IDESCOLA) | DTINSCRICAO | IDPROVA…
-
4
votes2
answers4925
viewsA: Send and receive variable to another page
To receive you can use this simple function JavaScript that takes the URL and decodes it, storing the parameters within an array: function urlDecode(string, overwrite){ if(!string ||…
javascriptanswered MarceloBoni 6,385 -
-3
votes4
answers174
viewsA: Is it possible to use PHP in a data-title field?
Yes, it is possible! I even believe that this was the initial intention to create these attributes in the HTML5. Create a more pleasant environment to the user without having to make several queries…
-
5
votes3
answers632
viewsQ: Replacement for TAG <center>
I have the following form: .table { max-width: 500px; border-collapse: collapse; font-size: 12; width: 320px; text-align: center; box-shadow: 2px 2px 2px 2px #aaa; } .table tr td{ padding: 8px 8px…
-
3
votes2
answers588
viewsA: Doubt about the MOD operator in PHP
The explanation has already been given by @chambelix, apparently, the operator mod (%) does not work very well in PHP when the negative divisor "module" (read the number without the negative sign)…
-
0
votes4
answers3898
viewsA: How to open and hide fields from a form by checking on button radio?
It depends on your dynamics, how you want it to appear, what your business rule is and everything else.... Follow an example: function ver(elemento){ if (elemento.checked){…
-
14
votes3
answers1255
viewsA: Display text at random
I would do so: (function() { "user strict"; var i, j, textos, teste, target; textos = [ "Bem Vindo!", "Fique de olho", "Porque", "Eu vou", "Ficar mudando", "Em um loop", "Infinito!!!" ]; i = 0; j =…
-
1
votes1
answer359
viewsA: Two selects with the same script
No need to create two functions window.onload just use one, and inside use another new dgCidadesEstados... Most likely just being read a onLoad in the creation of the form, so it did not carry the…
-
3
votes1
answer78
viewsA: Show data from BD
Please note that when you update your database, the data will already be updated when you display your movie query... Now, it all depends on how you’re doing to display your data, to automatically…
phpanswered MarceloBoni 6,385 -
1
votes4
answers1380
viewsA: Warning box after click div
A simple and elegant alternative without using libraries is to use the commands alert, prompt or confirm of JavaScript function teste1(){ alert("Alerta simples!"); } function teste2(){ var resultado…
-
2
votes1
answer2976
viewsA: How to clear form data after saving to database? via Ajax . net mvc
You can use the following line to reset the form automatically after return from Ajax: $('#id_do_form').each (function(){ this.reset(); }); Your code would look like this: $.ajax({ type: "POST",…
-
1
votes1
answer1733
viewsA: Check number of clicks on buttons
What Sergio said was right... Remember that JS is only loaded once on your page, so it should have a function that checks if your global variable has reached the 9 events of click... Js Puro:…
-
6
votes2
answers3377
viewsA: Meanings of data-value, data-title, data-... attributes in HTML
Are attributes included from the HTML5. Basically are attributes used to assist the developer in dynamic queries on the page itself without having to access a servidor -> BD. The data could…
htmlanswered MarceloBoni 6,385 -
1
votes1
answer2210
viewsA: Delete record without page refresh?
The question is, how are you doing to display the table? In a pagina.php alone, or via ajax, assembling the data dynamically.... If mounted on a single page, the solution would be to delete the line…
-
1
votes1
answer276
viewsA: Concatenate two strings superimposing their intersection substrings
Well, honestly, I don’t know what use a process of this kind would be easier to pass the new URL to the function that loads the new page, right? but anyway... I created the following function PHP:…
phpanswered MarceloBoni 6,385 -
4
votes1
answer297
viewsA: How to create a graph and the values shown in it will be in the BD
Well, I assume for that answer that what you want to find out is only how to use PHP + one API that draws graphics, and you have already created all the dynamics of data recording and recovery from…
-
1
votes1
answer1113
viewsA: Filter table data through checkbox
First the function will hide all lines, then it will take the value of the checkbox selected, and will search for the value in all elements that have the class selected (in your case nature), hence…
-
0
votes1
answer181
viewsA: Javascript controller
If that’s what I understand... you can work with the attribute onclick of img linking each image with a different page JS: function visualizar(qual){ switch (qual) { case 1:…
javascriptanswered MarceloBoni 6,385 -
0
votes4
answers1483
viewsA: Release link after completing form
There are several ways to do this Eden... One of them is using a library called Jquery-Validate, There’s another library I like called validationEngine At hand, using only Jquery features you can do…
-
0
votes1
answer1130
viewsA: how to compare with javascript two datepicker fields
I think you should know that for the datapicker working you should add his libs... In this case, besides the JQuery I’m using the library JQuery-UI: <link rel="stylesheet"…
-
2
votes1
answer1614
viewsA: Writing in Rectangle - HTML Canvas
Just add this after the ctx.fillRect: ctx.fillRect(0, 0, 100, 100); ... var message = "Mensagem"; //Define a mensagem ctx.font = '9pt Arial'; //Define Tamanho e fonte ctx.fillStyle = 'black';…
-
2
votes3
answers633
viewsQ: How to return the last query ID
I’m working with an Oracle bank I have two tables: Table Student: IDALUNO IDMATRICULA FASE Test Table: IDTESTE IDALUNO IDMATRICULA TESTE STATUS I also have a view that gives me the information of…
-
0
votes4
answers347
viewsA: Is there any way to detect if there are any asynchronous calls being run?
You can set the property async of AJAX as false, is a property that already exists in itself AJAX of JQuery By default, the method jQuery.Ajax comes with the parameter async set as true. That means…
-
0
votes3
answers4364
viewsA: What are decimal, hexadecimal, and octal notation numbers?
João.... this has more to do with computer architecture than with PHP proper, as the name itself says, are base numbers X, converted to another basis. To better elucidate the answer: They’re very…
-
4
votes1
answer4718
viewsA: How to update an iframe without refreshing the page?
Well, nowadays I don’t encourage the use of iframes, after I discovered some errors that it may entail regarding the passing of parameters and everything else.... But a while ago I found the…
-
0
votes2
answers424
viewsQ: Is it possible to perform colspan on Datatables?
I have the following structure in PHP implementing a table: foreach ($varConsulta as $lin) { $var1= $varConsulta[$i]['1']; $var2= $varConsulta[$i]['2']; $var3= $varConsulta[$i]['3']; $varFase=…
-
0
votes1
answer2545
viewsQ: Comparing data via Oracle Query
I have a table called Teste de aluno and a call Parametros I need to create a Query that compares if the test is in accordance with the Parameters The problem is that the tables are not 100% similar…
-
7
votes4
answers1799
viewsQ: Maximum amount of elements sent by a form?
I would like to know if there is a maximum amount of elements that I can send from one form to another POST as I saw GET. I know if I pass my data via GET, there is a maximum length of URL, varying…
-
1
votes3
answers10221
viewsA: Identify browser and its version
Check the User Agent from the browser, and do the treatment according to the result, you can discover this via server which received the reply request, and in the reply already do the processing of…
-
1
votes4
answers1730
viewsA: How to display "Update your Browser" warning when it does not support HTML5?
There are only two ways I know of finding out whether or not a browser supports the defaults HTML5 and CSS3 The first is to check the User Agent from the browser, and by making the treatment…
-
0
votes5
answers206
viewsA: Problems sending many variables through _GET
On the client side just send with a Submit button that all form data will be sent Exp: <form id="frmCad" name="frmCad" method="get" action="suapag.php"> <input type="text" id="1"…
phpanswered MarceloBoni 6,385 -
2
votes3
answers205
viewsA: Problems with logic (&& or ||)
What this passage tells us is that the selected value must be diferente de 3 E diferente de 4. Remembering that the logical operator != means difference and not equality. Another way to write the…
-
2
votes3
answers1128
viewsA: Draw characters in variable
So when Voce uses the command split, it breaks the "word" and transforms it into an array, each snippet it finds separated by the delimiter : it will store in an array space, if you want to continue…
-
1
votes2
answers189
viewsA: limit the for, php
A possible solution without using the JPaginate: HTML: < body onload="mostraDez()"> < input type="button" onclick="primeiro()" value="<<"/> < input type="button"…
-
4
votes1
answer287
viewsQ: Working with Canvas - No Edge
I have a canvas on my page and would like to remove the edge.... only I’m not getting... which property works with the edge? function desenhaBase(canvas, context, x1, y1, x2, y2){ context.fillStyle…
-
2
votes1
answer4666
viewsA: How to save checkbox options in the bank?
So many fields CheckBox how many fields RadioButton serve the same purpose, I have an example that I do as follows: HTML: DES2 <input type="checkbox" name="motivo[]" id="DES2"…
-
1
votes1
answer560
viewsQ: Conversion from Infix to Fixed Value
I have to convert an Infix value to Posfixo Examples: The problem with my algorithm is that last line.... I believe the problem is in expressions with + 2 terms within parentheses, like: (X * Y + Z)…
javascriptasked MarceloBoni 6,385 -
2
votes1
answer196
viewsQ: Converting a. NET algorithm to JS
Fellas, I’m having a little problem converting an algorithm. In the algorithm in .net i have the following conditional structure: if (')' == caracter){ String item = pilha.Pop().ToString(); while…