text
stringlengths
8
267k
meta
dict
Q: Is there a way to reference an existing CSS style from another CSS style using CSS or javascript? If I have a style defined .style1 { width: 140px; } can I reference it from a second style? .style2 { ref: .style1; } Or is there a way via javascript/jQuery? --- Edit To clarify the problem, I am trying to appl...
{ "language": "en", "url": "https://stackoverflow.com/questions/181254", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: Linq to SQL Class Regeneration I've been using this nifty LINQ to SQL tool for a data access layer in an asp.net project. I keep making changes to the underlying tables and in order for the data classes to recognize the change I have to delete and readd the table which has changed. Is there some shortcut to regene...
{ "language": "en", "url": "https://stackoverflow.com/questions/181258", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: How can I add an additional "view" to my iphone app? I have a simple iphone app that's based on the CrashLanding sample app. So basically you tap the title screen and do some stuff... all on the same "view". I want to add an "options" screen/page/view whatever with a few UISwitches. What's the easiest way to do t...
{ "language": "en", "url": "https://stackoverflow.com/questions/181268", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What does "select count(1) from table_name" on any database tables mean? When we execute select count(*) from table_name it returns the number of rows. What does count(1) do? What does 1 signify here? Is this the same as count(*) (as it gives the same result on execution)? A: This is similar to the difference betwe...
{ "language": "en", "url": "https://stackoverflow.com/questions/181272", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "118" }
Q: How does TCP/IP report errors? How does TCP/IP report errors when packet delivery fails permanently? All Socket.write() APIs I've seen simply pass bytes to the underlying TCP/IP output buffer and transfer the data asynchronously. How then is TCP/IP supposed to notify the developer if packet delivery fails permanentl...
{ "language": "en", "url": "https://stackoverflow.com/questions/181279", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Functional programming and multicore architecture I've read somewhere that functional programming is suitable to take advantage of multi-core trend in computing. I didn't really get the idea. Is it related to the lambda calculus and von neumann architecture? A: When there are no side effects the order of evaluation...
{ "language": "en", "url": "https://stackoverflow.com/questions/181284", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: Does using global create any overhead? Is it a problem if you use the global keyword on variables you don't end up using? Compare: function foo() { global $fu; global $bah; if (something()) { $fu->doSomething(); } else { $bah->doSomething(); } } function bar() { if (something...
{ "language": "en", "url": "https://stackoverflow.com/questions/181285", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to make resource dll to describe device fonts? The target driver I'm building is not a native driver but a minidriver working with Microsoft Universal Pinter Driver According to DDK: Descriptions of these items [fonts in my case] are placed in a resource DLL, as described in the Platform SDK documentation. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/181306", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How to override global stylesheet In a nutshell, there's a global stylesheet: a { font-family: Arial; } I want to use a different font family for a particular link: <a href="..." style="font-family: Helvetica;">...</a> or <span style="font-family: Helvetica;"><a href="...">...</a></span> but nothing works. Is the...
{ "language": "en", "url": "https://stackoverflow.com/questions/181309", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do I find the DHCP assigned IP address via bash on Fedora? Is there a command within the bash shell of fedora that will give me the currently assigned IP address? A: ifconfig is what you're looking for A: Try the following command: ipconfig getifaddr eth0
{ "language": "en", "url": "https://stackoverflow.com/questions/181313", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Best practices for catching exceptions from SQL in C# What are some good ways to catch business logic exceptions or return values from SQL in C#? For instance, upon creating a new user, if the user already exists, the system and the user must be notified. I have used the raise_error() method with a particular stat...
{ "language": "en", "url": "https://stackoverflow.com/questions/181316", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Tab index not working properly I have some controls in the tablelayoutpanel but the tab index for the control are not working properly. A: I don't know what your specific issue is because the question is a bit vague, but be aware that container controls have seperate tab indexes than child controls. So if you have ...
{ "language": "en", "url": "https://stackoverflow.com/questions/181319", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What is the default URL for APEX for an Oracle XE installation? I've installed Oracle XE with APEX, but forgot to write down the URL to access it. How may I determine the URL? A: For future reference, to get to the Apex Administration Services: http://127.0.0.1:8080/apex/apex_admin A: The default is http://127.0....
{ "language": "en", "url": "https://stackoverflow.com/questions/181321", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Tunnel over HTTPS At my workplace, the traffic blocker/firewall has been getting progressively worse. I can't connect to my home machine on port 22, and lack of ssh access makes me sad. I was previously able to use SSH by moving it to port 5050, but I think some recent filters now treat this traffic as IM and redi...
{ "language": "en", "url": "https://stackoverflow.com/questions/181341", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "27" }
Q: Automated MSI installation What is the best way to automatically install an MSI file or installer .exe? We want to do some automated testing from our build system on the installed copy of the product. Our installer has the usual license acceptance screen, install location, etc. As FryHard pointed out there are two ...
{ "language": "en", "url": "https://stackoverflow.com/questions/181342", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: Quick and dirty way to compare SQL server performance Further to my previous question about the Optimal RAID setup for SQL server, could anyone suggest a quick and dirty way of benchmarking the database performance on the new and old servers to compare them? Obviously, the proper way would be to monitor our actual u...
{ "language": "en", "url": "https://stackoverflow.com/questions/181343", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: ORA-01438: value larger than specified precision allows for this column We get sometimes the following error from our partner's database: <i>ORA-01438: value larger than specified precision allows for this column</i> The full response looks like the following: <?xml version="1.0" encoding="windows-1251"?> <response...
{ "language": "en", "url": "https://stackoverflow.com/questions/181344", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: Instantiating a JavaScript object by calling prototype.constructor.apply Let me start with a specific example of what I'm trying to do. I have an array of year, month, day, hour, minute, second and millisecond components in the form [ 2008, 10, 8, 00, 16, 34, 254 ]. I'd like to instantiate a Date object using the fo...
{ "language": "en", "url": "https://stackoverflow.com/questions/181348", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "54" }
Q: How do I use the Rails helper link_to RESTfully in this situation? I basically want to use link_to to link to the index method of a controller. I tried: <%= link_to 'Recipes', Recipe %> but that outputs: <a href="/recipes/Recipe">Recipes</a> Which is clearly not right, if it left off that last bit it would do ex...
{ "language": "en", "url": "https://stackoverflow.com/questions/181353", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: obtain command line arguments in unit test In a Test project in Visual Studio 2008 (Pro), I created a Test project, and I want to configure the project properties to give a command line argument to the tests. I set the properties, but then realized I have no idea how to actually use the argument. How do you get t...
{ "language": "en", "url": "https://stackoverflow.com/questions/181354", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Regex to match alphanumeric and spaces What am I doing wrong here? string q = "john s!"; string clean = Regex.Replace(q, @"([^a-zA-Z0-9]|^\s)", string.Empty); // clean == "johns". I want "john s"; A: just a FYI string clean = Regex.Replace(q, @"[^a-zA-Z0-9\s]", string.Empty); would actually be better like string ...
{ "language": "en", "url": "https://stackoverflow.com/questions/181356", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "54" }
Q: Convert SQL Server Database from 2005 to 2000 We have a Microsoft SQL Server 2005 database that needs to be converted back to SQL Server 2000. Does anybody have any suggestions on the approach or tools I should use to perform this conversion? We don't utilise any SQL Server 2005 specific features in the database so ...
{ "language": "en", "url": "https://stackoverflow.com/questions/181363", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: visual c# form update results in flickering I have a .net app that I've written in c#. On some forms I frequent update the display fields. In some cases every field on the form (textboxes, labels, picturebox, etc) has its value changed. Plus the frequency of the changes could possibly be every second. However, curre...
{ "language": "en", "url": "https://stackoverflow.com/questions/181374", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Update a list element with Lotus Formula I am trying to update an element in a list with Lotus Formula. I thought you would do it like this: x := "0":"0":"0"; x[1] := "1"; But when I try to save I get the following error: := must be immediately preceded by a field or variable name A: From the Lotus Domino Designe...
{ "language": "en", "url": "https://stackoverflow.com/questions/181377", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Delphi Project Needing runtime Packages, even with runtime Packages off My Delphi7 project will not run on my clients computer if i don't have a few of the runtime packages in the path. eg rtl70.bpl I have Build with runtime packages unticked, so shouldn't they be complied into the exe? Edit: the Project uses Jedi P...
{ "language": "en", "url": "https://stackoverflow.com/questions/181380", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Refactoring from ActiveRecord to DataMapper Have you refactored from an ActiveRecord to a DataMapper pattern? What conditions prompted the switch? I'm primarily interested in web based applications, but would like to know the challenges that accompany such a move in any environment. A: I really do like the ActiveRe...
{ "language": "en", "url": "https://stackoverflow.com/questions/181388", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Configuring Tomcat 6 to support Russian cp1251 encoding I am migrating a struts application from Websphere to Tomcat 6 and my application has support for Russian language. In Websphere we use to pass the JVM param -Dclinet.encoding.override=cp1251 but when I tried this with tomcat by passing the JVM argument -DFile....
{ "language": "en", "url": "https://stackoverflow.com/questions/181398", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Ruby Memory Management I have been using Ruby for a while now and I find, for bigger projects, it can take up a fair amount of memory. What are some best practices for reducing memory usage in Ruby? * *Please, let each answer have one "best practice" and let the community vote it up. A: Beware of C extensions ...
{ "language": "en", "url": "https://stackoverflow.com/questions/181406", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "24" }
Q: Best Way to Write Bytes in the Middle of a File in Java What is the best way to write bytes in the middle of a file using Java? A: Use RandomAccessFile * *Tutorial *Javadocs A: Reading and Writing in the middle of a file is as simple as using a RandomAccessFile in Java. RandomAccessFile, despite its name, is ...
{ "language": "en", "url": "https://stackoverflow.com/questions/181408", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: How to handle a ctrl-break signal in a command line interface Before I begin, I want to clarify that this is not a command-line tool, but an application that accepts commands through it's own command-line interface. Edit: I must apologize about my explanation from before, apparently I didn't do a very good job at ex...
{ "language": "en", "url": "https://stackoverflow.com/questions/181413", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How do I add a Line break in a SQL Server Stored Procedure? I'm making a Stored Procedure that basically concatenates a long string with data from many records. I want to do: set @output = @output + 'aaa' + LINEBREAK How do I specify that line break? A: DECLARE @LINEBREAK AS varchar(2) SET @LINEBREAK = CHAR(13) + ...
{ "language": "en", "url": "https://stackoverflow.com/questions/181426", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: C# event handling (compared to Java) I am currently having a hardtime understanding and implementing events in C# using delagates. I am used to the Java way of doing things: * *Define an interface for a listener type which would contain a number of method definitions *Define adapter class for that interface to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/181427", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: How to create the "indexes" required for NSIndexPath:indexPathWithIndexes:length: The class method to create an index path with one or more nodes is: + (id)indexPathWithIndexes:(NSUInteger *)indexes length:(NSUInteger)length How do we create the "indexes" required in the first parameter? The documentation listed i...
{ "language": "en", "url": "https://stackoverflow.com/questions/181432", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "42" }
Q: Can any of the iPhone collection objects hold an image? Actually, I wanted a custom cell which contains 2 image objects and 1 text object, and I decided to make a container for those objects. So is it possible to hold a image in object and insert that object in any of the collection objects, and later use that obje...
{ "language": "en", "url": "https://stackoverflow.com/questions/181442", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: I'm getting a NULL output in a SQL Function when concatting fields I have the following function: CREATE FUNCTION fGetTransactionStatusLog ( @TransactionID int ) RETURNS varchar(8000) AS BEGIN declare StatusChanges cursor for select NewStatusID, FirstName + ' ' + LastName AS UserName, Stamp, CAST(Notes...
{ "language": "en", "url": "https://stackoverflow.com/questions/181447", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Good Examples of .NET Desktop Applications I would like to evaluate .NET as a development platform for a desktop application. I am looking for good examples of .NET desktop applications used in the mainstream. The only ones I know of are: * *Visual Studio (The copy website form is one example.) *Team Explorer UI...
{ "language": "en", "url": "https://stackoverflow.com/questions/181453", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Is there a better way to find midnight tomorrow? Is there a better way to do this? -(NSDate *)getMidnightTommorow { NSCalendarDate *now = [NSCalendarDate date]; NSCalendarDate *tomorrow = [now dateByAddingYears:0 months:0 days:1 hours:0 minutes:0 seconds:0]; return [NSCalendarDate dateWithYear:[tomorrow ...
{ "language": "en", "url": "https://stackoverflow.com/questions/181459", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: VS2008 Keyboard shortcut Ctrl + . stopped working The new awesome Ctrl + . keyboard shortcut to show smart tags has suddenly stopped working, a week or so after I discovered it :( I am missing it badly, having had to revert back to Ctrl + Alt + F10, which really just isn't the same. I recently installed F# CTP 1.9....
{ "language": "en", "url": "https://stackoverflow.com/questions/181471", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Percentages of subtotal in a report I am using Report Designer in VS 2008. Is there a way to display the percentages of a subtotal in a crosstab report? A: I'm assuming you want something that looks like this: ITEM_ID | AMOUNT | % OF TOTAL ----------------------------------- 1 | 20 | 10% 2 ...
{ "language": "en", "url": "https://stackoverflow.com/questions/181480", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Determining when an EDGE connection comes back after a dropout on an iPhone I've incorporated Apple's Reachability sample into my own project so I know whether or not I have a network connection - if I don't have a network connection, I don't bother sending out and requests. I decided to go with the status notificat...
{ "language": "en", "url": "https://stackoverflow.com/questions/181485", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: lists:usort for nth element in tuple I need to sort tuples according to the second element of each tuple but apparently usort/1 only works with the first element. So I have to swap the elements, usort them and swap back.Is there an easier way?Also is there a way to sort in descending order (I know sorting and revers...
{ "language": "en", "url": "https://stackoverflow.com/questions/181498", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Add record to SqlDataReader Is there any way I can push a new record to SqlDataReader after i pull a table down? I have this piece of trash code that I need to modify, and this seems like the easiest way to do what I need. I understand that this should not be done, and if you have to do it there is something serious...
{ "language": "en", "url": "https://stackoverflow.com/questions/181505", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Styling multi-line conditions in 'if' statements? Sometimes I break long conditions in ifs onto several lines. The most obvious way to do this is: if (cond1 == 'val1' and cond2 == 'val2' and cond3 == 'val3' and cond4 == 'val4'): do_something Isn't very very appealing visually, because the action blend...
{ "language": "en", "url": "https://stackoverflow.com/questions/181530", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "847" }
Q: If one page executes a Response.Redirect() to a different web page, can the new page access values in asp.net controls from the original page? I have a text string value that I'd like to persist from one web page to another without using query strings or the session/view states. I've been trying to get the ASP http...
{ "language": "en", "url": "https://stackoverflow.com/questions/181532", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Exporting SharePoint usage log files into a database using LogParser So basically we have lots of SharePoint usage log files generated by our SharePoint 2007 site and we would like to make sense of them. For that we're thinking of reading the log files and dumping into a database with the appropriate columns and all...
{ "language": "en", "url": "https://stackoverflow.com/questions/181537", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Summing Split ranges in a SQL query I have a table which contains my server status create table ServerStatus ( ServerId int, StartTime datetime, Seconds int, [State] char(8) ) I would like a query that given a start and end date will summarize the time the server spends in each state during that ...
{ "language": "en", "url": "https://stackoverflow.com/questions/181539", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What is the problem with reduce()? There seems to be a lot of heated discussion on the net about the changes to the reduce() function in python 3.0 and how it should be removed. I am having a little difficulty understanding why this is the case; I find it quite reasonable to use it in a variety of cases. If the cont...
{ "language": "en", "url": "https://stackoverflow.com/questions/181543", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "80" }
Q: How to check in Java using JIntegra if COM object implements an interface? I'm working with JIntegra java com bridge. I have an object of type Object which true coclass is unknown. I need to check if that object can be casted to specific COM interface (which has a proxy class generated by JIntegra). A: Call queryIn...
{ "language": "en", "url": "https://stackoverflow.com/questions/181551", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: py2exe including MSVC DLLs in the .exe When using py2exe to distribute Python applications with wxPython, some MSVC DLLs are usually needed to make the .exe work on freshly installed machines. In particular, the two most common DLLs are msvcp71.dll and msvcr71.dll The former can be included in the .exe using this ti...
{ "language": "en", "url": "https://stackoverflow.com/questions/181556", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Disable the error message box while loading an external movie with actionscript 3 I have a compiled swf file and a I can't edit it, but the movie is working fine (but gives an error message with a message box). I am using it from an other movie (load with as3 code). When the loader movie loads it the error message b...
{ "language": "en", "url": "https://stackoverflow.com/questions/181562", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: Which Java Profiling tool do you use and which tool you think is the best? Want to know what the stackoverflow community feels about the various free and non-free Java Profilers and profiling tools available. A: Yourkit is pretty good for CPU analysis. For memory usage analsis using heap dumps use http://www.eclip...
{ "language": "en", "url": "https://stackoverflow.com/questions/181568", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: wxPython: displaying multiple widgets in same frame I would like to be able to display Notebook and a TxtCtrl wx widgets in a single frame. Below is an example adapted from the wxpython wiki; is it possible to change their layout (maybe with something like wx.SplitterWindow) to display the text box below the Notebo...
{ "language": "en", "url": "https://stackoverflow.com/questions/181573", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Convex Hull generation in .NET I've got a bunch of 3D vertex positions & need to generate a convex hull containing them; does anyone know of any QHull bindings for .NET? or native 3D Delaunay triangulation algorithms? A: A 3d delaunay is tricky, I'm not sure it's even possible to strictly define a delaunay constrai...
{ "language": "en", "url": "https://stackoverflow.com/questions/181578", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: List Comprehension in an Open Office Spreadsheet List Comprehension is a very useful code mechanism that is found in several languages, such as Haskell, Python, and Ruby (just to name a few off the top of my head). I'm familiar with the construct. I find myself working on an Open Office Spreadsheet and I need to do ...
{ "language": "en", "url": "https://stackoverflow.com/questions/181579", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Generate X.509 certificate key pair and signing request (CSR) in C# How do you generate a X.509 public and private key pair and a signing request (CSR file) to be sent to a CA for signing in C#? A: Generating a RSA key-pair is easy: // Generate a 2048 bit RSA keypair RSA keypair = new RSACryptoServiceProvider(2048)...
{ "language": "en", "url": "https://stackoverflow.com/questions/181581", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: RPC_E_SERVERCALL_RETRYLATER during powershell automation I'm using PowersHell to automate iTunes but find the error handling / waiting for com objects handling to be less than optimal. Example code #Cause an RPC error $iTunes = New-Object -ComObject iTunes.Application $LibrarySource = $iTunes.LibrarySource # Get "pl...
{ "language": "en", "url": "https://stackoverflow.com/questions/181585", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: XML as data source : best practice for reading I'm working on a small project where for the first time I want to use XML as the one and only data source...a file based store suits the need of the project. When writing the DAL should I have all the get methods static? to aviod and "reading while file open" errors? Sh...
{ "language": "en", "url": "https://stackoverflow.com/questions/181587", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: TraceSource in TestDriven.NET AppDomain I'm running tests using the TestDriven.NET VS add-in, and the class library I'm testing is instrumented using TraceSource. How can I get the output of that TraceSource to show up in the Output window in Visual Studio? The DefaultTraceListener doesn't appear to be working qui...
{ "language": "en", "url": "https://stackoverflow.com/questions/181595", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to convert a column number (e.g. 127) into an Excel column (e.g. AA) How do you convert a numerical number to an Excel column name in C# without using automation getting the value directly from Excel. Excel 2007 has a possible range of 1 to 16384, which is the number of columns that it supports. The resulting va...
{ "language": "en", "url": "https://stackoverflow.com/questions/181596", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "547" }
Q: What are the naming guidelines for ASP.NET controls? We are in the process of nutting out the design guidelines we would like to use in our development team and got into a discussion today around how ASP.NET controls should be named. I am talking about our good friends Label, TextBox, Button etc. We came up with the...
{ "language": "en", "url": "https://stackoverflow.com/questions/181597", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "21" }
Q: How to refactor function that takes lots of arguments? I wrote a wrapper for a COM object that only excepted strings as input, so in good OOP practice I wrapped the string up in a function so that it was easier to build and call. I was just wondering if anyone could think of a better way to do the following code. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/181605", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Hidden Features of F# This is the unabashed attempt of a similar C# question. So what are your favorite F# hidden (or not) features? Most of the features I've used so far aren't exactly hidden but have been quite refreshing. Like how trivial it is to overload operators compared to say C# or VB.NET. And Async<T> has ...
{ "language": "en", "url": "https://stackoverflow.com/questions/181613", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "23" }
Q: Java threads: Is it possible view/pause/kill a particular thread from a different java program running on the same JVM? I have a program 'foo' running different threads, fooT1, fooT2, .. fooTn. Now if I want write another program 'bar', which could kill the thread fooTr, is that possible? Reason: One of the thread f...
{ "language": "en", "url": "https://stackoverflow.com/questions/181615", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Screencapture from the browser using Javascript? I guess this is an odd one, and the answer is most likely it is not possible since it would represent a security breach; but I am looking for a way - if any - to get a screendump of content inside the browser. I don't need the entire window, but actually just need to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/181622", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: C++: what regex library should I use? I'm working on a commercial (not open source) C++ project that runs on a linux-based system. I need to do some regex within the C++ code. (I know: I now have 2 problems.) QUESTION: What libraries do people who regularly do regex from C/C++ recommend I look into? A quick se...
{ "language": "en", "url": "https://stackoverflow.com/questions/181624", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "109" }
Q: Why is my K2 process not appearing in the reports? I use K2 as my workflow engine. For some reason my processes are not available in any of the reporting views (on the workspace). Do I have to do something special when deploying to get them there? A: Your k2 process should appear in the reports automatically. If it...
{ "language": "en", "url": "https://stackoverflow.com/questions/181627", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How can I set the /baseaddress to a "good" value? We have a project with many dll files which get loaded when the application starts. The baseaddresses of the dll files do overlap so that the memory image gets relocated. Is there a possibility to assign the baseaddresses automatically or a way to calculate a "good" ...
{ "language": "en", "url": "https://stackoverflow.com/questions/181629", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: What's a good and stable C++ tree implementation? I'm wondering if anyone can recommend a good C++ tree implementation, hopefully one that is stl compatible if at all possible. For the record, I've written tree algorithms many times before, and I know it can be fun, but I want to be pragmatic and lazy if at all pos...
{ "language": "en", "url": "https://stackoverflow.com/questions/181630", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "47" }
Q: Wait window in a windows application I basically need to show a wait window to the user. For this i have put two seperate window forms in the application. the first form is the main form with a button. The second one is a empty one with just a label text. On click of the button in Form1 i do the below Form2 f = new...
{ "language": "en", "url": "https://stackoverflow.com/questions/181643", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Problem opening berkeley db in python I have problems opening a berkeley db in python using bdtables. As bdtables is used by the library I am using to access the database, I need it to work. The problem seems to be that the db environment I am trying to open (I got a copy of the database to open), is version 4.4 whi...
{ "language": "en", "url": "https://stackoverflow.com/questions/181648", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Ruby on Rails - Can I modify the value of an attribute before it is called? Let's say I have this model named Product with a field named brand. Suppose the values of brand are stored in the format this_is_a_brand. Can I define a method in the model (or anywhere else) that allows me to modify the value of brand befor...
{ "language": "en", "url": "https://stackoverflow.com/questions/181652", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Backup tool for Microsoft Virtual Server 2005 R2? I am seeking a backup tool to back-up virtual OS instances run through Microsoft Virtual Server 2005 R2. According to the MS docs, it should be possible to do it live through volume shadow copy service, but I am having trouble finding any tool for any. What are the b...
{ "language": "en", "url": "https://stackoverflow.com/questions/181671", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Thread synchronization question (in java) my java application has a loading task which requires two server calls which can be parallelized. So I launch a Thread t1 (doing task1) and a Thread t2 (for task2). I want then to do a specific task, task3 when both other tasks (1 & 2) are over. Naturally I can't tell which ...
{ "language": "en", "url": "https://stackoverflow.com/questions/181690", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: What are the complexity guarantees of the standard containers? Apparently ;-) the standard containers provide some form of guarantees. What type of guarantees and what exactly are the differences between the different types of container? Working from the SGI page (about STL) I have come up with this: Container Types...
{ "language": "en", "url": "https://stackoverflow.com/questions/181693", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "179" }
Q: Multiple languages in one database - SQL Server 2005 We have an application where people can type in multiple langugaes. Though we only have one database to store all the data. We have text columns as nvarchar ( assuming we only want text data to be in multiple languages and not all dates etc.) Do you think this is ...
{ "language": "en", "url": "https://stackoverflow.com/questions/181697", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Should I use Mono on a real project? Has anyone used Mono, the open source .NET implementation on a large or medium sized project? I'm wondering if it's ready for real world, production environments. Is it stable, fast, compatible, ... enough to use? Does it take a lot of effort to port projects to the Mono runtime,...
{ "language": "en", "url": "https://stackoverflow.com/questions/181701", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "36" }
Q: Why can't I debug my asp.net web app When I add a breakpoint and hit F5 to run in the debugger (I am using my debug build), a dialog pops up telling my my web.config file does not have debug=true in it (which is does) and I get 2 choices a) run without the debugger or b) let visual studio update my web.config file. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/181718", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do I start a process from C#? How do I start a process, such as launching a URL when the user clicks a button? A: var path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "/YourSubDirectory/yourprogram.exe"); Process.Start(new ProcessStartInfo(path)); A: class ProcessStart { static void Main(string[...
{ "language": "en", "url": "https://stackoverflow.com/questions/181719", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "191" }
Q: When to use the Python debugger Since Python is a dynamic, interpreted language you don't have to compile your code before running it. Hence, it's very easy to simply write your code, run it, see what problems occur, and fix them. Using hotkeys or macros can make this incredibly quick. So, because it's so easy to im...
{ "language": "en", "url": "https://stackoverflow.com/questions/181724", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Texture Sampling in Open GL i need to get the color at a particular coordinate from a texture. There are 2 ways i can do this, by getting and looking at the raw png data, or by sampling my generated opengl texture. Is it possible to sample an opengl texture to get the color (RGBA) at a given UV or XY coord? If so, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/181731", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Why does the message BC30560 'mymodule_ascx' is ambiguous in the namespace 'ASP' come up sometimes then go away? Often when making changes to a VS2008 ASP.net project we get a message like: BC30560: 'mymodule_ascx' is ambiguous in the namespace 'ASP'. This goes away after a recompile or sometimes just waiting 10 sec...
{ "language": "en", "url": "https://stackoverflow.com/questions/181745", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: What's new in SP1 for .NET 3.5 Is there an exact overview what has changed in the SP1 for .NET 3.5? New classes, methods, etc. For example, I've noticed there is a new WaitOne(TimeSpan) and WaitOne(int) overloads in the WaitHandle class. A: What's New in the .NET Framework Version 3.5 SP1 - MSDN A: There's a good ...
{ "language": "en", "url": "https://stackoverflow.com/questions/181746", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Event Handler behavioral difference .net 1.1 vs 2.0 with null delegate Not sure what exactly is going on here, but seems like in .NET 1.1 an uninitialized event delegate can run without issues, but in .NET 2.0+ it causes a NullReferenceException. Any ideas why. The code below will run fine without issues in 1.1, i...
{ "language": "en", "url": "https://stackoverflow.com/questions/181775", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Oracle: How to setup a database backup to a network drive Oracle database 11g. What is the easiest way to set up a full nightly database backup to a network drive (ie drive on another computer)? A: Read the backup and recovery guide. Don't just backup... Make sure you test your backup, regularly!! A: If you have G...
{ "language": "en", "url": "https://stackoverflow.com/questions/181778", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Is there a documented way to set the iPhone orientation? I have an app where I would like to support device rotation in certain views but other don't particularly make sense in Landscape mode, so as I swapping the views out I would like to force the rotation to be set to portrait. There is an undocumented property s...
{ "language": "en", "url": "https://stackoverflow.com/questions/181780", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "95" }
Q: JAVA Swing client, Data Access to Remote Database; Ibatis I've got a Java client that needs to access a remote database. It is the goal to hide database credentials from the user and not hardcode any credentials within the code. Therefore, the database access will probably have to be on the server side. I'm restrict...
{ "language": "en", "url": "https://stackoverflow.com/questions/181784", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: how can I save the output of windows internal FTP client? UPDATED: on win2k it seems it works OK. Sorry for the confusion. MS Windows Vista internal ftp client has a strange behavior. When redirecting its output and error to a file, the errors do not show up there: ftp -n -s:commands.txt host >output.log 2>&1 Wh...
{ "language": "en", "url": "https://stackoverflow.com/questions/181791", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What techniques are most effective for dealing with millions of records? I once had a MySQL database table containing 25 million records, which made even a simple COUNT(*) query takes minute to execute. I ended up making partitions, separating them into a couple tables. What i'm asking is, is there any pattern or de...
{ "language": "en", "url": "https://stackoverflow.com/questions/181792", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "22" }
Q: Outlook contact sync - How to identify the correct object to sync with? I have a web application that syncs Outlook contacts to a database (and back) via CDO. The DB contains every contact only once (at least theoretically, of course doublets happen), providing a single point of change for a contact, regardless of h...
{ "language": "en", "url": "https://stackoverflow.com/questions/181799", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Issue with localizing html title of a page I'm trying to localize my aspx pages. I'm done with content localization using L10n features provided by .net f/w, like resource files. But I'm finding it difficult to set local data in page titles. Most of the browsers, including IE and FF, shows content on window title w...
{ "language": "en", "url": "https://stackoverflow.com/questions/181800", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Absolute path & Relative Path What's the difference between absolute path & relative path when using any web server or Tomcat? A: Important to note that relative paths are also subjective. ie: <?php #bar.php require('../foo.php'); ?> /dir/bar.php /foo.php # prints a /dir/foo.php # prints b /dir...
{ "language": "en", "url": "https://stackoverflow.com/questions/181805", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: XML for mobile clients I have a J2ME application that needs to communicate with my server, and download information for the application in XML. My application could run a lot faster if I had a better format of data, which would allow me to have more efficient parsing code. Does anyone know an efficient substitute fo...
{ "language": "en", "url": "https://stackoverflow.com/questions/181806", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Eclipse treating all the files in a project as Derived I have created a Dynamic Web Project in my Eclipse workspace. It is also a Maven project, and under SVN control. But in "Open Resource" (Ctrl+Alt+R) no file from this project appears, unless I check from the window's options (top right drop-down) "Show Derived R...
{ "language": "en", "url": "https://stackoverflow.com/questions/181808", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How do I unit test a custom ant task? I am writing a custom ant task that extends Task. I am using the log() method in the task. What I want to do is use a unit test while deveoping the task, but I don't know how to set up a context for the task to run in to initialise the task as if it were running in ant. This is ...
{ "language": "en", "url": "https://stackoverflow.com/questions/181810", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How do I turn an RSS feed back into RSS? According to the feedparser documentation, I can turn an RSS feed into a parsed object like this: import feedparser d = feedparser.parse('http://feedparser.org/docs/examples/atom10.xml') but I can't find anything showing how to go the other way; I'd like to be able do manipu...
{ "language": "en", "url": "https://stackoverflow.com/questions/181818", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: VisualBasic Month function inconsistency I'm working in a web application using VB.NET. There is also VisualBasic code mixed in it, in particular the Date variable and the Month function of VB. The problem is this part: Month("10/01/2008") On the servers, I get 10 (October) as the month (which is supposed to be cor...
{ "language": "en", "url": "https://stackoverflow.com/questions/181829", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: computing performance I need to find out the time a function takes for computing the performance of the application / function. is their any open source Java APIs for doing the same ? A: You're in luck as there are quite a few open source Java profilers available for you. A: Take a look at the official TPTP plugin...
{ "language": "en", "url": "https://stackoverflow.com/questions/181840", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How can I transition from Java to Clojure? After discovering Clojure I have spent the last few days immersed in it. What project types lend themselves to Java over Clojure, vice versa, and in combination? What are examples of programs which you would have never attempted before Clojure? A: If you are going to try c...
{ "language": "en", "url": "https://stackoverflow.com/questions/181842", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "27" }
Q: In a WPF ListBox with more than 1000 Image Items the Zoom Images become slow I met a problem when deveoping a photo viewer application. I use ListBox to Show Images, which is contained in a ObservableCollection. I bind the ListBox's ItemsSource to the ObservableCollection. <DataTemplate DataType="{x:Type modeldata...
{ "language": "en", "url": "https://stackoverflow.com/questions/181845", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Help on Open source controls in commercial application What are the implications of including a set of visual components released under a Mozilla Public License in a commercial application. Do I have any obligations? A: I've found pretty good analysis on MPL (and others) by Frank Hecker here: http://hecker.org/writ...
{ "language": "en", "url": "https://stackoverflow.com/questions/181850", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }