Re: searching CPAN using a Mozilla keyword bookmark

Re: searching CPAN using a Mozilla keyword bookmark

am 15.01.2003 23:30:46 von Scott Wessels

----- O M -----
From: "Arms, Mike"
Subject: RE: searching CPAN using a Mozilla keyword bookmark


: Hi, Scott.
:
: I had no idea IE could do this sort of thing. Of course, I
: only recently found out about Mozilla's capability.
:
: Can IE do any of the Advanced keyword tricks (using JavaScript
: or something) to manipulate the %s (e.g. split it up, change case,
: send as a POST rather than GET http request, etc.)?
:
: Example:
:
: Name: Google Site Search
: Location: javascript: function multipleInputShortcut(url){ var entry =
: '%s'; var entries = entry.split('^'); var urls = url.split('%'); url =
: urls[0]; for(var i=1; i < urls.length;i++){ if(urls[i].indexOf('s') == 0){
: if(!isNaN(urls[i].charAt(1))){ if(entries[urls[i].charAt(1)-1]) url +=
: entries[urls[i].charAt(1)-1] + urls[i].substring(2); else url +=
: urls[i].substring(2); }else url += '%'+urls[i]; }else{ url += '%'+urls[i]; }
: } return url; } window.location =
: multipleInputShortcut('http://www.google.com/search?as_q=%s1 &as_sitesearch=%
: s2');
: Keyword: ggs
:
: --
: Mike Arms
:

Mike,

I wasn't aware of this cool little trick until you brought it to my attention. IE does support it. Unfortunately though, it's not as
simple as cutting and pasting. However I implemented the multipleInputShortcut in a version suitable to IE.

[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\SearchUrl\ggs]
@="javascript:function multipleInputShortcut(url, param) { var params = param.split('+'); for(var i = 0; i < params.length; i++) url
= url.replace(RegExp('%%s' + (i + 1), 'g'), params[i]); return url; } window.location =
multipleInputShortcut('http://www.google.com/search?as_q=%%s 1&as_sitesearch=%%s2', '%s');"
" "="+"
"+"="%2B"
"%"="%25"
"&"="%26"


Note the necessity of using '%%s#' versus simply '%s#'. Probably because the text is being used as the format arg in a sprintf type
function, instead of just searching and replacing %s.

My function also differs in that it uses a space as the delimiter instead of a ^. There are quirks to it, but it answers your
question.

Regards,
Scott Wessels

_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

store array indexes or references ?

am 15.01.2003 23:53:51 von stonuzi

Hi,

I have an array of array.

I use a hash to point some of the arrays.

Does it take more memory to store a reference to an
array or to store an index to access the array ?

thanks,

Selim.

___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com
_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Re: store array indexes or references ?

am 17.01.2003 02:39:49 von Bill Royds

On most computers, there would be little difference.
An address takes 4 bytes and an integer is 4 bytes.
On other architectures, all Perl numbers are floating point at 8 bytes so
the reference version would be smaller.

----- Original Message -----
From: "Tonuzi Selim"
To: "'ActivePerl'"
Sent: Wednesday, January 15, 2003 5:53 PM
Subject: store array indexes or references ?


> Hi,
>
> I have an array of array.
>
> I use a hash to point some of the arrays.
>
> Does it take more memory to store a reference to an
> array or to store an index to access the array ?
>
> thanks,
>
> Selim.
>
> ___________________________________________________________
> Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
> Yahoo! Mail : http://fr.mail.yahoo.com
> _______________________________________________
> ActivePerl mailing list
> ActivePerl@listserv.ActiveState.com
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Re: store array indexes or references ?

am 17.01.2003 04:57:28 von Bill Royds -Perl

On most computers, there would be little difference.
An address takes 4 bytes and an integer is 4 bytes.
On other architectures, all Perl numbers are floating point at 8 bytes so
the reference version would be smaller.

----- Original Message -----
From: "Tonuzi Selim"
To: "'ActivePerl'"
Sent: Wednesday, January 15, 2003 5:53 PM
Subject: store array indexes or references ?


> Hi,
>
> I have an array of array.
>
> I use a hash to point some of the arrays.
>
> Does it take more memory to store a reference to an
> array or to store an index to access the array ?
>
> thanks,
>
> Selim.
>
> ___________________________________________________________
> Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
> Yahoo! Mail : http://fr.mail.yahoo.com
> _______________________________________________
> ActivePerl mailing list
> ActivePerl@listserv.ActiveState.com
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

SIGILL ? (not perl related)

am 31.01.2003 00:35:19 von stonuzi

I am using some perl program combined to coworker's C
program on a unix network.

I had a network problem and I had a message from the C
program saying (application received signal 4).

I don't see how to have this kind of error can occur
in a compiled program.

I know that sigill (signal 4) means for illegal
instruction.

is it due to the executable itself ?

can this signal be trapped ?

Selim.

___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com
_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs