AutoSuggest Lookup Control... getting closer#

I have been waiting to see a nice autolookup control that has more features that the current ASP.NET AJAX control offers. 

This control is pretty close.  I would rather not use the Anthem.net library if possible, but this control looks good.

Categories:  | 
Monday, March 19, 2007 12:20:03 PM (Central Standard Time, UTC-06:00) #    Comments [0]  | 

 

Upgrading to ASP.NET AJAX, xhtmlConformance, and JavaScript Errors#

I recently migrated one of the web applications I work on frequently to make use of the newly released ASP.NET AJAX toolkit.

In order to make this work, a bunch of changes were needed in the web.config.  So many in fact that I decided to merge my web.config file into theirs, rather than vice versa.

After all was done and working, we started getting a few javascript errors in stuff unrelated to any ajax controls.

After some investigation I relized that the naming convention for controls had changed.

Controls that used to be named ASDF:ZXCV were now named ASDF_ZXCV.

So in some instances we had javascript looking for elements where the element name was hard coded as "ASDF:ZXCV".  Of course the correct way to get the element name is to use the ClientId property of the control, but that was not used 100% of the time on our site. 

The problem is that when I upgraded the application from .Net 1.1 to a .Net 2.0 web application project, the upgrade tool included an item in the web.config file that was intended to ease the transition.

<xhtmlConformance mode="Legacy"/>

In ASP.NET 2.0, by default all rendered content is well formed XHTML.  This was different from ASP.NET 1.1.  By setting the xhtmlConformance mode to Legacy, it would not force the output to be XHTML compliant.

Another effect that this has, is the naming of controls.  When Legacy is turned on, control hierarchies are separated by a colon ":".  In standard mode, they are separated by a dollar sign "$" in the name property, and an underscore "_" in the ID property.

This can be seen if you use reflector on the control class, you can see this:

internal char IdSeparatorFromConfig
{
    get
    {
        if (!this.EnableLegacyRendering)
        {
            return '$';
        }
        return ':';
    }
}

In 99% of the places where we reference asp.net generated code, we relied on the ClientId property, so we had no problems.  But in that 1% of places where we took the shortcut of hard coding in the element, we got JS errors.

 

Categories:  |  | 
Monday, March 19, 2007 9:02:21 AM (Central Standard Time, UTC-06:00) #    Comments [0]  | 

 

String-Net Liquid#

Some researchers belive they have found a new type of matter, called String-Net Liquid.

The suggestion is that electrons are not elementary particles, but rather are the end points of strings of other particles, similar to quantium entanglement.

The mesh of strings behaves according to Maxwell's equations, which deal with the propagation of light. 

They think that the vacuum of space might be filled with these strings.

Very interesting.

Categories:
Thursday, March 15, 2007 12:59:57 PM (Central Standard Time, UTC-06:00) #    Comments [0]  | 

 

Use Google To Find Open Directories#

This is a really neat example of how to use the advanced search abilities of Google to narrow down your search to specific files.

From the article:

The following is a Google search string for searching open web directories containing downloadable Nirvana music files.  Substitute the term Nirvana in the search string for any other band of your liking.  You can always bookmark the search result for future use.

-inurl:(htm|html|php) intitle:”index of” +”last modified” +”parent directory” +description +size +(wma|mp3) “Nirvana”

With some very slight modifications the same search string can easily be used to search for ebooks in DOC and PDF format:

-inurl:(htm|html|php) intitle:”index of” +”last modified” +”parent directory” +description +size +(pdf|doc) “george orwell 1984″

Or perhaps your looking for some specific video file:

-inurl:(htm|html|php) intitle:”index of” +”last modified” +”parent directory” +description +size +(mpg|wmv) “towelie”

 

Categories:  | 
Thursday, March 15, 2007 12:47:14 PM (Central Standard Time, UTC-06:00) #    Comments [0]  | 

 

Access to performance data was denied ...#

I have been getting this error in the event log of one of my clients servers:

Access to performance data was denied to UserName as attempted from C:\WINNT\System32\WinMgmt.exe

I first tried this:

Open the "Computer Management" app
Expand the "Services and Applications" section
Right-click the "WMI Control" entry & select "Properties"
Go to the "Security" tab
Expand the "Root" node and then select the "WMI" node
Click the "Security" button
Add the account & give it access

That didn't work, so I found another suggestion:

1. Run regedt32
2. Select the key SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib
3. From the menu select 'Security/Permissions'
4. Add the Internet Guest Account granting only 'read' permission

In case that doesn't work, here are some more articles on the subject

http://support.microsoft.com/kb/226494

http://www.eventid.net/display.asp?eventid=1000&eventno=1700&source=Perflib&phase=1

 

Categories:  |  |  | 
Thursday, March 15, 2007 9:11:33 AM (Central Standard Time, UTC-06:00) #    Comments [0]  | 

 

Moving changes from one table to another#

You just screwed up the database, and now you need to make some surgical repairs to the database.

Or maybe you have data in development and production tables and you want to move some data changes from one to the other.

Basically the problem is that you have 2 tables with the same schema where 1 column has some different values in one table when compared with the other.

You can't do an update on an inner join statement, but you can create an updatable view containing the fields you need and then run an update statement on it.

A view is updatable if it meets the following conditions:

A view is updatable if:

  • select_statement has no aggregate functions in the select list and does not contain the TOP, GROUP BY, UNION, or DISTINCT clauses. Aggregate functions can be used in a in a subquery in the FROM clause as long as the values returned by the functions are not modified. For more information, see Aggregate Functions.
  • select_statement has no derived columns in the select list. Derived columns are result set columns formed by anything other than a simple column expression, such as using functions or addition or subtraction operators.
  • The FROM clause in the select_statement references at least one table. select_statement must have more than nontabular expressions, which are expressions that are not derived from a table. For example, this view is not updatable:
CREATE VIEW NoTable AS 
 SELECT GETDATE() AS CurrentDate, 
 @@LANGUAGE AS CurrentLanguage, 
 CURRENT_USER AS CurrentUser 

Categories:  | 
Tuesday, March 13, 2007 9:40:02 AM (Central Standard Time, UTC-06:00) #    Comments [0]  | 

 

Whole Genome Shotgun Sequencing#

This is the paper I wrote for my Bioinformatics course at the University Of Chicago, discussing some of the methods available to sequencing DNA of complex organisms, and how Myers was able to use the whole genome shotgun method to sequence the human genome.

TermPaper.pdf (793.88 KB)

 
Categories:
Thursday, March 08, 2007 8:13:45 AM (Central Standard Time, UTC-06:00) #    Comments [0]  | 

 

DST Comes Early This Year#

DST will come a few weeks earlier this year, and this could screw up some computers.

Microsoft has put together a site to explain what you need to do to make sure your computer is up to date:

http://support.microsoft.com/gp/cp_dst

Categories:
Monday, March 05, 2007 3:13:55 PM (Central Standard Time, UTC-06:00) #    Comments [0]  | 

 

Getting Just the Date Out Of GETDATE#

SQL Servers' GETDATE() function will return the current DateTime.  But what if you just want the current date.

CAST(FLOOR(CAST(GETDATE() AS float)) AS datetime)

or

CAST(CONVERT(VARCHAR(10), GETDATE(), 111) AS DATETIME)

See this page for even more options.

Or, if you want to get just the current time out of GETDATE or any datetime for that matter, check out this page (it is one of the FAQs).

 

Categories:  |  | 
Sunday, March 04, 2007 10:36:17 PM (Central Standard Time, UTC-06:00) #    Comments [0]  | 

 

The Sun Analemma During a Full Year#

This picture is really cool!

This individual took a picture of the Sun at the same time of day and this is the resulting overlap:

Very neat!

Categories:
Sunday, March 04, 2007 8:35:59 PM (Central Standard Time, UTC-06:00) #    Comments [0]  | 

 

Whole Genome Shotgun Sequencing.#

I am writing a paper for where I am supposed to defend the claim that Whole Genome Shotgun Sequencing was successful at mapping the human genome.

In the research I have done, I have come across a bunch of papers from the late 90s from people on both sides (e.g. Venter/Myers PRO, Green
AGAINST).

It seem then after the release of the human genome, there again a number of papers looking at the results, kind of doing a post mortem on the whole debate.

However, these articles seem to indicate that WGS would NOT have worked in the human genome, where such a large portion of the genome is a duplicate, if not for the IHGP teams work.  Some papers seemed to suggest that this hybrid method would be the standard way to sequence genes.

I have not found much on the subject from recent months.  Almost all
my references are from 2002 or earlier.

I tried posting to some newsgroups for some opinions and got back nada.

I must not be looking in the right spots, but it sure is frustrating.

UPDATE: After more research, it appears that the reason I was finding so many articles complaining about the WGS method was due to the massive egos that were seeing their Nobel prize dreams going up in smoke.  Venter and Myers successfully used WGS on the mouse genome, and then later applied it again to human, without any data from GenBank, validating the results, and the technique.

Categories:
Saturday, March 03, 2007 8:53:26 PM (Central Standard Time, UTC-06:00) #    Comments [0]  | 

 

Effectiveness of CAPTCHA#

CAPTCHA screens help keep bots from flooding sites like this one with spam.

I use a very basic CAPTCHA on the comments section.

Here are 2 articles talking about the effectivness of CAPTCHA, and ways that people can beat it.

http://haacked.com/archive/2005/01.aspx

http://www.codinghorror.com/blog/archives/000712.html

Categories:  | 
Thursday, March 01, 2007 10:29:44 AM (Central Standard Time, UTC-06:00) #    Comments [0]  | 

 

Functions To Get DNA and RNA Complementary Codes#

For my most recent project at U of C, I had to write some script to find places where DNA and RNA might bind.

DNA (and RNA) will bind when 2 strands have a complementary sequence.  A binds with T, T bind with A, G binds with C and C binds with G. 

Basically the same thing happens with RNA.

Here are 2 functions that will quickly find the complementary sequence for DNA and RNA:

Public Function FlipRnaCode(ByVal sEnd As String) As String
    sEnd = Replace(sEnd, "U", "a", 1, -1, CompareMethod.Binary)
    sEnd = Replace(sEnd, "A", "u", 1, -1, CompareMethod.Binary)
    sEnd = Replace(sEnd, "G", "c", 1, -1, CompareMethod.Binary)
    sEnd = Replace(sEnd, "C", "g", 1, -1, CompareMethod.Binary)
    sEnd = UCase(sEnd)
    Return sEnd
End Function

Public Function FlipDnaCode(ByVal sEnd As String) As String
    sEnd = Replace(sEnd, "T", "a", 1, -1, CompareMethod.Binary)
    sEnd = Replace(sEnd, "A", "t", 1, -1, CompareMethod.Binary)
    sEnd = Replace(sEnd, "G", "c", 1, -1, CompareMethod.Binary)
    sEnd = Replace(sEnd, "C", "g", 1, -1, CompareMethod.Binary)
    sEnd = UCase(sEnd)
    Return sEnd
End Function

 

 

Categories:
Wednesday, February 28, 2007 12:04:20 AM (Central Standard Time, UTC-06:00) #    Comments [0]  | 

 

Left Off Crains List#

I wasn't included in Crain's list of Chicago based web development consultant firms.

Seeing as how I am basically a 1 man firm, I don't really expect to be on these types of lists, but there are a few on there that I measure up well, and others where I am clearly more profitable.

Maybe they will include me next time :).  But if not, who cares?

Categories:  | 
Tuesday, February 27, 2007 5:01:09 PM (Central Standard Time, UTC-06:00) #    Comments [0]  | 

 

Ticket Presales#

I was online trying to buy some baseball tickets the other day and I started poking around looking for some sites that offer presale info.

Here are some of the sites I found:

http://www.presalenow.com/how.asp

http://www.snaggem.com/

http://www.presalecodes.com/

http://presalepassword.net/

http://eventexperts.presalepassword.net/

http://presale-codes-passwords.blogspot.com/index.html

 

Categories:
Tuesday, February 27, 2007 4:14:08 PM (Central Standard Time, UTC-06:00) #    Comments [0]  | 

 

AJAX and DHTML tools#

This site has some pretty cool links to sites that offer AJAX and DHTML snips and classes.

http://www.miniajax.com/

For example, and pretty cool little Poll thing I might convert from PHP to asp.net/XML:

http://www.dhtmlgoodies.com/index.html?whichScript=ajax-poller

Categories:  |  | 
Tuesday, February 27, 2007 2:08:29 PM (Central Standard Time, UTC-06:00) #    Comments [0]  | 

 

Multi Column Layouts#

Doing Multi-Column layouts can be a real pain some times.

Here are 2 articles that discuss some methods you can employ.

http://www.alistapart.com/articles/multicolumnlayouts

http://blogs.pathf.com/uxd/2006/07/multi_column_la_1.html

 

Categories:
Sunday, February 25, 2007 10:27:44 PM (Central Standard Time, UTC-06:00) #    Comments [0]  | 

 

Submit your link to 60 social networking sites.#

Here is the article that talks about how to do it.

They suggest you use these 3 submissions pages:

http://www.onlywire.com/

http://www.scratchlist.com/

http://www.mohamadlatiff.com/social-power/bookmarks.php

 

Categories:
Sunday, February 25, 2007 1:17:25 PM (Central Standard Time, UTC-06:00) #    Comments [0]  | 

 

How to get the TOP X rows from a DataTable or DataView#

Here is a function I found that can trim down a datatable/dataview to a limited number of rows.  Basically, it's like doing a "TOP X".

''' <summary>
''' Will return a dataview with only the top "number" of rows.
''' </summary>
''' <param name="myDataView">dataview to "trim"</param>
''' <param name="number">the number of rows to return</param>
''' <returns></returns>
''' <remarks></remarks>
Public Shared Function GetTopDataViewRows(ByVal myDataView As DataView, ByVal number As Integer) As DataView
    Dim tableToClone As DataTable = myDataView.Table.Clone
    Dim i As Integer
    For i = 0 To number - 1
        If i >= myDataView.Count Then Exit For
        tableToClone.ImportRow(myDataView(i).Row)
    Next
    Return New DataView(tableToClone, myDataView.RowFilter, myDataView.Sort, myDataView.RowStateFilter)
End Function

I didn't write this, credit goes to this post.

Categories:  | 
Friday, February 23, 2007 3:06:17 PM (Central Standard Time, UTC-06:00) #    Comments [0]  | 

 

Gridview, DateFormatString, and HtmlEncoding#

Here is the original source of this tip.

"for some bizarre reason, you have to set HtmlEncode=false on a bound column in a gridview, to get the DataFormatString to work. "

Categories:  |  |  | 
Tuesday, February 20, 2007 11:59:55 AM (Central Standard Time, UTC-06:00) #    Comments [0]  | 

 

All content © 2009, Christopher May, Inc
Open Job Positions
On this page
Google Ads
This site
Calendar