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
docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' container-postgresdb |
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 java.text.Normalizer; | |
public class StringUtils { | |
/** | |
* Remove toda a acentuação da string substituindo por caracteres simples sem acento. | |
*/ | |
public static String unaccent(String src) { | |
return Normalizer | |
.normalize(src, Normalizer.Form.NFD) |
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
Taxable income fraction | Tax rate to be applied to the bracket | |
---|---|---|
Up to €11.294 | 0% | |
From €11.295 to €28.797 | 11% | |
From €28.798 to €82.341 | 30% | |
From €82.342 to €177.106 | 41% | |
Over €177.106 | 45% |
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 class TaxCalculator { | |
// Method to calculate the tax based on income | |
public double calculateTax(double income) { | |
double tax; | |
if (income <= 10225) { | |
tax = 0; | |
} else if (income <= 26070) { | |
tax = (income - 10225) * 0.11; | |
} else if (income <= 74545) { |
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 java.util.List; | |
public class TaxCalculator { | |
// Define a list of tax brackets | |
private static final List<TaxBracket> taxBrackets = List.of( | |
new TaxBracket(0, 10225, 0.0), | |
new TaxBracket(10225, 26070, 0.11), | |
new TaxBracket(26070, 74545, 0.30), | |
new TaxBracket(74545, 160336, 0.41), |
OlderNewer