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
// GET -- GET -- GET-- GET -- GET-- GET -- GET-- GET -- GET-- GET -- GET-- GET -- GET-- GET -- GET-- GET -- GET | |
const xhr = new XMLHttpRequest(); | |
const url = 'http://api-to-call.com/endpoint'; | |
xhr.responseType = 'json'; | |
xhr.onreadystatechange = function() { | |
if (xhr.readyState === XMLHttpRequest.DONE) { | |
console.log(xhr.response); | |
} | |
}; | |
xhr.open('GET', url); |
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
para mudar a ordem dos produtos, quando vem uma nova coleção, para que esta fique em primeiro | |
Arquitectura BD - Open Cart | |
Imaginando que a nova colecção tem 30 produtos, basta fazer em SQL: | |
UPDATE oc_product SET sort_order = sort_order + 30; | |
os novos produtos podem então iniciar a contagem outra vez apartir do 1,2,3,4.. etc |
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
ftp configurações: | |
se não dá em modo passivo, utilizar modo ativo(ultimo recurso) | |
problema: | |
https://superuser.com/a/1007132 | |
https://superuser.com/questions/801407/error-the-data-connection-could-not-be-established-econnrefused-connection-r/801417 | |
diferenças: | |
https://pplware.sapo.pt/tutoriais/networking/diferencas-modo-ftp-ativo-passivo/ | |
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 usar o ndk para usar api keys de uma maneira mais segura no android | |
link tutorial | |
https://androidsecurity.info/2016/12/15/storing-your-secure-information-in-the-ndk/ | |
link project | |
https://github.com/mplacona/HelloWorld/tree/SecureJNI | |
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
Colocar um gif animado num site open cart, por exemplo este: | |
https://codepen.io/PointC/pen/MyrbVr | |
1- colocar o script com a library necessaria para a animação: | |
-Este é colocado no ficheiro header.tpl entre a tag <head></head> | |
catalog/view/theme/custom_theme/template/common/header.tpl | |
atenção: todos os scripts linkados têm de ser https: | |
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/gsap/1.18.2/TweenMax.min.js"></script> | |
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
//icones ic_launcher: | |
-48px mdpi x1 (baseline) | |
-72px hdpi x1.5 | |
-96px xhdpi x2 | |
-144px xxhdpi x3 | |
-192px xxxhdpi x4 | |
//max sizes for android devices: https://material.io/devices/ (16:9) (width/height) | |
-800 x 1280px mdpi //tablet |
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
// java/domain/transformers | |
//utilização, numa actividade: | |
ViewPager mPager = (ViewPager) findViewById(R.id.pager); | |
mPager.setPageTransformer(true, new ZoomOutPageTransformer()); | |
//ou | |
mPager.setPageTransformer(true, new DepthPageTransformer()); | |
//transformer/DepthPageTransformer.java |
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
//ver | |
// https://github.com/vbohush/Interpolators |
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
//progress Dialogs | |
//res/style | |
<!--https://www.laurivan.com/make-dialogs-obey-your-material-theme/--> | |
<style name="MyDialogTheme" parent="Theme.AppCompat.Light.Dialog"> | |
<item name="android:windowBackground">@color/white_overlay</item> // @null | |
<item name="android:windowContentOverlay">@null</item> | |
<item name="android:windowIsFloating">true</item> | |
<item name="android:windowCloseOnTouchOutside">false</item> | |
</style> | |
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
// tabelas | |
// https://github.com/ISchwarz23/SortableTableView | |
//gesture | |
// https://github.com/nisrulz/sensey?utm_source=Android+Weekly&utm_campaign=24e431e122-android-weekly-245&utm_medium=email&utm_term=0_4eb677ad19-24e431e122-338100121 |