Tutorial by Examples

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 save mysnapshot
#!/bin/bash NO_SNAPSHOTS="No snapshots have been taken yet" SNAPSHOT_OUTPUT=$(vagrant snapshot list | grep "${NO_SNAPSHOTS}") if [ -z "${SNAPSHOT_OUTPUT}" ]; then echo "Found some snapshots, going to remove them" for SNAPSHOT in $(vagrant snap...
vagrant snapshot restore mysnapshot
vagrant snapshot list
vagrant snapshot restore --no-provision mysnapshot
vagrant snapshot delete mysnapshot
NSString *testString = @"There are 42 sheep and 8672 cows."; NSError *error = nil; NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:@"(\\d+)" options:NSRegularExpressionCaseIns...
NSString *testString1 = @"(555) 123-5678"; NSString *testString2 = @"not a phone number"; NSError *error = nil; NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:@"^\\(\\d{3}\\) \\d{3}\\-\\d{4}$" ...
Versions Release Date VersionRelease Date8.2.4December 07, 20167.53December 07, 20166.38 (unsupported)February 24, 20165.23 (unsupported)August 11, 2010 Entity types In earlier versions of Drupal, the field system was only used on content types. Now, thanks to the Entity API, we can add fields...
Make sure you have ruby installed before installing rubygems, and then: Installing RubyGems Using apt-get on Ubuntu sudo apt-get install rubygems Installing RubyGems Using yum sudo yum install rubygems Manual Installation Method wget https://rubygems.org/rubygems/rubygems-2.6.6.tgz tar xv...
When a standard library function fails, it often sets errno to the appropriate error code. The C standard requires at least 3 values for errno be set: ValueMeaningEDOMDomain errorERANGERange errorEILSEQIllegal multi-byte character sequence
If perror is not flexible enough, you may obtain a user-readable error description by calling strerror from <string.h>. int main(int argc, char *argv[]) { FILE *fout; int last_error = 0; if ((fout = fopen(argv[1], "w")) == NULL) { last_error = errno; ...
Generates a storable representation of a value. This is useful for storing or passing PHP values around without losing their type and structure. To make the serialized string into a PHP value again, use unserialize(). Serializing a string $string = "Hello world"; echo serialize($s...
Add the following line to ViewDidLoad method: print(Realm.Configuration.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.
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.
Problem # models.py: class Library(models.Model): name = models.CharField(max_length=100) books = models.ManyToManyField(Book) class Book(models.Model): title = models.CharField(max_length=100) # views.py def myview(request): # Query the database. libraries = Librar...
Problem Django querysets are evaluated in a lazy fashion. For example: # models.py: class Author(models.Model): name = models.CharField(max_length=100) class Book(models.Model): author = models.ForeignKey(Author, related_name='books') title = models.CharField(max_length=100) ...

Page 310 of 1336