<?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/"
	>

<channel>
	<title>Tom Luo</title>
	<atom:link href="http://oracleabc.com/b/feed" rel="self" type="application/rss+xml" />
	<link>http://oracleabc.com/b</link>
	<description>Oracle, MySQL, Java, Ruby, Python, Cognos, Linux</description>
	<lastBuildDate>Thu, 12 Jan 2012 05:15:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>Query wiki from command line</title>
		<link>http://oracleabc.com/b/archives/2875</link>
		<comments>http://oracleabc.com/b/archives/2875#comments</comments>
		<pubDate>Thu, 12 Jan 2012 05:09:35 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://oracleabc.com/b/?p=2875</guid>
		<description><![CDATA[#!/usr/bin/env python __author__ = &#34;Tom Luo&#34; __version__ = &#34;$Revision 0.1 $&#34; __date__ =&#34;$Date: 2012/01/11 11:11PM MST$&#34; import os, urllib, sys import re def f(s): return s.find('remove the lines that containt this string') &#60; 0 #url = 'http://en.wikipedia.org/wiki/' + '_'.join(sys.argv[1:]) url = 'http://en.wikipedia.org/w/index.php?search=' + '+'.join(sys.argv[1:]) fobj= os.popen(&#34;lynx -dump -width=120 %s&#34; % url) output = fobj.read() fobj.close() [...]]]></description>
			<content:encoded><![CDATA[<pre class="brush: python; title: ;">
#!/usr/bin/env python

__author__ = &quot;Tom Luo&quot;
__version__ = &quot;$Revision 0.1 $&quot;
__date__ =&quot;$Date: 2012/01/11 11:11PM MST$&quot;

import os, urllib, sys
import re

def f(s):
    return s.find('remove the lines that containt this string') &lt; 0

#url = 'http://en.wikipedia.org/wiki/' + '_'.join(sys.argv[1:])
url = 'http://en.wikipedia.org/w/index.php?search=' + '+'.join(sys.argv[1:])
fobj= os.popen(&quot;lynx -dump -width=120 %s&quot; % url)
output = fobj.read()
fobj.close()
start = output.find(&quot;From Wikipedia, the free encyclopedia&quot;)
end = output.find(&quot;Terms of use for details&quot;)
lines = output[start:end]
lines = reversed(re.split('\[\d+\]',lines))
lines = filter(f,lines)
print '.'.join(lines)
</pre>
<p>Save the above script as wiki<br />
Examples</p>
<pre class="brush: bash; title: ;">
$chmod +x wiki
$wiki china
$wiki barack obama
$wiki austin tx
$wiki salem oregon
</pre>
]]></content:encoded>
			<wfw:commentRss>http://oracleabc.com/b/archives/2875/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google from command line</title>
		<link>http://oracleabc.com/b/archives/2868</link>
		<comments>http://oracleabc.com/b/archives/2868#comments</comments>
		<pubDate>Thu, 05 Jan 2012 06:09:35 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://oracleabc.com/b/?p=2868</guid>
		<description><![CDATA[#!/usr/bin/env python __author__ = &#34;Tom Luo&#34; __version__ = &#34;$Revision 0.1 $&#34; __date__ =&#34;$Date: 2012/01/04 11:11PM MST$&#34; import os, urllib, sys import re def f(x): return x.find('Cached') &#60; 0 filename = 'http://www.google.com/search?' + urllib.urlencode({'q': ' '.join(sys.argv[1:]) }) fobj= os.popen(&#34;lynx -dump -width=120 %s&#34; % filename) output = fobj.read() fobj.close() start = output.find(&#34;Web Results 1 - 10&#34;) end [...]]]></description>
			<content:encoded><![CDATA[<pre class="brush: python; title: ;">
#!/usr/bin/env python

__author__ = &quot;Tom Luo&quot;
__version__ = &quot;$Revision 0.1 $&quot;
__date__ =&quot;$Date: 2012/01/04 11:11PM MST$&quot;

import os, urllib, sys
import re

def f(x):
    return x.find('Cached') &lt; 0

filename = 'http://www.google.com/search?' + urllib.urlencode({'q': ' '.join(sys.argv[1:]) })
fobj= os.popen(&quot;lynx -dump -width=120 %s&quot; % filename)
output = fobj.read()
fobj.close()
start = output.find(&quot;Web Results 1 - 10&quot;)
end = output.find(&quot;Searches related to:&quot;)
lines = output[start:end]
lines = reversed(re.split('\[\d+\]',lines))
lines = filter(f,lines)
print '.'.join(lines)
</pre>
<pre class="brush: bash; title: ;">
chmod +x g.sh
g.sh oracle
</pre>
]]></content:encoded>
			<wfw:commentRss>http://oracleabc.com/b/archives/2868/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install Shellinabox on Ubuntu</title>
		<link>http://oracleabc.com/b/archives/2862</link>
		<comments>http://oracleabc.com/b/archives/2862#comments</comments>
		<pubDate>Fri, 30 Dec 2011 05:39:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://oracleabc.com/b/?p=2862</guid>
		<description><![CDATA[1. Download the installer wget http://shellinabox.googlecode.com/files/shellinabox_2.10-1_i386.deb 2. Change the default port number if you like /etc/default/shellinabox so that the default port is 443. Then restart the shellinabox daemon: sudo invoke-rc.d shellinabox restart Access shellinabox server from my phone: https://your_home_internet_ip]]></description>
			<content:encoded><![CDATA[<p>1. Download the installer<br />
wget http://shellinabox.googlecode.com/files/shellinabox_2.10-1_i386.deb</p>
<p>2. Change the default port number if you like<br />
 /etc/default/shellinabox so that the default port is 443.</p>
<p>Then restart the shellinabox daemon:<br />
sudo invoke-rc.d shellinabox restart</p>
<p> Access shellinabox server from my phone: https://your_home_internet_ip</p>
]]></content:encoded>
			<wfw:commentRss>http://oracleabc.com/b/archives/2862/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google-like spell suggestion</title>
		<link>http://oracleabc.com/b/archives/2855</link>
		<comments>http://oracleabc.com/b/archives/2855#comments</comments>
		<pubDate>Wed, 28 Dec 2011 06:11:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://oracleabc.com/b/?p=2855</guid>
		<description><![CDATA[I was reading Peter Norvig&#8217;s article on Boxing Day. I simply added the __main__ section and used it to do my spell checking from shell. Download big.txt from here. #!/usr/bin/env python import re, collections def words(text): return re.findall('[a-z]+', text.lower()) def train(features): model = collections.defaultdict(lambda: 1) for f in features: model[f] += 1 return model NWORDS [...]]]></description>
			<content:encoded><![CDATA[<p>I was reading Peter Norvig&#8217;s <a href="http://www.norvig.com/spell-correct.html">article</a> on Boxing Day.</p>
<p>I simply added the __main__ section and used it to do my spell checking from shell.</p>
<p>Download big.txt from <a href="http://www.norvig.com/big.txt">here</a>.</p>
<pre class="brush: python; title: ;">
#!/usr/bin/env python

import re, collections

def words(text): return re.findall('[a-z]+', text.lower()) 

def train(features):
    model = collections.defaultdict(lambda: 1)
    for f in features:
        model[f] += 1
    return model

NWORDS = train(words(file('big.txt').read()))

alphabet = 'abcdefghijklmnopqrstuvwxyz'

def edits1(word):
   splits     = [(word[:i], word[i:]) for i in range(len(word) + 1)]
   deletes    = [a + b[1:] for a, b in splits if b]
   transposes = [a + b[1] + b[0] + b[2:] for a, b in splits if len(b)&gt;1]
   replaces   = [a + c + b[1:] for a, b in splits for c in alphabet if b]
   inserts    = [a + c + b     for a, b in splits for c in alphabet]
   return set(deletes + transposes + replaces + inserts)

def known_edits2(word):
    return set(e2 for e1 in edits1(word) for e2 in edits1(e1) if e2 in NWORDS)

def known(words): return set(w for w in words if w in NWORDS)

def correct(word):
    candidates = known([word]) or known(edits1(word)) or known_edits2(word) or [word]
    return max(candidates, key=NWORDS.get)

if __name__ == &quot;__main__&quot;:
    import sys
    import  os
    os.system('clear')
    if len(sys.argv) == 1 :
        print &quot;usage: spell word&quot;
    else:
        s = sys.argv[1]
        print s
        print &quot;Did you mean %s?&quot; % correct(s)
</pre>
]]></content:encoded>
			<wfw:commentRss>http://oracleabc.com/b/archives/2855/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Access PI from Python</title>
		<link>http://oracleabc.com/b/archives/2850</link>
		<comments>http://oracleabc.com/b/archives/2850#comments</comments>
		<pubDate>Sun, 13 Nov 2011 14:02:33 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PI]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://oracleabc.com/b/?p=2850</guid>
		<description><![CDATA[# Python PISDK test on Python 3.x # Install Python extension for Windows import win32com.client import time pi_sdk = win32com.client.Dispatch('PISDK.PISDK') conn = win32com.client.Dispatch('PISDKDlg.Connections') pi_server = pi_sdk.Servers('my_pi_server') # PI server or collective name conn.Login(pi_server,'pidemo','',1,0) # using point tag: SINUSOID (pre-configured by default in demo PI server) pi_point = pi_server.PIPoints['SINUSOID'] # retriving recorded data for the last [...]]]></description>
			<content:encoded><![CDATA[<p># Python PISDK test on Python 3.x<br />
# Install Python extension for Windows</p>
<pre class="brush: python; title: ;">
import win32com.client
import time

pi_sdk = win32com.client.Dispatch('PISDK.PISDK')
conn   = win32com.client.Dispatch('PISDKDlg.Connections')

pi_server = pi_sdk.Servers('my_pi_server') # PI server or collective name
conn.Login(pi_server,'pidemo','',1,0)

# using point tag: SINUSOID (pre-configured by default in demo PI server)
pi_point = pi_server.PIPoints['SINUSOID']

# retriving recorded data for the last 6 hours:
recorded_values = pi_point.Data.RecordedValues('*-2h','*',3,&quot;&quot;,0,None)
time.sleep(0.1) # allow time for the call to complete.

print (recorded_values.Count)
for sample in recorded_values:
    v = sample.Value
    t = sample.TimeStamp.LocalDate
    print (&quot;Value =&quot;,v, &quot; (timestamp =&quot;,t,&quot;)&quot;)

# Print Snapshot value
pv = pi_point.Data.Snapshot
print (pv.Value)
</pre>
]]></content:encoded>
			<wfw:commentRss>http://oracleabc.com/b/archives/2850/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Seconds since midnight</title>
		<link>http://oracleabc.com/b/archives/2848</link>
		<comments>http://oracleabc.com/b/archives/2848#comments</comments>
		<pubDate>Thu, 01 Sep 2011 21:24:52 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[PI]]></category>

		<guid isPermaLink="false">http://oracleabc.com/b/?p=2848</guid>
		<description><![CDATA[ORACLE: select to_number(to_char(sysdate,'SSSSS')) from dual; OSISofit PI Performance Equation DaySec(&#8216;*&#8217;)]]></description>
			<content:encoded><![CDATA[<p>ORACLE:</p>
<pre class="brush: sql; title: ;">
select to_number(to_char(sysdate,'SSSSS')) from dual;
</pre>
<p>OSISofit PI Performance Equation<br />
DaySec(&#8216;*&#8217;)</p>
]]></content:encoded>
			<wfw:commentRss>http://oracleabc.com/b/archives/2848/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>shutdown &#8211; Ubuntu</title>
		<link>http://oracleabc.com/b/archives/2844</link>
		<comments>http://oracleabc.com/b/archives/2844#comments</comments>
		<pubDate>Fri, 19 Aug 2011 04:56:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://oracleabc.com/b/?p=2844</guid>
		<description><![CDATA[sudo gedit /etc/crontab &#8211; shutdown at 10:00pm with 1 minute notice. 0 22 * * * root shutdown -h +1]]></description>
			<content:encoded><![CDATA[<p>sudo gedit /etc/crontab</p>
<p>&#8211; shutdown at 10:00pm with 1 minute notice.<br />
0 22    * * *    root    shutdown -h +1</p>
]]></content:encoded>
			<wfw:commentRss>http://oracleabc.com/b/archives/2844/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Firebird Recursive Query &#8211; Tree</title>
		<link>http://oracleabc.com/b/archives/2837</link>
		<comments>http://oracleabc.com/b/archives/2837#comments</comments>
		<pubDate>Tue, 12 Jul 2011 03:00:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://oracleabc.com/b/?p=2837</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p><img src="/b/pics/firebird_tree_query.png" alt="Firebird Tree Query" /></p>
]]></content:encoded>
			<wfw:commentRss>http://oracleabc.com/b/archives/2837/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Units conversion in Ubuntu</title>
		<link>http://oracleabc.com/b/archives/2834</link>
		<comments>http://oracleabc.com/b/archives/2834#comments</comments>
		<pubDate>Tue, 12 Jul 2011 01:56:16 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://oracleabc.com/b/?p=2834</guid>
		<description><![CDATA[#sudo apt-get install units .units 2411 units, 71 prefixes, 33 nonlinear units You have: 16 meters You want: feet * 52.493438 / 0.01905 You have: Press Ctr + d to exit Many more interesting examples]]></description>
			<content:encoded><![CDATA[<p>#sudo apt-get install units</p>
<p>.units<br />
2411 units, 71 prefixes, 33 nonlinear units</p>
<p>You have: 16 meters<br />
You want: feet<br />
	* 52.493438<br />
	/ 0.01905<br />
You have: </p>
<p>Press Ctr + d to exit</p>
<p>Many more interesting <a href="/b/pics/man_units.txt">examples</a></p>
]]></content:encoded>
			<wfw:commentRss>http://oracleabc.com/b/archives/2834/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Compile and run C# application on Ubuntu</title>
		<link>http://oracleabc.com/b/archives/2822</link>
		<comments>http://oracleabc.com/b/archives/2822#comments</comments>
		<pubDate>Mon, 30 May 2011 04:02:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://oracleabc.com/b/?p=2822</guid>
		<description><![CDATA[[sony]$cat hello.cs using System; public class ParentClass { public ParentClass() { Console.WriteLine(&#34;Parent Constructor.&#34;); } public void print() { Console.WriteLine(&#34;I'm a Parent Class.&#34;); } } public class ChildClass : ParentClass { public ChildClass() { Console.WriteLine(&#34;Child Constructor.&#34;); } public static void Main() { ChildClass child = new ChildClass(); child.print(); } } [sony]$gmcs hello.cs [sony]$mono hello.exe Hello C#]]></description>
			<content:encoded><![CDATA[<p>[sony]$cat hello.cs</p>
<pre class="brush: csharp; title: ;">
using System;
public class ParentClass
{
public ParentClass()
{
Console.WriteLine(&quot;Parent Constructor.&quot;);
}
public void print()
{
Console.WriteLine(&quot;I'm a Parent Class.&quot;);
}
}

public class ChildClass : ParentClass
{
public ChildClass()
{
Console.WriteLine(&quot;Child Constructor.&quot;);
}
public static void Main()
{
ChildClass child = new ChildClass();
child.print();
}
}
</pre>
<p>[sony]$gmcs hello.cs</p>
<p>[sony]$mono hello.exe<br />
Hello C#</p>
]]></content:encoded>
			<wfw:commentRss>http://oracleabc.com/b/archives/2822/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>VBScript DateDiff</title>
		<link>http://oracleabc.com/b/archives/2820</link>
		<comments>http://oracleabc.com/b/archives/2820#comments</comments>
		<pubDate>Thu, 26 May 2011 04:39:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://oracleabc.com/b/?p=2820</guid>
		<description><![CDATA[DateDiff(interval,date1,date2[,firstdayofweek[,firstweekofyear]]) Notes: 1. interval &#8216;m&#8217; stands for month, use &#8216;n&#8217; for seconds 2. returns a negative nubmer if date1 < date2, otherwise, positve Parameter Description interval The interval you want to use to calculate the differences between date1 and date2 Can take the following values: yyyy &#8211; Year q &#8211; Quarter m &#8211; Month y [...]]]></description>
			<content:encoded><![CDATA[<p>DateDiff(interval,date1,date2[,firstdayofweek[,firstweekofyear]])</p>
<p>Notes:</p>
<p>1. interval &#8216;m&#8217; stands for month, use &#8216;n&#8217; for seconds</p>
<p>2. returns a negative nubmer if date1 < date2, otherwise, positve</p>
<p>Parameter	Description<br />
interval	 The interval you want to use to calculate the differences between date1 and date2<br />
Can take the following values:</p>
<p>yyyy &#8211; Year<br />
q &#8211; Quarter<br />
m &#8211; Month<br />
y &#8211; Day of year<br />
d &#8211; Day<br />
w &#8211; Weekday<br />
ww &#8211; Week of year<br />
h &#8211; Hour<br />
n &#8211; Minute<br />
s &#8211; Second</p>
]]></content:encoded>
			<wfw:commentRss>http://oracleabc.com/b/archives/2820/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Replace multiple spaces with one space &#8211; Python</title>
		<link>http://oracleabc.com/b/archives/2816</link>
		<comments>http://oracleabc.com/b/archives/2816#comments</comments>
		<pubDate>Thu, 26 May 2011 04:20:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://oracleabc.com/b/?p=2816</guid>
		<description><![CDATA[s=&#34; &#60;b&#62;Jennifer&#60;/b&#62; Lynn &#60;b&#62;Lopez&#60;/b&#62; (born July 24, 1969), also known by her nickname J.Lo, is an American actress, singer&#34; &#34; &#34;.join(s.split())]]></description>
			<content:encoded><![CDATA[<pre class="brush: python; title: ;">
s=&quot; &lt;b&gt;Jennifer&lt;/b&gt; Lynn &lt;b&gt;Lopez&lt;/b&gt; (born July 24, 1969), also known by    her nickname J.Lo, is an American actress,    singer&quot;
&quot; &quot;.join(s.split())
</pre>
]]></content:encoded>
			<wfw:commentRss>http://oracleabc.com/b/archives/2816/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GROUP BY in Pentaho &#8211; GROUP_CONAT in MySQL or LISTAGG in Oracle</title>
		<link>http://oracleabc.com/b/archives/2811</link>
		<comments>http://oracleabc.com/b/archives/2811#comments</comments>
		<pubDate>Thu, 12 May 2011 19:01:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[ETL]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://oracleabc.com/b/?p=2811</guid>
		<description><![CDATA[Found a very useful feature in Pentaho Data Integration that is equivalent to the GROUP_CONAT function in MySQL or LISTAGG function in Oracle. It can concatenate all rows into a string sepated by &#8220;,&#8221; or any character grouped by another field.]]></description>
			<content:encoded><![CDATA[<p>Found a very useful feature in Pentaho Data Integration that is equivalent to the GROUP_CONAT function in MySQL or LISTAGG function in Oracle.<br />
It can concatenate all rows into a string sepated by &#8220;,&#8221; or any character grouped by another field.</p>
<p><img src="/b/pics/pentaho_group_agg.jpg" alt="group_by" /></p>
]]></content:encoded>
			<wfw:commentRss>http://oracleabc.com/b/archives/2811/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>csharp on Ubuntu</title>
		<link>http://oracleabc.com/b/archives/2805</link>
		<comments>http://oracleabc.com/b/archives/2805#comments</comments>
		<pubDate>Wed, 27 Apr 2011 21:08:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://oracleabc.com/b/?p=2805</guid>
		<description><![CDATA[Ubuntu comes with Tomboy, Gbrainy and F-Spot, and therefore comes with Mono installed by default. Mono provides a complete CLR (Common Language Runtime) including compiler and runtime, which can produce and execute CIL (Common Intermediate Language) bytecode (aka assemblies), and a class library. It contains the interactive C# shell named csharp. csharp permits dynamically evaluating [...]]]></description>
			<content:encoded><![CDATA[<p>Ubuntu comes with Tomboy, Gbrainy and F-Spot, and therefore comes with Mono installed by default.</p>
<p>Mono provides a complete CLR (Common Language Runtime) including compiler and runtime, which can produce and execute CIL (Common Intermediate Language) bytecode (aka assemblies), and a class library. It contains the interactive C# shell named <strong>csharp</strong>. csharp permits dynamically evaluating C# statements, and can be used for writing scripts or testing code fragments. </p>
<p>You can install it if it&#8217;s not there.</p>
<pre class="brush: bash; title: ;"> sudo apt-get install mono-csharp-shell </pre>
<pre class="brush: cpp; title: ;">
csharp&gt; using System;
csharp&gt; using System.Diagnostics;
csharp&gt; Process[] runningProcs = Process.GetProcesses(&quot;.&quot;);
csharp&gt; foreach (Process p in runningProcs)
      &gt; {
      &gt; string info = string.Format(&quot;{0} {1}&quot;, p.Id, p.ProcessName);
      &gt; Console.WriteLine(info);
      &gt; }
</pre>
<p>1 /sbin/init<br />
2 kthreadd<br />
3 ksoftirqd/0<br />
4 migration/0<br />
5 watchdog/0<br />
6 events/0<br />
7 cpuset<br />
8 khelper<br />
9 netns<br />
10 async/mgr<br />
11 pm<br />
12 sync_supers<br />
13 bdi-default<br />
14 kintegrityd/0<br />
15 kblockd/0<br />
16 kacpid</p>
]]></content:encoded>
			<wfw:commentRss>http://oracleabc.com/b/archives/2805/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OSIsoft PI String</title>
		<link>http://oracleabc.com/b/archives/2800</link>
		<comments>http://oracleabc.com/b/archives/2800#comments</comments>
		<pubDate>Thu, 21 Apr 2011 04:30:23 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PI]]></category>

		<guid isPermaLink="false">http://oracleabc.com/b/?p=2800</guid>
		<description><![CDATA[Not sure why max size of string is 976 characters. This is the best guess I can think of. (314*3.14)-10 975.96 #or pow(math.pi,2)*99 977.0908357078464]]></description>
			<content:encoded><![CDATA[<p>Not sure why max size of string is 976 characters.<br />
This is the best guess I can think of.</p>
<pre class="brush: python; title: ;">
(314*3.14)-10
975.96

#or
pow(math.pi,2)*99
977.0908357078464
</pre>
]]></content:encoded>
			<wfw:commentRss>http://oracleabc.com/b/archives/2800/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OSISoft PI Data Type of Point</title>
		<link>http://oracleabc.com/b/archives/2798</link>
		<comments>http://oracleabc.com/b/archives/2798#comments</comments>
		<pubDate>Thu, 21 Apr 2011 03:16:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PI]]></category>

		<guid isPermaLink="false">http://oracleabc.com/b/?p=2798</guid>
		<description><![CDATA[Data Type of Point: PointType Attribute Int16 Points with integer values between 0 and 32767 (15-bit unsigned integers). Int32 Points with integer values between -2147450880 and 2147483647 (32-bit signed integers). Python code int('111111111111111',2) 32767 int('1'*15, 2) 32767 int('1'*31,2) 2147483647 bin(2147483647) '0b1111111111111111111111111111111' bin(2147483647).count('1') 31 bin(-2147450880) '-0b1111111111111111000000000000000' bin(-2147450880).count('1') 16 bin(-2147450880).count('0') 16]]></description>
			<content:encoded><![CDATA[<p>Data Type of Point: PointType Attribute</p>
<p>Int16<br />
Points with integer values between 0 and 32767 (15-bit unsigned integers).<br />
Int32<br />
Points with integer values between -2147450880 and 2147483647 (32-bit signed integers).</p>
<p>Python code</p>
<pre class="brush: python; title: ;">
int('111111111111111',2)
32767
int('1'*15, 2)
32767

int('1'*31,2)
2147483647

bin(2147483647)
'0b1111111111111111111111111111111'
bin(2147483647).count('1')
31

bin(-2147450880)
'-0b1111111111111111000000000000000'

bin(-2147450880).count('1')
16
bin(-2147450880).count('0')
16
</pre>
]]></content:encoded>
			<wfw:commentRss>http://oracleabc.com/b/archives/2798/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Maximum number of rows allowed in MS Excel 2007</title>
		<link>http://oracleabc.com/b/archives/2792</link>
		<comments>http://oracleabc.com/b/archives/2792#comments</comments>
		<pubDate>Thu, 14 Apr 2011 03:00:41 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Python]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://oracleabc.com/b/?p=2792</guid>
		<description><![CDATA[pow(2,(8*2 + (2007-2003))) # or 1 &#60;&#60; (16 + (2007-2003)) # or 1 &#60;&#60; 20 Excel 2003 = 65,536 rows Excel 2007 = 1,048,576 rows]]></description>
			<content:encoded><![CDATA[<pre class="brush: python; title: ;">
pow(2,(8*2 + (2007-2003)))
# or
1 &lt;&lt; (16 + (2007-2003))
# or
1 &lt;&lt; 20
</pre>
<p>Excel 2003 = 65,536 rows<br />
Excel 2007 = 1,048,576 rows</p>
]]></content:encoded>
			<wfw:commentRss>http://oracleabc.com/b/archives/2792/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Describe tables/views in Firebird</title>
		<link>http://oracleabc.com/b/archives/2785</link>
		<comments>http://oracleabc.com/b/archives/2785#comments</comments>
		<pubDate>Mon, 21 Mar 2011 14:49:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://oracleabc.com/b/?p=2785</guid>
		<description><![CDATA[To List all tables: -- list all tables show table -- or -- describe a table show table TABLE_NAME select rdb$relation_name from rdb$relations where rdb$view_blr is null and (rdb$system_flag is null or rdb$system_flag = 0); To List all views select rdb$relation_name from rdb$relations where rdb$view_blr is not null and (rdb$system_flag is null or rdb$system_flag = [...]]]></description>
			<content:encoded><![CDATA[<p>To List all tables:</p>
<pre class="brush: sql; title: ;">

-- list all tables
show table
-- or

-- describe a table
show table TABLE_NAME

select rdb$relation_name
from rdb$relations
where rdb$view_blr is null
and (rdb$system_flag is null or rdb$system_flag = 0);
</pre>
<p>To List all views</p>
<pre class="brush: sql; title: ;">
select rdb$relation_name
from rdb$relations
where rdb$view_blr is not null
and (rdb$system_flag is null or rdb$system_flag = 0);
</pre>
<p>To list all tables and columns</p>
<pre class="brush: sql; title: ;">
select f.rdb$relation_name, f.rdb$field_name
from rdb$relation_fields f
join rdb$relations r on f.rdb$relation_name = r.rdb$relation_name
and r.rdb$view_blr is null
and (r.rdb$system_flag is null or r.rdb$system_flag = 0)
order by 1, f.rdb$field_position;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://oracleabc.com/b/archives/2785/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nikon D7000 SDK object hierarchy diagram</title>
		<link>http://oracleabc.com/b/archives/2779</link>
		<comments>http://oracleabc.com/b/archives/2779#comments</comments>
		<pubDate>Mon, 28 Feb 2011 04:24:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://oracleabc.com/b/?p=2779</guid>
		<description><![CDATA[Wrote a C program to control my Nikon D7000 camera to capture a picture in less than a second. Here is the SDK module object hierarchy diagram I drew.]]></description>
			<content:encoded><![CDATA[<p>Wrote a C program to control my Nikon D7000 camera to capture a picture in less than a second. Here is the SDK module object hierarchy diagram I drew.<br />
<img src="/b/pics/nikon_sdk_flowchart.png" alt="Nikon D7000 SDK" /></p>
]]></content:encoded>
			<wfw:commentRss>http://oracleabc.com/b/archives/2779/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tunnelling Firefox traffic over ssh</title>
		<link>http://oracleabc.com/b/archives/2771</link>
		<comments>http://oracleabc.com/b/archives/2771#comments</comments>
		<pubDate>Thu, 17 Feb 2011 21:08:49 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://oracleabc.com/b/?p=2771</guid>
		<description><![CDATA[Facebook and Yourtube are blocked in China, I had to tunnel all web browser traffic over ssh. 1. Install ssh server on your home computer 2. Open the sshd port number in your router configuration 3. On your local machine, run ssh -fnD localhost:$NONE_USED_PORT ip_address_of_your_home_computer for example: ssh -fnD localhost:9999 public_ip_address_of_your_home_network 4. Configure Firefox to [...]]]></description>
			<content:encoded><![CDATA[<p>Facebook and Yourtube are blocked in China, I had to tunnel all web browser traffic over ssh.</p>
<p>1. Install ssh server on your home computer<br />
2. Open the sshd port number in your router configuration<br />
3. On your local machine, run<br />
ssh -fnD localhost:$NONE_USED_PORT ip_address_of_your_home_computer<br />
for example:<br />
 ssh -fnD localhost:9999 public_ip_address_of_your_home_network<br />
4. Configure Firefox to use the tunnel<br />
Edit->Preferences-> Advanced -> Network -> Settings<br />
Select Manual proxy configuration, enter localhost in the SOCKS Host field and the port you used for your tunnel, in my example above: 9999<br />
5. Configure Firefox to use the tunnel also for DNS<br />
Enter about:config in the address field, and search for network.proxy.socks_remote_dns and set it to true<br />
6. Stop the tunnelling<br />
ps -ef | grep ssh<br />
Kill the SSH process with localhost:9999</p>
]]></content:encoded>
			<wfw:commentRss>http://oracleabc.com/b/archives/2771/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 0.314 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2012-02-22 12:07:46 -->

