HI guys, a while ago I built an application to save strings to file https://www.daniweb.com/programming/software-development/threads/501460/application-to-save-wordsentences-to-file and I was wondering, what if I wanted to have the ability to search those strings, say I can choose a search key, like "bring" and search all the strings (and when I say strings I really mean sentences) for that key and when there is a match I display the whole sentence containing that key. I'm looking into sorting and searching algorithms now, but they all seems to be working with ints, like, the binary search, (the binary search could be a good aid …

Member Avatar
Member Avatar
+0 forum 62

I have just figured out how to search for the element that im looking for in a xml file but now when I run it the code loops through i know 3 times maybe even more. I want to know what im missing that would cause it to loop like that. I just need it to run through get the correct information once. tree = ET.parse(args.destDir + '/' + 'FACTSentered'+args.fileDate+'.xml') root=tree.getroot() codeList = root.findall(".//ScanCodes/ScanCode") code_stats = {} for el in codeList: code = el.find('Code').text #print code if code != None: tree = ET.parse(args.destDir + '/' + 'FACTSentered'+args.fileDate+'.xml') root=tree.getroot() codeList = …

Member Avatar
Member Avatar
+0 forum 1

I am workign with a xml file that contains the order information for a company. What i am tryign to do is see if the xml file have a scan code in it and if it does then to pull the order number so that it can be passed to another function. I have a base start but I keep getting the error AttributeError: 'NoneType' object has no attribute 'text' and dont know how to fix it. Could someone explain to me what im doign wrong and how to fix my code. tree = ET.ElementTree(file=args.destDir + '/' + 'FACTSentered'+args.fileDate+'.xml') root=tree.getroot() …

Member Avatar
Member Avatar
+0 forum 10

Hi guys, Need help for this, i'm developing an application and here's what im trying to do: -I have a search box where i can type and search for a data(With DataGridView). then after i searched & found that data when click it on DataGriView as highlighted, data will be viewed on ReportViewer. All i need is Code for Searching in database(MySQL) and function on how to pass it to ReportViewer. Thanks.

Member Avatar
+0 forum 0

So i have a python code that searches for a folder in a directory and gets the size of the folder. I am wanting to search inside the folder and get the file size of what is in the folder. The items in the folder will have different extentions so if there is any way to do this it would be a great help. import requests, shutil, datetime, glob, os, csv,fnmatch,StringIO,smtplib,argparse from email.MIMEMultipart import MIMEMultipart from email.MIMEText import MIMEText from os import path parser = argparse.ArgumentParser(description='Search art folders.') parser.add_argument('-b', help='The base path', required=False, dest='basePath', metavar='Base directory path',default='/home/hatterx/Desktop') parser.add_argument('--se', help='Change sending …

Member Avatar
Member Avatar
+0 forum 1

I have a small program that searches through two folders and gets the size of the files in them. As of right now for every file that is over the specified size limit sends a email. What i am wanting to do it have it compile a lsit of the files that are to large and send the list as one email. import requests, shutil, datetime, glob, os, csv,fnmatch,StringIO,smtplib,argparse, math from email.MIMEMultipart import MIMEMultipart from email.MIMEText import MIMEText from os import path parser = argparse.ArgumentParser(description='Search art folders.') parser.add_argument('-b', help='The base path', required=False, dest='basePath', metavar='Base directory path',default='/home/hatterx/Desktop') parser.add_argument('--se', help='Change sending emailaddress', …

Member Avatar
Member Avatar
+0 forum 1

how to search data from 2 different table using dtpicker?? it is connected to mysql wampserver . please help

Member Avatar
Member Avatar
+0 forum 1

Good day, Firstly, I am new to pascal, I am only trying to assist my brother. I am faced with a problem of adding data to arrays and I may need some help searching the array as well. The program is suppose to allow the user to enter the name, status and country of origin and with this data perform some calculations which I think i can figure out once am past this step. The user must also set the arrays in a way that when they search they bring up the information of the user. Below is what I …

Member Avatar
Member Avatar
+0 forum 7

Hi, In below code snippet , can anyone let me know how to print the functor value output (3,4,5,6,7) without embedding add function in class. #include<iostream> #include<vector> #include<algorithm> using namespace std; void add ( int i) { i=i+2; } int main() { vector <int> vec ={1,2,3,4,5}; for_each(vec.begin(), vec.end(),add); for (auto i:vec) { cout<<i; } return 1; }

Member Avatar
Member Avatar
+0 forum 10

Hi , I need to implement efficient search algoritham for comma separated list of MSISDN's that needs to be loaded in memory (left side of '|') character. Followed by the comma separated series of MSISDN's that needs to be searched in the above huge list(millions)(right side of '|' character). Example: 9845012345, 9845054321, 9845011111|9845011110, +919845012345, 09845054321 I want to implement this in c++ . Can anybody suggest what algoritham wiil be best suited for the same as here searched MSISDN can be expected in millions. I appreaciate your suggestions.

Member Avatar
Member Avatar
+0 forum 3

Hello Everyone, I have a log.txt file in the format: ================================================ [Jan 25 2012 11:26:03] - ID2PDF v.2.6 (ID2PDF.jsx) General options: [default] (ID2PDF_options.xml) ================================================ Loaded options from XML file: '/the/path/to/file/ID2PDF_options.xml extendedPrintPDF started Postfix '4.4' was append from file 'FNM040112ArtichokeHandbook_lo-metadata.xml' for file: /the/path/to/file/FNM040112ArtichokeHandbook_lo.indd printPDF started PDF Export Preset: Hearst PDF 1.6_1_16_08 PDF file created: '/the/path/to/file/some_filey_namex_lo_4.4.pdf'. File filename_lo-metadata.xml removed postprocessingDocument started INDD file removed: /the/path/to/file/some_file1_name_lo.indd Error opening document: /the/path/to/file/some_file_name_lo.indd: Error: Either the file does not exist, you do not have permission, or the file may be in use by another application; line: 190 ================================================ [Feb 24 2012 15:57:43] - ID2PDF v.2.6 (ID2PDF.jsx) …

Member Avatar
Member Avatar
+0 forum 1

I am trying to search a dataset I have populated from several XML files for certain words in each column. The dataset table is "item" and the columns I want searched is "descritption". "description" are several articles from an rss feed. I want to search the articles for sports players names. For example in the article "Jimmy Graham returns to a limited practice - Jimmy Graham | NO" I would like to search for "Jimmy Graham" and once found I want the entire article description to be displayed in a listbox. I am essentially searching for player names which the …

Member Avatar
Member Avatar
+0 forum 1

Hi I have a CS class assinment that invloves solving a word search puzzle with a brute force string matching algorithm. I have made a lot of head way in getting the four search methods to work, however when I search for words that end along the edges of the puzzle they are never found. Some help getting this part done would be nice, thanks!' #include<iostream> #include<cstdlib> #include<string> #include<iomanip> #include<fstream> #include<cctype> #define SIZE 12 //Global variable to hold the size of 2D array. using namespace std; //****************************************************************************** //structure defintion struct arrayData { string qury; //Variable to hold the term being …

Member Avatar
Member Avatar
+0 forum 6

private void button4_Click(object sender, EventArgs e) { { SqlConnection conn = new SqlConnection("Data Source=user-PC;Initial Catalog=URBAN-AUTO-CLINIC;Integrated Security=True;User Instance=False"); SqlDataAdapter adaptor = new SqlDataAdapter(); DataTable table = new DataTable(); DataSet ds = new DataSet(); adaptor.SelectCommand = new SqlCommand("SELECT FirstName,LastName FROM ClientNCar WHERE FirstName ='" +txtFName.Text +"'AND LastName='"+txtLName.Text+"'",conn); adaptor.Fill(ds); ClientSearchDisplay.DataSource = ds.Tables[0]; } } `Hie all My name is Eric. with the above code I am trying to searc for a record usinf textboxes but all I get is empty columns after the button is event is performed

Member Avatar
Member Avatar
+0 forum 5

Hi, I need help to make a perl program work. I have two files - file 1 and file 2. The contents of File2 is to be searched with the contents of file 1. File2: 2 tab-delimited columns XM:1120002 complex-solution MM:0999111 blue-green solution UX:1020022 activity unknown, (simple/complex?) File1:(one column of space separated strings) XM:1120002 MM:0999111 UX:1020022 UX:1020022 XM:1120002 XM:1120002 Output required: 2 tab-delimited columns Date: The following were found in file2: XM:1120002 MM:0999111 UX:1020022 complex-solution;blue-green solution;activity unknown, (simple/complex?) UX:1020022 XM:1120002 complex-solution;blue-green solution;activity unknown XM:1120002 complex-solution The code is as follows: use warnings; use strict; my $time = scalar localtime(); # …

Member Avatar
Member Avatar
+0 forum 10

hi. would someone minf giving me a snippet of a code where a program searches for a specific character in a string? for example. if i have a label that contains a string "abcd" the program would check if the characters "b" and "d" exist in the string regardless of from what position it is found, as long as those letters are present in the string. thankyou so much for the help. :)

Member Avatar
Member Avatar
+0 forum 1

Right guys, I'm really new to this but I'm getting along ok, but I've hit a block. I need to be able to know how to search a text file in VB for a particular line and then display it. the files I'm trying to use are set up as: ID, Name, Address, Birthday, Pay-Roll Type So I need to know how to search the file for the ID number and then display the rest of that line I can read a file from beginning to end but this I am clueless about, thanks It's for a system to add, …

Member Avatar
Member Avatar
+0 forum 16

I'm trying to make a little disk cleaner program and I couldn't figure out how to display the results of scanned directory on list view tool on windows form application. I have a 3 columns and these are File Name, Folder Path and File Size. I want the program to scan for example this location: [COLOR="Red"]C:\Users\Emre\AppData\Local\CrashDumps[/COLOR] and display all of the files in that location on the list view tool. How could i do this? And how do display the file size and file location on the next 2 colomns and these other two colomns are sub items. Thank you!

Member Avatar
Member Avatar
+0 forum 3

i have a db that stores film and film reviews and using php i have created a system where the user can search for a review and then a list of reviews appear, i want to create a button with each review so that when selected the individual review can be analysed this will search the review to see how many positive and negative words it has this is the code for my review.php <?php $searching=$_POST['searching']; $searchfilm=$_POST['searchfilm']; //If form is submitted if ($searching =="yes") { echo "<h2>Film Review</h2><p>"; //If field is empty send a message if ($searchfilm == "") { …

Member Avatar
Member Avatar
+0 forum 11

I have the user enter a string e.g. subject of book using a scanner then a for loop, to print out all the books with the same subject to what the user entered. But I'm having a problem in that it will only print out the first occurrence. For example if the user enters IT1 if will only print out Java for Beginners, whereas it should print Java for Beginners and OO Programming due to they are both attached to IT1. Heres my code [CODE] Book[] b = new Book[2]; b[0] = new Book("Java for Beginners"); b[1] = new Book("OO …

Member Avatar
Member Avatar
+0 forum 7

I have the user enter a string e.g. subject of book using a scanner then a for loop, to print out all the books with the same subject to what the user entered. But I'm having a problem in that it will only print out the first occurrence. For example if the user enters IT1 if will only print out Java for Beginners, whereas it should print Java for Beginners and OO Programming due to they are both attached to IT1. Heres my code [CODE]b[0] = new Book("Java for Beginners"); b[1] = new Book("OO Programming"); s[0] = new Subject("IT1", "Java"); …

Member Avatar
Member Avatar
+0 forum 3

i'm trying to create a search bar where the user searches for an item. the items are in ArrayList and there is multiple ArrayLists. I want the user to be able to search for something, from all the available ArrayLists and show the result possibly in another listBox.. ie. user searches for documents, search returns with all items containing documents which shows in listbox. then the user can click and open that object.. what is the best way to achieve this? thanks.

Member Avatar
Member Avatar
+0 forum 2

I got an assignment to search in a certain excel worksheet which I'm using the Find & Replace dialog of excel all I want is to make a VB6 program that will going to load the excel data into VB6 flexgrid and search hundred of words in a one click only because it compose also of hundreds keyword to be search, because if I'm going to do this in Excel only I have to put one-by-one all the keyword in the Find & Replace dialog which give me a long hours to do that, any possible recommendation is highly appreciated …

Member Avatar
Member Avatar
+0 forum 1

i wanted help for retreiving video from tera byte video file.please reply algorithm for it.

Member Avatar
+0 forum 0

hi i wanted to know that from cctv video are captured which will be tera bytes so we want to search a particular video from tera byte data.is it possible. but we are going to search video in a such a way that from 1hour video if we enter 12 minutes to 15 minutes it will directly search that minutes and directly plays .is it possible

Member Avatar
Member Avatar
+0 forum 1

Hi iam using CI 1.7 and doctrine 1.2 and trying to make some search. But default search with indexes for me is not enough, because search keywoard must exect with indexed word. Is there any chance to make that more flexible where doctrine will detect with similar meanings not the same e.g. like google search. The idea was to use some google api, but i dont want that in output will be google logos, and i need in result the records ids. If you could suggest me sometfhing to put me on the right road i will very apreasheate that. …

Member Avatar
+0 forum 0

hello all i have a jsp page.in which i am searching a particular string.what i want is to search details corresponding to that particular string and show them in the html table. can anybody suggest me the fastest way to search.Currently i am using shell scripting and it is taking a lot of time. Please help

Member Avatar
+0 forum 0

The End.