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
static class keyboardInspectorThread extends Thread { | |
private static volatile boolean pausePressed = false; | |
public keyboardInspectorThread() { | |
} | |
public boolean isPausePressed() { | |
synchronized (keyboardInspectorThread.class) { | |
return pausePressed; |
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
<dependencies> | |
<!-- https://mvnrepository.com/artifact/org.mongodb/mongo-java-driver --> | |
<dependency> | |
<groupId>org.mongodb</groupId> | |
<artifactId>mongo-java-driver</artifactId> | |
<version>3.10.2</version> | |
</dependency> | |
</dependencies> | |
<properties> |
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
adb logcat | grep -i 'Console' |
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
Como corrigir erro "Invalid Signature - A sealed resource is missing or invalid" ao enviar app para a loja da Apple. | |
1 - Navegar, através do terminal, até a pasta platforms/ios/APP.xcarchive/ e rodar o seguinte comando: | |
1.1 - LC_ALL=C find . -name '*[! -~]*' | |
1.2 - Este comando lista todos os arquivos com caracteres não suportados pela Apple (como ã, õ) | |
1.3 - Renomear todos os arquivos listados pelo comando para caracteres sem acentuação | |
2 - Gerar perfis de provisionamento corretos, tanto para debug/desenvolvimento como para release/distribuição no site apple developer | |
3 - Desabilitar o gerenciamento automático de assinatura no Xcode | |
4 - Selecionar manualmente os perfis de provisionamento | |
5 - Ativar validação de produto, ir em Project Target -> Build Settings -> Build Options -> Validate Product, e modificar mudar a opção "release" para Sim/Yes |
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
Targets -> Build Phases -> Copy Bundle Resources | |
-> Remover arquivos duplicados |
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
POM packaging: | |
<packaging>war</packaging> | |
--- | |
POM dependencies: | |
<dependency> | |
<groupId>javax</groupId> | |
<artifactId>javaee-web-api</artifactId> |
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
Change in /etc/apache2/apache2.conf | |
<Directory /var/www/*> | |
Order Allow,Deny | |
Allow from all | |
AllowOverride all | |
Header set Access-Control-Allow-Origin "*" | |
</Directory> | |
Add/activate module |
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
Before executing threads: | |
ExecutorService es = Executors.newCachedThreadPool(); | |
//execute all | |
es.shutdown(); | |
//blocks until all are done | |
while (!es.awaitTermination(1, TimeUnit.MINUTES)); |
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
echo "fs.inotify.max_user_watches=524288" | sudo tee -a /etc/sysctl.conf | |
sudo sysctl -p |
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
db.getCollection('COLL_NAME').find().forEach(function(element) { | |
element.LOCATION = { | |
"type": "Point", | |
"coordinates": [element.LON, element.LAT] | |
}; | |
db.getCollection('COLL_NAME').save(element); | |
}); |