text
stringlengths
8
267k
meta
dict
Q: WinHttp Gets 404 File Not Found I am grabbing a webpage with WinHttp and the resulting page is the site's 404 file not found page. I know that the code works as I have tested it with other websites. The page in question is a normal http protocol and .html file. What can I do? A: You don't give a whole lot to go o...
{ "language": "en", "url": "https://stackoverflow.com/questions/349965", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I stop links from wrapping in DNN 4.9.x I am having a problem with links wrapping. How do I prevent this? ![Wordwrap][1] [1]: A: You might try the <nobr> tag. for example: <nobr><a href="#">my long link</a></nobr>
{ "language": "en", "url": "https://stackoverflow.com/questions/349974", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Understanding imported WAR in Eclipse and its folder structure I have just imported a WAR file from an external site, which is basically a servlet into Eclipse IDE (the project runs on Apache-Tomcat). When I import it it has a folder called Web App Libraries. So here are a few of my newbie questions: * *I am un...
{ "language": "en", "url": "https://stackoverflow.com/questions/349978", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Execute a SQL stored proc from a SQL view I am finding that calling a stored proc in Excel is not as easy as it should be, but calling a view, or a direct table is very easy. So, how can I create a view that will call a stored proc with no params? I know I won't be able to pass any values into the view, and I don't ...
{ "language": "en", "url": "https://stackoverflow.com/questions/349979", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Friendly Byte Formatting in Rails I need to format an integer representation of bytes into something friendly, and I'm hoping that there's a utility function in Ruby or in Rails that will do that formatting for me (to perpetuate my laziness, of course.) I'm looking for something that would look like: format_bytes(10...
{ "language": "en", "url": "https://stackoverflow.com/questions/349980", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: What does this Regular Expression do $pee = preg_replace( '|<p>|', "$1<p>", $pee ); This regular expression is from the Wordpress source code (formatting.php, wpautop function); I'm not sure what it does, can anyone help? Actually I'm trying to port this function to Python...if anyone knows of an existing port alre...
{ "language": "en", "url": "https://stackoverflow.com/questions/349997", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: bulk insert with or without index In a comment I read Just as a side note, it's sometimes faster to drop the indices of your table and recreate them after the bulk insert operation. Is this true? Under which circumstances? A: Yes, it is true. When there are indexes on the table during an insert, the server will ...
{ "language": "en", "url": "https://stackoverflow.com/questions/350003", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Algorithm for best suiting people's choices from a definite list of items where there is only one of each available? Ladies and Gents, My best friends and I do a "Secret Santa" type gift exchange every year, this year I've been trying to think of a couple of ways to make it interesting. There are six of us involved ...
{ "language": "en", "url": "https://stackoverflow.com/questions/350005", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Scalability Case Studies I'm starting to build a community website from the site up and my web framework will be Asp.net and Mysql. I want to start planning some scalability into the infrastructure early because I'm anticipating high traffic when the site goes live. Are there any case studies which you recommend rea...
{ "language": "en", "url": "https://stackoverflow.com/questions/350009", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How can I combine hashes in Perl? What is the best way to combine both hashes into %hash1? I always know that %hash2 and %hash1 always have unique keys. I would also prefer a single line of code if possible. $hash1{'1'} = 'red'; $hash1{'2'} = 'blue'; $hash2{'3'} = 'green'; $hash2{'4'} = 'yellow'; A: For hash r...
{ "language": "en", "url": "https://stackoverflow.com/questions/350018", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "106" }
Q: Setting WPF image source in code I'm trying to set a WPF image's source in code. The image is embedded as a resource in the project. By looking at examples I've come up with the below code. For some reason it doesn't work - the image does not show up. By debugging I can see that the stream contains the image data. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/350027", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "361" }
Q: Cross-platform executable/runtime delivery method I need assistance finding a delivery method that best fulfills the following requirements: * *We wish to deliver a single file to my clients. *Clients should be able to launch this file from the operating system shell - much like running an '.exe' on Windows. *A...
{ "language": "en", "url": "https://stackoverflow.com/questions/350036", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to instruct cron to execute a job every second week? I would like to run a job through cron that will be executed every second Tuesday at given time of day. For every Tuesday is easy: 0 6 * * Tue But how to make it on "every second Tuesday" (or if you prefer - every second week)? I would not like to implement a...
{ "language": "en", "url": "https://stackoverflow.com/questions/350047", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "86" }
Q: How do you dispose of an IDisposable in Managed C++? I'm trying to Dispose of an IDisposable object(FileStream^ fs) in managed C++ (.NET 2.0) and am getting the error Dispose' : is not a member of 'System::IO::FileStream It says that I should invoke the destructor instead. Will calling fs->~FileStream(); call the...
{ "language": "en", "url": "https://stackoverflow.com/questions/350052", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "21" }
Q: PHP Frameworks - Are they solely personal preference? I'm new to the world of PHP frameworks and, after some initial investigation, came up with the following list of popular choices: * *CakePHP *CodeIgniter *Symfony *Zend I'm trying not to repeat the "Which is best?" question, which seems to elicit not much...
{ "language": "en", "url": "https://stackoverflow.com/questions/350053", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Java equivalent of std::deque I'm a relatively new Java programmer coming from C++/STL, and am looking for a class with these characteristics (which the C++ std::deque has, as I understand it): * *O(1) performance for insertion/removal at the beginning/end *O(1) performance for lookup by index *are growable col...
{ "language": "en", "url": "https://stackoverflow.com/questions/350063", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: IIS Anonymous user authentication doesn't work with AD credentials I have an asp.net application directory, and I want to use anonymous authentication in the Directory Sercurity tab. If I use the pre-Windows 2000 style DOMAIN\USERNAME for the username, everything is fine. If I use the AD-style (UPN) usename@domain.l...
{ "language": "en", "url": "https://stackoverflow.com/questions/350065", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How can I run an app at a specified time on the iPhone? I'm developing a todo list application. I'm looking for any way to alert the user when a task becomes due, even if the app is not running. Is there any way to set the program to run at a specified time w/out user interaction? Or a way to bring up an alert an...
{ "language": "en", "url": "https://stackoverflow.com/questions/350067", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do I supply the FROM clause of a SELECT statement from a UDF parameter In the application I'm working on porting to the web, we currently dynamically access different tables at runtime from run to run, based on a "template" string that is specified. I would like to move the burden of doing that back to the datab...
{ "language": "en", "url": "https://stackoverflow.com/questions/350081", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: DOS system path Is there a way to programmatically, through a batch file (or powershell script), put all folders in c:\Program Files into the system variable PATH? I'm dependent on the command line and really want to just start a program from the command line. Yes, I'm jealous of Linux shells. A: Passing in "C:\Pro...
{ "language": "en", "url": "https://stackoverflow.com/questions/350095", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Server Controls and View State Ok time to show my complete lack of knowladge for all things web forms but here goes. I am extending the Panel control and OnPreRender sticking some additional controls inside of it (lets just say 1 textbox for simplicity). From here I am just letting the Panels Render method do its th...
{ "language": "en", "url": "https://stackoverflow.com/questions/350101", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to dynamically invoke a chain of delegates in VB.NET Does someone knows if it's possible to dynamically create a call chain and invoke it? Lets say I have two classes A & B: public class A public function Func() as B return new B() end function end class public class B public function Name() ...
{ "language": "en", "url": "https://stackoverflow.com/questions/350120", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Using MAPI w/ C++, how can I open another user's Inbox? I'm looking to write an automated monitor script to programmatically retrieve information from another user's Exchange 2003 inbox. I have working C++ code to log into MAPI and connect to my own inbox. I can also use the Control Panel->Mail applet to configure...
{ "language": "en", "url": "https://stackoverflow.com/questions/350124", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: LINQ Query to Return multiple results I am trying to write a textbox that will search on 5 DB columns and will return every result of a given search, ex. "Red" would return: red ball, Red Williams, etc. Any examples or similar things people have tried. My example code for the search. Thanks. ItemMasterDataCo...
{ "language": "en", "url": "https://stackoverflow.com/questions/350126", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Is the iPhone "cron-able"? Note - I have not delved very deeply into Apple's iPhone SDK yet. However, based on another question asked recently, I'm wondering if, since the iPhone is running some stripped-down edition of Mac OS X if it doesn't have a crontab feature. If so, how would you access it? Thanks. A: The i...
{ "language": "en", "url": "https://stackoverflow.com/questions/350128", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How do I check to see if a Smarty variable is already assigned? How do I check to see if a particular value has already been assigned to Smarty and if not assign a (default) value? Answer: if ($this->cismarty->get_template_vars('test') === null) { $this->cismarty->assign('test', 'Default value'); } A: Smarty 2 ...
{ "language": "en", "url": "https://stackoverflow.com/questions/350129", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: asp.net gridview vs writing innerhtml Are there any performance benefits to me not using the gridview in asp.net for simple tables querying from a stored procedure and instead writing the html in server code myself. I'm sure my code would certainly be more concise in output. A: I am going to propose an alternate so...
{ "language": "en", "url": "https://stackoverflow.com/questions/350131", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: porting iPhone openGLES app to OSX? Developing for the iPhone has been my first experience with objective-c and first in-depth experience with xcode. How difficult would it be to port an openGLES iPhone app to the OSX desktop using openGL? I am not asking about user interface - obviously there is no equivalent to c...
{ "language": "en", "url": "https://stackoverflow.com/questions/350139", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Vim: NERD_tree Plugin. Need help understanding a bloggers .vimrc addition to streamline this plugin So I'm basically a beginner when it comes to Vim, nonetheless I do know the basic things (open files, edit, move around, basic grep, .vimrc, etc) I would submit this link first http://weblog.jamisbuck.org/2008/11/17/v...
{ "language": "en", "url": "https://stackoverflow.com/questions/350140", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to find out what group a given user has? In Unix/Linux, how do you find out what group a given user is in via command line? A: groups or groups user A: On Linux/OS X/Unix to display the groups to which you (or the optionally specified user) belong, use: id -Gn [user] which is equivalent to groups [user] uti...
{ "language": "en", "url": "https://stackoverflow.com/questions/350141", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "279" }
Q: How do I set LC_ALL and LANG under IIS? I am trying to run some Perl CGI scripts under IIS. I get the following message : CGI Error The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are: perl: warning: Setting locale failed. perl: warning: Please c...
{ "language": "en", "url": "https://stackoverflow.com/questions/350150", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How modular should be a XML schema? Talking about schema definitions, what are you used to doing: * *put everything inside a unique and big bang XML schema? *use a domain modularization approach, putting all entities that referes to the same context together? *or just use a schema per entity? I´ve read in a b...
{ "language": "en", "url": "https://stackoverflow.com/questions/350158", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Using XTemplate with SimpleStore in Ext I am currently adding some functionality to some old code. There used to be a template which took a flat array of items and spat out some HTML, now the data is coming from a simple store which reads some JSON.. var allwords = [ ['abacteriano', 'abacteriano'], ['abacter...
{ "language": "en", "url": "https://stackoverflow.com/questions/350163", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Lib to protect SQL/javascript injection for java/jsp Anyone know a good lib where i can run the strings before they are inserted, that can strip out sql/javascript code? To be run in jsp pages. Idealy the lib would be: * *Free *Lightweight *Easy to use Thanks in advance to the SO community who will happily re...
{ "language": "en", "url": "https://stackoverflow.com/questions/350177", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Dynamic logical expression parsing/evaluation in C# or VB? What is the best was to evaluate an expression like the following: (A And B) Or (A And C) Or (Not B And C) or (A && B) || (A && C) || (!B && C) At runtime, I was planning on converting the above expressions to the following: (True And False) Or (True And F...
{ "language": "en", "url": "https://stackoverflow.com/questions/350181", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Can Silverlight apps be embedded into PowerPoint? Can Silverlight apps be embedded into PowerPoint? We're currently weighing the pros and cons of Silverlight vs. Flash, and are primarily interested in charting controls. The higher-ups would like to have aesthetically appealing dynamic charts included in PowerPoint...
{ "language": "en", "url": "https://stackoverflow.com/questions/350183", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: char vs varchar for performance in stock database I'm using mySQL to set up a database of stock options. There are about 330,000 rows (each row is 1 option). I'm new to SQL so I'm trying to decide on the field types for things like option symbol (varies from 4 to 5 characters), stock symbol (varies from 1 to 5 chara...
{ "language": "en", "url": "https://stackoverflow.com/questions/350195", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Upgrade from Excel 2003 to 2007 results in "stack overflow error" on previously working vba The following VBA code works great in Excel 2003, but results in a Stack Overflow Error in Excel 2007. The code is required to either unlock or lock certain cells based on a drop-down menu selection. I need to be able to run...
{ "language": "en", "url": "https://stackoverflow.com/questions/350202", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Don't Change URL in Browser When Clicking I have an ASP.NET page that uses a menu based on asp:LinkButton control in a Master page. When a user selects a menu item, an onclick handler calls a method in my C# code. The method it calls just does a Server.Transfer() to a new page. From what I have read, this is not...
{ "language": "en", "url": "https://stackoverflow.com/questions/350207", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: WPF: use a ListBox in a template that will be the template of another ListBox I have a ListBox whose ItemSource is an ObjectDataProvider that is an instance of an ObservableCollection. The ObservableCollection is a collection of ObservableCollections. The ItemTemplate of the ListBox is a DataTemplate that creates a ...
{ "language": "en", "url": "https://stackoverflow.com/questions/350214", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Strange caching of .js file in firefox/tomcat/eclipse I'm developing .jsp using eclipse and tomcat. My .jsp outputs html to pull in some javascript from a .js file. The jsp outputs the code which hooks up the function mapTool to the mousedown event. imfMapFunctions5101.js contains the mapTool(e) function. The ch...
{ "language": "en", "url": "https://stackoverflow.com/questions/350220", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How does the VBA immediate window differ from the application runtime? I've encountered a very strange bug in VBA and wondered if anyone could shed some light? I'm calling a worksheet function like this: Dim lMyRow As Long lMyRow = WorksheetFunction.Match(vItemID, rngMyRange.Columns(1), 0) This is intended to get...
{ "language": "en", "url": "https://stackoverflow.com/questions/350227", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Conway's Game Of Life I am currently writting a programe about Conway's Game of life and I am really a beginner of python, I don't know how to start at all. Anybody can help me with it? A: http://plife.sourceforge.net/ Send the 50 quid to me :) (I'm kidding, of course) A: You probably don't need to pay to learn py...
{ "language": "en", "url": "https://stackoverflow.com/questions/350230", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-2" }
Q: Symfony VS CakePHP : which one is closest to PHP I'm mostly a Rails developer but sometimes, I have to code in PHP. Because stackoverflow.com prefers questions that can be answered, I'd like to have a idea which one of the two is closest to PHP? Sometimes, I'm under the impression that CakePHP is a outdated copy of ...
{ "language": "en", "url": "https://stackoverflow.com/questions/350232", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do I fix my output for floating-point imprecision? I am doing some float manipulation and end up with the following numbers: -0.5 -0.4 -0.3000000000000000004 -0.2000000000000000004 -0.1000000000000000003 1.10E-16 0.1 0.2 0.30000000000000000004 0.4 0.5 The algorithm is the following: var inc:Number = nextMultipl...
{ "language": "en", "url": "https://stackoverflow.com/questions/350240", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: RegEx for extracting HTML Image properties I need a RegEx pattern for extracting all the properties of an image tag. As we all know, there are lots of malformed HTML out there, so the pattern has to cover those possibilities. I was looking at this solution https://stackoverflow.com/questions/138313/how-to-extract-im...
{ "language": "en", "url": "https://stackoverflow.com/questions/350250", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Locating an element in a 'Facebox' box Heres my link: http://tinyurl.com/6j727e If you click on the link in test.php, it opens in a modal box which is using the jquery 'facebox' script. I'm trying to act upon a click event in this box, and if you view source of test.php you'll see where I'm trying to loacte the link...
{ "language": "en", "url": "https://stackoverflow.com/questions/350255", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How can I perform a reverse string search in Excel without using VBA? I have an Excel spreadsheet containing a list of strings. Each string is made up of several words, but the number of words in each string is different. Using built in Excel functions (no VBA), is there a way to isolate the last word in each string...
{ "language": "en", "url": "https://stackoverflow.com/questions/350264", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "185" }
Q: Best practices for memory limits in an IIS app pool I wanted to know what people used as a best practice for limiting memory on IIS [5/6/7]. I'm running on 32bit web servers with 4GB of physical memory, and no /3GB switch. I'm currently limiting my app pools to 1GB used memory. Is this too low? any thoughts? A: All...
{ "language": "en", "url": "https://stackoverflow.com/questions/350277", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Process start and Impersonation I have problem with starting processes in impersonated context in ASP.NET 2.0. I am starting new Process in my web service code. IIS 5.1, .NET 2.0 [WebMethod] public string HelloWorld() { string path = @"C:\KB\GetWindowUser.exe"; ProcessStartInfo startInfo = new ProcessStartIn...
{ "language": "en", "url": "https://stackoverflow.com/questions/350278", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How to restore minimized window without flicker I've made an expose-clone for Vista that sometimes need to restore a minimized window. I've managed to do this with the SetWindowPlacement function. The problem is that this also repaints the window which looks like crap after the window nicely has slided into the scre...
{ "language": "en", "url": "https://stackoverflow.com/questions/350287", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: When is it ok to disable event validation on a page? I am using ASP.NET ajax to dynamically add/remove controls from a page without using full postbacks. The UI is very complicated. Under certain scenarios, when a control on the page causes a full postback, after changing the controls via async postbacks, I get th...
{ "language": "en", "url": "https://stackoverflow.com/questions/350291", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do I get jQuery to select elements with a . (period) in their ID? Given the following classes and controller action method: public School { public Int32 ID { get; set; } publig String Name { get; set; } public Address Address { get; set; } } public class Address { public string Street1 { get; set; } p...
{ "language": "en", "url": "https://stackoverflow.com/questions/350292", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "184" }
Q: What is the earliest callback one can hook in the Rails Framework? I have found the before_dispatch and after_dispatch in dispatcher.rb but I need to access something earlier. Like around when Rails.public_path is defined. A: Not sure what you're trying to do, but you can take a look at config/boot.rb (don't change...
{ "language": "en", "url": "https://stackoverflow.com/questions/350298", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Rails plugin for API Key + Secret Key signing Is there a Rails plugin or a rubygem that gives you a starting point for adding an api to your Rails app? We want to use the API Key/Secret Key model, the API should also be versionable. Is there something out there that will give us some, if not all of this? A: Check...
{ "language": "en", "url": "https://stackoverflow.com/questions/350299", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: Web forwarding proxy in C# or PHP available? I have some shared server web hosting in the States (I'm from the UK), which allows me to publish PHP and .NET applications. I cannot install my own software onto the remote server, but I'd like to set up a web forwarding proxy for accessing sites that serve different con...
{ "language": "en", "url": "https://stackoverflow.com/questions/350303", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to know if a page is currently being read by the user with Javascript? I'm making a webpage with dynamic content that enters the view with AJAX polling. The page JS occasionally downloads updated information and renders it on the page while the user is reading other information. This sort of thing is costly to...
{ "language": "en", "url": "https://stackoverflow.com/questions/350308", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: ASP.NET ViewState postback with page refresh and bookmarks The ASP.NET ViewState feature can sometimes be a double edged sword. I rely on it on most of my projects and it speeds up development considerably. My problem is that sometimes users will try to refresh a page which will cause the viewstate to be lost, other...
{ "language": "en", "url": "https://stackoverflow.com/questions/350310", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Using Additional Data on Intermediate Table with NHibernate I'm working on a project that is used to input information about a product into a document. One section has a form that can be filled out as many times as needed for a particular product. The information on this form is then available to be shared on mult...
{ "language": "en", "url": "https://stackoverflow.com/questions/350311", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Easiest way to display XML on an ASP.NET page I have some XML in an XmlDocument, and I want to display it on an ASP.NET page. (The XML should be in a control; the page will have other content.) Right now, we're using the Xml control for that. Trouble is, the XML displays with no indentation. Ugly. It appears tha...
{ "language": "en", "url": "https://stackoverflow.com/questions/350314", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: One 400GB table, One query - Need Tuning Ideas (SQL2005) I have a single large table which I would like to optimize. I'm using MS-SQL 2005 server. I'll try to describe how it is used and if anyone has any suggestions I would appreciate it very much. The table is about 400GB, has 100 million rows and 1 million rows a...
{ "language": "en", "url": "https://stackoverflow.com/questions/350318", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Open a file in Visual Studio at a specific line number I have a utility (grep) that gives me a list of filenames and a line numbers. After I have determined that devenv is the correct program to open a file, I would like to ensure that it is opened at the indicated line number. In emacs, this would be: emacs +140 fi...
{ "language": "en", "url": "https://stackoverflow.com/questions/350323", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "59" }
Q: How can I have a portable Emacs? Is there a way run Emacs from a USB drive? I am a Windows user and I would like to be able use it on any PC without an Emacs install. A: You can read Emacs-related pages at PortableApps.com, and if they have not yet ported Emacs to their set of portable applications, then please ask...
{ "language": "en", "url": "https://stackoverflow.com/questions/350345", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "28" }
Q: Can I write SQL using speech recognition? I have wrist pain when I type and I would like to start writing SQL statements, stored procedure, and views using speech recognition. A: Yes. SQL is well-suited to speech recognition (as well-suited as a programming language can be, that is), given it's limited vocabulary a...
{ "language": "en", "url": "https://stackoverflow.com/questions/350348", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "38" }
Q: URL formatting tips for search engine optimization? I am looking for url encoding tips for SEO compliant site. I have a list of variables I need! hypen = used to split locations, Leeds-UK-England space = underscore for where spaces occur hypen = plus sign used in some british locations (stafford-upon-avon) forward ...
{ "language": "en", "url": "https://stackoverflow.com/questions/350352", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: "List Injection" in Unity? I've got a project coming up that will involve connecting to one to many backend systems through the same interface; let's call it IBacksideProvider. I'd like to use Unity to inject these providers at runtime. The problem is that since we're talking about 1...n backend systems, I'd need...
{ "language": "en", "url": "https://stackoverflow.com/questions/350353", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How can I generate GIF images in .NET? Is there a .NET library I can use to programmatically generate my own GIF images? At a minimum I'd like to build it pixel-by-pixel. Better would be support for text and shapes. Here's an example of what I'm trying to do. I mocked this up in Photoshop… Number line graphic http...
{ "language": "en", "url": "https://stackoverflow.com/questions/350354", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: For a web application, how to close all the related browser windows when session is timed out / user signs out? Suppose user has opened my web application in many different browser windows. After sometime he is timed out / sign out from the application. I want to close all the related browser windows. How can we han...
{ "language": "en", "url": "https://stackoverflow.com/questions/350372", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to conditionally deploy an app.config based on build configuration? I have three custom build configurations { Dev, Qs, Prd }. So, I have three app configs { Dev.config, Qs.config, Prd.config }. I know how to edit the .csproj file to output the correct one based on the current build configuration. <Target Name="...
{ "language": "en", "url": "https://stackoverflow.com/questions/350377", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: sudo nohup nice <-- in what order? So I have a script that I want to run as root, without hangup and nicely. What order should I put the commands in? sudo nohup nice foo.bash & or nohup nice sudo foo.bash & etc. I suspect it doesn't matter but would like some insight from those who really know. A: ~ $ sudo nohup n...
{ "language": "en", "url": "https://stackoverflow.com/questions/350381", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "22" }
Q: CodeRush Tricks of the Trade I was using CodeRush quite while ago and now I'm planning to use it again. I've installed the trial but I forgot all the cool features except Alt + Home (drop a marker). And when you don't know some cool tricks it's really like burning money (since it's not cheap for personal use). What ...
{ "language": "en", "url": "https://stackoverflow.com/questions/350383", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "33" }
Q: Problem implementing Paul Johnson's Web Widget code, it works in VS 2008 but not in deployment to IIS 6.0 Using the instructions from Paul Johnson's Web Widgets page I created my own custom widget. However because I was deploying to IIS 6.0 I utilized the web.config change recommended to render the page since the II...
{ "language": "en", "url": "https://stackoverflow.com/questions/350393", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Testing for whitespace in SQL Server I've got some blank values in my table, and I can't seem to catch them in an IF statement. I've tried IF @value = '' and if @value = NULL and neither one catches the blank values. Is there any way to test whether or not a varchar is entirely whitespace? AHA! Turns out I was test...
{ "language": "en", "url": "https://stackoverflow.com/questions/350400", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How do the Proxy, Decorator, Adapter, and Bridge Patterns differ? I was looking at the Proxy Pattern, and to me it seems an awful lot like the Decorator, Adapter, and Bridge patterns. Am I misunderstanding something? What's the difference? Why would I use the Proxy pattern versus the others? How have you used them i...
{ "language": "en", "url": "https://stackoverflow.com/questions/350404", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "459" }
Q: Optimally assigning tasks to workers I've been working on a comprehensive build system that performs distributed builds on multiple machines for quite some time now. It correctly handles dependencies and seemed to scale reasonably well, so we've added more projects and more machines, but it looks like it could perfo...
{ "language": "en", "url": "https://stackoverflow.com/questions/350411", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do I pass variables or parameters to a package from .NET? In C#, I am calling a SSIS package. I have to pass it 3 parameters, how do I do that? A: package.Variables["YOUR_VAR_1"].Value = "This is test"; package.Variables["YOUR_VAR_2"].Value = 100; Should do the trick.
{ "language": "en", "url": "https://stackoverflow.com/questions/350412", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do you reconcile common C++ naming conventions with those of the libraries Most C++ naming conventions dictate the use of camelCaseIdentifiers: names that start with an uppercase letter for classes (Person, Booking) and names that start with a lowercase letter for fields and variables (getPrice(), isValid(), lar...
{ "language": "en", "url": "https://stackoverflow.com/questions/350419", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "45" }
Q: Classic ASP gremlims, getting a  inserted into text whenever an HTML special character is used I'm working on an older classic ASP site, and there's a form that allows the user to enter some text (into a multiline textbox), and if they add an html character like ® (register trademark) it inserts it correctly. But w...
{ "language": "en", "url": "https://stackoverflow.com/questions/350429", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Visual Web Developer 2005 Express loads very slowly I admit that I am not a guru of Visual Studio products at all. I am using Visual Web Developer 2005 Express Edition and I'm trying to load someone else's project. This project happens to be a website with many pages. After loading VWD, it asks for a project to open...
{ "language": "en", "url": "https://stackoverflow.com/questions/350433", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Child controller updating a label for a cell in parent table view I have a navigation view with a cell that has something as simple as a Date of Birth. When that particular row is clicked, a new controller get pushed into view with a UIDatePicker. Once a new date is selected, I'd imagine I need to do something in vi...
{ "language": "en", "url": "https://stackoverflow.com/questions/350440", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to set selected row in ASP.NET GridView based on DataKey? I want something similar to the following pseudocode: myGridView.SelectedIndex = myGridView.DataKeys.IndexOf("mySpecificKey"); I've done some Intellisense exploring, but I haven't found an obvious way to do this. I would want to set SelectedIndex to -1 ...
{ "language": "en", "url": "https://stackoverflow.com/questions/350453", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: C# interop: excel process not exiting after adding new worksheet to existing file Possible Duplicate: How to properly clean up Excel interop objects in C# I've read many of the other threads here about managing COM references while using the .Net-Excel interop to make sure the Excel process exits correctly upon e...
{ "language": "en", "url": "https://stackoverflow.com/questions/350454", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Looking for a better way to change parent form's size I've got a simple application that shows pictures dragged onto it. I'd like the application to resize itself according to the picture it displays. The code below does just that: // Load the picture Bitmap picture = new Bitmap(s); // Calculate the size of the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/350463", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: SQL Stored Proc Collation Context Hey, I'm having an issue that appears to be related to collation, but I'm not sure. I'm developing against a backup of my production database. The only difference in the SQL Server 2005 environments (that I'm aware of right now) is that my localhost has "SQL_Latin1_General_CP1_CS_AS...
{ "language": "en", "url": "https://stackoverflow.com/questions/350469", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What tools do you recommend to profile Rails apps? I've been looking for profiling tools for Rails for a while. I'm currently playing and testing ruby-prof and railsbench, but I kinda frustrated with the amount of tweaking and mangling required to make then work. Althought I don't mind (much) the tweaking, I'd like ...
{ "language": "en", "url": "https://stackoverflow.com/questions/350470", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "45" }
Q: SQL Server Template-Driven Data Entry Question Based on the answers to this question about dynamically accessing tables, I've decided to take a couple steps back and get some advice on the larger picture. I am revisiting the database design of a Windows Forms application which I am rewriting for the Web using ASP.N...
{ "language": "en", "url": "https://stackoverflow.com/questions/350482", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: As a developer, what changes or installs, do you make on a vanilla OS X system? As an example these are some of the things I always do when starting a new machine: * *Install 'Visor' - gives you an always available HUD style terminal window via F1. *Install 'Clix' - run a million system customization command li...
{ "language": "en", "url": "https://stackoverflow.com/questions/350492", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: DataContractSerializer: Handling objects whose type you don't know and don't have access to I have a class (call it Container) which is serialized and deserialized using the DataContractSerializer. The class contains a collection of other classes, all of which inherit the same base class (call it ContentsBase), but ...
{ "language": "en", "url": "https://stackoverflow.com/questions/350499", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How to try convert a string to a Guid I did not find the TryParse method for the Guid. I’m wondering how others handle converting a guid in string format into a guid type. Guid Id; try { Id = new Guid(Request.QueryString["id"]); } catch { Id = Guid.Empty; } A: This will get you pretty close, and I use it ...
{ "language": "en", "url": "https://stackoverflow.com/questions/350500", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "217" }
Q: Initialize a collection within an object? If an object has a property that is a collection, should the object create the collection object or make a consumer check for null? I know the consumer should not assume, just wondering if most people create the collection object if it is never added to. A: You can also us...
{ "language": "en", "url": "https://stackoverflow.com/questions/350502", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: What is a good setup for handling session / "flash" style messaging in ASP.NET I am building ASP.NET 2.0 websites and currently I some home grown assemblies for a DAL, some business objects and other assorted shared stuff. I've put together a basic set of objects to handle messages to the UI (i.e. errors and other ...
{ "language": "en", "url": "https://stackoverflow.com/questions/350505", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Starting an application under windows using start I noticed that I can start a program with it's associated handler by writing start filename. However, for some files, all I get is a console, and I don't know why. I'm trying to populate a list control in MFC, and I want to have the program and it's associated handle...
{ "language": "en", "url": "https://stackoverflow.com/questions/350507", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How would you compile/design a tiered application that has different feature sets In a situation where you have something like a Lite, Normal, Ultimate tiers and overlapping feature sets that may have reduced functionality what would be the easiest way to keep things simple from a development standpoint? I've only w...
{ "language": "en", "url": "https://stackoverflow.com/questions/350514", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Getting the lesser n elements of a list in Python I need to get the lesser n numbers of a list in Python. I need this to be really fast because it's in a critical part for performance and it needs to be repeated a lot of times. n is usually no greater than 10 and the list usually has around 20000 elements. The list ...
{ "language": "en", "url": "https://stackoverflow.com/questions/350519", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: How do I count the number of open buffers / files in Emacs? Every now and then, I accidentally hit C-x C-c in Emacs when I'm intending to just hit C-x or C-c. This, of course, closes all open frames and buffers with no confirmation. I know that I can make Emacs prompt "Are you sure you want to exit?", but I don't wa...
{ "language": "en", "url": "https://stackoverflow.com/questions/350526", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Windows CE deletes .NET CF on reset I'm writing a C# application for a proprietary Windows CE 4.2 device (for which I don't have the specs or pretty much any other information. I've got access to the file system, and that is basically it.) I also can't get support from the original manufacturer. Now, I can install t...
{ "language": "en", "url": "https://stackoverflow.com/questions/350539", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Rails User Access Plugins There are a lot of rails plugins out there that handle user permissions. I'm impressed with the implementation in the hobo gem, but I'm not sure if I can use just this feature and not the other parts. GateKeeper is a really clever implementation, but has some bugs, though it's small enoug...
{ "language": "en", "url": "https://stackoverflow.com/questions/350546", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How do I rewrite this RewriteRule? I have this rewrite rule RewriteRule (.*)/([^/\.]+).css$ include/style/styleRedir.php?css=$2.css [L,NC] which matches thing like: somefolder/foo.css and rewirites them to: include/style/styleRedir.php?css=foo.css however it won't match: foo.css So I tried changing it to: ...
{ "language": "en", "url": "https://stackoverflow.com/questions/350584", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Set a default cursor for an application In a Qt application, is there an equivalent to QApplication::setFont that sets the applications default cursor, to be overwritten by setting one on a specific widget? QApplication::setOverrideCursor overrides all widget specific ones, I want local ones to take precidene over ...
{ "language": "en", "url": "https://stackoverflow.com/questions/350586", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Counting occurrences with SELECT DISTINCT, SELECT COUNT and UPDATE in Access In Access, I have a table like this one: Date | EmployeeNum | Award 11-JAN-08 | 34 | GoldStar 13-JAN-08 | 875 | BronzeTrophy 13-JAN-08 | 34 | BronzeTrophy 18-JAN-08 | 875 | BronzeTrophy And I want to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/350587", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }