Re: [bme-develop] Working emoticon code!
Status: Planning
Brought to you by:
sirmik
|
From: Simon T. <sim...@nt...> - 2004-04-13 10:10:01
|
> Aloha... > > grmf....took me a while to notice this email...hotmail decided it was > junk....:S I've missed a few too; found out how to disable junk filter now. Now I can't send mails from my subscribed account, as the postmaster address is full, an sf checks that before sending the mails to the list. Grr. > >Nice work! > > > >I will have a look at the code later. What are the window lengths > > for? > >Isn't it easier just to do a loop: > >for each emoticonString > > if BString::FindFirst(textToScan, emoticonString) != NULL > > addEmot > >loop > > > Yep that's easier....but a lot slower...if you scan the text like > that you > have to: > -search through the entire text > -search through the entire emoticon list > No I'm doing something like this: > > loop through text > loop through windowLengths > subString = text[currentPos, currentPos + windowLength] > Emoticon emot = findEmoticon(subString) > if not null > add to emoticon list(emot) > currentPos += windowLenght > currentPos++ > > Ok we still have to loop through the entire text...but that can't be > prevented....But! I implemented findEmoticon with a so called > binarySearch...this search has a complexity of (if I remember it > correctly) > 2 log n...and roughly has to search only half of the emoticons or > even > less....this will be a great improvement in speed! therefore it's a > bit more > complex... Ah ok then, I see. > >Sorry to say I've been very busy recently, so I've not managed to > >change the protocol code to use a bigger buffer yet. I may get round > > to > >it soon (although exams are now fast approaching, so I will be a bit > >busier for the next few months :s) > > > No problem! Well Daniel has fixed the bigger buffer, as you may have > read in > his email...we'll see you back after your exams...oh I will see what > I can > do about that news section! Thanks. Tried the new code Daniel - it seems to work although the sign in window keeps popping up at every NSServer command. It looks nicer with my log window though. If you want to see the connection logging, I have uploaded the files here: http://si-msn.port5.com/NetWatch.zip Unzip somewhere, open the project file and drag all the files apart from the NetWatchApp one into the bme project. This will add the files and the paths. Now go into the MSNServerHandler and change the first line of the constructor: conexion = new BNetEndpoint(); to: conexion = new WatchNetEndpoint(name); You'll need to #include "WatchNetEndpoint.h" in that file too. Have fun, and don't close the window while the endpoint is still connected and sending data. Simon |