text
string
meta
dict
Q: In-memory search index for application takes up too much memory - any suggestions? In our desktop application, we have implemented a simple search engine using an inverted index. Unfortunately, some of our users' datasets can get very large, e.g. taking up ~1GB of memory before the inverted index has been created. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/222182", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How to check JRE version prior to launch? What's the best way to determine if the version of the JRE installed on a machine is high enough for the application which the user wants to run? Is there a way of doing it using java-only stuff? I'd like the solution to work on Windows/Linux/MacOSX - if the JRE version is t...
{ "language": "en", "url": "https://stackoverflow.com/questions/222187", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Tortoise SVN hidden _svn folders They are specially annoying when I need to upload to the server a web solution. Is there a way of configuring SVN to create the _svn folders outside my working directory? If not, what is the best way to deal with them when you need to copy only the code? Update: Using "svn export" co...
{ "language": "en", "url": "https://stackoverflow.com/questions/222188", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Is it correct to export data members? (C++) As the title suggests, is it correct or valid to import/export static data from within a C++ class? I found out my problem - the author of the class I was looking at was trying to export writable static data which isn't supported on this platform. Many thanks for the respo...
{ "language": "en", "url": "https://stackoverflow.com/questions/222189", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Are there gotchas using varargs with reference parameters I have this piece of code (summarized)... AnsiString working(AnsiString format,...) { va_list argptr; AnsiString buff; va_start(argptr, format); buff.vprintf(format.c_str(), argptr); va_end(argptr); return buff; } And, on the basis ...
{ "language": "en", "url": "https://stackoverflow.com/questions/222195", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "31" }
Q: Use commandline arguments in creationComplete How can I use command line arguments in a creationComplete event handler? It seems the invoke event happens in my AIR app after creationComplete gets called, so I can't use the args in that function, although I really would like to. Any other event that might always fire...
{ "language": "en", "url": "https://stackoverflow.com/questions/222206", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do I force a rollover at application startup with Log4net RolloverFileAppender? Have Log4Net configured in our application to use a date stamped name and a 10Meg file size limit. This automatically causes a rollover to a new file at midnight and whenever the 10Meg limit is reached. I would also like to roll over...
{ "language": "en", "url": "https://stackoverflow.com/questions/222210", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Managing constructors with many parameters in Java In some of our projects, there's an class hierarchy that adds more parameters as it goes down the chain. At the bottom, some of the classes can have up to 30 parameters, 28 of which are just being passed into the super constructor. I'll acknowledge that using automa...
{ "language": "en", "url": "https://stackoverflow.com/questions/222214", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "126" }
Q: How do I determine if a column is in the primary key of its table? (SQL Server) I am currently using... select Table_Name, Column_name, data_type, is_Nullable from information_Schema.Columns ...to determine information about columns in a given database for the purposes of generating a DataAccess Layer. From where c...
{ "language": "en", "url": "https://stackoverflow.com/questions/222217", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "24" }
Q: How do I change/replace a flash object with jquery or pure javascript? I want to change a flash object enclosed within with jQuery after an onClick event. The code I wrote, essentially: $(enclosing div).html(''); $(enclosing div).html(<object>My New Object</object>); works in Firefox but not in IE. I would appreci...
{ "language": "en", "url": "https://stackoverflow.com/questions/222218", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Loop an array which has gapped numeric keys After using array_unique, an array without the duplicate values is removed. However, it appears that the keys are also removed, which leaves gaps in an array with numerical indexes (although is fine for an associative array). If I iterate using a for loop, I have to accoun...
{ "language": "en", "url": "https://stackoverflow.com/questions/222220", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: IIS 7.0 Multiple Domain Site Bindings I've got three web sites each with its own domain going to my one Windows Server 2008 IIS 7.0 web server. * *example1.com *example2.com *example3.com The site bindings for each: IIS 7.0 Site Bindings example1.com http://img371.imageshack.us/img371/4215/example1pf4.gif IIS 7...
{ "language": "en", "url": "https://stackoverflow.com/questions/222230", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Best way of using Scrum and Sprint for Infrastructure improvement Does anybody use Scrum & Sprint for Infrastructure. I'm struggling with the concept of a Sprint that never finishes i.e. a Network enhancement project. Also any suggestions on how Item time can be built up to a Product Backlog, so that I can sanity c...
{ "language": "en", "url": "https://stackoverflow.com/questions/222243", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Is there a good date parser for Java? Does anyone know a good date parser for different languages/locales. The built-in parser of Java (SimpleDateFormat) is very strict. It should complete missing parts with the current date. For example * *if I do not enter the year (only day and month) then the current year s...
{ "language": "en", "url": "https://stackoverflow.com/questions/222245", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "23" }
Q: Volume Control Number of Channels XP different than Vista When I run this code: MIXERLINE MixerLine; memset( &MixerLine, 0, sizeof(MIXERLINE) ); MixerLine.cbStruct = sizeof(MIXERLINE); MixerLine.dwComponentType = MIXERLINE_COMPONENTTYPE_SRC_WAVEOUT; mmResult = mixerGetLineInfo( (HMIXEROBJ)m_dwMixerHandle, &MixerLine...
{ "language": "en", "url": "https://stackoverflow.com/questions/222248", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Sharepoint custom user and document library specific properties Is there a standard way to associate custom properties with a user? I need to store the number of items per page a user selected in a grid of a document library separately for each user and document library. Edit: Sorry about this vagueness, I wanted to...
{ "language": "en", "url": "https://stackoverflow.com/questions/222261", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Safely punning char* to double in C In an Open Source program I wrote, I'm reading binary data (written by another program) from a file and outputting ints, doubles, and other assorted data types. One of the challenges is that it needs to run on 32-bit and 64-bit machines of both endiannesses, which means that I en...
{ "language": "en", "url": "https://stackoverflow.com/questions/222266", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: How do I compile an ASP.NET website into a single DLL file? I have finally finished my web site. I published it, and I was surprised at the results. Although the App_Code compiled into a single DLL file, every page's code behind compiled into its own DLL file. How do I make it so that it is one DLL file? Also, is it...
{ "language": "en", "url": "https://stackoverflow.com/questions/222276", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: Asp.Net MVC Beta: Previous RouteData overrides current RouteData? I have something similar to the following method: public ActionResult Details(int id) { var viewData = new DetailsViewData { Booth = BoothRepository.Find(id), Category = ItemType.HotBuy }; ...
{ "language": "en", "url": "https://stackoverflow.com/questions/222300", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Excluding some ActiveRecord properties from xml rendering in rails I have an ActiveRecord model that I would like to convert to xml, but I do not want all the properties rendered in xml. Is there a parameter I can pass into the render method to keep a property from being rendered in xml? Below is an example of what...
{ "language": "en", "url": "https://stackoverflow.com/questions/222304", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Calculate last day of month If you provide 0 as the dayValue in Date.setFullYear you get the last day of the previous month: d = new Date(); d.setFullYear(2008, 11, 0); // Sun Nov 30 2008 There is reference to this behaviour at mozilla. Is this a reliable cross-browser feature or should I look at alternative metho...
{ "language": "en", "url": "https://stackoverflow.com/questions/222309", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "390" }
Q: MySQL, reading this EXPLAIN statement I have a query which is starting to cause some concern in my application. I'm trying to understand this EXPLAIN statement better to understand where indexes are potentially missing: +----+-------------+-------+--------+---------------+------------+---------+--------...
{ "language": "en", "url": "https://stackoverflow.com/questions/222319", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Nested transactions in LINQ to SQL I need help with realizing quite complex business logic which operates on many tables and executes quite a few SQL commands. However I want to be sure that the data will not be left in incosistent state and to this moment I don't see the solution which would not require nested tran...
{ "language": "en", "url": "https://stackoverflow.com/questions/222325", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do you diagnose network issues on Windows? I often run into problems where I can't get something to connect to something else. I usually forget to check something obvious. Can you help with: * *A tip/technique for diagnosing a connection issue *The name of a tool or application that can help (and the situati...
{ "language": "en", "url": "https://stackoverflow.com/questions/222326", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Iterate enumerable object while debugging in Visual Studio Is it possible to iterate collection and list only filtered object information while debugging in Visual Studio? I'd use Immediate window for that, but although it allows to execute methods on objects, it seems not to allow execute custom loop statements. Si...
{ "language": "en", "url": "https://stackoverflow.com/questions/222328", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Is it ok to set the sequence of a table to very large value like 10 million? Is there any performance impact or any kind of issues? The reason I am doing this is that we are doing some synchronization between two set of DBs with similar tables and we want to avoid duplicate PK errors when synchronizing data. A: Yes...
{ "language": "en", "url": "https://stackoverflow.com/questions/222339", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How can I quickly and easily delete all Perforce jobs that are attached to changelists? I have a list of about 600 jobs that I can't delete from the command line because they are attached to changelists. The only way I know how to detach them is via the GUI, but that would take forever. Does anyone know a better (...
{ "language": "en", "url": "https://stackoverflow.com/questions/222348", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Generating ActionScript value objects from middle-tier Java classes In a Flex / Java app stack using remoting (via BlazeDS), classes to hold data passed back and forth between client and server need to be maintained in both the client (in ActionScript) and server (in Java). I want a way to maintain theses classes in...
{ "language": "en", "url": "https://stackoverflow.com/questions/222359", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What is a good tool to get SQL code completion with SQL Server 2005? I've tried Red Gate's SQL Prompt and like it, but cannot afford it at the moment. I miss the good code completion that this tool provides. Are there any good free tools out there that have SQL code completion (table and column names, etc)? I've t...
{ "language": "en", "url": "https://stackoverflow.com/questions/222364", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Option Strict On and .NET for VB6 programmers I'm preparing a class on Visual Basic 2005 targeting Visual Basic 6 programmers migrating to the .NET platform. I would like a word of advice about whether to recommend them to always enable Option Strict or not. I've worked exclusively with C-style programming languages...
{ "language": "en", "url": "https://stackoverflow.com/questions/222370", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "23" }
Q: ElementTree XPath - Select Element based on attribute I am having trouble using the attribute XPath Selector in ElementTree, which I should be able to do according to the Documentation Here's some sample code XML <root> <target name="1"> <a></a> <b></b> </target> <target name="2"> <a></a> <b></b> ...
{ "language": "en", "url": "https://stackoverflow.com/questions/222375", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "49" }
Q: With MVC, do interactions with autonomous peripherals belong in the Model or the Controller? Using MVC with an observer pattern, if a user action requires polling a device (such as a camera) for data, should the polling be done in the Controller and the result passed off the Model or should a request be sent to the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/222376", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: JavaDoc like framework for shell scripts? Is there an open source or public domain framework that can document shell scripts similar to what JavaDoc produces? I don't need to limit this just to a specific flavor of shell script, ideally I would like a generic framework for documenting API or command line type comman...
{ "language": "en", "url": "https://stackoverflow.com/questions/222383", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Tab Character Entity for XHTML? Does anyone know what the character entity for a tab is in xhtml? (Um if there is one)... A: Try &#9;. The TAB is ASCII character #9. But it may not show up as you'd expect, anyway, since HTML ignores whitespace in most instances. A: (X)HTML has no special support for tabs: they're ...
{ "language": "en", "url": "https://stackoverflow.com/questions/222385", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: What do I need to know about Unicode? Being a application developer, do I need to know Unicode? A: Unicode is a standard that defines numeric codes for glyphs used in written communication. Or, as they say it themselves: The standard for digital representation of the characters used in writing all of the world...
{ "language": "en", "url": "https://stackoverflow.com/questions/222386", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "55" }
Q: Casting an object to a generic interface I have the following interface: internal interface IRelativeTo<T> where T : IObject { T getRelativeTo(); void setRelativeTo(T relativeTo); } and a bunch of classes that (should) implement it, such as: public class AdminRateShift : IObject, IRelativeTo<AdminRateShift>...
{ "language": "en", "url": "https://stackoverflow.com/questions/222403", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "34" }
Q: How should I manage developing on SQL Server 2008 and SQL Server 2005 for different clients? The company I work for has several clients. I'm currently splitting my time between 2 .net projects. For Client A I need Visual Studio 2008, SQL Server 2008 and the 3.5 framework. For Client B 2005 versions/2.0 Framework. O...
{ "language": "en", "url": "https://stackoverflow.com/questions/222410", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Find the shortest path in a graph which visits certain nodes I have a undirected graph with about 100 nodes and about 200 edges. One node is labelled 'start', one is 'end', and there's about a dozen labelled 'mustpass'. I need to find the shortest path through this graph that starts at 'start', ends at 'end', and p...
{ "language": "en", "url": "https://stackoverflow.com/questions/222413", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "96" }
Q: Asynchronous shell exec in PHP I've got a PHP script that needs to invoke a shell script but doesn't care at all about the output. The shell script makes a number of SOAP calls and is slow to complete, so I don't want to slow down the PHP request while it waits for a reply. In fact, the PHP request should be able to...
{ "language": "en", "url": "https://stackoverflow.com/questions/222414", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "214" }
Q: SQL Server - Running large script files I have a database table on a development server that is now fully populated after I set it running with an import routine for a CSV file containing 1.4 million rows. I ran the Database Publishing Wizard on the table, and now I have a 286MB SQL script on my local machine. The ...
{ "language": "en", "url": "https://stackoverflow.com/questions/222442", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "69" }
Q: Castor performance issues We recently upgraded to Castor 1.2 from version 0.9.5.3 and we've noticed a dramatic drop in performance when calling unmarshal on XML. We're unmarshaling to java classes that were generated by castor in both cases. For comparison, using identical XML the time for the XML unmarshal call u...
{ "language": "en", "url": "https://stackoverflow.com/questions/222444", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to script Visual Studio 2008 from Python? I'd like to write Python scripts that drive Visual Studio 2008 and Visual C++ 2008. All the examples I've found so far use win32com.client.Dispatch. This works fine for Excel 2007 and Word 2007 but fails for Visual Studio 2008: import win32com.client app1 = win32com.cl...
{ "language": "en", "url": "https://stackoverflow.com/questions/222450", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How to stop Hibernate from eagerly fetching many-to-one associated object I have a property on a domain object that is declared in a many-to-one element. The basic syntax of this property looks like this: <many-to-one name="propertyName" class="propertyClass" fetch="select" not-found="ignore" lazy="proxy" /> Now, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/222453", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: How do I force a serial port write method to wait for the line to clear before sending its data? Here's some background on what I'm trying to do: * *Open a serial port from a mobile device to a Bluetooth printer. *Send an EPL/2 form to the Bluetooth printer, so that it understands how to treat the data it is abo...
{ "language": "en", "url": "https://stackoverflow.com/questions/222455", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Enable and disable "Step into" debugging on certain project in a Visual Studio solution I have a Visual Studio solution with four C# projects in it. I want to step into the code of a supporting project in the solution from my main project, but when I use the "Step into" key, it just skips over the call into that oth...
{ "language": "en", "url": "https://stackoverflow.com/questions/222456", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "23" }
Q: Are there established alternatives to ISomething / ISomethingable for interfaces? The .NET standard of prefixing an interface name with an I seems to be becoming widespread and isn't just limited to .NET any more. I have come across a lot of Java code that uses this convention (so it wouldn't surprise me if Java use...
{ "language": "en", "url": "https://stackoverflow.com/questions/222457", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Is it possible with Java to delete to the Recycle Bin? Java is the key here. I need to be able to delete files but users expect to be able to "undelete" from the recycle bin. As far as I can tell this isn't possible. Anyone know otherwise? A: Java 9 has new method but in my case I am restricted to Java 8. I foun...
{ "language": "en", "url": "https://stackoverflow.com/questions/222463", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "37" }
Q: Composite keys with ActiveScaffold in Ruby On Rails I am developing RoR application that works with legacy database and uses ActiveScaffold plugin for fancy CRUD interface. However one of the tables of my legacy db has composite primary key. I tried using Composite Keys plugin to handle it, but it seems to have conf...
{ "language": "en", "url": "https://stackoverflow.com/questions/222464", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Effective copying multiple files I have to copy quite a lot of files from one folder to another. Currently I am doing it in this way: string[] files = Directory.GetFiles(rootFolder, "*.xml"); foreach (string file in files) { string otherFile = Path.Combine(otherFolder, Path.GetFileName(file)); File.Copy(file...
{ "language": "en", "url": "https://stackoverflow.com/questions/222470", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Setting up a Programming Environment in Linux I recently started using Linux as my primary OS. What are the tools that I will need to set up a complete programming environment in Linux for C and C++? A: Among others you should also have gprof and valgrind ( or something in it's class ). A: Vi (or emacs), gcc , mak...
{ "language": "en", "url": "https://stackoverflow.com/questions/222471", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "24" }
Q: Missing ASP.NET tab in IIS Hmm. I'm trying to deploy a web service to a new server and there is no ASP.NET tab. I've tried running aspnet_regiis from ASP.NET 2.0 directory but this doesn't seem to work. Any ideas anyone? A: Did you try uninstalling and then reinstalling ASP.NET? i.e. aspnet_regiis -u and then asp...
{ "language": "en", "url": "https://stackoverflow.com/questions/222472", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Refactor To Eliminate Repetition In Lambda Expression These two methods exhibit repetition: public static Expression<Func<Foo, FooEditDto>> EditDtoSelector() { return f => new FooEditDto { PropertyA = f.PropertyA, PropertyB = f.PropertyB, PropertyC = f.PropertyC, PropertyD =...
{ "language": "en", "url": "https://stackoverflow.com/questions/222511", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How to check for optional fields in $_POST At the moment my code looks like this: # Assign values for saving to the db $data = array( 'table_of_contents' => $_POST['table_of_contents'], 'length' => $_POST['length'] ); # Check for fields that may not be set if ( isset($_POST['lossless_copy']) ) { $data = ...
{ "language": "en", "url": "https://stackoverflow.com/questions/222520", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Converting a sbyte to char cls-compliantly I have C# wrapper of a C Library. It has a method that returns an sbyte that is supposed to represent a char. I can use Convert.ToChar but this is not CLS-compliant. What is the best practice for converting this sbyte to a char compliantly? A: System.Buffer.BlockCopy can ...
{ "language": "en", "url": "https://stackoverflow.com/questions/222521", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: how to Search multiple columns of a table in MySQL? Given a table named "person" (in a MySQL database/schema), kind of like this one: code varchar(25) lastname varchar(25) firstname varchar(25) I'm trying to make a stored function to receive "code" or a part of "code" (which of course, is the code that identi...
{ "language": "en", "url": "https://stackoverflow.com/questions/222526", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: IEnumerable to SelectList, no value is selected I have something like the following in an ASP.NET MVC application: IEnumerable<string> list = GetTheValues(); var selectList = new SelectList(list, "SelectedValue"); And even thought the selected value is defined, it is not being selected on the view. I have this fee...
{ "language": "en", "url": "https://stackoverflow.com/questions/222531", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: What is the meaning of '(?i)password' in python regular expression? Pexpect can be used to automate tasks in python (does not need TCL to be installed). One of the simplest routines of this class is the 'run()' routine. It accepts a dictionary of expected question patterns as keys and the responses as values. For ex...
{ "language": "en", "url": "https://stackoverflow.com/questions/222536", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Other packages with Xdebug-like features (informative PHP errors, formatted var_dump()s, etc.)? When Xdebug is installed/enabled, standard PHP errors (when set to display in the browser) are replaced with more informative messages that include stack traces for each. Also, I've noticed that it also seems to improve o...
{ "language": "en", "url": "https://stackoverflow.com/questions/222544", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Forcing Google Analytics Tracking Code to Sleep To use Google Analytics, you put some JavaScript code in your web page which will make an asynchronous request to Google when the page loads. From what I have read, this shouldn't block or slow down page load times if you include it directly before the end of your HTML...
{ "language": "en", "url": "https://stackoverflow.com/questions/222551", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What uses are there for "placement new"? Has anyone here ever used C++'s "placement new"? If so, what for? It looks to me like it would only be useful on memory-mapped hardware. A: It is useful if you are building a kernel - where do you place the kernel code you read from disk or the pagetable? You need to know wh...
{ "language": "en", "url": "https://stackoverflow.com/questions/222557", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "506" }
Q: Filetype association with application (C#) I have a few questions related: 1) Is possible to make my program change filetype association but only when is running? Do you see anything wrong with this behavior? 2) The other option that I'm seeing is to let users decide to open with my application or restore default as...
{ "language": "en", "url": "https://stackoverflow.com/questions/222561", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: HttpBrowserCapabilities.Crawler property .NET How does the HttpBrowserCapabilities.Crawler property (http://msdn.microsoft.com/en-us/library/aa332775(VS.71).aspx) work? I need to detect a partner's custom crawler and this property is returning false. Where/How can I add his user agent so that this property will r...
{ "language": "en", "url": "https://stackoverflow.com/questions/222564", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Can you recommend a good MySQL stored procedure debugger? Can you recommend a good MySQL stored procedure debugger? Extra points if it is open source, and works in linux :) A: It's neither open source (but freeware) nor works in linux, but Toad® for MySQL should be able to assist you in debugging stored procedures ...
{ "language": "en", "url": "https://stackoverflow.com/questions/222565", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Sorting a DropDownList? - C#, ASP.NET I'm curious as to the best route (more looking towards simplicity, not speed or efficiency) to sort a DropDownList in C#/ASP.NET - I've looked at a few recommendations but they aren't clicking well with me. Edit: Folks, I do not have control over how the data comes into the Dr...
{ "language": "en", "url": "https://stackoverflow.com/questions/222572", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "36" }
Q: Python script for minifying CSS? I'm looking for a simple Python script that can minify CSS as part of a web-site deployment process. (Python is the only scripting language supported on the server and full-blown parsers like CSS Utils are overkill for this project). Basically I'd like jsmin.py for CSS. A single scri...
{ "language": "en", "url": "https://stackoverflow.com/questions/222581", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "49" }
Q: FLASH/FLEXBUILDER: computeSpectrum stops computing the spectrum for no reason I'm using flex builder to compile my SWF. Im using mp3's on my local machine and computeSpectrum() to analyze the mp3. After playing for 20secs, my computeSpectrum stops returning values, instead, it starts returning this error: SecurityE...
{ "language": "en", "url": "https://stackoverflow.com/questions/222592", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I clone a generic list in C#? I have a generic list of objects in C#, and wish to clone the list. The items within the list are cloneable, but there doesn't seem to be an option to do list.Clone(). Is there an easy way around this? A: public static object DeepClone(object obj) { object objResult = null;...
{ "language": "en", "url": "https://stackoverflow.com/questions/222598", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "731" }
Q: Variable declaration in a C# switch statement Why is it that in a C# switch statement, for a variable used in multiple cases, you only declare it in the first case? For example, the following throws the error "A local variable named 'variable' is already defined in this scope". switch (Type) { case Type.A: ...
{ "language": "en", "url": "https://stackoverflow.com/questions/222601", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "150" }
Q: detecting keyboard, mouse activity in linux I need a way to detect mouse/keyboard activity on Linux. Something similar to what any IM program would do. If no activity is detected for, say 5 minutes, it will set your IM status to "I'm not here right now". Any help towards this is appreciated. Thanks. A: My aproach i...
{ "language": "en", "url": "https://stackoverflow.com/questions/222606", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "33" }
Q: Adding an AND clause to a regex I have this simple regex, [\d]{1,5} that matches any integer between 0 and 99999. How would I modify it so that it didn't match 0, but matches 01 and 10, etc? I know there is a way to do an OR like so... [\d]{1,5}|[^0]{1} (doesn't make much sense) There a way to do an AND? A: proba...
{ "language": "en", "url": "https://stackoverflow.com/questions/222629", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Should I use multi-byte overloading (mbstring.func_overload)? I'm in the process of making my PHP site Unicode-aware. I'm wondering if anyone has experience with the mbstring.func_overload setting, which replaces the normal string functions (e.g. strlen) with their multi-byte equivalents (mb_strlen). There aren't an...
{ "language": "en", "url": "https://stackoverflow.com/questions/222630", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Winforms issue - Error creating window handle We are seeing this error in a Winform application. Can anyone help on why you would see this error, and more importantly how to fix it or avoid it from happening. System.ComponentModel.Win32Exception: Error creating window handle. at System.Windows.Forms.NativeWindo...
{ "language": "en", "url": "https://stackoverflow.com/questions/222649", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "72" }
Q: Changing the background color of a UILabel within a UITableViewCell A UITableViewCell comes "pre-built" with a UILabel as its one and only subview after you've init'ed it. I'd really like to change the background color of said label, but no matter what I do the color does not change. The code in question: UILabel* l...
{ "language": "en", "url": "https://stackoverflow.com/questions/222652", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Embedding assemblies inside another assembly If you create a class library that uses things from other assemblies, is it possible to embed those other assemblies inside the class library as some kind of resource? I.e. instead of having MyAssembly.dll, SomeAssembly1.dll and SomeAssembly2.dll sitting on the file syste...
{ "language": "en", "url": "https://stackoverflow.com/questions/222655", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "41" }
Q: multiset, map and hash map complexity I would like to know the complexity in Big O notation of the STL multiset, map and hash map classes when: * *inserting entries *accessing entries *retrieving entries *comparing entries A: map, set, multimap, and multiset These are implemented using a red-black tree, a ty...
{ "language": "en", "url": "https://stackoverflow.com/questions/222658", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "81" }
Q: Can I return a varchar(max) from a stored procedure? VB.net web system with a SQL Server 2005 backend. I've got a stored procedure that returns a varchar, and we're finally getting values that won't fit in a varchar(8000). I've changed the return parameter to a varchar(max), but how do I tell the OleDbParameter.Siz...
{ "language": "en", "url": "https://stackoverflow.com/questions/222661", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: XML-RPC library for C++ What libraries are available for writing xml-rpc clients in native C++ or C? A: You might want to check out either xmlrpc-c or xmlrpc++. A: I found a list of xml-rpc implementations in many different languages. Hopefully this list will be useful to others.
{ "language": "en", "url": "https://stackoverflow.com/questions/222667", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Which web service framework? I'm about to get started converting a C# based desktop app to be web based. For a couple of reasons, I would like to cut the GUI from the logic via a web service. Microsoft has asmx files, WCF, and probably something new at PDC next week. Data can be passed via SOAP, REST, JSON, and p...
{ "language": "en", "url": "https://stackoverflow.com/questions/222668", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Distributed Caching Help I am trying to put some distributed caching into play, I'm using this indeXus.Net Shared Cache . It Requires that the object being cached is serializable, which it is here is the class object. [Serializable] public class Members { public Members() {} public Members(string aspne...
{ "language": "en", "url": "https://stackoverflow.com/questions/222676", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What dotnet collection class's items can be enumerated in "addition order" and retrieved via a key? I'm lead to believe that I cannot count on the order of items added to a dictionary for enumeration purposes. Is there a class (generic if possible) to which items may be added with a key and which can be enumerated i...
{ "language": "en", "url": "https://stackoverflow.com/questions/222681", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: In Silverlight, how to invoke an operation on the Main Dispatch Thread? In a WinForms UserControl, I would pass data to the main GUI thread by calling this.BeginInvoke() from any of the control's methods. What's the equivalent in a Silverlight UserControl? In other words, how can I take data provided by an arbitrar...
{ "language": "en", "url": "https://stackoverflow.com/questions/222688", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Which embedded database to use in a Delphi application? I am creating a desktop app in Delphi and plan to use an embedded database. I've started the project using SQlite3 with the DISQLite3 library. It works but documentation seems a bit light. I recently found Firebird (yes I've been out of Windows for a while) a...
{ "language": "en", "url": "https://stackoverflow.com/questions/222699", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "40" }
Q: Is there any generalities in the cost of executing an instruction in javascript? I was wondering, if there is any generalities (among all the javascript engines out there) in the cost related to execute a given instruction vs another. For instance, eval() is slower than calling a function that already has been decla...
{ "language": "en", "url": "https://stackoverflow.com/questions/222709", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: ASP.NET PasswordRecovery Control with Localized content I am working on a simple portal application using the ASP.NET membership and login controls. I would like to use the PasswordRecovery control to send emails containing forgotten passwords, however my portal requires localization. I have an existing Content Mana...
{ "language": "en", "url": "https://stackoverflow.com/questions/222710", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: What is the best way to read, represent and render map data? I am interested in writing a simplistic navigation application as a pet project. After searching around for free map-data I have settled on the US Census Bureau TIGER 2007 Line/Shapefile map data. The data is split up into zip files for individual counti...
{ "language": "en", "url": "https://stackoverflow.com/questions/222716", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Changing (Enable/Disable) GroupStyle in ListView for different category items How can I switch between GroupStyles for a ListView based on some conditions at run time? For instance I need to use Default for items that that have GroupStyle Header name null, and if it is not null then use the custom GroupStyle theme?...
{ "language": "en", "url": "https://stackoverflow.com/questions/222729", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: cherrypy not closing the sockets I am using cherrypy as a webserver. It gives good performance for my application but there is a very big problem with it. cherrypy crashes after couple of hours stating that it could not create a socket as there are too many files open: [21/Oct/2008:12:44:25] ENGINE HTTP Server cher...
{ "language": "en", "url": "https://stackoverflow.com/questions/222736", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to get the new value of an HTML input after a keypress has modified it? I have an HTML input box <input type="text" id="foo" value="bar"> I've attached a handler for the 'keyup' event, but if I retrieve the current value of the input box during the event handler, I get the value as it was, and not as it will be...
{ "language": "en", "url": "https://stackoverflow.com/questions/222740", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "32" }
Q: No Report Items in toolbox (VS 2008 SP1) I am using Visual Studio 2008 SP1 (version 9.0.30729.1). My problem is that the only reporting-related toolbox items I see are 3 "Textbox" controls. Where are the other stuff? Do I need to add a reference to a different assembly? Here are the steps I take: 1) Open Visual S...
{ "language": "en", "url": "https://stackoverflow.com/questions/222748", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Sorting a tuple that contains tuples I have the following tuple, which contains tuples: MY_TUPLE = ( ('A','Apple'), ('C','Carrot'), ('B','Banana'), ) I'd like to sort this tuple based upon the second value contained in inner-tuples (i.e., sort Apple, Carrot, Banana rather than A, B, C). Any thoughts? A...
{ "language": "en", "url": "https://stackoverflow.com/questions/222752", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Open" the csv file format into Excel from internet explorer 6 I am using Java Struts, sending it to user using the following codes response.setContentType("application/vnd.ms-excel"); response.setHeader("Content-Disposition", "attachment;filename=" + fileFullName); Firstly I hope that this is the correct place for...
{ "language": "en", "url": "https://stackoverflow.com/questions/222755", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Scaling WPF content before rendering to bitmap Background: I'm working on a silverlight (1.0) application that dynamically builds a map of the United States with icons and text overlayed at specific locations. The map works great in the browser and now I need to get a static (printable and insertable into documents/...
{ "language": "en", "url": "https://stackoverflow.com/questions/222756", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Insert cell comments in excel programmatically What's the better way to insert cell comments in excel 2007 files programmatically using c# and .net 3.5? A: I just did exactly that but with MS Word (using Microsoft.Office.Interop.Word range.Comments.Add ( range, ref _categoryMessage ); So, I would suggest using Micr...
{ "language": "en", "url": "https://stackoverflow.com/questions/222760", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Time date conversion in linq I wanted to compare the datetime which is in this format "7/20/2008" with the ones in the database which is in format "7/20/2008 7:14:53 AM". I tried using "like" clause but it did not work beacuse the "like" clause uses only string and the one which I am using is date time format. Can a...
{ "language": "en", "url": "https://stackoverflow.com/questions/222772", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Issue with positioning a div I am working on a site laid out with divs. I am having trouble with one in particular: the training photo div. If you go to http://php.wmsgroup.com/eofd6.org/education.html you'll see a photo underneath the left nav that has dropped down. I want it to snap right under that nav box. I hav...
{ "language": "en", "url": "https://stackoverflow.com/questions/222777", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Adding Boost makes Debug build depend on "non-D" MSVC runtime DLLs I have an annoying problem which I might be able to somehow circumvent, but on the other hand would much rather be on top of it and understand what exactly is going on, since it looks like this stuff is really here to stay. Here's the story: I have a...
{ "language": "en", "url": "https://stackoverflow.com/questions/222778", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: GIT vs. Perforce- Two VCS will enter... one will leave So I'm in the process of getting GIT sold at work. First thing I need is to convince everyone that GIT is better at what they're already used to doing. We currently use Perforce. Anybody else go through a similar sale? Any good links/advice? One of the big wins ...
{ "language": "en", "url": "https://stackoverflow.com/questions/222782", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "85" }
Q: What is the quickest way to get the absolute uri for the root of the app in asp.net? What is the simplest way to get: http://www.[Domain].com in asp.net? There doesn't seem to be one method which can do this, the only way I know is to do some string acrobatics on server variables or Request.Url. Anyone? A: We can u...
{ "language": "en", "url": "https://stackoverflow.com/questions/222783", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Class will compile for Tests/Console but not in Asp.net application I have a simple interface: public interface IVisitorsLogController { List<VisitorsLog> GetVisitorsLog(); int GetUniqueSubscribersCount(); int GetVisitorsCount(); string GetVisitorsSummary(); } the class VisitorsLogController imple...
{ "language": "en", "url": "https://stackoverflow.com/questions/222790", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Audit Revoke Operations How can REVOKE operations on a table be audited in Oracle? Grants can be audited with... AUDIT GRANT ON *schema.table*; Both grants and revokes on system privileges and rolls can be audited with... AUDIT SYSTEM GRANT; Neither of these statements will audit object level revokes. My databas...
{ "language": "en", "url": "https://stackoverflow.com/questions/222792", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }