Technology Questions

Q:

How can we achieve singleton pattern in iOS?

Answer

The Singleton design pattern ensures a class only has one instance, and provides a global point of access to it. The class keeps track of its sole instance and ensures that no other instance can be created. Singleton classes are appropriate for situations where it makes sense for a single object to provide access to a global resource.Several Cocoa framework classes are singletons. They includeNSFileManager, NSWorkspace, NSApplication, and, in UIKit,UIApplication. A process is limited to one instance of these classes. When a client asks the class for an instance, it gets a shared instance, which is lazily created upon the first request.

Report Error

View answer Workspace Report Error Discuss

Subject: IOS

3 2608
Q:

What documents are used for use cases?

Answer

There are 2 documents: 


FRD (functional requirement document) 


SDD (system design document) which can also be called TRS (Technical requirements specifications) 

Report Error

View answer Workspace Report Error Discuss

0 2608
Q:

Explain three important components of Dynamic HTML authoring - Positioning, Style modifications and Event handling

Answer

- Positioning: Is some what where we need the object to be placed in the graphical view i:e on screen. If we talk in DHTML sense then we have two types of positioning: Relative and Absolute.


Relative Positioning: Relative positioning is the same as the current HTML3 layout and is best reserved for situations where you want to be sure that the content will revert to this default inside a document that also uses absolute positioning.


Absolute Positioning: In DHTML absolute positioning means that the object will remain at the same position regardless of the condition of other elements and the size of the browser. In simple languages if an object/image is absolutely positioned (STYLE="position: absolute;"), with an offset of 150 pixels to the right and 250 pixels down from the left-hand corner of the browser screen then it will avail this position what ever the circumstances may be.


- Style Modifications: Style modification indicates the changes in the presentation or the view part that are being made in web page. This part comes under Cascading Style Sheet where the user style his web page by using the attributes and the tags that are pre-defined in CSS.


- Event Handling: As explained earlier Events is the beating heart of any JavaScript application. For handling event in DHTML we attach event handler to HTML elements. The event handler waits until a certain event, for instance a click on a link, takes place. When it happens it handles the event by executing some JavaScript code that has been defined by us. After it has executed the code the event handler comes to its initial state and waits for the user to fire any event. Hence to handle events in DHTML we need to register an event handler.

Report Error

View answer Workspace Report Error Discuss

Subject: Web Technology

0 2602
Q:

What is the difference between class and structure?

Answer

Structure: Initially (in C) a structure was used to bundle different type of data types together to perform a particular functionality. But C++ extended the structure to contain functions also. The major difference is that all declarations inside a structure are by default public.
Class: Class is a successor of Structure. By default all the members inside the class are private.

Report Error

View answer Workspace Report Error Discuss

Subject: C++

0 2596
Q:

What is RAC and how is it different from non RAC databases?

Answer

Oracle Real Application Clusters (RAC) is a software component we can add to a high-availability solution that enables users on multiple machines to access a single database with increased performance. RAC comprises two or more Oracle database instances running on two or more clustered machines and accessing a shared storage device via cluster technology. To support this architecture, the machines that host the database instances are linked by a high-speed interconnect to form the cluster. Oracle RAC offers features in the following areas:


- Scalability


- Availability


- Load balancing


- Failover

Report Error

View answer Workspace Report Error Discuss

Subject: Oracle

0 2590
Q:

What strategies are available for backing-up an Oracle database?

Answer

The backup strategies that are provided by Oracle are as follows:


- Logical backup using Exports and import.


- Physical file system backup


- RMAN Recovery Manger which is also known as incremental files system backup.

Report Error

View answer Workspace Report Error Discuss

Subject: Oracle

0 2588
Q:

How to set cookies?

Answer

setcookie('variable','value','time');
variable - name of the cookie variable
value     - value of the cookie variable
time       - expiry time

Example:
<?php
setcookie('Test',$i,time()+3600);
?>
Test - cookie variable name
$i - value of the variable 'Test'
time()+3600 - denotes that the cookie will expire after an one hour

Report Error

View answer Workspace Report Error Discuss

Subject: PHP

0 2587
Q:

What is traffic shaping?

Answer

One of the main causes of congestion is that traffic is often busy. If hosts could be made to transmit at a uniform rate, congestion would be less common. Another open loop method to help manage congestion is forcing the packet to be transmitted at a more predictable rate. This is called traffic shaping.

Report Error

View answer Workspace Report Error Discuss

0 2584