Posts by echojn • 1,141 points
29 posts
-
6
votes3
answers919
viewsA: How to make a pure css spinner?
The strategy we use is to take a square, round the edges with border-Radius 50%, paint the edges with a color Transparent or equal to the background, then you just paint a piece of the edge of the…
-
1
votes2
answers65
viewsA: Function that runs for and goes excluding according to condition
What happens is the following. In the example given your array has 4 items. When starting the is, it will try to go through the 4 items. However, after it removes the first element that enters its…
-
1
votes2
answers165
viewsA: How to display/hide a field(input date) from a select field?
I did it using Jquery. If you cannot use Jquery, implement the method .show() and .hide() by switching the display property between values none and ''. $('select').on('change', function() { if…
-
1
votes1
answer393
viewsA: Send multiple mailing lists from Mysql with Phpmailer
The problem occurs in the method AddAdress, you need to set one email at a time, as in the example below. $mail->AddAddress('[email protected]', 'First Name');…
-
0
votes2
answers1061
viewsA: Convert dd-mm-yy date to yyyy-mm-dd in Java
Something like this should work, just be aware of the month of your date.. it must be abbreviated in English (jan, Feb, mar, Apr, may, jun, jul, Aug, Sep, Oct, nov, Dec) DateTimeFormatter…
-
13
votes5
answers4828
viewsA: With CSS is it possible to put 2 colors in 1 letter? Or half the text with a different color?
Using only CSS to do it this way h1 { font-size: 72px; background: -webkit-linear-gradient(left, red 10%, blue 0%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; } <h1>…
-
17
votes5
answers4828
viewsA: With CSS is it possible to put 2 colors in 1 letter? Or half the text with a different color?
You can use an SVG with text inside it. <svg width="200" height="80" xmlns="http://www.w3.org/2000/svg"> <defs> <linearGradient id="bicolored"> <stop offset="33%"…
-
0
votes1
answer49
viewsA: Doubts in the functioning of a CRON task, No and how to SCHEDULE and yes the FUNCTIONING of it
cron respects the schedule you made, if it is 1 in 1 minute, it will start the 1 in 1 minute script regardless of the previous run being finished. You can, in your script or program, implement a…
-
0
votes1
answer43
viewsA: Doubt methods Javascript
The two ways are right. javascript works with the concept of anonymous function, is called anonymous precisely because you do not need to define a name to it, as below. function (){ //code } This…
-
0
votes1
answer51
viewsA: Disabled input does not pass to $_POST
Use the attribute readonly instead of disabled.
-
0
votes2
answers123
viewsA: The Observable is not accepting Catch
Since Observable is asynchronous, Try/catch does not work. You should set an error callback as the example below angular documentation: myObservable.subscribe({ next(num) { console.log('Next num: '…
-
3
votes2
answers3010
viewsA: Mongodb connection with nodejs
Use the Mongoosis. Here’s an example of how to open the connection var mongoose = require('mongoose'); global.db = mongoose.connect('mongodb://localhost:27017/neventos');…
-
0
votes2
answers47
viewsA: disable buttons by name
The problem is because when you search for the elements by name podem existir vários elementos com o mesmoname(o que é o seu caso), então ogetElementsByNameirá retornar vários elementos. Para setar…
javascriptanswered echojn 1,141 -
1
votes1
answer255
viewsA: Change the style, "display" attribute, of a canvas in Javascript
You can pick it up by the id document.getElementById('bordas').style.display = "block"; Or by class (if you want to change to all elements that use this class) var elementos =…
-
0
votes2
answers21
viewsA: How to eliminate registration in a modal without closing?
Using the ev.preventDefault(); as in the example below $(function () { var frm = $('#contactForm1'); frm.submit(function (ev) { $.ajax({ type: frm.attr('method'), url: frm.attr('action'), data:…
-
0
votes1
answer18
viewsA: How to insert an array of unknown size within the database?
Supposing $this->db be your Mysqli connection public function addItemCaja($teste) { $stmt = $this->db->prepare("INSERT INTO item_juego (id_caja, id_item, cantidad) VALUES (?, ?, ?)");…
-
40
votes2
answers897
viewsQ: <br> is obsolete?
With the advent of responsive/adaptive/fluid layouts, the use of <br> to define layout spacings. Using it is not recommended in these modern layouts or is it just a matter of programming…
-
0
votes2
answers52
viewsA: Remove information select html
If you are using Jquery $('#quantity').find(":selected") The pure javascript analogue is var e = document.getElementById("quantity"); var selected = e.options[e.selectedIndex].value;…
-
0
votes2
answers56
viewsA: PHP array / json
Try this: //inicializando arrays $myArray = array(); $arrayProducts = array(); //montando array de produtos foreach ($array_opcionais as $produto) { $arrayProducts[] = array("product_id" =>…
-
1
votes4
answers5062
viewsA: Check empty variable in PHP
That page shows the comparison between the functions Empty(),is_null(),isset()... You can verify the one that best applies to your case…
-
0
votes2
answers516
viewsA: Update or Insert with data from another table
To do the Insert of what is not in your request table you can use the SQL below INSERT INTO requisicoes (numero_requisicao, projeto) SELECT b.numero_requisicao, b.projeto FROM requisicoes a LEFT…
-
0
votes2
answers3616
viewsA: target Blank right in the URL
Right in the url will not have how. The only possible way would be to insert a javascript code on your page. For example, if you add the code below, every time you click on any element of your page…
-
0
votes1
answer158
viewsA: Different coding problem when recording data via PHP project or direct from Mysql
Mysql’s "utf8" is not quite UTF-8, as it only supports 3 bytes per character, while real UTF-8 - which everyone uses, including your PHP application - requires 4 bytes per character. This is one of…
-
1
votes3
answers2014
viewsA: Video continues running at close modal
Thus: $('#youriframeid').attr('src',$('#youriframeid').attr('src')); If you do a ". remove()" and then open the modal again, your video will no longer be there. Depending on your need also meets,…
-
0
votes1
answer24
viewsA: What is a Distributed Cluster?
A distributed or parallel processing system is a system that interconnects multiple processing nodes (individual computers, not necessarily homogeneous) so that a large consumption process runs at…
-
1
votes1
answer599
viewsA: I can’t put picture in the background
background-image: url('../imagens/back.jpg');
-
2
votes2
answers381
viewsA: How to find out if your browser console is open?
According to that answer: Find out whether Chrome console is open. One of the ways to do it is the one you are using. The other is the following: var devtools = /./; devtools.toString = function() {…
-
-1
votes3
answers141
viewsA: Program Interface only once
I believe that one way to do this would be to use a webapp. Take a look at this one tutorial from Google Developers to see if he’ll see you.…
-
1
votes2
answers184
viewsA: Can anyone explain this mistake to me?
Do the Insert in the [Suppliers] table before doing the Insert in the [Products] table. With this, the database will be able to locate the record of the vendor you are trying to reference in that…