Recent Notes
Displaying keyword search results 1 - 7
Created by voodoo on August 03, 2012 08:42:38
Last update: August 03, 2012 09:31:25
The C function getsockopt lets you get the error codes with the option SO_ERROR . The possible error numbers are defined in the global errno.h . The relevant values are:
#define ETIMEDOUT 110 /* Connection timed out */
...
But here's the whole list on my Linux system ( /usr/include/asm-generic/errno.h ):
#ifndef _ASM_GENERIC_ERRNO_H
#define _ASM_GENER...
Created by Fang on November 10, 2011 09:26:12
Last update: November 10, 2011 09:26:12
Syntax highlighted XML schema for JSF 2.0 Application Configuration Resource File ( faces-config.xml ). Almost 3000 lines!
<?xml version="1.0" encoding="UTF-8"?>
<xsd:sch...
Created by jinx on May 16, 2011 20:21:38
Last update: May 16, 2011 20:21:38
PHP compares two arrays element for element for equality. Two arrays are considered equal when they have the same number of elements, and for each element key and value both match.
Test code:
<?php
$cmp = array(
array(array(1), array(1...
Outputs:
array(1) {
[0]=>
int(1)
}
array(2)...
Created by Dr. Xi on March 31, 2011 15:03:26
Last update: April 01, 2011 12:34:50
Create an openssl configuration file which enables subject alternative names ( openssl.cnf ):
[req]
distinguished_name = req_distinguished_...
Create a certificate request using above configuration file:
C:\work>openssl req -new -key testServer.key -out ...
Verify the request was created successfully:
C:\work>openssl req -text -noout -in testServer.cs...
(Optional) self-sign the certificate request:
C:\work>openssl x509 -req -days 3650 -in testServe...
Created by James on June 22, 2010 19:09:07
Last update: June 22, 2010 19:09:50
The first form iterates over a jQuery object and executes a function for each matched element. This is an example from jQuery documentation:
<!DOCTYPE html>
<html>
<head>
<style>
...
The second form iterates over a general collection (examples from jQuery documentation):
$.each([52, 97], function(index, value) {
al...
Created by Dr. Xi on July 28, 2009 19:00:55
Last update: July 28, 2009 19:03:57
When you install Apache with mod_ssl, an executable file openssl (or openssl.exe for Windows) is installed in /usr/local/ssl/bin (or %APACHE_HOME%/bin ). This utility is used to generate private key and certificate request:
Generate private key:
openssl genrsa -out server.key 1024
# or wi...
Generate certificate request:
openssl req -new -key server.key -out server.csr
...
Self-Sign Certificate:
openssl x509 -req -days 3650 -in server.csr -signk...
Apache configuration:
Listen 443
<VirtualHost *:443>
ServerNam...
In some configurations
SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unc...
is used to work around MSIE bugs. See http://httpd.apache.org/docs/2.2/ssl/ssl_faq.html#msie for details.
Created by Dr. Xi on September 25, 2008 02:56:24
Last update: September 25, 2008 03:00:10
When you use a TreeMap , the entries in the Map is sorted by the keys.
This following code outputs the elements of the map sorted by value.
import java.util.*;
@SuppressWarnings("...
The output is:
key: e, value: be
key: g, value: by
key:...