Portal of Knowledge The blog of Sam Leach. Years late.


10
Feb/10
0

Updated WordPress to 2.9.1

WordPress has been updated to the latest version 2.9.1. I had to update it manually as the Dashboard method is not working. Some other things like seearching and downloading plugins from the dashboard. I can imagine it is something to do with my hosting (Free Hostia)

  • Share/Bookmark
Filed under: Blog
10
Feb/10
0

Installed Windows 7 on 6-7 year old Notebook

As I previously wrote, the 40GB HDD in my aging Dell Insipron 600m laptop died so I installed Ubuntu on a 16GB USB stick. That served me well for a good while but I just bought a cheap 40GB replacement drive off eBay for under 20 pounds and installed Windows 7 Professional on it. To my surprise it installed fine but was missing most drivers so I thought I'd have a proper mission to find some compatible Windows 7 drivers. Turns out though that all the XP ones from the Dell site work perfectly with Windows 7!

I got Windows 7 Pro for free from MSDN as I am a Computer Science student :)

It runs surprisingly well considering the laptop only has 512MB ram. Writting this with Firefox open it is using 352MB. Visual Studio 2008 runs fine too. Aero wont enable as it has a Radeon 9000 graphics card which doesn't support DirectX 9. Tried the various hacks online but no joy.

I have set a side a 10GB partition where I plan to install Windows XP Pro SP3 because Windows 7 just like Vista still feels slower than good ole' XP!

Amazed that the XP drivers worked though, seems strange.

  • Share/Bookmark
10
Feb/10
0

Backing up 1.3TB to DVD-R!

I saw two x50 DVD-R Spindles sitting on my desk so I decided to (start) organising and backing up a few years of data and media.

I am using ImgBurn to do this.

http://www.imgburn.com/index.php?act=download

It's the best free burning software I have come across. It used to only burn images (isos, bins, etc) iirc but now it will burn anything it seams.

  • Share/Bookmark
7
Feb/10
0

Comment Spammers

Comments will now all be moderated due to th3 spamers!

  • Share/Bookmark
Filed under: Blog
14
Jan/10
0

Post from iPod Touch!

From wordpress 2 iPod touch app!

Right...time to do some uni work!

  • Share/Bookmark
14
Jan/10
0

Find all unread messages in your Gmail inbox and mark them as read

Simply search for "is:unread" without the quotes. Click on "All" next to "Select:" next click "Select all conversations that match this search" if you have more than 20. Finally select "More action" and "Mark as read".

There you go. If you are like me and you let thousands of emails pile up but you don't want to delete them, here is your solution!

  • Share/Bookmark
14
Jan/10
0

200+ comments in russian?

Just removed over 200 comments in russian (I think). All with @ rambler dot ru email addresses and most from the following ips.


188.92.72.161
188.92.77.99
188.92.74.23
@rambler.ru

  • Share/Bookmark
14
Jan/10
0

iPod Touch 32GB

So I got a sexy new iPod Touch 32GB from Santa. I jail broke it using blackra1n right out of the box and am still tinkering with things. For now I need to re-run blackra1n.exe if the device ever runs out of battery and turns of. Apparently the blackra1n team are working on this however. This is due to the fact that it is a 3rd generation ipod touch.

Happy New Year! Seeing 2010 everywhere still seems strange. I feel like I am in the future.

  • Share/Bookmark
4
Oct/09
0

Writing tags in wordpress posts is a hassle

In order do display code in wordpress posts you not only have to "code" them but also replace any SmallerThan, GreaterThan or / with these character entities or extended characters. Otherwise wordpress takes it as html, which makes sence really.


SmallerThan = & l t ;
GreaterThan = & g t ;
/ = & # 4 7 ;
] = & # 9 3 ;
[ = & # 9 1 ;
" = & # 3 4 ;
' = & # 3 9 ;

I found the info here at Wordpress Codex

  • Share/Bookmark
2
Oct/09
0

Silverlight 3 Introduction

Let’s get Silverlight 3.0 installed and setup. Download the Silverlight 3 Toolkit. If you are using Visual Studio 2008 you will have to update to the latest version for Silverlight toolkit to install. This is done through windows update.

In Visual Studio Start a new project and select ”Silverlight” which will be under “Other Languages”. You will be presented with a dialog asking you to “Host the Silverlight application in a new Web site”.

Checking this will create an ASP.NET Web project to hold our new Silverlight project. I’ve had problems with applications not loading so I usualy keep this unchecked. If you don’t encounter any problems leave it checked as you will then have a web server for your Silverlight application.

In Visual Studio you will be presented with 4 files. App.xaml, App.xaml.cs and MainPage.xaml, MainPage.xaml.cs

Xaml, as you may have guest stands for Extensible Application Markup Language. It looks like xml so for now that’s all I care about. It works using tags just like any markup language. It is how we are going to create our Silverlight UI. Any functionality is written in C#. We are only going to look at MainPage.xaml for the time being.

Let’s create a Hello World button!

First thing we may want to do is change the name of the default Grid which was automatically created for us by Visual Studio. “x:Name” gives a name to our grid so we can use it or reference it from our C# code. Pretty self explanitory. Call it MyGrid, or MyFirstGrid or leave it as LayoutRoot!. Now let us change the background colour from white to comething else. After you named your grid and still inside the Grid tags type “Background” and Visual Studio should auto complete and display a drop down with many colours. So you should have something like:

<Grid x:Name="MyGrid" Background="Tan">

</Grid>

Press F5 to start debugging, Visual Studio will launch your default web browser and you will be presented with a blank page with the background you chose. It’s a start but still not very exiting, let us add some text and a button.
Inside our grid open a Button tag like so and give it a name just like we did for the Grid.

<Button x:Name="EvilButton"

Followed by what we want the button to say

Content="I am a nice Button, Press Me!"

Next we set the size of the button in the form of Width and Height

Width="200" Height="50"

And for now we’re done so we close the button tag with a

>

Visual Studio will automatically create the ending tag

You will end up with a button in the center of your browser.

<Button x:Name="EvilButton" Content="I am a nice Button, Press Me!" Width="200" Height="50">
</Button>

Next let’s add some text to the left of this new button. We have limited layout formating options at this point. Canvases, StackPanels and more on Grids will be explained in the next tutorial.
A TextBlock tag is used to display text in Silverlight. I won’t walk you through it this time. Here is the code.


<TextBlock x:Name="WarningMsg" Foreground="Coral" FontSize="20" HorizontalAlignment="Left" VerticalAlignment="Center">
What evar u do, do NOT press dat button ------->
</TextBlock>

Now finally let’s make our button do something or add behavior. This is acomplished by adding an event handler. We want something to happen when the button is clicked so let’s add a “Click” event handler.

After setting the button’s Height, type Click = “”. Click from the drop down. Visual Studio will create an event handler name for you. In my case EvilButton_Click. Also in our C# or VB source file VS implemented the event handler. Now we want to go and find that stub and add our behaviour. Add

EvilButton.Content = "Pushed, releasing evil..."

To end up with (VB)

Private Sub EvilButton_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs)
EvilButton.Content = "Pushed, releasing evil..."
End Sub

or (C#)

Void EvilButton_Click(object sender, RoutedEventArgs e){
EvilButton.Content = "Pushed, releasing evil...";
}

Now run and push the button...or don’t.

  • Share/Bookmark