Friday, September 30, 2011

Solution : warning: extended initializer lists only available with -std=c++0x or -std=gnu++0x

you are initializing the object with {...} instead of (...):

StatsScreen ss{...}; // only available in C++0x
StatsScreen ss(...); // OK in C++98

To compile your code as C++0x code, just add the following flag when compiling:

g++ test.cpp -std=c++0x

Monday, September 26, 2011

Printing ® character in PDF which is created with tcpdf [PHP]


When you create UTF-8 PDF document with tcpdf and you want to write some html symbols then you have to encode that character symbol to utf-8.

e.g.
$description = "Hello ® World"
echo str_replace('®', utf8_encode("\xae"), $description);

It will write ® to PDF instead ® text. [Output in PDF document : Hello ® world]

'ae' is the hex value of the ® symbol.


For more symbol to hex value please follow this link : http://allwebco-templates.com/support/S_hex.htm

Thursday, September 15, 2011

proxy setting maven2

can be found under 

/etc/maven2/setting.xml

uncomment and edit the section

===============================

ex.

<settings>

  .
.
<proxies>
<proxy>
<active>true</active>
<protocol>http</protocol>
<host>proxy.somewhere.com</host>
<port>8080</port>
<username>proxyuser</username>
<password>somepassword</password>
<nonProxyHosts>www.google.com|*.somewhere.com</nonProxyHosts>
</proxy>
</proxies>
.
.
</settings>

Solution : svn: OPTIONS of 'http://yyy.org/yy ': could not connect to server (http://yyy.org)

change the following in  ~/..subversion/servers
towards the end under [global]
uncomment and update your proxy
Note: Remove the # and space at start , else svn will complain every time when you check out  :(

=============================================
ex.

[global]

# http-proxy-exceptions = *.exception.com, www.internal-site.org
http-proxy-host = localhost
http-proxy-port = 3128
# http-proxy-username = defaultusername
# http-proxy-password = defaultpassword
# http-compression = no

Wednesday, September 14, 2011

Solution : error: No patch number 0

When building the RPM if you get this issue that means  you have forgot to define Patch0 at top 

ex. if you patch file is x-0.patch add the follwing line at top of spec file

Patch0:         x-0.patch