amuck
amuck
amuck
amuck
Latest Story

Tumblr Allowing Javascript in Source Link, Possible Security Issue?

October 11, 2011
By

This post has 32 words. It will take approximately 19 secondes for reading it.

An interesting post that’s currently going around the Tumblr blog which causes posts in the Dashboard to spin. Could this actually be exploited by less than harmless users?
Read more »

Insane Invoke Issues of StatusBar Control in .NET

October 4, 2011
By

This post has 342 words. It will take approximately 3 minutes, 25 secondes for reading it.

I’ve been playing around with an application that changes subcontrols of the StatusBar in .NET (using C#). One of the first things I learned about .NET and Windows Forms is that if you do anything cross-thread you had better use an Invoke method with delegates or you get annoying errors. Now the first control I added to the StatusBar is a ToolStripStatusLabel which basically is a label in the status bar (duh). If I want to change the text of the label then I have to do an invoke, but the invoke is not on the label itself but on the parent (i.e. the status bar) so my code to change the label looks something like this:

        public void changeStatusMethod(String message)
        {
            if (statusbar.InvokeRequired)
            {
                statusbar.Invoke(changeStatusDelegate,new object[] {message});
            }
            else
            {
                lblNumIncoming.Text = message;
            }
        }

Now this works and it works exactly as I expected. So the next thing I wanted to do is work with a ToolStripProgressBar which is (I’m sure you’ve guessed it already) a progress bar that appears in the status bar (wow amazing huh?). Now I wanted to increment and basically control this progress bar from another thread (yep just like every other application that displays a progress bar). So I assumed the code would look like this:

        public void updateProgMethod(int value)
        {
            if (statusbar.InvokeRequired)
            {
                statusbar.Invoke(updateProgDelegate, new Object[] { value });
            }
            else
            {
                if (tsProg.Value + value < tsProg.Maximum)
                {
                    tsProg.Increment(value);
                }
            }
        }

GUESS WHAT?!? This doesn’t work! What happens is that the invoke is called and then nothing happens. The delegate does not call the method again to actually do the work? So naturally I did a bit of research, and no one seems to explain why this doesn’t work. It seems most everyone prefers to do things with a BackgroundWorker. While I’ve since refactored my code to use a BackgroundWorker, it isn’t really what I wanted. Now if anyone can properly explain why the invoke doesn’t work but a BackgroundWorker does work, you will win the World!

Testing Tumblr Crosspost

August 24, 2011
By

This post has 16 words. It will take approximately 9 secondes for reading it.

This is just a test to see if my new plugin actually posts to my Tumblr.

For Those Coming Here Looking for SMFBot

March 24, 2011
By

This post has 283 words. It will take approximately 2 minutes, 49 secondes for reading it.

Hi,

I’m sorry to say that I gave that project up years ago. The source code is still up over at Source Forge. If you are interested in taking up the project let me know and we’ll work something out. However, I don’t see my self doing any work on this project in the future, if ever. Sorry for any disappointment.

Well, I’ve thought things over, and I’ve gotten to a point where I think I will, once again, start working on this project. I basically can’t think of anything else that I really want to work on, and I really hate that I never brought the SMF AI Bot integration to completion (can a software development project ever be truly completed?). This isn’t really an official announcement as yet I’ll need to do that at the Simple Machines support forum which I do intend to do.

However, if you are really truly interested in this project, either as an end-user or a developer what you can do is to visit the SourceForge.net site where I manage this project. You can find it here: https://sourceforge.net/projects/smfaibot/ you can register with SourceForge for free using an OpenId, then go over to the project tracker area for feature requests https://sourceforge.net/tracker/?group_id=194394&atid=949258 and give me some idea of what exactly you expect out of this project, and if it is possible I’ll add it to the “TODO” list, if not I’ll try to explain why.

Honestly though, if I don’t see any requests or discussion, then I’m probably going to drop this again.

– Jason

How To Activate HTTPS on Facebook

March 1, 2011
By

This post has 53 words. It will take approximately 31 secondes for reading it.

As you may know Facebook does NOT give you a secure connection by default. Unlike Google apps where you can just enter it as https://gmail.com and you have a secure link, doing so for Facebook doesn’t work. Facebook will return you back to a normal http link.

Read more »

PHP5 Serialized Cookies, How and Why?

February 18, 2011
By

This post has 58 words. It will take approximately 34 secondes for reading it.

Cookies, a very important part of web application development. Why would someone want to serialize the information stored in a cookie, and how would they do it? That’s what I want to discuss in this article. First let’s take a look at what cookies are and how they are manipulated inside of PHP. Read more »

Search

Important Pages

Calendar

January 2012
M T W T F S S
« Oct    
 1
2345678
9101112131415
16171819202122
23242526272829
3031