Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. dalhousi

    Resize iFrame (different domain)

    Hi everyone, I'm trying to resize an iframe based on its contents. The problem is that the iframe and the parent document are on two different domains (they're not even sub domains of each other). Can the iframe have a property to resize automatically based on the contents (which is flash)? or...
  2. dalhousi

    Temporary On Delete Cascade

    Hi all, I'm facing a little problem in deleting records from MySQL. My database contains around a 100 tables and there are so many relationship among them (just like spaghetti). I want to delete couple of records with all their children but the problem is that the constraints do not have an...
  3. dalhousi

    Communications among windows

    Thanks for the reply Dan. Actually the two domains are totally different. Do you know a good tutorial that explains how to use a proxy in Javascript? Thanks, Cheers,
  4. dalhousi

    Communications among windows

    Hi all, I have a little problem in Javascript. What I want to do is to communicate between two windows from different domains. I just need one function to be accessible from the other windows (that belong to different domains). Is there any way around, like giving the function a "public"...
  5. dalhousi

    Open an image using Image::Magick

    Hi guys, It was my mistake. When I tried to read a picture, I have used the absolute path: $image->ReadImage('/images/MY_PICTURE'); However, I should have used: $image->ReadImage('../../images/MY_PICTURE'); Thanks, Cheers,
  6. dalhousi

    Open an image using Image::Magick

    Hi everyone, I've been trying to use the library Image::Magick to open an image, write some text in it, and then print it. However, all I could do is to write some text on a white (or any other color) background. I want to set an image of mine as the background of the picture. I tried the...
  7. dalhousi

    Magick

    Hi Everyone, I'm trying to write some text on an picture and display this picture. I'm using Perl with the library Magick. However, it seems that it is not working. I cannot even read a picture and display it. I used the following example code but i got nothing: #!/usr/local/bin/perl use...
  8. dalhousi

    String Replacement

    Thanks guys. That was very helpful. Cheers,
  9. dalhousi

    String Replacement

    Hi Everyone, How do I replace the "'" in a string with the escape character "\'" in Perl? or in general: how do I replace a substring with another substring? In PHP: I would use the function str_replace. Is there any function in Perl similar to str_replace? Thanks in advance Cheers
  10. dalhousi

    Array Attribute

    Thanks Kevin, That worked, finally :) I suppose that the "\" in Perl means reference, right? One more thing: in order to copy the length of the array, the following should be added: $obj->{my_array} = \@another_array; $obj->{@my_array} = @another_array; Otherwise, I could not get the length...
  11. dalhousi

    Array Attribute

    Well, this works but in this case, $obj->{@my_array} will be a string instead of an array. Is there any other way of dealing with it as an array? Thanks,
  12. dalhousi

    Array Attribute

    No, Still not working. It seems to me that when I assign @another_array to $obj->{@my_array}, it assigns only the length of the array. So, if I try to print $obj->{$my_array[0]}, it will print the length of the array.
  13. dalhousi

    Array Attribute

    Thanks for the reply Kevin. Unfortunately, it didn't work. Is my syntax correct? I mean I am not sure that the proper way to deal with arrays within a class is $obj->{@my_array} or $obj->{@my_array[2]}. Cheers,
  14. dalhousi

    Array Attribute

    Hi Everyone, I'm trying to write a class in Perl. One of the attributes is an array. How can I get/set the values of the array? Usually, I get the value of other attributes using: $obj->{att} = "something"; but now, since it is an array, how can I do that? Here is the code I wrote: package...
  15. dalhousi

    Connecting to MySQL

    Problem is solved. I just realized that I was calling DBI:MySQL (capital letters) instead of DBI:mysql. Thanks everyone,
  16. dalhousi

    Connecting to MySQL

    I just installed dbd-mysql. However, I got the warning: Installing DBD-mysql-3.0002 for DBD-mysql-SimpleMySQL would downgrade DBD::mysql from version 4.004 to 3.0002 and Mysql:: from version 4.004 to 1.2401 Anyway, I proceeded. Now the error message I get has changed to the following...
  17. dalhousi

    Connecting to MySQL

    Thanks for your reply guys. I'm not sure I did the right steps to install dbd-mysql. I tried to use ppm, the wizard that comes with Perl, but it did not recognize the module dbd-mysql. I tried to download the tar file of dbd-mysql and I copied the files to c:\perl\lib but I keep getting the...
  18. dalhousi

    Connecting to MySQL

    Thanks for your reply Spookie. Actually, the file exists in right location in "C:/perl/lib/DBI.pm". Also, there is a folder "C:/Perl/lib/DBI". However, it is still not working. Any other suggestions or comments? Thanks,
  19. dalhousi

    Connecting to MySQL

    Hi Everyone, How can I connect with MySQL database using Perl? Here is the source code I am using: #!C:\perl\bin\perl.exe print "Content-type: text/html\n\n"; use DBI; $db="perl_test"; $host="localhost"; $port="3306"; $userid="root"; $passwd=""...
  20. dalhousi

    Perl Installation

    Thank you Kevin. That was the problem. It is working now. [thumbsup2]

Part and Inventory Search

Back
Top