text
stringlengths
8
267k
meta
dict
Q: Eclipse Style Function Completions in Emacs for C, C++ and JAVA? How Do I Get Eclipse Style Function Completions in Emacs for C, C++ and JAVA? I love the power of the Emacs text editor but the lack of an "intellisense" feature leaves me using Eclipse. A: I can only answer your question as one who has not used Eclip...
{ "language": "en", "url": "https://stackoverflow.com/questions/129257", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "26" }
Q: How can I make a framework for quickly building similar, but different, sites? I have the need to build lots of sites that are very similar, but not exactly the same, using ASP.NET 2.0. I'm trying to find the best way to make generating these sites quick and easy. The sites will be used to collect information about ...
{ "language": "en", "url": "https://stackoverflow.com/questions/129261", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: CASCADE DELETE just once I have a Postgresql database on which I want to do a few cascading deletes. However, the tables aren't set up with the ON DELETE CASCADE rule. Is there any way I can perform a delete and tell Postgresql to cascade it just this once? Something equivalent to DELETE FROM some_table CASCADE; ...
{ "language": "en", "url": "https://stackoverflow.com/questions/129265", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "295" }
Q: Why no static methods in Interfaces, but static fields and inner classes OK? [pre-Java8] There have been a few questions asked here about why you can't define static methods within interfaces, but none of them address a basic inconsistency: why can you define static fields and static inner types within an interface,...
{ "language": "en", "url": "https://stackoverflow.com/questions/129267", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "92" }
Q: How do you determine whether or not a given Type (System.Type) inherits from a specific base class (in .Net)? This is likely going to be an easy answer and I'm just missing something, but here goes...If I have a Type, (that is, an actual System.Type...not an instance) how do I tell if it inherits from another specif...
{ "language": "en", "url": "https://stackoverflow.com/questions/129277", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "25" }
Q: MVC model design / inheritance Forgive the vague title, I wasn't sure how to describe it. If you have a generic model "Archive", how do you show different views/forms based on a user selected 'type'? For example, the user creates a new "Archive", then gets the choice of video, book, audio etc. From there they get di...
{ "language": "en", "url": "https://stackoverflow.com/questions/129283", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Can attributes be added dynamically in C#? Is it possible to add attributes at runtime or to change the value of an attribute at runtime? A: This really depends on what exactly you're trying to accomplish. The System.ComponentModel.TypeDescriptor stuff can be used to add attributes to types, properties and object i...
{ "language": "en", "url": "https://stackoverflow.com/questions/129285", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "149" }
Q: Automatically resizing X11 display when connecting an external monitor I have a laptop running Ubuntu to which I connect an external monitor when I'm at the office. Usually this requires me to run xrandr --auto in order for the laptop to re-size the display to match the external monitor. It would be nice if this cou...
{ "language": "en", "url": "https://stackoverflow.com/questions/129297", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: RDLC SubReports Exporting to Excel Are Ignored I have a RDLC report which has a table, calling a subreport N times. This works perfectly in the control viewer and when I export to PDF. Yet when I export to Excel, I get the following error: Subreports within table/matrix cells are ignored. Does anyone know why ...
{ "language": "en", "url": "https://stackoverflow.com/questions/129301", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to write the content of one stream into another stream in .net? I often run into the problem that I have one stream full of data and want to write everything of it into another stream. All code-examples out there use a buffer in form of a byte-array. Is there a more elegant way to this? If not, what's the ideal ...
{ "language": "en", "url": "https://stackoverflow.com/questions/129305", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "41" }
Q: What browser features/plugins for opera, IE, firefox, chrome, safari, etc. do you use for browser compatibility testing? I use the Nightly Tester Tools for Firefox and Fiddler for IE. What do you use? A: Web Developer toolbar for Firefox, Visual Studio JIT debugger for IE, and Chrome's Resource Inspector. We don't...
{ "language": "en", "url": "https://stackoverflow.com/questions/129310", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Windows (Vista): Set process-priority on a program shortcut Is there any way to launch a program with a shortcut, that sets the process-priority of that program? iTunes is dragging my system to it's knees, but when I set the process-priority to "low", somehow, like magic, Windows gets back to it's normal responsive ...
{ "language": "en", "url": "https://stackoverflow.com/questions/129312", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How do you handle attachments in your web application? Due to a lack of response to my original question, probably due to poor wording on my part. Since then, I have thought about my original question and decided to reword it, hopefully for the better! :) We create custom business software for our customers, and qu...
{ "language": "en", "url": "https://stackoverflow.com/questions/129328", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Optimistic vs. Pessimistic locking I understand the differences between optimistic and pessimistic locking. Now, could someone explain to me when I would use either one in general? And does the answer to this question change depending on whether or not I'm using a stored procedure to perform the query? But just to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/129329", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "900" }
Q: How do I make a custom Flex component for a gap-fill exercise? The purpose of this component is to test knowledge of a student on a given subject - in the example below it would be geography. The student is given a piece of text with missing words in it. He/she has to fill in (type in this case) the missing words - ...
{ "language": "en", "url": "https://stackoverflow.com/questions/129330", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do you redirect to a page using the POST verb? When you call RedirectToAction within a controller, it automatically redirects using an HTTP GET. How do I explicitly tell it to use an HTTP POST? I have an action that accepts both GET and POST requests, and I want to be able to RedirectToAction using POST and se...
{ "language": "en", "url": "https://stackoverflow.com/questions/129335", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "152" }
Q: How to pass arguments to a constructor in an IOC-framework How can I pass arguments to a constructor in an IOC-framework? I want to do something like: (Trying to be IOC-framework agnostic ;) ) object objectToLogFor = xxx; container.Resolve<ILogging>(objectToLogFor); public class MyLogging : ILogging { public M...
{ "language": "en", "url": "https://stackoverflow.com/questions/129345", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Passing in parameter from html element with jQuery I'm working with jQuery for the first time and need some help. I have html that looks like the following: <div id='comment-8' class='comment'> <p>Blah blah</p> <div class='tools'></div> </div> <div id='comment-9' class='comment'> <p>Blah blah something ...
{ "language": "en", "url": "https://stackoverflow.com/questions/129360", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Restoring SplitterDistance inside TabControl is inconsistent I'm writing a WinForms application and one of the tabs in my TabControl has a SplitContainer. I'm saving the SplitterDistance in the user's application settings, but the restore is inconsistent. If the tab page with the splitter is visible, then the restor...
{ "language": "en", "url": "https://stackoverflow.com/questions/129362", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Anybody know where I can get docs or tutorials on VSS 2005 Integration via .net I know that I can add the SourceSafeTypeLib to a project and can explore it in object browser and find obvious things (GetLatest, etc), but I am looking for some more thorough documentation or specific tutorials on things like "undo anot...
{ "language": "en", "url": "https://stackoverflow.com/questions/129382", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: GetElementsByTagName functionality from .net code-behind page? I am writing a webpage in C# .NET. In javascript there is a function called GetElementsByTagName... this is nice for javascript invoked from the .aspx page. My question is, is there any way I can have this kind of functionality from my C# code-behind? ...
{ "language": "en", "url": "https://stackoverflow.com/questions/129388", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do you do a deep copy of an object in .NET? I want a true deep copy. In Java, this was easy, but how do you do it in C#? A: You can try this public static object DeepCopy(object obj) { if (obj == null) return null; Type type = obj.GetType(); if (type.IsValueType || t...
{ "language": "en", "url": "https://stackoverflow.com/questions/129389", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "682" }
Q: How do I add Active Directory support to Windows PE? I want to query Active Directory from Windows PE 2.0, which is not supported "out of the box." Microsoft seems to suggest that this is possible, but not with any tools they provide. What do you recommend? A: There seem to be instructions here, and the author clai...
{ "language": "en", "url": "https://stackoverflow.com/questions/129391", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Can I use DoxyGen to document ActionScript code? How do I Configuring DoxyGen to document ActionScript files? I've included the *.as and *.asi files in doxygen's search pattern, but the classes, functions and variables don't show there. A: I've been able to produce SOME documentation with DoxyGen (What can I say - ...
{ "language": "en", "url": "https://stackoverflow.com/questions/129405", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Why is there a gap between my image and its containing box? When my browser renders the following test case, there's a gap below the image. From my understanding of CSS, the bottom of the blue box should touch the bottom of the red box. But that's not the case. Why? <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Str...
{ "language": "en", "url": "https://stackoverflow.com/questions/129406", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Passing Exceptions to an error screen in ASP.net/C# Coming from a desktop background I'm not sure exactly how to pass the exceptions I have caught to an Error page in order to avoid the standard exception screen being seen by my users. My general question is how do I pass the exception from page X to my Error page...
{ "language": "en", "url": "https://stackoverflow.com/questions/129417", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How do I output progress messages from a SELECT statement? I have a SQL script that I want to output progress messages as it runs. Having it output messages between SQL statements is easy, however I have some very long running INSERT INTO SELECTs. Is there a way to have a select statement output messages as it goes,...
{ "language": "en", "url": "https://stackoverflow.com/questions/129437", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: What is a good project to work on to learn modern patterns and practices? I'm trying to teach myself how to use Modern Persistence Patterns (OR/M, Repository, etc) and development practices (TDD, etc). Because the best way (for me) to learn is by doing, I'd like to build some sort of demo application for myself. Th...
{ "language": "en", "url": "https://stackoverflow.com/questions/129438", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: postgreSQL - psql \i : how to execute script in a given path I'm new to postgreSQL and I have a simple question: I'm trying to create a simple script that creates a DB so I can later call it like this: psql -f createDB.sql I want the script to call other scripts (separate ones for creating tables, adding constraint...
{ "language": "en", "url": "https://stackoverflow.com/questions/129445", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "80" }
Q: JavaScript or Java String Subtraction If you are using Java or JavaScript, is there a good way to do something like a String subtraction so that given two strings: org.company.project.component org.company.project.component.sub_component you just get: sub_component I know that I could just write code to walk the s...
{ "language": "en", "url": "https://stackoverflow.com/questions/129451", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: .NET EventHandlers - Generic or no? Every time I start in deep in a C# project, I end up with lots of events that really just need to pass a single item. I stick with the EventHandler/EventArgs practice, but what I like to do is have something like: public delegate void EventHandler<T>(object src, EventArgs<T> args...
{ "language": "en", "url": "https://stackoverflow.com/questions/129453", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "23" }
Q: Performance gains in stored procs for long running transactions I have several long running report type transactions that take 5-10 minutes. Would I see any performance increase by using stored procs? Would it be significant? each query runs once a night. A: Probably not. Stored procs give you the advantage of pre-...
{ "language": "en", "url": "https://stackoverflow.com/questions/129494", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I use a stored procedure in log4net ADONetAppender? I am using the ADONetAppender to (try) to log data via a stored procedure (so that I may inject logic into the logging routine). My configuration settings are listed below. Can anybody tell what I'm doing wrong? <appender name="ADONetAppender_SqlServer" type...
{ "language": "en", "url": "https://stackoverflow.com/questions/129498", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: How do I wrap text in a UITableViewCell without a custom cell This is on iPhone 0S 2.0. Answers for 2.1 are fine too, though I am unaware of any differences regarding tables. It feels like it should be possible to get text to wrap without creating a custom cell, since a UITableViewCell contains a UILabel by default....
{ "language": "en", "url": "https://stackoverflow.com/questions/129502", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "151" }
Q: How do you test that a Python function throws an exception? How does one write a unit test that fails only if a function doesn't throw an expected exception? A: Use TestCase.assertRaises (or TestCase.failUnlessRaises) from the unittest module, for example: import mymod class MyTestCase(unittest.TestCase): def ...
{ "language": "en", "url": "https://stackoverflow.com/questions/129507", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1160" }
Q: Is it a bad idea to reload routes dynamically in Rails? I have an application I'm writing where I'm allowing the administrators to add aliases for pages, categories, etc, and I would like to use a different controller/action depending on the alias (without redirecting, and I've found that render doesn't actually cal...
{ "language": "en", "url": "https://stackoverflow.com/questions/129510", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Overflowed (i.e. querystring) RouteData back out of the controller into the view Anyone understand why the following doesn't work? What I want to do is copy current route data plus whatever I add via an anonymous object into new routedata when forming new links on the view. For example if I have the parameter "pag...
{ "language": "en", "url": "https://stackoverflow.com/questions/129523", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Anyone know of a solid .NET Framework 2.0 installer script for Inno Setup? I've spent a good part of the day searching, writing and finally scrapping a script that I can use with my Inno Setup install script that will download and install the appropriate .NET 2.0 Framework if needed. There are definitely a number of...
{ "language": "en", "url": "https://stackoverflow.com/questions/129542", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What is the best way of handling non-validating SSL certificates in C# I'm using the following code to make sure all certificates pass, even invalid ones, but I would like to know if there is a better way, as this event gets called globally and I only want the certificate to pass for a certain HTTP call and not for ...
{ "language": "en", "url": "https://stackoverflow.com/questions/129544", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: What has your QA/tester team said or done for the development team that made your day (as a developer) There are lots of questions on how to improve communication between teams. One way to start is to identify what one team actually does that the other team really values and do more of that. For example. Our QA tea...
{ "language": "en", "url": "https://stackoverflow.com/questions/129551", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Sql server real datatype, what is the C# equivalent? What is the C# equivalent to the sql server 2005 real type? A: it is a Single see here for more info on SQL Server to .Net DataTypes A: Double can be used as the .NET Equivalent Datatype for Real Datatype of SQL Server Double gets the exact value with out Roundi...
{ "language": "en", "url": "https://stackoverflow.com/questions/129560", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "51" }
Q: Profiling SQL Server and/or ASP.NET How would one go about profiling a few queries that are being run from an ASP.NET application? There is some software where I work that runs extremely slow because of the database (I think). The tables have indexes but it still drags because it's working with so much data. How can...
{ "language": "en", "url": "https://stackoverflow.com/questions/129605", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: What is the difference between my and local in Perl? I am seeing both of them used in this script I am trying to debug and the literature is just not clear. Can someone demystify this for me? A: Well Google really works for you on this one: http://www.perlmonks.org/?node_id=94007 From the link: Quick summary: 'my'...
{ "language": "en", "url": "https://stackoverflow.com/questions/129607", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "73" }
Q: Cannot Access http://:8080 I've installed TFS 2008, but I can't seem to access the server. When I try to connect to it in Visual Studio, I can't. If I try by browser on a remote PC, I get a generic page cannot be displayed. On the server, I get a 403. Nothing was touched in IIS and the service is running as a Networ...
{ "language": "en", "url": "https://stackoverflow.com/questions/129618", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What is declarative programming? I keep hearing this term tossed around in several different contexts. What is it? A: The other answers already do a fantastic job explaining what declarative programming is, so I'm just going to provide some examples of why that might be useful. Context Independence Declarative Prog...
{ "language": "en", "url": "https://stackoverflow.com/questions/129628", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "193" }
Q: How to create a C# Login handler How would I go about creating a web app login handler in C#? In Java I would use a JSP that posts the username and password to a servlet, which then delegates to a POJO - for the db lookup and validation. If validation fails the servlet forwards onto the login.jsp for another atte...
{ "language": "en", "url": "https://stackoverflow.com/questions/129629", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to play a sound file With C#, How do I play (Pause, Forward...) a sound file (mp3, ogg)? The file could be on the hard disk, or on the internet. Is there any library or Class out there that can ease me the work ? A: If you don't mind including Microsoft.VisualBasic.dll in your project, you can do it this way: v...
{ "language": "en", "url": "https://stackoverflow.com/questions/129642", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: C# + Castle ActiveRecord: HasAndBelongsToMany and collections Let's say I have many-to-many relationship (using the ActiveRecord attribute HasAndBelongsToMany) between Posts and Tags (domain object names changed to protect the innocent), and I wanted a method like FindAllPostByTags(IList<Tag> tags) that returns all ...
{ "language": "en", "url": "https://stackoverflow.com/questions/129650", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do I keep a DIV from expanding to take up all available width? In the following HTML, I'd like the frame around the image to be snug -- not to stretch out and take up all the available width in the parent container. I know there are a couple of ways to do this (including horrible things like manually setting its...
{ "language": "en", "url": "https://stackoverflow.com/questions/129651", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "26" }
Q: How can I sanitize user input with PHP? Is there a catchall function somewhere that works well for sanitizing user input for SQL injection and XSS attacks, while still allowing certain types of HTML tags? A: No. You can't generically filter data without any context of what it's for. Sometimes you'd want to take a...
{ "language": "en", "url": "https://stackoverflow.com/questions/129677", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1257" }
Q: Is duplicated code more tolerable in unit tests? I ruined several unit tests some time ago when I went through and refactored them to make them more DRY--the intent of each test was no longer clear. It seems there is a trade-off between tests' readability and maintainability. If I leave duplicated code in unit tes...
{ "language": "en", "url": "https://stackoverflow.com/questions/129693", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "143" }
Q: Java: Serializing a huge amount of data to a single file I need to serialize a huge amount of data (around 2gigs) of small objects into a single file in order to be processed later by another Java process. Performance is kind of important. Can anyone suggest a good method to achieve this? A: Have you taken a look a...
{ "language": "en", "url": "https://stackoverflow.com/questions/129695", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Parse Fast Infoset documents in PHP? Is there a library which allows PHP to decode application/fastinfoset binary XML? A: As far as I know, there's no PHP-library that does this. Can you hack around this by creating a tiny java-program that decodes/transforms the FI and call this from PHP? I know this is a less-tha...
{ "language": "en", "url": "https://stackoverflow.com/questions/129731", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Any good collection module in perl? Can someone suggest a good module in perl which can be used to store collection of objects? Or is ARRAY a good enough substitute for most of the needs? Update: I am looking for a collections class because I want to be able to do an operation like compute collection level property ...
{ "language": "en", "url": "https://stackoverflow.com/questions/129740", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: NPE in JBossWS on JBoss 4.2.2 with jmxremote enabled I am trying to set up JBoss 4.2.2 and JConsole for remote monitoring. As per many of the how-to's I have found on the web to do this you need to enable jmxremote by setting the following options in run.conf. (I realize the other two opts disable authentication) ...
{ "language": "en", "url": "https://stackoverflow.com/questions/129746", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to begin WPF development? I've been using Winforms since .NET 1.1 and I want to start learning WPF. I'm looking for some good resources for a beginner in WPF. What should I read, what tools do I need, and what are the best practices I should follow? A: 1 Start understanding the XAML and control heirarchies - U...
{ "language": "en", "url": "https://stackoverflow.com/questions/129772", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "40" }
Q: NHibernate : map to fields or properties? When you create your mapping files, do you map your properties to fields or properties : <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="Foo" namespace="Foo.Bar" > <class name="Foo" table="FOOS" batch-size="100"> [...] <property name="FooProperty1" ...
{ "language": "en", "url": "https://stackoverflow.com/questions/129773", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: How can I schedule a job in Sql Agent (Sql Server 2005) via C# code? Hi I'd like to schedule an existing job in the Sql Server 2005 agent via C# code... i.e. when someone clicks a button on an asp.net web page. How can I do this? Thanks! A: Have a look here: SMO Job Class The SQL Server Management Objects (SMO) Cl...
{ "language": "en", "url": "https://stackoverflow.com/questions/129808", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Code or formula for intersection of two parabolas in any rotation I am working on a geometry problem that requires finding the intersection of two parabolic arcs in any rotation. I was able to intesect a line and a parabolic arc by rotating the plane to align the arc with an axis, but two parabolas cannot both alig...
{ "language": "en", "url": "https://stackoverflow.com/questions/129815", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: telneting backspace key is wrong When I telnet into our works sun station my backspace key doesn't work. I use a temporary workaround of: $ stty erase ^H This works but each time I telnet in I have to retype this. How can I set this to work properly in my .cshrc file? A: You can put stty erase ^H in your .cshrc fil...
{ "language": "en", "url": "https://stackoverflow.com/questions/129826", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Slipping podcasts through a filter My workplace filters our internet traffic by forcing us to go through a proxy, and unfortunately sites such as IT Conversations and Libsyn are blocked. However, mp3 files in general are not filtered, if they come from sites not on the proxy's blacklist. So is there a website somew...
{ "language": "en", "url": "https://stackoverflow.com/questions/129828", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Forms in SharePoint If I want to put a form up on SharePoint, is it easier to use InfoPath or build a custom web part in C#? Are there other options that I should consider? What are the requirements and hurdles for each option? A: Building forms using InfoPath is absolutely the easiest way to publish a form in S...
{ "language": "en", "url": "https://stackoverflow.com/questions/129829", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How to query the name of the current SQL Server database instance? It is a bit of a "chicken or egg" kind of query, but can someone dreamup a query that can return the name of the current database instance in which the query executes? Believe me when I say I understand the paradox: why do you need to know the name o...
{ "language": "en", "url": "https://stackoverflow.com/questions/129861", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "36" }
Q: How do I write a generic memoize function? I'm writing a function to find triangle numbers and the natural way to write it is recursively: function triangle (x) if x == 0 then return 0 end return x+triangle(x-1) end But attempting to calculate the first 100,000 triangle numbers fails with a stack overflow aft...
{ "language": "en", "url": "https://stackoverflow.com/questions/129877", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Easy acceptance testing with specification I look for a tool/framework to make automatic acceptance-testing. The interface to create new tests should be so easy, that a non-programmer (customer, boss) will be able to add specifications for which will be tested automatically. It should be some way to execute the test...
{ "language": "en", "url": "https://stackoverflow.com/questions/129884", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Pass NSMutableArray object I'm getting lost in pointer land, I believe. I've got this (code syntax might be a little off, I am not looking at the machine with this code on it...but all the pertinent details are correct): NSMutableArray *tmp = [[NSMutableArray alloc] init]; I them pass that to a routine in another ...
{ "language": "en", "url": "https://stackoverflow.com/questions/129890", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Javascript and session variables I have a database that stores events in it and a page with a calendar object on it. When rendering the days it looks through the months events and if any match the current day being rendered it creates a linkbutton to represent the event in the day on the calendar and adds it to that...
{ "language": "en", "url": "https://stackoverflow.com/questions/129898", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How can adding data to a segment in flash memory screw up a program's timing? I have a real-time embedded app with the major cycle running at 10KHz. It runs on a TI TMS320C configured to boot from flash. I recently added an initialized array to a source file, and all of a sudden the timing is screwed up (in a wa...
{ "language": "en", "url": "https://stackoverflow.com/questions/129911", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Getting Python to use the ActiveTcl libraries Is there any way to get Python to use my ActiveTcl installation instead of having to copy the ActiveTcl libraries into the Python/tcl directory? A: Not familiar with ActiveTcl, but in general here is how to get a package/module to be loaded when that name already exists...
{ "language": "en", "url": "https://stackoverflow.com/questions/129912", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What property in Netbeans to I need to change to set the name of my java swing app in the OS X menubar and dock? I found info.plist, but changing @PROJECTNAMEASIDENTIFIEER@ in multiple keys here had no effect. Thanks, hating netbeans. A: Check: nbproject/project.properties nbproject/project.xml in project.xml lo...
{ "language": "en", "url": "https://stackoverflow.com/questions/129915", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What is the best way to launch a web browser with a custom url from a C# application? It's common knowledge that using System.Diagnostics.Process.Start is the way to launch a url from a C# applicaiton: System.Diagnostics.Process.Start("http://www.mywebsite.com"); However, if this url is invalid the application seems...
{ "language": "en", "url": "https://stackoverflow.com/questions/129917", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Populating a database with file names from directories I have an application which behaves as a slideshow for all pictures in a folder. It is written in Borland's C++ Builder (9). It currently uses some borrowed code to throw the filenames into a listbox and save the listbox items as a text file. I want to update t...
{ "language": "en", "url": "https://stackoverflow.com/questions/129919", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do you sign your Firefox extensions? I have developed a couple of extensions for Firefox, and am annoyed that it is so hard to get the extension signed. When an extension isn't signed, it says "Author not verified" when it is installed, and to me that just looks wrong. I have a simple build script that builds m...
{ "language": "en", "url": "https://stackoverflow.com/questions/129920", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: What is MVC (Model View Controller)? I've heard the term MVC (Model View Controller) tossed about with a ton of Buzz lately, but what really is it? A: MVC is a design pattern originally pioneered in the olden days of smalltalk. The concept was that a model would represent your application state and logic, and contr...
{ "language": "en", "url": "https://stackoverflow.com/questions/129921", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "26" }
Q: What's the best way to generate a Text file in a .net website? I have a page in my vb.net web application that needs to toss a bunch of data into a text file and then present it to the user for download. What's the best / most efficient way to build such a text file on a .net web server? Edit: to answer a question ...
{ "language": "en", "url": "https://stackoverflow.com/questions/129927", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Can a standalone .EXE be created from a coded WebTest in Visual Studio Team Studio I am running VS Team Studio 2008. I have created a web test that I want to use for monitoring a company web site. It interacts with the site and does some round trip processing. I want to create a standalone EXE file that can be run ...
{ "language": "en", "url": "https://stackoverflow.com/questions/129932", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: What does "0 but true" mean in Perl? Can someone explain what exactly the string "0 but true" means in Perl? As far as I understand, it equals zero in an integer comparison, but evaluates to true when used as a boolean. Is this correct? Is this a normal behavior of the language or is this a special string treated as...
{ "language": "en", "url": "https://stackoverflow.com/questions/129945", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "62" }
Q: What's the best way to keep multiple Linux servers synced? I have several different locations in a fairly wide area, each with a Linux server storing company data. This data changes every day in different ways at each different location. I need a way to keep this data up-to-date and synced between all these location...
{ "language": "en", "url": "https://stackoverflow.com/questions/129958", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How can I convert a JTS-Geometry into an AWT-Shape? Is it possible to convert a com.vividsolutions.jts.geom.Geometry (or a subclass of it) into a class that implements java.awt.Shape? Which library or method can I use to achieve that goal? A: Also have a look at ShapeWriter provided by the JTS library. I used the f...
{ "language": "en", "url": "https://stackoverflow.com/questions/129968", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Convert an image to XAML? Does anyone know of any way to convert a simple gif to xaml? E.G. A tool that would look at an image and create elipses, rectangles and paths based upon a gif / jpg / bitmap? A: Inkscape can trace bitmaps, and can save directly to XAML. And, it happens to be free. I've used it to trace a...
{ "language": "en", "url": "https://stackoverflow.com/questions/129972", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: How to call Java code from C#? We've developed a Java application and would like to use this application from a C# client. The application has dependencies on Spring, Log4j, ... What would be the most efficient mechanism - make DLL(s) from Java code, ... - to achieve this ? A: IKVM! It is really awesome. The only...
{ "language": "en", "url": "https://stackoverflow.com/questions/129989", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "26" }
Q: Initial skeleton for Firefox extensions? I always seem to have a hard time starting a new Firefox extension. Can anyone recommend a good extension skeleton, scaffold, or code generator? Ideally one that follows all the best practices for FF extensions? A: This one works nice: https://addons.mozilla.org/en-US/deve...
{ "language": "en", "url": "https://stackoverflow.com/questions/129993", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Need to run a TCP server besides a Rails app I have a Rails 2.0.2 application running with a postgresql db. The machine will receive data on a TCP port. I already have coded a working ruby multithreaded tcp server to receive the requests, but I need this code to run alongside my Rails app. So I guess I need to know ...
{ "language": "en", "url": "https://stackoverflow.com/questions/130015", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Dropdownlist control with s for asp.net (webforms)? Can anyone recommend a dropdownlist control for asp.net (3.5) that can render option groups? Thanks A: The Sharp Pieces project on CodePlex solves this (and several other) control limitations. A: I use the reflector to see why is not supported. There is why. In t...
{ "language": "en", "url": "https://stackoverflow.com/questions/130020", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "65" }
Q: How can I make two browser windows share the same "session"? I have an app that needs to open a new window (in the same domain) so the user can view a report, but on some browsers* the new window doesn't share the non-persistent cookie of the original window, which causes the user to have to sign in again. Is there ...
{ "language": "en", "url": "https://stackoverflow.com/questions/130021", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Multi-line string in a PropertyGrid Is there a built-in editor for a multi-line string in a PropertyGrid. A: I found that System.Design.dll has System.ComponentModel.Design.MultilineStringEditor which can be used as follows: public class Stuff { [Editor(typeof(MultilineStringEditor), typeof(UITypeEditor))] ...
{ "language": "en", "url": "https://stackoverflow.com/questions/130032", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "34" }
Q: How to Limit Download Speeds from my Website on my IIS Windows Server? When people download files from my website, I don't want them to be able to download faster than 300KB/sec per file. Is there anyway to do this? I'm running IIS 6.0 on Windows Server 2003. A: You can't limit download speed but you can limit the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/130034", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: how are serial generators / cracks developed? I mean, I always was wondered about how the hell somebody can develop algorithms to break/cheat the constraints of legal use in many shareware programs out there. Just for curiosity. A: Nils's post deals with key generators. For cracks, usually you find a branch point ...
{ "language": "en", "url": "https://stackoverflow.com/questions/130058", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "30" }
Q: Developing an operating system for the x86 architecture I am planning to develop an operating system for the x86 architecture. * *What options of programming languages do I have? *What types of compilers are there available, preferably on a Windows environment? *Are there any good sources that will help me lea...
{ "language": "en", "url": "https://stackoverflow.com/questions/130065", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "34" }
Q: Is there an inverse function for time.gmtime() that parses a UTC tuple to seconds since the epoch? python's time module seems a little haphazard. For example, here is a list of methods in there, from the docstring: time() -- return current time in seconds since the Epoch as a float clock() -- return CPU time since ...
{ "language": "en", "url": "https://stackoverflow.com/questions/130074", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "23" }
Q: CouchDB Document Model Changes? Rails uses the concept of migrations to deal with model changes using the ActiveRecord API. CouchDB uses JSON (nested maps and arrays) to represent its model objects. In working with CouchDB so far, I don't see good ways of recognizing when the document's structure has changed (other ...
{ "language": "en", "url": "https://stackoverflow.com/questions/130092", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Command line .cmd/.bat script, how to get directory of running script How can you get the directory of the script that was run and use it within the .cmd file? A: Raymond Chen has a few ideas: https://devblogs.microsoft.com/oldnewthing/20050128-00/?p=36573 Quoted here in full because MSDN archives tend to be some...
{ "language": "en", "url": "https://stackoverflow.com/questions/130112", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "86" }
Q: Windows batch command(s) to read first line from text file How can I read the first line from a text file using a Windows batch file? Since the file is large I only want to deal with the first line. A: Thanks to thetalkingwalnut with answer Windows batch command(s) to read first line from text file I came up with t...
{ "language": "en", "url": "https://stackoverflow.com/questions/130116", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "98" }
Q: If you shouldn't throw exceptions in a destructor, how do you handle errors in it? Most people say never throw an exception out of a destructor - doing so results in undefined behavior. Stroustrup makes the point that "the vector destructor explicitly invokes the destructor for every element. This implies that if an...
{ "language": "en", "url": "https://stackoverflow.com/questions/130117", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "302" }
Q: Starteam 2005 COM API Has anyone worked with the StarTeam COM API (Specifically, intergrating with C#). I need to write a helper function that returns a directory structure out of Starteam, but all I've been able to retrieve using this API has been a list of views. Has anyone else tried this? A: Oh, in the interest...
{ "language": "en", "url": "https://stackoverflow.com/questions/130120", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Windows Forms Threading and Events - most efficient way to hand off events? My form receives asynchronous callbacks from another object on random worker threads. I have been passing the data to the main thread (where it can be used to update onscreen controls) using delegates as shown below. Performance is dreadfu...
{ "language": "en", "url": "https://stackoverflow.com/questions/130132", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: IE6 issues with transparent PNGs I've gotten used to the idea that if I want/need to use alpha-trans PNGs in a cross-browser manner, that I use a background image on a div and then, in IE6-only CSS, mark the background as "none" and include the proper "filter" argument. Is there another way? A better way? Is there a...
{ "language": "en", "url": "https://stackoverflow.com/questions/130161", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: ASP.NET not seeing Radio Button value change I have a form with some radio buttons that are disabled by default. When a value gets entered into a text box, the radio buttons are enabled via javascript. The user then selects one of the radio buttons and clicks on a submit button which posts back to the server. When ...
{ "language": "en", "url": "https://stackoverflow.com/questions/130165", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: "Clicking" Command Button from other workbook I am trying to write a macro that would "click" a command button that is in another workbook. Is that possible? Without changing any of the code within that other workbook? A: For an ActiveX button in another workbook: Workbooks("OtherBook").Worksheets("Sheet1").Command...
{ "language": "en", "url": "https://stackoverflow.com/questions/130166", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: config file syntax for configuring WCF Webservice Client Target EndPoint What is the web config syntax for specifying a WCF WebService Proxy's Default Target Endpoint? Specifically, I'm trying to configure the address that the client uses for locating the .asmx of the webservice A: Nevermind - found it. The answer ...
{ "language": "en", "url": "https://stackoverflow.com/questions/130169", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }