Tutorial by Examples

Create a workspace mkdir -p ~/catkin_ws/src cd ~/catkin_ws/src catkin_init_workspace Build your workspace cd ~/catkin_ws/ catkin_make Source your setup file source devel/setup.bash Create a new package named hello_world with some basic dependencies catkin_create_pkg hello_world std_m...
Package Control GitHub Repo Open whichever package's README. Compatible with both ST2 and ST3
You can create a new paint with one of these 3 constructors: new Paint() Create with default settings new Paint(int flags) Create with flags new Paint(Paint from) Copy settings from another paint It is generally suggested to never create a paint object, or any other object in onDraw() as it ...
Text drawing settings setTypeface(Typeface typeface) Set the font face. See Typeface setTextSize(int size) Set the font size, in pixels. setColor(int color) Set the paint drawing color, including the text color. You can also use setARGB(int a, int r, int g, int b and setAlpha(int alpha) setLet...
setStyle(Paint.Style style) Filled shape FILL, Stroke shape STROKE, or both FILL_AND_STROKE setColor(int color) Set the paint drawing color. You can also use setARGB(int a, int r, int g, int b and setAlpha(int alpha) setStrokeCap(Paint.Cap cap) Set line caps, either ROUND, SQUARE, or BUTT (none)...
You can set the following flags in the constructor, or with setFlags(int flags) Paint.ANTI_ALIAS_FLAG Enable antialiasing, smooths the drawing. Paint.DITHER_FLAG Enable dithering. If color precision is higher than the device's, this will happen. Paint.EMBEDDED_BITMAP_TEXT_FLAG Enables the use o...
An Albers projection, or more properly, an Albers equal area conic projection, is a common conical projection and an official projeciton of a number of jurisdictions and organizations such as the US census bureau and the province of British Columbia in Canada. It preserves area at the expense of oth...
var foo = new uint8[12]; var bar = foo; assert (foo != bar); In this example, the both foo and bar possess a strong reference, but since uint8[] only support single ownership, a copy is made.
I use Spring Boot 1.4.4.RELEASE , with MySQL as the Database and Spring Data JPA abstraction to work with MySQL. Indeed ,it is the Spring Data JPA module that makes it so easy to set up Pagination in a Spring boot app in the first place. Scenario expose an endpoint /students/classroom/{id} . It wi...
A program can easily waste time by calling a processor-intensive function multiple times. For example, take a function which looks like this: it returns an integer if the input value can produce one, else None: def intensive_f(value): # int -> Optional[int] # complex, and time-consuming cod...
By default STI model class name is stored in a column named type. But its name can be changed by overriding inheritance_column value in a base class. E.g.: class User < ActiveRecord::Base self.inheritance_column = :entity_type # can be string as well end class Admin < User; end Migr...
Having type column in a Rails model without invoking STI can be achieved by assigning :_type_disabled to inheritance_column: class User < ActiveRecord::Base self.inheritance_column = :_type_disabled end
In a basic implementation the task module must define a run/1 function that takes a list of arguments. E.g. def run(args) do ... end defmodule Mix.Tasks.Example_Task do use Mix.Task @shortdoc "Example_Task prints hello + its arguments" def run(args) do IO.puts "Hello ...
Create setup script ~/.perlbrew.sh: # Reset any environment variables that could confuse `perlbrew`: export PERL_LOCAL_LIB_ROOT= export PERL_MB_OPT= export PERL_MM_OPT= # decide where you want to install perlbrew: export PERLBREW_ROOT=~/perlbrew [[ -f "$PERLBREW_ROOT/etc/bashrc" ]...
We'll assume you're doing this in Visual Studio 2015 (VS 2015 Community, in my case). Create an empty Console project in VS. In Project | Properties change the Output Type to Windows Application. Next, use NuGet to add FsXaml.Wpf to the project; this package was created by the estimable Reed Cop...
Presumably, your program will do something. Add your working code to the project in place of Program.fs. In this case, our task is to draw spirograph curves on a Window Canvas. This is accomplished using Spirograph.fs, below. namespace Spirograph // open System.Windows does not automatically o...
You have to create a XAML file that defines the main window that contains our menu and drawing space. Here's the XAML code in MainWindow.xaml: <!-- This defines the main window, with a menu and a canvas. Note that the Height and Width are overridden in code to be 2/3 the dimensions of the...
The XAML file for the spirograph parameters is below. It includes three text boxes for the spirograph parameters and a group of three radio buttons for color. When we give radio buttons the same group name - as we have here - WPF handles the on/off switching when one is selected. <!-- This fi...
namespace Spirograph type MainWindow(app: App, model: Model) as this = inherit MainWindowXaml() let myApp = app let myModel = model let whenLoaded _ = () let whenClosing _ = () let whenClosed _ = () let menuExitHandler _ = System.Wind...
<!-- All boilerplate for now --> <Application xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <Application.Resources> </Application.Reso...

Page 1149 of 1336