TRENDING NEWS

POPULAR NEWS

How To Make A Search Application With C /c

How do you make a basic search in C++?

In C/C++, searching has many types, that is you can search in various ways. I prefer the binary search method in which if you have a 2D array, you divide into half using a mid variable, then according to the requirement, code the program to search parallel in both the halves.

How can I develop a web application with C++ like OkCupid? What should I use?

One item worth mentioning is that what OkCupid is describing in their post isn't a "web application" as much as it's an analytic engine that users interact with using their website.  It also sounds like the display portion of their website is less of a concern than their analytic searches.High-performance analytic search engines are excellent candidates for C or C++, so if you actually have such requirements, it may well be worth it to use such an approach.  That said, most websites don't have this sort of search requirement.If you have extreme search requirements, you may well end up coding your own analytic engine as well.And even more pedestrian search applications typically end up using a very large C application called a database server :)

What is the code for C application for text processing which includes addition/deletion/update/search/replace words in a array of character ?

The code would be too large to place it here. But here are some questions to answer before solving the problem:How long is the text? Is it multi-line? How long is a single line?How often need the operations be performed (per second)?Are there any locality in the operations? (that is, is the next operation likely to be near the previous one?)Depending on the answers it might be necessary to use a specific data structure other than a plain array of characters, because arrays do not scale well for insert/delete operations.If there is high level of locality, then it is possible to use a split array with a gap, when insertions, deletions and replacements go to the gap. The gap itself can be moved and resized when needed.When the text is too large to fit in memory, a more sophisticated approach with lists and disk-swapping might be necessary. If it’s huge and the operations are random-placed, a distributed storage and processing have to be used.If search operations prevail, pre-indexing the text can be advantageous.

How to search a string from a file in c++?

To search for a string in a text file you can use, surprise, the C++ command search(). Note that unlike "while (file >> string)" method, which iterates over words, character-based search() will find the string that contains spaces or is adjacent to something non-blank (such as a string in quotation marks)

#include
#include
#include
#include
#include
using namespace std;
int main()
{
ifstream f("test.txt");
string s("foobar");

istreambuf_iterator eof;
if(eof == search(istreambuf_iterator(f), eof, s.begin(), s.end()) )
cout << "String \"" << s << "\" was NOT found in the file " << endl;
else
cout << "String \"" << s << "\" was found in the file " << endl;
}

However, what do you mean by "store it in a variable" ? If you know what string you're looking for, it is in a variable already.

How can I make my form search case insensitive C#?

Currently, I am using the following code:

int index = 0;
string temp = Basic_Word_Processor.Instance.richTextBo...
Basic_Word_Processor.Instance.richTextBo... = "";
Basic_Word_Processor.Instance.richTextBo... = temp;
while (index < Basic_Word_Processor.Instance.richTextBo...
{
Basic_Word_Processor.Instance.richTextBo... (textBox1.Text, index, Basic_Word_Processor.Instance.richTextBo... RichTextBoxFinds.None);
Basic_Word_Processor.Instance.richTextBo... = Color.Yellow;
index = Basic_Word_Processor.Instance.richTextBo... index) +1;

I would like to make the search case insensitive.

How would this be achieved?

How can I create a simple search engine using C/C++ or Java?

It cannot be done with only knowledge of Java and C++, but you also need some knowledge about the Web Development Language. Watch below video for some sample search engine created with PHP, javascript, HTML and CSS.

How to create excel macro to use search button/box and highlight?

Garbo is right in that you can't do the multiple search like you want without using a form. I'd probably use a List Box to return the list though instead of a Combo Box. That keeps more in line with how Microsoft designed Excel.

Below is a simple macro you can use to highlight the text.

Sub HiLiteCells()

Dim Answer, Reply
Dim b As Range

Answer = Application.InputBox("Enter the text to search for.", "Search Tool")

With Cells
Set c = .Find(Answer, LookIn:=xlValues)
If Not c Is Nothing Then
firstAddress = c.Address
Do
Reply = MsgBox("Do you want to color cell " & c.Address & _
" which has a value of " & c.Value & "?", vbQuestion + _
vbYesNoCancel, "Cell Hi-Liter")
If Reply = vbYes Then
c.Interior.Color = RGB(255, 255, 0)
ElseIf Reply = vbCancel Then
Exit Do
End If
Set c = .FindNext(c)
Loop While Not c Is Nothing And c.Address <> firstAddress
Else
MsgBox "Your search text was not found.", vbOKOnly, "Text Not Found"
End If
End With

End Sub


This macro loops through all of the cells in the active worksheet that have the text you are searching for. If it finds anything it will respond with a message stating the cell address and the cells value and ask if you want to hilight the cell (yes button), not highlight the cell (no button), or quit searching for cells to hilight (cancel button). If nothing is found a message will come up telling you nothing is found.

Be careful about using Ctrl + s to activate your macro. Ctrl + s is a common standard key combination to save a file. If someone else is using your file they may try saving it with Ctrl + s then your macro comes up. The website below lists Excel key combinations:

http://office.microsoft.com/en-us/excel-...

To set up a Ctrl key letter for the macro, press Alt + F8. Select your macro's name. Then click the Options... button and enter the letter you want to use and click OK.

How do I make a search engine using C, C++, Python and Java?

Quora Thread - How can I create a simple search engine using C/C++ or Java?

TRENDING NEWS