Tutorial by Examples: ti

Variables in Visual Basic are declared using the Dim keyword. For example, this declares a new variable called counter with the data type Integer: Dim counter As Integer A variable declaration can also include an access modifier, such as Public, Protected, Friend, or Private. This works in conju...
# application.rb config.time_zone = 'Eastern Time (US & Canada)' config.active_record.default_timezone = :local
Commonly you would use :set to set options to your liking in your .vimrc. There are many options that can be changed. For example, in order to use spaces for indentation: :set expandtab :set shiftwidth=4 :set softtabstop=4
Switch syntax highlighting on, when the terminal has colors if &t_Co > 2 || has("gui_running") syntax on end Show trailing whitespace and tabs. Showing tabs can be especially useful when looking for errors in Makefiles. set list listchars=tab:\|_,trail:. highlight Specia...
Every Time you create an anonymous class, it retains an implicit reference to its parent class. So when you write: public class LeakyActivity extends Activity { ... foo.registerCallback(new BarCallback() { @Override public void onBar() { ...
Often you will want to wrap some of Android's classes in easier to use utility classes. Those utility classes often require a context to access the android OS or your apps' resources. A common example of this is a wrapper for the SharedPreferences class. In order to access Androids shared preference...
PostgreSQL is an actively developed and mature open source database. Using the psycopg2 module, we can execute queries on the database. Installation using pip pip install psycopg2 Basic usage Lets assume we have a table my_table in the database my_database defined as follows. idfirst_namelast_n...
If you want have a long text to display in the context, you need to set a custom content. For example, you have this: But you wish your text will be fully shown: All you need to do, is to add a style to your content like below: private void generateNotification(Context context) { ...
The following uses the Chrome Logging API. If the .group() syntax is used in multiple templates, it will graphically organize the console logs from different templates into a hierarchical tree. You can also see how to inspect the current data context, and how to stringify data. Template.landingPa...
Simple example of using the Chrome Logging API. Template.landingPage.events({ 'click .selectItemButton':function(){ // color code and count the user interaction (blue) console.count('click .selectItemButton'); } });
Some teams find that they want to leave console log statements in their code, but not have them display in production. They will override the logging functions if a variable isn't set (possibly an environment variable). Additionally, this may qualify as a security feature in some situations. if (...
You'll need an upstart script in your /etc/init/ directory. Name it with your app's name, ending in .conf, such as /etc/init/myapp.conf. The basic upstart script looks something like this: ## /etc/init/myapp.conf description "myapp.mydomain.com" author "[email protected]&quot...
https://www.phusionpassenger.com/ https://github.com/phusion/passenger https://github.com/phusion/passenger/wiki/Phusion-Passenger:-Meteor-tutorial#wiki-installing
Meteor Dump Meteor Toys Constellation Meteor DevTools
// thecontroller.js $scope.sendVerifyEmail = function() { console.log('Email sent, whaaaaam!'); currentAuth.sendEmailVerification(); } // where currentAuth came from something like this: // routerconfig .... templateUrl: 'bla.html', resolve: { currentAuth:['Auth', functio...
This is very common, you memorize a path to a file or folder, you open up Vim and try to write what you've just memorized, but you are not 100% sure it's correct, so you close the editor and start over. When you want the path completion feature, and you have a file /home/ubuntu/my_folder/my_file a...
To delete some lines of text when you don't know exact number of lines to delete, you try 10dd , 5dd , 3dd until you remove all the lines. Relative line numbers solves this problem, suppose we have a file containing : sometimes, you see a block of text. You want to remove it but you cannot d...
In the following command the range starts 6 lines above the current line and ends 3 lines below: :-6,+3command
SELECT DISTINCT ContinentCode FROM Countries; This query will return all DISTINCT (unique, different) values from ContinentCode column from Countries table ContinentCodeOCEUASNAAF SQLFiddle Demo

Page 170 of 505