See also: Heapify

Pages: 1

How to convert infix to postfix (Python)

I wrote this originally some time ago. Mostly for my own amusement. It converts from infix to postfix notation.

I expect most of our readers know what these are but for the benefits of completeness infix is a functional notation we humans use for instance in mathematics where the operator sits in between the operands. Example:

(8 * 5) / 4

...

Read more

There are no comments on this post.

How many characters should you allocate for a string representation of any given integer in any given base

Once every while somebody asks how to calculate how many characters to allocate when building a string representation of an integer. This is actually a very easy problem.. when you know your maths.

The answer is simply to use logarithms!

floor(log10(number) + 1)

...

Read more

There are no comments on this post.

Editing Microsoft MSN Messenger Ads

Ok earlier on IRC a discussion about editing MSN ads to show a custom message for use punters at LAN parties. So basically heres how I did it, be kind its my first post.

Here's how I started

First I launched wireshark and started to capture packets then I loaded up MSN Messenger.

...

Read more

There is 1 comment on this post.

Regex tutorial for people who should know Regex, but do not.. Part 2

This is the second part of the catchily named Regex-for-people-who-should-know-regex-but-do-not guide. If you are unfamiliar with the basics of regular expression syntax, then I recommend you first read part 1, or any of the many regular expressions primers available online.

...

Read more

There are 4 comments on this post.

Regex tutorial for people who should know Regex, but do not.. Part 1

Regular expressions are very useful. If you have to deal with text at all, you will find them indispensable. In programming, they can be used to verify user input (e.g check an email is valid), sanitize input (make sure the user only used allowed characters), remove sections of the string (remove all non-alpha-numeric characters). And not just for programming! You can use regular expressions in many text editors to edit the current file. You can use them in the grep command to find very specific lines, or in the sed "stream editor" to edit out bits of a file..

...

Read more

There are 9 comments on this post.

How to easily stream ascii videos

This article is a brief tutorial in how to make your own ascii internet TV station. I say brief, its pretty simple - that's why its brief.

The inspiration for such an article comes from having a telnet link posted in a channel to a server which was showing a World Cup game live via ascii and sockets. I pasted this around to a couple other people and some folk didn't understand how it worked, so I wanted to share some knowledge.

Incase some of you aren't following me, the link I was shown was

...

Read more

There is 1 comment on this post.

Using ICMP tunneling to steal Internet

Introduction

The scenario is you are without Internet connectivity anywhere. You have found either an open wireless access pointed or perhaps you're staying in a hotel which permits rented Internet via services like

Spectrum Interactive (previously known as UKExplorer). You make the connection, whether its physically connecting the Ethernet cables, or instructing you're wireless adapter to lock onto the radio signal. You are prompted with some sort of authorisation page when you open a browser. You don't have access to it, so what do you do?

...

Read more

There are 13 comments on this post.

Pages: 1

RSS
Powered by Debian, Guinness, and excessive quantities of caffeine and sugar.