বৃহস্পতিবার, ১১ নভেম্বর, ২০১০

DFD Example

Developing DFDs: An Example

To illustrate how DFDs are used to model the logic of data flows in information systems, we will present and work through an example.

Consider Hoosier Burger, a fictional restaurant in Bloomington, Indiana, owned by Bob and Thelma Mellankamp. Some are convinced that its hamburgers are the best in Bloomington, maybe even in Southern Indiana. Many people, especially Indiana University students and faculty, frequently eat at Hoosier Burger. The restaurant uses an information system that takes customer orders, sends the orders to the kitchen, monitors goods sold and inventory, and generates reports for management.


The information system is depicted as a data flow diagram in Figure 7-4.

  • The highest-level view of this system, shown in the figure, is called a context diagram.
    • This context diagram contains only one process, no data stores, four data flows, and three sources/sinks.
    • The single PROCESS, labeled 0, represents the entire system; all context diagrams have only one process, labeled 0.
    • The SOURCES/SINKS represent the environmental boundaries of the system.
    • Because the DATA STORES of the system are conceptually inside the one PROCESS, DATA STORES do not appear on a context diagram.

The analyst must determine which processes are represented by the single process in the context diagram.

As you can see in Figure 7-5, we have identified FOUR separate PROCESSES.

  • The main PROCESSES represent the major functions of the system, and these major functions correspond to actions such as the following:

1. Capturing data from different sources (e.g., Process 1.0)

2. Maintaining data stores (e.g., Process 2.0 and 3.0)

3. Producing and distributing data to different sinks (e.g., Process 4.0)

4. High-level description of data transformation operations (e.g., Process 1.0)

  • These major functions often correspond to the activities on the main system menu.

We see that the system begins with an order from customer, as was the case with the context diagram.

  • In the first process, labeled 1.0, we see that the customer order is processed.
    • The result is four STREAMS, or FLOWS of data:

1. the food order is transmitted to the kitchen

2. the customer order is transformed into a list of goods sold

3. the customer order is transformed into inventory data

4. the process generated a receipt for the customer.

  • The SOURCES/SINKS are the same in the context diagram and in this diagram: the customer, the kitchen, and the restaurant’s manager.

This diagram is called a level-0 diagram[2]

. Each PROCESS has a number that ends in .0 (corresponding to the level number of the DFD).

Two of the data flows generated by the first process, Receive and Transform Customer Food Order, go to external entities, so we need no longer to worry about them.

  • We are not concerned about what happens outside of our system.

Let’s trace the flow of the data presented in the other two data flows.

  • First, the data labeled Goods Sold go to PROCESS 2.0, Update Goods Sold File.
    • The output for this PROCESS is labeled Formatted Goods Sold Data.
    • This output updates a DATA STORE labeled Goods Sold File.

  • If the customer order was for TWO cheeseburgers, ONE order of fries, and a large soft drink, each of these categories of goods sold in the data store would be incremented appropriately.
    • The Daily Goods Sold Amounts are then used as input to PROCESS 4.0, Produce Management Reports.

  • Similarly, the remaining data flow generated by PROCESS 1.0, Inventory Data, serves as input for PROCESS 3.0, Update Inventory File.
    • This process updates the Inventory File data store, based on the inventory that would have been used to create the customer order.

  • For example, an order of TWO cheeseburgers would mean that Hoosier Burger now has two fewer hamburger patties, two fewer burger buns, and four fewer slices of American cheese.
    • The Daily Inventory Depletion Amounts are then used as input to PROCESS 4.0.
  • The data flow leaving PROCESS 4.0, Management Reports, goes to the sink Restaurant Manager.

Figure 7-5 illustrates several important concepts about information movement.

1. Consider the data flow Inventory Data moving from PROCESS 1.0 to PROCESS 3.0.

§ We know form this diagram that PROCESS 1.0 produces this data flow that PROCESS 3.0 receives it.

§ However, we do not know the timing of when this data flow is produced, how frequently it is produced, or what volume of data is sent.

§ Thus, this DFD hides many physical characteristics of the system it describes.

§ We do know, however, that this data flow is needed by PROCESS3.0 and that PROCESS 1.0 provides these needed data.

2. Also implied by the Inventory Data data flow is that whenever PROCESS 1.0 produces this flow, PROCESS 3.0 must be ready to accept it.

3. In contrast, consider the link between PROCESS 2.0 and PROCESS 4.0.

§ The output from PROCESS 2.0, Formatted Goods Sold Data, is placed in a data store and, later when PROCESS 4.0 needs such data; it reads Daily Goods Sold Amounts from this data store.

§ In this case, PROCESS 2.0 and 4.0 are decoupled by placing a buffer, a data store, between them.

§ Now, each of these processes can work at their own pace, and PROCESS 4.0 does not have to be ready to accept input at any time.

§ Further, the Goods Sold File becomes a data resource that other processes could potentially draw upon for data.


[1] An overview of an organizational system that shows the system boundaries, external entities that interact with the system, and the major information flows between the entities and the system.

[2] A data flow diagram that represents a system’s major processes, data flows, and data stores at a high level of detail.

বুধবার, ১০ নভেম্বর, ২০১০

Launching a New Website: 18 Steps to Successful Metrics & Marketing

The process of launching a new website is, for many entrepreneurs, bloggers and business owners, an uncertain and scary prospect. This is often due to both unanswered questions and incomplete knowledge of which questions to ask. In this post, I'll give my best recommendations for launching a new site from a marketing and metrics setup perspective. This won't just help with SEO, but on traffic generation, accessibility, and your ability to measure and improve everything about your site.

#1 - Install Visitor Analytics

Nothing can be improved that is not tracked. Keeping these immortal words of wisdom in mind, get your pages firing analytics code before your first visitor. Google Analytics is the obvious choice, and customization options abound (for most sites more advanced than a basic blog, I'd highly recommend at least using first-touch attribution).

Google Analytics Metrics

Google analytics, or any other package (see some alternatives here), needs to be placed on every page of your site and verified. Do yourself a favor and install in a template file you can be sure is on every page (e.g. footer.php). GA's instructions will indicate that placing the code at the top of the page is key, but I'm generally in favor of leaving it at the bottom to help page load time for visitors (though the new asynchronous GA code is pretty fast).

#2 - Set Up Google & Bing Webmaster Tools Accounts

Both Google & Bing have webmaster tools programs that monitor data about your site and message it back to you through online interfaces. This is the heartbeat of your site from the search engines' perspective and for that reason, it's wise to stay on top of the data they share.

Bing Webmaster Tools

That said, the numbers inside these tools are not always perfect, and often have serious flaws. The referring keywords and traffic data are, in my experience, far off what analytics tools will report (and in those cases, trust your analytics, not the engines' tools). Likewise, crawl, spidering and indexation data isn't always solid, either. Nonetheless, new features and greater accuracy continue to roll out (more of the former than the latter unfortunately) and it's worth having these both set up.

#3 - Run a Crawl Simulation of Your Site

No matter how perfect you or your developers are, there's always problems at launch - broken links, improper redirects, missing titles, pages lacking rel=canonical tags (see more on why we recommend using it and the dangers of implementing improperly), files blocked by robots.txt, etc.

Web App Crawl Data

By running a crawl test with a free tool like Xenu or GSiteCrawler, or leveraging a paid tool like Custom Crawl from Labs or the Crawl Service in the Web App (pictured above), you can check your site's accessibility and insure that visitors and search engines can reach pages successfully in the ways you want. If you launch first, you'll often find that critical errors are left to rot because the priority list fills up so quickly with other demands on development time. Crawl tests are also a great way to verify contractor or outsourced development work.

#4 - Test Your Design with Browser Emulators

In addition to testing for search engine and visitor accessiblity, you'll want to make sure the gorgeous graphics and layout you've carefully prepared checks out in a variety of browsers. My rule is to test anything that has higher than 2% market share, which currently means (according to Royal Pingdom): Internet Explorer, Firefox, Chrome, Safari and Opera.

There's a great list of browser testing options from FreelanceFolder here, so I'll just add that in-person testing, on your own PCs & Macs, is also a highly recommended use of an hour.

#5 - Set Up RSS Feed Analytics

Virtually every site will have some form of structured data being pushed out through an RSS feed. And, just like visitor analytics, if you want to improve the reach and quality of the feed, you'll need to leverage data.

Feedburner Dashboard for SEOmoz

Feedburner is the de facto software of choice, and it's very solid (though, good alternatives do exist). Getting your feed and the analytics to track and measure it is typically a very easy process because there's nothing to verify - you can create and promote any feed you want with just a few button clicks.

One important recommendation - don't initially use the counter "chicklet" like: Feedburner Chicklet with 0 Readers

It has a bad psychological impact to see that no one has subscribed to your new RSS feed. Instead, just provide a standard link or graphic and after you've amassed a few hundred or thousand readers, use the numeric readout to provide additional social proof.

#6 - Tag the Actions that Matter

No matter what your site is, there are actions you're hoping visitors will take - from tweeting a link to your post to leaving a comment to buying a product or subscribing to an email list. Whatever those actions might be, you need to record the visits that make them through your analytics tool. Casey Henry's post on Google Analytics' Event Tracking will provide a thorough walkthrough.

Once action tracking is in place, you can segment traffic sources and visit paths by the actions that were taken and learn more about what predicts a visitor is going to be valuable. If you're pouring hours each day into Twitter m but seeing no actions, you might try a different channel, even if the traffic volume is high.

#7 - Conduct an Online Usability/Branding Test

Before a formal launch, it can be extremely helpful to get a sense of what users see, experience and remember when they browse to your site for a few seconds or try to take an action. There's some fantastic new software to help with this, including Clue App, screenshot below:

Clue App Test on SEOmoz

Last week, I set up a Clue App test for SEOmoz's homepage in 30 seconds and tweeted a single link to it, which garnered 158 kind responses with words and concepts people remembered from the visit. This type of raw testing isn't perfect, but it can give you a great look into the minds of your visitors. If the messages being taken away aren't the ones you intended, tweaking may be critical.

In addition to Clue, dozens of other easy usability and user-testing apps are now on the market. Conversion Rate Experts has a good list here and Craig Tomlin's got another excellent one here.

#8 - Establish a KPI Dashboard

No matter what your website does, you live and die by some key metrics. If you're starting out as a blogger, your RSS subscribers, unique visits, pageviews and key social stats (tweets, links, Facebook shares, etc) are your lifeblood. If you're in e-commerce, it's all of the above plus # of customers, sales, sales volume, returning vs. new buyers, etc.

SEOmoz Partial KPI Chart

Whatever your particular key metrics might be, you need a single place - often just a basic spreadsheet - where these important numbers are tracked on a daily or weekly basis. Setting this up before you launch will save you a ton of pain later on and give you consistent statistics to work back from and identify trends with in the future.

#9 - Build an Email List of Friends & Business Contacts for Launch

This may seem non-obvious, but it's shocking how a friendly email blast to just a few dozen of your close contacts can help set the stage for a much more successful launch. Start by building a list of the people who owe you favors, have helped out and who you can always rely on. If you're feeling a bit more aggressive in your marketing, you can go one circle beyond that to casual business partners and acquaintences.

Once you have the list, you'll need to craft an email. I highly recommend being transparent, requesting feedback and offering to return the favor. You should also use BCC and make yourself the recipient. No one wants to be on a huge, visible email list to folks they may not know (and get the resulting reply-all messages).

#10 - Create Your Google Alerts

TheAlerts Service from Google certainly isn't perfect, but it's free, ubiquitous, and can give you the heads up on some of the sites and pages that mention your brand or link to you in a timely fashion.

Google Alerts

Unfortunately, the service sends through a lot of false positives - spam, scraper sites and low quality junk. It also tends to miss a lot of good, relevant mentions and links, which is why the next recommendation's on the list.

#11 - Bookmark Brand Tracking Queries

In order to keep track of your progress and identify the sites and pages that mention or link to your new site, you'll want to set up a series of queries that can run on a regular basis (or automated if you've got a good system for grabbing the data and putting it into a tracking application). These include a number of searches at Google, Twitter and Backtype:

Reputation Monitoring Queries

The queries should use your brand name in combination with specific searches, like the example below (using "seomoz" and "seomoz.org"):

You can add more to this list if you find them valuable/worthwhile, but these basics should take you most of the way on knowing where your site has been mentioned or referenced on the web.

#12 - Make Email Signup/Subscription Available

Capturing the email addresses of your potential customers/audience can be a huge win for the influence you're able to wield later to promote new content, products or offerings. Before you launch, you'll want to carefully consider how and where you can offer something in exchange for permission to build an email list.

One of the most common ways to build good lists is to offer whitepaper, e-book, video or other exclusive content piece for download/access to those who enter an email address. You can also collect emails from comment registration (which tend to be lower overall quality), through an email newsletter subscription offering (which tend to be very high quality) or via a straight RSS subscription (but you'll need to self-manage if you want to have full access to those emails). Services like MailChimp, ExactTarget, Constant Contact and iContact are all options for this type of list building and management.

#13 - Create Your Site/Brand's Social Accounts

Social media has become popular and powerful enough that any new site should be taking advantage of it. At a minimum, I'd recommend creating accounts on the following networks:

And if you have more time or energy to devote, I'd also invest in these:

Setting up these accounts diligently is important - don't just re-use the same short bio or snippet over and over. Spend the time to build fleshed out profiles that have comprehensive information and interact/network with peers and those with similar interests to help build up reputation on the site. The effort is worth the reward - empty, unloved social accounts do virtually nothing, but active ones can drive traffic, citations, awareness and value.

BTW - Depending on the size and structure of your site, you may also want to consider creating a Facebook Fan Page, a LinkedIn Company Page and profiles on company tracking sites like Crunchbase, BusinessWeek and the Google Local Business Center.

#14 - Connect Your Social Accounts

If you've just set up your social account, you've likely added your new site as a reference point already, but if not, you should take the time to visit your various social profiles and make sure they link back to the site you're launching.

Rand's Twitter Profile

Not all of these links will provide direct SEO value (as many of them are "nofollowed"), but the references and clicks you earn from those investigating your profiles based on your participation may prove invaluable. It's also a great way to leverage your existing branding and participation to help the traffic of your new site.

#15 - Form a List of Target Press, Blogger and Industry People for Outreach

Depending on your niche, you may have traditional media outlets, bloggers, industry luminaries, academics, Twitter personalities, powerful offline sources or others that could provide your new site with visibility and value. Don't just hope that these folks find you - create a targeted list of the sites, accounts and individuals you want to connect with and form a strategy to reach the low hanging fruit first.

The list should include as much contact information as you can gather about each target - including Twitter account name, email (if you can find it), and even a physical mailing address. You can leverage all of these to reach out to these folks at launch (or have your PR company do it if you have one). If you tell the right story and have a compelling site, chances are good you'll get at list a few of your targets to help promote, or, at the least visit and be aware of you.

#16 - Build a List of Keywords to Target in Search Engines

This is SEO basics 101, but every new site should keep in mind that search engines get lots of queries for virtually everything under the sun. If there are keywords and phrases you know you want to rank for, these should be in a list that you can measure and work toward. Chances are that at launch, you won't even be targeting many of these searches with specific pages, but if you build the list now, you'll have the goal to create these pages and work on ranking for those terms.

As you're doing this, don't just choose the highest traffic keywords possible - go for those that are balanced; moderate to high in volume, highly relevant in terms of what the searcher wants vs. what your page/site offers and relatively low in difficulty.

See this post for more tips - Choosing the Right Keyphrases - from Sam Crocker.

#17 - Set Targets for the Next 12 Months

WIthout goals and targets, there's no way to know whether you're meeting, beating or failing against expectations - and every endeavor, from running a marathon to cooking a meal to building a company or just launching a personal blog will fail if there aren't clear expectations set at the start. If you're relatively small and just starting out, I'd set goals for the following metrics:

  • Average weekly visits (via analytics)
  • Average page views (via analytics)
  • Number of new posts/pages/content pieces produced per month
  • Number of target contacts (from item #15) that you've reached
  • Social media metrics (depending on your heaviest use platform, e.g. # of Twitter followers if you're a heavy Tweeter)
  • Any of the key items from #8 on this list (your KPI dashboard)

And each of these should have 3, 6 and 12 month targets. Don't be too agressive as you'll find yourself discouraged or, worse, not taking your own targets seriously. Likewise, don't cut yourself short by setting goals that you can easily achieve - stretch at least a little.

Every 3-6 months, you should re-evaluate these and create new goals, possibly adding new metrics if you've taken new paths (RSS subscribers, views of your videos, emails collected, etc.)

#18 - Plug in the SEOmoz Web App

I know this one's a bit self-serving, but I'd like to think I'd add it here even if it wasn't my company (I recently set up my own personal blog and found the crawling, rank tracking and new GA inegration features pretty awesome for monitoring the growth of a new site).

PRO Web App

The SEOmoz Web App has a number of cool tracking and monitoring features, as well as recommendations for optimizing pages targeting keywords, that make it valuable for new sites that are launching. The crawl system can serve to help with #3 on this list at the outset, but ongoing, it continues to crawl pages and show you your site's growth and any errors or missed opportunities. Tracking rankings can let you follow progress against item #16, even if that progress is moving from ranking in the 40s to the 20s (where very little search traffic will be coming in, even if you're making progress). And the new GA integration features show the quantity of pages, keywords and visits from search engines to track progress from an SEO standpoint.


Using this list, you should be able to set up a new site for launch and feel confident that your marketing and metrics priorities are in place. Please feel free to share other suggestions for pre and post-launch tactics to help get a new site on its feet. I'm looking forward to seeing what other recommendations you've got.

p.s. Olivier Lalonde also recommended this excellent list via StackOverflow on the technical/development side (via HN thread).



Source: http://www.seomoz.org/blog/launching-a-new-website-18-steps

মঙ্গলবার, ৯ নভেম্বর, ২০১০

Office Tools

important link for ms excel

সোমবার, ৮ নভেম্বর, ২০১০

Create Bat file and Run Bat by java code

1. create Bat file:
Sample: (opens calculator on Windows XP, might not work on other versions if calc.exe location is different. Process is the same though.)

1) Open notepad

2) copy and paste the following line (with quotes) into notepad. It will be the only line.

"C:\WINDOWS\system32\calc.exe"


3) Click File -> Save As...

4) Change the "Text Documents" drop down box to say "All Files"
5) type calc.bat in the name field
6) Save it where you want it
7) Run it

2. Run Batch file from java code

public class BatchTest {

/**
* Creates a new instance of BatchTest.
*/
public BatchTest() {
}

/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here

Runtime rut = Runtime.getRuntime();
try {
rut.exec(new String[] {"C:\\batchTest.bat"} );
} catch (Exception e1) {
e1.printStackTrace();
}
}
}



courtesy by: yahoo.answer and techfuels.com

বুধবার, ৩ নভেম্বর, ২০১০

print Jtable

import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.awt.print.*;
import java.text.*;

public class TablePrint {
public static void main(String args[]) {
final Object rows[][] = {
{"one", "ichi - \u4E00"},
{"two", "ni - \u4E8C"},
{"three", "san - \u4E09"},
{"four", "shi - \u56DB"},
{"five", "go - \u4E94"},
{"six", "roku - \u516D"},
{"seven", "shichi - \u4E03"},
{"eight", "hachi - \u516B"},
{"nine", "kyu - \u4E5D"},
{"ten", "ju - \u5341"},
{"one", "ichi - \u4E00"},
{"two", "ni - \u4E8C"},
{"three", "san - \u4E09"},
{"four", "shi - \u56DB"},
{"five", "go - \u4E94"},
{"six", "roku - \u516D"},
{"seven", "shichi - \u4E03"},
{"eight", "hachi - \u516B"},
{"nine", "kyu - \u4E5D"},
{"ten", "ju - \u5341"},
{"one", "ichi - \u4E00"},
{"two", "ni - \u4E8C"},
{"three", "san - \u4E09"},
{"four", "shi - \u56DB"},
{"five", "go - \u4E94"},
{"six", "roku - \u516D"},
{"seven", "shichi - \u4E03"},
{"eight", "hachi - \u516B"},
{"nine", "kyu - \u4E5D"},
{"ten", "ju - \u5341"},
{"one", "ichi - \u4E00"},
{"two", "ni - \u4E8C"},
{"three", "san - \u4E09"},
{"four", "shi - \u56DB"},
{"five", "go - \u4E94"},
{"six", "roku - \u516D"},
{"seven", "shichi - \u4E03"},
{"eight", "hachi - \u516B"},
{"nine", "kyu - \u4E5D"},
{"ten", "ju - \u5341"},
{"one", "ichi - \u4E00"},
{"two", "ni - \u4E8C"},
{"three", "san - \u4E09"},
{"four", "shi - \u56DB"},
{"five", "go - \u4E94"},
{"six", "roku - \u516D"},
{"seven", "shichi - \u4E03"},
{"eight", "hachi - \u516B"},
{"nine", "kyu - \u4E5D"},
{"ten", "ju - \u5341"},
{"one", "ichi - \u4E00"},
{"two", "ni - \u4E8C"},
{"three", "san - \u4E09"},
{"four", "shi - \u56DB"},
{"five", "go - \u4E94"},
{"six", "roku - \u516D"},
{"seven", "shichi - \u4E03"},
{"eight", "hachi - \u516B"},
{"nine", "kyu - \u4E5D"},
{"ten", "ju - \u5341"},
{"one", "ichi - \u4E00"},
{"two", "ni - \u4E8C"},
{"three", "san - \u4E09"},
{"four", "shi - \u56DB"},
{"five", "go - \u4E94"},
{"six", "roku - \u516D"},
{"seven", "shichi - \u4E03"},
{"eight", "hachi - \u516B"},
{"nine", "kyu - \u4E5D"},
{"ten", "ju - \u5341"},
{"one", "ichi - \u4E00"},
{"two", "ni - \u4E8C"},
{"three", "san - \u4E09"},
{"four", "shi - \u56DB"},
{"five", "go - \u4E94"},
{"six", "roku - \u516D"},
{"seven", "shichi - \u4E03"},
{"eight", "hachi - \u516B"},
{"nine", "kyu - \u4E5D"},
{"ten", "ju - \u5341"},
{"one", "ichi - \u4E00"},
{"two", "ni - \u4E8C"},
{"three", "san - \u4E09"},
{"four", "shi - \u56DB"},
{"five", "go - \u4E94"},
{"six", "roku - \u516D"},
{"seven", "shichi - \u4E03"},
{"eight", "hachi - \u516B"},
{"nine", "kyu - \u4E5D"},
{"ten", "ju - \u5341"},
{"one", "ichi - \u4E00"},
{"two", "ni - \u4E8C"},
{"three", "san - \u4E09"},
{"four", "shi - \u56DB"},
{"five", "go - \u4E94"},
{"six", "roku - \u516D"},
{"seven", "shichi - \u4E03"},
{"eight", "hachi - \u516B"},
{"nine", "kyu - \u4E5D"},
{"ten", "ju - \u5341"},
};
final Object headers[] = {"English", "Japanese"};
Runnable runner = new Runnable() {
public void run() {
JFrame frame = new JFrame("Table Printing");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
final JTable table = new JTable(rows, headers);
JScrollPane scrollPane = new JScrollPane(table);
frame.add(scrollPane, BorderLayout.CENTER);
JButton button = new JButton("Print");
ActionListener printAction = new ActionListener() {
public void actionPerformed(ActionEvent e) {
try {
MessageFormat headerFormat = new MessageFormat("Page {0}");
MessageFormat footerFormat = new MessageFormat("- {0} -");
table.print(JTable.PrintMode.FIT_WIDTH, headerFormat, footerFormat);
} catch (PrinterException pe) {
System.err.println("Error printing: " + pe.getMessage());
}
}
};
button.addActionListener(printAction);
frame.add(button, BorderLayout.SOUTH);
frame.setSize(300, 150);
frame.setVisible(true);
}
};
EventQueue.invokeLater(runner);
}
}