Search Results

Search found 359 results on 15 pages for 'fred zimmerman'.

Page 13/15 | < Previous Page | 9 10 11 12 13 14 15  | Next Page >

  • C++ visibility of privately inherited typedefs to nested classes

    - by beldaz
    First time on StackOverflow, so please be tolerant. In the following example (apologies for the length) I have tried to isolate some unexpected behaviour I've encountered when using nested classes within a class that privately inherits from another. I've often seen statements to the effect that there is nothing special about a nested class compared to an unnested class, but in this example one can see that a nested class (at least according to GCC 4.4) can see the public typedefs of a class that is privately inherited by the closing class. I appreciate that typdefs are not the same as member data, but I found this behaviour surprising, and I imagine many others would, too. So my question is threefold: Is this standard behaviour? (a decent explanation of why would be very helpful) Can one expect it to work on most modern compilers (i.e., how portable is it)? #include <iostream> class Base { typedef int priv_t; priv_t priv; public: typedef int pub_t; pub_t pub; Base() : priv(0), pub(1) {} }; class PubDerived : public Base { public: // Not allowed since Base::priv is private // void foo() {std::cout << priv << "\n";} class Nested { // Not allowed since Nested has no access to PubDerived member data // void foo() {std::cout << pub << "\n";} // Not allowed since typedef Base::priv_t is private // void bar() {priv_t x=0; std::cout << x << "\n";} }; }; class PrivDerived : private Base { public: // Allowed since Base::pub is public void foo() {std::cout << pub << "\n";} class Nested { public: // Works (gcc 4.4 - see below) void fred() {pub_t x=0; std::cout << x << "\n";} }; }; int main() { // Not allowed since typedef Base::priv_t private // std::cout << PubDerived::priv_t(0) << "\n"; // Allowed since typedef Base::pub_t is inaccessible std::cout << PubDerived::pub_t(0) << "\n"; // Prints 0 // Not allowed since typedef Base::pub_t is inaccessible //std::cout << PrivDerived::pub_t(0) << "\n"; // Works (gcc 4.4) PrivDerived::Nested o; o.fred(); // Prints 0 return 0; }

    Read the article

  • Linq Distinct on list

    - by BahaiResearch.com
    I have a list like this: List people age name 1 bob 1 sam 7 fred 7 tom 8 sally I need to do a linq query on people and get an int of the number distinct ages (3) int distinctAges = people.SomeLinq(); how? how?

    Read the article

  • Serving wildcard subdomains from the mulitple servers.

    - by user489176
    I have a web application to which I want users to login only through their unique sub-domain (the sub-domain will be chosen at signup). So that I can scale the application across a number of servers, what would be the best way to set up Apache to always serve the same subdomains from the same server? For instance: matt.yyy.com, helen.yyy.com, terry.yyy.com are always served from server with ip of xxx.xxx.xxx.xxx suzi.yyy.com, fred.yyy.com, tom.yyy.com are always served from server with ip of xxx.xxx.xxx.xxx

    Read the article

  • rails multiple outer joins syntax

    - by Craig McGuff
    I have the following models user has_many :leave_balances leave_balance belongs_to :user belongs_to :leave_type leave_type has_many :leave_balances I want to output a table format showing user names and their balance by leave type. Not every user can have every balance i.e. outer joins required. I'd like to see something like this: Employee Annual Leave Sick Leave Bob 10 Fred 9 Sara 12 15 I am unsure how to get this out as a single statement? I am thinking something like User.joins(:leave_balances).joins(:leave_type)

    Read the article

  • how to update only the updated rows in gridview?

    - by user603007
    what is the handiest way to update only the updated rows (only the checkbox column) in this gridview? what is a handy way to check wether the row was updated? c# public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { List<customer> listCustomer = new List<customer>(); customer cust1 = new customer(){name="fred",email="[email protected]",jobless="true"}; customer cust2 = new customer(){name="mark",email="[email protected]",jobless="false"}; listCustomer.Add(cust1); listCustomer.Add(cust2); GridView1.DataSource=listCustomer; GridView1.DataBind(); } } protected void btnUpdate_Click1(object sender, EventArgs e) { foreach (GridViewRow rw in GridView1.Rows) { CheckBox thiscontrol = (CheckBox)rw.Cells[0].FindControl("cb"); var ch = thiscontrol.Checked; //only update the updated rows? } } public class customer { public string name { get; set; } public string email { get; set; } public string jobless { get; set; } } html <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="gridviewUpdate._Default" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> </head> <body> <form id="form1" runat="server"> <div> <asp:GridView ID="GridView1" AutoGenerateColumns="false" runat="server"> <Columns> <asp:TemplateField> <ItemTemplate> <asp:CheckBox ID="jobless" runat="server" Checked='<%# Eval("jobless").ToString().Equals("true") %>' /> </ItemTemplate> </asp:TemplateField> <asp:BoundField DataField="email" /> <asp:BoundField DataField="name" /> </Columns> </asp:GridView> </div>

    Read the article

  • using sed, how to change the text on line seven to read seventh?

    - by Steve
    using sed, how to change the text on line seven to read seventh? Steve Blenheim:238-923-7366:95 Latham Lane, Easton, PA 83755:11/12/56:20300 Betty Boop:245-836-8357:635 Cutesy Lane, Hollywood, CA 91464:6/23/23:14500 Igor Chevsky:385-375-8395:3567 Populus Place, Caldwell, NJ 23875:6/18/68:23400 Norma Corder:397-857-2735:74 Pine Street, Dearborn, MI 23874:3/28/45:245700 Jennifer Cowan:548-834-2348:583 Laurel Ave., Kingsville, TX 83745:10/1/35:58900 Jon DeLoach:408-253-3122:123 Park St., San Jose, CA 04086:7/25/53:85100 Karen Evich:284-758-2857:23 Edgecliff Place, Lincoln, NB 92743:7/25/53:85100 Fred Fardbarkle:674-843-1385:20 Parak Lane, Duluth, MN 23850:4/12/23:780900 Lori Gortz:327-832-5728:3465 Mirlo Street, Peabody, MA 34756:10/2/65:35200 Paco Gutierrez:835-365-1284:454 Easy Street, Decatur, IL 75732:2/28/53:123500 Ephram Hardy:293-259-5395:235 CarltonLane, Joliet, IL 73858:8/12/20:56700

    Read the article

  • Using sed, how to print all lines that match a certain date?

    - by Steve
    Using sed, how to print all lines where the birthdays are in November or December? Assuming input file name "datebook" as follows: Steve Blenheim:238-923-7366:95 Latham Lane, Easton, PA 83755:11/12/56:20300 Betty Boop:245-836-8357:635 Cutesy Lane, Hollywood, CA 91464:6/23/23:14500 Igor Chevsky:385-375-8395:3567 Populus Place, Caldwell, NJ 23875:6/18/68:23400 Karen Evich:284-758-2857:23 Edgecliff Place, Lincoln, NB 92743:7/25/53:85100 Fred Fardbarkle:674-843-1385:20 Parak Lane, Duluth, MN 23850:4/12/23:780900 Lori Gortz:327-832-5728:3465 Mirlo Street, Peabody, MA 34756:10/2/65:35200 Paco Gutierrez:835-365-1284:454 Easy Street, Decatur, IL 75732:2/28/53:123500 Ephram Hardy:293-259-5395:235 CarltonLane, Joliet, IL 73858:8/12/20:56700 ABE LINCOLN:813-555-0123:1549 Cabin Drive, Springfield, IL 61801:2/12/09:79000 James Ikeda:834-938-8376:23445 Aster Ave., Allentown, NJ 83745:12/1/38:45000

    Read the article

  • ArchBeat Link-o-Rama for 2012-09-12

    - by Bob Rhubart
    15 Lessons from 15 Years as a Software Architect | Ingo Rammer In this presentation from the GOTO Conference in Copenhagen, Ingo Rammer shares 15 tips regarding people, complexity and technology that he learned doing software architecture for 15 years. Adding a runtime picker to a taskflow parameter in WebCenter | Yannick Ongena Oracle ACE Yannick Ongena shows how to create an Oracle WebCenter popup to allow users to "select items or do more complex things." Oracle Identity Manager 11g R2 Catalog | Daniel Gralewski Oracle Fusion Middleware A-Team blogger Daniel Gralewski shares a detailed overview of the new Catalog feature, one of the most talked about features in the latest release of Oracle Identity Manager 11g. Cloud API and service designers, stop thinking small | Cloud Computing - InfoWorld "The focus must shift away from fine-grained APIs that provide some type of primitive service, such as pushing data to a block of storage or perhaps making a request to a cloud-rooted database," says InfoWorld's David Linthicum. "To go beyond primitives, you must understand how these services should be used in a much larger architectural context. In other words, you need to understand how businesses will employ these services to form real workplace solutions -- inside and outside the enterprise." Oracle Solaris 8 P2V with Oracle database 10.2 and ASM | Orgad Kimchi Orgad Kimchi's technical post illustrates the migration of "a Solaris 8 physical system, with Oracle database version 10.2.0.5 with ASM file-system located on a SAN storage, into a Solaris 8 branded zone inside a Solaris 10 guest domain on top of a Solaris 11 control domain." Thought for the Day "The hardest single part of building a software system is deciding precisely what to build. " — Fred Brooks Source: SoftwareQuotes.com

    Read the article

  • More productive alone than in a team?

    - by Furry
    If I work alone, I used to be superproductive, if I want to be. Running prototypes within a day, something that you can deploy and use within a few days. Not perfect, but good enough. I also had this experience a few times when working directly with someone else. Everybody could do the whole thing, but it was more fun not to do it alone and also quicker. The right two people can take an admittedly not too large project onto new levels. Now at work we have a seven person team and I do not feel nearly as productive. Not even nearly. Certain stuff needs to be checked against something else, which then needs to also take care of some new requirement, which just came in three days ago. All sorts of stuff, mostly important, but often just a technical debt from long ago or misconception or different vocabulary for the same thing or sometimes just a not too technically thought out great idea from someone who wants to have their say, and so on. Digging down the rabbit hole, I think to myself, I could do larger portions of this work faster alone (and somewhat better, too), but it's not my responsibility (someone else gets paid for that), so by design I should not care. But I do, because certain things go hand in hand (as you may experience it, when you done sideprojects on your own). I know this is something Fred Brooks has written about, but still, what's your strategy for staying as productive as you know you could be in the cubicle? Or did you quit for some related reason; and if so where did you go?

    Read the article

  • Element.appendChild() hosed in IE .. workaround? (related to innerText vs textContent)

    - by Rowe Morehouse
    I've heard that using el.innerText||el.textContent can yield unreliable cross-browswer results, so I'm walking the DOM tree to collect text nodes recursively, and write them into tags in the HTML body. What this script does is read hash substring valus from the window.location and write them into the HTML. This script is working for me in Chrome & Firefox, but choking in IE. I call the page with an URL syntax like this: http://example.com/pagename.html#dyntext=FOO&dynterm=BAR&dynimage=FRED UPDATE UPDATE UPDATE Solution: I moved the scripts to before </body> (where they should have been) then removed console.log(sPageURL); and now it's working in Chrome, Firefox, IE8 and IE9. This my workaround for the innerText vs textContent crossbrowser issue when you are just placing text rather than getting text. In this case, getting hash substring values from the window.location and writing them into the page. <html> <body> <span id="dyntext-span" style="font-weight: bold;"></span><br /> <span id="dynterm-span" style="font-style: italic;"></span><br /> <span id="dynimage-span" style="text-decoration: underline;"></span><br /> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js"></script> <script> $(document).ready(function() { var tags = ["dyntext", "dynterm", "dynimage"]; for (var i = 0; i < tags.length; ++i) { var param = GetURLParameter(tags[i]); if (param) { var dyntext = GetURLParameter('dyntext'); var dynterm = GetURLParameter('dynterm'); var dynimage = GetURLParameter('dynimage'); } } var elem = document.getElementById("dyntext-span"); var text = document.createTextNode(dyntext); elem.appendChild(text); var elem = document.getElementById("dynterm-span"); var text = document.createTextNode(dynterm); elem.appendChild(text); var elem = document.getElementById("dynimage-span"); var text = document.createTextNode(dynimage); elem.appendChild(text); }); function GetURLParameter(sParam) { var sPageURL = window.location.hash.substring(1); var sURLVariables = sPageURL.split('&'); for (var i = 0; i < sURLVariables.length; i++) { var sParameterName = sURLVariables[i].split('='); if (sParameterName[0] == sParam) { return sParameterName[1]; } } } </script> </body> </html> FINAL UPDATE If your hash substring values require spaces (like a linguistic phrase with three words, for example) then separate the words with the + character in your URI, and replace the unicode \u002B character with a space when you create each text node, like this: var elem = document.getElementById("dyntext-span"); var text = document.createTextNode(dyntext.replace(/\u002B/g, " ")); elem.appendChild(text); var elem = document.getElementById("dynterm-span"); var text = document.createTextNode(dynterm.replace(/\u002B/g, " ")); elem.appendChild(text); var elem = document.getElementById("dynimage-span"); var text = document.createTextNode(dynimage.replace(/\u002B/g, " ")); elem.appendChild(text); Now form your URI like this: http://example.com/pagename.html#dyntext=FOO+MAN+CHU&dynterm=BAR+HOPPING&dynimage=FRED+IS+DEAD

    Read the article

  • Java EE @ No Fluff Just Stuff Tour

    - by reza_rahman
    If you work in the US and still don't know what the No Fluff Just Stuff (NFJS) Tour is, you are doing yourself a very serious disfavor. NFJS is by far the cheapest and most effective way to stay up to date through some world class speakers and talks. This is most certainly true for US enterprise Java developers in particular. Following the US cultural tradition of old-fashioned roadshows, NFJS is basically a set program of speakers and topics offered at major US cities year round. Many now famous world class technology speakers can trace their humble roots to NFJS. Via NFJS you basically get to have amazing training without paying for an expensive venue, lodging or travel. The events are usually on the weekends so you don't need to even skip work if you want (a great feature for consultants on tight budgets and deadlines). I am proud to share with you that I recently joined the NFJS troupe. My hope is that this will help solve the lingering problem of effectively spreading the Java EE message here in the US. For NFJS I hope my joining will help beef up perhaps much desired Java content. In any case, simply being accepted into this legendary program is an honor I could have perhaps only dreamed of a few years ago. I am very grateful to Jay Zimmerman for seeing the value in me and the Java EE content. The current speaker line-up consists of the likes of Neal Ford, Venkat Subramaniam, Nathaniel Schutta, Tim Berglund and many other great speakers. I actually had my tour debut on April 4-5 with the NFJS New York Software Symposium - basically a short train commute away from my home office. The show is traditionally one of the smaller ones and it was not that bad for a start. I look forward to doing a few more in the coming months (more on that a bit later). I had four talks back to back (really my most favorite four at the moment). The first one was a talk on JMS 2 - some of you might already know JMS is one of my most favored Java EE APIs. The slides for the talk are posted below: What’s New in Java Message Service 2 from Reza Rahman The next talk I delivered was my Cargo Tracker/Java EE + DDD talk. This talk basically overviews DDD and describes how DDD maps to Java EE using code examples/demos from the Cargo Tracker Java EE Blue Prints project. Applied Domain-Driven Design Blue Prints for Java EE from Reza Rahman The third talk I delivered was our flagship Java EE 7/8 talk. As you may know, currently the talk is basically about Java EE 7. I'll probably slowly evolve this talk to gradually transform it into a Java EE 8 talk as we move forward (I'll blog about that separately shortly). The following is the slide deck for the talk: JavaEE.Next(): Java EE 7, 8, and Beyond from Reza Rahman My last talk for the show was my JavaScript+Java EE 7 talk. This talk is basically about aligning EE 7 with the emerging JavaScript ecosystem (specifically AngularJS). The slide deck for the talk is here: JavaScript/HTML5 Rich Clients Using Java EE 7 from Reza Rahman Unsurprisingly this talk was well-attended. The demo application code is posted on GitHub. The code should be a helpful resource if this development model is something that interests you. Do let me know if you need help with it but the instructions should be fairly self-explanatory. My next NFJS show is the Central Ohio Software Symposium in Columbus on June 6-8 (sorry for the late notice - it's been a really crazy few weeks). Here's my tour schedule so far, I'll keep you up-to-date as the tour goes forward: June 6 - 8, Columbus Ohio. June 24 - 27, Denver Colorado (UberConf) - my most extensive agenda on the tour so far. July 18 - 20, Austin Texas. I hope you'll take this opportunity to get some updates on Java EE as well as the other awesome content on the tour?

    Read the article

  • Mock a Linq to Sql EntityRef using Moq?

    - by Jeremy Holt
    My datacontext contains a table named Userlog with a one to many relationship with table UserProfile. In class UserLog public UserProfile UserProfile { get {return this._UserProfile.Entity;} } In class UserProfile public EntitySet<UserLog> UserLogs { get{return this._UserLogs;} } { set {this._UserLogs.Assign(value); } How would I go about mocking (using Moq) UserLog.UserProfile without changing the autogenerated code? What I would like to do is something like: var mockUserLog = new Mock<UserLog>(); mockUserLog.Setup(c=>c.UserProfile.FirstName).Returns("Fred"); etc I can do this if I go into the designer.cs and make FirstName and UserProfile virtual, however I would like to do this in the partial class. Any ideas? Thanks Jeremy

    Read the article

  • Pass Dictionary of routeValues to ActionLink

    - by Graham
    All, Getting to grips with ASP.NET MVC. So far, so good, but this one is a little nuts. I have a view model that contains a dictionary of attributes for a hyperlink, used like this: menu = model variable Html.ActionLink(Html.Encode(menu.Name), Html.Encode(menu.Action), Html.Encode(menu.Controller), menu.Attributes, null) The problem is the position of "menu.Attributes" expects an object in the form: new { Name = "Fred", Age=24 } From what I can tell, this anonymous object is actually converted to a dictionary via reflection anyway BUT you can't pass a dictionary to it in the first place!!! The Html generated for the link simply shows the dictionary type. How on earth do I get round this? The whole point is that its general and the controller can have set the menu.Attributes previously....

    Read the article

  • Books about the philosophy of software development

    - by anon
    The first time I read The Mythical Man Month, I found the book utterly boring, a waste of my time, and thought it was written by some management guru that never wrote a line of code. A few years later, I realized Fred Brooks won the Turing award. Some years after that, after a few large development projects, I started understanding what he was talking about. Are there any other books about software development on a meta/philosophical level—not in the sense of design patterns, templates, or even lisp macros—but at a level where ideas are expressed without code?

    Read the article

  • SQL Server: SELECT rows with MAX(Column A), MAX(Column B), DISTINCT by related columns

    - by z531
    Scenario: Table A MasterID, Added Date, Added By, Updated Date, Updated By, 1, 1/1/2010, 'Fred', null, null 2, 1/2/2010, 'Barney', 'Mr. Slate', 1/7/2010 3, 1/3/2010, 'Noname', null, null Table B MasterID, Added Date, Added By, Updated Date, Updated By, 1, 1/3/2010, 'Wilma', 'The Great Kazoo', 1/5/2010 2, 1/4/2010, 'Betty', 'Dino', 1/4/2010 Table C MasterID, Added Date, Added By, Updated Date, Updated By, 1, 1/5/2010, 'Pebbles', null, null 2, 1/6/2010, 'BamBam', null, null Table D MasterID, Added Date, Added By, Updated Date, Updated By, 1, 1/2/2010, 'Noname', null, null 3, 1/4/2010, 'Wilma', null, null I need to return the max added date and corresponding user, and max updated date and corresponding user for each distinct record when tables A,B,C&D are UNION'ed, i.e.: 1, 1/5/2010, 'Pebbles', 'The Great Kazoo', 1/5/2010 2, 1/6/2010, 'BamBam', 'Mr. Slate', 1/7/2010 3, 1/4/2010, 'Wilma', null, null I know how to do this with one date/user per row, but with two is beyond me. DBMS is SQL Server 2005. T-SQL solution preferred. Thanks in advance, Dave

    Read the article

  • iPad application submission with iPhone SDK beta 5 rejected

    - by FredM
    I try to send an specific iPad Application to iTunes connect before March 27 and as Apple says: "Only iPad apps compiled with iPhone SDK 3.2 beta 5 will be accepted for this initial review." So I compiled my application with iPhone SDK 3.2 beta 5 with a distribution provisioning profile. But when I upload my application on iTunes Connect, I have the following error: "The binary you uploaded was invalid. A pre-release beta version of the SDK was used to build the application" For sure, it's the beta 5 ! Have you got an idea? Thank you in advance. Fred

    Read the article

  • Multiplication algorithm for abritrary precision (bignum) integers.

    - by nn
    Hi, I'm writing a small bignum library for a homework project. I am to implement Karatsuba multiplication, but before that I would like to write a naive multiplication routine. I'm following a guide written by Paul Zimmerman titled "Modern Computer Arithmetic" which is freely available online. On page 4, there is a description of an algorithm titled BasecaseMultiply which performs gradeschool multiplication. I understand step 2, 3, where B^j is a digit shift of 1, j times. But I don't understand step 1 and 3, where we have A*b_j. How is this multiplication meant to be carried out if the bignum multiplication hasn't been defined yet? Would the operation "*" in this algorithm just be the repeated addition method? Here is the parts I have written thus far. I have unit tested them so they appear to be correct for the most part: The structure I use for my bignum is as follows: #define BIGNUM_DIGITS 2048 typedef uint32_t u_hw; // halfword typedef uint64_t u_w; // word typedef struct { unsigned int sign; // 0 or 1 unsigned int n_digits; u_hw digits[BIGNUM_DIGITS]; } bn; Currently available routines: bn *bn_add(bn *a, bn *b); // returns a+b as a newly allocated bn void bn_lshift(bn *b, int d); // shifts d digits to the left, retains sign int bn_cmp(bn *a, bn *b); // returns 1 if a>b, 0 if a=b, -1 if a<b

    Read the article

  • SQL DISTINCT Value Question

    - by CPOW
    How can I filter my results in a Query? example I have 5 Records John,Smith,apple Jane,Doe,apple Fred,James,apple Bill,evans,orange Willma,Jones,grape Now I want a query that would bring me back 3 records with the DISTINCT FRUIT, BUT... and here is the tricky part, I still want the columns for First Name , Last Name. PS I do not care which of the 3 it returns mind you, but I need it to only return 3 (or what ever how many DISTINCT fruit there are. ex return would be John,Smith,apple Bill,evans,orange Willma,Jones,grape Thanks in advance I've been banging my head on this all day.

    Read the article

  • Selecting the most common value from relation - SQL statement

    - by Ronnie
    I have a table within my database that has many records, some records share the same value for one of the columns. e.g. | id | name | software | ______________________________ | 1 | john | photoshop | | 2 | paul | photoshop | | 3 | gary | textmate | | 4 | ade | fireworks | | 5 | fred | textmate | | 6 | bob | photoshop | I would like to return the value of the most common occurring piece of software, by using an SQL statement. So in the example above the required SQL statement would return 'photoshop' as it occurs more than any other piece of software. Is this possible? Thank you for your time.

    Read the article

  • Custom QGraphicsItems not compiling and gives "object is private" error

    - by bahree
    Hi, I am trying to create a Custom QGraphicsItem button as shown by Fred here. The code which he posted can be found here. The problem is when I try and compile the code I get the following two errors: /usr/include/qt4/QtGui/qgraphicsitem.h ‘QGraphicsItem::QGraphicsItem(const QGraphicsItem&)’ is private /usr/include/qt4/QtCore/qobject.h ‘QObject::QObject(const QObject&)’ is private Here is the code snippet which essentially is the same as that in the sample above. The error is on the class deceleration. class MyButton : public QObject, public QGraphicsItem { Q_OBJECT Q_INTERFACES(QGraphicsItem) public: MyButton(QGraphicsItem *parent = 0); MyButton(const QString normal, const QString pressed = "", QGraphicsItem *parent = 0); .... } Interestingly the other sample as shown here works fine. The sample code for that can be found here. Any idea what is wrong? Thanks in advance.

    Read the article

  • LINQ OrderBy with more than one field

    - by brainimus
    I have a list that I need sorted by two fields. I've tried using OrderBy in LINQ but that only allows me to specify one field. I'm looking for the list to be sorted by the first field and then if there are any duplicates in the first field to sort by the second field. For example I want the results to look like this (sorted by last name then first name). Adams, John Smith, James Smith, Peter Thompson, Fred I've seen that you can use the SQL like syntax to accomplish this but I am looking for a way to do it with the OrderBy method. IList<Person> listOfPeople = /*The list is filled somehow.*/ IEnumerable<Person> sortedListOfPeople = listOfPeople.OrderBy(aPerson => aPerson.LastName, aPerson.FirstName); //This doesn't work.

    Read the article

  • How default assignment operator works in struct?

    - by skydoor
    Suppose I have a structure in C++ containing a name and a number, e.g. struct person { char name[20]; int ssn; }; Suppose I declare two person variables: person a; person b; where a.name = "George", a.ssn = 1, and b.name = "Fred" and b.ssn = 2. Suppose later in the code a = b; printf("%s %d\n",a.name, a.ssn);

    Read the article

  • How can I concatinate a subquery result field into the parent query?

    - by Pure.Krome
    Hi folks, DB: Sql Server 2008. I have a really (fake) groovy query like this:- SELECT CarId, NumberPlate (SELECT Owner FROM Owners b WHERE b.CarId = a.CarId) AS Owners FROM Cars a ORDER BY NumberPlate And this is what I'm trying to get... => 1 ABC123 John, Jill, Jane => 2 XYZ123 Fred => 3 SOHOT Jon Skeet, ScottGu So, i tried using AS [Text()] ... FOR XML PATH('') but that was inlcuding weird encoded characters (eg. carriage return). ... so i'm not 100% happy with that. I also tried to see if there's a COALESCE solution, but all my attempts failed. So - any suggestions?

    Read the article

  • Custom QGraphicsItems not compiling and give object is is private error

    - by bahree
    Hi, I am trying to create a Custom QGraphicsItem button as shown by Fred here. The code which he posted can be found here. The problem is when I try and compile the code I get the following two errors: /usr/include/qt4/QtGui/qgraphicsitem.h ‘QGraphicsItem::QGraphicsItem(const QGraphicsItem&)’ is private /usr/include/qt4/QtCore/qobject.h ‘QObject::QObject(const QObject&)’ is private Here is the code snippet which essentially is the same as that in the sample above. The error is on the class deceleration. class MyButton : public QObject, public QGraphicsItem { Q_OBJECT Q_INTERFACES(QGraphicsItem) public: MyButton(QGraphicsItem *parent = 0); MyButton(const QString normal, const QString pressed = "", QGraphicsItem *parent = 0); .... } Interestingly the other sample as shown here works fine. The sample code for that can be found here. Any idea what is wrong? Thanks in advance.

    Read the article

  • XPath: How to check multiple attributes across similar nodes

    - by Justin
    Hi, If I have some xml like: <root> <customers> <customer firstname="Joe" lastname="Bloggs" description="Member of the Bloggs family"/> <customer firstname="Joe" lastname="Soap" description="Member of the Soap family"/> <customer firstname="Fred" lastname="Bloggs" description="Member of the Bloggs family"/> <customer firstname="Jane" lastname="Bloggs" description="Is a member of the Bloggs family"/> </customers> </root> How do I get, in pure XPath - not XSLT - an xpath expression that detects rows where lastname is the same, but has a different description? So it would pull the last node above? Thanks a mill if you can help, been scratching at it for ages, and I can't find it by searching (apologies if it is) Cheers, J

    Read the article

< Previous Page | 9 10 11 12 13 14 15  | Next Page >