text
stringlengths
8
267k
meta
dict
Q: How can I set up a configuration file for .NET console applications? Is it possible to use a ".net configuration" file for a .NET console application? I'm looking for an equivalent to web.config, but specifically for console applications... I can certainly roll my own, but If I can use .NET's built in configuration...
{ "language": "en", "url": "https://stackoverflow.com/questions/167671", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: Can I map local branches to remote branches with different prefixes in git? We're working with a semi-centralized git repository here where I work. Each developer has their own subtree in the central git repository, so it looks something like this: master alice/branch1 alice/branch2 bob/branch1 michael/feature relea...
{ "language": "en", "url": "https://stackoverflow.com/questions/167697", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: Reload configurations without restarting Emacs How do I load the edited .emacs file without restarting Emacs? A: In the *scratch* buffer, type: (load-file user-init-file) Then press C-x C-e to evaluate the expression. A: M-x load-file and then choose the .emacs file should also work A: M-x load-file ~/.emacs eva...
{ "language": "en", "url": "https://stackoverflow.com/questions/167705", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "94" }
Q: What is the difference between CouchDB and Lotus Notes? I was looking into the possibility of using CouchDB. I heard that it was similar to Lotus Notes which everyone loves to hate. Is this true? A: Damien Katz worked at Iris (Lotus), but he was not the guy behind the Notes Database. He is well-known in the Lot...
{ "language": "en", "url": "https://stackoverflow.com/questions/167716", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "22" }
Q: Again with JPA not making sense I asked this earlier and was told to look at mapped by. I have 2 tables: A s_id(key) name cli type B sa_id(key) s_id user pwd. So in Jpa I have: @Entity class A...{ @OneToMany(fetch=FetchType.EAGER) @JoinTable( name="A_B", joinColumns={@JoinColumn(name="a_id", table="a",unique=fals...
{ "language": "en", "url": "https://stackoverflow.com/questions/167729", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-2" }
Q: Fast pseudo random number generator for procedural content I am looking for a pseudo random number generator which would be specialized to work fast when it is given a seed before generating each number. Most generators I have seen so far assume you set seed once and then generate a long sequence of numbers. The onl...
{ "language": "en", "url": "https://stackoverflow.com/questions/167735", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: Possible Memory leak in Number of Loaded classes in Java Application I recently began profiling an osgi java application that I am writing using VisualVM. One thing I have noticed is that when the application starts sending data to a client (over JMS), the number of loaded classes starts increasing at a steady rate...
{ "language": "en", "url": "https://stackoverflow.com/questions/167740", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Quickest way to implement a C++ Win32 Splash Screen What's a simple way to implement a c++ Win32 program to... - display an 800x600x24 uncompressed bitmap image - in a window without borders (the only thing visible is the image) - that closes after ten seconds - and doesn't use MFC A: If you're targeting modern ver...
{ "language": "en", "url": "https://stackoverflow.com/questions/167743", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Spring: Obtaining ResourceBundle based on MessageSource I'm using hibernate validator framework with Spring. A class implementing the Spring Validator validates objects with Hibernate's ClassValidator. To localize ClassValidator's error messages I need to pass a ResourceBundle into the class' constructor. My Applica...
{ "language": "en", "url": "https://stackoverflow.com/questions/167745", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Where can I find an open source C# project that uses ADO.NET? I am trying to write a Windows Form and ASP.NET C# front-end and MSAccess backend for a pretty small database concept I have. I have written this application once before in just MSAccess but I now need the app and database to be in different places. I ha...
{ "language": "en", "url": "https://stackoverflow.com/questions/167746", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How can you display Typing Speed using Javascript or the jQuery library? I would like to add a typing speed indicator just below the textarea we use on our contact form. It is just for fun and to give the user some interactivity with the page while they are completing the form. It should display the average speed wh...
{ "language": "en", "url": "https://stackoverflow.com/questions/167752", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Hiding a function I have a class holding complex scientific computations. It is set up to only allow a user to create a properly instantiated case. To properly test the code, however, requires setting internal state variables directly, since the reference documents supply this data in their test cases. Done impro...
{ "language": "en", "url": "https://stackoverflow.com/questions/167760", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to achieve a photo "stack" border effect with CSS? I'd like to be able to add a class to images that adds a border that makes them look like a stack of photos. Anyone know how to do this? Clarifications: Ideally something like the stack shown here but it doesn't need to be interactive and only needs to work for...
{ "language": "en", "url": "https://stackoverflow.com/questions/167761", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: What is the simplest way to allow a user to drag and drop table rows in order to change their order? I have a Ruby on Rails application that I'm writing where a user has the option to edit an invoice. They need to be able to reassign the order of the rows. Right now I have an index column in the db which is used ...
{ "language": "en", "url": "https://stackoverflow.com/questions/167772", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Control multiple PCs with single Mouse and Keyboard As a programmer I found it very hard to use my laptop and workstation with two different input devices, Can anyone suggest a good solution to use single mouse and keyboard to control my two machines I am not looking for a Virtual Machine or RDP solution to see my m...
{ "language": "en", "url": "https://stackoverflow.com/questions/167791", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: AJAX, postbacks and browser refreshes I have created a user control to handle adding comments to certain business entities, like contacts and customers. Works great ... except for one issue. I am using a ListView control to edit and delete comments, and a separate area, on the same user control to add a new comment...
{ "language": "en", "url": "https://stackoverflow.com/questions/167808", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Java Development on a Mac - Xcode, Eclipse, or Netbeans I've been using Xcode for the usual C/C++/ObjC development. I'm wondering what are practical considerations, opinions of Xcode, Eclipse or NetBeans usage on a Mac for Java development? Please don't include my current usage of Xcode in your analysis. A: Do no...
{ "language": "en", "url": "https://stackoverflow.com/questions/167812", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "23" }
Q: PHP Script Compression/"Compilation" Tools Are there any more generic tools that can "compile" or basically merge multiple PHP files into a single file based on includes and autoloading classes? I'm thinking of something similar to Doctrine's compiling functionality or the compiling that many of the major JS framewo...
{ "language": "en", "url": "https://stackoverflow.com/questions/167816", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: I work in SCM/build. How do I tell non-programmers what I do? Friends/family/etc ask me what I do and it always causes me pause while I think of how to explain it. They know what a software developer is but how can I explain what SCM is in 10 words? A: I'd tell people "I work in software development". I wouldn't b...
{ "language": "en", "url": "https://stackoverflow.com/questions/167827", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Should you worry about fake accounts/logins on a website? I'm specifically thinking about the BugMeNot service, which provides user name and password combos to a good number of sites. Now, I realize that pay-for-content sites might be worried about this (and I would suspect that most watch for shared accounts), but ...
{ "language": "en", "url": "https://stackoverflow.com/questions/167835", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: How can I make a globally accessible datatable in a Winforms application? Disclaimer: I am new to Winforms. I need to declare a datatable that I can load with data when the main form loads. I then want to be able to reference the datatable from within events like when a button is clicked etc. Where/how should I decl...
{ "language": "en", "url": "https://stackoverflow.com/questions/167844", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: WSDL URL for a WCF Service (basicHttpBinding) hosted inside a Windows Service I am hosting a WCF service in a Windows Service on one of our servers. After making it work in basicHttpBinding and building a test client in .NET (which finally worked) I went along and try to access it from PHP using the SoapClient class...
{ "language": "en", "url": "https://stackoverflow.com/questions/167852", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Selenium Drag&Drop in testing javascript Need your help in such a specific situation. I use Selenium framework for testing the application, which based on "ext js" library. There are 2 trees of elements. I need to move an element from one tree to another element in the second tree. I use dragAndDropToObject(xpath1,x...
{ "language": "en", "url": "https://stackoverflow.com/questions/167857", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Need assistance with serial port communications in Ruby I need to do some communications over a serial port in Ruby. From my research, it appears that there aren't many modern libraries for serial communications and the newest material I can find is from 2006. Are there any gems that I'm not aware of? I ultimately...
{ "language": "en", "url": "https://stackoverflow.com/questions/167858", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How can I "unuse" a namespace? One of the vagaries of my development system (Codegear C++Builder) is that some of the auto-generated headers insist on having... using namespace xyzzy ...statements in them, which impact on my code when I least want or expect it. Is there a way I can somehow cancel/override a previo...
{ "language": "en", "url": "https://stackoverflow.com/questions/167862", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "94" }
Q: Repeated cookie query or Storing in viewstate? Which is the better practice? I have a internal website that users log into. This data is saved as a cookie. From there the users go on their merry way. Every so often the application(s) will query the authentication record to determine what permissions the user has....
{ "language": "en", "url": "https://stackoverflow.com/questions/167873", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How can I GZip compress a file from Excel VBA using code in an .xla file only? I need to be able to GZip compress a file in an Excel VBA function. Specifically I need to be able to use the 'deflate' algorithm. Is there a way to do this without having to exec a command line application? With no dependency on external...
{ "language": "en", "url": "https://stackoverflow.com/questions/167888", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Very slow response for Visual Studio 2005 Web Site Administration Tool I am working on an ASP.NET application and am trying to add user authentication. As a first step, I am using the Web Site Administration tool (Website | ASP.NET Configuration) to manage users and permissions. Accessing this website is incredibly...
{ "language": "en", "url": "https://stackoverflow.com/questions/167893", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do you stop interim solutions from lasting forever? Say there are two possible solutions to a problem: the first is quick but hacky; the second is preferable but would take longer to implement. You need to solve the problem fast, so you decide to get the hack in place as quickly as you can, planning to start wo...
{ "language": "en", "url": "https://stackoverflow.com/questions/167904", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "79" }
Q: Is F# suitable for Physics applications? I hate Physics, but I love software development. When I go back to school after Thanksgiving, I'll be taking two more quarters of Physics before I'm done with the horrid thing. I am currently reading postings on the F# units of measurement feature, but I've never used a langu...
{ "language": "en", "url": "https://stackoverflow.com/questions/167909", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Table load via Partition Exchange (Oracle 10g) I have a few questions about optimizing this type of load. One builds a new table of data to be loaded into a partitioned table and then builds the indexes on this new table. * *Should you build the index with the COMPUTE STATISTICS option or use the Cascade option ...
{ "language": "en", "url": "https://stackoverflow.com/questions/167916", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do you enforce strong passwords? There are many techniques to enforce strong passwords on website: * *Requesting that passwords pass a regex of varying complexity *Setting the password autonomously, so that casual users have a strong password *Letting passwords expire *etc. On the other hands there are d...
{ "language": "en", "url": "https://stackoverflow.com/questions/167917", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: What is best way to remove duplicate lines matching regex from string using Python? This is a pretty straight forward attempt. I haven't been using python for too long. Seems to work but I am sure I have much to learn. Someone let me know if I am way off here. Needs to find patterns, write the first line which match...
{ "language": "en", "url": "https://stackoverflow.com/questions/167923", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Looking for CSS Example, or Explanation of Layout Below I've been learning CSS for a while now, but the simplified layout below is still a little beyond me, so I am asking whether anyone knows of a model for such a layout, or would have an explanation to make this work. The page should have 3 bands or blocks: header...
{ "language": "en", "url": "https://stackoverflow.com/questions/167926", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Is there a function to invoke a stack dump in C? Can someone please provide an implementation of a C function that gets invoked to dump the current stack? It's for a x86 linux system. It can be invoked in 2 ways: explicitly by another function, or after a crash (probably as a trap/int handler). The output can be e...
{ "language": "en", "url": "https://stackoverflow.com/questions/167927", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How would you compare two XML Documents? As part of the base class for some extensive unit testing, I am writing a helper function which recursively compares the nodes of one XmlDocument object to another in C# (.NET). Some requirements of this: * *The first document is the source, e.g. what I want the XML docum...
{ "language": "en", "url": "https://stackoverflow.com/questions/167946", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "68" }
Q: Should I use NULL or an empty string to represent no data in table column? Null or empty string -- is one better than the other to represent no data in a table column? (I specifically use MySQL, but I'm thinking this is system-independent.) Are there major advantages/disadvantages to using one over the other, or is ...
{ "language": "en", "url": "https://stackoverflow.com/questions/167952", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "29" }
Q: Order dates by upcoming So I build an array of various dates. Birthdays, anniversaries, and holidays. I'd like to order the array by which one is happening next, essentially sort October to September (wrapping to next year) so if my array is $a = ([0]=>"1980-04-14", [1]=>"2007-06-08", [2]=>"2008-12-25", [3]=>"19...
{ "language": "en", "url": "https://stackoverflow.com/questions/167954", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How can I embed one file into another with Ant? I am developing a small web app project (ColdFusion) and I am trying to keep my project split into multiple files during development, but deploy just one file on completion. I have references to external files, for instance: <script type="text/javascript" src="jquery-1...
{ "language": "en", "url": "https://stackoverflow.com/questions/167990", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do you defend your application against corporate politics? I can't tell you how many times I've run into situations where a higher-up says 'Look, just do it'. This is obviously at the expense of rigidity in the planning process, and will (probably) affect product quality. By now, I have more experience with this...
{ "language": "en", "url": "https://stackoverflow.com/questions/168014", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Convert BSTR to int Does any one know how can I convert a BSTR to an int in VC++ 2008 Thanks in advance. A: Google suggests VarI4FromStr: HRESULT VarI4FromStr( _In_ LPCOLESTR strIn, _In_ LCID lcid, _In_ ULONG dwFlags, _Out_ LONG *plOut ); A: Try the _wtoi function: int i = _wtoi( mybstr ); A: You...
{ "language": "en", "url": "https://stackoverflow.com/questions/168017", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Naming conventions in a Python library I'm implementing a search algorithm (let's call it MyAlg) in a python package. Since the algorithm is super-duper complicated, the package has to contain an auxiliary class for algorithm options. Currently I'm developing the entire package by myself (and I'm not a programmer), ...
{ "language": "en", "url": "https://stackoverflow.com/questions/168022", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Creating a random ordered list from an ordered list I have an application that takes the quality results for a manufacturing process and creates graphs both to show Pareto charts of the bad, and also to show production throughput. To automate the task of testing these statistical procedures I would like to determin...
{ "language": "en", "url": "https://stackoverflow.com/questions/168037", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Whats the BEST way to setup a library to support links into precompiled Software for multiple platforms, compilation options I'm maintaining a library that contains compiled objects that need to be linked into a 3rd party executable. sometimes the executable has been compiled for Solaris, sometimes as a 32bit Linux...
{ "language": "en", "url": "https://stackoverflow.com/questions/168046", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: My SQL Server 2000 Transaction Log Size Seems Small I'm wondering why my transaction log would only be 2 MB on my 40 GB database when I have recovery mode set to full and unlimited file growth set on the transaction log. Any ideas? Edit: I'd say there is probably a few hundred MB inserted every day and a lot of upda...
{ "language": "en", "url": "https://stackoverflow.com/questions/168062", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I redirect a file download using Grails? I'm currently writing a website that allows people to download Excel and text files. Is there a way to redirect to a different page when they click, so that we run javascript and do analytics (i.e. keep download count)? Currently, nothing prevents the user from simply ...
{ "language": "en", "url": "https://stackoverflow.com/questions/168073", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: JPA and inheritance I have a some JPA entities that inherit from one another and uses discriminator to determine what class to be created (untested as of yet). @Entity(name="switches") @DiscriminatorColumn(name="type") @DiscriminatorValue(value="500") public class DmsSwitch extends Switch implements Serializable {} ...
{ "language": "en", "url": "https://stackoverflow.com/questions/168080", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Is there a more efficient way of making pagination in Hibernate than executing select and count queries? Usually pagination queries look like this. Is there a better way instead of making two almost equal methods, one of which executing "select *..." and the other one "count *..."? public List<Cat> findCats(String n...
{ "language": "en", "url": "https://stackoverflow.com/questions/168084", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "40" }
Q: SQL Server Service Broker Issue & Tutorials I've been looking into implementing an external activator in SQL Server Express 2005, and I added the queues, services, contracts, and event notifications to the database. I also added a trigger to send a message to the target queue. Everything parses, runs, and the trigge...
{ "language": "en", "url": "https://stackoverflow.com/questions/168104", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Django: How do I create a generic url routing to views? I have a pretty standard django app, and am wondering how to set the url routing so that I don't have to explicitly map each url to a view. For example, let's say that I have the following views: Project, Links, Profile, Contact. I'd rather not have my urlpatt...
{ "language": "en", "url": "https://stackoverflow.com/questions/168113", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Best Flash Audio/Video + Interactivity server? I'm looking for suggestions on Flash realtime servers. Currently, we use a combination of Moock's Unity and Red5, but there are a couple problems. First, we are moving to AS3, and Unity only supports AS2. Secondly, Red5 is pretty flaky for us, we'd prefer something more...
{ "language": "en", "url": "https://stackoverflow.com/questions/168114", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: What would be Linux equivalent of GetProcessIoCounters? Here's a link to Windows documentation. Basically I would like to get similar data, but on Linux. If not all is possible, then at least some parts. A: Have a look at /proc/PID/io - it's the current I/O accounting information of the process with PID. A: If you...
{ "language": "en", "url": "https://stackoverflow.com/questions/168116", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Time math in Delphi I have a pretty unusual problem (for me). I am writing an application that will allow a user to change their system time forward or back either by explicit date (change my date to 6/3/1955) or by increment using buttons (go forward 1 month). I'm writing this to help some of my users test some s...
{ "language": "en", "url": "https://stackoverflow.com/questions/168119", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How can I do bi-directional communication with a custom USB device? I'm planning to build a USB device that has buttons that some software needs to respond to, and indicators that the software needs to control. I'm new to USB, so I'm looking for any pointers that will get me started. A: When I did some USB developm...
{ "language": "en", "url": "https://stackoverflow.com/questions/168120", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to set up your own PEAR Channel? I am looking for instructions on how to setup a PEAR channel for our project so that we can deploy it with the pear installer. I have searched the web for a while and cannot find any straightforward information. I followed this tutorial for a while, but I am having a hell of a ti...
{ "language": "en", "url": "https://stackoverflow.com/questions/168136", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Other than for LINQ queries, how do you use anonymous types in C#? I've been trying to get up to speed on some of the newer features in C# and one of them that I haven't had occasion to use is anonymous types. I understand the usage as it pertains to LINQ queries and I looked at this SO post which asked a similar qu...
{ "language": "en", "url": "https://stackoverflow.com/questions/168150", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Initializing cherrypy.session early I love CherryPy's API for sessions, except for one detail. Instead of saying cherrypy.session["spam"] I'd like to be able to just say session["spam"]. Unfortunately, I can't simply have a global from cherrypy import session in one of my modules, because the cherrypy.session objec...
{ "language": "en", "url": "https://stackoverflow.com/questions/168167", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: public variables vs private variables with accessors Has anyone else seen people do this: private string _name; public string Name{ get{ return _name; } set{ _name = value;}} I understand using accessors if you are going to exercise some sort of control over how it gets set or perform some sort of function on it whe...
{ "language": "en", "url": "https://stackoverflow.com/questions/168169", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "24" }
Q: Do .net applications run on Linux? Do .net applications run on linux? Are there any free/paid interop libraries available ? A: The Mono project provides a standards compliant implementation of the CLR virtual machine component of .Net. They've also reverse engineered a significant number of the framework portion o...
{ "language": "en", "url": "https://stackoverflow.com/questions/168170", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Regular expression for parsing name value pairs Can someone provide a regular expression for parsing name/value pairs from a string? The pairs are separated by commas, and the value can optionally be enclosed in quotes. For example: AssemblyName=foo.dll,ClassName="SomeClass",Parameters="Some,Parameters" A: * *N...
{ "language": "en", "url": "https://stackoverflow.com/questions/168171", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: Change name of file sent to client? I have a webpage that pulls information from a database, converts it to .csv format, and writes the file to the HTTPResponse. string csv = GetCSV(); Response.Clear(); Response.ContentType = "text/csv"; Response.Write(csv); This works fine, and the file is sent to the client wit...
{ "language": "en", "url": "https://stackoverflow.com/questions/168173", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Double-click double-insert resolutions? A team member has run into an issue with an old in-house system where a user double-clicking on a link on a web page can cause two requests to be sent from the browser resulting in two database inserts of the same record in a race condition; the last one to run fails with a pr...
{ "language": "en", "url": "https://stackoverflow.com/questions/168181", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I make Ruby Gems installations on Windows use MinGW for making and compiling? Trying to update some gems on a Windows machine and I continually get this error output for gems that do not have pre-compiled binaries: Provided configuration options: --with-opt-dir --without-opt-dir --with-opt-includ...
{ "language": "en", "url": "https://stackoverflow.com/questions/168186", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Pass a PHP string to a JavaScript variable (and escape newlines) What is the easiest way to encode a PHP string for output to a JavaScript variable? I have a PHP string which includes quotes and newlines. I need the contents of this string to be put into a JavaScript variable. Normally, I would just construct my Ja...
{ "language": "en", "url": "https://stackoverflow.com/questions/168214", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "398" }
Q: Is it possible to have separate SQLite databases within the same Django project? I was considering creating a separate SQLite database for certain apps on a Django project. However, I did not want to use direct SQLite access if possible. Django-style ORM access to these database would be ideal. Is this possible? Tha...
{ "language": "en", "url": "https://stackoverflow.com/questions/168218", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Unresolved External Symbol Errors switching from build library to exe or dll I am building an application as a library, but to make sure I can get the output that I'd like, I switched it over to produce an exe. As soon as I did, I got several errors about unresolved external symbols. At first I thought that I didn'...
{ "language": "en", "url": "https://stackoverflow.com/questions/168232", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How can I access an IFRAME from the codebehind file in ASP.NET? I am trying to set attributes for an IFRAME html control from the code-behind aspx.cs file. I came across a post that says you can use FindControl to find the non-asp controls using: The aspx file contains: <iframe id="contentPanel1" runat="server" /> ...
{ "language": "en", "url": "https://stackoverflow.com/questions/168236", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "30" }
Q: Is it possible to connect PHP to SQL Server Compact Edition? Is it possible to connect PHP to a SQL Server Compact Edition database? What would be the best driver? I need it for a desktop application where SQL Server Express is too heavy. A: Short Answer : No. Long Answer : To my knowledge, unlike PostgreSQL / MyS...
{ "language": "en", "url": "https://stackoverflow.com/questions/168240", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How do I use an arbitrary string as a lock in C++? Let's say I have a multithreaded C++ program that handles requests in the form of a function call to handleRequest(string key). Each call to handleRequest occurs in a separate thread, and there are an arbitrarily large number of possible values for key. I want the f...
{ "language": "en", "url": "https://stackoverflow.com/questions/168249", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: How do I build and install P4Python for Mac OS X? I've been unable to build P4Python for an Intel Mac OS X 10.5.5. These are my steps: * *I downloaded p4python.tgz (from http://filehost.perforce.com/perforce/r07.3/tools/) and expanded it into "P4Python-2007.3". *I downloaded p4api.tar (from http://filehost.perfo...
{ "language": "en", "url": "https://stackoverflow.com/questions/168273", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do I show an embedded excel file in a WebPage? I want to allow an Excel report to be viewed embedded in a WebPage... is there a way? * *I don't want to use an ActiveX, or OWC (Office Web Components), I just want to open an existing file from the internet explorer application. *I don't want users to download ...
{ "language": "en", "url": "https://stackoverflow.com/questions/168280", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: When do you use an IDE? I know that some people swear against using a language-specific IDE ever (vim/emacs or die! type stuff) and that some people are really uncomfortable with coding/compiling in the terminal at all, so my question has the following parts. * *When do you switch from one to the other *Is it ev...
{ "language": "en", "url": "https://stackoverflow.com/questions/168283", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Will Learning C++ Help for Building Fast/No-Additional-Requirements Desktop Applications? Will learning C++ help me build native applications with good speed? Will it help me as a programmer, and what are the other benefits? The reason why I want to learn C++ is because I'm disappointed with the UI performances of a...
{ "language": "en", "url": "https://stackoverflow.com/questions/168298", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How to enforce locking workstation when leaving? Is this important? Within your organization, is every developer required to lock his workstation when leaving it? What do you see a risks when workstations are left unlocked, and how do you think such risks are important compared to "over-wire" (network hacking) secur...
{ "language": "en", "url": "https://stackoverflow.com/questions/168303", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: C# .Net exe doesn't close when PC is restarted, keeping the machine from restarting We have a SmartClient built in C# that stubornly remains open when the PC its running on is being restarted. This halts the restart process unless the user first closes the SmartClient or there is some other manual intervention. Thi...
{ "language": "en", "url": "https://stackoverflow.com/questions/168317", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: how to identify the minimal set of parameters describing a data set I have a bunch of regression test data. Each test is just a list of messages (associative arrays), mapping message field names to values. There's a lot of repetition within this data. For example test1 = [ { sender => 'client', msg => '1...
{ "language": "en", "url": "https://stackoverflow.com/questions/168349", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Eclipse's Ctrl+click in Visual Studio? After working for a few days with Eclipse Java I totally got addicted to pressing Ctrl and clicking on an identifier to go to its definition. Since then I've been looking for a way to achieve this in Visual Studio as well. I realize VS has right click, Go to definition, and tha...
{ "language": "en", "url": "https://stackoverflow.com/questions/168369", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "109" }
Q: What is the best way to partition large tables in SQL Server? In a recent project the "lead" developer designed a database schema where "larger" tables would be split across two separate databases with a view on the main database which would union the two separate database-tables together. The main database is what...
{ "language": "en", "url": "https://stackoverflow.com/questions/168374", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Visual Studio 2005 Memory Usage I find that quite often Visual Studio memory usage will average ~150-300 MB of RAM. As a developer who very often needs to run with multiple instances of Visual Studio open, are there any performance tricks to optimize the amount of memory that VS uses? I am running VS 2005 with one a...
{ "language": "en", "url": "https://stackoverflow.com/questions/168375", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "24" }
Q: Templated delegates I have the following piece of code pattern: void M1(string s, string v) { try { // Do some work } catch(Exception ex) { // Encapsulate and rethrow exception } } The only difference is that the return type and the number and types of parameters to the methods can vary. I want ...
{ "language": "en", "url": "https://stackoverflow.com/questions/168384", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Does typeof(myType).TypeHandle use reflection? If I wrote this code: typeof(myType).TypeHandle Would it use reflection? How much different from: Type.GetType(string).TypeHandle is it? A: Well, it really depends on what you mean by "reflection" - which isn't exactly strictly defined. There are two parts to using ...
{ "language": "en", "url": "https://stackoverflow.com/questions/168393", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Capturing method state using Reflection Is there a way to use .NET reflection to capture the values of all parameters/local variables? A: You could get at this information using the CLR debugging API though it won't be a simple couple of lines to extract it. A: Reflection is not used to capture information from th...
{ "language": "en", "url": "https://stackoverflow.com/questions/168396", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: XML Schema XSD TotalDigits vs. MaxInclusive I have run across an XML Schema with the following definition: <xs:simpleType name="ClassRankType"> <xs:restriction base="xs:integer"> <xs:totalDigits value="4"/> <xs:minInclusive value="1"/> <xs:maxInclusive value="9999"/> </xs:restriction>...
{ "language": "en", "url": "https://stackoverflow.com/questions/168402", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: C++ alternatives to void* pointers (that isn't templates) It looks like I had a fundamental misunderstanding about C++ :< I like the polymorphic container solution. Thank you SO, for bringing that to my attention :) So, we have a need to create a relatively generic container type object. It also happens to encapsul...
{ "language": "en", "url": "https://stackoverflow.com/questions/168408", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How do you get a directory listing sorted by creation date in python? What is the best way to get a list of all files in a directory, sorted by date [created | modified], using python, on a windows machine? A: # *** the shortest and best way *** # getmtime --> sort by modified time # getctime --> sort by created ti...
{ "language": "en", "url": "https://stackoverflow.com/questions/168409", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "197" }
Q: Tcp/Ip Socket connections in .NET For my current project, I need to request XML data over a tcp/ip socket connection. For this, I am using the TcpClient class: Dim client As New TcpClient() client.Connect(server, port) Dim stream As NetworkStream = client.GetStream() stream.Write(request) stream.Read(buffer, 0, bu...
{ "language": "en", "url": "https://stackoverflow.com/questions/168415", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Why does subversion chown/recreate files on checkin? I have a personal wiki that I take notes on. The wiki's pages are in a subversion working copy directory, "pages", and I set their permissions to 664, owned by www-data:www-data. My username is in the "www-data" group, so I can checkin and mess with the pages ma...
{ "language": "en", "url": "https://stackoverflow.com/questions/168423", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do I add a shortcut key to Eclipse 3.2 Java plug-in to build the current project? One of the few annoying things about the Eclipse Java plug-in is the absence of a keyboard shortcut to build the project associated with the current resource. Anyone know how to go about it? A: You can assign a keyboard binding t...
{ "language": "en", "url": "https://stackoverflow.com/questions/168426", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: Compare SQL Server Reporting Services to Crystal Reports Which of Crystal Reports and SSRS (SQL Server Reporting Services) is better to use? A: I've used both, I'll add a couple of points to what's already been said: * *For simple stuff, I'd recommend SSRS by default. Crystal is a bit bloated and quirky. *Cryst...
{ "language": "en", "url": "https://stackoverflow.com/questions/168427", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "84" }
Q: RTTI on objects in Delphi I'm trying to parse objects to XML in Delphi, so I read about calling the object's ClassInfo method to get its RTTI info. The thing is, this apparently only works for TPersistent objects. Otherwise, I have to specifically add a compiler directive {$M+} to the source code for the compiler to...
{ "language": "en", "url": "https://stackoverflow.com/questions/168438", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do you add a link that will add an event to your iPhone calendar from safari? This seems like it should be simple but after a couple hours of googling I have not figured it out. I know I can add iCal links using ICS files, but this does not work on the iPhone. BTW, when I say iPhone I would like it to work on t...
{ "language": "en", "url": "https://stackoverflow.com/questions/168440", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "22" }
Q: How do you post to an iframe? How do you post data to an iframe? A: Depends what you mean by "post data". You can use the HTML target="" attribute on a <form /> tag, so it could be as simple as: <form action="do_stuff.aspx" method="post" target="my_iframe"> <input type="submit" value="Do Stuff!"> </form> <!-- wh...
{ "language": "en", "url": "https://stackoverflow.com/questions/168455", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "309" }
Q: Do JavaScript properties calculate on each call? Since length is a JavaScript property, does it matter whether I use for( var i = 0; i < myArray.length; i++ ) OR var myArrayLength = myArray.length; for( var i = 0; i < myArrayLength ; i++ ) ­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­ A: for(var i = 0, iLen = myArra...
{ "language": "en", "url": "https://stackoverflow.com/questions/168464", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: What's the difference between ASP.Net MVC Routing and the new ASP.Net DynamicData Site routing? I've only started playing with both ASP.Net MVC and the new-to-VS2008 Dynamic Data Website Templates. I note that they both use routing in their URL handling, and I'm given to understand that because of routing, ASP.Net ...
{ "language": "en", "url": "https://stackoverflow.com/questions/168481", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What's your #1 way to be careful with a live database? For my customer I occasionally do work in their live database in order to fix a problem they have created for themselves, or in order to fix bad data that my product's bugs created. Much like Unix root access, it's just dangerous. What lessons should I learn a...
{ "language": "en", "url": "https://stackoverflow.com/questions/168486", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "80" }
Q: Unauthorized Sharepoint WSDL from ColdFusion 8 How do I solve the error: Unable to read WSDL from URL: https://workflowtest.site.edu/_vti_bin/Lists.asmx?WSDL. Error: 401 Unauthorized. I can successfully view the WSDL from the browser using the same user account. I'm not sure which authentication is being used (B...
{ "language": "en", "url": "https://stackoverflow.com/questions/168487", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Win32_LogicalDisk fails for floppies Using an idea from Bob King idea I wrote the following method. It works great on CD's, removable drives, regular drives. However for a floppy it always return "Not Available". Any ideas? public static void TestFloppy( char driveLetter ) { using( var searcher = new ManagementO...
{ "language": "en", "url": "https://stackoverflow.com/questions/168523", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Handling Managed Delegates in Unmanaged code I know I can get this to technically work but I'd like to implement the cleanest possible solution. Here's the situation: I have a managed library which wraps an unmanaged C-style library. The C-style library functionality I'm currently wrapping does some processing inv...
{ "language": "en", "url": "https://stackoverflow.com/questions/168528", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Where are some good resources for learning the new features of Perl 5.10? I didn't realize until recently that Perl 5.10 had significant new features and I was wondering if anyone could give me some good resources for learning about those. I searched for them on Google and all I found was some slides and a quick ov...
{ "language": "en", "url": "https://stackoverflow.com/questions/168530", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: A Question of Greedy vs. Negated Character Classes in Regex I have a very large file that looks like this (see below). I have two basic choices of regex to use on it (I know there may be others but I'm really trying to compare Greedy and Negated Char Class) methods. ftp: [^\D]{1,} ftp: (\d)+ ftp: \d+ Note: what if...
{ "language": "en", "url": "https://stackoverflow.com/questions/168531", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }