Make your own eBooks

Use our Remix App to mix & match content. In minutes make your own course packs, training bundles, custom travel guides, you name it. Even add your own title & cover.


Slices & Articles Get by the slice or add to your own ebook

Medium 9781601323125

Session - Short Research Papers

Hamid R. Arabnia, George A. Gravvanis, George Jandieri, Ashu M. G. Solo, and Fernando G. Tinetti CSREA Press PDF
Medium 9781449320171

Nullable Types

Joseph Albahari O'Reilly Media ePub

Reference types can represent a nonexistent value with a null reference. Value types, however, cannot ordinarily represent null values. For example:

To represent null in a value type, you must use a special construct called a nullable type. A nullable type is denoted with a value type followed by the ? symbol:

T? translates into System.Nullable<T>. Nullable<T> is a lightweight immutable structure, having only two fields, to represent Value and HasValue. The essence of System.Nullable<T> is very simple:

The code:

translates to:

Attempting to retrieve Value when HasValue is false throws an InvalidOperationException. GetValueOrDefault() returns Value if HasValue is true; otherwise, it returns new T() or a specified custom default value.

The default value of T? is null.

The conversion from T to T? is implicit, and from T? to T is explicit. For example:

The explicit cast is directly equivalent to calling the nullable objects Value property. Hence, an InvalidOperationException is thrown if HasValue is false.

See All Chapters
Medium 9780992461256

9. Using MongoDB and Mongoose in Our Sample App

Colin J Ihrig SitePoint ePub

In Chapter 6, we began work on our example human resources application. At the time, Node was unfortunately the only technology that had been introduced, so the application in Chapter 6 only consisted of a Node HTTP server returning hard-coded employee data from a JSON file. Now that we have a good understanding of MongoDB and the Mongoose module, we can update the example application to use a database.

This chapter will build on the server from Chapter 6. We’re going to assume that you have the example application code on your local machine already. We’ll also assume that you have run npm install, and can successfully connect to the server using a browser. For example, you should be able to view the employee listing shown in Figure 9.1 by visiting the URL

Figure 9.1. Output data from the example application

We’re going to begin by creating two Mongoose models for working with our MongoDB instance. The first step is to install the mongoose module and save it to the project’s package.json using the command shown in Listing 9-1:

See All Chapters
Medium 9780596000400

8. Security

Jason Hunter O'Reilly Media ePub

So far we have imagined that our servlets exist in a perfect world, where everyone is trustworthy and nobody locks their doors at night. Sadly, thats a 1950s fantasy world: the truth is that the Internet has its share of fiendish rogues. As companies place more and more emphasis on online commerce and begin to load their intranets with sensitive information, security has become one of the most important topics in web programming.

Security is the science of keeping sensitive information in the hands of authorized users. On the Web, this boils down to four important issues:

Being able to verify the identities of the parties involved

Limiting access to resources to a select set of users or programs

Ensuring that only the parties involved can understand the communication

Being able to verify that the content of the communication is not changed during transmission

It helps to think of this in context: a client wants to be sure that it is talking to a legitimate server (authentication), and it also wants to be sure that any information it transmits, such as credit card numbers, is not subject to eavesdropping (confidentiality). The server is also concerned with authentication and confidentiality, as well as authorization. If a company is selling a service or providing sensitive information to its own employees, it has a vested interest in making sure that nobody but an authorized user can access it. Finally, both sides need integrity to make sure that whatever information they send gets to the other party unaltered.

See All Chapters
Medium 9788131803660

Examination Papers New

/products/authors/736025/list /products/publishers/14591/list PDF


WBUT Examination Questions

Engineering & Technology Examinations, December – 2005



Time : 3 Hours]

[Full Marks : 70

The figures in the margin indicate full marks.

Candidates are required to give their answers in their own words as far as practicable.

Note : (i) Question No. 1 is compulsory.

(ii) Answer any five full questions from the remaining.

1. (A) Select the correct answers from the given alternatives in each case : 10 ´ 1 = 10

(i) Degree of freedom of a hydrogen molecule is

(a) 1

(b) 2

(c) 5.



(ii) The angle between i$ and 2i$ + j$ is



(b) cos�1



(iii) In a free space Poisson�s equation is

(a) cos�1

(a) Ñ2 V = 0

(b) Ñ2 V =

(c) cos�1

Î0 r




(c) Ñ2 V = ¥.

(iv) If B = Ñ ´ A , B and A are any vectors then

(a) Ñ . B = 0

(b) Ñ . B = 1

(c) Ñ . B = - 1

(v) Maxwell�s electromagnetic wave equations in terms of electric field vector E in free space is

¶2 E

¶2 E








= m




= m



0 0

0 0

¶t 2

¶t 2

¶t 2

(vi) On superimposing two mutually perpendicular simple harmonic motion, we get circular

See All Chapters

See All Slices