How can i check if the lines are the same ?

private bool displayed;
private void PostMessage()
for (int i = 0; i < ScrollLabel._lines.Length; i++)
for (int x = 0; x < WordsList.words.Length; x++)
if (ScrollLabel._lines[i].Contains(WordsList.words[x]) && !displayed)
displayed = true;
lineToPost = ScrollLabel._lines[i];
PostFacebookWall(LongaccessToken, lineToPost + Environment.NewLine + Environment.NewLine + "נשלח באופן אוטומטי כניסיון דרך תוכנה");
I call this method in a timer tick event every second.
But if the variable string lineToPost is
identical it will not send it again. But it might be a situation that the lineToPost may
contain the exact same word inside but the whole line is not the same so i want to send it.
Only if the whole line is the same, then don't make the postFacebookWall
If the whole line is not the same but the same word is the line as in other line(s), then use thePostFacebookWall method.
I'm using a bool variable
so it will not send the same line over and over again.
I would like it to send the line(s) once, regardless if there is only one line or if there are more than one line.
The problem is the way I'm using the bool now,
it will send a line and then will never send any other line at all.
I tried to change the method to this:
// key: line index, value: sent line
private Dictionary<int, string> sent = new Dictionary<int, string>();
private void PostMessage()
for (int i = 0; i < ScrollLabel._lines.Length; i++)
var line = ScrollLabel._lines[i];
if (sent.ContainsKey(i) && sent[i] == line) continue;
sent[i] = line;
if (WordsList.words.Any(line.Contains))
PostFacebookWall(LongaccessToken, line + Environment.NewLine + Environment.NewLine
+ "נשלח באופן אוטומטי כניסיון דרך תוכנה");
numberofposts += 1;
label7.Text = numberofposts.ToString();
But its not good it keep sending many times the same lines.
This is the timer tick event code:
private void timer1_Tick(object sender, EventArgs e)
counter += 1;
if (counter == 10)
scrollLabel1.Reset();
scrollLabel1.Text = " ";
scrollLabel1.Invalidate();
readableRss = RssReader.covertRss("http://rotter.net/rss/rotternews.xml");
this.scrollLabel1.Text = readableRss;
scrollLabel1.Invalidate();
counter = 0;
PostMessage();
Im updating the text/lines every 10 seconds .
And calling the PostMessage method every second.
And when im calling the PostMessage it should it should call inside the method PostFacebookWall only when the whole line is not identical to other lines and if a word in words is exist in any line.
The variable WorldList.words is string[] contain some words(string).
For example if i have this line:
"hello this is a test"
So the word test exist in words so post this line.
Then if i have another line :
"hello this is a test" so in dont post this line since its the same.
But if i have a line: "hi this is a test" the word test exist but the whole line is not the same as above so post this line.
And of course if there is a different line with a word that exist like: "my name"
Then post this line too.

Hi Chocolade1972,
C# forum:
Discuss and ask questions about the C# programming language, IDE, libraries, samples, and tools.
I’m afraid that it is not the correct forum about this issue, I am moving your question to the moderator forum ("Where is the forum for..?"). The owner of the forum will direct you to a right forum. Thanks for your understanding.
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.

Similar Messages

  • How can i use in the same time input line and mic to recorder in several track whit SONAR

    I have beem recording only input line because SONAR 4 not recognized the mic in, Help me!!!.
    Thank you. Sorry for my english

    LIMACAR wrote:
    How can i use in the same time input line and mic to recorder in several track whit SONAR 4. I have beem recording only input line because SONAR 4 not recognized the mic in, Help me!!!.
    Thank you. Sorry for my english
    Depending on which soundcard you have there, but if your card is capable for
    ASIO -> activate I/O drivers on Sonar/Options/Audio/Drivers -tab (mic/line sources should be listed there --> activate) and select the mic or/and Line sources on tracks "I" - dialog
    WDM/KS -> use the Surround Mixer or windows recording controls for recording source selection (mic should be listed there)
    MME32 - > same w/ WDM/KS
    If you use Asio4All --> same w/ WDM/KS & MME32
    No mic and line source simultaenously w/ WDM/KS and MME32.
    You perhaps be able to do this w/ kX drivers.
    jutapa
    ADDED:
    You can also install modded version of Audigy 2 drivers/software but I have never done this w/ Li've! 5. so I can't be sure if you get ASIO support for your card.
    Here are the instruction --> http://www.tech-pc.co.uk/audigy-2.php
    jutapaMessage Edited by jutapa on 05-25-2006 02:48 PM

  • How do I change the color of font in a fillable form in Adobe Reader? How can I check if the writer of the document has given permission to edit color and not just add text?

    How do I change the color of font in a fillable form in Adobe Reader? How can I check if the writer of the document has given permission to edit color and not just add text? Please help! I'm technologically challenged.

    Most forms (99% or more) are created for simple text input, where you cannot change anything.
    The creator of the form could allow Rich Text input (which allows you to change font, text size, color, etc.), but frankly I have never seen such a form, and I wouldn't know how they look.  But I'm sure they would show some kind of controls to alter the text appearance.

  • I had bought a Mac PRE 13 in,  in 7th Sep,but it is 15th Sep today,how doesn't my computer come to me? So,how can I check where the computer is at this moment?

    I had bought a Mac PRE 13 in,  in 7th Sep in the online Apple Store,
    but it is 15th Sep today,how doesn't my computer come to me yet?
    So,how can I check where the computer is at this moment?

    Call the online Apple Store.  You should have received an email with a FedEx tracking # if you are in the US.
    There is nothing anyone can do for you on a message board!  We are all end users just like yourself.

  • Hi. I purchased a new ipad mini and my brother already has iphone 4,so how can i avoid sharing the same contents that are on his phone? Will creating an other apple id help us in seperating our facetime and icloud accounts as we share our laptop to sync ?

    Hi. I purchased a new ipad mini and my brother already has iphone 4,so how can i avoid sharing the same contents that are on his phone? Will creating an other apple id help us in seperating our facetime and icloud accounts as we share our laptop to sync ?

    Have a read here...
    https://discussions.apple.com/message/18409815?ac_cid=ha
    And See Here...
    How to Use Multiple iDevices with One Computer

  • How can I check on the delivery of an photo but that I created and sent to a friend.  I have the order number but I can't find the tracking information.

    How can I check on the delivery of a photo book that I created and sent to a friend.  I have the order number but I can't find the tracking information.

  • HT1338 i have apps to be updated but when i try to update them a message pops out saying "You have updates for other accounts, please sigh in with the other id". Can some one help me how can i still update the same with the new apple id ive created.

    i have apps to be updated but when i try to update them a message pops out saying "You have updates for other accounts, please sigh in with the other id". Can some one help me how can i still update the same with the new apple id ive created. As i dont have the access to the earlier id anymore.

    You cannot. The apps are assigned to that Apple ID and there is nothing you can do to change that. You could choose to download them again with the new Apple ID, any paid apps will need to be purchased again.
    Hope that helps.

  • How can I save to the same map every time when printing pdfs?

    How can I save to the same map every time when printing pdfs?
    Finder points to the document map even when I chose a different map recently.
    I often print series of pdfs from the print dialog box, I'd like to choose the map to save to and then have all subsequent pdf prints automatically directed to the same map until I decide otherwise.

    that link seems to be broken right now:
    403 Error - Forbidden  - No cred, dude.

  • I have itunes on a mac with 2 users but the library only shows on the main user how can both users have the same library?

    i have itunes on a mac with 2 users but the library only shows on the main user how can both users have the same library?

    Hi,
    Have a Look at these Links on Home Sharing:
    http://support.apple.com/kb/HT4620
    http://support.apple.com/kb/HT3819
    Could be what you need...
    Cheers,

  • HT5177 How can two people edit the same FCPX file? One company, so both people/computers share the same license. Example: I work on revision A and my boss takes it and makes revision B and gives it back to me using two separate computers.

    How can two people edit the same FCPX file? One company, so both people/computers share the same license. Example: I work on revision A and my boss takes it and makes revision B and gives it back to me using two separate computers.

    Have the project, events and media on one drive which is common to both macs.
    You can download FCP X to both macs using the same Apple ID that it was purchased with.
    Andy

  • I can not join my Apple extreme with the Apple express. I shows a conflict in the network! I've tried everything. How can they join on the same network?

    I can not join my Apple extreme with the Apple express. I shows a conflict in the network! I've tried everything. How can they join on the same network?

    It says that my DHCP has to be changed! How? to what?
    It is 802.11g.express. but is set to default by the computer (Macbook Air).
    The other is 802.11n. (express)
    Extreme is 802.11.g. Is the Main Airport.
    It is on ethernet & wep 128 security.

  • How can I return to the same position in the calling order details form

    I am Calling a form for creating a new item from order details form, so after creating The new item I want to returned the item code to the calling form to same position in The order details form , how can I return to the same position in the order details form
    Waiting for your valuable answer .
    Best regards
    Jamil Alshaibani

    Dear Friends
    My actual problem description as the following
    I have a form for production order screen , and this form contain header and details blocks , so the user in the details will select Type Code , and he will go the next field that is Item Code Field search for specific Item Code if it is not exist he has to call the Item Definition Form by using this script
    CALL_FORM(ITEM_DEFINITION);
    Then when he finished defining the Item , and I assign the item code as the following in the :
    WHEN-BUTTON-PRESSED TRIGGER
    :GLOBAL.ITEM_CODE_VAR := :ITEM_CODE;
    DO_KEY('exit_form');
    But I don't know where to keep this assignment
    :ITEM_CODE := :GLOBAL.ITEM_CODE_VAR;
    inside the caller form in which trigger do I have to use when it return from the caller form it should assign the :GLOBAL.ITEM_CODE_VAR to the :ITEM_CODE and the cursor it should show inside the ITEM_CODE , and as I mention it does not return to the same location of The ITEM_CODE when it return from the calling form
    Waiting for your valuable answer .
    With example please .
    Best Regards
    Jamil Alshaibani

  • TS1424 I downloaded a song that I purchased from the ITunes store, but the song does not play properly.  How can I re-download the same song without having to purchase it a second time?

    I downloaded a song that I purchased from the ITunes store, but the song does not play properly.  How can I re-download the same song without having to purchase it a second time?

    I could not find an option to "report a problem".
    Log in to the Store. Click on "Account" in your Quick Links. When you're in your Account information screen, go down to Purchase History and click "See all".
    Find the item that is not playing properly. If you can't see "Report a Problem" next to the entry, click the "Report a problem" button. Now click the "Report a Problem" link next to the item.
    (Not entirely sure what happens after you click that link, but fingers crossed it should be relatively straightforward.)

  • How can i buy again the same software from the same mac? (where it is installed and runs ok: it is for licences issues)

    How can i buy again the same software from the same mac? (where it is installed and runs ok: it is for licences issues)
    Thanks for your help.

    Hi ..
    You can redownload previously purchased apps from the App Store using the same Apple ID on all your authorized Macs for free.
    How to re download apps from the Mac App Store:
    Open the App Store. From the menu bar click Store > Sign In
    Click Purchases from the top of the App Store window.
    Select which apps you want to re download. Then right or control click where you see Installed  then click Install.
    Make sure and use the same Apple ID used for the original purchase.

  • How can I buy again the same song ?

    How can I buy again the same song ?

    Hi ..
    You can redownload previously purchased apps from the App Store using the same Apple ID on all your authorized Macs for free.
    How to re download apps from the Mac App Store:
    Open the App Store. From the menu bar click Store > Sign In
    Click Purchases from the top of the App Store window.
    Select which apps you want to re download. Then right or control click where you see Installed  then click Install.
    Make sure and use the same Apple ID used for the original purchase.

  • How can I check for the existence of an XML file in Illustrator Javascript??

    I'm writing a Javascript to run at startup. I want to check for the existence of XML files and process them, if they are available. How can I check for their existence?

    Your first line just sets a variable to a string value… getFiles() is a method of Folder… so
    var InputXMLDir = Folder( "D:/Brackets/Create_Bracket_Graphics/Input/XML-n-Templates/" );
    Not a PC user so I can't remember if the colon is OK…? As you appear to know the file name why bother with a folder get files anyhow you could just check if the file exists then do some thing…
    alert( File( "D:/Brackets/Create_Bracket_Graphics/Input/XML-n-Templates/brackets_men_web.xml" ).exists );

Maybe you are looking for

  • Error When Activate Adobe Form?

    hi,           When i save layout and come out from there and than when i am save adobe form and trying to activate form it ask me in the dialog window, Enter your user name and ID Resource     AdobeDocumentServices/Con User name    Password if i ente

  • Two desktops version that don't work and can't uninstall - Please help

    Hello all, Looks like I have this double whammy. Everything started when I had the brilliant idea of installing version 6.0 of desktop software. It installed fine and recognizes my BB (8330 Curve). I can save my BB content however it will not let me

  • Create a user report showing feedback

    Hi, I want to be able to give end users some way of viewing feedback (to prevent duplication and check progress) raised against an application and was thinking of using a interactive report that queries the wwv_flow_feedback table.  Is this a suitabl

  • Windows 7 Colour management

    Hi all, I have a question about the color managment in windows 7. I have a Eizo Cg243w hardware calibrated with a i1 display pro, and wondered how things get affected when combining this with the built in color managment in windows 7. Also i am notic

  • Apps stehen auf warten.kann nicht updaten. Es werden immer mehr

    Hilfe, Apps stehen auf warten.kann nicht updaten. Es werden immer mehr...was kann ich tun? Synchronisieren und ein und ausschalten hilft nix.