What I want it to do is, as I'm typing the word, that it highlights it on the board using the button(x,y).doclick sub which highlights it. Right now my implementation finds the first letter, then keeps trying each letter until it meets the 8 corner condition (ie it is neighbored to the last one) but this does not always work. If there are say 2 "G"'s on the board and I want the bottom one, this will not work. Can somebody give me an example of psuedocode
the rules are that same coloured blocks of two or more can be removed by clicking on them. blocks then slide down from above. if a column is empty columns other columns move in from the sides.when someone clicks on the green blocks in the bottom row the columns should slide in from the sides. columns to the left of the black line slide right and on the right of the black line slide left. so in this case only the two rightmost columns should slide from the right to the black line after removing the green blocks.The problem i am having is in designing a suitable algorihm to do the collapsing after the removal. my current approach is to test each column from left to right to see if it is empty. if it is empty then i slide whatever column is to the left (if left of the black line) or to the right (if to the right of the black line) over the blank column and repeat this in the direct i am sliding from
Has anyone ever used VB to analyze data to find patterns? I would like to analyze several hundred sequential data points to look for a fairly uniform "up-down" pattern, very similar to a square wave.
I am trying to write this loop to find the word start and then insert a word in a column until it sees stop and then go through all the data and do that.
I need to write a code to find identical adjacent pixels in a bitmap image. It should work as the 'magical wand' in Photoshop.My images are always black and white (white background with car parts drawed in black). Given the x,y coordinate for a single black pixel in the whole image, the code should find (and paint with another color, say red) all other black pixels that are linked to that one, and so on, until all linked black points will be painted in red.This way, suppose that I have an image with 4 car parts drawed, then if I give the x,y coordinate of a black pixel, just THAT part to whose the black pixel belongs to should be painted in red. All other parts will remain black. Does it make sense?At the end, there are two pictures (before and after) to help understanding what I need to do to the images.I tried a simple 8-pixel adjacent approach for every pixel (starting on initial coordinate) but it turns out into a very stupid and endless looping algorhitm.
I am currently using the code below within a VB.Net application to find specific text in a Word document. The text is surrounded by symbols represented by the character codes in the .Text statement. The code below is working fine. The issue now is that sometimes the desired text within a document has been marked for deletion and appears as tracked change within the document. I would like to find only the desired text that has NOT been marked for deletion. Does anyone know of a way to determine if the found text is a deletion?
I want to find a way to speed up this code.if you look at the condition of If calculated Then in the code below, this is what slowing down the code.While the code provided seem fast with Const initBit = 4 try it with something over 12.
I want to be able to use this code (with calculated param as True) with initBit of 20 or more.
Beware that 20 or more might require a gig or more of ram and/or compiled as x64.
C# code (converted with an online tool from VB.NET):
I have used Webbrowser control in editable mode.I am using IHTMLTxtRange for find a word and replacing it with other word.I have to find and replace internally in my code.Following is my code:-
Public Sub FindReplaceText(ByVal sfindText As String, ByVal sReplacetext As String) Try[code].....
It works fine for all find and replace except if the word contains vbnewline.E.g If in webbrowser control I enter 'Hii <vbnewline> Hello'The above two words contain Enter key(i.e vbnewline) between them.If I pass following string to my Method it doesn't recognize the whole word and doesn't replace the word. I have called my method as
Does IHTMLtxtRange support vbnewline in Findtext method?If not how can i do? All the above Find and repace need to be done in code and not by popping up the form for find and replace
I am trying to create a function that searches each line of a richtextbox and returns that row if one of many search phrases are found.The app works wonderfully when used with longer words or muli word phrases as the search criteria.The problem I have is if the search word/ criteria contains a small string such as bae or sp then I get alot of false positives. Anytime bae or sp is found within any word it returns the results.I need the function to stop looking within the words for results and instead look at the word as a whole for a match.Below you can see that I am taking each line of text in the richtextbox, removing most non-alpha numberic characters and replacing them with spaces.Then I have it remove any double spaces with single spaces.For the search term list I have it take the text before the delimiter;and do the same.Trouble I am having is,if the search term is SP and the search phrase is "This is a space shuttle lauch"it will return the sentence since the sentence contains the word "space" which starts with sp.[code]
I'm trying to write a function to find a word in a string in the this format : "ThisissometextthatIneedtofindandthisisthetext. This is another text."It's read as " This is some text that I need to find and this is the text. This is another text." but there is no space between each word. I want to get the word "text" or any word in that string. Can you help me with this function with a code sample ?
And I think that this method can be implemented with a string of Unicode also because in a sentence of Unicode it contains one or few, sometimes zero spaces between each word.
I am trying to implement an Algorithm called "Diamond-Square Algorithm" I am having trouble ending it so that it retiurns the required result. So far I have the folloiwng.
I was using .indexof("myword"), then all of a sudden huge problem and headache... i was using .indexof("produce") and then it kept replacing the word produced cause produce was triggered by the first 7 letters.then i tried to use .contains("produce") and it did the same thing.so basically it doesnt search for the WHOLE word, if a WHOLE WORD begins with the phrase your searching for then it wont work.so how do i search for WHOLE words?
I am wondering how to search a web browser document and highlight all occurrences of that word. I did come across a way of searching for the document .[code]...
I have a folde that contains subfolders contining word documents , I need to search inside the word documents for the word AIO and all word files containing this word must be listed in list box ,
I am working on highlighting a word when entered in a textbox.
Example:
string = "hi this is <b>testing</b>"
When i enter the word "testing" in textbox and click on search then it is highlighting the word "testing". but when i enter "is testing" in textbox and click on search then it is not highlighting the word "is testing". this is due to there is bold tag for "testing".
How can we highlight the word which is in bold tag...
However the Split() function cannot translate to a SQL equivalent, and so this can only be executed in-memory, which is excruciatingly slow by the time any number of records are involved.
The SQL to do this would be something like
WHERE Description LIKE '%word%word%word%'
And that's as far as I get - I can't work out how to get that SQL generated by LINQ to Entities. I tried the ugly hacky .Where(Function(x) x.Description.Contains("word%word%word") on the off chance, but I'm almost relieved that it doesn't work!
Let's say I have an object that contains a Word property and a Sentence property. The sentence must use the word, and I want to replace the word in that sentence with a link using a public function (say, GetLinkedSentence). The catch is maybe the sentence uses a plural form of the word and maybe the "word" itself is actually a phrase, or is even hyphenated. There's no length limit to the word either. How do I find and replace this word (in ASP.NET, preferably VB) with a link [word])?
I just went from Visual Basic 6 to Visual Basic .NET 2008 Express Edition.
And now I am planning to make a program, using the Web Browser function, but there it stops The program is supposed to navigate to an site, then check for some text from the site.
In Visual Basic 6 I used this code:
If InStr(1, WebBrowser1.document.body.parentelement.InnerHtml, "texthere") > 0 Then MsgBox "Found the text" Else
I have a tab delimited .txt file, I am reading successfully. Reading first line and split into array. Through the loop I am checking the duplicate column name.
Now I want, if duplicated word found, how can I replace the second one. Suppose my file contains Cell Site Cell ID Cell ID Site Detail 1 A 1 A1 ABC 2 B 2 B2 XYZ
I want to replace second Cell ID to Cell ID_2. Cell Site Cell ID Cell ID_2 Site Detail 1 A 1 A1 ABC 2 B 2 B2 XYZ
The problem is to find if a word has 3 consecutive letters in it. Such as THIRSTY, STUDENT. Here's the code I've written, but I'm stuck on how to actually write the code to check the letters.
Private Sub btnRun_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnRun.Click Dim word As String = txtWord.Text
i am able to print all file line in to rich text box but i have a problem to find a specific word from the rich text boxto solve this trouble.here is my code for taking input from file and print into rich text box Dim path2 As [String] = "file path"
Dim d As New StreamReader(path2) 'creating a new StreamReader and passing the filestream object fs as argument d.BaseStream.Seek(0, SeekOrigin.Begin)
I want to open an existing document, find & replace some words and keep it's format as it is. the following is my code.
Dim oWord As Word.Application = CreateObject("Word.Application")' Open word document Dim docFile As String = vReportPath & txtInsRptNo.Text & ".doc" Dim oDoc As Word.Document = oWord.Documents.Open(docFile) Dim oTable1 As Word.Table [Code] .....
Yeah, I want to make the program find a certain word, such as 10.5, in a textbox. It will have multiple lines. textbox5 is the textbox and a word, like 10.5 or longer such as 10.10.10.10.10.10. an IP.
I'm trying to find some words within a string so I can use them as headers. The string has different characters involved like letters, numbers, colons and so on. I've used the Mid function but it wouldn't work if the amount of characters in the string changed. The string isn't automatically coded in as it's a text file that's uploaded.There are multiple words I need to find within the string also.