Search Results

Search found 18361 results on 735 pages for 'hibernate search'.

Page 211/735 | < Previous Page | 207 208 209 210 211 212 213 214 215 216 217 218  | Next Page >

  • Best method to search heriarachal data

    - by WDuffy
    I'm looking at building a facility which allows querying for data with hierarchical filtering. I have a few ideas how I'm going to go about it but was wondering if there are any recommendations or suggestions that might be more efficient. As an example imagine that a user is searching for a job. The job areas would be as follows. 1: Scotland 2: --- West Central 3: ------ Glasgow 4: ------ Etc 5: --- North East 6: ------ Ayrshire 7: ------ Etc A user can search specific (ie Glasgow) or in a larger area (ie Scotland). The two approaches I am considering are 1: keep a note of children in the database for each record (ie cat 1 would have 2, 3, 4 in its children field) and query against that record with a SELECT * FROM Jobs WHERE Category IN Areas.childrenField. 2: Use a recursive function to find all results who have a relation to the selected area The problems I see from both are 1: holding this data in the db will mean having to keep track of all changes to structure 2: Recursion is slow and inefficent Any ideas, suggestion or recommendations on the best approach? I'm using C# ASP.NET with MSSQL 2005 DB.

    Read the article

  • From where these links are coming

    - by Ramesh
    i am having an web site and it displays in google for some keywords and i need to know these sites are getting displayed in google like this Welcome! - The Apache Software Foundation Supports the development of a number of open-source software projects, including the Apache web server. Includes license information, latest news, ... www.apache.org/ - Cached - Similar Apache web server Tomcat Mirrors Projects from where these '"apache" "web server" tomcat links are coming from ...how to do this for my site///

    Read the article

  • How to know if a PDF contains only images or has been OCR scanned for searching?

    - by Bratch
    I have a bunch of PDF files that came from scanned documents. The files contain a mix of images and text. Some were scanned as images with no OCR, so each PDF page is one large image, even where the whole page is entirely text. Others were scanned with OCR and contain images and searchable text where text is present. In many cases even words in the images were made searchable. I want to make an automated process to recognize the text in all of the scanned documents using OCR, with Acrobat 8 Pro, but I don't want to re-OCR the files that have already been through the OCR process in the past. Does anyone know if there is a way to tell which ones contain only images, and which ones already contain searchable text? I'm planning on doing this in C# or VB.NET but I don't think being able to tell the two kinds of files apart is language dependent.

    Read the article

  • Java: How to return single char after string

    - by newSpringer
    I have a file directory which could look like either C:\projects\lab3\test\test.java or C:\projects\assignment3\test\test.java But the "lab3" or "assignment3" can appear anywhere in the directory, it is not a set directory What i want is to check to see if the directory either contains "lab" or "assignment" and get the number that follows. In this case "3" This is what i have so far if(directory.toLowerCase().contains("lab")){ } else if (directory.toLowerCase().contains("assignment")){ } but i do not know how to check for the char straight after the word?

    Read the article

  • rails route question

    - by badnaam
    I am trying to build a search functionality which at a high level works like this. 1 - I have a Search model, controller with a search_set action and search views/partial to render the search. 2 - At the home page a serach form is loaded with an empty search object or a search object initialized with session[:search] (which contains user search preferences, zip code, proximity, sort order, per page etc). This form has a post(:put) action to search_set. 3 - When a registered user performs a set the params of the search form are collected and a search record is saved against that user. If a unregistered user performs a search then the search set action simply stores the params in the session[:search]. In either case, the search is executed with the given params and the results are displayed. At this point the url of in the location bar is something like.. http://localhost:3000/searches/search_set?stype=1 At this point if the user simply hits enter on the location bar, I get an error that says "No action responded to show" I am guessing because the URL contains search_set which uses a put method and even though I have a search_show (:get) action (which simply reruns the search in the session or saved in the database) does not get called. How can I handle this situation where I can route a user hitting enter into the location bar to a get method? If this does not explain the problem , please let me know I can share more details/code etc. Thanks!

    Read the article

  • Good C string libary

    - by chamakits
    Hello all. I recently got inspired to start up a project I've been wanting to code for a while. I want to do it in C, because memory handling is key this application. I was searching around for a good implementation of strings in C, since I know me doing it myself could lead to some messy buffer overflows, and I expect to be dealing with a fairly big amount of strings. I found this article which gives details on each, but they each seem like they have a good amount of cons going for them (don't get me wrong, this article is EXTREMELY helpful, but it still worries me that even if I were to choose one of those, I wouldn't be using the best I can get). I also don't know how up to date the article is, hence my current plea. What I'm looking for is something that may hold a large amount of characters, and simplifies the process of searching through the string. If it allows me to tokenize the string in any way, even better. Also, it should have some pretty good I/O performance. Printing, and formatted printing isn't quite a top priority. I know I shouldn't expect a library to do all the work for me, but was just wandering if there was a well documented string function out there that could save me some time and some work. Any help is greatly appreciated. Thanks in advance! EDIT: I was asked about the license I prefer. Any sort of open source license will do, but preferably GPL (v2 or v3). EDIt2: I found betterString (bstring) library and it looks pretty good. Good documentation, small yet versatile amount of functions, and easy to mix with c strings. Anyone have any good or bad stories about it? The only downside I've read about it is that it lacks Unicode (again, read about this, haven't seen it face to face just yet), but everything else seems pretty good. EDIT3: Also, preferable that its pure C.

    Read the article

  • C++ - Efficient container for large amounts of searchable data?

    - by Francisco P.
    Hello, everybody! I am implementing a text-based version of Scrabble for a College project. My dictionary is quite large, weighing in at around 400.000 words (std::string). Searching for a valid word will suck, big time, in terms of efficiency if I go for a vector<string> ( O(n) ). Are there any good alternatives? Keep in mind, I'm enrolled in freshman year. Nothing TOO complex! Thanks for your time! Francisco

    Read the article

  • How to get the keyword match number for many categories?

    - by Mike108
    How to get the keyword match number for many categories? The scenario is that when I type a product keyword, I want to get the match item number in many categories. For example, when I type the keyword "iphone" , the page will show the match item number in many categories: Mobile(5) battery(2) app(6) typeA(2) typeB(9) typeC(15) typeC(1) typeD(9) typeE(7) typeF(8) ...... ...... typeZ(5) How to implement this for a better performance? I use C# ASP.NET.

    Read the article

  • cattr_accessor outside of rails

    - by JP
    I'm trying to use the google_search ruby library (code follows) but it complains that 'cattr_accessor is an undefined method' - any ideas why this might be or how I could fix it? require 'rubygems' require 'google_search' GoogleSearch.web :q => "pink floyd"

    Read the article

  • searching array of words faster

    - by Martijn
    hi eveybody i want to look how much an array comes in a database. Its pretty slow and i want to know if there's a way of searching like multiple words or an whole array without a for loop.. i'm struggeling for a while now. here's my code $dateBegin = "2010-12-07 15:54:24.0"; $dateEnd = "2010-12-30 18:19:52.0"; $textPerson = " text text text text text text text text text text text text text text "; $textPersonExplode = explode(" ", $textPerson ); $db = dbConnect(); for ( $counter = 0;$counter <= sizeof($textPersonExplode)-1 ; $counter++) { $query = "SELECT count(word) FROM `news_google_split` WHERE `word` LIKE '$textPersonExplode[$counter]' AND `date` >= '$dateBegin' AND `date` <= '$dateEnd'"; $result = mysql_query($query) or die(mysql_error()); while($row = mysql_fetch_array($result, MYSQL_ASSOC)) { $word[] = $textPersonExplode[$counter]; $count[] = $row[0]; } if (!$result) { die('Invalid query: ' . mysql_error()); } } thanks for the help.

    Read the article

  • Pass two string to Detail View from Search Array

    - by waqqas
    I am using a tableview with a search function and is populated by a plist. I want to pass 2 strings through to a DetailView. But I can only get the sting used to populate the cell to pass over. I have tried many variations but can't figure it out. Any help would be greatly appreciated. DetailView *nextLevel = [DetailView alloc]; NSString *valueString; NSString *selectedTitle; if (arraySearch == nil) { NSString *key = [arrayDataKeys objectAtIndex:indexPath.section]; NSArray *nameSection = [dictAllData objectForKey:key]; NSDictionary *dict = [nameSection objectAtIndex:indexPath.row]; valueString = [dict objectForKey:@"name"]; selectedTitle = [dict objectForKey:@"word"]; } else { valueString = [arraySearch objectAtIndex:indexPath.row]; **selectedTitle = [arraySearch objectAtIndex:indexPath.row];** //Obviously this is wrong but this is the line I need help with } nextLevel.title = valueString; nextLevel.itemname = valueString; nextLevel.itemWord = selectedTitle;

    Read the article

  • Problem with underscore(_) in Collections.binarySearch (Java)

    - by Alex Cheng
    Hi all. Problem: I am using Java Tutorials™ sourcecode for this. This is the source code. I tried this: --following with another section of sorted words-- words.add("count"); words.add("cvs"); words.add("dce"); words.add("depth"); --following with another section of sorted words-- and it works perfectly. However when I use this: --just a section of sorted words-- words.add("count"); words.add("cvs"); words.add("dce_iface"); words.add("dce_opnum"); words.add("dce_stub_data"); words.add("depth"); --following with another section of sorted words-- It does show dce_iface when I type dce, but when I type _ then following with o or s it shows me something else like dce_offset where the offset comes from words.add("fragoffset"); somewhere in the list. What can I do to solve this problem? Thank you in advance.

    Read the article

  • Read file structure into an array, but only specific files.

    - by dmackerman
    I have a directory structure that looks like this: /expandables - folder - folder - folder - folder - BannerInfo.txt - index.html Each one of the folder has the same exact stucture. One file named BannerInfo.txt and index.html. There are about 250 of these folders if that matters. I want to loop through these folders and store each of the index.html files into an array. Inside of the index.html file is just some simple HTML and Javascript of which I want to read into a string to be displayed later on. I'm struggling with how to filter out only the index.html file from the individual folders. The purpose of this is because I want to randomly select an index.html file and put the contents into a textarea. I thought I could do a simple array_rand() on the returned array and spit out the string. Any ideas?

    Read the article

  • Return the difference between the lowest and highest key

    - by stan
    This is a past exam paper i am attempting and have no way to check if the out put is correct as i am not capable of building one of these things the question is in the title class Tree{ Tree left; Tree right; int key; public static int span(Tree tree) { if ( tree == null ){ return null; } if( tree.left != null) int min = span(tree.left); } if( tree.right != null){ int max = span(tree.right); } return max - min; } } Could anyone suggest what i need to change to get 5/5 marks :D - the only thing we have to do is write the span method, the header was given for us Thanks

    Read the article

  • How to find missing alpha values in sets of data within same table in SQL

    - by Jeff
    I have a table of many values where one column has the WO Number, and another column has the Resource ID. I need to be able to find all the WO numbers that do not have a resource value of "RW". Here is an example of the typical information. I need to be able to know that work order 5678 does not have an "RW" Resource ID. WO Number - Resource ID 1234 - IN 1234 - WE 1234 - AS 1234 - RW 5678 - PR 5678 - WE 5678 - IN 5678 - AS

    Read the article

  • php define variable inside str_replace array

    - by john
    I have a template system, that replaces text such as {HEADER} with the appropriate content. I use an array like this, that replaces the key with the value using str_replace. $array = array("HEADER","This is the header"); foreach($array as $var => $content) { $template = str_replace("{" . strtoupper($var). "}", $content,$template); } Now im trying to use a defined variable like this: define("NAME","Site Name"); Inside the value for the header. So I want the defined variable to be inside the array which gets replaced so it would look like this, but it doesn't work. $array = array("HEADER","Welcome to ".NAME."'s website!"); Any ideas? tell me if im not clear

    Read the article

  • LaTeX: How to find package(s) that a command belongs to?

    - by Ashwin
    It is a simple question to which I am not able to find the answer: Given a LaTeX command, how do I find out what package(s) it belongs to or comes from? For example, given the \qquad horizontal spacing command, what package does it come from? Especially troublesome since it works without including any package!

    Read the article

  • Remove duplicates in a linked list before adding - C

    - by DesperateCoders
    Hi, My question is about removing duplicates from a linked list. But i want to do it before adding to linked list. struct myStr{int number; mystr *next;} void append(mystr **q,int item) { myStr *temp; temp = *q; myStr *newone; if(*q==NULL)// There should be control of previous elements. Call of keysearch function. { temp = (myStr *)malloc(sizeof(myStr)); temp->number =size; temp->next=NULL; *q=temp; } else //And also here { temp = *q; while(temp->next !=NULL) { temp=temp->next; } newone = (myStr *)malloc(sizeof(myStr)); newone->count = size; newone->next=NULL; temp->next=newone; } } int keysearch (myStr *p) { struct myStr *temp = p; int found = 0; int key= p->number; while (temp->number != NULL) { if(temp->number == key) { found = 1; } temp = temp->next; } return found; } My problem is in keySearch. I don't know what is wrong? Or is there another way for doing this.

    Read the article

  • Insertion into BST without header Node JAVA

    - by Petiatil
    I am working on a recursive insertion method for a BST. This function is suppose to be a recursive helper method and is in a private class called Node. The Node class is in a class called BinarySearchTree which contains an instance variable for the root. When I am trying to insert an element, I get a NullPointerException at : this.left = insert(((Node)left).element); I am unsure about why this occurs. If I understand correctly, in a BST, I am suppose to insert the item at the last spot on the path transversed. Any help is appreciated! private class Node implements BinaryNode<E> { E item; BinaryNode<E> left, right; public BinaryNode<E> insert(E item) { int compare = item.compareTo(((Node)root).item); if(root == null) { root = new Node(); ((Node)root).item = item; } else if(compare < 0) { this.left = insert(((Node)left).item); } else if(compare > 0) { this.right = insert(((Node)right).item); } return root; } }

    Read the article

  • Need help finding a unique value in array

    - by bardockyo
    My code is complete minus one little flaw. It searches the array and prints out which values are unique, however it always counts the first entry as unique even if it is followed by the same value. Can anyone look at my code and tell me which part is messing this up because it is driving me crazy. #include <stdio.h> #define size 7 int main(void) { int array1[size], target, answer, found, x, k, prev, count =1, i; printf("Please input %d integers: ", size); scanf("%d", &target); for(x = 0; x < size; x++) { scanf("%d", &array1[x]); } prev = array1[0]; for (i = 1; i < size; i++) { if (array1[i] == prev) { count++; } else { if (count < 2) printf("%d=%d\n", prev, count); prev = array1[i]; count = 1; } } if (count < 2) { printf("%d=%d\n", prev, count); } return 0; }

    Read the article

< Previous Page | 207 208 209 210 211 212 213 214 215 216 217 218  | Next Page >