Search Results

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

Page 241/556 | < Previous Page | 237 238 239 240 241 242 243 244 245 246 247 248  | Next Page >

  • How to get only one record for each duplicate rows of the id in oracle?

    - by Psychocryo
    suppose i have this table: group_id | image | image_id | ----------------------------- 23 blob 1 23 blob 2 23 blob 3 21 blob 4 21 blob 5 25 blob 6 25 blob 7 how to get results of only 1 of each group id? in this case,there may be multiple images for one group id, i just want one result of each group_id i tried distinct but i will only get group_id. max for image also would not work.

    Read the article

  • Network bandwidth bottleneck for sorting of mapreduce intermediate keys?

    - by Zubair
    I have been learning the mapreduce algorithm and how it can potentially scale to millions of machines, but I don't understand how the sorting of the intermediate keys after the map phase can scale, as there will be: 1,000,000 x 1,000,000 : potential machines communicating small key / value pairs of the intermediate results with each other? Isn't this a bottleneck?

    Read the article

  • jQuery .eq(x) returns different element in IE than in FF/Chrome

    - by bt
    I am using the .eq() method to select a specific child element of a known element. It appears that the element indices are different in IE and in Chrome/FF, as .eq(2) returns different values depending on browser. (The element I'm looking for shows up as .eq(2) in FF/Chrome, but .eq(3) in IE) For example, alert($(this).parent().children().eq(2).text()); shows different results depending on the browser. Is there a better way of doing this?

    Read the article

  • How to create layout-small-land folder?

    - by codedeziner
    I want to create separate folders for my layouts, like this in my resource directory: layout-land layout-port this is ok, but this: layout-small-land layout-small-port or layout-land-small layout-port-small Results in: 'Invalid resource directory name' What gives?

    Read the article

  • Using LINQ, how do you get all label controls.

    - by John
    I want to get a collection of all label controls that are part of a user control. I have the following code: var labelControls = from Control ctl in this.Controls where ctl.GetType() == typeof(Label) select ctl; but the result is zero results. Please assist. Thanks.

    Read the article

  • Openquery - unable to begin a distrubuted transaction

    - by dc2
    I am trying to use open query to run a stored procedure in a remote database, and insert it into a table in my local database: -- this works exec remotesvr.sys.dbo.golden_table 'some', 'parameters' While the above works out, I try the following: insert into my_local_table exec remotesvr.sys.dbo.golden_table 'some', 'parameters' I get a SQL error to the effect of 'unable to begin a distributed transaction'. Is there any way around this?, i.e. can I execute take the results of a remote stored procedure and put its contents in a local table?

    Read the article

  • hashmap and list compare

    - by sarah
    Hi, I have a hashmap having four values a,b,c,d and list having only a i want to see if the hashmap has the value a and print it. hashmap.get('data') results a,b,c,d list l is having a how will i print only the value a

    Read the article

  • MySQL: Query Cacheing (How do I use memcache?)

    - by Rachel
    I have an query like: SELECT id as OfferId FROM offers WHERE concat(partycode, connectioncode) = ? AND CURDATE() BETWEEN offer_start_date AND offer_end_date AND id IN ("121211, 123341,151512,5145626 "); Now I want to cache the results of this query using memcache and so my question is How can I cache an query using memcache. I am currently using CURDATE() which cannot be used if we want to implement caching and so how can I get current date functionality without using CURDATE() function ?

    Read the article

  • Is there memory usage profiler available?

    - by prosseek
    For time profiler for XYZ, I can just run 'time XYZ', or if I have the source code in C/C++, I even can use gprof to get profiled results. Is there any similar tool for memory usage? Is there any tool I can use something like 'memory XYZ', to get info such as min/max/median memory usage? What tool do you use for memory profile with C++/Objective C/C#/Java?

    Read the article

  • Is it possible to have variable find conditions for both the key and value?

    - by DarrenD
    I'm trying to pass in both the field and the value in a find call: @employee = Employee.find(:all, :conditions => [ '? = ?', params[:key], params[:value].to_i) The output is SELECT * FROM `employees` WHERE ('is_manager' = 1) Which returns no results, however when I try this directly in mysqsl using the same call without the '' around is_manager, it works fine. How do I convert my params[:key] value to a symbol so that the resulting SQL call looks like: SELECT * FROM `employees` WHERE (is_manager = 1) Thanks, D

    Read the article

  • Returning binomal as a tuple

    - by Mike
    I want to save the results of my function binomal_aux to a tuple but I don't have an idea how to, here is my code I have right now. def binomal (n): i=0 for i in range(n): binomal_aux(n,i) #want this to be in a tuple so, binomal (2) = (1,2,1) return def binomal_aux (n,k): if (k==0): return 1 elif (n==k): return 1 else: return (binomal_aux(n-1,k) + binomal_aux(n-1,k-1))

    Read the article

  • VS2005: two projects doing identical tasks but with different result

    - by Craig Johnston
    In VS2005 I have multi-project solution. Two of the projects use an external set of DLLs to create a report, using report definition data taken from an SQL Server. One of the projects creates the report just fine, but the other project results in an Exception. I have checked that the projects are referencing the same versions of the all the DLLs and they appear to be identical. What could the cause of this problem?

    Read the article

  • c++: see compiled object layout

    - by horsthahn
    Hi, is there a way - much like the way i can see the result of preprocessing when using 'gcc -E' - to see what my objects look like once the compiler compiled them into object files? I am not too good in reading assembler, so an advice to get the results as text would be nice .. or at least a little 'howto read the constructor intructions' or 'howto find the constructor' ... I am talking about gcc/g++, but a solution including msvc would be fine. Thanks!

    Read the article

  • C# Reading a file and writing out replacing string

    - by Mike
    What I have is a C# windows app that reads a bunch of SQL tables and creates a bunch of queries based on the results. What I'm having a small issue with is the final "," on my query This is what I have ColumnX, from I need to read the entire file, write out exactly what is in the file and just replace the last , before the from with nothing. I tried .replace(@",\n\nfrom),(@"\n\nfrom) but it's not finding it. Any help is appreciated. Example: ColumnX, from Result: ColumnX from

    Read the article

  • T-SQL Query to Get SUM(COUNT())

    - by Ted
    Hi, I am planning to get a report for a table with following table structure: ID RequestDate ----------------------------- 1 2010/01/01 2 2010/02/14 3 2010/03/20 4 2010/01/07 5 2009/03/31 I want the results as: I D_Count RequestDate Sum ----------------------------------------- 2 2010/01 2 1 2010/02 3 2 2010/03 5 Pls help.

    Read the article

  • jquery Hover and while loop

    - by DragoN
    i have a table of php with while loop to show the records i added a jquery hover to do that : if hovered it show a message in same row but the problem is : if hover it show a message in all rows here is css: <style> .tansa{ position: absolute; margin-right: -60px; margin-top:-25px; background: #CBDFF3; border: 1px solid #4081C3; font-size: 0.88em; padding: 2px 7px; display: inline-block; border-radius: 8px; -moz-border-radius: 8px; -webkit-border-radius: 8px; line-height: 1.2em; text-shadow: 0 0 0em #FFF; overflow: hidden; text-align: center; color:black; display:none; } .arrow{ position: relative; width: 0; height: 0; top: -25px; border-top: 5px solid #000000; border-right: 5px solid transparent; border-left: 5px solid transparent; display:none; } </style> here is my php : <table><tr>row</tr> <?php $results = mysql_query("select * from MyTable"); while{$r = mysql_fetch_array($results)){ echo "<tr><td>Row : <img src='img/tans.png' width='24' height='24' class='tansef' /><span class='tansa' >the message</span><div class='arrow'></div></td></tr>"; } ?> </table> here is jquery $(document).ready(function(){ $('.tansef').hover(function(){ var sh = $('.tansa'); var sharrow = $('.arrow'); sh.show(); sharrow.show(); },function(){ var shs = $('.tansa'); var sharrows = $('.arrow'); shs.hide(); sharrows.hide(); }); }); any solution to show the message in each row only

    Read the article

  • SELECT DISTINCT multiple field search?

    - by Patrick
    I'm trying to search multiple fields zc_city and zc_zip for when user input and then return row results for zc_city zc_state and zc_zip $q = strtolower($_GET["q"]); if (!$q) return; $sql = "SELECT DISTINCT zc_city AS zcity FROM search_zipcodes WHERE zc_city LIKE '$q%'"; $rsd = mysql_query($sql); while($rs = mysql_fetch_array($rsd)) { $zcity = $rs['zcity']; echo "$zcity\n"; }

    Read the article

  • PHP/MySQL Interview - How would you have answered?

    - by martincarlin87
    I was asked this interview question so thought I would post it here to see how other users would answer: Please write some code which connects to a MySQL database (any host/user/pass), retrieves the current date & time from the database, compares it to the current date & time on the local server (i.e. where the application is running), and reports on the difference. The reporting aspect should be a simple HTML page, so that in theory this script can be put on a web server, set to point to a particular database server, and it would tell us whether the two servers’ times are in sync (or close to being in sync). This is what I put: // Connect to database server $dbhost = 'localhost'; $dbuser = 'xxx'; $dbpass = 'xxx'; $dbname = 'xxx'; $conn = mysql_connect($dbhost, $dbuser, $dbpass) or die (mysql_error()); // Select database mysql_select_db($dbname) or die(mysql_error()); // Retrieve the current time from the database server $sql = 'SELECT NOW() AS db_server_time'; // Execute the query $result = mysql_query($sql) or die(mysql_error()); // Since query has now completed, get the time of the web server $php_server_time = date("Y-m-d h:m:s"); // Store query results in an array $row = mysql_fetch_array($result); // Retrieve time result from the array $db_server_time = $row['db_server_time']; echo $db_server_time . '<br />'; echo $php_server_time; if ($php_server_time != $db_server_time) { // Server times are not identical echo '<p>Database server and web server are not in sync!</p>'; // Convert the time stamps into seconds since 01/01/1970 $php_seconds = strtotime($php_server_time); $sql_seconds = strtotime($db_server_time); // Subtract smaller number from biggest number to avoid getting a negative result if ($php_seconds > $sql_seconds) { $time_difference = $php_seconds - $sql_seconds; } else { $time_difference = $sql_seconds - $php_seconds; } // convert the time difference in seconds to a formatted string displaying hours, minutes and seconds $nice_time_difference = gmdate("H:i:s", $time_difference); echo '<p>Time difference between the servers is ' . $nice_time_difference; } else { // Timestamps are exactly the same echo '<p>Database server and web server are in sync with each other!</p>'; } Yes, I know that I have used the deprecated mysql_* functions but that aside, how would you have answered, i.e. what changes would you make and why? Are there any factors I have omitted which I should take into consideration? The interesting thing is that my results always seem to be an exact number of minutes apart when executed on my hosting account: 2012-12-06 11:47:07 2012-12-06 11:12:07

    Read the article

  • CVS Diff to output only modified files?

    - by Somebody still uses you MS-DOS
    Is it possible? Run a cvs diff in terminal at the project root that outputs only modified files (like local files that aren't in source control and local modified files). I'm running cvs diff --brief but I still have too many results since my project is large, and with a lot of subdirectories - it shows the whole hierarchy and I just want to know which files are different from HEAD revision. I'm using Linux.

    Read the article

  • Order a foreach, by the value of a calculation of values in the array

    - by Mark
    I have an array as follows: $players = array( $player = array( 'name' => 'playername', 'speed' => '10', 'agility' => '10', 'influence' => '10' ) etc Then I calculate a $score, based on the sum of speed, agility and influence. $score = $p['speed'] + $p['agility'] + $p['influence']; How can I loop through my array, but order the results from highest to lowest $score? PS- http://pastebin.com/eUEQ5y4u

    Read the article

< Previous Page | 237 238 239 240 241 242 243 244 245 246 247 248  | Next Page >