text
stringlengths
8
267k
meta
dict
Q: How to use Java reflection when the enum type is a Class? I was using an enum in which the constant was a Class. I needed to invoke a method on the constant but could not introduce a compile time dependency and the enum was not always available at runtime (part of optional install). Therefore, I wanted to use reflec...
{ "language": "en", "url": "https://stackoverflow.com/questions/140537", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "21" }
Q: What character set should I assume the encoded characters in a URL to be in? RFC 1738 specifies the syntax for URL's, and mentions that URLs are written only with the graphic printable characters of the US-ASCII coded character set. The octets 80-FF hexadecimal are not used in US-ASCII, and the octets 00-1F...
{ "language": "en", "url": "https://stackoverflow.com/questions/140549", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "27" }
Q: What is the best way to store a large amount of text in a SQL server table? What is the best way to store a large amount of text in a table in SQL server? Is varchar(max) reliable? A: In SQL 2005 and higher, VARCHAR(MAX) is indeed the preferred method. The TEXT type is still available, but primarily for backward co...
{ "language": "en", "url": "https://stackoverflow.com/questions/140550", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "52" }
Q: Buying a machine for continuous integration - key factors? I'm planning to propose to my (very small) company that we buy a computer to run continous integration on. If they say yes, the task of actually buying the machine will probably fall on me, so my question is: What do I look for in a computer that will be use...
{ "language": "en", "url": "https://stackoverflow.com/questions/140574", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Enterprise App and the Enterprise App Client I came aboard a new project with a new company and we are trying to use JPA to do some DB work. So we have an Ear with an EJB, a webservice, and then there is a app client in the ear that really does all the work. The Webservice, calls the EJB, and the EJB calls the cli...
{ "language": "en", "url": "https://stackoverflow.com/questions/140575", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I detect if my program runs in an Active Directory environment? How do I detect if my program runs in an Active Directory environment? I'm using C# and .Net 2.0 A: Try getting Environment.UserDomainName and comparing it to Environment.MachineName. If the two are the same then it's likely that the user does ...
{ "language": "en", "url": "https://stackoverflow.com/questions/140579", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: How do I call a WCF webservice from Silverlight? I am trying to call a WCF webservice (which I developed) from a Silverlight application. For some reason the Silverlight app does not make the http soap call to the service. I know this because I am sniffing all http traffic with Fiddler (and it is not a localhost cal...
{ "language": "en", "url": "https://stackoverflow.com/questions/140602", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What tools are available to measure the "health" of an enterprise web-based system? I assist in maintaining an enterprise web-based system (programmed in J2EE, but this is a more general question) and I'd like to know: what good tools are out there to measure the "health" of an enterprise system? For instance, tool...
{ "language": "en", "url": "https://stackoverflow.com/questions/140608", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to address OpenID providers downtime? OpenID is all good... UNTIL the provider goes down. At that point you're potentially locked out of EVERYTHING (since you jumped on the bandwagon and applied OpenID everywhere you could). This question came up because I can't, for the life of me, login with my myopenid.com p...
{ "language": "en", "url": "https://stackoverflow.com/questions/140613", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: How can I use post-commit hooks to copy committed files to a web directory from SVN? My Ubuntu server has Apache and Subversion installed. I use this server as a staging server, purely for testing purposes. I use Apache to host the web application, and Subversion to keep versioned copies of the source code. My curre...
{ "language": "en", "url": "https://stackoverflow.com/questions/140614", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Is there a NAnt task that will display all property name / values? Is there a NAnt task that will echo out all property names and values that are currently set during a build? Something equivalent to the Ant echoproperties task maybe? A: I wanted them sorted so I expanded on the other answer. It's not very efficie...
{ "language": "en", "url": "https://stackoverflow.com/questions/140616", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Session Variables and Web Services I just wrote my first web service so lets make the assumption that my web service knowlege is non existant. I want to try to call a dbClass function from the web service. However I need some params that are in the session. Is there any way I can get these call these session variabl...
{ "language": "en", "url": "https://stackoverflow.com/questions/140627", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: "Show All Files" option missing in VS Database Project The VS Database Project does not seem to have the "Show All Files" option in the Solution Explorer. Does anyone know of a way to turn the option on in VS? The "Show All Files" option on the solution explorer actually does two things. With the option selected, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/140632", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: NSIS get path of current installer file that is running Is there an NSIS var to get the path of the currently running installer? A: Found it: $EXEPATH A: There are few useful variables: * *$EXEPATH - holds installer filename. *$EXEDIR - holds the complete path to the installer. So according to the topic NSI...
{ "language": "en", "url": "https://stackoverflow.com/questions/140640", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "27" }
Q: ORA-01031: insufficient privileges when selecting view When I try to execute a view that includes tables from different schemas an ORA-001031 Insufficient privileges is thrown. These tables have execute permission for the schema where the view was created. If I execute the view's SQL Statement it works. What am I...
{ "language": "en", "url": "https://stackoverflow.com/questions/140643", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "30" }
Q: Where can I find documentation for the Erlang shell? The Erlang documentation contains the documentation of modules. Where can I find the documentation of the Erlang shell? (Which is not a module, I suppose.) A: This page in the documentation seems to be a starting point. Especially the link in it. Check also the f...
{ "language": "en", "url": "https://stackoverflow.com/questions/140648", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How often should you refactor? I had a discussion a few weeks back with some co-workers on refactoring, and I seem to be in a minority that believes "Refactor early, refactor often" is a good approach that keeps code from getting messy and unmaintainable. A number of other people thought that it just belongs in the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/140677", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "62" }
Q: Firebug - how can I run multiline scripts or create a new JavaScript file? Is there a way in Firebug to start a new script file to apply to page? Basically I want to do work like I'd normally do on the Firebug console but be able to to paste in multi-line functions, etc. It doesn't seem like the console is amenabl...
{ "language": "en", "url": "https://stackoverflow.com/questions/140680", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: What high level languages support multithreading? I'm wondering which languages support (or don't support) native multithreading, and perhaps get some details about the implementation. Hopefully we can produce a complete overview of this specific functionality. A: Erlang has built-in support for concurrent program...
{ "language": "en", "url": "https://stackoverflow.com/questions/140696", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: Glassfish: web application deployed with non-root context interprets requests relative to domain1/docroot The webapp uses Spring MVC. <bean class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping"> <property name="urlMap"> <map> <entry key="/*" value-ref="defaultHandler"/> ...
{ "language": "en", "url": "https://stackoverflow.com/questions/140708", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How do I ensure that user entered data containing international characters doesn't get corrupted? It often happens that characters such as é gets transformed to é, even though the collation for the MySQL DB, table and field is set to utf8_general_ci. The encoding in the Content-Type for the page is also set to UTF8...
{ "language": "en", "url": "https://stackoverflow.com/questions/140728", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: Why should I upgrade from SQL2000 to SQL2005? I'm looking for the single biggest reason you are glad that you've already made the jump from SQL2000 to SQL2005. A: * *Recursion without creating temporary tables. *Native Exception support (Try/Catch instead of if @Error goto) A: Because: Microsoft would like to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/140733", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Best way to cache resized images using PHP and MySQL What would be the best practice way to handle the caching of images using PHP. The filename is currently stored in a MySQL database which is renamed to a GUID on upload, along with the original filename and alt tag. When the image is put into the HTML pages it is ...
{ "language": "en", "url": "https://stackoverflow.com/questions/140734", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: In BIRT, how do I access an arbitrary data set from JavaScript? I am building my first report in BIRT. Very quickly I ran into a problem in which I wanted to display some text or data based on an expression that included data from two different tables (not tables that can/should be joined - (hypothetically example- ...
{ "language": "en", "url": "https://stackoverflow.com/questions/140743", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Is it possible to compile .NET IL code to machine code? I would like to distribute my .NET programs without the .NET framework. Is it possible to compile a .NET program to machine code? A: There are some third party tools that do this, e.g. * *http://www.remotesoft.com/linker/ *http://www.xenocode.com/ A: Anot...
{ "language": "en", "url": "https://stackoverflow.com/questions/140750", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "30" }
Q: How do you manipulate GUID's when programming C or C++ in Windows? How do you manipulate GUID's when doing Windows programming in C or C++? A: Under Win32 if you want to manipulate GUID's you can use the UuidXXX() Network/RPC functions: * *UuidCompare() *UuidCreate() *UuidCreateNil() *UuidCreateSequential() ...
{ "language": "en", "url": "https://stackoverflow.com/questions/140751", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Looking for File Traversal Functions in Python that are Like Java's In Java you can do File.listFiles() and receive all of the files in a directory. You can then easily recurse through directory trees. Is there an analogous way to do this in Python? A: As a long-time Pythonista, I have to say the path/file manipul...
{ "language": "en", "url": "https://stackoverflow.com/questions/140758", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: How do I know WHEN to close an HTTP 1.1 Keep-Alive Connection? I am writing a web server in Java and I want it to support HTTP 1.1 Keep-Alive connections. But how can I tell when the client is done sending requests for a given connection? (like a double end-of-line or something). Lets see how stackoverflow handles ...
{ "language": "en", "url": "https://stackoverflow.com/questions/140765", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: How to simplify this code (generates a random int between min and max base on unsigned int)? The code is return min + static_cast<int>(static_cast<double>(max - min + 1.0) * (number / (UINT_MAX + 1.0))); number is a random number obtained by rand_s. min and max are ints and represent minimum and maximum values (i...
{ "language": "en", "url": "https://stackoverflow.com/questions/140786", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I test if another installation is already in progress? Assuming I'm trying to automate the installation of something on windows and I want to try to test whether another installation is in progress before attempting install. I don't have control over the installer and have to do this in the automation framewo...
{ "language": "en", "url": "https://stackoverflow.com/questions/140820", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Can a macro be used for read-only access to a variable? Can you define a macro that accesses a normal variable, but in a read-only fashion (other than defining it as a call to a function)? For example, can the VALUE macro in the following code be defined in such a way that the dostuff() function causes a compile err...
{ "language": "en", "url": "https://stackoverflow.com/questions/140825", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Has anyone used Raven? What do you think about this build tool? I'm thinking of migrating from maven2 to raven (my poms are getting bigger and bigger), but I'd like to hear some opinions first. Thanks! @andre: Thank's for writing but I was actually looking for real experiences using raven. Anyway, the fact that nobo...
{ "language": "en", "url": "https://stackoverflow.com/questions/140843", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to avoid SSIS FTP task from failing when there are no files to download? I'm using SQL Server 2005, and creating ftp tasks within SSIS. Sometimes there will be files to ftp over, sometimes not. If there are no files, I don't want the task nor the package to fail. I've changed the arrow going from the ftp tas...
{ "language": "en", "url": "https://stackoverflow.com/questions/140850", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: Nested class in .net I have a nested class. I want to access the outer and nested classes in other class. How to access both class properties and methods and my condition is i want to create object for only one class plz provide the code snippet A: In my opinion, the reason to nest a class is that it will only ever...
{ "language": "en", "url": "https://stackoverflow.com/questions/140852", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Can you make a site with ASP.NET MVC Framework using .NET 2.0? Is it possible to make a site with ASP.NET MVC Framework using .NET 2.0? I am limited to using .NET 2.0 (we use VS 2008, but we have to use the 2.0 Framework) and I really want to try out the MVC Framework. A: Scott Hanselman described a way to make it...
{ "language": "en", "url": "https://stackoverflow.com/questions/140858", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Is there ever any reason not to take the advice of the Database Engine Tuning Advisor? I'm on a team maintaining a .Net web app with a SQL Server 2005 back end. The system's been running a little slow in places lately, so after doing all the tuning kind of stuff we could think of (adding indexes, cleaning up really...
{ "language": "en", "url": "https://stackoverflow.com/questions/140869", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Windows Installer - upgrade resuming after reboot I have a Windows Installer MSI package that installs drivers which sometimes require a restart before they can be upgraded; the drivers are installed by a deferred custom action after WriteRegistryValues. When a reboot IS needed there's a rollback and the user is tol...
{ "language": "en", "url": "https://stackoverflow.com/questions/140887", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: IE Script debugging pop up In order to debug an asp.net web app I have to have IE Script debugging enabled. Unfortunately, in the past week or so google's analytics javascript has developed a problem. So that when I browse to a site that has google analytics I receive the little pop up "A runtime error has occurre...
{ "language": "en", "url": "https://stackoverflow.com/questions/140899", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Querying XML like SQL? Is there any framework for querying XML SQL Syntax, I seriously tire of iterating through node lists. Or is this just wishful thinking (if not idiotic) and certainly not possible since XML isn't a relational database? A: .Net Framework provides LINQ to do this or you can use the .Net System...
{ "language": "en", "url": "https://stackoverflow.com/questions/140908", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How to implement sorting in a listview while maintaining neighboring columns? I have a ListView that has several columns. One of them contains "Names", the other contains "Amount". I would like to allow the user to click the Names column in the listview and have it sort alphabetically and also allow the user to c...
{ "language": "en", "url": "https://stackoverflow.com/questions/140918", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Has anyone used Ruby/Rails with a Sales Logix database? Has anyone used Ruby/Rails with a Sales Logix database? A: This page says SalesLogix runs on MS SQL Server or Oracle, both of which can connect with Rails through ActiveRecord. Here is a page that details setting up for MS SQL (which is what is more likely to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/140922", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Normalize newlines in C# I have a data stream that may contain \r, \n, \r\n, \n\r or any combination of them. Is there a simple way to normalize the data to make all of them simply become \r\n pairs to make display more consistent? So something that would yield this kind of translation table: \r --> \r\n \n ...
{ "language": "en", "url": "https://stackoverflow.com/questions/140926", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "33" }
Q: Partial class definition on C++? Anyone knows if is possible to have partial class definition on C++ ? Something like: file1.h: class Test { public: int test1(); }; file2.h: class Test { public: int test2(); }; For me it seems quite useful for definining multi-platform classes that ha...
{ "language": "en", "url": "https://stackoverflow.com/questions/140935", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "41" }
Q: Has anyone used C# with a Sales Logix database? Has anyone used C# with a Sales Logix database? A: Yes. I rewrote a History tab that worked better and faster than the original Best/Sage built-in tab version using datagridviews in C#. It was a .NET plugin and I used Ryan Farley's instructions for getting it to wor...
{ "language": "en", "url": "https://stackoverflow.com/questions/140936", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-4" }
Q: Is there a way to make Strongly Typed Resource files public (as opposed to internal)? Here's what I'd like to do: I want to create a library project that contains my Resource files (ie, UI Labels and whatnot). I'd like to then use the resource library both in my UI and in my Tests. (Ie, basically have a common plac...
{ "language": "en", "url": "https://stackoverflow.com/questions/140937", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "22" }
Q: Faster Directory Walk with VB6 Query: Cache and Ram issues? Below is a rather simple function which counts how many files are on a machine. Called on "C:\", it takes about 5 seconds to run. Unless I haven't run it in a while or first run a ram-clearing program, in which case it takes 60 seconds or more. I wouldn'...
{ "language": "en", "url": "https://stackoverflow.com/questions/140948", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Grab and move application windows from a .NET app? Is it possible for a .NET application to grab all the window handles currently open, and move/resize these windows? I'd pretty sure its possible using P/Invoke, but I was wondering if there were some managed code wrappers for this functionality. A: Yes, it is possi...
{ "language": "en", "url": "https://stackoverflow.com/questions/140993", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How can I set the text of a WPF Hyperlink via data binding? In WPF, I want to create a hyperlink that navigates to the details of an object, and I want the text of the hyperlink to be the name of the object. Right now, I have this: <TextBlock><Hyperlink Command="local:MyCommands.ViewDetails" CommandParameter="{Bindi...
{ "language": "en", "url": "https://stackoverflow.com/questions/140996", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "135" }
Q: Javascript error: [elementname] has no properties I'm doing some maintenance coding on a webapp and I am getting a javascript error of the form: "[elementname] has no properties" Part of the code is being generated on the fly with an AJAX call that changes innerHTML for part of the page, after this is finished I nee...
{ "language": "en", "url": "https://stackoverflow.com/questions/141002", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Creating a XAML Resource from Code Without a Key Is there a way to add a resource to a ResourceDictionary from code without giving it a resource key? For instance, I have this resource in XAML: <TreeView.Resources> <HierarchicalDataTemplate DataType="{x:Type xbap:FieldPropertyInfo}" ItemsSource="{Binding...
{ "language": "en", "url": "https://stackoverflow.com/questions/141007", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Roll Up Task in Team Foundation Server We are using TFS 2008 for project managmeent and I am looking for a method to roll up smaller tasks into larger tasks within tfs. Our work flow works like this: * *I create a new large work item, say 'Implement web page X' and assign it to my developer (lets call him Brad) ...
{ "language": "en", "url": "https://stackoverflow.com/questions/141019", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What's a good API for recording/capturing and playing back sound in Delphi and/or C#? <flavor> I want to create a spelling test program for my grade schoolers that would let them enter and record their spelling words then test them on them through out the week.</flavor> What's a good Delphi API with which I could se...
{ "language": "en", "url": "https://stackoverflow.com/questions/141023", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: ActionScript3 User Interface Components? After using AS2 for several years, I'm getting started with writing applications in AS3 (Flash9/Flash10). I've come to the point where I need some full sets of GUI components, and I need to decide which set I'm going to use. Back in the AS2 days, the built in components inclu...
{ "language": "en", "url": "https://stackoverflow.com/questions/141024", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Is the SendChuncked Property missing from System.Net.HttpWebRequest in Silverlight 2? I need to send large files from silverlight 2 beta 2, so I need to set the sendchuncked property to true, but the property doesn't seem to exist. I've seen other posts on the internet where people have been able to set this in Sil...
{ "language": "en", "url": "https://stackoverflow.com/questions/141031", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I replace the *first instance* of a string in .NET? I want to replace the first occurrence in a given string. How can I accomplish this in .NET? A: In C# syntax: int loc = original.IndexOf(oldValue); if( loc < 0 ) { return original; } return original.Remove(loc, oldValue.Length).Insert(loc, newValue); ...
{ "language": "en", "url": "https://stackoverflow.com/questions/141045", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "118" }
Q: MS Paint command line switches I have been looking for documentation related to interacting with MSPaint from the command line. I have only found references to /p, /pt and /wia, but no guidance as to how to use them and their limitations. I am trying to send some graphics files to the printer and when I drop the fil...
{ "language": "en", "url": "https://stackoverflow.com/questions/141052", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Crystal Report 10.5 [included with Visual Studio 2008] Selection by Image column I have an Image column (Allow Null = true) in SQL Server 2005. I am using Crystal Reports designer (ver 10.5) that comes with Visual Studio 2008. Crystal sees the column as blob field and puts an image object for the column. When I am...
{ "language": "en", "url": "https://stackoverflow.com/questions/141068", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to iterate over a dictionary? I've seen a few different ways to iterate over a dictionary in C#. Is there a standard way? A: Generally, asking for "the best way" without a specific context is like asking what is the best color? One the one hand, there are many colors and there's no best color. It depends on ...
{ "language": "en", "url": "https://stackoverflow.com/questions/141088", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3199" }
Q: Are "dirty reads" safe to use in Terracotta? "Dirty reads", meaning reading an object's value even though it is write-locked by another thread, are described on Terracotta's website, yet I've heard that they shouldn't be used, even if you don't care about the possibility that you might get old data when you dirty-re...
{ "language": "en", "url": "https://stackoverflow.com/questions/141090", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do I integrate the ASP .Net Model View Presenter (MVP) pattern and static page methods marked as [WebMethod]? In an asp.net application, I would like to combine the use of the Webclient Software Factory (WCSF), and its associated Model View Presenter pattern (MVP), with Page Method, that is static methods on the...
{ "language": "en", "url": "https://stackoverflow.com/questions/141104", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How to find the foreach index? Is it possible to find the foreach index? in a for loop as follows: for ($i = 0; $i < 10; ++$i) { echo $i . ' '; } $i will give you the index. Do I have to use the for loop or is there some way to get the index in the foreach loop? A: PHP arrays have internal pointers, so try this...
{ "language": "en", "url": "https://stackoverflow.com/questions/141108", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "631" }
Q: Why is deleting a branch in CVS not recommended? Under what circumstances would this or would this not be safe? I have a branch that has a four changes (no file add or deletes). Would this be safe to delete? Edit: The reason for wanting to delete it is that it was misnamed and is going to lead to confusion. A: Peop...
{ "language": "en", "url": "https://stackoverflow.com/questions/141123", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "26" }
Q: What is important to keep in mind when designing a database? What is important to keep in mind when designing a database? I don't want to limit your answer to my needs as I am sure that others can benefit from your insights as well. But I am planning a content management system for a multi-client community driven si...
{ "language": "en", "url": "https://stackoverflow.com/questions/141126", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: Does TCP/IP prevent packet replays? Does TCP/IP prevent multiple copies of the same packet from reaching the destination? Or is it up to the endpoint to layer idempotency logic above it? Please reference specific paragraphs from the TCP/IP specification if possible. A: It's the TCP stack's job to recover from dupli...
{ "language": "en", "url": "https://stackoverflow.com/questions/141128", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Calculate timespan in JavaScript I have a .net 2.0 ascx control with a start time and end time textboxes. The data is as follows: txtStart.Text = 09/19/2008 07:00:00 txtEnd.Text = 09/19/2008 05:00:00 I would like to calculate the total time (hours and minutes) in JavaScript then display it in a textbox on the page....
{ "language": "en", "url": "https://stackoverflow.com/questions/141136", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: Why does Java not have block-scoped variable declarations? The following method does not work because the inner block declares a variable of the same name as one in the outer block. Apparently variables belong to the method or class in which they are declared, not to the block in which they are declared, so I theref...
{ "language": "en", "url": "https://stackoverflow.com/questions/141140", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: SQL trace in Great Plains shows Invalid column name 'desSPRkmhBBCreh' This error seems to just pop up now and again. It is not restricted to a single table and even happens on tables it just created. Anybody else see this weird behavior? [Edit w/solution] It turns out that this query is used to determine if the ta...
{ "language": "en", "url": "https://stackoverflow.com/questions/141144", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to find my Subversion server version number? I want to know if my server is running Subversion 1.5. How can I find that out? Also would be nice to know my SVN client version number. svn help hasn't been helpful. Note: I don't want my project's revision number, etc. This question is about the Subversion software ...
{ "language": "en", "url": "https://stackoverflow.com/questions/141146", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "305" }
Q: How can I determine installed SQL Server instances and their versions? I'm trying to determine what instances of sql server/sql express I have installed (either manually or programmatically) but all of the examples are telling me to run a SQL query to determine this which assumes I'm already connected to a particula...
{ "language": "en", "url": "https://stackoverflow.com/questions/141154", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "251" }
Q: How can I determine if a different process id is running using Java or JRuby on Linux? I need to see if a given process id is running, and it must work in either Java or JRuby (preferably a Ruby solution). It can be system dependent for Linux (specifically Debian and/or Ubuntu). I already have the PID I am looking ...
{ "language": "en", "url": "https://stackoverflow.com/questions/141162", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: C# Dynamically created LinkButton Command Event Handler So I have a weird situation here... I have an System.Web.UI.WebControls.WebParts.EditorPart class. It renders a "Search" button, when you click this button, it's clickHandler method does a DB search, and dynamically creates a LinkButton for each row it returns,...
{ "language": "en", "url": "https://stackoverflow.com/questions/141169", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do I detect a keyboard modifier in a bookmarklet? Is there a way to detect if the user is holding down the shift key (or other modifier keys) when executing a javascript bookmarklet? In my tests of Safari 3.1 and Firefox 3, window.event is always undefined. A: window.event is an IE only. Event objects are pass...
{ "language": "en", "url": "https://stackoverflow.com/questions/141198", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How to best handle per-Model database connections with ActiveRecord? I'd like the canonical way to do this. My Google searches have come up short. I have one ActiveRecord model that should map to a different database than the rest of the application. I would like to store the new configurations in the database.ym...
{ "language": "en", "url": "https://stackoverflow.com/questions/141201", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: AppDomain And the Current Directory I have a class that utilizes a directory swap method for the Environment.CurrentDirectory. The code looks something like this: var str = Environment.CurrentDirectory; Environment.CurrentDirectory = Path.GetDirectoryName(pathToAssembly); var assembly = Assembly.Load(Path.GetFil...
{ "language": "en", "url": "https://stackoverflow.com/questions/141202", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: When would I need a SecureString in .NET? I'm trying to grok the purpose of .NET's SecureString. From MSDN: An instance of the System.String class is both immutable and, when no longer needed, cannot be programmatically scheduled for garbage collection; that is, the instance is read-only after it is created and it...
{ "language": "en", "url": "https://stackoverflow.com/questions/141203", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "185" }
Q: What is the proper way to ensure a SQL connection is closed when an exception is thrown? I use a pattern that looks something like this often. I'm wondering if this is alright or if there is a best practice that I am not applying here. Specifically I'm wondering; in the case that an exception is thrown is the code ...
{ "language": "en", "url": "https://stackoverflow.com/questions/141204", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: How do you pass parameters to called function using ASP.Net Ajax $addHandler I am trying to use the $addHandler function to add a handler to a text box's click event var o=$get('myTextBox'); var f = Type.parse('funcWithArgs'); $addHandler(o, 'click', f); However I need to pass parameters to the called function. Ho...
{ "language": "en", "url": "https://stackoverflow.com/questions/141207", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to have a LinkClicked event using an ArrayList of LinkLabels in .NET I'm working on a form that will display links to open different types of reports. This system has different types of users, so the users should only be able to see the links to the types of reports they can access. Currently, the way I have th...
{ "language": "en", "url": "https://stackoverflow.com/questions/141212", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How many database indexes is too many? I'm working on a project with a rather large Oracle database (although my question applies equally well to other databases). We have a web interface which allows users to search on almost any possible combination of fields. To make these searches go fast, we're adding indexes ...
{ "language": "en", "url": "https://stackoverflow.com/questions/141232", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "127" }
Q: Does java have an equivalent to the C# "using" clause I've seen reference in some C# posted questions to a "using" clause. Does java have the equivalent? A: The nearest equivalent within the language is to use try-finally. using (InputStream in as FileInputStream("myfile")) { ... use in ... } becomes final Inp...
{ "language": "en", "url": "https://stackoverflow.com/questions/141241", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "27" }
Q: Exceptions vs Result Codes for a socket client class I have a class that encapsulates tcp socket communications with a server. For each command message sent to the server, the server will send back a response message that invariably contains a response code (OK, Fail). Using my class, each command can be executed ei...
{ "language": "en", "url": "https://stackoverflow.com/questions/141242", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Controlling property names on serialized ASP.Net Ajax Objects To start, I know there are two "kinds" of JSON serialization currently built into ASP.Net: you can either use the JavaScriptSerializer class to serialize your object to JSON or the new DataContractJsonSerializer class to convert a object to JSON. If you u...
{ "language": "en", "url": "https://stackoverflow.com/questions/141244", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: MATLAB Environment Tweaks How have you tweaked the MATLAB environment to better suit your needs? One tweak per answer. A: I run "format compact" to remove all those frustrating blank lines spacing out my output. Oh so simple, but makes it so much nicer to me. A: I use a function idetitle() that can change the win...
{ "language": "en", "url": "https://stackoverflow.com/questions/141247", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: Suppress ClientAbortException in struts2 VelocityResult class I am getting the following stack trace in my log file and was wanting to suppress just this error from displaying in the log: ERROR 08-09-26 14:48:45.141 http-80-215 org.apache.struts2.dispatcher.VelocityResult: Unable to render Velocity Template, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/141248", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Stateless EJB question We have a stateless EJB that is behind a webservices (EJB3), this EJB also loads a EntityManager that is passed in calls that it makes. With that I have a question. Do simultaneous call to the webservice use the same EJB or is there different instances? I ask this especially concerning the u...
{ "language": "en", "url": "https://stackoverflow.com/questions/141249", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Windows .url links that point to same address when copied over or deleted This is really annoying, we've switched our client downloads page to a different site and want to send a link out with our installer. When the link is created and overwrites the existing file, the metadata in windows XP still points to the sam...
{ "language": "en", "url": "https://stackoverflow.com/questions/141251", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Can someone explain hex offsets to me? I downloaded Hex Workshop, and I was told to read a .dbc file. It should contain 28,315 if you read offset 0x04 and 0x05 I am unsure how to do this? What does 0x04 mean? A: Think of a binary file as a linear array of bytes. 0x04 would be the 5th (in a 0 based array) elemen...
{ "language": "en", "url": "https://stackoverflow.com/questions/141262", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "24" }
Q: Subqueries vs joins I refactored a slow section of an application we inherited from another company to use an inner join instead of a subquery like: WHERE id IN (SELECT id FROM ...) The refactored query runs about 100x faster. (~50 seconds to ~0.3) I expected an improvement, but can anyone explain why it was so dra...
{ "language": "en", "url": "https://stackoverflow.com/questions/141278", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "164" }
Q: What's the best way to count keywords in JavaScript? What's the best and most efficient way to count keywords in JavaScript? Basically, I'd like to take a string and get the top N words or phrases that occur in the string, mainly for the use of suggesting tags. I'm looking more for conceptual hints or links to real-...
{ "language": "en", "url": "https://stackoverflow.com/questions/141280", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: The difference between the Runnable and Callable interfaces in Java What is the difference between using the Runnable and Callable interfaces when designing a concurrent thread in Java, why would you choose one over the other? A: Callable and Runnable both is similar to each other and can use in implementing thread...
{ "language": "en", "url": "https://stackoverflow.com/questions/141284", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "557" }
Q: Possible to use Flex Framework/Components without using MXML? Is it possible to use the Flex Framework and Components, without using MXML? I know ActionScript pretty decently, and don't feel like messing around with some new XML language just to get some simple UI in there. Can anyone provide an example consisting o...
{ "language": "en", "url": "https://stackoverflow.com/questions/141288", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: How to list only top level directories in Python? I want to be able to list only the directories inside some folder. This means I don't want filenames listed, nor do I want additional sub-folders. Let's see if an example helps. In the current directory we have: >>> os.listdir(os.getcwd()) ['cx_Oracle-doc', 'DLLs', '...
{ "language": "en", "url": "https://stackoverflow.com/questions/141291", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "189" }
Q: Checking File is Open in Delphi Is there a way to check if a file has been opened by ReWrite in Delphi? Code would go something like this: AssignFile(textfile, 'somefile.txt'); if not textFile.IsOpen then Rewrite(textFile); A: This works fine: function IsOpen(const txt:TextFile):Boolean; const fmTextOpenRead...
{ "language": "en", "url": "https://stackoverflow.com/questions/141302", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: Pronouncing dictionaries Are there any alternatives to The CMU Pronouncing Dictionary, commercial or open source? A: I don't believe the answer is definitively "no," but I do know that CMU is the most popular pronouncing dictionary in my anecdotal experience. I believe it is open source so if it's missing something...
{ "language": "en", "url": "https://stackoverflow.com/questions/141312", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: php check for a valid date, weird date conversions Is there a way to check to see if a date/time is valid you would think these would be easy to check: $date = '0000-00-00'; $time = '00:00:00'; $dateTime = $date . ' ' . $time; if(strtotime($dateTime)) { // why is this valid? } what really gets me is this: echo...
{ "language": "en", "url": "https://stackoverflow.com/questions/141315", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: What's the difference between Phing and PHPUnderControl? We currently use a hand-rolled setup and configuration script and a hand-rolled continuous integration script to build and deploy our application. I am looking at formalizing this somewhat with a third party system designed for these purposes. I have looked in...
{ "language": "en", "url": "https://stackoverflow.com/questions/141319", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Perl - Win32 - How to do a non-blocking read of a filehandle from another process? I'm writing some server code that talks to a client process via STDIN. I'm trying to write a snippet of perl code that asynchronously receives responses from the client's STDOUT. The blocking version of the code might look like this: ...
{ "language": "en", "url": "https://stackoverflow.com/questions/141332", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Should I store entire objects, or pointers to objects in containers? Designing a new system from scratch. I'll be using the STL to store lists and maps of certain long-live objects. Question: Should I ensure my objects have copy constructors and store copies of objects within my STL containers, or is it generally ...
{ "language": "en", "url": "https://stackoverflow.com/questions/141337", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "167" }
Q: How to check if a directory exists in %PATH% How does one check if a directory is already present in the PATH environment variable? Here's a start. All I've managed to do with the code below, though, is echo the first directory in %PATH%. Since this is a FOR loop you'd think it would enumerate all the directories in...
{ "language": "en", "url": "https://stackoverflow.com/questions/141344", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "72" }
Q: xsl scope help I have a xsl file that is grabbing variables from xml and they seem to not be able to see each other. I know it is a scope issue, I just do not know what I am doing wrong. <xsl:template match="one"> <xsl:variable name="varOne" select="@count" /> </xsl:template> <xsl:template match="two"> <xsl:if te...
{ "language": "en", "url": "https://stackoverflow.com/questions/141345", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }