http://www.aspfaq.com/2446 created: 2003-02-05 last updated: 2005-09-12 22:03 this article is printer friendly Note that the majority of this article describes symptoms and workarounds for any database that is larger than you think it should be; it is not applicable only to tempdb.
SQL Server allocates a database called tempdb, primarily for worktable / #temp table usage. Sometimes, you will have one of the following symptoms:
* An error message in the event log:
Source: MSSQLSERVER Event ID: 17052 Description: The log file for database 'tempdb' is full. Back up the transaction log for the database to free up some log space
* An error message in Query Analyzer:
Server: Msg 8624, Level 16, State 1 Internal SQL Server error
or
Server: Msg 1101, Level 17, State 10, Line 1 Could not allocate new page for database 'TEMPDB'. There are no more pages available in filegroup DEFAULT. Space can be created by dropping objects, adding additional files, or allowing file growth.
* Or you will notice that the files are much bigger than they should be -- by using EXEC sp_spaceused, looking at the taskpad view in Enterprise Manager, seeing the MDF/LDF files themselves within Windows Explorer, or being alerted by monitoring software like SiteScope or Quest Spotlight.
Causes
Usually, tempdb fills up when you are low on disk space, or when you have set an unreasonably low maximum size for database growth.
Many people think that tempdb is only used for #temp tables. When in fact, you can easily fill up tempdb without ever creating a single temp table. Some other scenarios that can cause tempdb to fill up:
* any sorting that requires more memory than has been "
Build an Anthem.NET [AJAX] Autosuggest Textbox Remote Scripting (which is now referred to inaccurately as "AJAX" mostly because of a bunch of marketing hype) was invented by Microsoft around 1998, and was first notably used in a commercial application by the MS Exchange team in Outlook Web Access to make the Outlook Web application "look and feel" more like the desktop Outlook. The level of maturity of OWA was incredible, but it was only recently that browsers besides Internet Explorer got religion and implemented the XMLHttpWebRequest feature natively. That's why the big buzz over "AJAX", with many developers not even realizing that it has actually been around since last century!
Debugging Tips for 'Atlas' Applications: "'Atlas' applications consist of server code and client code, and the browser might request additional data asynchronously, which can make debugging Web applications challenging. This topic discusses some and tools and techniques to help you debug your code more easily."
Microsoft ASP.NET 2.0 Webcast Series: "Welcome to the Microsoft� ASP.NET 2.0 Webcast Series, sponsored by Microsoft, Dr. Dobb�s, and O�Reilly. Choose from 45 webcasts organized by track�JSP, PHP, and ColdFusion. Each track has been designed to take advantage of your existing Web development skills and includes insightful content contributed by Dr. Dobb�s and O�Reilly. Select the track you�re most familiar with, and then pick the webcast topics that�ll make your skill set even more versatile. When you attend three webcasts, you�ll receive an ASP.NET 2.0 Development Pack, including Microsoft Visual Studio� 2005 Standard Edition (Not for Resale), five chapters of Programming ASP.NET 2.0 Core Reference, by Dino Esposito, and more.*"
We provide static DNS services as well as many advanced services such as Dynamic DNS resolution, Secondary service, AXFR service, and domain2web redirection. Of course, our primary service is free DNS.
Since our start in June of 2001 we have proved to be a reliable and secure service and we have no intention of changing that. A $15-$30 dollar donation is appreciated to help our services grow and improve. Thank you for your support of this free service.
A Java bean has properties, or fields. These fields, unless they are primitive types, can be null. When you map a Java bean to XML, these fields become elements or attributes. Unadorned elements and attributes cannot have null values (you can sort of think of them as the equivalent of Java primitive types -- neither can be null). There are a number of ways to adorn XML attributes and elements so that instances of them can be null (or at least logically equivalent to null).
For attributes: use the attribute use="optional" For elements: use the attribute nillable="true" or use the attribute minOccurs="0"
I don't need Itunes at all so why install it? Here is what I can do. Download the old version of Quicktime ( version 5.x) ( Visit OldVersion.com ) and install it.
Connect to the internet, and run quicktime upgrade. There, you have the basic quicktime without added baggage.
Dotnet-News.com All the last .NET news ( ASP.NET, VB.NET, C#, J#, ADO.NET, WebForms, WinForms, UserControl etc... )
Dotnet-News.com All the last .NET news ( ASP.NET, VB.NET, C#, J#, ADO.NET, WebForms, WinForms, UserControl etc... ): " Populating menu control in asp.net 2.0 - using different data sources [Source : CodeProject.com ] An article on how to populate the Menu control in ASP.NET 2.0 using different data sources...
An article on how to populate the Menu control in ASP.NET 2.0 using different data sources.
Zeta helpdesk [Source : CodeProject.com ] An application to manage support request with tickets and events...
An application to manage support request with tickets and events
Extended error provider [Source : CodeProject.com ] This article describes how a basic Error Provider class can be extended to increase its fu...
This article describes how a basic Error Provider class can be extended to increase its functionality.
C# 3d charting [Source : CodeProject.com ] A simple article for easy charting....
A simple article for easy charting.
A .net state machine toolkit - part ii [Source : CodeProject.com ] A detailed look at using the more advanced features of the .NET state machine toolkit....
A detailed look at using the more advanced features of the .NET state machine toolkit.
Extreme optimization statistics library for .net [Source : SharpToolBox ] Library that includes classes for over 20 probability distributions, random number generat...
Library that includes classes for over 20 probability distributions, random number generation, hypothesis tests, and a range of statistical models, including multiple linear regression and analysis of variance (ANOVA).more
Consuming a web service from an html page [Source : ASP.NET Daily Articles ] Web services are commonly consumed from server-side web applications using sophisticated l...
Web services are commonly consumed f"
TheHolyBible Web Service: "The APIs in this service provide access to the entire American Standard edition of the Holy Bible. This web service is provided free by Francis Shanahan.
The following operations are supported. For a formal definition, please review the Service Description.
GetContentByChapterVerse "
Introducing JSON: "JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and write. It is easy for machines to parse and generate. It is based on a subset of the JavaScript Programming Language, Standard ECMA-262 3rd Edition - December 1999. JSON is a text format that is completely language independent but uses conventions that are familiar to programmers of the C-family of languages, including C, C , C#, Java, JavaScript, Perl, Python, and many others. These properties make JSON an ideal data-interchange language."
The notebook does not employ a Hard Disk and is completely based on solid state AtomChip� optoelectronics [except the mechanical Optical Drive: DVD Super Multi].
The new non-volatile Quantum-Optical RAM increases the speed of the system, since there is no need to refresh information after every cycle of reading of information, unlike regular RAM.
The new AtomChip� Quantum� II processor with 256MB on-board memory has a high speed with very low consumption of electrical energy.
This notebook has a wireless function, high CPU speed and large memory capacity with extremely low power consumption. Absence of the hard disk increases system stability under low temperatures, vibration and acceleration.
Voice Command!
That lets you use your voice to look up e-mails, contacts, get calendar information, play and control your music or video, and launch programs.
THIS PRODUCT OPENS A NEW ERA IN THE CONSUMER ELECTRONICS INDUSTRY!"
Boing Boing: Microsoft "Genuine Advantage" cracked in 24h:
Thursday, July 28, 2005
Microsoft "Genuine Advantage" cracked in 24h: window.g_sDisableWGACheck='all'
AV sez, "This week, Microsoft started requiring users to verifiy their serial number before using Windows Update. This effort to force users to either buy XP or tell them where you got the illegal copy is called 'Genuine Advantage.' It was cracked within 24 hours."
Before pressing 'Custom' or 'Express' buttons paste this text to the address bar and press enter:
javascript:void(window.g_sDisableWGACheck='all')
JavaScript Number Format v1.5.3: "JavaScript Number Format v1.5.3
A custom JavaScript object to format numbers.
Includes currency, commas, and decimal precision."
Scott Ambler has a great page that lists 35 modeling artifact types. The page links to summary descriptions of a wide variety of modeling artifacts. Each page describes the artifact, provides an example or two, and provides links to suggested resources. In this list he also indicates if the technique is simple enough for stakeholders to learn, whether it is usually a paper-based artifact, whether he suggests creating it on a whiteboard, and what type of software he would consider using to create and maintain it.
Modeling Artifact
Business Rule
Change Case
Class Responsibility Collaborator (CRC) model
Constraint
Contract model
Data Flow Diagram (DFD)
Essential Use Case
Essential User Interface Prototype
Feature
Free-Form Diagrams ...
DotNetPages: "Introducing Windows Mobile 5.0 Get ready for next generation Windows Mobile-based devices. Learn about technologies for native and managed application developers, and download tools to start building Windows Mobile 5.0 applications. ( Wed, 11 May 2005 07:00:00 GMT Table of Contents: GridView Examples for ASP.NET 2.0 Accomplish a number of common tasks with the Microsoft ASP.NET 2.0 GridView control. Each task is accompanied by a description of the new concepts covered. ( Thu, 05 May 2005 07:00:00 GMT GridView Examples for ASP.NET 2.0: Working with TemplateFields A useful column type is the TemplateField, which allows for a mix of HTML markup, Web controls, and data-binding syntax. This example shows how to work with just such a column type. ( Thu, 05 May 2005 07:00:00 GMT GridView Examples for ASP.NET 2.0: Paging and Sorting the GridView's Data When displaying large amounts of data it's often best to only display a portion of the data, allowing the user to step through the data ten or so records at a time. This sample show how to page and sort GridView data. ( Thu, 05 May 2005 07:00:00 GMT GridView Examples for ASP.NET 2.0: Improvements in Data Access and Display ASP.NET 2.0 fixes the problems of the DataGrid through a set of data source controls designed to encapsulate data that can be bound to data Web controls, and a replacement for the DataGrid?the GridView control. This sample shows you some of the data access and display improvements in ASP.NET 2.0. ( Thu, 05 May 2005 07:00:00 GMT GridView Examples for ASP.NET 2.0: Formatting the GridView Without a little tweaking, GridView's output can be a tad drab and unattractive. This example shows how to dress up formatting i"
Sysinternals Freeware - NewSID: "Introduction
Many organizations use disk image cloning to perform mass rollouts of Windows. This technique involves copying the disks of a fully installed and configured Windows computer onto the disk drives of other computers. These other computers effectively appear to have been through the same install process, and are immediately available for use.
While this method saves hours of work and hassle over other rollout approaches, it has the major problem that every cloned system has an identical Computer Security Identifier (SID). This fact compromises security in Workgroup environments, and removable media security can also be compromised in networks with multiple identical computer SIDs. "
Core Java Interview Questions
If you are planning to hit the job market, you may need to refresh some of the Java basic terms and techniques to prepare yourself for a technical interview. Let me offer you some of the core Java questions that you might expect during the interviews.
For most questions I’ve provided only short answers to encourage further research. I have included only questions for mid (*) and senior level (**) Java developers. These sample questions could also become handy for people who need to interview Java developers (see also the article "Interviewing Enterprise Java Developers").
30 Java Interview Questions
*Q1. How could Java classes direct program messages to the system console, but error messages, say to a file?
A. The class System has a variable out that represents the standard output, and the variable err that represents the standard error device. By default, they both point at the system console. This how the standard output could be re-directed:
Stream st = new Stream(new FileOutputStream("output.txt")); System.setErr(st); System.setOut(st);
*Q2. What's the difference between an interface and an abstract class?
A. An abstract class may contain code in method bodies, which is not allowed in an interface. With abstract classes, you have to inherit your class from it and Java does not allow multiple inheritance. On the other hand, you can implement multiple interfaces in your class.
*Q3. Why would you use a synchronized block vs. synchronized method?
A. Synchronized blocks place locks for shorter periods than synchronized methods.
*Q4. Explain the usage of the keyword transient?
A. This keyword indicates that the value of this member variable does not have to be serialized with the object. When the class will be de-serialized, this variable will be initialized with a default value of its data type (i.e. zero for integers).
*Q5. How can you force garbage collection?
A. You can't force GC, but could request it by calling System.gc(). JVM does not guarantee that GC will be started immediately.
*Q6. How do you know if an explicit object casting is needed?
A. If you assign a superclass object to a variable of a subclass's data type, you need to do explicit casting. For example:
Object a; Customer b; b = (Customer) a;
When you assign a subclass to a variable having a supeclass type, the casting is performed automatically.
*Q7. What's the difference between the methods sleep() and wait()
A. The code sleep(1000); puts thread aside for exactly one second. The code wait(1000), causes a wait of up to one second. A thread could stop waiting earlier if it receives the notify() or notifyAll() call. The method wait() is defined in the class Object and the method sleep() is defined in the class Thread.
*Q8. Can you write a Java class that could be used both as an applet as well as an application?
A. Yes. Add a main() method to the applet.
*Q9. What's the difference between constructors and other methods?
A. Constructors must have the same name as the class and can not return a value. They are only called once while regular methods could be called many times.
*Q10. Can you call one constructor from another if a class has multiple constructors
A. Yes. Use this() syntax.
*Q11. Explain the usage of Java packages.
A. This is a way to organize files when a project consists of multiple modules. It also helps resolve naming conflicts when different packages have classes with the same names. Packages access level also allows you to protect data from being used by the non-authorized classes.
*Q12. If a class is located in a package, what do you need to change in the OS environment to be able to use it?
A. You need to add a directory or a jar file that contains the package directories to the CLASSPATH environment variable. Let's say a class Employee belongs to a package com.xyz.hr; and is located in the file c:\dev\com\xyz\hr\Employee.java. In this case, you'd need to add c:\dev to the variable CLASSPATH. If this class contains the method main(), you could test it from a command prompt window as follows:
c:\>java com.xyz.hr.Employee
*Q13. What's the difference between J2SDK 1.5 and J2SDK 5.0?
A.There's no difference, Sun Microsystems just re-branded this version.
*Q14. What would you use to compare two String variables - the operator == or the method equals()?
A. I'd use the method equals() to compare the values of the Strings and the == to check if two variables point at the same instance of a String object.
*Q15. Does it matter in what order catch statements for FileNotFoundException and IOExceptipon are written?
A. Yes, it does. The FileNoFoundException is inherited from the IOException. Exception's subclasses have to be caught first.
*Q16. Can an inner class declared inside of a method access local variables of this method?
A. It's possible if these variables are final.
*Q17. What can go wrong if you replace && with & in the following code:
String a=null; if (a!=null && a.length()>10) {...}
A. A single ampersand here would lead to a NullPointerException.
*Q18. What's the main difference between a Vector and an ArrayList
A. Java Vector class is internally synchronized and ArrayList is not.
*Q19. When should the method invokeLater()be used?
A. This method is used to ensure that Swing components are updated through the event-dispatching thread.
*Q20. How can a subclass call a method or a constructor defined in a superclass?
A. Use the following syntax: super.myMethod(); To call a constructor of the superclass, just write super(); in the first line of the subclass's constructor.
Questions for Senior Developers follow on the next page...
30 Java Interview Questions
(...continued from previous page)
For senior-level developers:
**Q21. What's the difference between a queue and a stack?
A. Stacks works by last-in-first-out rule (LIFO), while queues use the FIFO rule
**Q22. You can create an abstract class that contains only abstract methods. On the other hand, you can create an interface that declares the same methods. So can you use abstract classes instead of interfaces?
A. Sometimes. But your class may be a descendent of another class and in this case the interface is your only option.
**Q23. What comes to mind when you hear about a young generation in Java?
A. Garbage collection.
**Q24. What comes to mind when someone mentions a shallow copy in Java?
A. Object cloning.
**Q25. If you're overriding the method equals() of an object, which other method you might also consider?
A. hashCode()
**Q26. You are planning to do an indexed search in a list of objects. Which of the two Java collections should you use:
ArrayList or LinkedList?
A. ArrayList
**Q27. How would you make a copy of an entire Java object with its state?
A. Have this class implement Cloneable interface and call its method clone().
**Q28. How can you minimize the need of garbage collection and make the memory use more effective?
A. Use object pooling and weak object references.
**Q29. There are two classes: A and B. The class B need to inform a class A when some important event has happened. What Java technique would you use to implement it?
A. If these classes are threads I'd consider notify() or notifyAll(). For regular classes you can use the Observer interface.
*Q30. What access level do you need to specify in the class declaration to ensure that only classes from the same directory can access it?
A. You do not need to specify any access level, and Java will use a default package access level.
Tips & Tricks: "Tips & Tricks
These has been picked up from thread within sqljunkies Forums http://www.sqljunkies.com
Problem
The problem is that I need to round differently (by halves)
Example: 4.24 rounds to 4.00, but 4.26 rounds to 4.50.
4.74 rounds to 4.50 and 4.76 rounds to 5.00
Solution
declare @t float
set @t = 100.74
select round(@t * 2.0, 0) / 2
Problem
I'm writing a function that needs to take in a comma seperated list and us it in a where clause. The select would look something like this:
select * from people where firstname in ('larry','curly','moe')
Solution
use northwind
go
declare @xVar varchar(50)
set @xVar = 'anne,janet,nancy,andrew, robert'
select * from employees where @xVar like '%' + firstname + '%'
Problem
Need a simple paging sql command
Solution
use northwind
go
select * from products a
where (select count(*) from products b where a.productid >= b.productid) between 15 and 16
Problem
Perform case-sensitive comparision within sql statement without having to use the SET command
Solution
use norhtwind
go
SELECT * FROM products AS t1
WHERE t1.productname COLLATE SQL_EBCDIC280_CP1_CS_AS = 'Chai'
--execute this command to get different collate naming
--select * from ::fn_helpcollations()
Problem
How to call a stored procedure located in a different server
Solution
SET NOCOUNT ON
use master
go
EXEC sp_addlinkedserver '172.16.0.22',N'Sql Server'
go
Insurance Claims sample code for Feb 2005 MSDN article: Give Your Applications Offline Capability With the Smart Client Offline Application Block
Welcome to the MSDN Library Insurance Claims sample code for Feb 2005 MSDN article: Give Your Applications Offline Capability With the Smart Client Offline Application Block
Top Ten Tips for Web Services Interoperability: "Top Ten Tips for Web Services Interoperability
I thought it might be fun to put together a 'Top Ten Tips for Web Services Interoperability' - especially between .NET and IBM WebSphere, BEA WebLogic and some of the open source toolkits. I'd love to add other people's experiences, findings and comments to this list..."
Google Software Downloads: "Upgrade your computer with free Google downloads
Google can improve more than just your search experience. The free software on this page installs quickly and easily and makes it easier to get the most out of your computer. Currently available for Windows� computers only. "
Log4j project - Frequently Asked Questions about log4j
Log4j project - Frequently Asked Questions about log4j: "As of version 0.9.0, log4j supports multiple hierarchy trees. Thus, it is possible to log to different targets from the same logger depending on the current context. "
viksoe.dk - GMail Drive shell extension: "GMail Drive is a Shell Namespace Extension that creates a virtual filesystem around your Google GMail account, allowing you to use GMail as a storage medium.GMail Drive creates a"
Use the simple form below for resolving IP addresses into DNS names. If the name lookup fails use the ARIN system. This will tell you which organization has been assigned this block of IP addresses.
At the dawn of the new Millenium, computers and the network are ubiquitous; we can't live without them. It wasn't always so. How did we get here? A series of technological innovations including Pascal's adder (the Pascaline, 1600s), Leibnitz's multiplier (the Stepped Reckoner, about 1700), the Jacquard loom (1804), the Babbage Analytical and Difference Engines (1820s-30s), electricity and electromagnetism, the telegraph, the Hollerith tabulating machine (1890), the relay, the vacuum tube, core memory, the transistor, the laser, the integrated circuit, and on and on, each resulted in products that stimulated applications, which in turn stimulated the demand for more and better products, and before long computers entered the economy and the popular culture.
Cuball's WebLog: "Windows XP Performance Tweak
You need a minimum of 256MB of RAM before you make these changes.
Open your favorite registry editor and navigate to the following key:
HKEY LOCAL MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management
Areas to change are as follows
DisablePagingExecutive - Double click it and in the decimal value field, put a 1. This will allow XP to keep data in memory instead of paging sections of RAM to the hard drive.
LargeSystemCache - Double click it and change the decimal value to 1. This will allow the XP Kernel to Run in memory.
Create a new DWORD value and name it IOPageLockLimit - Double click it and set the value in hex to 4000 if you have 128MB of RAM, 10000 if you have 256MB or 40000 if you have more than 512MB of RAM. "
Skype is free and simple software that will enable you to make free calls anywhere in the world in minutes. Skype, created by the people who brought you KaZaA, uses innovative P2P (peer-to-peer) technology to connect you with other Skype users. If you are tired of paying outrageous fees for telephony, Skype is for you
How the LUHN-10 Algorithm Works
http://www.ee.unb.ca/tervo/ee4253/luhn.html
If a 'weighted sum' is constructed by multiplying adjacent digits by a different constant (in this case, either 1 or 2) the problem of adjacent swapped digits going undetected can be eliminated. A checksum is constructed from the sum of the resulting digits. If a product results in two digits (e.g. 2x6=12), the individual digits (1 and 2) are added separately into the checksum. The final digit is computed so that the weighted sum is an exact multiple of 10. In other words, the overall sum "modulus 10" equals zero. In this case, 70 is an exact multiple of ten.
70 = 0 mod 10
The number is correct if a zero result is obtained.
It is important when applying this method to numbers of different lengths that the rightmost digit (the check digit) is always multiplied by 1 and not by 2.
It can be observed that the presence or absence of leading zeros in a number to be checked has no effect on the result. (e.g. 8913105 or 08913105 or 00008913105 would all pass the test)
Boot Disk Windows XP 2000 NT NTFS.com: "NTFS.com > Data Recovery Software - NTFS Reader for DOS > NTFS Boot Disk
DOS NTFS boot disk to access NTFS partitions in Windows XP 2000 or NT
How to make DOS boot disk to access NTFS partitions in Windows ?
Download self-extracting Bootable Floppy Disk Creator for NTFS Reader.
Insert floppy disk and run NtfsFloppySetup.exe
Follow the instructions on the screen
To access NTFS drives from DOS :
Reboot your computer from a new boot disk.
The program (ReadNTFS.exe) will start automatically from autoexec.bat
Note: You can use NTFSDOS boot disk to access NTFS drives in Windows 98 95 and 3.1. This is a DOS program, but can be run from Windows.
"
Data Recovery Software. NTFS Reader for DOS NTFS DOS. Freeware & Shareware.
Data Recovery Software. NTFS Reader for DOS NTFS DOS. Freeware & Shareware.: "NTFS Reader DOS Boot Disk provides read access to NTFS drives from the MS DOS environment. It supports long filenames as well as compressed and fragmented files. NTFS Reader for DOS allows you to preview the files on NTFS and copy them from NTFS to FAT volumes or network drives. In order to use the software you need to copy the readntfs.exe file to a bootable floppy disk and boot from it.
NTFS Reader for DOS is a FREEWARE
Software features:
Can be saved and run from bootable floppy (download boot disk image)
Displays complete physical and logical drive information
Supports IDE / ATA / SCSI drives
Supports large (more than 8GB) Hard Drive
Supports NTFS, NTFS5 file systems for reading
Supports FAT12, FAT16, FAT32 file systems for data writing
Supports compressed and fragmented files on NTFS
Supports partitions created in MS-DOS, Windows XP.2000.NT.ME.98.95
Displays non-english and long file names
Ability to preview file(s)/folder(s) before copying
Supports search by file name or mask
Disk Viewer displays content of the file in Hex/Text mode "
Ken Auer and Roy Miller propose in their book ("Extreme Programming Applied", page 71), that although it is better to start with all 12 above mentioned practices, it is also feasable to start with only the following 6 practices. Ken and Roy call them essential practices.
Liskov Substitution Principle Barbara Liskov first wrote the LSP as follows in 1988:
What is wanted here is something like the following substitution property: If for each object o1 of type S there is an object o2 of type T such that for all programs P defined in terms of T, the behavior of P is unchanged when o1 is substituted for o2 then S is a subtype of T." - BarbaraLiskov, Data Abstraction and Hierarchy, SIGPLAN Notices, 23,5 (May, 1988).
Every XP aficionado knows about the 4 values and 12 practices,
but how many people know about the 15 principles? I'll confess I
didn't when Kent talked about them at JAOO last week. After the talk I
asked Kent about them: "were they in the White Book". "Yes", he
replied, "cunningly hidden in a chapter called 'Basic Principles'".
Fundamental Principles:
Rapid Feedback
Assume Simplicity
Incremental Change
Embracing Change
Quality Work
Further Principles:
Teach Learning
Small Initial Investment
Play to Win
Concrete Experiments
Open, honest Communication
Work with people's
instincts - not against them
Accepted Responsibility
Local
Adaptation
Travel Light
Honest Measurement
At the JAOO talk, Kent talked about how principles were a step
between the universality (and vagueness) of values and the
concreteness (and dogmatism) of practices. In the White
Book he said "These principles will help us as we choose between
alternatives. We will prefer an alternative that meets the
principles more fully to one that doesn't. Each principle embodies
the values. A value may be vague. One person's simple is another
person's complex. A principle is more concrete. Either you have rapid
feedback or you don't."
The principles haven't been talked about much, even by Kent. I
think that's why they aren't so well known. The values and practices
were discussed, debated, and refined on the wiki in the formative
stages of describing XP. Kent prepared the principles primarily for
the White Book.
Refreshing my mind with them now, I can see why Kent wanted to
remind everyone of them at JAOO. One of the biggest issues with XP,
and indeed with any agile method, is how to do the essential local
adaptation where you alter the process to fit the local
conditions. The principles help provide some guidelines on what bits
of adaptation will work, and which go against the XP grain. They are
part of the essence of XP that every skilled XPer both knows, and
finds difficult to communicate. I'll remember to mention them
whenever I describe XP in future.
What is the difference between UseCases and XP's stories?
This is a common question, and not one that has a generally agreed on answer. Many people in the XP community consider stories to be a simplified form of use cases, but although I used to hold this view I see things differently now.
Use cases and stories are similar in that they are both ways to organize requirements. They are different in that they organize for different purposes. Use cases organize requirements to form a narrative of how users relate to and use a system. Hence they focus on user goals and how interacting with a system satisfies the goals. XP stories (and similar things, often called features) break requirements into chunks for planning purposes. Stories are explicitly broken down until they can be estimated as part of XP's release planning process. Because these uses of requirements are different, heuristics for good use cases and stories will differ.
The two have a complex correlation. Stories are usually more fine-grained because they have to be entirely buildable within an iteration (one or two weeks for XP). A small use case may correspond entirely to a story; however a story might be one or more scenarios in a use case, or one or more steps in a use case. A story may not even show up in a use case narrative, such as adding a new asset depreciation method to a pop up list.
Do you need to do both? As in many things, in theory you do but in practice you don't. Some teams might use use cases early on to build a narrative picture, and then break down into stories for planning. Others go direct to stories. Others might just do use cases and annotate the use case text to show what features get done when.
aggregation (white diamond) has no semantics beyond that of a regular association. It is, as Jim Rumbaugh puts it, a modeling placebo. People can, and do, use it - but there are no standard meanings for it. So if you see it, you should inquire as to what the author means by it. I would advise not using it yourself without some form of explanation.
composition (black diamond) does carry semantics. The most particular is that an object can only be the part of one composition relationship. So even if both windows and panels can hold menu-bars, any instance of menu-bar must be only held by one whole. This isn't a constraint that you can easily express with the regular multiplicity markers.
This is a small collection of texts about some features in SQL Server that people frequently ask about in the newsgroups about MS SQL Server. Rather than being a FAQ with many questions with short answers, these are in-depth articles on some of my favourite topics
It was after running the sql scripts to install a new database that I noticed that the author had not prefixed the objects with "dbo." and so, after running them I noticed that they were owned by the user that I was logged-in as at the time (super_administrator!). Well, it wasn't going to be very useful to have everyone logging in using that account to run the sprocs so, I wrote the following script to enumerate the tables and sprocs and assign a new owner:
SET @currentOwner = 'ASPNET'
SET @newOwner = 'dbo'
DECLARE alterOwnerCursor CURSOR FOR
SELECT [name] FROM dbo.sysobjects
WHERE xtype = 'U' or xtype = 'P'
AND LEFT([name], 2) <> 'dt'
OPEN alterOwnerCursor
FETCH NEXT FROM alterOwnerCursor INTO @currentObject
WHILE @@FETCH_STATUS = 0
BEGIN
SET @qualifiedObject = CAST(@currentOwner as varchar) + '.' + CAST(@currentObject as varchar)
EXEC sp_changeobjectowner @qualifiedObject, @newOwner
FETCH NEXT FROM alterOwnerCursor INTO @currentObject
END
CLOSE alterOwnerCursor
DEALLOCATE alterOwnerCursor
There are two preferred methods of making browsers ignore JavaScript:
1) a <NOSCRIPT> tag
This method works by creating a soft of "catch-22" on the browser: Browsers that support JavaScript ignore anything within a <NOSCRIPT> section because this material is meant to be displayed only in browsers that DON'T support JavaScript, in place of the script (this area is often used by Web designers to display text such as "Your browser does not support JavaScript; this script will not work", etc.). Browsers that DON'T support JavaScript (early versions, for example) don't recognize the <NOSCRIPT> tag and ignore it anyway.
2) a SCRIPT tag that references a nonexistant scripting language, e.g. tag is encountered. Therefore any JavaScript coming after the <SCRIPT> tag will not be executed.
This program is set up to use the <NOSCRIPT> method by default. The HTML used is stored in the file fix.ini and can be modified by the user.
Set the DefaultDomainName, DefaultPassword (must be non-blank), and DefaultUserName. Set AutoAdminLogon to 1 (all are type REG_SZ). If you ever want to logon as a different user, hold down the shift key as you logoff.
If you implemented Tip 025, undo it.
Note:Your password is stored in plain text in the registry and can be seen by someone with the authority to view a remote registry.
The 12 commandments of extreme programming
I _ The Planning Game
Meet with coders, managers, and the customer each week to schedule tasks for the next phase. Update the plan regularly.
II _ Small Releases
Put a simple system into production quickly, then release new versions on a short cycle.
III _ Metaphor
Create an analogy that expresses how the parts of the new system work.
IV _ Simple design
Design simply, and remove complexity at every stage.
V _ Testing
Write test programs that assure every portion of the code runs flawlessly before attempting a new task.
VI _ Refactoring
Edit the code to simplify, add flexibility, or remove redundancy.
VII _ Pair Programming
Write all code with two programmers at one machine.
VIII _ Collective Ownership
Permit anyone on the team to change code anywhere in the system at any time.
IX _ Continuous Integration
Bring components of the program together several times throughout each day to make sure they work in concert.
X _ 40-Hour Week
Strive to work no more than 40 hours a week. Never work overtime a second week in a row.
XI _ Onsite Customer
Include a real, live user on the team, available full-time to answer questions.
XII _ Coding Standards
Use agreed-upon styles and nomenclature to promote easy understanding of what the code does.
%0, %1, %2, %3, %4, %5, %6, %7, %8, %9 ... arguments to the batch file
|
%0 is the batch file itself
%variablename% ... the name of the variable; the variable name is set by
the SET variablename=string command
Note the extra '%' at the end.
ECHO [ON|OFF|message]
"echo blank" will produce a blank line on screen in DOS2.1
"echo blank" will show ON/OFF on screen in DOS3.0
"echo ASCII-255" to get a blank line in DOS3.1
"echo." to get a blank line in DOS3.1
@echo off ... even the "echo off" will not be echoed (DOS 3.3)
%@%echo off ... good for various versions of DOS (set @=@ for DOS 3.3
set @= for DOS 3.2)
CALL batchfile
set call=call for DOS 3.3
set call=%comspec% /C for DOS 3.2
%call% ... usage that is good for various version of DOS
FOR %%variable IN (set) DO command {set is a list of filename; * or ? can be
used.}
Note that two %% are used in a batch file, because one % is striped off when
given to the command line; only one % is needed when given directly from the
command line.}
GOTO label {%1 etc. can also be used for label; see example below}
If [NOT] condition command
|string1==string2 {upper & lower case letters matters}
|EXIST [d:][path]filename {path in DOS3.0}
| {path is not supported in DOS2.1}
|ERRORLEVEL number {true if the previous program exit
with number or higher; See ask}
example of looping 7 times (i.e., 7 "-" signs)
set count=
:loop
set count=%count%-
command 1
command 2
if not "%count%"=="-------" %then% goto loop
%else% set count=
example of looping 27 times (i.e., 2 "+" signs and 7 "-" signs)
set count1=| set count2= ... put two commands in one line with "|" redirection
:loop
set count1=%count1%-
command 1
command 2
if not "%count2%%count1%"=="+++-------" %then% goto end
%else% if not "%count1%"=="-------" %then% goto loop
%else% set count2=%count2%+| set count1=
goto loop
SHIFT
PAUSE [remark]
REM [remark]
Example: :label
:comments
.comments
.comments %1 %2
Command line parameters may be displayed on comment lines.
REM comments
echo {bell}
goto label
Example: copy con: %1 {enter text to files within a batch environment}
Example: REM CTRL-H CTRL-H CTRL-H comments {not to show "REM" in echo mode}
Example: SET abc=\fortran\fortran.lib
link %1,,,%abc%
Example: SET mouse=1 {set the environment in one batch file}
IF %mouse%=="1" copy abc.txt com1:
Example: IF .%1==.abc dir {dots allow .BAT files to continue running when there
is no parameter passed.}
Example: IF dummy==dummy%1 GOTO label {test for nul parameter in a batch file}
{good for terminating SHIFT}
Example: IF ERRORLEVEL 1 IF x==%1 command ÚÄ
IF ERRORLEVEL 1 IF EXIST filename command ÀÄ{to nest IF statement}
Example: ECHO CTRL-H {to output a blank line to the console}
Example: ECHO A ... program1
ECHO B ... program2
ECHO Press the letter of your selection
PAUSE > select.bat
select
Example: FOR %%f IN (*.*) DO program %%f {good for a program that cannot handle
global chars * and ?}
FOR %%f IN (*.*) DO type %%f
FOR %%f IN (abc.hlp,command.hlp,batch.hlp) DO type %%f
FOR %%f IN (*.g) DO ren %%f %%for {ren all .g files to .gor}
FOR %%f IN (*.hlp) DO find "abc" %%f {find "abc" in all the .hlp files}
Example: rem print a number of files with the corresponding directories & with formfeed
echo off
cls
:loop
echo ... PRINTING FILE %1
dir %1|find "-" > prn:
echo
> prn: {line feed}
echo -------------------------------------------------------- > prn:
echo
> prn: {line feed}
copy %1 prn:
echo > prn: {form feed}
shift {handle the next argument}
if not dummy==dummy%1 goto loop
Example: GOTO f%1
:fA
echo the 1st argument was A
GOTO end
:fB
echo the 1st argument was B
GOTO end
:fC
echo the 1st argument was C
:end
See BAT for a set of enhanced batch file commands.
A very interesting article from Shawn's blog was posted lately. It uses some equations to explain how to manage your careers. Sometimes I also wonder how come the best minds have slow careers while the not-so-best people are seeming at the peak. Definitely worth reading.
Sing my song Life is not measured by the number of breaths we take, but by the moments that take our breath away
Access denied Error when uploading file in ASP.NET
This problem occurs because the ASPNET windows account does not have a write permission to the directory where you are saving the file. Use the security TAB under the file properties to add this permission.
Speaking of security running an SQL Command in Asp.net means you have to add ASPNET to the database users. If you are using integrated authentication in your connection string, make sure that the method of authenticaton for ASPNET is windows. In some public sites, the scheme is to use the impersonation via web.config entry. This name used in impersonation corresponds to the windows user that the process will run on and the same user must be in the list of valid db users. I did this all in the Enterprise manager as I do not know the sp's to do it.
I am changing some web applications and decided to install VSS in my computer. I chose the Shared Server version when installing the VSS and created a database under the Program Files. Then I wanted this folder to be as secure as possible and looking into the documentation I found the following:
Your database must be installed on an NT file system (NTFS)
Do not create a shared database in your system folders or in your Documents and Settings folders.
grant Full Control permissions to only those in the VSS Administrator Group
Folder Tip for XP users
Windows XP-2000-NT Tip #542: Missing Security Tab in Windows XP: "To reveal the Security tab, open Windows Explorer, and choose Folder Options from the Tools menu. On the View tab, scroll to the bottom of the Advanced Settings and clear (click) the check box next to 'Use Simple File Sharing.' Click OK to apply the change, and you should now have a Security tab when viewing the properties of a file on an NTFS volume."
I've been researching on tools to fine tune my development site and fortunately I found this from Microsoft: Visit the page now at Free Tool Downloads
One particular tool is the XCalcs.exe which does a lot more than the calcs.exe. The Xcacls.exe utility is included in the Windows 2000 Resource Kit . You can download the Xcacls.exe utility from the following Microsoft Web site:
Xcalcs.exe download
Best E-mail Utility so far
I have been looking for a one-stop program that will notify me of my e-mail from various sites and at last I found one. This program is from Eprompter.com You can download the program to see how it works. Truly recommended.
Visual Studio Project File conversion
Diego Gonzalez discusses a snippet on how to convert projects between Visual Studio 2003 and 2003 with this trick.