The Implement directive indicates that the web page, master page or user control page must implement the specified .Net framework interface.
The basic syntax for implements directive is:
<%@ Implements Interface="interface_name" %>
If you have a vsix file, you can install it by running the file.
Get the vsix file (this is the extension installer)
Run the file.
In the window that opens, confirm the installation.
In Visual studio
go to Tools > Extensions and updates...
In the window that opens go to online
Select Visual Studio Gallery
You can search for an extension on the search box at the upper right corner
Select the extension you want to add
Click on download.
Once download is complete, click...
To add annotations, hints, or exclude some code from being executed JavaScript provides two ways of commenting code lines
Single line Comment //
Everything after the // until the end of the line is excluded from execution.
function elementAt( event ) {
// Gets the element from Event coordinate...
By default, Django renders ForeignKey fields as a <select> input. This can cause pages to be load really slowly if you have thousands or tens of thousand entries in the referenced table. And even if you have only hundreds of entries, it is quite uncomfortable to look for a particular entry amo...
Using Kestrel you can specify port using next approaches:
Defining ASPNETCORE_URLS environment variable.
Windows
SET ASPNETCORE_URLS=https://0.0.0.0:5001
OS X
export ASPNETCORE_URLS=https://0.0.0.0:5001
Via command line passing --server.urls parameter
dotnet run --server.urls=http...
You can select elements with different selectors :
by tag : "div"
by class : ".class"
by id : "#id"
by attribute : "[color=blue]"
multiple selectors (OR): "div1, div2, class1"
multiple selectors (AND): "div1 div2 class1"
The case modifier causes the Scala compiler to automatically generate common boilerplate code for the class. Implementing this code manually is tedious and a source of errors. The following case class definition:
case class Person(name: String, age: Int)
... will have the following code automati...
Unity works with hierarchies in order to keep your project organized. You can assign objects a place in the hierarchy using the editor but you can also do this through code.
Parenting
You can set an object's parent with the following methods
var other = GetOtherGameObject();
other.transform.Se...
append([], Bs, Bs).
append([A|As], Bs, [A|Cs]) :-
append(As, Bs, Cs).
append/3 is one of the most well-known Prolog relations. It defines a relation between three arguments and is true if the third argument is a list that denotes the concatenation of the lists that are specified in the firs...
Destructuring also gives you the ability to interpret a sequence as a map:
(def my-vec [:a 1 :b 2])
(def my-lst '("smthg else" :c 3 :d 4))
(let [[& {:keys [a b]}] my-vec
[s & {:keys [c d]} my-lst]
(+ a b c d)) ;= 10
It is useful for defining functions with named p...
In oracle, the difference (in days and/or fractions thereof) between two DATEs can be found using subtraction:
SELECT DATE '2016-03-23' - DATE '2015-12-25' AS difference FROM DUAL;
Outputs the number of days between the two dates:
DIFFERENCE
----------
89
And:
SELECT TO_DATE( '201...
Following code will release the lock. There will be no problem. Behind the scenes lock statement works as try finally
lock(locker)
{
throw new Exception();
}
More can be seen in the C# 5.0 Specification:
A lock statement of the form
lock (x) ...
where x is an expression of a referenc...
Enum classes can also declare members (i.e. properties and functions). A semicolon (;) must be placed between the last enum object and the first member declaration.
If a member is abstract, the enum objects must implement it.
enum class Color {
RED {
override val rgb: Int = 0xFF0000
...
Many times when working with the canvas you will need to have a canvas to hold some intrum pixel data. It is easy to create an offscreen canvas, obtain a 2D context. An offscreen canvas will also use the available graphics hardware to render.
The following code simply creates a canvas and fills it ...
For each environment you need to create a separate appsettings.{EnvironmentName}.json files:
appsettings.Development.json
appsettings.Staging.json
appsettings.Production.json
Then open project.json file and include them into "include" in "publishOptions" section. This lis...
XML pre-defines five general entities that can be used without declaring them:
& " ' < >
They are associated with the names amp, quot, apos, lt and gt.
<?xml version="1.0"?>
<entities>
&amp; is an ampersand.
&quot; is a quote.
&apos; is...