Hello,
just before my program exits I am trying to free up all malloced memory, however when I try to call free on one of my char * I get a segmentation fault. Here is some of my code.
Here is my structure....it is a linked list:
//this is a structure for our file information
struct...
Hey,
I am new to C and I am writing a small program similar to grep. I am using some linked list structures so I don't have to have a staticly defined array. I use malloc to create each new structure. What I am wondering is, do I have to call free on each pointer when the program ends? I...
Hey,
I have a js function that submits a form to an iframe. The js to do it is like so
//sending in our form reference and where we want to
//post the form
function submitTemp(form,where)
{
//making the forms target an iframe
form.target="tempSaveIframe";
form.method="POST"...
Hey,
We just updated our Perl 5.6.0 to version 5.8.2 and this error keeps coming up in the Apache error_log:
Attempt to free unreferenced scalar: SV 0x8cbb26c at /usr/local/lib/perl5/site_perl/5.8.2/mach/Apache/Registry.pm line 149.
Sometimes it is different modules other than Registry.pm...
Hey,
I am trying to write personal error_log for a perl program I wrote. What I want in the error_log is the line number where the error occured, the file name and the error message. I know how to get the file name ($0), and I will send my own text message, but is there anyway to get what...
Hello,
I work on a web application that uses md5_hex to store and verify passwords. I needed to write a perl program that can be run from the command line and connects up to the database but the user must pass in a username and password. I made the authentication pretty much exactly the same...
Hey,
I have a mod_perl question. When the user clicks on a link I want them to be able to download a file. Below is the code I use to do it. It works fine. However, I want to make sure I am using mod_perl to it fullest, so I want to convert some of the statments to more mod_perlish (hope that...
Do the various 'Syntactic Sugar' options slow down perl programs?
ex:
#$r is an apache request object
$r->print("<form name=\"thisform\"");
#vs.
$r->print(qq@
<form name="thisform"
@);
I am just wondering because I find the qq makes complicated html print statements...
Hey,
I am trying to do a regular expression but I am running into a problem because the scalar that I am doing the test on may or may not have regular expression syntax in it. When it has regular expression syntax in it...it doesn't work...confused? Maybe an example will explain it better...
Hello,
First, how can I see what triggers are on a table (or defined on a table or whatever you want to call it)?
Second, how can I see the defination of a particular trigger?
This is all from sqlplus. I am thinking along the lines of
"describe trigger_name"....but I might be way off, but...
Hey,
I am trying to convert my web application from Postgresql to oracle....want to give the clients an option. Anyway, amoung the many differences in sql, I am wondering if there is a way to do bitwise comparision in oracle. This is the query I use in postgresqlS:
SELECT actor_id
FROM...
Hey,
I am trying to automate something that I have to do over and over again, that I think could easily be done in a script in 10 minutes and then I could run it any time....ahhh the lazy programmer :)
What I need done will be some command line stuff (I am working on Linux BTW), but the only...
Hello,
I work for a company that makes a web application. When I first started, I convinced my boss that we should convert the entire application over to style sheets...you know separate style from content. It worked out great, allowing our users to be able to select from 8 different styles...
Hello,
I have a problem when I try to connect to a database through Mysql Control Center.
If I run the control center as root, I can connect to any database on my localhost, and any mysql databases on any other server. However, when I run it as a normal user, I get an error every time I...
Hello,
I am trying to allow users to add elements to a form dynamically. Here is some of my code:
[code]
function createNewRow(tbody){
var td,tr;
var cost = quan * 100;
tbody = document.getElementById(tbody);
tr = tbody.insertRow(tbody.rows.length);
//Product Name
td =...
Hello,
I am porting my application over from postgresql to Oracle because I want to be able to offer my application in both postgresql and oracle. However, I am having trouble with timestamps, dates and intervals. I use these a lot in the reporting features of my application and I guess since...
Hello,
I have some sql that I want to port over from Postgresql to Oracle but I am having a lot of trouble with it. One thing in particular is using the AVG function with dates. Just to give you an example of what I am tyring to do, in postgresql I use the AGE function to find out the...
Hello,
I am trying to port my application to be able to use Oracle (currently I use postgresql) I am trying to create the below view, however I am having problems with the sql. I think it is the DISTINCT that is causing the problems. I want a distinct on two columns. How can I do this in...
Hello,
I am trying to use the SELECT FOR UPDATE and I want to know if I am using it correctly. I want to make sure the below sql will lock the row so I can get it, update it and then commit and no one else can have access to it. I think my code is a little strange because SELECT FOR UPDATE...
Hello,
I am using the Spreadsheet::WriteExcel perl module to create reports from a database that can be emailed to people who need them in windows excel format. Everything is going well (this is a great module) but one of the users has complained about how it prints off. The report is over...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.