To set the correct package set PKG_CONFIG_PATH so that it picks up right files
Example:
PKG_CONFIG_PATH=/usr/lib/pkgconfig ./configure
Sunday, December 28, 2008
Monday, December 15, 2008
creating bash variable which has newline
Normally bash does not process \n the way c does.
myVar="Hi there.\n Me Here";
echo "$myVar";
above will just print
Hi there.\n Me Here
Use for c type of interpretation
so changing above script to
myVar="Hi there."$'\n'" Me Here";
echo "$myVar";
This will print
Hi there.
Me Here
myVar="Hi there.\n Me Here";
echo "$myVar";
above will just print
Hi there.\n Me Here
Use for c type of interpretation
so changing above script to
myVar="Hi there."$'\n'" Me Here";
echo "$myVar";
This will print
Hi there.
Me Here
Wednesday, October 8, 2008
XML Attributes
Avoid XML Attributes?
Some of the problems with using attributes are:
- attributes cannot contain multiple values (elements can)
- attributes cannot contain tree structures (elements can)
- attributes are not easily expandable (for future changes)
Attributes are difficult to read and maintain. Use elements for data. Use attributes for information that is not relevant to the data.
Don't end up like this:
|
XML Notes
Entity References
Some characters have a special meaning in XML.
If you place a character like "<" inside an XML element, it will generate an error because the parser interprets it as the start of a new element.
This will generate an XML error:
|
To avoid this error, replace the "<" character with an entity reference:
|
There are 5 predefined entity references in XML:
< | < | less than |
> | > | greater than |
& | & | ampersand |
' | ' | apostrophe |
" | " | quotation mark |
Note: Only the characters "<" and "&" are strictly illegal in XML. The greater than character is legal, but it is a good habit to replace it.
Subscribe to:
Posts (Atom)