Thursday, August 4, 2011

Open source performance testing tools

Open source performance testing tools: "y designed for testing Web Applications but has since expanded to other test functions. Apache JMeter may be used to test performance both on static and dynamic resources (files, Servlets, Perl scripts, Java Objects, Data Bases and Queries, FTP Servers and more). It can be used to simulate a heavy load on a server, network or object to test its strength or to analyze overall performance under different load types. You can use it to make a graphical analysis of performance or to test your server/script/object behavior under heavy concurrent load."

Friday, July 22, 2011

Code Book (Learn asp.net from example): Asynchronous GridView in 5 simple steps

http://aspdotnetcodebook.blogspot.com/2008/07/asynchronous-gridview-in-5-simple-steps.html

Tuesday, June 28, 2011

Your next job: Mobile app developer? - Computerworld

Your next job: Mobile app developer? - Computerworld

10 super useful tools for JavaScript developers | CatsWhoCode.com

DOT NET TRICKS: Dynamic Behaviour on Objects at Runtime With Custom ExpandoObject

DOT NET TRICKS: Dynamic Behaviour on Objects at Runtime With Custom ExpandoObject

DLR in C# using Scripting Language - Abhishek Sur

DLR in C# using Scripting Language - Abhishek Sur: "So here is a small demonstration on how you can host IronPython inside your C# application to enable DLR capabilities in the language. There are lots of features in the API which would take lots of time to talk about. So for the time being, try IronPython documentation and google to find out more about the API's available. I hope this post comes helpful to you."

Wednesday, May 25, 2011

AutoSuggest jQuery Plugin | Drewwilson.com

AutoSuggest jQuery Plugin | Drewwilson.com

This is the best/most robust auto suggest plugin for jQuery I've found. Props, Mr. Wilson! Thanks for this!

Tuesday, May 24, 2011

LakTEK – Introducing jQuery Smart AutoComplete…

LakTEK – Introducing jQuery Smart AutoComplete…

IEnumerable of Anonymous types ..

Here's how you create an IEnumerable of an Anonymous type.  This is very useful for talking to JSON

// create anonymous type
var reportExample = new { ReportName = "", ReportID = 0};

// create IEnumerable of anon type
var listExample = (new[] { reportExample }).ToList();

var theList = JsonConvert.DeserializeAnonymousType(hdnSelectedReportIds.Value, listExample);

Monday, May 16, 2011

C# 5 – await and async in ASP.NET « I Came, I Learned, I Blogged

Reading / Writing Excel from SQL Server

sample code from a buddy of mine at work -- this is pretty cool and will definitely come in useful at some point.
 
 
*/
 
-- Required configuration steps:
sp_configure 'show advanced options', 1 -- EQ's ntsql1dev was already 1.
reconfigure
go
sp_configure 'Ad Hoc Distributed Queries', 1  -- EQ's ntsql1dev was 0.
reconfigure
go
-- sp_configure 'show advanced options', 0  -- Skipped this.
-- reconfigure
go
USE [master]
GO
EXEC master.dbo.sp_MSset_oledb_prop N'Microsoft.ACE.OLEDB.12.0', N'AllowInProcess' , 1
GO
EXEC master.dbo.sp_MSset_oledb_prop N'Microsoft.ACE.OLEDB.12.0' , N'DynamicParameters' , 1
GO
 
USE PLT_AI
 

-- Samples from online somewhere
 INSERT INTO OPENROWSET('Microsoft.ACE.OLEDB.12.0', 'Text;Database=F:\scripts\;HDR=Yes;', 'SELECT * FROM Company.xls')
 SELECT company_id, company_name, address_1, address_2, address_3, phone, epa_id, phone_customer_service FROM Company
 -- Fail.  Seems the openrowset args are bad here.
 
 
-- Another sample... test Reading:
SELECT *
FROM OPENROWSET('Microsoft.ACE.OLEDB.12.0','Excel 12.0;HDR=NO;Database=F:\Scripts\Company.xls','SELECT * FROM [Sheet1$]') 
-- Works!!
 
-- Test Writing that way:
INSERT INTO OPENROWSET('Microsoft.ACE.OLEDB.12.0','Excel 12.0;HDR=NO;Database=F:\Scripts\Company.xls','SELECT * FROM [Sheet1$]')
SELECT company_id, company_name, address_1, address_2, address_3, phone, epa_id, phone_customer_service FROM plt_ai..Company
-- No errors!! 
 
-- Re-read it:
SELECT *
FROM OPENROWSET('Microsoft.ACE.OLEDB.12.0','Excel 12.0;HDR=NO;Database=F:\Scripts\Company.xls','SELECT * FROM [Sheet1$]') 
-- WWOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO!!!!!!!!!!!!!

Friday, May 6, 2011

Tuesday, May 3, 2011

Troy Hunt: The 10 commandments of good source control management

http://www.troyhunt.com/2011/05/10-commandments-of-good-source-control.html

Tuesday, April 26, 2011

Renumbering Table Rows

For the life of me, I can never remember the syntax for this!  Ack!

-- hack to get WITH expression to work
set @user_code = @user_code;

/* renumber now that we have the data massaged how we want */
WITH newPH
AS (SELECT
  [rowid]
  ,ROW_NUMBER() OVER(ORDER BY AUDIT_LOG_DATA_ID DESC) AS [newRowID]
FROM   web_sp_AUDIT_LOG_View
WHERE  userkey = @userkey)
--SELECT * FROM newPH
UPDATE newPH
SET    [rowid] = newRowID

declare @total_records int
SELECT @total_records = COUNT(*) FROM web_sp_AUDIT_LOG_View WHERE userkey = @userkey
UPDATE web_sp_AUDIT_LOG_View SET [total_records] = @total_records where userkey = @userkey

Monday, April 25, 2011

DebugView - view Debug output without opening Visual Studio.

"DebugView is an application that lets you monitor debug output on your local system, or any computer on the network that you can reach via TCP/IP. It is capable of displaying both kernel-mode and Win32 debug output, so you don't need a debugger to catch the debug output your applications or device drivers generate, nor do you need to modify your applications or drivers to use non-standard debug output APIs."


http://technet.microsoft.com/en-us/sysinternals/bb896647


Genius!

Tuesday, April 5, 2011

MSDN Magazine: Natural Algorithms - Use Bee Colony Algorithms to Solve Impossible Problems

MSDN Magazine: Natural Algorithms - Use Bee Colony Algorithms to Solve Impossible Problems: "Volt Information Sciences"

team - How do deal with developers that over complicate projects - Stack Overflow

team - How do deal with developers that over complicate projects - Stack Overflow

This thread has some really thought provoking things -- and some good articles referenced. I really want simplicity ...





HTML5 Boilerplate - A rock-solid default template for HTML5 awesome.

HTML5 Boilerplate - A rock-solid default template for HTML5 awesome.

This is awesome indeed!

Conditional stylesheets vs CSS hacks? Answer: Neither! « Paul Irish

Conditional stylesheets vs CSS hacks? Answer: Neither! « Paul Irish

Brilliant! Here is an excerpt from this great article:

"Here's my proposed solution:

          <body> 

Using the same conditional comments, we're just conditionally adding an extra class onto the body tag. This allows us to keep our browser-specific css in the same file:

 div.foo { color: inherit;} .ie6 div.foo { color: #ff8000; }

Plus it totally validates and works in all browsers.

(Hat tip to Paul Hammond and Adam McIntyre for being s-m-r-t.)"

Tuesday, March 29, 2011

Export CSV from Dataset [ VB .Net Tutorial ]

Export CSV from Dataset [ VB .Net Tutorial ]

Bam! This guy has a very elegant solution for converting DataTable to CSV. He even accounts for the case of Text Qualifiers (which has burnt me in the past on CSV converters). This is going in my utility code bank.

Thanks Mr. Pon Saravanan --


Thursday, March 17, 2011

dnpextensions - Release: Release 2011.03

dnpextensions - Release: Release 2011.03

Awesome set of extension methods for .NET!

Format Eval("Date") : The Official Microsoft ASP.NET Forums

Format Eval("Date") : The Official Microsoft ASP.NET Forums

This will make the 1000th time I've had to look this up, ack!



        
                
      

ShowMessage jQuery plug-in

ShowMessage jQuery plug-in

This plug in is totally awesome! Simple, easy to use and looks good ...

Symantec Endpoint Protection virus definition folder consumes a large amount of disk space - Powered by Kayako SupportSuite Help Desk Software

Symantec Endpoint Protection virus definition folder consumes a large amount of disk space - Powered by Kayako SupportSuite Help Desk Software

grr. symantec... i wouldn't use you if it weren't forced on me in every corporate environment.

"Question/Issue:
Virus definitions consume a large amount of disk space.
 
Symptoms:
The virus definition folder that is located in C:\Program Files\Common Files\Symantec Shared\VirusDefs fills with temporary folders. The temporary folders are called tmpXXXX.tmp, where XXXX are hexadecimal characters. The temporary folders take up large amounts of disk space.
Cause:
Virus definitions may be corrupted.
 Solution:
 WARNING: Do not clear the VirusDefs folder if LiveUpdate Administrator (LUA) 2.1 is installed. This will cause LUA to report that engine updates are corrupt until the next set of engine updates is released.

To solve this issue, follow these steps:

Stop the Symantec Management Client service by following these directions:
Go to Start > Run
Type smc –stop
Click OK.

Stop the Symantec Endpoint Protection service in services by following these directions:
Go to Start > Run
Type services.msc
Right-click on Symantec Endpoint Protection service and select Stop.


Navigate to :\Program Files\Common Files\Symantec Shared\Virusdefs
Delete any numbered folders
Delete all files and folders with a ".tmp" extension


Install a new set of definitions manually using the Intelligent Updater (as explained in How to update definitions for Symantec Endpoint Protection 11.0 using the Intelligent Updater)
Restart the Symantec Endpoint Protection Service in services
Restart the Symantec Management Client service
Go to Start > Run
Type smc –start
Click OK


Technical Information:
A utility has been created to accomplish the above described procedure automatically. The SymDelTmps utility will search and delete
temporary files and zero byte.dax files that are the result of a corrupt database or definition set. To obtain the utility, contact Symantec Technical support at:
http://www.symantec.com/business/support/index.jsp "

Monday, March 14, 2011

Visual Studio Styles at StudioStyl.es

Sweet! I have been looking for a place that does VS styles!

http://studiostyl.es/

Friday, March 11, 2011

ReportViewer rendering maxes out thread CPU usage

Great solution to a problem that has been bugging me for a while... thanks
http://www.google.me/support/forum/p/Chrome/thread?tid=331a0a766d6da660&hl=en

"ReportViewer rendering maxes out thread CPU usage
[from: iainrobins] While testing our new site deployment we discovered that any page that renders a server-side SQL server report via a reportviewer ASP control, will cause the rendering thread to occupy the entire core it uses. (i.e. if you have 4 cores, it will show up as 25% CPU usage, 2 cores 50%, etc) Not exactly an ideal user experience, and I'm hoping that we won't have to tell our users not to use Chrome to view the site.


This is not a problem in any other browser we have tested (Safari, IE, Mozilla, Opera) so I doubt it's a problem with the report itself. Can anyone confirm the existence of this problem? I didn't see it in the known issues. If an example is required, we will be launching a private beta of our service in about a week and can provide a URL to a Google employee to test against.

Google Chrome version (type in about:version into the address bar): 3.0.195.27 (Official Build 28507)
Operating System: Windows XP/Vista"

Solution (from jaredhite1)

"I ended up just creating a control inheriting from ReportViewer and replacing the faulty javascript with a hack guaranteed to stop the loop. I did brief checks in IE, Chrome, Firefox, and Safari (all on Windows 7) and verified it didn't stop the normal behavior of my report, and also verified that it wasn't taking up 100% of one of my cores.


If I wanted to spend more time I'd do something more fancy, probably set a variable to make sure the location.Replace() only happens once.

using System;
using System.Web.UI;
using System.IO;

namespace MyCompany.Common
{
public class CustomReportViewer : Microsoft.Reporting.WebForms.ReportViewer
{
protected override void Render(HtmlTextWriter writer)
{
using (StringWriter sw = new StringWriter())
{
HtmlTextWriter tmpWriter = new HtmlTextWriter(sw);
base.Render(tmpWriter);
string val = sw.ToString();
val = val.Replace(@"!= 'javascript:\'\''", @"!= 'javascript:\'\'' && false");
writer.Write(val);
}
}
}
}"

Thursday, March 10, 2011

Display Your Data Your Way with Custom Renderers for Reporting Services

Display Your Data Your Way with Custom Renderers for Reporting Services

"SQL Server™ 2005 Reporting Services from Microsoft is a great tool that offers a centralized approach to storing and rendering reports. It also allows users to view and download reports without installing additional software. But what's most convenient for users is that reports can be saved in any number of different formats using custom report renderers. In this article, I will demonstrate how to develop one such report renderer that outputs HTML reports, but the skills you'll learn can easily be used to create a renderer for Microsoft® Word documents or any other format of your choosing.

SQL Server 2005 includes many new features and enhancements. These include support for stored procedures written in managed code, user defined functions, and managed user-defined data type (UDT) support, which provides flexibility and reduces the need for data type conversion when reading and saving data to and from the database. As you will see, these particular features will come in handy when you build your custom report renderer"

Great article - even if it is a little old...

Wednesday, March 2, 2011

Wicked Code: Asynchronous Pages in ASP.NET 2.0

Wicked Code: Asynchronous Pages in ASP.NET 2.0

Microsoft .NET & C#: Lightweight Service Bus frameworks

Microsoft .NET & C#: Lightweight Service Bus frameworks

Messaging/Queuing is a growing interest of mine. This guy breaks down the common patterns and frameworks well.

Manipulating Uploaded Files

Manipulating Uploaded Files
"If you need to perform additional actions on uploaded files before saving them (for example, if you are using custom fields), or if you want to manipulate them in memory without saving them, you can use the RadUpload server-side API. You can use the server-side API to rename uploaded files or save them into a database, or other storage medium."

Phew!

Tuesday, March 1, 2011

getting dynamic results from a dynamic query in sql server

file this under "hack-tacular" or "kludge-errific" -- if you need to get a dynamic result of a dynamic sql statement, you can use this method.  the reasons behind why we're using dynamic sql and getting dynamic values are not important right now :)

                create table #tmp_hack_for_getting_value (val varchar(100))

SET @value_sql = '
truncate table #tmp_hack_for_getting_value
declare @v varchar(100)
SELECT @v = (' + ISNULL(@record_count_sql,'0') + ')
INSERT INTO #tmp_hack_for_getting_value (val) values (@v)
'


exec(@value_sql)
SELECT @value = val FROM #tmp_hack_for_getting_value

Monday, February 21, 2011

Schauderhaft » Don’t rewrite Your Application

Schauderhaft » Don’t rewrite Your Application

"When stuck with a legacy code base you’ll hear the claim “We’ll have to rewrite this from scratch in order to fix it!” It sounds promising. You start with a clean slate. You can do all the good stuff without all the mistakes. The only problem: It doesn’t work. Here is why.
  1. What every you might think of the code base and the developers that created it: They weren’t stupid nor evil. So chances are the results of your work will look just as ugly in two years from now.
  2. You don’t know the requirements: Part of the reason legacy code bases are ugly is that requirements change. There is no reason for you to assume this won’t stop.So chances are the results of your work will look just as ugly in two years from now.
  3. You don’t have the time: As long as the rewrite isn’t done, you’ll need to maintain and probably evolve the current application. If it is of any importance, you can’t ignore it for the months to come. If you can you should do so without wasting your time with a rewrite.
"
oy! this smart fellow hit the ole' nail the head! right as rain he is -

Monday, February 14, 2011

Morten Lyhr: How to clear SQL Server query cache

Morten Lyhr: How to clear SQL Server query cache

DBCC DROPCLEANBUFFERS DBCC FREEPROCCACHE

Onur Gumus's Blog: Wikipedia guy deletes programming articles.

Onur Gumus's Blog: Wikipedia guy deletes programming articles.

repost:
-------------------------

Wikipedia guy deletes programming articles.

Recently one of my friends notified me that the article for the programming language Nemerle has been deleted from Wikipedia. And I am very upset about it . This language is still very active and widely used in russian communities and I myself is one of the developers. I also have production projects with it. Here you can read the discussion
http://en.wikipedia.org/wiki/Wikipedia:Articles_for_deletion/Nemerle
It seems this Monsanto guy http://monsan.to/ is one of the power abusers, and despite all the discussion he has deleted it with no solid reason. Shame on him, shame on wikipedia for this action.

I always thought wikipedia is one of the most neutral (at least trying to be ) places to gather info but this sensorship , this irresponsiblity or what ever you call is totally unacceptable. You can tell me it is a non notable language so has no right to exist in wikipedia. We could debate about it. But the lanaguage has 8 years of constant effort of developers, how would you feel if your baby is treated like this ?
Here you can see all the checkin history of nemerle:
http://code.google.com/p/nemerle/source/list
and this Monsanto guy just deletes it shame on him!
wtf!? this is absolutely absurd! hopefully this gets overturned...

Thursday, February 10, 2011

stexbar - Project Hosting on Google Code

stexbar - Project Hosting on Google Code

Right up there with DittoPad and FileBox Extender ... this app is awesome!

Thursday, February 3, 2011

Download details: ILMerge

Download details: ILMerge: "ILMerge is a utility for merging multiple .NET assemblies into a single .NET assembly. It works on executables and DLLs alike and comes with several options for controlling the processing and format of the output. See the accompanying documentation for details."

Friday, January 28, 2011

Tuesday, January 25, 2011

StarInix Corporation

StarInix Corporation - SQL DB Compare

I was skeptical at first - this utility made me a believer. It is simple and effective for basic comparison purposes...