text
stringlengths
8
267k
meta
dict
Q: MVP and IOC in Windows Forms? I’ve started using the MVP pattern in a Windows forms app for a couple of my forms. These forms create a presenter and pass themselves back to the presenter. I’m not using any particular framework and forms are still able to open other forms. Should I change this setup so that presente...
{ "language": "en", "url": "https://stackoverflow.com/questions/282628", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: ASP.NET - What is the correct approach to JSON based web services with jQuery? What is the correct way to convert ASP.NET SOAP-based web services to JSON-based responses? ...And then call these from jQuery? What are "best practices" when integrating jQuery based AJAX and ASP.NET? Articles? Books? A: JSON conversion...
{ "language": "en", "url": "https://stackoverflow.com/questions/282644", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Does Perl have PHP-like dynamic variables? In PHP, I can write: $vname = 'phone'; $$vname = '555-1234'; print $phone; ... And the script will output "555-1234". Is there any equivalent in Perl? Is there any way to constrain $phone to the scope of the local block, as if I'd written my $phone? Using my $$vname gives ...
{ "language": "en", "url": "https://stackoverflow.com/questions/282647", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: What's the optimal GZIP compression setting for IIS? You can set the HcDynamicCompressionLevel anywhere from 0-10. I've heard 10 is bad (high CPU usage), but what's the magic number that works the best? A: Settings of 5 to 9 for dynamic compression DO in fact hammer CPU load. Static compression occurs only once (u...
{ "language": "en", "url": "https://stackoverflow.com/questions/282650", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Checking for null before event dispatching... thread safe? Something that confuses me, but has never caused any problems... the recommended way to dispatch an event is as follows: public event EventHandler SomeEvent; ... { .... if(SomeEvent!=null)SomeEvent(); } In a multi-threaded environment, how does this...
{ "language": "en", "url": "https://stackoverflow.com/questions/282653", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "35" }
Q: Recommendations for a spidering tool to use with Lucene or Solr? What is a good crawler (spider) to use against HTML and XML documents (local or web-based) and that works well in the Lucene / Solr solution space? Could be Java-based but does not have to be. A: I've tried nutch, but it was very difficult to integrat...
{ "language": "en", "url": "https://stackoverflow.com/questions/282654", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: Which webserver to use, for Oracle apps I am confused by J2ee webservers !! I downloaded a free Glassfish server from sun, then as I am an Oracle developer downloaded the latest JDeveloper, which comes with a Weblogic server from BEa/Oracle. One is free the other costs $1000s. What is the real difference. I want t...
{ "language": "en", "url": "https://stackoverflow.com/questions/282659", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Using varchar instead of date field types in MySQL Is there any reason to use a varchar field instead of a date field in MySQL? I'm looking at an existing site and I see the developer has done this. Is there any reason to? A: Unless it really is acting primarily as a string — say, it wants to preserve date formatti...
{ "language": "en", "url": "https://stackoverflow.com/questions/282660", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to scan in two arrays from user? I'm relatively new to programming and I have to write a function that reads in input from the user and to fill two arrays then compare them. I guess what I'm confused on is how to read in both arrays. This is what I'm supposed to do, Write a table_diff function that compares two ...
{ "language": "en", "url": "https://stackoverflow.com/questions/282667", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Easiest way to sort DOM nodes? If I have a list like this: <ul id="mylist"> <li id="list-item1">text 1</li> <li id="list-item2">text 2</li> <li id="list-item3">text 3</li> <li id="list-item4">text 4</li> </ul> What's the easiest way to re-arrange the DOM nodes to my preference? (This needs to happen...
{ "language": "en", "url": "https://stackoverflow.com/questions/282670", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "82" }
Q: How can I show some shapefile / Well-Known-Text data on Google Maps / MS Virtual Earth? I have some shapefile (demographic/heat map data in the USA, such as crime in New York) data imported into a sql server 2008 database, field data type: Geography. How can i get this data, from a select query, in a format which i ...
{ "language": "en", "url": "https://stackoverflow.com/questions/282676", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Add dynamic video content (YouTube like) (PHP) I'm looking to setup video uploads for users on a site and want to have them viewed through a Flash player. The site is already partially built (by someone else) and I'm wondering what kind of technologies there are to deal with the video files, specifically in PHP. I'm...
{ "language": "en", "url": "https://stackoverflow.com/questions/282683", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do I create a list control with Rich text in FLEX? I am a FLEX newbie, trying to port a Javascript-based prototype into FLEX. One thing my original prototype had was an unordered list (ul) which had list items that had rich text inside it, i.e. I had a mix of differently styled and colored text and some images i...
{ "language": "en", "url": "https://stackoverflow.com/questions/282690", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Boolean Expression How can you express X of Y are true, in boolean logic? a rule like 2 of the following must be true (A, B, C, D, E, F) is it a form of multiplcation or set operations? the end result is all the permutations like AB OR AC OR AD, if you said 3 of following it is like ABC, ABD, ABE, etc.. so it is li...
{ "language": "en", "url": "https://stackoverflow.com/questions/282692", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to call c++ binary from Perl or PHP (CGI-BIN using Apache on Linux )? I have a website cgi-bin program that is written in c++. Unfortunately the website provider for my friend's site only allows Perl or PHP cgi-bin scripts. Is there an easy way to simply have a very small Perl or PHP wrapper that just calls the...
{ "language": "en", "url": "https://stackoverflow.com/questions/282696", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: ld: duplicate symbol I'm working on a school project and I'm getting some weird errors from Xcode. I'm using TextMate's Command+R function to compile the project. Compilation seems to work okay but linking fails with an error message I don't understand. ld output: ld: duplicate symbol text_field(std::basic_istream...
{ "language": "en", "url": "https://stackoverflow.com/questions/282700", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: The fundamentals of Hash tables? I'm quite confused about the basic concepts of a Hash table. If I were to code a hash how would I even begin? What is the difference between a Hash table and just a normal array? Basically if someone answered this question I think all my questions would be answered: If I had 100 ran...
{ "language": "en", "url": "https://stackoverflow.com/questions/282712", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "55" }
Q: Windows CPU notification for misbehaving ColdFusion application I have a web application, written in ColdFusion, which periodically starts using 100% of the server's CPU and crashes the ColdFusion service. Since I have been unable to reproduce the problem myself, I'd like to find a utility which will notify me by em...
{ "language": "en", "url": "https://stackoverflow.com/questions/282713", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Finding all methods that handle form events using NDepend I was wondering if someone would be able to help me write a CQL query for NDepend that will show me all the methods in my form class that handle the form events. So I would like to be able to find all the methods that look like this: Private Sub AddFolderBut...
{ "language": "en", "url": "https://stackoverflow.com/questions/282729", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: can UPDATE clause in MYSQL using PHP update multiple records in one query? well i have this messages table with sample values like these: msg_id recipient_id read locked new 0 1 N Y Y 2 1 Y N N ok, so lets just say this is a messaging table, and...
{ "language": "en", "url": "https://stackoverflow.com/questions/282733", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Weird bindings issue I'm trying to use a browser view with bindings to represent some data and I'm getting an error message: 2008-11-11 17:22:28.636 BrowserViewTest[18269:813] Cocoa Bindings: Error accessing value for key path arrangedObjects.projects of object <NSTreeController: 0x1321e0>[object class: BillingCode...
{ "language": "en", "url": "https://stackoverflow.com/questions/282739", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to find whether a Windows user belongs to specified group? Currently we have a DLL that checks whether a username/password is a valid Windows user using the Windows API LogonUser method. We need to enhance it so it checks whether the user belongs to a specified group as well. Is there a Windows method that does ...
{ "language": "en", "url": "https://stackoverflow.com/questions/282740", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Connect to COM events in C# - support both managed and unmanaged servers I'm writing C# code that needs to connect to COM events. I implemented the use of IConnectionPointContainer and IConnectionPoint thus: IConnectionPointContainer connectionPointContainer = internalGenerator as IConnectionPointContainer; ...
{ "language": "en", "url": "https://stackoverflow.com/questions/282746", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: WPF - Identifying a scroll event from a horizontal scrollbar? If you have a ListView with both horizontal and vertical scroll bars. How do you tell which one a scroll event is coming from? ScrollBar.Scroll="xxx" doesn't seem to differentiate. A: Oops Figured it out: The original source of the routed event will be t...
{ "language": "en", "url": "https://stackoverflow.com/questions/282752", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Truncate a string nicely to fit within a given pixel width Sometimes you have strings that must fit within a certain pixel width. This function attempts to do so efficiently. Please post your suggestions or refactorings below :) function fitStringToSize(str,len) { var shortStr = str; var f = document.createE...
{ "language": "en", "url": "https://stackoverflow.com/questions/282758", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Do I need SSL Cert for simple community site? I'm working on deploying a small community site. User registration requires nothing more than a username, email address, and password. I'm not even asking for a name, and certainly not storing any sensitive data. Should I still invest in an SSL certificate? Would it be c...
{ "language": "en", "url": "https://stackoverflow.com/questions/282762", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to browse for a file in java swing library? I was wondering if there was some kind of J tool in the java swing library that opens up a file browser window and allows a user to choose a file. Then the ouput of the file would be the absolute path of the chosen file. Thanks in advance, A: The following example cre...
{ "language": "en", "url": "https://stackoverflow.com/questions/282779", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "36" }
Q: Best way to use Photoshop CS3 in Linux I don't want to use Mac or Windows at work but I have a lot of work in Photoshop when I have to create an HTML page from a Photoshop design. What is the best way to use Photoshop CS3 in Linux, Wine, virtualization, ... ??? A: Wine has been a bit flaky with me before when going...
{ "language": "en", "url": "https://stackoverflow.com/questions/282782", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: The Next-gen Databases I'm learning traditional Relational Databases (with PostgreSQL) and doing some research I've come across some new types of databases. CouchDB, Drizzle, and Scalaris to name a few, what is going to be the next database technologies to deal with? A: I'm missing graph databases in the answers so...
{ "language": "en", "url": "https://stackoverflow.com/questions/282783", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "55" }
Q: Trouble getting GPO logon script to run using Active Directory Domain Services I have just upgraded our company's domain controller from NT 4.0 to Windows 2008 Server. I used the in-place upgrade path, going first from NT 4.0 to Windows 2003 Server and then 2003 Server to 2008 Server. The orginal NT 4.0 domain was n...
{ "language": "en", "url": "https://stackoverflow.com/questions/282786", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: ?: Operator in LINQ Query * *How do I utilize a ?: operator in the SELECT clause of a LINQ query? If this can't be done, how can I emulate one? The goal is to get a CASE block in my select clause. As you might suspect, I'm getting an error: Invalid anonymous type member declarator. Anonymous type members must be...
{ "language": "en", "url": "https://stackoverflow.com/questions/282791", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: C++ odd compile error: error: changes meaning of "Object" from class "Object" I don't even know where to go with this. Google wasn't very helpful. As with my previous question. I'm using TextMate's Command+R to compile the project. game.h:16:error: declaration of ‘Player* HalfSet::Player() const’ players.h:11:error...
{ "language": "en", "url": "https://stackoverflow.com/questions/282800", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: How can I view all historical changes to a file in SVN I know that I can svn diff -r a:b repo to view the changes between the two specified revisions. What I'd like is a diff for every revision that changed the file. Is such a command available? A: The oddly named "blame" command does this. If you use Tortoise...
{ "language": "en", "url": "https://stackoverflow.com/questions/282802", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "186" }
Q: ASP.NET Development Server simulates IIS6 or IIS7? In visual studio 2008, when we press Ctrl+F5, the ASP.NET Development Server is launched to simulate a Web Server. I'm wondering what server does it simulate? IIS6 or IIS7? Is it possible to customize what server it simulate? A: I don't think it "simulates" either,...
{ "language": "en", "url": "https://stackoverflow.com/questions/282805", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Multiple databases vs a single database I'm looking at an existing site and they are using separate databases. The databases seem to be setup in the following manner: * *general types (user_type, language, age, etc) *member data (registration information & login) *site configuration Personally, I would put ev...
{ "language": "en", "url": "https://stackoverflow.com/questions/282823", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Is Rails a Black Box? I've been doing some simple rails Apps lately. I know ruby quite well, but when I started doing things "the rails way" I noticed that some things were done "just because" and It's hard for a (rails) newbie to know what does the code do. Has rails missed the point and turned into some kind of 4t...
{ "language": "en", "url": "https://stackoverflow.com/questions/282825", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: Differences on how XmlHttpRequest behaves with different browsers? I am trying to see what are the gotchas in using XmlHttpWebRequest such that it works for Safari, Firefox and IE? A: probably the most obvious difference is how to get an XMLHttpRequest in the first place: var xhr; if (window.XMLHttpRequest) { xh...
{ "language": "en", "url": "https://stackoverflow.com/questions/282831", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Generic Dictionary as ref method param I am trying to do something like this public void GetData(ref Dictionary<T,V> dataDictionary) { } Where T can be GUID, string, or int and V is custom user or item object. A: Why do you want the ability to change the callers reference? Why isn't public Dictionary<T,V> GetDat...
{ "language": "en", "url": "https://stackoverflow.com/questions/282832", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Drawing on top of controls inside a panel (C# WinForms) I know this question had been asked more than a few times, but so far I haven't been able to find a good solution for it. I've got a panel with other control on it. I want to draw a line on it and on top of all the controls in the panel I came across 3 types of...
{ "language": "en", "url": "https://stackoverflow.com/questions/282838", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "46" }
Q: What flag silences GCC's warning about no newline at file-endings? I just read this post about why new-line warnings exist, but to be honest my team has people working on several different platforms and with several different editors (everyone uses what bests suites them), so the warning has become ubiquitous, and s...
{ "language": "en", "url": "https://stackoverflow.com/questions/282851", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Actionscript Object(Class?) Syntax In trying to learn how to create objects in ActionScript, I have had no success. One thing that I have noticed is that there seems to be a billion different ways of doing it. Even if none of them have worked for me. This is really confusing me, and I don't know which approach to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/282856", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Drupal Source Control Strategy? In standard php or source code based projects we easily keep all of the code in SVN and each developer can checkout their own copy and collaborate on the same code. When developing a Drupal site however, much of the work is in "setup". Besides the theme and modules you don't really...
{ "language": "en", "url": "https://stackoverflow.com/questions/282858", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "33" }
Q: Array as the options for a switch statment I remember from way back at university using a switch with 'binary search' or 'binary switch'. Something like that, My google foo is broken today. Anyway it goes down like this: You define an array of possible options (Strings usually), some magic happens, and those options...
{ "language": "en", "url": "https://stackoverflow.com/questions/282859", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Function which returns reference to be edited in c# Is there a way to have a function return a editable reference to some internal data. Here's an example I hope helps show what I mean. class foo { public int value; } class bar { bar() { m_foo = new foo(); m_foo.value = 42; } priva...
{ "language": "en", "url": "https://stackoverflow.com/questions/282862", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to enable debugging of stored procedures in visual studio? Ok, this is driving me nuts. I've done just about everything I can to enable step through debugging of stored procedures of a sql server 2005 database. http://arjunachith.blogspot.com/2007/05/debugging-stored-procedures-debug.html http://msdn.microsoft.c...
{ "language": "en", "url": "https://stackoverflow.com/questions/282876", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Link report files for Flex with multiple modules overwrite each other I am using the link-report option in Flex Builder 3 to try to track down dependencies in my Flex application's modules. However a different report is generated for each module and they all use the same filename so they end up overwriting each othe...
{ "language": "en", "url": "https://stackoverflow.com/questions/282877", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Locales and ResourceBundles in a plugin-based program We need to start adding internationalisation to our program. Thankfully not the whole thing yet, just a few bits, but I want the way we do it to scale up to potentially cover the whole program. The thing is, our program is based on plugins, so not all strings bel...
{ "language": "en", "url": "https://stackoverflow.com/questions/282883", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Cancelling asynchronous remoting call I have a client-server architecture where client communicates with the server using .NET Remoting. Server handles all business logic and database interaction. I need to add an operation which may take a while to execute and the dataset it returns might be quite large. I'm thinki...
{ "language": "en", "url": "https://stackoverflow.com/questions/282886", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Finding locations in machine code (gcc/objdump -d) If you have a particular line of C code in mind to examine in the machine output, how would you locate it in objdump output. Here is an example if (cond) foo; bar(); and I want to see if bar was inlined as I'd like. Or would you use some alternative tool ins...
{ "language": "en", "url": "https://stackoverflow.com/questions/282899", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Notifying consumer when producer is done I'm reading in a lot of data from ldap which needs to be compared to the respective records in the database. To minimize the number of SQL queries, I want to batch multiple ldap records into a single query. All this is pretty simple: A thread to produce ldap results, and a ...
{ "language": "en", "url": "https://stackoverflow.com/questions/282901", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: PHP app using Twitter API works on some accounts, not others I have this PHP script that I wrote to automatically follow users that post messages with certain terms. It works 100% of the time on a bunch of test accounts but then does not work on the account I'd like to use it with. I've checked the account's API r...
{ "language": "en", "url": "https://stackoverflow.com/questions/282904", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Are there any good editors for Lisp programming, other than Emacs? I'm looking for an alternative, since I find emacs difficult to use. I'd rather use an editor that supports all the usual shortcuts I'm used to, such as arrow keys to move the cursor around, CTRL+SHIFT+RightArrow to select the next word, etc. Basical...
{ "language": "en", "url": "https://stackoverflow.com/questions/282905", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: How can I download python .egg files, when behind a firewall I'm going to try out turbogears however I'm on windows vista. however due to firewall proxy problems, it seems i can't download .egg files which is required for setup turbogears to get installed in my windows environment. I do have a bootable, or I can mak...
{ "language": "en", "url": "https://stackoverflow.com/questions/282907", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Create an array with a specified number of elements I am extremely new at php and I was wondering if someone could help me use either a for() or while() loop to create an array of 10 elements. A: a bit easier to comprehend for a beginner maybe... <?php // for loop for ($i = 0; $i < 10; $i++) { $myArray[$i] = "Th...
{ "language": "en", "url": "https://stackoverflow.com/questions/282916", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "24" }
Q: Time complexity of memory allocation What is the time complexity of dynamic memory allocation using new, malloc, etc.? I know very little about how memory allocators are implemented, but I assume the answer is that it depends on the implementation. Therefore, please answer for some of the more common cases/implem...
{ "language": "en", "url": "https://stackoverflow.com/questions/282926", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "56" }
Q: Show result of Color selection in Qt? What is the best way to give the user feedback for a color selection? I have a dialog with a "Select Color" push button which pops a QColorDialog. After the selection is made I want to show the user the color selected. Usually I do this using a QLabel and changing it's backgroun...
{ "language": "en", "url": "https://stackoverflow.com/questions/282938", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How would you implement sequences in Microsoft SQL Server? Does anyone have a good way of implementing something like a sequence in SQL server? Sometimes you just don't want to use a GUID, besides the fact that they are ugly as heck. Maybe the sequence you want isn't numeric? Besides, inserting a row and then askin...
{ "language": "en", "url": "https://stackoverflow.com/questions/282943", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "37" }
Q: jquery one slider controls another How do I make one jquery ui slider control another? If I slide slider #1, it should slide slider #2 also. A: Supply a slide/change function when you create slider one, that uses the ui.value of the handle being changed on slider one and sets the handle value on slider2. Depending...
{ "language": "en", "url": "https://stackoverflow.com/questions/282944", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Using Chromium as a MFC CWnd I am looking to using Google Chromium for my MFC app as an HTML renderer. I found this test bed application and I am wondering if anyone knows how or of a resource that I can make sense of it so that I could extract the Webkit/Webview stuff into my application. Thanks. ~/webkit/tools/...
{ "language": "en", "url": "https://stackoverflow.com/questions/282966", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What's a good Prolog IDE for Linux? I need to write some Prolog programs for a class. Any recommendations? A: I've not tried it (mostly because I never thought to combine the words "Prolog" and "NetBeans" before now), but there appears to be Prolog support for NetBeans. It's not a simple plugin, but a tutorial tha...
{ "language": "en", "url": "https://stackoverflow.com/questions/282968", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "47" }
Q: Setting the INSTALLDIR programatically in InstallShield I am trying to set the change the INSTALLDIR programatically in InstallShield v8.02 (cannot do anything about the version). My code crashes with an exception "Unknown error" on the third line of this code (C#) String originalInstallDir = testProject.get_INSTALL...
{ "language": "en", "url": "https://stackoverflow.com/questions/282976", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Which class invoked my static method? Suppose that I have a Java class with a static method, like so: class A { static void foo() { // Which class invoked me? } } And suppose further that class A has an arbitrary number of subclasses: class B extends A { } class C extends A { } class D extends...
{ "language": "en", "url": "https://stackoverflow.com/questions/282977", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Can WPF User Control Detect MouseMovement when Mouse outside of UC Area I'm writing a WPF app whereby usercontrols are being dynamically created programmatically in response to an event. The main window canvas has a grid, and i'm adding new columndefs and rowdefs, which contain the new user controls. I need these u...
{ "language": "en", "url": "https://stackoverflow.com/questions/282982", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Setting up IRQ mapping I'm following several tutorials and references trying to get my kernel set up. I've come across some unfamiliar code in a tutorial that isn't explaining it at all. It's code that I'm told maps the 16 IRQs (0-15) to ISR locations 32-47: void irq_remap(void) { outportb(0x20, 0x11); outpo...
{ "language": "en", "url": "https://stackoverflow.com/questions/282983", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Naming an intermediary table in a database Consider two tables transaction and category each having their own ID and information. A transaction can have more than one category, I have read creating a 3rd table to link transaction and category using their IDs is best. But what would you call this table, assuming you ...
{ "language": "en", "url": "https://stackoverflow.com/questions/282984", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Is there a need to close file descriptors before exit? Of course, the immediate answer for most situations is "yes", and I am a firm believer that a process should correctly cleanup any resources it has allocated, but what I have in my situation is a long-running system daemon that opens a fixed number of file descr...
{ "language": "en", "url": "https://stackoverflow.com/questions/282992", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "27" }
Q: How to design a database schema that can be used with both MySQL and SQL Server? I'd like to give customers a choice of the database engine, but also want to minimize my troubles of such a decision. The engines in question are MySQL (5 or later) and SQL Server (2005 or later). A: Google for the differences in datat...
{ "language": "en", "url": "https://stackoverflow.com/questions/282993", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Calculating duration for traveling to international countries I want to calculate the allowance for a consultant traveling to overseas countries. I have to take into account that I can gain a day or lose a day traveling to an international country. Different countries has a different set of allowances. How can I ad...
{ "language": "en", "url": "https://stackoverflow.com/questions/283001", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Getting the name of a child class in the parent class (static context) I'm building an ORM library with reuse and simplicity in mind; everything goes fine except that I got stuck by a stupid inheritance limitation. Please consider the code below: class BaseModel { /* * Return an instance of a Model from the...
{ "language": "en", "url": "https://stackoverflow.com/questions/283004", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "113" }
Q: How do you answer basic programming questions on a forum for a specific project? I'm currently in the process of becoming a maintainer of a small open source project (a Facebook toolkit), and of course, one of the responsibilities is to answer user questions on our forum. While I'm happy to help users learn how to w...
{ "language": "en", "url": "https://stackoverflow.com/questions/283005", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Firefox sending request twice I'm trying to process a credit card transaction in .net and it works perfectly in Safari, Opera, and IE. When I try the same transaction in Firefox it sends two requests and I end up with a double charged card. From a quick search on Google it seems that this is an issue with Firebug bu...
{ "language": "en", "url": "https://stackoverflow.com/questions/283011", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Freeing alloca-allocated memory Is it possible to free memory allocated by C's alloca() explicitly, before the current function exits? If so,how? A: Using C99 you can achieve the same thing using a Variable Length Array. Just declare the VLA in a new scope; it will automatically be freed when the scope exits. For...
{ "language": "en", "url": "https://stackoverflow.com/questions/283024", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: WPF DocumentViewer doesn't release the XPS file I am working on a WPF application that opens and displays XPS documents. When the application closes, the specification is the application should delete the opened XPS document for clean up. However, when opening a certain XPS document, the application throws an except...
{ "language": "en", "url": "https://stackoverflow.com/questions/283027", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Connected vs Disconnected Architecture in asp.net what are advantages & disadvantages of connected & disconnected Architecture (database) over one another in asp.net ? A: With regards to ASP.NET, a "disconnected" architecture usually refers to one in which data is downloaded to the ASP.NET app's memory in infrequ...
{ "language": "en", "url": "https://stackoverflow.com/questions/283029", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Background color for UIActivityIndicatorView I am using UIActivityIndicatorView to showing user that there is something going on, let them wait. But UIActivityIndicatorView looks small, do not have background color, and not very obvious to the user. While in iPhone SDK's UIImagePickerController, it uses the similar ...
{ "language": "en", "url": "https://stackoverflow.com/questions/283032", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Configurations and Program features in Visual Studio/C# Windows App I have a Windows application (VS2005/C#) which comes in two versions, Enterprise and Pro. In the Pro version, some of the features and menus are disabled. Currently, I'm doing this by commenting out the disabling code to create the Enterprise versio...
{ "language": "en", "url": "https://stackoverflow.com/questions/283035", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to pass large struct back and forth between between C++ and Lua I am looking at embedding Lua in a C++ application I am developing. My intention is to use Lua to script what ordered operation(s) to perform for some given input, ie. receive a new work item in c++ program, pass details to Lua backend, Lua calls ba...
{ "language": "en", "url": "https://stackoverflow.com/questions/283042", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: If I am here and heading towards there and I've covered this much ground, where am I? I need help writing the following method: def get_new_location(current_location, target_location, distance_travelled): ... ... return new_location where all locations are (lat,long) I realize that there are different m...
{ "language": "en", "url": "https://stackoverflow.com/questions/283045", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Upload a file and get a headache - htmlfile: Access Denied We have a page that lets users upload a file using the asp:FileUpload control. When the user tries to submit the form the get a client side javascript error "htmlFile: access denied". This only happens in IE 7 (not sure about 6) and FF is OK. Apparently thi...
{ "language": "en", "url": "https://stackoverflow.com/questions/283055", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: PL/SQL compilation fails with no error message My installation of APEX has come pear shaped on a Oracle 9.2.0.5.0 instance, all the packages are invalid. I've tried recompiling everything with DBMS_UTILITY.compile_schema, but still all the packages are invalid. So, tried recompiling individual packages, SQL> ALTER P...
{ "language": "en", "url": "https://stackoverflow.com/questions/283061", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: LINQ Distinct operator, ignore case? Given the following simple example: List<string> list = new List<string>() { "One", "Two", "Three", "three", "Four", "Five" }; CaseInsensitiveComparer ignoreCaseComparer = new CaseInsensitiveComparer(); var distinctList = list.Distinct(ignoreCaseComparer as IEqualit...
{ "language": "en", "url": "https://stackoverflow.com/questions/283063", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "119" }
Q: Why does __VIEWSTATE hidden field gets rendered even when I have the EnableViewState set to false I saw that __VIEWSTATE field gets rendered even though I have set the EnableViewState="false" at the page level. This field is not rendered if I remove runat="server" tag for the form element. Can somebody please explai...
{ "language": "en", "url": "https://stackoverflow.com/questions/283082", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Synchronizing CruiseControl projects across Linux and Windows platforms with dependencies I have a multiple platform application set, with some applications running on Linux and some on Windows. I want to accomplish the following build: Server L runs CruiseControl with Project A, a Linux-only server application. T...
{ "language": "en", "url": "https://stackoverflow.com/questions/283084", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: PHP MySQL SQL parser (INSERT and UPDATE) I am looking to parse INSERT and UPDATE MySQL SQL queries in PHP to determine what changes where made from what original data. Now this would be pretty easy to create, but I want to see if there are any existing libraries in PHP to do this. Basically what I have is a table wi...
{ "language": "en", "url": "https://stackoverflow.com/questions/283087", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Is there any popup editor function in iphone? I'd like to popup a simple dialog with an editor box, to let user enter some value then just return. I am wondering whether iPhone SDK has that kind of support. Thanks. A: I found a solution at : http://www.iphonedevsdk.com/forum/iphone-sdk-development/1704-uitextfield-...
{ "language": "en", "url": "https://stackoverflow.com/questions/283090", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Preserving JRuby gems between upgrades When installing one of JRuby's frequent upgrades, I need to re-install my gems, as they normally reside in the jruby install directory. I know it doesn't have to be this way. Could someone post some instructions or point to a web page on how to avoid this? Keep in mind, I'm no...
{ "language": "en", "url": "https://stackoverflow.com/questions/283095", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Programmatically access/add/change ringtones of contacts Using the iPhone SDK is there a way to programmatically access (read/write) the ring tone that is assigned to a contact in the Address Book? A: No, there aren't any official API that allows you to do that. You should submit a feature request to Apple if you f...
{ "language": "en", "url": "https://stackoverflow.com/questions/283099", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Linq to SQL Foreign Keys DDL for Database Tables: Users: id - int - identity name - varchar - unique PCs: id - int - idnetity name - varchar - unique userid - FK to Users Apps: id - int - identity name - varchar pcid - FK to PCs I created a DataContext using the Linq To...
{ "language": "en", "url": "https://stackoverflow.com/questions/283103", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Asp.net 2008 Express Book Recommendation Requirements * *Practical *Asp.net on Asp.net 2008 Express *Environment Perspective A: Since Visual Web Developer 2008 EE is really just a subset of Visual Studio I don't think there are any books that focus just on the express version. Most of the beginner/intermediat...
{ "language": "en", "url": "https://stackoverflow.com/questions/283107", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Assign default value to a datacolumn in a select statement I want to assign default values to a column in my select sql query so that if the value of that column is null I get that default value in my recordset. Is there anyway to do this? Example: select col1 (some default value) from tblname; A: select isnull...
{ "language": "en", "url": "https://stackoverflow.com/questions/283120", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How do I send ctrl+c to a process in c#? I'm writing a wrapper class for a command line executable. This exe accepts input from stdin until I hit Ctrl+C in the command prompt shell, in which case it prints output to stdout based on the input. I want to simulate that Ctrl+C press in C# code, sending the kill comman...
{ "language": "en", "url": "https://stackoverflow.com/questions/283128", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "50" }
Q: Scroll bar on ? Can anyone help me to put a vertical scroll bar for an <asp:CheckBoxList>? A: http://bytes.com/forum/thread298532.html A: i tried like this <div style="height:100px;overflow:auto;"> <asp:CheckBoxList></asp:CheckBoxList> </div> and it worked out..!! Thanks a lot.! :)
{ "language": "en", "url": "https://stackoverflow.com/questions/283131", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Multi-Platform SQL Query Validator Does anyone know of a tool that can verify that a given SQL statement is valid across different databases (oracle, db2, mssql)? A: To be honest, I think you're best bet here is going to be to write your own simple test harness that connects to the various test databases (I'm presu...
{ "language": "en", "url": "https://stackoverflow.com/questions/283135", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Best Practices for Robustness I just came across this question about initializing local variables. Many of the answers debated simplicity/readability vs. robustness. As a developer of (remotely deployed) embedded systems, I always favor robustness and tend to follow several seemingly conflicting rules: * *Handl...
{ "language": "en", "url": "https://stackoverflow.com/questions/283141", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Vb Compile Error expected: list separator or ) Line of code is: BreakDown(Full As String, FName As String, PName As String, Ext As String) As Integer took this from a tutorial so not sure what I'm doing wrong :/ thats a new function if it isn't obvious A: According to what I'm reading, the line of code is: BreakDo...
{ "language": "en", "url": "https://stackoverflow.com/questions/283142", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Can I implement method_missing in C# 4 and have it actually return a value? I was trying to figure out how to implement method_missing in C# 4, based on all of 2 blog posts floating around on IDynamicObject. What I want to do is have a Business Logic Layer that has a Repository, and if the method is missing from th...
{ "language": "en", "url": "https://stackoverflow.com/questions/283143", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How to prevent Visual Studio from launching WcfSvcHost.exe while debugging? I have a solution in Visual Studio 2008 which has multiple projects. One of the projects is a WCF project. Sometimes I just want to debug other projects, but when I press F5, Visual Studio has wcfsvchost.exe launched to host the WCF project ...
{ "language": "en", "url": "https://stackoverflow.com/questions/283145", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "32" }
Q: Going through a text file line by line in vb 2005 So my program needs to go through a plain text file line by line essentially: Read line 1: Do commands loop Read line2: Do Commands loop etc until its done with the entire file does anyone know any good coding examples for this, all the tutorials seem to show open a...
{ "language": "en", "url": "https://stackoverflow.com/questions/283156", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Ways to hash a numeric vector? Are there any known hash algorithms which input a vector of int's and output a single int that work similarly to an inner product? In other words, I am thinking about a hash algorithm that might look like this in C++: // For simplicity, I'm not worrying about overflow, and assuming |v|...
{ "language": "en", "url": "https://stackoverflow.com/questions/283165", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: Easy way to convert a struct tm (expressed in UTC) to time_t type How do I do the above? There is mktime function but that treats the input as expressed in local time but how do i perform the conversion if my input tm variable happens to be in UTC. A: Here is a solution I use (Can't recall where I found it) when it...
{ "language": "en", "url": "https://stackoverflow.com/questions/283166", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "33" }