text
stringlengths
8
267k
meta
dict
Q: What is the best method for checking if a file exists from a SQL Server 2005 stored procedure? We used the "undocumented" xp_fileexist stored procedure for years in SQL Server 2000 and had no trouble with it. In 2005, it seems that they modified the behavior slightly to always return a 0 if the executing user accoun...
{ "language": "en", "url": "https://stackoverflow.com/questions/16634", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Google Maps API - Problems with class GLatLngBounds I am having some trouble with the Google Maps API. I have an array which holds a ojbect I created to store points. My array and class: var tPoints = []; function tPoint(name) { var id = name; var points = []; var pointsCount = 0; ...
{ "language": "en", "url": "https://stackoverflow.com/questions/16638", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Creating temporary folders I am working on a program that needs to create a multiple temporary folders for the application. These will not be seen by the user. The app is written in VB.net. I can think of a few ways to do it such as incremental folder name or random numbered folder names, but I was wondering, how ot...
{ "language": "en", "url": "https://stackoverflow.com/questions/16656", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "30" }
Q: How to affordably release a Web App I am a broke college student. I have built a small web app in PHP5 and MySQL, and I already have a domain. What is an affordable way to get it online? A few people have suggested amazon's cloud services, but that seems equivalent to slitting my wrists and watching money slowly tri...
{ "language": "en", "url": "https://stackoverflow.com/questions/16657", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Internationalization in SSRS What's the best way to handle translations for stock text in a SSRS. For instance - if I have a report that shows a grid of contents what's the best way to have the correct translation for the header of that grid show up, assuming the culture of the report is set correctly. Put another w...
{ "language": "en", "url": "https://stackoverflow.com/questions/16660", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Java and C# interoperability I have two programs. One is in C# and another one in Java. Those programs will, most probably, always run on the same machine. What would be the best way to let them talk to each other? So, to clarify the problem: This is a personal project (so professional/costly libraries are a no go)....
{ "language": "en", "url": "https://stackoverflow.com/questions/16689", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "33" }
Q: Map VS2008 keyboard shortcuts to Eclipse Possible Duplicate: Configure Eclipse to use VS.Net shortcuts? I mostly work in VS2008 but I need to do some java work in Eclipse. Is there an easy and fast way to map the VS2008 keyboard shortcuts to Eclipse? For example, I want to map F11 in Eclipse to "step info" instea...
{ "language": "en", "url": "https://stackoverflow.com/questions/16704", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: OpenID authentication in ASP.NET? I am starting to build a new web application that will require user accounts. Now that I have an OpenID that I am using for this site I thought it would be cool if I could use OpenID for authentication in my application. Are there any good tutorials on how to integrate OpenID with ...
{ "language": "en", "url": "https://stackoverflow.com/questions/16716", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "29" }
Q: how to get locale information on a GWT application In GWT I have to specify what locales are supported in my application. The code get compiled in various files, one for each locale (beside other versions), but I have to give my clients one only URL. This URL is supposed to be a page that should be displayed accordi...
{ "language": "en", "url": "https://stackoverflow.com/questions/16727", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: What's the best way to implement field validation using ASP.NET MVC? I am building a public website using ASP.NET, as part of the deliverable I need to do an Admin Site for data entry of the stuff shown in the public site, I was wondering what techniques or procedures are people using to validate entries using ASP.N...
{ "language": "en", "url": "https://stackoverflow.com/questions/16747", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "45" }
Q: How do you use back-references to PCREs in PHP? I read this PHP RegEx page, but either I'm missing something, misreading something, or it doesn't work the way they say. I'm guessing it's one of the first two. $str = preg_replace("([|]\d*)", "\1;", $str); A: Your regular expression should follow Perl syntax, meanin...
{ "language": "en", "url": "https://stackoverflow.com/questions/16759", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Are there any tools for merging CSS? I have a couple CSS files with overlapping CSS selectors that I'd like to programmatically merge (as in not just appending one file to the end of the other). Is there any tool to do this online? or a Firefox extension perhaps? A: I found Factor CSS - complete with source code, b...
{ "language": "en", "url": "https://stackoverflow.com/questions/16762", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "42" }
Q: Haskell's algebraic data types I'm trying to fully understand all of Haskell's concepts. In what ways are algebraic data types similar to generic types, e.g., in C# and Java? And how are they different? What's so algebraic about them anyway? I'm familiar with universal algebra and its rings and fields, but I only h...
{ "language": "en", "url": "https://stackoverflow.com/questions/16770", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "63" }
Q: SQL Server Maximum row size Came across this error today. Wondering if anyone can tell me what it means: Cannot sort a row of size 9522, which is greater than the allowable maximum of 8094. Is that 8094 bytes? Characters? Fields? Is this a problem joining multiple tables that are exceeding some limit? A: The pr...
{ "language": "en", "url": "https://stackoverflow.com/questions/16792", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: PHPs htmlspecialcharacters equivalent in .NET? PHP has a great function called htmlspecialcharacters() where you pass it a string and it replaces all of HTML's special characters with their safe equivalents, it's almost a one stop shop for sanitizing input. Very nice right? Well is there an equivalent in any of the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/16795", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: Enterprise Reporting Solutions What options are there in the industry for enterprise reporting? I'm currently using SSRS 2005, and know that there is another version coming out with the new release of MSSQL. But, it seems like it might also be a good time to investigate the market to see what else is out there. Wha...
{ "language": "en", "url": "https://stackoverflow.com/questions/16804", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "38" }
Q: Error viewing csproj property pages in VisualStudio2005 When I goto view the property page for my CSharp test application I get the following error. "An error occurred trying to load the page. COM object that has been seperated from its underlying RCW cannot be used." The only thing that seems to fix it is rebooting...
{ "language": "en", "url": "https://stackoverflow.com/questions/16808", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Accessing html parameter in PHP I'm trying to do a simple test php script for sessions. Basically it increments a counter (stored in $_SESSION) every time you refresh that page. That works, but I'm trying to have a link to destroy the session which reloads the page with the ?destroy=1 parameter. I've tried a couple ...
{ "language": "en", "url": "https://stackoverflow.com/questions/16815", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do you do a case insensitive search using a pattern modifier using less? It seems like the only way to do this is to pass the -i parameter in when you initially run less. Does anyone know of some secret hack to make something like this work /something to search for/i A: You can also type command -I while less ...
{ "language": "en", "url": "https://stackoverflow.com/questions/16828", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "346" }
Q: Structure of Projects in Version Control I know there are at least 10 different ways to structure project in version control. I'm curious what some methods being used are and which ones work for you. I've worked with SVN, TFS, and currently/unfortunately VSS. I've seen version control implemented very poorly and j...
{ "language": "en", "url": "https://stackoverflow.com/questions/16829", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: Lightweight source control I am looking for a lightweight source control system for use on "hobby" projects with only one person (myself) working on the project. Does anyone have any suggestions? Ideally it should interface with Visual Studio either naively or through another plug-in, outside of that, anything that ...
{ "language": "en", "url": "https://stackoverflow.com/questions/16832", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: How do you download and extract a gzipped file with C#? I need to periodically download, extract and save the contents of http://data.dot.state.mn.us/dds/det_sample.xml.gz to disk. Anyone have experience downloading gzipped files with C#? A: You can use WebClient in System.Net to download: WebClient Client = new We...
{ "language": "en", "url": "https://stackoverflow.com/questions/16833", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "23" }
Q: Getting Started with Unit Testing Unit testing is, roughly speaking, testing bits of your code in isolation with test code. The immediate advantages that come to mind are: * *Running the tests becomes automate-able and repeatable *You can test at a much more granular level than point-and-click testing via a GUI ...
{ "language": "en", "url": "https://stackoverflow.com/questions/16860", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "25" }
Q: Sanitising user input using Python What is the best way to sanitize user input for a Python-based web application? Is there a single function to remove HTML characters and any other necessary characters combinations to prevent an XSS or SQL injection attack? A: Jeff Atwood himself described how StackOverflow.com sa...
{ "language": "en", "url": "https://stackoverflow.com/questions/16861", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "63" }
Q: Choosing a multiplier for a (string) hash function Do you have any advice/rules on selecting a multiplier to use in a (multiplicative) hash function. The function is computing the hash value of a string. A: You want to use something that is relatively prime to the size of your set. That way, when you loop around, y...
{ "language": "en", "url": "https://stackoverflow.com/questions/16873", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: VS 2008 - ctrl-tab behavior As you may know, in VS 2008 ctrl+tab brings up a nifty navigator window with a thumbnail of each file. I love it, but there is one tiny thing that is annoying to me about this feature: the window stays around after releasing the ctrl key. When doing an alt+tab in windows, you can hit tab ...
{ "language": "en", "url": "https://stackoverflow.com/questions/16891", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Delphi and COM: TLB and maintenance issues In the company that i work, we develop all the GUI in C#, but the application kernel is mainly developed in Delphi 5 (for historical reasons), with a lot of components made in COM+. Related to this very specific sort of application a I two questions: * *Experienced guys ...
{ "language": "en", "url": "https://stackoverflow.com/questions/16897", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Beginners Guide to Haskell? I've been looking for a decent guide to Haskell for some time, but haven't been able to find one that seems interesting enough to read through and/or makes sense. I've had prior exposure to Haskell a few years back, but I can't remember much about it. I remember the "Aha!"-feeling was inc...
{ "language": "en", "url": "https://stackoverflow.com/questions/16918", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "122" }
Q: Tool for generating CSS skeleton? My HTML is all marked up, ready to make it rain CSS. The problem is that I have to go back and find out what all my id and class names are so I can get started. What I need is a tool that parses my HTML and spits out a stylesheet with all the possible elements ready to be styled (...
{ "language": "en", "url": "https://stackoverflow.com/questions/16926", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: Ant's tasks throws StackOverflowException I'm trying to compile over 100 java classes from different packages from a clean directory (no incremental compiles) using the following ant tasks: <target name="-main-src-depend"> <depend srcdir="${src.dir}" destdir="${bin.dir}" cache="${cache...
{ "language": "en", "url": "https://stackoverflow.com/questions/16935", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Difference between a byte array and MemoryStream I am reading a binary file into a parsing program. I will need to iterate through the file and look for certain markers so I can split the file up and pass those parts into their respective object’s constructors. Is there an advantage to holding the file as a stream,...
{ "language": "en", "url": "https://stackoverflow.com/questions/16939", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "22" }
Q: VS 2008 - Detachable code tabs Admittedly this might not be a problem on larger screens, but my employer is abit tight and refuses to buy monitors larger than 19inch, this means that I dont have much screen real estate to view all the Visual Studio windows and my code at the same time, or two pieces of code at once....
{ "language": "en", "url": "https://stackoverflow.com/questions/16940", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What is the best way to rename (move) file system branches in .NET? I would like to rename files and folders recursively by applying a string replacement operation. E.g. The word "shark" in files and folders should be replaced by the word "orca". C:\Program Files\Shark Tools\Wire Shark\Sharky 10\Shark.exe should be...
{ "language": "en", "url": "https://stackoverflow.com/questions/16945", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Who actually uses DataGrid/GridView/FormView/etc in production apps? Curious if others feel the same as me. To me, controls such as datagrid/gridview/formview/etc. are great for presentations or demo's only. To take the time and tweak this controls, override their default behavior (hooking into their silly events ...
{ "language": "en", "url": "https://stackoverflow.com/questions/16963", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Creating your own table with CommandArgument buttons in ASP.NET MVC I'm trying to implement something like this: <div> <table> <thead> <tr> <td>Port name</td> <td>Current port version</td> <td>New port version</td> <td>Update</td...
{ "language": "en", "url": "https://stackoverflow.com/questions/16964", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: JRuby / Rack deployment I know this is pretty exotic, but I want to deploy a Ruby web application (not Rails, but Rack based, so it plugs into most Ruby servers just fine) using JRuby. Google and friends give me a few success stories, but mostly rails related and if not, no details on the deployment are provided. Th...
{ "language": "en", "url": "https://stackoverflow.com/questions/16965", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: .net solution subversion best practices? There are so many examples of how to set up your dotnet projects but none seemed to fit our situation. We have one solution with multiple applications, multiple dependencies. We're on SourceSafe currently and are planning to move to subversion but are finding it difficult to...
{ "language": "en", "url": "https://stackoverflow.com/questions/16969", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do I reset an increment identity's starting value in SQL Server I would like to have a nice template for doing this in development. How do I reset an increment identity's starting value in SQL Server? A: Just a word of warning with: DBCC CHECKIDENT (MyTable, RESEED, 0) If you did not truncate the table, and the...
{ "language": "en", "url": "https://stackoverflow.com/questions/16971", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "65" }
Q: What Ruby IDE do you prefer? I've been using Eclipse with RDT (not RadRails) a lot lately, and I'm quite happy with it, but I'm wondering if you guys know any decent alternatives. I know NetBeans also supports Ruby these days, but I'm not sure what it has to offer over Eclipse. Please, list any features you think ar...
{ "language": "en", "url": "https://stackoverflow.com/questions/16991", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "141" }
Q: Reading "chunked" response with HttpWebResponse I'm having trouble reading a "chunked" response when using a StreamReader to read the stream returned by GetResponseStream() of a HttpWebResponse: // response is an HttpWebResponse StreamReader reader = new StreamReader(response.GetResponseStream()); string output = re...
{ "language": "en", "url": "https://stackoverflow.com/questions/16998", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: How do I parse and convert a DateTime to the RFC 3339 date-time format? How do I convert a DateTime structure to its equivalent RFC 3339 formatted string representation and/or parse this string representation back to a DateTime structure? The RFC-3339 date-time format is used in a number of specifications such as th...
{ "language": "en", "url": "https://stackoverflow.com/questions/17017", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "56" }
Q: What is the best way to partition terabyte drive in a linux development machine? I have a new 1 TB drive coming in tomorrow. What is the best way to divide this space for a development workstation? The biggest problem I think I'm going to have is that some partitions (probably /usr) will become to small after a bit ...
{ "language": "en", "url": "https://stackoverflow.com/questions/17020", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Should I *always* favour implictly typed local variables in C# 3.0? Resharper certainly thinks so, and out of the box it will nag you to convert Dooberry dooberry = new Dooberry(); to var dooberry = new Dooberry(); Is that really considered the best style? A: @jongalloway - var doesn't necessarily make your code ...
{ "language": "en", "url": "https://stackoverflow.com/questions/17032", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "29" }
Q: Sockets in Pascal How do you use network sockets in Pascal? ­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­ A: Here's an example taken from http://www.bastisoft.de/programmierung/pascal/pasinet.html program daytime; { Simple client program } uses sockets, inetaux, myerror; const RemotePort : Word = 13; ...
{ "language": "en", "url": "https://stackoverflow.com/questions/17054", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: SQL Server Full Text Searching I'm currently working on an application where we have a SQL-Server database and I need to get a full text search working that allows us to search people's names. Currently the user can enter a into a name field that searches 3 different varchar cols. First, Last, Middle names So say I ...
{ "language": "en", "url": "https://stackoverflow.com/questions/17056", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: What is the best way to gzip and cache static images in Asp.net mvc I'm trying to find the best way to speed up the delivery of the static images that compose the design of an mvc site. The images are not gzipped, nor cached in the server or on the client (with content expire). Options are: * *Find why images ar...
{ "language": "en", "url": "https://stackoverflow.com/questions/17057", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Escaping XML tag contents I have a simple CAML query like <Where><Eq><Field="FieldName"><Value Type="Text">Value text</Value></Field></Eq></Where> And I have a variable to substitute for Value text. What's the best way to validate/escape the text that is substituted here in the .NET framework? I've done a quick web...
{ "language": "en", "url": "https://stackoverflow.com/questions/17085", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What's the best way to authenticate over WCF? What's the best way to implement authentication over WCF? I'd prefer to not use WS-* as it needs to be transport independent. Should I "roll my own"? Is there any guidance for doing that (articles/blog posts)? Or is there some way to (and should I) use the built in ASP.N...
{ "language": "en", "url": "https://stackoverflow.com/questions/17098", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How to generate sample XML documents from their DTD or XSD? We are developing an application that involves a substantial amount of XML transformations. We do not have any proper input test data per se, only DTD or XSD files. We'd like to generate our test data ourselves from these files. Is there an easy/free way to...
{ "language": "en", "url": "https://stackoverflow.com/questions/17106", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "198" }
Q: Where to start with CruiseControl.NET I'm setting up my team's source control + build/integration process from scratch. We were using VSS and a tool we created in-house to perform the build process. We decided to move on to a more modern environment. I have the SVN running, and I would like to set a continuous integ...
{ "language": "en", "url": "https://stackoverflow.com/questions/17108", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: C++ std::tr2 for VS2005 Is Boost the only way for VS2005 users experience TR2? Also is there a idiot proof way of downloading only the TR2 related packages? I was looking at the boost installer provided by BoostPro Consulting. If I select the options for all the threading options with all the packages for MSVC8 it r...
{ "language": "en", "url": "https://stackoverflow.com/questions/17117", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: What are real life applications of yield? I know what yield does, and I've seen a few examples, but I can't think of real life applications, have you used it to solve some specific problem? (Ideally some problem that cannot be solved some other way) A: actually I use it in a non traditional way on my site IdeaPipe ...
{ "language": "en", "url": "https://stackoverflow.com/questions/17125", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: Can you link 68K code compiled with CodeWarrior for Palm OS with code compiled with PRC-Tools (GCC)? I've got a Palm OS/Garnet 68K application that uses a third-party static library built with CodeWarrior. Can I rebuilt the application using PRC-Tools, the port of GCC for the Palm OS platform and still link with th...
{ "language": "en", "url": "https://stackoverflow.com/questions/17127", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do you spawn another process in C? How do you run an external program and pass it command line parameters using C? If you have to use operating system API, include a solution for Windows, Mac, and Linux. A: On UNIX, I think you basically need to fork it if you want the spawned process to run detached from your ...
{ "language": "en", "url": "https://stackoverflow.com/questions/17140", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "35" }
Q: When to use IList and when to use List I know that IList is the interface and List is the concrete type but I still don't know when to use each one. What I'm doing now is if I don't need the Sort or FindAll methods I use the interface. Am I right? Is there a better way to decide when to use the interface or the conc...
{ "language": "en", "url": "https://stackoverflow.com/questions/17170", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "207" }
Q: Implementing permissions in PHP I've tried to do this several times with no luck. After reading this post, it made me interested in doing this again. So can anyone tell me why the following doesn't work? <?php $guest = 1; $editor = 2; $admin = 4; $user = $editor; if( $user == ($editor | $admin) ) { echo "Te...
{ "language": "en", "url": "https://stackoverflow.com/questions/17172", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: What's your top feature request for Silverlight? I'll take away the obvious one here: mic and webcam support. Other than that, if you ran the Silverlight team, what would your highest priority be for Silverlight v.Next? Disclaimer: If we get some good responses, I'll pass them along to folks I know on the Silverligh...
{ "language": "en", "url": "https://stackoverflow.com/questions/17175", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Test Cases VS ASSERTION statement In my most C++ project I heavily used ASSERTION statement as following: int doWonderfulThings(const int* fantasticData) { ASSERT(fantasticData); if(!fantasticData) return -1; // ,,, return WOW_VALUE; } But TDD community seems like to enjoy doing something li...
{ "language": "en", "url": "https://stackoverflow.com/questions/17181", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: SQL query to compare product sales by month I have a Monthly Status database view I need to build a report based on. The data in the view looks something like this: Category | Revenue | Yearh | Month Bikes 10 000 2008 1 Bikes 12 000 2008 2 Bikes 12 000 2008 3 Bi...
{ "language": "en", "url": "https://stackoverflow.com/questions/17194", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How can Perl's system() print the command that it's running? In Perl, you can execute system commands using system() or `` (backticks). You can even capture the output of the command into a variable. However, this hides the program execution in the background so that the person executing your script can't see it. N...
{ "language": "en", "url": "https://stackoverflow.com/questions/17225", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: What tools do you use to develop C++ applications on Linux? I develop C++ applications in a Linux environment. The tools I use every day include Eclipse with the CDT plugin, gdb and valgrind. What tools do other people use? Is there anything out there for Linux that rivals the slickness of Microsoft Visual Studio?...
{ "language": "en", "url": "https://stackoverflow.com/questions/17228", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "55" }
Q: Why shouldn't I "bet the future of the company" on shell scripts? I was looking at http://tldp.org/LDP/abs/html/why-shell.html and was struck by: When not to use shell scripts ... * *Mission-critical applications upon which you are betting the future of the company Why not? A: I kind of think the arti...
{ "language": "en", "url": "https://stackoverflow.com/questions/17231", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How to create an encrypted ZIP file? I am creating an ZIP file with ZipFile in Python 2.5, it works OK so far: import zipfile, os locfile = "test.txt" loczip = os.path.splitext (locfile)[0] + ".zip" zip = zipfile.ZipFile (loczip, "w") zip.write (locfile) zip.close() But I couldn't find how to encrypt the files in ...
{ "language": "en", "url": "https://stackoverflow.com/questions/17250", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "44" }
Q: Hyperlinks displaced on IE7 Browse to a webpage with hyperlinks using IE (I am using IE7) Once on the page, enlarge the fonts using ctl + mouse wheel. Now when you try to hover over the hyperlinks, they are laterally displaced to the right. To click on the link, i have to move the mouse to the right till the curso...
{ "language": "en", "url": "https://stackoverflow.com/questions/17269", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: REALLY Simple Website--How Basic Can You Go? Although I've done programming, I'm not a programmer. I've recently agreed to coordinate getting a Website up for a club. The resources are--me, who has done Web content maintenance (putting content into HTML and ColdFusion templates via a gatekeeper to the site itself; d...
{ "language": "en", "url": "https://stackoverflow.com/questions/17274", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: iFrame Best Practices I have a large, hi-def JavaScript-intensive image banner for a site I'm designing. What is everyone's opinion of using iframes so that you incur the load time only once? Is there a CSS alternative to the iframe? Feel free to preview the site. It is very much a work in progress. ­­­­­­­­­­­­­­...
{ "language": "en", "url": "https://stackoverflow.com/questions/17289", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: How can I sort an array of double pointers based on the values they point to? I am trying to build a function in C/C++ to sort an array and replace each value with its "score" or rank. It takes in a double pointer array to an array of ints, and sorts the double pointers based on the dereferenced value of the intege...
{ "language": "en", "url": "https://stackoverflow.com/questions/17299", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What areas of specialization within programming would you recommend to a beginner I am a student studying software development, and I feel programming, in general, is too broad of a subject to try to know everything. To be proficient, you have to decide which areas to focus your learning and understanding. Certain s...
{ "language": "en", "url": "https://stackoverflow.com/questions/17320", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: What is the most effective way for float and double comparison? What would be the most efficient way to compare two double or two float values? Simply doing this is not correct: bool CompareDoubles1 (double A, double B) { return A == B; } But something like: bool CompareDoubles2 (double A, double B) { diff =...
{ "language": "en", "url": "https://stackoverflow.com/questions/17333", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "640" }
Q: What are OpenGL extensions, and what are the benefits/tradeoffs of using them? In relation to this question on Using OpenGL extensions, what's the purpose of these extension functions? Why would I want to use them? Further, are there any tradeoffs or gotchas associated with using them? A: Extensions are, in general...
{ "language": "en", "url": "https://stackoverflow.com/questions/17352", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: How do I send a file as an email attachment using Linux command line? I've created a script that runs every night on my Linux server that uses mysqldump to back up each of my MySQL databases to .sql files and packages them together as a compressed .tar file. The next step I want to accomplish is to send that tar fil...
{ "language": "en", "url": "https://stackoverflow.com/questions/17359", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "306" }
Q: Using GLEW to use OpenGL extensions under Windows I've been using OpenGL extensions on Windows the painful way. Is GLEW the easier way to go? How do I get started with it? A: Personally I wouldn't use an exit command. I would throw an exception so you can clear any other initialisation up at the end of the function...
{ "language": "en", "url": "https://stackoverflow.com/questions/17370", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "23" }
Q: How do I open the default mail program with a Subject and Body in a cross-platform way? How do I open the default mail program with a Subject and Body in a cross-platform way? Unfortunately, this is for a a client app written in Java, not a website. I would like this to work in a cross-platform way (which means Wind...
{ "language": "en", "url": "https://stackoverflow.com/questions/17373", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: How would you implement FORM based authentication without a backing database? I have a PHP script that runs as a CGI program and the HTTP Authenticate header gets eaten and spit out. So I would like to implement some kind of FORM based authentication. As an added constraint, there is no database so no session data c...
{ "language": "en", "url": "https://stackoverflow.com/questions/17376", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Privatizing a BlogEngine.Net Installation I have a blogengine.net install that requires privatization. I'm doing research work at the moment, but I have to keep my blog/journal private until certain conditions are met. How can I privatize my blogEngine.net install so that readers must log in to read my posts? A: Fr...
{ "language": "en", "url": "https://stackoverflow.com/questions/17387", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How do you separate game logic from display? How can you make the display frames per second be independent from the game logic? That is so the game logic runs the same speed no matter how fast the video card can render. A: Koen Witters has a very detailed article about different game loop setups. He covers: * *...
{ "language": "en", "url": "https://stackoverflow.com/questions/17411", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: Language Conversion Testing We created a tool which converts a language called P2, a language similar to assembly which I think exists only in Japan, to C#. There are at least a hundred modules written in P2 and we want to verify if the conversion to C# is right? How can we test this? A: You don't test the converte...
{ "language": "en", "url": "https://stackoverflow.com/questions/17430", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: When should you use 'friend' in C++? I have been reading through the C++ FAQ and was curious about the friend declaration. I personally have never used it, however I am interested in exploring the language. What is a good example of using friend? Reading the FAQ a bit longer I like the idea of the << >> operator o...
{ "language": "en", "url": "https://stackoverflow.com/questions/17434", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "385" }
Q: Will server-side JavaScript take off? Which implementation is most stable? Does anyone see server-side JavaScript taking off? There are a couple of implementations out there, but it all seems to be a bit of a stretch (as in, "doing it BECAUSE WE CAN" type of attitude). I'm curious to know if anyone actually writes ...
{ "language": "en", "url": "https://stackoverflow.com/questions/17435", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: IE6 - can't load a normal JPG Try loading this normal .jpg file in Internet Explorer 6.0. I get an error saying the picture won't load. Try it in any other browser and it works fine. What's wrong? The .jpg file is just a normal picture sitting on the web server. I can even create a simple web page: <a href="http://w...
{ "language": "en", "url": "https://stackoverflow.com/questions/17469", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Is there a way to prevent a method from being overridden in subclasses? Is anyone aware of a language feature or technique in C++ to prevent a child class from over riding a particular method in the parent class? class Base { public: bool someGuaranteedResult() { return true; } }; class Child : public Base { pu...
{ "language": "en", "url": "https://stackoverflow.com/questions/17483", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "39" }
Q: Why are DispatcherObject.CheckAccess() and VerifyAccess() hidden from Intellisense? The System.Windows.Threading.DispatcherObject class (which DependencyObject is based on) contains a useful function, called CheckAccess(), that determines whether or not the code is running on the UI thread. When I wanted to use it y...
{ "language": "en", "url": "https://stackoverflow.com/questions/17500", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "22" }
Q: How to modify the style property of a font on Windows? Note that this question continues from Is it possible to coax Visual Studio 2008 into using italics for comments? If the long question title got you, here's the problem: How to convert the style property of the Consolas Italic font to Bold without actually mo...
{ "language": "en", "url": "https://stackoverflow.com/questions/17508", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: ASP.NET Custom Controls - Composites Summary Hi All, OK, further into my adventures with custom controls... In summary, here is that I have learned of three main "classes" of custom controls. Please feel free to correct me if any of this is wrong! * *UserControls - Which inherit from UserControl and are contained ...
{ "language": "en", "url": "https://stackoverflow.com/questions/17532", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: Request Windows Vista UAC elevation if path is protected? For my C# app, I don't want to always prompt for elevation on application start, but if they choose an output path that is UAC protected then I need to request elevation. So, how do I check if a path is UAC protected and then how do I request elevation mid-ex...
{ "language": "en", "url": "https://stackoverflow.com/questions/17533", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "27" }
Q: Recommendations for browser add-on tools to help with development Can anyone suggest some good browser add-on tools/extensions to help with development? I have firebug installed in Firefox which is great for dealing with CSS, HTML and javascript; any other suggestions? Firebug A: For Firefox: Firebug is awesome for...
{ "language": "en", "url": "https://stackoverflow.com/questions/17561", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Non Public Members for C# Interfaces In C#, when you implement an interface, all members are implicitly public. Wouldn't it be better if we could specify the accessibility modifier (protected, internal, except private of course), or should we just use an abstract class instead? A: Would not make sense. An Interface...
{ "language": "en", "url": "https://stackoverflow.com/questions/17576", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "34" }
Q: Best word wrap algorithm? Word wrap is one of the must-have features in a modern text editor. How word wrap be handled? What is the best algorithm for word-wrap? If text is several million lines, how can I make word-wrap very fast? Why do I need the solution? Because my projects must draw text with various zoom leve...
{ "language": "en", "url": "https://stackoverflow.com/questions/17586", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "34" }
Q: Email queueing in php What is the most proper way to sending email of minimal 1000 or more in PHP? Any reliable email queuing technique that is capable to handle that? ­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­ A: You could just insert your emails into a Mail Queue database table, and have a separate process check the queu...
{ "language": "en", "url": "https://stackoverflow.com/questions/17609", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How do you place a file in recycle bin instead of delete? Programmatic solution of course... A: http://www.daveamenta.com/2008-05/c-delete-a-file-to-the-recycle-bin/ From above: using Microsoft.VisualBasic; string path = @"c:\myfile.txt"; FileIO.FileSystem.DeleteDirectory(path, FileIO.UIOption.OnlyErrorDialog...
{ "language": "en", "url": "https://stackoverflow.com/questions/17612", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "29" }
Q: What is the easiest way using T-SQL / MS-SQL to append a string to existing table cells? I have a table with a 'filename' column. I recently performed an insert into this column but in my haste forgot to append the file extension to all the filenames entered. Fortunately they are all '.jpg' images. How can I easily...
{ "language": "en", "url": "https://stackoverflow.com/questions/17624", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Differences between unix and windows files Am I correct in assuming that the only difference between "windows files" and "unix files" is the linebreak? We have a system that has been moved from a windows machine to a unix machine and are having troubles with the format. I need to automate the translation between uni...
{ "language": "en", "url": "https://stackoverflow.com/questions/17645", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: Retrieving the PC Name of a Client? (Windows Auth) I have an ASP.net Application that runs on the internal network (well, actually it's running on Sharepoint 2007). I just wonder: Can I somehow retrieve the name of the PC the Client is using? I would have access to Active Directory if that helps. The thing is, peo...
{ "language": "en", "url": "https://stackoverflow.com/questions/17664", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Suitable alternative to CryptEncrypt We have a situation in our product where for a long time some data has been stored in the application's database as SQL string (choice of MS SQL server or sybase SQL anywhere) which was encrypted via the Windows API function CryptEncrypt. (direct and de-cryptable) The problem is...
{ "language": "en", "url": "https://stackoverflow.com/questions/17670", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Why does Guid.ToString() reverse the byte order? We're storing some Guid's in a MS SQL database. There's some legacy code that does Guid.ToString() and then passes them in to a varchar(64) and there's some newer code that passes them in using a unique identifier parameter. When you look at the results using MS SQL M...
{ "language": "en", "url": "https://stackoverflow.com/questions/17679", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: WebSVN with VisualSVN Server, anyone gotten authentication to work? I have a VisualSVN Server installed on a Windows server, serving several repositories. Since the web-viewer built into VisualSVN server is a minimalistic subversion browser, I'd like to install WebSVN on top of my repositories. The problem, however,...
{ "language": "en", "url": "https://stackoverflow.com/questions/17681", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Unix subsystem for windows One of the bullet point features for Windows Vista Enterprize and Ultimate is the Unix subsystem for windows, which allows you to write posix... stuff? Anyway I'm outa my league talking about it... Anyone use this feature? Or explain it... I know next to nothing about Unix programming. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/17704", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: When is a file just a file? So, you're writing a web application and you have several areas of the site where the user can upload files. My basic working method for this is to store the actual file on the server, and have a database table that connects the stored filename to the record it relates to. My question is ...
{ "language": "en", "url": "https://stackoverflow.com/questions/17715", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Migrating from MySQL to PostgreSQL We are currently using MySQL for a product we are building, and are keen to move to PostgreSQL as soon as possible, primarily for licensing reasons. Has anyone else done such a move? Our database is the lifeblood of the application and will eventually be storing TBs of data, so I'm...
{ "language": "en", "url": "https://stackoverflow.com/questions/17717", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "26" }
Q: Experience with Hadoop? Have any of you tried Hadoop? Can it be used without the distributed filesystem that goes with it, in a Share-nothing architecture? Would that make sense? I'm also interested into any performance results you have... A: Yes, you can use Hadoop on a local filesystem by using file URIs instead ...
{ "language": "en", "url": "https://stackoverflow.com/questions/17721", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }