text
stringlengths
8
267k
meta
dict
Q: Debugging DLL Called With CeRapiInvoke I'm trying to debug into a C dll that is invoked on a Windows Mobile device using CeRapiInvoke() (Technically RAPI.Invoke() from OpenNETCF) from a Windows box. I'm very familiar with attaching to a process that is already running to debug a loaded dll (I've done it many time w...
{ "language": "en", "url": "https://stackoverflow.com/questions/42973", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to use p4merge as the merge/diff tool for Mercurial? Does anyone know how to setup Mercurial to use p4merge as the merge/diff tool on OS X 10.5? A: This will work for merging: Place this into your ~/.hgrc (or, optionally, your Mercurial.ini on Windows): [merge-tools] p4.priority = 100 p4.premerge = True # chan...
{ "language": "en", "url": "https://stackoverflow.com/questions/42980", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "37" }
Q: How do you add a web reference through a proxy/firewall? I'm behind a firewall at work at the moment and I was testing something that I had deployed to my website, and the work proxy seems to be blocking it somewhat. Basically I am getting a message of: Operation is not valid due to the current state of the object ...
{ "language": "en", "url": "https://stackoverflow.com/questions/42984", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: .NET IPC without having a service mediator I have two unrelated processes that use .NET assemblies as plugins. However, either process can be started/stopped at any time. I can't rely on a particular process being the server. In fact, there may be multiple copies running of one of the processes, but only one of the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/42987", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Regex to match against something that is not a specific substring I am looking for a regex that will match a string that starts with one substring and does not end with a certain substring. Example: // Updated to be correct, thanks @Apocalisp ^foo.*(?<!bar)$ Should match anything that starts with "foo" and doesn't ...
{ "language": "en", "url": "https://stackoverflow.com/questions/42990", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: ASP.NET MVC and Spring.NET Starting a new project and would like to use one of the MVC framworks. ASP.NET MVC is still in preview but Spring.net is in production and has a history with Java. I'd like to know the general lowdown between the two. Current questions.. What are the major feature differences? What about...
{ "language": "en", "url": "https://stackoverflow.com/questions/42996", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Transmiting data throught the Serial Port I'm working with the SerialPort class in the Compact Framework, but I can't recive more than 2047 bytes. Exists any limit for the amount of bytes that I can recive? or How can I setup the object? I was trying with the WriteBufferSize and ReadBufferSize properties but they di...
{ "language": "en", "url": "https://stackoverflow.com/questions/43006", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What does VS 2008's "Convert to Website" mean? I have upgraded a MS Visual Studio Application from VS 2003 to VS 2008 (Targeting .NET 2.0). As part of the conversion process the wizard said I needed to take the additional step of Converting my Project to a Website by Right-Clicking and blah blah blah... I didn't fol...
{ "language": "en", "url": "https://stackoverflow.com/questions/43019", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: How do you get the index of the current iteration of a foreach loop? Is there some rare language construct I haven't encountered (like the few I've learned recently, some on Stack Overflow) in C# to get a value representing the current iteration of a foreach loop? For instance, I currently do something like this dep...
{ "language": "en", "url": "https://stackoverflow.com/questions/43021", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1233" }
Q: Algorithm to randomly generate an aesthetically-pleasing color palette I'm looking for a simple algorithm to generate a large number of random, aesthetically pleasing colors. So no crazy neon colors, colors reminiscent of feces, etc. I've found solutions to this problem but they rely on alternative color palettes t...
{ "language": "en", "url": "https://stackoverflow.com/questions/43044", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "325" }
Q: C# numeric constants I have the following C# code: byte rule = 0; ... rule = rule | 0x80; which produces the error: Cannot implicitly convert type 'int' to 'byte'. An explicit conversion exists (are you missing a cast?) [Update: first version of the question was wrong ... I misread the compiler output] Adding th...
{ "language": "en", "url": "https://stackoverflow.com/questions/43051", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: Best way to multi-thread? What is the best way to multi-thread in the C language? I want something that is very efficient and not a CPU hog. Thanks. A: The correct (standard) way to do this on C and Windows is with __beginthreadex. This is usually preferred to calling CreateThread directly as CreateThread doesn't i...
{ "language": "en", "url": "https://stackoverflow.com/questions/43086", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-7" }
Q: How can I get a commit message from a bzr post-commit hook? I'm trying to write a bzr post-commit hook for my private bugtracker, but I'm stuck at the function signature of post_commit(local, master, old_revno, old_revid, new_revno, mew_revid) How can I extract the commit message for the branch from this with bzrl...
{ "language": "en", "url": "https://stackoverflow.com/questions/43099", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: LINQ to SQL for self-referencing tables? I have a self referencing Categories table. Each Category has a CategoryID, ParentCategoryID, CategoryName, etc. And each category can have any number of sub categories, and each of those sub categories can have any number of sub categories, and so and and so forth. So basica...
{ "language": "en", "url": "https://stackoverflow.com/questions/43111", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How can I run an external program from C and parse its output? I've got a utility that outputs a list of files required by a game. How can I run that utility within a C program and grab its output so I can act on it within the same program? UPDATE: Good call on the lack of information. The utility spits out a seri...
{ "language": "en", "url": "https://stackoverflow.com/questions/43116", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "87" }
Q: IList.Cast() returns error, syntax looks ok public static IList<T> LoadObjectListAll<T>() { ISession session = CheckForExistingSession(); var cfg = new NHibernate.Cfg.Configuration().Configure(); var returnList = session.CreateCriteria(typeof(T)); var list = returnList.List(); var castList = list...
{ "language": "en", "url": "https://stackoverflow.com/questions/43126", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Is there a difference between :: and . when calling class methods in Ruby? Simple question, but one that I've been curious about...is there a functional difference between the following two commands? String::class String.class They both do what I expect -- that is to say they return Class -- but what is the differe...
{ "language": "en", "url": "https://stackoverflow.com/questions/43134", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "26" }
Q: Easy way to write contents of a Java InputStream to an OutputStream I was surprised to find today that I couldn't track down any simple way to write the contents of an InputStream to an OutputStream in Java. Obviously, the byte buffer code isn't difficult to write, but I suspect I'm just missing something which woul...
{ "language": "en", "url": "https://stackoverflow.com/questions/43157", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "496" }
Q: What are some resources for getting started in operating system development? One thing I've always wanted to do is develop my very own operating system (not necessarily fancy like Linux or Windows, but better than a simple boot loader which I've already done). I'm having a hard time finding resources/guides that tak...
{ "language": "en", "url": "https://stackoverflow.com/questions/43180", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "609" }
Q: Mixing C/C++ Libraries Is it possible for gcc to link against a library that was created with Visual C++? If so, are there any conflicts/problems that might arise from doing so? A: Some of the comments in the answers here are slightly too generalistic. Whilst no, in the specific case mentioned gcc binaries won'...
{ "language": "en", "url": "https://stackoverflow.com/questions/43194", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Hyper V to Virtual PC I am currently using Windows Server 2008 Standard and have several Hyper V machines. These are development VM's and I want to now switch back Vista x64 because I am missing Aero. I know Windows Server 2008 can have aero but the host performance is very very bad when I run VM in Hyper V. I want ...
{ "language": "en", "url": "https://stackoverflow.com/questions/43196", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Internationalized page properties in Tapestry 4.1.2 The login page in my Tapestry application has a property in which the password the user types in is stored, which is then compared against the value from the database. If the user enters a password with multi-byte characters, such as: áéíóú ...an inspection of the...
{ "language": "en", "url": "https://stackoverflow.com/questions/43199", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Categories of controllers in MVC Routing? (Duplicate Controller names in separate Namespaces) I'm looking for some examples or samples of routing for the following sort of scenario: The general example of doing things is: {controller}/{action}/{id} So in the scenario of doing a product search for a store you'd have:...
{ "language": "en", "url": "https://stackoverflow.com/questions/43201", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do I change Simulink xPC target serial comm speed on the fly I have an xPC target application that talks to a device over RS-232. I am using the xPC serial block for this. To talk to this device I first have to start at a default speed, say, 9600 bps, request a change of speed to, say 57600 bps, then change the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/43211", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I reference a javascript file? I'm working on a C#/ASP.NET project that has all the javascript files in a /Javascript folder. If I refer to the JS file using this syntax: src="/Javascript/jsfile.js" then the file is correctly picked up if the project is deployed to the root of the URL. However, if this "web s...
{ "language": "en", "url": "https://stackoverflow.com/questions/43218", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Running a Simulink xPC block at a faster rate than the continuous rate I have a Simulink xPC target application that has blocks with discrete states at several different sample rates and some sections using continuous states. My intention on keeping the continuous states is for better numerical integration. What cr...
{ "language": "en", "url": "https://stackoverflow.com/questions/43223", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do I calculate a trendline for a graph? Google is not being my friend - it's been a long time since my stats class in college...I need to calculate the start and end points for a trendline on a graph - is there an easy way to do this? (working in C# but whatever language works for you) A: Thanks to all for your...
{ "language": "en", "url": "https://stackoverflow.com/questions/43224", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "52" }
Q: How does Web Routing Work? I need a good understanding of the inner workings of System.Web.Routing. Usually we define the RoutesTable. But how does it do the routing? The reason I'm asking it is that I want to pass the routing to subapps. What I want to see working is a way of passing the current request to mvc apps...
{ "language": "en", "url": "https://stackoverflow.com/questions/43243", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: T-SQL stored procedure that accepts multiple Id values Is there a graceful way to handle passing a list of ids as a parameter to a stored procedure? For instance, I want departments 1, 2, 5, 7, 20 returned by my stored procedure. In the past, I have passed in a comma delimited list of ids, like the below code, but ...
{ "language": "en", "url": "https://stackoverflow.com/questions/43249", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "147" }
Q: Measuring exception handling overhead in C++ What is the best way to measure exception handling overhead/performance in C++? Please give standalone code samples. I'm targeting Microsoft Visual C++ 2008 and gcc. I need to get results from the following cases: * *Overhead when there are no try/catch blocks *Overhe...
{ "language": "en", "url": "https://stackoverflow.com/questions/43253", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: Can Database and transaction logs on the same drive cause problems? Can we have the database and transaction logs on the same drive? What will be its consequences if it is not recommended? A: The only downside is that it causes more thrashing on the disk, so worse performance. A single write will require 2 seeks (b...
{ "language": "en", "url": "https://stackoverflow.com/questions/43259", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Good resources for writing console style applications for Windows? For certain programs nothing beats the command line. Unfortunately, I have never seen good documentation or examples on how to write console applications that go beyond "Hello World". I'm interested in making console apps like Vim or Emacs. Well no...
{ "language": "en", "url": "https://stackoverflow.com/questions/43267", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Comparing two byte arrays in .NET How can I do this fast? Sure I can do this: static bool ByteArrayCompare(byte[] a1, byte[] a2) { if (a1.Length != a2.Length) return false; for (int i=0; i<a1.Length; i++) if (a1[i]!=a2[i]) return false; return true; } But I'm looking for ei...
{ "language": "en", "url": "https://stackoverflow.com/questions/43289", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "627" }
Q: How to generate urls in django In Django's template language, you can use {% url [viewname] [args] %} to generate a URL to a specific view with parameters. How can you programatically do the same in Python code? What I need is to create a list of menu items where each item has name, URL, and an active flag (whether...
{ "language": "en", "url": "https://stackoverflow.com/questions/43290", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "36" }
Q: Setting Variable Types in PHP I know that I can do something like $int = (int)99; //(int) has a maximum or 99 To set the variable $int to an integer and give it a value of 99. Is there a way to set the type to something like LongBlob in MySQL for LARGE Integers in PHP? A: No. PHP does what is called automatic typ...
{ "language": "en", "url": "https://stackoverflow.com/questions/43291", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Can I write native iPhone apps using Python? Using PyObjC, you can use Python to write Cocoa applications for OS X. Can I write native iPhone apps using Python and if so, how? A: You can use PyObjC on the iPhone as well, due to the excellent work by Jay Freeman (saurik). See iPhone Applications in Python. Note that...
{ "language": "en", "url": "https://stackoverflow.com/questions/43315", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "96" }
Q: NHibernate ISession Flush: Where and when to use it, and why? One of the things that get me thoroughly confused is the use of session.Flush,in conjunction with session.Commit, and session.Close. Sometimes session.Close works, e.g., it commits all the changes that I need. I know I need to use commit when I have a tra...
{ "language": "en", "url": "https://stackoverflow.com/questions/43320", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "189" }
Q: Worth switching to zsh for casual use? The default shell in Mac OS X is bash, which I'm generally happy to be using. I just take it for granted. It would be really nice if it auto-completed more stuff, though, and I've heard good things about zsh in this regard. But I don't really have the inclination to spend hours...
{ "language": "en", "url": "https://stackoverflow.com/questions/43321", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "193" }
Q: What's safe for a C++ plug-in system? Plug-in systems in C++ are hard because the ABI is not properly defined, and each compiler (or version thereof) follows its own rules. However, COM on Windows shows that it's possible to create a minimal plug-in system that allows programmers with different compilers to create ...
{ "language": "en", "url": "https://stackoverflow.com/questions/43322", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "48" }
Q: Can I put an ASP.Net session ID in a hidden form field? I'm using the Yahoo Uploader, part of the Yahoo UI Library, on my ASP.Net website to allow users to upload files. For those unfamiliar, the uploader works by using a Flash applet to give me more control over the FileOpen dialog. I can specify a filter for file...
{ "language": "en", "url": "https://stackoverflow.com/questions/43324", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: What are options available to get cron's results and how to set them up? I know that default cron's behavior is to send normal and error output to cron's owner local email box. Is there other ways to get theses results (for example to send it by email to a bunch of people, to store them somewhere, and so on) ? A: T...
{ "language": "en", "url": "https://stackoverflow.com/questions/43349", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: How do you reference a bitmap on the stage in actionscript? How do you reference a bitmap on the stage in flash using actionscript 3? I have a bitmap on the stage in flash and at the end of the movie I would like to swap it out for the next in the sequence before the movie loops. in my library i have 3 images, expor...
{ "language": "en", "url": "https://stackoverflow.com/questions/43354", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: A python web application framework for tight DB/GUI coupling? I'm a firm believer of the heretic thought of tight coupling between the backend and frontend: I want existing, implied knowledge about a backend to be automatically made use of when generating user interfaces. E.g., if a VARCHAR column has a maximum with...
{ "language": "en", "url": "https://stackoverflow.com/questions/43368", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Is there a better way of writing a git pre-commit hook to check any php file in a commit for parse errors? What I have so far is #!/bin/sh php_syntax_check() { retval=0 for i in $(git-diff-index --name-only --cached HEAD -- | grep -e '\.php$'); do if [ -f $i ]; then output=$(php -l $i) ...
{ "language": "en", "url": "https://stackoverflow.com/questions/43374", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Best practices for querying with NHibernate I've come back to using NHibernate after using other technologies (CSLA and Subsonic) for a couple of years, and I'm finding the querying a bit frustrating, especially when compared to Subsonic. I was wondering what other approaches people are using? The Hibernate Query La...
{ "language": "en", "url": "https://stackoverflow.com/questions/43393", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Is there a standard HTML layout with multiple CSS styles available? When it comes to web-design, I am horrible at producing anything remotely good looking. Thankfully there are a lot of free sources for design templates. However, a problem with these designs is that they just cover a single page, and not many use ca...
{ "language": "en", "url": "https://stackoverflow.com/questions/43400", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Is there any way to see the progress of an ALTER TABLE statement in MySQL? For example, I issued an ALTER TABLE statement to create an index on a MEDIUMTEXT field in an InnoDB table that has 134k rows where the size of the index was 255 bytes and the average size of the data in the field is 30k. This command has be...
{ "language": "en", "url": "https://stackoverflow.com/questions/43422", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "26" }
Q: How to set up a robot.txt which only allows the default page of a site Say I have a site on http://example.com. I would really like allowing bots to see the home page, but any other page need to blocked as it is pointless to spider. In other words http://example.com & http://example.com/ should be allowed, but http...
{ "language": "en", "url": "https://stackoverflow.com/questions/43427", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "23" }
Q: How do I serialize a DOM to XML text, using JavaScript, in a cross browser way? I have an XML object (loaded using XMLHTTPRequest's responseXML). I have modified the object (using jQuery) and would like to store it as text in a string. There is apparently a simple way to do it in Firefox et al: var xmlString = new ...
{ "language": "en", "url": "https://stackoverflow.com/questions/43455", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "28" }
Q: How do I make the jquery dialog work with the themeroller themes? I am trying out the dialog from jquery UI. All the online demos use flora.css. I can't get the dialog to display correctly with the css file generated by the themeroller application. Am I missing something? Should these things work out of the box? Upd...
{ "language": "en", "url": "https://stackoverflow.com/questions/43458", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Kerberos user authentication in Apache can anybody recommend some really good resources for how to get Apache authenticating users with Kerberos. Background reading on Kerberos would also be useful Thanks Peter A: mod_auth_kerb is a good start: http://modauthkerb.sourceforge.net/. If you need Active Directory supp...
{ "language": "en", "url": "https://stackoverflow.com/questions/43459", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: What't the best solution for creating subsets of a set of characters? I know 'best' is subjective, so according to you, what is the best solution for the following problem: Given a string of length n (say "abc"), generate all proper subsets of the string. So, for our example, the output would be {}, {a}, {b}, {c}, {...
{ "language": "en", "url": "https://stackoverflow.com/questions/43466", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: When is Control.DestroyHandle called? When is this called? More specifically, I have a control I'm creating - how can I release handles when the window is closed. In normal win32 I'd do it during wm_close - is DestroyHandle the .net equivalent? I don't want to destroy the window handle myself - my control is listen...
{ "language": "en", "url": "https://stackoverflow.com/questions/43490", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Is there a built-in method to compare collections? I would like to compare the contents of a couple of collections in my Equals method. I have a Dictionary and an IList. Is there a built-in method to do this? Edited: I want to compare two Dictionaries and two ILists, so I think what equality means is clear - if th...
{ "language": "en", "url": "https://stackoverflow.com/questions/43500", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "196" }
Q: is it possible to detect if a flash movie also contains (plays) sound? Is there a way to detect if a flash movie contains any sound or is playing any music? It would be nice if this could be done inside a webbrowser (actionscript from another flash object, javascript,..) and could be done before the flash movie star...
{ "language": "en", "url": "https://stackoverflow.com/questions/43503", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: SQL Server 2005 One-way Replication In the business I work for we are discussion methods to reduce the read load on our primary database. One option that has been suggested is to have live one-way replication from our primary database to a slave database. Applications would then read from the slave database and writ...
{ "language": "en", "url": "https://stackoverflow.com/questions/43504", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How sophisticated should my Ajax code be? I have seen simple example Ajax source codes in many online tutorials. What I want to know is whether using the source code in the examples are perfectly alright or not? Is there anything more to be added to the code that goes into a real world application? What all steps ar...
{ "language": "en", "url": "https://stackoverflow.com/questions/43507", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What happened to the .Net Framework Configuration tool? Older versions of the .Net Framework used to install "Microsoft .NET Framework v1.0 / v1.1 / v2.0 Configuration" in the Control Panel, under Administrative Tools. I just noticed that there isn't a v3.0 or v3.5 version of this. Is this functionality now hiding s...
{ "language": "en", "url": "https://stackoverflow.com/questions/43509", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Can I prevent an inherited virtual method from being overridden in subclasses? I have some classes layed out like this class A { public virtual void Render() { } } class B : A { public override void Render() { // Prepare the object for rendering SpecialRender(); // Do some...
{ "language": "en", "url": "https://stackoverflow.com/questions/43511", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "21" }
Q: Why is Visual Studio 2005 so slow? It is slow to load anything other than a small project. It is slow to quit; it can sometimes take minutes. It can be slow to open new files. The record macro feature used to be useful. It is now so slow to start up it's almost always quicker to do it manually! More info would be ...
{ "language": "en", "url": "https://stackoverflow.com/questions/43524", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Images not displaying in WebKit based browsers For some strange, bizarre reason, my images in my website just will not display on webkit based languages (such as safari and chrome). This is the image tag <img src="images/dukkah.jpg" class="imgleft"/> Not only does it not display in the website, it wont display when...
{ "language": "en", "url": "https://stackoverflow.com/questions/43525", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Embedding flv (flash) player in windows forms I'm trying to the the flv Flash player from here in a windows forms application. I currently have it playing 1 .flv file with no problems but I really need to be able to play multiple files. Has anyone had experienace of using the playlists that this control offers or is...
{ "language": "en", "url": "https://stackoverflow.com/questions/43533", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Dynamic Form Controls Using C# 2.0 what is the best way to implement dynamic form controls? I need to provide a set of controls per data object, so should i just do it manually and lay them out while increment the top value or is there a better way? A: You can use panels with automatic layout such as FlowLayoutPane...
{ "language": "en", "url": "https://stackoverflow.com/questions/43536", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Max length for HTML How to restrict the maximum number of characters that can be entered into an HTML <textarea>? I'm looking for a cross-browser solution. A: HTML5 now allows maxlength attribute on <textarea>. It is supported by all browsers except IE <= 9 and iOS Safari 8.4. See support table on caniuse.com. A...
{ "language": "en", "url": "https://stackoverflow.com/questions/43569", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: How to find the mime type of a file in python? Let's say you want to save a bunch of files somewhere, for instance in BLOBs. Let's say you want to dish these files out via a web page and have the client automatically open the correct application/viewer. Assumption: The browser figures out which application/viewer to...
{ "language": "en", "url": "https://stackoverflow.com/questions/43580", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "256" }
Q: "undefined handler" from prototype.js line 3877 A very niche problem: I sometimes (30% of the time) get an 'undefined handler' javascript error on line 3877 of the prototype.js library (version 1.6.0.2 from google: http://ajax.googleapis.com/ajax/libs/prototype/1.6.0.2/prototype.js). Now on this page I have a Google...
{ "language": "en", "url": "https://stackoverflow.com/questions/43584", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: In PHP, is there an easy way to get the first and last date of a month? I need to get the first and last day of a month in the format YYYY-MM-DD given only the month and year. Is there a good, easy way to do this? A: First day is always YYYY-MM-01, isn't it? Example: date("Y-M-d", mktime(0, 0, 0, 8, 1, 2008)) Last ...
{ "language": "en", "url": "https://stackoverflow.com/questions/43589", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "35" }
Q: Override WebClientProtocol.Timeout via web.config Is it possible to override default value of WebClientProtocol.Timeout property via web.config? <httpRuntime executionTimeout="500" /> <!-- this doesn't help --> A: I cant think of a way to have just the Timeout property changed automatically via the webconfig. Manu...
{ "language": "en", "url": "https://stackoverflow.com/questions/43591", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How well does WPF blend with XNA in real life? I understand that there are several ways to blend XNA and WPF within the same application. I find it enticing to use WPF for all GUI and HUD stuff in my XNA games. Does anyone have any practical experience on how well this approach works in real life using .NET 3.5 SP1 ...
{ "language": "en", "url": "https://stackoverflow.com/questions/43596", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: Can you make just part of a regex case-insensitive? I've seen lots of examples of making an entire regular expression case-insensitive. What I'm wondering about is having just part of the expression be case-insensitive. For example, let's say I have a string like this: fooFOOfOoFoOBARBARbarbarbAr What if I want to...
{ "language": "en", "url": "https://stackoverflow.com/questions/43632", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "118" }
Q: Is there a good WPF diagrammer / toolkit / provider? Basically we need a custom diagram component in our new WPF based application. Needs to show text/lines, linked 2D Nodes and custom images apart from the other diagramming features like Undo/Redo, Align, Group, etc.. ala Visio. The initial team did a bit of invest...
{ "language": "en", "url": "https://stackoverflow.com/questions/43638", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: How do I style (css) radio buttons and labels? Given the code bellow, how do I style the radio buttons to be next to the labels and style the label of the selected radio button differently than the other labels? <link href="http://yui.yahooapis.com/2.5.2/build/reset-fonts-grids/reset-fonts-grids.css" rel="styleshe...
{ "language": "en", "url": "https://stackoverflow.com/questions/43643", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "31" }
Q: Can I update/select from a table in one query? I need to select data when a page is viewed and update the 'views' column is there a way to do this in one query, or do I have to use to distinct queries? A: You would have to do this in two statements in one transaction Begin Tran Update Pages Set Views = Views + 1 W...
{ "language": "en", "url": "https://stackoverflow.com/questions/43644", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What types of executables can be decompiled? I think that java executables (jar files) are trivial to decompile and get the source code. What about other languages? .net and all? Which all languages can compile only to a decompile-able code? A: Managed languages can be easily decompiled because executable must cont...
{ "language": "en", "url": "https://stackoverflow.com/questions/43672", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Pros and Cons of different approaches to web programming in Python I'd like to do some server-side scripting using Python. But I'm kind of lost with the number of ways to do that. It starts with the do-it-yourself CGI approach and it seems to end with some pretty robust frameworks that would basically do all the job...
{ "language": "en", "url": "https://stackoverflow.com/questions/43709", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "25" }
Q: What's a good way to overwrite DateTime.Now during testing? I've got some (C#) code that relies on today's date to correctly calculate things in the future. If I use today's date in the testing, I have to repeat the calculation in the test, which doesn't feel right. What's the best way to set the date to a known val...
{ "language": "en", "url": "https://stackoverflow.com/questions/43711", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "126" }
Q: DefaultValue for System.Drawing.SystemColors I have a line color property in my custom grid control. I want it to default to Drawing.SystemColors.InactiveBorder. I tried: [DefaultValue(typeof(System.Drawing.SystemColors), "InactiveBorder")] public Color LineColor { get; set; } But it doesn't seem to work. How do I ...
{ "language": "en", "url": "https://stackoverflow.com/questions/43738", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: SQL Profiler on SQL Server 2005 Professional Edition I want to use SQL Profiler to trace the queries executed agains my database, track performance, etc. However it seems that the SQL Profiler is only available in the Enterprise edition of SQL Server 2005. Is this the case indeed, and can I do something about it? A...
{ "language": "en", "url": "https://stackoverflow.com/questions/43742", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: ASP.NET MVC Performance I found some wild remarks that ASP.NET MVC is 30x faster than ASP.NET WebForms. What real performance difference is there, has this been measured and what are the performance benefits. This is to help me consider moving from ASP.NET WebForms to ASP.NET MVC. A: I think the problem here is tha...
{ "language": "en", "url": "https://stackoverflow.com/questions/43743", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "102" }
Q: MS Access Reporting - can it be pretty? I am working on a project converting a "spreadsheet application" to a database solution. A macro was written that takes screen shots of each page and pastes them into a PowerPoint presentation. Because of the nice formatting options in Excel, the presentation looks very pret...
{ "language": "en", "url": "https://stackoverflow.com/questions/43764", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Pin Emacs buffers to windows (for cscope) For my day job, I live in Emacs. Utterly. I also have become pretty dependent on CScope to help me find things in the code. Normally, I have 2 windows in a split (C-x 3): alt text http://bitthicket.com/files/emacs-2split.JPG And I use the right window for code buffers and ...
{ "language": "en", "url": "https://stackoverflow.com/questions/43765", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "24" }
Q: VS.Net 2005 required on Build box with .Net 2.0 C++ Projects? We have a build box that uses CruiseControl.Net and has been building VB.Net and C# projects using msbuild. All I have installed on the box as far as .Net is concerned is .Net 2.0 SDK (I'm trying to keep the box as clean as possible). We are now trying ...
{ "language": "en", "url": "https://stackoverflow.com/questions/43766", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: WPF control performance What is a good (and preferably simple) way to test the rendering performance of WPF custom controls? I have several complex controls in which rendering performance is highly crucial. I want to be able to make sure that I can have lots of them drawwing out in a designer with a minimal impact...
{ "language": "en", "url": "https://stackoverflow.com/questions/43768", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Modulus operation with negatives values - weird thing? Can you please tell me how much is (-2) % 5? According to my Python interpreter is 3, but do you have a wise explanation for this? I've read that in some languages the result can be machine-dependent, but I'm not sure though. A: Like the documentation says in B...
{ "language": "en", "url": "https://stackoverflow.com/questions/43775", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: 'method' vs. 'message' vs. 'function' vs. '???' I recently asked a question about what I called "method calls". The answer referred to "messages". As a self-taught hobby programmer trying to phrase questions that don't make me look like an idiot, I'm realizing that the terminology that I use reveals a lot about how ...
{ "language": "en", "url": "https://stackoverflow.com/questions/43777", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "34" }
Q: sqlite3-ruby gem: Failed to build gem native extension Update: Check out this follow-up question: Gem Update on Windows - is it broken? On Windows, when I do this: gem install sqlite3-ruby I get the following error: Building native extensions. This could take a while... ERROR: Error installing sqlite3-ruby: ...
{ "language": "en", "url": "https://stackoverflow.com/questions/43778", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "22" }
Q: How to convert a date String to a Date or Calendar object? I have a String representation of a date that I need to create a Date or Calendar object from. I've looked through Date and Calendar APIs but haven't found anything that can do this other than creating my own ugly parse method. I know there must be a way, do...
{ "language": "en", "url": "https://stackoverflow.com/questions/43802", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "63" }
Q: How do I best populate an HTML table in ASP.NET? This is what I've got. It works. But, is there a simpler or better way? ASPX Page… <asp:Repeater ID="RepeaterBooks" runat="server"> <HeaderTemplate> <table class="report"> <tr> <th>Published</th> <th>Title</th>...
{ "language": "en", "url": "https://stackoverflow.com/questions/43803", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Example of c# based rule language? Can you provide a good example of rule definition language written in C#. Java guys have JESS, is there anything good for C#? A: This page shows some examples of open-source rules engines in C#: http://csharp-source.net/open-source/rule-engines A: You can use the forward chaining...
{ "language": "en", "url": "https://stackoverflow.com/questions/43805", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: How to prefetch Oracle sequence ID-s in a distributed environment I have a distributed Java application running on 5 application servers. The servers all use the same Oracle 9i database running on a 6th machine. The application need to prefetch a batch of 100 IDs from a sequence. It's relatively easy to do in a sing...
{ "language": "en", "url": "https://stackoverflow.com/questions/43808", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Which JSTL URL should I reference in my JSPs? I'm getting the following error when trying to run a JSP. I'm using Tomcat 6.0.18, and I'd like to use the latest version of JSTL. What version of JSTL should I use, and which URL goes with which version of JSTL? I'm getting this error "According to TLD or attribute dire...
{ "language": "en", "url": "https://stackoverflow.com/questions/43809", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: jQuery slicing and click events This is probably a really simple jQuery question, but I couldn't answer it after 10 minutes in the documentation so... I have a list of checkboxes, and I can get them with the selector 'input[type=checkbox]'. I want the user to be able to shift-click and select a range of checkboxes. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/43811", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Why won't my 2008 Team Build trigger on developer check-ins despite CI being enabled I have a Team Foundation Server 2008 Installation and a separate machine with the Team Build service. I can create team builds and trigger them manually in Visual Studio or via the command line (where they complete successfully). Ho...
{ "language": "en", "url": "https://stackoverflow.com/questions/43815", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Oracle equivalent to SQL Server/Sybase DateDiff We are now using NHibernate to connect to different database base on where our software is installed. So I am porting many SQL Procedures to Oracle. SQL Server has a nice function called DateDiff which takes a date part, startdate and enddate. Date parts examples are ...
{ "language": "en", "url": "https://stackoverflow.com/questions/43819", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How well will WCF scale to a large number of client users? Does anyone have any experience with how well web services build with Microsoft's WCF will scale to a large number of users? The level I'm thinking of is in the region of 1000+ client users connecting to a collection of WCF services providing the business lo...
{ "language": "en", "url": "https://stackoverflow.com/questions/43823", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: How Would You Programmatically Create a Pattern from a Date that is Stored in a String? I have a string that contains the representation of a date. It looks like: Thu Nov 30 19:00:00 EST 2006 I'm trying to create a Date object using SimpleDateFormat and have 2 problems. 1.) I can't figure out the pattern to hard-c...
{ "language": "en", "url": "https://stackoverflow.com/questions/43842", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: What web control library to use for easy form creation with many different types of input fields? I'm about to create a web application that requires a lot of different web forms where the user needs to be able to input a lot of different types of information. What I mean is that one of those forms may require some ...
{ "language": "en", "url": "https://stackoverflow.com/questions/43856", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How SID is different from Service name in Oracle tnsnames.ora Why do I need two of them? When I have to use one or another? A: what is a SID and Service name please look into oracle's documentation at https://docs.oracle.com/cd/B19306_01/network.102/b14212/concepts.htm In case if the above link is not accessable ...
{ "language": "en", "url": "https://stackoverflow.com/questions/43866", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "195" }
Q: How to concatenate strings of a string field in a PostgreSQL 'group by' query? I am looking for a way to concatenate the strings of a field within a group by query. So for example, I have a table: ID COMPANY_ID EMPLOYEE 1 1 Anna 2 1 Bill 3 2 Carol 4 2 Dave and I wanted to group by company_id to get...
{ "language": "en", "url": "https://stackoverflow.com/questions/43870", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "458" }
Q: Restrict selection of SELECT option without disabling the field I have a multiple selection SELECT field which I don't want the end user to be able to change the value of. For UI reasons, I would like to be able to do this without using the disabled="true" attribute. I've tried using onmousedown, onfocus, onclick a...
{ "language": "en", "url": "https://stackoverflow.com/questions/43874", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }