text
stringlengths
8
267k
meta
dict
Q: Key value pairs in relational database Does someone have experience with storing key-value pairs in a database? I've been using this type of table: CREATE TABLE key_value_pairs ( itemid varchar(32) NOT NULL, itemkey varchar(32) NOT NULL, itemvalue varchar(32) NOT NULL, CONSTR...
{ "language": "en", "url": "https://stackoverflow.com/questions/126271", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "79" }
Q: Setting a Sharepoint Site Theme through a Web Service? Is it possible to change a Sharepoint 2007 Site Theme through a Web Service? I know it can be done through the Object Model with (i think) SPWeb.ApplyTheme, but I did not see anything in the available Web Services, apart from CustomizeCss in Webs.asmx, which doe...
{ "language": "en", "url": "https://stackoverflow.com/questions/126274", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Making something both a C identifier and a string? Say you want to generate a matched list of identifiers and strings enum { NAME_ONE, NAME_TWO, NAME_THREE }; myFunction(NAME_ONE, "NAME_ONE"); myFunction(NAME_TWO, "NAME_TWO"); myFunction(NAME_THREE, "NAME_THREE"); ..without repeating yourself, and without auto-gen...
{ "language": "en", "url": "https://stackoverflow.com/questions/126277", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: C99 stdint.h header and MS Visual Studio To my amazement I just discovered that the C99 stdint.h is missing from MS Visual Studio 2003 upwards. I'm sure they have their reasons, but does anyone know where I can download a copy? Without this header I have no definitions for useful types such as uint32_t, etc. A: T...
{ "language": "en", "url": "https://stackoverflow.com/questions/126279", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "117" }
Q: Has anyone been able to get SharePoint using NTLM working with SQUID as a reverse proxy? * *We have a SQUID reverse proxy and a MOSS 2007 portal. All sites are using NTLM. *We cannot get it working with SQUID as a reverse proxy. Any ideas where to start? A: Can you switch to Kerberos instead of NTLM? You're en...
{ "language": "en", "url": "https://stackoverflow.com/questions/126288", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Automatic Casts redux After I messed up the description of my previous post on this I have sat down and tried to convey my exact intent. I have a class called P which performs some distinct purpose. I also have PW which perform some distinct purpose on P. PW has no member variables, just member functions. From this ...
{ "language": "en", "url": "https://stackoverflow.com/questions/126297", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What happens when a Flex App can't run at the specified framerate? In our application (a game), in some cases it can't run fast enough. Obviously we'd like to speed it up, but in the mean-time when this happens it causes many problems (or if it's not causing them, the two are related). The one which is least related...
{ "language": "en", "url": "https://stackoverflow.com/questions/126316", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Undoing specific revisions in Subversion Suppose I have a set of commits in a repository folder... 123 (250 new files, 137 changed files, 14 deleted files) 122 (150 changed files) 121 (renamed folder) 120 (90 changed files) 119 (115 changed files, 14 deleted files, 12 added files) 118 (113 changed files) 117 (10 cha...
{ "language": "en", "url": "https://stackoverflow.com/questions/126320", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "33" }
Q: Specifying a non-.NET dependency in Visual Studio I'm calling a non-.NET dll from my project using P/Invoke, meaning that the .dll must always be present in the .exe's directory. Is there any way to tell Visual Studio of this dependency, so that it will automatically copy the .dll to the output directory when compi...
{ "language": "en", "url": "https://stackoverflow.com/questions/126331", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: What is the best way in Rails to determine if two (or more) given URLs (as strings or hash options) are equal? I'm wanting a method called same_url? that will return true if the passed in URLs are equal. The passed in URLs might be either params options hash or strings. same_url?({:controller => :foo, :action => :ba...
{ "language": "en", "url": "https://stackoverflow.com/questions/126332", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Which Ruby XML library would you recommend for a 2.4MB XML file? I have a 2.4 MB XML file, an export from Microsoft Project (hey I'm the victim here!) from which I am requested to extract certain details for re-presentation. Ignoring the intelligence or otherwise of the request, which library should I try first from...
{ "language": "en", "url": "https://stackoverflow.com/questions/126337", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: Is it safe to redirect to the same URL? I have URLs of the form http://domain/image/⟨uuid⟩/42x42/some_name.png. The Web server (nginx) is configured to look for a file /some/path/image/⟨uuid⟩/thumbnail_42x42.png, and if it does not exist, it sends the URL to the backend (Django via mod_wsgi) which then generates the...
{ "language": "en", "url": "https://stackoverflow.com/questions/126345", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: How to secure MS SSAS 2005 for HTTP remote access via Internet? We are building an hosted application that uses MS SQL Server Analysis Services 2005 for some of the reporting, specifically OLAP cube browsing. Since it is designed to be used by very large global organizations, security is important. It seems that Mi...
{ "language": "en", "url": "https://stackoverflow.com/questions/126350", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Example Facebook Application using TurboGears -- pyFacebook I have a TurboGears application I'd like to run through Facebook, and am looking for an example TurboGears project using pyFacebook or minifb.py. pyFacebook is Django-centric, and I can probably figure it out, but this is, after all, the lazy web. A: Why ...
{ "language": "en", "url": "https://stackoverflow.com/questions/126356", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: "cannot find -lpq" when trying to install psycopg2 Intro: I'm trying to migrate our Trac SQLite to a PostgreSQL backend, to do that I need psycopg2. After clicking past the embarrassing rant on www.initd.org I downloaded the latest version and tried running setup.py install. This didn't work, telling me I needed min...
{ "language": "en", "url": "https://stackoverflow.com/questions/126364", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Controlling access to an internal collection in c# - Pattern required This is kind of hard to explain, I hope my English is sufficient: I have a class "A" which should maintain a list of objects of class "B" (like a private List). A consumer of class "A" should be able to add items to the list. After the items are a...
{ "language": "en", "url": "https://stackoverflow.com/questions/126367", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: In Scrum, where does the detail sit? We've been using Scrum on a few projects now with varying success and I now have a query relating to documentation. In Scrum, you obviously have the product backlog ("The application begins by bringing up the last document the user was working with.") and the sprint task backlog ...
{ "language": "en", "url": "https://stackoverflow.com/questions/126369", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How to implement unobtrusive javascript with dynamic content generation? I write a lot of dynamically generated content (developing under PHP) and I use jQuery to add extra flexibility and functionality to my projects. Thing is that it's rather hard to add JavaScript in an unobtrusive manner. Here's an example: You ...
{ "language": "en", "url": "https://stackoverflow.com/questions/126373", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Non colliding hash algorithm for strings up to 255 characters I am looking for a hash-algorithm, to create as close to a unique hash of a string (max len = 255) as possible, that produces a long integer (DWORD). I realize that 26^255 >> 2^32, but also know that the number of words in the English language is far less...
{ "language": "en", "url": "https://stackoverflow.com/questions/126381", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Define small row height in Reporting Services 2005 I want to specify a small row height in a Reporting Services report of about 3pt. While the report looks ok in the previewer, once deployed, the row height resets to the standard row height. I have adjusted the "CanGrow" and "CanShrink" settings as well as the paddi...
{ "language": "en", "url": "https://stackoverflow.com/questions/126382", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Is it a bad idea to implement a timer loop in Flex? In our game project we did have a timer loop set to fire about 20 times a second (the same as the application framerate). We use this to move some sprites around. I'm wondering if this could cause problems and we should instead do our updates using an EnterFrame ev...
{ "language": "en", "url": "https://stackoverflow.com/questions/126385", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: SQL server 2005 numeric precision loss Debugging some finance-related SQL code found a strange issue with numeric(24,8) mathematics precision. Running the following query on your MSSQL you would get A + B * C expression result to be 0.123457 SELECT A, B, C, A + B * C FROM ( SELECT CAST(0.1234567...
{ "language": "en", "url": "https://stackoverflow.com/questions/126401", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Change database files location in MySQL administrator? I would like to change the database files location of MySQL administrator to another drive of my computer. (I run Windows XP SP2 and MySQL Administrator 1.2.8.) --Under the startup variable --> General Parameters --> I changed Data directory: from C:/Program F...
{ "language": "en", "url": "https://stackoverflow.com/questions/126406", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: Eliminating `switch` statements What are ways of eliminating the use of switch statements in code? A: I think that what you are looking for is the Strategy Pattern. This can be implemented in a number of ways, which have been mentionned in other answers to this question, such as: * *A map of values -> functio...
{ "language": "en", "url": "https://stackoverflow.com/questions/126409", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "194" }
Q: Is Oracle Coherence stable? Has anyone used Oracle Coherence? It looks very promising at the roadshows. My concern is whether it's a stable and robust enough to implement mission-critical financial solutions. I'd be grateful for any feedback on its performance, robustness and ease of maintenance. A: Coherence is in...
{ "language": "en", "url": "https://stackoverflow.com/questions/126421", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Is it possible to change the natural order of columns in Postgres? Is it possible to change the natural order of columns in Postgres 8.1? I know that you shouldn't rely on column order - it's not essential to what I am doing - I only need it to make some auto-generated stuff come out in a way that is more pleasing, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/126430", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "35" }
Q: Different odd/even pages in MS Access reports For a report in MS Access (2007) I need to put data of some columns on all odd pages and other columns on all even pages. It is for printing out double sided card files onto sheets of paper. Does somebody have an idea how to do that? A: Your question is too general. I w...
{ "language": "en", "url": "https://stackoverflow.com/questions/126431", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Any way to remove IEs black border around submit button in active forms? I am implementing a design that uses custom styled submit-buttons. They are quite simply light grey buttons with a slightly darker outer border: input.button { background: #eee; border: 1px solid #ccc; } This looks just right in Firefo...
{ "language": "en", "url": "https://stackoverflow.com/questions/126445", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "40" }
Q: Call Stack at Runtime I want to access the call stack at runtime in a Native C++ application. I am not using the IDE. How do I display the call stack? Update: I have a function which is called from many points all over the application. It crashes on rare occasions. I was looking for a way to get name of the caller a...
{ "language": "en", "url": "https://stackoverflow.com/questions/126450", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Redirect the output of the exe batch file I want to execute a certain batch file and redirect its console output to a text control in visual c++ or redirect the console output at the same time the logs/echo are showing. A: Basically, you have to make the run process to write to a pipe, and to read the output of thi...
{ "language": "en", "url": "https://stackoverflow.com/questions/126452", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I deploy registry keys and values using WiX 3.0? If I want to create the registry key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Application\MyApp with the string value EventMessageFile : C:\Path\To\File.dll how do I define this in my WiX 3.0 WXS file? Examples of what the XML should lo...
{ "language": "en", "url": "https://stackoverflow.com/questions/126465", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to stop right click dead-locking Visual Studio 2008 I have a very serious problem with Visual Studio 2008. Occasionally when I right-click (for go to definition, set next statement etc) when I'm debugging, Visual Studio will just dead-lock and go into not responding mode. Has anyone had the same problem? Does an...
{ "language": "en", "url": "https://stackoverflow.com/questions/126472", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: SWD files in Flash Player 9 Does anybody have any pointers to what SWD files are in Flash 9, why Flash Player wants to download them sometimes, how to make ones, how to make use of them? Didn't manage to dig anything useful myself yet. Update I know roughly what are swd files used in Flash8, and there is even a way ...
{ "language": "en", "url": "https://stackoverflow.com/questions/126510", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: PHP and MS Access: Number of Records returned by SELECT query I am running following PHP code to interact with a MS Access database. $odbc_con = new COM("ADODB.Connection"); $constr = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" . $db_path . ";"; $odbc_con -> open($constr); $rs_select = $odbc_con -> execute ("S...
{ "language": "en", "url": "https://stackoverflow.com/questions/126513", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: GIS/Mapping solutions that provide easy access to routing data I'm look for a GIS/Mapping tool that will give me easy SERVER-SIDE access to route information (specifically, trip time and distance) in an ASP.NET web application. From what I can tell, Google and Yahoo maps do everything client-side in javascript, but ...
{ "language": "en", "url": "https://stackoverflow.com/questions/126520", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Java: Eclipse - Diff Trace I've got two versions of a project with a JUnit test. Looking at the diff of the files there's no obvious reason to this, but the test passes on one project but not on the other. For a while now I've wondered if there was a program that would record a trace through the whole program when i...
{ "language": "en", "url": "https://stackoverflow.com/questions/126521", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Iterate a list with indexes in Python I could swear I've seen the function (or method) that takes a list, like this [3, 7, 19] and makes it into iterable list of tuples, like so: [(0,3), (1,7), (2,19)] to use it instead of: for i in range(len(name_of_list)): name_of_list[i] = something but I can't remember the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/126524", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "216" }
Q: Unit Testing of .NET Add-In for Microsoft Office Has anyone got any suggestions for unit testing a Managed Application Add-In for Office? I'm using NUnit but I had the same issues with MSTest. The problem is that there is a .NET assembly loaded inside the Office application (in my case, Word) and I need a reference...
{ "language": "en", "url": "https://stackoverflow.com/questions/126526", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How can I get working in Safari? On the safari browser, the standard <asp:Menu> doesn't render well at all. How can this be fixed? A: Thanks for the advice, it led me into the following solution; I created a file named "safari.browser" and placed it in the App_Browsers directory. The content of this file is shown ...
{ "language": "en", "url": "https://stackoverflow.com/questions/126528", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: VS2003/05 constantly screws up the display - is there any known fix for this? Running VS2003/05 under Vista makes the former screw up the display at least 50% of the time - you start debugging, VS kicks in and you see the windows/docking panes screwed up, not refreshing, etc... I've contacted Microsoft about this, b...
{ "language": "en", "url": "https://stackoverflow.com/questions/126546", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Custom painting Windows Forms Scrollbar? I know how to do custom drawing of a standalone Windows Forms ScrollBar because there are plenty of examples at places like codeproject.com. But how do you custom draw the scrollbars in controls you do not create yourself? For example a Panel can show scrollbars but how would...
{ "language": "en", "url": "https://stackoverflow.com/questions/126555", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Why does Firefox 2 display fonts larger than specified in CSS? I have a webpage where Firefox 2 displays the font certain, really specific elements, larger than than what I specified in the CSS. When I look at the affected element (mostly td elements as far as I can tell) with Firebug, I see that the font-size is in...
{ "language": "en", "url": "https://stackoverflow.com/questions/126557", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to replace a file in a msi installer? I want to replace a single file inside a msi. How to do it? A: Use msi2xml. * *This command extracts the MSI files: msi2xml -c OutputDir TestMSI.MSI *Open OutputDir and modify the file. *To rebuild the MSI run: xml2msi.exe -m TestMSI.xml You need the -m to ignore the '...
{ "language": "en", "url": "https://stackoverflow.com/questions/126562", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "29" }
Q: How to do Automated UI testing for Flash I have an actionscript 2 application that I'd like to write automated UI testing for. For example I'd like to simulate a mouse click on a button and validate that a movie-clip is displayed at the right position and in the right color... Basically, UI testing. What are the bes...
{ "language": "en", "url": "https://stackoverflow.com/questions/126573", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Displaying Tiff files in SSRS reports I have a requirement to be be able to embed scanned tiff images into some SSRS reports. When I design a report in VS2005 and add an image control the tiff image displays perfectly however when I build it. I get the warning : Warning 2 [rsInvalidMIMEType] The value of the MI...
{ "language": "en", "url": "https://stackoverflow.com/questions/126584", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do I attach a MSSQL 2000 database with only an MDF file I have an old server with a defunct evaluation version of SQL 2000 on it (from 2006), and two databases which were sitting on it. For some unknown reason, the LDF log files are missing. Presumed deleted. I have the mdf files (and in one case an ndf file too...
{ "language": "en", "url": "https://stackoverflow.com/questions/126587", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Installing a font on a client machine I'm using Visual Studio 2008 and the built-in installation tools for a C# client application. How can I use this installer to install a font on the client machine (if it's not already there)? A: For me, Timothy Carter had the answer mostly right: "right click on the File System...
{ "language": "en", "url": "https://stackoverflow.com/questions/126594", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Importing contacts from the top webmail services Is anyone familiar with a service or open-source scripts that can import contacts from Gmail, Yahoo mail, AOL, Hotmail and other prominent webmail services? (Not plaxo, it has a problem in IE7) A: If it's just a one off operation. Linkedn can, but I'm not sure if you...
{ "language": "en", "url": "https://stackoverflow.com/questions/126599", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Accessing the windows admin shares when not connected to a network I'm finding that I can't access the admin shares on an XP64 box when there's no network connection. Trying to browse to \\localhost\c$ fails (although obviously browsing c: works). Reason for the question is that the NANT build script for our applica...
{ "language": "en", "url": "https://stackoverflow.com/questions/126601", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What is the "Fountain Development Model"? It is mentioned on the Systems Development Life Cycle page on Wikipedia: To manage this, a number of system development life cycle (SDLC) models have been created: waterfall, fountain, spiral, build and fix, rapid prototyping, incremental, and synchronize and stabilize. I ...
{ "language": "en", "url": "https://stackoverflow.com/questions/126607", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Can a .NET windows application be compressed into a single .exe? I am not too familiar with .NET desktop applications (using Visual Studio 2005). Is it possible to have the entire application run from a single .exe file? A: Yes. In .NET you can have your entire application encapsulated as a single EXE file. Just ...
{ "language": "en", "url": "https://stackoverflow.com/questions/126611", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "34" }
Q: Passing JS function to applet for as event listener Is it possible to pass a function/callback from javascript to a java applet? For example i have an applet with a button that when pressed it will call the passed js callback function onCommand() { alert('Button pressed from applet'); } applet.onCommand(onCommand)...
{ "language": "en", "url": "https://stackoverflow.com/questions/126631", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: .Net Menustrip background colour range I need to put a control to the right of my MenuStrip. The MenuStrip fades in colour away from the BackColor on the left hand side to something whiter on the right, and ideally I would like to make my small control blend in by having the same backColor as the menustrip has on th...
{ "language": "en", "url": "https://stackoverflow.com/questions/126635", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Oracle Datadiff (Oracle) I have to return all records from last 12 months. How to do that in PL/SQL? EDIT: Sorry, I forgot to explain, I do have a column of DATA type A: Doing this in PL/SQL is pretty much synonymous with doing it in SQL. SELECT * FROM table WHERE date_column >= ADD_MONTHS(TRUNC(SYSDATE),-12) Y...
{ "language": "en", "url": "https://stackoverflow.com/questions/126652", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What is your favorite misconception about Lisp? Please respond with one by one. If you explain why it is not true then try to avoid general statements and provide particular examples. A: My favourite lisp misconception: CL really means CthuLhu! Jokes aside; by far the most widespread misconception regarding all man...
{ "language": "en", "url": "https://stackoverflow.com/questions/126653", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Opensource Implementation of the Alias Method I am doing a project at the moment, and in the interest of code reuse, I went looking for a library that can perform some probabilistic accept/reject of an item: i.e., there are three people (a, b c), and each of them have a probability P{i} of getting an item, where p{...
{ "language": "en", "url": "https://stackoverflow.com/questions/126656", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What is a good source for geometric algorithms? I am looking for any good sources for geometric algorithms specifically; The simple stuff like when two lines cross and so on is easy enough (and easy to find), but I would like to find somewhere with algorithms for the more tricky things, such as finding the shape fo...
{ "language": "en", "url": "https://stackoverflow.com/questions/126658", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "24" }
Q: Why does maven 2 try to download dependencies that I already have? When I launch the "mvn install" command, maven sometimes tries to download dependencies that it has already downloaded. That's expected for SNAPSHOT but why does maven do that for other JARs? I know I can avoid that behavior by "-o" flag but I just w...
{ "language": "en", "url": "https://stackoverflow.com/questions/126667", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Unable to close OledbDataReader to Sybase Database in VB.NET I don't seem to be able to close the OledbDataReader object after reading data from it. Here is the relevant code - Dim conSyBase As New OleDb.OleDbConnection("Provider=Sybase.ASEOLEDBProvider.2;Server Name=xx.xx.xx.xx;Server Port Address=5000;Initial Cata...
{ "language": "en", "url": "https://stackoverflow.com/questions/126678", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Algorithm for counting the number of unique colors in an image Looking for one that is fast enough and still graceful with memory. The image is a 24bpp System.Drawing.Bitmap. A: Most people here have suggested solutions that will probably be fast (actually the one that only uses 2 MB is probably acceptable regardi...
{ "language": "en", "url": "https://stackoverflow.com/questions/126680", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How do I reserve low memory (pre OS)? Background: I need to reserve an amount of memory below 0xA0000 prior to my operating system starts. To do this I change the 0040:0013 (or 0x413) word which is the amount of low memory available in KiB. However, Windows and other operating systems use E820h/INT15h to query the m...
{ "language": "en", "url": "https://stackoverflow.com/questions/126689", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How does SOA service discovery (UDDI) work in practice? I'm just reading up on SOA and the service registry / UDDI get mentioned regularly. It sounds nice but how is used in reality? * *Is the registry meant to decouple a logical service from its' physical implementation (port, url etc)? *Is the registry meant ...
{ "language": "en", "url": "https://stackoverflow.com/questions/126700", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: How accurate can I expect the time to be from a stratum 0 NTP server on the same subnet on ethernet? I have an application that depends on gpsd and ntpd to accurately set the system time on a linux machine. gpsd is fed NMEA + PPS The application is punping ~25MB per second over the network and I think the loading on...
{ "language": "en", "url": "https://stackoverflow.com/questions/126710", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How to make Wget handle an HTTP 100-Continue response? I am trying to POST a HTML (contained in a file) to a URL using Wget like this: wget -O- --debug --header=Content-Type:text/html --post-file=index.html http://localhost/www/encoder.ashx The URL to which the HTML is being posted is a Web applicati...
{ "language": "en", "url": "https://stackoverflow.com/questions/126711", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Immutable Styles in Silverlight 2 Anyone found a good pattern for getting around immutable styles in Silverlight 2? What I mean is does anyone have a workaround for the fact that you cannot switch the style of an element programmatically once it has been set, i.e. the second line here will throw a catastrophic failu...
{ "language": "en", "url": "https://stackoverflow.com/questions/126716", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Is it possible to send and store a Type reference in VB6/VBA? I'm working on a VB6 application and I would like to send a Type as a reference and store it in another form. Is this possible? Sending it is no problem, I just use the ByRef keyword: public Sub SetStopToEdit(ByRef currentStop As StopType) But when I try...
{ "language": "en", "url": "https://stackoverflow.com/questions/126718", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to avoid storing credentials to connect to Oracle with JDBC? Is it possible to setup a JDBC connection to Oracle without providing username/password information in a configuration file (or in any other standard readable location)? Typically applications have a configuration file that contains setup parameters to...
{ "language": "en", "url": "https://stackoverflow.com/questions/126720", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "28" }
Q: Prisoner's Dilemma Algorithm After watching The Dark Knight I became rather enthralled with the concept of the Prisoner's Dilemma. There must be an algorithm that that maximizes one's own gain given a situation. For those that find this foreign: http://en.wikipedia.org/wiki/Prisoner%27s_dilemma Very, very interestin...
{ "language": "en", "url": "https://stackoverflow.com/questions/126737", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How can i move an object drawn in device context python I have drawn an image in the device context using python and I want to move it smoothly/animate either vertically or horizontally. What algorithm should I use? Where can I get info for this kind of tasks in python? A: Once an object is drawn in a device contex...
{ "language": "en", "url": "https://stackoverflow.com/questions/126738", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: What good tools are available to create online help for .net applications? I have a winforms application that presently ships with a chm file for context-sensitive help documentation (not API docs), created using MS HTML Help Workshop. I'd like to move to online documentation (don't have to ship it with the product,...
{ "language": "en", "url": "https://stackoverflow.com/questions/126744", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Compilation fails randomly: "cannot open program database" During a long compilation with Visual Studio 2005 (version 8.0.50727.762), I sometimes get the following error in several files in some project: fatal error C1033: cannot open program database 'v:\temp\apprtctest\win32\release\vc80.pdb' (The file mentione...
{ "language": "en", "url": "https://stackoverflow.com/questions/126751", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "40" }
Q: Examples of Recursive functions Can anybody suggest programming examples that illustrate recursive functions? There are the usual old horses such as Fibonacci series and Towers of Hanoi, but anything besides them would be fun. A: The interpreter design pattern is a quite nice example because many people don't spot ...
{ "language": "en", "url": "https://stackoverflow.com/questions/126756", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "35" }
Q: Qt Jambi: QAbstractListModel not displaying in QListView I've created an implementation of the QAbstractListModel class in Qt Jambi 4.4 and am finding that using the model with a QListView results in nothing being displayed, however using the model with a QTableView displays the data correctly. Below is my implement...
{ "language": "en", "url": "https://stackoverflow.com/questions/126759", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to force a web browser NOT to cache images Background I am writing and using a very simple CGI-based (Perl) content management tool for two pro-bono websites. It provides the website administrator with HTML forms for events where they fill the fields (date, place, title, description, links, etc.) and save it. On...
{ "language": "en", "url": "https://stackoverflow.com/questions/126772", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "150" }
Q: C++ union in C# I'm translating a library written in C++ to C#, and the keyword 'union' exists once. In a struct. What's the correct way of translating it into C#? And what does it do? It looks something like this; struct Foo { float bar; union { int killroy; float fubar; } as; } A: Yo...
{ "language": "en", "url": "https://stackoverflow.com/questions/126781", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "85" }
Q: Checking for code changes in all imported python modules Almost every Python web framework has a simple server that runs a wsgi application and automatically reloads the imported modules every time the source gets changed. I know I can look at the code and see how it's done, but that may take some time and I'm askin...
{ "language": "en", "url": "https://stackoverflow.com/questions/126787", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: If you already know LISP, why would you also want to learn F#? What is the added value for learning F# when you are already familiar with LISP? A: Comparing Lisp directly to F# isn't really fair, because at the end of the day with enough time you could write the same app in either language. However, you should le...
{ "language": "en", "url": "https://stackoverflow.com/questions/126790", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Find two consecutive rows I'm trying to write a query that will pull back the two most recent rows from the Bill table where the Estimated flag is true. The catch is that these need to be consecutive bills. To put it shortly, I need to enter a row in another table if a Bill has been estimated for the last two bill ...
{ "language": "en", "url": "https://stackoverflow.com/questions/126794", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Java: Invalid Keystore format Error Does anyone know how to solve this java error? java.io.IOException: Invalid keystore format I get it when I try and access the certificate store from the Java option in control panels. It's stopping me from loading applets that require elevated privileges. Error Image A: I was a...
{ "language": "en", "url": "https://stackoverflow.com/questions/126798", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Is there a way to determine if an exception is occurring? In a destructor, is there a way to determine if an exception is currently being processed? A: You can use std::uncaught_exception(), but it might not do what you think it does: see GoTW#47 for more information. A: As Luc said, you can use std::uncaught_exce...
{ "language": "en", "url": "https://stackoverflow.com/questions/126800", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Ruby on Rails - Why use tests? I'm confused about what the various testing appliances in Ruby on Rails are for. I have been using the framework for about 6 months but I've never understood the testing part of it. The only testing I've used is JUnit3 in Java and that only briefly. Everything I've read about it just s...
{ "language": "en", "url": "https://stackoverflow.com/questions/126801", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: What should I know about Git before I start using it? I have used "traditional" version control systems to maintain source code repositories on past projects. I am starting a new project with a distributed team and I can see advantages to using a distributed system. Given that I understand SourceSafe, CVS, and Subve...
{ "language": "en", "url": "https://stackoverflow.com/questions/126804", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Pattern for trying different methods when exception is thrown Here's a question to expose my lack of experience: I have a method DoSomething() which throws an exception if it doesn't manage to do it cleanly. If it fails, I try the less accurate method DoSomethingApproximately() several times in the hope that it will...
{ "language": "en", "url": "https://stackoverflow.com/questions/126829", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to solve "An attempt to attach an auto-named database for file..." SQL error? I've got a local .mdf SQL database file that I am using for an integration testing project. Everything works fine on the initial machine I created the project, database, etc. on, but when I try to run the project on another machine I g...
{ "language": "en", "url": "https://stackoverflow.com/questions/126837", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do I set the UI language in vim? I saw this on reddit, and it reminded me of one of my vim gripes: It shows the UI in German. I want English. But since my OS is set up in German (the standard at our office), I guess vim is actually trying to be helpful. What magic incantations must I perform to get vim to switch...
{ "language": "en", "url": "https://stackoverflow.com/questions/126853", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "112" }
Q: Compute Users average weight I have two tables, Users and DoctorVisit User - UserID - Name DoctorsVisit - UserID - Weight - Date The doctorVisit table contains all the visits a particular user did to the doctor. The user's weight is recorded per visit. Query: Sum up all the Users weight, using the last doctor's vi...
{ "language": "en", "url": "https://stackoverflow.com/questions/126855", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Use custom objects as the source for Microsoft Reports (.rdlc) In some instances, I prefer working with custom objects instead of strongly typed datasets and data rows. However, it seems like Microsoft Reporting (included with VS2005) requires strongly typed datasets. Is there a way to use my custom objects to desi...
{ "language": "en", "url": "https://stackoverflow.com/questions/126863", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How can I debug a C# COM assembly when it's being called from a native win32 application? I'm developing a C# assembly which is to be called via COM from a Delphi 7 (iow, native win32, not .net) application. So far, it seems to work. I've exported a TLB file, imported that into my Delphi project, and I can create my...
{ "language": "en", "url": "https://stackoverflow.com/questions/126868", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Best design for lookup-and-possibly-change method I am designing a class that stores (caches) a set of data. I want to lookup a value, if the class contains the value then use it and modify a property of the class. I am concerned about the design of the public interface. Here is how the class is going to be used: ...
{ "language": "en", "url": "https://stackoverflow.com/questions/126870", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I disable updating a form in Windows Forms? During a complicated update I might prefer to display all the changes at once. I know there is a method that allows me to do this, but what is it? A: You can use the old Win32 LockWindowUpdate function: [DllImport("user32.dll")] private static extern long LockWindo...
{ "language": "en", "url": "https://stackoverflow.com/questions/126876", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: How do I make a gwt-ext window not resize when its content resizes? I've run setHeight(600) on a Window, that's it's initial size. I've also went ahead and done setAutoScroll(true). When the content of the window resizes, the window itself resizes. What I want is for the window to stay fixed in size, and when the co...
{ "language": "en", "url": "https://stackoverflow.com/questions/126881", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Data Comparison We have a SQL Server table containing Company Name, Address, and Contact name (among others). We regularly receive data files from outside sources that require us to match up against this table. Unfortunately, the data is slightly different since it is coming from a completely different system. For...
{ "language": "en", "url": "https://stackoverflow.com/questions/126885", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Visual Studio 2005 - Refactor multiple attributes in same time? I use the right button>Refactor>Encapsultate field to have my accessor every time. The problem is when I create new class, I can have more than 10 attributes and it's long to do 1 by 1 every accessor. Is there a faster way to create them? Thank you for ...
{ "language": "en", "url": "https://stackoverflow.com/questions/126894", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: git-svn merges and commit details we are using git-svn to manage branches of an SVN repo. We are facing the following problem: after a number of commits by user X in the branch, user Y would like to use git-svn to merge the changes in branch to trunk. The problem we're seeing is that the commit messages for all the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/126896", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: What is the equivalent of the SQLite datetime function in PostgreSQL? The question is pretty self-explanatory. I'm looking for a PostgreSQL equivalent to the SQLite datetime function. A: postgres=# select to_char(now(),'YYYY-mm-dd HH:MM:ss'); to_char --------------------- 2008-09-24 02:09:20 (1 row) postgr...
{ "language": "en", "url": "https://stackoverflow.com/questions/126897", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Organizing the source code base when mixing two or more languages (like Java and C++) I ran into a problem a few days ago when I had to introduce C++ files into a Java project. It started with a need to measure the CPU usage of the Java process and it was decided that the way to go was to use JNI to call out to a na...
{ "language": "en", "url": "https://stackoverflow.com/questions/126898", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Methods for caching PHP objects to file? In ASPNET, I grew to love the Application and Cache stores. They're awesome. For the uninitiated, you can just throw your data-logic objects into them, and hey-presto, you only need query the database once for a bit of data. By far one of the best ASPNET features, IMO. I've ...
{ "language": "en", "url": "https://stackoverflow.com/questions/126917", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "26" }
Q: How can I ensure a dialog will be modal when opened from an IE BHO? I have an Internet Explorer Browser Helper Object (BHO), written in c#, and in various places I open forms as modal dialogs. Sometimes this works but in some cases it doesn't. The case that I can replicate at present is where IE is running javascrip...
{ "language": "en", "url": "https://stackoverflow.com/questions/126925", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How can I make the AssemblyInfo version of a C# .NET CF program propagate to the Explorer Properties window? It seems like if you compile a Visual Studio solution and have a version # in your AssemblyInfo.cs file, that should propagate to say, the Windows Explorer properties dialog. This way, someone could simply ri...
{ "language": "en", "url": "https://stackoverflow.com/questions/126926", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Log4Net/C# - Disable default logging I am using log4net in a C# project, in the production environment, I want to disable all the logging, but when some fatal error occures it should log all the previous 512 messages in to a file.I have successfully configured this, and it is working fine. It logs the messages in t...
{ "language": "en", "url": "https://stackoverflow.com/questions/126939", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }