Posts by NoobSaibot • 9,554 points
354 posts
-
0
votes1
answer747
viewsA: Message no Component Snackbar - Angular 4 Material
Instead of using the method open you must use the method openFromComponent that allows you to customize the content of Snackbar. Create a component and a template, follow a small example: Filing…
-
11
votes4
answers9155
viewsQ: Change the background of input filled in by Chrome autocomplete
I am creating a form, and as everyone knows, the browser has the option "auto-fill", so far so good, but I came across the following situation: As you can notice in the image above, the field that…
cssasked NoobSaibot 9,554 -
3
votes2
answers2096
viewsA: How to make the system display an error message when it is not number?
If it is only integers, you can use the function isdigit() or isnumeric() but cannot convert the input to int. Behold: isdigit(): Return true if all characters in the string are alphabetical and…
pythonanswered NoobSaibot 9,554 -
0
votes1
answer77
viewsA: Formjson PHP for CURL ,
Using Curl would look like this: $content = array( 'oid' => '00SH1000000ASZF', 'retURL' => 'https://www.site.com.br/', 'first_name' => $nome, 'last_name' => $sobrenome, 'cpf__c' =>…
-
0
votes1
answer543
viewsA: FPDF with Mysql and PHP - Bringing Repeated Data
I tweaked your code but I believe it is in the result you expect, just making the changes as you need it, I believe you can have easier ways to get the result. Down with the working code: require…
-
1
votes1
answer2293
viewsA: Send Image along with text to Discord Using Webhooks
There are several ways to do what you want using CURL, one of her is: $data = array("content" => $message, "username" => "News", "file" => "ENDERECO_DA_IMAGEM/IMAGEM.jpeg"); // Se sua…
-
1
votes2
answers70
viewsA: find input value does not work
The problem is that you are trying to access an element by a selector that has not been defined, see: You’re trying to access how .numero_questao and you did not assign this value to the field, on…
-
3
votes2
answers1622
viewsA: Try/Catch Pdoexception does not work when error occurs
You need to set the setting PDO::ATTR_ERRMODE for PDO::ERRMODE_EXCEPTION. $conn = new PDO($host, $usuario, $senha); $conn->setAttribute(PDO::ATTR_ERRMODE, $conn::ERRMODE_EXCEPTION);…
-
-1
votes3
answers1628
viewsA: Convert seconds into days
You can get the expected result using the class Datetime, take the example: We created a function to facilitate use: function converterSegundos($segundos, $formato) { $dtF = new \DateTime('@0');…
-
3
votes3
answers512
viewsA: Jquery monitoring key sequences
After scanning each value, the handheld scanner is already set to give a <TAB> and go to the next field, making it very practical in the repetitive use of this form. Then I believe that the…
-
2
votes2
answers128
viewsA: I can’t get the value of a child element
The ways to solve the problem: Make association of events Click for the elements already in the GIFT and for those created subsequently. $('table').on('click', 'a.username', function(e){…
-
2
votes3
answers1626
viewsA: Check Availability of CEP
Here are some examples of how to check ZIP CODE for Cities, to use just create an object with the first five digits of the range Ceps, example: The city of Campinas which is in the state of São…
-
1
votes1
answer369
viewsA: How do I relate tables with json returns to php?
According to the documentation of Mysqli, you can use the method query in two ways: Procedural style is the one you’re using. $con = new mysqli("servidor", "usuario", "senha", "banco"); $qry =…
-
2
votes1
answer515
viewsA: Catch SRC value from Source tag with JS
You don’t need all this if you only have one video on the page: var tag= document.querySelector("video source").src; alert(tag); <video id="vp1_html5_FC" preload="auto" width="100%" height="100%"…
javascriptanswered NoobSaibot 9,554 -
4
votes1
answer774
viewsA: Monitor file and or directory
Update 1 Monitor acquisitions and directories using the library Node-watch. let watch = require('node-watch'); watch(['arquivo.txt', 'teste/', 'teste/arquivo.txt'], console.log); Behold running on…
node.jsanswered NoobSaibot 9,554 -
3
votes1
answer774
viewsQ: Monitor file and or directory
I have this method that performs the reading of the file const fs = require('fs'); const path = require('path'); let arquivo = path.join(__dirname, 'arquivo.txt'); fs.readFile(arquivo, { encoding:…
node.jsasked NoobSaibot 9,554 -
3
votes1
answer898
viewsA: How to do button to confirm if you want to quit the page?
Simple, use the event Onbeforeunload or beforeunload it is called before the window is closed. See examples: Onbeforeunload function confirmaSaida() { return 'Você deseja realmente sair da página?';…
javascriptanswered NoobSaibot 9,554 -
1
votes1
answer39
viewsA: How to use taggleClass for 3 different css?
I believe that’s what you want. $(document).ready(function(){ $('#abre').on('click' , function(){ // abre tudo $('.titulo .conteudo').show(); }); $('#fecha').on('click' , function(){ // fecha tudo…
-
2
votes1
answer229
viewsA: Remove an Imageview
You can do it like this img1.setImageResource(android.R.color.transparent); Another possible solution would be img1.setImageDrawable(null);…
-
0
votes1
answer30
viewsA: I want to recognize Cpf in the table, display a page with other data. Where am I missing?
The error is happening because you are using the old extension method Mysql mysql_num_rows shall change to the new method mysqli_num_rows. The method mysqli_num_rows gets the number of lines of a…
-
0
votes1
answer58
viewsA: Problems with forms
I think you should write your code again Javascript, take this example: $( "#formulario" ).submit(function( event ) { event.preventDefault(); $.ajax({ method: "POST", url: $(this).attr('action'),…
-
0
votes1
answer238
viewsA: Error starting a new app on Ionic
You have already set up the Git ? To make a Commit, the Git need to know your name and e-mail address. The goal of the tool is not only to track code changes, but who made the changes! To configure,…
-
2
votes1
answer1340
viewsA: Error while starting Apache
You have edited the file /etc/apache2/sites-enabled/000-default.conf and forgot to specify the door, and to close the directive Virtualhost. AH00526: Syntax error on line 1 of…
-
2
votes2
answers80
viewsA: Use get_object_vars in a child class
You have defined the variables $teste and $outro as being private ( Private ), that is, we cannot access from other descending classes. In order for the method to work as desired, you must define…
-
3
votes1
answer891
viewsA: How to display the time in 24 hour format using datetimepicker?
Simple, you are reporting in time format h in minuscule, so that it works in mode 24 hours you must inform him in capital letters H. jQuery.datetimepicker.setLocale('pt-BR');…
-
0
votes3
answers1243
viewsA: How to select the content of an input in ng-Focus?
The correct is to use the event mouseenter. This event is triggered when the mouse cursor is placed on an element, if the user moves the mouse over that element, the event is not triggered again.…
-
2
votes2
answers4381
viewsA: Height of Row in bootstrap using percentage (%)
First let’s understand why !important does not work in this case. The standard document size HTML and your body ( Body ) is auto, this size changes as elements are inserted into them, but it still…
-
2
votes1
answer471
viewsA: Ionic 1: Error compiling for iOS - [ERROR] An error occurred while running Cordova build Ios (Exit code 1)
Possibly this plugin had its URL altered, it may be that the same was in: https://registry.npmjs.org/geolocation So in his config.xml change the line: <plugin name="Geolocation" /> To:…
-
5
votes1
answer1382
viewsA: Uncaught Typeerror: Cannot read Property 'validaDocument' of Undefined
The problem lies here $(function(){ $(".validar").validationEngine("attach"); function validaDocumento(field, rules, i, options){ return true; } $(this).submit(function(e){ e.preventDefault(); });…
javascriptanswered NoobSaibot 9,554 -
0
votes3
answers839
viewsA: GRID bootstrap system - col-Xs-X does not recognize width
Reading the documentation you will see that there has been a change, it has been simplified rather than col-xs-N now you can just col or col-N, see below: In this example, we create 4 columns…
-
1
votes1
answer85
viewsA: Is there the possibility of creating a popup and inside it a textbox to type something?
Yes it is possible, see. Obs: Response edited, because I was at work and in the rush did not notice the tags. Install the package Nuget Xamarin.Android.Support.V7.App; Create a Layout, I’ll name him…
-
3
votes1
answer5830
viewsA: How to run shell commands on debian startup?
Follow the steps: Create a file for your script and write the commands in it. $ sudo nano /etc/init.d/SEUSCRIPT Example: #!/bin/bash echo "Script de exemplo" Save and get out: CTRL+ X, Y, ENTER…
-
2
votes1
answer1966
viewsA: Vue-router <router-view> does not error but does not render
The problem is that you forgot to inform the home page ( Component ), we will rewrite this code, follow step by step: Create the file main.js import Vue from 'vue' import App from './App' import…
vue.jsanswered NoobSaibot 9,554 -
1
votes1
answer1312
viewsA: How to call a function from a.js file in index.php itself in the script
This is very common here, and the question this order, you are trying to access a method that is not yet in the document, because you are importing the file Javascript at the end of the document. Do…
-
0
votes1
answer2236
viewsA: How to center a title in the header using class attributes?
You can center text using the class text-center just inform her in the attribute class tag H3 and in the attribute class tag img inform img-fluid and take out the attribute width, also create the…
-
0
votes1
answer499
viewsA: Conditional css (Jquery only)
See that I made a modification in the code, see this example // Cria o elemento Table var tabela = $('<table></table>').css({ 'border': '1px solid' }); colunas = '<thead>'; colunas…
-
1
votes2
answers485
viewsA: Function . ajaxComplete() performs several times
Following @Isac’s response to the methods as well on and off that were added in the version 1.7 of jQuery, these methods have come to replace the methods bind and unbind, than from the version 3.0…
-
1
votes2
answers58
viewsA: Returning linked data
You must remove the line print_r($valores); of the archive function.php and then treat the return. var html = ""; $.getJSON('functionx.php',{ descricao: $( this ).val() },function( json ){ for (var…
-
2
votes1
answer1659
viewsA: React dynamic array in imgs
No need to use require see this simple example: let Carros = [ { id: 1, descricao: 'Fiat Toro', img:…
-
1
votes2
answers198
viewsA: Installation Cartopy
Completing the @Vegas response, according to documentation ( In English ) the easiest way to install the Cartopy in all Platforms is using the Conda, with the following command. conda install -c…
-
0
votes3
answers203
viewsA: Create an array from 2 other arrays
As quoted in the comments, you can make a condition, see this is an example, you can have others. $Fornecedores = [ [ 'ID_For' => 1, 'ID_Pes' => 1, 'STATUS' => 1 ], [ 'ID_For' => 2,…
phpanswered NoobSaibot 9,554 -
2
votes2
answers156
viewsA: Algorithm simulation of taximeter
The correct is Hora é maior ou igual que bandeira1 ? && Hora é menor que a bandeira2 ? console.log("calculou como bandeira 1"); Não console.log("calculou como bandeira 2"); Behold function…
-
1
votes2
answers1224
viewsA: Pass modal window id
You could do it like this <a href="?id=<?php echo $_GET["id"]; ?>#pagina1" class="btn_modal"> in the archive php menu., also take a space that has in .load("pagina.php "+url) leaves so…
-
1
votes1
answer46
viewsA: Cron creating files on the server
To determine a directory where files will be saved, with wget simply enter the parameter -O, ex: # Salva na raiz wget https://meusite.com/acesso/cron/CPTEC -O / # Salva em um subdiretório wget…
-
1
votes1
answer1508
viewsA: Bootstrap dropdown menu does not work
Good to several import duplicates in your code, it is necessary to make a clean, I took the liberty to make some changes. The problem of returning 403 - Forbidden is because the URL…
-
1
votes3
answers913
viewsA: Conditions with typescript
You must define the variables in the method constructor, take this example: import { Component } from '@angular/core'; @Component({ selector: 'my-app', template: `<h1>Olá…
-
1
votes1
answer424
viewsA: Uncaught Referenceerror: vira1 is not defined
From the Angular 2 to make Binding of events are used parentheses, every time you want to call an event do (evento)="exeFuncao()" Some events: (focus)="exeFuncao()" (blur)="exeFuncao()"…
-
1
votes2
answers69
viewsA: List all data from a survey
As commented by @Knautiluz, you should use while. # Apenas um exemplo de uso, pois não sei os nomes das colunas. while($linha = $stmt->fetch(PDO::FETCH_ASSOC)){ printf("id_usuario: %s categoria:…
-
3
votes2
answers2546
viewsA: How to view comments on Rstudio console?
After the version 1.0.36 you will need to change a setting, so follow the steps. Tools ( ) Global Options... ( Global options ) Code ( Code ) and uncheck the option Execute all Lines in a statement…
-
5
votes3
answers1011
viewsA: How to compare strings differentiating case from case?
When passing the parameter StringComparison.OrdinalIgnoreCase you are advising not to differentiate between upper case and lower case, so: login == Login // Será verdadeiro se o parâmetro for…