SGMLXML.net A place for SGML and XML application developers.

October 16, 2005

Patch available for VMWare 5 on Fedora Core 4

Filed under: Linux,Software — cangione @ 7:33 am

VMWare 5 will not run on FC4 without running the vmware-any-any-update
after installation.

Instructions:

  1. Install VMWare 5
  2. Grab the latest vmware patch from http://knihovny.cvut.cz/ftp/pub/vmware
  3. Extract the files into a temporary directory.
  4. CD into the directory and run the runme.pl script.
  5. This replaces two files in the VMWare installation with updated
    version for FC4.
  6. Run vmware-config.pl

REFERENCES

  • https://www.vmware.com/community/thread.jspa?threadID=18088&tstart=0

October 6, 2005

ACID Test & Transactions Defined

Filed under: Software — cangione @ 7:51 pm

Acid test is a phrase that can also refer to a foolproof test that will accurately determine the validity of something. The origins come from the gold rush in the United States. Gold does not react to most acids (unlike most metals) but does to nitric acid. The acid test was then used to confirm if gold was indeed found.[1]

Transactions provide several important properties, referred to as the ACID properties: [2]

  • Atomicity:
    A transaction is either successful or unsuccessful. Either all of the operations that make up a transaction take effect or none take effect. A successful transaction is said to commit. An unsuccessful transaction is said to abort. Any operations performed by an aborted transaction are undone (rolled back) so that its effects are not visible.
  • Consistency:
    A transaction transforms distributed data from one consistent state to another. The application program is responsible for ensuring consistency.
  • Isolation:
    Each transaction appears to run independently of other transactions that are running concurrently. The effects of a transaction are not visible to others until the transaction completes (commits or aborts). The transactions appear to be serialized, with two or more transactions acting as though one completed before the other began, even though they are executed concurrently.
  • Durability:
    Also known as permanence, this property ensures that once completed, the effects of a transaction are permanent. A subsequent failure (such as abnormal program termination, communications failure, or hardware failure) does not cause the effects to be undone. Transactions are often used to control and moderate access to a centralized database. Typical uses for transaction processing systems include database-oriented applications such as airline reservation systems and automatic bank-teller machines.

[1] From Wikipedia
[2] Red Hat Web Application Framework Developer Guide

September 24, 2005

Setting up VI navigation commands in Firefox 1.0.5 or later

Filed under: Software — cangione @ 1:20 am

vi geeks (Emacs is ok too I guess....) this is tooooooooooo cool! For
those of us that actually remember how to do things before the
invention of the mouse this modification is for you in Firefox! The
following procedure will add keybindings that simulate vi navigation
movements such as the j and k keys.

  1. For versions following 1.0.5 the platformHTMLBindings.xml
    file has moved inside the $firefox_home/chrome/toolkit.jar
    (content/global/platformHTMLBindings.xml within the JAR file)
    .
    • You'll need to extract the existing file from the archive,
      modify it, then update the archive.
    • The simplest way to modify the file is to move the jar file
      into a working directory, unpack it, modify the file, the repack it
      into the jar. Suggest that you also make a backup of the original toolkit.jar file while you are at it.
  2. Move the JAR file to a working directory:
    cd $MOZILLA_HOME/chrome/
    cp toolkit.jar $WORKING_DIRECTORY
    cd $WORKING_DIRECTORY
  3. Unpack the JAR file with the Java Archive Utility:
    jar -xf toolkit.jar
  4. Modify the file which will now be located at
    $WORKING_DIRECTORY/content/global/platformHTMLBindings.xml

    Add the entries listed below as children of the <binding id="browser"><handlers> element:

    <handler event="keypress" key="k"command="cmd_scrollLineUp"/>
    <handler event="keypress" key="j" command="cmd_scrollLineDown"/>
    <handler event="keypress" key="l" command="cmd_scrollRight"/>
    <handler event="keypress" key="h" command="cmd_scrollLeft"/>
  5. Repack the JAR file:
    cd $WORKING_DIRECTORY
    jar -cf toolkit.jar content/	
    
  6. Copy the new JAR file back.
  7. Restart the browser and get away from the dreaded Carpal Tunnel
    syndrome!

NOTE: If you have turned on the Advanced Firefox
option "Begin finding when you being typing" this should
be turned off. By typing a /
character you can start a search for any text on the page and by typing
a ' character you can start a
search for any link on a page. For more info refer to the Firefox
Keyboard Shortcuts
page.

CREDITS
I believe that this is the first page that has been updated to
accomplish this task for vi navigation on Firefox versions after 1.0.5 (HINT:
If you are using a version of Firefox before 1.0.6 YOU ARE NOT
PRACTICING SAFE BROWSING).
The instructions provided here were
based on instructions for earlier versions of Firefox gathered from the
following pages:

September 20, 2005

Google Alerts

Filed under: Software — @ 9:30 pm

Google Labs is still coming out with great stuff. Google
Alerts
is worth a look.

http://www.google.com/alerts

The alerts give you targeted search results in an e-mail based on your
choice of query. The results are e-mailed to you based on a schedule
you select. It is a good way of keeping current on a particular
industry or topic. The query can search either the Google news site or
their web search with an additional option to search both.

A nice enhancement to this service would be creating an RSS or ATOM
feed for the results instead of sending it via e-mail.

September 8, 2005

Non breaking space Definition

Filed under: XML — cangione @ 8:09 pm

Lines are broken as result of one of two conditions. The first
condition is the presence of an explicit line breaking
character. The second condition results from a formatting algorithm
having selected among available line break opportunities; ideally the
chosen line break results in the optimal layout of the text.

NO-BREAK SPACE is the preferred character to
use where two words should be visually separated but kept on the same
line, as in the example of a currency value.

Entity defined for a non breaking space:

<!ENTITY nbsp   "&#160;">    

Reference:

August 21, 2005

Clear DHCP Leases in Linux

Filed under: Linux — cangione @ 1:18 am







When switching networks the DHCP lease on a network adapter such as eth1 is not always cleared causing problems connecting to another network. You can manually remove the lease by going to:

/var/lib/dhcp/*.leases


August 16, 2005

Return Path of APTCUSTOM Folder

Filed under: ACL — @ 11:58 pm

Function for finding the location of the customer folder for Epic
Editor and Styler.

_custom::get_custom_directory();

August 10, 2005

Optional Ant Tasks

Filed under: ANT — cangione @ 1:12 am







Not all tasks are built into the core distribution of ANT. There are additional tasks that ANT can perform if the option is available.

For a list of optional tasks refer to:


Suspend to Memory

Filed under: Linux — cangione @ 12:15 am







ACPI, which stands for Advanced Configuration and Power Interface, is the successor to APM (Advanced Power Management). The specification provides for many functions besides power management, such as thermal management and plug-and-play events.

The purpose of this post is to outline the steps for setting up ACPI suspend to memory under Fedora Core 4. When the lid is closed on the laptop, the system should suspend.

File setup

Create the file /etc/acpi/events/lid.conf containing the lines

  event=button[/]lid
  action=/etc/acpi/actions/sleep.sh

Create the file /etc/acpi/actions/sleep.sh containing the lines

  #!/bin/sh
  /usr/bin/dbus-send --system 
      --dest=org.freedesktop.NetworkManager
      --type=method_call      
 /org/freedesktop/NetworkManager     
 org.freedesktop.NetworkManager.sleep

  /sbin/hwclock --systohc
  echo -n mem > /sys/power/state
  /sbin/hwclock --hctosys

and make it executable.

  chmod 755 /etc/acpi/actions/sleep.sh

Helpful Sources of Information


August 4, 2005

Removing RPMs from Linux

Filed under: Linux — cangione @ 2:28 am







One task that is often needed is the ability to remove rpms that are currently installed.

The following example demonstrates how to remove installed rpms.

Lets say we need to find the apache package. First you need to find the specific version.

[root@localhost]# rpm -qa apache | grep apache
apache-1.3.19-5
[root@localhost]#

So, we need to remove the apache-1.3.19-5 package.

[root@localhost]# rpm -w apache-1.3.19-5

All gone assuming there were no dependency problems.

July 30, 2005

WINE for Me!

Filed under: Linux — cangione @ 7:53 pm







Setup WINE recently to give me access to some old and some new Windows programs from Linux. Wine is an Open Source implementation of the Windows API on top of X.

From more information on WINE and to get the latest copy, refer to

http://www.winehq.com/

A must have once you get WINE installed is WINE TOOLS. This will help you get your virtual windows file system setup etc.

http://www.von-thadden.de/Joachim/WineTools/index.html

List of the Programs that I was able to get working under the latest version of WINE (Note programs that ran on Windows 98 have a fair success rate. Newer programs have less success unless they have been a focus for the WINE developers.)

  • Internet Explorer 6 SP1 (Mouse Events and Drag and Drop are a bit strange. Drag and Drop crashes the X Window)
  • Office 97 (MS Word mouse events are a bit funky but it at least gives you a true representation of the document)
  • Visio 4
  • Adobe Acrobat 4.0 (Not the reader but the full thing) Reader should work as well.

WINE is definitely not a substitute for VMWARE but it brings some nice additional functionality to the Linux Desktop.


July 22, 2005

Looking up keys in a separate xml file

Filed under: XSLT — cangione @ 2:26 pm







Was recently working on an XSLT filter that extracted the text portion of SVG graphics into another file for translation. Once translated I needed a mechanism to merge the text back into the graphic. The document function did nicely.

Example:

<xsl:key name="descriptionlookup" 
match="Descriptions/Description" use="@name"/>
<xsl:variable name="desc" select="document('desc.xml')"/>

Later....

<xsl:template match="InsertDescription">
	<xsl:variable name="key_value" select="@lookup"/>
	<xsl:for-each select="$desc">
	<xsl:copy-of 
        select="key('descriptionlookup',$key_value)/Para"/>
	</xsl:for-each>
</xsl:template>


« Newer PostsOlder Posts »

Powered by WordPress