reference : http://www.rpm.org/max-rpm/ch-rpm-build.html
2 kind of packages : binary and source (checked by cmd : file xxxx.rpm)
If it is a source, after you install using "rpm -ivv xxxx.rpm" will generate:
1. patch(es) file
2. SPEC file --> is similar with a Make file
3. xxx.tgz --> in which some files of .c and .h located
From this point the steps would be:
-> BUILD -> BIN RPM package and SourceRPM package
Note: the first source is the original, this one is the one after build. See below.
>>>>>>>>
The normal directory layout consists of a single top-level directory (The default name is /usr/src/redhat), with five subdirectories. The five subdirectories and their functions are:
*/usr/src/redhat/SOURCES — Contains the original sources, patches, and icon files.
*/usr/src/redhat/SPECS — Contains the spec files used to control the build process.
*/usr/src/redhat/BUILD — The directory in which the sources are unpacked, and the software is built.
*/usr/src/redhat/RPMS — Contains the binary package files created by the build process.
*/usr/src/redhat/SRPMS — Contains the source package files created by the build process.
>>>>>>>>>
Friday, 9 July 2010
Thursday, 17 June 2010
List of web builder for e-Commerce FREE
Famous:
http://www.oscommerce.com/
http://www.zen-cart.com/
Well-known (I like this):
http://virtuemart.net/home/demo
Good to have (Not clear either e-commerce or cart-only):
http://sourceforge.net/projects/profbiz-cart/
https://www.storesprite.com/secure/download.php
http://mymarket.sourceforge.net/
Chart Only:
http://www.unibia.com/unibianet/super-simple-shopping-cart-php
http://www.oscommerce.com/
http://www.zen-cart.com/
Well-known (I like this):
http://virtuemart.net/home/demo
Good to have (Not clear either e-commerce or cart-only):
http://sourceforge.net/projects/profbiz-cart/
https://www.storesprite.com/secure/download.php
http://mymarket.sourceforge.net/
Chart Only:
http://www.unibia.com/unibianet/super-simple-shopping-cart-php
Checking http protocol over telnet
This summary is not available. Please
click here to view the post.
Tuesday, 15 June 2010
C++ pointer
& is reference operator
* is deference operator
<><><><><><><>
int p=10; assuming p address is 1200.
so &p is 1200 and p is 10. In this case : & = address of
<><><><><><><>
POINTER
int * q
q = &p ==> q is containing address!
*q = 11 ==> *q is containing value, in this case : * = value pointed by
Important :
int * q and *q, those 2 * (stars) have diffrent meaning.
One is denotes a pointer (not variable nor constant value).
One is deference operator.
><><><><><><><
End result : p is 11.
Excerpt from : http://www.cplusplus.com/doc/tutorial/pointers/
* is deference operator
<><><><><><><>
int p=10; assuming p address is 1200.
so &p is 1200 and p is 10. In this case : & = address of
<><><><><><><>
POINTER
int * q
q = &p ==> q is containing address!
*q = 11 ==> *q is containing value, in this case : * = value pointed by
Important :
int * q and *q, those 2 * (stars) have diffrent meaning.
One is denotes a pointer (not variable nor constant value).
One is deference operator.
><><><><><><><
End result : p is 11.
Excerpt from : http://www.cplusplus.com/doc/tutorial/pointers/
Monday, 14 June 2010
C++ common pitfall
czz61240@LMPH8MF:~/testing123$ g++ -Wall a -o z
/usr/bin/ld:a: file format not recognized; treating as linker script
/usr/bin/ld:a:1: syntax error
collect2: ld returned 1 exit status
>>>>>>>>>>>>>> Because a does not have .c extension, should be a.c
czz61240@LMPH8MF:~/testing123$ gcc a.c -o z
a.c:3:20: error: iostream: No such file or directory
a.c:5: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘namespace’
a.c: In function ‘main’:
a.c:9: error: ‘cout’ undeclared (first use in this function)
a.c:9: error: (Each undeclared identifier is reported only once
a.c:9: error: for each function it appears in.)
>>>>>>>>>>>>>>> Because iostream (successor of iostream.h) is C++ header, so must use g++ compiler.
/usr/bin/ld:a: file format not recognized; treating as linker script
/usr/bin/ld:a:1: syntax error
collect2: ld returned 1 exit status
>>>>>>>>>>>>>> Because a does not have .c extension, should be a.c
czz61240@LMPH8MF:~/testing123$ gcc a.c -o z
a.c:3:20: error: iostream: No such file or directory
a.c:5: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘namespace’
a.c: In function ‘main’:
a.c:9: error: ‘cout’ undeclared (first use in this function)
a.c:9: error: (Each undeclared identifier is reported only once
a.c:9: error: for each function it appears in.)
>>>>>>>>>>>>>>> Because iostream (successor of iostream.h) is C++ header, so must use g++ compiler.
Friday, 11 June 2010
Email : reply-to in headers
IDEA : recipient will reply to specific address, not the sender.
Note: in headers email, X-parameter denotes this parameter is inserted by human.
>>>>>>>>>
To add the Reply-To header to an email, you need to use the MailMessage.Headers property. For example:
mail.Headers.Add( "Reply-To", "alternate_email@mycompany.com")
The following code snippet demonstrates this technique.
[ C# ]
MailMessage mail = new MailMessage();
mail.To = "me@mycompany.com";
mail.From = "you@yourcompany.com";
mail.Subject = "this is a test email.";
mail.Body = "this is my test email body.";
mail.Headers.Add( "Reply-To", "alternate_email@mycompany.com" );
SmtpMail.SmtpServer = "localhost"; //your real server goes here
SmtpMail.Send( mail );
[ VB.NET ]
Dim mail As New MailMessage()
mail.To = "me@mycompany.com"
mail.From = "you@yourcompany.com"
mail.Subject = "this is a test email."
mail.Body = "this is my test email body."
mail.Headers.Add("Reply-To", "alternate_email@mycompany.com")
SmtpMail.SmtpServer = "localhost" 'your real server goes here
SmtpMail.Send(mail)
Reference : http://www.systemwebmail.com/faq/2.7.aspx
LOTUS NOTES:
In new email creation, go to delivery options - advance - reply this memo to.....
Note: in headers email, X-parameter denotes this parameter is inserted by human.
>>>>>>>>>
To add the Reply-To header to an email, you need to use the MailMessage.Headers property. For example:
mail.Headers.Add( "Reply-To", "alternate_email@mycompany.com")
The following code snippet demonstrates this technique.
[ C# ]
MailMessage mail = new MailMessage();
mail.To = "me@mycompany.com";
mail.From = "you@yourcompany.com";
mail.Subject = "this is a test email.";
mail.Body = "this is my test email body.";
mail.Headers.Add( "Reply-To", "alternate_email@mycompany.com" );
SmtpMail.SmtpServer = "localhost"; //your real server goes here
SmtpMail.Send( mail );
[ VB.NET ]
Dim mail As New MailMessage()
mail.To = "me@mycompany.com"
mail.From = "you@yourcompany.com"
mail.Subject = "this is a test email."
mail.Body = "this is my test email body."
mail.Headers.Add("Reply-To", "alternate_email@mycompany.com")
SmtpMail.SmtpServer = "localhost" 'your real server goes here
SmtpMail.Send(mail)
Reference : http://www.systemwebmail.com/faq/2.7.aspx
LOTUS NOTES:
In new email creation, go to delivery options - advance - reply this memo to.....
Thursday, 10 June 2010
Jython to check the Q numbers in JMS
su - wasown -c /applications/WebSphere/AppServer/6.0.0.0/profiles/XXX/bin/wsadmin.sh -lang jython -f /home/wasown/listQueueDepth_WAS60.jy --v
the listQueueDepth_WAS60.jy :
4:root@defrqap100mssxm:/opt/XXX/jms # cat /home/wasown/listQueueDepth_WAS60.jy
import sys
import os
import time
from java.util import *
# global DEBUG setting: 1 = active, 0 = disabled
DEBUG=0
##
## In this sequence, define the partial names of SIB destinations you are interested in!
##
_sibusName = "Saturn_JMS_Bus"
_myDests = ( '_SYSTEM.Exception', 'JMS' )
###########################################################################
###########################################################################
###
### FUNCTIONS
###
###########################################################################
###########################################################################
#get the command line
def _getScriptName():
p = java.lang.System.getProperties();
keys = p.keys();
while( keys.hasMoreElements() ):
name = keys.nextElement()
# print "Property: ", name," - ",
# print java.lang.System.getProperty(name)
return "not implemented in WAS6.0's jython versio!n"
# returns a timestamp string e.g. "2009.01.01 23:47:59"
def getCurrentTimeStamp():
timeArray = time.localtime(time.time())
tstmp = str(timeArray[0]) + '.' + str(timeArray[1]).zfill(2) + '.' + str(timeArray[2]).zfill(2)
tstmp = tstmp + ' ' + str(timeArray[3]).zfill(2) + ':' + str(timeArray[4]).zfill(2) + ':' + str(timeArray[5]).zfill(2)
return tstmp
# returns the name part from any MBean identifier string
# MBean id strings look like:
# "WebSphere:name=JMSTestOutboundQueue,process=server1,platform=dynamicproxy,node=esbNode,SIBus=MediaBus,......"
#
def getNameFromMBeanID(mbeanId):
t1 = mbeanId.split('name=')
t2 = t1[1].split(',')
return t2[0]
def usage(scriptname):
options = "--h --v --d"
print "\n\nusage: ",scriptname, options
print ""
print "\t d secs if is not specified, program exits after one iteration."
print "\t Otherwise it will run forever, sleeping for seconds between iterations."
print "\t v verbose mode for better (human) readability. Non verbose means CSV list output."
print "\t "
print "\n\n"
### MAIN
#
#
#
###############################################################
## getopt start
args = sys.argv
if (DEBUG > 0):
print "len argv = ", len(args)
print "args = ",args
print "-----"
sleepTime = -1
verbose = 0
# process single (toggle) args first
#
argscopy = args[:]
for i in range(0,len(argscopy)):
if (argscopy[i] == "--h"):
print "HELP"
args.pop(i)
usage("")
sys.exit(0)
elif (argscopy[i] == "--v"):
args.pop(i)
verbose = 1
# process parameter args next: e.g. "--d 120"
#
if ((len(args) % 2 ) == 1): args.append(" ")
if (DEBUG > 0):
print "remaining args are:",args
argscopy = args[:]
for i in range(0,len(argscopy),2):
opt = argscopy[i]
val = argscopy[i+1]
if (DEBUG > 0): print "option: ", opt, " - value: ",val
if (opt == "--d"):
sleepTime = val
args.pop(i)
args.pop(i)
if (DEBUG > 0):
print "dbg: cmdline options found:"
print "dbg: sleepTime:",sleepTime
print "dbg: verbose :",verbose
print ""
if (len(args) > 0):
print "unprocessed args: ",args
print
## getopt end
###############################################################
# AdminControl.queryNames() output strings look like this:
#
# WebSphere:name=JMSTestOutboundQueue,process=server1,platform=dynamicproxy,node=esbNode,SIBus=MediaBus,version=6.1.0.23,
# ID=4BF5F7FBBD2C16D3F7D10B5B_QUEUE_10000005,type=SIBQueuePoint,mbeanIdentifier=com.ibm.ws.sib.admin.impl.JsQueuePoint,
# cell=esbCell,spec=1.0,SIBMessagingEngine=esbNode.server1-MediaBus
#
# retrieve all SIBQueuePoints
#
allSIBusDestinations = AdminControl.queryNames("WebSphere:*,type=SIBQueuePoint,SIBus=" + _sibusName).split()
# container for the QueuePoints we are interested in
matchedDests = []
for destMBeanId in allSIBusDestinations:
destName = getNameFromMBeanID(destMBeanId)
if (DEBUG > 0): print "dbg: found destination: ", destName
#
# see if we are interested in this particular SIBus destination
for m in _myDests:
## if (m == destName):
if (destName.startswith(m)):
matchedDests.append(destMBeanId )
# end if
# end for
# end for
if (DEBUG > 0): print ""
# begin CSV output
if (verbose == 0):
# print header row
print "time",",",
for i in matchedDests:
qname = getNameFromMBeanID(i)
print qname,",",
# print data rows
while (1):
print
if (verbose == 0):
print getCurrentTimeStamp(),",",
for d in matchedDests:
print AdminControl.getAttribute(d, "depth"),",",
else:
print getCurrentTimeStamp()
print "-------------------"
for d in matchedDests:
print AdminControl.getAttribute(d, "identifier")+":",
print AdminControl.getAttribute(d, "depth")
## print AdminControl.getAttribute(d, "state")
if (sleepTime == -1):
print ""
sys.exit(0)
time.sleep(int(sleepTime))
the listQueueDepth_WAS60.jy :
4:root@defrqap100mssxm:/opt/XXX/jms # cat /home/wasown/listQueueDepth_WAS60.jy
import sys
import os
import time
from java.util import *
# global DEBUG setting: 1 = active, 0 = disabled
DEBUG=0
##
## In this sequence, define the partial names of SIB destinations you are interested in!
##
_sibusName = "Saturn_JMS_Bus"
_myDests = ( '_SYSTEM.Exception', 'JMS' )
###########################################################################
###########################################################################
###
### FUNCTIONS
###
###########################################################################
###########################################################################
#get the command line
def _getScriptName():
p = java.lang.System.getProperties();
keys = p.keys();
while( keys.hasMoreElements() ):
name = keys.nextElement()
# print "Property: ", name," - ",
# print java.lang.System.getProperty(name)
return "not implemented in WAS6.0's jython versio!n"
# returns a timestamp string e.g. "2009.01.01 23:47:59"
def getCurrentTimeStamp():
timeArray = time.localtime(time.time())
tstmp = str(timeArray[0]) + '.' + str(timeArray[1]).zfill(2) + '.' + str(timeArray[2]).zfill(2)
tstmp = tstmp + ' ' + str(timeArray[3]).zfill(2) + ':' + str(timeArray[4]).zfill(2) + ':' + str(timeArray[5]).zfill(2)
return tstmp
# returns the name part from any MBean identifier string
# MBean id strings look like:
# "WebSphere:name=JMSTestOutboundQueue,process=server1,platform=dynamicproxy,node=esbNode,SIBus=MediaBus,......"
#
def getNameFromMBeanID(mbeanId):
t1 = mbeanId.split('name=')
t2 = t1[1].split(',')
return t2[0]
def usage(scriptname):
options = "--h --v --d
print "\n\nusage: ",scriptname, options
print ""
print "\t d secs if
print "\t Otherwise it will run forever, sleeping for
print "\t v verbose mode for better (human) readability. Non verbose means CSV list output."
print "\t "
print "\n\n"
### MAIN
#
#
#
###############################################################
## getopt start
args = sys.argv
if (DEBUG > 0):
print "len argv = ", len(args)
print "args = ",args
print "-----"
sleepTime = -1
verbose = 0
# process single (toggle) args first
#
argscopy = args[:]
for i in range(0,len(argscopy)):
if (argscopy[i] == "--h"):
print "HELP"
args.pop(i)
usage("")
sys.exit(0)
elif (argscopy[i] == "--v"):
args.pop(i)
verbose = 1
# process parameter args next: e.g. "--d 120"
#
if ((len(args) % 2 ) == 1): args.append(" ")
if (DEBUG > 0):
print "remaining args are:",args
argscopy = args[:]
for i in range(0,len(argscopy),2):
opt = argscopy[i]
val = argscopy[i+1]
if (DEBUG > 0): print "option: ", opt, " - value: ",val
if (opt == "--d"):
sleepTime = val
args.pop(i)
args.pop(i)
if (DEBUG > 0):
print "dbg: cmdline options found:"
print "dbg: sleepTime:",sleepTime
print "dbg: verbose :",verbose
print ""
if (len(args) > 0):
print "unprocessed args: ",args
## getopt end
###############################################################
# AdminControl.queryNames() output strings look like this:
#
# WebSphere:name=JMSTestOutboundQueue,process=server1,platform=dynamicproxy,node=esbNode,SIBus=MediaBus,version=6.1.0.23,
# ID=4BF5F7FBBD2C16D3F7D10B5B_QUEUE_10000005,type=SIBQueuePoint,mbeanIdentifier=com.ibm.ws.sib.admin.impl.JsQueuePoint,
# cell=esbCell,spec=1.0,SIBMessagingEngine=esbNode.server1-MediaBus
#
# retrieve all SIBQueuePoints
#
allSIBusDestinations = AdminControl.queryNames("WebSphere:*,type=SIBQueuePoint,SIBus=" + _sibusName).split()
# container for the QueuePoints we are interested in
matchedDests = []
for destMBeanId in allSIBusDestinations:
destName = getNameFromMBeanID(destMBeanId)
if (DEBUG > 0): print "dbg: found destination: ", destName
#
# see if we are interested in this particular SIBus destination
for m in _myDests:
## if (m == destName):
if (destName.startswith(m)):
matchedDests.append(destMBeanId )
# end if
# end for
# end for
if (DEBUG > 0): print ""
# begin CSV output
if (verbose == 0):
# print header row
print "time",",",
for i in matchedDests:
qname = getNameFromMBeanID(i)
print qname,",",
# print data rows
while (1):
if (verbose == 0):
print getCurrentTimeStamp(),",",
for d in matchedDests:
print AdminControl.getAttribute(d, "depth"),",",
else:
print getCurrentTimeStamp()
print "-------------------"
for d in matchedDests:
print AdminControl.getAttribute(d, "identifier")+":",
print AdminControl.getAttribute(d, "depth")
## print AdminControl.getAttribute(d, "state")
if (sleepTime == -1):
print ""
sys.exit(0)
time.sleep(int(sleepTime))
Subscribe to:
Posts (Atom)