amuck
amuck
amuck
amuck

Blog Archives

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 »

Microsoft Word Numbered List and Outline Headings Issues

December 2, 2010
By

This post has 150 words. It will take approximately 1 minute, 30 secondes for reading it.

Due to company policy I’m required to use Microsoft Office products to produce all documents. Currently I’m using Office 2007, and my biggest annoyance is with Word.

I’m currently working on a Software Requirement Specification document and the biggest problem that I am having is that Word can’t seem to distinguish between Outline heading numbers and list numbering. When I click the numbered list button in the “ribbon” (we won’t really talk about that as I don’t have the time to register all my dislikes about it) in a outline area then suddenly Word starts a new chapter when all I wanted was a little list.

My work around for this annoyance is that first I have to hit the bulleted list button then hit my space bar and then click on the numbered list button. Three clicks where it should have only taken one!

Consolidation of Blogs

December 2, 2010
By

This post has 77 words. It will take approximately 46 secondes for reading it.

So I decided that I would no longer have a bunch of different blogs in different places. I never get around to posting to all of them and some have never been touched. So I’m currently exporting the posts from them and importing them here. So you should see more content appear here as I go along.

There may be some issues of getting the posts aligned with my new category concept so please be patient.

How to use PHP $_SERVER['REQUEST_URI'] Parsing to Make SEO Freindly URLs.

November 22, 2010
By

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

We all have seen dynamic URL (URI being the proper term but I still like URL better) where you have the web address followed by the file name and then the question mark followed by a bunch of variable setting. If not here’s a bit of an example: http://someserver.com/index.php?var1=true&var2=103&var3=sometext

The problem with this type of URL is that search engines don’t really care for them. Why? I’m not sure I’ve heard a lot of reasons and since I neither work for a search engine nor am I an expert on search engines I really don’t care. What I do care about is that most experts agree that search engines like URLs to look like a directory structure and with a file name at the end. Now I’m not sure if I can pull off the file name at the end but I can pull off a dynamic URL that looks like a standard directory structured URL.

Now many of you are saying “Yeah Yeah you use the Mod ReWrite of Apache to pull it off, but what happens if you can’t do that?” Well that’s the point. I know that there are lots of hosts out there that do not permit the use of the .htaccess file or allow you to change their Apache server settings. I can make a URL look like a directory structure without rewriting them. How? Well I’m planning on describing that below.
Read more »

How to build your own practically fully contained Session Handling class in PHP 5

November 20, 2010
By

This post has 48 words. It will take approximately 28 secondes for reading it.

In this article I’m going to explain how to build your own PHP session handler class where your session data will be stored to the database. This article assumes that you already know how to access and start PHP sessions for your web application.
Read more »

Search

Important Pages

Calendar

February 2012
M T W T F S S
« Oct    
 12345
6789101112
13141516171819
20212223242526
272829