Tutorial by Examples: ado

Once you've installed the .NET CLI tools, you can create a new project with the following command: dotnet new --lang f# This creates a command line program.
This example shows how to use a readonly wrapper property to create a property that cannot be written to. In this case cost and price can be modified, but profit will always be price - cost. import java.text.MessageFormat; import javafx.beans.property.IntegerProperty; import javafx.beans.property...
/** * Explain briefly what method does here * @param x Explain briefly what should be x and how this affects the method. * @param y Explain briefly what should be y and how this affects the method. * @return Explain what is returned from execution. */ def method(x: Int, y: String): O...
An example of code showing how nodes can be inserted at a doubly linked list, how the list can easily be reversed, and how it can be printed in reverse. #include <stdio.h> #include <stdlib.h> /* This data is not always stored in a structure, but it is sometimes for ease of use */ s...
Example showing how to create Guis using functions instead of labels. Gui, Add, Button, gCtrlEvent vButton1, Button 1 Gui, Add, Button, gCtrlEvent vButton2, Button 2 Gui, Add, Button, gGoButton, Go Button Gui, Add, Edit, vEditField, Example text Gui, Show,, Functions instead of labels CtrlEv...
@Singleton @Component(modules = AppModule.class) public interface AppComponent { void inject(App app); Context provideContext(); Gson provideGson(); MainActivityComponent mainActivityComponent(ActivityModule activityModule); } @ActivityScope @Subcomponent(modules = Act...
Given 2 lists var list1 = new List<string> { "a", "b", "c" }; var list2 = new List<string> { "1", "2", "3", "4" }; if you want to output all permutations you could use nested loops like var result = new List<s...
ADO.NET Connections are one of the simplest ways to connect to a database from a C# application. They rely on the use of a provider and a connection string that points to your database to perform queries against. Common Data Provider Classes Many of the following are classes that are commonly used...
Creating Hadoop User: sudo addgroup hadoop Adding a user: sudo adduser --ingroup hadoop hduser001 Configuring SSH: su -hduser001 ssh-keygen -t rsa -P "" cat .ssh/id rsa.pub >> .ssh/authorized_keys Note: If you get errors [bash: .ssh/authorized_keys: No such file or di...
var client = new MongoClient("mongodb://localhost:27017"); var database = client.GetDatabase("test"); var collection = database.GetCollection < Interactions > ("Interactions"); var newItem = new Interactions{ SiteName = "Example", Pages = ...
var client = new MongoClient("mongodb://localhost:27017"); var database = client.GetDatabase("test"); var collection = database.GetCollection < Interactions > ("Interactions"); var result = IMongoCollectionExtensions .AsQueryable(collection) ...
var client = new MongoClient("mongodb://localhost:27017"); var database = client.GetDatabase("test"); var collection = database.GetCollection < Interactions > ("Interactions"); var update = MongoDB.Driver .Builders .Update.Set(s => s.SiteName, "New Ex...
var client = new MongoClient("mongodb://localhost:27017"); var database = client.GetDatabase("test"); var collection = database.GetCollection < Interactions > ("Interactions"); collection.DeleteOne(s => s.SiteName == "New Example");
To add shadows to text, use the text-shadow property. The syntax is as follows: text-shadow: horizontal-offset vertical-offset blur color; Shadow without blur radius h1 { text-shadow: 2px 2px #0000FF; } This creates a blue shadow effect around a heading Shadow with blur radius To add a...
Insert a document called 'myFirstDocument' and set 2 properties, greetings and farewell const MongoClient = require('mongodb').MongoClient; const url = 'mongodb://localhost:27017/test'; MongoClient.connect(url, function (err, db) { if (err) throw new Error(err); db.collection('myCollect...
Find a document with the property { greetings: 'Hellu' } and change it to { greetings: 'Whut?' } const MongoClient = require('mongodb').MongoClient; const url = 'mongodb://localhost:27017/test'; MongoClient.connect(url, function (err, db) { if (err) throw new Error(err); db.collecti...
Delete a document with the property { greetings: 'Whut?' } const MongoClient = require('mongodb').MongoClient; const url = 'mongodb://localhost:27017/test'; MongoClient.connect(url, function (err, db) { if (err) throw new Error(err); db.collection('myCollection').deleteOne(// Delete...
Many bugs in knockout data binds are caused by undefined properties in a viewmodel. Knockout has two handy methods to retrieve the binding context of an HTML element: // Returns the binding context to which an HTMLElement is bound ko.contextFor(element); // Returns the viewmodel to which ...
You can use 5 properties on each layer to configure your shadows: shadowOffset - this property moves your shadow left/right or up/down self.layer.shadowOffset = CGSizeMake(-1, -1); // 1px left and up self.layer.shadowOffset = CGSizeMake(1, 1); // 1px down and right shadowColor - this s...
HTML template files are always loaded before everything else Files beginning with main. are loaded last Files inside any lib/ directory are loaded next Files with deeper paths are loaded next Files are then loaded in alphabetical order of the entire path Reference Link Reference page: Mete...

Page 4 of 7