Home | Software | WebLog | Contact | Wish List

Joel Thoms' WebLog

Here you will find random thoughts, opinions and rants from Joel Thoms. Feel free to ignore it all...
Mon, 13 Aug 2007
Well, I think I have finally finished my extremely thorough and complete evaluation of FlashFXP and have decided to purchase the product.

Thanks for the great tool FlashFXP!

post reply to this comment Comment by jenna [Jan 05, 2008 @ 11:13 PM]
dude. it's been a while since you've written in here.
what's up with that!?
post reply to this comment Comment by Jesper Michelsen [Apr 14, 2008 @ 4:05 AM]
Hi - just DL'ed your Weblog control. Nice, but old... With latest release almost 4 yrs back, would be nice if you would make it open source and let all of us contribute to development. We're currently looking for a blog control, and your control is something like what we are looking for. Just needs some updates and extras. And of course needs to be converted to .net 2.0 How about it?
post reply to this comment Comment by misal [May 18, 2008 @ 10:08 PM]
yo wats going on man i just want to halla at yah.
post reply to this comment Comment by Nick Stein [Jun 05, 2008 @ 9:09 PM]
Hey Joel,

I have not talked to you since Pac. Life.  I have been working at a startup called CODA Genomics writing production control and gene manipulation code.  It has been pretty fun.  Drop me a line and we can have lunch and get caught up.

Would you be up for a connection on LinkedIn?

I have also started doing some music.  http://www.myspace.com/bizcad
Nick
post reply to this comment Comment by Evie [Aug 11, 2008 @ 2:07 AM]
Joel, I have been told you are the one I go to for help. There is an offensive post in one of the blogs I am asking if there is anyway that it is possable to have this person blocked? They are using the name of:Rhonda Virgina Sue. Thank you.
post reply to this comment Comment by yousra [Aug 13, 2008 @ 5:41 AM]
hi joel this is yousra from morocco i am a fan of your program i really like it and i like you you are so talented i hope for u & for the program a longsucsess
Leave Your Comment
Name:
Email:  (gravatar enabled)
URL:
Comment:
or Cancel

Mon, 26 Mar 2007

There are many code samples that show you how to read from either StandardOutput or StandardError.  I've also run across a few more complicated code examples that spawn new processes to handle the reading of StandardOutput and StandardError.

Reading from StandardOut (or StandardError) is simple, all you need to do is set a property and create a simple loop...

proc.StartInfo.RedirectStandardOutput = true;

while (!proc.StandardOutput.EndOfStream) {
  string line = proc.StandardOutput.ReadLine();
  Console.WriteLine(">{0}", line);
}

Reading both is not much more complex.  You just have to test EndOfStream on both streams.
System.Diagnostics.Process proc = new System.Diagnostics.Process();
proc.EnableRaisingEvents = false;
proc.StartInfo.UseShellExecute = false;
proc.StartInfo.RedirectStandardOutput = true;
proc.StartInfo.CreateNoWindow = true;
proc.StartInfo.RedirectStandardError = true;
proc.StartInfo.FileName = Environment.CurrentDirectory + @"\" + zipCmd;
proc.StartInfo.Arguments = String.Format("-rSv \"{0}\" .", zipFile);
proc.StartInfo.WorkingDirectory = directory;
proc.Start();

while (!proc.StandardOutput.EndOfStream || !proc.StandardError.EndOfStream) {
  string line;

  if (!proc.StandardOutput.EndOfStream
    && (line = proc.StandardOutput.ReadLine()) != null) {
    Console.WriteLine(">>{0}", line);
  }
  if (!proc.StandardError.EndOfStream
    && (line = proc.StandardError.ReadLine()) != null) {
    Console.WriteLine("!!{0}", line);
  }
}
post reply to this comment Comment by Bryan [Apr 01, 2007 @ 10:09 PM]
I have no idea what any of this means... but how you doin'?
post reply to this comment Comment by Gina Hiyama-Ashby [Aug 11, 2007 @ 4:39 AM]
Dude, who you talking to?  I can't relate at all...but you sound very knowledgable.
post reply to this comment Comment by Julian Nicholson [Dec 16, 2008 @ 1:55 AM]
Thanks Joel - I was trying to read both stderror and stdoutput with multiple threads and getting into all sorts of trouble! your code worked first time. Here is a VB Translation.

            Do While (p.StandardOutput.EndOfStream = False Or p.StandardError.EndOfStream = False)
                Dim line As String

                If (p.StandardOutput.EndOfStream = False) Then
                    line = p.StandardOutput.ReadLine()
                    If line IsNot Nothing Then
                        If line <> "" Then
                           Console.WriteLine("{0}", line)
                        End If
                    End If
                End If
                If (p.StandardError.EndOfStream = False) Then
                    line = p.StandardError.ReadLine()
                    If line IsNot Nothing Then
                        If line <> "" Then
                           Console.WriteLine("{0}", line)
                        End If
                    End If
                End If
            Loop
Leave Your Comment
Name:
Email:  (gravatar enabled)
URL:
Comment:
or Cancel

Sat, 10 Feb 2007

Today in my mailbox I received one of those generic "YOU ARE PRE-APPROVED" notices.  I get a TON of these every day.  I'm currently holding in my hand 3 just from CapitalOne (F CapitalOne btw).

Well, I actually read one of these instead of feeding it directly into the shredder and I come across this interesting paragraph...

You can choose to stop receiving "prescreened" offers of credit from this and other companies by calling toll-free (888-567-8688).  See PRESCREEN & OPT-OUT NOTICE included for more information about prescreened offers.

I find the notice...

PRESCREEN & OPT-OUT NOTICE: If you do not want to receive prescreened offers of credit from this or any other companies, call the consumer reporting agencies toll free, 1-888-5OPT-OUT (or 1-888-567-8688); or write to one or more such consumer reporting agencies at: TransUnion Opt Out Request, PO Box 505, Woodlyn, PA 19094-0505; Equifax Options, P.O. Box 740123, Atlanta, GA 30374-0123; Experian Marketing, P.O. Box 919, Allen, TX 75013; or visit the following website at www.optoutprescreen.com.

So after doing a little digging around, I find this website seems to be legit.

Now I wait and see...

post reply to this comment Comment by pranav [Mar 24, 2007 @ 2:16 AM]
This one works great! but theres a problem... When you put these controls in update panel, it works fine in IE, but does not work with firefox.. any ideas why  its not working?
Leave Your Comment
Name:
Email:  (gravatar enabled)
URL:
Comment:
or Cancel

Fri, 20 Oct 2006

Simple default button
Setting a global default button for the page is very simple, all you have to do is add this code to your page... (You can get this working in ASP.net 1.x by changing 'ClientScript' to 'Page')

ClientScript.RegisterHiddenField("__EVENTTARGET", myButton.ClientID);

Though, this method will not work if you want multiple default buttons, as the single button event will always be fired.  Another caveat of this method is your JavaScript code (onclick, validators, etc) will not be fired and the form will post back to the server.

Multiple default buttons
default-bottons.gif It's not too much more difficult to implement multiple default buttons (see figure on the left) using client-side JavaScript.  I accomplish this by capturing the carriage return keypress and simulating a button click. Here's the code...

textBox.Attributes.Add("onKeyPress", "if((event.keyCode||event.which)==13){document.getElementById('" + button.ClientID + "').click();return false;}");

I've tested this code in both IE and Firefox and it seems to behave ok. I don't really care about the other browsers, but if you do, then you'll have to test.

You might also want to read my previous blog on Firefox's auto-complete JavaScript bug.

post reply to this comment Comment by micic [Feb 26, 2007 @ 11:36 PM]
In ASP.NET 1.1, try this: move your desired button's tags above all others buttons (View Designer - HTML Source).
Leave Your Comment
Name:
Email:  (gravatar enabled)
URL:
Comment:
or Cancel

Thu, 19 Oct 2006

fire fox So, after about an hour of trying to debug my JavaScript, I put the code down and decided to ask google.  It turns out, the error message below, could be a bug in Firefox's auto-complete feature.

Error: [Exception... "'Permission denied to get property XULElement.selectedIndex' when calling method: [nsIAutoCompletePopup::selectedIndex]"  nsresult: "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)"  location: "JS frame :: :: onkeydown :: line 0"  data: no]

I wasn't doing anything complex; all I did was add the OnKeyPress handler to a text box.

I believe the error is harmless, my code seemed to execute just fine even with the error.  But if you find it annoying like I do, you can disable auto-complete by adding autocomplete="off" into your input field.

After doing a little investigating, it appears the error will occur when you change focus in the OnKeyPress or OnKeyDown events.  I'm not sure of what other events are affected.

Leave Your Comment
Name:
Email:  (gravatar enabled)
URL:
Comment:
or Cancel

Sat, 23 Sep 2006

All System.Windows.Forms controls have a BorderStyle property. The choices of which are limited to: None, FixedSingle and Fixed3D.

Creating a "dashed-line border" requires some customization you'll have to add yourself.

I've created the following graphics that will create two different dashed border effects.
border-a.gif (easiest to get working)
border-b.gif (must be modified if height or width is divisible by 4)

Note: border-a.gif works with any height and width. border-b.gif is a little trickier to get working (but I think it looks nicer). The height and width of the container cannot be divisible by 4 or you will get an invisible border on that side. If you cannot adjust the height or width of the container, then you must modify the image.

Setting up the new BorderStyle is easist for the PictureBox control. After setting the Image for the PictureBox, set margins = "1, 1, 1, 1" and set the BackgroundImage to be one of the border gif's.

Other containers like Panels are easy to setup as well. First, set the BackgroundImage of the Panel to be your background graphic of choice. Next, you will need to embed a 2nd Panel overlaying the Panel with the BackgroundImage. This Panel should be at position 1,1 (inside the first Panel) and have a width of Panel1.Width - 2 and a height of Panel2.Height - 2.

That's all you really have to do to create the dashed-line BorderStyle effect for WinForms.

post reply to this comment Comment by joel [Oct 15, 2006 @ 9:54 PM]
hey! my name is Joel too
Leave Your Comment
Name:
Email:  (gravatar enabled)
URL:
Comment:
or Cancel
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 next >> 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 next >>

WebLogs powered by Joel.Net.WebLogs