Tutorial by Examples: ti

Maven <dependency> <groupId>ch.acra</groupId> <artifactId>acra</artifactId> <version>4.9.2</version> <type>aar</type> </dependency> Gradle compile 'ch.acra:acra:4.9.2'
Reactive Extensions are published on both NuGet and MyGet. Installing and using them is therefore the same as any other NuGet package: Install-Package System.Reactive NB package names changed between v2 and v3. See the README on Github for more info Breaking changes The NuGet packages have...
This will show the user location on the map Objective-C [self.map setShowsUserLocation:YES]; Swift self.map?.showsUserLocation = true This will track the user location on the map, updating regions according Objective-C [self.map setUserTrackingMode:MKUserTrackingModeFollow]; Swift s...
Adding properties If you'd like to add properties to an existing object, you can use the Add-Member cmdlet. With PSObjects, values are kept in a type of "Note Properties" $object = New-Object -TypeName PSObject -Property @{ Name = $env:username ID = 12 Address...
You may need to expand or shrink your pointer storage space after you have allocated memory to it. The void *realloc(void *ptr, size_t size) function deallocates the old object pointed to by ptr and returns a pointer to an object that has the size specified by size. ptr is the pointer to a memory b...
Since C++14, the standard provides the class template template <class T, T... Ints> class integer_sequence; template <std::size_t... Ints> using index_sequence = std::integer_sequence<std::size_t, Ints...>; and a generating metafunction for it: template <class T, T N&g...
The array_intersect function will return an array of values that exist in all arrays that were passed to this function. $array_one = ['one', 'two', 'three']; $array_two = ['two', 'three', 'four']; $array_three = ['two', 'three']; $intersect = array_intersect($array_one, $array_two, $array_thre...
git difftool -t meld --dir-diff will show the working directory changes. Alternatively, git difftool -t meld --dir-diff [COMMIT_A] [COMMIT_B] will show the differences between 2 specific commits.
Using the Android API 23 or higher, very often such situation can be seen: This situation is caused by the structural change of the Android API regarding getting the resources. Now the function: public int getColor(@ColorRes int id, @Nullable Theme theme) throws NotFoundException should...
Define a menu in res/menu <?xml version="1.0" encoding="utf-8"?> <menu xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"> <item android:id="@+id/first_...
If someone else wrote the code you are committing, you can give them credit with the --author option: git commit -m "msg" --author "John Smith <[email protected]>" You can also provide a pattern, which Git will use to search for previous authors: git commit -m &quo...
Users of homebrew can install gradle by running brew install gradle
Pattern matching can be useful to handle Options: let result = Some("Hello World") match result with | Some(message) -> printfn message | None -> printfn "Not feeling talkative huh?"
To get all the information for a container you can run: docker inspect <container>
You can get an specific information from a container by running: docker inspect -f '<format>' <container> For instance, you can get the Network Settings by running: docker inspect -f '{{ .NetworkSettings }}' <container> You can also get just the IP address: docker inspect ...
Sometimes it's necessary to convert a Discriminated Union to and from a string: module UnionConversion open Microsoft.FSharp.Reflection let toString (x: 'a) = match FSharpValue.GetUnionFields(x, typeof<'a>) with | case, _ -> case.Name let fromStri...
Date and LocalDate objects cannot be exactly converted between each other since a Date object represents both a specific day and time, while a LocalDate object does not contain time or timezone information. However, it can be useful to convert between the two if you only care about the actual date i...
Software needed: Arduino IDE Setup Most Arduino-compatible boards have a USB port and come with a USB cable. Plug in the Arduino using the USB cable, and start up the Arduino IDE. Arduino IDE will start with a new sketch, typically with an emtpy setup() and loop() functions. This is enough to u...
When working on a project, you might be half-way through a feature branch change when a bug is raised against master. You're not ready to commit your code, but you also don't want to lose your changes. This is where git stash comes in handy. Run git status on a branch to show your uncommitted chang...
Big-O notation is a notation used to talk about the long-term growth rates of functions. It's often used in the analysis of algorithms to talk about the runtime of an algorithm or related concepts like space complexity. In common usage, big-O notation is used to talk about how an algorithm's runtim...

Page 65 of 505