Tutorial by Examples: al

Create a new application here: create application Choose standalone applicaton and confirm app creation via SMS. Fill Package namefor Android as your current package name. You can get your package name inside android manifest file, at the very begginning. Get your Certificate fingerprint by exe...
An internally defined exception doesn't have a name, but it has its own code. When to use it? If you know that your database operation might raise specific exceptions those which don't have names, then you can give them names so that you can write exception handlers specifically for them. Otherwis...
Sometimes there will be properties that aren't available in jQuery event. To access the underlying properties use Event.originalEvent Get Scroll Direction $(document).on("wheel",function(e){ console.log(e.originalEvent.deltaY) // Returns a value between -100 and 100 depending o...
This command, given a commit range commit1..commit2, rewrites history so that git commit author becomes also git committer: git filter-branch -f --commit-filter \ 'export GIT_COMMITTER_NAME=\"$GIT_AUTHOR_NAME\"; export GIT_COMMITTER_EMAIL=\"$GIT_AUTHOR_EMAIL\"; exp...
To list all the git repository locations on your you can run the following find $HOME -type d -name ".git" Assuming you have locate, this should be much faster: locate .git |grep git$ If you have gnu locate or mlocate, this will select only the git dirs: locate -ber \\.git$
the easiest way is to have the local branch checked out: git checkout old_branch then rename the local branch, delete the old remote and set the new renamed branch as upstream: git branch -m new_branch git push origin :old_branch git push --set-upstream origin new_branch
DateUtils.formatDateTime() allows you to supply a time, and based on the flags you provide, it creates a localized datetime string. The flags allow you to specify whether to include specific elements (like the weekday). Date date = new Date(); String localizedDate = DateUtils.formatDateTime(contex...
Premise These instruction shows a procedure to install native OCaml binaries in Windows. If your operative system is Windows 10 (Insider Preview) build 14316 or later you can also install OCaml through Bash on Ubuntu on Windows. In this case, follow the instruction to install OCaml on Ubuntu. Inst...
These are general tips that in general improve performance. If your code is slow, it is always important to profile it to figure out what parts are slow. Guessing is never enough. Improving the execution speed of something that only takes up 1% of the execution time probably isn't worth the effort. ...
After installing gnuplot it's a good idea to run a simple example to ensure all is working fine. Open your terminal Type gnuplot. Your prompt should now change to gnuplot> Type: plot sin(x) If all is well you should see now a sin(x) graphic generated by gnuplot. Note: if you are on Wind...
#include <omp.h> #include <stdio.h> int main (int argc, char *argv[]) { #pragma omp parallel { printf ("Hello world! I'm thread %d out of %d threads.\n", omp_get_thread_num(), omp_get_num_threads()); } return 0; } This code simply ...
The virtual host context is a part of the static configuration file between <VirtualHost> and </VirtualHost> tags. RewriteRule's in virtual host context match against the part of an url after the protocol, hostname and port, and before the query string. When the following rule is used ...
Variables in Go are always initialized whether you give them a starting value or not. Each type, including custom types, has a zero value they are set to if not given a value. var myString string // "" - an empty string var myInt int64 // 0 - applies to all types of int an...
In slices the zero value is an empty slice. var myIntSlice []int // [] - an empty slice Use make to create a slice populated with values, any values created in the slice are set to the zero value of the type of the slice. For instance: myIntSlice := make([]int, 5) // [0, 0, 0, 0, 0] - a s...
When creating a struct without initializing it, each field of the struct is initialized to its respective zero value. type ZeroStruct struct { myString string myInt int64 myBool bool } func main() { var myZero = ZeroStruct{} fmt.Printf("Zero values are: %q, %d...
Orphan nodes/vertices are those lacking all relationships/edges. MATCH (n) WHERE NOT (n)--() DELETE n
The sample content used here is Tears of Steel, by Blender Foundation. Specifically, we will use the download titled "HD 720p (~365MB, mov, 2.0)". This is a single file that ends with the extension "mov" and will play in just about any modern media player. Note that the download...
Following example requires that node.js is installed and npm is available. Full working code can be forked from GitHub @ https://github.com/mikkoviitala/angular-grunt-run-local Usually one of the first things you want to do when developing new web application is to make it run locally. Below ...
Formset is a way to render multiple forms in one page, like a grid of data. Ex: This ChoiceForm might be associated with some question of sort. like, Kids are most Intelligent between which age?. appname/forms.py from django import forms class ChoiceForm(forms.Form): choice = forms.CharFie...
Code in natively compiled function will be transformed into C code and compiled as dll. To create a Native Compiled scalar function you need to: Use standard CREATE FUNCTION syntax Set NATIVE_COMPILATION option in function definition Use SCHEMABINDING option in function definition Instead of...

Page 165 of 269