Search Results - JustLinux Forums


Search:

Type: Posts; User: dchidelf

Page 1 of 7 1 2 3 4

Search: Search took 0.08 seconds.

  1. Replies
    7
    Views
    1,220

    perl -ne 'print if $. > 1' filename >...

    perl -ne 'print if $. > 1' filename > filename.new


    P.S. I think VERY big is > 1GB ... yours are just very big.
  2. Replies
    1
    Views
    1,108

    substr($data, offset?, 13,...

    substr($data, offset?, 13, sprintf("%-13s",$newval));

    Should replace the 13 characters at offset "offset?" with newval, right justified into that 13 character space.
  3. Replies
    2
    Views
    1,257

    Re: perl and simple xml

    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...
  4. Replies
    26
    Views
    3,402

    Try running your script like this. env -i...

    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...
  5. Re: index out of bounds exception in fileoutputstream (java)

    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...
  6. Please takes this with a grain of salt A 3...

    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...
  7. Replies
    4
    Views
    753

    This may be a way to go ...

    This may be a way to go


    /^([ABC])\s(\1\s)*\1$/


    This ensures the X is always the same, if that is necessary.
  8. Replies
    6
    Views
    1,229

    Perl has a database interface called DBI. It's...

    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...
  9. I just realized a problem. If you are trying...

    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...
  10. If you have access to the crypted passwd you...

    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...
  11. Replies
    8
    Views
    1,253

    Be careful with realloc. If realloc fails it...

    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...
  12. Replies
    8
    Views
    999

    Lisp is a popular AI programming language.

    Lisp is a popular AI programming language.
  13. Replies
    10
    Views
    1,578

    Depending on what the queue is designed for, it...

    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...
  14. Replies
    4
    Views
    1,426

    The amount of memory my process is using is...

    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...
  15. Replies
    4
    Views
    1,426

    Seg Fault my fault?

    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...
  16. regex: if $line starts with A-Z if...

    regex: if $line starts with A-Z




    if ($line =~ /^[A-Z]/){
  17. Replies
    4
    Views
    787

    The string matching each regex within ()'s will...

    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"


    ...
  18. Replies
    7
    Views
    1,041

    or char x[20]; sprintf(x," %.17s...

    or


    char x[20];
    sprintf(x," %.17s ",argv[2]);


    That should ensure the string will actually fit within the allocated space.
  19. Replies
    4
    Views
    1,391

    I am not allocating structs of varying lengths, I...

    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...
  20. Replies
    4
    Views
    1,391

    For the most part the size of the headers...

    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...
  21. Replies
    4
    Views
    1,391

    Malloc alignment

    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...
  22. Replies
    3
    Views
    854

    In perl == is a numerical comparison. It is...

    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...
  23. Replies
    4
    Views
    1,332

    Intel is little-endian, so fwrite should store...

    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...
  24. Replies
    4
    Views
    1,332

    All of your numbers look correct. A data...

    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...
  25. Replies
    2
    Views
    2,406

    This is a bit usefull as far as a BNF grammar for...

    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
Results 1 to 25 of 164
Page 1 of 7 1 2 3 4