Tutorial by Examples: v

vagrant up --provider vmware_workstation
vagrant up --provider virtualbox VirtualBox is the default provider for a vanilla Vagrant setup.
Instead of the usual loosely typed: @Html.ActionLink("Log in", "UserController", "LogIn") You can now make action links strongly typed: @Html.ActionLink("Log in", @typeof(UserController), @nameof(UserController.LogIn)) Now if you want to refactor your ...
vagrant snapshot restore --no-provision mysnapshot
vagrant snapshot delete mysnapshot
Log the realm file location using: NSLog(@"%@",[RLMRealmConfiguration defaultConfiguration].fileURL); The line above will print the location to Xcode's console. Copy the file path, go to Finder → Go → Go to Folder... (or ⌘+⇧+G)→ paste the path and hit Go.
If you return a prvalue expression from a function, and the prvalue expression has the same type as the function's return type, then the copy from the prvalue temporary can be elided: std::string func() { return std::string("foo"); } Pretty much all compilers will elide the tempor...
If you return an lvalue expression from a function, and this lvalue: represents an automatic variable local to that function, which will be destroyed after the return the automatic variable is not a function parameter and the type of the variable is the same type as the function's return type ...
Intervals are simplest way of recording timespans in lubridate. An interval is a span of time that occurs between two specific instants. # create interval by substracting two instants today_start <- ymd_hms("2016-07-22 12-00-00", tz="IST") today_start ## [1] "2016-07-...
-XXaggressive is a collection of configurations that make the JVM perform at a high speed and reach a stable state as soon as possible. To achieve this goal, the JVM uses more internal resources at startup; however, it requires less adaptive optimization once the goal is reached. We recommend that y...
Protocol Oriented Programming is a useful tool in order to easily write better unit tests for our code. Let's say we want to test a UIViewController that relies on a ViewModel class. The needed steps on the production code are: Define a protocol that exposes the public interface of the class Vi...
String hubUrl = "http://localhost:4444/wd/hub" DesiredCapabilities capability = DesiredCapabilities.firefox(); //or which browser you want RemoteWebDriver driver = new RemoteWebDriver(hubUrl, capability);
By default, the navigation pattern works like a stack of pages, calling the newest pages over the previous pages. You will need to use the NavigationPage object for this. Pushing new pages ... public class App : Application { public App() { MainPage = new NavigationPage(new ...
Modal pages can created in three ways: From NavigationPage object for full screen pages For Alerts and Notifications For ActionSheets that are pop-ups menus Full screen modals ... // to open await Navigation.PushModalAsync(new ModalPage()); // to close await Navigation.PopModalAsync(); ...
Given this data User_IDCompletion_Date12016-07-2012016-07-2122016-07-2022016-07-2122016-07-22 ;with CTE as (SELECT *, ROW_NUMBER() OVER (PARTITION BY User_ID ORDER BY Completion_Date DESC) Row_Num FROM Data) SELECT * FORM CTE WHERE Row_Num <= n Us...
First of all you need to create a class which extends RecyclerView.ItemDecoration : public class SimpleBlueDivider extends RecyclerView.ItemDecoration { private Drawable mDivider; public SimpleBlueDivider(Context context) { mDivider = context.getResources().getDrawable(R.drawable.divider_b...
It is now a best-practice to use Vector instead of List because the implementations have better performance Performance characteristics can be found here. Vector can be used wherever List is used. List creation List[Int]() // Declares an empty list of type Int List.empty[Int] // U...
All you need is a variable of type IHostingEnvironment: get environment name: env.EnvironmentName for predefined Development, Staging, Production environments the best way is to use extension methods from HostingEnvironmentExtensions class env.IsDevelopment() env.IsStaging() ...
Below is a simple example which shows average item's price of each item per weekday. First, suppose we have a table which keeps daily records of all items' prices. CREATE TABLE tbl_stock(item NVARCHAR(10), weekday NVARCHAR(10), price INT); INSERT INTO tbl_stock VALUES ('Item1', 'Mon', 110), (...
Flash Player 10 introduced the Vector.<*> generic list type that was faster than the Array. However, this is not entirely true. Only the following Vector types are faster than the Array counterparts, due to the way they are implemented in Flash Player. Vector.<int> - Vector of 32-bit ...

Page 65 of 296