text
stringlengths
8
267k
meta
dict
Q: Parsing a log file with regular expressions I'm currently working on a parser for our internal log files (generated by log4php, log4net and log4j). So far I have a nice regular expression to parse the logs, except for one annoying bit: Some log messages span multiple lines, which I can't get to match properly. The r...
{ "language": "en", "url": "https://stackoverflow.com/questions/41407", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Where do search engines start crawling? What do search engine bots use as a starting point? Is it DNS look-up or do they start with some fixed list of well-know sites? Any guesses or suggestions? A: Your question can be interpreted in two ways: Are you asking where search engines start their crawl from in general, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/41419", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: How do you implement a "Did you mean"? Possible Duplicate: How does the Google “Did you mean?” Algorithm work? Suppose you have a search system already in your website. How can you implement the "Did you mean:<spell_checked_word>" like Google does in some search queries? A: Actually what Google does is very much...
{ "language": "en", "url": "https://stackoverflow.com/questions/41424", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "116" }
Q: Setting viewstate on postback I am trying to set a ViewState-variable when a button is pressed, but it only works the second time I click the button. Here is the code-behind: protected void Page_Load(object sender, EventArgs e) { if (Page.IsPostBack) { lblInfo.InnerText = String.Format("Hello {0} at ...
{ "language": "en", "url": "https://stackoverflow.com/questions/41429", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Generating JavaScript stubs from WSDL I'm looking for a tool to generate a JavaScript stub from a WSDL. Although I usually prefer to use REST services with JSON or XML, there are some tools I am currently integrating that works only using SOAP. I already created a first version of the client in JavaScript but I'm pa...
{ "language": "en", "url": "https://stackoverflow.com/questions/41446", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: I get a "An attempt was made to load a program with an incorrect format" error on a SQL Server replication project The exact error is as follows Could not load file or assembly 'Microsoft.SqlServer.Replication, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. An a...
{ "language": "en", "url": "https://stackoverflow.com/questions/41449", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "323" }
Q: How can I add reflection to a C++ application? I'd like to be able to introspect a C++ class for its name, contents (i.e. members and their types) etc. I'm talking native C++ here, not managed C++, which has reflection. I realise C++ supplies some limited information using RTTI. Which additional libraries (or other ...
{ "language": "en", "url": "https://stackoverflow.com/questions/41453", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "317" }
Q: What are the differences between GPL v2 and GPL v3 licenses? In simple terms, what are the reasons for, and what are the differences between the GPL v2 and GPL v3 open source licenses? Explanations and references to legal terms and further descriptions would be appreciated. A: In (not entirely) cynical terms, the r...
{ "language": "en", "url": "https://stackoverflow.com/questions/41460", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "207" }
Q: How to fetch a Book Title from an ISBN number? I am planning on creating a small website for my personal book collection. To automate the process a little bit, I would like to create the following functionality: The website will ask me for the ISBN number of the book and will then automatically fetch the title and a...
{ "language": "en", "url": "https://stackoverflow.com/questions/41469", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "33" }
Q: Use of var keyword in C# After discussion with colleagues regarding the use of the 'var' keyword in C# 3 I wondered what people's opinions were on the appropriate uses of type inference via var? For example I rather lazily used var in questionable circumstances, e.g.:- foreach(var item in someList) { // ... } // Typ...
{ "language": "en", "url": "https://stackoverflow.com/questions/41479", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "405" }
Q: ActiveX control default property discovery Is it possible to determine which property of an ActiveX control is the default property? For example, what is the default property of the VB6 control CommandButton and how would I found out any other controls default! /EDIT: Without having source to the object itself A: I...
{ "language": "en", "url": "https://stackoverflow.com/questions/41492", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Rails - recovering database from Production.log We recently lost a database and I want to recover the data from de Production.log. Every request is logged like this: Processing ChamadosController#create (for XXX.XXX.XXX.40 at 2008-07-30 11:07:30) [POST] Session ID: 74c865cefa0fdd96b4e4422497b828f9 Parameters: {"...
{ "language": "en", "url": "https://stackoverflow.com/questions/41498", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Java serialization with static initialization In Java, static and transient fields are not serialized. However, I found out that initialization of static fields causes the generated serialVersionUID to be changed. For example, static int MYINT = 3; causes the serialVersionUID to change. In this example, it makes sen...
{ "language": "en", "url": "https://stackoverflow.com/questions/41499", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Timezone lookup from latitude longitude Is there any library (or even better, web service) available which can convert from a latitude/longitude into a time zone? A: The Yahoo places API provides timezone information via reverse geolocation. Check it out. http://developer.yahoo.com/geo/placefinder/guide/requests.ht...
{ "language": "en", "url": "https://stackoverflow.com/questions/41504", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "82" }
Q: How to use 32bit alpha-blended BMP in .Net Is there any way to use this kind of format in .Net (C#)? I want to use the same skin format that uTorrent uses in my app, but i can't get the transparent background. Any ideas? Thanks for your time. A: You need to do two things: * *Copy your bitmap onto the form as bac...
{ "language": "en", "url": "https://stackoverflow.com/questions/41511", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Recommended Source Control Directory Structure? I am going to be using Subversion for source control on a new J2EE web application. What directory structure will you recommend for organizing code, tests and documentation? A: I found some old questions here on SO that might be interesting for you: * *Whats a good...
{ "language": "en", "url": "https://stackoverflow.com/questions/41513", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: Do the vi and emacs implementations for Windows behave like their Unix counterparts? If not, what are the significant differences? Edit: Daren Thomas asks: which ones? I use gvim on Windows and MacVim on the mac. Seem similar enough to be the same to me... By which ones, I'm guessing that you mean a specific impl...
{ "language": "en", "url": "https://stackoverflow.com/questions/41525", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Always including the user in the django template context I am working on a small intranet site for a small company, where user should be able to post. I have imagined a very simple authentication mechanism where people just enter their email address, and gets sent a unique login url, that sets a cookie that will alw...
{ "language": "en", "url": "https://stackoverflow.com/questions/41547", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "36" }
Q: XML namespaces and attributes I'm trying to understand how namespaces work in XML. When I have an element like foo:bar, the attributes will often not have namespaces on them. But sometimes they will. Are the attribute in the namespace of the element, even when the default namespace has been declared? Looking over th...
{ "language": "en", "url": "https://stackoverflow.com/questions/41561", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "48" }
Q: How do I do monkeypatching in python? I've had to do some introspection in python and it wasn't pretty: name = sys._getframe(1).f_code name = "%s:%d %s()" %(os.path.split(name.co_filename)[1],name.co_firstlineno,name.co_name) To get something like foo.py:22 bar() blah blah In our debugging output. I'd ideally like...
{ "language": "en", "url": "https://stackoverflow.com/questions/41562", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Whats the best way to unit test from multiple threads? this kind of follows on from another question of mine. Basically, once I have the code to access the file (will review the answers there in a minute) what would be the best way to test it? I am thinking of creating a method which just spawns lots of BackgroundWo...
{ "language": "en", "url": "https://stackoverflow.com/questions/41568", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "23" }
Q: Conditional Display in ASPX Pages on Sharepoint I wonder what the best practice for this scenario is: I have a Sharepoint Site (MOSS2007) with an ASPX Page on it. However, I cannot use any inline source and stuff like Event handlers do not work, because Sharepoint does not allow Server Side Script on ASPX Pages per ...
{ "language": "en", "url": "https://stackoverflow.com/questions/41576", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to do a sample rate conversion in Windows (and OSX) I am about to write an audio file converter for my side job at the university. As part of this I would need sample rate conversion. However, my professor said that it would be pretty hard to write a sample rate converter that was both of good quality and fast. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/41583", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How do you properly use namespaces in C++? I come from a Java background, where packages are used, not namespaces. I'm used to putting classes that work together to form a complete object into packages, and then reusing them later from that package. But now I'm working in C++. How do you use namespaces in C++? Do yo...
{ "language": "en", "url": "https://stackoverflow.com/questions/41590", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "240" }
Q: Import OLE Object from Access to MySQL I have a table in an access table which contains Product entries, one of the columns has a jpg image stored as an OLE Object. I am trying to import this table to MySQL but nothing seems to work. I have tried the MySQL migration tool but that has a known issue with Access and...
{ "language": "en", "url": "https://stackoverflow.com/questions/41594", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: User Interface Testing We are working on a large project with a measure of new/modified GUI functionality. We've found in the past that we often introduced new problems in related code when adding new functionality. We have non-technical users perform testing, but they often miss parts and allow bugs to slip throug...
{ "language": "en", "url": "https://stackoverflow.com/questions/41601", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: is it possible to concat arguments to a command line using backquotes ? I would like to execute an OS command from my ruby script but I want to add an argument from a ruby variable. I know that's possible by using keyword system like that : #!/usr/bin/env ruby directory = '/home/paulgreg/' system 'ls ' + directory ...
{ "language": "en", "url": "https://stackoverflow.com/questions/41630", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Suggestions on how to map from Domain (ORM) objects to Data Transfer Objects (DTO) The current system that I am working on makes use of Castle Activerecord to provide ORM (Object Relational Mapping) between the Domain objects and the database. This is all well and good and at most times actually works well! The prob...
{ "language": "en", "url": "https://stackoverflow.com/questions/41638", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Mute Specific Application in Vista I am in need of a way to mute a specific application in Vista. Example: Mute just Firefox, but not all of the other application. Much similar to muting a specific program from within the volume mixer in vista. If there is a program that will do this, i would appreciate that. Oth...
{ "language": "en", "url": "https://stackoverflow.com/questions/41640", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Store more than 3GB of video-frames in memory, on 32-bit OS At work we have an application to play 2K (2048*1556px) OpenEXR film sequences. It works well.. apart from when sequences that are over 3GB (quite common), then it has to unload old frames from memory, despite the fact all machines have 8-16GB of memory (wh...
{ "language": "en", "url": "https://stackoverflow.com/questions/41643", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: PHP Include function outputting unknown char When using the php include function the include is succesfully executed, but it is also outputting a char before the output of the include is outputted, the char is of hex value 3F and I have no idea where it is coming from, although it seems to happen with every include....
{ "language": "en", "url": "https://stackoverflow.com/questions/41647", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Using Custom MembershipProvider without a Login control in ASP.NET We have got a custom MembershipProvider in ASP.NET. Now there are 2 possible scenario the user can be validated: * *User login via login.aspx page by entering his username/password. I have used Login control and linked it with the MyMembershipProv...
{ "language": "en", "url": "https://stackoverflow.com/questions/41652", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: C++ libraries to manipulate images Do you know any open source/free software C++ libraries to manipulate images in these formats: .jpg .gif .png .bmp ? The more formats it supports, the better. I am implementing a free program in C++ which hides a text file into one or more images, using steganography. I am working ...
{ "language": "en", "url": "https://stackoverflow.com/questions/41654", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Is there a way to access web.xml properties from a Java Bean? Is there any way in the Servlet API to access properties specified in web.xml (such as initialization parameters) from within a Bean or Factory class that is not associated at all with the web container? For example, I'm writing a Factory class, and I'd l...
{ "language": "en", "url": "https://stackoverflow.com/questions/41659", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Bmp to jpg/png in C# Is there any way to convert a bmp image to jpg/png without losing the quality in C#? Using Image class we can convert bmp to jpg but the quality of output image is very poor. Can we gain the quality level as good as an image converted to jpg using photoshop with highest quality? A: var qualityE...
{ "language": "en", "url": "https://stackoverflow.com/questions/41665", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "56" }
Q: Is there a class to generate a sample XML document from XSD schema in .NET In Visual Studio you can create a template XML document from an existing schema. The new XML Schema Explorer in VS2008 SP1 takes this a stage further and can create a sample XML document complete with data. Is there a class library in .NET to...
{ "language": "en", "url": "https://stackoverflow.com/questions/41674", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Is there a way of getting the process id of my C++ application? Is there a way of getting the process id of my C++ application? I am using the Carbon framework, but not Cocoa… A: can you use the getpid() function found in unistd.h ? osx reference A: GetProcessPID is what you need. This takes a ProcessSerialNumber,...
{ "language": "en", "url": "https://stackoverflow.com/questions/41676", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Why is my image coming out garbled? I've got some Java code using a servlet and Apache Commons FileUpload to upload a file to a set directory. It's working fine for character data (e.g. text files) but image files are coming out garbled. I can open them but the image doesn't look like it should. Here's my code: Se...
{ "language": "en", "url": "https://stackoverflow.com/questions/41686", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: jQuery tablesorter plugin column width incorrect in IE7 I am using the tablesorter plugin (http://tablesorter.com) and am having a problem with column widths in IE7. It looks fine in Firefox and sometimes in IE7. Here's a screenshot of the problem: IE7 View and here's how it's supposed to look: Firefox view A: This...
{ "language": "en", "url": "https://stackoverflow.com/questions/41692", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Creating Windows service without Visual Studio So creating a Windows service using Visual Studio is fairly trivial. My question goes a bit deeper as to what actually makes an executable installable as a service & how to write a service as a straight C application. I couldn't find a lot of references on this, but I...
{ "language": "en", "url": "https://stackoverflow.com/questions/41699", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Splitting tuples in Python - best practice? I have a method in my Python code that returns a tuple - a row from a SQL query. Let's say it has three fields: (jobId, label, username) For ease of passing it around between functions, I've been passing the entire tuple as a variable called 'job'. Eventually, however, I w...
{ "language": "en", "url": "https://stackoverflow.com/questions/41701", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Traditional ASP .NET Web Forms vs MVC As someone with some winforms and client applications experience - is it worth going back and learning the way traditional ASP .NET pages work, or is it okay with moving straight into ASP .NET MVC? I'm kind of looking for pitfalls or traps in my knowledge of general C#, that I w...
{ "language": "en", "url": "https://stackoverflow.com/questions/41712", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "23" }
Q: Excluding a folder from source control in an ASP.NET website? Right now I'm working with an ASP.NET website that automatically generates images and stores them in a temporary folder. When working on my local system these go going into a temporary folder that gets picked up by Visual Source Safe which then wants to c...
{ "language": "en", "url": "https://stackoverflow.com/questions/41715", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What's the best way to implement user controls in ASP.NET MVC? Like many others on this site I am considering a move to ASP.NET MVC for future projects. Currently my sites are running the traditional ASP.NET 2.0 Web Forms, and it works OK for us, so my other option is just to stick with what I know and make the mov...
{ "language": "en", "url": "https://stackoverflow.com/questions/41717", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: What is a DSL and where should I use it? I'm hearing more and more about domain specific languages being thrown about and how they change the way you treat business logic, and I've seen Ayende's blog posts and things, but I've never really gotten exactly why I would take my business logic away from the methods and s...
{ "language": "en", "url": "https://stackoverflow.com/questions/41724", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "25" }
Q: Best way to sort an array Say I have an array of records which I want to sort based on one of the fields in the record. What's the best way to achieve this? TExample = record SortOrder : integer; SomethingElse : string; end; var SomeVar : array of TExample; A: You can add pointers to the elements of the array...
{ "language": "en", "url": "https://stackoverflow.com/questions/41733", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "33" }
Q: What is the best way to calculate Age using Flex? What is the best way to calculate Age using Flex? A: var userDOB : Date = new Date(year,month-1,day); var today : Date = new Date(); var diff : Date = new Date(); diff.setTime( today.getTime() - userDOB.getTime() ); var userAge : int = diff.getFullYear() - 1970; ...
{ "language": "en", "url": "https://stackoverflow.com/questions/41763", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I download code using SVN/Tortoise from Google Code? I just saw a really cool WPF twitter client that I think is developed by the Herding Code podcast guys HerdingCode called Witty. (or at least, I see a lot of those guys using this client). This project is currently posted up on Google Code. Many of the pr...
{ "language": "en", "url": "https://stackoverflow.com/questions/41766", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "88" }
Q: Microsoft T-SQL to Oracle SQL translation I've worked with T-SQL for years but I've just moved to an organisation that is going to require writing some Oracle stuff, probably just simple CRUD operations at least until I find my feet. I'm not going to be migrating databases from one to the other simply interacting wi...
{ "language": "en", "url": "https://stackoverflow.com/questions/41781", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "21" }
Q: Instance constructor sets a static member, is it thread safe? I am re-factoring some code and am wondering about the use of a lock in the instance constructor. public class MyClass { private static Int32 counter = 0; private Int32 myCount; public MyClass() { lock(this) { counter++;...
{ "language": "en", "url": "https://stackoverflow.com/questions/41792", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Recommendation for 3rd party editing/syntax highlighting control - WinForms I'm looking for a quality WinForms component that supports syntax highlighting, code folding and the like. The key criteria are: * *Stability *Value (price) *Ability to easily customize syntax to highlight *Light weight A: ICSharpCo...
{ "language": "en", "url": "https://stackoverflow.com/questions/41796", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How do I prevent the closing of modal popup window(ModalPopupExtender) on postback? I'm using Microsoft AjaxControlToolkit for modal popup window. And on a modal popup window, when a postback occurred, the window was closing. How do I prevent from the closing action of the modal popup? A: You can call Show() method...
{ "language": "en", "url": "https://stackoverflow.com/questions/41824", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: Maintain the correct version for a COM dll referenced in a .NET project I want to reference a COM DLL in a .NET project, but I also want to make sure that the interop DLL created will have the correct version (so that patches will know when the DLL must be changed). If I use TlbImp I can specify the required version...
{ "language": "en", "url": "https://stackoverflow.com/questions/41832", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Setting include path in PHP intermittently fails I have tried both of : ini_set('include_path', '.:/usr/share/php5:/usr/share/php5/PEAR:lib:app/classes'); and also : php_value include_path ".:/usr/share/php5:/usr/share/php5/PEAR:lib:app/classes" in the .htaccess file. Both methods actually do work but only intermi...
{ "language": "en", "url": "https://stackoverflow.com/questions/41836", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Cost of Inserts vs Update in SQL Server I have a table with more than a millon rows. This table is used to index tiff images. Each image has fields like date, number, etc. I have users that index these images in batches of 500. I need to know if it is better to first insert 500 rows and then perform 500 updates or, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/41837", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "25" }
Q: Black Box testing software We are about to get a canned package in that has been modified to our needs. I'm part of the team setup to prepare tests for it. It has an Oracle back end and I believe it's written in C++ .NET. My question is what free or open source testing tools would you recommend. Thanks Ken A: For r...
{ "language": "en", "url": "https://stackoverflow.com/questions/41838", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What is a good markup language to use for tests? I'm writing a tool to run a series of integration tests on my product. It will install it and then run a bunch of commands against it to make sure its doing what it is supposed to. I'm exploring different options for how to markup the commands for each test case and w...
{ "language": "en", "url": "https://stackoverflow.com/questions/41839", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: PDB files for production app and the "Optimize code" flag When should I include PDB files for a production release? Should I use the Optimize code flag and how would that affect the information I get from an exception? If there is a noticeable performance benefit I would want to use the optimizations but if not I'd ...
{ "language": "en", "url": "https://stackoverflow.com/questions/41842", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: Recommendations for Web application performance benchmarks I'm about to start testing an intranet web application. Specifically, I've to determine the application's performance. Please could someone suggest formal/informal standards for how I can judge the application's performance. A: Use some tool for stress and ...
{ "language": "en", "url": "https://stackoverflow.com/questions/41857", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Is SQL Server Bulk Insert Transactional? If I run the following query in SQL Server 2000 Query Analyzer: BULK INSERT OurTable FROM 'c:\OurTable.txt' WITH (CODEPAGE = 'RAW', DATAFILETYPE = 'char', FIELDTERMINATOR = '\t', ROWS_PER_BATCH = 10000, TABLOCK) On a text file that conforms to OurTable's schema for 40 lin...
{ "language": "en", "url": "https://stackoverflow.com/questions/41869", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: Using MySQL on Visual Studio 2008 I am using the ODBC connector to access a MySQL db from Visual Studio 2008 and I'm facing performance problems when dealing with crystal reports and to solve this I need a native connector to visual studio. If someone has had a similar problem and knows a solution or tools (freeware...
{ "language": "en", "url": "https://stackoverflow.com/questions/41881", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: $0 (Program Name) in Java? Discover main class? Is there a way to find the name of the program that is running in Java? The class of the main method would be good enough. A: This is the code I came up with when using the combined responses of jodonnell and John Meagher. It stores the main class in a static variabl...
{ "language": "en", "url": "https://stackoverflow.com/questions/41894", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "54" }
Q: How do you choose an open-source license? I'm a software engineer, not a lawyer, and my university doesn't offer any courses geared toward licensing software. In fact, their law-related courses are lacking (but slowly growing in number). Where can I go to learn about open-source licenses and how to choose them? A: ...
{ "language": "en", "url": "https://stackoverflow.com/questions/41898", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "26" }
Q: Customizing Visual Studio I have been working with Visual Studio (WinForm and ASP.NET applications using mostly C#) for several months now. For the most part my IDE is set up fairly standard but I have been wondering what are some suggestions in terms of plugins/settings that you find to be the most useful? Update:...
{ "language": "en", "url": "https://stackoverflow.com/questions/41908", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: Is there a standard for storing normalized phone numbers in a database? What is a good data structure for storing phone numbers in database fields? I'm looking for something that is flexible enough to handle international numbers, and also something that allows the various parts of the number to be queried efficien...
{ "language": "en", "url": "https://stackoverflow.com/questions/41925", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "100" }
Q: LightWindow & IE7, "Line 444 - object does not support this property or method" I have just received and bypassed a problem with LightWindow and IE7 where, on page load, it throws a JavaScript error on line 444 of lightwindow.js, claiming that the object does not support this property or method. Despite finding vari...
{ "language": "en", "url": "https://stackoverflow.com/questions/41928", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can I make Eclipse file search not include svn directories? When I do a file search on eclipse it includes the .svn directories by default. I tried excluding them from the build path but they still appear on file search results. A: If you install the subclipse plugin then it automatically excludes the .svn dire...
{ "language": "en", "url": "https://stackoverflow.com/questions/41934", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "57" }
Q: Converting latitude/longitude to Alberta 10 TM Projection I need to convert latitude/longitude coordinates into Easting/Northing coordinates in the Alberta 10 TM Projection. The 10 TM projection is similar to UTM, but it is a custom projection for the province of Alberta, Canada. I think (with some effort) I could ...
{ "language": "en", "url": "https://stackoverflow.com/questions/41937", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How do I get the difference between two Dates in JavaScript? I'm creating an application which lets you define events with a time frame. I want to automatically fill in the end date when the user selects or changes the start date. I can't quite figure out, however, how to get the difference between the two times, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/41948", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "120" }
Q: Are there any version control systems for 3d models / 3d data? Well the subject is the question basically. Are there any version control systems out there for 3d models. An open source approach would be preferred of course. I am looking for functionality along the lines of subversion however more basic systems would...
{ "language": "en", "url": "https://stackoverflow.com/questions/41963", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: Standard way to open a folder window in linux? I want to open a folder window, in the appropriate file manager, from within a cross-platform (windows/mac/linux) Python application. On OSX, I can open a window in the finder with os.system('open "%s"' % foldername) and on Windows with os.startfile(foldername) What a...
{ "language": "en", "url": "https://stackoverflow.com/questions/41969", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Lightweight fuzzy search library Can you suggest some light weight fuzzy text search library? What I want to do is to allow users to find correct data for search terms with typos. I could use full-text search engines like Lucene, but I think it's an overkill. Edit: To make question more clear here is a main scenario...
{ "language": "en", "url": "https://stackoverflow.com/questions/41970", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: Parsing an XML file in C# What is the fastest method of parsing an XML file in C#? I'm using .Net 2.0 A: If you're using .Net 2 then the XmlReader and XmlDocument are about it. If you can use .Net 3.5 then the new Linq to Xml methods are a big improvement. A: I haven't benched-marked it myself, but when I've aske...
{ "language": "en", "url": "https://stackoverflow.com/questions/41994", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: How to display line breaks in SharePoint comment history field We have a SharePoint list setup with history enabled so the Comments field keeps all the past values. When it displays, the Comments field is void of all line breaks. However, when SharePoint e-mails the change to us, the line breaks are in there. The De...
{ "language": "en", "url": "https://stackoverflow.com/questions/41996", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Levenshtein distance based methods Vs Soundex As per this comment in a related thread, I'd like to know why Levenshtein distance based methods are better than Soundex. A: I would suggest using Metaphone, not Soundex. As noted, Soundex was developed in the 19th century for American names. Metaphone will give you som...
{ "language": "en", "url": "https://stackoverflow.com/questions/42013", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: Non-Clustered Index on a Clustered Index column improves performance? In SQL Server 2005, the query analyzer has told me many times to create a non-clustered index on a primary ID column of a table which already has a clustered index. After following this recommendation, the query execution plan reports that the qu...
{ "language": "en", "url": "https://stackoverflow.com/questions/42015", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: What is the best EXIF library for .Net? I am looking for simple straightforward solution for accessing EXIF information of jpeg images in .Net. Does anybody has experience with this? A: If you're compiling against v3 of the Framework (or later), then you can load the images using the BitmapSource class, which expo...
{ "language": "en", "url": "https://stackoverflow.com/questions/42017", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "32" }
Q: What is a tuple useful for? I am learning Python for a class now, and we just covered tuples as one of the data types. I read the Wikipedia page on it, but, I could not figure out where such a data type would be useful in practice. Can I have some examples, perhaps in Python, where an immutable set of numbers would ...
{ "language": "en", "url": "https://stackoverflow.com/questions/42034", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "56" }
Q: How do I handle newlines in JSON? I've generated some JSON and I'm trying to pull it into an object in JavaScript. I keep getting errors. Here's what I have: var data = '{"count" : 1, "stack" : "sometext\n\n"}'; var dataObj = eval('('+data+')'); This gives me an error: unterminated string literal With JSON.parse(...
{ "language": "en", "url": "https://stackoverflow.com/questions/42068", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "401" }
Q: Why does the Bourne shell printf iterate over a %s argument? What's going on here? printf.sh: #! /bin/sh NAME="George W. Bush" printf "Hello, %s\n" $NAME Command line session: $ ./printf.sh Hello, George Hello, W. Hello, Bush UPDATE: printf "Hello, %s\n" "$NAME" works. For why I'm not using echo, consider echo.sh:...
{ "language": "en", "url": "https://stackoverflow.com/questions/42070", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Are you human? (or How to prevent spam) What mechanisms do you know that prevent your site from being abused by anonymous spammers. For example, let's say that I have a site where people can vote something. But I don't want someone to spam something all the way to the top. So I found (a) creating an account and only...
{ "language": "en", "url": "https://stackoverflow.com/questions/42076", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Pure Python library to generate Identicons? Does anyone know of a FOSS Python lib for generating Identicons? I've looked, but so far I haven't had much luck. A: I've found two implementations: http://coderepos.org/share/browser/lang/python/misc/identicon.py http://code.google.com/p/visicon/
{ "language": "en", "url": "https://stackoverflow.com/questions/42093", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: Using different classloaders for different JUnit tests? I have a Singleton/Factory object that I'd like to write a JUnit test for. The Factory method decides which implementing class to instantiate based upon a classname in a properties file on the classpath. If no properties file is found, or the properties file do...
{ "language": "en", "url": "https://stackoverflow.com/questions/42102", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "34" }
Q: App.config connection string Protection error I am running into an issue I had before; can't find my reference on how to solve it. Here is the issue. We encrypt the connection strings section in the app.config for our client application using code below: config = ConfigurationManager.OpenExeConfiguration(Con...
{ "language": "en", "url": "https://stackoverflow.com/questions/42115", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Easy .NET XML Library Following my question regarding a .NET YAML Library... as there doesn't seem to be great support for YAML in .NET, are there and good open source really simple .NET XML libraries. I just want something where I can pass it a section name and a key and it gives me the value as well as being able...
{ "language": "en", "url": "https://stackoverflow.com/questions/42122", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Warning/error "function declaration isn't a prototype" I have a library I created, File mylib.c: #include <mylib.h> int testlib() { printf("Hello, World!\n"); return (0); } File mylib.h: #include <stdio.h> extern int testlib(); In my program, I've attempted to call this library function: File myprogram.c:...
{ "language": "en", "url": "https://stackoverflow.com/questions/42125", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "191" }
Q: C++ Compiler Error C2371 - Redefinition of WCHAR I am getting C++ Compiler error C2371 when I include a header file that itself includes odbcss.h. My project is set to MBCS. C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\odbcss.h(430) : error C2371: 'WCHAR' : redefinition; different basic types 1> C:\Pro...
{ "language": "en", "url": "https://stackoverflow.com/questions/42126", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How does Google Chrome control/contain multiple processes? How does Google Chrome command and control multiple cross platform processes and provide a shared window / rendering area? Any insights? A: There is a document called Multi-process Architecture on the Chromium developer site. It might be a good starting pla...
{ "language": "en", "url": "https://stackoverflow.com/questions/42143", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: What are the best ways to determine what port an application is using? This is an adapted version of a question from someone in my office. She's trying to determine how to tell what ports MSDE is running on for an application we have in the field. Answers to that narrower question would be greatly appreciated. I'm...
{ "language": "en", "url": "https://stackoverflow.com/questions/42146", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: How can I unit test a Windows Service? .NET Framework: 2.0 Preferred Language: C# I am new to TDD (Test Driven Development). First of all, is it even possible to unit test Windows Service? Windows service class is derived from ServiceBase, which has overridable methods, * *OnStart *OnStop How can I trigger t...
{ "language": "en", "url": "https://stackoverflow.com/questions/42150", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "64" }
Q: Java: JApplet, How do you embed it in a webpage? I searched for this subject on Google and got some website about an experts exchange...so I figured I should just ask here instead. How do you embed a JApplet in HTML on a webpage? A: Here is an example from sun's website: <applet code="TumbleItem.class" cod...
{ "language": "en", "url": "https://stackoverflow.com/questions/42153", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: If you were programming a calendar in HTML would you use Table tags or Div tags? I converted my company's calendar to XSL and changed all the tables to divs. It worked pretty well, but I had a lot of 8 day week bugs to work out initially owing to precarious cross-browser spacing issues. But I was reading another pos...
{ "language": "en", "url": "https://stackoverflow.com/questions/42169", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: How to copy the contents of an FTP directory to a shared network path? I have the need to copy the entire contents of a directory on a FTP location onto a shared networked location. FTP Task has you specify the exact file name (not a directory) and File System Task does not allow accessing a FTP location. EDIT: I en...
{ "language": "en", "url": "https://stackoverflow.com/questions/42171", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to escape < and > inside tags I'm trying to write a blog post which includes a code segment inside a <pre> tag. The code segment includes a generic type and uses <> to define that type. This is what the segment looks like: <pre> PrimeCalc calc = new PrimeCalc(); Func<int, int> del = calc.GetNextPrime; ...
{ "language": "en", "url": "https://stackoverflow.com/questions/42182", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "99" }
Q: How are partial methods used in C# 3.0? I have read about partial methods in the latest C# language specification, so I understand the principles, but I'm wondering how people are actually using them. Is there a particular design pattern that benefits from partial methods? A: Partial methods have been introduced f...
{ "language": "en", "url": "https://stackoverflow.com/questions/42187", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: How do I determine which process is using a serial port? The company I work for makes hardware that communicates to the computer though a serial port. Third party companies write software that communicates with our hardware. There are times when I need to diagnose our hardware. However, a third party software app c...
{ "language": "en", "url": "https://stackoverflow.com/questions/42197", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "28" }
Q: Managing LINQ to SQL .dbml model complexity This question is addressed to a degree in this question on LINQ to SQL .dbml best practices, but I am not sure how to add to a question. One of our applications uses LINQ to SQL and we have currently have one .dbml file for the entire database which is becoming difficult t...
{ "language": "en", "url": "https://stackoverflow.com/questions/42200", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: SQL Number Formatting I'm looking to use SQL to format a number with commas in the thousands, but no decimal (so can't use Money) - any suggestions? I'm using SQL Server 2005, but feel free to answer for others as well (like MySQL) A: With TSQL you could cast to money and convert it will add the .00, but you could ...
{ "language": "en", "url": "https://stackoverflow.com/questions/42203", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Where did these hex named folders come from? First off, I am using Windows XP. I have multiple hard drives and it looks like something decided to make some folders on the second one ( which is just a data drive, no os ). These folders all have names like "e69f29f1b1f166d3d30b8c9f7156ba" and "bd92c24cc278614082cd88...
{ "language": "en", "url": "https://stackoverflow.com/questions/42204", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: How can I use Linq with a MySql database on Mono? There are numerous libraries providing Linq capabilities to C# code interacting with a MySql database. Which one of them is the most stable and usable on Mono? Background (mostly irrelevant): I have a simple C# (.Net 2.0) program updating values in a MySql database. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/42212", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }