text
string
meta
dict
Q: Editable WPF GridView Row I am trying to create a databound WPF GridView whose rows can either be read-only or editable (by double-clicking or through a context menu). I would like for the row to return to a read-only state if any of its editable controls loses focus. The functionality I am looking for is very simil...
{ "language": "en", "url": "https://stackoverflow.com/questions/234929", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Which method name fits in best with Objective-C/Cocoa conventions? Here's a quicky question. Which method name makes the most sense for an Objective-C Cocoa application? -(void) doSomethingWithAnimation:(BOOL)animated or: -(void) doSomething:(BOOL)animated or even: -(void) doSomethingAnimated:(BOOL)animated A: I...
{ "language": "en", "url": "https://stackoverflow.com/questions/234930", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How to create an installer out of an installer? I have an old legacy application around for which I only have the installer. it doesn't do anything more than uncompress and register itself and his library's. As i don't have the source-code it gives me a lot of headaches in maintenance problems. In some particular co...
{ "language": "en", "url": "https://stackoverflow.com/questions/234934", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Adding dynamic columns to an ASP.NET Gridview I'm having a problem dynamically adding columns to a GridView. I need to change the layout -- i.e. the included columns -- based on the value in a DropDownList. When the user changes the selection in this list, I need to remove all but the first column and dynamically ...
{ "language": "en", "url": "https://stackoverflow.com/questions/234935", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: GODI installation error I'm running Fedora 9 x86_64 and am more or less a Linux newbie (not using it, but installing and such). The error occurs in the second stage of the bootstrap (i.e. "./bootstrap_stage2"). It does a whole lot fo stuff and then these errors start happening: Fatal error: exception Out_of_memory m...
{ "language": "en", "url": "https://stackoverflow.com/questions/234941", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Best way to reverse-engineer a web service interface from a WSDL file? I've inherited a WSDL file for a web service on a system that I don't have access to for development and testing. I need to generate a web service that adheres to that WSDL. The wrapper is .NET, but if there's an easy way to do this with another ...
{ "language": "en", "url": "https://stackoverflow.com/questions/234945", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How can I access a parameter sent through the URL within my view files in CakePHP? I'm new to CakePHP but I've been though their FAQs and guides to no avail. This is so simple that I just must not be thinking straight: How can I access a parameter sent through the URL within my view files? Example: http://example....
{ "language": "en", "url": "https://stackoverflow.com/questions/234949", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Re-open *scratch* buffer in Emacs? If I accidentally closed the scratch buffer in Emacs, how do I create a new scratch buffer? A: C-x b *scratch* RET y RET with iswitchb-mode enabled. Just C-x b *scratch* RET otherwise. A: I found this years ago when I first started using emacs; I have no idea where now but it has...
{ "language": "en", "url": "https://stackoverflow.com/questions/234963", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "174" }
Q: What is the best way to determine a session variable is null or empty in C#? What is the best way to check for the existence of a session variable in ASP.NET C#? I like to use String.IsNullOrEmpty() works for strings and wondered if there was a similar method for Session. Currently the only way I know of is: var...
{ "language": "en", "url": "https://stackoverflow.com/questions/234973", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "80" }
Q: Best way to implement file access in C# Scenario - I need to access an HTML template to generate a e-mail from my Business Logic Layer. It is a class library contains a sub folder that contains the file. When I tried the following code in a unit test: string FilePath = string.Format(@"{0}\templates\MyFile.htm", En...
{ "language": "en", "url": "https://stackoverflow.com/questions/234976", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Weird case sensitivity bug in Class.getResource? I was loading an image resource with the following code and it works fine from my dev environment (netbeans) but threw an exception as soon as it ran from the desktop. new ImageIcon(Images.class.getResource("images/highlighter24.gif")); I traced it down to my file ha...
{ "language": "en", "url": "https://stackoverflow.com/questions/234990", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: How to change item size and gap between them in Custom Drown CListCtrl As far as I know ON_WM_MEASUREITEM does not get called in Custom Draw list control. It is only used if control is Owner Drawn. I have found a way to do that, but it is somewhat a HACK and I still can not control gaps between items they are set up...
{ "language": "en", "url": "https://stackoverflow.com/questions/234993", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What is the best way to compare .NET performance vs. VB 6 performance at a customer site? Two questions: * *Can someone point me to unbiased data that compares .NET performance to VB 6 performance? I have searched but it is surprisingly difficult to find. *What is the best way to compare .NET performance to VB 6...
{ "language": "en", "url": "https://stackoverflow.com/questions/234994", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: ACM Problem: Coin-Flipping, help me identify the type of problem this is I'm practicing for the upcoming ACM programming competition in a week and I've gotten stumped on this programming problem. The problem is as follows: You have a puzzle consisting of a square grid of size 4. Each grid square holds a single coin...
{ "language": "en", "url": "https://stackoverflow.com/questions/235003", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: What is scaffolding? Is it a term for a particular platform? Scaffolding, what is it? Is it a Rails-only thing? A: From Wikipedia: Scaffolding is a meta-programming method of building database-backed software applications. It is a technique supported by some model-view-controller frameworks, in which th...
{ "language": "en", "url": "https://stackoverflow.com/questions/235018", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "124" }
Q: Why should unit tests test only one thing? What Makes a Good Unit Test? says that a test should test only one thing. What is the benefit from that? Wouldn't it be better to write a bit bigger tests that test bigger block of code? Investigating a test failure is anyway hard and I don't see help to it from smaller tes...
{ "language": "en", "url": "https://stackoverflow.com/questions/235025", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "68" }
Q: Why are Delphi objects assigned even after calling .Free? In Delphi, why does the Assigned() function still return True after I call the destructor? The below example code will write "sl is still assigned" to the console. However, I can call FreeAndNil(sl); and it won't be assigned. I've been programming in Delphi f...
{ "language": "en", "url": "https://stackoverflow.com/questions/235033", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "25" }
Q: Why do I get an OutOfMemoryError when inserting 50,000 objects into HashMap? I am trying to insert about 50,000 objects (and therefore 50,000 keys) into a java.util.HashMap<java.awt.Point, Segment>. However, I keep getting an OutOfMemory exception. (Segment is my own class - very light weight - one String field, and...
{ "language": "en", "url": "https://stackoverflow.com/questions/235047", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: How do I set WindowText on the Taskbar? const char* title = "old title"; HWND hwnd = FindWindow(title, title); SetWindowText(hwnd, "new title"); This sets the title bar to "new title", but the caption in the task bar is still "old title". How do I set both? If relevant, this is being done in a DLL loaded in the pr...
{ "language": "en", "url": "https://stackoverflow.com/questions/235055", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Do modern compilers optimize the x * 2 operation to x << 1? Does the C++ compiler optimize the multiply by two operation x*2 to a bitshift operation x<<1? I would love to believe that yes. A: Yes. They also optimize other similar operations, such as multiplying by non-powers of two that can be rewritten as the sum...
{ "language": "en", "url": "https://stackoverflow.com/questions/235072", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "34" }
Q: Preferred method for linking to stylesheets from a UserControl? We primarily use an ASP.NET environment at work. Right now I'm building an application which uses "Modules", which is just a UserControl, with its' Javascript right in the control, and a link element to the stylesheet for that control. I want to keep it...
{ "language": "en", "url": "https://stackoverflow.com/questions/235081", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Sending emails with the error log through CruiseControl How do you configure cruiseControl to send out emails that contains the error log whenever a build fails? I've gotten it to send out emails to users when the build fails, but it does not include the actual error that caused the build to fail. I know that if I...
{ "language": "en", "url": "https://stackoverflow.com/questions/235090", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How would you approach, in .NET, allowing the tenants of a multi-tenant SaaS app to arbitrarily add properties to the entities of the model? So, we're building a multi-tenant system to run as a service. We're starting from the ground up. We're following DDD; the domain has (at the moment) ~20 entities in it, and l...
{ "language": "en", "url": "https://stackoverflow.com/questions/235095", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Programmatically Creating a IIS6 Website/App Pool in Nant I'm relatively new to Nant, what i'd like to do is have a task that creates a new Website and AppPool in IIS6 is there a way to do this in Nant? Essentially the task would need to set all the appropriate properties including the correct version of the .net Fr...
{ "language": "en", "url": "https://stackoverflow.com/questions/235113", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: ASP.Net MVC Route to Username I am trying to create a route with a Username... So the URL would be mydomain.com/abrudtkhul (abrudtkhul being the username) My application will have public profiles based on usernames (Ex: http://delicious.com/abrudtkuhl). I want to replicate this URL scheme. How can I structure this i...
{ "language": "en", "url": "https://stackoverflow.com/questions/235118", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "23" }
Q: Can you programmatically change session time out in ASP.NET? Can it be done or the only way is to configure it on IIS? A: You edit generally the Global.asax file's Session_Start method and set Session.TimeOut to whatever you want. You can do this anywhere else in your code too. A: you can, but it will not overrid...
{ "language": "en", "url": "https://stackoverflow.com/questions/235119", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: What's the UITableView index magnifying glass character? In Apple's iPhone apps (like Contacts), they have a nice magnifying glass icon at the top of the table view index. Since the table view index API is character-based, I assume that this magnifying glass is a Unicode character. So far I've resorted to placing a ...
{ "language": "en", "url": "https://stackoverflow.com/questions/235120", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "57" }
Q: Can you do ajax without using ASP.net ajax toolkit? Can you do ajax on ASP.net webform without using ajax toolkit? (Please post a example link) A: yes... see my example in this post AJAX - How to Pass value back to server This can perform much better than ASP.NET ajax, but does take longer to code. A: Sure. Peop...
{ "language": "en", "url": "https://stackoverflow.com/questions/235127", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How can I know when .aspx call is finished? I am building a Flex Application that calls a .aspx page on the same webserver which builds a PDF report using SQL Reporting Services. When the report is built it prompts the user to open or save the PDF. We are trying to find a way to display a Progress Bar to let the use...
{ "language": "en", "url": "https://stackoverflow.com/questions/235145", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: ToolStrip Overflow I need to replace the standard Overflow function in a ToolStrip to a "More..." button which would then pop up a menu with the overflowed items. Does anyone have any ideas about how to accomplish this? A: I wrote something very similar to this awhile ago. The code I used is pasted below, and you...
{ "language": "en", "url": "https://stackoverflow.com/questions/235146", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Where should caching occur in an ASP.NET MVC application? I'm needing to cache some data using System.Web.Caching.Cache. Not sure if it matters, but the data does not come from a database, but a plethora of custom objects. The ASP.NET MVC is fairly new to me and I'm wondering where it makes sense for this caching to...
{ "language": "en", "url": "https://stackoverflow.com/questions/235147", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: Implement zip using foldr I'm currently on chapter 4 of Real World Haskell, and I'm trying to wrap my head around implementing foldl in terms of foldr. (Here's their code:) myFoldl :: (a -> b -> a) -> a -> [b] -> a myFoldl f z xs = foldr step id xs z where step x g a = g (f a x) I thought I'd try to implement ...
{ "language": "en", "url": "https://stackoverflow.com/questions/235148", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "22" }
Q: Game programming - How to avoid reinventing the wheel Summary: Can I program a "thick client" game in C without reinventing wheels, or should I just bite the bullet and use some library or SDK? I'm a moderate C programmer and am not afraid to work with pointers, data structures, memory locations, etc. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/235151", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Redirect .NET StreamWriter output to a String variable I'd like to know if it is possible to redirect StreamWriter output to a variable Something like String^ myString; StreamWriter sw = gcnew StreamWriter([somehow specify myString]) sw->WriteLine("Foo"); then myString will contain Foo. The reason I would like to d...
{ "language": "en", "url": "https://stackoverflow.com/questions/235156", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "38" }
Q: How do I set up ObjectDataSource select parameters at runtime I'm trying to add parameters to an objectDataSource at runtime like this: Parameter objCustomerParameter = new Parameter("CustomerID", DbType.String, customerID); Parameter objGPDatabaseParameter = new Parameter("Database", DbType.String, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/235166", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "21" }
Q: Submit issues - send to 2 locations at once How can I Submit an InfoPath form to a SharePoint library AND to an email box at the same time when the user hits SUBMIT? I need my form to be approved by several users in a particular order; then re-submitted to the SharePoint site, and to another email box so that the ne...
{ "language": "en", "url": "https://stackoverflow.com/questions/235167", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Where to find the best user story template? I want to implement user stories in a new project where can i find a good template or other ones used in agile development? A: a better one that focuses user's goal more is: In order to <accomplish a goal>, as a <user> I want to <do something> this format encourages eve...
{ "language": "en", "url": "https://stackoverflow.com/questions/235188", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "35" }
Q: Trailing slashes in Pylons Routes What is the best way to make trailing slashes not matter in the latest version of Routes (1.10)? I currently am using the clearly non-DRY: map.connect('/logs/', controller='logs', action='logs') map.connect('/logs', controller='logs', action='logs') I think that turning minimizatio...
{ "language": "en", "url": "https://stackoverflow.com/questions/235191", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Convert HTML back to Markdown for editing in wmd I am curious to do what happens when you edit a post on this site. I am using wmd for my markdown editor, of course when I goto edit, I get the HTML it generated not the markdown like on stackoverflow. Now, is there a way I can store both? or is it reliable enough t...
{ "language": "en", "url": "https://stackoverflow.com/questions/235224", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: Problem with editing Template Monster .fla file I am having the worst luck with this. We bought a template to update our own website (don't have enough time to start our own from scratch!) but when I make simple changes in the Flash CS4 native file and re-export the swf, it doesn't work correctly! I am wondering if ...
{ "language": "en", "url": "https://stackoverflow.com/questions/235226", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I add a form to a view with drupal 6.x views 2? I want to add a drupal form to the top of a view. The view does not need to receive the results of the form but the _submit hook of the form should be able to read the first argument of the view that the form was on. Where is the best place to add this? Custom...
{ "language": "en", "url": "https://stackoverflow.com/questions/235228", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to avoid Outlook security alert when reading outlook message from C# program I have a requirement of reading subject, sender address and message body of new message in my Outlook inbox from a C# program. But I am getting security alert 'A Program is trying to access e-mail addresses you have stored in Outlook. D...
{ "language": "en", "url": "https://stackoverflow.com/questions/235231", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: ASP.NET MVC - Should business logic exist in controllers? Derik Whitaker posted an article a couple of days ago that hit a point that I've been curious about for some time: should business logic exist in controllers? So far all the ASP.NET MVC demos I've seen put repository access and business logic in the controlle...
{ "language": "en", "url": "https://stackoverflow.com/questions/235233", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "100" }
Q: JQuery and YUI, can they live together? Can JQuery and YUI live together w/o any conflicts? A: Yes YUI3 uses YUI object, jQuery uses $. For instance you can use YUI 3 Test module and inside it using $ for DOM manipulation/traversing (I think jQuery is really good for those purposes), so for instance you can do: YUI...
{ "language": "en", "url": "https://stackoverflow.com/questions/235236", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: General Business Object Practices (and exception errors - redux) Recently, I made a post about the developers I'm working with not using try catch blocks properly, and unfortuantely using try... catch blocks in critical situations and ignoring the exception error all together. causing me major heart ache. Here is a...
{ "language": "en", "url": "https://stackoverflow.com/questions/235240", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: In Silverlight, how to launch / navigate to another page? In Silverlight how can I launch / navigate to another page? A: System.Windows.Browser.HtmlPage.Window.Navigate( new Uri( "http://www.google.com" ), "_blank" ); You can leave out the target ("_blank") if you just want to navigate within your current...
{ "language": "en", "url": "https://stackoverflow.com/questions/235248", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: What are the benefits of maintaining a "clean" list of using directives in C#? I know VS2008 has the remove and sort function for cleaning up using directives, as does Resharper. Apart from your code being "clean" and removing the problem of referencing namespaces which might not exist in the future, what are the be...
{ "language": "en", "url": "https://stackoverflow.com/questions/235250", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: How can I run Cygwin Bash Shell from within Emacs? I am running GNU Emacs on Windows so entering: M-x shell launches the Windows command-line DOS shell. However, I would like to instead be able to run the Cygwin Bash Shell (or any other non-Windows shell) from within Emacs. How can this be easily done? A: The best...
{ "language": "en", "url": "https://stackoverflow.com/questions/235254", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "39" }
Q: JFileChooser use within JApplet Can a JApplet use a JFileChooser so that the user can select a file on his hard-drive? Or would this violate Java applet security? (I'm assuming that the default security settings are being used. I don't want to ask my users to grant me extra permissions.) A: This thread indicates...
{ "language": "en", "url": "https://stackoverflow.com/questions/235258", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How to connect to 2 databases at the same time in PHP I am trying to connect to 2 databases on the same instance of MySQL from 1 PHP script. At the moment the only way I've figured out is to connect to both databases with a different user for each. I am using this in a migration script where I am grabbing data from ...
{ "language": "en", "url": "https://stackoverflow.com/questions/235264", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: How can I make my regex match the first pattern instead of the last? I'm probably doing this all wrong. I have a text file full of data and I want to match and replace patterns of "item" and "catalog number" that are in the file. But the order of each element in the file is very important, so I want to match/replace...
{ "language": "en", "url": "https://stackoverflow.com/questions/235272", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Touchscreen-Oriented Website Development Recommendations for Non-Microsoft Platform We are currently designing a website that will be accessed from kiosks in a museum. Users will need to be able to browse through a number of different web pages that will currently contain static HTML content as well as go through va...
{ "language": "en", "url": "https://stackoverflow.com/questions/235281", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: With Spring Webflow 2, what request parameters, if any, are necessary to trigger "submit" transition from view-state? My view-state to action-state transition does not appear to be happening. In the following example, I want the view-state to transition to the action-state when the user submits the form. Pretty ba...
{ "language": "en", "url": "https://stackoverflow.com/questions/235282", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Why do browsers not have a file upload progress bar? I wonder why no browser out there has such simple but essential feature. Am I missing something? Is there a technical reason? I'm tired of all those javascript/flash/java hacks out there ... A: There is no technical reason preventing the browser from calculating ...
{ "language": "en", "url": "https://stackoverflow.com/questions/235284", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: How can I list the methods of a JavaScript object in VS command window? When debugging JavaScript in Visual Studio 2008 and I use the ? command in the command window to list a JavaScript object's members I always get that ellipses {...}. Example: >? Page_Validators {...} [0]: {object} [1]: {object} [2]...
{ "language": "en", "url": "https://stackoverflow.com/questions/235289", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: One-to-many relationship in the same table Im trying to use to define a one-to-many relationship in a single table. For example lets say I have a Groups table with these entries: Group: Group_1: name: Atlantic Records Group_2: name: Capital Records Group_3: name: Gnarls Barkley Group_4: name...
{ "language": "en", "url": "https://stackoverflow.com/questions/235295", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Are there better clients for viewing System Monitor logs? Does anyone know of a better GUI client for displaying Windows System Monitor log files? (System Monitor is sometimes called Performance Monitor.) I'm trying to track a long-term memory leak in a C# application running on Windows XP or 2K3 by comparing memory...
{ "language": "en", "url": "https://stackoverflow.com/questions/235310", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What is the lightest Java Virtual Machine ever? (except KVM) I'd like to install Java on a Psion 5MX with GNU/Linux 16MB RAM machine, will it be possible? Unfortunatly, "KVM must be installed by the manufacturer". What I want is to be able to is to write basic Java code, test and sketch simple algorithms. Important...
{ "language": "en", "url": "https://stackoverflow.com/questions/235315", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Simplest, safest way of holding a bunch of const char* in a set? I want to hold a bunch of const char pointers into an std::set container [1]. std::set template requires a comparator functor, and the standard C++ library offers std::less, but its implementation is based on comparing the two keys directly, which is ...
{ "language": "en", "url": "https://stackoverflow.com/questions/235326", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Why is the http auth UI so poor in browsers? Why isn't there a logout button? Why no list of "websites you're logged into"? Is it because of some issue with the HTTP specs? Life would be much easier for web developers if they could actually rely on HTTP auth ... A: As far as HTTP is concerned, it is stateless. One ...
{ "language": "en", "url": "https://stackoverflow.com/questions/235327", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Looking for pattern/approach/suggestions for handling long-running operation tied to web app I'm working on a consumer web app that needs to do a long running background process that is tied to each customer request. By long running, I mean anywhere between 1 and 3 minutes. Here is an example flow. The object/widget...
{ "language": "en", "url": "https://stackoverflow.com/questions/235345", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do you save outline toggles between restarts of VS2008? Does anyone know a trick in Visual Studio 2008 to make it remember the outline toggles you have in place on aspx files between restarts? (the little plus or minus symbol on the left for code blocks) In the code behind cs file it remembers the toggle on the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/235348", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Newsletter slow sending - delay between 2 mails to the same server / max e-mails per hour? I have to make a newsletter sending utility application which will collect the list of subscriber from our central database and send out the newsletter. I've considered the possibility to be blacklisted due to flooding if I ju...
{ "language": "en", "url": "https://stackoverflow.com/questions/235349", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What is the scope of a function in Javascript/ECMAScript? Today I had a discussion with a colleague about nested functions in Javascript: function a() { function b() { alert('boo') } var c = 'Bound to local call object.' d = 'Bound to global object.' } In this example, trials point out that b is n...
{ "language": "en", "url": "https://stackoverflow.com/questions/235360", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: Override the compiler attribute in an Ant javac task I'm trying to override Ant compiler attributes via the command line so that all 'javac' tasks use my specified compiler. The problem I've run into is that any target that sets its own value for compiler overrides the one that I set at the commmand line. So, even ...
{ "language": "en", "url": "https://stackoverflow.com/questions/235363", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Can an application find out information about currently playing song on iPhone/iPod Touch? I've searched around a bit in the small amount of iPhone/iPod Touch development information available and couldn't find anything for or against. Can an application find out information about currently playing song on iPhone/i...
{ "language": "en", "url": "https://stackoverflow.com/questions/235369", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: CSS and Safari/Chrome I've been trying to modify the following menu to make it look indentical in IE, Firefox, and Safari/Chrome but I can't seem to get it to look right in Safari/Chrome. Could anyone tell me how to fix it? When viewed in Safari or Chrome, notice that the menu is ignoring the padding. View flickr-l...
{ "language": "en", "url": "https://stackoverflow.com/questions/235373", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: C++ dynamic class ( dynamic hack ) Is there any way to add a field to a class at runtime ( a field that didn't exist before ) ? Something like this snippet : Myobject *ob; // create an object ob->addField("newField",44); // we add the field to the class and we assign an initial value to it printf("%d",ob->newField);...
{ "language": "en", "url": "https://stackoverflow.com/questions/235376", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: General question, what do you want from a web framework? In a MVC application, what are some of the components that make up the application. What tools and functionality is missing that you would like to have. Regardless of the server-side language, what would you want? I see a lot in my code where I code some muc...
{ "language": "en", "url": "https://stackoverflow.com/questions/235379", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Functional Spec & Agile Processes In traditional Waterfall, requirements were gathered - typically in a MS-Word document - following an esoteric template. In a "strict" waterfall model, this document is frozen after the requirement phase and a Change Control / Change Management process is responsible for introducin...
{ "language": "en", "url": "https://stackoverflow.com/questions/235383", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Using NaN in C++? What's the best way to use NaNs in C++? I found std::numeric_limits<double>::quiet_NaN() and std::numeric_limits<double>::signaling_NaN(). I'd like to use signaling_NaN to represent an uninitialized variable as follows: double diameter = std::numeric_limits<double>::signaling_NaN(); This, however...
{ "language": "en", "url": "https://stackoverflow.com/questions/235386", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "33" }
Q: Uploading file from web user to server using ASP I am trying to find out how to upload a file from a web user to a server using an ASP page. The displayed page has an Input tag of type "File" like this: <input type="file" name="uploadfile"> And a submit button that passes the Form info to another .ASP page. This ...
{ "language": "en", "url": "https://stackoverflow.com/questions/235391", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: When is theoretical computer science useful? In class, we learned about the halting problem, Turing machines, reductions, etc. A lot of classmates are saying these are all abstract and useless concepts, and there's no real point in knowing them (i.e., you can forget them once the course is over and not lose anything...
{ "language": "en", "url": "https://stackoverflow.com/questions/235394", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "28" }
Q: Unit testing large data sets? What's the best way to unit test large data sets? Some legacy code that I'm maintaining has structures of a hundred members or more; other parts of the code that we're working on create or analyze data sets of hundreds of samples. The best approach I've found so far is to serialize the...
{ "language": "en", "url": "https://stackoverflow.com/questions/235402", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Compare double in VBA precision problem I have trouble comparing 2 double in Excel VBA suppose that I have the following code Dim a as double Dim b as double a = 0.15 b = 0.01 After a few manipulations on b, b is now equal to 0.6 however the imprecision related to the double data type gives me headache because if a...
{ "language": "en", "url": "https://stackoverflow.com/questions/235409", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: Is there an Internet Explorer approved substitute for selectionStart and selectionEnd? Finding out what's selected in real browsers is as simple as: var range = { start: textbox.selectionStart, end: textbox.selectionEnd } But IE, as usual, doesn't understand. What's the best cross-browser way to do this? A: IE...
{ "language": "en", "url": "https://stackoverflow.com/questions/235411", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: how do I implement a custom code page used by a serial device so I can convert text to it in Python? I have a scrolling LED sign that takes messages in either ASCII or (using some specific code) characters from a custom code page. For example, the euro sign should be sent as <U00> and ä is <U64> (You can find the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/235416", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Aggregate adjacent only records with T-SQL I have (simplified for the example) a table with the following data Row Start Finish ID Amount --- --------- ---------- -- ------ 1 2008-10-01 2008-10-02 01 10 2 2008-10-02 2008-10-03 02 20 3 2008-10-03 2008-10-04 01 38 4 20...
{ "language": "en", "url": "https://stackoverflow.com/questions/235418", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Is there a standard way to do findfirst, findnext with gcc on linux using stl? I can't seem to find the _findfirst / findfirst, _findnext / findnext API on gcc for Linux, and would actually rather use the Standard Template Library (STL) for that if it is included there. Does anyone know what API there is available f...
{ "language": "en", "url": "https://stackoverflow.com/questions/235422", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Visual Studio 2008 Syntax Coloring Problem In a VB.NET Web Site, the User Types syntax coloring doesn't work. What are potential causes of this? Note: C# works as expected. Update: It seems to not understand the difference between a "User Type" and an "Identifier." A: This may not be your problem, but you can ch...
{ "language": "en", "url": "https://stackoverflow.com/questions/235423", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Environment Variables in Python on Linux Python's access to environment variables does not accurately reflect the operating system's view of the processes environment. os.getenv and os.environ do not function as expected in particular cases. Is there a way to properly get the running process' environment? To demons...
{ "language": "en", "url": "https://stackoverflow.com/questions/235435", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: How do I load a file into a Perl hash? Given the following file: department=value1 location=valueA location=valueB department=value2 I use the following to load the file into a Perl hash: use File::Slurp; use Data::Dumper; my %hash = map { s/#.*//; s/^\s+//; s/\s+$//; m/(.*?)\s*=\s*(.*)/; } read_file($f...
{ "language": "en", "url": "https://stackoverflow.com/questions/235437", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Vim 80 column layout concerns The way I do 80-column indication in Vim seems incorrect:set columns=80. At times I also set textwidth, but I want to be able to see and anticipate line overflow with the set columns alternative. This has some unfortunate side effects: * *I can't set number for fear of splitting bet...
{ "language": "en", "url": "https://stackoverflow.com/questions/235439", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "428" }
Q: Removing Items From IDictionary With Recursion Anybody have a slicker way to do this? Seems like it should be easier than this, but I'm having a mental block. Basically I need to remove items from an dictionary and recurse into the values of the items that are also dictionaries. private void RemoveNotPermittedItem...
{ "language": "en", "url": "https://stackoverflow.com/questions/235446", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: C# How do I sort the columns in a datagrid into alphabetical order? How do I sort the columns in a winforms datagrid control into alphabetical order? Thanks A: Have you tried binding the DataGrid to a DataTable object (instead of a view) and turning setting the "AllowSorting" property to true on the DataGrid? I bel...
{ "language": "en", "url": "https://stackoverflow.com/questions/235450", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Access to Modified Closure string [] files = new string[2]; files[0] = "ThinkFarAhead.Example.Settings.Configuration_Local.xml"; files[1] = "ThinkFarAhead.Example.Settings.Configuration_Global.xml"; //Resharper complains this is an "access to modified closure" for (int i = 0; i < files.Length; i++ ) { // Reshar...
{ "language": "en", "url": "https://stackoverflow.com/questions/235455", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "323" }
Q: How to effectively implement sessions in GAE? I was wondering about implementing my own sessions (more for an exercise than anything else) for a GAE app I'm working ... at first I was thinking of using the datastore to store the session data. However, every time something needs to be added to the session 'bucket', i...
{ "language": "en", "url": "https://stackoverflow.com/questions/235470", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Good FAQ For Recompiling apps with GCC for AmigaOS? There are a couple of open source apps I am trying to recompile to work under amigaOS. Can someone point me to a good step-by-step guide explaining what changes (from a rule-of-thumb standpoint) I need to make to the source before it'll compile? A: Here's a good ...
{ "language": "en", "url": "https://stackoverflow.com/questions/235480", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Resources for getting started with MCML? Can anyone suggest some references or other resources that are useful in learning MCML? I have a small pet project I have been working on for a while using C# and .Net 3.5. I have reached a point where I want to be able to send output from it to Windows Media Center, but I ha...
{ "language": "en", "url": "https://stackoverflow.com/questions/235484", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Is my OCaml implementation of SHA256 sane? I'm a novice OCaml programmer and thought I would throw myself into the deep end by attempting to implement a very tricky algorithm. I'm open to all criticisms great and small be they stylistic or security or performance related. One criticism that I'm already aware of i...
{ "language": "en", "url": "https://stackoverflow.com/questions/235493", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to create a button with drop-down menu? Is there a way to show IE/Firefox Back button style, dropdown menu button? A: Sure. Put a toolbar on the page. Right-click on the toolbar, add a button. Set the button's style to tbsDropDown. Put a PopupMenu on the page. Double click on the PopupMenu to define menu it...
{ "language": "en", "url": "https://stackoverflow.com/questions/235498", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Validating Crontab Entries with PHP What is the best way to validate a crontab entry with PHP? Should I be using a regex, or an external library? I've got a PHP script that adds/removes entries from a crontab file, but want to have some way to verify that the time interval portion is in a valid format. A: Hmmm, int...
{ "language": "en", "url": "https://stackoverflow.com/questions/235504", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Hierarchical Queries in SQL Server 2005 Way back when I was working in an Oracle shop I took the CONNECT_BY for granted. Now I'm stuck working with SQL Server 2005 and have some nasty object hierarchies. Specifically, we have a self referencing table where all child records have a column with their parent's id. C...
{ "language": "en", "url": "https://stackoverflow.com/questions/235515", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: ASP.NET Container-Specific Master Pages for Safari or Chrome Has anyone been able to create Container-Specific Master Pages for Safari or Chrome? I can't find any ".browser" files for either of these. How often is the %SystemRoot%\Microsoft.NET\Framework\version\CONFIG\Browsers directory updated? Thanks A: for .br...
{ "language": "en", "url": "https://stackoverflow.com/questions/235533", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Is it possible to squash all changes from a branch in TFS into one commit? For personal projects I use Git for SCM, but at work we use TFS. One thing that I like about Git is that it allows a person to easily squash all the changes made in a branch when pulling the changes back into the master branch. The benefit o...
{ "language": "en", "url": "https://stackoverflow.com/questions/235555", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How can I randomly show a set of elements using jQuery? Using jQuery, how would you show() every div.foo on a page in a random order, with a new one appearing every X milliseconds? Clarification: I want to start with all these elements hidden and end with all of them showing, so it wouldn't make sense to show() the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/235556", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How do I stop bots from incrementing my file download counter in PHP? When a user clicks a link to download a file on my website, they go to this PHP file which increments a download counter for that file and then header()-redirects them to the actual file. I suspect that bots are following the download link, howeve...
{ "language": "en", "url": "https://stackoverflow.com/questions/235558", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: How do you detect low memory situations within the java virtual machine? I've been getting some OutOfMemory errors lately in my application. Is it possible to detect ahead of time when the virtual machine is running low on memory? In other words to preemptively deal with OutOfMemory errors before they actually occur...
{ "language": "en", "url": "https://stackoverflow.com/questions/235560", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Is it possible to throw a MessageQueueException? I am using a mock object in RhinoMocks to represent a class that makes calls to MessageQueue.GetPublicQueues. I want to simulate the exception thrown when message queueing is operating in workgroup mode, which is a MessageQueueException, to ensure that I am catching t...
{ "language": "en", "url": "https://stackoverflow.com/questions/235564", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Can the overall implementation of a component be divided in two objects? I've seen with Microsoft COM and XPCOM, at least from what I've read and gathered so far, that the implementations of interfaces in a component have to essentially be in the single class that derives all the virtual interfaces. Is this correct?...
{ "language": "en", "url": "https://stackoverflow.com/questions/235570", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }