Data compression in large tables in MS SQL server [July 26, 2011 15:46]Do you know that you can compress data while using MS SQL 2008 or any later version? Compression is available for now in SQL Server 2008 Enterprise and Developer edition. MS SQL data compression provides another great benefit, since compressed data is stored in fewer pages and therefore, queries need to read fewer pages from the disk and thus, improves the performance of I/O intensive workloads. However, some additional CPU resources are required on the database server to compress and decompr...
How To Secure MS SQL server when running web application [May 18, 2011 12:08]When people need to connect publically, those individuals are taking the risk of outside attacks on your server. A year and half ago I noticed that 2 hackers are trying to get into my MS SQL 2008 server via the SA account. But with some simple steps we can avoid the attacks on the server. The first step is to change the default port which is 1433 to any new one that are you comfortable with, but try in a different range than the current default port. Secondly, disable the SA account and yo...
String Manipulation on large data using LIKE operator or PATINDEX in MS SQL [April 27, 2011 14:00] The Reson that I am using string manipulation instead of the CONVERT() function is: Since the table could have millions of dates that could not be converted using the CONVERT() fucntion and therefore string manipulation is required. Even though most records could use the CONVERT() function, I will still would rather use the string manipulation stretegy since in one transaction I convert all dates wether they can use the CONVERT() or not.
PIVOT query with Monday's date as start of the week date [April 11, 2011 17:06]In this short blog post I'd like to discuss a recent problem I solved in MSDN forums - create a PIVOT query for weekly transactions using Monday's date to display for each week (even when there were no records for Monday for each particular week).
CTE and hierarchical queries [April 8, 2011 17:19]In this article I give a brief introduction to Common Table Expressions (CTE) and then show several interesting problems that can be now solved with recursive CTE. I primarily use CTE instead of derived tables to improve maintenance and code readability
Processing hundreds of millions records got much easier in ms sql [April 7, 2011 16:31]MS SQL 2008 - Processing hundreds of millions records can be done less then an hour. Processing hundreds of millions records requires a different strategy and the implementation should be different compare to smaller tables with only several millions of records. Say you have 800 millions of records in a table and you need to delete 200 million. Obviously you can use this code: DELETE FROM Users WHERE DOB = '' The problem is that you are running one big transaction and the log file will g...
Hosting the Razor Engine for Templating in Non-Web Applications [January 4, 2011 20:27]Microsoft's new Razor View Engine is now available with WebMatrix and MVC 3 and the good news is that the engine can be easily and efficiently hosted in non-Web applications to provide .NET (C# and VB based) templating. In this article I'll discuss a library that makes it easy to embed Razor based templating into your own .NET applications and in the process describe how Razor hosting works.
How to Make Your ASP.NET Third Party Component 10x Faster [December 20, 2009 08:11]This document will explore the basics of enhancing 3rd party ASP.NET components performance by leveraging the Empty Client (an ASP.NET extension) pipeline. Submitted by Visual WebGui, the article gives background of how Empty Client works. This is targeted towards software architects and advance developers who would like to learn the basics of ASP.NET controls upgrade to become Empty Client native controls. This document describes the general process of migration; reading this document shou...
Visual WebGui to Reveal the First Cloud Application Platform that Migrates Legacy Applications to th [November 18, 2009 04:14]Developers can now deploy their applications to Windows Azure with the click of a button with no re-writes or new programming skills needed. Gizmox, the developer of Visual WebGui, today announced that it will reveal its application platform atop Windows Azure and its development framework, VWG platforms offers the only push-button .NET desktop legacy application migration path to Windows Azure. With VWG enterprises will be able to migrate to Windows Azure, by reusing their existing Windo...
Traditional Ajax vs. New business targeted Ajax [August 31, 2009 08:28]This article compares between the traditional Ajax represented by ASP.NET to that of the new Ajax approach represented by Visual WebGui. The article present an opportunity for developers to learn a way to focus their development efforts on algorithms, requirements and business logics using the new approach to Ajax which provides maximal flexibility, interoperability and interactivity with any traditional web applications, controls set and architectures.
New Social Networking blogging concept created & executed by 1 person and $500 cost [August 27, 2009 00:06]When MyTimeLineOnline sought to create a social networking site with limited cash flow and a minimal staff, Visual WebGUI made it easy to create a completely AJAX’ed site without costing over $500. MyTimelineOnline.com was created to allow people to share their personal and family experiences in a chronological way which also allows learning about others' similar experiences . Moreover, via MyTimelineOnline users will be able to search for dates where combined experiences relate. The site...
VFP 7 Wish List [May 6, 2008 02:02]This document contains the wish list for Visual FoxPro 7. The document has been built by the use of several Universal Thread members prior to the delivery of Visual FoxPro 7 by the Microsoft team. Many of those wishes have made their way into the product. Thanks for all who participated.
VFP Beta Exam Survivors [May 6, 2008 02:00]This is the list of the VFP Beta Exam Survivors. See who passed and/or failed. OK, now it's people who took the test, beta or production! From 2000 to 2001, many Universal Thread members entered their name in the list as well as the test taken and the results.
Do's and Don'ts in Visual FoxPro [May 6, 2008 01:58]This document contains a lots of Do's and Don'ts about Visual FoxPro. This is a collection of data gathered from various Universal Thread members. This relates to several topics on the use of the product for development applications for today's needs.
Fun Topics [May 6, 2008 01:56]It all started for fun and it rapidly turned out to be interesting to see how much movie titles could be created from Visual FoxPro related terminology. I guess some of my favorites are End of DAYS(), Deep SPACE(9), Being John Koziol and Message() in a Bottle.
VFP Worldwide Tournament 2002 [May 6, 2008 01:55]The Universal Thread VFP Worldwide Tournament 2002 regrouped 10 teams who competed in three events in order to deliver specific Visual FoxPro material within a one month period. One event was related on the publishing of one article while the other two events were related on the ability for a team to deliver as much and as best as they can two Visual FoxPro applications (desktop and Internet) within a 48 hours timeframe.
Visual FoxPro 10th anniversary [May 6, 2008 01:54]Hugh Winters managed the Visual FoxPro 10th anniversay on the Universal Thread. This event gathered related information about the history of the product. Such information included the collection of signatures for the card, the day the plane flew over Microsoft headquarters, Eric Rudder's response to the community as well as several other items.
Universal Thread Visual FoxPro Community Survey 2002 [May 6, 2008 01:51]The Universal Thread Visual FoxPro Community Survey has gathered up to date data in regards to Visual FoxPro developers. The survey was initially released on April 4th, 2002. It ran until April 25th, 2002. Some of the questions were related to the community and their thoughts about how it contributed to the Visual FoxPro product as well as in regards to the Universal Thread. Without any surprise, nearly 80% confirmed than they believe that the present state of Visual FoxPro is related to its com...
Universal Thread Visual FoxPro Community Survey 2003 [May 6, 2008 01:50]The Universal Thread Visual FoxPro Community Survey has gathered again a great ammount of information about Visual FoxPro developers, their needs and hopes. The survey was initially released on February 3, 2003, and ran until February 24th, 2003. The questions started with how the community is using Visual FoxPro. In the first place, the community is as commited with the product latest versions as ever, with the usage of VFP 7.0 surging from around 70% last year to more than 80%, with more than ...
Universal Thread Visual FoxPro Community Survey 2004 [May 6, 2008 01:49]The Universal Thread Visual FoxPro Community Survey 2004 was running from March 10th to April 9th, 2004. It gathered a great amount of information about Visual FoxPro developers, their needs and hopes. The survey included various topics such as version being used and magazine frequently being read.
Visual FoxPro Members Choice Awards 2001 [May 6, 2008 01:47]The Universal Thread Visual FoxPro Members Choice Awards 2001 is a recognition for the effort given by companies and individuals in regards to Visual FoxPro. The award has run from December 8 to December 31st, 2001. The available choices have been selected by the community. The Universal Thread would like to thank the community for having participated into that award. The 2002 Awards will take place in December 2002.
Outage knocks BlackBerry users offline [February 11, 2008 21:45]From InfoWorld: "BlackBerry mobile data services were disrupted Monday afternoon due to a problem with Research In Motion's infrastructure, apparently affecting customers of all major North American mobile operators, an AT&T Wireless spokesman said."
Should Texting While Driving Be Banned? [August 7, 2007 23:23]From PCWorld: "Ninety-one percent of Americans believe sending text messages while driving is as dangerous as driving after having a couple of drinks, but 57 percent admit to doing it, a poll released on Tuesday said. The Harris Interactive survey commissioned by mobile messaging service Pinger Inc. found 89 percent of respondents believe texting while driving is dangerous and should be outlawed."
USB monitor tested [June 18, 2007 16:27]From TheInquirer: "X-Bit labs came up with something nothing short of spectacular - most of reviews we get informed about are regular components, with a twist or two, but this review is something of a must read. The guys tested the world's first USB monitor, Samsung SyncMaster 940UX."
A Cost Analysis of Windows Vista Content Protection [January 30, 2007 13:47]This document looks purely at the cost of the technical portions of Vista's content protection. The political issues (under the heading of DRM) have been examined in exhaustive detail elsewhere and won't be commented on further, unless it's relevant to the cost analysis. However, one important point that must be kept in mind when reading this document is that in order to work, Vista's content protection must be able to violate the laws of physics, something that's unlikely to happen no matter ho...
Script#: A New Ajax Scripting Language Is Born [June 2, 2006 10:04]From Microsoft Watch: "What do Softies do in their free time? Some of them code for fun. One in particular, Nikhil Kothari, an architect on Microsoft's Web platform and tools team, has developed a new Ajax scripting language, Script#. While there's no word on when and if Kothari's employer might be interested in commercializing Script# in some way, it would definitely make a nice complement to Microsoft's Atlas Ajax framework – and would give the Redmondians a tool with which to counter Google's...
Custom-built Viruses for Sale [February 27, 2006 09:40]From WinXPCentral: "This is just insane. No wonder virus companies are having such a hard time keeping up. Engineers at Panda Software, while in the process of researching a new trojan, uncovered evidence this week that led them to a web site touting custom-built viruses for sale. For the low, low price of only US$990, a user gets his or her own pet trojan horse, complete with tech support. If the file is discovered—as this current model was—the designer provides a guarantee to alter it so that ...
An Introduction To Performance Counters [November 1, 2004 09:07]Although the .NET Framework provides usage of performance counters under the System.Diagnostics namespace, for some reason, documentation on it does little cover using performance counters for average duration per execution. When starting using PerformanceCounterType.AverageTimer32, performance monitor did not show the expected results.
Transactional Objects in VB.NET [November 1, 2004 09:07]Ever had to return an object to its original state after a user has clicked the Cancel button? I am sure that most of us have, and we have had to write a whole series of special methods to do this, methods that are only valid for that object, and methods that fail when later on we add more properties to the object and forget to modify the 'Transaction' routines.
Multithreading Concepts in C# [November 1, 2004 09:06]Multithreading or free-threading is the ability of an operating system to concurrently run programs that have been divided into subcomponents, or threads.
Model driven Gridview [November 1, 2004 09:05]In .NET framework, there is no model driven grid (table) component. And I missed it a lot. Therefore, I made this simple component. It is a GridView descendant with an additional property: Model, which is responsible for delivering of: Columns, Rows and Cell values. It is very nice to separate the View of Data from the Data itself. In this article, you will find the first step to how to implement it.
Building Security Awareness in .NET Assemblies : Part 1 [November 1, 2004 09:05]I always believe Security is the number 1 priority in building a good software. I have been trying to make sure that security issues are considered during my design stage. But the problems with current students in tertiary education is that I can say most of them never actually consider security as a real issue. They tend to focus more on the system's features and GUI. Lecturers also hardly pay attention or encourage students to place higher security measures into their projects, which I think i...
Building Security Awareness in .NET Assemblies : Part 2 [November 1, 2004 09:04]Before you read part 2, please make sure you already have read part 1 as it is related. In this article, I will be showing how to defend your .NET assemblies from being tampered. I do believe you have heard of the Digital Signature Approach. In short, you could actually attached a Strong Name key to the .NET Assembly to protect it from being tampered. Strong Name key is a RSA 1024 bit encryption, and to break it is not that easy at all. You need to have huge computing power to get that private k...
Building Security Awareness in .NET Assemblies : Part 3 [November 1, 2004 09:03]Welcome back to part 3 of the Building Security Awareness in .Net Assemblies series. In this article, I will share with you the possibility of breaking Strong Named .Net Assemblies. Make sure you have already read through part 1 and 2 before continuing on.
Dividing a stream in many streams [November 1, 2004 09:03]Some time ago, I was sent to work with an old mainframe system. There I became familiar with a source repository where a single file on the system contains several files from the source code. Although this seems very familiar to many people (through TAR or ZIP files), I wanted the ability to work with the files within without copying them to a temporary location. This article is the result of this quest.
Serial Communication using C# and Whidbey [October 31, 2004 08:53]In this article, I will give you an introduction on how to do serial port communication on .NET platform using C#. The .NET framework version 2.0 (beta) provides features for serial communication. The framework provides System.IO.Ports namespace. The new framework provides classes with the ability to access the serial ports on a computer, and to communicate with serial I/O devices. We will be using RS 232 C standard for communication between PCs. In full duplex mode, here I am not going to use a...
Using Structures in VB.NET [October 31, 2004 08:52]Structures are complex data types that encapsulate small pieces of tightly related data items. As with Classes, Structures can contain data members as well as member methods to work with data inside a structure. Since the in-memory representation of Structure is 'value type', memory management is handled efficiently.
Creating on-the-fly SQL "WHERE" clauses [October 31, 2004 08:52]Coming from a Perl background, I relied heavily on DBI and Apache::DBI as well as my own custom wrapper modules for database access and management. After progressing to C#, I realized that I would again need to devise a set of classes to ease the process of managing a SQL database. This article introduces the Condition class, used predominantly for creating complex WHERE clauses in SQL queries.
3D in XAML [October 31, 2004 08:52]By this point, you should be familiar with using 2D coordinates to place XAML object. Placing an object is very similar but requires an extra value, and rather than using whole numbers, all values can be floating point numbers (uses decimal places).
Flat-MultiColumn Combobox with Autocomplete [October 31, 2004 08:51]Once I had to develop a program using VBA with Access, and I had the great pleasure to use the combobox supplied with it: awesome! Multicolumn, Databound, Autocompleting and really fast. Since VB5 and VB6 I was searching for something similar I could use in my applications, but no luck!
Drawing and Editing Lines with GDI+ [October 31, 2004 08:51]My first article! I hope that this code will help someone... I searched through the web and I found many developers (like me) looking for a way to implement line drawing/editing, that seems to be a thing very hard to implement, due to C# limitations in this topic... GDI+ doesn't seem to come in help very much, and I decided to make a solution by myself, that seems to work pretty fine :D. Here it is.
C# application to create and recognize mouse gestures [October 31, 2004 08:50]About a month ago, I had to create a program to implement neural nets. I decided to create a software to recognize mouse gestures, inspired by this article, and these are the results! I hope you'll find it interesting/useful.
ASP.Net's Data Storage Objects [October 31, 2004 08:50]In this brief tutorial we'll look at 5 different ASP.Net objects we can use to store data. Two of these, the Application and Session objects, should be pretty familiar to anyone coming from ASP. The other three, Context, Cache and ViewState are brand new to ASP.Net.
OpenTheme, An open source graphic user interface (GUI) toolkit [October 31, 2004 08:49]OpenTheme is an XML based GUI toolkit with a set of foundation class and WYSIWYG editor. Although it's originally designed for full screen GUI, it is also good for Windowed user interface, with full localization support and arbitary look-and-feel.
File Encryption/Decryption with Hash Verification in C# [October 31, 2004 08:49]This article is an expansion on a few of the articles here on CodeProject. I noticed that there are a lot of articles and posts dealing with Cryptography in the .NET Framework. These were all well and good. They got me started. Then, as I was progressing and using the System.Security.Cryptography namespace, I noticed that if the file was the right size and padded correctly, even using a bad password would output a file.
Custom Validation Summary in ASP.NET [October 31, 2004 08:48]Validation is an extremely useful feature in ASP.NET. The powerful validation controls provided by Microsoft allow developers to easily validate form data with a minimal amount of code. More specifically, the ValidationSummary control provides an easy method of displaying a summarized list of all validation errors on a page.
Converting Strings to DateTimes for Use in ADO.NET Parameterized Queries using t [October 31, 2004 08:48]Recently, I needed to pass a start date and an end date to SQL server and return the results. The start and end dates would be coming as user input and would be validated on the client side as formatted strings in the format: mm/dd/yyyy. Passing these strings to SQL Server turned out to be a little more of a challenge than I anticipated.
Using strongly typed collections with the ASP.NET DataGrid control [October 31, 2004 08:47]A lots of developers use DataReader or DataSet and bind to a data control directly. Although there isn't anything wrong with that, there are alternatives that can just come in handy.
Network Sniffer and Connection Analyzer [October 31, 2004 08:47]Project is an implementation of a Packet Sniffer that captures packet in a LAN environment using Microsoft .Net environment and written in C#.
XmlSerializer and 'not expected' Inherited Types [October 31, 2004 08:45]This articles describes a problem I came across with XmlSerializer, and the solution I eventually found. The ultimate solution is actually relatively simple but it took me nearly a full Thursday to figure out, so the article is more about how I got to the solution and the dead-ends on the way there.