Installing VMWare Server on Ubuntu

  • Digg this article
  • Sphinn this article
  • Stumble this article
  • Facebook
  • del.icio.us
  • LinkedIn
  • Twit this article
Posted by John
on Tuesday, 23 September 2008

First install the pre-requisites;

sudo aptitude install linux-headers-`uname -r` build-essential
sudo aptitude install xinetd

Download VMWare Server .tar.gz file from here.

Remember to signup for a Serial Number, you'll need that during the install

Download the latest vmware-any-any-update patch here,

Now extract VMWare Server and terminal into it's directory, run,

cd vmware-server-distrib
sudo perl vmware-install.pl

When asked Before running VMware Server for the first time, you need to configure it by invoking the following command: "/usr/bin/vmware-config.pl". Do you want this program to invoke the command for you now? [yes] enter NO and patch VMWare with that file.

Extract the files within that patch and Terminal into it's directory,

cd vmware-any-any-update115
sudo ./runme.pl

It should prompt you to run vmware-config.pl, this time say YES and continue with the install.

Afterwards start vmware with,

vmware

You might get a load of errors like this,If you get compile errors, do this;

/usr/lib/vmware/bin/vmware: /usr/lib/vmware/lib/libgcc_s.so.1/libgcc_s.so.1: version `GCC_3.4' not found (required by /usr/lib32/libcairo.so.2)
/usr/lib/vmware/bin/vmware: /usr/lib/vmware/lib/libgcc_s.so.1/libgcc_s.so.1: version `GCC_4.2.0' not found (required by /usr/lib32/libstdc++.so.6)
/usr/lib/vmware/bin/vmware: /usr/lib/vmware/lib/libgcc_s.so.1/libgcc_s.so.1: version `GCC_3.4' not found (required by /usr/lib32/libcairo.so.2)
/usr/lib/vmware/bin/vmware: /usr/lib/vmware/lib/libgcc_s.so.1/libgcc_s.so.1: version `GCC_4.2.0' not found (required by /usr/lib32/libstdc++.so.6)
/usr/lib/vmware/bin/vmware: /usr/lib/vmware/lib/libgcc_s.so.1/libgcc_s.so.1: version `GCC_3.4' not found (required by /usr/lib32/libcairo.so.2)
/usr/lib/vmware/bin/vmware: /usr/lib/vmware/lib/libgcc_s.so.1/libgcc_s.so.1: version `GCC_4.2.0' not found (required by /usr/lib32/libstdc++.so.6)

That's because one part of the vmware package was compiled with a different version of gcc than the one you're running now, to fix that do:

sudo cp /lib/libgcc_s.so.1 /usr/lib/vmware/lib/libgcc_s.so.1/
sudo cp /usr/lib/libpng12.so.0 /usr/lib/vmware/lib/libpng12.so.0/ 

Now you should be able to start VMWare Server

(tested and working on Ubuntu Hardy 8.04 64-bit)

Learning Javascript

  • Digg this article
  • Sphinn this article
  • Stumble this article
  • Facebook
  • del.icio.us
  • LinkedIn
  • Twit this article
Posted by John
on Tuesday, 06 November 2007

For many it can be one heck of a steep hill to climb, thankfully the Yahoo guys and a few others have released some online videos to help you out.

Worth the watch,

More...

C# Crib Sheet

  • Digg this article
  • Sphinn this article
  • Stumble this article
  • Facebook
  • del.icio.us
  • LinkedIn
  • Twit this article
Posted by John
on Sunday, 05 August 2007

string b = @"hello
p. stuff"

@ means string must be displayed like written, on two lines


Arithmetic Overflow

checked(b2)
p. unchecked(b2)

checked = means expression ‘b2’ value does not exceed type


b2?

+++b2 b2+++

>= <= == != ++

end lines with ;


if (b2 == b3)

{ code }

else if (b2 > b3)

{ code }


switch(x) {

case 1:

——;

break;

default:

——;

break;

}


while (b2 = 2) { b2++; }


do i++ while (i<5);


for (int i=0l i<0 i++) { }


foreach (Stick stick in dynamite) { stick++; }


return b2;

return = return value / object to calling code;


namespace mycompany.myproduct.drawing { }

namespace = enables you to group related types into a hierarchical categorization


inheritance

class URL : Location { // }

: <= allows URL to inherit the methods of the Location class


polymorphism = ability to perform same operation on many types

virtual function members = each type can implement a shared characteristic in it’s own way. implements shared characteristic / method in it’s own way


abstract class = shell of a class, no implementation, cannot use directly, have inherit / build upon

abstract class Location { public abstract void Launch(); }

class URL : Location { public override void Launch() {} }

override = override inherited classes methods, in this example i’m using an abstract class as a sort of template for something new


public new void Foo() {}

new = hides method from outside class


public = type / members fully accessible

internal = type / members accessible only from within

private = type / member accessible only from within

protected = cannot modify, class available within class


difference between classes & structs ?

class = fully supports inheritance, reference types, can have destructor, can have custom parameterless constructor

struct = simple, value types, can have constructor


instance = (default), associated with an instance of a type

static = associated with a type itself

public static void Me() { }


public const double PI = 3.141

const = constant, always uppercase


ref = pass by reference, change value of variable given permanently

static void Foo(ref int p) { ++p; }


params = allows method to accept any number of parameters

static int Add(params int[] iarr) { foreach (int i in iarr) {…} }


constructor = specify how new instances of a class get created, what variables get initialised with, etc.

class wow { public wow() : this(5) {}

make method same name as class to do this, here we’re self-referencing the class using the ‘this’ keyword, returning 5 to the calling class

static constructors = can define only one static constructor


destructor = specify how instances of a class get destroyed, connections get closed, etc.

class wow { ~wow() { console.writeline(“boom”); } }

~ defines a destructor, plus make it the same name as the class, here writing ‘boom’ to the console when the class is destroyed


this = self-referencing, denotes a variable that is a reference to a instance, allows members to reference own class

public dude(string name) { this.name = name; }
p. public void hi(dude a) { if a!=this) {..} }

a common use of ‘this’ is to unambiguate a field name from a parameter name.

e.g. = self-reference the current class instance

JAVA

  1. class Numbers {
  2. private int aNumber = 42;
  3. public int returnANumber()
  4. {
  5. return this.aNumber;
  6. }
  7. public int returnANumber(int intIn)
  8. {
  9. return (intIn * this.returnANumber());
  10. }
    #
  11. public static void main(String[] args) {
    #
  12. Numbers numberTest = new Numbers();
  13. System.out.println("The Number is " +
  14. numberTest.returnANumber() );
  15. //output is: The Number is 42
  16. System.out.println("The Number is " +
  17. numberTest.returnANumber(2) );
  18. //output is: The Number is 84
  19. }
  20. }

see how the above example works, a variable is defined inside the class, a method is defined for when no parameters are given assigning it 42. when parameters are given it runs a different method multiplying 42 with the number given. however it’s referencing (can modify directly & permanetly) the value inside it’s own class.

also in JAVA,
p. super.getName(a); = use super. to call methods in the parent class


base = similar to ‘this’, except that it accesses overridden or hidden base-class function members

basically allows you to call the original function of a class before it got replaced by one with the same name / overridden

base.Introduce(p);


interfaces = like a pure abstract class, but provides a spec rather than implementation of it’s members

public interface Me { void Delete(); }

here no code is written, just a function is defined, which when inherited by another class (using : ) can then be coded.

basically a template class, an empty shell


arrays

char[] vowels = new char[] (‘a’, ‘e’);
p. console.writeline(vowels[ 2 ]);

multidimensional arrays

int [][][] matrix = new int 3[][];
p. matrix[x][y][z] = new int 5;

= vowels.Length;
= matrix.GetLength(2)


enums = specify a group of named numeric constants


events

get { return pos; }
set { r = 44; }


try { }
p. catch { }

finally { }

basically you try something risky, you catch any error codes and then you finally clear up your mess


ArrayList = dynamically sized array of objects that implement the IList interface

HashTable = standard dictionary layout (key/value)


StringBuilder class

can grow unbound or upto a pre-defined maximum, much better than just concatenating a string.

it starts at a pre-defined size and grows dynamically as more string data is added.

StringBuilder sb = new StringBuilder(‘hello ’);

sb.Append(’world’);

sb12 = ‘!’;

console.writeline(sb); // hello world


// = comments