text
stringlengths
8
267k
meta
dict
Q: What's a good way to write a Cocoa front-end to an Erlang application? I'm exploring the possibility of writing an application in Erlang, but it would need to have a portion written in Cocoa (presumably Objective-C). I'd like the front-end and back-end to be able to communicate easily. How can this best be done? I c...
{ "language": "en", "url": "https://stackoverflow.com/questions/37381", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Having MSDN on a usb key Is there a way to have msdn documentation on a usb key ? either web or the MSDN Library program. i've been setting up my usbkey with portableapps stuff. A: i think when you do step 2 and install the documentation just tell direct it to the usb key drive letter. easy peasy. A: Have a look a...
{ "language": "en", "url": "https://stackoverflow.com/questions/37388", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Arithmetic with Arbitrarily Large Integers in PHP Ok, so PHP isn't the best language to be dealing with arbitrarily large integers in, considering that it only natively supports 32-bit signed integers. What I'm trying to do though is create a class that could represent an arbitrarily large binary number and be able ...
{ "language": "en", "url": "https://stackoverflow.com/questions/37391", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Linux Lightweight Distro and X Windows for Development I want to build a lightweight linux configuration to use for development. The first idea is to use it inside a Virtual Machine under Windows, or old Laptops with 1Gb RAM top. Maybe even a distributable environment for developers. So the whole idea is to use a LA...
{ "language": "en", "url": "https://stackoverflow.com/questions/37396", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How do I make a fully statically linked .exe with Visual Studio Express 2005? My current preferred C++ environment is the free and largely excellent Microsoft Visual Studio 2005 Express edition. From time to time I have sent release .exe files to other people with pleasing results. However recently I made the distur...
{ "language": "en", "url": "https://stackoverflow.com/questions/37398", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "131" }
Q: What is the best way to interpret Perfmon analysis into application specific observations/data? Many of us have used Perfmon tool to do performance analysis. Especially with .Net counters, but there are so many variables going on in Perfmon, that it always becomes hard to interpret Perfmon results in to valuable fee...
{ "language": "en", "url": "https://stackoverflow.com/questions/37425", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Get back to basics. How do I get back into C++? I haven't used C++ since college. Even though I've wanted to I haven't needed to do any until I started wanting to write plugins for Launchy. Is there a good book to read to get back into it? My experience since college is mainly C# and recently ruby. I bought some...
{ "language": "en", "url": "https://stackoverflow.com/questions/37428", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Reasons for SQL differences Why are SQL distributions so non-standard despite an ANSI standard existing for SQL? Are there really that many meaningful differences in the way SQL databases work or is it just the two databases with which I have been working: MS-SQL and PostgreSQL? Why do these differences arise? A: T...
{ "language": "en", "url": "https://stackoverflow.com/questions/37441", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Equivalent to StAX for C I've used the StAX API in Java quite a bit, and find it quite a clean way of dealing with XML files. Is there any equivalent library I could use for performing similar processing in C? A: libxml is a heavily used and documented XML library for C, which provides a SAX API. Expat is another, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/37449", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: iPhone App Minus App Store? If I create an application on my Mac, is there any way I can get it to run on an iPhone without going through the app store? It doesn't matter if the iPhone has to be jailbroken, as long as I can still run an application created using the official SDK. For reasons I won't get into, I can'...
{ "language": "en", "url": "https://stackoverflow.com/questions/37464", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "201" }
Q: How to Determine the Installed ASP.NET Version of Host from a Web Page I have a site running in a Windows shared hosting environment. In their control panel for the shared hosting account I have it set to use ASP.NET version 3.0 but it doesn't say 3.5 SP1 specifically. How can I view the installed version running on...
{ "language": "en", "url": "https://stackoverflow.com/questions/37468", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Is this minimum spanning tree algorithm correct? The minimum spanning tree problem is to take a connected weighted graph and find the subset of its edges with the lowest total weight while keeping the graph connected (and as a consequence resulting in an acyclic graph). The algorithm I am considering is: * *Find ...
{ "language": "en", "url": "https://stackoverflow.com/questions/37471", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How can I assert() without using abort()? If I use assert() and the assertion fails then assert() will call abort(), ending the running program abruptly. I can't afford that in my production code. Is there a way to assert in runtime yet be able to catch failed assertions so I have the chance to handle them gracefu...
{ "language": "en", "url": "https://stackoverflow.com/questions/37473", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "27" }
Q: How can I simply inherit methods from an existing instance? Below I have a very simple example of what I'm trying to do. I want to be able to use HTMLDecorator with any other class. Ignore the fact it's called decorator, it's just a name. import cgi class ClassX(object): pass # ... with own __repr__ class Clas...
{ "language": "en", "url": "https://stackoverflow.com/questions/37479", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Calculate Video Duration I suck at math. I need to figure out how to calculate a video duration with only a few examples of values. For example, a value of 70966 is displayed as 1:10 minutes. A value of 30533 displays as 30 seconds. A value of 7007 displays as 7 seconds. A: Looks like the numbers are in millisecon...
{ "language": "en", "url": "https://stackoverflow.com/questions/37483", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Filter out HTML tags and resolve entities in python Because regular expressions scare me, I'm trying to find a way to remove all HTML tags and resolve HTML entities from a string in Python. A: While I agree with Lucas that regular expressions are not all that scary, I still think that you should go with a specializ...
{ "language": "en", "url": "https://stackoverflow.com/questions/37486", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: How to track if browser is Silverlight enabled I'm trying to get some stats on how many of the visitors to our website have Silverlight enabled browsers. We currently use Google Analytics for the rest of our stats so ideally we'd like to just add 'Silverlight enabled' tracking in with the rest of our Google Analyt...
{ "language": "en", "url": "https://stackoverflow.com/questions/37495", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: List of ASP.NET Versions? Thanks to a Q&A on stackoverflow. I just found out how to determine the installed version on my hosting provider's server. Now I need to know what that number means. Using <%=Environment.Version%> on my local machine returns 2.0.50727.3053. Can someone give me a list of the version 1, 1.1, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/37501", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Is it possible to convert projects wizard created for MSVS 2005 to MSVS 2008 format automatically I have a bunch of wizards created for MSVS 2005. Is it possible to convert them to MSVS 2008 format automatically? A: Looking at these posts: * *How to use solutions and projects between Visual Studio 2005 and 2008 ...
{ "language": "en", "url": "https://stackoverflow.com/questions/37503", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Recursion in production-quality VC++ Code When writing production-quality VC++ code, is the use of recursion acceptable? Why or why not? A: Is there a way to determine at what point I would encounter a stack overflow? Not really. A stack overflow happens when you exhaust the stack space - however... * *The ini...
{ "language": "en", "url": "https://stackoverflow.com/questions/37516", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Add XML Comments to class properties generated by the LINQ to SQL designer I used the LINQ to SQL designer in Visual Studio to create an object model of a database. Now, I want to add XML comments to each generated property but I can't figure out how to do it without erasing the properties the next time the dbml fi...
{ "language": "en", "url": "https://stackoverflow.com/questions/37519", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: What steps can I give a windows user to make a given file writeable Imagine we have a program trying to write to a particular file, but failing. On the Windows platform, what are the possible things which might be causing the file to be un-writable, and what steps could be suggested to an end user/administrator to f...
{ "language": "en", "url": "https://stackoverflow.com/questions/37525", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Simple audio input API on a Mac? I'd like to pull a stream of PCM samples from a Mac's line-in or built-in mic and do a little live analysis (the exact nature doesn't pertain to this question, but it could be an FFT every so often, or some basic statistics on the sample levels, or what have you). What's a good fit f...
{ "language": "en", "url": "https://stackoverflow.com/questions/37529", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Is it possible to start a scheduled Windows task from a package? Does anyone know if you can and how to start off a scheduled Windows task on a Remote Server from within a SQL Server Integration Services (SSIS) package? A: Assuming you run it on Windows Server 2003/2008 or Vista, use SSIS Execute Process Task to st...
{ "language": "en", "url": "https://stackoverflow.com/questions/37532", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: What's the easiest way to read a FoxPro DBF file from Python? I've got a bunch of FoxPro (VFP9) DBF files on my Ubuntu system, is there a library to open these in Python? I only need to read them, and would preferably have access to the memo fields too. Update: Thanks @cnu, I used Yusdi Santoso's dbf.py and it work...
{ "language": "en", "url": "https://stackoverflow.com/questions/37535", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "25" }
Q: How do I determine the size of my array in C? How do I determine the size of my array in C? That is, the number of elements the array can hold? A: The sizeof "trick" is the best way I know, with one small but (to me, this being a major pet peeve) important change in the use of parenthesis. As the Wikipedia entry m...
{ "language": "en", "url": "https://stackoverflow.com/questions/37538", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1352" }
Q: Multiple threads stuck in native calls (Java) I have a problem with an application running on Fedora Core 6 with JDK 1.5.0_08. After some amount of uptime (usually some days) threads begin getting stuck in native methods. The threads are locked in something like this: "pool-2-thread-2571" prio=1 tid=0x08dd0b28 nid=0...
{ "language": "en", "url": "https://stackoverflow.com/questions/37551", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Adding server-side event to extender control I have an extender control that raises a textbox's OnTextChanged event 500ms after the user has finished typing. The problem with this is that OnTextChanged gets raised when the textbox loses focus, which causes problems (because of the postback). What I'd like to do is g...
{ "language": "en", "url": "https://stackoverflow.com/questions/37555", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: What exactly is Appdomain recycling I am trying to figure out what exactly is Appdomain recycling? When a aspx page is requested for the first time from a DotNet application, i understand that an appdomain for that app is created, and required assemblies are loaded into that appdomain, and the request will be served...
{ "language": "en", "url": "https://stackoverflow.com/questions/37564", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "46" }
Q: find duplicate addresses in database, stop users entering them early? How do I find duplicate addresses in a database, or better stop people already when filling in the form ? I guess the earlier the better? Is there any good way of abstracting street, postal code etc so that typos and simple attempts to get 2 regis...
{ "language": "en", "url": "https://stackoverflow.com/questions/37568", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: Integrating InstantRails with Aptana or any other IDE So I've been using InstantRails to check out Ruby on rails. I've been using Notepad++ for the editing. Now I don't want to install Ruby or Rails on my machine. Is there any walk through/tutorial on how to integrate Radrails or Netbeans with InstantRails? A: Her...
{ "language": "en", "url": "https://stackoverflow.com/questions/37573", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Queue alternatives to MSMQ on Windows? If you want to use a queuing product for durable messaging under Windows, running .NET 2.0 and above, which alternatives to MSMQ exist today? I know of ActiveMQ (http://activemq.apache.org/), and I've seen references to WSMQ (pointing to http://wsmq.net), but the site seems to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/37579", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "33" }
Q: InfoPath 2003 and the xs:any type I am implementing exception handling for our BizTalk services, and have run into a fairly major stumbling block. In order to make the exception processing as generic as possible, and therefore to allow us to use it for any BizTalk application, our XML error schema includes an xs:any...
{ "language": "en", "url": "https://stackoverflow.com/questions/37584", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Consuming web services from Oracle PL/SQL Our application is interfacing with a lot of web services these days. We have our own package that someone wrote a few years back using UTL_HTTP and it generally works, but needs some hard-coding of the SOAP envelope to work with certain systems. I would like to make it more...
{ "language": "en", "url": "https://stackoverflow.com/questions/37586", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Displaying XML data in a Winforms control I would like to display details of an xml error log to a user in a winforms application and am looking for the best control to do the job. The error data contains all of the sever variables at the time that the error occurred. These have been formatted into an XML document t...
{ "language": "en", "url": "https://stackoverflow.com/questions/37591", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Where can I get free Vista style developer graphics? What is the best source of free Vista style graphics for application development? I want 32x32 and 16x16 that I can use in a Winforms application. A: Best place I've found for commercial toolbar icons etc is glyfx.com. A: If you're using Visual Studio Professio...
{ "language": "en", "url": "https://stackoverflow.com/questions/37593", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Why does TreeNodeCollection not implenent IEnumerable? TreeNodeCollection, like some of the other control collections in System.Windows.Forms, implements IEnumerable. Is there any design reason behind this or is it just a hangover from the days before generics? A: Yes, there are many .NET Framework collection, tha...
{ "language": "en", "url": "https://stackoverflow.com/questions/37597", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Connecting Team Explorer to Codeplex anonymously I was using Codeplex and tried connecting to their source control using Team Explorer, with no joy. I also tried connecting with HTTPS or HTTP, using the server name and the project name. As I do not have a user account on Codeplex I could not login. I am just trying...
{ "language": "en", "url": "https://stackoverflow.com/questions/37614", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What is reflection and why is it useful? What is reflection, and why is it useful? I'm particularly interested in Java, but I assume the principles are the same in any language. A: Uses of Reflection Reflection is commonly used by programs which require the ability to examine or modify the runtime behavior of appli...
{ "language": "en", "url": "https://stackoverflow.com/questions/37628", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2505" }
Q: Examining Berkeley DB files from the CLI I have a set of Berkeley DB files on my Linux file system that I'd like to examine. What useful tools exist for getting a quick overview of the contents? I can write Perl scripts that use BDB modules for examining them, but I'm looking for some CLI utility to be able to take ...
{ "language": "en", "url": "https://stackoverflow.com/questions/37644", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "61" }
Q: Swapping column values in MySQL I have a MySQL table with coordinates, the column names are X and Y. Now I want to swap the column values in this table, so that X becomes Y and Y becomes X. The most apparent solution would be renaming the columns, but I don't want to make structure changes since I don't necessarily ...
{ "language": "en", "url": "https://stackoverflow.com/questions/37649", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "155" }
Q: How to implement a file download in asp.net What is the best way to implement, from a web page a download action using asp.net 2.0? Log files for a action are created in a directory called [Application Root]/Logs. I have the full path and want to provide a button, that when clicked will download the log file from t...
{ "language": "en", "url": "https://stackoverflow.com/questions/37650", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "25" }
Q: Is there an n-ary tree implementation in Perl? I'm writing a Perl script and would like to use a n-ary tree data structure. Is there a good implementation that is available as source code (rather than part of a Perl library) ? A: Adding to what Matthew already said, it looks like the following modules would be suit...
{ "language": "en", "url": "https://stackoverflow.com/questions/37662", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Auto defines in C editors... Why? When Eclipse creates a new file (.c or .h file) in a C project the editor always auto creates a #define at the top of the file like this: If the file is named 'myCFile.c' there will be a #define at the start of the file like this #ifndef MYCFILE_C_ #define MYCFILE_C_ I have seen ot...
{ "language": "en", "url": "https://stackoverflow.com/questions/37665", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: What tool to use for automatic nightly builds? I have a few Visual Studio Solutions/Projects that are being worked on in my company, which now require a scheme for automatic nightly builds. Such a scheme needs to be able to check the latest versions from SVN, build the solutions, create the appropriate downloadable ...
{ "language": "en", "url": "https://stackoverflow.com/questions/37666", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: Create DB in SQL Server based on Visio Data Model I have created a database model in Visio Professional (2003). I know that the Enterprise version has the ability to create a DB in SQL Server based on the data in Visio. I do not have the option to install Enterprise. Aside from going through the entire thing one tab...
{ "language": "en", "url": "https://stackoverflow.com/questions/37672", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to replace plain URLs with links? I am using the function below to match URLs inside a given text and replace them for HTML links. The regular expression is working great, but currently I am only replacing the first match. How I can replace all the URL? I guess I should be using the exec command, but I did not r...
{ "language": "en", "url": "https://stackoverflow.com/questions/37684", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "488" }
Q: Eclipse Plugin Dev: How do I get the paths for the currently selected project? I'm writing a plugin that will parse a bunch of files in a project. But for the moment I'm stuck searching through the Eclipse API for answers. The plugin works like this: Whenever I open a source file I let the plugin parse the source's ...
{ "language": "en", "url": "https://stackoverflow.com/questions/37692", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Concatenate several fields into one with SQL I have three tables tag, page, pagetag With the data below page ID NAME 1 page 1 2 page 2 3 page 3 4 page 4 tag ID NAME 1 tag 1 2 tag 2 3 tag 3 4 tag 4 pagetag ID PAGEID TAGID 1 2 1 2 2 3 3...
{ "language": "en", "url": "https://stackoverflow.com/questions/37696", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: True random number generator Sorry for this not being a "real" question, but Sometime back i remember seeing a post here about randomizing a randomizer randomly to generate truly random numbers, not just pseudo random. I dont see it if i search for it. Does anybody know about that article? A: According to Wikipedia...
{ "language": "en", "url": "https://stackoverflow.com/questions/37702", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "25" }
Q: To use views or not to use views I seem right now to be embroiled in a debate with another programmer on this project who thinks that views have no merits. He proposes a system that PHP looks something like this: $draw = new Draw; $nav = $draw->wideHeaderBox(). $draw->left(). $draw->image(). Image::get(...
{ "language": "en", "url": "https://stackoverflow.com/questions/37731", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: What is the regex pattern for datetime (2008-09-01 12:35:45 )? What is the RegEx pattern for DateTime (2008-09-01 12:35:45 ) ? I get this error: No ending delimiter '^' found Using: preg_match('(?n:^(?=\d)((?<day>31(?!(.0?[2469]|11))|30(?!.0?2)|29(?(.0?2)(?=.{3,4}(1[6-9]|[2-9]\d)(0[48]|[2468][048]|[13579][26])|(16...
{ "language": "en", "url": "https://stackoverflow.com/questions/37732", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "67" }
Q: SQL query to get the top "n" scores out of a list I'd like to find the different ways to solve a real life problem I had: imagine to have a contest, or a game, during which the users collect points. You have to build a query to show the list of users with the best "n" scores. I'm making an example to clarify. Let's...
{ "language": "en", "url": "https://stackoverflow.com/questions/37743", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How do you prevent the IIS default site web.config file being inherited by virtual directories? I have the following code in a web.config file of the default IIS site. <httpModules> <add type="MDL.BexWebControls.Charts.ChartStreamHandler,Charts" name="ChartStreamHandler"/> </httpModules> Then when I setup and b...
{ "language": "en", "url": "https://stackoverflow.com/questions/37759", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: SugarCRM 5 - Create a sub-panel for invoices in Account Panel I'm customizing a SugarCRM 5, and in my SugarCRM database I have all invoices which were imported from our ERP. Now, I would like to know if it is possible to create a new sub-panel in the Accounts Panel without editing the original SugarCRM files, so tha...
{ "language": "en", "url": "https://stackoverflow.com/questions/37764", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Are there any guidelines for designing user interface for mobile devices? I am creating an application for a Windows Mobile computer. The catch is that the device (Motorola MC17) does not have a touch screen or universal keys - there are only six programmable hardware keys. Fitt's law is not applicable here, most Mi...
{ "language": "en", "url": "https://stackoverflow.com/questions/37783", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Can a fixture be changed dynamically between test methods in CakePHP? Is it possible to have a fixture change between test methods? If so, how can I do this? My syntax for this problem : In the cakephp framework i am building tests for a behavior that is configured by adding fields to the table. This is intended t...
{ "language": "en", "url": "https://stackoverflow.com/questions/37785", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do you manage SQL Queries At the moment my code (PHP) has too many SQL queries in it. eg... // not a real example, but you get the idea... $results = $db->GetResults("SELECT * FROM sometable WHERE iUser=$userid"); if ($results) { // Do something } I am looking into using stored procedures to reduce this and...
{ "language": "en", "url": "https://stackoverflow.com/questions/37791", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: GCOV for multi-threaded apps Is it possible to use gcov for coverage testing of multi-threaded applications? I've set some trivial tests of our code-base up, but it would be nice to have some idea of the coverage we're achieving. If gcov isn't appropriate can anyone recommend an alternative tool (possible oprofile)...
{ "language": "en", "url": "https://stackoverflow.com/questions/37799", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Link to samba shares in html First off if you're unaware, samba or smb == Windows file sharing, \\computer\share etc. I have a bunch of different files on a bunch of different computers. It's mostly media and there is quite a bit of it. I'm looking into various ways of consolidating this into something more manageab...
{ "language": "en", "url": "https://stackoverflow.com/questions/37804", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: Filter linq list on property value I have a List<int> and a List<customObject>. The customObject class has an ID property. How can I get a List<customObject> containing only the objects where the ID property is in the List<int> using LINQ? Edit: I accepted Konrads answer because it is easier/more intuitive to read. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/37805", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: Examples of using semantic web technologies in real world applications Are you working on a (probably commercial) product which uses RDF/OWL/SPARQL technologies? If so, can you please describe your product? A: O'Reilly's Practical RDF has a chatper titled Commercial Uses of RDF/XML. The table at the left lists the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/37808", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "23" }
Q: How do I generate a Friendly URL in C#? How can I go about generating a Friendly URL in C#? Currently I simple replace spaces with an underscore, but how would I go about generating URL's like Stack Overflow? For example how can I convert: How do I generate a Friendly URL in C#? Into how-do-i-generate-a-friendly-...
{ "language": "en", "url": "https://stackoverflow.com/questions/37809", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "28" }
Q: MSMQ monitoring Is there anything which can help with msmq monitoring? I'd like to get some event/monit when a message appears in queue and the same on leave. A: Check out the Windows Management Performance counters. If you look in your Administrative Tools and find "Performance Counters", you will be able to dig t...
{ "language": "en", "url": "https://stackoverflow.com/questions/37812", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Viewing event log via a web interface I'd like to be able to view the event log for a series of asp.net websites running on IIS. Can I do this externally, for example, through a web interface? A: No, but there are two solutions I would recommend: * *Adiscon EventLogger is a third-party product that will send you...
{ "language": "en", "url": "https://stackoverflow.com/questions/37821", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Is it just the iPhone simulator that is restricted to Intel only Mac's? I have read that the iPhone SDK (part of Xcode 3) is restricted to Mac's with the intel chipset. Does this restriction apply to only the simulator part of the SDK or the complete shebang? I have a Powerbook G4 running Leopard and would very much...
{ "language": "en", "url": "https://stackoverflow.com/questions/37822", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Good reasons NOT to use a relational database? Can you please point to alternative data storage tools and give good reasons to use them instead of good-old relational databases? In my opinion, most applications rarely use the full power of SQL--it would be interesting to see how to build an SQL-free application. A:...
{ "language": "en", "url": "https://stackoverflow.com/questions/37823", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "139" }
Q: How do I implement a chromeless window with WPF? I want to show a chromeless modal window with a close button in the upper right corner. Is this possible? A: You'll pretty much have to roll your own Close button, but you can hide the window chrome completely using the WindowStyle attribute, like this: <Window Windo...
{ "language": "en", "url": "https://stackoverflow.com/questions/37830", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "25" }
Q: UI and event testing So I know that unit testing is a must. I get the idea that TDD is the way to go when adding new modules. Even if, in practice, I don't actually do it. A bit like commenting code, really. The real thing is, I'm struggling to get my head around how to unit-test the UI and more generally objects t...
{ "language": "en", "url": "https://stackoverflow.com/questions/37832", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What exactly is WPF? I have seen lots of questions recently about WPF... * *What is it? *What does it stand for? *How can I begin programming WPF? A: WPF is the next frontier with Windows UIs. * *Built on top of DirectX, it opens up hardware acceleration support for your .Net 3.0+ user-interfaces. *Emp...
{ "language": "en", "url": "https://stackoverflow.com/questions/37843", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: Application Control Scripts on Unix I'm looking for some software that allows me to control a server based application, that is, there are bunch of interdependent processes that I'd like to be able to start up, shut down and monitor in a controller manner. I've come across programs like Autosys, but that's expensive...
{ "language": "en", "url": "https://stackoverflow.com/questions/37851", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Roaming settings with LocalFileSettingsProvider On my way through whipping up a Windows Forms application I thought it might have been a good idea to use the settings file to store miscellaneous application options (instead of the registry) and user parameters (window positions, column orderings, etc.). Out of the b...
{ "language": "en", "url": "https://stackoverflow.com/questions/37871", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How can you easily reorder columns in LINQ to SQL designer? When designing LINQ classes using the LINQ to SQL designer I've sometimes needed to reorder the classes for the purposes of having the resultant columns in a DataGridView appear in a different order. Unfortunately this seems to be exceedingly difficult; you...
{ "language": "en", "url": "https://stackoverflow.com/questions/37882", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do you update your web application on the server? I am aware of Capistrano, but it is a bit too heavyweight for me. Personally, I set up two Mercurial repositories, one on the production server and another on my local dev machine. Regularly, when a new feature is ready, I push changes from repository on my local...
{ "language": "en", "url": "https://stackoverflow.com/questions/37887", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How do you use WebServiceMessageDrivenBean in Spring-WS? How do you use the the org.springframework.ws.transport.jms.WebServiceMessageDrivenBean class from the Java Spring Framework - Spring-WS project? There is very little documentation or examples available on the web. A: From what I gather from reading the javad...
{ "language": "en", "url": "https://stackoverflow.com/questions/37912", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do you display a dialog from a hidden window application? I have developed a COM component (dll) that implements an Edit() method displaying a WTL modal dialog. The complete interface to this COM component corresponds to a software standard used in the chemical process industry (CAPE-OPEN) and as a result this C...
{ "language": "en", "url": "https://stackoverflow.com/questions/37920", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to test java application for performance bottlenecks? I am reviewing a big java application to see if there are any performance bottlenecks. The real problem is that I cannot pinpoint the performance issues to any single module. The whole application is slow as such. Is there some tool/technique I can use to hel...
{ "language": "en", "url": "https://stackoverflow.com/questions/37929", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: What's the use of value types in .Net? The official guidelines suggest that there can be very few practical uses for these. Does anyone have examples of where they've put them to good use? A: Au Contrare... you'll find C/C++ people flocking to structs a.k.a. value types. An example would be data packets. If you ha...
{ "language": "en", "url": "https://stackoverflow.com/questions/37931", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: XML in C# - Read from Resources, Manipulate and Display I'd like to do the following and can't find an elegant way: * *Read an XML template into a System.Xml.XmlDocument *Populate it with data from my UI *Transform it with an XSLT I've written *Apply a CSS Stylesheet *Render it to a WebBrowser control...
{ "language": "en", "url": "https://stackoverflow.com/questions/37932", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Handling XSD Dataset ConstraintExceptions Does anyone have any tips for dealing with ConstraintExceptions thrown by XSD datasets? This is the exception with the cryptic message: System.Data.ConstraintException : Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key ...
{ "language": "en", "url": "https://stackoverflow.com/questions/37936", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How popular is WPF as a technology? I had a discussion with some colleagues mentioning that there are not too many projects that we do which make use of WPF for creating UI for a windows application (we almost always use Windows Forms instead). * *Are your experiences the same - i.e. there is not too much adoptio...
{ "language": "en", "url": "https://stackoverflow.com/questions/37944", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: C++ : What's the easiest library to open video file I would like to open a small video file and map every frames in memory (to apply some custom filter). I don't want to handle the video codec, I would rather let the library handle that for me. I've tried to use Direct Show with the SampleGrabber filter (using this ...
{ "language": "en", "url": "https://stackoverflow.com/questions/37956", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "27" }
Q: Tool for posting test messages onto a JMS queue? Can anyone recommend a tool for quickly posting test messages onto a JMS queue? Description: * *The tool should allow the user to enter some data, perhaps an XML payload, and then submit it to a queue. *I should be able to test consumer without producer. A: Apach...
{ "language": "en", "url": "https://stackoverflow.com/questions/37969", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "23" }
Q: How do I change XML indentation in IntelliJ IDEA? By default IntelliJ IDEA 7.0.4 seems to use 4 spaces for indentation in XML files. The project I'm working on uses 2 spaces as indentation in all it's XML. Is there a way to configure the indentation in IntelliJ's editor? A: In IntelliJ IDEA 10.0.3 it's File > Se...
{ "language": "en", "url": "https://stackoverflow.com/questions/37976", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Recommendations for implementations of ActiveRecord Does anyone have any recommendations for implementations of ActiveRecord in PHP? I've been using CBL ActiveRecord, but I was wondering if there were any viable alternatives. A: I realize this is old, but there is an absolutely fabulous PHP Activecord library calle...
{ "language": "en", "url": "https://stackoverflow.com/questions/37979", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Using MS Access & ODBC to connect to a remote PostgreSQL I currently have an MS Access application that connects to a PostgreSQL database via ODBC. This successfully runs on a LAN with 20 users (each running their own version of Access). Now I am thinking through some disaster recovery scenarios, and it seems that a...
{ "language": "en", "url": "https://stackoverflow.com/questions/37991", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: How to Get attachments Associated with artifacts in SourceForge Enterprise Edition We are using SourceForge Enterprise Edition 4.4 in one of our project. My question is, in CollabNet SFEE (SourceForge Enterprise Edition 4.4), how will we get attachments associated with an Artifacts Using SFEE SOAP API? We have made ...
{ "language": "en", "url": "https://stackoverflow.com/questions/37996", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Whats the best way to deliver TFS build status notifications to the team? I like the status email sent by TFS's alerts mechanism when a build breaks. However I would like to send such an email to the entire team and not rely on the team to subscribe to the alert... Having a hard time producing a nice and detailed en...
{ "language": "en", "url": "https://stackoverflow.com/questions/37997", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: How to get your network support team behind click-once? I'm trying to make the case for click-once and smart client development but my network support team wants to keep with web development for everything. What is the best way to convince them that click-once and smart client development have a place in the busines...
{ "language": "en", "url": "https://stackoverflow.com/questions/38002", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to use LINQ To SQL in an N-Tier Solution? Now that LINQ to SQL is a little more mature, I'd like to know of any techniques people are using to create an n-tiered solution using the technology, because it does not seem that obvious to me. A: Hm, Rockford Lhotka sad, that LINQ to SQL is wonderful technology for f...
{ "language": "en", "url": "https://stackoverflow.com/questions/38005", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: C# string concatenation and string interning When performing string concatentation of an existing string in the intern pool, is a new string entered into the intern pool or is a reference returned to the existing string in the intern pool? According to this article, String.Concat and StringBuilder will insert new st...
{ "language": "en", "url": "https://stackoverflow.com/questions/38010", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Referencing same table name in different schemas I am facing problem with an Oracle Query in a .net 2.0 based windows application. I am using System.Data.OracleClient to connect to oracle database. Name of database is myDB. Below the the connection string I am using: Data Source=(DESCRIPTION =(ADDRESS_LIST =(ADDRESS...
{ "language": "en", "url": "https://stackoverflow.com/questions/38014", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: What's the best approach to naming classes? Coming up with good, precise names for classes is notoriously difficult. Done right, it makes code more self-documenting and provides a vocabulary for reasoning about code at a higher level of abstraction. Classes which implement a particular design pattern might be given...
{ "language": "en", "url": "https://stackoverflow.com/questions/38019", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "102" }
Q: How do I find the authoritative name-server for a domain name? How can I find the origins of conflicting DNS records? A: The term you should be googling is "authoritative," not "definitive". On Linux or Mac you can use the commands whois, dig, host, nslookup or several others. nslookup might also work on Windows. A...
{ "language": "en", "url": "https://stackoverflow.com/questions/38021", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "354" }
Q: How can I improve my support of Novell networks when I don't have a Novell network? I work for a .NET/MSSQL shop that has trouble supporting customers running Novell, partially because we don't have Novell (or the money for it) and partially because we have no one with Novell experience. This question could easily b...
{ "language": "en", "url": "https://stackoverflow.com/questions/38026", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Why does Splint (the C code checker) give an error when comparing a float to an int? Both are mathematical values, however the float does have more precision. Is that the only reason for the error - the difference in precision? Or is there another potential (and more serious) problem? A: It's because the set of int...
{ "language": "en", "url": "https://stackoverflow.com/questions/38027", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Selecting X words from a text field in MySQL I'm building a basic search functionality, using LIKE (I'd be using fulltext but can't at the moment) and I'm wondering if MySQL can, on searching for a keyword (e.g. WHERE field LIKE '%word%') return 20 words either side of the keyword, as well? A: You can do it all in ...
{ "language": "en", "url": "https://stackoverflow.com/questions/38035", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: C++: How to extract a string from RapidXml In my C++ program I want to parse a small piece of XML, insert some nodes, then extract the new XML (preferably as a std::string). RapidXml has been recommended to me, but I can't see how to retrieve the XML back as a text string. (I could iterate over the nodes and attribu...
{ "language": "en", "url": "https://stackoverflow.com/questions/38037", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: How can I get the DateTime for the start of the week? How do I find the start of the week (both Sunday and Monday) knowing just the current time in C#? Something like: DateTime.Now.StartWeek(Monday); A: Use an extension method: public static class DateTimeExtensions { public static DateTime StartOfWeek(this Da...
{ "language": "en", "url": "https://stackoverflow.com/questions/38039", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "566" }
Q: How to check if a process is still running using Python on Linux? The only nice way I've found is: import sys import os try: os.kill(int(sys.argv[1]), 0) print "Running" except: print "Not running" (Source) But is this reliable? Does it work with every process and every distribution? A: He...
{ "language": "en", "url": "https://stackoverflow.com/questions/38056", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "39" }