Search Results

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

Page 113/556 | < Previous Page | 109 110 111 112 113 114 115 116 117 118 119 120  | Next Page >

  • MySQL GROUP_CONCAT + IN() = missing data :-(

    - by Andrew Heath
    Example: Table: box boxID color 01 red 02 blue 03 green Table: boxHas boxID has 01 apple 01 pear 01 grapes 01 banana 02 lime 02 apple 02 pear 03 chihuahua 03 nachos 03 baby crocodile I want to query on the contents of each box, and return a table with each ID, color, and a column that concatenates the contents of each box, so I use: SELECT box.boxID, box.color, GROUP_CONCAT(DISTINCT boxHas.has SEPARATOR ", ") AS contents FROM box LEFT JOIN boxHas ON box.boxID=boxHas.boxID WHERE boxHas.has IN ('apple','pear') GROUP BY box.boxID ORDER BY box.boxID and I get the following table of results: boxID color contents 01 red apple, pear 02 blue apple, pear My question to you is: why isn't it listing ALL the has values in the contents column? Why is my WHERE statement also cropping my GROUP_CONCAT? The table I thought I was going to get is: boxID color contents 01 red apple, banana, grapes, pear 02 blue apple, lime, pear Although I want to limit my boxID results based upon the WHERE statement, I do not want to limit the contents field for valid boxes. :-/ Help?

    Read the article

  • When does a query/subquery return a NULL and when no value at all?

    - by AspOnMyNet
    a) If a query/subquery doesn’t find any matching rows, then it either returns NULL or no value at all, thus not even a NULL value. Based on what criteria does a query/subquery return a NULL and when doesn’t it return any results, not even a NULL value? b) I assume a scalar subquery will always return NULL, when no matching rows are found? I assume most-outer scalar query also returns NULL if no rows are found? c) SELECT FirstName, LastName, YEAR(BirthDate) FROM Persons WHERE YEAR(BirthDate) IN (SELECT YearReleased FROM Albums); If subquery finds no results, is then a WHERE clause of an outer query translated into WHERE YEAR(BirthDate) IN (null); ? If instead WHERE clause is translated into WHERE YEAR(BirthDate) IN(); then shouldn’t that be an error condition, since how can YEAR(BirthDate) value be compared to nothing? thanx

    Read the article

  • split a result list from mysql into separate lists based on list length

    - by liz
    i have a list of returned rows from mysql that i am outputting using php: echo '<ul class="mylist">'; foreach ($rows as $row) { echo '<li><a href="'.$row->url.'" target="_blank">' . $row->title . '</a></li>'; } echo "</ul>"; works fine, but its a long list and i would like to split it into ul chunks so that i can make columns. maybe like 5 results per ul. instead of one ul... i tried wrapping in a for statement but then just wound up outputting the results 5 times...oops...

    Read the article

  • Per query relevance elevation for solr?

    - by plusplus
    I want to tune the relevance of solr search results on a per user basis - based on the number of times the user has clicked through a result before. Frequently hit items FOR THAT USER should rise to the top of their search results. Is there a way to provide custom boost/elevation for particular document ids on the query? I'm thinking in the order of ~100s of particular documents to elevate. The elevation should have no effect if the rest of the query doesn't find those documents. Alternatively, if this isn't possible, what is a sane way for setting up an alternative indexing approach that would make this possible? Could I add a field per user in the index to store their scores? I'm thinking in the order of 1000 users. The major drawback of that approach is the number of times a document would need to be reindexed (i.e. each time it was used by the user).

    Read the article

  • Jasper Reports Crosstab Query

    - by Sean McDaid
    I'm using Jasper Reports/iReports crosstabs to create a matrix of student and results. So for example Jim is doing subjects A, B, C and Sally is doing A, C What I want is something like: Subj-A Subj-B Subj-C Jim P M D Sally D D But as my SQL orders by name then subject I get: Subj-A Subj-B Subj-C Subj-A Subj-C Jim P M D Sally D D As you can see in the above the results are correct but the formatting is woeful. Is there anyway I can generate the reports to use names and subject only once and filling in the values from here? This probably isn't clear.

    Read the article

  • how to get the type of a deferred template parameter

    - by smerlin
    Is there a way to get the defered type of a class template parameter ? template <class TPtr> struct foo { typedef TPtr ptr_type; typedef ??? element_type; /* shall be the type of a deferred TPtr*/ }; so foo<const char*>::element_type results in const char, and foo<std::vector<int>::iterator_type>::element_type results in int. i am aware of that i can use the value_type typedef for c++ iterators (like std::vector<int>::iterator_type::value_type), but raw pointers havent got a value_type typedef, so i am out of luck there.

    Read the article

  • Is it valid for Hibernate list() to return duplicates?

    - by skaffman
    Is anyone aware of the validity of Hibernate's Criteria.list() and Query.list() methods returning multiple occurrences of the same entity? Occasionally I find when using the Criteria API, that changing the default fetch strategy in my class mapping definition (from "select" to "join") can sometimes affect how many references to the same entity can appear in the resulting output of list(), and I'm unsure whether to treat this as a bug or not. The javadoc does not define it, it simply says "The list of matched query results." (thanks guys). If this is expected and normal behaviour, then I can de-dup the list myself, that's not a problem, but if it's a bug, then I would prefer to avoid it, rather than de-dup the results and try to ignore it. Anyone got any experience of this?

    Read the article

  • how to get google sitelinks on a website

    - by altvali
    Hi all! There are a lot of websites that look professional in Google results. Try searching for 'stackoverflow' and you'll see at the top a result with a title, a description and a table of 8 links to stackoverflow categories. That's what i'm interested in producing for future websites. So what must be done? Does it depend on the number of visitors? how long does it take until the results start looking like that?

    Read the article

  • Can I override a theme function with a .tpl file?

    - by Nick Lowman
    Hi everyone, How would I go around overriding a theme function with a .tpl file? I know how to override a .tpl file with a theme function but not the other way round. I can't seem to find anywhere that tells me so, so maybe it's not possible or not good practise. For example if there was a theme function defined in a module called super_results and registered with the theme registry, like the example below, how would I go around overriding it with super_results.tpl.php. 'super_results' => array( 'arguments' => array('title' => NULL, 'results' => NULL, 'votes' => NULL), ), function modulename_super_results($title, $results,$votes){ output HTML }

    Read the article

  • Does Google Analytics have peformance overhead?

    - by Mohit Nanda
    To what extent does Google Analytics impact performance? I'm looking for the following: Benchmarks (including response times/pageload times et al) Links or results to similar benchmarks One (possible) method of testing Google Analytics (GA) on your site: Serve ga.js (the Google Analytics JavaScript file) from your own server. Update from Google Daily (test 1) and Weekly (test 2). I would be interested to see how this reduces the communication between the client webserver and the GA server. Has anyone conducted any of these tests? If so, can you provide your results? If not, does anyone have a better method for testing the performance hit (or lack thereof) for using GA?

    Read the article

  • linq NullReferenceException while checking for null reference

    - by Odrade
    I have the following LINQ query: List<FileInputItem> inputList = GetInputList(); var results = from FileInputItem f in inputList where ( Path.GetDirectoryName(f.Folder).ToLower().Trim() == somePath || Path.GetDirectoryName(f.Folder).ToLower().Trim() == someOtherPath ) && f.Expression == null select f; Every time this query is executed, it generates a NullReferenceException. If I remove the condition f.Expression == null or change it to f.Expression != null, the query executes normally (giving the wrong results, of course). The relevant bits of FileInputItem look like this: [Serializable] public class FileInputItem { [XmlElement("Folder")] public string Folder { get; set; } [XmlElement("Expression")] public string Expression { get; set; } /*SNIP. Irrelevant properties */ } I'm new to LINQ to objects, so I'm probably missing something fundamental here. What's the deal?

    Read the article

  • Is there any way to modify a column before it is ordered in MySQL?

    - by George Edison
    I have a table with a field value which is a varchar(255). The contents of the field can be quite varied: $1.20 $2994 $56 + tax (This one can be ignored or truncated to $56 if necessary) I have a query constructed: SELECT value FROM unnamed_table ORDER BY value However, this of course uses ASCII string comparison to order the results and does not use any numerical type of comparison. Is there a way to truly order by value without changing the field type to DECIMAL or something else? In other words, can the value field be modified ('$' removed, value converted to decimal) on the fly before the results are sorted?

    Read the article

  • Python Scraper for Javascript?

    - by Diego
    Hey all, Can anyone direct me to a good Python screen scraping library for javascript code (hopefully one with good documentation/tutorials)? I'd like to see what options are out there, but most of all the easiest to learn with fastest results... wondering if anyone had experience. I've heard some stuff about spidermonkey, but maybe there are better ones out there? Specifically, I use BeautifulSoup and Mechanize to get to here, but need a way to open the javascript popup, submit data, and download/parse the results in the javascript popup. <a href="javascript:openFindItem(12510109)" onclick="s_objectID=&quot;javascript:openFindItem(12510109)_1&quot;;return this.s_oc?this.s_oc(e):true">Find Item</a> I'd like to implement this with Google App engine and Django. Thanks!

    Read the article

  • NSPredicate confusion. Ignoring spaces.

    - by Mr. McPepperNuts
    NSPredicate *predicate = [NSPredicate predicateWithFormat:@"name contains [cd] %@", passdTextToSearchFor]; I have two entries in name: "Test One" and "Test Two." If I search for "test," I get 0 results. But if I search for "test one" or "test two" I get the proper result. The search is ignoring the space. In reality I want both results if the user searches for "test." Any ideas? I tried contain and like.

    Read the article

  • regarding like query operator

    - by stackoverflowuser
    Hi For the below data (well..there are many more nodes in the team foundation server table which i need to refer to..below is just a sample) Nodes ------------------------ \node1\node2\node3\ \node1\node2\node5\ \node1\node2\node3\node4 I was wondering if i can apply something like (below query does not give the required results) select * from table_a where nodes like '\node1\node2\%\' to get the below data \node1\node2\node3\ \node1\node2\node5\ and something like (below does not give the required results) select * from table_a where nodes like '\node1\node2\%\%\' to get \node1\node2\node3\ \node1\node2\node5\ \node1\node2\node3\node4 Can the above be done with like operator? Pls. suggest. Thanks

    Read the article

  • Netlogo behaviorspace, How to export each experiment's plot in a separate directory with a unique name? (Answer is by using pathdir extension)

    - by Marzy
    I have a save-plots function which I call it in my final command of behavior space to export selected plots, I could create unique names for plots so they don't replace each other, for example my output file name for one of the plots is like this: DeathRates, PS true, HCHA false 100,true.csv Let FileNameDeathRates ( word "D: /Results/" "DeathRates, " "PS "PS? ", HCHA " HCHA? MPS "," CV? ".csv" ) So far is good, but I want is to have a directory with name of the experiment and export all plots of that experiment in that directory for example: Let DirName( word "D:/Results/" "PS "PS? ", HCHA " HCHA? MPS "," CV? ) Netlogo already exports plots with proper name and I just want the directory name to be different , and of course prior to the experiment the directory does not exist so the directory should be created first , I could not find a command to create a directory in netlogo without pathdir extension. Any idea on how can I do this? Thanks in advance ;)

    Read the article

  • System.Interactive: Difference between Memoize() and MemoizeAll()?

    - by Joel Mueller
    In System.Interactive.dll (v1.0.2521.0) from Reactive Extensions, EnumerableEx has both a Memoize method and a MemoizeAll method. The API documentation is identical for both of them: Creates an enumerable that enumerates the original enumerable only once and caches its results. However, these methods are clearly not identical. If I use Memoize, my enumerable has values the first time I enumerate it, and seems to be empty the second time. If I use MemoizeAll then I get the behavior I would expect from the description of either method - I can enumerate the result as many times as I want and get the same results each time, but the source is only enumerated once. Can anyone tell me what the intended difference between these methods is? What is the use-case for Memoize? It seems like a fairly useless method with really confusing documentation.

    Read the article

  • Display `pretty output` of directory content from array

    - by user275074
    Hi, I'm using the following code to get an array of directories and their sub-directories where each contain file type extension: png. It works great but I need to be able to output the results of the array in a list style format e.g. Test - test2.png - test1.png subfolder - test3.png sub sub folder - test4.png etc Code: $filter=".png"; $directory='../test'; $it=new RecursiveDirectoryIterator("$directory"); foreach(new RecursiveIteratorIterator($it) as $file){ if(!((strpos(strtolower($file),$filter))===false)||empty($filter)){ $items[]=preg_replace("#\\\#", "/", $file); } } Example array of results: array ( 0 => '../test/test2.png', 1 => '../test/subfolder/subsubfolder/test3.png', 2 => '../test/subfolder/test3.png', 3 => '../test/test1.png', ) What would be the best way of achieving the desired result?

    Read the article

  • Javscript filter vs map problem

    - by graham.reeds
    As a continuation of my min/max across an array of objects I was wondering about the performance comparisons of filter vs map. So I put together a test on the values in my code as was going to look at the results in FireBug. This is the code: var _vec = this.vec; min_x = Math.min.apply(Math, _vec.filter(function(el){ return el["x"]; })); min_y = Math.min.apply(Math, _vec.map(function(el){ return el["x"]; })); The mapped version returns the correct result. However the filtered version returns NaN. Breaking it out, stepping through and finally inspecting the results, it would appear that the inner function returns the x property of _vec but the actual array returned from filter is the unfiltered _vec. I believe my usage of filter is correct - can anyone else see my problem?

    Read the article

  • Why doesn't this piece of php code work?

    - by Sam Gabriel
    Hey guys, I have a mysql database which stores an id for each picture, as well as the picture's url and its thumbnail url. the thumbnail url is something like thumbs/pic.jpg and the page I'm creating has the folder thumbs in the same place it is created. But when I run this piece of code, nothing shows up: <?php ini_set('display_errors', 'On'); error_reporting(E_ALL | E_STRICT); mysql_connect("localhost", "***", "***") or die(mysql_error()); mysql_select_db("pics") or die(mysql_error()); $results = mysql_query("select id from classpics") or die(mysql_error()); $data=mysql_fetch_array($results); foreach($data as $uno) { echo '<td valign="middle" align="center"><a class="neutral" href="../images.php?id=' . $uno['id'] . '"><img src="'. $uno['thumbs'].'" border="0" /></a></td>'; } ?>

    Read the article

  • in google analytics, what is 'ga:accountName' for ?

    - by Chez
    In google analytics, what is 'ga:accountName' for ? it might seem like a straightforward question but I can't find anywhere some documentation which tells me what ga:accountName is supposed to return. if I run the google's code from the java example: private static void getAccountFeed(AnalyticsService analyticsService) throws IOException, MalformedURLException, ServiceException { // Construct query from a string. URL queryUrl = new URL( "https://www.google.com/analytics/feeds/accounts/default?max-results=10"); // Make request to the API. AccountFeed accountFeed = analyticsService.getFeed(queryUrl, AccountFeed.class); // Output the data to the screen. System.out.println("-------- Account Feed Results --------"); for (AccountEntry entry : accountFeed.getEntries()) { System.out.println( "\nAccount Name = " + entry.getProperty("ga:accountName") + "\nProfile Name = " + entry.getTitle().getPlainText() + "\nProfile Id = " + entry.getProperty("ga:profileId") + "\nTable Id = " + entry.getTableId().getValue()); } } it does return my website. can anybody help ? thanks

    Read the article

  • Using SQLite from PowerShell on Windows 7x64?

    - by jas
    I'm having a difficult time trying to load System.Data.SQLite.dll from PowerShell in Windows 7 x64. # x64 [void][System.Reflection.Assembly]::LoadFrom("C:\projects\PSScripts\lib\System.Data.SQLite.x64.DLL") # x86 #[void][System.Reflection.Assembly]::LoadFrom("C:\projects\PSScripts\lib\System.Data.SQLite.DLL") $conn = New-Object -TypeName System.Data.SQLite.SQLiteConnection $conn.ConnectionString = "Data Source=C:\temp\PSData.db" $conn.Open() $command = $conn.CreateCommand() $command.CommandText = "select DATETIME('NOW') as now, 'Bar' as Foo" $adapter = New-Object -TypeName System.Data.SQLite.SQLiteDataAdapter $command $dataset = New-Object System.Data.DataSet [void]$adapter.Fill($dataset) Trying to open the connection with the x64 assembly results in: Exception calling "Open" with "0" argument(s): "An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)" Trying to load the x86 assembly results in: Exception calling "LoadFrom" with "1" argument(s): "Could not load file or assembly 'file:///C:\projects\PSScripts\lib\System.Data.SQLite.DLL' or one of its dependencies. An attempt was made to load a program with an incorrect format." Any thoughts or ideas?

    Read the article

< Previous Page | 109 110 111 112 113 114 115 116 117 118 119 120  | Next Page >