Skip to main content

Posts

Showing posts from August, 2021

Android LibGDX AdMobs setting

Follow this post: https://gamengineering.blogspot.com/2018/07/libgdx-tutorial-setup-admob-ads.html https://github.com/libgdx/libgdx/wiki/Admob-in-libgdx Errors and solutions: W/Ads: Received error HTTP response code: 400 => Need config payment in AdMobs account (have to wait for verify/review). Debug test Ads: Banner Ads: https://developers.google.com/admob/android/banner "The easiest way to load test ads is to use our dedicated test ad unit ID for Android banners: ca-app-pub-3940256099942544/6300978111 " Config test Device: public class GameLauncher extends AndroidApplication implements AdsController {   protected void onCreate (Bundle savedInstanceState) { AndroidApplicationConfiguration config = new AndroidApplicationConfiguration();         new RequestConfiguration.Builder().setTestDeviceIds(Arrays.asList("A61E7BBD2BF92F8BA1FXXXXYYYY")); https://support.google.com/admob/answer/10589757?hl=en https://stackoverflow.com/questions/67434312/can-i-still-use-sma...

Android 8 (API=26) error IllegalStateExceptions

https://github.com/flutter/flutter/issues/24287 https://www.codenong.com/cs110440941/ This guy explained in some Chinese, mean that you can fix it either by remove setting Orientation or tweak transparent setting. Two problems encountered in android 8.0 (API=26) adaptation (Horizontal screen orientation problem) (1) Remove android:screenOrientation; (Theme style) (2) android:windowIsTranslucent is changed to false; if you need a transparent setting, add android:windowDisablePreview =true; Create values-v26  /  styles.xml  in the res directory of the project  ; 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 <?xml version="1.0" encoding="utf-8"?> <resources>     <style name="AppTheme.Splash" parent="AppTheme">         <item name="android:windowActionBar">false</item>         <item name="android:windowNoTitle">true</item>         <item name="android:windowFullscreen"...

Martin Fowler Eradicating non-Determinism testing

https://martinfowler.com/articles/nonDeterminism.html Eradicating Non-Determinism in Tests non-deterministic tests - tests that sometimes pass and sometimes fail. Left uncontrolled, non-deterministic tests can completely destroy the value of an automated regression suite. In this article I outline how to deal with non-deterministic tests. Initially quarantine helps to reduce their damage to other tests, but you still have to fix them soon. Therefore I discuss treatments for the common causes for non-determinism: lack of isolation, asynchronous behavior, remote services, time, and resource leaks.  Footnotes 1: Yes, I know many advocates of TDD consider that a primary virtue of testing is the way it drives requirements and design. I agree that this is a big benefit, but I consider the regression suite to be the single biggest benefit that automated tests give us. Even without TDD tests are worth the cost for that. 2: Sometimes, of course, a test failure is due to a change in what the...

NodeJS Understanding Worker thread

https://medium.com/swlh/understanding-nodejs-worker-thread-6212b95a0928 Worker threads are an exciting and useful module if you need to do CPU-intensive tasks in your Node.js application. It’s like threads without shared memory and, thus, without the potential race conditions they introduce. Since the worker_threads module became stable in Node.js v12 LTS, you should feel secure using it in production-grade apps! https://superuser.com/questions/98868/how-do-i-disable-the-beep-in-osx-leopard-when-i-perform-an-invalid-action https://apple.stackexchange.com/questions/96368/playing-alert-sounds-from-terminal https://jeromewus.medium.com/why-i-refactor-tesseract-js-v2-50f750a9cfe2 https://github.com/naptha/tesseract.js/issues/340 var worker =             window.OCRWorker ||             new Tesseract.TesseractWorker({                 workerPath: workerPath,           ...

UI Testing - test pyramid

https://martinfowler.com/articles/practical-test-pyramid.html https://css-tricks.com/fluid-width-video/ https://martinfowler.com/testing/ https://martinfowler.com/articles/testing-culture.html Long and very informative post about 2014 Apple 'goto fail' and SSL Heartbleed bugs. And how Unit-testing plus testing culture could prevent that without heroic push. https://www.perforce.com/blog/qac/8-tips-working-legacy-code https://understandlegacycode.com/blog/does-working-on-legacy-code-pays-off/ https://martinfowler.com/articles/nonDeterminism.html