FFFFOUND!
-
Comments:
- here.
I ffffound a wwwwebsite today. It hhhhas llllots of ppppictures on it. Ssssome of them aaaare vvvvery ffffunny!
I ffffound a wwwwebsite today. It hhhhas llllots of ppppictures on it. Ssssome of them aaaare vvvvery ffffunny!
I’m currently sitting in my new favourite place - the Flinders Uni Tavern.
It’s been a long time since I was a regular at a Uni Bar, but it looks like it will be starting again. I can sit in this place, view lectures I’ve missed, or even just seen, and drink beer. And do my work, while Alanis Morissette plays in a double-play.
Feels like the early 90s again. Except I have money, and a laptop.
And I plan on finishing this degree.
Java almost handles arrays well.
Almost.
Maybe I’m spoilt by python, but having datatypes that are effectively a hybrid between lists and arrays is excellent. You get both of the advantages - being able to iterate easily, and access by index (attributes of arrays), and having dynamic sizes and non-sparse lists (the only decent attributes of lists).
In fact, the text I am reading now has a three-and-a-half page code fragment called “Partially-filled lists”, which is about 200 lines of code, which implements what I describe. Except the upper limit of the size, which must be determined at compile-time. And it requires a new class if you want it to be for anything other than doubles, or whatever you have written it for.
The other thing which was bugging me was the looping of arrays. In python you can do cool stuff easily iterate over elements of an array. Recent versions of Java can also do this.
Python:
for element in theList:
print element
Java:
for (element: theList)
System.out.println(element);
It gets pretty close. I think I still like the simplicity of the python notation - brackets only where they are really required to indicate function/method calls, and for expression ordering. Having a required bracket around if test-expressions and the like just makes me think if, switch and so on are functions. Which they can’t possibly be, since Java doesn’t have functions, only objects and methods.
And don’t get me started on braces…
I’m studying at Flinders Uni this year - so far it has been pretty cruisy, with a summer school subject I think I got 93% for, and lectures started proper this week. Pretty much all of the topics I am studying, and a whole lot more are available as podcasts or video streaming. You need to be logged into the FLO (Flinders Learning Online - an excellent tool, from what I’ve seen) to get the streaming video (I think), but the podcasts are technically available to anyone. If you know the URL, for example:
COMP 3001, 2008 Audio Feed : http://video.flinders.edu.au/podcasts/COMP3001/audio/COMP3001_2008.xml
You should now be able to figure out the URL for any topic. Just replace the COMP3001 with your subject code, and audio with video, if you desire.
The files are quite large, but no larger than regular podcasts.
I wasn’t able to find anything on the University website(s) that prohibit me from making this information public, but it may be under copyright restrictions. So only use it if you are allowed to…
I have access via an OpenVPN tunnel to my University, and can access files located on the server there using Tunnelblick. This provides access through an insecure wireless network, as well as over the internet.
However, if I connect using Tunnelblick from home, I can either view my files, or view stuff on the rest of the internet.
It took me a while, but I figured out how to change the openVPN settings so that only a subset of IP addresses go through the VPN.
Assuming you are on a Mac, your settings file will be similar to ~/Library/openvpn/connection_name.conf
, but with connection_name being something else. You need to edit this file, which is probably write protected. I’m not going to tell you how to fix that problem - if you can’t do that you have no business hacking with routing tables!
Find the entry near the bottom that looks like:
redirect-gateway def1
Comment this out (put a # at the start).
Now add in a line that looks somewhat like this:
route <network-address> <netmask> <gateway-address>
For example:
route 1.2.3.4 255.255.0.0 5.6.7.8
For Flinders Uni Infoeng, it should be:
route 129.96.6.0 255.255.255.0 129.96.59.73
You may need to authorise your Mac after saving the file. But when you connect with Tunnelblick, you should now be able to access addresses within the desired range, and the rest of the googlenet at the same time. Happy surfing!
No need to elaborate.
I use the excellent and free emitSMS for all of my SMS sending-from-my-Mac needs, and it works a treat. However, for some reason in the last couple of days it has stopped connecting properly to my phone, a Nokia E65.
I’ve had lots of hassles with this phone, and thought this might be just another one. But I’ve restarted both the phone and the Mac, and no joy.
If you look at the back of the emitSMS widget, you’ll be able to choose the serial port to connect to. If you try changing the port to one of the standard ones, it should give an almost immediate error. If you change it back to your phone’s serial port, and it hangs forever, there is a solution.
As can be seen from the image above, I’ve just created a second Dial-UpNetworking bluetooth port, and used that instead.
Open up System Preferences, and visit the Bluetooth panel. Select your phone, and select Edit Serial Ports… from the utility menu.
Add a new serial port using the plus button, and duplicate all of the settings.
Click Apply, and then change the serial port back in emitSMS. It should connect and identify your phone.
I hate statements that are unqualified, and therefore meaningless, with regard to statistics.
On Sunrise this morning, in the local news, they trotted out the chestnut:
“12% of people charged with drink-driving in the last two years were P-platers.”
This is totally meaningless without an indication of what percentage of the driving population are P-platers. What if it is higher than 12%? Then P-platers are actually more responsible than the rest of us…
Bah.
I love my MacBook Pro. But not everything about her.
For instance, I despise that there is no forward delete key on the inbuilt keyboard. But using DoubleCommand you can fix that. You can also make the fn key act like control (I’m always hitting fn-C instead of Ctrl-C to kill a thread, for instance), and a whole lot of other changes.
But if you remap the small enter key to forward delete (which I highly recommend), if you plug in a USB keyboard, then the keypad’s enter key will also be mapped to forward delete. Which is not cool.
The latest SVN version of DoubleCommand has the facility to fix this, but it requires a bit of terminal work to set it up.
If you haven’t got a newish version (~1.6.6), first, check out the latest code:
$ svn co https://doublecommand.svn.sourceforge.net/svnroot/doublecommand doublecommand
The code we want is in trunk/kext
. Open the project inside that folder. Build the project, and then enter the following command from inside of the build/
subdirectory:
$ sudo cp -r Default/DoubleCommand.kext /Library/StartupItems/DoubleCommand/DoubleCommand.kext
Enter your password when requested. Then change to the DoubleCommand installation directory:
$ cd /Library/StartupItems/DoubleCommand
We need to unload and then load the kext. The easiest way is using the following commands ($
means type it in, >
is the output):
$ sudo ./DoubleCommand stop
> Unloading DoubleCommand
> kextunload: unload kext ./DoubleCommand.kext succeeded
$ sudo ./DoubleCommand
> Loading DoubleCommand
> kextload: ./DoubleCommand.kext loaded successfully
> dc.config: 0 -> 1593344
Take a note of that last number, and then perform the two commands:
$ sudo sysctl -w dc.keyboard1=37
$ sudo sysctl -w dc.config1=<the_number_above>
Now, load up the DoubleCommand preferences pane, and disable the ‘Enter key acts as forward delete’, or whatever you had it acting as. Now, the two keyboards will appear differently in behaviour. And hopefully your life will be fuller.
Many thanks to the developer, Michael Baltaks, for his quick response and assistance in this matter.
I run a DHCP/DNS server on my home network, which allocates addresses for all of my machines, and provides them with DNS when connected. Because my development machine, a MacBook Pro also sometimes has to run a web server, and provide varying responses according to the hostname by which she is currently being addressed, I set up a range of VirtualHost directives in apache, and entries in m own /etc/hosts file. This was fine as long as I was the only person accessing these sites, but I also needed to access them from a couple of other machines (including a VM running WinXP).
So, I palmed off the /etc/hosts entry to the DHCP server, a reflashed NSLU2. This machine is just the DHCP/DNS server, which is available only via ssh. But, if I connect to my home network, then the DHCP/DNS server decides to use this hostname as my hostname. I’m still tweaking to see if there is a way around it (have the correct hostname specified earlier in the file springs to mind).
It’s fairly annoying to have the wrong hostname showing in my Terminal when I open up a bash session, or look at the console.log. Something I really can’t live with.