Search Results

Search found 5942 results on 238 pages for 'total starnger'.

Page 97/238 | < Previous Page | 93 94 95 96 97 98 99 100 101 102 103 104  | Next Page >

  • Linq Aggregate on object and List

    - by Kris-I
    I do this query with NHibernate: var test = _session.CreateCriteria(typeof(Estimation)) .SetFetchMode("EstimationItems", FetchMode.Eager) .List(); An "Estimation" can have several "EstimationItems" (Quantity, Price and ProductId) I'd like a list of "Estimation" with these constraints : One line by "Estimation" code on the picture (ex : 2011/0001 and 2011/0003) By estimation (means on each line) the number of "EstimationItems" By Estimation (means on each line) the total price (Quantity * Price) for each "EstimationItems" I hope the structure will be clearer with the picture below. Thanks,

    Read the article

  • Definition of Connect, Processing, Waiting in apache bench.

    - by rpatel
    When I run apache bench I get results like: Command: abs.exe -v 3 -n 10 -c 1 https://mysite Connection Times (ms) min mean[+/-sd] median max Connect: 203 213 8.1 219 219 Processing: 78 177 88.1 172 359 Waiting: 78 169 84.6 156 344 Total: 281 389 86.7 391 563 I can't seem to find the definition of Connect, Processing and Waiting. What do those numbers mean?

    Read the article

  • Need help with basic optimization problem

    - by ??iu
    I know little of optimization problems, so hopefully this will be didactic for me: rotors = [1, 2, 3, 4...] widgets = ['a', 'b', 'c', 'd' ...] assert len(rotors) == len(widgets) part_values = [ (1, 'a', 34), (1, 'b', 26), (1, 'c', 11), (1, 'd', 8), (2, 'a', 5), (2, 'b', 17), .... ] Given a fixed number of widgets and a fixed number of rotors, how can you get a series of widget-rotor pairs that maximizes the total value where each widget and rotor can only be used once?

    Read the article

  • How do i know if this is random enough?

    - by David
    I wrote a program in java that rolls a die and records the total number of times each value 1-6 is rolled. I rolled 6 Million times. Here's the distribution: #of 0's: 0 #of 1's: 1000068 #of 2's: 999375 #of 3's: 999525 #of 4's: 1001486 #of 5's: 1000059 #of 6's: 999487 (0 wasn't an option.) Is this distribution consistant with random dice rolls? What objective statistical tests might confirm that the dice rolls are indeed random enough?

    Read the article

  • How do you override ProgramFilesFolder in an msi?

    - by Mark
    I have an msi file that I am trying to install in a place other than C:\Program Files. The directory table shows that ProgramFilesFolder is used as the default install directory. From reading this blog post I understand that ProgramFilesFolder is a standard directory so passing TARGETDIR as a property to the installer will not change the install location even through the directory table has it as the parent of ProgramFilesFolder. How can I override the install location? I am a total novice in this area.

    Read the article

  • Output something other than True or False

    - by David
    Newb to JS. Trying to determain how to to output something other than Question 1 is True and False. If I understand this correctly, the output is the expression of the flag True or False. Trying to change to say Correct and Incorrect. Also trying to express a percentage of correct instead of the for example: Your total score is 10/100 $(function(){ var jQuiz = { answers: { q1: 'd', q2: 'd', }, questionLenght: 2, checkAnswers: function() { var arr = this.answers; var ans = this.userAnswers; var resultArr = [] for (var p in ans) { var x = parseInt(p) + 1; var key = 'q' + x; var flag = false; if (ans[p] == 'q' + x + '-' + arr[key]) { flag = true; g } else { flag = false; } resultArr.push(flag); } return resultArr; }, init: function(){ $("[class=btnNext]").click(function(){ if ($('input[type=radio]:checked:visible').length == 0) { return incorrect ; } $(this).parents('.questionContainer').fadeOut(500, function(){ $(this).next().fadeIn(500); }); var el = $('#progress'); el.width(el.width() + 11 + 'px'); }); $('.btnPrev').click(function(){ $(this).parents('.questionContainer').fadeOut(500, function(){ $(this).prev().fadeIn(500) }); var el = $('#progress'); el.width(el.width() - 11 + 'px'); }) $("[class=btnShowResult]").click(function(){ var arr = $('input[type=radio]:checked'); var ans = jQuiz.userAnswers = []; for (var i = 0, ii = arr.length; i < ii; i++) { ans.push(arr[i].getAttribute('id')) } }) $('.btnShowResult').click(function(){ $('#progress').width(260); $('#progressKeeper').hide(); var results = jQuiz.checkAnswers(); var resultSet = ''; var trueCount = 0; for (var i = 0, ii = results.length; i < ii; i++){ if (results[i] == true) trueCount++; resultSet += '<div> Question ' + (i + 1) + ' is ' + results[i] + '</div>' } resultSet += '<div class="totalScore">Your total score is ' + trueCount * 4 + ' / 100</div>' $('#resultKeeper').html(resultSet).show(); }) } }; jQuiz.init(); })

    Read the article

  • Oracle: What does `(+)` do in a WHERE clause?

    - by Jonathan Lonowski
    Found the following in an Oracle-based application that we're migrating (generalized): SELECT Table1.Category1, Table1.Category2, count(*) as Total, count(Tab2.Stat) AS Stat FROM Table1, Table2 WHERE (Table1.PrimaryKey = Table2.ForeignKey(+)) GROUP BY Table1.Category1, Table1.Category2 What does (+) do in a WHERE clause? I've never seen it used like that before.

    Read the article

  • Dmbedded couchDB

    - by Chang
    CouchDB is great, I like its replication functionality, but it's a bit larger and slower when used in desktop application. As I tested in intel duo core cpu, 12 seconds to load 10000 docs 10 seconds to insert 10000 doc, but need 20 seconds to update view, so total is 30 seconds Is there any No SQL implementation which has the same replication functionality, but the size is very small, and the speed is quite good( 1 second to load 10000 docs). Thanks

    Read the article

  • How to get unique values when using a UNION mysql query

    - by Roland
    I have 2 sql queries that return results, both contain a contract number, now I want to get the unique values of contract numbers HEre's the query (SELECT contractno, dsignoff FROM campaigns WHERE clientid = 20010490 AND contractno != '' GROUP BY contractno,dsignoff) UNION (SELECT id AS contractno,signoffdate AS dsignoff FROM contract_details WHERE clientid = 20010490) So for example, if the first query before the union returns two results with contract no 10, and the sql query after the union also returns 10, then we have 3 rows in total, however because contractno of all three rows is 10, I need to have only one row returned, Is this possible?

    Read the article

  • How do I get only two form fields to show instead of all 5 on initial page load? CSS

    - by marcamillion
    Here is the implementation: http://jsfiddle.net/AdQfB/2/ If you notice, when you click 'Login' or 'Register' before entering anything, you should see a few fields disappear and re-appear respectively. I would like for this page to display the view of just the two fields on the first load (rather than the current 5 it shows on first load), then when the user clicks the 'register' link, it shows the other 3 - for a total of 5. How do I do that? Thanks

    Read the article

  • How to time Java program execution speed

    - by George Mic
    Sorry if this sounds like a dumb question but how do you time the execution of a java program? I'm not sure what class I should use to do this. I'm kinda looking for something like: //Some timer starts here for (int i = 0; i < length; i++) { // Do something } //End timer here System.out.println("Total execution time: " + totalExecutionTime); Thanks

    Read the article

  • Combining multiple queries in one in Access

    - by Arlen Beiler
    I have two queries that I want to combine into one in Microsoft Access 2003. SELECT AttendanceQuery.AttendDate, Count(*) AS Absent FROM AttendanceQuery WHERE (((AttendanceQuery.Present)=False)) GROUP BY AttendanceQuery.AttendDate; SELECT AttendanceQuery.AttendDate, Count(*) AS Enrollment FROM AttendanceQuery GROUP BY AttendanceQuery.AttendDate; The one shows the total records for each date, the other shows the ones that are marked absent.

    Read the article

  • WCF: intercept message send/receive progress in client

    - by Cullen Tsering
    Hello gurus, I have a desktop application sending/receiving messages (not files) to/from a WCF service. How do I intercept the total size of the message to be transferred and receive feedback (number of bytes transferred) during the transmission so a progress bar maybe displayed to the desktop app user? How many approaches are there? What is the best one given my application scenario? Any comments or suggestions will be greatly appreciated, Cullen

    Read the article

  • Generating report with MySQL and Rails - how?

    - by Arywista
    Here is my data model from my application: id :integer(4) not null, primary key spam :boolean(1) not null duplicate :boolean(1) not null ignore :boolean(1) not null brand_id :integer(4) not null attitude :string not null posted_at :datetime not null Attitude could have 3 states: negative, positive, neutral. I want to generate resultset in table, this way, for each day between start and end date: date | total | positive | neutral | negative 2009-10-10 | 12 | 4 | 7 | 1 (...) 2009-10-30 | 5 | 2 | 1 | 1 And ignore all records which have: duplicate = true ignore = true spam = true How it's could be done?

    Read the article

  • Incorrect syntax near the keyword 'select' while execuing query

    - by sam
    I am getting Incorrect syntax near the keyword 'select' after executing the following code. declare @c int SELECT @c = COUNT(*) FROM (select id, max(date_stored) from table B INNER JOIN table P ON B.id = P.id where id = 3) select @c I want to select total no of records having max stored dates in database. Can any one plz tell what I am doing wrong

    Read the article

  • Sorted sets and comparators

    - by Jack
    Hello, I'm working with a TreeSetthat is meant to store pathfind locations used during the execution of a A* algorithm. Basically until there are "open" elements (still to be exhaustively visited) the neighbours of every open element are taken into consideration and added to a SortedSetthat keeps them ordered by their cost and heuristic cost. This means that I have a class like: public class PathTileInfo implements Comparable<PathTileInfo> { int cost; int hCost; final int x, y; @Override public int compareTo(PathTileInfo t2) { int c = cost + hCost; int c2 = t2.cost + t2.hCost; int costComp = c < c2 ? -1 : (c > c2 ? 1: 0); return costComp != 0 ? costComp : (x < t2.x || y < t2.y ? -1 : (x > t2.x || y > t2.y ? 1 : 0)); } @Override public boolean equals(Object o2) { if (o2 instanceof PathTileInfo) { PathTileInfo i = (PathTileInfo)o2; return i.cost + i.hCost == cost + hCost && x == i.x && y == i.y; } return false; } } In this way first the total cost is considered, then, since a total ordering is needed (consistency with equals) a ordering according to the x,y coordinate is taken into account. This should work but simply it doesn't, if I iterate over the TreeSet during the algorithm execution like in for (PathTileInfo t : openSet) System.out.print("("+t.x+","+t.y+","+(t.cost+t.hCost)+") "); I get results in which the right ordering is not kept, eg: (7,7,6) (7,6,7) (6,8,6) (6,6,7) (5,8,7) (5,7,7) (6,7,6) (6,6,7) (6,5,7) (5,7,7) (5,5,8) (4,7,7) (4,6,8) (4,5,8) is there something subtle I am missing? Thanks!

    Read the article

  • Table for each region in MySQL

    - by King Wu
    There are four regions with more than one million records total. Should I create a table with a region column or a table for each region and combine them to get the top ranks? If I combine all four regions, none of my columns will be unique so I will need to also add an id column for my primary key. Otherwise, name, accountId & characterId would be candidate keys or should I just add an id column anyways. Table: ---------------------------------------------------------------- | name | accountId | iconId | level | characterId | updateDate | ----------------------------------------------------------------

    Read the article

  • Converting SQL Query to LINQ 2 SQL expression

    - by Shyju
    How can i rewrite the below SQL query to its equivalent LINQ 2 SQL expression (both in C# and VB.NET) SELECT t1.itemnmbr, t1.locncode,t1.bin,t2.Total FROM IV00200 t1 (NOLOCK) INNER JOIN IV00112 t2 (NOLOCK) ON t1.itemnmbr = t2.itemnmbr AND t1.bin = t2.bin AND t1.bin = 'MU7I336A80'

    Read the article

< Previous Page | 93 94 95 96 97 98 99 100 101 102 103 104  | Next Page >