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
| void main() { | |
| Pessoa p = Pessoa("Hernand"); | |
| int a = 3; | |
| int b = 2; | |
| Calculadora calc = Calculadora(); | |
| int c = Calculadora.soma(a, b); | |
| print("Soma: $c"); | |
| print("Soma: ${p.nome}"); | |
| } |
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
| ext { | |
| localProp = new Properties() | |
| fileName = 'local.properties' | |
| if (project.rootProject.file(fileName).exists()) { | |
| localProp.load(new FileInputStream(rootProject.file(fileName))) | |
| } | |
| groupName = "br.com.cetelem.android.components" | |
| publishUsername = System.env.PUBLISH_USERNAME != null ? System.env.PUBLISH_USERNAME : localProp["publishUsername"] ?: "" | |
| publishPassword = System.env.PUBLISH_PASSWORD != null ? System.env.PUBLISH_PASSWORD : localProp["publishPassword"] ?: "" | |
| repoUrl = System.env.REPO_URL != null ? System.env.REPO_URL : localProp["repoUrl"] ?: "" |
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
| #!/usr/bin/env bash | |
| # fail if any commands fails | |
| set -e | |
| # debug log | |
| set -x | |
| # write your script here | |
| #!/bin/bash | |
| set -eu |
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
| allprojects { | |
| gradle.projectsEvaluated { | |
| tasks.withType(JavaCompile) { | |
| options.compilerArgs << "-Xmaxerrs" << "5000" | |
| } | |
| } | |
| } |
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
| # Autocomplete | |
| if [ -f /usr/local/git/contrib/completion/git-completion.bash ]; then | |
| . /usr/local/git/contrib/completion/git-completion.bash | |
| fi | |
| # mostra se existem alterações no projeto (master/branch) | |
| GIT_PS1_SHOWDIRTYSTATE=true | |
| # necessário para o correto funcionamento da variável ‘__git_ps1’ | |
| source /usr/local/git/contrib/completion/git-prompt.sh |
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 Foundation | |
| func remove(input: String, first: Int, last: Int) -> String { | |
| // we require a variable to manipulate strings | |
| let newString = input | |
| // modify newString and return the result | |
| let firstIndex = newString.index(newString.startIndex, offsetBy: first) | |
| let lastIndex = newString.index(newString.endIndex, offsetBy: (last * -1)) |
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
| func frequency(numbers: [Int]) -> [Int: Int] { | |
| var frequencyDictionary: [Int:Int] = [:] | |
| for number in numbers { | |
| if let existentValue = frequencyDictionary[number] { | |
| frequencyDictionary[number] = existentValue + 1 | |
| } else { | |
| frequencyDictionary[number] = 1 | |
| } | |
| } | |
| return frequencyDictionary |
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
| //observable_get | |
| @Bindable | |
| #if($field.modifierStatic) | |
| static ## | |
| #end | |
| $field.type ## | |
| #set($name = $StringUtil.capitalizeWithJavaBeanConvention($StringUtil.sanitizeJavaIdentifier($helper.getPropertyName($field, $project)))) | |
| #if ($field.boolean && $field.primitive) | |
| is## | |
| #else |
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
| export ANDROID_SDK=/Users/hernand/Library/Android/sdk | |
| export ANDROID_NDK=/Users/hernand/Library/Android/sdk/ndk-bundle | |
| export PATH="$PATH:$ANDROID_SDK/tools:$ANDROID_SDK/platform-tools:$ANDROID_NDK" | |
| # Autocomplete | |
| #if [ -f /usr/local/git/contrib/completion/git-completion.bash ]; then | |
| # . /usr/local/git/contrib/completion/git-completion.bash | |
| #fi | |
| [[ -r "/usr/local/etc/profile.d/bash_completion.sh" ]] && . "/usr/local/etc/profile.d/bash_completion.sh" |
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
| git init | |
| git remote add origin $REPO_URL | |
| //or change the url with | |
| git remote set-url origin $REPO_URL | |
| git add . | |
| git commit -m "Initial commit" | |
| git push -f origin master |