Pages

Tuesday, June 15, 2010

NjauRockz

The following are links to the "Coolest Rock Music ever" (according to my friend njau)..Please download let mi know what you think...is there any talent...?

Media fire Link (mp3)

Tuesday, March 9, 2010

Ohh My..the web has ducks - You dont believe me, check out IronPhyton

Google's full of ducks, youtube is also full of ducks, i mean good web apps are ducks. To be more clear, they all use phyton, a dynamic language (am new at this, i guess php guys know better).But Python’s not the only game in town to use dynamic typing. However it did catch my eye and challenged my perspective as a programmer. “What is this? How does one accurately program anything in this fashion? Five hundred lines of code and not one duck! Python’s a liar.

Well the essence of duck typing is simple :
if it looks like a duck and quacks like a duck, it must be a duck
.
In a language that supports DuckTyping an object of a particular type is compatible with a method or function, if it supplies all the methods/method signatures asked of it by the method/function at run time.simple eh? Am not going to go in the details of this, check out this link for additional information on this subject

I know there are those of you who will be tend to raise issue with dynamic languages,
such as "What if it looks like a duck, quacks like a duck, but is really a dragon impersonating a duck? You don’t want a dragon in your pond.” -(Harris,2009). My answer blame pond keeper i.e the developer

Anyway am beginning to love this idea of dynamic languages. So i decided to start learning IronPhyton (i guess i love new tech stuff). Over the past 2 weeks i dug deep into the world of IronPhyton and read the following two books

1.Pro IronPython by Alan Harris -Short and to the point kind of book, good for someone with vb.net/c# background and people who want to code than do theory

2.ironPython in action by Michael J. Foord and Christian Muirhead -Too many stories but good for the reading, the authors try to explain the concepts from scracth (mo words, less coding i figured).
In all the above i would recommend you read Alan's book, although reading both will give u a more clear picture of all aspect you might want to learn about in ironPython

Am now convinced that if am going to adopt a dynamic language then phyton is the way forward and IronPhyton is the flavor that suites me best. I mean i can even program web apps and add scripting features (plug-in) to my c# applications

Below is an Example of a class defined in IronPhyton
class course:
"Contains the details of a given course"
name='course name'
number='0'
description='description'

#methods to set Course data
def setCourseName(self,name):
self.name=name
def setNumber(self,number):
self.number=number
def setDescription(self,description):
self.description=description

#methods to get Course data
def getCourseName(self):
return self.name
def getCourseNumber(self):
return self.number
def getDescription(self):
return self.description
def getCourseDetails(self):
return 'Name: ',self.name,' Number: ',self.number,' Description: ',self.description

Monday, March 1, 2010

100% CPU Usage Overhead running EM DBConsole 11g on Windows 7 64bit

I think am starting to like Oracle DB, Not that i hated the damn thing. I just never thought i would be using anything other than MSSQL, and object databases. But lets face it, Oracle 10g Express was a big milestone for oracle especially with the introduction of APEX.

I just fell in love with this simple to use technology that allowed me to build exceptional, high end online application using only plsql and some java script (my kind of thing)
Nway i finally got the nerve to do the whole installation on my hp dv5 pavilion laptop with intel core 2 duo processor and 4 gb of ram. (a killer machine......i guess). So after a normal restart all hell breaks loose...Oracle RDBMS kernel service consumes upto 1.5 gb of ram and the cup clocks 100

At that moment, i hated Oracle...I finally decided to do some digging on the net and realized that the problem is universal, affecting even linux machines.
100% CPU Usage Overhead running EM DBConsole 11g

Nway according to this blog this is how you solve the problem


emctl stop dbconsole (or stop the OracleDBConsoleSID Windows service)

create table mgmt_job_bad as select * from sysman.mgmt_job where job_name = 'PROVISIONING DAEMON';
delete from sysman.mgmt_job where job_name = 'PROVISIONING DAEMON';
commit;

emctl start dbconsole (or start the service)


You can still check this link and this one for additional details..But what makes me made is that oracle is aware of this and they have released a patch but it is only available to meta-link users

Nway my focus is set the oracle platform......i think its going to be really interesting
.....

Wednesday, February 17, 2010

Tsql Query to Sort Numbers in a comma separated string

/*
* Query to order numbers in asc order.
* Numbers are given as a string separated by a comma
* */
DECLARE @numbers VARCHAR(50)='23,2000,45,7,3,0,24,67,676,45,4,2,230';
DECLARE @finalString VARCHAR(max);--used to hold the final string
DECLARE @ProductTotals TABLE--Dynamic table to hold all the values numeric values
(

ProductID DECIMAL(18,2)

)

DECLARE @currentNumber DECIMAL(18,2)--variable to hold the current number that
--is reaped from the number array
WHILE( PATINDEX('%,%',@numbers)<>0)
BEGIN

SET @currentNumber=CAST(SUBSTRING(@numbers,0,PATINDEX('%,%',@numbers)) AS DECIMAL(18,2));

INSERT INTO @ProductTotals VALUES (@currentNumber);

SET @numbers=SUBSTRING(@numbers,PATINDEX('%,%',@numbers)+1,(LEN(@numbers)+1)-PATINDEX('%,%',@numbers));


END
SET @finalString='';
SELECT @finalString=@finalString +cast(pt.ProductID AS VARCHAR(10))+',' FROM @ProductTotals pt
ORDER BY pt.ProductID ASC

PRINT @finalString

/*
*The result will appear as follows
*0.00,2.00,3.00,4.00,7.00,23.00,24.00,45.00,45.00,67.00,676.00,2000.00,
*
*/

Wednesday, February 10, 2010

Ho to use NTBackup In Server 2008 64bit with Exchange 2007 sp2

For months I have been trying to backup my exchange 2007 database,
Challenge being u just can convince management to buy all those nice but expensive tools that are available online en secondly we all know microsoft NTBackup (promising tool really) is no
longer available in windows server 2008.
Even after I had to install exchange service pack 2 I just could not figure out how I could do the VSS backup on an exchange installation that has the mail database within the same drive as operating system.
So I decided to search the net for a few answers (thanks to Google). I came across this article
NTBackup for Server 2008 with Exchange

Nway this is what you need to do is

  1. Copying the following binaries from a server 2003 installation
(C:\Windows\System32\)
to a new location such as
(C:\Program Files\NTBackup\):
• ntbackup.exe
• ntmsapi.dll
• vssapi.dll

2. Install the removable storage manager from server manager:

• Start Server Manager•
Click Features
• Click Add Features
• Select Removable Storage Manager
• Click Install

3.Go into an older server (Windows server 2003) and copy esebcli2.dll from your server
(C:\Program Files\Exchsrvr\Bin)
and put it into your new location which in our case would be
(C:\Program Files\NTBackup\):
change the esebcli2 reg key (HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\BackupRestore\DLLPaths)
from
C:\Program Files\Micrsoft\Exchange Server\Bin\esebcli2.dll
To
C:\Program Files\NTBackup\ esebcli2.dll
Now go ahead and run your NTBackup utility (I know you want to)

Please Note
An incremental or differential backup cannot be performed on a storage group with circular logging enabled. Either perform Full backups, or disable circular logging in Exchange.
Please visit these URLs? for more details:
http://support.microsoft.com/default.aspx?scid=kb;en-us;294741
and
http://support.microsoft.com/default.aspx?scid=kb;en-us;218004

This article explains in details what circular logging is all about
However by default circular logging is disabled in Exchange

NOTE:
1.You will have to do one full backup before Exchange will allow you to perform any incremental
backups
2.You can view the back up status of your exchange mail db by going to
Exchange Management console->server configurations->mail box->right click on the storage
Group->Properties->General tab