amuck
amuck
amuck
amuck

Tech

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!

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!

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 »

Something I don’t understand about Microsoft

November 12, 2010
By

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

Today I read this article at the BBC about Microsoft’s new controller system for its XBox360. Basically the Kinect floods the room with Infra-red and allows you to control your character in whatever game that you are currently playing (given that the game is built to use this controller). Now the BBC article mentions that someone has hacked this device to allow it to used on a PC (Linux OS at this point with plans for Windows later). Which seems like an interesting idea, and opens the way for a lot of derivative uses.

Now what I don’t understand is Microsoft’s stance on this new development. They are “unhappy” about this. You would think that they would, rather than be unhappy, be interested in seeing where this goes? Is there a market for this sort of interface in home computers, or even maybe a corporate office? I’m wondering if Microsoft has even given a thought to the possible uses of this device? Think about it this way, we all know about the big touch screen boards where you can swap pictures around re-size them, and then “throw” them to another screen. Now how cool would that be if you didn’t even need to touch the screen, you just did it by waving your hands in the air? Does anyone remember “Minority Report”? This is just one possibility, there have got to be even more. So the question is why should the Kinect be relegated to just playing games, when it could do so much more?

So wake up Microsoft, cool devices for game consoles are nice, but when you can use the same device for even better user/PC interfaces maybe you should think about embracing the idea instead of rejecting it.

Interesting Tutorial on Java RMI

October 29, 2010
By

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

I’ve got a Java project at work that requires me to pass information between a server and a client. I’ve never really done this before but someone had told me about using RMI. SO I went to Google and looked to see what I could find. What I found was a very clean and clearly written tutorial on how to work with RMI using both Remote and Serializable classes. I’m still working through the material, but from what I’ve read so far the material could be understood from even a first year programming student. So I would like to pass the link to the tutorial here http://www.eg.bucknell.edu/~cs379/DistributedSystems/rmi_tut.html and thank Mr. Ken Baclawski for writing such a nice article.

What’s with all the Twitter Bots?

October 29, 2010
By

This post has 82 words. It will take approximately 49 secondes for reading it.

Tech Category

Why are there so many bots on Twitter that wait until someone posts some word or hashtag and then retweets it? When I post some innocuous comment I don’t really expect it to be retweeted because I hashed the word #Fragmentary or something else.  What purpose does it serve to retweet peoples comments automatically? I like to think that the Retweet function is for passing on information that people find interesting, funny, or useful. Not just because they used a hashtag.

Search

Important Pages

Calendar

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