Wednesday, 2 November 2011

Windows XP Shortcut Keys

Windows 7 shortcut keys

Many assistive software programmes make use of the short cut keys in Windows. Their use is often quicker than having to move to the mouse and back to perform a specific action.

Accessibility keyboard shortcuts

Fliter keys sets up the keyboard to ignore repeated or momentary key presses
Right SHIFT for eight seconds Switch Filter Keys on and off.
High contrast screen mode can be turned on or off via the following combination :-
Left ALT +left SHIFT +PRINT SCREEN Switch High Contrast on and off. ( works before the login)
Further changes can be made with the accessibility wizard in the accessibility programme group
Left ALT +left SHIFT +NUM LOCK Switch Mouse Keys on and off.
Mouse keys can emulate mouse movements on the keyboard
SHIFT five times Switch Sticky Keys on and off.
Sticky keys will allow successive key presses to be recorded as simultaneous ones eg to help the CNTRL + ALT + DELETE option for logging in.
NUM LOCK for five seconds Switch Toggle Keys on and off.
Toggle keys gives an audible warning when the CAPS LOCK, NUM LOCK and SCROLL LOCK

General keyboard shortcuts


CTRL+C Copy.
CTRL+X Cut.
CTRL+V Paste.
CTRL+Z
Undo.
CTRL+RIGHT ARROW Move the insertion point to the beginning of the next word.
CTRL+LEFT ARROW Move the insertion point to the beginning of the previous word.
CTRL+DOWN ARROW Move the insertion point to the beginning of the next paragraph.
CTRL+UP ARROW Move the insertion point to the beginning of the previous paragraph.
CTRL+SHIFT with any of the arrow keys Highlight a block of text.
SHIFT with any of the arrow keys Select more than one item in a window or on the desktop, or select text within a document.
CTRL+A Select all.
F3 Search for a file or folder.
ALT+ENTER View properties for the selected item.
ALT+F4 Close the active item, or quit the active program.
ALT+ENTER Displays the properties of the selected object.
ALT+SPACEBAR Opens the shortcut menu for the active window.
CTRL+F4 Close the active document in programs that allow you to have multiple documents open simultaneously.
ALT+TAB Switch between open items.
ALT+ESC Cycle through items in the order they were opened.
F6 Cycle through screen elements in a window or on the desktop.
F4 Display the Address bar list in My Computer or Windows Explorer.
SHIFT+F10 Display the shortcut menu for the selected item.
ALT+SPACEBAR Display the System menu for the active window.
CTRL+ESC Display the Start menu.
ALT+Underlined letter in a menu name Display the corresponding menu.
Underlined letter in a command name on an open menu Carry out the corresponding command.
F10 Activate the menu bar in the active program.
RIGHT ARROW Open the next menu to the right, or open a submenu.
LEFT ARROW Open the next menu to the left, or close a submenu.
F5 Refresh the active window.
BACKSPACE View the folder one level up in My Computer or Windows Explorer.
ESC Cancel the current task.
SHIFT when you insert a CD into the CD-ROM drive Prevent the CD from automatically playing.


Dialog box keyboard shortcuts


CTRL+TAB Move forward through tabs.
CTRL+SHIFT+TAB Move backward through tabs.
TAB Move forward through options.
SHIFT+TAB Move backward through options.
ALT+Underlined letter Carry out the corresponding command or select the corresponding option.
ENTER Carry out the command for the active option or button.
SPACEBAR Select or clear the check box if the active option is a check box.
Arrow keys Select a button if the active option is a group of option buttons.
F1 Display Help.
F4 Display the items in the active list.
BACKSPACE Open a folder one level up if a folder is selected in the Save As or Open dialog box.


Windows Explorer keyboard shortcuts


END Display the bottom of the active window.
HOME Display the top of the active window.
NUM LOCK+ASTERISK on numeric keypad (*) Display all sub folders under the selected folder.
NUM LOCK+PLUS SIGN on numeric keypad (+) Display the contents of the selected folder.
NUM LOCK+MINUS SIGN on numeric keypad (-) Collapse the selected folder.
LEFT ARROW Collapse current selection if it's expanded, or select parent folder.
RIGHT ARROW Display current selection if it's collapsed, or select first sub folder

Primary and Foreign Keys in SQL Database


Primary and Foreign Keys

Database Primary and Foreign Keys:
Primary and foreign keys are the most basic components on which relational database theory is based. Primary keys enforce entity integrity by uniquely identifying entity instances. Foreign keys enforce referential integrity by completing an association between two entities. The next step in building the basic data model to:
1.    Identify and define the primary key attributes for each entity
2.    Validate primary keys and relationships
3.    Migrate the primary keys to establish foreign keys

Attributes are data items that describe an entity. An attribute instance is a single value of an attribute for an instance of an entity. For example, Name and hire date are attributes of the entity EMPLOYEE. "Robert Thompson" and "12 April 1999" are instances of the attributes name and hire date.
The primary key is an attribute or a set of attributes that uniquely identify a specific instance of an entity. Every entity in the data model must have a primary key whose values uniquely identify instances of the entity.
To qualify as a primary key for an entity, an attribute must have the following properties:
§  It must have a non-null value for each instance of the entity
§  The value must be unique for each instance of an entity
§  The values must not change or become null during the life of each entity instance
In some instances, an entity will have more than one attribute that can serve as a primary key. Any key or minimum set of keys that could be a primary key is called a candidate key. Once candidate keys are identified, choose one, and only one, primary key for each entity. Choose the identifier most commonly used by the user as long as it conforms to the properties listed above. Candidate keys which are not chosen as the primary key are known as alternate keys.
An example of an entity that could have several possible primary keys is Employee. Let's assume that for each employee in an organization there are three candidate keys: Employee ID, Social Security Number, and Name.
Name is the least desirable candidate. While it might work for a small department where it would be unlikely that two people would have exactly the same name, it would not work for a large organization that had hundreds or thousands of employees. However, there is the possibility that an employee's name could change because of marriage (your primary key should never be changed). Employee ID would be a good candidate as long as each employee were assigned a unique identifier at the time of hire. Social Security would work best since every employee is required to have one before being hired.
Composite Keys:
Sometimes it requires more than one attribute to uniquely identify an entity. A primary key that made up of more than one attribute is known as a composite key. Below shows an example of a composite key. Each instance of the entity Work can be uniquely identified only by a composite key composed of Employee ID and Project ID.
Example of Composite Keys
EmployeeID
ProjectID
HoursWorked
01
01
100
01
02
120
02
01
75
02
03
115
03
03
140
03
04
80
Artificial Keys:
An artificial key is one that has no meaning to the business or organization. Artificial keys are permitted when:
1.    no attribute has all the primary key properties, or
2.    the primary key is large and complex
Primary Key Migration:
Dependent entities, entities that depend on the existence of another entity for their identification, inherit the entire primary key from the parent entity. Every entity within a generalization hierarchy inherits the primary key of the root generic entity.
Define Key Attributes:
Once the keys have been identified for the model, it is time to name and define the attributes that have been used as keys.
There is no standard method for representing primary keys in ER diagrams. For this article, the name of the primary key followed by the notation (PK) is written inside the entity box. An example is shown in below:
Entities with Key Attributes
Validate Keys and Relationships
Basic rules governing the identification and migration of primary keys are:
§  Every entity in the data model shall have a primary key whose values uniquely identify entity instances.
§  The primary key attribute cannot be optional (i.e., have null values).
§  The primary key cannot have repeating values. That is, the attribute may not have more than one value at a time for a given entity instance is prohibited. This is known as the No Repeat Rule.
§  Entities with compound primary keys cannot be split into multiple entities with simpler primary keys. This is called the Smallest Key Rule.
§  Two entities may not have identical primary keys with the exception of entities within generalization hierarchies.
§  The entire primary key must migrate from parent entities to child entities and from super type, generic entities, to subtypes, category entities.
Foreign Keys:
A foreign key is an attribute that completes a relationship by identifying the parent entity. Foreign keys provide a method for maintaining integrity in the data (called referential integrity) and for navigating between different instances of an entity. Every relationship in the model must be supported by a foreign key.
Identifying Foreign Keys:
Every dependent and category (subtype) entity in the model must have a foreign key for each relationship in which it participates. Foreign keys are formed in dependent and subtype entities by migrating the entire primary key from the parent or generic entity. If the primary key is composite, it may not be split.
Foreign Key Ownership:
Foreign key attributes are not considered to be owned by the entities to which they migrate, because they are reflections of attributes in the parent entities. Thus, each attribute in an entity is either owned by that entity or belongs to a foreign key in that entity.
If the primary key of a child entity contains all the attributes in a foreign key, the child entity is said to be "identifier dependent" on the parent entity, and the relationship is called an "identifying relationship." If any attributes in a foreign key do not belong to the child's primary key, the child is not identifier dependent on the parent, and the relationship is called "non identifying."

Caching in Asp .Net



Caching In ASP.NET 

One of the performance issues of a database drive Web application is retrieving data from a database. If it needs to access the database with every page request, then the response will be very slow. We can avoid this situation with cache technique. You can cache the data in memory when the page is requested for the first time, and hence forth for the subsequent request the page can be served from cache. This reduces network trips to the backend, minimize server workload and database load too, hence the performance increase.

Even though, ASP.NET 1.0 offered variety of caching, if the cache content of a table in memory is changed in the database after the first request, will that change get reflect in your page when it is served from the cache? No, your application will display old data only. Unfortunately we don’t have a sufficient solution for this problem prior to the release of ASP.NET 2.0. The newer version is having a new feature called “SQL Cache Invalidation”, an opt solution for this problem. Further the new framework extends the existing caching techniques more powerful and easier to use and manage.

In this article we are going to see the new and improved caching techniques available in APS.NET2.0. First, let us see about Data Caching enhancements.

Data Caching
Data Caching allows you to cache random objects, so that your applications need not to recreate them from the server. A new class System.Web.Caching.CacheDependency available in ASP.NET 2.0 enables you to write your own implementation of cache dependency. Further you can cache the data using the new DataSource controls available in ASP.NET 2.0, the following code describes how to enable a cache with a SqlDataSource control.
 
<asp:SqlDataSource
ID="SqlDataSource1"
EnableCaching="true"
CacheDuration="600"
ConnectionString="Server=localhost;database=Pubs"
SelectCommand="SELECT Title FROM Authors"
Runat="server" />
SQL Cache Invalidation
As we have seen earlier, your application may give old data when it is served from cache, without the awareness about the data change made in the database. In ASP.NET 1.X we used to give minimum value for Cache Duration. But this will increase the network load. If we give maximum value for Cache Duration then we will get wrong data. Instead of this if there a notification system, which will notify when ever the data is getting changed in the database, will it solve this problem…? Yes, that is SQL Cache Invalidation. It allows you to update your cached content automatically whenever the data changes in the database.

We can split this feature into two cases, based on the SQL Server version you are having. The new version of SQL Server series ‘Yukon’ codename for SQL Server 2005 can be configured to notify your web application whenever changes have been made to database or a database table or a database row. But in SQL Server 7/ SQL Server 2000, there is no built in notification model. Hence, ASP.NET application has to constantly monitor the database to check for changes. The following figures describe these two cases.

In either case, if there is some change, then items added to the cache that depend on the database are removed from the cache. That is, those items are invalidated.

How to enable SQL Cache Invalidation
You have to do some setup process before start using SQL Cache Invalidation. Two steps involved in this setup process.
1.    Configure SQL Server to support SQL Cache Invalidation
2. Add configuration information into your application’s web.config file
1. Configuring SQL Server
To configure your SQL Server you have to use the command line utility which is, available in your \WINDOWS\Microsoft.NET\Framework\v2.x.xxxxx. Execute the tool with the following options from command prompt.
aspnet_regsql –E –d Pubs –ed

The above line will enable the pubs database for SQL Cache Invalidation.
The following line will enable the Authors table for the same.

Aspnet_regsql –E –d Pubs –t Authors –et

What is happening behind the scenes…?
When you run the first command it will add a new database table called ‘AspNet_SqlCacheTablesForChangeNotification’. This table will have a list of all tables, which are enabled for SQL Cache Invalidation.



When you run the second command, a new trigger will be added to your database and it’ll fires whenever there is a modification in the table you mentioned, in our case ‘Authors’, and it updates the new table created in the previous step.

2. Configuring your web.config file
Include the following lines of code under <system.web> tag in your web.config file.
 
<caching>
<sqlCacheDependency enabled ="true" pollTime="60000">
<databases>
<add name="pubs" connectionStringName="AppConnectionString1" />
</databases>
</sqlCacheDependency>
</caching>
In the above code PollTime value is in milliseconds. In our case 60000 milliseconds means once a minute, application will check the cache table for changes.

The following example code will displays the contents of Titles table in the Pubs database with the advantage of SQL Cache dependency on the sqldatasource control. The page will monitor the table for changes. As along as there is no changes, the page will be served from the cache, once the data get changed the response is invalidated and the data source control reloads the data.
 
<asp:SqlDataSource ID="SqlDataSource1" Runat="server" CacheDuration="500" SqlCacheDependency="PubsDB: Titles" ProviderName="<%$ ConnectionStrings:AppConnectionString1.ProviderName %>"> </asp:SqlDataSource>
If you want to do the same SqlCacheDependency with <%@ OutputCache %> then you have to change your code as shown below.
 
<%@ OutputCache Duration="3600" VaryByParam="none" sqlDependency="pubs:Titles"%>
<asp:SqlDataSource ID="SqlDataSource1" Runat="server" ProviderName="<%$ ConnectionStrings:AppConnectionString1.ProviderName %>"> </asp:SqlDataSource>
Output Caching

Output Caching allows you to cache dynamic page and user control responses on any Http 1.1 cache-capable device in the output stream. Now we are going to see about some of the new enhancements in this technique.

Post Cache Substitution

Let us consider the following scenario, one of your application page is having a small dynamic region as time. In this case you can’t cache the entire page, since you need to update your page time with current time. So you are forced to use a separate usercontrol with the help of fragment caching. Instead of this ASP.NET 2.0 introduced a new feature called post cache substitution (a new API Response.Write Substitution), using this you can insert the dynamic contents, time in you case, into the particular page in every request.

Disk Output Cache

All your cached contents are stored in memory, if it is removed from the output cache due to memory constraint what can you do….? Here comes the new feature, you can save cached response to disk also, in addition to storing them in memory. So, incase of memory constraint, it happened to remove the cached content from memory, still you are having in them in disk. The cool thing is, it persist across application restarts, so that when the application comes back, the page can be served from your disk cache. You have to include
DiskCacheable="true" %> in <%@ OutputCache %> Directive
to turn on this feature for your page.

Cache Profiles

A page can be cached and served based on the cache profile settings in your configuration file. This allows you to manage no. of pages centrally. Still, you can override the cache profile settings with the page cache settings using output cache directive. The following code snippet shows the cache profile setting in the configuration file and corresponding usage of that profile in the page output directive.
Configuration file setting…
<caching >
<outputCacheSettings>
<outputCacheProfiles>
<add name="For1Minute" duration="60" />
</outputCacheProfiles>
</outputCacheSettings>
</caching>
Page setting…

<%@ OutputCache CacheProfile="CacheFor60Seconds" VaryByParam="Id" %>
Fragment Caching
In ASP.NET 1.0 you can specify the cache setting for fragment cache during design time only. But in ASP.NET 2.0 the fragment caching ControlCachePolicy API allows you to control caching settings for fragment caching of user control, programmatically.

Conclusion

Already you have tasted the benefits of caching, with ASP.NET 1.x. Now, the new DataSource controls allows you to cache the data, without writing code, SQL Cache Invalidation allows you to keep always updated cache content, seamless to the user, post cache substitution allows you to insert the dynamic content into a cached page. Totally the newer version of ASP.NET brings some more new enhancements in caching, which makes caching easy and more effective.


Thursday, 20 October 2011

Why Database Use


Any organization, be it a bank, Manufacturing company, Hospital, university, Conglomerate of a Governments departments , requires huge amount of data in some form or other. All such organization need reo collect data manipulate them and store them for future use. All such types of organization require data for a number of purposes, say;
A)  Preparing sales reports
B)  Forecasting sales
C)  Preparing accounts reports
D)  Getting medical histories of patients

Thus, we can say that data are very vital corporate resources. The amount of data used these data in organizations can be measured in the range of some billions of bytes or characters. The financial investment involved is also very high, Many organizations have become cortically dependent on the continued and successful operations of databases.

What is Database Management System ?


A database management system is an organized collection of facts. In other words we can say that it is a collection of information arranged and presented to serve an assigned purpose.
An example of a database is dictionary, where words are arranged alphabetically. Another example is a telephone directory, where subscriber’s names are listed in alphabetically order. Similarly, when you think of a box of cards with name and addresses written as a mailing list, then the box and its contents form a mailing database. Figure contains cards with mailing addresses. All these cards are placed in alphabetically order of names and the collection of these cards would be called a database.
Note: - Thus information stored in a database is arranged in a particular order.
In order to keep database updated, we may need to perform operation like adding information, removing information, editing existing information, etc. Take the case of a telephone diary, in which you note down the names, address and phone numbers of your friends. This is also a type of database. If you make new friends, you note the information about him /her in the diary which is equivalent to adding data to a database. If address of your friends changes then you note the new address in your diary which means editing a database. If you want to send a letter to your friend then you look into the diary to locate the address. This is called searching a database.
In case your telephone diary captains very large numbers of names, address, phone numbers, moreover, the name are not arranged in any orders. Thus , it would be very difficult to locate the names , address, and phone numbers of your friends .thus It is essential to arrange the names in some order, say alphabetically ,to make search easy, However as the number of friends gets larger, managing the database manually become difficult . A database management software package is a helpful tool in such a situation.

Sunday, 18 September 2011

Botnet

The word Botnet gets its name by joining the words Bot and Net, bot is a short for Robots and Net for Network. In a one line definition, a BotNet is comprised of a network of computers which intends harm to the computer owner and also others. The reason it is known as a Robot Network is because it is "controlled" its master handlers or owners. These handlers or owners turn the infected machine into a zombie, which has no choice but to "obey" their commands. The owners of the infected computers don't even know that their machine is infected.

Botnets still remain the worst problem for computer security professionals. The purpose of a botnet infected computer could range from just stealing data from the local machine to targeting and sabotaging remote machines. Botnets are used to collect information such as usernames and passwords from an infected machine which can lead to compromising credentials, for example username and password to log on to your bank's website.

It could destroy or send over documents of importance such as financial spreadsheets, CAD drawings, confidential documents that could be used in identity theft to its handlers. In some cases, the infected machines are used as mail servers to send SPAM emails or even produce ad-clicks to generate ad based revenue for certain websites. The most malicious use of an infected machine is to infect other machines and make them a part of its own network, and then launch DDOS (distributed denial of service attacks) on another network or website. When a DDOS attack is launched on another network, the website or network under attack gets so overwhelmed by requests that it simply can't keep up and shuts down, denying service to legitimate customers.

Because the nature of an infected machine and its payload could be so different the infection is hard to detect. The most common sources of infection are IRC (internet relay chat), where users join a chatroom and are sent a "file" by another infected user and they accept the transfer. Malware infected websites are also a big source of this problem. You must stay protected by having multiple layers of protection on your network and machines. You must have a firewall (even if it’s a small router based one) on your network, in addition your machines must have spyware and antivirus clients installed on them, and they must be set to do regular updates. There are even some online services such as one from Microsoft (see an article we did aboutMicrosoft’s Live One Care) that can scan your machine of infections. Even with all due software installed, you must do your own due diligence to avoid being infected, do not accept file transfers from unknown sources, do not open emails (with or without attachments) from sources you do not trust, do regular virus and spyware scans of your machine and keep your machine updated with all the patches and security updates from your OS vendor

Creak Windows password


Today we will show you proof of concept on how you can log on to any password protected Windows machine, without knowing the password at all. I am sure you have heard of utilities which will "reset" or "recover the Windows login password for you, but this is way cooler than that, this utility will not write or reset anything to the hard drive. After you are done, on the next reboot the machine will retain its original password. There is no "reset" or lengthy recovery involved. The 5 step process is so easy that after you have seen this, you will be shaking your head

We are going to demonstrate this process on a Windows XP service pack 3 machine, but the process is essentially exactly the same for other versions of Windows such as Windows 7, Vista, Windows Server 2003 or even Windows 2000 workstation and server.
Most of the magic will be done by a nifty utility from Kryptos logic called Kon-Boot, which you can download from its web page located athttp://www.piotrbania.com/all/kon-boot/. This same utility can also be used to log on to Linux systems, but that is outside the scope of this article, we will concentrate only on Windows.
You will need to download the .iso file from the Kon-Boot website and burn it to a CD. If you need instructions on how to burn a CD from an iso image using a free tool, you can read up on it on our article here. Next, make sure that the BIOS is set to boot from the CD drive. With the CD in the drive, boot the machine
Step1:
- After the machine boots from the CD, you will see the splash screen as shown on the left hand side. Simply hit enter to continue
Step 2:
- After hitting enter in the previous step, you will find this second splash screen. This is important as as soon as you hit enter on this screen, you will be taken to the next step, which is booting Windows, there are no other steps to configure here. In a few minutes, the normal Windows boot menu will appear, just proceed as you normally do in your normal logon sequence to Windows
Step 3:
- On Windows Logon screen, fill in the name of the user whom you want to log on as, leave the password blank and hit enter
Step 4:
- Olla! you are logged in! and what's the coolest thing, you have not reset the password for the account at all. It simply let you in because it interacted with the kernel directly using Linux. No alteration was done to any hard drive content at all during the process of logging in.
Step 5:
- Remove the CD from the drive, and reboot. Your machine will now present you the normal ctrl+alt+del screen like it always use to, try logging on with the username we tried before with the blank password! The blank password will not work, you can only get in if you knew what the right password was..this demonstrates that the user password was never reset, it still is what it use to be.
As you can see that this nifty little cd can be of many uses, you do not need to reinstall or repair Windows if you have forgotten your password. If you are locked out, you can use this to log in as well. It also brings raises a question on Windows security. Once again, this method is exceptionally fast and does not actually reset the password. If you have for some reason the need to "recover" and "reveal" a user's password, you can use the tutorial I wrote earlier here and it will actually show you what the password is.
If the method I described above, is being used to gain unauthorized access to then there are really only two ways of protecting against such an intrusion:
1. Block Physical access to the machine or prevent users from hooking in USB devices or booting from CD ROMs and floppies
2. Encrypt your sensitive data. We will cover a step by step article on how to use encryption to protect your data in a forthcoming article
Hopefully this has been informative for you. If you have any further questions, please do leave us a comment or contact us through the Contact Us link on this web site.