Search:
Type: Posts; User: dchidelf
Search:
Search took 0.14 seconds.
-
perl -ne 'print if $. > 1' filename > filename.new
P.S. I think VERY big is > 1GB ... yours are just very big.
-
substr($data, offset?, 13, sprintf("%-13s",$newval));
Should replace the 13 characters at offset "offset?" with newval, right justified into that 13 character space.
-
I think the problem is that you are passing in a reference to an array.
It seems the module expects a reference to a hash.
I think the module is labeling your data anon, because there is no key...
-
Try running your script like this.
env -i ./script.pl
(maybe env - ./scriptl.pl on some systems)
env -i will run the script with no environmental variables set.
That should help you see...
-
I haven't done any Java in about 3 years, so I may have lost my Java legs.
Wouldn't read populate indices 0 through bytesread-1 of buffarray each time it is called? If that is the case, shouldn't...
-
Please takes this with a grain of salt
A 3 page resume is probably a bit lengthy unless it is packed full of achievments that pertain directly to the job for which you are applying.
Employers...
-
This may be a way to go
/^([ABC])\s(\1\s)*\1$/
This ensures the X is always the same, if that is necessary.
-
Perl has a database interface called DBI. It's not ODBC, but it also has a driver for reading Excel files as if they are databases.
http://search.cpan.org/~kwitknr/DBD-Excel-0.06/Excel.pm
I...
-
I just realized a problem.
If you are trying to crack root's passwd you probably don't have access to the passwords. But, you might.
The passwords are likely stored in either /etc/passwd or...
-
If you have access to the crypted passwd you could avoid the speed hit taken by expect and firing up a su process by comparing the crypted passwd to your input string after calling crypt on it with...
-
Be careful with realloc.
If realloc fails it returns NULL, which would overwrite buf, leaving no way to free the memory allocated (memory leak).
A realize this is just quick demo code, but remember...
-
Lisp is a popular AI programming language.
-
Depending on what the queue is designed for, it is sometimes more efficient to not free a node of the linked list when it is dequeued. That way you do not have repeated memory...
-
The amount of memory my process is using is valid. The purpose of my program (actually a library I am testing) is to store data in an in-memory database kind of structure.
I am checking the returns...
-
Well... I'm sure I'm causing it, but I'm not sure that it is because of my code.
I am working on a program that does a lot of memory allocation and mucking around with pointers to pointers to...
-
regex: if $line starts with A-Z
if ($line =~ /^[A-Z]/){
-
The string matching each regex within ()'s will be assigned to $n, where n indicates which set of ()'s.
if /((blah1)(blah2))/ matched a string
$1 = "blah1blah2"
$2 = "blah1"
$3 = "blah2"
...
-
or
char x[20];
sprintf(x," %.17s ",argv[2]);
That should ensure the string will actually fit within the allocated space.
-
I am not allocating structs of varying lengths, I am allocating memory for a data structure of varying size. I am sorry if "structure" in the last message was confusing.
I am allocating the...
-
For the most part the size of the headers doesn’t matter to me. It would just be nice to be able to reference a #define to know the size. I was doing comparisons between addresses returned by...
-
Does anyone know if ANSI C has a #define definition for the number of bytes malloc will align to? In most code I see it defined as sizeof(unsigned long), but is that always guaranteed to be the...
-
In perl == is a numerical comparison.
It is essentially the same as converting each of the arguments to an integer or float and then doing the comparison.
"hi" == "hola" will be true because...
-
Intel is little-endian, so fwrite should store the data correctly on an intel machine. However, if you move your code to a big-endian machine it will create bad files.
Code like I included in my...
-
All of your numbers look correct.
A data length of 400000 @ 44100 bytes/sec is around 9sec though.
That aside.
RIFF files are little endian.
So all of your numbers in the header must be...
-
This is a bit usefull as far as a BNF grammar for ansi C
http://www.lysator.liu.se/c/ANSI-C-grammar-y.html
|
|