Sorting algorithms – An Instant Look-up

Sorting algorithms is one of the first stepping stones into computer programming. The site www.sorting-algorithms.com/ provides visual representations of different approaches for data sorting in comparison with each other.

Advertisements

64-bit Windows support in Boot Camp

Just spotted this over at Mac Rumors, that there are a few cases reported Mac Pro users can boot into their 64-bit Windows Vista (GO confirms XP support still limited to 32-bit on Bootcamp).

From the manual, Page 4, the message said:

Important: You must use a single full-install Windows installation disc (Service Pack 2 is required for Windows XP installations). Do not use an upgrade version of Windows and do not install an earlier version of Windows XP and attempt to update it later to SP2 or later. Use only 32-bit versions of Windows. If you have a Mac Pro introduced in late 2007 or later, you can use a 64-bit version of Windows Vista.

Also, from your Mac Pro restore disk (on newer shipped models, apparently), you should be able to find a file “BookCamp64.exe” under “Drivers\Apple\”, under Windows. There a spread/file sharing of this file on the internet whom a forum member has kindly shared with other Mac Pro user. As I have never used Boot Camp and don’t have a Mac at all, I can’t say if this “BootCamp64” will work with all other 64-bits processors used by Mac. It in understand that all Mac Pro are 64-bit capable.

Continue reading

‘OpenMac’ Promises $399 Headless Mac… But Not From Apple

Arnold Kim reports on Macrumors.com that:

A company called Psystar has started advertising a $399 computer called “OpenMac” which claims to be a Leopard compatible Mac built from standard PC-parts. For $399, you get a tower computer with the following specs:

– 2.2GHz Intel Core 2 Duo
– 2GB of DDR2 667 memory
– Integrated Intel GMA 950 Graphics
– 20x DVD+/-R Drive
– 4 USB Ports
– 250GB 7200RPM Drive

Many of the components can be upgraded, however. For example, the graphics card can be updated to a GeForce 8600GT 512MB for $155 more.

Psystar is marketing this as a cheaper and more expandable alternative to a true Apple Mac.

Continue reading

PHP Design Patterns PHP Job Interview Questions

As a PHP contractor, consultant, and freelancer, Larry Truett from San Diego, CA going by the alias Fluffycat had a fair number of interviews – and sometimes he’s been asked technical questions. Here are a few to help you prepare for your next PHP job interview.

=,==,=== – what is the difference between these?

= assigns a value, == checks if value is the same, === checks if value is the same and the variables are of the exact same type.

Echo, print, printf – what is the difference between these?

Print and echo both output what is passed to them. Print acts like a function, so you can use it in complex statements. Printf is used to format the output.

Include, include once, require – what is the difference between these?

Include will includes a file each time it is called. Include_once would only include a file one time, so if a php program has a file in two include_once statements only the first will be done. Requre is like include, but if the file included is not available a fatal error occurs and processing stops.

Continue reading

Publish iCal calendars with local WebDAV server

To publish your iCal Calendar with the bundled OS X Apache web server, edit Apache’s configuration file in /etc/httpd. You must be root, so I expect you know vi and the workings of this file in general.

 % sudo vi /etc/httpd/htttpd.conf

In the Shared Library section, where modules are loaded, add these two lines in the same ordering in their repective sections:

LoadModule dav_module libexec/httpd/libdav.soAddModule mod_dav.c

Then somewhere in the global section add:

DAVLockDB /Library/WebServer/davlocks/DAVLockDB

I used this section to have a webdav folder managed by Apache:

<Directory "/Library/WebServer/Documents/dav">  DAV On  

  AuthName 'WebDAV'  

  AuthType Basic  

  AuthUserFile /etc/httpd/.htpasswd  

  AuthGroupFile /dev/null  

  <LimitExcept GET HEAD OPTIONS>  

    require valid-user  

  </LimitExcept>  

</Directory>

I want this folder protected (somewhat) by a password. To generate the password file
with MD5 passwords (not that old crypt!), please use the -m flag. The file is text. Note that http is vulnarable to sniffing attacks, so someone on your network can get at your password.

 % htpasswd -m -c /etc/httpd/.htpasswd user New password: not_safe  

 Re-type new password: not_safe  

 Adding password for user user

Then set up the folder with permissions.

 % cd /Library/WebServer/ % mkdir davlocks  

 % chown www:www davlocks  

 % cd Documents  

 % mkdir dav  

 % chown www:www dav

In iCal, choose Publish Calendar and specify http://localhost/dav/iCal. Do not FTP stuff into the dav folder; webdav uses its own locking, don’t confuse it.

Good Luck!

From http://www.macosxhints.com/article.php?story=20020912065811863