Thursday, January 22, 2009

Blackberry Storm Upgrade

I recently upgraded from a blackberry 8703e to the new storm, I did this around December 10, 2008. First, transferring contacts and calendar was awesome, easy, fantastic. I use google synch to synch my contacts and calendar with my google apps calendar and contacts, so All I did was install google synch on the new STORM, entered my credentials and it did take a try or two (there was alot to synch) all my stuff was there.

I was severely disappointed with the battery life of the storm. But after a few days, the battery life was fine. I attribute that to overusage cause it was new and maybe battery conditioning. At first it was only lasting about 12 hours, and since I unplug it between 5 and 5:30 AM, that means it was shutting off on my way home from work around 5 or 6 pm. It now consistently lasts until midnight which is when I usually plug it in. Sometimes I plug it in for the night earlier and once in a while later, but there is still juice left when I do.

I think it uses alot more juice when you actually use it, but when it is just in your pocket or the holster, it sleeps pretty good, if you are in a digital area.

I like this phone, I don't love it. It is slow and I often have to wait for it. My brother-in-law got one and traded it in for the curve, and to tell you the truth if I had that option now I would go with the curve. The new affect was fun and it is a pretty cool phone, but it lacks in functionality because of the slowness and usability of the interface. It has froze several times, even during a phone call twice.
Adding All Option CFSELECT

I am creating a web page that makes use of related cfselect's. This is a handy feature of coldfusion that allows the contents of one select box to be dependent on the contents of another. For me that means I have one select that lists areas that our company covers. Another box lists the counties we cover. Using the related selects the counties will only show for the area selected in the first box. Very nice. I also link a jurisdiction select to the counties select.

I wanted to add a default "All" option to these selects. Colfusion has an atribute for CFSELECT - queryposition which you can set to above or below. This works great if you are not using the bind attribute in CFSELECT. I was using bind to connect those cfselects so I had to find another way to add "All". I found a comment on Ben Forta's Blog by Matt Bennett that gave me sample code like the following which I adapted slightly for my own use:



sortArray = ArrayNew(1);
QueryAddColumn(qry, "sort_order", sortArray);
QueryAddRow(qry);
querySetCell(qry, "name", "All");
querySetCell(qry, "id", "0");
QuerySetCell(qry, "sort_order", "1");


SELECT *
FROM qry
ORDER BY sort_order desc, name asc



Works great, I just added that code after the qry I was already returning and boom, success.

Monday, December 01, 2008

Export to CSV with Coldfusion

I am trying to finally get a good export to CSV working, using coldfusion. There are alot of posts, many of them by Ben Nadel.

Ended up using the example from: Converting A ColdFusion Query To CSV Using QueryToCSV()

This worked great except there were lots of blank rows at the top of the file and at the bottom. The fix was found here: Extra white-space after page proccess

<cfcontent reset="yes"><cfoutput>#Trim (yourvar)#</cfoutput><cfabort>

It was important to put it on one line to, otherwise there was an extra line for each line return.

Thursday, November 27, 2008

CF 8 - "ColdFusion is not defined" JavaScript Error

I am trying to get ajax select dropdowns to work in coldfusion 8. I eventually want them to be related also. That is, the results of the second are based on the choice in the first. Well hit a wall and couldn't get the data to show up. using a test page I was able to return the correct results with a cfinvoke of the .cfc, but no data in the selects.

I didn't have firebug installed on this computer, so I went and got it and looking at the javascript error's I saw the error: CF 8 - "ColdFusion is not defined" JavaScript Error. Google that and I found the following that explained the cause:

CF 8 - "ColdFusion is not defined" JavaScript Error

The solution was to not only have a cf mapping to the cfide directory (which I already had) but also a web server virtual directory (which I didn't have). I added the virtual directory and it works.

Wednesday, November 26, 2008

How to restart Apache on the Mac

Made a change in the httpd.conf file and wanted to restart the Apache server to pick up the changes. How did I do that?

Open up the terminal window (/applications/utilities/terminal)
Then Type: sudo apachectl restart

Seems to have worked for me.
Location of httpd.conf for Apache on the mac

It is hard for me to find things on this mac still. Some of the stuff is hidden and it always takes me a while to get around. The last thing I was looking for was the httpd.conf file for the apache web server configuration. I wanted to see where the webroot was. Then maybe change it.

Anyway, it was at /private/etc/apache2/httpd.conf.

Amazing how many posts I saw asking this same questions.

Monday, November 24, 2008

Start and Stop ColdFusion and othe services.

One of those little nuggets that I picked up at the adobe conference was leaving services you don't always use stopped until you need them. Like coldfusion for instance. I will get developing and use coldfusion locally for development for days at a time. But, I don't always use it, so there is no need for it to be running if I am not using it.

Quick search and I found this: Batch files for Starting and Stopping ColdFusion.

In Vista I had to use "Run as Administrator" for those to work, but they did work like a charm. Took a long time on the main CF service the first time, but it did eventually work.
Dreamforce, Adobe MAX, and BIS in Long Beach

I have been out of town 4 days each of the last 3 weeks attending one show and 2 conferences.

First was Dreamforce. Salesforce.com's annual big event. This was fantastic. I am amazed at what salesforce.com has been able to do with their platform. We have been using salesforce.com since April and I can't imagine being without it. They really have a fantastic vision and have been able to grow their business and keep most of their customers happy.

One of the Big announcements was salesforce sites. Public facing web pages that your customers can access without loggin in. Before, any access to salesforce was via controlled login access. Now you will be able to design pages for the public based on your salesforce data. This does have tremendous possibilities, especially if I was to ever move my data entry app into salesforce. We will see. But all the other stuff was cool. I learned alot and they treated us like royalty. Tons of food all the time. Free shirts, books and more. I have never before been treated so good as we were treated at Dreamforce. They seem to really care about their customers.

The second week I was at BIS in Long Beach. This is a builders show where we buy a booth and market our magazine. We also walk around and speak with other booths. This show is a good place for us to get our name out and we had pretty good success with it last year.

The 3rd week (last week) was the Adobe MAX user conference. I went to this one when it was in Salt Lake about 4 or 5 years ago. This conference was great also. They had decent food, although not as good as dreamforce and the content was above average. I learned alot and got to shake hands with and meet some of the top coldfusion guys. I am sure there a great minds in everywhere, but I feel we have some great ones in the coldfusion community.

Both these conferences where held at the Mascone Center in San Francisco. This made it easy for me because I was a little familiar with the area since I went there in late Sept for a salesforce.com administrator test.
Mac drives me crazy 1/2 the time and I love it 1/2 the time.

I have not posted forever. Probably because this macbook pro drives me absolutely nuts sometimes. After slowly getting use to the different key combinations I can actually get around ok, although I still have alot to learn.

The battery lasts for about 3 hours, maybe slightly more, depending on what I am doing. This is great. It does run fast. But to be fair a new pc laptop with the same config would probably do the same. It wakes up from sleep mode faster than I think a pc with windows ever could. And it is sleek and cool.

But, I can't beleive how hard it is to use some of the dvd/movie features. I have tried to create dvd's from a panasonic mini-dv camera and it has been a frustrating nightmare. Even once you learn how to do it there are quirks that drive me nuts. If you don't catch some of the subtle things, it just fails and you don't know why. Thank goodness for my daughter's basketball coach, she figures it out, even thought it sometimes takes her a while too.

Anyway, my macbook pro isn't going away. But it won't be my main machine anytime soon.

Oh, one huge plus is the touchpad. Dragging 2 fingers scrolls. 2 Finger touch is like a double click (Although Steve Jobs is crazy for not just putting 2 stupid buttons on there in the first place). With the pc I ALWAYS pull out the wireless notebook mouse. With the macbook pro I am more comfortable with the trackpad because it is so responsive and nice. I catch myself trying to 2 finger drag back on the pc and it doesn't work.

Thursday, August 28, 2008

Installing mySql on Mac OSX Leopard

Just got done installing mysql on my macbook pro. Installation went just fine. Followed the same document that also had php installation instructions. Click here to view that document again.

I accepted all the defaults and have not yet gone through the instructions for connecting to php. A couple of places I stumbled only briefly. As mentioned in the article I downloaded the MySQL GUI Tools. This gives a visual interface and will definately work better for me as I still have no clue to all the command line stuff on this mac. After installing the gui and clicking on the MySql Administrator app in the applications folder I was given the option for a server and username and password. Server Hostname can be set to "localhost" and username to "root". Then you can change the password when you get in there.

Very simple. Now I gotta learn the interface.
Installing Coldfusion 8 on Mac OSX Leopard

I just installed coldfusion 8 on my macbook pro and didn't have any problems. I read through this post first and it had instructions, but all the settings in that article were the defaults so I just clicked through and it installed no problem.

I am, once again, not sure about the directory structure. Not sure if the default /library/documents/webserver is the best place but it does work, at least the CF administrator does.

I installed the 64 bit version. The way I understand it is that with the core 2 duo processors you can get the 64 bit versions of the files

Now on to mySql.
Viewing Hidden Files

I Figured out how to view hidden files, but it wasn't easy and I am still not 100% comfortable with it. I followed the instructions here: http://guides.macrumors.com/Viewing_hidden_files_on_a_Mac but that did not seem to work. I wanted to just use finder to see the hidden files. When I typed in the suggested commands, I didn't get an error but it is definitely not working. So I resorted to downloading a couple of additional programs. Textwrangler and Coda.

I actually downloaded Textwrangler first and struggled a little so I began to download coda. Before it finished I had figured out Textwrangler so that is what I ended up using. From the textwrangler menu you choose "File/Open Hidden". After that it still isn't easy as I still am learning to understand directory navigation on the mac. I was able to find the private directory by clicking on the "Macintosh HD" in finder. It would be more intuitive at this point if it would have been under Desktop, Home, Applications or Documents which is where most stuff seems to be.

I haven't got back to using this (modifying hidden files) yet, but I will and I think I will be alright now. I still need to install mysql and coldfusion.

I did get php working by just modifying one line as instructed here: http://reverbisnotalie.com/code/php-mysql-apache-mac-osx-leopard

Sunday, August 24, 2008

Apache, ColdFusion 8

I want to install apache and coldfusion 8 on my mac so that I have a complete development environment on this machine. I enabled web sharing which I think is apache and It works. But I can't find the apache directories. It looks like you have to make hidden directories and files viewable and I did that as instructed here:

Viewing hidden files on a Mac

But I still can't figure out where the http.conf apache file is. This is not easy so far, unless I am just missing it.

Thursday, August 21, 2008

Gmail on a Mac

This one is going to drive me nuts. On a pc using gmail you can type an email, press tab and then enter and it sends the email. When you press tab it moves focus to the send button. On this mac that doesn't happen. Tab never performs like I expect, at least on web pages. Driving me nuts. Funny how such a little thing can make such a difference. But I at least need a comparable key combination so I don't have to touch my mouse in gmail.

----------------
Just found the answer to this. System Preferences/Keyboard & Mouse/Keyboard Shortcuts then at the bottom you see "Full Keyboard Access". Make sure you choose the "All Controls" option and it works like a charm. Wahoooo!

Wednesday, August 20, 2008

Touchpad greatness

Just reading through the little white booklet that was the only documentation that came with the macbook pro. The info from that booklet that I liked the most was the info on the touchpad. Two fingers sliding will scroll up and down or side to side. Two fingers and click is like a right mouse click. I also enabled touch click in system preferences because I prefer to just tap the touchpad instead of having to use the button, which can be awkward for my thumb. Three fingers does something too, but I can't remember what.
Mac Spaces

Just started using spaces. This is a cool feature where essentially you have 4 desktops and can easily switch between them. I will probably use this more as I get use to it. I might have email in one, eclipse for coding in another etc...

Even with this 15" screen there is not alot of screen real estate available with the dock and a few desktop icons you don't want to cover up. Spaces will make this easier to deal with.
Lighted keyboard

The macbook pro's lighted keyboard is sweet. With my dell I always had to angle the monitor down to be able to see the keyboard in the dark. Not with my mac.
Save pdf to web receipts folder

My Macbook pro has a cool feature. When you print a web page you can click on the pdf button and there are several cool choices. The one I just used "Save pdf to web receipts folder" is a great time saver and very convenient. How many times do you just want to do that. In windows there are a few extra steps and I think you have to have adobe acrobat pro in at least some cases.

Tuesday, August 19, 2008

unable to load default svn client

Installed Eclipse no problem. Although I did install the latest version, Ganymede first. But I installed the latest Europa (3.3) once I found out that CFEclipse doesn't yet work with Ganymede (3.4). I then installed the SVN client and it seemed to go well. But I was getting an error "unable to load default svn client" error.

Found a little help here: http://subclipse.tigris.org/servlets/ReadMsg?listName=users&msgNo=12087

But I already had installed JavaHL and still I was getting the error. But after installing SVNKit (there were 2 and I chose both, a client and something else) it worked. Another problem solved.
No Docking Station

It looks to me like there is not a docking station available for this macbook pro. That is a shame. Apple seems to have it all going on and then they don't have docking stations. I currently use my dell latitude laptop primarily between 2 different offices. At each of these offices I have docking stations with external monitors, power, network and other accessories hooked up. It is VERY simple to just drop the laptop onto the docking station and I am off and running. This is a big minus for the mac.