Logging in Python – with function names, line numbers, command line -v -d and aliases v(), d()

Logging is tells you what’s going on when your run and often avoids useless comments. Log messages give you a real time feeling what’s happening in the program. And your advanced users might want to run ‘supercommand –debug’, too. This … Continue reading

Posted in Uncategorized | Tagged , , , , , , , , | Comments Off on Logging in Python – with function names, line numbers, command line -v -d and aliases v(), d()

Kyy 0.2 Beta – Python Cheatsheet in Code

Kyy is Tero’s Python Cheatsheet in Code. Kyy shows you how to program the most common things in Python. Each concept is shown as a separate, stand alone program. This is the obvious stuff I don’t want to search for … Continue reading

Posted in Uncategorized | Tagged , , , , , , , , , , , , , , , , | Comments Off on Kyy 0.2 Beta – Python Cheatsheet in Code

Drawing to Canvas on Android – Code Example

Draw full screen on your Android phone This is just example code. For a throughout explanation, see Make Arduino Bots and Gadgets: Boxing Clock. package com.botbook.drawingoncanvas; import android.app.Activity; import android.content.Context; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android.graphics.Paint.Align; import android.os.Bundle; … Continue reading

Posted in Uncategorized | Tagged , , , , , | Comments Off on Drawing to Canvas on Android – Code Example

Lifecycle Code Example for Android – onCreate(), onPause(), onResume()

In Android lifecycle, methods are automatically called. This simple example toasts a message each time this happens. Create a new project SimpleStuff, package com.botbook.simplestuff. Run your program and see the states change. Press home button to stop the program. Hold … Continue reading

Posted in Uncategorized | Tagged , , , | 1 Comment