Saturday, October 28, 2006

How to Exercise While Sitting at Your Computer

Sitting at the computer all day is not exactly good for the body. If you have to be at a desk all day long, doing some simple things can improve your posture and health.

Steps

  1. Sit properly in a good chair designed for desk work. Your back should be straight, and your head should be looking directly into your monitor. If you have to look down or up, you need to adjust the height of either the screen or your chair. If you keep leaning forward, first get your eyesight checked. If your eyesight is fine use a loose belt or string to tie yourself to the chair. After a while your posture will improve and you'll no longer need this restraint.
  2. Maintain an ergonomic body posture while typing. Keep your legs bent at the knees so that the knees are only slightly higher than your hips. Feet should be flat on the floor or on a step stool of some sort.
  3. Stand up every half hour. Walk around a few steps, stretch your legs, and give your eyes a break from focusing on your computer screen. This will also help prevent blood clots from developing in your legs. Blood clots are very common among middle age people, who generally use the computer a lot.
  4. Roll your head around your neck periodically, but avoid rolling your head all the way back. Do the motion slowly clockwise for 1-3 iterations and then repeat in the opposite direction.
  5. Roll your wrists regularly (this will help prevent carpal tunnel syndrome if you spend a lot of time typing).
  6. Recognize that people tend to hunch in front of the keyboard. To counter that, perform the following exercise: open your arms wide as if you are going to hug someone, rotate your wrists externally (thumbs going up and back) and pull your shoulders back. You will feel a stretch in the scapula area.
  7. Contract your abdominal and gluteal muscles, hold them there for a few seconds, then release. Do this all day long while you are in your chair.
  8. Stretch your arms, legs, neck and torso while sitting. This will help prevent you from feeling stiff.
  9. Take advantage of the downtime created by rebooting or large file downloads to get up and try something more ambitious such as doing a few push-ups, sit-ups, and/or jumping jacks. Beware of your snickering co-workers though.
  10. Acquire a hand gripper. They are cheap, small and light. When you have to read something either on the screen or on paper, you probably won't be using your hands very often so squeeze your gripper. It is an excellent forearm workout.
  11. Acquire an elastic band (also cheap, small and light) and use it to do the actions mentioned in step 8 (i.e., when stretching your arms, do it by pulling apart the elastic band). You will not only stretch but it will also work the muscles slightly.
  12. Take a few deep breaths. If possible, get some fresh air in your lungs.
  13. Invest in a large size stability ball or stability ball style desk chair, and sit on it with back straight and abs firm. The actual stability ball is more effective, however the chair is a more viable option for use in an office environment. Sit, bounce or do basic toning exercises while watching TV or talking on the phone as well. Use the actual ball form in moderation when typing, as this is probably not the most supportive seating to prevent carpal tunnel and tendinitis.
  14. While sitting, lift up your legs on the balls of your feet and set them down. Repeat these until your legs are comfortably tired. Then repeat it again about 10 minutes later. Do this whole routine for about an hour or so. This will exercise your calves.

Get more information

Can't find what you're looking for? Try Google Search!
Google
 
Web eshwar123.blogspot.com

Encrypt and decrypt urls simple code

An assembly used to encrypt/decrypt URLs.
// ------| Original Page |------ //// Create the queryString objectSecureQueryString qs = new SecureQueryString();// Add name/value pairs.qs["Name"] = "TSHAK";qs["SSN"] = "000-00-0000";string url = "DestPage.aspx?x=" + qs.ToString(); // ------| Destination Page |------ //// Simply pass the encrypted string into the constructorSecureQueryString qs = new SecureQueryString(Request["x"]);// Now access the NameValueCollectionstring Name = qs["Name"];string SSN = qs["SSN"]; // ------| Expiring URLs |------ //// Create the queryString objectSecureQueryString qs = new SecureQueryString();// Add name/value pairs.qs["Name"] = "TSHAK";qs["SSN"] = "000-00-0000";// Set the expiration time for one hour from nowqs.ExpireTime = DateTime.Now.AddHours(1); 
Get more information
Can't find what you're looking for? Try Google Search!
Google
 
Web eshwar123.blogspot.com

Tree view control in asp.net 2.0

ASP.NET 2.0 introduces a new control named TreeView that provides a seamless way to consume information from hierarchical data sources such as an XML file and then display that information. You can use the TreeView control to display information from a wide variety of data sources such as an XML file, site-map file, string, or from a database. In this article, we will discuss this new control in depth and understand how to use this feature rich control in your ASP.NET applications. Apart from statically data binding the TreeView control with the contents of an XML file, we will also demonstrate how to populate this control dynamically by adding nodes at runtime. Finally, we will see how to apply XSL transformation on XML data before displaying that information in a TreeView control.

Hierarchical Data

One of the important ways of organizing data which now pervades IT is hierarchical data. ASP.NET has a series of controls that make it both easy and logical to utilize hierarchical data. TreeView is one of the important controls that can be easily bound to data source controls such as SiteMapDataSource, XmlDataSource to display hierarchical information. Before we go onto take a look at the TreeView, let us understand the common types of hierarchical data.

  • Folders - The way folders are structured in a Windows file system denotes a hierarchical way of storing data.
  • XML - XML documents are self-describing meaning that the metadata that is required to qualify the data is actually contained in the XML document itself providing a flexible way of handling XML data.
  • SiteMap - Sitemap is nothing but an XML format that provides a consistent way of describing the navigation structure of a web site including all the pages contained in that web site.
  • Menu system - A menu system can also use an XML document as its input and displays the contents of the XML document in a hierarchical manner.

Now that we have looked at some examples of hierarchical data, let us look at the support provided by ASP.NET in terms of handling hierarchical data. ASP.NET provides the following hierarchical data source controls.

  • XmlDataSource - This control allows you to bind to XML data, which can come from a variety of sources such as an external XML file, a DataSet object and so on. Once the XML data is bound to the XmlDataSource control, this control can then act as a source of data for other data-bound controls such as TreeView and Menu. For example, you can use the <asp:XmlDataSource> control to represent a hierarchical XML data source.
  • SiteMapDataSource - This control basically retrieves the site map information from the web.sitemap file.

The architecture of TreeView control is very similar to the design of controls for tabular data. It is data bound to any of the above hierarchical data source controls to display the information.

TreeView Control

The ASP.NET 2.0 TreeView control is a completely new control introduced with ASP.NET 2.0 that is available under the Standard tab in the Toolbox. You can use the TreeView control in any situation in which you need to display hierarchical data. For example, you can use this control when displaying a navigation menu, displaying database records from database tables in a Master/Detail relation, displaying the contents of an XML document, or displaying files and folders from the file system. It is also possible for you to programmatically access the TreeView object model to dynamically create trees, populate nodes, set properties and so on. The TreeView control consists of nodes and there are three types of nodes that you can add to a TreeView control.

  • Root - A root node is a node that has no parent node. It has one or more child nodes.
  • Parent - A node that has a parent node and one or more child nodes
  • Leaf - A node that has no child nodes

The easiest way to use the TreeView control is to specify a static set of tree nodes. For example, you can use the TreeView control to display a simple navigational menu for a Web site. Or, you can use the TreeView control to display the table of contents for a help file.

You specify the appearance of a static TreeView control by declaring one or more TreeNode controls within the TreeView control's <Nodes> tag. The following code demonstrates how to declare a TreeView control and a root node.

<asp:TreeViewRunat="Server"ExpandImageUrl="Images/closed.gif"

CollapseImageUrl="Images/open.gif"OnTreeNodePopulate="Node_Populate"

ID="tvwauthors">

<Nodes>

              <asp:TreeNodeText="Authors"PopulateOnDemand=trueValue="0"/>

</Nodes>

</asp:TreeView>

As you can see in the above code, the root node is declared using the asp:TreeNode inside the Nodes element. Each node has a Text and a Value property. The value of the Text property is displayed in the TreeView, while the Value property is used to store any additional data about the node, such as data passed to the post back event associated with the node. The text displayed through a node can be in one of two modes: selection mode and navigation mode. By default, a node is in selection mode. To put a node into navigation mode, you can set the node's NavigateUrl property to a value other than an empty string ("").

Get more information

Can't find what you're looking for? Try Google Search!
Google
 
Web eshwar123.blogspot.com