Tutorial by Examples: is

tf.exe get /all /recursive /force /overwrite $/ Gets all files and directories, and will replace any files that are not currently checked out in the workspace (including files that have been edited).
M-x magit-status s RET <file-to-stage> RET c c <commit message> C-c C-c q
I have created GeoFenceObserversationService singleton class. GeoFenceObserversationService.java: public class GeoFenceObserversationService extends Service implements GoogleApiClient.ConnectionCallbacks, GoogleApiClient.OnConnectionFailedListener, ResultCallback<Status> { protected s...
use Symfony\Component\EventDispatcher\EventDispatcher; use Symfony\Component\EventDispatcher\Event; use Symfony\Component\EventDispatcher\GenericEvent; // you may store this in a dependency injection container for use as a service $dispatcher = new EventDispatcher(); // you can attach liste...
This combines queries such that the best (that is, highest-scoring) match of it's subqueries contributes to the final score. List<Query> disjuncts = new ArrayList<Query>(); disjuncts.add(new TermQuery(new Term("fieldname", "hello"))); disjuncts.add(new TermQuery(...
var List: TList<TDateTime>; ... List.Sort( TComparer<TDateTime>.Construct( function(const A, B: TDateTime): Integer begin Result := CompareDateTime(A, B); end ) );
Powershell allows multiple assignment of variables and treats almost everything like an array or list. This means that instead of doing something like this: $input = "foo.bar.baz" $parts = $input.Split(".") $foo = $parts[0] $bar = $parts[1] $baz = $parts[2] You can simply...
You can see list with all environment variables with: Get-Childitem env:
Consider these two pieces of code: int a = 1000; int b = a + 1; and Integer a = 1000; Integer b = a + 1; Question: Which version is more efficient? Answer: The two versions look almost the identical, but the first version is a lot more efficient than the second one. The second version is...
In order to begin using WebRTC you need to get camera and microphone permission.For that you need following things: adapter.js, you can get it from here A html webpage with a video tag and little bit of js code The adapter.js is a JavaScript shim for WebRTC, maintained by Google with help fro...
d3.js doesn't have a .off() method to detatch existent event listeners. In order to remove an event handler, you have to set it to null: d3.select('span').on('click', null)
With an input password type, you can also enable an icon that can show or hide the entire text using the passwordToggleEnabled attribute. You can also customize same default using these attributes: passwordToggleDrawable: to change the default eye icon passwordToggleTint: to apply a tint to the...
RAISERROR function will generate error in the TRY CATCH block: DECLARE @msg nvarchar(50) = 'Here is a problem!' BEGIN TRY print 'First statement'; RAISERROR(@msg, 11, 1); print 'Second statement'; END TRY BEGIN CATCH print 'Error: ' + ERROR_MESSAGE(); END CATCH RAISERROR ...
RAISERROR with severity (second parameter) less or equal to 10 will not throw exception. BEGIN TRY print 'First statement'; RAISERROR( 'Here is a problem!', 10, 15); print 'Second statement'; END TRY BEGIN CATCH print 'Error: ' + ERROR_MESSAGE(); END CATCH After RAISER...
You can re-throw error that you catch in CATCH block using TRHOW statement: DECLARE @msg nvarchar(50) = 'Here is a problem! Area: ''%s'' Line:''%i''' BEGIN TRY print 'First statement'; RAISERROR(@msg, 11, 1, 'TRY BLOCK', 2); print 'Second statement'; END TRY BEGIN CATCH print...
The Java Collections Framework provides two related methods for all Collection objects: size() returns the number of entries in a Collection, and isEmpty() method returns true if (and only if) the Collection is empty. Both methods can be used to test for collection emptiness. For example: C...
Let f(n) and g(n) be two functions defined on the set of the positive real numbers, c, c1, c2, n0 are positive real constants. Notationf(n) = O(g(n))f(n) = Ω(g(n))f(n) = Θ(g(n))f(n) = o(g(n))f(n) = ω(g(n))Formal definition∃ c > 0, ∃ n0 > 0 : ∀ n ≥ n0, 0 ≤ f(n) ≤ c g(n)∃ c > 0, ∃ n0 > 0 ...
realloc is conceptually equivalent to malloc + memcpy + free on the other pointer. If the size of the space requested is zero, the behavior of realloc is implementation-defined. This is similar for all memory allocation functions that receive a size parameter of value 0. Such functions may in fact ...
to check if the given path exists path = '/home/john/temp' os.path.exists(path) #this returns false if path doesn't exist or if the path is a broken symbolic link
to check if the given path is a directory dirname = '/home/john/python' os.path.isdir(dirname) to check if the given path is a file filename = dirname + 'main.py' os.path.isfile(filename) to check if the given path is symbolic link symlink = dirname + 'some_sym_link' os.path.islink(symli...

Page 63 of 109