Tutorial by Examples: l

This is a tutorial to create a hello world example: Used for this example: Android Studio 2.3; To Start use Android Studio to create a new Project with an empty activity. Then we add some simple functionality to the App that we can test: We add a button which when clicks displays "Hello World...
Detailed instructions on getting qt5 set up or installed.
This code will prompt you to create the directory with :w, or just do it with :w!: augroup vimrc-auto-mkdir autocmd! autocmd BufWritePre * call s:auto_mkdir(expand('<afile>:p:h'), v:cmdbang) function! s:auto_mkdir(dir, force) if !isdirectory(a:dir) \ && (a:f...
It is very common for C functions to accept pointers to other functions as arguments. Most popular example is setting an action to be executed when a button is clicked in some GUI toolkit library. It is possible to pass Haskell functions as C callbacks. To call this C function: void event_callback...
Run-time memory management with Rc can be very useful, but it can also be difficult to wrap one's head around, especially if your code is very complex and a single instance is referenced by tens or even hundreds of other types in many scopes. Writing a Drop trait that includes println!("Droppi...
A SIMPLE TEMPLATE Let’s start with a very simple template that shows our name and our favorite thing: <div> Hello my name is {{name}} and I like {{thing}} quite a lot. </div> {}: RENDERING To render a value, we can use the standard double-curly syntax: My name is {{name}} P...
Background To get the product of a register and a constant and store it in another register, the naïve way is to do this: imul ecx, 3 ; Set ecx to 5 times its previous value imul edx, eax, 5 ; Store 5 times the contend of eax in edx Use lea Multiplications are expensive operation...
Processing provides the method triangle in order to draw a triangle. The code below draws a nearly equilateral triangle of 25 pixels between each defining point. void setup() { size(500, 500); background(0); } void draw() { triangle(0, 0, 25, 0, 12, 12); } The signature of tria...
Detailed instructions on getting cocoa-touch set up or installed.
Android extensions also work with multiple Android Product Flavors. For example if we have flavors in build.gradle like so: android { productFlavors { paid { ... } free { ... } } } And for example, only the free flavor has ...
a simple yet very useful command: :g/ending/m$ moves lines containing ending to the end of the buffer. m means move $ means end of buffer, while 0 means beginning of buffer.
The C standard (C11, and C99 too) defines the following flags for printf(): FlagConversionsMeaning-allThe result of the conversion shall be left-justified within the field. The conversion is right-justified if this flag is not specified.+signed numericThe result of a signed conversion shall always ...
Below is an Employer entity class which is mapped to the table employer. As you can see I used fetch = FetchType.LAZY instead of fetch = FetchType.EAGER. The reason I am using LAZY is because Employer may have a lot of properties later on and every time I may not need to know all the fields of an Em...
Let’s get into using some Git. First things first—you have to install it. You can get it a number of ways; the two major ones are to install it from source or to install an existing package for your platform. Installing from Source If you can, it’s generally useful to install Git from source, beca...
Detailed instructions on getting microsoft-dynamics set up or installed.
Detailed instructions on getting proguard set up or installed.
Lets draw a square in the middle of our view and make it fall to the bottom and stop at the bottom edge collising with the screen bottom boundary. @IBOutlet var animationView: UIView! var squareView:UIView! var collision: UICollisionBehavior! var animator: UIDynamicAnimator! var gravity: UIGr...
Each standard Oracle error is associated with an error number. Its important to anticipate what could go wrong in your code. Here for a connection to another database it can be: -28000 account is locked -28001 password expired -28002 grace period -1017 wrong user / password Here is a way to...
Detailed instructions on getting fpga set up or installed.
class MyToolbarControl { public: MyToolbarControl(HWND hWndToolbar, HWND hWndNotifyParent = nullptr) : _Handle(hWndToolbar) { if (hWndNotifyParent == nullptr) { hWndNotifyParent = GetAncestor(hWndToolbar, GA_ROOTOWNER); } SetWindowSubclass( ...

Page 765 of 861