#Primeiro Nome Sobrenomes Peso kg Altura
27 messages · Page 1 of 1 (latest)
I did this in vscode; using multi-line cursors.
i think this is what ur aiming for?
Primeiro Nome;Sobrenomes;Peso (kg);Altura (m)
felipe;neves da hora;70,6;1,69
sandro;barbosa;90,5;1,73
maycon;da silva ferreira;100,01;1,82
jeferson;Oliveira;80,04;1,75
manuel;gomesvieira;63,05;1,8
emanuel;da silva;87,5;1,61
isis;santanna de Deus;59;1,6
maria;santana bezerra;63,8;1,75
Alessandro;Viana;69,53;1,83
sandro;barbosa;75;1,54
Almir;Valente;87,86;1,8
Bruno;Santana Filho;68,63;1,65
marta;santos oliveira;63,55;1,72
michele;Santanna Da Silva;68;1,7
Alex;Da Silva;78,08;1,85
Daniel;Alexandre;54,05;1,78
Manuella;Pereira;68,36;1,69
Matheus;Silva;92,3;2,01
Giuderlan;Antonio Neto;80,25;1,98
Geisa;Ferreira Da Silva;75,05;1,65
neymar;josefino andrade;110;1,77
João;Michelango;160;1,59
Gabriela;Xavier Ferreira;58;1,7
Michelangelo;de La Siena;100;1,9
Ivanor;de Jesus;75,68;1,7
Cienne;Augusta Conceição;56,05;1,57
Arthur;Santana;66,06;1,75
amaro;Luiz;90,05;2,68
Alzenrau;Silva;65;1,97
caio;sena;50,01;1,33
Romildo;da Silva;89,05;1,73
Lindomar;Catillo;68,22;1,53
Felizberto;Felizmino da Felicidade;86,5;1,86
Caroline;da boa Mente;78,05;1,87
Bruna;Giuseppe;75,1;1,78
Carlos;Magno;101,9;1,69
Adailton;Ferreira;55,98;1,6
Jandersson;Almeida Santos;105,35;1,99
Joao;Joaquim José da Silva;98,05;1,89
Allan;Santana;76,12;1,85
Danielle;Santos;55,09;1,62
Valdevino;Soares;60,2;1,68
Maria;Silva pereira;65,87;2,56
Ivanorvilson;Alberto Lima;58;1,53
Camelia ;Joselina;96,05;1,23
medinchina;casais;120,05;1,93
Alcebíades;Augustino da Assunção;86;1,8
Masha;Alcântara;89;1,89
Livia;Duarte;54,06;1,45
Romerson;Simpson Silva;90,11;1,75
Mirelle;da Fonseca Filha;59,9;1,62
Sregio;carvalho;87,05;2,98
Filadélfio;Alfrônio;98,2;1,95
Marcos;Silva;70,14;1,7
Afreim;isotopo;78,89;1,51
Agatha;barreto Da Silva;54;1,68
Emmanoel;Junior;73;1,55
Eliza;Trindade;68,07;1,67
Aminoã;gabriela ferraz;68;1,95
--
honestly; not sure what a prompt for that would look like.
I would ask for it to remove any trailing or leading spaces before and after ';'
if u have to do it again.
--
but i saw instances where-- there were spaces... like on new lines also-- idk
I can do this too... I'm trying to make ChatGPT do it, I even know how to do this programming, the thing is really to make ChatGPT do it.
Ahh - understood;
I'll try on my end too-- sounds like a fun puzzle.
Given the below data. Please apply the following changes and output the data formatted:
- Remove trailing spaces after ';' -- remove spaces up until you hit a character.
- Remove leading spaces before ';' -- remove spaces up until you hit a character.
- Remove leading spaces after the \n line character.
[paste data]
^ this seems to work for me.
That looks like removing all spaces
No, its correct thank you
And what code did u receive?
define code?
The code that chatgpt used to do it
ChatGPT uses text-davinci-3.5 model.
This isn't a publicly available API.
The closest model that may be used probably to do this ask is
text-davinci-003
Is that the ask?
No!! What code ChatGPT is using to print this result? for me its printing the code
This is the prompt I used. I pasted in your data in the [paste data] section.
Given the below data. Please apply the following changes and output the data formatted:
- Remove trailing spaces after ';' -- remove spaces up until you hit a character.
- Remove leading spaces before ';' -- remove spaces up until you hit a character.
- Remove leading spaces after the \n line character.
[paste data]
THE CODE
Can u see a programming language being used in this image? thats the code im talking about
package com.rodrigo;
import java.io.;
import java.net.;
import java.util.;
import java.lang.;
import com.opencsv.CSVReader;
import com.opencsv.CSVReaderBuilder;
import org.apache.commons.lang3.StringUtils;
import com.opencsv.CSVParser;
import com.opencsv.CSVParserBuilder;
/**
- Hello world!
*/
public class App
{
public static void main(String[] args) throws Exception {
URL stockURL = new URL("https://xtr-tinto.consiste.com.br/xtr/xtrAPI.nsf/api.xsp/fileView/md/3E391C29EE1739FD03258609006C7EAA/0/dataset.CSV");
URLConnection yc = stockURL.openConnection();
BufferedReader in = new BufferedReader(new InputStreamReader(yc.getInputStream()));
CSVParser csvParser = new CSVParserBuilder().withSeparator(';').build();
try(CSVReader csvReader = new CSVReaderBuilder(in).withCSVParser(csvParser).withSkipLines(1).build()){
String teste = "";
String teste1 = "";
String teste2 = "";
String teste3 = "";
FileWriter fw = new FileWriter(new File("Rodrigo_Esteves_Da_Cruz.txt"));
List<String[]> a = csvReader.readAll();
for (String[] pessoa : a){
if(!pessoa[2].isEmpty()){
teste = pessoa[0];
teste1 = pessoa[1];
teste2 = pessoa[2].replace(",",".");
teste3 = pessoa[3].replace(",",".");
float abc = Float.parseFloat(teste2);
float cde = Float.parseFloat(teste3);
String testando = StringUtils.normalizeSpace(teste.toUpperCase()) + " " + StringUtils.normalizeSpace(teste1.toUpperCase()) + " " + String.format("%.2f",(abc / (cde*cde)));
System.out.println(testando);
fw.write(testando);
}
}
fw.close();
}
}
}
like this
^\s*|\s*$|\n\s*
- ^\s* matches zero or more leading spaces at the beginning of a line.
- \s*$ matches zero or more trailing spaces at the end of a line.
- \n\s* matches a newline character followed by zero or more leading spaces on the next line.
I can't do anymore than this.
This is regex. You simply apply regex to whatever language your writing in.
there should be "replace using regex..." in the language you are using.
--
I have gotten you 90%. You can do it my dude.
if you can't do it just say it 