text
stringlengths
8
267k
meta
dict
Q: How should you go about learning ASP.NET after life as a ColdFusion developer? As someone who has spent around 10 years programming web applications with Adobe's ColdFusion, I have decided to add ASP.NET as a string to my bow. For someone who has spent so long with CF and the underlying Java, ASP.NET seems a little ...
{ "language": "en", "url": "https://stackoverflow.com/questions/57768", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do I "Add Existing Item" an entire directory structure in Visual Studio? I have a free standing set of files not affiliated with any C# project at all that reside in a complicated nested directory structure. I want to add them in that format to a different directory in an ASP.NET web application I am working on;...
{ "language": "en", "url": "https://stackoverflow.com/questions/57776", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "788" }
Q: Visual Studio 2008 / Web site problem I am using VS 2008 with SP1 and the IE 8 beta 2. Whenever I start a new Web site or when I double-click an ASPX in the solution explorer, VS insists on attempting to the display the ASPX page in a free-standing IE browser instance. The address is the local file path to the ASPX ...
{ "language": "en", "url": "https://stackoverflow.com/questions/57790", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Can I override onbeforeunload for a particular element? I have a page which does quite a bit of work and I don't want the user to be able to navigate away from that page (close browser, hit back button, etc.) without getting a warning. I found that the onbeforeunload event (which I think is IE-specific, which works ...
{ "language": "en", "url": "https://stackoverflow.com/questions/57791", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: What's the bare minimum permission set for Sql Server 2005 services? Best practices recommend not installing Sql Server to run as SYSTEM. What is the bare minumum you need to give the user account you create for it? A: By default, SQL Server 2005 installation will create a security group called SQLServer2005MSSQLU...
{ "language": "en", "url": "https://stackoverflow.com/questions/57800", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to convert decimal to hexadecimal in JavaScript How do you convert decimal values to their hexadecimal equivalent in JavaScript? A: If you want to convert a number to a hexadecimal representation of an RGBA color value, I've found this to be the most useful combination of several tips from here: function toHexS...
{ "language": "en", "url": "https://stackoverflow.com/questions/57803", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1862" }
Q: NHibernate.MappingException: No persister for: XYZ Now, before you say it: I did Google and my hbm.xml file is an Embedded Resource. Here is the code I am calling: ISession session = GetCurrentSession(); var returnObject = session.Get<T>(Id); Here is my mapping file for the class: <?xml version="1.0" encoding="ut...
{ "language": "en", "url": "https://stackoverflow.com/questions/57804", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "136" }
Q: Remove all classes that begin with a certain string I have a div with id="a" that may have any number of classes attached to it, from several groups. Each group has a specific prefix. In the javascript, I don't know which class from the group is on the div. I want to be able to clear all classes with a given prefix ...
{ "language": "en", "url": "https://stackoverflow.com/questions/57812", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "114" }
Q: Crash Instantiating System.Xml.Serialization.XmlSerializer in C# We're seeing a crash when instantiating an instance of the System.Xml.Serialization.XmlSerializer class in a C# library. The crash occurs in the constructor, when it tries to add a duplicate key to a dictionary. I've included a stack trace below. Thi...
{ "language": "en", "url": "https://stackoverflow.com/questions/57839", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to attach debugger to step into native (C++) code from a managed (C#) wrapper? I have a wrapper around a C++ function call which I call from C# code. How do I attach a debugger in Visual Studio to step into the native C++ code? This is the wrapper that I have which calls GetData() defined in a C++ file: [Dll...
{ "language": "en", "url": "https://stackoverflow.com/questions/57840", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: BackgroundWorker thread in ASP.NET Is it possible to use BackGroundWorker thread in ASP.NET 2.0 for the following scenario, so that the user at the browser's end does not have to wait for long time? Scenario * *The browser requests a page, say SendEmails.aspx *SendEmails.aspx page creates a BackgroundWorker thre...
{ "language": "en", "url": "https://stackoverflow.com/questions/57845", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: .NET ListView row padding There doesn't seem to be a way to change the padding (or row height) for all rows in a .NET ListView. Does anybody have an elegant hack-around? A: A workaround is to use an ImageList that is as tall as you want the items to be. Just fill a blank image with the background color. You can eve...
{ "language": "en", "url": "https://stackoverflow.com/questions/57849", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How can I close a browser window without receiving the "Do you want to close this window" prompt? How can I close a browser window without receiving the Do you want to close this window prompt? The prompt occurs when I use the window.close(); function. A: window.open('', '_self', ''); window.close(); This works fo...
{ "language": "en", "url": "https://stackoverflow.com/questions/57854", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "93" }
Q: Registry key that contains the folder for the local user's Programs folder on Vista I'm troubleshooting a problem with creating Vista shortcuts. I want to make sure that our Installer is reading the Programs folder from the right registry key. It's reading it from: HKEY_CURRENT_USER\Software\Microsoft\Windows\Curren...
{ "language": "en", "url": "https://stackoverflow.com/questions/57855", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Is there a standard ReSharper code style definition that matches all the StyleCop requirements? The ReSharper reformat code feature is very handy and flexible, particularly with the new code layout templating flexibility JetBrains have added in version 3.0. Is there a standard set of code style settings for ReSharpe...
{ "language": "en", "url": "https://stackoverflow.com/questions/57859", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: Is there a Windows Registry "dictionary" that explains the whole (or most of) the Windows Registry? I'd like to be able to see what registry keys are used for. A book on the registry would be fine as well. Info on Windows Vista changes would be great! A: The wikipedia article is actually rather nice. Not a full acc...
{ "language": "en", "url": "https://stackoverflow.com/questions/57867", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "21" }
Q: SQL/Oracle: when indexes on multiple columns can be used If I create an index on columns (A, B, C), in that order, my understanding is that the database will be able to use it even if I search only on (A), or (A and B), or (A and B and C), but not if I search only on (B), or (C), or (B and C). Is this correct? A: T...
{ "language": "en", "url": "https://stackoverflow.com/questions/57878", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: What is your experience with Sun CoolThreads technology? My project has some money to spend before the end of the fiscal year and we are considering replacing a Sun-Fire-V490 server we've had for a few years. One option we are looking at is the CoolThreads technology. All I know is the Sun marketing, which may not...
{ "language": "en", "url": "https://stackoverflow.com/questions/57902", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: When creating a new GUI, is WPF the preferred choice over Windows Forms? Most restrictions and tricks with windows forms are common to most programmers. But since .NET 3.0 there is also WPF available, the Windows Presentation Foundation. It is said that you can make "sexy applications" more easy with it and with .NE...
{ "language": "en", "url": "https://stackoverflow.com/questions/57909", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "47" }
Q: How do I increase the number of default rows per page? Grails scaffolding defaults to 10 rows per page. I would like to increase that number without generating the views and changing the 10 in every file. Where do I change the default? A: You have to install scaffold templates with: grails install-templates Now, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/57910", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Update schema and rows in one transaction, SQL Server 2005 I'm currently updating a legacy system which allows users to dictate part of the schema of one of its tables. Users can create and remove columns from the table through this interface. This legacy system is using ADO 2.8, and is using SQL Server 2005 as it...
{ "language": "en", "url": "https://stackoverflow.com/questions/57912", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What are some good examples of a WS-Eventing client in Java? There are a few web service frameworks available for Java: Axis2, CXF, JBossWS, and Metro. Does anyone have some good examples of a WS-Eventing client with these frameworks? A: Check out Apache Savan. It's was a publisher/subscriber implementation for Axi...
{ "language": "en", "url": "https://stackoverflow.com/questions/57915", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: When should you use full-text indexing? We have a whole bunch of queries that "search" for clients, customers, etc. You can search by first name, email, etc. We're using LIKE statements in the following manner: SELECT * FROM customer WHERE fname LIKE '%someName%' Does full-text indexing help in the scenario? We...
{ "language": "en", "url": "https://stackoverflow.com/questions/57918", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "53" }
Q: Best way to send an email from a .NET application? I'm working on a Windows Forms (.NET 3.5) application that has a built-in exception handler to catch any (heaven forbid) exceptions that may arise. I'd like the exception handler to be able to prompt the user to click a Send Error Report button, which would then cau...
{ "language": "en", "url": "https://stackoverflow.com/questions/57919", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: What exactly is "managed" code? I've been writing C / C++ code for almost twenty years, and I know Perl, Python, PHP, and some Java as well, and I'm teaching myself JavaScript. But I've never done any .NET, VB, or C# stuff. What exactly does managed code mean? Wikipedia describes it simply as Code that executes und...
{ "language": "en", "url": "https://stackoverflow.com/questions/57923", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "57" }
Q: Top ten ordering in Excel based on complex team rules I have an excel spreadsheet in a format similar to the following... | NAME | CLUB | STATUS | SCORE | | Fred | a | Gent | 145 | | Bert | a | Gent | 150 | | Harry | a | Gent | 195 | | Jim | a | Gent | 150 | | Clare | a | Lady |...
{ "language": "en", "url": "https://stackoverflow.com/questions/57927", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Understanding .Net Configuration Options I'm really confused by the various configuration options for .Net configuration of dll's, ASP.net websites etc in .Net v2 - especially when considering the impact of a config file at the UI / end-user end of the chain. So, for example, some of the applications I work with use...
{ "language": "en", "url": "https://stackoverflow.com/questions/57947", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: When to use HtmlControls vs WebControls I like HtmlControls because there is no HTML magic going on... the asp source looks similar to what the client sees. I can't argue with the utility of GridView, Repeater, CheckBoxLists, etc, so I use them when I need that functionality. Also, it looks weird to have code that...
{ "language": "en", "url": "https://stackoverflow.com/questions/57958", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Writing into excel file with OLEDB Does anyone know how to write to an excel file (.xls) via OLEDB in C#? I'm doing the following: OleDbCommand dbCmd = new OleDbCommand("CREATE TABLE [test$] (...)", connection); dbCmd.CommandTimeout = mTimeout; results = dbCmd.ExecuteNonQuery(); But I get an OleDbExceptio...
{ "language": "en", "url": "https://stackoverflow.com/questions/57987", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: What is the overhead cost associated with IoC containers like StructureMap? After attending a recent Alt.NET group on IoC, I got to thinking about the tools available and how they might work. StructureMap in particular uses both attributes and bootstrapper concepts to map requests for IThing to ConcreteThing. Attr...
{ "language": "en", "url": "https://stackoverflow.com/questions/57990", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: What is the difference between dllexport and dllimport? I'm just looking for a simple, concise explanation of the difference between these two. MSDN doesn't go into a hell of a lot of detail here. A: __declspec( dllexport ) - The class or function so tagged will be exported from the DLL it is built in. If you're bu...
{ "language": "en", "url": "https://stackoverflow.com/questions/57999", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "67" }
Q: Building Flex projects in ant/nant We have a recurring problem at my company with build breaks in our Flex projects. The problem primarily occurs because the build that the developers do on their local machines is fundamentally different from the build that occurs on the build machine. The devs are building the proj...
{ "language": "en", "url": "https://stackoverflow.com/questions/58000", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Open a URL from Windows Forms I'm trying to provide a link to my company's website from a Windows Form. I want to be well behaved and launch using the user's preferred browser. What is the best way to open a URL in the user's default browser from a Windows Forms application? A: I like approach described here. It t...
{ "language": "en", "url": "https://stackoverflow.com/questions/58024", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "84" }
Q: How to embed command shell in Visual Studio I would like to be able to embed a command line interpreter inside a dockable window in Visual Studio. Is there any nice way to do this? A: See the VS Command shell project A: Checkout Open Command Line by Mads Kristensen. note it doesn't really "embed" the shell in VS, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/58027", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Loading different versions of the same assembly Using reflection, I need to load 2 different versions of the same assembly. Can I load the 2 versions in 2 different AppDomains in the same process? I need to do some data migration from the old version of the app to the new version. Please let me know if this is pos...
{ "language": "en", "url": "https://stackoverflow.com/questions/58035", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "24" }
Q: How did my process exit? From C# on a Windows box, is there a way to find out how a process was stopped? I've had a look at the Process class, managed to get a nice friendly callback from the Exited event once I set EnableRaisingEvents = true; but I have not managed to find out whether the process was killed or whe...
{ "language": "en", "url": "https://stackoverflow.com/questions/58036", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How can I replace newline characters using JSP and JSTL? I have a list of bean objects passed into my JSP page, and one of them is a comment field. This field may contain newlines, and I want to replace them with semicolons using JSTL, so that the field can be displayed in a text input. I have found one solution, bu...
{ "language": "en", "url": "https://stackoverflow.com/questions/58054", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "45" }
Q: Using C++ classes in .so libraries I'm trying to write a small class library for a C++ course. I was wondering if it was possible to define a set of classes in my shared object and then using them directly in my main program that demos the library. Are there any tricks involved? I remember reading this long ago (bef...
{ "language": "en", "url": "https://stackoverflow.com/questions/58058", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: How to use getaddrinfo_a to do async resolve with glibc An often overlooked function that requires no external library, but basically has no documentation whatsoever. A: UPDATE (2010-10-11): The linux man-pages now have documentation of the getaddrinfo_a, you can find it here: http://www.kernel.org/doc/man-pages/...
{ "language": "en", "url": "https://stackoverflow.com/questions/58069", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: OOP class design, Is this design inherently 'anti' OOP? I remember back when MS released a forum sample application, the design of the application was like this: /Classes/User.cs /Classes/Post.cs ... /Users.cs /Posts.cs So the classes folder had just the class i.e. properties and getters/setters. The Users.cs, Post....
{ "language": "en", "url": "https://stackoverflow.com/questions/58070", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Does re.compile() or any given Python library call throw an exception? I can't tell from the Python documentation whether the re.compile(x) function may throw an exception (assuming you pass in a string). I imagine there is something that could be considered an invalid regular expression. The larger question is, whe...
{ "language": "en", "url": "https://stackoverflow.com/questions/58119", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: Get current System.Web.UI.Page from HttpContext? This is actually a two part question. First,does the HttpContext.Current correspond to the current System.UI.Page object? And the second question, which is probably related to the first, is why can't I use the following to see if the current page implements an interfa...
{ "language": "en", "url": "https://stackoverflow.com/questions/58123", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "85" }
Q: Why is it considered bad practice to use cursors in SQL Server? I knew of some performance reasons back in the SQL 7 days, but do the same issues still exist in SQL Server 2005? If I have a resultset in a stored procedure that I want to act upon individually, are cursors still a bad choice? If so, why? A: SQL is a ...
{ "language": "en", "url": "https://stackoverflow.com/questions/58141", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "65" }
Q: Hierarchical Data In ASP.NET MVC I am trying to come up with the best way to render some hierarchical data in to a nested unordered list using ASP.NET MVC. Does anyone have any tips on how to do this? A: You mean... you want some sort of tree view? You can actually get the treeview control to work... but you have t...
{ "language": "en", "url": "https://stackoverflow.com/questions/58146", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: When can/should you go whole hog with the ORM approach? It seems to me that introducing an ORM tool is supposed to make your architecture cleaner, but for efficiency I've found myself bypassing it and iterating over a JDBC Result Set on occasion. This leads to an uncoordinated tangle of artifacts instead of a clean...
{ "language": "en", "url": "https://stackoverflow.com/questions/58163", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Does anyone know where to find free database design templates? I'm obviously not talking about a full solution, but just a good starting point for common applications for software architects. It could be for a CMS, e-commerce storefront, address book, etc. A UML diagram is not essential, but a table schema with data...
{ "language": "en", "url": "https://stackoverflow.com/questions/58174", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Something special about Safari for Windows and AJAX? Is there something special about Safari for Windows and AJAX? In other words: Are there some common pitfalls I should keep in mind? A: Safari is really standards compliant. Unless you're using some really esoteric browser features, in general if something works ...
{ "language": "en", "url": "https://stackoverflow.com/questions/58184", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-4" }
Q: Are CLR stored procedures preferred over TSQL stored procedures in SQL 2005+? My current view is no, prefer Transact SQL stored procedures because they are a lighter weight and (possibly) higher performing option, while CLR procedures allow developers to get up to all sorts of mischief. However recently I have neede...
{ "language": "en", "url": "https://stackoverflow.com/questions/58190", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: Using the result of a command as an argument in bash? To create a playlist for all of the music in a folder, I am using the following command in bash: ls > list.txt I would like to use the result of the pwd command for the name of the playlist. Something like: ls > ${pwd}.txt That doesn't work though - can anyone ...
{ "language": "en", "url": "https://stackoverflow.com/questions/58207", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "74" }
Q: Rendering graphics in C# Is there another way to render graphics in C# beyond GDI+ and XNA? (For the development of a tile map editor.) A: Yes, I have written a Windows Forms control that wraps DirectX 9.0 and provides direct pixel level manipulation of the video surface. I actually wrote another post on Stack Ove...
{ "language": "en", "url": "https://stackoverflow.com/questions/58230", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Showing a tooltip for a MenuItem I've got a menu that contains, among other things, some most-recently-used file paths. The paths to these files can be long, so the text sometimes gets clipped like "C:\Progra...\foo.txt" I'd like to pop a tooltip with the full path when the user hovers over the item, but this doesn...
{ "language": "en", "url": "https://stackoverflow.com/questions/58245", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: Compiling code on an external drive To make things easier when switching between machines (my workstation at the office and my personal laptop) I have thought about trying an external hard drive to store my working directory on. Specifically I am looking at Firewire 800 drives (most are 5400 rpm 8mb cache). What I...
{ "language": "en", "url": "https://stackoverflow.com/questions/58247", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: UnhandledException handler in a .Net Windows Service Is it possible to use an UnhandledException Handler in a Windows Service? Normally I would use a custom built Exception Handling Component that does logging, phone home, etc. This component adds a handler to System.AppDomain.CurrentDomain.UnhandledException but as...
{ "language": "en", "url": "https://stackoverflow.com/questions/58280", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "26" }
Q: Excel like server side control for ASP.NET We have a requirement to increase the functionality of a grid we are using to edit on our webapp, and our manager keeps citing Excel as the perfect example for a data grid :/ He still doesn't really get that a Spreadsheet like control doesn't exist out of the box, but I tho...
{ "language": "en", "url": "https://stackoverflow.com/questions/58289", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do I get the external IP of a socket in Python? When I call socket.getsockname() on a socket object, it returns a tuple of my machine's internal IP and the port. However, I would like to retrieve my external IP. What's the cheapest, most efficient manner of doing this? A: This isn't possible without cooperation...
{ "language": "en", "url": "https://stackoverflow.com/questions/58294", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Tools for manipulating PowerPoint files Do you know managed tools for manipulating PowerPoint files? The tool should be 100% managed code and offer the option to handle .ppt and .pptx files. A: Well, 100% managed could be going the hard route, however, you can use the Office PIAs from your .NET code. Joel Spolsky h...
{ "language": "en", "url": "https://stackoverflow.com/questions/58300", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Is there a way to take a screenshot using Java and save it to some sort of image? Simple as the title states: Can you use only Java commands to take a screenshot and save it? Or, do I need to use an OS specific program to take the screenshot and then grab it off the clipboard? A: import java.awt.Color; import java...
{ "language": "en", "url": "https://stackoverflow.com/questions/58305", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "135" }
Q: Graph Algorithm To Find All Connections Between Two Arbitrary Vertices I am trying to determine the best time efficient algorithm to accomplish the task described below. I have a set of records. For this set of records I have connection data which indicates how pairs of records from this set connect to one another. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/58306", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "121" }
Q: CSS / JavaScript Navigation Menu on top of Flash in Firefox My site has a drop-down menu built in CSS and JavaScript that drops down over a Flash animation. In IE (6&7) the drop-down menus drop over the Flash animation, however, in Firefox (2&3) the menus appear underneath the Flash animation. Is there any way to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/58317", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How to test a WPF user interface? Using win forms with an MVC/MVP architecture, I would normally use a class to wrap a view to test the UI while using mocks for the model and controller/presenter. The wrapper class would make most everything in the UI an observable property for the test runner through properties an...
{ "language": "en", "url": "https://stackoverflow.com/questions/58340", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "66" }
Q: Recent Projects panel on VS2008 not working for fresh installs The Recent Projects panel on the Start Page of VS2008 Professional doesn't appear to work, and constantly remains empty. I've noticed this on 3 of our developers VS2008 installations, in fact all the installations that weren't updated from 2005 but insta...
{ "language": "en", "url": "https://stackoverflow.com/questions/58353", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Algorithm/Data Structure Design Interview Questions What are some simple algorithm or data structure related "white boarding" problems that you find effective during the candidate screening process? I have some simple ones that I use to validate problem solving skills and that can be simply expressed but have some o...
{ "language": "en", "url": "https://stackoverflow.com/questions/58354", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "54" }
Q: Avoiding first chance exception messages when the exception is safely handled The following bit of code catches the EOS Exception using (var reader = new BinaryReader(httpRequestBodyStream)) { try { while (true) { bodyByteList.Add(reader.ReadByte()); } } catch (EndOfStreamExcepti...
{ "language": "en", "url": "https://stackoverflow.com/questions/58380", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "77" }
Q: Saving an open generic type in an array? I am facing a problem with .NET generics. The thing I want to do is saving an array of generics types (GraphicsItem): public class GraphicsItem<T> { private T _item; public void Load(T item) { _item = item; } } How can I save such open generic type i...
{ "language": "en", "url": "https://stackoverflow.com/questions/58384", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Mac font rendering on Windows I love the way Mac OS beautifully renders fonts (not just browsers). I was wondering if we could somehow get the same rendering in browsers running on Windows? Someone recommended sIFR but I guess that's useful when I need to use non-standard fonts? A: Check out GDI++/FreeType (link, l...
{ "language": "en", "url": "https://stackoverflow.com/questions/58399", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: WPF Application fails on startup with TypeInitializationException I have a simple WPF application which I am trying to start. I am following the Microsoft Patterns and Practices "Composite Application Guidance for WPF". I've followed their instructions however my WPF application fails immediately with a "TypeIniti...
{ "language": "en", "url": "https://stackoverflow.com/questions/58425", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "23" }
Q: SQL set-based range How can I have SQL repeat some set-based operation an arbitrary number of times without looping? How can I have SQL perform an operation against a range of numbers? I'm basically looking for a way to do a set-based for loop. I know I can just create a small table with integers in it, say from 1 t...
{ "language": "en", "url": "https://stackoverflow.com/questions/58429", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Algorithm for joining e.g. an array of strings I have wondered for some time, what a nice, clean solution for joining an array of strings might look like. Example: I have ["Alpha", "Beta", "Gamma"] and want to join the strings into one, separated by commas – "Alpha, Beta, Gamma". Now I know that most programming lan...
{ "language": "en", "url": "https://stackoverflow.com/questions/58431", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: Random Weighted Choice in T-SQL How do you randomly select a table row in T-SQL based on an applied weight for all candidate rows? For example, I have a set of rows in a table weighted at 50, 25, and 25 (which adds up to 100 but does not need to), and I want to select one of them randomly with a statistical outcome ...
{ "language": "en", "url": "https://stackoverflow.com/questions/58457", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "26" }
Q: What is the preferred operating system for web programmers, client or server? Which OS do you prefer to program on? Client or Server There is a school of though that if you are doing (mostly) web programming (or other server based code), you should use a server OS for your dev machine, since that's closer to the env...
{ "language": "en", "url": "https://stackoverflow.com/questions/58463", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I send mail from a Ruby program? I want to send email from a Ruby application. Is there a call in the core language to do this or is there a library I should use? What's the best way to do this? A: If you don't want to use ActionMailer you can use Net::SMTP (for the actual sending) together with tmail for ea...
{ "language": "en", "url": "https://stackoverflow.com/questions/58478", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Access variables programmatically by name in Ruby I'm not entirely sure if this is possible in Ruby, but hopefully there's an easy way to do this. I want to declare a variable and later find out the name of the variable. That is, for this simple snippet: foo = ["goo", "baz"] How can I get the name of the array (her...
{ "language": "en", "url": "https://stackoverflow.com/questions/58482", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "24" }
Q: Getting Good Google PageRank In SEO people talk a lot about Google PageRank. It's kind of a catch 22 because until your site is actually big and you don't really need search engines as much, it's unlikely that big sites will link to you and increase your PageRank! I've been told that it's easiest to simply get a cou...
{ "language": "en", "url": "https://stackoverflow.com/questions/58484", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Algorithm to find a common multiplier to convert decimal numbers to whole numbers I have an array of numbers that potentially have up to 8 decimal places and I need to find the smallest common number I can multiply them by so that they are all whole numbers. I need this so all the original numbers can all be multipl...
{ "language": "en", "url": "https://stackoverflow.com/questions/58493", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Using .NET, how can you find the mime type of a file based on the file signature not the extension I am looking for a simple way to get a mime type where the file extension is incorrect or not given, something similar to this question only in .Net. A: In Urlmon.dll, there's a function called FindMimeFromData. From ...
{ "language": "en", "url": "https://stackoverflow.com/questions/58510", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "264" }
Q: Unit testing ASP.NET MVC redirection How do I Unit Test a MVC redirection? public ActionResult Create(Product product) { _productTask.Save(product); return RedirectToAction("Success"); } public ActionResult Success() { return View(); } Is Ayende's approach still the best way to go, with preview 5:...
{ "language": "en", "url": "https://stackoverflow.com/questions/58513", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: Combining Enums Is there a way to combine Enums in VB.net? A: I believe what you want is a flag type enum. You need to add the Flags attribute to the top of the enum, and then you can combine enums with the 'Or' keyword. Like this: <Flags()> _ Enum CombinationEnums As Integer HasButton = 1 TitleBar = 2 [ReadO...
{ "language": "en", "url": "https://stackoverflow.com/questions/58517", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "30" }
Q: Version control of deliverables We need to regularly synchronize many dozens of binary files (project executables and DLLs) between many developers at several different locations, so that every developer has an up to date environment to build and test at. Due to nature of the project, updates must be done often and ...
{ "language": "en", "url": "https://stackoverflow.com/questions/58520", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How do you create an event log source using WiX I'm creating an installer for a website that uses a custom event log source. I would like our WiX based installer to create that event log source during installation. Does anyone know the best way to do this using the WiX framework. A: Wix has out-of-the-box support f...
{ "language": "en", "url": "https://stackoverflow.com/questions/58538", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "62" }
Q: How to resolve SQL query parameters mapping issues while using Oracle OLE DB provider? When trying to enter a SQL query with parameters using the Oracle OLE DB provider I get the following error: Parameters cannot be extracted from the SQL command. The provider might not help to parse parameter information from the...
{ "language": "en", "url": "https://stackoverflow.com/questions/58540", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: - How to show the whole height of referenced page? I have an application that I would like to embed inside our companies CMS. The only way to do that (I am told), is to load it in an <iframe>. Easy: just set height and width to 100%! Except, it doesn't work. I did find out about setting frameborder to 0, so it at l...
{ "language": "en", "url": "https://stackoverflow.com/questions/58543", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Painless resource management in java In C++ we acquiring a resource in a constructor and release it in a destructor. So when an exception rises in a middle of a function there will be no resource leak or locked mutexes or whatever. AFAIK java classes don't have destructors. So how does one do the resource management...
{ "language": "en", "url": "https://stackoverflow.com/questions/58547", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How do I configure Firebug to use Eclipse/Netbeans as editor I want to use a real IDE for editing javascript files in combination with Firebug. In the 'Add editor' dialog for Firebug I'm allowed to specify executable and arguments. So the question is really how do I open a file in Eclipse/Netbeans from the command l...
{ "language": "en", "url": "https://stackoverflow.com/questions/58551", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How to tweak Eclipse's C++ Indexer? I'm using Eclipse as my IDE for a C++ project, and I would love for it to tell me where a given symbol is defined and what the parameters are for a function. However, there's a catch: I also use Lazy C++, a tool that takes a single source file and generates the .h and the .cpp fil...
{ "language": "en", "url": "https://stackoverflow.com/questions/58554", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do I remotely get a checksum for a file on a Windows machine? I'm trying to check, using an automated discovery tool, when JAR files in remote J2EE application servers have changed content. Currently, the system downloads the whole JAR using WMI to checksum it locally, which is slow for large JARs. For UNIXy ser...
{ "language": "en", "url": "https://stackoverflow.com/questions/58558", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to use hibernate criteria to return only one element of an object instead the entire object? I'm trying to get only the list of id of object bob for example instead of the list of bob. It's ok with a HQL request, but I would know if it's possible using criteria ? An example : final StringBuilder hql = new String...
{ "language": "en", "url": "https://stackoverflow.com/questions/58561", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "37" }
Q: core dump files on Linux: how to get info on opened files? I have a core dump file from a process that has probably a file descriptor leak (it opens files and sockets but apparently sometimes forgets to close some of them). Is there a way to find out which files and sockets the process had opened before crashing? I ...
{ "language": "en", "url": "https://stackoverflow.com/questions/58564", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "34" }
Q: In Vim, what is the best way to select, delete, or comment out large portions of multi-screen text? Selecting a large amount of text that extends over many screens in an IDE like Eclipse is fairly easy since you can use the mouse, but what is the best way to e.g. select and delete multiscreen blocks of text or write...
{ "language": "en", "url": "https://stackoverflow.com/questions/58584", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "25" }
Q: Measuring stack usage for Linux multi-threaded app I'm developing a multi-threaded app for a Linux embedded platform. At the moment I'm setting the stack size for each thread (via pthread_set_attr) to a fairly large default value. I would like to fine tune that value for each thread to something smaller to reduce my...
{ "language": "en", "url": "https://stackoverflow.com/questions/58614", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Delphi Network programming I have a classic client/server (fat client and database) program written in Delphi 2006. When certain conditions are met in the client, I need to notify all the other clients very quickly. Up until now this has been done using UDP broadcasts, but this is no longer viable as clients now con...
{ "language": "en", "url": "https://stackoverflow.com/questions/58618", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Default button size? How do I create a button control (with CreateWindow of a BUTTON window class) that has a standard system-wide size (especially height) that's consistent with the rest of Windows applications? I should of course take DPI into account and probably other settings. Remark: Using USE_CW_DEFAULT for ...
{ "language": "en", "url": "https://stackoverflow.com/questions/58620", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: How do I hash a string with Delphi? How do I make an MD5 hash of a string with Delphi? A: This is a modification of devstopfix's answer which was accepted. In current Indy version you can hash strings and streams more easily. Example: function MD5String(str: String): String; begin with TIdHashMessageDigest5.Creat...
{ "language": "en", "url": "https://stackoverflow.com/questions/58621", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "26" }
Q: How to document Python code using Doxygen I like Doxygen to create documentation of C or PHP code. I have an upcoming Python project and I think I remember that Python doesn't have /* .. */ comments, and also has its own self-documentation facility which seems to be the pythonic way to document. Since I'm familiar w...
{ "language": "en", "url": "https://stackoverflow.com/questions/58622", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "103" }
Q: "Quoted-printable line longer than 76 chars" warning when sending HTML E-Mail I have written some code in my VB.NET application to send an HTML e-mail (in this case, a lost password reminder). When I test the e-mail, it gets eaten by my spam filter. One of the things that it's scoring badly on is because of the fol...
{ "language": "en", "url": "https://stackoverflow.com/questions/58630", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How do I keep RecipientTime when executing MailItem.Move in an Outlook macro? In an Outlook 2003 macro; Is there a way to move a message between folders without changing the ReceivedTime-header? I currently use the method MailItem.Move. But that automatically sets the ReceivedTime property to the current time, which...
{ "language": "en", "url": "https://stackoverflow.com/questions/58633", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I convert a set of polygons into a bitmap How do I take a set of polygons which contain arbitrary values and create a corresponding bitmap where each pixel contains the value of the polygon at that location? To put the question into context, my polygons contain information about the average number of people p...
{ "language": "en", "url": "https://stackoverflow.com/questions/58638", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to get the EXIF data from a file using C# I would like to write a small program in C# which goes through my jpeg photos and, for example, sorts them into dated folders (using MY dating conventions, dammit...). Does anyone know a relatively easy way to get at the EXIF data such as Date And Time or Exposure progr...
{ "language": "en", "url": "https://stackoverflow.com/questions/58649", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "81" }
Q: Windows CDROM Eject Does anyone know a method to programmatically close the CD tray on Windows 2000 or higher? Open CD tray exists, but I can't seem to make it close especially under W2k. I am especially looking for a method to do this from a batch file, if possible, but API calls would be OK. A: Here is an easy w...
{ "language": "en", "url": "https://stackoverflow.com/questions/58670", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Example of modern text editor architecutre I'm looking for design\architectual guidance for modern text editors. Modern text editor means that: * *It has support for syntax highlighting *It has auto-completion (something like IntelliSense) *It has advanced navigation capabilities (incremental search, etc.) ...
{ "language": "en", "url": "https://stackoverflow.com/questions/58671", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Visual Studio 2008 complains about trusted locations. What to do? I was messing around with RhinoMocks this morning and couldn't run my tests because RhinoMocks.dll was not in a "trusted location". The assembly is in my c:\documents and settings\\My Documents\Visual Studio 2008\Projects (and so on) folder. What's th...
{ "language": "en", "url": "https://stackoverflow.com/questions/58679", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }