PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.lang.php > algorithm to highlight required words in a paragraph
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
algorithm to highlight required words in a paragraph

Réponse
 
LinkBack Outils de la discussion
Vieux 16/09/2007, 13h24   #1 (permalink)
gomsi
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut algorithm to highlight required words in a paragraph

hi,

i have a paragraph where i have to insert <mark> and </mark> tags to
highlight the required words.i am implementing it in c++ i am
currently doing it as follows..

i take the corresponding position at which the word occurs within the
paragraph and the word length and store it in a map(STL)..and start
inserting the tags after i scan the paragraph for the words....
although it works fine for larger words problem occurs when the word
to be marked are like "bidder dd d"..the tags start overlapping and
become mixed up within the paragraph.. can someone provide a good
algorithm and please... asap..

  Réponse avec citation
Vieux 16/09/2007, 13h26   #2 (permalink)
Jerry Stuckle
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: algorithm to highlight required words in a paragraph

gomsi wrote:
> hi,
>
> i have a paragraph where i have to insert <mark> and </mark> tags to
> highlight the required words.i am implementing it in c++ i am
> currently doing it as follows..
>
> i take the corresponding position at which the word occurs within the
> paragraph and the word length and store it in a map(STL)..and start
> inserting the tags after i scan the paragraph for the words....
> although it works fine for larger words problem occurs when the word
> to be marked are like "bidder dd d"..the tags start overlapping and
> become mixed up within the paragraph.. can someone provide a good
> algorithm and please... asap..
>


If you're doing this in C++, why are you asking in a PHP newsgroup?

Try a C++ newsgroup.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
  Réponse avec citation
Vieux 17/09/2007, 05h33   #3 (permalink)
gomsi
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: algorithm to highlight required words in a paragraph

On Sep 16, 5:26 am, Jerry Stuckle <jstuck...@attglobal.net> wrote:
> gomsi wrote:
> > hi,

>
> > i have a paragraph where i have to insert <mark> and </mark> tags to
> > highlight the required words.i am implementing it in c++ i am
> > currently doing it as follows..

>
> > i take the corresponding position at which the word occurs within the
> > paragraph and the word length and store it in a map(STL)..and start
> > inserting the tags after i scan the paragraph for the words....
> > although it works fine for larger words problem occurs when the word
> > to be marked are like "bidder dd d"..the tags start overlapping and
> > become mixed up within the paragraph.. can someone provide a good
> > algorithm and please... asap..

>
> If you're doing this in C++, why are you asking in a PHP newsgroup?
>
> Try a C++ newsgroup.
>
> --
> ==================
> Remove the "x" from my email address
> Jerry Stuckle
> JDS Computer Training Corp.
> jstuck...@attglobal.net
> ==================


sorry. but all that i need is an algorithm not the exact implementation

  Réponse avec citation
Vieux 17/09/2007, 12h46   #4 (permalink)
Jerry Stuckle
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: algorithm to highlight required words in a paragraph

gomsi wrote:
> On Sep 16, 5:26 am, Jerry Stuckle <jstuck...@attglobal.net> wrote:
>> gomsi wrote:
>>> hi,
>>> i have a paragraph where i have to insert <mark> and </mark> tags to
>>> highlight the required words.i am implementing it in c++ i am
>>> currently doing it as follows..
>>> i take the corresponding position at which the word occurs within the
>>> paragraph and the word length and store it in a map(STL)..and start
>>> inserting the tags after i scan the paragraph for the words....
>>> although it works fine for larger words problem occurs when the word
>>> to be marked are like "bidder dd d"..the tags start overlapping and
>>> become mixed up within the paragraph.. can someone provide a good
>>> algorithm and please... asap..

>> If you're doing this in C++, why are you asking in a PHP newsgroup?
>>
>> Try a C++ newsgroup.
>>
>> --
>> ==================
>> Remove the "x" from my email address
>> Jerry Stuckle
>> JDS Computer Training Corp.
>> jstuck...@attglobal.net
>> ==================

>
> sorry. but all that i need is an algorithm not the exact implementation
>


Try a C++ newsgroup. C++ has different features, and the algorithm may
be different.

This group is for asking about how to code in PHP - not trying to find
an algorithm for C++.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 01h17.


Édité par : vBulletin® version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,09868 seconds with 12 queries