Voxeo VoiceXML Tools Suggestions

June 14th, 2007 No comments

“Several customers have reported success with using the Voice Tools Project for Eclipse which includes the OpenMethods Visual Designer. Eclipse VTP can be found @ https://www.eclipse.org/vtp/

“Other than that, many of our customers are hand-coding their VoiceXML using a regular XML editor. Altova’s XML editor is top notch and provides some really good developer features such as auto-complete and document templates. “

“If you need help getting started, you might want to check out some of our RocketSoruce applications. These are fully-functional VoiceXML application complete with back-end database integration. You can get more information about RocketSource @ https://www.rocketsource.org/

“As always, we are here to support you throughout your development process. If you have any additional questions please let us know. “

Categories: Uncategorized Tags:

Create a Ruby Object from a Hash

May 7th, 2007 No comments

From the Rubyforge snippet library:

class Hash
  def to_struct(struct_name)
    Struct.new(struct_name,*keys).new(*values)
  end
end
if $0 == __FILE__
   h = {:name=>"Dan","age"=>33,"rank"=>"SrA","grade"=>"E4"}
   s = h.to_struct("Foo")
   puts "name: " + s.name
   puts "age: " + s.age.to_s
   puts "rank: " + s.rank
   puts "grade: " + s.grade
end

=begin
Note: An empty string used as a key will cause 1.8 to choke
=end
Categories: Uncategorized Tags:

Activate LVM During Rescue

May 1st, 2007 No comments

Using the SystemRescueCD, LVM partitions are visible but not active until you enter:

vgchange -ay

Categories: Uncategorized Tags:

Install Ubuntu (Feisty) from USB Stick

April 27th, 2007 No comments

For details, see Ubuntu docs here.

  1. mkdosfs /dev/sdc1 – replace sdc with usb stick device
  2. syslinux /dev/sdc1
  3. may need to install-mbr /dev/sdc
  4. find hd-media files for distro and copy to first usb partition
  5. create syslinux.cfg with:
  6. default vmlinuz
    append initrd=initrd.gz ramdisk_size=12000 root=/dev/rd/0 rw
  7. copy Ubuntu iso (apparently any will work)
  8. boot from stick

Note: syslinux.cfg as described in the docs does not work – removing the “init=/linuxrc” fixes the problem.

Categories: Uncategorized Tags:

Seven Post-Install Tips for Ubuntu 7.04

April 20th, 2007 No comments

From PC-Week: check this out.

Categories: Uncategorized Tags:

Ubuntu: Fix your Screen Resolution

April 20th, 2007 No comments

You’ve booted into Ubuntu and your expensive high-res display is running at a paltry 1024 by 768 resolution instead of the 1280 by 1024 or 1600 by 1200 you’re accustomed to. So you click System, Preferences, Screen Resolution, only to find that the higher resolutions you know your display can support are not offered in the drop-down list. What the heck?This is usually an indication that Ubuntu has failed to suss out the characteristics of your monitor. (Graphics card woes are also possible in this case, but in my experience monitor trouble is more common.) Luckily, a helpful Fix Video Resolution Howto in the Ubuntu wiki has solved this issue every time I’ve encountered it. The instructions there should be enough to get your display in gear.

Categories: Uncategorized Tags:

Xorcom BRI Zaptel

April 19th, 2007 No comments

Can be found here.

Categories: Uncategorized Tags:

CentOS Kernel Header Issue

April 16th, 2007 No comments

Nasty little glitch in CentOS 4.4 kernel headers can be fixed with:

sed -i s/rw_lock/rwlock/ /usr/src/kernels/`uname -r`-`uname -m`/include/linux/spinlock.h

Categories: Uncategorized Tags:

Array to Hash in Ruby

April 11th, 2007 No comments
a = [1, 2, 3]
Hash[*a.collect { |v| v, v*2].flatten]

or from something Ryan Carver was trying to do:


Array#to_h

I found myself writing something like this far too often:

def map_something(array)
  hash = {}
  array.each do |a|
    hash[a] = lookup_value a
  end
  hash
end

It bugged me every time, but digging through the Pick Axe never yielded (ahem) a simpler solution. What I wanted to do is this:

def map_something(array)
  array.to_h do |a|
    lookup_value a
  end
end

But of course you’d need Array#to_h. Here’s the cleverest implementation I could think of.

class Array
  def to_h(default=nil)
    Hash[ *inject([]) { |a, value| a.push value, default || yield(value) } ]
  end
end

A pointless example:

a = [1, 2, 3]
a.to_h do |v|
  [v * 2, v * 3]
end
> {1=>[2, 3], 2=>[4, 6], 3=>[6, 9]}

I love Array#inject!


			
Categories: Uncategorized Tags:

How to Build Apt Repositories

April 10th, 2007 No comments

Go to /var/cache/apt/archives and copy your debian packages to a folder of your choice, for example, /home/$username/repository
Cd into the directory and generate a Packages.gz file like this:

sudo dpkg-scanpackages .   /dev/null | gzip -9c > Packages.gz

Add the following line to your apt sources file (/etc/apt/sources.list)

deb file:/home/$username/repository/disk_1 /

Remember to replace $username with your username
Reload your package index like this:

sudo apt-get update

And you’re done.

Categories: Uncategorized Tags: