Shared memory errors

Blogged by webmilhouse as Oracle/DB — webmilhouse Thu 29 Jan 2004 7:12 am

So I started out the day with the following Oracle 8.1.7 errors:
ERROR:
ORA-04031: unable to allocate 4096 bytes of shared memory (”shared pool”,
“BEGIN DBMS_OUTPUT.DISABLE; E…”,”PL/SQL MPCODE”,”BAMIMA: Bam Buffer”)

Our DBA told us to increase our shared_pool_size in the $ORACLE_HOME/dbs/init<SID>.ora file, but make sure that the values we increase the pool_size to is in blocks of 512K and that it is only 20% - 50% more memory than before (anything more or less than that will cause performance problems). Also, DBA suggested putting in a shared_pool_reserved_size that is 20% of whatever we changed the shared_pool_size to, so that Oracle has a cache of available memory space that it can always use — again, 20% for performance reasons. Interesting.

Here is what I ended up setting in the init<SID>.ora file to and then I stopped and started the database instance:

shared_pool_size = 8388608
shared_pool_reserved_size = 1677721

Nice pictures for backgrounds / whatever

Blogged by webmilhouse as General — webmilhouse Tue 20 Jan 2004 4:09 pm

In case you have never been to this site, there are excellent series of pictures for download from the National Geographic site.

Check out today’s of a whale’s tail.

Printing Using CSS

Blogged by webmilhouse as Web Development — webmilhouse Tue 20 Jan 2004 4:07 pm

There is an excellent article on Devnet from Macromedia on using CSS to print a page.

Check out the article.

Disable submit button in form

Blogged by webmilhouse as ColdFusion — webmilhouse Tue 13 Jan 2004 11:59 am

Had a situation where I needed to disable a submit button after submission of the form. There are a number of ways to do this, but I was having trouble when the name of the button was “submit” — the reason turned out to be that Internet Explorer was confusing the document.formname.submit button with the document.formname.submit() function (who knew — probably you, but not me :). So I just changed the name of the button and here is the code that works for me. Feel free to post better code.

function checkoutForm() {
var d = document.formname;
if (!d.card_number.value) {
.
.
. // rest of form processing stuff
} else {
d.submit1.disabled = true;
return true;
}

The form looks like this:

<form method=”post” action=”actionpage.cfm” onsubmit=”return checkoutForm();”>
<input type=”text” name=”card_number”>
<input type=”submit” name=”submit1″ value=”Process”>
</form>

A cheesy implementation, but it works.

Copying URL and FORM Structs

Blogged by webmilhouse as ColdFusion — webmilhouse Fri 9 Jan 2004 3:46 pm

I was trying to copy a FORM struct to a URL struct for our testing environment and couldn’t just use:
<cfset URL = StructCopy(FORM)>

So I had to loop over the FORM collection and insert it manually. Here is how I did it:
<cfloop collection=”#FORM#” item=”form_key”>
 <cfscript>
    StructInsert(URL, #form_key#, #StructFind(FORM, form_key)#);
 </cfscript>
</cfloop>

Let me know if you have any improvements to this or what I did wrong in the first place.

Mars Rover Application / Data

Blogged by webmilhouse as General — webmilhouse Thu 8 Jan 2004 9:48 am

The JPL from NASA released Maestro for download for Windows, Mac, or Linux, as well as the first week of data from the Mars rover Spirit. Very cool application lets you view all the raw data and pictures from the rover, as well as simulate driving it in their test lab.

Get Maestro from here and then get the data updates from here.

Tutorial on Eclipse, Tomcat, and Struts

Blogged by webmilhouse as Java — webmilhouse Wed 7 Jan 2004 1:02 pm

There is an excellent beginners article on Java Boutique that explains how to install and setup Tomcat with Struts and start development of web applications within Eclipse with the Tomcat plugin for Eclipse.

Check out the article.

Sequence number generation problems in Oracle

Blogged by webmilhouse as Oracle/DB — webmilhouse Tue 6 Jan 2004 11:40 am

We came upon an interesting problem with sequence number generation in Oracle. Every night we export and dump our databases to tape for archiving and recovery. Because we used to create Oracle sequences with caches of 20 by default, the shared memory pool was aging out the sequence cache and starting with the next number 20 greater than the last sequence number every day.

In Oracle 8i, to disable this, we create the sequence now as:
sqlplus> create sequence
start with 1
increment by 1
nocache;

An interesting article as to why this happens can be viewed here.

Reverse Engineering Paper

Blogged by webmilhouse as Papers and Writings — webmilhouse Tue 6 Jan 2004 8:21 am

Here is a research paper on reverse engineering I wrote for my ethics class. Feel free to use the references and read it over and let me know what you think. Unfortunately my prof still hasn’t graded this paper, a month after it was submitted, but the class is over so here you go.

Here is the PDF (72 KB) of the original paper.

Central

Blogged by webmilhouse as Flash — webmilhouse Tue 6 Jan 2004 7:33 am

Macromedia came out with Central that allows you to deploy Flash applications for the desktop. There is an SDK and some tutorials on the site. The nice thing is that you don’t have to be connected to the Internet to use the applications.

Was pointed to this nice Central application for finding Wi-Fi spots near where you are — great for a laptop while you are traveling: http://intel.jiwire.com/.

Epoch time and date

Blogged by webmilhouse as ColdFusion — webmilhouse Mon 5 Jan 2004 5:05 pm

To convert epoch time and date from a Unix timestamp to a ColdFusion date object, use the following:

<cfscript>

function ConvertEpochTime(epoch) {
    return DateAdd("s", epoch, "January 1 1970 00:00:00");
}
</cfscript>

You can use the following site to also convert it for your own reference: Online Conversion - Unix time

Explaination of SYN scans

Blogged by webmilhouse as Linux — webmilhouse Mon 5 Jan 2004 8:01 am

There is an excellent article on Security Focus that describes what happens behind the scenes in SYN and other port (or enumeration) scans for Linux and Windows servers.

Proudly powered by wordpress 2.7 - Theme based on Back in Black 2 by neuro, modded by me.