Saturday, September 02, 2006

Structure of an ASP.NET Page

The following is a list of the important elements of an ASP.NET page:
  • Directives

  • Code declaration blocks

  • ASP.NET controls

  • Code render blocks

  • Server-side comments

  • Server-side include directives

  • Literal text and HTML tags

Directives

A directive controls how an ASP.NET page is compiled. The beginning of a directive is marked with the characters <%@ and the end of a directive is marked with the characters %>. A directive can appear anywhere within a page. By convention, however, a directive typically appears at the top of an ASP.NET page. There are several types of directives that you can add to an ASP.NET page. Two of the most useful types are page and import directives.

Code Declaration Blocks

A code declaration block contains all the application logic for your ASP.NET page and all the global variable declarations, subroutines, and functions. It must appear within a <Script Runat="Server"> tag. Note that you can declare subroutines and functions only within a code declaration block. You receive an error if you attempt to define a function or subroutine in any other section of an ASP.NET page.

ASP.NET Controls

ASP.NET controls can be freely interspersed with the text and HTML content of a page. The only requirement is that the controls should appear within a <form Runat= "Server"> tag. And, for certain tags such as <span Runat="Server"> and <ASP:Label Runat="Server"/>, this requirement can be ignored without any dire consequences.

One significant limitation of ASP.NET pages is that they can contain only one <form Runat="Server"> tag. This means that you cannot group ASP.NET into multiple forms on a page. If you try, you get an error.

Code Render Blocks

If you need to execute code within the HTML or text content of your ASP.NET page, you can do so within code render blocks. The two types of code render blocks are inline code and inline expressions. Inline code executes a statement or series of statements. This type of code begins with the characters <% and ends with the characters %>. Inline expressions, on the other hand, display the value of a variable or method (this type of code is shorthand for Response.Write). Inline expressions begin with the characters <%= and end with the characters %>.

Server-side Comments

You can add comments to your ASP.NET pages by using server-side comment blocks. The beginning of a server-side comment is marked with the characters <%-- and the end of the comment is marked with the characters --%>. Server-side comments can be added to a page for the purposes of documentation. Note that you cannot see the contents of server-side comment tags, unlike normal HTML comment tags, by using the View Source command on your Web browser.

Server-side Include Directives

You can include a file in an ASP.NET page by using one of the two forms of the server-side include directive. If you want to include a file that is located in the same directory or in a subdirectory of the page including the file, you would use the following directive:

<!-- #INCLUDE file="includefile.aspx" -->

Alternatively, you can include a file by supplying the full virtual path. For example, if you have a subdirectory named myDirectory under the wwwroot directory, you can include a file from that directory like this:

<!-- #INCLUDE virtual="/myDirectory/includefile.aspx" -->

Literal Text and HTML Tags

The final type of element that you can include in an ASP.NET page is HTML content. The static portion of your page is built with plain old HTML tags and text. You might be surprised to discover that the HTML content in your ASP.NET page is compiled along with the rest of the elements. HTML content in a page is represented with the LiteralControl class. You can use the Text property of the LiteralControl class to manipulate the pure HTML portion of an ASP.NET page.

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

Benefits of ASP.NET Controls

ASP.NET has solved the "spaghetti-code" problem described above with server controls. Server controls are tags that are understood by the server. There are three kinds of server controls:

  • HTML Server Controls - Traditional HTML tags
  • Web Server Controls - New ASP.NET tags
  • Validation Server Controls - For input validation

ASP.NET - HTML Server Controls

HTML server controls are HTML tags understood by the server.

HTML elements in ASP.NET files are, by default, treated as text. To make these elements programmable, add a runat="server" attribute to the HTML element. This attribute indicates that the element should be treated as a server control. The id attribute is added to identify the server control. The id reference can be used to manipulate the server control at run time.

ASP.NET - Web Server Controls

Web server controls are special ASP.NET tags understood by the server.

Like HTML server controls, Web server controls are also created on the server and they require a runat="server" attribute to work. However, Web server controls do not necessarily map to any existing HTML elements and they may represent more complex elements.

ASP.NET - Validation Server Controls

Validation server controls is used to validate user-input. If the user-input does not pass validation, it will display an error message to the user.

Each validation control performs a specific type of validation (like validating against a specific value or a range of values).

By default, page validation is performed when a Button, ImageButton, or LinkButton control is clicked. You can prevent validation when a button control is clicked by setting the CausesValidation property to false.

Why use ASP.NET controls at all? Using these controls provides four important benefits:

  • ASP.NET controls expose the HTML elements of a page in an intuitive object model.

  • ASP.NET controls automatically retain the value of their properties by participating in view state.

  • ASP.NET controls enable you to cleanly separate the design content of a page from the application logic.

  • ASP.NET controls enable you to maintain browser compatibility while still supporting advanced browser features such as JavaScript.

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

Standard ASP.NET Namespaces

The classes contained in a select number of namespaces are available in your ASP.NET pages by default. (You must explicitly import other namespaces.) These default namespaces contain classes that you use most often in your ASP.NET applications:

  • System— Contains all the base data types and other useful classes such as those related to generating random numbers and working with dates and times.

  • System.Collections— Contains classes for working with standard collection types such as hash tables, and array lists.

  • System.Collections.Specialized— Contains classes that represent specialized collections such as linked lists and string collections.

  • System.Configuration— Contains classes for working with configuration files (Web.config files).

  • System.Text— Contains classes for encoding, decoding, and manipulating the contents of strings.

  • System.Text.RegularExpressions— Contains classes for performing regular expression match and replace operations.

  • System.Web— Contains the basic classes for working with the World Wide Web, including classes for representing browser requests and server responses.

  • System.Web.Caching— Contains classes used for caching the content of pages and classes for performing custom caching operations.

  • System.Web.Security— Contains classes for implementing authentication and authorization such as Forms and Passport authentication.

  • System.Web.SessionState— Contains classes for implementing session state.

  • System.Web.UI— Contains the basic classes used in building the user interface of ASP.NET pages.

  • System.Web.UI.HTMLControls— Contains the classes for the HTML controls.

  • System.Web.UI.WebControls— Contains the classes for the Web controls.

Tags: , ,

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

Friday, September 01, 2006

what are EJBs

An EJB is a server-side component that executes specific business logic. EJBs run on a server and are invoked by local or remote clients. A standardized contract exists between an application server and its EJB components that enables a component to run within any application server. The application server provides clearly-defined services while the components adhere to a standard interface. EJBs are not GUI components; rather, they sit behind the GUIs and perform all the business logic, e.g. database CRUD operations. GUIs such as rich clients, web-based clients, and web services are the clients that can make connections to EJBs.

The original JavaBeans specification is based on the java.beans package which is a standard package in the JDK. Components built in the JavaBeans specification are intraprocess components that stay in one address space and are typically used for Graphical User Interface (GUI) visual widgets such as buttons, tables, HTML viewers, etc. On the other hand, the EJB specification is based on the javax.ejb package, which is a standard extension package. EJB is one of several specifications grouped into Sun Microsystem's Java 2 Enterprise Edition (J2EE) specification. Components built in the EJB specification are interprocess components that stay in multiple address spaces as distributed objects. These components are used as transactional business objects that are accessed as remote objects.

So we have:

  • EJB is a framework for writing distributed programs.
  • EJB involves a standardized agreement that enables a component to run within any application server (increasing code reuse).
  • The agreement is accomplished by implementing a set of Java interfaces from the EJB API.
  • EJBs are not GUI components.

EJB is a heavyweight framework. Deciding to implement EJB on your next project should only be done after weighting their pros and cons versus more lightweight solutions, such as Hibernate, JDO, or straight SQL. If you need a distributed solution, consider adding RMI-IIOP or CORBA options to the mix. Following are some things to consider when making the decision of whether or not to use EJB:

Advantages of EJB:

  • Many vendor application servers conform to the J2EE specification allowing one to select a best-of-breed solution.
  • To handle fluctuations in resource demand server-side resources can easily be scaled by adding or removing servers.
  • Application servers provide access to complex services, namely transaction and security management, resource pooling, JNDI (Java Naming and Directory Interface), component lifecycle management, etc.

Disadvanatges of EJB:

  • EJB has a large and complicated specification.
  • EJBs take longer to develop. Also, when things go wrong they can be more difficult to debug. Occasionally the bug may not be in your code but in the application server itself.
  • No sooner have you deployed your EJB application than you see a new specification coming down the pipe with newer features, rendering your application obsolete. This situation, however, is unavoidable with cutting-edge technologies.

Some rules of thumb for when not to use EJB include:

  • Do not choose EJB when there is no need for scalability, transaction management, or security.
  • Do not choose EJB if you anticipate low numbers of read-only users.
  • Do not choose EJB if your team lacks EJB experience or cannot quickly obtain that experience. The EJB learning curve is steep and overcoming it can easily derail an otherwise viable project.

The EJB Ecosystem

To have an EJB deployment up and running, one needs more than an application server and components. There are six more parties that are involved:

  1. The Bean provider: The bean provider supplies the business components to the enterprise applications. These business components are not complete applications but can be combined to form complete enterprise applications. These bean providers could be an ISV selling components or an internal component provider.
  2. The Application Assembler: The application assembler is responsible for integrating the components. This party writes applications to combine components so as to develop the target application that can be deployed under various environments.
  3. The EJB Deployer: After the application developer builds the application, the application must be deployed on the server. This involves configuring the security parameter settings, performance tuning, etc. An application assembler is not familiar with these issues. This is where the EJB deployer comes into play.
  4. The System Administrator: The system administrator is responsible for the upkeep and monitoring of the deployed system and may make use of monitoring and management tools to closely observe the deployed system.
  5. The Container and Server providers: The container provider supplies the EJB container (an application server). This is the runtime environment where the beans live. The container supplies the middleware services to the beans and manages them. Some of the various containers are: BEA's WebLogic, iPlanet's iPlanet Application Server, IBM's WebSphere, Oracle's Oracle 9i Application Server and Oracle 10g Application Server, and the JBoss open source Application Server. The server provider is the same as the container provider.
  6. The Tool Vendors: There are various IDEs available to assist the developer in rapidly building and debugging components, for example Eclipse, NetBeans, and JBuilder. For the modeling of components one can use Rational Rose. There are many other tools, some used for testing (JUnit) and others used for building (Ant, XDoclet).

Different Beans for Different Tasks

There are three different types of beans in EJB: session, entity, and message-driven. Each has a specific purpose:
  1. Session Beans: Represent an action or process that must be executed synchronously, such as making a reservation or validating a credit card.
  2. Message-Driven Beans: Also represent an action or process. But, message-driven beans are executed asynchronously.
  3. Entity Beans: Represent data; each entity bean represents a unique record in the database.

Tags: , , , , , , , , , , , , , , , , , ,

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

Add an API to your Web Service

APIs are a great way to extend your application, build a community, excite your users and get in on the Mashup Mania spreading across the web. While there’s plenty out there wanting in on the action, there’s a lot of questions about how to actually go about creating an API for a web application. Like everything else technical on the web these days, there are tons of complicated and scary documents out there ready to intimidate the unprepared. In an attempt to get everyone on the bus in one piece, we’ve tried to filter through the hard stuff and give an easy to understand starting point for anyone on a quest to API’ify their web service.

An API, or Application Programming Interface, is a set of functions that one computer program makes available to other programs (or developers) so they can talk to it directly without having to give it access to the source code. The most popular APIs are from operating systems like Windows XP or Mac OS X. They allow third-party developers to write programs on top of Microsoft’s and Apple’s software. Thanks to pioneers like Amazon and eBay, the concept of APIs have to come to the web in full force and are being released by more and more web services and applications to turn their one-trick pony into platforms.

Read more

Tags: , , , , ,

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

Personal wikis

Wikis aren't just great tools for sharing information and collaborating on projects. They also make excellent personal information managers. With a personal wiki, all of your to-do lists, notes, and appointments are at your fingertips in form that's easy to use and maintain.

The problem with most wikis, such as MediaWiki (the engine that powers Wikipedia) is that they take a lot of effort to set up and maintain. You have to deal with not only the wiki software itself but also the Web server and database that underlie the wiki. All of that is overkill for anyone who wants a wiki for strictly personal use.

DoxWiki

DoxWiki makes it easy for you to get a wiki up and running quickly. When installed on your computer, DoxWiki weighs in at just over 200KB.

The heart of DoxWiki is a a simple Web server that's written in Perl. To get going, all you have to do is start the Web server at the command line; it doesn't seem to like being launched from a desktop shortcut. Then, open the wiki's main page in your browser by typing http://localhost:8080 in the address bar.

Instead of saving content to a database, DoxWiki saves the individual files that make up the wiki on your hard drive. The files are small, so it would take quite a lot of them to put a dent in your drive's capacity.

Creating wiki pages is simple. On the main page (called the Wiki Root), you type a name for the new page in one of the fields, and then click the Go button. From there, you add content. 

TiddlyWiki

TiddlyWiki is flashier than Wiki on a Stick. It follows the same principles as that application, but does so with a little more pizazz. For example, when you click a link to jump to some wiki content, an in-your-face JavaScript transition brings that content to the top of the page. You can turn that animation off if it bugs you. TiddlyWiki also has a simple built-in search engine that does the job.

TiddlyWiki divides content into two types: Tiddlers and Journals. Tiddlers are general wiki entries -- ideas, notes, to-do lists, or whatever else you want them to be. Journals, on the other hand, are notes that are specific to a day. While I was experimenting with TiddlyWiki, I used Journals to track specific tasks that I needed to do on a particular day, and used one as a personal diary.

You can configure several options in TiddlyWiki. You can set it up to do automatic saves and to create backups. You can also enable regular expression and case-sensitive searches, as well as generate an RSS feed. The latter is useful if you plan to post your TiddlyWiki on the Web. Unlike Wiki on a Stick, though, you can't change the look and feel of TiddlyWiki from the interface. You either have to edit the TiddlyWiki code, or create some sort of custom theme. The TiddlyWiki Web site leads you through that process.

Read more from this article

Tags: , , , , , , , , , , ,

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

Thursday, August 31, 2006

Clonezilla, the opensource clone system

 Clonezilla, based on DRBL, Partition Image, ntfsclone, and udpcast, allows you can massively clone many (40 plus!) computers simultaneously. At the NCHC's Classroom C, Clonezilla was used to clone 41 computers simultaneously. It took about 50 minutes to clone a 5.6 GBytes system image to all 41 computers via unicasting and only about 10 minutes via multicasting!

You're probably familiar with the popular proprietary commercial package Norton Ghost®, and its OpenSource counterpart, Partition Image. The problem with these software packages is that it takes a lot of time to massively clone systems to many computers. You've probably also heard of Symantec's solution to this problem, Symantec Ghost Corporate Edition® with multicasting. Well, now there is an OpenSource clone system (OCS) solution called Clonezilla with unicasting and multicasting! With DRBL and network boot enabled client computers, the only thing you have to prepare is a Clonezilla server. You do not even have to prepare a bootable CD or floppy with Partition Image for every client computer.

More on Clonezilla

Tags: , , , , , ,

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

Tabbed browsing

Web browsing behaviors are constantly changing. As a result, analysis of those behaviors must evolve to match those changes. A recent change that has become more prevalent over the past few months is tabbed browsing. The Firefox browser made tabbed browsing much more common, and now Microsoft has added it to Internet Explorer.

Tabbed browsing allows people to open more than one window within a browser and easily bounce back and forth.

Tabbed browsing has made comparing products, shopping for the right price, and researching products that much easier. For example, Chris is looking for a plasma television for his new home. He opens the browser and starts looking at ratings on Epinions. As he explores the ratings, he pops open links to pricing for a few different TVs in tabs. He decides to research a few different models on manufacturers' sites.

What does this mean for user behavior tracking and analytics? First, it appears tabbed browsing is only used by a small percentage of Web users but is becoming more prevalent. Depending on your audience, the following issues could arise and should be considered when analyzing site performance and visitor behaviors:

  • Cookies. Typically, different tabs within one browser all run off the same base tracking cookie per site. So if Chris has Firefox open and has six tabs going to the same site, he's counted as one visitor. Depending on his length of stay, it would be just count as one visit to that site. On the plus side, he isn't showing up as six unique visitors. But on the minus side, he has six different potential site experiences laced into one through that common cookie.

  • Pathing. When Chris visits the same site from multiple different tabs in the same visit, the same cookie appears and shows one visit. As a result, you may see some pathing behaviors that don't make sense. You may see people jump from one set of pages to another set that are impossible to move between on the actual site. But since visitors can effectively be in multiple places on the site simultaneously, pathing can be thrown off.

  • Web browsing behaviors. Tabbing can change behaviors when visitors browse the Web and your site. Again, it's always been easy to do a quick scan of a site, then give up and move on. But tabbed browsing makes that even easier, so you potentially have even less time to make an effect on site visitors. People can now more easily have multiple focus points and could be less focused on your particular offering, making it that much more important to be present a clear, concise, and valuable offering.

  • Time on site. Tabbing may greatly affect the amount of time recorded on a site. Chris may look at something on one site, bounce over to another site in a different tab, then come back to do more research. Yes, this has always been possible using different browsers, but it's that much easier now.

  • Paid search. Tabbed browsing also makes it easier for people to jump into multiple options when searching. They can open a bunch of paid search listings in tabs and quickly scan which ones look best meet their current need.

Tabbed browsing changes Web browsing behaviors and may change the way you look at some metrics when analyzing data. True, only a small percentage of people are actively using tabs when browsing, but it appears to be a growing trend.

Read more

Tags: , , , , , , , , , ,

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

Top Wordpress Plugins

Here is a great list of some of the most useful and most popular Wordpress plugins, if you don’t yet have wordpress, or don’t know what it is head over to wordpress.org, its a blogging software, which is awesome!
Enjoy the list.

Akismet - Is a spam filter that checks your comments against the Akismet web service to see if they are spam or not, also checks the trackbacks for spam.

Ultimate Tag Warrior - Best Tag system for WordPress. You can use categories and tag system on one website which is very cool.

Exec-PHP - Execute PHP code in posts or static pages. When this plugin is on you can add php code to static pages or even posts.

Google Sitemaps - This generator will create a Google compliant sitemap of your WordPress blog.

No Ping Wait - Speeds up posting by moving generic pings to execute-pings.php.

PXS Mail Form - Creates a mail form with multipart verification, various messages and an auto redirect on successful send. It is much more easy to contact with website author.

Super Archive - Implements a dynamic archive, the best archives system i know.

SRG Clean Archives - Super clean archive. Very simple and useful.

WP lightbox 2 - Overlay images on the current page for WordPress. You can turn it on and all images are now working with it.

fQuick - Sidenotes, short notes for WordPress. You can place it for example in sidebar.

CG-FlashyTitles - Implementation of sIFR 2.0 Flash-based - Nice graphical flash titles for WP. Very easy to install.

flickrRSS - Integrate the photos from a flickr rss feed into your site. Show flickr photos on your website.

Feedburner Feed Replacement - Forwards all feed traffic to Feedburner while creating a randomized feed for Feedburner to pull from.

Gravatars - Adds a nice looking graphic next to the persons comments.

Get Recent Comments - Display the most recent comments or trackbacks with your own formatting in the sidebar or where you want.

WP Paginate - Create pagination for pages. It is the best plugin for that makes navigation easy with many static pages.

wp-notable - Add social bookmark links such as digg or del.icio.us to each blog entry

find more information regarding wordpress plugins from here

Tags: , , ,

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

How to Add HTML Signatures with Images to GMail Email Messages

GMail has a wonderful rich text editor to compose emails but there are some desirable things that you cannot accomplish in GMail using standard techniques. For example:

1. GMail allows plain text signatures but there's no way to embed HTML signatures with images like the ones you see in Yahoo, Hotmail or Microsoft Outlook email.

2. Gmail Rich text editor has standard text formatting features like font sizes, colors, bullets, hyperlinks, indentation, etc. but there's no way to add other HTML tags like TABLE, DIV, EMBED, etc. So how do you embed Youtube videos, sophisticated table layouts, Flash animation movies, inline podcast players like odeo, etc. in GMail ?

3. You can compose new email in either Plain text or Rich text but how to do you compose a new GMail message in native HTML something like a webpage created in Microsoft Frontpage ?

4. Gmail lets you attach pictures to outgoing email but it shows up as an attachment on the recipients' screen. How do make embed a photograph that appears inline with the actual email message ?

5. You want to embed the Feedburner Headline Animator graphic or the Feedburner Subscriber Counter to your GMail signature which is an animated GIF file.

Now the really good news is that you can do all the above easily with GMail and here's how to do it:

To embed an HTML signature with Images in GMail ?

Create an HTML signature snippet using notepad or WYSIWYG editors like Dreamweaver/Frontpage/Golive or online with Geocities/GooglePages/Tripod Lycos. Your signature can have all kind of HTML tags (including DIV, EMBED, TABLE) but all linked Image files, audio files and video clips must be pointing somewhere the web and not on your desktop.

Once you are satisfied with the layout, select the entire portion of the webpage that you want to appear in the GMail signature and drag it to the GMail compose window. Alternatively you can copy it to the clipboard and then press Ctrl+V in the Gmail window.

Get more information from here

Tags : , , , , , , , ,

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

Wednesday, August 30, 2006

How to enable JavaScript in different browsers

  1. First determine what browser version is in use. From the browser's Help menu choose the last item labelled About [browser name]. Macintosh users should go to the application name menu or the Apple menu and select the first item labelled About [browser name].
  2. Next, choose from the information below to find instructions on how to enable Netscape and Internet Explorer browsers to be JavaScript capable.
    • Internet Explorer 5.x or 6.x
      1. From the browser's Tools menu select Internet Options
      2. Select Security
      3. Click the Custom Level button near the bottom of the window
      4. Scroll down untill you find a section called Scripting (you may need to double click on icons to expand lists) and a subsection called Active scripting
      5. Select Enable
      6. Click OK and Yes to confirm and close the Security Settings dialog box, then OK again to close the Internet Options box
      7. Click Refresh to reshow the current page.
    • Internet Explorer 5.x - Macintosh
      1. From the browser's Edit menu select Preferences
      2. Within the left-hand pick list, expand the item group Web Browser (if necessary)
      3. Under the item group labelled Web Browser, select Web Control
      4. Check the box labelled Enable JavaScript and click OK to close the Internet Explorer Preferences box
      5. Click Refresh to reshow the current page.
    • Netscape 7.x
      1. From the browser's Edit menu select Preferences
      2. Within the Category pick list, expand the Advanced item
      3. Select the sub item Scripts & Plugins
      4. Check Navigator under the Enable JavaScript for grouping
      5. Click OK to close the Preferences box
      6. Click Reload to reshow the current page.
    • Netscape 6.x
      1. From the browser's Edit menu select Preferences
      2. Within the Category pick list, expand the Advanced item
      3. Check Enable JavaScript for Navigator
      4. Click OK to close the Preferences box
      5. Click Reload to reshow the current page.

Tags: , , , , , , , , , , ,

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

Tuesday, August 29, 2006

site to compare prices from different sites

Trying to shop for the best deal for a particular item can be very hard. You hop from Ebay to Yahoo! Shopping... oh wait, I should check Amazon and even Craigslist!

Here's a website to save you time in your search while providing the market value of the item in question:

Mpire's mission is to "empower the millions of people who buy and sell items from the world's most popular shopping sites." What does this mean?

Mpire is to shopping what Indeed is to job hunting. It aggregates the top online shopping sites to track prices amongst these sites in real time and give you an indicator of the true market value of the item you are going to purchase. Upon searching for an item, they provide a link to the auction or webpage, where you can purchase it. The site, launched on June 12, 2006, currently aggregates companies such as Yahoo! Shopping, Ebay, Amazon, Craigslist and Overstock.com.

As with most web 2.0 sites, there are also some social aspects to the site. You can save a search alert for an item that you are searching for. A user can also create watchlists for different items. You can even vote for items and they then become more popular and may get featured on the main page (kind of like Digg.com).

Mpire looks to be a great tool to assist in finding the best deal for the item you are actually shopping for. Even if you don't plan to make your purchase online, you get a good ballpark on what you should be paying for the item.

Read more

Tags: , , , , , , , , , , , ,

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

Increase Web site performance with ASP.NET caching

While functionality is the number one goal of Web development, performance seems to be a close second. After all, a site that isn't used serves no purpose. Caching frequently accessed Web page data is one way to positively impact a Web application's performance. ASP.NET includes caching support that is easily incorporated in your application to boost application performance.

ASP.NET 1.x provides three ways to incorporate caching in a Web application:

  • Page Output caching: allows you to cache the dynamically generated page content.
  • Page Fragment caching: caches portions of a Web page.
  • Page Data caching: programmatically caches data/objects within a Web page.
In this article, I will focus my attention on Page Output caching.

Page Output caching
Output caching is applicable when the contents of an entire page are relatively static so it may be cached. Caching frequently accessed pages can result in substantial throughput gains. The way it works is initial page requests are generated dynamically with all subsequent requests served from the cache. The result is an enormous performance gain with heavily used applications.

The main aspect of caching a page is the expiration date. It determines how long content will be retained in the cache before it is reloaded from the source. It is accessible via code or with the page-level OutputCache directive. It includes the Duration parameter for specifying how long an item will be cached (in seconds). Along with Duration, the OutputCache directive contains the following attributes:

  • Location
    : The location of the cache. Valid values include Any, Client, Downstream, None, Server, and ServerAndClient. The default value is Any.
  • CacheProfile
    : The name of the cache settings to associate with the page. It is an optional element with no default value.
  • NoStore
    : A Boolean value signaling whether to prevent secondary storage of sensitive data.
  • Shared
    : A Boolean value that determines whether user control output can be shared with multiple pages.
  • VaryByCustom
    : Any text that represents custom output caching requirements.
  • VaryByHeader
    : A semicolon-separated list of HTTP headers used to vary the output cache.
  • VaryByParam
    : A semicolon-separated list of strings used to vary the output cache.
The key elements used most frequently are Duration and VaryByParam, which allows you to create different page level caches based on parameters.

These parameters correspond to querystring values sent with HTTP GET requests or form parameters sent along with HTTP POST requests. When this attribute is set to multiple parameters, the output cache contains a different version of the requested document for each combination of specified parameters. Possible values include none, an asterisk (*), and any valid query string or POST parameter name.

Read more

Tags: , , , , , , , , , , , , , ,

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

Get browser history via CSS hacks

Jeremiah Grossman has demonstrated an interesting way to sniff out browser history via CSS hacks. IE7 RC1 is smart enough to block the site, but FireFox lists my history without any complaints. Spooky. The script it embedded on the page, and it appears that basic technique involves setting the visited link color via CSS on a group of links to common sites, and then getting the computed values of the links and seeing which ones have the visited color. Very clever way to hijack someone's history: Read more at this article

Tags: , , , , , ,

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

Put your idle computer to work for you

Using a simple program called RunSaver, automatically kick off tasks for your Windows computer to work on while you're away.

Why not Windows Task Scheduler?

Sure you can schedule tasks to run at specified times, but tasks set to run when the computer is idle:

  • Don't require you leave your PC on all night
  • Will never interrupt you in the middle of working on something else
  • Better fit folks with varying daily work schedules
  • Suit low priority processes that should happen whenever they can but never interrupt anything more important

What kind of work can your idle computer do?

Some examples of tasks your computer can complete while you're at lunch:

Or any combination of those. All you need to do is place all the commands into a single batch script (a file with the .bat extension) that can run whenever the screensaver kicks in. Here's how.

Set up RunSaver

  1. Download RunSaver for Windows. (Written using Lifehacker favorite AutoHotkey!) and save it to C:\Windows\System32\
  2. Create a batch file called idlework.bat, and enter the commands you want your computer to perform while you're away. For example, I sync my remind calendar files from my server to my local machine using rsync like this:
    rsync -az ginatrapani.org:/home/gina/docs/remind d:/data/gina/docs

    Your script can contain any number of working commands to get your job done.
  3. Once you've got a working script, add a line to the end of the file which kicks off the screensaver itself. I happen to like the classic starfield 'saver, so I add the line:
    ssstars.scr /s

    Find other screensavers in the c:\windows\system32\ folder also with the .scr file extension.
  4. Right-click on your Desktop and choose Properties. From the Screensaver tab, choose "RunSaver" from the list of possible 'savers. Then, click on the Settings button and choose your idlework.bat file, as shown. Hit OK, and Apply, and from here on in when you step away from your computer? Your idlework.bat script will kick off automatically.

Read more at this article 

Tags: , , , , , , , , ,

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

25 things you must know before buying digital camera

Buying a digital camera to get started in the world of digital photography or to replace your old camera? Read tips on getting the best digital camera for your money.

#1: Set a Budget Before Buying
Budget yourself when purchasing a digital camera.

#2: Ignore Digital Zoom
When buying digital cameras, concentrate on optical zoom, not digital zoom.

#3: Two Considerations when Buying a New Camera
Consider these two items before buying a new digital camera.

#4: Small Doesn’t Mean Underpowered
Small digital cameras may be exactly what you need.

#5: Be Careful When Buying Package Deals
Digital camera package deals may be too good to be true - or a real bargain!

Read more at  25 things you must know before buying digital camera

 

Tags: , , , , , , , ,

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

Linux : Recover lost files after you accidentally wipe your hard drive

TestDisk can recover lost partitions of virtually any filesystem. PhotoRec can recover files of most types, including most picture and video formats. PhotoRec can be used on existing partitions, or can be used to recover files on deleted partitions without having to recover the underlying partitions. Both PhotoRec and TestDisk can be run on DOS, Windows (9x, NT, 2000, XP, 2003), Linux, FreeBSD, NetBSD, OpenBSD, Sun Solaris, and Mac OS X, and, their developers claim, can be compiled and run on most Unix systems.

The recovery

PhotoRec recovers files by finding deleted files and copying them to disk. This means that files should not be recovered to the same disk partition on which the deleted files reside (unless you're recovering from a disk image file), because that could lead to the deleted data being permanently overwritten.

Another important thing to remember is that PhotoRec will most likely recover a lot of files. This means that the partition on which the recovered files are to be stored should have at least as much free space as the size of the partition on which PhotoRec is searching for recovered files.

Possible setups for recovery include:

  1. Recover the files to a separate hard drive.
  2. Recover the files to a networked storage drive.
  3. Recover the files to a separate partition on the same hard drive.
  4. Image the hard drive using a tool like ddrescue and recover files using only one partition.

As I had completed erased my partitions, I could not use the third option. The second option introduces problems associated with network speed and latency. The fourth option is worth considering in the case of an incident response where the image of the hard drive is used as evidence.

You can download both PhotoRec and TestDisk in a single archive file. The files photorec_static and testdisk_static are the executable files, and can be executed from the command line.

Make sure that the recovery partition is mounted (I mounted it at /var/recovery). Don't mount the hard drive that contains the deleted files; if the partition remains unmounted, you can't overwrite the data it contains.

Recovery steps

PhotoRec recovers files to the directory from which it is run. Therefore, I changed into the /var/recovery directory and ran photorec_static. If the PhotoRec executable does not run with this command, make sure that you either copy the executable to the /usr/bin directory or type in the full path where the program resides.

How to prevent recovery

How easy it would be for my sensitive data to be recovered if I ever got rid of an old computer or hard drive. Luckily, you can wipe data from a hard drive in such a way as to prevent files from ever being recovered. Whitedust Security gives the following as options for secure data removal.

  1. Writing over existing data with "junk" data.
  2. Giving the hard drive an acid bath.
  3. Degaussing the hard drive with a degausser.
  4. Damaging the disk with fire.

Assuming you do not want to render the hard drive unusable, the best options are either writing over existing data or degaussing the hard drive. If you don't have access to degaussing equipment, use a program like Wipe that writes over data with patterns known to cause data to become unrecoverable. Based upon your paranoia level, you can wipe your data with as many passes as you see fit. Some recommend 22 passes, while others say 99 is needed for absolute security. If you are only worried about the casual snooper who only has access to tools like PhotoRec, then three or four passes should suffice.  For further information Read this article

Tags: , , , , , , , , , , , , , , , ,

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