devxlogo

Tip Bank

Improve Linear Searching

In order to increase the efficiency of your linear searching, add the item you are searching at the end of the list (either an array or linked list) and write

Dealing with Delimited Strings in T-SQL

This is a simple way to find out the word count in a comma delimited string: declare @mystring varchar(200)set @mystring=”vb,asp,sqlserver,html”select (len(@mystring)-len(replace(@mystring,’,’,”))+1) The following code will parse the delimited string: –variable

Naming a Thread

Debugging a multi-threaded program in Visual C++ may be difficult, especially when switching between multiple threads using the Debug/Threads menu. One efficient way to distinguish threads during debugging is to

Toggle Code Blocks with C Comments

If you find yourself constantly commenting and uncommenting bits of code during development, this tip could come in handy. Normally, you’d do something like this: #define /* #undef */ _FOObool

A More Enhanced Right() Function

Normally, the Right() Function VB returns only the Length specified from the End. If you want to extract the Right portion from any index of the String you have to