July 03, 2007
Updated PHP Install Guide
I'm migrating to a new server, so I took advantage of the process to update my PHP Install Guide. It's now updated for PHP 5.2.3. I modified some things, such as the list of extensions, and another troubleshooting entry, but most of it still applies.
It has attracted enough attention to have a translation. Matej in Slovenia translated it into his native tongue; you can find it in his blog: http://www.butara.si/matej/index.php/?p=33. Thanks Matej!
Thanks, as well, goes out to all those who have written in contributing tips and suggestions.
Posted by Peter at 03:09 AM | Comments (6)
April 30, 2007
Serializing a generic dictionary in .NET 2.0 using the BinaryFormatter
When using the BinaryFormatter to serialize a strongly-typed dictionary that extends System.Collections.Generic.Dictionary<>, I found out that one must add a constructor that accepts SerializationInfo and StreamingContext parameters, then just passes those on to the base class:
using System;
using System.Text;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;namespace MyNamespace.DataTypes {
[Serializable]
public class MyDictionary: Dictionary{
public MyDictionary()
: base() {
}
public MyDictionary(SerializationInfo info, StreamingContext context)
: base(info, context) {
}
}
}
The error I was getting was, "System.Runtime.Serialization.SerializationException: The constructor to deserialize an object of type 'MyNamespace.DataTypes.MyDictionary' was not found."
I got the idea here: http://www.vbforums.com/showthread.php?t=314430, which has the code example in VB.NET.
To serialize Dictionary objects using an XML serializer, you have to implement a custom dictionary as described here: http://weblogs.asp.net/pwelter34/archive/2006/05/03/444961.aspx.
Posted by Peter at 11:35 AM | Comments (2)
February 14, 2007
Updated PHP guide
I have gotten a few e-mails recently about errors when using the test.php page I provide in the testing section.
The errors were of the type:
Warning: session_start() [function.session-start]: Cannot send session
cookie - headers already sent by...
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent...
One of those who reported the errors also provided a solution, which was to place the PHP session code before any of the html code. Perhaps the newer versions of PHP (I only have 5.1.1 installed) are getting more syntactically tighter. I know the newer versions of PHP are requiring full PHP tags now.
Anyway, there is a new version of the test.php code in my PHP install guide
Posted by Peter at 09:23 PM | Comments (6)
September 19, 2006
MS Word - VBA - StoryRanges - Odd-page headers
Daily trivia:
Document.StoryRanges does not explicitly return odd-page headers/footers. Instead, they're linked from the even-page ones. One has to use Range.NextStoryRange on the even-page headers/footers to get the odd-page ones.
Continue reading "MS Word - VBA - StoryRanges - Odd-page headers"
Posted by Peter at 02:08 PM | Comments (0)
September 18, 2006
Oracle Forms goodness - extending the text fields
I've gotten pretty frustrated with the Forms development environment, so I never thought I'd see the word "goodness" combined with "Oracle Forms", but recently I've made a breakthrough of sorts that has really encouraged me to pursue more elegent Forms programming.
Every Oracle Form is composed of Java objects. Text fields, buttons, frames, you name it, they are all some derivitive of Java awt or swing objects. As such, they can be extended.
Sounds simple, even too simple, doesn't it? Well, it really is!
If you're a Forms developer, there's a good chance that you know about embedding Java Beans (also called PJCs - Pluggable Java Components) into your Forms. They're really cool and can be used to accomplish all kinds of things. This takes PJCs one level further.
Continue reading "Oracle Forms goodness - extending the text fields"
Posted by Peter at 10:03 AM | Comments (2)
August 23, 2006
Spam Honey Pot
I just added a spam honey pot (http://projecthoneypot.org) to my website.
This entry is mainly for the purpose of including links to the honeypot page on my home page.
The links should all be invisible, but a spider will follow them...
Posted by Peter at 11:55 AM
June 13, 2006
Genyouine Potluck Casserole
Tonight I made a Genyouine Potluck Casserole (tm) for dinner. I'm rather proud of it. I even had to do some extra shopping (we were out of cheese).
I'm sure most of you know about the Potluck Casserole. Rather nondescript-tasting, mushy and lukewarm, it is invariably covered with cheese and usually contains corn of some description. The more fashion-conscience garnish it with a dash of paprika and perhaps a sprig of parsely. One of the hallmarks of the Potluck Casserole is that it requires a bottle of tabasco and a liberal arm for it to aquire any definite taste.
I made mine out of leftover angel hair (cappellini to those who read food labels), a smallish can of beef chili - with beans - and a large-ish can of cooked tomatoes. Oh, yes, and canned corn. I cut up the pasta and simmered it all together in a pot while I went out to buy the cheese.
Home once more, I mixed in some of the shredded cheese, poured the whole gooey mess into a 9x14, covered it with the rest of the cheese (can't have too much) and broiled it for a few minutes.
Rather abashed that my cupboard rummaging did not produce any paprika, I served it to my family, being sure to include a bottle of Red Hot (Southern Tabasco) on the table.
As I sunk my teeth into the first bite, I was pleased to find that it had all the characterizations of a Genyouine Potluck Casserole. :-)
Now you, too, can astonish your friends at your next office party or church potluck!
Posted by Peter at 08:10 PM | Comments (0)
January 19, 2006
Oracle + Java + SOAP + PHP = headache
Well, I promised some stuff about my most recent project; here's the first installment.
I am just completing writing a Web Service in Java that's deployed on Oracle's Application Server. The actual Java code to implement the basic Web Service was very simple to write. I use Oracle's JDeveloper (probably the nicest all-around Java IDE I've used. Not w/out its drawbacks, but overall the best one I've tried), so I just wrote a class with some public methods, used JDeveloper's deployment tools, and I had a Web Service. That was the easy part.
Continue reading "Oracle + Java + SOAP + PHP = headache"
Posted by Peter at 09:21 PM
Another year, another, uh, dollar?
Well, it's another year.
Doh.
Anyway, I'm mainly writing this entry so that this page isn't blank.
I changed the template; added links to the PHP install guide and the colormatch page on the side. Well, that's cool, but in order to display them, I had to rebuild the page. I accidentally rebuilt the whole site, resulting in my previous posts being relegated to the archives, with the front page left blank.
You can check out the new links over there ------------------------>
Rather than having a blank front page, I figured I'd post some inane dribble to fill space.
Continue reading "Another year, another, uh, dollar?"
Posted by Peter at 08:58 PM
March 19, 2005
PHP install guide
Thanks to help from others, I have a shiny new html-formatted guide for installing PHP under Windows Server 2003/IIS6!!
It's been update, corrected, AND expanded. :-)
Posted by Peter at 06:21 PM
It's a brave new world
Well, this is my first entry in my new website.
I decided to use a blog format because that would allow me to have to worry only about content, and leave the managements to software. Since I don't have much content, I don't need to worry much! :-)
Posted by Peter at 06:04 PM | Comments (0)