Tutorial by Examples: er

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
Note: The shown CMake error messages already include the fix for "non-standard" library/tool installation paths. The following examples just demonstrate more verbose CMake find_package() outputs. CMake internally supported Package/Module If the following code (replace the FindBoost modul...
Based on this blog post. Assume you have a method like this: def get[T]: Option[T] = ??? When you try to call it without specifying the generic parameter, Nothing gets inferred, which is not very useful for an actual implementation (and its result is not useful). With the following solution t...
CountDownTimer is useful for repeatedly performing an action in a steady interval for a set duration. In this example, we will update a text view every second for 30 seconds telling how much time is remaining. Then when the timer finishes, we will set the TextView to say "Done." TextView ...
FlowRouter is more modular compared to Iron Router. Install FlowRouter meteor add kadira:flow-router Rendering a template In particular, you must manually add a layout rendering package to link with your rendering engine: Blaze Layout for Blaze: meteor add kadira:blaze-layout React Layout ...
A set of high-level mapping functions is available in Common Lisp, to apply a function to the elements of one or more lists. They differ in the way in which the function is applied to the lists and how the final result is obtained. The following table summarize the differences and shows for each of ...
The per-directory context is a part of the static configuration file between <Directory> and </Directory> tags. The entire content of dynamic configuration files is within the per-directory context of the folder in which the .htaccess resides. RewriteRule's in per-directory context matc...
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 ...
As rule of thumb, one would want his RDD to have as many partitions as the product of the number of executors by the number of used cores by 3 (or maybe 4). Of course, that's a heuristic and it really depends on your application, dataset and cluster configuration. Example: In [1]: data = sc.textF...
The Hello World Web Script handles GET HTTP methods. But what if you want to create data on the server? For that your web script should handle POST. Here is a simple example that creates new folders in Company Home. It is invoked by making a POST call with a JSON body that looks like: {'name':'tes...
A single instance of Node.js runs in a single thread. To take advantage of multi-core systems, application can be launched in a cluster of Node.js processes to handle the load. The cluster module allows you to easily create child processes that all share server ports. Following example create the ...
QRCodeReaderView implements an Android view which show camera and notify when there's a QR code inside the preview. It uses the zxing open-source, multi-format 1D/2D barcode image processing library. Adding the library to your project Add QRCodeReaderView dependency to your build.gradle dependen...
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...
A layout is a view file, which is extended by other views which inject blocks of code into their parent. For example: parent.blade.php: <html> <head> <style type='text/css'> @yield('styling') </style> </head> <body> ...
btn class of Twitter-bootstrap can be used with any of the following html elements. anchor button input with both type="button" and type="submit" Below are examples of all possible use cases of btn class <a class="btn" href="#" role="button&qu...
twitter-bootstrap-3 has provided four different sizes of buttons Large button btn-lg Default button does not require any btn size Small button btn-sm Extra small button btn-xs <button type="button" class="btn btn-lg">Large button</button> <button type=...
Overriding properties (both read-only and mutable): abstract class Car { abstract val name: String; open var speed: Int = 0; } class BrokenCar(override val name: String) : Car() { override var speed: Int get() = 0 set(value) { throw UnsupportedOpera...

Page 263 of 417