Tutorial by Examples

Specifies custom foreign key name if a foreign key not following EF's convention is desired. public class Person { public int IdAddress { get; set; } [ForeignKey(nameof(IdAddress))] public virtual Address HomeAddress { get; set; } } This can also be used when you have multipl...
The available commands will be displayed, including a brief description, in tabular format. In Windows 10 the following commands are listed: CommandDescriptionASSOCDisplays or modifies file extension associations.ATTRIBDisplays or changes file attributes.BREAKSets or clears extended CTRL+C checkin...
Install node modules npm install express npm install socket.io Node.js server const express = require('express'); const app = express(); const server = app.listen(3000,console.log("Socket.io Hello Wolrd server started!")); const io = require('socket.io')(server); io.on('connec...
Open Graph is a standard for metadata that extends the normal information contained within a site's head markup. This enables websites such as Facebook to display deeper and richer information about a website in a structured format. This information is then automatically displayed when users share l...
stri_paste(LETTERS,"-", 1:13) # [1] "A-1" "B-2" "C-3" "D-4" "E-5" "F-6" "G-7" "H-8" "I-9" "J-10" "K-11" "L-12" "M-13" # [14] "N-1" "...
Split vector of texts using one pattern: stri_split_fixed(c("To be or not to be.", "This is very short sentence.")," ") # [[1]] # [1] "To" "be" "or" "not" "to" "be." # # [[2]] # [1] "This" ...
This is an simple example to create a mysql server with docker 1.- create docker-compose.yml: Note: If you want to use same container for all your projects, you should create a PATH in your HOME_PATH. If you want to create it for every project you could create a docker directory in your project. ...
You want to convert all elements in an array to some other form. For example, you have theUsers = [ {id: 1, username: 'john'} {id: 2, username: 'lexy'} {id: 3, username: 'pete'} ] and you want to have an array of usernames only, i.e. ['john', 'lexy', 'pete'] Method 1 - using .map ...
theUsers = [ {id: 1, username: 'john'} {id: 2, username: 'lexy'} {id: 3, username: 'pete'} ] To retain only users whose id is greather than 2, use the following: [{id: 3, username: 'pete'}] Method 1 - using .filter filteredUsers = theUsers.filter (user) -> user.id >= 2 Met...
Alert is a simple popup that displays a set of buttons and gets an result depending on the button the user clicked: Example This lets the user decide, if (s)he really wants to close the primary stage: @Override public void start(Stage primaryStage) { Scene scene = new Scene(new Group(), 100...
The text displayed in a button can be customized, by creating a ButtonType instance yourself: ButtonType answer = new ButtonType("42"); ButtonType somethingElse = new ButtonType("54"); Alert alert = new Alert(Alert.AlertType.NONE, "What do you get when you multiply six ...
/// <summary> /// Converts a data type to another data type. /// </summary> public static class Cast { /// <summary> /// Converts input to Type of default value or given as typeparam T /// </summary> /// <typepara...
/// <summary> /// Read configuration values from app.config and convert to specified types /// </summary> public static class ConfigurationReader { /// <summary> /// Get value from AppSettings by key, convert to Type of default value or typ...
[TestFixture] public class UnitTest1 { class Message { public string Text { get; } = "Hello World"; } [Test] public void HelloWorldTest() { // Act var message = new Message(); // Assert Assert.That(message.Tex...
root: build.gradle buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle-experimental:0.8.0-alpha4' } } allprojects { repositories { jcenter() } } app: build.gradle apply plugin: 'com.andro...
root: build.gradle buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle-experimental:0.8.0-alpha4' } } allprojects { repositories { jcenter() } } app: build.gradle apply plugin: 'com.andro...
You can wrap values into actions and pipe the result of one computation into another: return :: Monad m => a -> m a (>>=) :: Monad m => m a -> (a -> m b) -> m b However, the definition of a Monad doesn’t guarantee the existence of a function of type Monad m => m a -&...
do-notation is syntactic sugar for monads. Here are the rules: do x <- mx do x <- mx y <- my is equivalent to do y <- my ... ... do let a = b let a = b in ...
When you assign an array or object literal to a value, CoffeeScript breaks up and matches both sides against each other, assigning the values on the right to the variables on the left. # Swap [x, y] = [y, x]
person = name: "Duder von Broheim" age: 27 address: "123 Fake St" phoneNumber: "867-5309" {name, age, address, phoneNumber} = person

Page 601 of 1336