text
stringlengths
8
267k
meta
dict
Q: SQL file encoding in Visual Studio When we create stored procedures in Visual Studio (with the extension .sql) the file encoding is automatically set to 'Unicode (UTF-8 with signature) - Codepage 65001'. This causes ours DBA's problems as their scripts don't like it. We have to manually go in and change them to 'Wes...
{ "language": "en", "url": "https://stackoverflow.com/questions/45426", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: NCover, TypeMock and MSTest has anyone got NCover, TypeMock and MSTest to work together? and if so how. I've had 2 or 3 serious tries at this now and just can't get it to work. I'm using MSTest 9, NCover 2.1 and TypeMock 4.1. Ideally I would like to run them from an MSBuild task. Cheers Mat A: Well its a bit late b...
{ "language": "en", "url": "https://stackoverflow.com/questions/45431", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Determining members of local groups via C# I wondered whether anybody knows how to obtain membership of local groups on a remote server programmatically via C#. Would this require administrator permissions? And if so is there any way to confirm the currently logged in user's membership (or not) of these groups? A: ...
{ "language": "en", "url": "https://stackoverflow.com/questions/45437", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: MS SQL FTI - searching on "n*" returns numbers This seems like odd behaviour from SQL's full-text-index. FTI stores number in its index with an "NN" prefix, so "123" is saved as "NN123". Now when a user searches for words beginning with N (i.e. contains "n*" ) they also get all numbers. So: select [TextField] from [...
{ "language": "en", "url": "https://stackoverflow.com/questions/45438", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: ICalendar and event updates not working in Outlook I'm generating ICalendar (.ics) files. Using the UID and SEQUENCE fields I can update existing events in Google Calendar and in Windows Calendar BUT NOT in MS Outlook 2007 - it just creates a second event How do I get them to work for Outlook ? Thanks Tom A: I got ...
{ "language": "en", "url": "https://stackoverflow.com/questions/45453", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "25" }
Q: Suggest some good MVC framework in perl Can you suggest some good MVC framework for perl -- one I am aware of is catalyst The need is to be able to expose services on the perl infrastructure which can be called by Java/.Net applications seamlessly. A: Another alternative besides the ones already mentioned is Contin...
{ "language": "en", "url": "https://stackoverflow.com/questions/45470", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: Postback events from within DataView I'm presenting information from a DataTable on my page and would like to add some sorting functionality which goes a bit beyond a straight forward column sort. As such I have been trying to place LinkButtons in the HeaderItems of my GridView which post-back to functions that chan...
{ "language": "en", "url": "https://stackoverflow.com/questions/45475", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to do streaming read of a large XML file in C# 3.5 How can you do a streaming read on a large XML file that contains a xs:sequence just below root element, without loading the whole file into a XDocument instance in memory? A: Going with a SAX-style element parser and the XmlTextReader class created with XmlRea...
{ "language": "en", "url": "https://stackoverflow.com/questions/45481", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Are there conventions for function names when using the Perl Test::More? Are there conventions for function names when using the Perl Test::More or Test::Simple modules? I'm specifically asking about the names of functions that are used to set up a test environment before the test and to tear down the environment af...
{ "language": "en", "url": "https://stackoverflow.com/questions/45485", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: MySQL Error 1093 - Can't specify target table for update in FROM clause I have a table story_category in my database with corrupt entries. The next query returns the corrupt entries: SELECT * FROM story_category WHERE category_id NOT IN ( SELECT DISTINCT category.id FROM category INNER JOIN story...
{ "language": "en", "url": "https://stackoverflow.com/questions/45494", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "799" }
Q: Wacom tablet Python interface If possible I want to catch pressure sensitive input from a Wacom tablet in Python. Are there any Python libraries available that can do this? A: You could perhaps take a look at the software described here. It is a gnome applet, written in Python. From the web site: "The gnome wacom a...
{ "language": "en", "url": "https://stackoverflow.com/questions/45500", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Is there a Python library for generating .ico files? I'm looking to create favicon.ico files programatically from Python, but PIL only has support for reading ico files. A: Perhaps the following would work: * *Generate your icon image using PIL *Convert the image to .ico format using the python interface to Ima...
{ "language": "en", "url": "https://stackoverflow.com/questions/45507", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "35" }
Q: How can I call a .NET DLL from an Inno Setup script? I want to call a function from a .NET DLL (coded in C#) from an Inno Setup script. I have: * *marked the Register for COM interop option in the project properties, *changed the ComVisible setting in the AssemblyInfo.cs file, *added these lines to the ISS scr...
{ "language": "en", "url": "https://stackoverflow.com/questions/45510", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Simplest way to change listview and treeview colours I'm trying to find a simple way to change the colour of the text and background in listview and treeview controls in WTL or plain Win32 code. I really don't want to have to implement full owner drawing for these controls, simply change the colours used. I want to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/45528", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: ASPSmartUpload v3.2 I have the unfortunate task of fixing a legacy ASP site that was migrated to Windows Server 2003, and I know nothing about ASP. The main issue appears to be with ASPSmartUpload, of which I have version 2.3 installed. According to http://foradvice.net/smart_upload_faq.htm: FAQ: does aspSmartUpl...
{ "language": "en", "url": "https://stackoverflow.com/questions/45534", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Get month and year from a datetime in SQL Server 2005 I need the month+year from the datetime in SQL Server like 'Jan 2008'. I'm grouping the query by month, year. I've searched and found functions like datepart, convert, etc., but none of them seem useful for this. Am I missing something here? Is there a function f...
{ "language": "en", "url": "https://stackoverflow.com/questions/45535", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "95" }
Q: How to know whether a window with a given title is already open in Tk? I’ve writen a little python script that just pops up a message box containing the text passed on the command line. I want to pop it up only when the window —resulting from a previous call— is not open. from Tkinter import * import tkMessageBox r...
{ "language": "en", "url": "https://stackoverflow.com/questions/45540", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Add horizontal scroll to asp.net listbox control How can I add horizontal scroll capabilities to the asp.net listbox control? A: Example to add horizontal scroll: <asp:ListBox ID="List" runat="server" Height="320px" Width="100%" style="overflow-x:auto;"SelectionMode="Multiple"> </asp:ListBox> CSS3 overflow-x Prope...
{ "language": "en", "url": "https://stackoverflow.com/questions/45545", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do I return a 403 Forbidden in Spring MVC? I want my controller to return the right HTTP response code when the user lacks permission to view a particular page. A: Use ResponseStatusException : @GetMapping("/demo") public String demo(){ if (forbidden){ throw new ResponseStatusException(HttpStatus.FORBIDDE...
{ "language": "en", "url": "https://stackoverflow.com/questions/45546", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "36" }
Q: How to get browser IP or hostname? I have a web application that should behave differently for internal users than external ones. The web application is available over the Internet, and therefore obviously to the internal users as well. All the users are anonymous, not authenticated, but the page should render diffe...
{ "language": "en", "url": "https://stackoverflow.com/questions/45553", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: fprintf returns success but can't write to an existing file In my code fprintf returns successfully by returning the number of bytes written in STREAM, but in the actual file the string I wrote is not there. A: The output is probably just buffered. Try closing the file using close() or call fflush() on the stream ...
{ "language": "en", "url": "https://stackoverflow.com/questions/45571", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: What is the best method of getting Int32 from first four bytes of GUID? I'm just wondering if it exists better solution for this. BitConverter.ToInt32(sample_guid.ToByteArray(), 0) A: I don't think there's a better solution than this. A: I don't know if it's better, but it is easier to read: Int32.Parse(sample_g...
{ "language": "en", "url": "https://stackoverflow.com/questions/45572", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Syntax highlighting for html markup disappears in Visual Studio 2008 This happened to me in Visual Studio 2008 pre and post 2008 sp1 on more than one computer and to someone else I know, so it can't be an isolated incident. Seemingly random, every so often I lose all syntax highlighting in my aspx page (the html) so...
{ "language": "en", "url": "https://stackoverflow.com/questions/45577", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How can I convince GroovyShell to maintain state over eval() calls? I'm trying to use Groovy to create an interactive scripting / macro mode for my application. The application is OSGi and much of the information the scripts may need is not know up front. I figured I could use GroovyShell and call eval() multiple ti...
{ "language": "en", "url": "https://stackoverflow.com/questions/45582", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Is there a way to perform a "Refresh Dependencies" in a setup project outside VS2008? I have a solution with several projects. One of them is a setup project. If you expand the setup project in the Solution Explorer, you see a Detected Dependencies node. If you right click on it, you get a menu item called Refresh D...
{ "language": "en", "url": "https://stackoverflow.com/questions/45593", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: A issue with the jquery dialog when using the themeroller css The demos for the jquery ui dialog all use the "flora" theme. I wanted a customized theme, so I used the themeroller to generate a css file. When I used it, everything seemed to be working fine, but later I found that I can't control any input element con...
{ "language": "en", "url": "https://stackoverflow.com/questions/45600", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Why doesn't C# support implied generic types on class constructors? C# doesn't require you to specify a generic type parameter if the compiler can infer it, for instance: List<int> myInts = new List<int> {0,1,1, 2,3,5,8,13,21,34,55,89,144,233,377, 610,987,1597,2584,4181,6765}; //this statement is clunky Lis...
{ "language": "en", "url": "https://stackoverflow.com/questions/45604", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "53" }
Q: Cascading deletes in PostgreSQL I have a database with a few dozen tables interlinked with foreign keys. Under normal circumstances, I want the default ON DELETE RESTRICT behavior for those constraints. But when trying to share a snapshot of the database with a consultant, I needed to remove some sensitive data. I w...
{ "language": "en", "url": "https://stackoverflow.com/questions/45611", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Javascript collection of DOM objects - why can't I reverse with Array.reverse()? What could be the problem with reversing the array of DOM objects as in the following code: var imagesArr = new Array(); imagesArr = document.getElementById("myDivHolderId").getElementsByTagName("img"); imagesArr.reverse(); In Firefox ...
{ "language": "en", "url": "https://stackoverflow.com/questions/45613", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: How do you deal with polymorphism in a database? Example I have Person, SpecialPerson, and User. Person and SpecialPerson are just people - they don't have a user name or password on a site, but they are stored in a database for record keeping. User has all of the same data as Person and potentially SpecialPerson, a...
{ "language": "en", "url": "https://stackoverflow.com/questions/45621", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "63" }
Q: Sockets and Processes in Java In Java, what would the best way be to have a constantly listening port open, and still send upon receipt of a packet. I am not particularly savvy with network programming at the moment, so the tutorials I have found on the net aren't particularly helpful. Would it make sense to have th...
{ "language": "en", "url": "https://stackoverflow.com/questions/45623", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How do I change the default author for accessing a local SVN repository? I use TortoiseSVN to access file based local repo. In all my commits an author is my Windows login name. Is it possible to use different name? I know how to change author after commit but how to change before? Installing apache/svnserver is not...
{ "language": "en", "url": "https://stackoverflow.com/questions/45624", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Using ASP.NET AJAX PageMethods and Validators I have a basic CRUD form that uses PageMethods to update the user details, however the Validators don't fire off, I think I need to manually initialize the validators and check whether the validation has passed in my javascript save method. Any ideas on how to do this? ...
{ "language": "en", "url": "https://stackoverflow.com/questions/45626", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do you detect/avoid Memory leaks in your (Unmanaged) code? In unmanaged C/C++ code, what are the best practices to detect memory leaks? And coding guidelines to avoid? (As if it's that simple ;) We have used a bit of a silly way in the past: having a counter increment for every memory allocation call and decreme...
{ "language": "en", "url": "https://stackoverflow.com/questions/45627", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "127" }
Q: How do I write SELECT FROM myTable WHERE id IN (SELECT...) in Linq? How do you rewrite this in Linq? SELECT Id, Name FROM TableA WHERE TableA.Id IN (SELECT xx from TableB INNER JOIN Table C....) So in plain english, I want to select Id and Name from TableA where TableA's Id is in a result set from a second query. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/45634", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Library or algorithm to explode an alphanumeric range I was wondering if there is an open source library or algorithm that can expand a non-numeric range. For example, if you have 1A to 9A you should get 1A, 2A, 3A, 4A, 5A, 6A, 7A, 8A, 9A. I've tried Googling for this and the best I could come up with were Regex ...
{ "language": "en", "url": "https://stackoverflow.com/questions/45642", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Common Files in Visual Studio Solution Many times I have seen Visual Studio solutions which have multiple projects that share source files. These common source files are usually out in a common directory and in the solution explorer their icon shows up with a link arrow in the bottom left. However, any time I try t...
{ "language": "en", "url": "https://stackoverflow.com/questions/45650", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: SQL: How to get the id of values I just INSERTed? I inserted some values into a table. There is a column whose value is auto-generated. In the next statement of my code, I want to retrieve this value. Can you tell me how to do it the right way? A: If you are working with Oracle: Inset into Table (Fields....) value...
{ "language": "en", "url": "https://stackoverflow.com/questions/45651", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "81" }
Q: Has anyone connected BizTalk with QuickBooks? We use QuickBooks for financial management, and feed it from a variety of sources. I now need to hook it up to BizTalk, and I'd hate to reinvent the wheel. I've done searches, and as far as I can tell there's no QuickBooks adapter for BizTalk. Does anyone know of anythin...
{ "language": "en", "url": "https://stackoverflow.com/questions/45653", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do I retrieve IPIEHTMLDocument2 interface on IE Mobile I wrote an Active X plugin for IE7 which implements IObjectWithSite besides some other necessary interfaces (note no IOleClient). This interface is queried and called by IE7. During the SetSite() call I retrieve a pointer to IE7's site interface which I can ...
{ "language": "en", "url": "https://stackoverflow.com/questions/45658", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Is there a limit with the number of SSL connections? Is there a limit with the number of SSL connections? We are trying to connect through SSL with 2000 sessions. We have tried it a couple of times but it always dies at 1062nd. Is there a limit? A: Your operating system will have a limit on the number of open files...
{ "language": "en", "url": "https://stackoverflow.com/questions/45686", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Visual Studio Add-in not going away Ok, so I demo'd Refactor Pro and Resharper, I'm more comfortable with Resharper so that's what I bought. When I uninstalled Refactor Pro I thought everything was breezy. However, now when I open Visual Studio I get The Add-in 'DevExpress Tools' failed to load or caused and except...
{ "language": "en", "url": "https://stackoverflow.com/questions/45695", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How to compile a .NET application to native code? Let's say I want to run a .NET application on a machine where the .NET framework is not available; Is there any way to compile the application to native code? A: You can! However you're restricted to .NET 1.1 (no generics for you): Mono Ahead-Of-Time compilation (AO...
{ "language": "en", "url": "https://stackoverflow.com/questions/45702", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "95" }
Q: How would you architect a desktop application in C# 3.0 I've created a simple desktop application in C# 3.0 to learn some C#, wpf and .Net 3.5. My application essentially reads data from a csv file and stores it in a SQL server CE database. I use sqlmetal to generate the ORM code for the database. My first iteration...
{ "language": "en", "url": "https://stackoverflow.com/questions/45705", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: How to do multi-column sorting on a Visual Basic 6 ListView? I am working in Visual Basic 6 and need to sort by multiple columns in a ListView. For example, sorting a list of music tracks by artist, then album, then track number. As far as I know, VB6 does not support this out of the box. Here are the suggestions...
{ "language": "en", "url": "https://stackoverflow.com/questions/45716", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: What path should I pass as an AssemblyPath parameter to the Publish.GacRemove function? I want to use the Publish.GacRemove function to remove an assembly from GAC. However, I don't understand what path I should pass as an argument. Should it be a path to the original DLL (what if I removed it after installing it in...
{ "language": "en", "url": "https://stackoverflow.com/questions/45729", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How can I extract a part of a xaml object graph via linq to xml? I have an object graph serialized to xaml. A rough sample of what it looks like is: <MyObject xmlns.... > <MyObject.TheCollection> <PolymorphicObjectOne .../> <HiImPolymorphic ... /> </MyObject.TheCollection> </MyObject> I wan...
{ "language": "en", "url": "https://stackoverflow.com/questions/45732", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: apache mod_proxy error os10060 and returning 503? Can't get to my site. Apache gives the following error message: [Fri Sep 05 08:47:42 2008] [error] (OS 10060)A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected...
{ "language": "en", "url": "https://stackoverflow.com/questions/45736", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Customize the Sharepoint add list column page I have defined a custom Sharepoint list for special attributes related to a software application inventory and installed it as a feature. I also want to group these attributes in categories. How could I change the Sharepoint page that allows the user to add a column to a...
{ "language": "en", "url": "https://stackoverflow.com/questions/45741", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Code Profiling in Visual Studio 2005 I have a Visual Studio 2005 Solution workspace which in turn has 8 projects included in it. I want to profile the complete code(all the projects) and get some measure about the absolute cycles taken by each function to execute, or at least percentage cycle consumptions. I checked...
{ "language": "en", "url": "https://stackoverflow.com/questions/45744", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Managing/Using libraries with Debug builds vs Release builds I'm curious about everyones practices when it comes to using or distributing libraries for an application that you write. First of all, when developing your application do you link the debug or release version of the libraries? (For when you run your appli...
{ "language": "en", "url": "https://stackoverflow.com/questions/45769", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: C# Dynamic Event Subscription How would you dynamically subscribe to a C# event so that given a Object instance and a String name containing the name of the event, you subscribe to that event and do something (write to the console for example) when that event has been fired? It would seem using Reflection this isn't...
{ "language": "en", "url": "https://stackoverflow.com/questions/45779", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "34" }
Q: Automate Deployment for Web Applications? My team is currently trying to automate the deployment of our .Net and PHP web applications. We want to streamline deployments, and to avoid the hassle and many of the headaches caused by doing it manually. We require a solution that will enable us to: - Compile the applicat...
{ "language": "en", "url": "https://stackoverflow.com/questions/45783", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "41" }
Q: How can I fork a background processes from a Perl CGI script on Windows? I've had some trouble forking of processes from a Perl CGI script when running on Windows. The main issue seems to be that 'fork' is emulated when running on windows, and doesn't actually seem to create a new process (just another thread in the...
{ "language": "en", "url": "https://stackoverflow.com/questions/45792", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Using IIS6, how can I place files in a sub-folder but have them served as if they were in the root? Our ASP.NET 3.5 website running on IIS 6 has two teams that are adding content: * *Development team adding code. *Business team adding simple web pages. For sanity and organization, we would like for the busi...
{ "language": "en", "url": "https://stackoverflow.com/questions/45796", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Service to make an audio podcast from a video one? * *Video podcast *??? *Audio only mp3 player I'm looking for somewhere which will extract audio from video, but instead of a single file, for an on going video podcast. I would most like a website which would suck in the RSS and spit out an RSS (I'm thinking o...
{ "language": "en", "url": "https://stackoverflow.com/questions/45803", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: WPF Get Element(s) under mouse Is there a way with WPF to get an array of elements under the mouse on a MouseMove event? A: You can also try using the Mouse.DirectlyOver property to get the top-most element that is under the mouse. A: From "WPF Unleashed", page 383: Visual hit testing can inform you about all Vis...
{ "language": "en", "url": "https://stackoverflow.com/questions/45813", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "37" }
Q: Counting number of views for a page ignoring search engines? I notice that StackOverflow has a views count for each question and that these view numbers are fairly low and accurate. I have a similar thing on one of my sites. It basically logs a "hit" whenever the page is loaded in the backend code. Unfortunately it...
{ "language": "en", "url": "https://stackoverflow.com/questions/45824", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: How do you automatically set the focus to a textbox when a web page loads? How do you automatically set the focus to a textbox when a web page loads? Is there an HTML tag to do it or does it have to be done via Javascript? A: IMHO, the 'cleanest' way to select the First, visible, enabled text field on the page, is ...
{ "language": "en", "url": "https://stackoverflow.com/questions/45827", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "175" }
Q: How many app.config files are you allowed to have per AppDomain? I'm hoping there's a way to avoid custom configuration files if an application runs in a single AppDomain. A: From Suzanne Cook's .NET CLR Notes: App.Config Files: As default the app config file of the default appdomain is in the process exe’s direc...
{ "language": "en", "url": "https://stackoverflow.com/questions/45838", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Web Design for Google Chrome What, if any, considerations (HTML, CSS, JavaScript) should you take when designing for Google Chrome? A: Chrome uses Webkit, the same engine as is used by Safari, OmniWeb, iCab and more. Just code everything based on the standards and verify in each browser. A: I think first and fore...
{ "language": "en", "url": "https://stackoverflow.com/questions/45846", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I get js2-mode to use spaces instead of tabs in Emacs? I am using js2-mode to edit Javascript in Emacs, but I can't seem to get it to stop using tabs instead of spaces for indentation. My other modes work fine, just having issues w/ js2. A: On my copy of GNU Emacs 24.2.1, setting: (setq-default indent-tabs-m...
{ "language": "en", "url": "https://stackoverflow.com/questions/45861", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "23" }
Q: Can you disable the back button in a JFace wizard? I'm writing a wizard for an Eclipse RCP application. After doing some processing on a file and taking some user input, I don't want to let the user go back to make changes. At this point they must either accept or reject the changes they are about to make to the s...
{ "language": "en", "url": "https://stackoverflow.com/questions/45865", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: MySQL Partitioning / Sharding / Splitting - which way to go? We have an InnoDB database that is about 70 GB and we expect it to grow to several hundred GB in the next 2 to 3 years. About 60 % of the data belong to a single table. Currently the database is working quite well as we have a server with 64 GB of RAM, so ...
{ "language": "en", "url": "https://stackoverflow.com/questions/45879", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "50" }
Q: View TFS checkin history through merges? In TFS when you merge branch A to branch B and checkin, you get a single changeset on B (typically with a comment like "merged A->B"). This means B doesn't have any of the checkin history from A. So if someone created a new file on branch A, you can't tell who created it f...
{ "language": "en", "url": "https://stackoverflow.com/questions/45882", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: What is the most efficient way to sort an Html Select's Options by value, while preserving the currently selected item? I have jQuery but I'm not sure if it has any built-in sorting helpers. I could make a 2d array of each item's text, value, and selected properties, but I don't think that javascript's built in Arra...
{ "language": "en", "url": "https://stackoverflow.com/questions/45888", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "86" }
Q: Opening a non-standard URL in a Cocoa app In an application that I'm writing I have some code like this: NSWorkspace* ws = [NSWorkspace sharedWorkspace]; NSString* myurl = @"http://www.somewebsite.com/method?a=%d"; NSURL* url = [NSURL URLWithString:myurl]; [ws openURL:url]; The main difference being that myurl co...
{ "language": "en", "url": "https://stackoverflow.com/questions/45898", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How do you add an image? Situation: I have a simple XML document that contains image information. I need to transform it into HTML. However, I can't see where the open tag is and when I use the XSL code below, it shows the following error message: "Cannot write an attribute node when no element start tag is open."...
{ "language": "en", "url": "https://stackoverflow.com/questions/45904", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: Tips and tricks for working with Microsoft Visual Studio solutions and project After answering on this question I thought it would be nice to collect some tips & tricks for working with MSVS solutions and projects. Here is my list: * *How to avoid saving new projects automatically to reduce garbage in file sy...
{ "language": "en", "url": "https://stackoverflow.com/questions/45908", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "21" }
Q: MenuStrip Error My users are having an intermittent error when using a Windows Forms application built in VB.NET 3.5. Apparently when they click on the form and the form re-paints, a red 'X' will be painted over the MenuStrip control and the app will crash with the following error. Has anyone seen this before? Can ...
{ "language": "en", "url": "https://stackoverflow.com/questions/45924", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Branch / merge management in Subversion 1.5 I've used subversion for a while, and used the svnmerge.py script for a while in my old job to manage merges between branches. I believe Subversion 1.5 is now out, and was supposed to have some branch / merge management system integrated with it. So, can someone give me a...
{ "language": "en", "url": "https://stackoverflow.com/questions/45941", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: php execute a background process I need to execute a directory copy upon a user action, but the directories are quite large, so I would like to be able to perform such an action without the user being aware of the time it takes for the copy to complete. Any suggestions would be much appreciated. A: Well i found a b...
{ "language": "en", "url": "https://stackoverflow.com/questions/45953", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "285" }
Q: Analizing MIPS binaries: is there a Python library for parsing binary data? I'm working on a utility which needs to resolve hex addresses to a symbolic function name and source code line number within a binary. The utility will run on Linux on x86, though the binaries it analyzes will be for a MIPS-based embedded sy...
{ "language": "en", "url": "https://stackoverflow.com/questions/45954", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: How to multiply 10 to an "Integer" object in Java? How do I multiply 10 to an Integer object and get back the Integer object? I am looking for the neatest way of doing this. I would probably do it this way: Get int from Integer object, multiply it with the other int and create another Integer object with this int va...
{ "language": "en", "url": "https://stackoverflow.com/questions/45964", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: mmap() vs. reading blocks I'm working on a program that will be processing files that could potentially be 100GB or more in size. The files contain sets of variable length records. I've got a first implementation up and running and am now looking towards improving performance, particularly at doing I/O more efficien...
{ "language": "en", "url": "https://stackoverflow.com/questions/45972", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "232" }
Q: Meaning/cause of RPC Exception 'No interfaces have been exported.' We have a fairly standard client/server application built using MS RPC. Both client and server are implemented in C++. The client establishes a session to the server, then makes repeated calls to it over a period of time before finally closing the se...
{ "language": "en", "url": "https://stackoverflow.com/questions/45977", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Choosing a folder with .NET 3.5 In a C# .NET 3.5 app (a mix of WinForms and WPF) I want to let the user select a folder to import a load of data from. At the moment, it's using System.Windows.Forms.FolderBrowserDialog but that's a bit lame. Mainly because you can't type the path into it (so you need to map a network...
{ "language": "en", "url": "https://stackoverflow.com/questions/45988", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "27" }
Q: What's the easiest way to convert Wiki markup to HTML? I'm building a website that requires very basic markup capabilities. I can't use any 3rd party plugins, so I just need a simple way to convert markup to HTML. I might have a total of 3 tags that I'll allow. What is the best way to convert ==Heading== to <h2>Head...
{ "language": "en", "url": "https://stackoverflow.com/questions/45991", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: How to change "Generate Method Stub" to throw NotImplementedException in VS? How can I change default Generate Method Stub behavior in Visaul Studio to generate method with body throw new NotImplementedException(); instead of throw new Exception("The method or operation is not implemented."); A: Taken from: http...
{ "language": "en", "url": "https://stackoverflow.com/questions/46003", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: How do you implement resource "edit" forms in a RESTful way? We are trying to implement a REST API for an application we have now. We want to expose read/write capabilities for various resources using the REST API. How do we implement the "form" part of this? I get how to expose "read" of our data by creating RESTfu...
{ "language": "en", "url": "https://stackoverflow.com/questions/46004", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Self Updating What's the best way to terminate a program and then run additional code from the program that's being terminated? For example, what would be the best way for a program to self update itself? A: You have a couple options: You could use another application .exe to do the auto update. This is probably ...
{ "language": "en", "url": "https://stackoverflow.com/questions/46013", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Data Validation Design Patterns If I have a collection of database tables (in an Access file, for example) and need to validate each table in this collection against a rule set that has both common rules across all tables as well as individual rules specific to one or a subset of tables, can someone recommend a good...
{ "language": "en", "url": "https://stackoverflow.com/questions/46029", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: C# Force Form Focus So, I did search google and SO prior to asking this question. Basically I have a DLL that has a form compiled into it. The form will be used to display information to the screen. Eventually it will be asynchronous and expose a lot of customization in the dll. For now I just want it to display pro...
{ "language": "en", "url": "https://stackoverflow.com/questions/46030", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "23" }
Q: How do I lock certain SQL rows while running a process on them? My work has a financial application, written in VB.NET with SQL, that several users can be working on at the same time. At some point, one user might decide to Post the batch of entries that they (and possibly other people) are currently working on. Obv...
{ "language": "en", "url": "https://stackoverflow.com/questions/46034", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Redirect from domain name to a dotted quad hosted box I have a php server that is running my domain name. For testing purposes I am running an asp.net on a dotted quad IP. I am hoping to link them together via either PHP or some kind of DNS/.htaccess voodoo. So if I go to www.mydomain.com/test it redirects (but kee...
{ "language": "en", "url": "https://stackoverflow.com/questions/46074", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: What is the best approach for (client-side) disabling of a submit button? Details: * *Only disable after user clicks the submit button, but before the posting back to the server *ASP.NET Webforms (.NET 1.1) *Prefer jQuery (if any library at all) *Must be enabled if form reloads (i.e. credit card failed) This...
{ "language": "en", "url": "https://stackoverflow.com/questions/46079", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: How do you move a file? I'm using TortoiseSVN against the SourceForge SVN repository. I'd like to move a file from one folder to another in order to maintain its revision history. Is this possible? If so, how do you do it? (My current strategy has been to copy the file into the new folder and check it in and then de...
{ "language": "en", "url": "https://stackoverflow.com/questions/46080", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "222" }
Q: Remote debugging an NT application from XP with Visual Studio 6.0 Is it possible to remote-debug a Visual C++ 6.0 application running on a Windows NT machine from a developer workstation running Windows XP? If so, is there a procedure written up somewhere? A: Take a look at this article. Also this may be helpful a...
{ "language": "en", "url": "https://stackoverflow.com/questions/46084", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: What are the names given to these 2 LINQ expressions I'm trying to find the correct names for these 2 "types" of coding expressions in LINQ so that I can refer to them correctly. I want to say that the first is called "Fluent Style"? var selectVar = arrayVar.Select( (a,i) => new { Line = a }); var selectVar = f...
{ "language": "en", "url": "https://stackoverflow.com/questions/46096", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Is there a list of browser conditionals for use including stylesheets? I've seen people doing things like this in their HTML: <!--[if IE]> <link rel="stylesheet" href="ie.css" type="text/css" /> <![endif]--> Does this work across all modern browsers and is there a list of browser types that will work with that ki...
{ "language": "en", "url": "https://stackoverflow.com/questions/46124", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Can XPath match on parts of an element's name? I want to do this: //*fu which returns all nodes whose name ends in fu, such as <tarfu /> and <snafu />, but not <fubar /> A: This answer is for XPath 1.0 where there is no equivalent of the XPath 2.0 standard ends-with() function. The following XPath 1.0 expressio...
{ "language": "en", "url": "https://stackoverflow.com/questions/46125", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "37" }
Q: How do I group in memory lists? I have a list of Foo. Foo has properties Bar and Lum. Some Foos have identical values for Bar. How can I use lambda/linq to group my Foos by Bar so I can iterate over each grouping's Lums? A: var q = from x in list group x by x.Bar into g select g; foreach (var group...
{ "language": "en", "url": "https://stackoverflow.com/questions/46130", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: File format for generating dynamic reports in applications We generate dynamic reports in all of our business web applications written for .Net and J2EE. On the server side we use ActiveReports.Net and JasperReports to generate the reports. We then export them to PDF to send down to the browser. Our clients all us...
{ "language": "en", "url": "https://stackoverflow.com/questions/46133", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What is the best approach to moving a preexisting project from Flash 7/AS2 to Flex/AS3? I have a large codebase that targetted Flash 7, with a lot of AS2 classes. I'm hoping that I'll be able to use Flex for any new projects, but a lot of new stuff in our roadmap is additions to the old code. The syntax for AS2 and...
{ "language": "en", "url": "https://stackoverflow.com/questions/46136", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: What are the Java regular expressions for matching IPv4 and IPv6 strings? Looking for a string to pass to String#matches(String) that will match IPv4, and another to match IPv6. A: Another good option for processing IPs is to use Java's classes Inet4Address and Inet6Address, which can be useful in a number of ways,...
{ "language": "en", "url": "https://stackoverflow.com/questions/46146", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Why are all links are red, in Chrome and Safari? Have just started using Google Chrome, and noticed in parts of our site, e.g. all the links on the page, are bright red. They should be black with a dotted underline. Is there some gotcha in WebKit rendering that turns all links red regardless of the style? A: Are al...
{ "language": "en", "url": "https://stackoverflow.com/questions/46147", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Best way to manage generated code in an automated build? In my automated NAnt build we have a step that generates a lot of code off of the database (using SubSonic) and the code is separated into folders that match the schema name in the database. For example: * */generated-code * */dbo * *SomeTable.cs *O...
{ "language": "en", "url": "https://stackoverflow.com/questions/46149", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How can I validate an email address in JavaScript? I'd like to check if the user input is an email address in JavaScript, before sending it to a server or attempting to send an email to it, to prevent the most basic mistyping. How could I achieve this? A: JavaScript can match a regular expression: emailAddress.matc...
{ "language": "en", "url": "https://stackoverflow.com/questions/46155", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5478" }
Q: What could cause Run-time error 1012 Error accessing application data directories Friend of mine has a problem :). There is an application written in Visual Basic 6.0 (not by him). One of users reported that when it run on Windows 2000 and tried to scan folders on disk it raised box with message: Run-time error 1012...
{ "language": "en", "url": "https://stackoverflow.com/questions/46156", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Getting an int representation of a String I am looking for a way to create an int\long representation of an arbitrary alpha-numeric String. Hash codes won't do it, because I can't afford hash collisions i.e. the representation must be unique and repeatable. The numeric representation will be used to perform efficie...
{ "language": "en", "url": "https://stackoverflow.com/questions/46160", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }