Recent Notes
Displaying keyword search results 1 - 10
Created by voodoo on February 02, 2013 12:29:56
Last update: February 02, 2013 12:29:56
I got this error while compiling ucspi-tcp . The solution was to move #include <errno.h> from error.c to error.h .
The following also works:
echo gcc -O2 -include /usr/include/errno.h > conf-...
The reason was explained in http://cr.yp.to/docs/unixport.html#errno
Created by Dr. Xi on May 25, 2012 15:47:34
Last update: May 25, 2012 15:49:33
Steps to configure SSL for Apache HTTPD server on Windows:
In Apache2.2/conf/httpd.conf , load mod_ssl and include httpd-ssl.conf :
LoadModule ssl_module modules/mod_ssl.so
...
In Apache2.2/conf/extra/httpd-ssl.conf , make sure the paths for the cert files point to the cert and key you want to use:
# Server Certificate:
# Point SSLCertificat...
Start up Apache. If it fails, use the command line to see what the error is. There won't be any log in error.log if there are errors in the conf files:
C:\Program Files (x86)\Apache Software Foundation\...
I corrected the previous error by using the alternative line for SSLSessionCache :
# Inter-Process Session Cache:
# Configure ...
Created by Fang on November 21, 2011 16:30:56
Last update: December 07, 2011 08:54:32
This is a series of notes on building custom JSF 2.0 facelet taglibs, ordered from the simplest to the less simple. Hopefully it can help you to get started on how to build custom taglibs for JSF. A simple JSF facelets taglib example The simplest taglib I can think of. Using EL expression with a custom tag Make tag attributes dynamic. Mixing custom tag with facelet ui taglibs Discover things you might run into when you get into more details. Which EL context to use? Using the wrong EL context can lead to subtle bugs. JSF facelet taglib backed by a UI component A UIComponent can be a tag handler, without being TagHandler . Using tag handler, UI component and renderer with a JSF facelet...
Created by Dr. Xi on April 26, 2011 20:12:01
Last update: April 28, 2011 15:28:12
An XML schema is a definition of XML files, in XML. It plays the same role as old-time DTDs. Overall, an XML schema file looks like this:
<schema attributeFormDefault = (qualified | u... The attribute meanings: targetNamespace : The name space targeted by the current schema definition. It can be any URI. id and version : For user convenience, the W3C spec defines no semantics for them. xml:lang : Natural language identifier defined by RFC 3306 . attributeFormDefault and elementFormDefault : Set default values for the form attribute for attribute and element declarations. blockDefault and finalDefault : Set default values for the block and final attributes for attribute and element declarations. The W3C defined some built-in datatypes . Examples of primitive datatypes are: string ,...
Created by voodoo on March 04, 2011 12:11:33
Last update: April 13, 2011 13:55:13
By default SELinux blocks execstack permission. According to Ulrich Drepper :
"As the name suggests, this error is raised if a program tries to make its stack (or parts thereof) executable with an mprotect call. This should never, ever be necessary. Stack memory is not executable on most OSes these days and this won't change. Executable stack memory is one of the biggest security problems. An execstack error might in fact be most likely raised by malicious code."
You can check if a library/application requires execstack by using the execstack utility:
execstack -q PATHTOPROGRAM
You can try to clean the flag and see if the application still runs:
execstack -c PATHTOPROGRAM
To allow execstack for cc1 :
# grep cc1 /var/log/audit/audit.log | audit2allow ...
Created by voodoo on April 13, 2011 13:47:34
Last update: April 13, 2011 13:49:20
You get "permission denied" error from Apache HTTPD for a page. And you checked file/directory permissions (the whole directory path, not just the file) and everything in httpd.conf . If everything seemed right, then SELinux may be blocking the access.
Open /var/log/httpd/error_log , you may see a line like this:
[Wed Apr 13 15:50:35 2011] [notice] SELinux poli...
These are the steps to fix:
If the directory resides in a user home directory:
# setsebool -P httpd_read_user_content 1
Create a policy package from the audit log:
# grep httpd /var/log/audit/audit.log | audit2allo...
Apply the policy package just created
# semodule -i mypol.pp
Restart apache httpd:
# apachectl restart
Created by Fang on March 30, 2011 15:31:24
Last update: March 30, 2011 15:31:24
You get this error when you are trying to compile with JDK 1.5 (class version 49), but your dependency was compiled by JDK 1.6 (class version 50). Check the JAVA_HOME setting, and make sure it's pointing to JDK 1.6. On Unix, use
set | grep -i java_home
On Windows, just
set JAVA_HOME
Created by Dr. Xi on March 28, 2011 11:11:33
Last update: March 28, 2011 11:13:21
grep is a versatile command with many variations (grep, egrep, fgrep, then various implementations). It uses a regula expression (regex) pattern to filter input. But then there are basic and extended flavors of regex - leading to even more confusion. And, beware that there are lots of bad examples of regex in the wild... There are two critical questions to ask when you use grep: which grep implementation are you using? what is the flavor of the regex? Here are some examples for gnu grep v2.7:
# Find all numbers (no decimal point), basic regex... Use the -o flag to show only the matching part instead of the whole matching line: grep -o -E '\b[0-9]{2}\b' The good thing about the gnu grep is that it...
Created by James on January 10, 2011 16:37:20
Last update: January 10, 2011 16:37:20
The following page injects CSS rules with JavaScript. It works fine in Firefox and Chrome.
<html>
<head>
<script type="text/javascrip...
But in IE, it breaks with "Unknown runtime error" (seemed like it's trying to interpret the curly brackets in the CSS as JavaScript blocks!):
In order to make it work in IE, the code need to be changed to:
<html>
<head>
<script type="text/javascrip...
The tricks to identify IE and insert new CSS rules came from Paul Irish .
Created by magnum on August 19, 2010 22:42:26
Last update: August 19, 2010 22:43:59
Lyx wasn't able to open DVI files with the error message MIME type application/x-dvi not supported. I looked at Lyx preferences and it's using xdg-open to open the file. The following query shows that the default application for the DVI mime type is Evince. So I updated that to xdvi , which I do have.
$ xdg-mime query default application/x-dvi
...
But it didn't work! I checked that the file ~/.local/share/applications/defaults.list did get updated. I even logged out and logged back in!
I had to update the system wide configuration file /usr/share/applications/defaults.list to make it work:
#application/x-dvi=evince.desktop
applicati...