<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Tony McNeil's Weblog</title>
	<atom:link href="http://tonymcneil.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://tonymcneil.wordpress.com</link>
	<description>notes on code development &#38; software</description>
	<lastBuildDate>Mon, 02 Nov 2009 01:16:15 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='tonymcneil.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/a8cb3edf4586902820e219b280bfeb69?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Tony McNeil's Weblog</title>
		<link>http://tonymcneil.wordpress.com</link>
	</image>
			<item>
		<title>vTiger CRM 5.1.0 / PHP 5.3 and workflow module problem</title>
		<link>http://tonymcneil.wordpress.com/2009/11/02/vtiger-crm-5-1-0-php-5-3-and-workflow-module-problem/</link>
		<comments>http://tonymcneil.wordpress.com/2009/11/02/vtiger-crm-5-1-0-php-5-3-and-workflow-module-problem/#comments</comments>
		<pubDate>Mon, 02 Nov 2009 01:14:33 +0000</pubDate>
		<dc:creator>tony78it</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[php 5.3]]></category>
		<category><![CDATA[vTiger]]></category>
		<category><![CDATA[vTiger 5.1.0]]></category>
		<category><![CDATA[vTiger workflow]]></category>

		<guid isPermaLink="false">http://tonymcneil.wordpress.com/?p=43</guid>
		<description><![CDATA[vTiger CRM 5.1.0 / PHP 5.3 and workflow module problem<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tonymcneil.wordpress.com&blog=2508709&post=43&subd=tonymcneil&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>This is just a note in case anybody else has this problem as it was non-trivial to debug&#8230; and without prior knowledge of the changes in PHP 5.3 it might be hard to find.</p>
<p><strong>Long story short:</strong><br />
vTiger workflow module fails when editing a workflow by popping up an alert box saying &#8220;Failure:undefined&#8221;</p>
<p>The code that produces the error is around lines 100-110 in &lt;&lt;VTIGERHOME&gt;&gt;/modules/com_vtiger_workflow/resources/editworkflowscript.js</p>
<p>This is due to the AJAX call to vTigers internal REST service failing because it can&#8217;t find everything it needs in php&#8217;s $_REQUEST superglobal.<br />
(and thus produces an authentication failure exception).</p>
<p>The error occurs in the following file:<br />
&lt;&lt;VTIGERHOME&gt;&gt;/webservice.php</p>
<p>The code assumes $_COOKIE information is in the $_REQUEST variable (which it is prior to PHP 5.3).</p>
<p><strong>The fix:</strong><br />
Simply set the following php.ini directive to the following to emulate the pre php 5.3 behaviour&#8230;<br />
request_order = &#8220;GPC&#8221;</p>
<p>GPC stands for GET POST COOKIE<br />
Read more about the new directive here: <a href="http://php.net/manual/en/ini.core.php">http://php.net/manual/en/ini.core.php</a></p>
<p>Seeing as that setting is related to php security coding best practices we may just look at enabling it on a per vhost basis if going to production with vtiger on php 5.3<br />
(do this at your own risk though!!)</p>
<p>Here is a very good post in relation to the setting change:<br />
<a href="http://www.techworld.com.au/article/263089/upcoming_php_5_3_beefs_up_security">http://www.techworld.com.au/article/263089/upcoming_php_5_3_beefs_up_security</a></p>
Posted in php Tagged: php, php 5.3, vTiger, vTiger 5.1.0, vTiger workflow <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tonymcneil.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tonymcneil.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/tonymcneil.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/tonymcneil.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/tonymcneil.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/tonymcneil.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/tonymcneil.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/tonymcneil.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/tonymcneil.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/tonymcneil.wordpress.com/43/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tonymcneil.wordpress.com&blog=2508709&post=43&subd=tonymcneil&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://tonymcneil.wordpress.com/2009/11/02/vtiger-crm-5-1-0-php-5-3-and-workflow-module-problem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/73d70be116553fcb4421a0691644a42e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">tony</media:title>
		</media:content>
	</item>
		<item>
		<title>Installing XPath Explorer on NetBeans for Mac OSX</title>
		<link>http://tonymcneil.wordpress.com/2008/12/24/installing-xpath-explorer-on-netbeans-for-mac-osx/</link>
		<comments>http://tonymcneil.wordpress.com/2008/12/24/installing-xpath-explorer-on-netbeans-for-mac-osx/#comments</comments>
		<pubDate>Wed, 24 Dec 2008 07:08:46 +0000</pubDate>
		<dc:creator>tony78it</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[netbeans]]></category>
		<category><![CDATA[xpath]]></category>
		<category><![CDATA[xpath explorer]]></category>

		<guid isPermaLink="false">http://tonymcneil.wordpress.com/?p=35</guid>
		<description><![CDATA[I have only found this documentation on installing xpath explorer on netbeans, therefore I&#8217;ll give a little more info for mac osx (it&#8217;s easy but you have to search a little).
1. download the xpe-netbeans.jar file (from the xpe project download page).
2. place the xpe-netbeans.jar file in your NetBeans module lib dir, the following worked for [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tonymcneil.wordpress.com&blog=2508709&post=35&subd=tonymcneil&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I have only found <a href="http://sourceforge.net/forum/forum.php?thread_id=814514&amp;forum_id=182294">this documentation</a> on installing xpath explorer on netbeans, therefore I&#8217;ll give a little more info for mac osx (it&#8217;s easy but you have to search a little).</p>
<p>1. download the xpe-netbeans.jar file (from the <a href="http://sourceforge.net/projects/xpe/">xpe project</a> download page).</p>
<p>2. place the xpe-netbeans.jar file in your NetBeans module lib dir, the following worked for me:<br />
<code>/Applications/NetBeans/NetBeans 6.5.app/Contents/Resources/NetBeans/platform9/lib</code></p>
<p>3. restart NetBeans and you should see the following menu option: Tools &gt; XPath Explorer.</p>
<p>Adapt these instructions for your NetBeans installation path and version number if different.</p>
Posted in java, netbeans Tagged: java, netbeans, xpath, xpath explorer <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tonymcneil.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tonymcneil.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/tonymcneil.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/tonymcneil.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/tonymcneil.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/tonymcneil.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/tonymcneil.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/tonymcneil.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/tonymcneil.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/tonymcneil.wordpress.com/35/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tonymcneil.wordpress.com&blog=2508709&post=35&subd=tonymcneil&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://tonymcneil.wordpress.com/2008/12/24/installing-xpath-explorer-on-netbeans-for-mac-osx/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/73d70be116553fcb4421a0691644a42e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">tony</media:title>
		</media:content>
	</item>
		<item>
		<title>vi search pattern for replacing line numbers in code snippet</title>
		<link>http://tonymcneil.wordpress.com/2008/12/19/vi-search-pattern-for-replacing-line-numbers-in-code-snippet/</link>
		<comments>http://tonymcneil.wordpress.com/2008/12/19/vi-search-pattern-for-replacing-line-numbers-in-code-snippet/#comments</comments>
		<pubDate>Fri, 19 Dec 2008 06:23:13 +0000</pubDate>
		<dc:creator>tony78it</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[unix]]></category>
		<category><![CDATA[vi]]></category>

		<guid isPermaLink="false">http://tonymcneil.wordpress.com/?p=31</guid>
		<description><![CDATA[This is a useful search and replace pattern for deleting the line numbers in a code snippet&#8230;
use this command in vi (the unix based txt editor):
%s/^[0-9][0-9]\s*//g
this will delete (replace pattern with nothing) all the line numbers in the following code snippet (thus cleaning it and allowing you to compile it without first manually editing every [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tonymcneil.wordpress.com&blog=2508709&post=31&subd=tonymcneil&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>This is a useful search and replace pattern for deleting the line numbers in a code snippet&#8230;</p>
<p>use this command in vi (the unix based txt editor):</p>
<p><code>%s/^[0-9][0-9]\s*//g</code></p>
<p>this will delete (replace pattern with nothing) all the line numbers in the following code snippet (thus cleaning it and allowing you to compile it without first manually editing every line):</p>
<p><code>...<br />
03 import java.util.List;<br />
04 import java.util.ArrayList;<br />
05 import java.util.Iterator;<br />
06<br />
07 public class Todo {<br />
08 private String name;<br />
09 private String note;<br />
...</code></p>
Posted in linux, unix Tagged: vi <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tonymcneil.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tonymcneil.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/tonymcneil.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/tonymcneil.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/tonymcneil.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/tonymcneil.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/tonymcneil.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/tonymcneil.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/tonymcneil.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/tonymcneil.wordpress.com/31/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tonymcneil.wordpress.com&blog=2508709&post=31&subd=tonymcneil&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://tonymcneil.wordpress.com/2008/12/19/vi-search-pattern-for-replacing-line-numbers-in-code-snippet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/73d70be116553fcb4421a0691644a42e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">tony</media:title>
		</media:content>
	</item>
		<item>
		<title>getting the back end server name from an oracle db</title>
		<link>http://tonymcneil.wordpress.com/2008/09/15/getting-the-back-end-server-name-from-an-oracle-db/</link>
		<comments>http://tonymcneil.wordpress.com/2008/09/15/getting-the-back-end-server-name-from-an-oracle-db/#comments</comments>
		<pubDate>Mon, 15 Sep 2008 22:58:24 +0000</pubDate>
		<dc:creator>tony78it</dc:creator>
				<category><![CDATA[db]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://tonymcneil.wordpress.com/?p=22</guid>
		<description><![CDATA[In our hosting environment we have many servers running may different oracle instances.
Execute this query to get the back end server name (could still be a virtual server of course):
select HOST_NAME from v$instance
The only problem with this is that the user executing the SQL must have select permission on &#8220;sys.v$instance&#8221;. A better solution is to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tonymcneil.wordpress.com&blog=2508709&post=22&subd=tonymcneil&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>In our hosting environment we have many servers running may different oracle instances.</p>
<p>Execute this query to get the back end server name (could still be a virtual server of course):</p>
<p><code>select HOST_NAME from v$instance</code></p>
<p>The only problem with this is that the user executing the SQL must have select permission on &#8220;sys.v$instance&#8221;. A better solution is to use the in-built SYS_CONTEXT package, which is available to everyone and requires no extra permissions to run.</p>
<p>The query below demonstrates use of the package and some of the information you can get.<br />
<code>select sys_context ( 'USERENV', 'DB_NAME'      )      db_name,<br />
       sys_context ( 'USERENV', 'SESSION_USER' )      user_name,<br />
       sys_context ( 'USERENV', 'SERVER_HOST'  )      db_host,<br />
       sys_context ( 'USERENV', 'HOST'         )      user_host<br />
from   dual<br />
</code></p>
<p>NOTE: The parameter &#8216;SERVER_HOST&#8217; is available in 10G only.</p>
<p>Any Oracle User that can connect to the database can run a query against &#8220;dual&#8221;.<br />
No special permissions are required and SYS_CONTEXT provides a greater range of application specific information than &#8220;sys.v$instance&#8221;.</p>
<p>More information is available <a href="http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/functions165.htm">here</a></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/tonymcneil.wordpress.com/22/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/tonymcneil.wordpress.com/22/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tonymcneil.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tonymcneil.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/tonymcneil.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/tonymcneil.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/tonymcneil.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/tonymcneil.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/tonymcneil.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/tonymcneil.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/tonymcneil.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/tonymcneil.wordpress.com/22/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tonymcneil.wordpress.com&blog=2508709&post=22&subd=tonymcneil&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://tonymcneil.wordpress.com/2008/09/15/getting-the-back-end-server-name-from-an-oracle-db/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/73d70be116553fcb4421a0691644a42e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">tony</media:title>
		</media:content>
	</item>
		<item>
		<title>Installing netbeans 6.5M1 on ubuntu error:/usr/share/themes/Human/gtk-2.0/gtkrc:43: error: lexical error or unexpected token, expected valid token</title>
		<link>http://tonymcneil.wordpress.com/2008/08/06/installing-netbeans-65m1-on-ubuntu-errorusrsharethemeshumangtk-20gtkrc43-error-lexical-error-or-unexpected-token-expected-valid-token/</link>
		<comments>http://tonymcneil.wordpress.com/2008/08/06/installing-netbeans-65m1-on-ubuntu-errorusrsharethemeshumangtk-20gtkrc43-error-lexical-error-or-unexpected-token-expected-valid-token/#comments</comments>
		<pubDate>Wed, 06 Aug 2008 03:39:43 +0000</pubDate>
		<dc:creator>tony78it</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[netbeans]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[netbeans linux installer]]></category>

		<guid isPermaLink="false">http://tonymcneil.wordpress.com/?p=19</guid>
		<description><![CDATA[problem:
I get the following error when trying to run the linux netbeans 6.5M1 installer (netbeans-6.5_m1-php-linux.sh) on ubuntu 8.04:
/usr/share/themes/Human/gtk-2.0/gtkrc:43: error: lexical error or unexpected token, expected valid token
and then the installer window shows a blank screen.
(I&#8217;m guessing this post may relate to other versions of netbeans and ubuntu)
solution:
the problem was the jvm 1.5 I was running [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tonymcneil.wordpress.com&blog=2508709&post=19&subd=tonymcneil&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><strong>problem:</strong></p>
<p>I get the following error when trying to run the linux netbeans 6.5M1 installer (netbeans-6.5_m1-php-linux.sh) on ubuntu 8.04:</p>
<p><code>/usr/share/themes/Human/gtk-2.0/gtkrc:43: error: lexical error or unexpected token, expected valid token</code></p>
<p>and then the installer window shows a blank screen.</p>
<p>(I&#8217;m guessing this post may relate to other versions of netbeans and ubuntu)</p>
<p><strong>solution:</strong></p>
<p>the problem was the jvm 1.5 I was running under, updating to jvm 1.6 solves the problem&#8230; I installed the sun-java6-jdk and the jvm dependencies then when executing the installer I specified the java home as follows:</p>
<p><code>./netbeans-6.5_m1-php-linux.sh --javahome /usr/lib/jvm/java-6-sun</code></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/tonymcneil.wordpress.com/19/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/tonymcneil.wordpress.com/19/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tonymcneil.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tonymcneil.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/tonymcneil.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/tonymcneil.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/tonymcneil.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/tonymcneil.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/tonymcneil.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/tonymcneil.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/tonymcneil.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/tonymcneil.wordpress.com/19/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tonymcneil.wordpress.com&blog=2508709&post=19&subd=tonymcneil&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://tonymcneil.wordpress.com/2008/08/06/installing-netbeans-65m1-on-ubuntu-errorusrsharethemeshumangtk-20gtkrc43-error-lexical-error-or-unexpected-token-expected-valid-token/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/73d70be116553fcb4421a0691644a42e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">tony</media:title>
		</media:content>
	</item>
		<item>
		<title>chmod: copy user / owner permissions to group</title>
		<link>http://tonymcneil.wordpress.com/2008/07/24/chmod-copy-user-owner-permissions-to-group/</link>
		<comments>http://tonymcneil.wordpress.com/2008/07/24/chmod-copy-user-owner-permissions-to-group/#comments</comments>
		<pubDate>Thu, 24 Jul 2008 00:04:06 +0000</pubDate>
		<dc:creator>tony78it</dc:creator>
				<category><![CDATA[commands]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[unix]]></category>
		<category><![CDATA[linux commands]]></category>
		<category><![CDATA[unix commands]]></category>

		<guid isPermaLink="false">http://tonymcneil.wordpress.com/?p=14</guid>
		<description><![CDATA[This is a useful unix command to copy the file / dir owner permissions to the group:
find * -exec /bin/sh -c 'chmod g+`ls -ld "{}" &#124; cut -c2-4` "{}"' \;
As pointed out in the post below, chmod actually has built in support for this operation:
chmod g+u file
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tonymcneil.wordpress.com&blog=2508709&post=14&subd=tonymcneil&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>This is a useful unix command to copy the file / dir owner permissions to the group:</p>
<p><code>find * -exec /bin/sh -c 'chmod g+`ls -ld "{}" | cut -c2-4` "{}"' \;</code></p>
<p>As pointed out in the post below, chmod actually has built in support for this operation:</p>
<p><code>chmod g+u file</code></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/tonymcneil.wordpress.com/14/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/tonymcneil.wordpress.com/14/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tonymcneil.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tonymcneil.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/tonymcneil.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/tonymcneil.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/tonymcneil.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/tonymcneil.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/tonymcneil.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/tonymcneil.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/tonymcneil.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/tonymcneil.wordpress.com/14/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tonymcneil.wordpress.com&blog=2508709&post=14&subd=tonymcneil&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://tonymcneil.wordpress.com/2008/07/24/chmod-copy-user-owner-permissions-to-group/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/73d70be116553fcb4421a0691644a42e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">tony</media:title>
		</media:content>
	</item>
		<item>
		<title>(X tunnelling) xhost: unable to open display</title>
		<link>http://tonymcneil.wordpress.com/2008/07/23/x-tunnelling-xhost-unable-to-open-display/</link>
		<comments>http://tonymcneil.wordpress.com/2008/07/23/x-tunnelling-xhost-unable-to-open-display/#comments</comments>
		<pubDate>Wed, 23 Jul 2008 05:52:51 +0000</pubDate>
		<dc:creator>tony78it</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[xhost]]></category>

		<guid isPermaLink="false">http://tonymcneil.wordpress.com/?p=11</guid>
		<description><![CDATA[I&#8217;m running ubuntu 8.04 and had a problem tunneling the X display from a solaris box to my local ubuntu test server.
when executing this command in my bash script:
DISPLAY=localhost:0
export DISPLAY
xhost +
i would get the following message
xhost: unable to open display &#8220;localhost:0&#8243;
The problem being the by default ubuntu restricts tcp listening with the following configuration default [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tonymcneil.wordpress.com&blog=2508709&post=11&subd=tonymcneil&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I&#8217;m running ubuntu 8.04 and had a problem tunneling the X display from a solaris box to my local ubuntu test server.</p>
<p>when executing this command in my bash script:</p>
<p><code>DISPLAY=localhost:0<br />
export DISPLAY<br />
xhost +</code></p>
<p>i would get the following message</p>
<p>xhost: unable to open display &#8220;localhost:0&#8243;</p>
<p>The problem being the by default ubuntu restricts tcp listening with the following configuration default in:</p>
<p>/etc/gdm/gdm.conf<br />
<code><br />
# If true this will basically append -nolisten tcp to every X command line, a<br />
# good default to have (why is this a "negative" setting? because if it is<br />
# false, you could still not allow it by setting command line of any particular<br />
# server).  It's probably better to ship with this on since most users will not<br />
# need this and it's more of a security risk then anything else.<br />
# Note: Anytime we find a -query or -indirect on the command line we do not add<br />
# a "-nolisten tcp", as then the query just wouldn't work, so this setting only<br />
# affects truly attached sessions.<br />
<strong>DisallowTCP=true</strong></code></p>
<p>To fix the error message you can cgange the config option to:</p>
<p><code><strong>DisallowTCP=false</strong></code></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/tonymcneil.wordpress.com/11/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/tonymcneil.wordpress.com/11/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tonymcneil.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tonymcneil.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/tonymcneil.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/tonymcneil.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/tonymcneil.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/tonymcneil.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/tonymcneil.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/tonymcneil.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/tonymcneil.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/tonymcneil.wordpress.com/11/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tonymcneil.wordpress.com&blog=2508709&post=11&subd=tonymcneil&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://tonymcneil.wordpress.com/2008/07/23/x-tunnelling-xhost-unable-to-open-display/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/73d70be116553fcb4421a0691644a42e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">tony</media:title>
		</media:content>
	</item>
		<item>
		<title>eclipse file associations</title>
		<link>http://tonymcneil.wordpress.com/2008/05/24/eclipse-file-associations/</link>
		<comments>http://tonymcneil.wordpress.com/2008/05/24/eclipse-file-associations/#comments</comments>
		<pubDate>Sat, 24 May 2008 04:06:29 +0000</pubDate>
		<dc:creator>tony78it</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[eclipse configuration]]></category>

		<guid isPermaLink="false">http://tonymcneil.wordpress.com/?p=10</guid>
		<description><![CDATA[Quick easy note on associating certain file extensions with an editor in eclipse e.g. I&#8217;m developing .module and .info files for drupal modules. Just goto eclipse preferences -&#62; general -&#62; content types, then add the file associations using the add dialog
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tonymcneil.wordpress.com&blog=2508709&post=10&subd=tonymcneil&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Quick easy note on associating certain file extensions with an editor in eclipse e.g. I&#8217;m developing .module and .info files for drupal modules. Just goto eclipse preferences -&gt; general -&gt; content types, then add the file associations using the add dialog</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/tonymcneil.wordpress.com/10/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/tonymcneil.wordpress.com/10/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tonymcneil.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tonymcneil.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/tonymcneil.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/tonymcneil.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/tonymcneil.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/tonymcneil.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/tonymcneil.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/tonymcneil.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/tonymcneil.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/tonymcneil.wordpress.com/10/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tonymcneil.wordpress.com&blog=2508709&post=10&subd=tonymcneil&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://tonymcneil.wordpress.com/2008/05/24/eclipse-file-associations/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/73d70be116553fcb4421a0691644a42e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">tony</media:title>
		</media:content>
	</item>
		<item>
		<title>eclipse.ini -vm option</title>
		<link>http://tonymcneil.wordpress.com/2008/03/26/eclipseini-vm-option/</link>
		<comments>http://tonymcneil.wordpress.com/2008/03/26/eclipseini-vm-option/#comments</comments>
		<pubDate>Wed, 26 Mar 2008 07:10:15 +0000</pubDate>
		<dc:creator>tony78it</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[configuration]]></category>
		<category><![CDATA[eclipse]]></category>

		<guid isPermaLink="false">http://tonymcneil.wordpress.com/?p=9</guid>
		<description><![CDATA[Note to self when configuring the &#8220;-vm&#8221; option in eclipse.ini&#8230; Place the path to your jdk on a new line i.e.
...
-vm
C:\programs\Java\jdk1.6.0\bin
...
and not:
...
-vm C:\programs\Java\jdk1.6.0\bin
...
Also to see what configuration options stuck goto menu item: Help -&#62; About Eclipse Platform, then click Configuration Details button.
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tonymcneil.wordpress.com&blog=2508709&post=9&subd=tonymcneil&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Note to self when configuring the &#8220;-vm&#8221; option in eclipse.ini&#8230; Place the path to your jdk on a new line i.e.</p>
<p><code>...<br />
<strong>-vm<br />
C:\programs\Java\jdk1.6.0\bin</strong><br />
...</code></p>
<p>and not:<br />
<code>...<br />
-vm C:\programs\Java\jdk1.6.0\bin<br />
...</code></p>
<p>Also to see what configuration options stuck goto menu item: Help -&gt; About Eclipse Platform, then click Configuration Details button.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/tonymcneil.wordpress.com/9/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/tonymcneil.wordpress.com/9/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tonymcneil.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tonymcneil.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/tonymcneil.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/tonymcneil.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/tonymcneil.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/tonymcneil.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/tonymcneil.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/tonymcneil.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/tonymcneil.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/tonymcneil.wordpress.com/9/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tonymcneil.wordpress.com&blog=2508709&post=9&subd=tonymcneil&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://tonymcneil.wordpress.com/2008/03/26/eclipseini-vm-option/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/73d70be116553fcb4421a0691644a42e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">tony</media:title>
		</media:content>
	</item>
		<item>
		<title>java &amp; struts file download</title>
		<link>http://tonymcneil.wordpress.com/2008/01/31/java-struts-file-download/</link>
		<comments>http://tonymcneil.wordpress.com/2008/01/31/java-struts-file-download/#comments</comments>
		<pubDate>Thu, 31 Jan 2008 01:08:34 +0000</pubDate>
		<dc:creator>tony78it</dc:creator>
				<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://tonymcneil.wordpress.com/?p=8</guid>
		<description><![CDATA[Your file POJO will look somthing like this:
public interface MyFile
{
public int getAppraisalFindingsFileId();
public void setAppraisalFindingsFileId(int appraisalFindingsFileId);
public int getAppraisalId();
public void setAppraisalId(int appraisalId);
public String getFileName();
public void setFileName(String fileName);
public int getFileSize();
public void setFileSize(int fileSize);
public Calendar getUploadedDate();
public void setUploadedDate(Calendar uploadedDate);
public String getUploadedBy();
public void setUploadedBy(String uploadedBy);
public byte[] getFileData();
public void setFileData(byte[] fileData);
}
Once you have your file data do something similar to this [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tonymcneil.wordpress.com&blog=2508709&post=8&subd=tonymcneil&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><b>Your file POJO will look somthing like this:</b><br />
<code>public interface MyFile<br />
{<br />
public int getAppraisalFindingsFileId();<br />
public void setAppraisalFindingsFileId(int appraisalFindingsFileId);<br />
public int getAppraisalId();<br />
public void setAppraisalId(int appraisalId);<br />
public String getFileName();<br />
public void setFileName(String fileName);<br />
public int getFileSize();<br />
public void setFileSize(int fileSize);<br />
public Calendar getUploadedDate();<br />
public void setUploadedDate(Calendar uploadedDate);<br />
public String getUploadedBy();<br />
public void setUploadedBy(String uploadedBy);<br />
public byte[] getFileData();<br />
public void setFileData(byte[] fileData);<br />
}</code></p>
<p><b>Once you have your file data do something similar to this in your Forms Action class execute method:</b><br />
<code>public ActionForward execute(ActionMapping mapping, ActionForm form,<br />
HttpServletRequest request, HttpServletResponse response)<br />
throws Exception<br />
{<br />
//...<br />
// do something like this...<br />
response.setContentLength(myFile.getFileSize());<br />
response.setContentType("application/x-file-download");<br />
response.setHeader("Content-disposition",<br />
"attachment; filename="<br />
+ URLEncoder.encode(myFile.getFileName(), "UTF-8"));<br />
response.setHeader("Cache-Control",<br />
"max-age=600");<br />
ServletOutputStream outStream = response.getOutputStream();<br />
outStream.write(myFile.getFileData());<br />
outStream.flush();<br />
//...<br />
}</code></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/tonymcneil.wordpress.com/8/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/tonymcneil.wordpress.com/8/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tonymcneil.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tonymcneil.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/tonymcneil.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/tonymcneil.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/tonymcneil.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/tonymcneil.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/tonymcneil.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/tonymcneil.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/tonymcneil.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/tonymcneil.wordpress.com/8/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tonymcneil.wordpress.com&blog=2508709&post=8&subd=tonymcneil&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://tonymcneil.wordpress.com/2008/01/31/java-struts-file-download/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/73d70be116553fcb4421a0691644a42e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">tony</media:title>
		</media:content>
	</item>
	</channel>
</rss>