CREATE VIEW View_Index02
WITH SCHEMABINDING
AS
SELECT c.CompanyName, o.OrderDate, o.OrderID, od.ProductID
FROM dbo.Customers C
INNER JOIN dbo.orders O ON c.CustomerID=o.CustomerID
INNER JOIN dbo.[Order Details] od ON o.OrderID=od.OrderID
GO
CREATE UNIQUE C...
Generators are functions which are able to pause and then resume execution. This allows to emulate async functions using external libraries, mainly q or co. Basically it allows to write functions that wait for async results in order to go on:
function someAsyncResult() {
return Promise.resolve...
If you want to Download image as Bitmap using Picasso following code will help you:
Picasso.with(mContext)
.load(ImageUrl)
.into(new Target() {
@Override
public void onBitmapLoaded(Bitmap bitmap, Picasso.LoadedFrom from) {
// Todo: Do some...
for arg; do
echo arg=$arg
done
A for loop without a list of words parameter will iterate over the positional parameters instead. In other words, the above example is equivalent to this code:
for arg in "$@"; do
echo arg=$arg
done
In other words, if you catch yourself wri...
If we want to order the data differently for per group, we can add a CASE syntax to the ORDER BY.
In this example, we want to order employees from Department 1 by last name and employees from Department 2 by salary.
IdFNameLNamePhoneNumberManagerIdDepartmentIdSalaryHireDate1JamesSmith1234567890NUL...
CSS3 introduced two units for representing size.
vh, which stands for viewport height is relative to 1% of the viewport height
vw, which stands for viewport width is relative to 1% of the viewport width
3
div {
width: 20vw;
height: 20vh;
}
Above, the size for the div takes up 2...
We are so used to the name D3.js that it's possible to forget that D3 is actually DDD (Data-Driven Documents). And that's what D3 does well, a data-driven approach to DOM (Document Object Model) manipulation: D3 binds data to DOM elements and manipulates those elements based on the bounded data.
Le...
In this example we have only one object but it is shared between/executed on different threads. Ordinary usage of fields to save state would not be possible because the other thread would see that too (or probably not see).
public class Test {
public static void main(String[] args) {
...
Reduction is the process of applying a binary operator to every element of a stream to result in one value.
The sum() method of an IntStream is an example of a reduction; it applies addition to every term of the Stream, resulting in one final value:
This is equivalent to (((1+2)+3)+4)
The reduc...
Sun / Oracle releases of Java SE come in two forms: JRE and JDK. In simple terms, JREs support running Java applications, and JDKs also support Java development.
Java Runtime Environment
Java Runtime Environment or JRE distributions consist of the set of libraries and tools needed to run and mana...
Orthogonal to the JRE versus JDK dichotomy, there are two types of Java release that are widely available:
The Oracle Hotspot releases are the ones that you download from the Oracle download sites.
The OpenJDK releases are the ones that are built (typically by third-party providers) from the Ope...
A JDK installation and a text editor are the bare minimum for Java development. (It is nice to have a text editor that can do Java syntax highlighting, but you can do without.)
However for serious development work it is recommended that you also use the following:
A Java IDE such as Eclipse, In...
In order to be able to work with C structs as Ruby objects, you need to wrap them with calls to Data_Wrap_Struct and Data_Get_Struct.
Data_Wrap_Struct wraps a C data structure in a Ruby object. It takes a pointer to your data structure, along with a few pointers to callback functions, and returns a...
//Here self.webView is the view whose screenshot I need to take
//The screenshot is saved in jpg format in the application directory to avoid any loss of quality in retina display devices i.e. all current devices running iOS 10
UIGraphicsBeginImageContextWithOptions(self.webView.bounds.size, N...
You can create custom views that can be integrated to your page thanks to those adjustment tools.
Select File > New > File... > Forms > Forms ContentView (Xaml) and create a view for each specific layout : TabletHome.xamland PhoneHome.xaml.
Then select File > New > File... > F...
To move to split on left, use <C-w><C-h>
To move to split below, use <C-w><C-j>
To move to split on right, use <C-w><C-k>
To move to split above, use <C-w><C-l>
Assume you want to delegate to a class but you do not want to provide the delegated-to class in the constructor parameter. Instead, you want to construct it privately, making the constructor caller unaware of it. At first this might seem impossible because class delegation allows to delegate only to...
Gson does not support inheritance out of the box.
Let's say we have the following class hierarchy:
public class BaseClass {
int a;
public int getInt() {
return a;
}
}
public class DerivedClass1 extends BaseClass {
int b;
@Override
public int getI...