posts - 81, comments - 262, trackbacks - 0

May 2008 Blog Posts

MATLAB Uncertainty Analysis

Performing an uncertainty analysis on a measurement can be tedious, taking the root sum square (RSS) of all of partials with their uncertainty. MATLAB's symbolic toolbox can speed things up, particularly when Excel cells are named the same as the symbols used. I wrote a quick MATLAB function to take the partials and perform the RSS. The first input is the symbolic expression to perform the uncertainty analysis upon. The second two parameters are the symbolic variables in the expression and the symbolic variables for the corresponding uncertainties.  function [f_u_total f_u] = uncertAnalysis(f, vars, vars_u) ...

posted @ Tuesday, May 27, 2008 4:17 PM | Feedback (8) | Filed Under [ Technical Computing ]

Easily Injecting HTML into RadEditor

This is a demonstration on how easily client side content can be injected at runtime. One does not have to architect posts or recreate content and repost. The easiest way to do this that I know of is with a firefox plugin called Chickenfoot, With it you can script navigation, user interaction, changes to DOM, etc. On to the demo at hand. For this I have taken an instance of RadEditor, a WYSIWYG html editor and disabled almost everything. So if the client side restrictions were 'strong' the user wouldn't be able to do anything but insert plain text...

posted @ Saturday, May 17, 2008 8:13 PM | Feedback (7) | Filed Under [ Web Programming ]

Authoring Easy XSDs from XML

Visual Studio ships with a powerful tool, xsd.exe, which can easy and quickly generate XSD's and typed datasets from references. I found this to be particularly useful when I need to utilize a typed data set. I can write a sample of the xml I would like to generate, and then create the XSD and class off of that. For example, create cats.xml like so: <cats>     <cat>Cat 1</cat>     <cat>Cat 2</cat> </cats>   Start visual studio command prompt and navigate to the directory. Then issue: xsd cats.xml xsd cats.xsd /c   Two files have now been created, cats.xsd and cats.cs. the XSD can...

posted @ Saturday, May 17, 2008 5:02 PM | Feedback (1) | Filed Under [ Web Programming ]

failed due to the following error: 80040154.

 I ran into the following error message while using a third party component.  Retrieving the COM class factory for component with CLSID {17B9BE57-09EA-11D5-897B-0010B5759DED} failed due to the following error: 80040154.  Initially I tried poking around to find the CLSID with two tools, ListDLLs and Process Explorer. This didn't get anywhere though  Using ListDLLs from sysinternals. Process Explorer  I found an article on PayPal's boards. They decided not to support the issue and answer with "upgrade":  The COM reference was a sufficient hint however, I simply needed to install their correct dll "pfpro.dll" which is in their "dated" SDK. The installation simply required me to copy...

posted @ Saturday, May 17, 2008 2:08 PM | Feedback (6) |

Simple Email Test Form

A simple and contained email test form   <script runat="server" language="c#"> private void Send(object sender, EventArgs e) { System.Web.Mail.MailMessage mail = new System.Web.Mail.MailMessage(); mail.Subject="test"; mail.From=""; mail.Body="test"; mail.To=txtTo.Text; System.Web.Mail.SmtpMail.SmtpServer = txtServer.Text; System.Web.Mail.SmtpMail.Send(mail); } </script> <html> <head> </head> <body> <form id="Form1" runat="server"> Server : <asp:TextBox runat="server" ID="txtServer" /> <br /> To : <asp:TextBox runat="server" ID="txtTo" /> <br /> <asp:Button runat="server" Text="Send" ID="send" OnClick="Send" /></form> </body> </html>

posted @ Saturday, May 10, 2008 4:56 PM | Feedback (0) | Filed Under [ Web Programming ]

Table Row Reordering

This small bit javascript reorders a table's rows in groups.   function moveRow(table, pos1, pos2) {     var multiplicity = 5;         var obj = table.children(0);     if (obj.children.length > ((pos1+1)*multiplicity-1) && obj.children.length > ((pos2+1)*multiplicity-1)         && pos1 >= 0 && pos2 >=0 && pos1 != pos2)     {         for (var i = 0; i < multiplicity; i ++)         {             var node1 = obj.children(pos1*multiplicity + i);             var node2 = obj.children(pos2*multiplicity + i);             node1.swapNode(node2);         }     } }

posted @ Saturday, May 10, 2008 4:52 PM | Feedback (1) | Filed Under [ Web Programming ]

Web Based Shell

A few years back I made a web app which would allow a user to interact with a shell over the web. The trick was to leave a hanging web request to allow the shell output to be redirect to the browser in an open stream. When the browser receives a whole script block it executes it then, so you can push updates to the browser before the response is ended. The input from the user is sent to the server by posts with javascript where the server then sends the input to the shell in the other response while...

posted @ Saturday, May 10, 2008 4:48 PM | Feedback (0) | Filed Under [ Web Programming ]

Web Based CVS Tool

We have migrated from CVS to SVN, but this was a nice tool for managing working copies of CVS repositories over the web. The actual CVS work is done through the CVS executable through process handling, and has two requirements. 1) Execute ability 2) Write permissions. It is also set to use the sserver protocal by default (ideal for transporting versions between varying hosts).  

posted @ Saturday, May 10, 2008 4:39 PM | Feedback (2) | Filed Under [ Web Programming ]

3-Tiered Model

This is an older tiered model I was wodrking on. A bit dated, but included as a personal reference.

posted @ Saturday, May 10, 2008 4:36 PM | Feedback (8) | Filed Under [ Web Programming ]

XML Serialization and Tiered Architecture

     In .NET XML can be used to serialize objects of almost any type. Even better, objects can be serialized (and de-serialized) to XML while using an XSD schema definition.  This is great for interoperability with outside applications, but, add XSD.exe to the picture and you can do something pretty cool with Typed Data Sets.        Visual Studio will create a strongly typed Data Set off of the XSD, this is no secret.  What if however, you don't want to carry the Data Set inheritance across the layers? Is there a way to have a designer or a tool create...

posted @ Saturday, May 10, 2008 4:28 PM | Feedback (3) | Filed Under [ Web Programming ]

SecurityException: Partially trusted callers

Most hosts have sites running at a Medium Trust level as Microsoft recommends. When a referenced dll requires full trust callers, you will be greated by:  Security Exception Description: The application attempted to perform an operation not allowed by the security policy.  To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file. Exception Details: System.Security.SecurityException: That assembly does not allow partially trusted callers.  The particular assembly of interest was from a third party. My initial idea was to simply dissassemble it with reflector and recompile it with the changes...

posted @ Saturday, May 10, 2008 1:54 PM | Feedback (1) | Filed Under [ Web Programming ]

First Post

As a web developer of five years now, a personal blog is well over due. I was always concerned that it would just become yet another blog (YAB). In the end I decided the blog would benefit me regardless of whether it had any following. It would serve as a technical journal for personal reference in the future. Many times I come across a recurring issue and wish I had documentation on what was done. A classic example would be the details of a Linux distribution installation and its customization. A little about me, my name is Charles,...

posted @ Tuesday, May 6, 2008 6:35 PM | Feedback (0) |

Powered by:
Powered By Subtext Powered By ASP.NET