text
stringlengths
8
267k
meta
dict
Q: HTML differences between browsers Do you know of any differences in handling HTML tags/properties in different browsers? For example, I once saw a page with a input tag with a maxlength field set to "2o". Firefox and Opera ignore the "o", and set the max length to 2, while Internet Explorer ignores the field altoget...
{ "language": "en", "url": "https://stackoverflow.com/questions/13594", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Convert enums to human readable values Does anyone know how to transform a enum value to a human readable value? For example: ThisIsValueA should be "This is Value A". A: Most examples of this that I've seen involve marking your enum values up with [Description] attributes and using reflection to do the "conversi...
{ "language": "en", "url": "https://stackoverflow.com/questions/13599", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "27" }
Q: GUI system development resources? Could someone recommend any good resources for creating Graphics User Interfaces, preferably in C/C++? Currently my biggest influence is 3DBuzz.com's C++/OpenGL VTMs (Video Training Modules). While they are very good, they cover a large area of graphics programming, so only skim the...
{ "language": "en", "url": "https://stackoverflow.com/questions/13607", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Validate Enum Values I need to validate an integer to know if is a valid enum value. What is the best way to do this in C#? A: Brad Abrams specifically warns against Enum.IsDefined in his post The Danger of Oversimplification. The best way to get rid of this requirement (that is, the need to validate enums) is to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/13615", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "94" }
Q: Speed difference in using inline strings vs concatenation in php5? (assume php5) consider <?php $foo = 'some words'; //case 1 print "these are $foo"; //case 2 print "these are {$foo}"; //case 3 print 'these are ' . $foo; ?> Is there much of a difference between 1 and 2? If not, what ...
{ "language": "en", "url": "https://stackoverflow.com/questions/13620", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "57" }
Q: Is there an easy way to convert C# classes to PHP? I am used to writing C# Windows applications. However, I have some free hosted PHP webspace that I would like to make use of. I have a basic understanding of PHP but have never used its object-oriented capabilities. Is there an easy way to convert C# classes to PHP ...
{ "language": "en", "url": "https://stackoverflow.com/questions/13647", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: C# .NET listing contents of remote files Is it possible in .NET to list files on a remote location like an URL? Much in the same way the System.IO classes work. All I need is the URLs to images that are on a remote server. A: Short answer: No, unless you have more control over that web-server Long answer: Here are ...
{ "language": "en", "url": "https://stackoverflow.com/questions/13655", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Textual versus Graphical Programming Languages I am part of a high school robotics team, and there is some debate about which language to use to program our robot. We are choosing between C (or maybe C++) and LabVIEW. There are pros for each language. C(++): * *Widely used *Good preparation for the future (mos...
{ "language": "en", "url": "https://stackoverflow.com/questions/13678", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "35" }
Q: php Zend / MVC without mod_rewrite I've seen it mentioned in many blogs around the net, but I believe it shoud be discussed here. What can we do when we have an MVC framework (I am interested in ZEND) in PHP but our host does not provide mod_rewrite? Are there any "short-cuts"? Can we transfer control in any way (so...
{ "language": "en", "url": "https://stackoverflow.com/questions/13698", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Suggestions for Migrating from ASP.NET WebForms to ASP.NET MVC? ASP.NET MVC has been discussed on this forum a few times. I'm about to do a large migration of several websites from classic ASP/ASP.NET WebForms to ASP.NET MVC and was wondering what kind of advice those of you with experience in both technologies have...
{ "language": "en", "url": "https://stackoverflow.com/questions/13704", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Resources on wordpress theme-development What are the best resources for Wordpress theme-development? I am currently in the phase of starting my own blog, and don't want to use one of the many free themes. I already have a theme for my website, so I want to read about best-practices. Any advice on how to get starte...
{ "language": "en", "url": "https://stackoverflow.com/questions/13708", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: How to schedule a batch process in asp.net I want to run a weekly batch process in an asp.net page. How can that be done? Thanks A: Is there any known drawbacks with the solution? Here is the blog post in which Jeff Atwood discusses this approach. As with most of Jeff's post, the meat is in the comments where the...
{ "language": "en", "url": "https://stackoverflow.com/questions/13718", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: In Cocoa do you prefer NSInteger or int, and why? NSInteger/NSUInteger are Cocoa-defined replacements for the regular built-in types. Is there any benefit to using the NS* types over the built-ins? Which do you prefer and why? Are NSInteger and int the same width on 32-bit / 64-bit platforms? A: The way I understan...
{ "language": "en", "url": "https://stackoverflow.com/questions/13725", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "48" }
Q: Differences Between C# and VB.net Possible Duplicate: What are the most important functional differences between C# and VB.NET? Other than syntax, what are the major differences between C# and vb.net?
{ "language": "en", "url": "https://stackoverflow.com/questions/13731", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Resharper and TortoiseSVN Is there any good way to deal with the class renaming refactor from Resharper when the file is under source control and TortoiseSVN is the client. I have am trying VisualSVN right now but I haven't had the need to rename anything recently. I don't want to change our repository just to try...
{ "language": "en", "url": "https://stackoverflow.com/questions/13745", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: How can I permanently enable line numbers in IntelliJ? How can I permanently enable line numbers in IntelliJ IDEA? A: In Intellij 13 the layout has changed, the Settings button can only be found in File -> Settings and not in the toolbars, and from there you follow the same steps: Editor -> Appearance -> Show line ...
{ "language": "en", "url": "https://stackoverflow.com/questions/13751", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1383" }
Q: quoting System.DirectoryServices.ResultPropertyCollection I'm missing something here: $objSearcher = New-Object System.DirectoryServices.DirectorySearcher $objSearcher.SearchRoot = New-Object System.DirectoryServices.DirectoryEntry $objSearcher.Filter = ("(objectclass=computer)") $computers = $objSearcher.find...
{ "language": "en", "url": "https://stackoverflow.com/questions/13753", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How can I remove a child node in HTML using JavaScript? Is there a function like document.getElementById("FirstDiv").clear()? A: If you want to clear the div and remove all child nodes, you could put: var mydiv = document.getElementById('FirstDiv'); while(mydiv.firstChild) { mydiv.removeChild(mydiv.firstChild); }...
{ "language": "en", "url": "https://stackoverflow.com/questions/13763", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "82" }
Q: Open ID - What happens when you decide you don't like your existing provider? So I'm not quite convinced about OpenID yet, and here is why: I already have an OpenID because I have a Blogger account. But I discovered that Blogger seems to be a poor provider when I tried to identify myself on the altdotnet page and re...
{ "language": "en", "url": "https://stackoverflow.com/questions/13768", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: SoapException: Root element is missing occurs when .NET web service called from Flex I have a .net web application that has a Flex application embedded within a page. This flex application calls a .net webservice. I can trace the execution proccess through the debugger and all looks great until I get the response: ...
{ "language": "en", "url": "https://stackoverflow.com/questions/13775", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Should we support IE6 anymore? Are we supposed to find workarounds in our web applications so that they will work in every situation? Is it time to do away with IE6 programming? A: It depends on your audience, and whether the cost (development, maintenance, opportunity cost of developing to a 7 year old lowest comm...
{ "language": "en", "url": "https://stackoverflow.com/questions/13786", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: Python Regular Expressions to implement string unescaping I am trying to implement string unescaping with Python regex and backreferences, and it doesn't seem to want to work very well. I'm sure it's something I'm doing wrong but I can't figure out what... >>> import re >>> mystring = r"This is \n a test \r" >>> p =...
{ "language": "en", "url": "https://stackoverflow.com/questions/13791", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: Any Windows APIs to get file handles besides createfile and openfile? I am trying to snoop on a log file that an application is writing to. I have successfully hooked createfile with the detours library from MSR, but createfile never seems to be called with file I am interested in snooping on. I have also tried hoo...
{ "language": "en", "url": "https://stackoverflow.com/questions/13806", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How do I create an automated build file for VB.Net in NAnt? I have taken over the development of a web application that is targeted at the .net 1.0 framework and is written in C# and Visual Basic. I decided that the first thing we need to do is refine the build process, I wrote build files for the C# projects, but ...
{ "language": "en", "url": "https://stackoverflow.com/questions/13832", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: VisualSVN undelete with TortoiseSVN Using TortoiseSVN against VisualSVN I delete a source file that I should not have deleted. Now this isn't a train smash because I can get the file back from the daily backup. However I would like to undelete it from SVN (VisualSVN) so that I can get the history back. However I can...
{ "language": "en", "url": "https://stackoverflow.com/questions/13848", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: IE7: header above menu I am having trouble with IE7. I have a header, which is an IMG. Under it I have a div that represents a menu, they have to be attached to each other without space in between. Both are 1000px width. In Opera and FireFox the header and the menu are neatly attached to each other. However, in IE7,...
{ "language": "en", "url": "https://stackoverflow.com/questions/13851", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Can you explain closures (as they relate to Python)? I've been reading a lot about closures and I think I understand them, but without clouding the picture for myself and others, I am hoping someone can explain closures as succinctly and clearly as possible. I'm looking for a simple explanation that might help me u...
{ "language": "en", "url": "https://stackoverflow.com/questions/13857", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "98" }
Q: Parsing search queries in Java I have been trying to find an easy way to parse a search query and convert it to an SQL query for my DB. I have found two solutions: * *Lucene: Powerful Java-based search engine, contains a query parser but it isn't very configurable and I could find a way to easily hack/adapt it t...
{ "language": "en", "url": "https://stackoverflow.com/questions/13863", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Getting started with a Picasa Plugin Does anyone here know any resources on how to get started writing a plugin for Google's Picasa? I love it for photo management, but I have some ideas for how it could be better. * *Riya-esque facial search: given a large enough corpus of faces and pictures (people tend to be...
{ "language": "en", "url": "https://stackoverflow.com/questions/13881", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How do I make a custom .net client profile installer? For .net 3.5 SP1, Microsoft have the new client profile which installs only a subset of .net 3.5 SP1 on to Windows XP user's machines. I'm aware of how to make my assemblies client-profile ready. And I've read the articles on how to implement an installer for Cli...
{ "language": "en", "url": "https://stackoverflow.com/questions/13893", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: In Cocoa do I need to remove an Object from receiving KVO notifications when deallocating it? When I've registered an object foo to receive KVO notifications from another object bar (using addObserver:...), if I then deallocate foo do I need to send a removeObserver:forKeyPath: message to bar in -dealloc? A: A bit ...
{ "language": "en", "url": "https://stackoverflow.com/questions/13927", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "23" }
Q: How do I run (unit) tests in different folders/projects separately in Visual Studio? I need some advice as to how I easily can separate test runs for unit tests and integration test in Visual Studio. Often, or always, I structure the solution as presented in the above picture: separate projects for unit tests and i...
{ "language": "en", "url": "https://stackoverflow.com/questions/13938", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Python Sound ("Bell") I'd like to have a python program alert me when it has completed its task by making a beep noise. Currently, I use import os and then use a command line speech program to say "Process complete". I much rather it be a simple "bell." I know that there's a function that can be used in Cocoa app...
{ "language": "en", "url": "https://stackoverflow.com/questions/13941", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "72" }
Q: Best method of Textfile Parsing in C#? I want to parse a config file sorta thing, like so: [KEY:Value] [SUBKEY:SubValue] Now I started with a StreamReader, converting lines into character arrays, when I figured there's gotta be a better way. So I ask you, humble reader, to help me. One restriction is that ...
{ "language": "en", "url": "https://stackoverflow.com/questions/13963", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: How do I access the Ruby AST from C level code? I understand that the Ruby 1.8 AST is traversed at runtime using a big switch statement, and many things like calling a method in a class or parent module involve the interpreter looking up and down the tree as it goes. Is there a straightforward way of accessing this ...
{ "language": "en", "url": "https://stackoverflow.com/questions/13981", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Genetic Programming in C# I've been looking for some good genetic programming examples for C#. Anyone knows of good online/book resources? Wonder if there is a C# library out there for Evolutionary/Genetic programming? A: I saw a good high-level discussion of it on channel9 by Mike Swanson at http://channel9.msdn.c...
{ "language": "en", "url": "https://stackoverflow.com/questions/14008", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "60" }
Q: Disabling a ListView in C#, but still showing the current selection I have a ListView control, and I'm trying to figure out the easiest/best way to disallow changing the selected row(s), without hiding the selected row(s). I know there's a HideSelection property, but that only works when the ListView is still enable...
{ "language": "en", "url": "https://stackoverflow.com/questions/14029", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Database triggers In the past I've never been a fan of using triggers on database tables. To me they always represented some "magic" that was going to happen on the database side, far far away from the control of my application code. I also wanted to limit the amount of work the DB had to do, as it's generally a sha...
{ "language": "en", "url": "https://stackoverflow.com/questions/14031", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: What's a Good Database ERD Tool for Linux? I've recently switched to Linux on my work machine and, new to the Linux desktop environment, I'd like to find a decent ERD tool for database design. Booting back into my Windows partition every time I need to create a diagram is going to get unpleasant quickly. I looked ...
{ "language": "en", "url": "https://stackoverflow.com/questions/14032", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "28" }
Q: Preventing Memory Leaks with Attached Behaviours I've created an "attached behaviour" in my WPF application which lets me handle the Enter keypress and move to the next control. I call it EnterKeyTraversal.IsEnabled, and you can see the code on my blog here. My main concern now is that I may have a memory leak, sinc...
{ "language": "en", "url": "https://stackoverflow.com/questions/14061", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Automated testing a game Question How would you go adding automated testing to a game? I believe you can unit test a lot of the game engine's functionality (networking, object creation, memory management, etc), but is it possible to automate test the actual game itself? I'm not talking about gameplay elements (like ...
{ "language": "en", "url": "https://stackoverflow.com/questions/14087", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "31" }
Q: How would you go about evaluating a programmer? A few weeks ago, I was assigned to evaluate all our programmers. I'm very uncomfortable with this since I was the one who taught everyone the shop's programming language (they all got out of college not knowing the language and as luck would have it, I'm very proficien...
{ "language": "en", "url": "https://stackoverflow.com/questions/14106", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: How can I test STDIN without blocking in Perl? I'm writing my first Perl app -- an AOL Instant Messenger bot that talks to an Arduino microcontroller, which in turn controls a servo that will push the power button on our sysadmin's server, which freezes randomly every 28 hours or so. I've gotten all the hard stuff ...
{ "language": "en", "url": "https://stackoverflow.com/questions/14118", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: How to create a C++ Boost undirected graph and traverse it in depth first search (DFS) order? How to create a C++ Boost undirected graph and traverse it in depth first search (DFS) order? A: // Boost DFS example on an undirected graph. // Create a sample graph, traverse its nodes // in DFS order and print out their...
{ "language": "en", "url": "https://stackoverflow.com/questions/14126", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "31" }
Q: Subversion and web development I'm introducing Subversion into our web shop. I want to want the checked in files to be uploaded into the server via FTP (and as they get use to Subversion, via SFTP). The files are sent to a release candidate page for testing purposes. A script can be called to move the files into pro...
{ "language": "en", "url": "https://stackoverflow.com/questions/14135", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Enabling OpenGL in wxWidgets I installed the wxWidgets source code, compiled it and am linking the libraries thus obtained with my application code. Now I need to use OpenGL in my wxWidgets application. How do I enable this? A: For building on Windows with project files: Assume $(WXWIDGETSROOT) is the root director...
{ "language": "en", "url": "https://stackoverflow.com/questions/14138", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Windows-based Text Editors Other than Notepad++, what text editor do you use to program in Windows? A: Thej already recommended it, but to elaborate: SciTE - Free, has preset colouring for many languages, and it's multi-platform (Windows & Linux), and lightweight. alt text http://scitedebug.luaforge.net/scite-deb...
{ "language": "en", "url": "https://stackoverflow.com/questions/14155", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "32" }
Q: Strange C++ errors with code that has min()/max() calls I'm seeing strange errors when my C++ code has min() or max() calls. I'm using Visual C++ compilers. A: Another possibility could be from side effects. Most min/max macros will include the parameters multiple times and may not do what you expect. Errors and ...
{ "language": "en", "url": "https://stackoverflow.com/questions/14165", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: System.Data.SqlClient.SqlException: Failed to generate a user instance of SQL Server System.Data.SqlClient.SqlException: Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance. The connection will be closed. Anybody ever get this error and/or have any idea on ...
{ "language": "en", "url": "https://stackoverflow.com/questions/14209", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: What's the deal with |Pipe-delimited| variables in connection strings? I know that |DataDirectory| will resolve to App_Data in an ASP.NET application but is that hard-coded or is there a generalized mechanism at work along the lines of %environment variables%? A: From the MSDN Smart Client Data Blog: In this versi...
{ "language": "en", "url": "https://stackoverflow.com/questions/14241", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Flex: does painless programmatic data binding exist? I've only done a bit of Flex development thus far, but I've preferred the approach of creating controls programmatically over mxml files, because (and please, correct me if I'm wrong!) I've gathered that you can't have it both ways -- that is to say, have the clas...
{ "language": "en", "url": "https://stackoverflow.com/questions/14247", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Best way to let users download a file from my website: http or ftp We have some files on our website that users of our software can download. Some of the files are in virtual folders on the website while others are on our ftp. The files on the ftp are generally accessed by clicking on an ftp:// link in a browser - m...
{ "language": "en", "url": "https://stackoverflow.com/questions/14263", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Using GLUT with Visual C++ Express Edition What are the basic steps to compile an OpenGL application using GLUT (OpenGL Utility Toolkit) under Visual C++ Express Edition? A: * *If you don't have Visual C++ Express Edition (VCEE), download and install VCEE. *The default install of Visual C++ Express Edition builds...
{ "language": "en", "url": "https://stackoverflow.com/questions/14264", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Boost warnings with VC++ 9 When the Boost library/headers is used with VC++ 9 compilers (Visual C++ 2008 Express Edition or Visual Studio 2008), a lot of benign warnings are generated. They are of 2 kinds: * *Warning about the Wp64 setting. *Warning about the compiler version. How can I turn off these warnings...
{ "language": "en", "url": "https://stackoverflow.com/questions/14271", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to load plugins in .NET? I'd like to provide some way of creating dynamically loadable plugins in my software. Typical way to do this is using the LoadLibrary WinAPI function to load a dll and calling GetProcAddress to get an pointer to a function inside that dll. My question is how do I dynamically load a plugi...
{ "language": "en", "url": "https://stackoverflow.com/questions/14278", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "27" }
Q: Is there a python module for regex matching in zip files I have over a million text files compressed into 40 zip files. I also have a list of about 500 model names of phones. I want to find out the number of times a particular model was mentioned in the text files. Is there any python module which can do a regex ma...
{ "language": "en", "url": "https://stackoverflow.com/questions/14281", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Increasing camera capture resolution in OpenCV In my C/C++ program, I'm using OpenCV to capture images from my webcam. The camera (Logitech QuickCam IM) can capture at resolutions 320x240, 640x480 and 1280x960. But, for some strange reason, OpenCV gives me images of resolution 320x240 only. Calls to change the resol...
{ "language": "en", "url": "https://stackoverflow.com/questions/14287", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "52" }
Q: GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT errors I'm using FBOs in my OpenGL code and I'm seeing compilation errors on GL\_FRAMEBUFFER\_INCOMPLETE\_DUPLICATE\_ATTACHMENT\_EXT. What's the cause of this and how do I fix it? A: The cause of this error is an older version of NVIDIA's glext.h, which still has t...
{ "language": "en", "url": "https://stackoverflow.com/questions/14297", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How do I make Powershell run a batch file and then stay open? For example; with the old command prompt it would be: cmd.exe /k mybatchfile.bat A: Drop into a cmd instance (or indeed PowerShell itself) and type this: powershell -? You'll see that powershell.exe has a "-noexit" parameter which tells it not to exit ...
{ "language": "en", "url": "https://stackoverflow.com/questions/14300", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "24" }
Q: What is the best way to handle files for a small office? I'm currently working at a small web development company, we mostly do campaign sites and other promotional stuff. For our first year we've been using a "server" for sharing project files, a plain windows machine with a network share. But this isn't exactly fu...
{ "language": "en", "url": "https://stackoverflow.com/questions/14308", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Using OpenGL textures larger than window/display size I'm having problems using textures that are larger than the OpenGL window or the display size as non-display render targets. What's the solution for this problem? A: There's a simple solution. Assuming your (non-display) textures are 1024x1024 and you are restri...
{ "language": "en", "url": "https://stackoverflow.com/questions/14310", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Using GLUT bitmap fonts I'm writing a simple OpenGL application that uses GLUT. I don't want to roll my own font rendering code, instead I want to use the simple bitmap fonts that ship with GLUT. What are the steps to get them working? A: Simple text display is easy to do in OpenGL using GLUT bitmap fonts. These ar...
{ "language": "en", "url": "https://stackoverflow.com/questions/14318", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: RGB to monochrome conversion How do I convert the RGB values of a pixel to a single monochrome value? A: This MSDN article uses (0.299 * color.R + 0.587 * color.G + 0.114 * color.B); This Wikipedia article uses (0.3* color.R + 0.59 * color.G + 0.11 * color.B); A: This depends on what your motivations are. If you ...
{ "language": "en", "url": "https://stackoverflow.com/questions/14330", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "21" }
Q: Starting off with OpenGL under Cygwin Is it possible to compile and run OpenGL programs from under Cygwin? If yes, how? A: If the above doesn't work (and it didn't for me), try the following (which did!) gcc ogl.c -lglut -lglu -lgl A: I do not normally post answers this long, but this one is worth it. I will prese...
{ "language": "en", "url": "https://stackoverflow.com/questions/14344", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: How do I call a Flex SWF from a remote domain using Flash (AS3)? I have a Flex swf hosted at http://www.a.com/a.swf. I have a flash code on another doamin that tries loading the SWF: _loader = new Loader(); var req:URLRequest = new URLRequest("http://services.nuconomy.com/n.swf"); _loader.contentLoaderInfo.addEventL...
{ "language": "en", "url": "https://stackoverflow.com/questions/14350", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Accessing OpenGL state variables in Cg I need to access the OpenGL state variables (such as the MVP matrices) in my Cg shader program. I'm passing these values to my Cg shader program manually using calls such as cgGLSetStateMatrixParameter() in my C/C++ code. Is there an easier way to do this? A: If you are on any...
{ "language": "en", "url": "https://stackoverflow.com/questions/14358", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: .Net Dynamic Plugin Loading with Authority What recommendations can you give for a system which must do the following: Load Plugins (and eventually execute them) but have 2 methods of loading these plugins: * *Load only authorized plugins (developed by the owner of the software) *Load all plugins And we need...
{ "language": "en", "url": "https://stackoverflow.com/questions/14359", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Valid OpenGL context How and at what stage is a valid OpenGL context created in my code? I'm getting errors on even simple OpenGL code. A: From the posts on comp.graphics.api.opengl, it seems like most newbies burn their hands on their first OpenGL program. In most cases, the error is caused due to OpenGL function...
{ "language": "en", "url": "https://stackoverflow.com/questions/14364", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: GLUT pop-up menus Is it easy to create GLUT pop-up menus for my OpenGL application? If yes, how? A: Creating and using pop-up menus with GLUT is very simple. Here is a code sample that creates a pop-up menu with 4 options: // Menu items enum MENU_TYPE { MENU_FRONT, MENU_SPOT, MENU_BACK, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/14370", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: CVS to SVN conversion and reorganizing branches I am converting from existing CVS repository to SVN repository. CVS repository has few brances and I'd like to rename branches while converting. Wanted conversion is like this: CVS branch SVN branch HEAD -> branches/branchX branchA -> trunk b...
{ "language": "en", "url": "https://stackoverflow.com/questions/14373", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: LINQ, entity that implements Interface and exception in mapping I'm using repository pattern with LINQ, have IRepository.DeleteOnSubmit(T Entity). It works fine, but when my entity class has interface, like this: public interface IEntity { int ID {get;set;} } public partial class MyEntity: IEntity { public i...
{ "language": "en", "url": "https://stackoverflow.com/questions/14375", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Using the mouse scrollwheel in GLUT I want to use the mouse scrollwheel in my OpenGL GLUT program to zoom in and out of a scene? How do I do that? A: Freeglut's glutMouseWheelFunc callback is version dependant and not reliable in X. Use standard mouse function and test for buttons 3 and 4. The OpenGlut notes on glu...
{ "language": "en", "url": "https://stackoverflow.com/questions/14378", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "34" }
Q: fopen deprecated warning With the Visual Studio 2005 C++ compiler, I get the following warning when my code uses the fopen() and such calls: 1>foo.cpp(5) : warning C4996: 'fopen' was declared deprecated 1> c:\program files\microsoft visual studio 8\vc\include\stdio.h(234) : see declaration of 'fopen' 1> ...
{ "language": "en", "url": "https://stackoverflow.com/questions/14386", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "74" }
Q: Regex and unicode I have a script that parses the filenames of TV episodes (show.name.s01e02.avi for example), grabs the episode name (from the www.thetvdb.com API) and automatically renames them into something nicer (Show Name - [01x02].avi) The script works fine, that is until you try and use it on files that have...
{ "language": "en", "url": "https://stackoverflow.com/questions/14389", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "31" }
Q: Managed Source Control Hosting and Continuous Integration with CVSDude and CruiseControl.net For my own project at home, I'm using the rather excellent managed subversion hosting from CVSDude. As it's only me working on the code right now, I'm not using CruiseControl.net, however I expect this will change in the ne...
{ "language": "en", "url": "https://stackoverflow.com/questions/14395", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: When should a multi-module project to split into separate repository trees? Currently we have a project with a standard subversion repository layout of: ./trunk ./branches ./tags However, as we're moving down the road of OSGi and a modular project, we've ended up with: ./trunk/bundle/main ./trunk/bundle/modulea ./tr...
{ "language": "en", "url": "https://stackoverflow.com/questions/14397", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Class Designer in Visual Studio - is it worth it? Does anybody use the Class Designer much in Visual Studio? I have downloaded the Modeling Power Toys for 2005 and have been impressed with what I've seen so far. The MSDN Class Designer Blog doesn't seem to have been updated for a while but it still looks quite usefu...
{ "language": "en", "url": "https://stackoverflow.com/questions/14398", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: GLUT exit redefinition error In my simple OpenGL program I get the following error about exit redefinition: 1>c:\program files\microsoft visual studio 8\vc\include\stdlib.h(406) : error C2381: 'exit' : redefinition; __declspec(noreturn) differs 1> c:\program files\microsoft visual studio 8\vc\platformsdk\incl...
{ "language": "en", "url": "https://stackoverflow.com/questions/14402", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "34" }
Q: Why are there so few modal-editors that aren't vi*? Pretty much every other editor that isn't a vi descendant (vim, cream, vi-emu) seems to use the emacs shortcuts (ctrl+w to delete back a word and so on) A: Um... maybe there isn't much of a need for one, given that Vi/Vim is pretty much available everywhere and go...
{ "language": "en", "url": "https://stackoverflow.com/questions/14410", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "32" }
Q: Using OpenGL extensions On Windows I want to use the functions exposed under the OpenGL extensions. I'm on Windows, how do I do this? A: A 'Very strong reason' not to use GLEW might be that the library is not supported by your compiler/IDE. E.g: Borland C++ Builder. In that case, you might want to rebuild the libra...
{ "language": "en", "url": "https://stackoverflow.com/questions/14413", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: Why is the PyObjC documentation so bad? For example, http://developer.apple.com/cocoa/pyobjc.html is still for OS X 10.4 Tiger, not 10.5 Leopard.. And that's the official Apple documentation for it.. The official PyObjC page is equally bad, http://pyobjc.sourceforge.net/ It's so bad it's baffling.. I'm considering l...
{ "language": "en", "url": "https://stackoverflow.com/questions/14422", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: 64bit .NET Performance tuning I know that .NET is JIT compiled to the architecture you are running on just before the app runs, but does the JIT compiler optimize for 64bit architecture at all? Is there anything that needs to be done or considered when programming an app that will run on a 64bit system? (i.e. Will...
{ "language": "en", "url": "https://stackoverflow.com/questions/14432", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Software to use when designing classes What software do you use when designing classes and their relationship, or just pen and paper? A: I find pen and paper very useful, and I try to get as far away from a computer as possible. If I do it on the compy, I'm always too tempted to start programming the solution. That...
{ "language": "en", "url": "https://stackoverflow.com/questions/14435", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: What is the best way to make a Delphi Application completely full screen? What is the best way to make a delphi application (delphi 2007 for win32 here) go completely full screen, removing the application border and covering windows task bar ? I am looking for something similar to what IE does when you hit F11. I wi...
{ "language": "en", "url": "https://stackoverflow.com/questions/14451", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: Does anyone have .Net Excel IO component benchmarks? I'm needing to access Excel workbooks from .Net. I know all about the different ways of doing it (I've written them up in a blog post), and I know that using a native .Net component is going to be the fastest. But the question is, which of the components wins? Has...
{ "language": "en", "url": "https://stackoverflow.com/questions/14453", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Bit fields in C# I have a structure which I need to populate and write to disk (several actually). An example is: byte-6 bit0 - original_or_copy bit1 - copyright bit2 - data_alignment_indicator bit3 - PES_priority bit4-bit5 - PES_scrambling control. bit6-bit7 - reserved In C I might do something lik...
{ "language": "en", "url": "https://stackoverflow.com/questions/14464", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "85" }
Q: How can an MFC application terminate itself? What is the proper way for an MFC application to cleanly close itself? A: In support of @Mike's answer, the reason to use this method is to trigger the correct shutdown sequence. Especially important for MDI/SDI applications because it gives a chance for documents to pro...
{ "language": "en", "url": "https://stackoverflow.com/questions/14491", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: How can I stop MATLAB from returning until after a command-line script completes? I see in the MATLAB help (matlab -h) that I can use the -r flag to specify an m-file to run. I notice when I do this, MATLAB seems to start the script, but immediately return. The script processes fine, but the main app has already ret...
{ "language": "en", "url": "https://stackoverflow.com/questions/14495", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "23" }
Q: Has anyone used NUnitLite with any success? I've recently started work on the Compact Framework and I was wondering if anyone had some recommendations for unit testing beyond what's in VS 2008. MSTest is ok, but debugging the tests is a nightmare and the test runner is so slow. I see that NUnitLite on codeplex is an...
{ "language": "en", "url": "https://stackoverflow.com/questions/14497", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Proportional font IDE I would really like to see a proportional font IDE, even if I have to build it myself (perhaps as an extension to Visual Studio). What I basically mean is MS Word style editing of code that sort of looks like the typographical style in The C++ Programming Language book. I want to set tab stops ...
{ "language": "en", "url": "https://stackoverflow.com/questions/14504", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Alpha blending colors in .NET Compact Framework 2.0 In the Full .NET framework you can use the Color.FromArgb() method to create a new color with alpha blending, like this: Color blended = Color.FromArgb(alpha, color); or Color blended = Color.FromArgb(alpha, red, green , blue); However in the Compact Framework (2...
{ "language": "en", "url": "https://stackoverflow.com/questions/14505", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Reverse Find in a string I need to be able to find the last occurrence of a character within an element. For example: <mediaurl>http://www.blah.com/path/to/file/media.jpg</mediaurl> If I try to locate it through using substring-before(mediaurl, '.') and substring-after(mediaurl, '.') then it will, of course, match ...
{ "language": "en", "url": "https://stackoverflow.com/questions/14527", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: LINQ-to-SQL vs stored procedures? I took a look at the "Beginner's Guide to LINQ" post here on StackOverflow (Beginners Guide to LINQ), but had a follow-up question: We're about to ramp up a new project where nearly all of our database op's will be fairly simple data retrievals (there's another segment of the projec...
{ "language": "en", "url": "https://stackoverflow.com/questions/14530", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "191" }
Q: How should I handle autolinking in wiki page content? What I mean by autolinking is the process by which wiki links inlined in page content are generated into either a hyperlink to the page (if it does exist) or a create link (if the page doesn't exist). With the parser I am using, this is a two step process - first...
{ "language": "en", "url": "https://stackoverflow.com/questions/14545", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: SSRS scheduled reports not working My scheduled reports in SQL server won't run. I checked the logs and found the job that was failing. The error message in the log was: 'EXECUTE AS LOGIN' failed for the requested login 'NT AUTHORITY\NETWORK SERVICE'. The step failed. I'm using SQL authentication for the repor...
{ "language": "en", "url": "https://stackoverflow.com/questions/14552", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to organize dataset queries to improve performance I don't know when to add to a dataset a tableadapter or a query from toolbox. Does it make any difference? I also dont know where to create instances of the adapters. * *Should I do it in the Page_Load? *Should I just do it when I'm going to use it? *Am...
{ "language": "en", "url": "https://stackoverflow.com/questions/14570", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I avoid using cursors in Sybase (T-SQL)? Imagine the scene, you're updating some legacy Sybase code and come across a cursor. The stored procedure builds up a result set in a #temporary table which is all ready to be returned except that one of columns isn't terribly human readable, it's an alphanumeric code....
{ "language": "en", "url": "https://stackoverflow.com/questions/14577", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Can I make Subversion + TortoiseSVN case-insensitive for Windows? I've been using Subversion for code control with TortoiseSVN to interface with the server for the past few months, and in general it's been going great! However, occasionally my FoxPro IDE will change the case of a file extension without warning wher...
{ "language": "en", "url": "https://stackoverflow.com/questions/14582", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "25" }
Q: Do you use version control other than for source code? I've found SVN to be extremely useful for documentation, personal files, among other non-source code uses. What other practical uses have you found to version control systems in general? A: I've seen version control being used for other non-source code purpose...
{ "language": "en", "url": "https://stackoverflow.com/questions/14588", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: Editing User Profile w/ Forms Authentication We're using Forms Authentication in SharePoint. When the account is created, the administrator can add some information, like name and address. But the required fields are username and email address. When a user goes to their profile page, all the fields are blank and t...
{ "language": "en", "url": "https://stackoverflow.com/questions/14611", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }