Hey,
Thanks for your reply. I was just going over my code again and noticed the same thing!! Arg, stupid mistake! I meant to comment that line out because that was the old way before I used strdup, but forgot to.
Thanks for your help, this is a great forum.
Later
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...
Thanks for the answer. So just to be clear, if I don't call free on all my malloced pointers when the program ends the OS will "probably" free up the memory for me anyway, but I should really do it myself just in case another program calls my program. Plus it is just good coding practices...
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,
You seem to have extra { and } in there. But to set a fields focus you would do this
field.focus();
with field being a reference to the field object for example:
document.formname.txtActRevenue;
Hope that helps.
Later
Hey,
You seem to have extra { and } in there. But to set a field's focus you would do this
field.focus();
with field being a reference to the field object for example:
document.formname.txtActRevenue;
Hope that helps.
Later
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"...
Are you looking for someone to do this for you or do you want to know how to do it? Because your problem isn't that difficult for someone who knows how to use perl,databases,apache,server configuration ....and many other things but this isn't something that can be solved by someone just posting...
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...
hehehe...yeah, I just wanted to give an idea of how I was comparing and where it was failing.
As for the new line character, well I have thought of that but I dismissed it because the password is hardcoded on both the dev system and the production system in a file that is called from cron. For...
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...
I wrote this whilst other people replied but here it is anyway......probably a little verbose but it works :). You can make it better but I am too busy at the moment.
#!/usr/bin/perl -w
use strict;
#make our variables
my @a1 = qw/1 3 5 7 9 11 13/;
my @a2 = qw/1 2 3 4 5 6 7/;
my @new = ()...
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...
Thanks for your input.
Yeah, I didn't think there was any difference in speed or if any very miniscule. However, I like to program that way because I feel it is eaiser to read and debug, whereas some do not and I get the feeling that they feel it is bad programming or something....like doing a...
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 think I may have solved my problem...not the way I wanted to do it...but hey it works.
This is going back to what Paul said
The thing was, I didn't want to set the | symbol to \| in my select box because I use it elsewhere. So in my map I just set a new variable to with the pipe...
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.