sunnudagur, 25. apríl 2010

Find processes and ports

For Windows based operating system: netstat -noa

For Linux based operating system: netstat -nap

If the port is known it works to use: netstat -nap | grep 80 in Linux



miðvikudagur, 24. febrúar 2010

JavaHL architecture conflicts in OSX 64 bit

When using MacPorts it is possible to download subversion-javahlbindings but that library is using 64 bit architecture and is not compatible with eclipse 32 bit based plugin such as Subclipse. See http://trac.macports.org/ticket/20983

This works perfectly if you are using 64 bit Eclipse based plugins. So there are two possible fixes. The first one is building the 32 bit JavaHL bindings your self.

The second fix is just download the latest Subversion package from CollabNet (http://www.open.collab.net/downloads/community/). That will compile both 32-64 bit version of the JavaHL bindings. You can install the package but skip making the current symlinks pointing to this package so you keep on using the latest MacPort Subversion package and using the JavaHL bindings provided by CollabNet. The problem is that you have to maintain those packages your self in the future until this problem will be fixed by MacPorts.

I try to avoid installing and using packages which are not included in MacPorts for easier package dependency management.

laugardagur, 31. október 2009

Windows 7 Installation Fail

Boot Loader went on wrong hard disk
Windows 7 installation has been not quite flawless, had problems with windows Boot Loader being installed not on the hard drive which I formatted and selected for installation. Since it's not optional where to put the Boot Loader I consider it a bug.

Windows Update broke the network adapter
The second problem I had was my first Windows Update. The network adapter driver is broken or not correct -> Realtek - Network - Realtek RTL8168/8111 Family PCI-E Gigabit Ethernet NIC (NDIS 6.0) I was unable to use the network adapter and had to re-install the driver which Windows 7 installed by default at the start. -> Realtek RTL8168C(P)/8111C(P) Family PCI-E Gigabit Ethernet NIC (NDIS 6.20)

fimmtudagur, 18. september 2008

Largest Number Ruby algorithm

Algorithm LargestNumber
Input: A non-empty list of numbers L.
Output: The largest number in the list L.

largestL0
for each item in the list L≥1, do
if the item > largest, then
largest ← the item
return largest

Ruby LargestNumber algorithm

i = 0
[1,3,5,7,3,5].each do | n |
if n > i
i = n
end
end
puts i

Simple and elegant!

föstudagur, 4. apríl 2008

Hello world

First web log commit.