Tutorial by Examples

Random UUID Swift func randomUUID() -> NSString{ return NSUUID.UUID().UUIDString() } Objective-C + (NSString *)randomUUID { if(NSClassFromString(@"NSUUID")) { // only available in iOS >= 6.0 return [[NSUUID UUID] UUIDString]; } CFUUIDRef uuidRef = ...
There are many different variants of the ARM architecture and implementations that have evolved over time. The notation can be confusing. For instance, arm7 and armv7, are completely different. The first is a CPU implementation; the second is a CPU architecture. The architecture, also called a f...
server { listen 80 default_server; listen [::]:80 default_server; server_name example.com www.example.com; return 307 https://$host$request_uri; } A 301 redirect is also an alternative but if a POST is made to a 301, then many clients will resubmit the request as a GET - whic...
server { server_name example.com; return 301 $scheme://example.net$request_uri; }
1.8 Run: $ git mv old/path/to/module new/path/to/module 1.8 Edit .gitmodules and change the path of the submodule appropriately, and put it in the index with git add .gitmodules. If needed, create the parent directory of the new location of the submodule (mkdir -p new/path/to). M...
Since Ionic 2 is getting better and better every day, please always check the official documentation to keep track of the latest changes and improvements. Prerequisites: You will need NodeJS in order to build Ionic 2 projects. You can download and install node here and learn more about npm and the...
One way to calculate the Big-O value of a procedure you've written is to determine which line of code runs the most times in your function, given your input size n. Once you have that number, take out all but the fastest-growing terms and get rid of the coefficents - that is the Big-O notation of yo...
Categories provide the ability to add some extra functionality to an object without subclassing or changing the actual object. For example we want to set some custom fonts. Lets create a category that add functionality to UIFont class. Open your Xcode project, click on File -> New -> File an...
You can quickly switch to the previous branch using git checkout -
Canvas is the simplest of panels. It places items at the specified Top/Left coordinates. <Canvas> <TextBlock Canvas.Top="50" Canvas.Left="50" Text="This is located at 50, 50"/> <TextBlock Canvas.Top="100" Canv...
DockPanel aligns the control according to the dock property, in the order it's placed in the control. NOTE: DockPanel is part of the WPF framework, but does not come with Silverlight/WinRT/UWP. Open-source implementations are easy to find though. <DockPanel LastChildFill="False"> ...
StackPanel places its controls one after another. It acts like a dock panel with all of its control's docks set to the same value. <!-- The default StackPanel is oriented vertically, so the controls will be presented in order from top to bottom --> <StackPanel> <Button Content=&q...
Grid is used to create table layouts. Basic rows and columns definitions <Grid> <!-- Define 3 columns with width of 100 --> <Grid.ColumnDefinitions> <ColumnDefinition Width="100"/> <ColumnDefinition Width="100"/> <ColumnDefi...
Locally created images can be pushed to Docker Hub or any other docker repo host, known as a registry. Use docker login to sign in to an existing docker hub account. docker login Login with your Docker ID to push and pull images from Docker Hub. If you don't have a Docker ID, head over to https...
Run the install on a single run command to merge the update and install. If you add more packages later, this will run the update again and install all the packages needed. If the update is run separately, it will be cached and package installs may fail. Setting the frontend to noninteractive and pa...
Open Repo Create new repo (My advice first add pods on a temporary repo before adding to your original project) Fill Repository name with your repo name. I'll use "myrepo" for this tutorial and will use "<" and ">" symbols for the parts you should change to yo...
To get the IP address of a docker machine, you can do that with this command : docker-machine ip machine-name
Lists can populated with any data type as necessary, with the format Dim aList as New List(Of Type) For example: Create a new, empty list of Strings Dim aList As New List(Of String) Create a new list of strings, and populate with some data VB.NET 2005/2008: Dim aList as New List(Of String...
Dim aList as New List(Of Integer) aList.Add(1) aList.Add(10) aList.Add(1001) To add more than one item at a time use AddRange. Always adds to the end of the list Dim blist as New List(of Integer) blist.AddRange(alist) Dim aList as New List(of String) alist.AddRange({"one", &...
Dim aList As New List(Of String) aList.Add("Hello") aList.Add("Delete Me!") aList.Add("World") 'Remove the item from the list at index 1 aList.RemoveAt(1) 'Remove a range of items from a list, starting at index 0, for a count of 1) 'This will remove index 0, ...

Page 482 of 1336