Search Results

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

Page 35/556 | < Previous Page | 31 32 33 34 35 36 37 38 39 40 41 42  | Next Page >

  • Sort NSFetchedResultsController results by user location

    - by cgp
    I have an application that contains some Locations in Core Data, and I want to show them to the user in order of proximity to the user's location. I am using an NSFetchedResultsController to serve the locations to the Table View. I thought about creating a virtual accessor method that returns the location's distance from the user, that would be calculated using a "global" CoreLocationManager, but it crashes with reason: Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'keypath distanceFromCurrentLocation not found in entity < NSSQLEntity Location id=4' I also give the user the option to sort alphabetically, so I would prefer it if I kept the NSFetchedResultsController, if possible. How should I do it? Thanks!

    Read the article

  • MySQL inconsistent table scan results

    - by user148207
    What's going on here? mysql> select count(*) from notes where date(updated_at) > date('2010-03-25'); +----------+ | count(*) | +----------+ | 0 | +----------+ 1 row in set (0.59 sec) mysql> select count(*) from notes where message like'%***%' and date(updated_at) > date('2010-03-25'); +----------+ | count(*) | +----------+ | 26 | +----------+ 1 row in set (1.30 sec) mysql> explain select count(*) from notes where date(updated_at) > date('2010-03-25'); +----+-------------+-------+------+---------------+------+---------+------+--------+-------------+ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | +----+-------------+-------+------+---------------+------+---------+------+--------+-------------+ | 1 | SIMPLE | notes | ALL | NULL | NULL | NULL | NULL | 588106 | Using where | +----+-------------+-------+------+---------------+------+---------+------+--------+-------------+ 1 row in set (0.07 sec) mysql> explain select updated_at from notes where message like'%***%' and date(updated_at) > date('2010-03-25'); +----+-------------+-------+------+---------------+------+---------+------+--------+-------------+ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | +----+-------------+-------+------+---------------+------+---------+------+--------+-------------+ | 1 | SIMPLE | notes | ALL | NULL | NULL | NULL | NULL | 588106 | Using where | +----+-------------+-------+------+---------------+------+---------+------+--------+-------------+ 1 row in set (0.09 sec) mysql>

    Read the article

  • Oracle Sql Query taking a day long to return results using dblink

    - by Suresh S
    Guys i have the following oracle sql query that gives me the monthwise report between the dates. Basically for nov month i want sum of values between the dates 01nov to 30 nov. The table tha is being queried is residing in another database and accesssed using dblink. The DT columns is of NUMBER type (for ex 20101201) .The execution of the query is taking a day long and not completed. kindly suggest me , if their is any optimisation that can be suggested to my DBA on the dblink, or any tuning that can be done on the query , or rewriting the same. SELECT /*+ PARALLEL (A 8) */ TO_CHAR(TRUNC(TRUNC(SYSDATE,'MM')- 1,'MM'),'MONYYYY') "MONTH", TYPE AS "TYPE", COLUMN, COUNT (DISTINCT A) AS "A_COUNT", COUNT (COLUMN) AS NO_OF_COLS, SUM (DURATION) AS "SUM_DURATION", SUM (COST) AS "COST" FROM **A@LN_PROD A** WHERE DT >=TO_NUMBER(TO_CHAR(TRUNC(TRUNC(SYSDATE,'MM')-1,'MM'),'YYYYMMDD')) AND DT < TO_NUMBER(TO_CHAR(TRUNC(TRUNC(SYSDATE,'MM'),'MM'),'YYYYMMDD')) GROUP BY TYPE, COLUMN

    Read the article

  • How to get an id from the results in two tables

    - by Chris Lively
    Consider an order. An order will have one or more line items. Each line item is for a particular product. Given a filter table with a couple of products, how would I get the order id's that had at least all of the products listed in the second table? table Orders( OrderId int ) table LineItems ( OrderId int, LineItemId int, ProductId int ) table Filter ( ProductId int ) data Orders OrderId -------- 1 2 3 LineItems OrderId LineItemId ProductId ------- ---------- --------- 1 1 401 1 2 502 2 3 401 3 4 401 3 5 603 3 6 714 Filter ProductId --------- 401 603 Desired result of the query: OrderId: 3

    Read the article

  • How to insert <br/> after each 5 results?

    - by Axel
    This is my code: $query = mysql_query("SELECT * FROM books ORDER BY id") or die(mysql_error()); while($row = mysql_fetch_assoc($query)) { echo $row["bookname"]." - "; } How to make only 5 books displayed in each line, by inserting a at the start if the row is 5 or 10 or 15 etc... Thanks

    Read the article

  • SELECT subset from two tables and LEFT JOIN results

    - by Doctor Trout
    Hi all, I'm trying to write a bit of SQL for SQLITE that will take a subset from two tables (TableA and TableB) and then perform a LEFT JOIN. This is what I've tried, but this produces the wrong result: Select * from TableA Left Join TableB using(key) where TableA.key2 = "xxxx" AND TableB.key3 = "yyyy" This ignore cases where key2="xxxx" but key3 != "yyyy". I want all the rows from TableA that match my criteria whether or not their corresponding value in TableB matches, but only those rows from TableB that match both conditions. I did manage to solve this by using a VIEW, but I'm sure there must be a better way of doing this. It's just beginning to drive me insane tryng to solve it now. (Thanks for any help, hope I've explained this well enough).

    Read the article

  • Select Top N Records Ordered by X, But Have Results in Reverse Order

    - by I. J. Kennedy
    I'm trying to get the top N records (when ordered by some column X), but have the result set in reverse order. The following statement is incorrect, but probably demonstrates what I'm after: SELECT * FROM (SELECT TOP 10 * FROM FooTable ORDER BY X DESC) ORDER BY X ASC For example, column X could be an ID or a timestamp; I want the latest 10 records but want them returned in forward chronological order.

    Read the article

  • Displaying mysql results as an object?

    - by Michael
    If I have a database with the structure: ___id_____|____value____ 1 | value1 2 | value2 3 | value3 How can I pull data from this MySQL database in PHP and have it formatted like this: Array ( [0] => stdClass Object ( [id] => 1 [value] => value1 ) [1] => stdClass Object ( [id] => 2 [value] => value2 ) [2] => stdClass Object ( [id] => 3 [value] => value3 ) )

    Read the article

  • Selenium Test Results are empty

    - by simonC
    I've Jenkins and selenium configured to run tests after the app is build, everything is ok till the moment that selenium tests should run, actually the selenium test suite starts correctly and then it stops after the first test and does not go forward. I'm using VNC to watch what is happening. The logs produces by selenium are empty. Im testing those test via java -jar /var/lib/selenium/selenium-server-jar -browserSessionReuse -htmlSuite *firefox https://test-a.4pm.si /var/lib/jenkins/jobs/4pm_test/workspace/4pm_ee-test/selenium_tests/suite.html /var/lib/jenkins/jobs/4pm_test/workspace/selenium-result.html the selenium-result.html is empty it just execute the first test which is OK and stops there is there any selenium server setting I need to set?

    Read the article

  • Ajax request (from .NET) give me unexpected results

    - by ironnailpiercethesky
    I wanted to learn a little more about web and .NET so i decided to write a program to download binaries, webpages and does a little ajax. The first download site i tried was too easy. So i went against uploading.com. It seemed good, no captcha, some ajax use required, you cant guess all the data, it was perfect. After 2hours of messing around i got frustrated. For the life of me i could not get the ajax response to give me what i was expecting. I decided to use tamper data clear my cookies, click on the entry for the ajax request. Copy the Referer, cookies and postdata and came up with this code. It does not work! I am shocked that copying those fields did not work. I even tried setting the user agent (not in code linked) and it still did not work. Why isnt this POST on the ajax request not giving me the correct file? I notice the JsHttpRequest=12719132559480-xml changes based on time so if you want to run the code you should grab a new snapshot with tamperdata (or at least update that url). I dont see any extra headers in tamper data so does anyone know why i might not be getting the response expected? I know disabling cookies or javascript will make the link 'expired' automatically. I dont think javascript will matter because i got the data from tamperdata at the moment of request so what gives? What am i forgetting or what data am i not submitting properly?

    Read the article

  • Load test results VSTS 2008

    - by Julia
    Can anybody explain why load test result on Graph are different form load test result on Table Page. If compare Min and Avg page response time they are the same. But if we compare figures in Max column they are different for the same page and the same load rest run. see linked images for more details. http://cid-ee8b34c203174724.skydrive.live.com/self.aspx/.Public/3.png

    Read the article

  • Use filter(), but work with both results

    - by Tomalak
    In jQuery, filter() reduces your result to those elements that fulfill a certain condition. This splits the list in two parts. Working with the "good half" of the elements is easy: $("some selector").filter(function() { // determine result... return result; }).each( /* do something */ ); But how can I work with the "other half" of my elements, too - but without doing the equivalent of this: $("some selector").filter(function() { // determine result... return !result; }).each( /* do something else */ ); Basically, I'd like to feed two separate /* do something */ parts to a single filter. One for those that match, and one for the others - without having to filter twice. Am I missing a jQuery function that does this? P.S.: I guess I could do: $("some selector").each(function() { // determine result... if (result) /* do something */ else /* do something else */ }); But I was hoping for something nicer.

    Read the article

  • How to change results per page value in datatables

    - by detj
    Datatables has an option to select the number of records shown per page. The default value starts from 10, 25, 50 and 100. How can I change it to start from 5 instead of 10? 10 records is a bit too much and takes a lot of space in my current design. Thanx! http://datatables.net/

    Read the article

  • Add column from another table matching results from first MySQL query

    - by Nemi
    This is my query for available rooms in choosen period: SELECT rooms.room_id FROM rooms WHERE rooms.room_id NOT IN ( SELECT reservations.room_id FROM reservations WHERE ( reservations.arrivaldate >= $arrival_datetime AND reservations.departuredate <= $departure_datetime) OR ( reservations.arrivaldate <= $arrival_datetime AND reservations.departuredate >= $arrival_datetime ) OR ( reservations.arrivaldate <= $departure_datetime AND reservations.departuredate >= $departure_datetime ) ); How to add average room price column for selected period(from $arrival_datetime to $departure_datetime) from another table (room_prices_table), for every room_id returned from above query. So I need to look in columns whos name is same as room_id... room_prices_table: date room0001 room0002 room0003 ... Something like SELECT AVG(room0003) FROM room_prices_table WHERE datum IS BETWEEN $arrival_datetime AND $departure_datetime ??

    Read the article

  • Implement delegates for Core Data's fetched results controller or not

    - by Spanky
    What advantage is there to implementing the four delegate methods: (void)controllerWillChangeContent:(NSFetchedResultsController *)controller (void)controller:(NSFetchedResultsController *)controller didChangeSection:(id )sectionInfo atIndex:(NSUInteger)sectionIndex forChangeType:(NSFetchedResultsChangeType)type (void)controller:(NSFetchedResultsController *)controller didChangeObject:(id)anObject atIndexPath:(NSIndexPath *)indexPath forChangeType:(NSFetchedResultsChangeType)type newIndexPath:(NSIndexPath *)newIndexPath (void)controllerDidChangeContent:(NSFetchedResultsController *)controller rather than implement: (void)controllerDidChangeContent:(NSFetchedResultsController *)controller Any help appreciated // :)

    Read the article

  • Linq To Sql Left outer join - filtering null results

    - by Harry
    I'd like to reproduce the following SQL into C# LinqToSql SELECT TOP(10) Keywords.* FROM Keywords LEFT OUTER JOIN IgnoreWords ON Keywords.WordID = IgnoreWords.ID WHERE (DomainID = 16673) AND (IgnoreWords.Name IS NULL) ORDER BY [Score] DESC The following C# Linq gives the right answer. But I can't help think I'm missing something (a better way of doing it?) var query = (from keyword in context.Keywords join ignore in context.IgnoreWords on keyword.WordID equals ignore.ID into ignored from i in ignored.DefaultIfEmpty() where i == null where keyword.DomainID == ID orderby keyword.Score descending select keyword).Take(10); the SQL produced looks something like this: SELECT TOP (10) [t0].[DomainID], [t0].[WordID], [t0].[Score], [t0].[Count] FROM [dbo].[Keywords] AS [t0] LEFT OUTER JOIN (SELECT 1 AS [test], [t1].[ID] FROM [dbo].[IgnoreWords] AS [t1]) AS [t2] ON [t0].[WordID] = [t2].[ID] WHERE ([t0].[DomainID] = 16673) AND ([t2].[test] IS NULL) ORDER BY [t0].[Score] DESC How can I get rid of this redundant inner selection? It's only slightly more expensive but every bit helps!

    Read the article

  • Fixing VB6 inaccurate mathmetical results due to rounding

    - by jay
    Try running this in a .VBS file MsgBox(545.14-544.94) You get a neat little answer of 0.199999999999932! This rounding issue also occurs unfortunately in Sin(2 * pi) since VB can only ever see the (user defined) variable pi as accurate as 3.14159265358979. Is rounding it manually (and loosing accuracy) the only way to improve the result? What is the most effective way of dealing with this kind of problem?

    Read the article

  • Javascript "Match" Function Not Returning Proper Results in Safari or IE (but yes in FF)

    - by Jascha
    Forgive me as this is a time sensitive issue and I will have to switch the site back in a few hours so the link will be bad... but: I am simply comparing two strings looking for a match with this function... I have an array of objects called linkArray and I need to match the .src of each object to a .src I send it (the src of the clicked image). if the the src of the image I clicked matches the src of an object in my array, I set a variable to the link string of that object and return true, letting my page know that the link is available. Now, this works great in FF. But not in any other browser and I can't figure out for the life of me why. I have set up a dialogue box to literally compare, by eye, the two strings that should at the very least throw the message "match". Can anyone see what I am missing here??? here is the link... http://7thart.com/Jewish-History-and-Culture/Jews-and-Baseball-An-American-Love-Story If you click any of the thumbnails on the left, you will activate the function. Again, I apologize as after a few hours I have to switch back to the original site and this link will be invalid. Thanks in advance for your help. (function below)... function matchLink(a){ for(var i=0;i<linkArray.length;i++){ var fixLink = '../' + linkArray[i]['src']; alert(fixLink + '\n = \n' + a); if(fixLink == a){ alert('match'); newLink = linkArray[i]['link']; return true; } } return false; } Note: The "match" will return on two of the images.. the initial image, and the first thumbnail on the left. The second thumbnail SHOULD match, and the third one SHOULD NOT match.

    Read the article

  • why does entity framework+mysql provider enumeration returns partial results with no exceptions

    - by Freddy Rios
    I'm trying to make sense of a situation I have using entity framework on .net 3.5 sp1 + MySQL 6.1.2.0 as the provider. It involves the following code: Response.Write("Products: " + plist.Count() + "<br />"); var total = 0; foreach (var p in plist) { //... some actions total++; //... other actions } Response.Write("Total Products Checked: " + total + "<br />"); Basically the total products is varying on each run, and it isn't matching the full total in plist. Its varies widely, from ~ 1/5th to half. There isn't any control flow code inside the foreach i.e. no break, continue, try/catch, conditions around total++, anything that could affect the count. As confirmation, there are other totals captured inside the loop related to the actions, and those match the lower and higher total runs. I don't find any reason to the above, other than something in entity framework or the mysql provider that causes it to end the foreach when retrieving an item. The body of the foreach can have some good variation in time, as the actions involve file & network access, my best shot at the time is that when the .net code takes beyond certain threshold there is some type of timeout in the underlying framework/provider and instead of causing an exception it is silently reporting no more items for enumeration. Can anyone give some light in the above scenario and/or confirm if the entity framework/mysql provider has the above behavior? Update: I can't reproduce the behavior by using Thread.Sleep in a simple foreach in a test project, not sure where else to look for this weird behavior :(.

    Read the article

  • How to display MySQL Select statement results in PHP

    - by Vafello
    I have the following code and it should return just one value (id) from mysql table. The following code doesnt work. How can I output it without creating arrays and all this stuff, just a simple output of one value. $query = "SELECT id FROM users_entity WHERE username = 'Admin' "; $result = map_query($query); echo $result;

    Read the article

  • openquery giving differnt results

    - by Mithil Deshmukh
    I have 2 similar queries select * from openquery(powerschool, 'select * from TEACHERS where teachernumber is not null and schoolid=''1050'' and teacherloginid is not null order by teachernumber') and SELECT * from openquery(powerschool, 'SELECT NVL(teachernumber,'''') from TEACHERS where teachernumber is not null and schoolid=''1050'' and teacherloginid is not null order by teachernumber') The first one is giving me 182 rows while the second one gives me 83. What's wrong with the queries?

    Read the article

  • Why does SQLite not bring back any results from my database

    - by tigermain
    This is my first SQLite based iPhone app and I am trying to get it to read a menu hierarchy from my database. The database appears to be registered fine as the compiled statement doesnt error (tried putting in valid table name to test) but for some reason sqlite3_step(compiledStmt) doesnt ever equal SQLITE_ROW as if to suggest there is no data in there; which there is. sqlite3 *database; menu = [[NSMutableArray alloc] init]; if (sqlite3_open([databasePath UTF8String], &database) == SQLITE_OK) { const char *sqlStmt = "SELECT * FROM Menu"; sqlite3_stmt *compiledStmt; if (sqlite3_prepare_v2(database, sqlStmt, -1, &compiledStmt, NULL) == SQLITE_OK) { while (sqlite3_step(compiledStmt) == SQLITE_ROW) { NSString *aTitle = [NSString stringWithUTF8String:(char *)sqlite3_column_text(compiledStmt, 1)]; MenuItem *menuItem = [[MenuItem alloc] init]; menuItem.title = aTitle; [menu addObject:menuItem]; [menuItem release]; } } else { NSLog(@"There is an error with the SQL Statement"); } sqlite3_finalize(compiledStmt); } sqlite3_close(database);

    Read the article

  • Linq merging results

    - by glenneroo
    I'm working with a list within a list. This is how I'm currently searching: var tags = from fd in BigList from tag in fd.Tags where tag.Id == selectedTag.Id || tag.Id == ID.TIMESTAMP select new { fd.Name, tag.Id, tag.Value }; I then iterate over the result-set and remembering when Timestamp pops up for the next entry, needless to say this is sloppy and I'm positive there's a better way using Linq, I just can't seem to find the syntax. Here's some sample output (Id indicates what type of data is stored inside e.g. a timestamp): Name | Id | Value -----|----|---------- 0000 | 1 | <timestamp> 0000 | 2 | 1.2 ... 9999 | 1 | <timestamp> 9999 | 2 | 6.3 I need all instances where Id = selectedTag.Id. I just want 1 list with Name, Id, Value and Timestamp, but the problem is my above attempt returns 2 entries for every item (1 for timestamp and 1 for the value). Is there a way to do this using Linq? Preferably using query syntax! :)

    Read the article

< Previous Page | 31 32 33 34 35 36 37 38 39 40 41 42  | Next Page >