Jack is Here, asp.net findings

As a software engineer, I focus on .NET, especially asp.net, C#, WCF and so on, and I am also very interested in Search Engine Optimization.

Entries Tagged ‘Read’

How To Create A Web Page Shadow Using Photoshop Slice Tool and HTML Coding

For an easy-to-implement web page effect, add a Web Page Shadow all the way around your webpages using the Photoshop Slice Tool and HTML coding. Doing so not only adds visual interest but also gives your website a professional look. Read these step by step instructions or watch a video tutorial and follow along with a PDF supplement.

High Level Process:

  • Create 2 blank documents in Photoshop, one smaller than the other
  • On the smaller one, add a Photoshop drop shadow all the way around image
  • Drag the smaller document on top of the larger one to create one flattened image
  • Use the Photoshop Slice Tool to slice the image into 3 smaller images and upload as 3 separate gifs
  • Create a table in your HTML document within the body to hold gifs and content

Step By Step:

  • Create the larger of two documents in Photoshop (or another image editor). Width is the same as your website template (ex. 950 pixels). Height does not matter but should be big enough to easily use Photoshop Slice Tool (ex. 250 pixels). Color should be the same as your website body.
  • Create the smaller of two documents in Photoshop. Width should be smaller than the larger document (ex. 800 pixels). Height should be smaller than the larger document (ex. 100 pixels). Color should be the same as your content area.
  • Add a Photoshop Drop Shadow to the smaller document.
    • In the Layers Palette, double click on the word “Background” and change it to any other name. This will free up functionality and allow you to easily add a drop shadow.
    • Open the Layers Style dialog box, click on “Drop Shadow” and set the variables as follows:
      • Opacity 75%
      • Angle -90 degrees
      • Distance 0 px
      • Spread 35%
      • Size 35 px
      • Color #7B7979 (gray shadow)
  • Drag the smaller document on top of the larger document to create one image. Using the examples above, this image will be 950 pixels wide by 250 pixels high with the smaller, shadowed image embedded on top of it.
  • Slice the document into 3 smaller images horizontally.
    • Grab the Photoshop Slice Tool from the Tool Palette. In the top toolbar, set the Style to “Fixed Size” to ensure exact proportions. Using the 950px X 250px example, input width and height as follows:
      • Top slice equals 950px X 100px
      • Middle slice equals 950px X 50px
      • Bottom slice equals 950px X 100px
  • <!–Tags: , , , , , , , , ,

Ebay Tips For Beginners

Making money is not an easy thing to do these days. Many people want to turn unused items into extra money, and eBay fills that need. Sale on Ebay requires some effort, but does not mean that hard. Keep reading to learn the basic steps you need to start their own eBay business.

These tips are for the beginners who would like to earn some money on eBay. The nessary components to have your own online store are really not that demanding. All you need to start is a computer, Internet access, a digital camera, and of course, products to sell.

You can sell used or like new items you find at flea markets, garage and so on. You can sell new items that you at discount prices from liquidators, dollar stores, clearance sales and store closings. You can even luckier if you are a supplier who will make a deal can be found.

Skills for the Online Business World

Skills for Marketing
You can develop marketing skills, you have on how to educate themselves in a variety of items for sale on eBay. Read some of the marketing of books and articles to help them learn how to sell things is a good idea, but you can also learn from other on-line observation of successful entrepreneurs. Take time to read and plan your strategy. You will thank your efforts are now taking this post.

Getting Organized
You must keep good records of your sales and not just for tax purposes. You must be able to keep track of who paid for the buyers who have received their products, keep, and so on. Set up a table with all relevant information should help your business under control. You can also take advantage of third party online payment systems. There are options to choose from, but it for about one percent of the item price as a fee. The small fee is nothing compared with your customers to purchase your items with ease.

The Basics of HTML
To make sure your auctions eye-catching and appealing, you should know some basic HTML knowledge. There are many simple and basic online tutorials offered. You can begin to find HTML tutorials, then you can use the one you choose for your convenience.

Getting Started on eBay

Start by choosing a certain type of product to specialize in (for example, toys, clothes, etc.). That way, you can become an authority in those products and how to sell them effectively. You may decide to expand your product line at a later date.

Setting up an account is easy. Register an eBay user ID and you’re on your way. Make sure to read the eBay selling rules thoroughly and check out all the tips eBay offers along the way.

Too many of the exact same item please do not saturate your auctions to start and put some items only. The main goal is to sell your goods at the best price. Five cases and are selling the same products, or if it can get a high price may be difficult. To test different methods of selling, find the best work in any particular item.

Ideas for Online Marketing
To promote and your own personal website, your business. Your site can be a web page just to promote your eBay business can also be an online store for your auction link. It gives you more credible in the presence of the Internet, so your customers with who you are, more in-depth understanding. Create a mailing list. E-mail of a regular subscriber to your information and communication. Do not forget that in order to promote communication auctioned.

Other Auction Sites
Does not limit your business to eBay. eBay's auction site is just one of the many available, but it is by far the greatest is. However, eBay's costs, could prove costly after a period of time. This may be more cost-effective to sell other items on auction sites, you may face less competition, especially if you are selling fixed-price projects. Other auction sites may be a more profitable opportunity for you to buy items to sell at a higher price elsewhere.

All you need is some motivation and patience to watch your hard-earned money grow through on eBay business.

Keep in mind, though, you may also have fewer buyers for your products and may have a lower selling price. You will need to determine which is the most efficient way to sell your items.

How to Solve a Common Problem With Asp.net Formview Defaultstate Property

The ASP.NET FormView WebControl is one of the most useful information can be found in Microsoft Visual Studio. NET Toolbar, now, although it is extremely easy to use, you can make mistakes and walk in circles just because you have forgotten one simple click, especially when using the property DefaultState.

This property defines the “default” state for the webcontrol after an insert/update/delete operation, that is, the state to wich the control will return after any of those operations are perfomed. So, the property DOES NOT CHANGE the current FormView’s state, to do that use the ChangeState method instead. Check this c# code:

/ / Sets the default mode after a delete / insert / update operation
FormView1.DefaultMode = FormViewMode.ReadOnly?
/ / Change the state of formview
FormView1.ChangeMode (FormViewMode.Insert)?

If you want to do their work, when you notice a common problem is not sure that their properties are doing a GridView () is to provide details of the master, FormView is linked. Read

Mosaic Floor Pattern Tiles © – Fast & Easy Redecoration Solution!

It is considered one of the easiest and most affordable methods of paving –Mosaic Floor Pattern Tiles can easily be used for practically any home surface. One of the best advantages of using these nature-made tiles is the fact that anyone can use them: from home-makers to professional interior designers. Read the following review and find out how you can quickly remodel any surface at home.

Basic introduction

It may seem tiles than any other solution, you know – Mosaic floor tiles decoration patterns are different is a hand-some similar to the natural stone decoration, and then set up fixed on a flat / ft network to support seamless tiles. Since want to know the origin of these unique stones? So, you may be surprised to discover that most of them originated from the coast of Southeast Asia. If you think it can easily decorate any surface and any one room set up: backsplashes kitchen, bathroom and shower, fireplace, swimming pools and so on.

Benefits

We can quickly find several main benefits, and to this solution:

* Impervious to water and other liquids.
* Provides natural and luxurious look and feel to any coated surface.
* Can be easily adapted to very small / narrow surfaces where other fixed size tiles such as conventional ceramic tiles can not.

Practical tips to go!

* For the sort the tiles before installing them to see the layout of the colors.

* Check the sealers in a small area first to ensure that it gives you the result you want.

* The first time in the specified area to measure, as well as backup for future use of 5% -7% and add the details of your order, or if the repairs need to cut a small portion of the tile To order tiles are small / narrow spaces.

If we search a little more, we could easily find other great advantages provided by this enjoyable home improvement technique simply because once you explore and understand how it works, you quickly find endless redesigning opportunities that could fit any space at home.

Conclusion

For an average user Mosaic Floor Pattern Tiles installation is quite fast and requires no more than several hours (pending the size of the coated surface). Although this is a quick review, it is highly recommended to keep in mind the following advices just as you are ready to begin with installation.

Command Design Pattern

?

To perform several tasks paticipants pattern is to separate the following command:

Client – Who will do the task (our program, such as main (…) method will)
Invoker?- Who initiates a task
Receiver – Who listenes to the?command and carries out the?task.
Command?- interface for execution between invoker and receiver.
ConcreteCommand – implementation of Command. Holds the parameters required?to carry out the operation.

Now on the code snippet below (from GOF look http://www.dofactory.com/Patterns/PatternCommand.aspx taken)

// Command pattern — Real World example

using System;
using System.Collections;

namespace DoFactory.GangOfFour.Command.RealWorld
{

??// MainApp test application

??class MainApp
??{
????static void Main()
????{
??????// Create user and let her compute
??????User user = new User();

??????user.Compute(‘+’, 100);
??????user.Compute(‘-’, 50);
??????user.Compute(‘*’, 10);
??????user.Compute(‘/’, 2);

??????// Undo 4 commands
??????user.Undo(4);

??????// Redo 3 commands
??????user.Redo(3);

??????// Wait for user
??????Console.Read();
????}
??}

??// “Command”

??abstract class Command
??{
????public abstract void Execute();
????public abstract void UnExecute();
??}

??// “ConcreteCommand”

??class CalculatorCommand : Command
??{
????char @operator;
????int operand;
????Calculator calculator;

????// Constructor
????public CalculatorCommand(Calculator calculator,
??????char @operator, int operand)
????{
??????this.calculator = calculator;
??????this.@operator = @operator;
??????this.operand = operand;
????}

????public char Operator
????{
??????set{ @operator = value; }
????}

????public int Operand
????{
??????set{ operand = value; }
????}

????public override void Execute()
????{
??????calculator.Operation(@operator, operand);
????}

????public override void UnExecute()
????{
??????calculator.Operation(Undo(@operator), operand);
????}

????// Private helper function
????private char Undo(char @operator)
????{
??????char undo;
??????switch(@operator)
??????{
????????case ‘+’: undo = ‘-’; break;
????????case ‘-’: undo = ‘+’; break;
????????case ‘*’: undo = ‘/’; break;
????????case ‘/’: undo = ‘*’; break;
????????default : undo = ‘ ‘; break;
??????}
??????return undo;
????}
??}

??// “Receiver”

??class Calculator
??{
????private int curr = 0;

????public void Operation(char @operator, int operand)
????{
??????switch(@operator)
??????{
????????case ‘+’: curr += operand; break;
????????case ‘-’: curr -= operand; break;
????????case ‘*’: curr *= operand; break;
????????case ‘/’: curr /= operand; break;
??????}
??????Console.WriteLine(
????????”Current value = {0,3} (following {1} {2})”,
????????curr, @operator, operand);
????}
??}

??// “Invoker”

??class User
??{
????// Initializers
????private Calculator calculator = new Calculator();
????private ArrayList commands = new ArrayList();

????private int current = 0;

????public void Redo(int levels)
????{
Console.WriteLine (the
??????// Perform redo operations
??????for (int i = 0; i < levels; i++)
??????{
????????if (current < commands.Count - 1)
????????{
Command command = command [command] to the present;
??????????command.Execute();
????????}
??????}
????}

????public void Undo(int levels)
????{
??????Console.WriteLine(“n—- Undo {0} levels “, levels);
??????// Perform undo operations
??????for (int i = 0; i < levels; i++)
??????{
????????if (current > 0)
????????{
Command command = commands [- current] as Command?
??????????command.UnExecute();
????????}
??????}
????}

????public void Compute(char @operator, int operand)
????{
??????// Create command operation and execute it
??????Command command = new CalculatorCommand(
????????calculator, @operator, operand);
??????command.Execute();

??????// Add command to undo list
??????commands.Add(command);
??????current++;
????}
??}
}

?

Here Main(…) is the client

Client asks User (Invoker) to carry out some task (Calculations by Compute(…) method)

?? User knows about Calculator (Receiver) who will do the calculation and command which is an interface to call the required calculation operation (Execute or Unexecute).
But that calculation should be made known to the client. Client calls (orissues?commands)?User to do some +, – , *, / operations.

User records these commands in an array and calls command.Execute or UnExecute. the implementation(CalculatorCommand) knows well how to do the opertaion.

* Now here comes the use of credentials. If you need to revert to some level the user has a record of what commands were issued. We call only the receiver (CalculatorCommand) to carry out the same instructions in reverse.

?Uses for the Command pattern

Command objects are useful for implementing:

Multi-level undo :? If all user actions in a program are implemented as command objects, the program can keep a stack of the most recently executed commands. When the user wants to undo a command, the program simply pops the most recent command object and executes its undo() method.

Transactional behavior? Undo is perhaps even more essential when it’s called rollback and happens automatically when an operation fails partway through. Installers need this and so do databases. Command objects can also be used to implement two-phase commit.

Progress bars? Suppose a program has a sequence of commands that it executes in order. If each command object has a getEstimatedDuration() method, the program can easily estimate the total duration. It can show a progress bar that meaningfully reflects how close the program is to completing all the tasks.

Wizards? Often a wizard presents several pages of configuration for a single action that happens only when the user clicks the “Finish” button on the last page. In these cases, a natural way to separate user interface code from application code is to implement the wizard using a command object. The command object is created when the wizard is first displayed. Each wizard page stores its GUI changes in the command object, so the object is populated as the user progresses. “Finish” simply triggers a call to execute(). This way, the command class contains no user interface code.

GUI buttons and menu items? In Swing and Borland Delphi programming, an Action is a command object. In addition to the ability to perform the desired command, an Action may have an associated icon, keyboard shortcut, tooltip text, and so on. A toolbar button or menu item component may be completely initialized using only the Action object.

Thread pools? A typical, general-purpose thread pool class might have a public addTask() method that adds a work item to an internal queue of tasks waiting to be done. It maintains a pool of threads that execute commands from the queue. The items in the queue are command objects. Typically these objects implement a common interface such as java.lang.Runnable that allows the thread pool to execute the command even though the thread pool class itself was written without any knowledge of the specific tasks for which it would be used.

Macro recording? If all user actions are represented by command objects, a program can record a sequence of actions simply by keeping a list of the command objects as they are executed. It can then “play back” the same actions by executing the same command objects again in sequence. If the program embeds a scripting engine, each command object can implement a toScript() method, and user actions can then be easily recorded as scripts.

Networking? It is possible to send whole command objects across the network to be executed on the other machines, for example player actions in computer games.

Parallel Processing? Where the commands are written as tasks to a shared resource and executed by many threads in parallel (possibly on remote machines -this variant is often referred to as the Master/Worker pattern)

Mobile Code? Using languages such as Java where code can be streamed/slurped from one location to another via URLClassloaders and Codebases the commands can enable new behavior to be delivered to remote locations (EJB Command, Master Worker)

?

?

?

References:

GOF official site:
http://www.dofactory.com/Patterns/PatternCommand.aspx

Wikipidea
http://en.wikipedia.org/wiki/Command_pattern