TIPS: Issues while compiling WXWidgets

If you have msys installed & added to the path then WxWidgets failes to compile and you will get the error which starts as follows

if not exist gcc_mswd mkdir gcc_mswd

The easiest solution to resolve is in the command prompt remove all the path folders except windows & mingw paths and then try to recompile in the same command window.

Tips: Python : wxFormBuilder v3.1.67-beta (Febuary 18, 2010) Python Update

Latest version of wxFormBuilder does not support wxAdditions fully, thus I have updated few XML files to support FlatNotebook & wx.propgrid widgets.

  1. Download wx.propgrid and install it.
  2. Download the XML.Zip folder and extract it in plugins\wxAdditions\xml folder.
  3. Restart the wxformbuilder.

I did not tried to update these files for other widgets but it should be similar.

Tips: Free audio books

audio Anarchy

Aurora-Audiobooks

“NetLibrary now available thru Atlanta Fulton County Public Library

Toldbooks

Free Stories from Thriller / Brilliance Audio podcasts

Podiobooks

Complete Podiobook (Podcast audiobook) directory

LibriVox

Project Gutenberg’s Audiobooks

LiteralSystems.org

AssistiveMedia.org

Stories to Go

Miette’s Bedtime Story Podcast

Audiobooks For Free

The Story Spieler

Storyline Online

LearnOutLoud Free Audio/Video Directory

Escape Pod

Many Books

Free Classic Audiobooks

Telltale Weekly

New CCEL Website

The Spoken Alexandria Project

Simply Audiobooks

Free Christian Audiobooks

NAXOS audiobook download shop.

Audiobook Store Portal

Listen-Here Free Audiobooks

Thought Audio

Audiobooks.net

demo code for wx.TaskBarIcon

Below is the demo code for wx.TaskBarIcon,

import wx
class sysTrayDemo(wx.Frame):
    def __init__(self, parent, id, title):
        pass
        wx.Frame.__init__(self, parent, -1, title, size = (800, 600),
                         style=wx.DEFAULT_FRAME_STYLE|wx.NO_FULL_REPAINT_ON_RESIZE)
        # FIXME: substitute your icon file here.
        icon = wx.Icon('systray.ico', wx.BITMAP_TYPE_ICO)
        self.SetIcon(icon)
        if wx.Platform == '__WXMSW__':
            # setup a taskbar icon, and catch some events from it
            self.tbicon = wx.TaskBarIcon()
            self.tbicon.SetIcon(icon, "SysTray Demo")
            wx.EVT_TASKBAR_LEFT_DCLICK(self.tbicon, self.OnTaskBarActivate)
            wx.EVT_TASKBAR_RIGHT_UP(self.tbicon, self.OnTaskBarMenu)
            wx.EVT_MENU(self.tbicon, self.TBMENU_RESTORE, self.OnTaskBarActivate)
            wx.EVT_MENU(self.tbicon, self.TBMENU_CLOSE, self.OnTaskBarClose)
        wx.EVT_ICONIZE(self, self.OnIconify)
        return
    def OnIconify(self, evt):
        self.Hide()
        return
    def OnTaskBarActivate(self, evt):
        if self.IsIconized():
            self.Iconize(False)
        if not self.IsShown():
            self.Show(True)
        self.Raise()
        return
    def OnCloseWindow(self, event):
        if hasattr(self, "tbicon"):
            del self.tbicon
        self.Destroy()
    TBMENU_RESTORE = 1000
    TBMENU_CLOSE   = 1001
    def OnTaskBarMenu(self, evt):
        menu = wx.Menu()
        menu.Append(self.TBMENU_RESTORE, "Restore SysTray Demo")
        menu.Append(self.TBMENU_CLOSE,   "Close")
        self.tbicon.PopupMenu(menu)
        menu.Destroy()
    #---------------------------------------------
    def OnTaskBarClose(self, evt):
        self.Close()
        # because of the way wx.TaskBarIcon.PopupMenu is implemented we have to
        # prod the main idle handler a bit to get the window to actually close
        wx.GetApp().ProcessIdle()
class MyApp(wx.App):
    def OnInit(self):
        self.redirect=True
        frame = sysTrayDemo(None, -1, "SysTray Demo")
        frame.Show(True)
        return True
def main():
    app = MyApp()
    app.MainLoop()
if __name__ == '__main__':
    main()

Tips: Convert flv to mpg or avi

Following converts video.flv into video.mpg file:

CODE
ffmpeg -i video.flv -ab 56 -ar 22050 -b 500 -s 320x240 video.mpg

and following converts  video.flv into video.AVI with MP3 Audio:

CODE
ffmpeg -i I_test.flv -ab 56 -ar 22050 -b 500 -s 320x240 -vcodec xvid -acodec mp3 video.avi

FAQ: App-V: How to use the custom Exclusion List while Sequencing

Steps to create the custom exclusion list.

  1. Launch the AppV sequencer.
  2. Goto Tools -> Options
  3. Select “Exclusion Items” tab
  4. Add new exclusion items using “New Button”
  5. When all the exclusion items are added then press “Save As Default” button
  6. Copy the default.sprj file from “C:\Program Files\Microsoft Application Virtualization Sequencer\” or the folder where the sequencer was installed to some network share from where it can be accessed later.

Using the custom exclusion list

  1. Copy the saved default.sprj file to “C:\Program Files\Microsoft Application Virtualization Sequencer\” before launching the Sequencer.
  2. When launched the sequencer will take the exclusion list from the default.sft file.

Imaging WinXP using Knoppix

  1. Boot from knoppix
  2. Repartition your drive
    1. Base Partition – This is were your winXP is installed
    2. Image Partition – this is were your image of windows xp will be copied
  3. mount the  image partition: mount /dev/sda2 /media/img
  4. Use the command to create the img: ntfsclone -s -o /media/img/winxp.img /dev/sda1
  5. use the command to restore the img: ntfsclone  –restore-image -O /dev/sda1  /media/img/winxp.img
  6. Enjoy

Note: It is a good idea to have ext3 as filesystem for your image partition so that the image file is not deleted accidentally and also it overwrites the FAT32 2GB filesize limit.

TIPS: dpkg Error: dpkg: too many errors, stopping

apt-get and dpkg are great package management tools but there might be a time that you can face the following error:

dpkg: too many errors, stopping

also when you try `apt-get upgrade` or `apt-get dist-upgrade` you will be adviced that the previous application installation was not successful thus they should execute `dpkg –configure -a` and it returns the above error.

To resolve the issue run the following command

dpkg --configure -a --abort-after=99999

MAC OS Keys

Startup
Keystroke Description
Press X during startup Force Mac OS X startup
Press Option-Command-Shift-Delete
during startup Bypass primary startup volume and seek a different startup volume (such as a CD or external disk)
Press C during startup Start up from a CD that has a system folder
Press N during startup Attempt to start up from a compatible network server (NetBoot)
Press R during startup Force PowerBook screen reset
Press T during startup Start up in FireWire Target Disk mode
Press Shift during startup start up in Safe Boot mode and temporarily disable login items and non-essential kernel extension files (Mac OS X 10.2 and later)
Press Command-V during startup Start up in Verbose mode.
Press Command-S during startup Start up in Single-User mode (command line)