php-general Digest 14 Jul 2008 16:32:27 -0000 Issue 5568
Topics (messages 276740 through 276752):
Re: Freelance PHP development in India
276740 by: Wolf
276743 by: Irimia, Suleapa
276746 by: Ryan S
276748 by: Denis L. Menezes
276751 by: Gabriel Sosa
276752 by: Robert Cummings
need advice on a free DB hosting site
276741 by: willyam pax
276744 by: Irimia, Suleapa
276745 by: Per Jessen
276747 by: Eric Butera
Re: IPv6 validation
276742 by: Lester Caine
Re: case and accent - insensitive regular expression?
276749 by: Giulio Mastrosanti
276750 by: Andrew Ballard
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
--- Begin Message ---
Denis L. Menezes wrote:
Dear friends.
I am looking for freelance web developers in India.
Can contact me?
Thanks
Denis
Why just in India? There are a number of us available via the world.
Wolf
--- End Message ---
--- Begin Message ---
Wolf wrote:
Denis L. Menezes wrote:
Dear friends.
I am looking for freelance web developers in India.
Can contact me?
Thanks
Denis
Why just in India? There are a number of us available via the world.
Wolf
Cause they are cheaper?
__
//Just my 2 cents
smime.p7s
Description: S/MIME Cryptographic Signature
--- End Message ---
--- Begin Message ---
<snip>
> Dear friends.
>
> I am looking for freelance web developers in India.
>
> Can contact me?
>
Why just in India? There are a number of us available via the world.
Wolf
</snip>
I'm guessing because he wants a REAL cheap solution...
what you (probably) charge for 5-7hrs work would probably be the same that
someone in india charges for a day or two or the whole project.
HTH
Cheers!
R
--- End Message ---
--- Begin Message ---
Dear Ryan, Wolf.
Apologies for asking from India only. No offence meant.
It is because I am from India and I can personally meet and discuss with the
programmers. Cost is also an issue. Mine is a startup and the finances are
low. :-(
Apologies.
Denis
----- Original Message -----
From: "Ryan S" <[EMAIL PROTECTED]>
To: "Wolf" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Cc: "PHP General" <[EMAIL PROTECTED]>
Sent: Monday, July 14, 2008 8:34 PM
Subject: Re: [PHP] Freelance PHP development in India
<snip>
Dear friends.
I am looking for freelance web developers in India.
Can contact me?
Why just in India? There are a number of us available via the world.
Wolf
</snip>
I'm guessing because he wants a REAL cheap solution...
what you (probably) charge for 5-7hrs work would probably be the same that
someone in india charges for a day or two or the whole project.
HTH
Cheers!
R
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
why not argentina?
On Mon, Jul 14, 2008 at 10:31 AM, Denis L. Menezes <[EMAIL PROTECTED]>
wrote:
> Dear Ryan, Wolf.
>
> Apologies for asking from India only. No offence meant.
>
> It is because I am from India and I can personally meet and discuss with
> the programmers. Cost is also an issue. Mine is a startup and the finances
> are low. :-(
>
> Apologies.
> Denis
>
>
> ----- Original Message ----- From: "Ryan S" <[EMAIL PROTECTED]>
> To: "Wolf" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Cc: "PHP General" <[EMAIL PROTECTED]>
> Sent: Monday, July 14, 2008 8:34 PM
> Subject: Re: [PHP] Freelance PHP development in India
>
>
>
>
>>
>>
>>
>> <snip>
>>
>>> Dear friends.
>>>
>>> I am looking for freelance web developers in India.
>>>
>>> Can contact me?
>>>
>>>
>> Why just in India? There are a number of us available via the world.
>>
>> Wolf
>> </snip>
>>
>> I'm guessing because he wants a REAL cheap solution...
>> what you (probably) charge for 5-7hrs work would probably be the same that
>> someone in india charges for a day or two or the whole project.
>>
>> HTH
>>
>> Cheers!
>> R
>>
>>
>>
>>
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Los sabios buscan la sabiduría; los necios creen haberla encontrado.
Gabriel Sosa
--- End Message ---
--- Begin Message ---
On Mon, 2008-07-14 at 11:01 +0300, Irimia, Suleapa wrote:
> Wolf wrote:
> >
> >
> > Denis L. Menezes wrote:
> >> Dear friends.
> >>
> >> I am looking for freelance web developers in India.
> >>
> >> Can contact me?
> >>
> >> Thanks
> >> Denis
> >>
> > Why just in India? There are a number of us available via the world.
> >
> > Wolf
>
>
> Cause they are cheaper?
>
> //Just my 2 cents
Is that 2 cents per hour?
;)
Cheers,
Rob.
--
http://www.interjinn.com
Application and Templating Framework for PHP
--- End Message ---
--- Begin Message ---
hi
hello everyone im stil new here i just want
some advice...now im working on a database install script in php....just a
simple one...
i just need to test it online thats why i need advice on a database hosting
site that is free..
that also i can activate it with a username and password, can create
database or just select it..
--- End Message ---
--- Begin Message ---
willyam pax wrote:
hi
hello everyone im stil new here i just want
some advice...now im working on a database install script in php....just a
simple one...
i just need to test it online thats why i need advice on a database hosting
site that is free..
that also i can activate it with a username and password, can create
database or just select it..
Google may help you with this, but anyway ...
http://www.insanegb.com/ipanel/order - PHP, MySQL, 250mb space, 5gb
bandwidth
http://www.5gbfree.com/
//Irimia
smime.p7s
Description: S/MIME Cryptographic Signature
--- End Message ---
--- Begin Message ---
willyam pax wrote:
> hi
> hello everyone im stil new here i just want
> some advice...now im working on a database install script in
> php....just a simple one...
> i just need to test it online thats why i need advice on a database
> hosting site that is free..
How about installing a database on your own PC? That's free.
/Per Jessen, Zürich
--- End Message ---
--- Begin Message ---
On Mon, Jul 14, 2008 at 4:47 AM, Per Jessen <[EMAIL PROTECTED]> wrote:
> willyam pax wrote:
>
>> hi
>> hello everyone im stil new here i just want
>> some advice...now im working on a database install script in
>> php....just a simple one...
>> i just need to test it online thats why i need advice on a database
>> hosting site that is free..
>
> How about installing a database on your own PC? That's free.
>
>
> /Per Jessen, Zürich
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
This is true. If you don't want to install a bunch of stuff on your
computer you can even download a vmware image with a server and just
use that.
http://www.vmware.com/appliances/directory/cat/53
--- End Message ---
--- Begin Message ---
Per Jessen wrote:
Kevin Waterson wrote:
This one time, at band camp, Per Jessen <[EMAIL PROTECTED]> wrote:
No, it's a simple matter of need. People also run apache 1.x, mysql
3.x etc. There are still Linux 2.2 and 2.4 systems out there too.
4 years its been, thats incompetence.
Kevin
Kevin, I don't know how old you are nor how long you have been in IT,
but your opinions suggest you might be fairly inexperienced.
Like I said, remaining back-level with software or an OS it's a matter
of need or choice. Sometime both are heavily influenced by time and
money. Not upgrading something to PHP5 due to lack of manpower is not
incompetent at all, it's reality.
Seconded.
I never deployed PHP4 having 'come on board' just as PHP5 was reaching RC
stage so I started with that in the field, but I STILL have to watch that the
code that I'm writing in other projects is PHP4 compatible. Most of what I'm
doing now was originally working on Builder5/6 code - and code written in the
mid 90's is STILL in use in the field. No time to 'upgrade' and no incentive
since the customers are more than happy.
So 4 years is nothing in IT terms :)
I'm was a heavy lobbyist for getting PHP4 killed off, but THAT is more to do
with getting PHP6 out the door. Something that is going to be much more useful
even for an 'only English speaking' user. The number of time I cut and past
overseas addresses only to find the address label is unusable! :( Ascii is
fine for internal coding, but for real world data ......
--
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/lsces/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php
--- End Message ---
--- Begin Message ---
First of all thank you all for your answers, and thank you for your time
and yes Tedd, my question was quite ambiguous in that point.
Andrew is right, i don't want to change in any way the list of keys I
show in the result, I just want to find the way to higlight the
matching words, regardless of their accent variations.
So I think his Andrew's suggestion could be a good solution, and I'll
try it ASAP...
let me se if i correctly understood:
$search = preg_quote($word); -- quotes chars that could be intrepreted
like regex special chars
$search = str_replace('e', '[eèéêë]', $search); -- trasforms i.e.
cafe in caf[eèéêë], so matches all the accented variations
return preg_replace('/\b' ... -- replaces all the occurences adding
the tags, you use \b as word boundary, right?
it seems a fine soultion to the problem!
the only thing i must add is, befor calling highlight_search_terms, to
'normalize' the word string ( the word used for the search) to
transform it removing the accentated versions of the chars:
$word = preg_replace('[èé]{1}','e',$word);
$word = preg_replace('[à]{1}','a',$word);
that because also the search string could contain an accented char,
and this way I avoid to perform str_replace in the
highlight_search_terms function for every combination of accented chars
well, i think I'm on the good way now, unfortunately I have some other
urgent work and can't try it immediately, but I'll let you know :)
thank you!
Giulio
I may be mistaken (and if I am, then just ignore this as ignorant
rambling), but I don't think he's wanting to replace the accented
characters in the original string. I think he's just wanting the
pattern to find all variations of the same string and highlight them
without changing them. For example, his last paragraph would look
like
this:
[quote]
now my problem is to find a way ( I imagine with some kind of regular
expression ) to achieve in php a search and replace
accent-insensitive, so that i can find the word '<span
class="keysearch">cafe</span>' in a string also if it is '<span
class="keysearch">café</span>', or '<span
class="keysearch">CAFÉ</span>', or '<span
class="keysearch">CAFE</span>', and vice-versa.
[/quote]
The best I can think of right now is something like this:
<?php
function highlight_search_terms($word, $string) {
$search = preg_quote($word);
$search = str_replace('a', '[aàáâãäå]', $search);
$search = str_replace('e', '[eèéêë]', $search);
/* repeat for each possible accented character */
return preg_replace('/\b' . $search . '\b/i', '<span
class="keysearch">$0</span>', $string);
}
$string = "now my problem is to find a way ( I imagine with some kind
of regular expression ) to achieve in php a search and replace
accent-insensitive, so that i can find the word 'cafe' in a string
also if it is 'café', or 'CAFÉ', or 'CAFE', and vice-versa.";
echo highlight_search_terms('cafe', $string);
?>
Andrew
Andrew:
You may be right -- it's ambiguous now that I review it again. He
does say search and replace but I'm not sure if that's what he
really wants. It looks more like search with one string and
highlight all like-strings.
Cheers,
tedd
--
--- End Message ---
--- Begin Message ---
On Mon, Jul 14, 2008 at 11:06 AM, Giulio Mastrosanti
<[EMAIL PROTECTED]> wrote:
>>>>
>
> First of all thank you all for your answers, and thank you for your time
>
> and yes Tedd, my question was quite ambiguous in that point.
>
> Andrew is right, i don't want to change in any way the list of keys I show
> in the result, I just want to find the way to higlight the matching words,
> regardless of their accent variations.
>
> So I think his Andrew's suggestion could be a good solution, and I'll try it
> ASAP...
>
> let me se if i correctly understood:
>
> $search = preg_quote($word); -- quotes chars that could be intrepreted like
> regex special chars
>
> $search = str_replace('e', '[eטיךכ]', $search); -- trasforms i.e. cafe in
> caf[eטיךכ], so matches all the accented variations
>
> return preg_replace('/\b' ... -- replaces all the occurences adding the
> tags, you use \b as word boundary, right?
Yes, yes, and yes. :-)
> it seems a fine soultion to the problem!
>
> the only thing i must add is, befor calling highlight_search_terms, to
> 'normalize' the word string ( the word used for the search) to transform it
> removing the accentated versions of the chars:
>
> $word = preg_replace('[טי]{1}','e',$word);
> $word = preg_replace('[א]{1}','a',$word);
>
> that because also the search string could contain an accented char, and this
> way I avoid to perform str_replace in the highlight_search_terms function
> for every combination of accented chars
I was intrigued by your example, so I played around with it some more
this morning. My own quick web search yielded a lot of results for
highlighting search terms, but none that I found did what you're
after. (I admit I didn't look very deep.) I was up to something like
this before your reply came in. It's still by no means complete. It
even handles simple English plurals (words ending in 's' or 'es'), but
not variations that require changing the word base (like 'daisy' to
'daisies').
<?php
function highlight_search_terms($phrase, $string) {
$non_letter_chars = '/[^\pL]/iu';
$words = preg_split($non_letter_chars, $phrase);
$search_words = array();
foreach ($words as $word) {
if (strlen($word) > 2 && !preg_match($non_letter_chars, $word)) {
$search_words[] = $word;
}
}
$search_words = array_unique($search_words);
foreach ($search_words as $word) {
$search = preg_quote($word);
/* repeat for each possible accented character */
$search = preg_replace('/(ae|æ|ǽ)/iu', '(ae|æ|ǽ)', $search);
$search = preg_replace('/(oe|œ)/iu', '(oe|œ)', $search);
$search = preg_replace('/[aàáâãäåǻāăą](?!e)/iu',
'[aàáâãäåǻāăą]', $search);
$search = preg_replace('/[cçćĉċč]/iu', '[cçćĉċč]', $search);
$search = preg_replace('/[dďđ]/iu', '[dďđ]', $search);
$search = preg_replace('/(?<![ao])[eèéêëēĕėęě]/iu',
'[eèéêëēĕėęě]', $search);
$search = preg_replace('/[gĝğġģ]/iu', '[gĝğġģ]', $search);
$search = preg_replace('/[hĥħ]/iu', '[hĥħ]', $search);
$search = preg_replace('/[iìíîïĩīĭįı]/iu', '[iìíîïĩīĭįı]', $search);
$search = preg_replace('/[jĵ]/iu', '[jĵ]', $search);
$search = preg_replace('/[kķĸ]/iu', '[kķĸ]', $search);
$search = preg_replace('/[lĺļľŀł]/iu', '[lĺļľŀł]', $search);
$search = preg_replace('/[nñńņňʼnŋ]/iu', '[nñńņňʼnŋ]', $search);
$search = preg_replace('/[oòóôõöōŏőǿơ](?!e)/iu',
'[oòóôõöōŏőǿơ]', $search);
$search = preg_replace('/[rŕŗř]/iu', '[rŕŗř]', $search);
$search = preg_replace('/[sśŝşš]/iu', '[sśŝşš]', $search);
$search = preg_replace('/[tţťŧ]/iu', '[tţťŧ]', $search);
$search = preg_replace('/[uùúûüũūŭůűųǔǖǘǚǜ]/iu',
'[uùúûüũūŭůűųǔǖǘǚǜ]', $search);
$search = preg_replace('/[wŵ]/iu', '[wŵ]', $search);
$search = preg_replace('/[yýÿŷ]/iu', '[yýÿŷ]', $search);
$search = preg_replace('/[zźżž]/iu', '[zźżž]', $search);
$string = preg_replace('/\b' . $search . '(e?s)?\b/iu', '<span
class="keysearch">$0</span>', $string);
}
return $string;
}
?>
I still can't help feeling there must be some better way, though.
>
> well, i think I'm on the good way now, unfortunately I have some other
> urgent work and can't try it immediately, but I'll let you know :)
>
> thank you!
>
> Giulio
Andrew
--- End Message ---