Skip to main content


Showing posts from July, 2005

how can i find all duplicate values within an array?

FAQTs - Knowledge Base - View Entry - how can i find all duplicate values within an array?

how can i find all duplicate values within an array?
Sep 10th, 2004 13:29

Gavin Kistner, Jean-Bernard Valentaten, Periklis a

Well, there is more than one way to achieve this.
The easiest one is to walk the array position by position with two

for (var i=0; i{
for (var j=i+1; j {
if (myArray[i] == myArray[j])
myArray[j] = '';

This will do the job, but is very inefficient (especially with large
arrays), since a lot of comparisons are made. One might start to
optimize this code, but believe me, a slow algorithm will always stay
slow, no matter how much you optimize it.
The better way is to sort the array and then have a loop walk it once:


for (var i=0; i{
if (myArray[i] == myArray[i+1])
myArray[i+1] = '';

Note that the above solution does not account for objects stored in
the array which may be technically different (== computes t…

Cutting Edge: DataSets vs. Collections -- MSDN Magazine, August 2005

Cutting Edge: DataSets vs. Collections -- MSDN Magazine, August 2005: "Typed DataSet—Good and Bad

Aware of the logical limitations of the DataSet object, Microsoft also introduced the typed DataSet—a class that derives from DataSet and inherits all the members of a DataSet. In addition, a typed DataSet provides strongly typed members to access tables and columns by name, instead of using generic collection-based methods. This is beneficial for at least two reasons. First, it improves the overall readability of the code and provides significant help from the Visual Studio 2005 IDE through IntelliSense® and automatic code completion. Second, typed DataSets let you distinguish one table from the next using different objects to render each. Table Employees, for example, will be a different object from table Customers. In this way, type mismatch errors are caught at compile time rather than during execution.

Typed DataSets are still data containers, they're just a bit less generic…

Tracking Bugs

Tracking Bugs

Alex Leukhin asked some excellent questions about my last post on Testing ASP.NET 2.0 and Visual Web Developer:

“Can you clarify - how issues are assigned to developers? Does a tester assign issues directly to members of development team, or they assign them to PM who will assign those issues to team members? Or issues are automatically distributed between development groups based on member's workload? What kind of software do you use for issue tracking?”

Sharepoint Team Site and Work Item reporting

Visual Studio Team System

The SharePoint home page for your project is the perfect tool for these individuals. From this site they are able to access the current status of the project, review the number and severity of bugs, and access the project documentation. In addition, various reports will be available. These will include reports for outstanding work items, outstanding bug reports, test results, and many others. This added visibility should provide a much greater insight into the development process than what has previously been available.

Before I finish, I should make one point about extensibility. For organizations that have existing development processes already in place, Team System was designed to support customization. Team System was also designed with the idea that third-party companies would be able to integrate and extend it. Borland has already announced that they will be delivering a version of their CaliberRM requirements management tool that integrates with Team Sys…

Visual Studio 2005 Team System: Software Project Management

Visual Studio Team System

Building Work Item Lists in Microsoft Excel

Project managers typically use Microsoft Excel to store lists of issues, work items, or even to schedule work. The Visual Studio Project Management tools provide a Microsoft Excel add-in that ties a list object in the spreadsheet to the work item database. The work item database is a where all work items such as bugs, risks, and tasks are stored.

Consider a scenario where a project manager creates a spreadsheet that includes the top 10 risks. As the project manager makes changes to the assignment, priority, and other fields on those risks, team members receive the updated information in their work item queues. The project manager no longer needs to query for status on the work item, but can pull that information directly from the work item database into the spreadsheet.

There are two ways to create a work item list. From the Portfolio Explorer (a view of the project in the Visual Studio IDE) a project manager can select…

JOT: Journal of Object Technology - Specifying Good Requirements


Many of the characteristics of properly specified requirements have been well known for many years, at least among professional requirements engineers. Yet most requirements specifications seen today in industry still include many poor-quality requirements. Far too many requirements are ambiguous, incomplete, inconsistent, incorrect, infeasible, unusable, and/or not verifiable (e.g., not testable). To combat this sad state of affairs, this column provides a questionnaire that can be used when specifying and technically evaluating requirements.

When I enter text in a text field, or interact with something on a page, there is a JavaScript?

Wiki: FrequentQuestions: "Q. When I enter text in a text field, or interact with something on a page, there is a JavaScript? event that is triggered by mouse movements. How do I get Watir to trigger these events?

A. If the tag contains a JavaScript? call, you can use the 'fire_event' method to trigger it. ex. onchange=doThis() or onmouseup=clearForm()
To trigger a text field named 'my_field' with an onchange event we would do this with Watir:
ie.text_field(:name, 'my_field').fire_event('onchange')"

Are Your Requirements Complete?


Good requirements have several useful properties, such as being consistent, necessary, and unambiguous. Another essential characteristic that is almost always listed is that ‘requirements should be complete.’ But just what does completeness mean, and how should you ensure that your requirements are complete? In this column, we will begin to address these two questions by looking at (1) the importance of requirements completeness, (2) the completeness of requirements models, (3) the completeness of various types of individual requirements, and (4) the completeness of requirements metadata. In next issue’s column, we will continue by addressing (5) the completeness of requirements repositories, (6) the completeness of requirements documents derived from such repositories of requirements, (7) the completeness of sets of requirements documents, (8) the completeness of requirements baselines, and finally (9) determining how complete is complete enough when using an incremental and…

Model-based Approach to Security Test Automation

Security functional testing is a costly activity typically
performed by security evaluation laboratories. These
laboratories have struggled to keep pace with increasing
demand to test numerous product variations. This paper
summarizes the results of applying a model-based
approach to automate security functional testing. The
approach involves developing models of security function
specifications (SFS) as the basis for automatic test vector
and test driver generation. In the application, security
properties were modeled and the resulting tests were
executed against Oracle and Interbase database engines
through a fully automated process. The findings indicate
the approach, proven successful in a variety of other
application domains, provides a promising approach to
security functional testing.


Software security is a software quality issue that continues
to grow in importance as software systems manage continually
increasing amounts of critical corporate and personal
information. The use of t…

Testing: Article info : Do You Want Fries With That Test?

Testing: Article info : Do You Want Fries With That Test?: "Do You Want Fries With That Test?
Test Connection

By Michael Bolton
May 1, 2005

Summary: Connect with an expert to learn how to work smarter and learn new ways to uncover more defects. In this issue, Michael Bolton dishes out commentary on why testers who master skills instead of memorizing techniques are relished in the software industry.

In my early 20s, I decided that if I were to be a well-rounded young man (and appeal to young women), a good start would be for me to learn to cook. Like most young men, I didn't want to spend a lot of time and effort every time I walked into the kitchen, but I still wanted to impress. Above all, I wanted to learn skills so I could deal with whatever the situation required: people with different tastes and special dietary needs, the bachelor’s meager refrigerator, and the unexplored territory of someone else’s kitchen. One of my standard approaches to learning is to head for the bo…

"I want to use 'divide by zero' to indicate a physically impossible task. What does the phrase actually mean?

Math Forum: Ask Dr. Math FAQ: Dividing by Zero: "I want to use 'divide by zero' to indicate a physically impossible task. What does the phrase actually mean?
Well, division by zero is not so much 'physically impossible' as it is 'in violation of mathematical axioms.' You see, the phrase 'physically impossible' implies a task that cannot be done, no matter the amount of exertion of effort, whereas the phrase 'in violation of mathematical axioms' means that the operation contradicts certain basic assumptions regarding the system in question.
Numbers have certain properties and rules; for instance, we say that adding, subtracting, multiplying, and dividing two numbers will give another number. Subtraction is the opposite of addition, as division is the opposite of multiplication. Any number multiplied by zero gives zero.
There are several of these basic rules, called axioms, and in particular, the kinds of numbers we are familiar with, and do…

Work with an XML file as if it was a database table

Work with an XML file as if it was a database table

There is a cool XML database client (Open-Source ADO.NET XML Provider -- WilsonXmlDbClient v1.0)written by Paul Wilson that allows you to work directly with a well formed XML file as if it was a database. Here we will use this XML database client to code some simple examples using 'SELECT', 'INSERT', 'UPDATE', and 'DELETE' SQL commands directly against an XML file. To present and edit data we are going to use a DataList server control. I liked the article - Use the DataList Control to Present and Edit Data..., and I wanted to use it in this example. Also, we are going to use a couple of nifty objects like ViewState and SessionState. ViewState is used to track the value between post backs and SessionState is used to store data specific to a single client within a Web application on the server.

ASP.NET : ASP.NET Training

ASP.NET : ASP.NET Training: "Are you looking to learn to create ASP.NET Web applications with Visual Studio.NET? If so now is your chance to get 17 hours of hands-on ASP.NET training for free from Microsoft Learning.
For a limited time only, Microsoft Learning is offering Developing Microsoft ASP.NET Web Applications with Visual Studio.NET, a 17-hour self-paced online training course, for free ($349.00 value).
Click here to get started and enter promotion code 8317-MSDN-6595
Hurry, this offer is only valid for a limited time!"

sqlexpress's WebLog

sqlexpress's WebLog

SQL Server service fails to start

In some cases on a non-English OS, the SQL Server Service will fail to start. The workaround for this problem is to run the service as Local System or a Domain user account and not the Network Service Account (which is set if you do a default installation)

posted Tuesday, May 24, 2005 5:28 PM by sqlexpress with 0 Comments
How to: Configure Express to accept remote connections

Some people have been having issues when trying to make remote connections
to SQL Express. This document will hopefully clarify most of the issues
around remote connections.

First, networking protocols are disabled by default in SQL Server Express.
Thus, if someone simply installs Express and chooses all the defaults, SQL
Server Express will only be able to have connections originating on the
local machine where SQL Server is installed.

To enable SQL Server Express to accept remote connections we need to perform
the following steps:

STEP 1: Enabling TCP/I…