See also: Heapify

Pages: 1 2 3 4 5 6 7 8 9 10 11

Transparent Telephony - Part 2 - Installing Asterisk

Welcome back to the Transparent Telephony series. If you're new, you may want to check out part 1 here: Transparent Telephony - Part 1 - An Introduction.

This series is designed for technical people, programmers, and just general enthusiasts who want to learn: how telephony works, how to setup your own phone server (PBX), how to write telephony applications, and how to reduce your phone expenses. There are tons of neat things you can do with telephony knowledge, so keep reading!

This article will walk you through installing Asterisk on your CentOS or Ubuntu server. If you are going to install on a virtual machine to follow along, I recommend using VirtualBox, as everything should work out of the box. Certain virtual machine programs like Xen have kernel issues which makes installing Asterisk difficult. Also, never ever use Asterisk in production on a virtual machine! You'll have timing issues (this will be explained later in the series).

...

Read more

There are no comments on this post.

tvnamer v2 development

I've been working on a new version of tvnamer, the utility I discussed in "Automatically rename your torrent'd TV episodes"

It's a pretty much complete rewrite. Some of the new features include:

  • Configuration files. In tvnamer v1 you could only customise things like the output filename format by modifying the Python code directly. Now you can create a JSON file at ~/.tvnamer.json which changes any of the default options.
  • Support for multi-episode files, such as scrubs.s01e23e24.avi
  • Support for anime filenames, such as [Shinsen-Subs] Beet - 19 [24DAB497].mkv
  • Much better UTF-8 filename handling
  • Ability to move files to specific location after renaming (/media/tv/{series name}/season {seasonnumber}/ for example)

...

Read more

There are 2 comments on this post.

Twitter Integration

NEVERFEAR.org is now integrated into Twitter. We've had a Twitter account for sometime that is linked to our IRC channel. Now all article posts are tweeted on publish too!

You can follow us at @NeverfearOrg

...

Read more

There are no comments on this post.

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 to build a string representation of an integer in any base without bitwise operators

Last week I gave the geeks at #neverfear IRC a coding task, something I've been trying lately to both challenge them and myself. The challenge I gave them was actually a real-life problem I'd faced in industry as a developer. The challenge was as follows.

Produce an algorithm in the language of your choice that recursively converts a numerical value to a hexidecimal string without bitwise operators. Bonus points awarded for generalising your algorithm to the nth base.

We had a few good solutions mostly following a similiar approach in various languages that I'd like to share.

...

Read more

There are no comments on this post.

BandsInTownPy released

A Python module on the API at bandsintown.com released and is available for download at http://github.com/kay/BandsInTownPy

Sample usage:

from bandsintown import *
site = BandsInTownRequest()
 
print "Getting Flyleaf information by name"
artist = site.GetArtistByName("Flyleaf")
print artist.get_as_string().encode('utf-8')
print
 
print "Getting events for Flyleaf by Artist object"
events = artist.GetEvents()
 
print len(events), "events"
 
for event in events:
    print (event)
print
 
print "Getting todays events"
events = site.GetEventsToday()
 
print len(events), "events today"
 
for event in events:
    print event.get_as_string().encode('utf-8')
print
 
print "Getting events for Exilia by name"
events = site.GetEventsByArtistName("Exilia")
 
print len(events), "events"
 
for event in events:
    print event.get_as_string().encode('utf-8')
print

...

Read more

There are no comments on this post.

User Authentication With Django

Introduction

This article will teach you how to authenticate users with Django in a simple, quick, and secure manner. You'll also learn how to require authentication on certain pages of your website, and how to gracefully handle login and logout functionality.

The target audience is people who have had minimal experience with Django, and are aware of how Django works in a basic manner.

...

Read more

There are 13 comments on this post.

A Technical Introduction to Asterisk Gateway Interface (AGI)

Introduction

The Asterisk Gateway Interface, commonly referred to as AGI, is a language-independent API for processing calls. It allows programmers to write simple programs to manipulate and route calls on Asterisk servers in a simple, easy manner.

This article provides a technical introduction to the AGI, explaining how it works, how it can be used, where you can find API documentation, and even provides some basic code samples which demonstrate how to use the AGI. The intended audience is programmers, telephony enthusiasts, or IT people who want to learn more about adding functionality to their Asterisk PBX systems. This is not a full programming reference, and will not explain how to write AGI programs, it will merely teach you what the AGI provides and how to use it high-level.

...

Read more

There are no comments on this post.

My Regex Guide as a PDF

Part two of my regex guide was released as a shiney PDF. At the time I never created a PDF for part one. Sometime between then and now I created an updated PDF version of both, and they have been gathering metaphorical dust.

So, here is a PDF version of part 1, along with an updated version of part 2 (incorporating feedback form the comment section):

Remember: The guide isn't a guide on regex best practises; the examples used are purely to explain the regex syntax. I use examples like escaping MySQL parameters because this is something most programmers are familiar with - you should never use regex for this purpose outside a regex tutorial..

...

Read more

There are 2 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.

Pages: 1 2 3 4 5 6 7 8 9 10 11

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