Search Results

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

Page 157/783 | < Previous Page | 153 154 155 156 157 158 159 160 161 162 163 164  | Next Page >

  • hibernate search

    - by Odelya
    Hi! I am using Hibernate. I am looking for a free text engine. Before I investigate into it I need your experience. I have in my applications user, role and object table. Where a user is connected to one or more roles, and a role is connected to one or more objects. In my free text search, the user can reach only data that he is allowed to watch by object table. Can Hibernate search help me with it?

    Read the article

  • How can I search for numbers in a varchar column

    - by dave
    I've got a simple nvarchar(25) column in an SQL database table. Most of the time, this field should contain alphanumeric text. However, due to operator error, there are many instances where it contains only a number. Can I do a simple search in SQL to identify these cases? That is, determine which rows in the table contain only digits in this column. As an extension, could I also search for those column values which contain only digits and a space and/or slash. In other languages (eg. Perl, Java) a regular expression would resolve this quickly and easily. But I haven't been able to find the equivalent in SQL.

    Read the article

  • YUI Autocomplete: search after pasting?

    - by rassie
    I'm using an auto-complete widget from YUI to implement live search as in the examples. However, it works fine when search text is typed in, but fails to work when the text is pasted into the field. Which would be the proper way to initiate an autocompletion on paste? Haven't found anything for that in the documentation... EDIT: Pasting is not Ctrl-V, it's usually "Paste" from the context-menu. YUI does react to a keypress, but doesn't if anything is pasted by the mouse.

    Read the article

  • Bash Script using Grep to search for a pattern in a file

    - by atif089
    I am writing a bash script to search for a pattern in a file using GREP. I am clueless for why it isnt working. This is the program echo "Enter file name..."; read fname; echo "Enter the search pattern"; read pattern if [ -f $fname ]; then result=`grep -i '$pattern' $fname` echo $result; fi Or is there different approach to do this ? Thanks

    Read the article

  • php search and replace

    - by Dave
    I am trying to create a database field merge into a document (rtf) using php i.e if I have a document that starts Dear Sir, Customer Name: [customer_name], Date of order: [order_date] After retrieving the appropriate database record I can use a simple search and replace to insert the database field into the right place. So far so good. I would however like to have a little more control over the data before it is replaced. For example I may wish to Title Case it, or convert a delimited string into a list with carriage returns. I would therefore like to be able to add extra formatting commands to the field to be replaced. e.g. Dear Sir, Customer Name: [customer_name, TC], Date of order: [order_date, Y/M/D] There may be more than one formatting command per field. Is there a way that I can now search for these strings? The format of the strings is not set in stone, so if I have to change the format then I can. Any suggestions appreciated.

    Read the article

  • Using tab key to navigate google search results

    - by CrazyJugglerDrummer
    Google the phrase "Humans vs zombies" (just used for an example here, phrase doesn't matter). When you see the search results, put your fingers on the keyboard, and press tab until you get to the first result. It takes me over 10 tabs to get through the "images", "videos", "maps", "advanced search" and other links. (Do you get the same results?) How can I get it so pressing the tab key the first time takes me to the first link? I'm using FF 3.6. How might I be able to greasemonkey this?

    Read the article

  • Search Form using PHP/mySQL and Fancybox iFrame

    - by Cocoonfxmedia
    I am struggling to get a search form in PHP to work with a fancybox iFrame. The search form queries a MySQL database and I want the results to show in the iFrame. However for some reason i can not get this to work. I have pasted the complete code below. Appreciate any support with this? Java Script: <script type="text/javascript"> $(document).ready(function() { $("#tip5").fancybox({ 'scrolling' : 'no', 'titleShow' : false, 'onClosed' : function() { $("#login_error").hide(); } }); }); </script> HTML/PHP <form method="post" action="test2.php?go" id="topF"> <input type="text" name="name"> <input type="submit" name="submit" id="tip5" href="#results" value="Search" class="buttonSubmit"> </form> <div id="results"> <?php if(isset($_POST['submit'])){ if(isset($_GET['go'])){ if(preg_match("/[A-Z | a-z]+/", $_POST['name'])){ $name=$_POST['name']; //-query the database table $sql="SELECT id, COMPANY, TOWN, COUNTY, ServiceStandards,Active FROM main WHERE Active='Y' AND COMPANY LIKE '%" . $name . "%' OR TOWN LIKE '%" . $name . "%'AND Active='Y' OR ServiceStandards LIKE '%" . $name . "%' AND Active='Y' OR COUNTY LIKE '%" . $name . "%'AND Active='Y'"; $result5=mysql_query($sql); $numrows=mysql_num_rows($result5); echo "<p>" .$numrows . " results found for " . stripslashes($name) . "</p>"; //-create while loop and loop through result set while($numrow=mysql_fetch_array($result5)){ $Company =$numrow['COMPANY']; $Town=$numrow['TOWN']; $County=$numrow['COUNTY']; $ID=$numrow['id']; $Service=$numrow['ServiceStandards']; //-display the result of the array echo "<ul>\n"; echo "<li>" . "<a href=\"test2.php?id=$ID\">" .$Company . "</a></li>\n"; echo "</ul>"; } } else{ echo "<p>Please enter a search query</p>"; } } } if(isset($_GET['by'])){ $letter=$_GET['by']; $sql="SELECT *,COMPANY,COMPANY+0 FROM main WHERE Active='Y' AND COMPANY LIKE '" . $letter . "%' ORDER BY COMPANY"; $result5=mysql_query($sql); $result6=mysql_query($sql); $rows=mysql_num_rows($result6); echo "<p>" .$numrows . " results found for " . $letter . "</p>"; while($rows=mysql_fetch_array($result6)){ $Company =$rows['COMPANY']; $Town=$rows['TOWN']; $County=$rows['COUNTY']; $Post=$rows['POSTCODE']; $ID=$rows['id']; //-display the result of the array echo "<ul>\n"; echo "<li>" . "<a href=\"test2.php?id=$ID\">" .$Company . "</a> <br/>" .$Town . ", " .$County. ", " .$Post."</li>\n"; echo "</ul>"; } } if(isset($_GET['id'])){ $contactid=$_GET['id']; $sql="SELECT * FROM main WHERE Active='Y' AND id=" . $contactid; $result7=mysql_query($sql); while($row=mysql_fetch_array($result7)){ $Company =$row['COMPANY']; $Town=$row['TOWN']; $County=$row['COUNTY']; $Email=$row['Email']; $Web=$row['Web']; //-display the result of the array echo 'Company Name: '. $row['COMPANY'] . '<br />'; echo 'Town: '. $row['TOWN'] . '<br/>'; echo 'Postcode: '. $row['POSTCODE'] . '<br/>'; echo 'Telephone: '. $row['TELEPHONE'] . '<br/>'; echo 'Email: '. $row['Email'] . '<br/>'; echo 'Web: ' . "<a href=".$Web.">" .$Web . "</a> <br/>\n"; echo ' '. '<br/>'; echo 'Service: '. $row['ServiceStandards'] . '</br>'; } } ?> </div>

    Read the article

  • Making a relevant search of text in database using regex

    - by madphp
    Can anyone tell me how I could count the possible instances of a keyword in a block of text? I've split a search term up into separate tokens, so just need to run through and do a count for every instance and removing punctuation or other special characters when making the count. Secondly, if someone has inserted search terms surrounded by double quotes, i want to be able to skip explode, but just count instances of that exact phrase. It doesn't have to be case sensitive and I would like to remove punctuation from the phrase when doing the count. Thirdly, in both cases i want to be able to ignore wordpress and html tags. Lastly, if anyone know any good tutorials for relevant searches that answer the questions above, that would cool too. I've got this far. $results = $wpdb->get_results($sql); $tokens = explode('search_terms'); // Re-arrange Relevant Results foreach ($results As $forum_topic){ foreach($tokens As $token){ // count tokens in topic_title if ($token ){ } } }

    Read the article

  • Assign weight to a integer column for Sphinx search

    - by Daniel
    Hello: I have a note table with columns: title :string content :text rating :integer and a thinking_sphinx configuration: define_index do indexes :title, :sortable => true indexes :content end Then I can search the notes and assign weights to title and content to define the order or the result: Note.search "abc", :match_mode => :extended, :field_weights => { :title => 10, :content => 3 } Now I want to assign a weight to the rating column The type of the rating column is integer. The range of the rating is [1, 2, 3, 4, 5]. Can I just add weight at the :field_weights :field_weights => { :title => 10, :content => 3, :rating => 5 } or I need to do something else to make the note which has higer rating display first?

    Read the article

  • Twitter search for my recent tweets

    - by ravenspoint
    Has twitter search stopped supporting this: from:username since:2010-05-01 It used to work! The reason I care is I use the following javascript to display recent tweets on my webpage var username = '...' var od = new Date(); od.setMilliseconds( od.getMilliseconds() - 518400000 ); var month = od.getMonth() + 1 if (month<10) month = ('0'+month) var day = od.getDate() if (day<10) day = ('0'+day) var year = od.getFullYear() var sd = (year + '-' + month + '-' + day) document.write( sd ) new TWTR.Widget({ search: 'from:' + username + ' since:' + sd, This has worked for about a year, but recently stopped.

    Read the article

  • startActivityResult Problem on Quick Search Box in Android?

    - by Praveen Chandrasekaran
    How to do the startActivityResult() for the Quick Search Box? that is if i click a button in my activity. it should wake up the QSB and search. i click the suggestion button. it will return the string which is shown as a suggestion. how to do it? which intent action i have to use and how ? Any Idea? EDIT: i am using android:searchSuggestIntentAction="android.intent.action.VIEW" attribute. its reloads the current Activity.Why? which intent action i have to use and how ?

    Read the article

  • input in search box programmatically

    - by Sahil Manchanda
    I'm making a Java program where I programmatically insert data into search field of a website and make submit event programmatically . after submission a new website is opened.. i know i can read data using URLCONNECTION. Eg if website name is www.pqr.net/index.php after I make search submission I'm redirected to that page. eg. www.pqr.net/ind2.php how to get the url of page where I'm redirected because I want to read the contents of that page , unless I don't know the url of the page where I'm redirected , I can't read the contents

    Read the article

  • Search in big text log files

    - by 0xFF
    Hi, let's say you have an game server which creating text log files of gamers actions, and from time to time you need to lookup something in those logs files (like investigating an scam or loosing an item). Just for example you have 100 files and each file have size between 20MB and 50MB - How you would search them quickly? What I have already tried to do is create several threads and each invidual thread will map his own file to memory (let say memory should not be problem if it not exceed 500MB of ram) perform search here, result was something around 1 second per file : File:a26.log - read in: 0.891, lines: 625282, matches: 78848 Is there better way how to do that ? - because it seems to me kinda slow. thanks. (java was used for this case)

    Read the article

  • Graph Tour with Uniform Cost Search in Java

    - by user324817
    Hi. I'm new to this site, so hopefully you guys don't mind helping a nub. Anyway, I've been asked to write code to find the shortest cost of a graph tour on a particular graph, whose details are read in from file. The graph is shown below: http://img339.imageshack.us/img339/8907/graphr.jpg This is for an Artificial Intelligence class, so I'm expected to use a decent enough search method (brute force has been allowed, but not for full marks). I've been reading, and I think that what I'm looking for is an A* search with constant heuristic value, which I believe is a uniform cost search. I'm having trouble wrapping my head around how to apply this in Java. Basically, here's what I have: Vertex class - ArrayList<Edge> adjacencies; String name; int costToThis; Edge class - final Vertex target; public final int weight; Now at the moment, I'm struggling to work out how to apply the uniform cost notion to my desired goal path. Basically I have to start on a particular node, visit all other nodes, and end on that same node, with the lowest cost. As I understand it, I could use a PriorityQueue to store all of my travelled paths, but I can't wrap my head around how I show the goal state as the starting node with all other nodes visited. Here's what I have so far, which is pretty far off the mark: public static void visitNode(Vertex vertex) { ArrayList<Edge> firstEdges = vertex.getAdjacencies(); for(Edge e : firstEdges) { e.target.costToThis = e.weight + vertex.costToThis; queue.add(e.target); } Vertex next = queue.remove(); visitNode(next); } Initially this takes the starting node, then recursively visits the first node in the PriorityQueue (the path with the next lowest cost). My problem is basically, how do I stop my program from following a path specified in the queue if that path is at the goal state? The queue currently stores Vertex objects, but in my mind this isn't going to work as I can't store whether other vertices have been visited inside a Vertex object. Help is much appreciated! Josh

    Read the article

  • Application freezes when performing help file search

    - by ralphos
    I have a large C# application and a help file in *.chm format. When I press F1 to display this help file and select "Search" tab, type something and click "List Topics" button, both the help window and the entire application freeze. What's interesting when I simply open the *.chm file in the Windows Explorer, the search functionality works brilliantly. In order to display the help file from my application, I am executing: Help.ShowHelp(this, helpFileName); This method is executed from within the main form of the application on the UI thread.

    Read the article

  • How to change language/region in a YQL search.spelling/search.suggestion query?

    - by Francisco Noriega
    Hello, I'm trying to use YQL's spelling and search suggestions, but as much as I try I cant find a way to change the language/region for the query, how is this done? I want to look for spelling/suggestions in spanish/mexico ("es-MX") I'm pretty happy with the results I get for queries in English, but when looking in Spanish I get no results: select * from search.suggest where query="dolor de cabeza" <?xml version="1.0" encoding="UTF-8"?> <query xmlns:yahoo="http://www.yahooapis.com/v1/base.rng" yahoo:count="0" yahoo:created="2010-11-22T17:41:13Z" yahoo:lang="en-US"> <results/> </query> I've looked around for a way to change yahoo:lang="en-US" to yahoo:lang="es-MX" but I cant find andy documentation about it. Thanks!

    Read the article

  • Can SPSiteDataQuery search both List and Libraries?

    - by Rich Bennema
    I have the following code: SPSiteDataQuery query = new SPSiteDataQuery(); query.ViewFields = "<FieldRef Name=\"UniqueId\" />"; query.Webs = "<Webs Scope=\"SiteCollection\" />"; query.Query = "<Where<Eq><FieldRef Name='MyCustomField' /><Value Type='Boolean'>1</Value></Eq></Where>"; query.Lists = "<Lists BaseType=\"1\" />"; DataTable results = site.RootWeb.GetSiteData(query); This searches all the Document Libraries in the site collection, but I want to search all the Lists as well. Is there a way to set the Lists property to search both at the same time?

    Read the article

  • Google search is not working in web browser control

    - by Sundar
    Hello, I have developed a browser using the standard WebBrowser control in my application that is built against CF 3.5. Google search is not working in the browser. That is when i navigate to www.google.co.in and type a keyword and click on the serach button nothing is happening. Outside the application from the device if i try the same thing in IE am getting a security warning dialog box and if ok is clicked search results are shown. So in my case do i need to set property on the webbrowser control. Thanks in advance

    Read the article

  • No optimization causes wrong search result

    - by KailZhang
    I just took over our solr/lucene stuff from my ex-colleague. But there is a weird bug. If there is no optimization after dataimport, actually if there are multiple segment files, the search result then will be wrong. We are using a customized solr searchComponent. As far as I know about lucene, optimization is only optimization which could improve the speed of indexing and should not affect search result. I doubt this may be related to multithreading or unclosed searcher/reader or something. Anybody can help? Thank you.

    Read the article

  • How do I search for values in a dictionary

    - by fishhead
    what would be the best way to search for a value in a dictionary. for instance I would like to search for modified objects, would going through the entire collection be the only way to do this? c#, .net 2.0 class RecA { public bool modified {get;set:} public string{get;set;} } class RecA_Dic : Dictionary<int,Rec_A> { public bool GetItemByKey(int key,out obj) { return this.TryGetValue(key, out obj); } public List<Rec_A> getModifiedItems() { List<Rec_A> li = new List<Rec_A>(); for(int i=0;i<this.count;i++) if (((Rec_A)this[i]).modified == true) li.Add((Rec_A)this[i]); return li; } }

    Read the article

  • advanced search with mysql

    - by Arsenal
    I'm creating a search function for my website where the user can put in anything he likes in a textfield. It get's matched against anything (name, title, job, car brand, ... you name it) I initially wrote the query with an INNER JOIN on every table that needed to be searched. SELECT column1, column2, ... FROM person INNER JOIN person_car ON ... INNER JOIN car ... This ended up in a query with 6 or 8 INNER JOINs, and a whole lot WHERE ... LIKE '%searchvalue%' Now this query seems to cause a time'out in MySql, and I even got a warning from my hosting provider that the queries just taking up too many resources. Now obviously I'm doing this very wrong, but I was wondering how the correct approach to these kind of search functions is. Thanks!

    Read the article

< Previous Page | 153 154 155 156 157 158 159 160 161 162 163 164  | Next Page >