text
string
meta
dict
Q: Is it possible to host a TCP endpoint in an IIS6 hosted service? I created a wcf service based on ServiceHostFactory, and i'm hosting it in IIS6. If i use a HTTP endpoint everything works just fine, but when i try to switch to TCP it goes bad. Is it even possible to do this in II6? I have a more specific question po...
{ "language": "en", "url": "https://stackoverflow.com/questions/201320", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How can I validate an email address using a regular expression? Over the years I have slowly developed a regular expression that validates most email addresses correctly, assuming they don't use an IP address as the server part. I use it in several PHP programs, and it works most of the time. However, from time to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/201323", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4014" }
Q: MSTest run fails because source assembly is not trusted I just added xUnit to our test project (for the Asserts, we're still using MSTest as the framework) and immediately the test runs refused to execute any of the tests. This is the error message: Failed to queue test run '{ .... }' Test run deployment issue: T...
{ "language": "en", "url": "https://stackoverflow.com/questions/201327", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "62" }
Q: Is log4net much slower than System.Diagnostics.Trace? I'm investigating the differences between using log4net and System.Diagnostics.Trace for logging, and I'm curious about the performance differences I've observed. I created a test application to compare the performance of both logging methods in several scenarios...
{ "language": "en", "url": "https://stackoverflow.com/questions/201354", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: How can I stop Excel 2003 from hanging after opening a spreadsheet in IE? I have a web application which provides Excel files via IE 7. It requests the files with an HTTP GET from a URL which returns the data with a content type of 'application/vnd.ms-excel'. It then opens the spreadsheets in an IFrame. This all wor...
{ "language": "en", "url": "https://stackoverflow.com/questions/201355", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to get the result of strlen into an int without a warning when compiling with /Wp64 int l = strlen(s); warning C4244: '=' : conversion from '__w64 int' to 'int', possible loss of data I need to replace strlen with an inline function int l = new_strlen(s); But how do I portably get the result of the strlen into t...
{ "language": "en", "url": "https://stackoverflow.com/questions/201359", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: SharePoint, how do you programatically determine the storage size of a SPWeb? Not of the site collection itself, but the individual SPWeb's. A: You should take a look at this blog entry by Alexander Meijers : Size of SPWeb based on its Folders and Files It provides a clever way of finding the size of an SPWeb or SP...
{ "language": "en", "url": "https://stackoverflow.com/questions/201368", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: What is the most efficient way to handle en expired session with ASP.NET 2.0 On the site we are building. We need to be able to redirect the user to a default page when his session has ended. At first sight we used the Session_End with a Response.Redirect to do this job. Sub Session_End(ByVal sender As Object, ByVal...
{ "language": "en", "url": "https://stackoverflow.com/questions/201370", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Project Euler Question 3 Help I'm trying to work through Project Euler and I'm hitting a barrier on problem 03. I have an algorithm that works for smaller numbers, but problem 3 uses a very, very large number. Problem 03: The prime factors of 13195 are 5, 7, 13 and 29. What is the largest prime factor of the number ...
{ "language": "en", "url": "https://stackoverflow.com/questions/201374", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: What's the best way to get aggregate results from NHibernate? For example, I am trying to get a min date, a max date, and a sum in different instances. I am trying to avoid hard coding a SQL string or looping through an IList to get these values. A: You can run straight queries through NHibernate. Or add additiona...
{ "language": "en", "url": "https://stackoverflow.com/questions/201377", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What exactly is Intentional Programming On my reading spree, I stumbled upon something called Intentional Programming. I understood it somewhat, but I not fully. If anyone can explain it in better detail, please do. Is it being used in any real application? A: It's the opposite of what happens when I come home at 2...
{ "language": "en", "url": "https://stackoverflow.com/questions/201386", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: Why is it removed: ASP.NET MVC CheckBoxList (without MVCContrib) Why is the CheckBoxList removed from ASP.NET MVC preview release 5? Currently I don't see any way in which I can create a list of checkboxes (with similar names but different id's) so people can select 0-1-more options from the list. There is an Check...
{ "language": "en", "url": "https://stackoverflow.com/questions/201391", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: How can I recover files from a corrupted .tar.gz archive? I have a large number of files in a .tar.gz archive. Checking the file type with the command file SMS.tar.gz gives the response gzip compressed data - deflate method , max compression When I try to extract the archive with gunzip, after a delay I receive t...
{ "language": "en", "url": "https://stackoverflow.com/questions/201392", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "29" }
Q: ASP.NET Masterpages and viewstate I am looking to improve the performance of my site, not because it is performing badly but just as a general exercise. The usual suggestion for asp.net sites is to remove viewstate wherever possible. I believe this can be done by each control on a page separately or for the whole pa...
{ "language": "en", "url": "https://stackoverflow.com/questions/201401", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: on a system with multiple monitors, how to list monitors and maximize a form into one of them? I am working on a .NET application that displays multiple charts. My users would like an easy way to say "take chart #3 and maximize it on my fourth monitor". How can I determine the number of monitors so I can give them ...
{ "language": "en", "url": "https://stackoverflow.com/questions/201403", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Cocoa Distributed Objects, GC client, non-GC server I have a setup where there are two Cocoa processes, communicating with Distributed Objects (DO). The client is using garbage collection, the server is not. It seems that the client hangs on to the distant objects outside of my direct references to them. This means ...
{ "language": "en", "url": "https://stackoverflow.com/questions/201404", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: C Analog To STL Just because I'm curious--is there any C analog to the functionality of the STL in C++? I've seen mention of a GTK+ library called glib that a few people consider fills the bill but are there other libraries that would provide STL functionality in C? A: CLIB A: Adding another option (full disclosu...
{ "language": "en", "url": "https://stackoverflow.com/questions/201413", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "31" }
Q: VS2005 + cant select windows service as project type i was just about to finish up my project and install it as a windows service. I have the installer, etc. - everything i need. When i went to choose Application Type, Windows service does not appear as an option. Here is the kicker. When I dev in VB.NET, i have ...
{ "language": "en", "url": "https://stackoverflow.com/questions/201426", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to deploying a self signed SSL certificate to multiple servers I need to create a self signed SSL certificate and the install the same certificate on two different web servers. For this specific scenario I have two web servers (Win2K3 w/ II6) in a network load balanced configuration. I have installed the IIS re...
{ "language": "en", "url": "https://stackoverflow.com/questions/201433", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: C# FTP with CD Disabled I'm trying to get the following code working: string url = String.Format(@"SOMEURL"); string user = "SOMEUSER"; string password = "SOMEPASSWORD"; FtpWebRequest ftpclientRequest = (FtpWebRequest)WebRequest.Create(new Uri(url)); ftpclientRequest.Method = WebRequestMethods.Ftp.ListDi...
{ "language": "en", "url": "https://stackoverflow.com/questions/201436", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Refreshing LinQ2SQL Model in Designer without losing all Properties so I'm using LinQ2SQL quite heavily in my current application, and although I have most stuff in partial classes, some things have to be adjusted in the VS Designer (like Accessors for fields I wrap). Then, sometimes I like to name Fields differentl...
{ "language": "en", "url": "https://stackoverflow.com/questions/201443", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I obtain the id of a workflow created in Sharepoint Designer? I've written an event receiver that programmatically kicks off a workflow, but it needs the id (guid) of the workflow to start. How do I go about obtaining the id of the workflow(s) I just created in Sharepoint Designer? A: Since you created the w...
{ "language": "en", "url": "https://stackoverflow.com/questions/201446", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Visual Studio debugger tips & tricks for .NET I've been working for years with VS's debugger, but every now and then I come across a feature I have never noticed before, and think "Damn! How could I have missed that? It's so useful!" [Disclaimer: These tips work in VS 2005 on a C# project, no guarantees for older in...
{ "language": "en", "url": "https://stackoverflow.com/questions/201450", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "70" }
Q: Can I make my Applet end more gracefully? I have a JApplet which I contains various Swing components. It also starts a couple of extra threads in the init() and generally does other pretty standard applet-y things. If I close the browser window containing the Applet, the JRE doesn't die (the icon remains in the sys...
{ "language": "en", "url": "https://stackoverflow.com/questions/201453", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to implement URL pattern interpreter as used by Django and RoR in PHP What's the best way to implement a URL interpreter / dispatcher, such as found in Django and RoR, in PHP? It should be able to interpret a query string as follows: * */users/show/4 maps to * *area = Users *action = show *Id = 4 */con...
{ "language": "en", "url": "https://stackoverflow.com/questions/201457", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Shortest Sudoku Solver in Python - How does it work? I was playing around with my own Sudoku solver and was looking for some pointers to good and fast design when I came across this: def r(a):i=a.find('0');~i or exit(a);[m in[(i-j)%9*(i/9^j/9)*(i/27^j/27|i%9/3^j%9/3)or a[j]for j in range(81)]or r(a[:i]+m+a[i+1:])for...
{ "language": "en", "url": "https://stackoverflow.com/questions/201461", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "83" }
Q: Are Dynamic Prepared Statements Bad? (with php + mysqli) I like the flexibility of Dynamic SQL and I like the security + improved performance of Prepared Statements. So what I really want is Dynamic Prepared Statements, which is troublesome to make because bind_param and bind_result accept "fixed" number of argumen...
{ "language": "en", "url": "https://stackoverflow.com/questions/201468", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: SQL Reporting Services DataConnection Update Is it possible to change the connection string of a published sql reporting services report? I can see the binary field called DataSource in the ReportServer database, but since it's stored as binary I don't think it's easily updatable. Do I need to republish the report w...
{ "language": "en", "url": "https://stackoverflow.com/questions/201473", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Simple java client code for Web Service - something to do with QName? I am getting the following error when I get to the line that invokes a REALLY BASIC web service I have running on Tomcat/Axis. Element or attribute do not match QName production: QName::=(NCName':')?NCName Have I got something wrong with QName?- ...
{ "language": "en", "url": "https://stackoverflow.com/questions/201476", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What is base 64 encoding used for? I've heard people talking about "base 64 encoding" here and there. What is it used for? A: Aside from what's already been said, two very common uses that have not been listed are Hashes: Hashes are one-way functions that transform a block of bytes into another block of bytes of a...
{ "language": "en", "url": "https://stackoverflow.com/questions/201479", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "992" }
Q: SQL procedure running time widely divergent I have an application that runs a huge stored procedure on SQL Server 2000. Usually it takes about 1 minute to complete, but occasionally it will take MUCH longer. Just now I ran it three times in a row in my test system. It took 1:12, 1:23, and 55:25. What would cause th...
{ "language": "en", "url": "https://stackoverflow.com/questions/201494", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Where is my Object being disposed? I have a strange issue: I am using SPContext.Current.Web in a .aspx page, but at the end, I get a "Trying to use an SPWeb object that has been closed or disposed and is no longer valid." error message. From what I see, SPContext.Current.Web is Disposed by someone, but I have no ide...
{ "language": "en", "url": "https://stackoverflow.com/questions/201501", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Is it possible to communicate with the Visual Studio debugger programmatically while debugging? I would like to control options on the debugger without using the debugging GUI's, preferably from inside the code being debugged. I would think that would be quite difficult, but maybe my debugged code can request a ser...
{ "language": "en", "url": "https://stackoverflow.com/questions/201504", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Best Password Management Software for Development Group - looking for suggestions Our development and consulting teams (about 25 people) are looking for software to manage all of the passwords we have for our organization and for our clients. We looked at Keepass but it is not truly a database system nor does it ha...
{ "language": "en", "url": "https://stackoverflow.com/questions/201505", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: urllib.urlopen works but urllib2.urlopen doesn't I have a simple website I'm testing. It's running on localhost and I can access it in my web browser. The index page is simply the word "running". urllib.urlopen will successfully read the page but urllib2.urlopen will not. Here's a script which demonstrates the p...
{ "language": "en", "url": "https://stackoverflow.com/questions/201515", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Removing CSS Class Attribute From Tag in a Custom Server Control Greetings! I've created a custom button class to render the following: <span class="btnOrange"> <input type="submit" id="ctl00_MainContent_m_GoBack" value="Back" name="ctl00$MainContent$m_GoBack"/> </span> However, it renders like this instead (no...
{ "language": "en", "url": "https://stackoverflow.com/questions/201518", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can I code desktop monitoring software? I have to develop a tool for monitoring helpdesk agents. I can figure out how to capture keyboard events and mouse events; however I need to capture the control that emitted/consumed the event too. Is it possible to find that out? A: You need windows hooks to pick up the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/201520", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to undo a delete operation in SQL Server 2005? Our Test DB is suddenly missing rows. We want them back. Is there a way to sift through everything that has happened to the database today? Each SQL statement? I presume this kind of stuff is in the transaction log, but am not sure how to view it. Is there a way to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/201524", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What is the proper order for installing Microsoft software on a developer workstation? I've done this a million times ... setting up a developer work station. Is there a best practices, or installation checklist for installing Microsoft development software on a work station? What about applying updates and/or ser...
{ "language": "en", "url": "https://stackoverflow.com/questions/201525", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "28" }
Q: Best design for a changelog / auditing database table? I need to create a database table to store different changelog/auditing (when something was added, deleted, modified, etc). I don't need to store particularly detailed info, so I was thinking something along the lines of: * *id (for the event) *user that trig...
{ "language": "en", "url": "https://stackoverflow.com/questions/201527", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "126" }
Q: Any way to make "find references" work for web methods? I'm looking for a way to find references to a web method in other code that may use it. Right-click and choose find references doesn't make it through the wsdl interface to other classes in my solution that reference those web methods. This is part of a clean...
{ "language": "en", "url": "https://stackoverflow.com/questions/201529", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How should I add multiple identical elements to a div with jQuery I need to add multiple empty divs to a container element using jQuery. At the moment I am generating a string containing the empty html using a loop divstr = '<div></div><div></div>...<div></div>'; and then injecting that into my container: $('#conta...
{ "language": "en", "url": "https://stackoverflow.com/questions/201530", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: How do you set ASP.NET Development Web Server to not cache any content? I use the ASP.NET Development Web server (also known as the Visual Studio Development Web server) to do local web site debugging and testing. I've pretty much found exact functionality with IIS with the dev web server. However - where can you m...
{ "language": "en", "url": "https://stackoverflow.com/questions/201532", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Dynamic Table Data disappearing upon ImageButton Click I have a form that searches all rows in a single table (TServices) that occurred between the date range and then populates a dynamic table below the form. Now I'm adding a delete ImageButton next to each listing in the table. Here's my C# code-behind for adding...
{ "language": "en", "url": "https://stackoverflow.com/questions/201534", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Can you use ADO.NET SQLCommandBuilder with composite keys? I have a database table with 6 columns. The primary key is a composite key made up of 5 of the 6 columns I am trying to use the SqlClient.SqlCommandBuilder.GetDeleteCommand to delete the row. However I am getting the following error: "System.InvalidOperatio...
{ "language": "en", "url": "https://stackoverflow.com/questions/201546", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: .NET inheritance with generic interfaces Hallo i am currently playing around with castle projects ActiveRecord and the remoting facility. my current problem is that i need the find a way the implement the save sub from IBaseRepository in my address class and i dont know how. here is my current code, VS tells me on t...
{ "language": "en", "url": "https://stackoverflow.com/questions/201553", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: finding largest increasing subset of an array (non-contiguous) How can I find the largest increasing (non-contiguous) subset of an array? For example, if A= array(50,1,4,9,2,18,6,3,7,10) the largest increasing non-contiguous subset is either (1,4,6,7,10) or (1,2,6,7,10). I can intuitively see how to find the subset,...
{ "language": "en", "url": "https://stackoverflow.com/questions/201563", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: When would I use XML instead of SQL? I've been working on database-driven web applications for a few years now and recently took on a project involving a CMS that is XML-capable. This has led me to think about the usage of XML/XSLT in general and in what situations it would be more useful than the approach I've alwa...
{ "language": "en", "url": "https://stackoverflow.com/questions/201568", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "108" }
Q: JBoss Application Server admin console? I know that the JBoss Application Server has the JMX-Console as a GUI for administration. My question is, is there a similar admin tool using the command line? Does this tool come with the application server, and can it report on the status of various services under the contro...
{ "language": "en", "url": "https://stackoverflow.com/questions/201589", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Identifying COM components in a .NET application I've inherited a .NET application that pulls together about 100 dlls built by two teams or purchased from vendors. I would like to quickly identify whether a given dll is a .NET assembly or a COM component. I realize that I could just invoke ildasm on each dll individ...
{ "language": "en", "url": "https://stackoverflow.com/questions/201590", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Is there a simple way to convert C++ enum to string? Suppose we have some named enums: enum MyEnum { FOO, BAR = 0x50 }; What I googled for is a script (any language) that scans all the headers in my project and generates a header with one function per enum. char* enum_to_string(MyEnum t); And a impleme...
{ "language": "en", "url": "https://stackoverflow.com/questions/201593", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "137" }
Q: How can I fix my .htaccess to resolve URLs that don't end in slashes I am using wordpress and use custom permalink structure: /%category%/%postname%/ My problem is that a decent number of people link to the site without including the trailing slash in the URL, so users get a 404 page. I'm using the default .htaccess...
{ "language": "en", "url": "https://stackoverflow.com/questions/201602", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Are there any Ant conventions similar to Maven2 conventions? For the past 2 years-(ish) I've been using Maven2 for my build/continuous integration solution. I used Ant a bit before that but really didn't get a lot of experience with it. Now I've taken a new job and the team I'm on now uses Ant. What I'm wonderin...
{ "language": "en", "url": "https://stackoverflow.com/questions/201606", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Is there an equivalent to String.Split that returns a generic list? I'd like to do something like this: Dim Foo as String = "a,b,c,d,e" Dim Boo as List(of String) = Foo.Split(","c) Of course Foo.Split returns a one-dimensional array of String, not a generic List. Is there a way to do this without iterating through ...
{ "language": "en", "url": "https://stackoverflow.com/questions/201607", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: What could cause a .NET WinForms app to close suddently without a dialog? Our WinForms application has been reported to occasionally just close on its own. It neither shows our own crash error submit dialog nor Windows' error submit dialog, it just closes and is gone, often when the person was afk and not doing any...
{ "language": "en", "url": "https://stackoverflow.com/questions/201614", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: syslog output for log4r example Can some one post an example of using syslog outputter for log4r, I am currently using stdout but want to log to syslog. mylog = Logger.new 'mylog' mylog.outputters = Outputter.stdout mylog.info "Starting up." raj Thanks also to the following blog posts. Angrez's blog: Log4r - Usag...
{ "language": "en", "url": "https://stackoverflow.com/questions/201615", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to capture console output from a service C#? We have a C# service that is deployed to a remote customer system. The application writes a substantial amount of "diagnostic" information to the console (i.e. Console.WriteLine()). The service isn't "doing what it should." How can we capture the console output fro...
{ "language": "en", "url": "https://stackoverflow.com/questions/201616", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: How do I see all foreign keys to a table or column? In MySQL, how do I get a list of all foreign key constraints pointing to a particular table? a particular column? This is the same thing as this Oracle question, but for MySQL. A: If you use InnoDB and defined FK's you could query the information_schema database e...
{ "language": "en", "url": "https://stackoverflow.com/questions/201621", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "739" }
Q: Linq To SQL - how to have property not from table but from DB We are using Linq To SQL with our own data context logic that executes the one linq query across multiple databases. When we get the results back, we need the database for each of the rows. So... I want to have a property on my class that will return the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/201636", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What is the WIN32 API WM_REFLECT message for? I can't find documentation for it, even on MSDN... A: It's not Win32; it's MFC. Ordinarily, a Win32 control raises events by sending a message to its parent window. However, if you've got your own class derived from one of MFC's wrappers (e.g. you've wrapped CTreeCtrl w...
{ "language": "en", "url": "https://stackoverflow.com/questions/201654", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Is there a .NET Tool/Add-in available which allows you to easily rearrange the order of Regions, Subs, Functions, and Member Variables in a Class? I'm looking for a .NET Add-in that reads in the contents of the Current Document window, lists the header declaration of all Regions, Subs, Functions, and Module Level Va...
{ "language": "en", "url": "https://stackoverflow.com/questions/201656", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I un-escape XML entities easily in .NET I have some code which returns InnerXML for a XMLNode. The node can contain just some text (with HTML) or XML. For example: <XMLNode> Here is some &lt;strong&gt;HTML&lt;/strong&gt; <XMLNode> or <XMLNode> <XMLContent>Here is some content</XMLContnet> </XMLNode> ...
{ "language": "en", "url": "https://stackoverflow.com/questions/201660", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Is it possible to load two versions of the .NET runtime in the same process? There are two scenarios I need to clarify: * *An executable compiled with .NET 3.5 needs to use a library compiled with .NET 1.1 and the library must run on the 1.1 runtime. *An executable compiled with .NET 1.1 needs to use a library c...
{ "language": "en", "url": "https://stackoverflow.com/questions/201663", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How do you sort a tree stored using the nested set model? When I refer to nested set model I mean what is described here. I need to build a new system for storing "categories" (I can't think of better word for it) in a user defined hierarchy. Since the nested set model is optimized for reads instead of writes, I de...
{ "language": "en", "url": "https://stackoverflow.com/questions/201671", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: Tabs in their own process with C# and WinForms Possible duplicate Windows Forms application like Google Chrome with multiple processes Chrome / IE8 multi-process design, is it possible in .NET? Sample for Multi-process C# app like Google Chrome Both IE8 and Google Chrome browser have separate processes for each ta...
{ "language": "en", "url": "https://stackoverflow.com/questions/201674", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How to integrate Geronimo's transaction manager in Tomcat? Does Geronimo provides a standalone transaction manager? And if it does, is it possible to use it in Tomcat? A: Apache OpenEJB is embedded implementation of Geronimo EJB container that includes Transaction Manager. OpenEJB can be embedded into Tomcat which ...
{ "language": "en", "url": "https://stackoverflow.com/questions/201680", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Best jQuery Status Message Plugin? What is the best jQuery status message plugin? I like jGrowl and Purr, but jGrowl doesn't have the feature to remain sticky (not close automatially) and Purr doesn't seem to work right in IE 6. I would like to show messages like... the site is about to go down for maintenance, your...
{ "language": "en", "url": "https://stackoverflow.com/questions/201684", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "42" }
Q: Linq to SQL: select optimization On large tables in MSSQL; selecting specific columns results in greater speed of the query. Does the same apply to Linq to SQL? Would this: var person = from p in [DataContextObject].Persons where p.PersonsID == 1 select new { p.PersonsID, p.PersonsAdress, p...
{ "language": "en", "url": "https://stackoverflow.com/questions/201686", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How to audit when a user leaves an ASP.NET app In ASP.NET, I'm looking for a way to audit a user leaving my application. To be specific, I'd like to insert a 'logout' record in an audit table in SQL Server when the user's session is abandoned/destroyed for any reason (not necessarily because of a call to session.aba...
{ "language": "en", "url": "https://stackoverflow.com/questions/201696", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Sharing ASP.NET session cookies with a Java applet I have a Java applet that runs inside a forms-authenticated aspx page. In the .NET 1.1 version of my site, the applet has access to the session cookie and is able to retrieve a file from the server, but in the .NET 2.0 version it fails to authenticate. I have seen a...
{ "language": "en", "url": "https://stackoverflow.com/questions/201699", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do I create a named log in $TOMCAT_HOME/logs for my servlet? I'm currently logging via the simplest of methods within my servlet using Tomcat. I use the ServletConfig.getServletContext().log to record activity. This writes to the localhost.YYYY-MM-DD.log in $TOMCAT_HOME/logs. I don't want to get away from the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/201700", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How many random elements before MD5 produces collisions? I've got an image library on Amazon S3. For each image, I md5 the source URL on my server plus a timestamp to get a unique filename. Since S3 can't have subdirectories, I need to store all of these images in a single flat folder. Do I need to worry about colli...
{ "language": "en", "url": "https://stackoverflow.com/questions/201705", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "168" }
Q: How do I ensure Linq to Sql doesn't override or violate non-nullable DB default values? I have an SQL Server DB with a table with these fields: * *A bit with the default value 1, NOT NULL. *A smalldatetime with the default value gettime(), NOT NULL. *An int with no default value, IDENTITY, NOT NULL. When I ge...
{ "language": "en", "url": "https://stackoverflow.com/questions/201706", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: Concatenating two std::vectors How do I concatenate two std::vectors? A: vector1.insert( vector1.end(), vector2.begin(), vector2.end() ); A: Or you could use: std::copy(source.begin(), source.end(), std::back_inserter(destination)); This pattern is useful if the two vectors don't contain exactly the same type of...
{ "language": "en", "url": "https://stackoverflow.com/questions/201718", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "937" }
Q: Easy way to turn JavaScript array into comma-separated list? I have a one-dimensional array of strings in JavaScript that I'd like to turn into a comma-separated list. Is there a simple way in garden-variety JavaScript (or jQuery) to turn that into a comma-separated list? (I know how to iterate through the array and...
{ "language": "en", "url": "https://stackoverflow.com/questions/201724", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "525" }
Q: What is the simplest way to call an HttpHandler file in .NET? I have an HttpHandler on my webserver that takes a URL in the form of "https://servername/myhandler?op=get&k=Internal&m=jdahug1". I need to call this URL from my .NET app and capture whatever the output is. Does anyone know how I can do that? I want it...
{ "language": "en", "url": "https://stackoverflow.com/questions/201734", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Quality Indicators TFS 2008 report and multiple build types In a project we have two build types, one for continuous integration and one that runs our test suite. When the Quality Indicators report is run, it displays data from all builds regardless of build type. The report suggests that one can only run it on a s...
{ "language": "en", "url": "https://stackoverflow.com/questions/201735", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Where can I find examples of element heavy web forms? I would like to look at some examples of some good form layouts (web-based) that have a lot of input fields. I do a lot of web application development and a lot of my forms are input element heavy so I am always looking for good ideas on how to display my forms. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/201760", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Mixing jQuery and YUI together in an app, is it easily possible? I have to preface this with the fact that I love jQuery as a JavaScript language extension and YUI as a rich set of free controls. So here is my question, is there going to be any problems down the line if I mix jQuery and YUI together in an MVC app I...
{ "language": "en", "url": "https://stackoverflow.com/questions/201768", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: Submit Login control button when I hit Enter I have an ASP.NET web page with a Login control on it. When I hit Enter, the Login button doesn't fire; instead the page submits, doing nothing. The standard solution to this that I've found online is to enclose the Login control in a Panel, then set the Panel default bu...
{ "language": "en", "url": "https://stackoverflow.com/questions/201776", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "23" }
Q: SQL Server 2005 auto growth by size I have been looking at the new database server we are setting up for a client and note the database files are set to grow by 1 meg everytime the file is full and the initial size is 100 MB. I have been considering this breifly and it doesn't sound right. I've checked a few sites ...
{ "language": "en", "url": "https://stackoverflow.com/questions/201777", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Can I create transparent buttons in Visual Studio 2005 with C# I have a user interface that requires placing some round buttons in a C# project with some data behind them. The buttons are System.Windows.Forms.buttons and I have used a GIF image with transparency to create them. However, the transparent areas aren't...
{ "language": "en", "url": "https://stackoverflow.com/questions/201778", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Do you know of any IDEs that are localized to Spanish? I have a buddy that's having a hard time with the language barrier. I tried to think of any IDEs that are also available in Spanish, but couldn't think of any. Any ideas? A: Microsoft Visual Studio is avaible in spanish http://en.wikipedia.org/wiki/Microsoft_Vi...
{ "language": "en", "url": "https://stackoverflow.com/questions/201780", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Can you use a trailing comma in a JSON object? When manually generating a JSON object or array, it's often easier to leave a trailing comma on the last item in the object or array. For example, code to output from an array of strings might look like (in a C++ like pseudocode): s.append("["); for (i = 0; i < 5; ++i)...
{ "language": "en", "url": "https://stackoverflow.com/questions/201782", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "456" }
Q: Data Access Layer: Exposing List<>: bad idea? I am currently coding a simple Data Access Layer, and I was wondering which type I should expose to the other layers. I am going to internally implement the Data as a List<>, but I remember reading something about not exposing the List type to the consumers if not needed...
{ "language": "en", "url": "https://stackoverflow.com/questions/201791", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Unsecure posting back from an asp.net control on a secure page while avoiding authentication We are using standard asp.net forms authentication. Certain pages require a user to be logged in; and least some of these pages are delivered by https. There is a search control at the top of each page. When this is used,...
{ "language": "en", "url": "https://stackoverflow.com/questions/201796", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to set a long Java classpath in Windows? I'm trying to run a particular JUnit test by hand on a Windows XP command line, which has an unusually high number of elements in the class path. I've tried several variations, such as: set CLASS_PATH=C:\path\a\b\c;C:\path\e\f\g;.... set CLASS_PATH=%CLASS_PATH%;C:\path2\...
{ "language": "en", "url": "https://stackoverflow.com/questions/201816", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "53" }
Q: C# (ASP.Net) Linking selection values to constants in Codebehind ASPX Code <asp:RadioButtonList ID="rbServer" runat="server" > <asp:ListItem Value=<%=ServerDeveloper%>> Developer </asp:ListItemv <asp:ListItem Value="dev.ahsvendor.com"> dev.test.com</asp:ListItem> <asp:ListItem Value="staging.ahsvendor.com"...
{ "language": "en", "url": "https://stackoverflow.com/questions/201826", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Target IIS Worker Processes on Request Ok, strange setup, strange question. We've got a Client and an Admin web application for our SaaS app, running on asp.net-2.0/iis-6. The Admin application can change options displayed on the Client application. When those options are saved in the Admin we call a Webservice on t...
{ "language": "en", "url": "https://stackoverflow.com/questions/201827", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Can a BCP version 8.0 format file have a column name that is a SQL keyword? I have a format file where I want one of the columns to be "group". I'm auto-generating the format file and a client wants to upload a file with "group" as one of the columns. I could restrict it so they can't use SQL keywords, but then I ...
{ "language": "en", "url": "https://stackoverflow.com/questions/201829", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Linq to SQL: .FirstOrDefault() not applicable to select new { ... } I just asked this question. Which lead me to a new question :) Up until this point, I have used the following pattern of selecting stuff with Linq to SQL, with the purpose of being able to handle 0 "rows" returned by the query: var person = (from p ...
{ "language": "en", "url": "https://stackoverflow.com/questions/201830", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Assigning values to a list of global variables in JavaScript Hey right now I'm using jQuery and I have some global variables to hold a bit of preloaded ajax stuff (preloaded to make pages come up nice and fast): $.get("content.py?pageName=viewer", function(data) {viewer = data;}); $.get("content.py?pageName=art...
{ "language": "en", "url": "https://stackoverflow.com/questions/201832", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: MSMQ Generic Messaging I'm thinking of creating a generic message queue to handle various inter-process messages. (WCF is not an option at this point.) So, rather than have 10-15 different queues for specific messages I'd have 1 queue that is a 'catch-all'. Obviously sending messages to this queue is a not a pro...
{ "language": "en", "url": "https://stackoverflow.com/questions/201834", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Using a backslash (%5c) in a REST WCF URL I am building a REST service on WCF, and one of the methods I am writing is GetProfile, which will return the profile for a given username. The username will include the user's domain, and so will have the following format: "DOMAIN\username". I therefore have a service calle...
{ "language": "en", "url": "https://stackoverflow.com/questions/201838", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do I solve "index unique_schema_migrations already exists" in Rails? Running rake db:migrate followed by rake test:units yields the following: rake test:functionals (in /projects/my_project) rake aborted! SQLite3::SQLException: index unique_schema_migrations already exists: CREATE UNIQUE INDEX "unique_schema_mig...
{ "language": "en", "url": "https://stackoverflow.com/questions/201840", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How do I configure email notification on new case comment in salesforce.com? In salesforce.com, I have a workflow that triggers when a new case comment is added via the self-service portal. The workflow rule updates the Case.Status field, which fires another workflow rule on the Case object itself. The end result ...
{ "language": "en", "url": "https://stackoverflow.com/questions/201841", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: python name a file same as a lib i have the following script import getopt, sys opts, args = getopt.getopt(sys.argv[1:], "h:s") for key,value in opts: print key, "=>", value if i name this getopt.py and run it doesn't work as it tries to import itself is there a way around this, so i can keep this filename but ...
{ "language": "en", "url": "https://stackoverflow.com/questions/201846", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Outlook automation - Change Sender Account I'm automating Outlook and I need to control who the email appears to be from. The users will have two or more Accounts set up in Outlook and I need to be able to select which account to send the email from. Any ideas? Needs to be supported on Outlook 2003 and above. I'm us...
{ "language": "en", "url": "https://stackoverflow.com/questions/201848", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Using DPAPI / ProtectedData in a web farm environment with the User Store I was wondering if anyone had successfully used DPAPI with a user store in a web farm enviroment? Because our application is a recently converted from 1.1 to 2.0 ASP.NET app, we're using a custom wrapper which directly calls the CryptUnprotect...
{ "language": "en", "url": "https://stackoverflow.com/questions/201863", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: What is the best Agile methodology for a class project? The project is poorly defined: we are to write educational software for CS 111 Computer Programming I students focusing on functions. We have 6 student developers with various backgrounds working in Flex. The project has a duration of about 7 weeks. We have ver...
{ "language": "en", "url": "https://stackoverflow.com/questions/201865", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }