Tutorial by Examples

1. Model : public class ContactModel { [Required, Display(Name="Sender Name")] public string SenderName { get; set; } [Required, Display(Name = "Sender Email"), EmailAddress] public string SenderEmail { get; set; } [Required] public string Messag...
<div sec:authorize="isAuthenticated()"> This text is displayed for authenticated users. </div>
/In async.series,all the functions are executed in series and the consolidated outputs of each function is passed to the final callback. e.g/ var async = require('async'); async.series([ function (callback) { console.log('First Execute..'); callback(null, 'userPersonalData'); }, function (cal...
The basic syntax of find() method with projection is as follows > db.COLLECTION_NAME.find({},{KEY:1}); If you want to show all documents without the age field then the command is as follows db.people.find({},{age : 0}); If you want to show all documents the age field then the command is a...
In MongoDB, projection means selecting only the necessary data rather than selecting whole of the data of a document. The basic syntax of find() method with projection is as follows > db.COLLECTION_NAME.find({},{KEY:1}); If you want to to show all document without the age field then the comm...
Using sequence function you can easily describe a message that calls a list of other messages. It's useful when dealing with semantics of your messages. Example 1: You are making a game engine, and you need to refresh the screen on every frame. module Video exposing (..) type Message = module Vid...
Detailed instructions on getting optimization set up or installed.
RDBMSGraph DatabaseTablesGraphsRowsNodesColumns and DataProperties and its valuesConstraintsRelationshipsJoinsTraversal
To register your methods, the class containing the EventHandler(s) must implement the Listener interface. import org.bukkit.event.Listener; public final class ListenerClass implements Listener { } You need to register the event listener by adding the following call to your onEnable method in...
Writing a Hello command Writing an Event Listener
Creating a basic block Creating a basic item Writing a Hello command Writing an Event Handler Getting started with Capabilities [1.8+]
When using the .get() method whatever is in the entry widget will be converted into a string. For example, regardless of the type of input(It can be a number or sentence), the resulting outcome will be a string. If the user types 4 the output will be "4" as in a string. To get an int from ...
Creating an event listener in Forge is very similar to creating one in Bukket. Creating the listener class requires a lot less. There's no interface to implement or other imports. public class ListenerClass { } //perfectly valid event listener class Registering it requires passing the instance ...
The andThen function allows update call composition. Can be used with the pipeline operator (|>) to chain updates. Example: You are making a document editor, and you want that each modification message you send to your document, you also save it: import Update.Extra exposing (andThen) import U...
public static MvcHtmlString DatePickerFor<TModel, TProperty>(this HtmlHelper<TModel> htmlHelper, Expression<Func<TModel, TProperty>> expression, object htmlAttributes) { var sb = new StringBuilder(); var metaData = ModelMetadata.FromLambdaExpression(expression, htm...
void C++ When used as a function return type, the void keyword specifies that the function does not return a value. When used for a function's parameter list, void specifies that the function takes no parameters. When used in the declaration of a pointer, void specifies that the pointer is ...
ArgumentCaptor will to receive the actual invocation arguments that has been passed to method. ArgumentCaptor<Foo> captor = ArgumentCaptor.forClass(Foo.class); verify(mockObj).doSomethind(captor.capture()); Foo invocationArg = captor.getValue(); //do any assertions on invocationArg For ...
The org.bukkit.event.EventHandler annotation accepts a couple parameters. priority - Indicates the priority of your listener. There are the six different priorities, in order of execution: LOWEST,LOW,NORMAL[default],HIGH,HIGHEST,MONITOR. These constants refer to the org.bukkit.event.EventPriority e...
# It creates vendor folder and vendor.json inside it govendor init # Add dependencies in vendor.json govendor fetch <dependency> # Usage on new repository # fetch depenencies in vendor.json govendor sync Example vendor.json { "comment": "", "ignore&qu...
Using scanf Scanf scans text read from standard input, storing successive space-separated values into successive arguments as determined by the format. It returns the number of items successfully scanned. If that is less than the number of arguments, err will report why. Newlines in the input mus...

Page 1222 of 1336