Search Results

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

Page 202/735 | < Previous Page | 198 199 200 201 202 203 204 205 206 207 208 209  | Next Page >

  • PHP search multidimensional array for value, then place that element at start of array

    - by BobFlemming
    I need to search this array: cars - [0] -make : Ford -model: Escort -year: 1991 [1] -make: Honda -model: Civic -year: 1996 [2] -make: Vauxhall -model: Astra -year: 1972 And if (for example) the model is "Civic" , place that 'car' at position 0. So the end array would be like: cars - [0] -make: Honda -model: Civic -year: 1996 [1] -make : Ford -model: Escort -year: 1991 [2] -make: Vauxhall -model: Astra -year: 1972 I've tried some usort variations: function typeSort($a, $b) { if ($a['model'] == 'Civic' ) { return 0; } return ($a['model'] < $b['model']) ? -1 : 1; } but this is just returning 1

    Read the article

  • Batch file search and replace using wildcards?

    - by user329358
    Batch file search and replace using wildcards I have a html (txt) file I am using as a template or sourcefile to create further html files.  Filename = pg_0001.htm and it contains a line of code thus: pg_0001.jpg I want to parse the pg_0001.htm sourcefile, increment and replace the jpeg string, like this:  "pg_0002.jpg", and then output the edited htm file to a new filename pg_0002.htm I then take each newly created file (pg_0002.htm, pg_0003.htm etc) as the sourcefile and repeat the processing until I have reached my target goal (let's say 100 newly created htm files containing code to display the corresponding jpeg. It must be done this way (fileX.htm containing fileX.jpg) because there is other javascript that uses these incremented filenames as function input. I used to know how to write incrementing batch files many years ago but I'm old & very rusty now.  Can anyone please help me do this?  Many thanks in advance. regards Harry

    Read the article

  • SQL 2005 - Search stored procedures for text (Not all text is being searched)

    - by hamlin11
    The following bits of code do not seem to be searching the entire routine definition. Code block 1: select top 50 * from information_schema.routines where routine_definition like '%09/01/2008%' and specific_Name like '%NET' Code Block 2: SELECT ROUTINE_NAME, ROUTINE_DEFINITION FROM INFORMATION_SCHEMA.ROUTINES WHERE ROUTINE_DEFINITION LIKE '%EffectiveDate%' AND ROUTINE_TYPE='PROCEDURE' and ROUTINE_NAME like '%NET' I know for a fact that these bits of SQL work under most circumstances. The problem is this: When I run this for "EffectiveDate" which is buried at line ~800 in a few stored procedures, these stored procedures never show up in the results. It's as if "like" only searches so deep. Any tips on fixing this? I want to search the ENTIRE stored procedure for the specified text. Thanks!

    Read the article

  • Search the public stream in Facebook

    - by camilo_u
    Hi, Is there any change i can search for anything in the Open Stream in Facebook? Let´s say that i want to look for "obama", this will return all of the obama mentions for a bunch of people in their streams, so far I haven't found anything like this, probably only looking in one user stream, but not the whole stuff. So, i haven't found a way to do this, but how come, sites like socialmention.com can do it? Do they query user by user streams? and how to do it without users permissions? What do you guys think? Thanks in advance! Camilo

    Read the article

  • How to Get Search Bar in Tableview to Appear When User Taps Search Icon at the top of sectionIndex s

    - by Gorgando
    I have a tableview with an indexed scrollbar on the right side that shows the letters A-Z and has a magnifying glass icon at the top ({search}). All of the letters in the scrollbar appropriately take the user to the corresponding section except for the magnifying glass, which takes the user to "A" and keeps the searchBar hidden. I just want it to go to the very top of the table so that the searchBar shows up when the user taps the magnifying glass icon in the scroll bar. I've been looking all over for ways to do this, but I can't find any way shy of adding the searchBar to the first tableCell and it's own section, which I'd prefer not to do unless it's the only way. Thanks so much!

    Read the article

  • Trouble with a sequential search algorithm

    - by shinjuo
    I need to use this sequential search algorithm, but I am not really sure how. I need to use it with an array. Can someone point me in the correct direction or something on how to use this. bool seqSearch (int list[], int last, int target, int* locn){ int looker; looker = 0; while(looker < last && target != list[looker]){ looker++; } *locn = looker; return(target == list[looker]); }

    Read the article

  • search submitbutton in all forms with textareas with jquery

    - by domueni
    Hi there i'm working on a ff-plugin which searchs a webpage for all textareas and places a warning before the submit button. my code looks like this var submitWarning = content.document.createElement("div"); submitWarning.innerHTML = "Fancy Message"; $('textarea', window.content.document).each(function() { var form = $(this, window.content.document).parents('form:first'); $(form, window.content.document).children('input[type=submit]').each(function() { form.insertBefore(submitWarning, this); }); }); if i search all submits with $('input[type=submit]'.each... it works fine but since i added the thing with the textarea and the form:first i got problems (nothing happens) p.s. i use the window.content.document thingy because its a ff-plugin and it won't work nothing without it

    Read the article

  • sharpsvn search repository commits

    - by Andrew Day
    Using sharpsvn I want to search all of the comments on the commited files in our svn server for specific strings. but i cannot get this to work. I have tried the following but it does not like my target path. Error: Revision type requires a working copy path, not a URL SvnRevisionRange range = new SvnRevisionRange(SvnRevision.Working, SvnRevision.Zero); string targetPath = "http://********:81/svn/"; Collection<SvnLogEventArgs> items; SvnLogArgs args = new SvnLogArgs { Range = range }; client.GetLog(new Uri(targetPath), args, out items); any ideas would be great

    Read the article

  • How to call a Zend lucene search function?

    - by stef
    I inherited a Zend project devoid of comments and I didn't get to talk to the previous developer. Since I have no Zend experience I'm having some issues :) I'd like to print out some variables inside an function that indexes items from the site using Zend_Search_Lucene because I think something is going wrong here. From what I've read, ::create creates a new index and ::open updates it. So it's in this ::open function I'd like to print out some variables. The name and params of the function are below. Does anyone have any idea how this function can be called so I can run some tests? private function search($category,$string,$page = 1,$itemsByPage = 5) EDIT: OR, is there a way I can nuke the existing index and force it to be rebuilt completely, for example by deleting the index files on the FS and then performing some searches?

    Read the article

  • search text in pdf in iphone

    - by Jaimin
    i m trying to do search funtionality in iphone.. i pass the page number and the string to be searched.. but it is not getting the proper output. in contentStream i get nothing.. i got this code by googling. i dont know what will be dere in contentStream object. -(BOOL)page:(CGPDFPageRef)inPage containsString:(NSString *)inSearchString; { [self setCurrentData:[NSMutableString string]]; CGPDFContentStreamRef contentStream = CGPDFContentStreamCreateWithPage(inPage); CGPDFScannerRef scanner = CGPDFScannerCreate(contentStream, table, self); bool ret = CGPDFScannerScan(scanner); CGPDFScannerRelease(scanner); CGPDFContentStreamRelease(contentStream); return ([[currentData uppercaseString] rangeOfString:[inSearchString uppercaseString]].location != NSNotFound); } need help urgently.. and if there is any other solution than also it is fine..

    Read the article

  • Fastest way to do a weighted tag search in SQL Server

    - by Hasan Khan
    My table is as follows ObjectID bigint Tag nvarchar(50) Weight float Type tinyint I want to get search for all objects that has tags 'big' or 'large' I want the objectid in order of sum of weights (so objects having both the tags will be on top) select objectid, row_number() over (order by sum(weight) desc) as rowid from tags where tag in ('big', 'large') and type=0 group by objectid the reason for row_number() is that i want paging over results. The query in its current form is very slow, takes a minute to execute over 16 million tags. What should I do to make it faster? I have a non clustered index (objectid, tag, type) Any suggestions?

    Read the article

  • Optimize Binary Search Algorithm

    - by Ganesh M
    In a binary search, we have two comparisons one for greater than and other for less than, otherwise its the mid value. How would you optimize so that we need to check only once? bool binSearch(int array[], int key, int left, int right) { mid = left + (right-left)/2; if (key < array[mid]) return binSearch(array, key, left, mid-1); else if (key > array[mid]) return binSearch(array, key, mid+1, right); else if (key == array[mid]) return TRUE; // Found return FALSE; // Not Found }

    Read the article

  • How to Implement Web Based Find File Database Via Text Search

    - by neversaint
    I have series of files like this: foo1.txt.gz foo2.txt.gz bar1.txt.gz ..etc.. and a tabular format file that describe those files: foo1 - Explain foo1 foo2 - Explain foo2 bar1 - Explain bar1 ..etc.. What I want to do is to have a website with a simple search bar and allow people to type foo1 or just foo and finally return the gzipped file(s) and the related explanation of the file(s). What's the best way to implement this and what kind of tools should I use. Sorry I am totally new in this area.

    Read the article

  • Getting search results from Twitter in php

    - by Mark Mayo
    I'm attempting to put together a little mashup with some twitter APIs. However, the whole area is new to me (I'm more of an embedded developer dabbling). And frustratingly, every tutorial I am trying in Php is either out of date, not doing what it claims to do, it or is broken. Essentially, I just want a nice bit of example code - say, an HTML file, a connection.js for the JQuery magic, and a php file - 'getsearch' which contains the relevant Curl calls to the API to just return the results for a given search term. Followed the tutorial to the letter at http://www.reynoldsftw.com/2009/02/using-jquery-php-ajax-with-the-twitter-api/ and even downloaded the guy's code and chucked it on my webserver, but it just seems to sit there. I'm relatively competent at php and html, but it's the Curl and the JQuery side of things which is new to me, and would appreciate any thoughts, links, or code suggestions. I've attempted reading the API - but even that seems sparse - and several links are broken to their own tutorials, so that's put me off a bit for now.

    Read the article

  • Why does Windows Explorer search freeze when I have an unrelated program paused in a debugger

    - by Evgeny
    While debugging my program, whether it's an ASP.NET application or a .NET console EXE and I have the debugger paused at a breakpoint I try to find a file in Windows Explorer. Either pressing WinKey+F or selecting search from the context menu freezes Windows Explorer - until I resume the program being debugged. My program has nothing to do with Windows Explorer! In fact, this happens in Visual Studio 2008 even with the simplest console EXE (WriteLine and ReadLine). I can't repro it with this simple EXE in WinDbg, but it does happen in with WinDb debugging an ASP.NET app. Why does this happen and how do I fix it? It's bloody annoying, especially when you don't realise what's going on. This is on Windows XP x64 SP2, running a .NET 3.5 application.

    Read the article

  • MySQL Full Text Search Boolean Mode Partial Match

    - by Rob
    I've found boolean mode of MySQL full text search useful, however there are a couple of things I can't seem to figure out how to achieve. For instance imagine I have a full text column containing the words "Steve's Javascript Tutorial - Part One". I would like to match this for each of the following searches: "tutorials", "javascript tutorials", "java", "java script", "script" Imagine that each of those searches is simply assigned to a variable in whatever language may be being used (I always use PHP). How could I modify this to make sure that Steve's article is returned on each of those searches? MATCH (article_title) AGAINST ('"+$variable+"*' IN BOOLEAN MODE)

    Read the article

  • MySQL - Where - search string - MATCH.

    - by Jamie
    Hi guys, Quick question. I'm in a bit of a rush but if someone could quickly point me in the right direction I would be very very happy. I have a field in the db, let's call it field_a which returns a string in the format "20,50,60,80" etc. I wish to do a query which will search in this field to see if 20 exists. Could I use MySQL MATCH or is there a better way? Thank you!

    Read the article

  • Complexity in using Binary search and Trie

    - by user121196
    given a large list of alphabetically sorted words in a file,I need to write a program that, given a word x, determines if x is in the list. Preprocessing is ok since I will be calling this function many times over different inputs. priorties: 1. speed. 2. memory I already know I can use (n is number of words, m is average length of the words) 1. a trie, time is O(log(n)), space(best case) is O(log(n*m)), space(worst case) is O(n*m). 2. load the complete list into memory, then binary search, time is O(log(n)), space is O(n*m) I'm not sure about the complexity on tri, please correct me if they are wrong. Also are there other good approaches?

    Read the article

  • How do you search through a map?

    - by Jack Null
    I have a map: Map<String, String> ht = new HashMap(); and I would like to know how to search through it and find anything matching a particular string. And if it is a match store it into an arraylist. The map contains strings like this: 1,2,3,4,5,5,5 and the matching string would be 5. So for I have this: String match = "5"; ArrayList<String> result = new ArrayList<String>(); Enumeration num= ht.keys(); while (num.hasMoreElements()) { String number = (String) num.nextElement(); if(number.equals(match)) { result.add(number); } }

    Read the article

  • How do a search a table for similar records and displaying count - Ruby on Rails

    - by bgadoci
    I have created a table in my Ruby on Rails application that I am building called Tags. It is a blog application so I allow the user to associate tags with a post and do this through a :posts, :has_many = tags and Tag belongs_to :post association. Now that I have my Tags table I am trying to see how I would render the view such that it displays the tag and tag count. (it should be noted that I am trying to render this in the /views/posts/index.html.erb file). For instance, if there are 10 entries in the Tag table for tag_name Sports. How can I display Sports (10) in the view. I am not looking to do this for a specific tag but rather, somehow search the table, combine like tags and display a list of all tags with counts next to them. (I really want these to be a link to a list of posts that contain that tag but I learned early on only to ask one question at a time). Hope that makes sense.

    Read the article

  • Help with search query in Codeigniter

    - by Indigo
    Hi All, Im still fairly new to codeigniter and am wondering if someone can help me with this please? Im just trying to do a very basic search query in Codeigniter, but for some reason, the results are ignoring my "status = published" request... The code is: $this->db->like('title', $term); $this->db->or_like('tags', $term); $data['results'] = $this->db->get_where('resources', array('status' => 'published')); And this dosent work either: $this->db->like('title', $term); $this->db->or_like('tags', $term); $this->db->where('status', 'published'); $data['results'] = $this->db->get('resources'); Im sure its something basic? Help please?

    Read the article

  • Search by nvarchar

    - by ziks
    Hi all. I have this problem. In table I have column which is nvarcar type. and row in this column is row1= 1;6 row2 = 12 row3 =6;5;67 etc... I try to search this column. for example when i send 1 i try to get only row1. I use LIKE but in result set I get row1 and row2. How can I achieved this, any help is appreciated. Tnx...

    Read the article

  • Structure of Astar (A*) graph search data in C#

    - by Shawn Mclean
    How do you structure you graphs/nodes in a graph search class? I'm basically creating a NavMesh and need to generate the nodes from 1 polygon to the other. The edge that joins both polygons will be the node. I'll then run A* on these Nodes to calculate the shortest path. I just need to know how to structure my classes and their properties? I know for sure I wont need to create a fully blown undirected graph with nodes and edges.

    Read the article

  • Search one element of a list in another list recursively

    - by androidnoob
    I have 2 lists old_name_list = [a-1234, a-1235, a-1236] new_name_list = [(a-1235, a-5321), (a-1236, a-6321), (a-1234, a-4321), ... ] I want to search recursively if the elements in old_name_list exist in new_name_list and returns the associated value with it, for eg. the first element in old_name_list returns a-4321, second element returns a-5321, and so on until old_name_list finishes. I have tried the following and it doesn't work for old_name, new_name in zip(old_name_list, new_name_list): if old_name in new_name[0]: print new_name[1] Is the method I am doing wrong or I have to make some minor changes to it? Thank you in advance.

    Read the article

  • Optimal search queries

    - by Macros
    Following on from my last question http://stackoverflow.com/questions/2788082/sql-server-query-performance, and discovering that my method of allowing optional parameters in a search query is sub optimal, does anyone have guidelines on how to approach this? For example, say I have an application table, a customer table and a contact details table, and I want to create an SP which allows searching on some, none or all of surname, homephone, mobile and app ID, I may use something like the following: select * from application a inner join customer c on a.customerid = a.id left join contact hp on (c.id = hp.customerid and hp.contacttype = 'homephone') left join contact mob on (c.id = mob.customerid and mob.contacttype = 'mobile') where (a.ID = @ID or @ID is null) and (c.Surname = @Surname or @Surname is null) and (HP.phonenumber = @Homphone or @Homephone is null) and (MOB.phonenumber = @Mobile or @Mobile is null) The schema used above isn't real, and I wouldn't be using select * in a real world scenario, it is the construction of the where clause I am interested in. Is there a better approach, either dynamic sql or an alternative which can achieve the same result, without the need for many nested conditionals. Some SPs may have 10 - 15 criteria used in this way

    Read the article

< Previous Page | 198 199 200 201 202 203 204 205 206 207 208 209  | Next Page >