Tutorial by Examples

// Remember to initialize your client as described in the Remarks section Awareness.SnapshotApi.getPlaces(client) .setResultCallback(new ResultCallback<PlacesResult>() { @Override public void onResult(@NonNull PlacesResult placesResult) { List<PlaceLike...
// Remember to initialize your client as described in the Remarks section Awareness.SnapshotApi.getWeather(client) .setResultCallback(new ResultCallback<WeatherResult>() { @Override public void onResult(@NonNull WeatherResult weatherResult) { Weather weathe...
Thus these variables will use dynamic binding. (defparameter count 0) ;; All uses of count will refer to this one (defun handle-number (number) (incf count) (format t "~&~d~%" number)) (dotimes (count 4) ;; count is shadowed, but still special (handle-number coun...
Remember, all the best practices of typical web architecture still apply. For an excellent overview on the subject, please refer to Michael Nygard's excellent book Release It! Design and Deploy Production-Ready Software. Writing your app in Meteor doesn't absolve you of auditing third party librarie...
The #Const directive is used to define a custom preprocessor constant. These can later be used by #If to control which blocks of code get compiled and executed. #Const DEBUGMODE = 1 #If DEBUGMODE Then Const filepath As String = "C:\Users\UserName\Path\To\File.txt" #Else Cons...
#If Vba7 Then ' It's important to check for Win64 first, ' because Win32 will also return true when Win64 does. #If Win64 Then Declare PtrSafe Function GetFoo64 Lib "exampleLib32" () As LongLong #Else Declare PtrSafe Function GetFoo Lib "exampl...
You can use Bash Parameter Expansion to emulate common filename-processing operations like basename and dirname. We will use this as our example path: FILENAME="/tmp/example/myfile.txt" To emulate dirname and return the directory name of a file path: echo "${FILENAME%/*}" ...
Another use of RODBC is in connecting with SQL Server Management Database. We need to specify the 'Driver' i.e. SQL Server here, the database name "Atilla" and then use the sqlQuery to extract either the full table or a fraction of it. library(RODBC) cn <- odbcDriverConnect(connect...
proc myproc {} { puts "hi" } myproc # => hi An empty argument list (the second argument after the procedure name, "myproc") means that the procedure will not accept arguments.
proc myproc {alpha beta} { ... set foo $alpha set beta $bar ;# note: possibly useless invocation } myproc 12 34 ;# alpha will be 12, beta will be 34 If the argument list consists of words, those will be the names of local variables in the procedure, and their initi...
### Definition proc myproc {alpha {beta {}} {gamma green}} { puts [list $alpha $beta $gamma] } ### Use myproc A # => A {} green myproc A B # => A B green myproc A B C # => A B C This procedure accepts one, two, or three arguments: those parameters whose names are the fi...
proc myproc args { ... } proc myproc {args} { ... } ;# equivalent If the special parameter name args is the last item in the argument list, it receives a list of all arguments at that point in the command line. If there are none, the list is empty. There can be arguments, including optional one...
proc myproc {varName alpha beta} { upvar 1 $varName var set var [expr {$var * $alpha + $beta}] } set foo 1 myproc foo 10 5 puts $foo # => 15 In this particular case, the procedure is given the name of a variable in the current scope. Inside a Tcl procedure, such variables aren't...
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
N-bit deep shift register with asynchronous reset. module shift_register #( parameter REG_DEPTH = 16 )( input clk, //clock signal input ena, //enable signal input rst, //reset signal input data_in, //input bit output data_out //output bit ); reg [REG_DE...
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...
Vim comes with several pre-installed color schemes. In Linux, the color schemes that come with Vim are stored in /usr/share/vim/vim74/colors/ (where 74 is your version number, sans periods); MacVim stores them in /Applications/MacVim.app/Contents/Resources/vim/runtime/colors. Changing Color Schemes...

Page 444 of 1336