Search Results

Search found 13889 results on 556 pages for 'results'.

Page 227/556 | < Previous Page | 223 224 225 226 227 228 229 230 231 232 233 234  | Next Page >

  • How to search multiple columns in MySQL?

    - by George
    I'm trying to make a search feature that will search multiple columns to find a keyword based match. This query: SELECT title FROM pages LIKE %$query%; works only for searching one column, I noticed separating column names with commas results in an error. So is it possible to search multiple columns in mysql?

    Read the article

  • jQuery check on wordchange rather than "change" trigger

    - by benhowdle89
    I have a input that the user types a search parameter into, at the moment i have it on keyup to do a POST ajax request to a PHP script that returns search results. however its firing off 50 billion (not literally) post requests in about 10 seconds (as the user types) which slows the whole experience down. Can i use jQuery to detect a "wordup" rather than "keyup" by detecting the use of the space bar? Does this make sense?

    Read the article

  • K-Means Algorithm and java code

    - by Thandar
    Hi all, I need to calculate for grouping objects according to their size. I got k-means algorithms in java which calculate mostly for classifying according to their two or more features and the results are not satisfy for me.I only want to calculate for grouping objects based on one feature.Pseudocode or code would be helpful, too. Thanks u all for helping.

    Read the article

  • Help with bugs in a C code

    - by Yanki Twizzy
    This C code is giving me some unpredictable results. The program is meant to collect 6 nos and print out the max, position of the max no and the average. It's supposed to have only 3 functions - input, max_avr_pos and output for doing what the code is supposed to do but I am getting unpredictable results. Please what could be the problem #include <stdio.h> #include <stdlib.h> #include <conio.h> void input_vals(int arrnum[]); void max_ave_val(int arrnum1[],double *average,int *maxval,int *position); void print_output(double *average1,int *maxval1,int *position1); int main(void) { int arrnum[6],maxval2,position2; double average2; input_vals(arrnum); max_ave_val(arrnum,&average2,&maxval2,&position2); print_output(&average2,&maxval2,&position2); _getche(); return 0; } void input_vals(int arrnum[]) { int count; printf("\n Please enter six numbers\n"); for(count=0;count<6;count++) { scanf("%d",&arrnum[count]); } } void max_ave_val(int arrnum1[],double *average,int *maxval,int *position) { int total=0; int cnt,cnt1,cnt2,limit,maxval2,post; limit=6; /* finding the max value*/ for(cnt=0;cnt<limit-1;cnt++) for(cnt1=limit-1;cnt1>cnt;--cnt1) { if(arrnum1[cnt1-1]>arrnum1[cnt1]) { maxval2=arrnum1[cnt-1]; post=(cnt-1)+1; } else { maxval2=arrnum1[cnt1]; post=cnt1+1; } } *maxval=maxval2; *position=post; /* solving for total */ for(cnt2=0;cnt2<limit;cnt2++); { total=total+arrnum1[cnt2]; } *average=total/limit; } void print_output(double *average1,int *maxval1,int *position1) { printf("\n value of the highest of the numbers is %d\n",*maxval1); printf("\n the average of all the numbers is %g\n",*average1); printf("\n the postion of the highest number in the list is %d\n",*position1); }

    Read the article

  • WordPress SQL Query on Category/Terms

    - by mroggle
    Hi, i am modifying a plugin slightly to meet my needs, and need to change this query to return post ID's of just one category. I know it has something to do with INNER JOIN, but cant get the query right. Here is the original query $query = "SELECT ID as PID FROM $wpdb->posts"; $results = $wpdb->get_results($querydetails,ARRAY_A);

    Read the article

  • Apple script Editor, write message to the "Result" window

    - by Patrick
    I am using the Mac OS X Apple Script Editor and (while debugging) instead of writing a lot of display dialog statements, I'd like to write the results of some calculation in the window below, called "Result" (I have the German UI here, so the translation is a guess). So is there a write/print statement that I can use for putting messages in the "standard out" window? I am not asking to put the messages in a logfile on the file system, it is purely temporary.

    Read the article

  • current transform being applied by canvas

    - by Allain Lalonde
    How can I determine the current transform that's being applied by an html5 canvas. It seems that it only supports two methods for dealing with transforms "transform", "setTransform" but I can't seem to discover the results of applying the transforms. Short of tracking them all myself and duplicating the the matrix mathematics that it must be doing natively, how can I figure out the current transform?

    Read the article

  • Is HTTP 404 appropriate for out of range page number on paged content?

    - by WooYek
    I have a site that is mainly showing a paged list of content (articles, data element's, etc.), and I'm wondering about returning HTTP 404 when user navigates outside of the available list range. Some sites just display "No results/Page number out of range" and some return additionally return HTTP 404 status. What's your take on that, and why? UPDATE It's not and api response. This question is in regard to user viewed pages that among other things show a list/table in the main area.

    Read the article

  • How to cache queries in EJB and return result efficient (performance POV)

    - by Maxym
    I use JBoss EJB 3.0 implementation (JBoss 4.2.3 server) At the beginning I created native query all the time using construction like Query query = entityManager.createNativeQuery("select * from _table_"); Of couse it is not that efficient, I performed some tests and found out that it really takes a lot of time... Then I found a better way to deal with it, to use annotation to define native queries: @NamedNativeQuery( name = "fetchData", value = "select * from _table_", resultClass=Entity.class ) and then just use it Query query = entityManager.createNamedQuery("fetchData"); the performance of code line above is two times better than where I started from, but still not that good as I expected... then I found that I can switch to Hibernate annotation for NamedNativeQuery (anyway, JBoss's implementation of EJB is based on Hibernate), and add one more thing: @NamedNativeQuery( name = "fetchData2", value = "select * from _table_", resultClass=Entity.class, readOnly=true) readOnly - marks whether the results are fetched in read-only mode or not. It sounds good, because at least in this case of mine I don't need to update data, I wanna just fetch it for report. When I started server to measure performance I noticed that query without readOnly=true (by default it is false) returns result with each iteration better and better, and at the same time another one (fetchData2) works like "stable" and with time difference between them is shorter and shorter, and after 5 iterations speed of both was almost the same... The questions are: 1) is there any other way to speed query using up? Seems that named queries should be prepared once, but I can't say it... In fact if to create query once and then just use it it would be better from performance point of view, but it is problematic to cache this object, because after creating query I can set parameters (when I use ":variable" in query), and it changes query object (isn't it?). well, is here any way to cache them? Or named query is the best option I can use? 2) any other approaches how to make results retrieveng faster. I mean, for instance I don't need those Entities to be attached, I won't update them, all I need is just fetch collection of data. Maybe readOnly is the only available way, so I can't speed it up, but who knows :) P.S. I don't ask about DB performance, all I need now is how not to create query all the time, so use it efficient, and to "allow" EJB to do less job with the same result concerning data returning.

    Read the article

  • issue with $.ParseJSON which converts json string to null

    - by Aby
    I am using spring mvc in which i convert the arraylist into json string. I have one object 1) results. My output from spring looks like this: { "data":"[{\"userName\":\"test1\",\"firstName\":\"test\",\"lastName\":\"user\"}, {\"userName\":\"test2\",\"firstName\":\"test1\",\"lastName\":\"user1\"}]", } I get output as null when i do '$.parseJSON' with this output. When i tried testing only with data object it works fine Any help would be great.

    Read the article

  • ASP.NET MVC - Combine Json result with ViewResult

    - by elado
    Can I return a Json result that contains also a rendered view? I need it to return the new ID of a submitted form along with its HTML and some other properties. Also that can be helpful when I need to return two (or more) view results from one action inside a Json object. Thanks!

    Read the article

  • Communicate between separate MPI-Programs

    - by Fyg
    I have the following problem: Program 1 has a huge amount of data, say 10GB. The data in question consists of large integer- and double-arrays. Program 2 has 1..n MPI processes that use tiles of this data to compute results. How can I send the data from program 1 to the MPI Processes? Using File I/O is out of question. The compute node has sufficient RAM.

    Read the article

  • How to set offset in GORM when using createCriteria?

    - by firnnauriel
    I'm just wondering if it's possible for 'createCriteria' to specify the paginateParams (i.e. offset) similar to dynamic finder (findAll, etc.) Note that this code is not working since 'offset' is not documented in http://www.grails.org/doc/1.2.1/ref/Domain%20Classes/createCriteria.html def c = SnbrItemActDistance.createCriteria() def results = c.list { eq('iid', newsId) ge('distance', cap) maxResults(count) offset(offset) order('distance', 'desc') }

    Read the article

  • Help with rendering the Mandelbrot set in Java

    - by SDLFunTimes
    I wrote an implementation of the Mandelbrot set in Java using a JComponent but I'm getting strange results when I render it. Besides that everything compiles right. I'm just not for sure what I'm doing wrong with it. Any code review also would be appreciated. My source is posted on pastebin since it would take up too much room here: JMandelbrot.java Mandelbrat.java

    Read the article

  • MODX parse error function implode (is it me or modx?)

    - by Ian
    Hi, I cannot for the life of me figure this out, maybe someone can help. Using MODX a form takes user criteria to create a filter and return a list of documents. The form is one text field and a few checkboxes. If both text field and checkbox data is posted, the function works fine; if just the checkbox data is posted the function works fine; but if just the text field data is posted, modx gives me the following error: Error: implode() [function.implode]: Invalid arguments passed. I've tested this outside of modx with flat files and it all works fine leading me to assume a bug exists within modx. But I'm not convinced. Here's my code: <?php $order = array('price ASC'); //default sort order if(!empty($_POST['tour_finder_duration'])){ //duration submitted $days = htmlentities($_POST['tour_finder_duration']); //clean up post array_unshift($order,"duration DESC"); //add duration sort before default $filter[] = 'duration,'.$days.',4'; //add duration to filter[] (field,criterion,mode) $criteria[] = 'Number of days: <strong>'.$days.'</strong>'; //displayed on results page } if(!empty($_POST['tour_finder_dests'])){ //destination/s submitted $dests = $_POST['tour_finder_dests']; foreach($dests as $value){ //iterate through dests array $filter[] = 'searchDests,'.htmlentities($value).',7'; //add dests to filter[] $params['docid'] = $value; $params['field'] = 'pagetitle'; $pagetitle = $modx->runSnippet('GetField',$params); $dests_array[] = '<a href="[~'.$value.'~]" title="Read more about '.$pagetitle.'" class="tourdestlink">'.$pagetitle.'</a>'; } $dests_array = implode(', ',$dests_array); $criteria[] = 'Destinations: '.$dests_array; //displayed on results page } if(is_array($filter)){ $filter = implode('|',$filter);//pipe-separated string } if(is_array($order)){ $order = implode(',',$order);//comma-separated string } if(is_array($criteria)){ $criteria = implode('<br />',$criteria); } echo '<br />Order: '.$order.'<br /> Filter: '.$filter.'<br /> Criteria: '.$criteria; //next: extract docs using $filter and $order, display user's criteria using $criteria... ?> The echo statement is displayed above the MODX error message and the $filter array is correctly imploded. Any help will save my computer from flying out the window. Thanks

    Read the article

  • Java library suggestions for implementing a custom web server

    - by dexter
    I would like to create a web server that will serve/accept json files through REST. The JSON files being served will come from a database query and format the results into JSON. Any suggestions for a good java library. I have tried using Apache HTTPComponents. While maybe I can just create a servlet but I am not really allowed to install a servlet container in the server machine.

    Read the article

  • Actionscript 3 E4X working with MMS values in XML

    - by user150946
    I am building an application using Action script 3 I am retrieving some XML from the web however the node names are mms:Image mms:Results etc my action script compiler is throwing an error becuase it is not expecting to see the semi colon in the node name. How to I access the nodes? thanks

    Read the article

< Previous Page | 223 224 225 226 227 228 229 230 231 232 233 234  | Next Page >