text
stringlengths
8
267k
meta
dict
Q: C# - ODP.NET and ora-01475 must reparse cursor to change bind variable datatype I'm getting ora-01475 whenever I try to insert a null value in a column (of type DateTime) after some records have already been inserted that have real date values. I'm using the OracleParameter constructor that takes the name and the v...
{ "language": "en", "url": "https://stackoverflow.com/questions/282067", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Getting back into Windows programming after 10 years I'd like to study up on the latest technologies for writing Windows desktop apps. My last experience was with VC++ 6 using MFC. The landscape seems more complex these days, I'm not sure if I should learn .NET, don't really know what Windows forms, WPF are etc. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/282075", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: php access to remote database Help! I have a PHP (PHP 5.2.5) script on HOST1 trying to connect to an MySql database HOST2. Both hosts are in Shared Host environments controlled through CPanel. HOST2 is set to allow remote database connections from HOST1. The PHP connect I'm using is:- $h2 = IPADDRESS; $dbu =...
{ "language": "en", "url": "https://stackoverflow.com/questions/282084", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Learning C#, ASP.NET 3.5 - what order should I learn in / what to skip? There's a lot to C# & ASP.net. Where should I start? What should I not bother focusing on? Should I learn Winforms then WPF? Ditto for webforms / Silverlight? Should I learn ASP.MVC or classic ASP.NET? If both, which first? In the either/or case...
{ "language": "en", "url": "https://stackoverflow.com/questions/282086", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Update with Data Source Control in asp.net How do you run an update query in a data source control from a button? I have the data source control with the update query configured in it. I just don't know what to put in the button_click event to make it run. A: In the event handler just call the Update method for y...
{ "language": "en", "url": "https://stackoverflow.com/questions/282087", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Set OLE Request Timeout from C++ I am instantiating a local COM server using CoCreateInstance. Sometimes the application providing the server takes a long time to start. When this happens, Windows pops a dialog box like this: Server Busy The action cannot be completed because the other program is busy. Choose 'Swi...
{ "language": "en", "url": "https://stackoverflow.com/questions/282091", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Creating a file inside a folder that doesn't exist yet in php I want my php script to create an output file in a folder based on the date. The way I'm doing this is that its supposed to get the foldername/filename from a text file outputted by another program which I am unable to edit. So the file its grabbing the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/282093", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "27" }
Q: What's the Hi/Lo algorithm? What's the Hi/Lo algorithm? I've found this in the NHibernate documentation (it's one method to generate unique keys, section 5.1.4.2), but I haven't found a good explanation of how it works. I know that Nhibernate handles it, and I don't need to know the inside, but I'm just curious. A:...
{ "language": "en", "url": "https://stackoverflow.com/questions/282099", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "502" }
Q: Are code freezes still relevant when using a continuous integration build setup? I've used a Continuous Integration server in the past with great success, and hadn't had the need to ever perform a code freeze on the source control system. However, lately it seems that everywhere I look, most shops are using the con...
{ "language": "en", "url": "https://stackoverflow.com/questions/282105", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: ToggleButton in C# WinForms Is it possible to create a toggle button in C# WinForms? I know that you can use a CheckBox control and set it's Appearance property to "Button", but it doesn't look right. I want it to appear sunken, not flat, when pressed. Any thoughts? A: You may also consider the ToolStripButton cont...
{ "language": "en", "url": "https://stackoverflow.com/questions/282118", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "85" }
Q: rails map.resources with has_many :through doesn't work? I've got three (relevant) models, specified like this: class User < ActiveRecord::Base has_many :posts has_many :comments has_many :comments_received, :through => :posts, :source => :comments end class Post < ActiveRecord::Base belongs_to :user has_...
{ "language": "en", "url": "https://stackoverflow.com/questions/282127", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: IntelliSense for Ajax and JavaScript libraries in Visual Studio I know about using a -vsdoc.js file for IntelliSense, and the one for jQuery is easy to find. What other JavaScript, Ajax, and DHTML libraries have them and where can I find those files? Also, is there a document which outlines the specifications for -...
{ "language": "en", "url": "https://stackoverflow.com/questions/282129", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Looking for lightweight java stack for creating SOAP based web services I'm probably going to be using Tomcat and the Apache Axis webapp plugin, but I'm curious as to any other potential lightweight solutions. The main goal of this is to connect to MySQL database for doing some demos. Thanks, Todd A: Jetty is a lig...
{ "language": "en", "url": "https://stackoverflow.com/questions/282132", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Simple DOS command-line to ignore data on a line after the last backslash I'm creating a batch file to make multiple directories from a list in a text file however after the directory is listed sometimes a filename is as well. Is there an easy way to have it ignore all data after the last \ on a line? A: I might s...
{ "language": "en", "url": "https://stackoverflow.com/questions/282139", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Picking up a VB6 project for a non-VB6 guy I have been given the task of modifying a VB6 project. Nothing incredibly serious, adding a couple forms and fixing a few bugs for the most part. The project uses SQL Server (if that is of any relevance). My background in programming has been VB/C# .NET, PHP, C++ and mostly...
{ "language": "en", "url": "https://stackoverflow.com/questions/282146", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How do I write unit tests in PHP? I've read everywhere about how great they are, but for some reason I can't seem to figure out how exactly I'm supposed to test something. Could someone perhaps post a piece of example code and how they would test it? If it's not too much trouble :) A: Get PHPUnit. It is very easy t...
{ "language": "en", "url": "https://stackoverflow.com/questions/282150", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "101" }
Q: PHP __get and Private class variables Assuming one has an abstract base class foo with __get() defined, and a child class bar which inherits from foo with a private variable $var, will the parent __get() be called when trying to access the private $var from outside the class? A: Yes. <?php abstract class fo...
{ "language": "en", "url": "https://stackoverflow.com/questions/282157", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Passthrough .png to 8.png if IE<=6 and 8.png exists I just found out that by converting PNG32 to PNG8 via Photoshop will fix the PNG transparency bug in IE<=6. So I had this thought that instead of serving PNG32 to all browser, why not serve PNG8 if the client is using IE<=6. I'm not really an expert when it comes...
{ "language": "en", "url": "https://stackoverflow.com/questions/282161", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to writing CC (The Creative Commons logo) in HTML How do I write the CC logo in HTML, is there something like &copy; (which gives ©)? (CC stands for Creative Commons). A: As far as I know, there is no character for this, so you'll have to use a graphic. There are some nice ones here. By the way, on this page, t...
{ "language": "en", "url": "https://stackoverflow.com/questions/282171", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Waitpid equivalent with timeout? Imagine I have a process that starts several child processes. The parent needs to know when a child exits. I can use waitpid, but then if/when the parent needs to exit I have no way of telling the thread that is blocked in waitpid to exit gracefully and join it. It's nice to have thi...
{ "language": "en", "url": "https://stackoverflow.com/questions/282176", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "55" }
Q: How do you run a "do" block in a Rails Model while still listing a :dependent? So I have a User model that :has_many other models like Documents, Videos, Posts and the like. My question arises when I execute a "do" block from the User model like so: has_many :posts do def recent find(:all, :order => 'creat...
{ "language": "en", "url": "https://stackoverflow.com/questions/282178", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Screen Off event or property on iPhone Is there a way to determine if the screen has been shut off via the top Power button? I just need to know if the screen has been somehow set to off to kill a loop that updates location. Thanks A: Your Application delegate will receive a applicationWillResignActive: message jus...
{ "language": "en", "url": "https://stackoverflow.com/questions/282183", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Javascript clarity of purpose Javascript usage has gotten remarkably more sophisticated and powerful in the past five years. One aspect of this sort of functional programming I struggle with, esp with Javascript’s peculiarities, is how to make clear either through comments or code just what is happening. Often this ...
{ "language": "en", "url": "https://stackoverflow.com/questions/282184", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: drag-and-drop problem in a Tilelist using an ItemRenderer in my flex application, I created a Tilelist. In this Tilelist, I am using an ItemRenderer to create a box consisting of an image and an VSlider in each tile. The tile need to be dragable when you click on the image, but not dragable when you slide the slide...
{ "language": "en", "url": "https://stackoverflow.com/questions/282191", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Special characters in CFMail I'm trying to auto-generate a plain text email with a trademark symbol in it. I've tried everything I can think of but it's still not going through. <cfmail from="#x#" to="#y#" subject="test" charset="UTF-8"> ™ &trade; #Chr(153)# </cfmail> A: This is an encoding issue. You state ...
{ "language": "en", "url": "https://stackoverflow.com/questions/282192", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to get memory usage under Windows in C++ I am trying to find out how much memory my application is consuming from within the program itself. The memory usage I am looking for is the number reported in the "Mem Usage" column on the Processes tab of Windows Task Manager. A: GetProcessMemoryInfo is the function yo...
{ "language": "en", "url": "https://stackoverflow.com/questions/282194", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "60" }
Q: Passing data from C to Java What is the best way to pass data between a C server to a Java applet? Currently it's done by using a buffer and copying bytes to it using memcpy, but if the object ever changes I have to hunt down every instance of where it's being sent to the applet and have it changed. Is there a bette...
{ "language": "en", "url": "https://stackoverflow.com/questions/282195", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Selecting elements with a certain background color I want to select a bunch of spans in a div whose CSS contains a particular background color. How do I achieve this? A: if i understand the question correctly, the selector [attribute=value] will not work because <span> does not contain an attribute "background-colo...
{ "language": "en", "url": "https://stackoverflow.com/questions/282198", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "30" }
Q: Customize how Outlook desktop alerts will appear for my email recipients * *Is there any way to force Outlook to display HTML in the desktop alert instead of text for a multi-part message? *Is there any way to customize what text will appear? Or is it always the first 2 lines of the email? A: I'm not sure if I ...
{ "language": "en", "url": "https://stackoverflow.com/questions/282201", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How should I go about transferring data from an ODBC app to SQL on an hourly basis? I'm trying to pull data from an ODBC app to SQL2005(dev ed) DB on an hourly basis. When I run SSIS the option to import all tables and views is grayed out and forces your to write a query. How would I go about setting up a SSIS inte...
{ "language": "en", "url": "https://stackoverflow.com/questions/282207", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Persistent Connection to Web Server (Like AJAX on Web) I am wanting to create a program that talks with a Cometd server to allow for pushing of data to the app. I have done this on the web side using AJAX, but I am a little unsure of the best way to do this with Cocoa. I can make a standard connection using NSURLReq...
{ "language": "en", "url": "https://stackoverflow.com/questions/282212", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Which distributed version control system has the best GUI front-ends for Windows? At my workplace we are using CVS as the version control system. Since we are using Windows mostly, TortoiseCVS and WinCVS serve as the GUI front-ends to CVS. Is there anything like those front-ends for one of the distributed VCS (bzr, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/282221", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: SQL select statement in UNIX inside/within IF..THEN statement I just want ask the steps when trying to create a simple SQL select statement in UNIX inside/within IF..THEN..FI statement. I know how to use the 'select' and 'if..then' statements in SQL*Plus, but I'm having a difficulties having a UNIX script to point t...
{ "language": "en", "url": "https://stackoverflow.com/questions/282222", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Parsing time without date in a TextBox I'm working on a time sheet application, where I'd like the user to be able to enter times in TextBoxes, e.g.: 8 a or 8:00 a or the like, just like you can in Excel. Now if you enter a date in a TextBox and then use DateTime.TryParse, you can enter it in several formats (Jan 31...
{ "language": "en", "url": "https://stackoverflow.com/questions/282226", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Strange behavior in .NET web service client when NOT running as Local Administrator We have encountered a very strange situation when we deployed an application at a customer site. This application is implemented as a service using C# on .NET 3. The application communicates with a web service that is written using g...
{ "language": "en", "url": "https://stackoverflow.com/questions/282228", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: DOM event precedence What order of precedence are events handled in JavaScript? Here are the events in alphabetical order... * *onabort - Loading of an image is interrupted *onblur - An element loses focus *onchange - The user changes the content of a field *onclick - Mouse clicks an object *ondblclick - Mous...
{ "language": "en", "url": "https://stackoverflow.com/questions/282245", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "68" }
Q: Multiple ordered lists boiled down to one list, where order is relative I have multiple ordered lists. Unfortunately, the order of the items isn't a simple alpha or numeric comparison, otherwise this is trivial. So what I have is something like: List #1 List #2 List #3 groundhog groundhog eas...
{ "language": "en", "url": "https://stackoverflow.com/questions/282252", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What would you recommend as an easily modifiable forum package? I'm in the process of setting up a new website which would greatly benefit from having user-forums. Since I already have user accounts, and profile details, stored away it seems that I'd benefit from choosing an open-source forum package which I could m...
{ "language": "en", "url": "https://stackoverflow.com/questions/282262", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Garbage Collector Flash Player Is there a way to force the flash garbage collector to clean up freed memory? I've seen that it takes a lot of time for flash to clean up not referenced memory... A: Unfortunately there isn't. It's something Grant Skinner has written lots about, so check his blog. A: You can add thin...
{ "language": "en", "url": "https://stackoverflow.com/questions/282280", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How does StackOverflow's 'tags' textbox autocomplete work? I know they're using a jQuery plugin, but I can't seem to find which one they used. In particular, what I'm looking for is autocomplete with exactly the same functionality as SO's autocomplete, where it will perform an AJAX command with each new word typed i...
{ "language": "en", "url": "https://stackoverflow.com/questions/282282", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "38" }
Q: How do I use HTTP Authentication for a specific URL (not a directory) I have an htaccess file that uses mod_rewrite to redirect /controller to /index.php?controller=%controller% Like this: # Various rewrite rules. <IfModule mod_rewrite.c> RewriteEngine on # Rewrite current-style URLs of the form 'index.php?cont...
{ "language": "en", "url": "https://stackoverflow.com/questions/282298", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: ASP.net 2.0 GridView Columns dependant on multiple columns in the bound result set I'm working with an ASP.net 2.0 GridView control that is bound to the results of a sql query, so it looks something like this: <asp:GridView ID="MySitesGridView" runat="server" AutoGenerateColumns="False" DataSourceID="InventoryDB" Al...
{ "language": "en", "url": "https://stackoverflow.com/questions/282308", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Embedding Excel files in XSL-FO driven (Pdf)-Document Generation we're currently generating all our official documents using XSL-FO transformation using .xml files as input and generating .pdfs & basically all the content within these .xml's is either plain text or xhtml. This works perfectly fine for every-day use-...
{ "language": "en", "url": "https://stackoverflow.com/questions/282312", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Pattern for specialization of generic class in C#? In C# I sometimes wish I could make special methods for certain "instantiations" of generic classes. UPDATE: The following code is just a dumb example of a more abstract problem - don't focus too much on time series, just the principles of "adding extra methods" for...
{ "language": "en", "url": "https://stackoverflow.com/questions/282317", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Mix opengl and directdraw in different windows of the same application? I'm developing an application with two windows: * *Window 1: Renders direct draw surfaces *Window 2: I'd like to have it do pure OpenGL calls I don't want to mix OpenGL and DirectDraw in the same window. I see from the Open GL FAQ (http://...
{ "language": "en", "url": "https://stackoverflow.com/questions/282321", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: SQL: Numbering the rows returned by a SELECT statement Suppose I have a SELECT statement that returns some set of results. Is there some way I can number my results in the following way: SELECT TOP 3 Name FROM PuppyNames ORDER BY NumberOfVotes would give me... Fido Rover Freddy Krueger ...but I want... 1, Fido...
{ "language": "en", "url": "https://stackoverflow.com/questions/282322", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: SpeechSynthezier.PhonemeReached event and control characters I am creating a small silverlight widget which pronounces a word and highlights each syllable as it is pronounced. As part of this, I am using the SpeechSynthesizer.PhonemeReached event to determine the start and end times of each phoneme (as a step in fig...
{ "language": "en", "url": "https://stackoverflow.com/questions/282323", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Can I prevent garbage collector from stopping some of my threads? Is it possible in a Compact Framework application to prevent the garbage collector from unconditionally stopping at least one of the threads, or to block GC collects at least in some portions of the code? I think it has to deal with setting real time...
{ "language": "en", "url": "https://stackoverflow.com/questions/282327", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What are five things you hate about your favorite language? There's been a cluster of Perl-hate on Stack Overflow lately, so I thought I'd bring my "Five things you hate about your favorite language" question to Stack Overflow. Take your favorite language and tell me five things you hate about it. Those might be thi...
{ "language": "en", "url": "https://stackoverflow.com/questions/282329", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "403" }
Q: java web app decorating/includes issues Background: we have a system that was written in an older CMS based on Java back during the 2002-2003 days. We want to keep moving forward with our new stuff, using tomcat, stripes, and sitemesh. We have navigation, layouts, "pods", js, css, etc, that we've taken out of the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/282332", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: jquery sortable except this one Need a way to allow sorting except for last item with in a list. Tried using the cancel option but it didn't work and I don't think that's what its for. I think a solution may be with events but would like your take on it. In practice the list is dynamically generated and relies on ...
{ "language": "en", "url": "https://stackoverflow.com/questions/282348", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: BackgroundWorker thread : updating UI and aborting operation I run a series of time consuming operations on a background worker thread. At various stages I update a (windows form) progress bar by invoking a delegate. However, one of the more time operations occurs on a single line of code. Is it possible to : a) U...
{ "language": "en", "url": "https://stackoverflow.com/questions/282363", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: POP-Before-SMTP Recently I had to move one of my web applications to a new hosting provider. The mail and web service is still held on the old hosting site however, when I try to send an email from the new server,I get an error; "The server rejected one or more recipient addresses. The server response was: 450 <ema...
{ "language": "en", "url": "https://stackoverflow.com/questions/282369", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: demote boost::function to a plain function pointer want to pass boost::bind to a method expecting a plain function pointer (same signature). typedef void TriggerProc_type(Variable*,void*); void InitVariable(TriggerProc_type *proc); boost::function<void (Variable*, void*)> triggerProc ... InitVariable(triggerProc); ...
{ "language": "en", "url": "https://stackoverflow.com/questions/282372", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "22" }
Q: Visual Studio: How do I show all classes inherited from a base class? In Visual Studio, How do I show all classes inherited from a base class? For example, in ASP.NET MVC there are several 'ActionResult' types -- and they all inherit from / implement the base class ActionResult. It looks like unless you just 'kn...
{ "language": "en", "url": "https://stackoverflow.com/questions/282377", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "164" }
Q: Can LINQ to SQL query an XML field DB-serverside? .NET 3.5, C# I have a web app with a "search" feature. Some of the fields that are searchable are first-class columns in the table, but some of them are in fact nested fields inside an XML data type. Previously, I built a system for dynamically constructing the SQL...
{ "language": "en", "url": "https://stackoverflow.com/questions/282391", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "28" }
Q: Python decorating functions before call I have a rather complex decorator written by someone else. What I want to do is call a decorated version of the function one time based on a descision or call the original function (not decorated) another time. Is this possible? A: With: decorator(original_function)() Withou...
{ "language": "en", "url": "https://stackoverflow.com/questions/282393", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Problems casting an ComObject in VB.net I have a Word.Field object which is a checkbox and the Type property equals wdFieldFormCheckBox. I am trying to cast the Word.Field object as Word.CheckBox object but I am getting casting errors. Dim chkBox as Word.CheckBox chkBox = DirectCast( myFieldInstance, Word.Checkbox)...
{ "language": "en", "url": "https://stackoverflow.com/questions/282401", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Does an IoC container replace the use of Factories I am just getting started with IoC containers so apologies if this is a stupid question. I have code like the following in an app internal static class StaticDataHandlerFactory { public static IStaticDataHandler CreateHandler(StaticDataUpdate staticDataU...
{ "language": "en", "url": "https://stackoverflow.com/questions/282406", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: .Net Compact Framework - is there any way in the SerialPort class to set the RTS control to TOGGLE? I found very annoying the fact that the SerialPort class in the .NET Framework doesn't allow to set the rts control to TOGGLE. There is a property called RTSEnable that lets me control directly the status of the RTS s...
{ "language": "en", "url": "https://stackoverflow.com/questions/282416", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to create an alias for a build target with a relative path in Scons? Background I'm trying out Scons by setting up a basic C++ sample project that has two sub-projects: * *Prj1 is an EXE that depends on Prj2 *Prj2 is a DLL that exports some functions You can see the directory structure and the contents of ...
{ "language": "en", "url": "https://stackoverflow.com/questions/282419", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: how to log in a Drupal user (or get currently-logged in user) from Flex/Flash? I have a Flash application that is hosted from within a Drupal page. Some parts of the Flash application should be available to all users, but some should only be available to a logged-in user. (The specific role doesn't matter, just th...
{ "language": "en", "url": "https://stackoverflow.com/questions/282422", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Returning redirect as response to Ajax (fetch, XHR, etc.) request What happens if the browser receives a redirect response to an ajax request? A: The ajax-request will follow that redirect afaik. The actual content (.responseText, .responseXML) will be the content from the page you are redirected to. You might be a...
{ "language": "en", "url": "https://stackoverflow.com/questions/282429", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "160" }
Q: Software for Classical Music Theory / Composition / Harmony and Counterpoint Is there any software to help in learning / understanding / experimenting with the rules of harmony and counterpoint? A: Bach-style 4 part harmony actually does follow some pretty rigid rules (no parallel 4ths, 5th or octaves, for example)...
{ "language": "en", "url": "https://stackoverflow.com/questions/282431", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: In source-control terminology what is a spike? I've seen the word "spike" used in relation to source-control. For example, a project I'm working with has three top-level folders: trunk, branches and spikes. What's the meaning of this term? A: The accepted answer isn't necessarily true anymore. With the introduction...
{ "language": "en", "url": "https://stackoverflow.com/questions/282434", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "21" }
Q: How can I use JavaScript on the client side to detect if the page was encrypted? Is it possible to detect, on the client side, whether the user is using an encrypted page or not? Put another way -- I want to know if the URL of the current page starts with http or https. A: Use window.location.protocol to check if i...
{ "language": "en", "url": "https://stackoverflow.com/questions/282444", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "52" }
Q: WSDL best practices I'm developing a SOAP application that integrates with a 3rd party. I think the WSDL of this third party is very strange. I'm pretty new to SOAP, so I don't want to go asking them to fix it if it isn't broken. Here's some things I've noticed that I consider wrong about it, though I'm sure it's...
{ "language": "en", "url": "https://stackoverflow.com/questions/282448", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: SQL Identity (autonumber) is Incremented Even with a Transaction Rollback I have a .net transaction with a SQL insert to a SQL Server 2005 database. The table has an identity primary key. When an error occurs within the transaction, Rollback() is called. The row inserts are rolled back correctly, however the next t...
{ "language": "en", "url": "https://stackoverflow.com/questions/282451", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "84" }
Q: How can I split a C# string when a member of the array may consist of more than one word? I am working on a small project to take a CSV file and then insert its data into a HTML table (I would use datagrid and dataset or datatable, but the system I will be talking to does not support ASP.NET uploads for sending news...
{ "language": "en", "url": "https://stackoverflow.com/questions/282457", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: What is the C# equivalent to Java's isInstance()? I know of is and as for instanceof, but what about the reflective isInstance() method? A: The equivalent of Java’s obj.getClass().isInstance(otherObj) in C# is as follows: bool result = obj.GetType().IsAssignableFrom(otherObj.GetType()); Note that while both Java a...
{ "language": "en", "url": "https://stackoverflow.com/questions/282459", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "94" }
Q: How to find out Subversion repository version? How can I determine current version of my repository to see if I need to upgrade it (svnadmin upgrade)? In reality I'm hosting SVN with 3rd party and I want to find out if I need to ask them to upgrade my repos or not. I'm asking since 1.5 server will keep repo version ...
{ "language": "en", "url": "https://stackoverflow.com/questions/282460", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "77" }
Q: String operation optimisation in C# The following C# code takes 5 minutes to run: int i = 1; string fraction = ""; while (fraction.Length < 1000000) { fraction += i.ToString(); i++; } "Optimising it" like this causes it to run in 1.5 seconds: int i = 1; string fraction = ""; while (fraction.Length < 1000000...
{ "language": "en", "url": "https://stackoverflow.com/questions/282468", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Debugging JavaScript errors in Internet Explorer on Vista with UAC enabled Consider the following trivial HTML page that throws an error: <html><head><script> throw new Error('oops'); alert('should not reach here'); </script></head></html> The user I am logged into Vista with is a member of both the Administrat...
{ "language": "en", "url": "https://stackoverflow.com/questions/282475", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Div with Border Images What is a good way to set up a single container div with some border images surrounding it (in my case only on the left, bottom, and right sides)? I have it centered at the top of the page, overlapping everything else (so like that OSX-style slide-down dialog). Here's the basic layout: Here's...
{ "language": "en", "url": "https://stackoverflow.com/questions/282489", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: What is setTimeout(function(){//dostuff}, 0); actually supposed to do? Does this pattern: setTimeout(function(){ // do stuff }, 0); Actually return control to the UI from within a loop? When are you supposed to use it? Does it work equally well in all browsers? A: http://blog.thinkature.com/index.php/...
{ "language": "en", "url": "https://stackoverflow.com/questions/282499", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What is profiling all about and how can I profile my Java program? I've heard a lot about profiling. What is this all about? As far as I understand this is some kind of performance measurement but can someone elaborate this on more clearly so that a newbie can grasp the idea. Also, I use Eclipse IDE for my Java prog...
{ "language": "en", "url": "https://stackoverflow.com/questions/282502", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: PropertyGrid: getting PropertyValueChanged notifications from a CollectionEditor The PropertyGrid control is very useful for editing objects at run-time. I'm using it as follows: Form form = new Form(); form.Parent = this; form.Text = "Editing MyMemberVariable"; PropertyGrid p = new PropertyGrid(); p.Parent = form;...
{ "language": "en", "url": "https://stackoverflow.com/questions/282503", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Choosing buffer size for FTP and HTTP transfers How does one choose the size of a buffer (bytes I read from or write to socket) for the maximum throughput when implementing a low-level HTTP and FTP transfer? My application should transfer data with HTTP or FTP on connections varying from 130 Kbps to 3 Mbps (I know t...
{ "language": "en", "url": "https://stackoverflow.com/questions/282504", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: How do you communicate between eclipse declarative services and Views (ContentProviders) Say you have an eclipse plugin with various views, these views should display data from some OSGi bundle that pushes data to the Views. Rather than have every view communicate with the OSGi bundle, I have an intermediate Facade...
{ "language": "en", "url": "https://stackoverflow.com/questions/282509", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Copy an Ant argument list into a property In Ant is there any way to do something like this: <arguments id="arg-list"> <arg value="arg1" /> <arg value="arg2" /> </arguments> <property name="prop1" refid="arg-list" /> I'm trying to write a macro for psexec and I'm looking for a nice way to pass in the argum...
{ "language": "en", "url": "https://stackoverflow.com/questions/282522", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Commenting out comments I've noticed, using visual studio 2003, that I can "comment out" my comments to make them no longer be comments. This one needs an example: If I have: /* int commented_out = 0; */ I can comment out the /* and */ with // and code within the /* and */ is no longer "commented out" (the text cha...
{ "language": "en", "url": "https://stackoverflow.com/questions/282526", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Export to Word Document in C# I'm looking for a .NET library that will allow creation of a Word document. I need to export HTML based content to a Word doc (97-2003 format, not docx). I know that there are the Microsoft Office Automation libraries and Office interop, but as far as I can tell, they require that you ...
{ "language": "en", "url": "https://stackoverflow.com/questions/282531", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Java actionListener for a nameless JButton? I was wondering if there is a way to implement an action listener for a Jbutton without a name. For example, I have the following for loop that creates a button for each letter of the alphabet. for (int i = 65; i < 91; i++){ alphabetPanel.add(new JButton("<html><cente...
{ "language": "en", "url": "https://stackoverflow.com/questions/282539", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Redirect rule in .htaccess is taking me to the wrong place I'm having trouble with redirecting urls using the .htaccess file. This is what my .htaccess file looks like: Redirect 301 /file-name/example.php http://www.mysite.com/file-name/example-001.php Redirect 301 /section-name/example.php http://www.my-site.com/se...
{ "language": "en", "url": "https://stackoverflow.com/questions/282541", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: .Net Compact Framework 3.5 HTTP POST I'm writing my first Windows CE app using the .NET Compact Framework v3.5. I need the app to be able to do an HTTP POST to a URL. It appears that the .NET CF does not have System.Web. So, I could use some guidence on how to accomplish and HTTP Posts using the .Net CF. Thanks, Gre...
{ "language": "en", "url": "https://stackoverflow.com/questions/282545", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: how to add "Existing solution folder recursively" to my VS2005 solution I tried drag and drop from the explorer, but no luck with following error: "Folders cannot be dropped or pasted as solution items. Choose an individual document instead." I know we can create each folders/subfolders manually and add each file,...
{ "language": "en", "url": "https://stackoverflow.com/questions/282552", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: C++ Opening a file and inputting data to a class object Simple question, hopefully an easy way and just want to verify I'm doing it the correct / efficient way. I have a class T object, which is typically put into a vector that is created in my main() function. It can be any kind of data, string, int, float.. etc. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/282570", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: ASP.NET MVC one route, two different views I'm trying to design a homepage for an MVC site that has two different views, based on if the user is logged in or not. So image the default (not logged in) view is showing general, nonspecific info. If i'm logged in, the view is showing mostly personal stuff instead. What'...
{ "language": "en", "url": "https://stackoverflow.com/questions/282571", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How can I implement a Read-Through File Cache in ASP.NET? I have a system which sits on a web server and generates files on the fly in response to HTTP requests. This is currently implemented as an HTTPHandler. Once the files are generated, they don't change very often, so I'd like to implement a cache. Ideally, I'd...
{ "language": "en", "url": "https://stackoverflow.com/questions/282575", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Admin Controllers in Merb How does one do namespaced controllers in Merb, for instance to create an admin section to the site? In Rails one would use Admin::CategoriesController, is this similar in Merb or is this another recommended way of doing it? A: The namespace method seems to do it. This is placed in the rou...
{ "language": "en", "url": "https://stackoverflow.com/questions/282576", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Image DPI Explained Attempting to write a definition of DPI has lead me to: DPI (dots), PPI (points), LPI (lines) all refer to the same concept hereafter referred to as DPI. DPI is a device dependent measurement. It says, "This is the resolution of this device." Vector based files are not tied to any one DPI (they ...
{ "language": "en", "url": "https://stackoverflow.com/questions/282580", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Computing a mean confidence interval without storing all the data points For large n (see below for how to determine what's large enough), it's safe to treat, by the central limit theorem, the distribution of the sample mean as normal (gaussian) but I'd like a procedure that gives a confidence interval for any n. T...
{ "language": "en", "url": "https://stackoverflow.com/questions/282600", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: "Package LISP-UNIT is not loaded" error in Cusp Eclipse plug-in I'm getting the following error in Eclipse using the Cusp plug-in: Package LISP-UNIT is not loaded How do I fix it? A: Is it an error? I found the following in google groups (first item if you google for that message): There is an option in prefere...
{ "language": "en", "url": "https://stackoverflow.com/questions/282601", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: C++ compiler optimization of passed arguments I'm using a logging module that can have reporting enabled/disabled at runtime. Calls generally go something like: WARN( "Danger Will Robinson! There are " + boost::lexical_cast<string>(minutes) + " minutes of oxygen left!" ); I'm using an inline function...
{ "language": "en", "url": "https://stackoverflow.com/questions/282603", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Best way to export/import MS Sql 2008 Geography data (ANSWER) How to export some Geography data from a Microsoft Sql Server 2008. You'll need to use the command line argument BCP to dump the data in it's original (native) format to a binary file. Then on the other server you can bulk insert this binary data back int...
{ "language": "en", "url": "https://stackoverflow.com/questions/282604", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: ASP.net Profiles and Membership - Custom Providers or should completely I roll my own? first off, I know that this question could be borderline-duplicate to this one, and yes, it is a bit ironic that I am asking a question for something that I even answered myself. Now, I am talking about ASP.net Profiles. I am buil...
{ "language": "en", "url": "https://stackoverflow.com/questions/282613", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Use custom MSBuild tasks from the same solution? I'm a new to MSBuild and wanted to play around with it a bit, but I just cannot figure out why this isn't working. So my solution has two projects: "Model" and "BuildTasks". BuildTasks just has a single class: using Microsoft.Build.Utilities; namespace BuildTasks { ...
{ "language": "en", "url": "https://stackoverflow.com/questions/282615", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "23" }
Q: Calculating the maximum size of derived classes We have a My_list class that has a list of pointers to Abstract_things. To optimize on memory usage, all derived Things use one memory pool that is established with the "new and delete" stereotype. In order to size the pool properly during the initization of the appl...
{ "language": "en", "url": "https://stackoverflow.com/questions/282619", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Define data access layer It seems that everybody knows you're supposed to have a clear distinction between the GUI, the business logic, and the data access. I recently talked to a programmer who bragged about always having a clean data access layer. I looked at this code, and it turns out his data access layer is ...
{ "language": "en", "url": "https://stackoverflow.com/questions/282622", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: VBScript LDAP: Is there a way to query for physicalDeliveryOfficeName using the email address in Active Directory? I'm attempting to utilize VBScript to connect pull the physicalDeliveryOfficeName attribute in Active Directory by providing the email address. I know how to do it with a common name like the followin...
{ "language": "en", "url": "https://stackoverflow.com/questions/282627", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }