Friday, April 1, 2011

A practical approach for myself: Python Programming.

PHAsE::ZERO

My Tools:
a) Python 2.7 Interpreter- I need to install it before any IDE installation.
b) A simple IDE- PyScripter or whatever I like.
c) Determine my applicable area. Well I have decided to use it for Blender, Dia, Inkscape and Beremiz.
d) Search a list of available packages for python (wxPython, Scipy, numpy etc.)

First of all I am reading about python at Wikipedia site . A well written description is there. I like to quote it for me too.

“Python is an interpreted, general-purpose high-level programming language whose design philosophy emphasizes code readability. Python aims to combine "remarkable power with very clear syntax", and its standard library is large and comprehensive. Its use of indentation for block delimiters is unique among popular programming languages.
Python supports multiple programming paradigms, primarily but not limited to object-oriented, imperative and, to a lesser extent, functional programming styles. It features a fully dynamic type system and automatic memory management, similar to that of Scheme, Ruby, Perl, and Tcl. Like other dynamic languages, Python is often used as a scripting language, but is also used in a wide range of non-scripting contexts”.
I am checking FAQ page. And I have seen this page too- Community jobs .Thats all for me today.



Friday, November 13, 2009

Oracle sql-query data based on even hours

A simple oracle query data based on even hours. here is a simple example.
Table name: Tab1
  • IDATE
  • RINDEX
  • A0101
  • A0102
  • A0103
  • A0104
  • A0105
  • A0106
  • A0107
  • A0108
Sql-query:
SELECT TO_CHAR(IDATE,'dd-mm-yy HH24:MI'),
A0101,
A0102,
A0103,
A0104,
A0105,
A0106,
A0107,
A0108
FROM Tab1 WHERE (MOD(To_Number(TO_CHAR(IDATE,'HH24')),2))=0 AND IDATE BETWEEN to_date(inDte1,'dd-mm-yyyy HH24:MI:SS') AND to_date(inDte2,'dd-mm-yyyy HH24:MI:SS') ORDER BY RINDEX;

Here (MOD(To_Number(TO_CHAR(IDATE,'HH24')),2))=0 is doing that selection from available data. First get the hour's value as string then convert it into a Number and apply MOD function.