Archive for January, 2009


JBoss Properties

from JBoss Wiki

JBoss Properties

There are a number of properties used by the micro-kernel during the bootstrap.

This documentation is heavily plagiarized from

org.jboss.system.server.ServerConfig

.

Bootstrap Configuration

  • jboss.boot.library.list – The basic jars used to bootstrap the kernel, there are other jars used (TODO explain) – default value log4j-boot.jar, jboss-common.jar, jboss-system.jar
  • jboss.server.type – The fully qualified class name of the

    org.jboss.system.server.Server

    implementation – default

    org.jboss.system.server.ServerImpl

  • jboss.server.root.deployment.filename – The file to deploy at the end of the bootstrap, relative to the config url – default

    jboss-service.xml

Directories and urls

  • jboss.home.dir – The base directory of the jboss distribution – default

    $JBOSS_HOME

  • jboss.home.url – The base url of the jboss distribution – default

    $JBOSS_HOME

  • jboss.lib.url – The url where the kernel jars exist – default

    $jboss.home.url/lib

  • jboss.patch.url – A directory where patch jars exist – default

    none

  • jboss.server.name – The configuration name of the server – default

    default

  • jboss.server.base.dir – The directory where server configurations exist – default

    $jboss.home.dir/server

  • jboss.server.base.url – The url where server configurations exist – default

    $jboss.home.url/server

  • jboss.server.home.dir – The directory for the current configuration – default

    $jboss.server.base.dir/$jboss.server.name

  • jboss.server.home.url – The url for the current configuration – default

    $jboss.server.base.url/$jboss.server.name

  • jboss.server.temp.dir – The directory for temporary files – default

    $jboss.server.home.dir/tmp

  • jboss.server.data.dir – The directory for data files – default

    $jboss.server.home.dir/data

  • jboss.server.config.url – The url for configuration files – default

    $jboss.server.home.url/conf

  • jboss.server.lib.url – The url for static jar files – default

    $jboss.server.home.url/lib

  • jboss.server.log.dir – The directory where the server logs are written – default

    $jboss.server.home.dir/log

Other config

  • jboss.bind.address – The host name or ip address for jboss services to bind to – default

    0.0.0.0

    = “ANY” NIC – (v4.2.)

    127.0.0.1

    = localhost only

  • jboss.partition.name – The cluster partition – default DefaultPartition
  • jboss.partition.udpGroup – (since v4.0.3) The udp group – no default
  • jboss.server.exitonshutdown – Whether JBoss should do

    System.exit()

    on a shutdown – default true

  • jboss.server.blockingshutdown – Whether JBoss should do shutdown synchronously (true) or asynchronously (false) – default false
  • jboss.server.requirejbossurlstreamhandlerfactory – When true an error is thrown if the jboss stream handlers could not be installed – default true
  • jboss.server.temp.dir.overrideJavaTmpDir – (since v3.2.3) whether to override the main java temporary directory (java.io.tmpdir) to the server temporary directory – default false
  • jboss.shutdown.forceHalt – (since v3.0.1) force a Runtime.getRuntime().halt() at the end of the jboss shutdown hook – default true
  • jboss.native.load – whether to to load the native libraries unpacked from deployments – default false
  • jboss.native.dir – location to unpack native libraries in deployments – default tmp/native

Non JBoss properties

  • log4j.configuration – override the location of the log4j bootstrap configuration

MySQL: Get Next Auto_increment

MySQL: Get Next Auto_increment
Thursday April 24th, 2003

** It is not recommended to use this method for generating foreign keys for lookups. In a multiuser environment with simultaneous requests the results will be utterly useless and unreliable. OK? **

So I was working on the preview feature of the home grown content management system for this site, and I came across an interesting problem for which my friend Google had no answers.

The way the preview feature works is that when editing an entry, you hit the PREVIEW button, and the script posts the edited data unto itself and then writes it to a temp file named {section}_{entry ID}.php. When the posted page loads, it opens a new window with the template for the given section, and the POST data is processed in the content well, just as any other entry would be.

The problem is that if you want to create a NEW entry, you don’t have an entry ID to assign to the tempfile name, and therefore the preview feature does not work. So I needed a way of finding out what MySQL would assign as the next auto_increment entry ID if I were to actually insert a record. My first thought was to simply get the highest existing ID from the table and add 1, but that is not a perfect solution. For one thing, there is the possibility that another author might insert a new record during the time that I’m previewing, which will cause some confusion — we might end up with two instances of the temp file overwriting one another. No good. Also, the highest existing ID + 1 is NOT necessarily the next auto increment ID, because when entries are deleted, the entry ID is not reused. So it’s conceivable that if your highest ID is 500, the next ID might be 501, or it might be 5001 for all we know.

I was on a mission.

So, I looked all over the web for a solution, and found several similar scenarios described, but no answers. In fact, I came across several forums and help sites where it was actually stated as fact that you CANNOT get the next auto_increment. I knew this to be false, because this information is displayed in the table structure view of phpMyAdmin. So I scoured the source code of phpMyAdmin, and after many desperate combinations of GREPs, FINDs, and XARGSs, I finally came up with this: (assumes we’re already connected to the dB)

And the rundown:

“SHOW TABLE STATUS” produces a two-dimensional array with one row for each table, and a slew of columns: Name, Type, Row_format, Rows, Avg_row_length, Data_length, Max_data_length, Index_length, Data_free, Auto_increment, etc.

So what I’m doing here is using mysql_fetch_assoc() to get the “Auto_increment” value.

And there you have it. Our next likely entry ID, without inserting anything.

edited by JD on 2/14/06

Oh the drama

Posted by Jamie
Comments: 65

from http://office.microsoft.com/en-us/outlook/HA010875321033.aspx

This article is written for the Microsoft Outlook Personal Folders Backup tool that is available as a download from Microsoft Office Online.

The Personal Folders Backup tool is designed for use in Outlook 2002 and later and the operating systems that support each respective Outlook version. The tool provides a quick and easy way to back up the Outlook information of your choice to your hard disk or network server or share.

After you back up your information, you can copy these duplicates of your Outlook data to a removable media such as a CD or DVD. The backup files are exact copies of the original files and are saved in the same file format. You can receive periodic reminders to back up your files.

————————————————————————————–

For those of you that installed the addon and the Backup Menu Item doesn’t appear it’s because the .dll addon is being placed in C:\program files\Microsoft Office\[OFFICE VERSION]\ADDINS and your client is set to look else where (in my case C:\Documents & Settings\[USERNAME]\Microsoft\ADDINS. To solve the issue do the following:

Outlook 2007
- Click Tools -> Trust Centre
-Click on the Add-ins Tab
- At the bottom of the window select Com Add-ins from the drop down list then click Go.
- In the Com Add-ins Window Click Add then browse to C:\program files\Microsoft Office\Office12\ADDINS
- Select Outbak.dll and press ok
- The Backup menu option will now be visible

Outlook 2003
- Tools -> Options
- Under the Other Tab click the Advanced Options button
- Click the Com Add-ins Button
- Click Add then browse to :\program files\Microsoft Office\Office11\ADDINS
- Select Outbak.dll and click ok on all the open dialogue boxes
- The Backup Menu Option will now appear

Javascript Char Codes (Key Codes)

from http://www.cambiaresearch.com/c4/702b8cd1-e5b0-42e6-83ac-25f0306e3e25/Javascript-Char-Codes-Key-Codes.aspx

Key Pressed Javascript Key Code
backspace 8
tab 9
enter 13
shift 16
ctrl 17
alt 18
pause/break 19
caps lock 20
escape 27
page up 33
page down 34
end 35
home 36
left arrow 37
up arrow 38
right arrow 39
down arrow 40
insert 45
delete 46
0 48
1 49
2 50
3 51
4 52
5 53
6 54
7 55
8 56
9 57
a 65
b 66
c 67
d 68
e 69
f 70
g 71
h 72
i 73
j 74
k 75
l 76
m 77
n 78
o 79
p 80
q 81
r 82
s 83
t 84
u 85
v 86
w 87
x 88
y 89
z 90
left window key 91
right window key 92
select key 93
numpad 0 96
numpad 1 97
numpad 2 98
numpad 3 99
numpad 4 100
numpad 5 101
numpad 6 102
numpad 7 103
numpad 8 104
numpad 9 105
multiply 106
add 107
subtract 109
decimal point 110
divide 111
f1 112
f2 113
f3 114
f4 115
f5 116
f6 117
f7 118
f8 119
f9 120
f10 121
f11 122
f12 123
num lock 144
scroll lock 145
semi-colon 186
equal sign 187
comma 188
dash 189
period 190
forward slash 191
grave accent 192
open bracket 219
back slash 220
close braket 221
single quote 222

from http://weblog.helpware.net/?p=36=1

This is a relatively old problem now, but one that keeps popping up.

You open a CHM but you don’t see your content in the right-hand pane of the HH window. You see a cryptic browser message “Navigation to the webpage was canceled” or “Action canceled”.

image5.jpg

This is due again to Microsoft plugging security holes in Windows. I’ve listed all the HH security fix problems here.  This particular problem is either:

  1. CHMs no longer work on the Intranet or Internet
    This can be fixed by a simple registry tweak (see link)
  2. Downloaded CHMs cannot be opened
    After downloading, right-click the chm file, select properties, then click “Unblock”.

hhsec2.jpg

Powered by WordPress. Theme: Motion by 85ideas.