Posts by alxwca • 843 points
39 posts
-
0
votes2
answers52
viewsA: Get and Set in Arraylist
Let the community be happy! package pt.stackoverflow; import java.util.ArrayList; import java.util.List; import java.util.Scanner; public class Main { public static void main(String[] args) {…
-
2
votes1
answer456
viewsQ: Maven - How to add a directory to build?
I’m having a hard time adding one directory of my project inside the archive *.jar. I added the code below in my pom.xml : <resource> <directory>migration/</directory>…
-
0
votes1
answer58
viewsA: Automatic Facebook posts lost images
Your image comes from an https protocol add the meta below tested by the same process you use and worked: Use the og:image:secure_url when the url comes from an https protocol. <meta…
-
2
votes3
answers324
viewsA: Add <option> automatically each month
That code should help you, but not this elegant; var meses = new Array(12); meses[0] = "Janeiro"; meses[1] = "Fevereiro"; meses[2] = "Março"; meses[3] = "Abril"; meses[4] = "Maio"; meses[5] =…
-
1
votes7
answers4789
viewsA: Force input with a dot instead of an html comma
That script with jQuery does what you’re asking: $(document).on("keyup", '.preco', function (e) { if (e.keyCode == 188 || e.keyCode == 108) { // KeyCode For comma is 188 alert('Use ponto'); } });…
-
0
votes1
answer96
viewsA: Random character insert - Postgresql
You will have to create a function see the code below: create or replace function shuffle(text) returns text language sql as $$ select string_agg(ch, '') from ( select substr($1, i, 1) ch from…
-
1
votes1
answer110
viewsA: How to call compressed HTML file with gz?
GZIP unzipping files is part of the HTTP / 1.1 protocol that is not used by browsers to upload local files. So I guess the short answer is no. I’m sorry! You can resort to unzipped files or unzip…
-
1
votes1
answer517
viewsA: Return the URL of an image via JSON
Change the code: <img ng-src="{{projeto.covers[404]}}"> Reference: https://docs.angularjs.org/api/ng/directive/ngSrc Because javascript does not accept numeric object property. var covers = {…
-
2
votes4
answers1209
viewsA: Input type datetime error
The tag input type="date-time" was discontinued: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/datetime And was replaced by the tag input type="datetime-local":…
-
1
votes2
answers730
viewsA: Input number accept point in firefox
Note: Any number is an acceptable value, provided it is a valid floating point number (i.e., not Nan or Infinity). "1.0" is different "1.0" has to see how your browser treats floating point; Decimal…
-
0
votes1
answer50
viewsA: Reading txt file for memory
Use the function feof(); To determine a break in the loop; The function checks when it is the end of the file; FILE* fp; char linha[500]; fp = fopen("Ficheiro Teste.txt","r"); if(fp == NULL) {…
-
1
votes1
answer2546
viewsA: How do I know if a column exists in an Oracle table?
Uso essa query: SELECT column_name AS FOUND FROM user_tab_cols WHERE table_name = '__TABLE_NAME__' and column_name = '__COLUMN_NAME__'; A query vai retorna a coluna se ela existir; Now if you want…
-
0
votes2
answers157
viewsA: Revoke in TEMPORARY TABLE in Postgresql, is it possible?
revoking the create; REVOKE CREATE ON SCHEMA public FROM user; repealing the Temporary REVOKE TEMPORARY ON DATABASE userdb from user; Note: The Temporary table only exists while the user who made…
-
4
votes2
answers865
viewsA: Download CSV file using R
The Function read.csv(), already brings from the internet the archive; serialize <-…
-
3
votes2
answers1889
viewsA: Country and code list
In the Github repository below you have files json and other formats following the standard ISO 3166-1, specifying the country representation in 2-letter, 3-letter and 3-digit formats…
javascriptanswered alxwca 843 -
-1
votes2
answers107
viewsQ: Array search by name
Can I use Arrow Function in this example? If so, how would I look? What is the best way to search for value? var msg = ["Orange", "Melancia", "Abobora"]; var fruta = "Melancia" buscar(fruta);…
javascriptasked alxwca 843 -
2
votes2
answers923
viewsQ: What is the difference between querySelectorAll() and getElementsByClassName()
Apparently these two functions are similar, which one is more performative? Which one should I use? What is the difference between the two? Document.querySelectorAll() function funDOM() { var x =…
-
-2
votes4
answers16718
viewsA: How to put a space between two buttons?
A widely used technique, add between inputs a "span" tag and by css control this spacing; .espaco { padding-left: 50px; } <html> <body> <h3>WARNING!</h3> <section> Nunc…
-
1
votes1
answer319
viewsA: set LIMIT in result paging
The clause LIMIT is used to limit the number of results of an SQL. So, if your SQL returns 1000 rows, but you only want the first 20 rows, you should run an instruction like this: SELECT coluna FROM…
-
0
votes2
answers735
viewsA: Source with low html quality
Exists in css the property text-Rendering: body { background: url('imagens/capa.png'); font-family: "Avantgarde", "TeX Gyre Adventor", "URW Gothic L", sans-serif; text-rendering: optimizeLegibility…
-
0
votes2
answers545
viewsA: Comments on JSON in Visual Studio
In JSON, if you include a comment it will also be a given; In your JSON file, you could create a comment from that form; "_comentario" : "seu comentario", And you can ignore the value when using in…
-
7
votes2
answers3332
viewsA: Preload, Prefetch and Preconnect, what are they for?
Preload: Specifies that the browser agent should search and store in a way that foresaw the destination resource assigned by the attribute: First load the content of the attribute; <link…
-
1
votes1
answer104
viewsA: I can’t compare with random numbers
//O Erro esta aqui, você ta comparando um tipo primitivo com um objeto; if ( respUsuario == resultprogramado) Solutions: //intValue() vai retorno um tipo primitivo if(respUsuario.intValue() ==…
-
0
votes1
answer294
views -
3
votes2
answers2377
viewsA: What’s the difference in using Modelandview and Responseentity?
Responseentity: means representing the entire HTTP response. You can control anything that happens: status code, headers and body. Working with microservice, Responseentity to send reply complete,…
-
0
votes1
answer205
viewsA: Problems generating Oauth access token with Httpurlconnection
With is application/x-www-form-urlencoded you will have to submit this way: String params = "gran_type="+client_credentials+"&client_id="+CLIENT_ID+"&client_secret="+client_secret; byte[]…
-
1
votes1
answer42
viewsA: Is there a Collection in Typescript, for example, java?
Not implemented, but there are extensions like this in the link below: https://www.npmjs.com/package/typescript-collections I hope I’ve helped.
typescriptanswered alxwca 843 -
2
votes1
answer3974
viewsA: Doubt about concatenation in the R language
In R there is a function called Paste() I don’t know if it’s the right one, but it’s always been there for me. >paste("Eu", "Quero", "Concatenar") [1] Eu Quero Concatenar By default the function…
-
2
votes1
answer985
viewsA: How to ignore a subfolder with gitignore
Create a .gitignore inside the directory /Systema/ and put the code down: [^.]* So you will be ignoring all files and subfolders; To ignore only the folder /Systema/vendor/ add the code below;…
-
1
votes1
answer1927
viewsA: A: How to turn date only year (four digits) into a data frame?
Transforming your data frame: str <- c("16/01/2018", "16/01/2019") datas <- as.Date(str, "%d/%m/%Y") datas The default output is this below: [1] "2018-01-16" "2019-01-16" Formatting for…
-
-1
votes3
answers16701
viewsA: The ' ' (SPACE) character, counts in the string in the C language?
The function responsible for capturing or reading scanf(), whenever you use %s it will take the sequence of characters until an empty space is added, which is represented by '\0' the end of its…
-
5
votes1
answer49
viewsA: string transformation in R
x <- c("Casa Branca", "Barco Azul", "Casa Preta") toupper(x) [1] "CASA BRANCA" "BARCO AZUL" "CASA PRETA"
-
3
votes1
answer1204
viewsA: Posgresql has no role with superuser how to create a
Create user: CREATE USER myuser; CREATE USER myuser WITH PASSWORD ‘mypassword‘; reference: https://www.postgresql.org/docs/10/static/app-createuser.html To Change: ALTER USER myuser WITH SUPERUSER;…
-
3
votes3
answers1171
viewsA: Convert string to number
In Native: var stringToNumber = "23"; var numberValue = utilsModule.convertString(stringToNumber); reference: https://docs.nativescript.org/core-concepts/utils Javascript: var number =…
react-nativeanswered alxwca 843 -
0
votes1
answer175
viewsA: I calculate two-tailed in Java
The Java framework you need is the one in the link below: http://commons.apache.org/proper/commons-math/userguide/distribution.html Better than implementing in hand. The code will look like this:…
-
1
votes1
answer693
viewsA: Database Test with Spring Boot
Good Afternoon spring.jpa.hibernate.ddl-auto=create-drop This property does not create the database(database), only the database(database) tables. Create manually in Postgres, and you will see what…
-
0
votes1
answer263
viewsA: Angular / Javascript - Re-organizing positions in the Array
var texto = [{'codigo': 1, 'nome':'maria', 'idade':20}, {'codigo': 2, 'nome':'joao', 'idade':20}]; var pessoas = this.texto.map(function (key){ return {idade: key.idade, nome: key.nome, codigo:…
-
0
votes0
answers203
viewsQ: Command - Cordova run android
I’m having trouble executing the command "$Cordova run android", see the line below after running the command; $cordova run android ANDROID_HOME=/home/dev3/Android/Sdk/…
-
0
votes2
answers549
viewsQ: Removing replaceAll("[().- "]")
I’m using the openJDK1.7, I’m in need of help. String[] vetor = {"\"Jui.ce \"", "j-90.0", "Abobr.e-u"}; for(int = 0; i < vetor.length; i++) vetor[i].replaceAll("[()-.\"]", ""); The above code…