This file contains 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
#!/bin/bash | |
pasta_raiz=$(pwd) | |
pasta_ignorar="uploads" | |
arquivo_saida="${pasta_raiz}/index.md" | |
echo "# Índice de Arquivos" > "$arquivo_saida" | |
echo -e "_Gerado automaticamente via ***" >> "$arquivo_saida" | |
echo -e "Workflow: setup_wiki" >> "$arquivo_saida" | |
# Remover números do início do nome |
This file contains 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
private fun execute(inputArray: Array<Int>, inputRotation: Int): Array<Int> { | |
// left rotation is basically the number of rotations | |
// divided by array size. The rest of this division is | |
// the position where first index will be placed after | |
// rotation. | |
val output = arrayListOf<Int>() | |
val rest = inputRotation%inputArray.size |
This file contains 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 OpenFileHelper implements LoggerComponent { | |
public OpenFileHelper() { | |
printMethodCall() | |
init(); | |
} | |
private void init() { | |
printMethodCall() |
This file contains 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 OpenFileHelper { | |
private final String filePath; | |
private final OpenFileHelperCallback callback; | |
public OpenFileHelper(String filePath, OpenFileHelperCallback callback) { | |
this.filePath = filePath; | |
this.callback = callback; | |
init(); | |
} |
This file contains 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
package com.myapp.components.logger; | |
public interface LoggerComponent { | |
default void printMessage(final String message) { | |
LoggerComponentPrivate.printJustMessage(message); | |
} | |
default void printMethodCall() { | |
final StackTraceElement element = Thread.currentThread().getStackTrace()[4]; |
This file contains 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 interface LoggerComponent { | |
String TAG = "LoggerComponent"; | |
default void printJustMessage(final String inf) { | |
if (BuildConfig.DEBUG) | |
Log.d(TAG, inf); | |
} | |
default void printMethodCall(final StackTraceElement thread) { |
This file contains 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 interface BaseViewContract { | |
void onShowLoading(); | |
void onHideLoading(); | |
void onShowError(String error); | |
default void onShowToast(String message) { | |
Toast.makeText(getApplicationContext(), message, Toast.LENGTH_SHORT).show(); | |
} |
This file contains 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 interface BaseViewContract { | |
void onShowLoading(); | |
void onHideLoading(); | |
void onShowError(String error); | |
default void onShowToast(Context context, String message) { | |
Toast.makeText(context, message, Toast.LENGTH_SHORT).show(); | |
} |
This file contains 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 interface BaseViewContract { | |
void onShowLoading(); | |
void onHideLoading(); | |
void onShowError(String error); | |
} |
This file contains 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 OpenFileHelper { | |
public void openFile() { | |
// using anonymous class | |
sendLog(new Logger() { | |
@Override | |
public void logMessage(String message) { | |
Log.i("OpenFileHelper", message); | |
} |
NewerOlder