This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| import csv | |
| # Gets the user's HOME directory | |
| home_dir = os.path.expanduser("~") | |
| # Dynamically builds the path for the input and output CSV | |
| input_csv_path = os.path.join(home_dir, "Downloads", "test", "base.csv") | |
| output_csv_path = os.path.join(home_dir, "Downloads", "test", "base_altered.csv") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Use a base image com Java 11 | |
| FROM openjdk:11-jdk-slim | |
| # Define o mantenedor do Dockerfile | |
| LABEL maintainer="[email protected]" | |
| # Atualiza os pacotes e instala o Maven | |
| RUN apt-get update && apt-get install -y maven | |
| # Cria um diretório para a aplicação |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ------------------------------------------------------------------------------------------------------------------ | |
| VS-CODE | |
| Depuração: | |
| Step Over: F10 | |
| Step Into: F11 | |
| Step Out: Shift + F11 | |
| Resume Program: F5 | |
| Pause Program: F6 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "version": "0.2.0", | |
| "configurations": [ | |
| { | |
| "args": [], | |
| "cwd": "${workspaceRoot}", | |
| "env": { | |
| "NODE_ENV": "development" | |
| }, | |
| "name": "DEBUG", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Utilities { | |
| public static isValidStringHeaders(headers: string): boolean { | |
| const regex = /^[a-zA-Z0-9,_]+$/; | |
| return regex.test(headers); | |
| } | |
| public static isValidStringHeaders(headers: string): boolean { | |
| const allowedCharacters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_,'; | |
| for (let i = 0; i < headers.length; i++) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| type StringMap = Map<string, string>; | |
| export class ResultT<T> { | |
| value: T | null; | |
| errors: StringMap; | |
| constructor() { | |
| this.value = null; | |
| this.errors = new Map<string, string>(); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public void Print(HttpClient httpClient){ | |
| var jsonContent = await response.Content.ReadAsStringAsync(); | |
| Console.WriteLine($"curl -X {httpClient.HttpRequestMessage.Method} \"{url}\" \\\n" + | |
| $"{GetHeadersAsString(httpClient.HttpRequestMessage.Headers)} \\\n" + | |
| $"-d \"{jsonContent}\""); | |
| } | |
| static string GetHeadersAsString(HttpHeaders headers) | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Checks for the presence of directory /usr/local/go/bin in $PATH. | |
| echo "$PATH" | grep -q -E "(^|:)/usr/local/go/bin($|:)" | |
| is_present=$? | |
| if [ $is_present -eq 1 ]; then | |
| export PATH=$PATH:/usr/local/go/bin | |
| echo "add go bin" | |
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| type ResultT struct { | |
| Response interface{} | |
| Errors map[string]string | |
| } | |
| func NewResultT() ResultT { | |
| return ResultT{ | |
| Response: nil, | |
| Errors: make(map[string]string), | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use std::collections::HashMap; | |
| pub struct ResultT<T> { | |
| response: Option<T>, | |
| errors: HashMap<String, String>, | |
| } | |
| impl<T> ResultT<T> { | |
| pub fn new() -> Self { | |
| ResultT { |