I found this site accidentally, and quite surprised! Especially python-spidermonkey, the python binding of the mozilla js engine. I shall try this out if I have time!
For the mechanize and pullparser, here is an example.
I found this site accidentally, and quite surprised! Especially python-spidermonkey, the python binding of the mozilla js engine. I shall try this out if I have time!
For the mechanize and pullparser, here is an example.
When I use netstat to check about the opened ports, I found this:
I'm shocked, what's this port? Hacked?
Then, I checked /proc/net/tcp:
I think, may be just opened by kernel, but why?
Just for save, I goggled about this and found this interesting thread! hm... rpc
I used to mount a few NFS shared directory from another box, hence, the nlockmgr of RPC is always running and listening of port 32768. nlockmgr is a RPC service which is used for NFS lock recovery when machine crashed or reboot.
This time, I learn the usefulness of this commands :)
I have just read the tutorial on GIMP about script-fu!
Scripting in GIMP is pretty easy, but debuging is quite trouble. This tutorial help me a bit, at least, I leart to use 'print' to do basic debug.
Though scheme is not difficult, It would be better if I can do it in python, but I can't found any python-fu tutorial, where is it?
So what I've done? I'm managed to resize a set of images to another fixed size, I try to do it first with ImageMagick by "convert -resize", but ImageMagick doesn't convert the image properly. When I say -resize 130x41, the resulting image is 128x41 (Am I misunderstand this option?). May be it is only some rounding problem but, not acceptable in this case. On the other hand, GIMP do it great, so I try to script it!
The solution is simple. First write a small script-fu, and run gimp in batch mode.
The script is like this:
; It will resize image in batch
(define (bresize filename width height)
; load
(set! img (car(gimp-file-load RUN-NONINTERACTIVE filename filename)))
; not really used, but gimp-file-save need it
(set! lyr (car(gimp-image-get-active-layer img)))
; scale
(gimp-image-scale img width height)
; save
(file-png-save-defaults RUN-NONINTERACTIVE img lyr filename filename)
)
(script-fu-register "bresize"
"
And to run it in a batch, easy!
$ for f in *.png; do \
gimp-2.0 -i -b "(bresize \"$f\" 130 41)" '(gimp-quit 0)'; \
done
The following my advice, do it first!
This document record what I have learned when I try to use 'ecommerce' module as a webstore for a chocolate company
$ svn co http://svn.ofbiz.org/svn/ofbiz/trunk ofbiz-trunk
By default, ofbiz use 'derby' a Java based standalone database, you can change to use other data source. All you have to do is:
For all the delegator element, change the attr. 'datasource-name'. For example, I use MySQL, I will change this attr to 'localmysql'
Why localmysql, because, more detail data source parameter is defined at the lower half that XML config file. The name (or ID) for the MySQL config is 'localmysql'.
Then you should also change the setting for the datasource. So found the 'datasource' element and change the following entry:
After setting the datasource, it is ready to install the seed data Seed data is a set of basic data will is required for ofbiz to run normally, for example, some UOM, and Geograpical data. To install, you can run
$ ant run-install-seed
OFBiz will startup in 'install mode'. In this mode, it will found out all 'seed data' and install (insert) it into the datasource
This seed data is defined in XML file with root element named 'entity-engine-xml'. Each element in the XML correspsond to a ROW in the datasource.
The list of all seed data file is defined in ofbiz-component.xml. Each component in OFBiz will have one such file. It is read by the component loader when OFBiz starting up (as install mode).
For example, under framework/common, ofbiz-component.xml contains these lines:
<entity-resource type="data" reader-name="seed"
loader="main" location="data/CommonTypeData.xml"/>
Demo data is similar to seed data, they are defined in the same way. The differnce are the data is not 'required' by OFBiz operation, rather, they are used as demo. For example, "applications/ecommerce" has provided a set of demo data, if the data is installed, you can see a 'fake' product catalog when you asscess the ecommerce website
Another difference between seed and demo data is, how it is defined inside ofbiz-component.xml; For demo data, the element is look like this:
<entity-resource type="data" reader-name="demo"
loader="main" location="data/DemoProduct.xml"/>
Please note that reader-name is now "demo", but no "seed"
To install all demo data, you can
$ java -jar ofbiz.jar install readers=demo
However, if you are now going to 'customize', there is no reason to install the "stock" demo data. You have at least two choice.
Simply remove all those demo data xml or comment out the relevant lines in various ofbiz-component.xml
Under base/config directory, you can found some base configuration. Among the list, the most important files:
The meaning of cache.properties and debug.properties is obvious. For the ofbiz-containers.xml, it is the core config file for OFBiz OFBiz will parse this during normal startup. Inside this file you can found some some definition for various container which is started up by OFBiz at the very first moment.
The most import should be cataline-container (tomcat). You can adjust various tomcat properties at there. For example, changing the listening ports, and comment out ajp stuff, if not really used, etc