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: University of Chicago
Wednesday, February 28, 2007 12:04:20 AM (Central Standard Time, UTC-06:00) #    Comments [1]  | 

 

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: Consulting | Misc
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: Misc
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: HTML | Javascript | AJAX
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: HTML
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: Blogging
Sunday, February 25, 2007 1:17:25 PM (Central Standard Time, UTC-06:00) #    Comments [2]  | 

 

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: .Net | .Net Framework
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: Programming | .Net | .Net Framework | ASP.Net
Tuesday, February 20, 2007 11:59:55 AM (Central Standard Time, UTC-06:00) #    Comments [0]  | 

 

Cisco APs - Remember to enable the radio [Duh]#

I was recently at a client reconfiguring some of their access points (Cisco 1100).  I was having trouble connecting to one of the new devices.

After some clicking around, I noticed that, by default, the wireless radio is disabled.

This is not totally apparent as you are setting up the network (it is in a different section of the web config utility).

So yea... it helps to enable the radio. :)

Categories: Networking | Wireless
Monday, February 19, 2007 1:07:38 PM (Central Standard Time, UTC-06:00) #    Comments [0]  | 

 

Visualthesaurus.com#

This site has a pretty cool application.

http://www.visualthesaurus.com/

You type in a word, and it will show you simliar words, along with definitions and pronounciations.  You view them in an unrooted tree format, showing their relationships.  You can then navigate this tree by clicking on a word, which expands the nodes around that word.

Pretty cool.

Categories: Cool
Friday, February 16, 2007 3:05:03 PM (Central Standard Time, UTC-06:00) #    Comments [0]  | 

 

Number 1!#
Categories: Cool
Thursday, February 15, 2007 3:16:13 PM (Central Standard Time, UTC-06:00) #    Comments [0]  | 

 

Outlook blocked access to the following potentially unsafe attachments#

Here is an article that shows how you can enable outlook to let you get some of those "unsafe" attachments, like a .vb file.

Categories: Misc
Monday, February 12, 2007 10:24:14 PM (Central Standard Time, UTC-06:00) #    Comments [3]  | 

 

Avoiding @@IDENTITY#

When you are trying to get the last Identity value in SQL Server, the old way was to use the @@IDENTITY variable.

This, however, can easily give you the wrong answer back.  For example, if you have a trigger inserting a history record that also contains an identity column.

Here is an article that discusses why you should probably stick to SCOPE_IDENTITY().

Categories: Database | SQL Server | T-Sql
Sunday, February 11, 2007 11:04:08 PM (Central Standard Time, UTC-06:00) #    Comments [0]  | 

 

Create a giant poster #

This is pretty cool.

It shows how you can use some software to create a giant picture made up of many pieces of paper.

Categories: Cool
Tuesday, February 06, 2007 10:25:43 AM (Central Standard Time, UTC-06:00) #    Comments [0]  | 

 

Problems with SQL RS on Windows 2000#

I was having problems with getting RS to work correctly on a windows 2000 server.  I would browse to the page, and it would prompt me for my credentials.  I would use the Admin loign, and it wouldn't take, finally giving me an error like this:

Server Error in '/Reports' Application.
--------------------------------------------------------------------------------

Access to the path "C:\Program Files\Microsoft SQL Server\MSSQL\Reporting Services\ReportManager\bin" is denied.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.UnauthorizedAccessException: Access to the path "C:\Program Files\Microsoft SQL Server\MSSQL\Reporting Services\ReportManager\bin" is denied.

ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6) that is used if the application is not impersonating. If the application is impersonating via <identity impersonate="true"/>, the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user.

I found someone who figured out the impersonation problem:

The problem happens when installing RS on Windows 2000 Server that is a domain controller.  RS doesn't do the setup correctly.  The basic steps to fix the problem are

1. Grant impersonate privilege to IWAM_<machine> account (see knowledge base article 824308).  Go to domain controller security policy  in administrative tools. Click security settings -> Click local policies -> click user right assignment.  In the right pane, double click impersonate a client after authentication.  In security policy setting window, click define these policy settings.  Click add -> click browse.  In select users or groups window, select IWAM account name and click add.  Then, click Ok -> Click OK -> Click OK.  At command prompt, type the following command: secedit /refreshpolicy machine_policy /enforce.  Then, type iisreset.

2.  Remove IWAM_<machine> account from guest group.  Go to active directory users and computers in administrative tools.  Open users folder.  In right pane, double click IWAM_<machine>.  Select member of tab.  Remove guest.  Click OK.

3.  Reboot.

4.  Run rsactivate.  From command prompt, change directory to C:\Program Files\Microsoft SQL Server\80\Tools\Binn.  The run following command: RSActivate.exe -c "c:\Program Files\Microsoft SQL Server\MSSQL\Reporting Services\ReportServer\RSReportServer.config" -t.

See the following link for more details http://msdn.microsoft.com/library/default.asp?url=/library/en-us/RSINSTALL/htm/gs_installingrs_v1_8k82.asp .

For now, this seems to have fixed this problem.

Categories: Programming | SQL Server | Reporting
Tuesday, February 06, 2007 9:27:48 AM (Central Standard Time, UTC-06:00) #    Comments [0]  | 

 

VB Keyboard Shortcut Poster#

Shows all the vs.net ide shortcuts for vb.net.

Categories: Programming | .Net | VB.Net
Sunday, February 04, 2007 11:15:33 PM (Central Standard Time, UTC-06:00) #    Comments [0]  | 

 

Understanding Object Pooling#

Here is an article discussing object pooling.  How to use them, and some code examples.

Categories: Programming | .Net
Sunday, February 04, 2007 11:13:31 PM (Central Standard Time, UTC-06:00) #    Comments [0]  | 

 

Software Is Hard#

This article discusses the turmoil of a multi-year software project, and attempts to answer the question: Why is writing software hard?

http://www.salon.com/books/int/2007/02/03/leonard/

Categories: Interesting | Programming | Software
Sunday, February 04, 2007 11:12:21 PM (Central Standard Time, UTC-06:00) #    Comments [0]  | 

 

All content © 2010, Christopher May, Inc
Open Job Positions
On this page
Google Ads
This site
Calendar
<March 2010>
SunMonTueWedThuFriSat
28123456
78910111213
14151617181920
21222324252627
28293031123
45678910
Archives
Sitemap
Blogroll OPML
Disclaimer

Powered by: newtelligence dasBlog 2.3.9074.18820

The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

Send mail to the author(s) E-mail

Theme design by Jelle Druyts


Pick a theme: