Source

stacky / trunk / data / posts-Glr7PfFhvwmNipNEtAt7fg+nvw=.txt

Full commit
https://api.stackexchange.com/2.0/posts?order=desc&sort=activity&site=stackoverflow
{"items":[{"post_id":8468508,"post_type":"answer","body":"<p>You can place variables into a string with <code>stringWithFormat:</code>.  In your case, the following would work:</p>\n\n<pre><code>NSString *html = [webView stringByEvaluatingJavaScriptFromString:[NSString stringWithFormat:@\"document.DetailView.innerHTML; document.getElementsByName('user_name')[0].value = '%@'; document.getElementsByName('user_password')[0].value = 'somevar'; document.DetailView.submit();\" , txtField.text]];\n</code></pre>\n\n<p>There is an additional bug in your code in that you don't properly encode the text field value - consider what would happen if the user entered an apostrophe.</p>\n\n<p>However building up JavaScript in this way isn't a great approach.  Consider factoring out the JavaScript into an external JavaScript file - this will make it much easier to read and write.</p>\n","owner":{"user_id":8427,"display_name":"Jim","reputation":13947,"user_type":"registered","profile_image":"http://www.gravatar.com/avatar/1204ff2c65e274123328b48072686bb4?d=identicon&r=PG","link":"http://stackoverflow.com/users/8427/jim"},"creation_date":1323647863,"last_activity_date":1323647863,"score":0,"up_vote_count":0,"down_vote_count":0},{"post_id":8468460,"post_type":"question","body":"<p>Starting off I have UTFS. </p>\n\n<p>Trying to insert a variable in the middle of string to populate a web view form without using a string by append and making the code huge.  My current code is</p>\n\n<blockquote>\n  <p>NSString *html = [webView stringByEvaluatingJavaScriptFromString:@\" document.DetailView.innerHTML;\"   @\"document.getElementsByName('user_name')[0].value = 'somuser';\"\n                         @\"document.getElementsByName('user_password')[0].value = 'somevar';\" \n                        @\"document.DetailView.submit();\" ]</p>\n</blockquote>\n\n<p>I have tried </p>\n\n<blockquote>\n  <p>NSString *html = [webView stringByEvaluatingJavaScriptFromString:@\" document.DetailView.innerHTML;\"   @\"document.getElementsByName('user_name')[0].value = '%@';\"\n                         @\"document.getElementsByName('user_password')[0].value = 'somevar';\" \n                        @\"document.DetailView.submit();\" , txtField.text];</p>\n</blockquote>\n\n<p>But it throws me a build error(specifically it's looking for \"]\").  I'm guessing I will have to slowly build the string using stringbyappend but i'm hoping for a little luck that someone will have encountered this or have a workaround for it.  This seemed so simple in c#.   </p>\n","owner":{"user_id":1092834,"display_name":"user1092834","reputation":1,"user_type":"registered","profile_image":"http://www.gravatar.com/avatar/8686c23d5d10346120e3c287ded9422b?d=identicon&r=PG","link":"http://stackoverflow.com/users/1092834/user1092834"},"creation_date":1323647278,"last_activity_date":1323647863,"score":0,"up_vote_count":0,"down_vote_count":0},{"post_id":8468492,"post_type":"question","body":"<p>Suppose a remote SVN repository has this structure:</p>\n\n<pre><code>/project\n        /src\n        /bulk\n</code></pre>\n\n<p>Now for some reason I already have a copy of <code>bulk</code> (assumed unchanging) elsewhere on my machine. Can I somehow checkout a new copy of the repository, but pre-provide the <code>bulk</code> directory so it doesn't get downloaded again?</p>\n","owner":{"user_id":596781,"display_name":"Kerrek SB","reputation":41850,"user_type":"registered","profile_image":"http://www.gravatar.com/avatar/a18405dd4b022837867d1f5453a05f41?d=identicon&r=PG","link":"http://stackoverflow.com/users/596781/kerrek-sb"},"creation_date":1323647669,"last_activity_date":1323647859,"last_edit_date":1323647799,"score":0,"up_vote_count":0,"down_vote_count":0,"comments":[{"comment_id":10473563,"post_id":8468492,"creation_date":1323647868,"edited":false,"body":"I don&#39;t think so but more importantly that leads to the problem that your svn repo is no longer authoritative. In addition what about others (including your future self - on another machine) who don&#39;t have the now magic bulk.","owner":{"user_id":294966,"display_name":"Steve Robillard","reputation":1270,"user_type":"registered","profile_image":"http://www.gravatar.com/avatar/22691c0615b6fd46e55c34fa53e1100d?d=identicon&r=PG","link":"http://stackoverflow.com/users/294966/steve-robillard"}}]},{"post_id":8468507,"post_type":"answer","body":"<p>how about creating the project directory manually, copying your current bulk checkout into it, and the just doing a checkout on the src directory, specifying the project directory as the location?</p>\n","owner":{"user_id":49241,"display_name":"Adam Ralph","reputation":9919,"user_type":"registered","profile_image":"http://www.gravatar.com/avatar/78e6cdb8bf24413c4576e496e4d05fce?d=identicon&r=PG","link":"http://stackoverflow.com/users/49241/adam-ralph"},"creation_date":1323647859,"last_activity_date":1323647859,"score":0,"up_vote_count":0,"down_vote_count":0},{"post_id":8468506,"post_type":"answer","body":"<p>If you want know if a browser support AJAX, you need know the capabilities of the browser, you need this project:</p>\n\n<p><a href=\"https://github.com/clement/django-wurfl/\" rel=\"nofollow\">https://github.com/clement/django-wurfl/</a></p>\n","owner":{"user_id":1073310,"display_name":"Goin","reputation":171,"user_type":"registered","profile_image":"http://www.gravatar.com/avatar/9fc6a3b29ee5d37430bc7c4653819bbe?d=identicon&r=PG","link":"http://stackoverflow.com/users/1073310/goin"},"creation_date":1323647856,"last_activity_date":1323647856,"score":0,"up_vote_count":0,"down_vote_count":0},{"post_id":8468427,"post_type":"question","body":"<p>In my Django application I would like to know if the browser the client is using has AJAX or not. This is because I have, for example, profile editing. I have a version that edits the user's profile in-place and another one that redirects you to an edit page.</p>\n\n<p>I know that most browsers have AJAX nowadays, but just to make sure, how can I check that in a Django application?</p>\n\n<p>Thank you</p>\n","owner":{"user_id":1034697,"display_name":"Vasco Patricio","reputation":38,"user_type":"registered","profile_image":"http://www.gravatar.com/avatar/6f35989a83e850733118c453d56a369e?d=identicon&r=PG","link":"http://stackoverflow.com/users/1034697/vasco-patricio"},"creation_date":1323646693,"last_activity_date":1323647856,"score":1,"up_vote_count":1,"down_vote_count":0},{"post_id":8463531,"post_type":"question","body":"<p>I have a Maven build which uses maven-modello (1.4) to generate Java classes/XSD's etc. from an description file (modello file). I'm searching for a possible solution in Gradle to solve the same problem.</p>\n","owner":{"user_id":296328,"display_name":"khmarbaise","reputation":6235,"user_type":"registered","profile_image":"http://www.gravatar.com/avatar/74bd2ca9704f8118877a9d2c880dadf0?d=identicon&r=PG","link":"http://stackoverflow.com/users/296328/khmarbaise"},"creation_date":1323602422,"last_activity_date":1323647856,"last_edit_date":1323647856,"score":0,"up_vote_count":0,"down_vote_count":0},{"post_id":4065595,"post_type":"question","body":"<p>Listed below is my program. I'm supposed to take two cards of both the dealer and player and evaluate who has the higher card. The player bets a certain amount of cash against that bet, and of course, if he wins he wins what was bet, if he loses, he loses the cash. I seemed to have followed the psuedocode correctly, but I keep receiving errors. Anyone want to guide me in what I'm doing wrong? Please and thank you for responses. The errors are followed by the code.</p>\n\n<pre><code>using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nnamespace Casino_War\n{\n    class Program\n    {\n        static void Main(string[] args)\n        {\n\n            string playerName;\n            double cash, betAmount; \n            int player, dealer;\n\n            Console.Write(\"Please Enter Player's Name: \");\n            playerName = Console.ReadLine();\n\n\n            Console.WriteLine(\"Please Enter {0}'s Cash Amount\", playerName);\n            cash = double.Parse(Console.ReadLine());\n\n         Boolean more = \"yes\";\n\n            do\n         {\n             betAmount = 0;\n                Console.WriteLine(\"Please Enter The Bet Amount: \");\n                betAmount = double.Parse(Console.ReadLine());\n\n                if (betAmount &gt; cash)\n                {\n                    Console.WriteLine(\"You Do Not Have Enough Cash For That Bet Amount.\");\n                    Console.WriteLine(\"Cash: {0:C}\", cash);\n                }\n\n         while (betAmount &gt; cash)\n         {\n\n          Console.WriteLine(\"Press Enter To Draw A Card.\");\n          Console.ReadKey();\n\n          Random r = new Random();\n                player = r.Next(1, 15);\n          DisplayCard(player, \"Player\");\n\n                Console.WriteLine(\"Press Enter To Draw A Dealer Card.\");\n          Console.ReadKey();\n\n          Random r = new Random();\n                dealer = r.Next(1, 15);\n          DisplayCard(dealer, \"Dealer\");\n            }\n\n\n\n        private static void EvaluateCash(ref double betAmount, double cash, Boolean winner, string playerName)\n                {\n                    if (winner)\n                    {\n                        Console.WriteLine(\"{0} You Won {1:C}!\", playerName, betAmount);\n                        cash = betAmount + cash;\n                    }\n\n                    else \n                    {\n                        Console.WriteLine(\"{0} You Lose {1:C}!\", playerName, betAmount);\n                        cash = cash - betAmount;\n                    }\n\n                    Console.WriteLine(\"You Now Have {0:C}\", cash);\n                }\n\n        private static Boolean PlayAgain(double cash, double betAmount, string playerName, Boolean more)\n            {\n                if (cash &gt; 0)\n                {\n                    Console.WriteLine(\"You Have {0} Cash In Hand.\", cash);\n                    Console.WriteLine(\"\\nPlay Again (Y/N)? \");\n                    more = Console.ReadLine().ToUpper();\n                    Console.WriteLine(\"\\n\\n\");\n                } \n                while (more == \"Y\");\n                    Console.WriteLine(\"Thanks For Playing!\");\n            }\n\n            public static void DisplayCard(int card)\n            {\n                int card = r.Next(2, 14);\n                if (card == 14)\n                    Console.WriteLine(\"Ace\");\n                else if (card == 13)\n                    Console.WriteLine(\"King\");\n                else if (card == 12)\n                    Console.WriteLine(\"Queen\");\n                else if (card == 11)\n                    Console.WriteLine(\"Jack\");\n                else if (card &gt;= 2 &amp;&amp; card &lt;= 10)\n                    return card;\n                else\n                    Console.WriteLine(\"Error: {0} Is Not Valid.\", card);\n                return card;\n\n            }\n\n        static void Evaluate(int player, int dealer)\n        {\n            if (player &gt; dealer)\n                winner = true;\n                    else if (dealer &gt; player)\n                        winner = false;\n                            else\n                            Console.WriteLine(\"Tie. We Go To WAR!\");\n                            Console.WriteLine(\"Press Enter To Draw A Card.\");\n                            Console.ReadKey();\n\n                      Random r = new Random();\n                            player = r.Next(1, 15);\n                      DisplayCard(player, \"Player\");\n\n                            Console.WriteLine(\"Press Enter To Draw A Dealer Card.\");\n                      Console.ReadKey();\n\n                      Random r = new Random();\n                            dealer = r.Next(1, 15);\n                      DisplayCard(dealer, \"Dealer\");\n\n                            return Evaluate(player, dealer);\n\n        }\n    }\n}\n</code></pre>\n\n<p><img src=\"http://i.stack.imgur.com/YV3K3.jpg\" alt=\"enter image description here\"></p>\n","owner":{"user_id":493073,"display_name":"Jay","reputation":16,"user_type":"unregistered","profile_image":"http://www.gravatar.com/avatar/6f8c473a7b8ea72d229e3fde2e1427f5?d=identicon&r=PG","link":"http://stackoverflow.com/users/493073/jay"},"creation_date":1288565825,"last_activity_date":1323647846,"last_edit_date":1323647846,"score":3,"up_vote_count":3,"down_vote_count":0,"comments":[{"comment_id":4368346,"post_id":4065595,"creation_date":1288566366,"edited":false,"body":"I&#39;m afraid your code has a lot more issues than just missing } and ), you might want to read up a bit more on programming in general.","owner":{"user_id":492813,"display_name":"Doggett","reputation":1150,"user_type":"registered","profile_image":"http://www.gravatar.com/avatar/2ee2a04c06205749bfa6eb639832c9b4?d=identicon&r=PG","link":"http://stackoverflow.com/users/492813/doggett"}},{"comment_id":4368374,"post_id":4065595,"creation_date":1288566637,"edited":false,"body":"I agree with Dogget. I would start from scratch: add 1 or 2 lines of code and make sure that those work, then continue. Remember that you always need matching braces to execute blocs of code together. Indentation does not count in C#.","owner":{"user_id":398593,"display_name":"Marco","reputation":938,"user_type":"registered","profile_image":"http://www.gravatar.com/avatar/ec9d900c42830acd3cddc7d137ae84b4?d=identicon&r=PG","link":"http://stackoverflow.com/users/398593/marco"}},{"comment_id":4368529,"post_id":4065595,"creation_date":1288568532,"score":1,"edited":false,"body":"Fyi, by pressning <code>CTRL-k CTRL-d</code> you can make Visual Studio indent your whole file properly - at least if it&#39;s not full of syntax errors. So in the future use this feature often; especially before sharing code with others as that makes reading your code much easier.","owner":{"user_id":298479,"display_name":"ThiefMaster","reputation":38802,"user_type":"registered","profile_image":"http://www.gravatar.com/avatar/bc66db28aa7c3fa8e4ce4238b696dee9?d=identicon&r=PG","link":"http://stackoverflow.com/users/298479/thiefmaster"}},{"comment_id":4368546,"post_id":4065595,"creation_date":1288568792,"edited":false,"body":"Thanks on the tip. I honestly never knew.","owner":{"user_id":493073,"display_name":"Jay","reputation":16,"user_type":"unregistered","profile_image":"http://www.gravatar.com/avatar/6f8c473a7b8ea72d229e3fde2e1427f5?d=identicon&r=PG","link":"http://stackoverflow.com/users/493073/jay"}}]},{"post_id":8468505,"post_type":"question","body":"<p>How can I set up a subdomain on an IP address using Webmin?</p>\n\n<p>So, if I go to <code>http://directory.127.0.0.1/</code> it goes to the same place as <code>http://directory.localhost/</code> (<code>/var/www/directory</code>)?</p>\n","owner":{"user_id":136924,"display_name":"Jcubed","reputation":1425,"user_type":"registered","profile_image":"http://www.gravatar.com/avatar/7f93694661a6d82291a7aa64a38832e1?d=identicon&r=PG","link":"http://stackoverflow.com/users/136924/jcubed"},"creation_date":1323647839,"last_activity_date":1323647839,"score":0,"up_vote_count":0,"down_vote_count":0},{"post_id":8468419,"post_type":"question","body":"<p>Objective C:\nI have an NSMutableArray with 3 objects of a class stockHolding</p>\n\n<p>the class has a method valueInDollars which returns the product of \n(numberOfShares * shareMktVlue)</p>\n\n<p>The for loop (below) attempts to dynamically call the method valueInDollars for each element in the Array as follows:</p>\n\n<p>NSUInteger itemCount = [stockHolding count];</p>\n\n<pre><code>    for (int i = 0; i &lt; itemCount; i++) {\n        NSString *itemd = [stockHolding objectAtIndex:i];\n        float mktValue = [AAPL valueInDollars];  \n</code></pre>\n\n<p>The question is:  How can AAPL be declared dynamically so that it changes for each loop iteration to the stock symbol object in the array.</p>\n\n<p>I tried to replace AAPL with \"itemd\" in the code above, but get the error message: </p>\n\n<p>\"NSString may not respond to valueInDollars\"</p>\n\n<p>Any help here would be appreciated.</p>\n","owner":{"user_id":1092817,"display_name":"Michael Nuccio","reputation":1,"user_type":"registered","profile_image":"http://www.gravatar.com/avatar/5fbb8abd413c48230091e3c3e4905bc1?d=identicon&r=PG","link":"http://stackoverflow.com/users/1092817/michael-nuccio"},"creation_date":1323646539,"last_activity_date":1323647837,"score":0,"up_vote_count":0,"down_vote_count":0,"comments":[{"comment_id":10473471,"post_id":8468419,"creation_date":1323647060,"score":3,"edited":false,"body":"Sounds like you have an array of strings not an array of <code>StockHolding</code> objects","owner":{"user_id":632339,"display_name":"Paul.s","reputation":4385,"user_type":"registered","profile_image":"http://www.gravatar.com/avatar/7de0d2b485ac4f2e4aa2466769b5cdac?d=identicon&r=PG","link":"http://stackoverflow.com/users/632339/paul-s"}},{"comment_id":10473512,"post_id":8468419,"creation_date":1323647461,"edited":false,"body":"I wold love to help with this, but I have a few questions.  What is the name of the class?  What is the name of the array? What are you trying to accomplish with this loop?  What is the purpose of the NSString?  What does APPL represent in the code?  Thanks.","owner":{"user_id":731773,"display_name":"Jeff Wolski","reputation":334,"user_type":"registered","profile_image":"http://www.gravatar.com/avatar/b5b10509fa4c70500dc5dda9107b591b?d=identicon&r=PG","link":"http://stackoverflow.com/users/731773/jeff-wolski"}}]},{"post_id":8468504,"post_type":"answer","body":"<p>Your code sample seems to indicate that your <code>NSMutableArray</code> is called <code>stockHolding</code>, whereas your question text indicates that stockHolding is the class of the objects in the array. If we assume that the array name is correct and the objects in it are of class <code>StockHolding</code> then the following should work (using Objective-C 2.0 fast enumeration):</p>\n\n<pre><code>for (StockHolding *stock in stockHolding) {\n    float mktValue = [stock valueInDollars];\n    // ...\n}\n</code></pre>\n","owner":{"user_id":1080717,"display_name":"sjs","reputation":191,"user_type":"registered","profile_image":"http://www.gravatar.com/avatar/1ddcfbd17972d6986c3fc2624f8b1efa?d=identicon&r=PG","link":"http://stackoverflow.com/users/1080717/sjs"},"creation_date":1323647837,"last_activity_date":1323647837,"score":0,"up_vote_count":0,"down_vote_count":0},{"post_id":8468503,"post_type":"answer","body":"<p>The code as written is fine.  The pointer will be (must be) copied by the add() method, whose signature is presumably <code>void add(MyObject*)</code>.</p>\n\n<p>By the way, your C++ here is invalid:</p>\n\n<pre><code>MyCollection.add(mycollection, newObject);\n</code></pre>\n\n<p>It should probably be:</p>\n\n<pre><code>mycollection.add(newObject);\n</code></pre>\n","owner":{"user_id":4323,"display_name":"John Zwinck","reputation":10836,"user_type":"registered","profile_image":"http://www.gravatar.com/avatar/c72de4b11912d3da0be8a5cd064264a4?d=identicon&r=PG","link":"http://stackoverflow.com/users/4323/john-zwinck"},"creation_date":1323647827,"last_activity_date":1323647827,"score":0,"up_vote_count":0,"down_vote_count":0},{"post_id":8468479,"post_type":"question","body":"<p>Lets say I have a object whose purpose is to hold a bunch of pointers for an object type MyObject, and lets say I want a function that adds new MyObjects to the collection like so:</p>\n\n<pre><code>void MyCollection::addObject(){\n    MyObject *newObject = new MyObject();\n    MyCollection.add(mycollection, newObject);\n}\n</code></pre>\n\n<p>Lets say that MyCollection.add takes in a particular collection object and a pointer and somehow internally stores it. However the problem with this function is while the newObject itself is persistent, the *newObject pointer gets destroyed after the function call so the add() function no longer has a pointer that really points to the object. Is there any good way to make a persistent pointer somehow?</p>\n\n<p>Thanks</p>\n","owner":{"user_id":1020217,"display_name":"Matt","reputation":194,"user_type":"registered","profile_image":"http://www.gravatar.com/avatar/7e3cb9cabfe058e8e6b463163032708e?d=identicon&r=PG","link":"http://stackoverflow.com/users/1020217/matt"},"creation_date":1323647420,"last_activity_date":1323647827,"score":0,"up_vote_count":0,"down_vote_count":0,"comments":[{"comment_id":10473562,"post_id":8468479,"creation_date":1323647861,"edited":false,"body":"I&#39;d say, &quot;yes, this can be done&quot;; most likely though &quot;this can be done much better using the standard library&quot;, and in any case you are not giving enough detail and code and context by far to allow a meaningful response.","owner":{"user_id":596781,"display_name":"Kerrek SB","reputation":41850,"user_type":"registered","profile_image":"http://www.gravatar.com/avatar/a18405dd4b022837867d1f5453a05f41?d=identicon&r=PG","link":"http://stackoverflow.com/users/596781/kerrek-sb"}}]},{"post_id":8463092,"post_type":"question","body":"<p>In an app I'm doing at the moment - I recently created a nice styled TTView for a header in one of my views.</p>\n\n<p>I used this code:</p>\n\n<pre><code>TTStyle *style = \n[TTInsetStyle styleWithInset:UIEdgeInsetsMake(0, -5, 0, -5) next: \n[TTShadowStyle styleWithColor:RGBACOLOR(0,0,0,0.5) blur:5 offset:CGSizeMake(0, 2) next:\n[TTLinearGradientFillStyle styleWithColor1:RGBCOLOR(255, 255, 255)\n                                    color2:RGBCOLOR(216, 221, 231) next:nil]]];\nheaderView.style = style;\n</code></pre>\n\n<p>I then wanted to recreate this in another controller - so I set up a new view controller, added a view, changed its class to TTView in IB, and then created an outlet (in IB) called <code>headerView</code>. - All the code was exactly the same - I double checked everything.</p>\n\n<p>I copied in the style code, built and ran it, and the result was just a plain white view - no styling at all.</p>\n\n<p>I spent about 2 hours trying to work out what I'd wrong, and eventually I decided I would just have to compare the two views (by logging them), and make sure they are exactly identical.</p>\n\n<p><strong>Working view</strong></p>\n\n<pre><code>View: &lt;TTView: 0x65143c0; frame = (0 0; 320 45); autoresize = RM+BM; layer = &lt;CALayer: 0x6514300&gt;&gt;\n</code></pre>\n\n<p><strong>Broken View</strong></p>\n\n<pre><code>View: &lt;TTView: 0xa21f0a0; frame = (0 0; 320 45); autoresize = W+H; layer = &lt;CALayer: 0xa211140&gt;&gt;\n</code></pre>\n\n<p>When I noticed the difference (apart from the memory reference, of course) - I thought that it couldn't possible cause it to not render the styles at all, but sure enough, when I changed the broken view to using the same autoresizing options (just Right and Back margins) as the working view - it rendered fine.</p>\n\n<p>Can anyone explain this somewhat strange behaviour?</p>\n","owner":{"user_id":840973,"display_name":"Alex Coplan","reputation":2007,"user_type":"registered","profile_image":"http://www.gravatar.com/avatar/94f41db41bffd5cd905586c7e3c1bbc4?d=identicon&r=PG","link":"http://stackoverflow.com/users/840973/alex-coplan"},"creation_date":1323596735,"last_activity_date":1323647823,"last_edit_date":1323647823,"score":0,"up_vote_count":0,"down_vote_count":0},{"post_id":901225,"post_type":"question","body":"<p>I am currently looking into using Silverlight and Deepzoom in a future project. Can anyone suggest some sites that make good use of these technologies?</p>\n","creation_date":1243071914,"last_activity_date":1323647821,"score":4,"up_vote_count":4,"down_vote_count":0},{"post_id":8468502,"post_type":"answer","body":"<p><a href=\"http://www2.advertiser.com.au/uniquelyrundlemall\" rel=\"nofollow\">http://www2.advertiser.com.au/uniquelyrundlemall</a></p>\n\n<p>Christmas Gift Guide site</p>\n","owner":{"user_id":1092846,"display_name":"Andrew B","reputation":1,"user_type":"unregistered","profile_image":"http://www.gravatar.com/avatar/764e1276362d4a364697f8ac8f32750f?d=identicon&r=PG","link":"http://stackoverflow.com/users/1092846/andrew-b"},"creation_date":1323647821,"last_activity_date":1323647821,"score":0,"up_vote_count":0,"down_vote_count":0},{"post_id":8468501,"post_type":"answer","body":"<p>Stack-based data -- like your pointer -- doesn't get \"destroyed\", per se. The variable itself goes out of scope, but the data it contained -- i.e., the address of the <code>MyObject</code> object -- is still totally valid.  If the <code>add()</code> method copies the value of the pointer, all will be good.</p>\n","owner":{"user_id":659804,"display_name":"Ernest Friedman-Hill","reputation":22866,"user_type":"registered","profile_image":"http://www.gravatar.com/avatar/7afeb4d1993dc25c6028646840e4868a?d=identicon&r=PG","link":"http://stackoverflow.com/users/659804/ernest-friedman-hill"},"creation_date":1323647817,"last_activity_date":1323647817,"score":0,"up_vote_count":0,"down_vote_count":0},{"post_id":8468500,"post_type":"answer","body":"<p>If you know that you're inside a 32-bit JRE on a 64-bit system, you can run the 64-bit WMIC as follows:</p>\n\n<pre><code>%SystemRoot%\\sysnative\\cmd.exe /c wmic computersystem get TotalPhysicalMemory /format:list\n</code></pre>\n\n<p>Note that this command won't work from a 64-bit JRE, or on a 32-bit system, so you need to figure out which environment you're in first.</p>\n","owner":{"user_id":886887,"display_name":"Harry Johnston","reputation":1526,"user_type":"registered","profile_image":"http://www.gravatar.com/avatar/1616c7e4fab23f6e014ee11d75408bba?d=identicon&r=PG","link":"http://stackoverflow.com/users/886887/harry-johnston"},"creation_date":1323647802,"last_activity_date":1323647802,"score":0,"up_vote_count":0,"down_vote_count":0},{"post_id":8448905,"post_type":"question","body":"<p>I have a Java Desktop App installed on a 64bit Windows Vista with 24GB of ram. My program is only finding 4 of the 24GB. I am getting the RAM using </p>\n\n<pre><code>wmic computersystem get TotalPhysicalMemory /format:list\n</code></pre>\n\n<p>And if that fails (in case they don't have WMI) I use</p>\n\n<pre><code>com.sun.management.OperatingSystemMXBean bean = (com.sun.management.OperatingSystemMXBean) java.lang.management.ManagementFactory.getOperatingSystemMXBean();\nlong ram = (long) bean.getTotalPhysicalMemorySize();\n</code></pre>\n\n<p>Because I don't have access to the PC I was not able to run tests to confirm which method is used but I am almost certain that the machine does have WMI.</p>\n\n<p>I am suspecting that I am running a 32bit WMI which is likely to have a 4GB limit. How do I run a 64bit WMI?</p>\n","owner":{"user_id":476218,"display_name":"Dorothy","reputation":158,"user_type":"registered","profile_image":"http://www.gravatar.com/avatar/f6c75445cc7a0634950b41e9ce6554cc?d=identicon&r=PG","link":"http://stackoverflow.com/users/476218/dorothy"},"creation_date":1323449658,"last_activity_date":1323647802,"score":1,"up_vote_count":1,"down_vote_count":0},{"post_id":8468305,"post_type":"question","body":"<p>Could one of you lovely people shed some light as to why this code doesn't work or a better/correct way of performing it... </p>\n\n<pre><code>        CandidDomainService db = new CandidDomainService();\n\n        GlobalValuesTable newInstanceId =\n            db.GetGlobalValuesTables().Single&lt;GlobalValuesTable&gt;(gId =&gt; gId.RowId == 1);\n\n        newInstanceId.CurrentTestInstance++;\n        db.UpdateGlobalValuesTable(newInstanceId);\n</code></pre>\n\n<p>It's throwing a <code>null</code> exception at <code>db.Update</code>. I'm using the generated add, update, remove and get. The exception is described as being thrown when no changes have been made to the entity model. </p>\n\n<p>Thanks!</p>\n","owner":{"user_id":1092809,"display_name":"user1092809","reputation":6,"user_type":"registered","profile_image":"http://www.gravatar.com/avatar/7dd83a7214c6fe730010842856af0b48?d=identicon&r=PG","link":"http://stackoverflow.com/users/1092809/user1092809"},"creation_date":1323645333,"last_activity_date":1323647797,"last_edit_date":1323647169,"score":1,"up_vote_count":1,"down_vote_count":0},{"post_id":8468499,"post_type":"answer","body":"<p>As with most things, I would check that it exists before calling it.</p>\n\n<pre><code>if (newInstanceId)\n{\nnewInstanceId.CurrentTest Instance++;\ndb.UpdateGlobalValuesTable(newInstanceId);\n}\nelse \n{\n//Do something here to notify you.\n}\n</code></pre>\n\n<p>That should at least get you into some better debugging.</p>\n","owner":{"user_id":1092834,"display_name":"user1092834","reputation":1,"user_type":"registered","profile_image":"http://www.gravatar.com/avatar/8686c23d5d10346120e3c287ded9422b?d=identicon&r=PG","link":"http://stackoverflow.com/users/1092834/user1092834"},"creation_date":1323647797,"last_activity_date":1323647797,"score":0,"up_vote_count":0,"down_vote_count":0},{"post_id":7499794,"post_type":"question","body":"<p>I'm programming the CSS of a site, and realized that the Internet Explorer 9 is showing different font size in relation to other browsers (Firefox, Chrome, Safari, IE7 and IE8).</p>\n\n<p>I've tried using some RESETS, and I am specifying the font in PX, but IE9 still shows the difference in font size.</p>\n\n<p>I've tried using font-size in pt, in, percentage, but had no success.</p>\n\n<p>I changed the font before (Georgia, Times New Romam, Verdana). Some of them are shown larger, others are smaller in IE9.</p>\n\n<p>I checked the zoom settings and text size in IE. They are 100% and medium respectively.</p>\n\n<p>To illustrate, I created a simple HTML and CSS as you can see the code below. How to solve this problem? Thanks!</p>\n\n<p>The problem:</p>\n\n<p><img src=\"http://i.stack.imgur.com/EDZxO.png\" alt=\"enter image description here\"></p>\n\n<p>Code:</p>\n\n<p><strong>HTML</strong></p>\n\n<pre><code>&lt;!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\"&gt;\n&lt;html xmlns=\"http://www.w3.org/1999/xhtml\"&gt;\n&lt;head&gt;\n&lt;meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" /&gt;\n&lt;link rel=\"stylesheet\" type=\"text/css\" href=\"style.css\" /&gt;\n\n&lt;title&gt;Untitled Document&lt;/title&gt;\n\n&lt;/head&gt;\n\n&lt;body&gt;\n           &lt;p&gt;\n           AAAAA BBBBB CCCCC DDDDD EEEEE FFFFF GGGGG HHHHH IIIII JJJJJ KKKKK LLLLL MMMMM NNNNNN OOOOO PPPPP QQQQQ\n           &lt;/p&gt;\n&lt;/body&gt;\n&lt;/html&gt;\n</code></pre>\n\n<p><strong>CSS</strong></p>\n\n<pre><code>/* RESET */\n\nhtml, body, div, span, applet, object, iframe,\nh1, h2, h3, h4, h5, h6, p, blockquote, pre,\na, abbr, acronym, address, big, cite, code,\ndel, dfn, em, img, ins, kbd, q, s, samp,\nsmall, strike, strong, sub, sup, tt, var,\nb, u, i, center,\ndl, dt, dd, ol, ul, li,\nfieldset, form, label, legend,\ntable, caption, tbody, tfoot, thead, tr, th, td,\narticle, aside, canvas, details, embed, \nfigure, figcaption, footer, header, hgroup, \nmenu, nav, output, ruby, section, summary,\ntime, mark, audio, video {\n    margin: 0;\n    padding: 0;\n    border: 0;\n    font-size: 100%;\n    font: inherit;\n    vertical-align: baseline;\n}\n/* HTML5 display-role reset for older browsers */\narticle, aside, details, figcaption, figure, \nfooter, header, hgroup, menu, nav, section {\n    display: block;\n}\nbody {\n    line-height: 1;\n}\nol, ul {\n    list-style: none;\n}\nblockquote, q {\n    quotes: none;\n}\nblockquote:before, blockquote:after,\nq:before, q:after {\n    content: '';\n    content: none;\n}\ntable {\n    border-collapse: collapse;\n    border-spacing: 0;\n}\n\n/* END OF RESET */\n\nbody {\n    background-image:url(GreenLine.png);\n    background-repeat:no-repeat;\n    font-family:\"Courier New\", Courier, monospace;\n    font-size:12px;\n}\n</code></pre>\n","owner":{"user_id":956954,"display_name":"bbastos","reputation":21,"user_type":"unregistered","profile_image":"http://www.gravatar.com/avatar/e6eb39b96bdde68ce0b4e2586beb324e?d=identicon&r=PG","link":"http://stackoverflow.com/users/956954/bbastos"},"creation_date":1316608426,"last_activity_date":1323647768,"last_edit_date":1323647768,"score":4,"up_vote_count":4,"down_vote_count":0,"comments":[{"comment_id":9080239,"post_id":7499794,"creation_date":1316608979,"edited":false,"body":"Notice red stripes in non-ie browsers - <a href=\"http://ie.microsoft.com/testdrive/\" rel=\"nofollow\">ie.microsoft.com/testdrive</a> - those are caused by differences in font rendering (and aggravated by red background, which makes those browsers look buggy)","owner":{"user_id":946789,"display_name":"c69","reputation":1273,"user_type":"registered","profile_image":"http://www.gravatar.com/avatar/65df17cba0f5e1b7fe8e2c2928911153?d=identicon&r=PG","link":"http://stackoverflow.com/users/946789/c69"}},{"comment_id":9080358,"post_id":7499794,"creation_date":1316609377,"edited":false,"body":"You might do better with this question on a more design oriented site like doctype.com, since it looks like it&#39;s related more to font rendering than CSS.","owner":{"user_id":8930,"display_name":"Ishmael","reputation":1669,"user_type":"registered","profile_image":"http://www.gravatar.com/avatar/a91fd95a93e7de4b220c98262301d058?d=identicon&r=PG","link":"http://stackoverflow.com/users/8930/ishmael"}},{"comment_id":9081160,"post_id":7499794,"creation_date":1316611965,"edited":false,"body":"What version of Firefox are you checking it against? The answer is &quot;important&quot;. I&#39;d expect the Firefox rendering to match IE9.","owner":{"user_id":405015,"display_name":"thirtydot","reputation":46864,"user_type":"registered","profile_image":"http://www.gravatar.com/avatar/74c04b6c96836f044ed927a5db4dc92b?d=identicon&r=PG","link":"http://stackoverflow.com/users/405015/thirtydot"}},{"comment_id":9081373,"post_id":7499794,"creation_date":1316612462,"edited":false,"body":"Screw it, I&#39;ve just answered anyway despite the discrepancy in your description - IE9 and Firefox should match, unless you&#39;re using a version of Firefox older than 4.","owner":{"user_id":405015,"display_name":"thirtydot","reputation":46864,"user_type":"registered","profile_image":"http://www.gravatar.com/avatar/74c04b6c96836f044ed927a5db4dc92b?d=identicon&r=PG","link":"http://stackoverflow.com/users/405015/thirtydot"}},{"comment_id":9081688,"post_id":7499794,"creation_date":1316613186,"edited":false,"body":"thirtydot, This is true. I updated Firefox to the latest version. Now Firefox is showing just as IE9.\n\nI updated the other browsers (Safari and Chrome), but the difference remains.","owner":{"user_id":956954,"display_name":"bbastos","reputation":21,"user_type":"unregistered","profile_image":"http://www.gravatar.com/avatar/e6eb39b96bdde68ce0b4e2586beb324e?d=identicon&r=PG","link":"http://stackoverflow.com/users/956954/bbastos"}},{"comment_id":9081803,"post_id":7499794,"creation_date":1316613419,"edited":false,"body":"@Bruno Bastos: I&#39;ve covered the reason this is happening in my answer. Just in case you missed it, check the <a href=\"http://blog.mozilla.com/nattokirai/2011/08/11/directwrite-text-rendering-in-firefox-6/\" rel=\"nofollow\">last link in my answer</a>. <b>There is no way to fix this.</b>","owner":{"user_id":405015,"display_name":"thirtydot","reputation":46864,"user_type":"registered","profile_image":"http://www.gravatar.com/avatar/74c04b6c96836f044ed927a5db4dc92b?d=identicon&r=PG","link":"http://stackoverflow.com/users/405015/thirtydot"}}]},{"post_id":8468471,"post_type":"question","body":"<p>Or am I misunderstanding something?</p>\n\n<p>Partial:</p>\n\n<pre><code>app/views/admin/command_templates/_fillerup.html.erb\n</code></pre>\n\n<p>This passes (there is no \"fill\" or \"_fill\" in the view directory):</p>\n\n<pre><code>describe \"GET fillerup\" do\n  it \"assigns some stuff and renders a partial\" do\n    should render_template \"admin/command_templates/_fillerup\"\n    # But so does this:\n    should render_template \"admin/command_templates/_fill\"\n  end\nend\n</code></pre>\n\n<p>This fails (as I expect):</p>\n\n<pre><code>describe \"GET fillerup\" do\n  it \"assigns some stuff and renders a partial\" do\n    should render_template \"admin/command_templates/_fillerupp\" # extra \"p\"\n  end\nend\n</code></pre>\n\n<p>It <em>acts</em> like it's doing a <code>start_with?</code> on the path.</p>\n\n<p>rspec-rails 2.7.0, rails 3.1.2; other info available on request.</p>\n","owner":{"user_id":438992,"display_name":"Dave Newton","reputation":22355,"user_type":"registered","profile_image":"http://www.gravatar.com/avatar/e52bc2d5fc3983e2ab1afb2b38b65444?d=identicon&r=PG","link":"http://stackoverflow.com/users/438992/dave-newton"},"creation_date":1323647357,"last_activity_date":1323647768,"last_edit_date":1323647768,"score":0,"up_vote_count":0,"down_vote_count":0},{"post_id":8468498,"post_type":"question","body":"<p>I have a list of 80 towns each with their geographical longitude and latitude. I need to find the shortest closed route (taking into account the curvature of the earth). I was thinking I could calculate the distance between each one (using great-circle distance formula) and then list the ones with the shortest distances (that would be 6400 calculations). The thing is I don't have much programming experience but I know a small bit of C# and PHP. Could someone tell point me in the right direction of what I should learn about to solve this problem (eg. should I learn more about php and mysql to use a database or something to sort out the distances?) </p>\n","owner":{"user_id":1092839,"display_name":"Darkphenom","reputation":6,"user_type":"registered","profile_image":"http://www.gravatar.com/avatar/96b4c0dfebd98b33993a4c40c50d2830?d=identicon&r=PG","link":"http://stackoverflow.com/users/1092839/darkphenom"},"creation_date":1323647760,"last_activity_date":1323647760,"score":1,"up_vote_count":1,"down_vote_count":0},{"post_id":8468497,"post_type":"question","body":"<p>I am using ASP.NET 4 and MVC and trying to add code to handle the \"select\" link.  Once the user selects the row, I need to go display a new page with more detail.  I have tried to capture the rowcommand but I never hit a the breakpoint.  This is my current GridView code for the first page -</p>\n\n<pre><code>&lt;%@ Page Title=\"\" Language=\"C#\" MasterPageFile=\"~/Views/Shared/Site.Master\" Inherits=\"System.Web.Mvc.ViewPage&lt;IEnumerable&lt;ValidationPortal.Models.Contact&gt;&gt;\" %&gt;\n\n&lt;asp:Content ID=\"Content2\" ContentPlaceHolderID=\"MainContent\" runat=\"server\"&gt;\n\n    &lt;form id=\"form1\" runat=\"server\"&gt;\n\n    &lt;h2&gt;Index&lt;/h2&gt;\n\n    &lt;p&gt;\n        &lt;asp:GridView ID=\"GridView1\" runat=\"server\" AutoGenerateColumns=\"False\" \n            DataKeyNames=\"Id\" DataSourceID=\"SqlDataSource1\"&gt;\n            &lt;Columns&gt;\n                &lt;asp:CommandField ShowSelectButton=\"True\" /&gt;\n                &lt;asp:BoundField DataField=\"Id\" HeaderText=\"Id\" InsertVisible=\"False\" \n                    ReadOnly=\"True\" SortExpression=\"Id\" /&gt;\n                &lt;asp:BoundField DataField=\"FirstName\" HeaderText=\"FirstName\" \n                    SortExpression=\"FirstName\" /&gt;\n                &lt;asp:BoundField DataField=\"LastName\" HeaderText=\"LastName\" \n                    SortExpression=\"LastName\" /&gt;\n                &lt;asp:BoundField DataField=\"Phone\" HeaderText=\"Phone\" SortExpression=\"Phone\" /&gt;\n                &lt;asp:BoundField DataField=\"Email\" HeaderText=\"Email\" SortExpression=\"Email\" /&gt;\n            &lt;/Columns&gt;\n        &lt;/asp:GridView&gt;\n        &lt;asp:SqlDataSource ID=\"SqlDataSource1\" runat=\"server\" \n            ConnectionString=\"&lt;%$ ConnectionStrings:ConnectionString %&gt;\" \n            SelectCommand=\"SELECT * FROM [Contacts]\"&gt;&lt;/asp:SqlDataSource&gt;\n\n    &lt;/p&gt;\n    &lt;/form&gt;\n\n&lt;/asp:Content&gt;\n</code></pre>\n\n<p>What do I need to add to make this work?</p>\n","owner":{"user_id":124658,"display_name":"Craig","reputation":41,"user_type":"registered","profile_image":"http://www.gravatar.com/avatar/d140e80b383a2072a376d352f1315e2d?d=identicon&r=PG","link":"http://stackoverflow.com/users/124658/craig"},"creation_date":1323647749,"last_activity_date":1323647749,"score":0,"up_vote_count":0,"down_vote_count":0},{"post_id":8468308,"post_type":"question","body":"<p>I would like to match any number that is not preceded by <strong>x</strong> and also not followed by <strong>y</strong>.\nI came up with something like this:\n<code>(?&lt;!x)(\\d+)(?!y)</code></p>\n\n<p>However, that doesn't really help as I also want to match the numbers in strings like <code>x123</code> or <code>456y</code>.</p>\n\n<p>In other words, I want either both assertions to work or none.</p>\n\n<p>Examples:</p>\n\n<ul>\n<li>From \"x123\", \"123\" would be matched</li>\n<li>From \"456y\", \"456\" would be matched</li>\n<li>From \"789\", \"789\" would be matched</li>\n<li>Nothing would be matched from \"x123y\"</li>\n</ul>\n\n<p>Can you help please?</p>\n","owner":{"user_id":460051,"display_name":"Lopata","reputation":6,"user_type":"registered","profile_image":"http://www.gravatar.com/avatar/6eac2ea210ab14d3f27da3e85c79eb4e?d=identicon&r=PG","link":"http://stackoverflow.com/users/460051/lopata"},"creation_date":1323645356,"last_activity_date":1323647749,"last_edit_date":1323647749,"score":1,"up_vote_count":1,"down_vote_count":0,"comments":[{"comment_id":10473352,"post_id":8468308,"creation_date":1323646285,"edited":false,"body":"Are the numbers part of a larger string? Also which language?","owner":{"user_id":880096,"display_name":"FailedDev","reputation":10613,"user_type":"registered","profile_image":"http://www.gravatar.com/avatar/98745fbe796266f5c479a83a4ca163cb?d=identicon&r=PG","link":"http://stackoverflow.com/users/880096/faileddev"}},{"comment_id":10473496,"post_id":8468308,"creation_date":1323647297,"edited":false,"body":"@FailedDev Yes they are. The language is PHP.","owner":{"user_id":460051,"display_name":"Lopata","reputation":6,"user_type":"registered","profile_image":"http://www.gravatar.com/avatar/6eac2ea210ab14d3f27da3e85c79eb4e?d=identicon&r=PG","link":"http://stackoverflow.com/users/460051/lopata"},"reply_to_user":{"user_id":880096,"display_name":"FailedDev","reputation":10613,"user_type":"registered","profile_image":"http://www.gravatar.com/avatar/98745fbe796266f5c479a83a4ca163cb?d=identicon&r=PG","link":"http://stackoverflow.com/users/880096/faileddev"}}]},{"post_id":8468496,"post_type":"question","body":"<p>In Resharper, pressing Alt + Enter opens the quick fix list. For StyleCop for C#, an example of the menu that would open is the following:</p>\n\n<p><strong>Resharper 6.0 Quick-Fix</strong>\n<img src=\"http://i.stack.imgur.com/yxgav.png\" alt=\"enter image description here\"></p>\n\n<p>In Reshaper 5.0, I seem to remember the \"Insert Header\" option would be before Suppress. Now, the Suppress option is always the first option, so my quick method of simply hitting Alt + Enter + Enter now auto-inserts a Suppression message instead of doing what I'd like it to.</p>\n\n<p>Is there a way to move the \"Insert header:\" option, and other similiar options, to be the first option instead of Suppress?</p>\n","owner":{"user_id":93306,"display_name":"Will Eddins","reputation":4422,"user_type":"registered","profile_image":"http://www.gravatar.com/avatar/852eeb80caedb46ffb2704dd23ea15aa?d=identicon&r=PG","link":"http://stackoverflow.com/users/93306/will-eddins"},"creation_date":1323647745,"last_activity_date":1323647745,"score":0,"up_vote_count":0,"down_vote_count":0},{"post_id":8468495,"post_type":"question","body":"<p>I'm not sure if this question is a legitimate question for this site -- if it isn't I'll take it down.</p>\n\n<p>I'm looking for a commercial http proxy provider where I can get\n  reasonable bandwidth -- 10 Mbps would be fine\n  no restrictions\n  24/7 access\n  non sequential IP's</p>\n\n<p>Any recommendations?</p>\n\n<p>Thanks.</p>\n","owner":{"user_id":1038507,"display_name":"bubba meow meow","reputation":9,"user_type":"registered","profile_image":"http://www.gravatar.com/avatar/a91b3abb9866cab9c2e6fb5f464b6a0d?d=identicon&r=PG","link":"http://stackoverflow.com/users/1038507/bubba-meow-meow"},"creation_date":1323647733,"last_activity_date":1323647733,"score":0,"up_vote_count":0,"down_vote_count":0},{"post_id":6901746,"post_type":"question","body":"<p>I have made a simple paint program in which you can use a brush-tool to paint some different colors and erase (simply paint in white).</p>\n\n<p>It works fine, but I have a very strange graphical bug which causes the toolpanel and the last mouseovered color/tool-icon to be painted on top of the drawpanel.</p>\n\n<p>Implementation: The frame holds two extentions of JPanel: a ToolPanel and a DrawPanel. ToolPanel holds two JPanels which hold the color- and toolbuttons. The Buttons are extensions of JComponent.</p>\n\n<p>link to screenshot (I'm not allowed to post images appearently):</p>\n\n<p><img src=\"http://i.stack.imgur.com/cdzui.png\" alt=\"enter image description here\"></p>\n\n<p>note: The buttons in the second \"fake\" toolpanel are not actual buttons that can be clicked and I can paint on top of it. If I paint on the \"fake\" color button in the left corner it will be repainted again when I mouseover a new color and enter the drawpanel with the mouse.</p>\n\n<p>note 2: I used to have a JMenuBar which was also painted in the drawpanel. It was repainted each time the drawpanel is mouseovered after the window (not just the panel) lost focus once.</p>\n\n<p>Some code:\n(I know the tool selection implementation isn't the best :P)</p>\n\n<p>DrawPanel's paintComponent method:</p>\n\n<pre><code>    public void paintComponent(Graphics g) { \n    if(isMousePressed) {\n        if(tool == \"BRUSH\") {\n            g.setColor(color);\n            g.fillOval(currentEvent.getX(), currentEvent.getY(), 30, 30);\n        } else if(tool == \"ERASER\") {\n            g.setColor(getBackground());\n            g.fillOval(currentEvent.getX(), currentEvent.getY(), 30, 30);\n\n        }\n    }\n}\n</code></pre>\n\n<p>Let me know if there is any relevant information or code that I left out.</p>\n\n<p>Hypothesis:\nI didn't call super.paintComponent in DrawPanels paintComponent-method, maybe that causes some problems? The reason that I didn't is that if I do, it will repaint the background all the time so only the dot I painted last will be visible. Not sure if the supercall actually solves the problem or if the fake-panel is just covered by the background as well. Maybe I need to work around that some other way? Or is it something else? </p>\n\n<p>Thanks!</p>\n","owner":{"user_id":800535,"display_name":"tobes","reputation":21,"user_type":"registered","profile_image":"http://www.gravatar.com/avatar/9cba39584819ab028723fbd9c1cf52b6?d=identicon&r=PG","link":"http://stackoverflow.com/users/800535/tobes"},"creation_date":1312217466,"last_activity_date":1323647730,"last_edit_date":1323647730,"score":4,"up_vote_count":4,"down_vote_count":0,"comments":[{"comment_id":8217475,"post_id":6901746,"creation_date":1312217914,"score":1,"edited":false,"body":"+1 For the &quot;WTF&quot; screenshot. :D","owner":{"user_id":584862,"display_name":"Крысa","reputation":9718,"user_type":"registered","profile_image":"http://www.gravatar.com/avatar/840ece295cf7c6e79179ad3906308bd1?d=identicon&r=PG","link":"http://stackoverflow.com/users/584862/a"}},{"comment_id":8218187,"post_id":6901746,"creation_date":1312220864,"score":4,"edited":false,"body":"Don&#39;t use &quot;==&quot; to compare Strings. Use the equals(...) method.","owner":{"user_id":131872,"display_name":"camickr","reputation":48713,"user_type":"registered","profile_image":"http://www.gravatar.com/avatar/a0ced8e21d2a761db718acb6362b9225?d=identicon&r=PG","link":"http://stackoverflow.com/users/131872/camickr"}},{"comment_id":8871956,"post_id":6901746,"creation_date":1315511569,"edited":false,"body":"Did you ever fix this or could you create an <a href=\"http://sscce.org\" rel=\"nofollow\">SSCCE</a>?","owner":{"user_id":546060,"display_name":"Charles Goodwin","reputation":2193,"user_type":"registered","profile_image":"http://www.gravatar.com/avatar/5f12ff8368711f658d186963972385c9?d=identicon&r=PG","link":"http://stackoverflow.com/users/546060/charles-goodwin"}}]},{"post_id":8459811,"post_type":"question","body":"<p>I want to avoid ctors that take a large number of repository interfaces.</p>\n\n<p>Instead, I want to have a single ctor parameter: a typed repository set.</p>\n\n<p>By typed, I mean a class with a bunch of properties for each repository that the enclosing class uses. Something like this:</p>\n\n<pre><code>public sealed class MyRepositorySet\n{\n    public IUserRepository UserRepository { get; set; }\n\n    public IOtherRepository OtherRepository { get; set; }\n}\n</code></pre>\n\n<p>I want to use Ninject to automatically create such a repository set, populate each of the properties by creating an instance of each repository, and then create the dependent class with the initialized repository set.</p>\n\n<p>I know this can be done, but I can't find an example. I don't think I know what a typed repository set is properly called.</p>\n","owner":{"user_id":984335,"display_name":"Travis Parks","reputation":8,"user_type":"registered","profile_image":"http://www.gravatar.com/avatar/421891a2a2db5ac1bdccf96b941c11cb?d=identicon&r=PG","link":"http://stackoverflow.com/users/984335/travis-parks"},"creation_date":1323550569,"last_activity_date":1323647719,"score":0,"up_vote_count":0,"down_vote_count":0}],"quota_remaining":-4417,"quota_max":300}