Search Results

Search found 19563 results on 783 pages for 'binary search'.

Page 115/783 | < Previous Page | 111 112 113 114 115 116 117 118 119 120 121 122  | Next Page >

  • Integrating Search Server 2008 Express with WSS 3.0

    - by Jason Kemp
    I'm setting up the environment for an intranet using WSS (Windows SharePoint Services) 3.0. The catch is getting the environment configured to work with MS Search Server 2008 Express. Here's the environment I'd like to setup: A: Web Server; Win Server 2003 SP2; WSS 3.0 SP2; IIS 6.0; .NET 3.5 SP1 B: Search Server; Win Server 2003 SP2; WSS 3.0 SP2; IIS 6.0; .NET 3.5 SP1; Search Server 2008 Express C: Database Server; Win Server 2003 SP2; SQL Server 2000 SP3 - Admin db, Content db, Config db, Search db The question is whether 3 servers can be used like the above configuration or if the Search Server (B) has to be combined with (A) since we're using the free Express version of the Search Server. The documentation from MS doesn't make it clear either way. I can attack this problem with trial and error but would rather not. The bigger question is: What is the best practice for a WSS / Search Server installation?

    Read the article

  • How do I grab and use a variables coming back through ValueList from an AJAX call?

    - by Mel
    I'm trying the following code to execute a search and it's not working. On the search.cfm page, the only value coming back is the value I input into the search field (even if I click an autosuggest value, it's not coming back; only the letters I actually type myself come back). <cfform class="titleSearchForm" id="searchForm" action="search.cfm?GameID=#cfautosuggestvalue.GameID#" method="post"> <fieldset> <cfinput type="text" class="titleSearchField" name="TitleName" onChange="form.submit()" autosuggest="cfc:gz.cfcomp.search.AutoSuggestSearch({cfautosuggestvalue})"> <input type="button" class="titleSearchButton" value=" " /> </fieldset> </cfform> Query in CFC: <cfquery name="SearchResult" datasource="myDSN"> SELECT CONCAT(titles.TitleName, ' on ', platforms.PlatformAbbreviation) AS sResult, games.GameID FROM games Inner Join platforms ON games.PlatformID = platforms.PlatformID Inner Join titles ON titles.TitleID = games.TitleID WHERE UCase(titleName) LIKE Ucase('#ARGUMENTS.SearchString#%') ORDER BY titleName ASC; </cfquery> Two things: First of all, I would like to get the GameID back to the page making the AJAX request; I know why it is not coming back: Because I'm only returning sResult var, which does not include the GameID. Is there a way to return the GameID value without displaying it? The second thing: How to I grab a value from the auto-suggest once it is returned? Say I want to grab the GameID, or if I can't do that, the "TitleName" to use that in my query? I tried passing it to the form this way: action="search.cfm?GameID=#cfautosuggestvalue.GameID#" - but that does not work. How do I reference the autosuggestionvalue varaibles for use? Thanks

    Read the article

  • Serializable object in intent returning as String

    - by B_
    In my application, I am trying to pass a serializable object through an intent to another activity. The intent is not entirely created by me, it is created and passed through a search suggestion. In the content provider for the search suggestion, the object is created and placed in the SUGGEST_COLUMN_INTENT_EXTRA_DATA column of the MatrixCursor. However, when in the receiving activity I call getIntent().getSerializableExtra(SearchManager.EXTRA_DATA_KEY), the returned object is of type String and I cannot cast it into the original object class. I tried making a parcelable wrapper for my object that calls out.writeSerializable(...) and use that instead but the same thing happened. The string that is returned is like a generic Object toString(), i.e. com.foo.yak.MyAwesomeClass@4350058, so I'm assuming that toString() is being called somewhere where I have no control. Hopefully I'm just missing something simple. Thanks for the help! Edit: Some of my code This is in the content provider that acts as the search authority: //These are the search suggestion columns private static final String[] COLUMNS = { "_id", // mandatory column SearchManager.SUGGEST_COLUMN_TEXT_1, SearchManager.SUGGEST_COLUMN_INTENT_EXTRA_DATA }; //This places the serializable or parcelable object (and other info) into the search suggestion private Cursor getSuggestions(String query, String[] projection) { List<Widget> widgets = WidgetLoader.getMatches(query); MatrixCursor cursor = new MatrixCursor(COLUMNS); for (Widget w : widgets) { cursor.addRow(new Object[] { w.id w.name w.data //This is the MyAwesomeClass object I'm trying to pass }); } return cursor; } This is in the activity that receives the search suggestion: public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Object extra = getIntent().getSerializableExtra(SearchManager.EXTRA_DATA_KEY); //extra.getClass() returns String, when it should return MyAwesomeClass, so this next line throws a ClassCastException and causes a crash MyAwesomeClass mac = (MyAwesomeClass)extra; ... }

    Read the article

  • Typical Search, Result and Detail Workflow Staying Within an Android Tab

    - by Justin
    So, I've been banging my head looking for a good solution for a few days and am stuck. I have a search screen (Activity) in a tab, and after the user enters a value and clicks "search" I would like the results to come back in that same tab, and then if an item from the results is selected, to show more detailed results, in that same tab. I have it all working now in separate activities, and even the first step working in a tab, but as soon as I call the activity to process he search results... i.e. startActivity(i); for the results Activity, the results displayed are not in the tab! I am having a very difficult time getting this flow to work all under a tab. Any thoughts on how to make this happen? I keep hearing that Android views should be used instead of activities, but am I then to assume that all the logic I have right now for 3 activity needs to go inside 1 activity and then I need to handle setting the content and state for each of these cases? Plus, won't the history stack not work as pressing the back button will take the user out of the application, instead of taking them from say the search result to the search screen, or the details to the search results, etc. This seems like a mess. Can anyone show a more complex example of tabs or how one might have a simple search, result and detail workflow staying in a tab? I have seen a few questions on this concept of keeping activities "within a tab", but no good resolution. Please help.

    Read the article

  • Lucene Search Returning Extra, Undesired Records

    - by Brandon
    I have a Lucene index that contains a field called 'Name'. I escape all special characters before inserting a value into my index using QueryParser.Escape(value). In my example I have 2 documents with the following names respectively: Test Test (Test) They get inserted into my index as such (I can confirm this using Luke): [test] [test] [\(test\)] I insert these values as TOKENIZED and using the StandardAnalyzer. When I perform a search, I use the QueryParser.Escape(searchString) against my search string input to escape special characters and then use the QueryParser with my 'Name' field and the StandardAnalyzer to perform my search. When I perform a search for 'Test', I get back both documents in my index (as expected). However, when I perform a search for 'Test (Test)', I am getting back both documents still. I realize that in both examples it matches on the 'test' term in the index, but I am confused in my 2nd example why it would not just pull back the document with the value of 'Test (Test)' because my search should create two terms: [test] and [\(test\)] I would imagine it would perform some sort of boolean operator where BOTH terms must match in that situation so I would get back just one record. Is there something I am missing or a trick to make the search behave as desired?

    Read the article

  • My search what the Cloud will mean for my Work, part 2

    - by Kay Sellenrode
    My experience with the cloud and why work will change and not disappear. Until now I have multiple experiences with the cloud, for the most good. i have worked on multiple cloud solutions in the past but let me describe them as 0.x versions. For me the 1st real serious cloud experience was a bit more than 1 year ago, when our company switched from an in house server to Microsoft BPOS as a complete replacement. Since we are a small consultancy firm and don’t have that much else to do than consulting, our IT requirements are quite simple. We need Mail and Storage space for our documents. With the in house server we had multiple outages during a year, mostly by lack of administering. Being consultants in the field and hardly having time to maintain a server, BPOS was and still is for us the right solution. Since the migration we have less outages and a much more robust solution. Have we run into issues with BPOS for our own environment? No not that I’m aware of. Based on this experience I made a stance about deploy ability of BPOS and cloud solutions, they are suitable for MKB (Dutch for Medium and Small Businesses). Most Small businesses don’t have the amount of work to hire a full time it admin. Hiring a service provider to maintain their own server might be even more costly than hiring an admin. So seeing the capabilities of BPOS and the needs of most businesses I see it as a great solution that gives the business a complete Server replacement solution for a fixed price per user. resulting in a clear budget for IT spending, something most small businesses were looking for, for a long time. So right now I’m deploying BPOS with a customer, and I run into some of the Cloud 1.0 issues. In my opinion BPOS is a good working Cloud version 1.0 solution. What do I mean with 1.0? Well 1.0 is mostly a tested solution (unlike 0.x versions) but still have quite some limitations caused by too few market experience. in my opnion this is also the reason why we don’t see that much BPOS customers yet and why I think Office 365 will make a huge difference. What I have seen of 365 shows me it is a Cloud 2.0 version, meaning it has all needed features and is much more flexible to the customer. This is also why I see changes happen in my work field, changes and not unemployment due to Cloud solutions. Cloud 1.0 solutions gave me the idea that if every customer would adopt them I would be out of work. But in reality Cloud 1.0 solutions are here just to set the market needs. The Cloud 2.0 and higher versions will give the customer much more flexibility, but also require the need for a consultant. Where the 1.0 versions are simple to setup and maintain, the 2.0 solution needs more thought upfront and afterwards. ie. BPOS in its 1.0 version brings you a very simplified Exchange 2007 solution, Suitable for some customers. Looking at Office 365 you receive almost a full blown Exchange 2010 solution. I expect this to be even more customizable in the next version. In my search for the changes to my work I try to regulary write a post with my thought around the Cloud and the impact on my work as a consultant. I'm also planning to present around this topic, so if anyone is interested to see me present around this topic, you're more than welcome to contact me.

    Read the article

  • Improving the running time of Breadth First Search and Adjacency List creation

    - by user45957
    We are given an array of integers where all elements are between 0-9. have to start from the 1st position and reach end in minimum no of moves such that we can from an index i move 1 position back and forward i.e i-1 and i+1 and jump to any index having the same value as index i. Time Limit : 1 second Max input size : 100000 I have tried to solve this problem use a single source shortest path approach using Breadth First Search and though BFS itself is O(V+E) and runs in time the adjacency list creation takes O(n2) time and therefore overall complexity becomes O(n2). is there any way i can decrease the time complexity of adjacency list creation? or is there a better and more efficient way of solving the problem? int main(){ vector<int> v; string str; vector<int> sets[10]; cin>>str; int in; for(int i=0;i<str.length();i++){ in=str[i]-'0'; v.push_back(in); sets[in].push_back(i); } int n=v.size(); if(n==1){ cout<<"0\n"; return 0; } if(v[0]==v[n-1]){ cout<<"1\n"; return 0; } vector<int> adj[100001]; for(int i=0;i<10;i++){ for(int j=0;j<sets[i].size();j++){ if(sets[i][j]>0) adj[sets[i][j]].push_back(sets[i][j]-1); if(sets[i][j]<n-1) adj[sets[i][j]].push_back(sets[i][j]+1); for(int k=j+1;k<sets[i].size();k++){ if(abs(sets[i][j]-sets[i][k])!=1){ adj[sets[i][j]].push_back(sets[i][k]); adj[sets[i][k]].push_back(sets[i][j]); } } } } queue<int> q; q.push(0); int dist[100001]; bool visited[100001]={false}; dist[0]=0; visited[0]=true; int c=0; while(!q.empty()){ int dq=q.front(); q.pop(); c++; for(int i=0;i<adj[dq].size();i++){ if(visited[adj[dq][i]]==false){ dist[adj[dq][i]]=dist[dq]+1; visited[adj[dq][i]]=true; q.push(adj[dq][i]); } } } cout<<dist[n-1]<<"\n"; return 0; }

    Read the article

  • Large Queries in Google

    - by marienbad
    I have a large query I want to do in google. It's just a string of OR's for the purpose of determining which search terms are ranked the highest compared to the others. It's not ABSURDLY large -- it's only 5,500 characters. But Google says: Request-URI Too Large The requested URL /search... is too large to process. Is there a way around?

    Read the article

  • How to mount a USB thumb drive as "Fixed" instead of "Removable"

    - by AMissico
    I have over 8 GB in my "Code Library" that I maintain on a 64 GB ScanDisk Ultra Backup USB Device. Windows Search 4.0 (installed on Windows XP) can index removable drives, but Windows 7 (which uses Windows Search 4.0) cannot, because the USB device identifies itself as a Removable drive and Windows 7 refuses to index removable drives. How can I mount the USB Thumb Drive as Fixed instead of Removable?

    Read the article

  • Enhanced Explorer for Windows XP? [closed]

    - by iceman
    Possible Duplicate: Replacement for Windows Explorer? Is there a better explorer for Windows XP with Konqueror-like features (like dual panes), etc. Specially an enhanced integrated search option like in Vista? There are different products which cumulatively present something similar like xplorer2, Google Desktop Search or Windows Grep. But what about one integrated product?

    Read the article

  • Searching within Gmail's nested labels [closed]

    - by Penang
    Consider this setup in my gmail inbox I have 3 lists mailing-lists/first-list mailing-lists/second-list mailing-lists/third-list if I want to search for all unread messages in any sublabel of mailing-lists, is there a better way to search than "is:unread label:mailing-list/first-list OR label:mailing-list/second-list OR label:mailing-list/third-list" something like "is:unread label:mailing-list/*" is what I'm looking for

    Read the article

  • Debugging iFilter plug-in (PDF indexing)

    - by Trevor Sullivan
    I have the official Adobe x64 iFilter PDF plug-in and the FoxIt Software iFilter PDF plug-in installed, and neither one seems to be allowing me to index the contents of PDF files. So far, I've: Added my data folder into the Indexing service configuration Ensured that PDF files are configured to index "file properties and contents" Rebuilt the index from scratch But, when I search, I can only search for PDF file names, not the contents of them. Any ideas on how to debug this issue?

    Read the article

  • How to Mount a USB "Thumb" Drive as "Fixed" in Windows (For Indexing)

    - by AMissico
    I have over 8GB in my "Code Library" that I maintain on a 64GB ScanDisk Ultra Backup USB Device. Windows Search 4.0 (installed on Windows XP) can index removable drives, but Windows 7 (which uses Windows Search 4.0) cannot because the USB device identifies itself as a Removable drive and Windows 7 refuses to index removable drives. How can I mount the USB Thumb Drive as Fixed instead of Removable? All suggestions welcome and greatly appreciated.

    Read the article

  • windows 7 start menu showing incorrect data

    - by madmik3
    Hi, I've tried to rebuild my search index but it does not seem to help. When i search for anything even command I either get an empty list or a list of short cuts with the names Programs Documents Files ... They all have the default white paper icon. If I click on them I get an error message that says Internet security settings prevented one or more files from being opened. Any ideas? thanks

    Read the article

  • Solr vs 'this' word

    - by s.arlashin
    There is a smal problem with solr. When I try to search text containing the word 'this' by issuing 'this' in the search console, solr doesn't find anything. However there are no problems with other words. Is it sort of reserved word or something like that?

    Read the article

  • warning: dict_ldap_lookup: Search error 1: Operations error

    - by drecute
    Please I need help with ldap search filter to use to retrieve the user email information from ldap. I'm running postfix_ldap of Ubuntu server 12.04. Everything seems to work fine, except getting the values returned from the search. Version 1 server_host = ldap://samba.example.com search_base = dc=company, dc=example, dc=com query_filter = mail=%s bind = no domain = example.com Version 2 server_host = ldap://samba.example.com search_base = dc=company, dc=example, dc=com query_filter = mail=%s bind_dn = cn=Users,dc=company,dc=example,dc=com domain = example.com mail logs Nov 26 11:13:26 mail postfix/smtpd[19662]: match_string: example.com ~? example.com Nov 26 11:13:26 mail postfix/smtpd[19662]: dict_ldap_lookup: No existing connection for LDAP source /etc/postfix/ldap-aliases.cf, reopening Nov 26 11:13:26 mail postfix/smtpd[19662]: dict_ldap_connect: Connecting to server ldap://samba.example.com Nov 26 11:13:26 mail postfix/smtpd[19662]: dict_ldap_connect: Actual Protocol version used is 3. Nov 26 11:13:26 mail postfix/smtpd[19662]: dict_ldap_connect: Binding to server ldap://samba.example.com with dn cn=Users,dc=company,dc=example,dc=com Nov 26 11:13:26 mail postfix/smtpd[19662]: warning: dict_ldap_connect: Unable to bind to server ldap://samba.example.com with dn cn=Users,dc=company,dc=example,dc=com: 49 (Invalid credentials) Nov 26 11:13:26 mail postfix/smtpd[19662]: warning: ldap:/etc/postfix/ldap-aliases.cf lookup error for "[email protected]" Nov 26 11:13:26 mail postfix/smtpd[19662]: maps_find: virtual_alias_maps: [email protected]: search aborted Nov 26 11:13:26 mail postfix/smtpd[19662]: mail_addr_find: [email protected] -> (try again) Nov 26 11:13:26 mail postfix/smtpd[19662]: NOQUEUE: reject: RCPT from col0-omc3-s2.col0.hotmail.com[65.55.34.140]: 451 4.3.0 <[email protected]>: Temporary lookup failure; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<col0-omc3-s2.col0.hotmail.com> Nov 26 11:13:26 mail postfix/smtpd[19662]: > col0-omc3-s2.col0.hotmail.com[65.55.34.140]: 451 4.3.0 <[email protected]>: Temporary lookup failure here's another log with successful search result but fialed to get the values of the result Nov 26 12:04:56 mail postfix/smtpd[20463]: dict_ldap_lookup: Using existing connection for LDAP source /etc/postfix/ldap-aliases.cf Nov 26 12:04:56 mail postfix/smtpd[20463]: dict_ldap_lookup: /etc/postfix/ldap-aliases.cf: Searching with filter [email protected] Nov 26 12:04:56 mail postfix/smtpd[20463]: dict_ldap_get_values[1]: Search found 1 match(es) Nov 26 12:04:56 mail postfix/smtpd[20463]: dict_ldap_get_values[1]: Leaving dict_ldap_get_values Nov 26 12:04:56 mail postfix/smtpd[20463]: dict_ldap_lookup: Search returned nothing Nov 26 12:04:56 mail postfix/smtpd[20463]: maps_find: virtual_alias_maps: [email protected]: not found Nov 26 12:04:56 mail postfix/smtpd[20463]: dict_ldap_lookup: In dict_ldap_lookup Nov 26 12:04:56 mail postfix/smtpd[20463]: dict_ldap_lookup: /etc/postfix/ldap-aliases.cf: Skipping lookup of key 'tola.akintola': domain mismatch Nov 26 12:04:56 mail postfix/smtpd[20463]: maps_find: virtual_alias_maps: tola.akintola: not found Nov 26 12:04:56 mail postfix/smtpd[20463]: dict_ldap_lookup: In dict_ldap_lookup Nov 26 12:04:56 mail postfix/smtpd[20463]: dict_ldap_lookup: /etc/postfix/ldap-aliases.cf: Skipping lookup of key '@example.com': domain mismatch Nov 26 12:04:56 mail postfix/smtpd[20463]: maps_find: virtual_alias_maps: @example.com: not found Nov 26 12:04:56 mail postfix/smtpd[20463]: mail_addr_find: [email protected] -> (not found) My refined ldap-aliases.cf looks like this: server_host = ldap://samba.example.com server_port = 3268 search_base = dc=company, dc=example, dc=com query_filter = mail=%s result_attribute = uid bind_dn = cn=Administrator,cn=Users,dc=company,dc=example,dc=com bind_pw = pass domain = example.com So I'll like to know what ldap filter is appropriate to get this to work. Thanks for helping out.

    Read the article

  • How to setup Lucene/Solr for a B2B web app?

    - by Bill Paetzke
    Given: 1 database per client (business customer) 5000 clients Clients have between 2 to 2000 users (avg is ~100 users/client) 100k to 10 million records per database Users need to search those records often (it's the best way to navigate their data) Possibly relevant info: Several new clients each week (any time during business hours) Multiple web servers and database servers (users can login via any web server) Let's stay agnostic of language or sql brand, since Lucene (and Solr) have a breadth of support For Example: Joel Spolsky said in Podcast #11 that his hosted web app product, FogBugz On-Demand, uses Lucene. He has thousands of on-demand clients. And each client gets their own database. They use an index per client and store it in the client's database. I'm not sure on the details. And I'm not sure if this is a serious mod to Lucene. The Question: How would you setup Lucene search so that each client can only search within its database? How would you setup the index(es)? Where do you store the index(es)? Would you need to add a filter to all search queries? If a client cancelled, how would you delete their (part of the) index? (this may be trivial--not sure yet) Possible Solutions: Make an index for each client (database) Pro: Search is faster (than one-index-for-all method). Indices are relative to the size of the client's data. Con: I'm not sure what this entails, nor do I know if this is beyond Lucene's scope. Have a single, gigantic index with a database_name field. Always include database_name as a filter. Pro: Not sure. Maybe good for tech support or billing dept to search all databases for info. Con: Search is slower (than index-per-client method). Flawed security if query filter removed. One last thing: I would also accept an answer that uses Solr (the extension of Lucene). Perhaps it's better suited for this problem. Not sure.

    Read the article

  • Using SDK 3.2 API in Universal iPhone/iPad application

    - by psychotik
    I have a project configured (I think) to produce Universal binaries. The base SDK is set to 3.2 and the Deployment Target is set to 3.1. Target Device Family is iPhone/iPad and the architecture is armv6 armv7. I had a few questions about how this Universal binary thing really works: 1) When I want to submit an app binary for review, what configuration should I set as the build target? If I set it as "Device - 3.1" I get a warning which says "warning: building with Targeted Device Family" that includes iPad('1,2') requires building with the 3.2 or later SDK". However, if I build with SDK 3.2, will it still run on iPhones with OS 3.1? What's the right configuration for device and architecture (arm6/arm7)? 2) How do I test the scenario above (built with SDK 3.2, but installed on a device running OS 3.1)? If I build with SDK 3.2, when I try to install it on a phone with OS 3.1, I get an error saying that the phone's OS isn't updated. Thanks!

    Read the article

  • Building/Testing a Universal iPhone/iPad application

    - by psychotik
    I have a project configured (I think) to produce Universal binaries. The base SDK is set to 3.2 and the Deployment Target is set to 3.1. Target Device Family is iPhone/iPad and the architecture is armv6 armv7. I had a few questions about how this Universal binary thing really works: 1) When I want to submit an app binary for review, what configuration should I set as the build target? If I set it as "Device - 3.1" I get a warning which says "warning: building with Targeted Device Family" that includes iPad('1,2') requires building with the 3.2 or later SDK". However, if I build with SDK 3.2, will it still run on iPhones with OS 3.1? What's the right configuration for device and architecture (arm6/arm7)? 2) How do I test the scenario above (built with SDK 3.2, but installed on a device running OS 3.1)? If I build with SDK 3.2, when I try to install it on a phone with OS 3.1, I get an error saying that the phone's OS isn't updated. Thanks!

    Read the article

  • g++ on MacOSX doesn't work with -arch ppc64

    - by Albert
    I am trying to build a Universal binary on MacOSX with g++. However, it doesn't really work. I have tried with this simple dummy code: #include <iostream> using namespace std; int main() { cout << "Hello" << endl; } This works fine: % g++ test.cpp -arch i386 -arch ppc -arch x86_64 -o test % file test test: Mach-O universal binary with 3 architectures test (for architecture i386): Mach-O executable i386 test (for architecture ppc7400): Mach-O executable ppc test (for architecture x86_64): Mach-O 64-bit executable x86_64 However, this does not: % g++ test.cpp -arch i386 -arch ppc -arch x86_64 -arch ppc64 -o test In file included from test.cpp:1: /usr/include/c++/4.2.1/iostream:44:28: error: bits/c++config.h: No such file or directory In file included from /usr/include/c++/4.2.1/ios:43, from /usr/include/c++/4.2.1/ostream:45, from /usr/include/c++/4.2.1/iostream:45, from test.cpp:1: /usr/include/c++/4.2.1/iosfwd:45:29: error: bits/c++locale.h: No such file or directory /usr/include/c++/4.2.1/iosfwd:46:25: error: bits/c++io.h: No such file or directory In file included from /usr/include/c++/4.2.1/bits/ios_base.h:45, from /usr/include/c++/4.2.1/ios:48, from /usr/include/c++/4.2.1/ostream:45, from /usr/include/c++/4.2.1/iostream:45, from test.cpp:1: /usr/include/c++/4.2.1/ext/atomicity.h:39:23: error: bits/gthr.h: No such file or directory /usr/include/c++/4.2.1/ext/atomicity.h:40:30: error: bits/atomic_word.h: No such file or directory ... Any idea why that is? I have installed Xcode 3.2.2 with all SDKs it comes with.

    Read the article

  • Callback function and function pointer trouble in C++ for a BST

    - by Brendon C.
    I have to create a binary search tree which is templated and can deal with any data types, including abstract data types like objects. Since it is unknown what types of data an object might have and which data is going to be compared, the client side must create a comparison function and also a print function (because also not sure which data has to be printed). I have edited some C code which I was directed to and tried to template, but I cannot figure out how to configure the client display function. I suspect variable 'tree_node' of class BinarySearchTree has to be passed in, but I am not sure how to do this. For this program I'm creating an integer binary search tree and reading data from a file. Any help on the code or the problem would be greatly appreciated :) Main.cpp #include "BinarySearchTreeTemplated.h" #include <iostream> #include <fstream> #include <string> using namespace std; /*Comparison function*/ int cmp_fn(void *data1, void *data2) { if (*((int*)data1) > *((int*)data2)) return 1; else if (*((int*)data1) < *((int*)data2)) return -1; else return 0; } static void displayNode() //<--------NEED HELP HERE { if (node) cout << " " << *((int)node->data) } int main() { ifstream infile("rinput.txt"); BinarySearchTree<int> tree; while (true) { int tmp1; infile >> tmp1; if (infile.eof()) break; tree.insertRoot(tmp1); } return 0; } BinarySearchTree.h (a bit too big to format here) http://pastebin.com/4kSVrPhm

    Read the article

  • Searchlogic cannot sort search result

    - by jaycode
    Imagine a code: search = Project.search( :title_or_description_or_child_name_or_child_age_or_inspiration_or_decorating_style_or_favorite_item_or_others_like_any => keys, :galleries_id_like_any => @g, :styles_id_like_any => @st, :tags_like_any => @t ) search.all returns the rows correctly. But search.descend_by_views returns nil. Is this gem buggy? What else should I use then?

    Read the article

  • Global Search In Android

    - by Sunil
    Hi, I want Messaging (Sms/Mms) application to be part of the global search i.e., when I type a word in the omni search box (on home screen), it should show me the messages which has that word. Currently, we have local search within messaging app which works fine but how do I make messaging globally searchable. I tried refereing searchable dictornary example and also some online resource but didn't help. Please provide me the steps to make messaging application part of global search. Regards, Sunil.

    Read the article

< Previous Page | 111 112 113 114 115 116 117 118 119 120 121 122  | Next Page >