text
stringlengths
8
267k
meta
dict
Q: Simple database application for Windows I need to build a simple, single user database application for Windows. Main requirements are independence from windows version and installed software. What technologies (language/framework) would you recommend? My preference for language is the Visual Basic. EDIT: What about ...
{ "language": "en", "url": "https://stackoverflow.com/questions/113723", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: PHP webpage doesn't launch unix command even after updated sudoers Basically I am trying to restart a service from a php web page. Here is the code: <?php exec ('/usr/bin/sudo /etc/init.d/portmap restart'); ?> But, in /var/log/httpd/error_log, I get unable to change to sudoers gid: Operation not permitted and in...
{ "language": "en", "url": "https://stackoverflow.com/questions/113728", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do I run a script when ip-address changes (most likely using a dhclient hook) on a (Ubuntu) Linux machine? I have a script which contacts a few sources and tell them "the IP-address XXX.XXX.XXX.XXX is my current one". My test web server has a dynamic IP-address through DHCP and amongst other things it needs to u...
{ "language": "en", "url": "https://stackoverflow.com/questions/113730", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: CruiseControl.NET post-build actions We have CC.NET setup on our ASP.NET app. When we build the project, the ASP.NET app is pre-compiled and copied to a network share, from which a server runs the application. The server is a bit different from development box'es, and the next server in our staging environment diffe...
{ "language": "en", "url": "https://stackoverflow.com/questions/113731", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I use PowerShell to stop and start a clustered "Generic Service"? How do I use PowerShell to stop and start a "Generic Service" as seen in the Microsoft "Cluster Administrator" software? A: You can also use WMI. You can get all the Generic Services with: $services = Get-WmiObject -Computer "Computer" -namesp...
{ "language": "en", "url": "https://stackoverflow.com/questions/113737", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do I cancel a text selection after the initial mousedown event? I'm trying to implement a pop-up menu based on a click-and-hold, positioned so that a (really) slow click will still trigger the default action, and with the delay set so that a text-selection gesture won't usually trigger the menu. What I can't s...
{ "language": "en", "url": "https://stackoverflow.com/questions/113750", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Programmatically add an application to Windows Firewall I have an application that is installed and updated via ClickOnce. The application downloads files via FTP, and therefore needs to be added as an exception to the windows firewall. Because of the way that ClickOnce works, the path to the EXE changes with ever...
{ "language": "en", "url": "https://stackoverflow.com/questions/113755", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "27" }
Q: Can you render a Direct3D window for one process into another process' HWND? What I want to do is have a Windows application launch another Direct3D application and have the Direct3D application render into a control provided by the parent process. Is this even possible? If it is, how would it be done? A: It can...
{ "language": "en", "url": "https://stackoverflow.com/questions/113758", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Is there any way to inherit the existing TLD definition for particular JSP Tag? I am planning to extend the basic html input tag provided by Spring to incorporate more features into it. I did similar kind of exercise in past for Struts too. At that point of time I had to create a tld file with the attributes that I ...
{ "language": "en", "url": "https://stackoverflow.com/questions/113765", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: how to workaround a java image scaling bug I've got a java servlet which is hitting this bug when down-scaling images... http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5101502 I'm trying to work out the best way to work around it and would appreciate any ideas from the community. Thanks, Steve A: Image scaling ...
{ "language": "en", "url": "https://stackoverflow.com/questions/113776", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: JavaScript curry: what are the practical applications? I don’t think I’ve grokked currying yet. I understand what it does, and how to do it. I just can’t think of a situation I would use it. Where are you using currying in JavaScript (or where are the main libraries using it)? DOM manipulation or general application...
{ "language": "en", "url": "https://stackoverflow.com/questions/113780", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "186" }
Q: using dotnetnuke (dnn) with with subversion Currently i am developing sites using DNN framework. Currently my development and staging environment is same. Client is vewing same site which I am using for development. I have started using tortoise svn (subversion) for maintaining versions and backup. I am using file b...
{ "language": "en", "url": "https://stackoverflow.com/questions/113791", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: MySQL foreign keys - how to enforce one-to-one across tables? If I have a table in MySQL which represents a base class, and I have a bunch of tables which represent the fields in the derived classes, each of which refers back to the base table with a foreign key, is there any way to get MySQL to enforce the one-to-o...
{ "language": "en", "url": "https://stackoverflow.com/questions/113803", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Class library with support for several persistence strategies I am developing a C++ class library containing domain model classes, and I would like to add support for instantiating these classes from various persistence mechanisms, i.e. databases and file. The user of the class library should be given an interface(?...
{ "language": "en", "url": "https://stackoverflow.com/questions/113818", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Mount TrueCrypt volume on login in Ubuntu Is it possible to automount a TrueCrypt volume when logging in to Ubuntu 8.04? It's already storing the wireless network keys using the Seahorse password manager. Could TrueCrypt be made to fetch its volume password from the same keyring? Currently this would seem like the m...
{ "language": "en", "url": "https://stackoverflow.com/questions/113824", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How to convert date to timestamp in PHP? How do I get timestamp from e.g. 22-09-2008? A: Use PHP function strtotime() echo strtotime('2019/06/06'); date — Format a local time/date A: This method works on both Windows and Unix and is time-zone aware, which is probably what you want if you work with dates. If you ...
{ "language": "en", "url": "https://stackoverflow.com/questions/113829", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "379" }
Q: Performance penalty for working with interfaces in C++? Is there a runtime performance penalty when using interfaces (abstract base classes) in C++? A: Short Answer: No. Long Answer: It is not the base class or the number of ancestors a class has in its hierarchy that affects it speed. The only thing is the cost of...
{ "language": "en", "url": "https://stackoverflow.com/questions/113830", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "49" }
Q: insert data from database into word according to the table format in the word now i need to insert some data from the sqlserver into a word,i know how to use bookmark and the office interop api do that but it's slow to call the word process do that and it's coupling between the bookmark define and the code , is ...
{ "language": "en", "url": "https://stackoverflow.com/questions/113845", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: SVN ignore versioned on update I have this setup where in my development copy I can commit changes on a certain file to the repository. Then in my production copy, which does checkouts only, I would normally edit this file because this contains references which are environment independent. Is there any way I can ign...
{ "language": "en", "url": "https://stackoverflow.com/questions/113859", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to check if an OLEDB driver is installed on the system? How can I make sure that a certain OLEDB driver is installed when I start my application? I use ADO from Delphi and would like to display a descriptive error message if the driver is missing. The error that's returned from ADO isn't always that user-friendl...
{ "language": "en", "url": "https://stackoverflow.com/questions/113860", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: What does "Optimize Code" option really do in Visual Studio? Name of the option tells something but what Visual Studio/compiler really do and what are the real consequences? Edit: If you search google you can find this address, but that is not really I am looking for. I wonder the real things happening. For example ...
{ "language": "en", "url": "https://stackoverflow.com/questions/113866", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "83" }
Q: Platform Builder command line building I'm building a project from the command line using WinCE platform builder, and I need RTTI to be enabled, so that my project works correctly. I tried setting the option RTTI="YES" in the sources and in the makefile of each dir, and I also tried to add it at the end of CDEFINES...
{ "language": "en", "url": "https://stackoverflow.com/questions/113872", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Extending ControlCollection in VB.NET I want to extend the basic ControlCollection in VB.NET so I can just add images and text to a self-made control, and then automaticly convert them to pictureboxes and lables. So I made a class that inherits from ControlCollection, overrided the add method, and added the function...
{ "language": "en", "url": "https://stackoverflow.com/questions/113873", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I determine the collation of a database in SQL 2005? How do you determine the collation of a database in SQL 2005, for instance if you need to perform a case-insensitive search/replace? A: Use the following SQL determines the collation of a database: SELECT DATABASEPROPERTYEX('{database name}', 'Collation') ...
{ "language": "en", "url": "https://stackoverflow.com/questions/113883", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to recursively download a folder via FTP on Linux I'm trying to ftp a folder using the command line ftp client, but so far I've only been able to use 'get' to get individual files. A: There is 'ncftp' which is available for installation in linux. This works on the FTP protocol and can be used to download files...
{ "language": "en", "url": "https://stackoverflow.com/questions/113886", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "347" }
Q: How do I get the image paint/paintComponent generates? I have a quick question. How do I get the image generated by a JComponent.paint or paintComponent? I have a JComponent which I use as a 'workspace' and where I have overwritten the paintComponent method to my own. The thing is that my workspace JComponent also h...
{ "language": "en", "url": "https://stackoverflow.com/questions/113897", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Transparent form on the desktop I want to create a c# application with multiple windows that are all transparent with some text on. The tricky part is making these forms sit on top of the desktop but under the desktop icons. Is this possible? A: Just making the window transparent is very straight forward: this.Back...
{ "language": "en", "url": "https://stackoverflow.com/questions/113899", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I perform a case-sensitive search and replace in SQL 2000/2005? In order to perform a case-sensitive search/replace on a table in a SQL Server 2000/2005 database, you must use the correct collation. How do you determine whether the default collation for a database is case-sensitive, and if it isn't, how to pe...
{ "language": "en", "url": "https://stackoverflow.com/questions/113901", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: Which GUI toolkit would you use for a touchscreen interface? The only experience I have so far with a touchscreen interface was one where everything was custom drawn, and I get the feeling it's not the most efficient way of doing it (even the most basic layout change is hell to make). I know plenty of GUI toolkits i...
{ "language": "en", "url": "https://stackoverflow.com/questions/113906", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Getting java.lang.ClassCastException: javax.swing.KeyStroke when creating a JSplitPane I'm getting a random unreproducible Error when initializing a JSplitPane in with JDK 1.5.0_08. Note that this does not occur every time, but about 80% of the time: Exception in thread "AWT-EventQueue-0" java.lang.ClassCastExceptio...
{ "language": "en", "url": "https://stackoverflow.com/questions/113915", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I find out what collations are available in SQL 2000/2005 If I need to choose a collation mode to work with, how do I know what collations are available? A: Use this query to list the available collation modes: SELECT * FROM fn_helpcollations() A: select distinct COLLATION_NAME from INFORMATION_SCHEMA.COLUM...
{ "language": "en", "url": "https://stackoverflow.com/questions/113916", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Is there a DRM scheme that works? We help our clients to manage and publish their media online - images, video, audio, whatever. They always ask my boss whether they can stop users from copying their media, and he asks me, and I always tell him the same thing: no. If the users can view the media, then a sufficient...
{ "language": "en", "url": "https://stackoverflow.com/questions/113923", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "32" }
Q: Can I return the 'id' field after a LINQ insert? When I enter an object into the DB with Linq-to-SQL can I get the id that I just inserted without making another db call? I am assuming this is pretty easy, I just don't know how. A: Try this: MyContext Context = new MyContext(); Context.YourEntity.Add(obj); Cont...
{ "language": "en", "url": "https://stackoverflow.com/questions/113928", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "186" }
Q: Get Performance Counter Instance Name (w3wp#XX) from ASP.NET worker process ID I would like to display some memory statistics (working set, GCs etc.) on a web page using the .NET/Process performance counters. Unfortunately, if there are multiple application pools on that server, they are differentiated using an inde...
{ "language": "en", "url": "https://stackoverflow.com/questions/113930", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: IPC on Vista (service and application) I am creating an appcation on Vista,which include a service and a Console application .Both running in same user account In service i am creating an event and waits for that event.In console application i am opening the same event (problem starts here) and calling SetEvent fu...
{ "language": "en", "url": "https://stackoverflow.com/questions/113951", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Is there a OpenID provider in Europe? Does anybody know a Europe-based provider for OpenID? I am not using one of the well-known bigger services (Yahoo,..). A: I have developed one myself, LoginBuzz. It is primarily Danish and I have first translated many parts of it the last week, but it should be fully functiona...
{ "language": "en", "url": "https://stackoverflow.com/questions/113963", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Trouble Ticket in Microsoft CRM I'm working on customizing a Microsoft Dynamics CRM (4.0) system for my university as a thesis. My teacher would like to know if it is possible to implement a ticketing system in the CRM so that the users (not the clients) could generate a trouble ticket. For example if their computer...
{ "language": "en", "url": "https://stackoverflow.com/questions/113972", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can I immediately play a sound when another sound ends using XNA/XACT? This question borders between the world of the audio designer and the programmer. While this question might have to be partially answered by that domain of an audio designer, it is sure a problem for the programmer. In our project, we want to...
{ "language": "en", "url": "https://stackoverflow.com/questions/113977", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Finding Cell Range With Excel Macros I have an many embedded objects (shapes) in a worksheet and the icons is displayed inside a cell. How do I know the Cell range in which the shape object is displayed. Example: When I select a B2 and then select the object(shape) in the B17, and I query on the Cell.Address it sh...
{ "language": "en", "url": "https://stackoverflow.com/questions/113983", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Test if a Font is installed Is there an easy way (in .Net) to test if a Font is installed on the current machine? A: Other answers proposed using Font creation only work if the FontStyle.Regular is available. Some fonts, for example Verlag Bold, do not have a regular style. Creation would fail with exception Font...
{ "language": "en", "url": "https://stackoverflow.com/questions/113989", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "32" }
Q: What is the fastest way (in theory at least) to sort a heap? A heap is a list where the following applies: l[i] <= l[2*i] && l[i] <= [2*i+1] for 0 <= i < len(list) I'm looking for in-place sorting. A: Just use heap-sort. It is in-place. That would be the most natural choice. You can as well just use your heap as i...
{ "language": "en", "url": "https://stackoverflow.com/questions/113991", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: C++ Binary operators order of precedence In what order are the following parameters tested (in C++)? if (a || b && c) { } I've just seen this code in our application and I hate it, I want to add some brackets to just clarify the ordering. But I don't want to add the brackets until I know I'm adding them in the righ...
{ "language": "en", "url": "https://stackoverflow.com/questions/113992", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Variable height items in Win32 TreeView using NM_CUSTOMDRAW Is it possible for items in a WIn32 TreeView control to have variable heights when using NM_CUSTOMDRAW? Right now, I can successfully select variable sized fonts in the dc in NM_CUSTOMDRAW, but the item texts get clipped. A: You need to set the height of e...
{ "language": "en", "url": "https://stackoverflow.com/questions/114005", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Create anonymous object by Reflection in C# Is there any way to create C# 3.0 anonymous object via Reflection at runtime in .NET 3.5? I'd like to support them in my serialization scheme, so I need a way to manipulate them programmatically. edited later to clarify the use case An extra constraint is that I will be ru...
{ "language": "en", "url": "https://stackoverflow.com/questions/114010", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: How do I get the current size of a matrix stack in OpenGL? How do I get the current size of a matrix stack (GL_MODELVIEW, GL_PROJECTION, GL_TEXTURE) in OpenGL? I want this so that I can do some error checking to ensure that in certain parts of the code I can check that the matrix stacks have been left in the origina...
{ "language": "en", "url": "https://stackoverflow.com/questions/114011", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Modal popups - usability What are the cases where you'd use a modal popup ? Does it interrupt the user's flow, if it all of a sudden opens up in his face ? Would you avoid modal popups in general ? or when should one be careful of using them ? Edit: To be a bit more specific, the situation here is this : I have a ...
{ "language": "en", "url": "https://stackoverflow.com/questions/114024", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Dynamic LINQ and Dynamic Lambda expressions? What is the best way of dynamically writing LINQ queries and Lambda expressions? I am thinking of applications where the end user can design business logic rules, which then must be executed. I am sorry if this is a newbie question, but it would be great to get best prac...
{ "language": "en", "url": "https://stackoverflow.com/questions/114029", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: Error 1150 genasm.exe(1) : error There was an error finalizing type . Method 'DoParse' oOo a highly exciting build issue. Compact framework occasionally goes funny when building. Usually when messing with xmta files but this is the first time i've seen it go awry in this scenario. I created a abstract base class wit...
{ "language": "en", "url": "https://stackoverflow.com/questions/114031", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What are the possible causes of a CGI::Session::CookieStore::TamperedWithCookie exception in rails I am receiving the expcetion CGI::Session::CookieStore::TamperedWithCookie after changing the config.action_controller.session.secret setting on an app (as part of preparation to full deployment. Am I right in assumin...
{ "language": "en", "url": "https://stackoverflow.com/questions/114052", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Exception handling Can you please clarify the folowing query? I am not sure if the way I am trying to code is correct. Kindly advise me if I am moving in the right/wrong direction. I am trying to develop an automation framework using QuickTest Professional, a testing tool. * *There is an Excel sheet from which th...
{ "language": "en", "url": "https://stackoverflow.com/questions/114054", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Common Causes of Operating System Crashes I am interested to learn: what are the most common technical causes (from the perspective of operating system programming) of an operating system crash (not limited to Windows crashes)? I'm looking for an answer not like "too many apps open", but what specifically happens w...
{ "language": "en", "url": "https://stackoverflow.com/questions/114081", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Fast String Hashing Algorithm with low collision rates with 32 bit integer I have lots of unrelated named things that I'd like to do quick searches against. An "aardvark" is always an "aardvark" everywhere, so hashing the string and reusing the integer would work well to speed up comparisons. The entire set of name...
{ "language": "en", "url": "https://stackoverflow.com/questions/114085", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "69" }
Q: Generate docs in automated build Is there any way to generate project docs during automated builds? I'd like to have a single set of source files (HTML?) with the user manual, and from them generate: * *PDF document *CHM help *HTML version of the help The content would be basically the same in all three for...
{ "language": "en", "url": "https://stackoverflow.com/questions/114095", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: ASP.NET MVC Preview 5 - Html.Image helper has moved namespace We've just updated ASP.NET from Preview 3 to Preview 5 and we've run into a problem with the Html.Image HtmlHelper in our aspx pages. It seems that Html.Image has moved from System.Web.Mvc into Microsoft.Web.Mvc, and the only way we've found to access the...
{ "language": "en", "url": "https://stackoverflow.com/questions/114108", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Deploying Django: How do you do it? I have tried following guides like this one but it just didnt work for me. So my question is this: What is a good guide for deploying Django, and how do you deploy your Django. I keep hearing that capastrano is pretty nifty to use, but i have no idea as to how to work it or what i...
{ "language": "en", "url": "https://stackoverflow.com/questions/114112", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Encoding user input for emails On a website if I have a form where the user can input some text and then a page which displays what the user has entered. I know to html encode the values the user has entered to prevent scripting attacks. If the form was sending emails addresses I presume I would do the same but is t...
{ "language": "en", "url": "https://stackoverflow.com/questions/114148", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: "const correctness" in C# The point of const-correctness is to be able to provide a view of an instance that can't be altered or deleted by the user. The compiler supports this by pointing out when you break constness from within a const function, or try to use a non-const function of a const object. So without copy...
{ "language": "en", "url": "https://stackoverflow.com/questions/114149", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "84" }
Q: How does a XAML definition get turned into an object instance? XAML allows you to specify an attribute value using a string that contains curly braces. Here is an example that creates a Binding instance and assigns it to the Text property of the TextBox element. <TextBox Text="{Binding ElementName=Foo, Path=Bar}"/> ...
{ "language": "en", "url": "https://stackoverflow.com/questions/114154", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Does CASCADE Delete execute as transaction? I want to perform cascade delete for some tables in my database, but I'm interested in what happens in case there's a failure when deleting something. Will everything rollback? A: Cascade deletes are indeed atomic, they would be of little use without that property. It is ...
{ "language": "en", "url": "https://stackoverflow.com/questions/114163", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: How to implement WiX installer upgrade? At work we use WiX for building installation packages. We want that installation of product X would result in uninstall of the previous version of that product on that machine. I've read on several places on the Internet about a major upgrade but couldn't get it to work. Can a...
{ "language": "en", "url": "https://stackoverflow.com/questions/114165", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "247" }
Q: Wrap an executable to diagnose it's invocations I have a Windows executable (whoami) which is crashing every so often. It's called from another process to get details about the current user and domain. I'd like to know what parameters are passed when it fails. Does anyone know of an appropriate way to wrap the pro...
{ "language": "en", "url": "https://stackoverflow.com/questions/114172", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Updating reference to a member variable in use I got this síngleton cache object and it exposes an IEnumerable property which just returns a private IEnumerable variable. I have a static method on my singleton object that updates this member variable (that exists on the single 'Instance' instance of this cache obje...
{ "language": "en", "url": "https://stackoverflow.com/questions/114179", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Pointer vs. Reference What would be better practice when giving a function the original variable to work with: unsigned long x = 4; void func1(unsigned long& val) { val = 5; } func1(x); or: void func2(unsigned long* val) { *val = 5; } func2(&x); IOW: Is there any reason to pick one over anot...
{ "language": "en", "url": "https://stackoverflow.com/questions/114180", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "273" }
Q: Loading DLL from a /bin directory I have created a web project which references a class library project. When deployed to the local machine the web/classes all work fine but deployed on a ‘shared’ IIS site, the class DLLs exist in the /bin directory, but the web page generates the following error: can’t find file ...
{ "language": "en", "url": "https://stackoverflow.com/questions/114187", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I handle data which must be persisted in a database, but isn't a proper model, in Ruby on Rails? Imagine a web application written in Ruby on Rails. Part of the state of that application is represented in a piece of data which doesn't fit the description of a model. This state descriptor needs to be persiste...
{ "language": "en", "url": "https://stackoverflow.com/questions/114192", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Where to Store writable data to be shared by all users in a vista installer? My app is installed via NSIS. I want the installer to install the program for all users. I can do this, by installing to the 'program files' directory. There is a database file (firebird), that all user accounts on the system should share. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/114194", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How do you URL encode parameters in Erlang? I'm using httpc:request to post some data to a remote service. I have the post working but the data in the body() of the post comes through as is, without any URL-encoding which causes the post to fail when parsed by the remote service. Is there a function in Erlang that i...
{ "language": "en", "url": "https://stackoverflow.com/questions/114196", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: How do I read/write as the authenticated user with Apache/WebDAV? I've set up DAV in apache2, which works great. The thing is, all read/write operations are done with the apache user's credentials. Instead I want to use the HTTP authenticated user's credentials. If I authenticate as "john", all read and write op...
{ "language": "en", "url": "https://stackoverflow.com/questions/114204", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Reverse Engineering C# code using StarUML I am trying to convert my C# code to design (Reverese Engineering) using StarUML. I got the error while performing the Reverse engineering "Error occurred in the process of reverse engineering. message : Catastrophic failure". After the error, the application crashed. Co...
{ "language": "en", "url": "https://stackoverflow.com/questions/114205", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: reinitialize system wide environment variable in linux I just want my apache to register some of my predefined environment so that i can retrieve it using getenv function in php. How can i do this? I tried adding /etc/profile.d/foo.sh with export FOO=/bar/baz using root and restarted apache. A: Environment variable...
{ "language": "en", "url": "https://stackoverflow.com/questions/114207", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How to list some specific images in some folder on web server? Let me explain: this is path to this folder: > www.my_site.com/images And images are created by user_id, and for example, images of user_id = 27 are, 27_1.jpg, 27_2.jpg, 27_3.jpg! How to list and print images which start with 27_%.jpg? I hope You have un...
{ "language": "en", "url": "https://stackoverflow.com/questions/114208", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Boost shared_ptr container question Let's say I have a container (std::vector) of pointers used by a multi-threaded application. When adding new pointers to the container, the code is protected using a critical section (boost::mutex). All well and good. The code should be able to return one of these pointers to a...
{ "language": "en", "url": "https://stackoverflow.com/questions/114211", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Thoughts on Design - Core Control Logic and Rendering Layers I just wanted to see if I could have your thoughts on the design of some work I am currently doing. Here's the current situation - Basically: * *I am developing a series of controls for our applications. *Some of these may be used in both WinForms and ...
{ "language": "en", "url": "https://stackoverflow.com/questions/114212", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Class method differences in Python: bound, unbound and static What is the difference between the following class methods? Is it that one is static and the other is not? class Test(object): def method_one(self): print "Called method_one" def method_two(): print "Called method_two" a_test = Test() a_test...
{ "language": "en", "url": "https://stackoverflow.com/questions/114214", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "252" }
Q: Design Patterns using IQueryable With the introduction of .NET 3.5 and the IQueryable<T> interface, new patterns will emerge. While I have seen a number of implementations of the Specification pattern, I have not seen many other patterns using this technology. Rob Conery's Storefront application is another concrete ...
{ "language": "en", "url": "https://stackoverflow.com/questions/114222", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: PHP: array_map on object? I'm trying to write a function that formats every (string) member/variable in an object, for example with a callback function. The variable names are unknown to me, so it must work with objects of all classes. How can I achieve something similar to array_map or array_walk with objects? A: ...
{ "language": "en", "url": "https://stackoverflow.com/questions/114229", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Solaris Core dump analysis I use pstack to analyze core dump files in Solaris How else can I analyze the core dump from solaris? What commands can be used to do this? What other information will be available from the dump? A: If the core dump is from a program you wrote or built, then use whichever debugger you wo...
{ "language": "en", "url": "https://stackoverflow.com/questions/114236", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: Considering object encapsulation, should getters return an immutable property? When a getter returns a property, such as returning a List of other related objects, should that list and it's objects be immutable to prevent code outside of the class, changing the state of those objects, without the main parent object ...
{ "language": "en", "url": "https://stackoverflow.com/questions/114237", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: Difference between managed C++ and C++ The second question is: When do I use what of these two? A: When not specified, C++ is unmanaged C++, compiled to machine code. In unmanaged C++ you must manage memory allocation manually. Managed C++ is a language invented by Microsoft, that compiles to bytecode run by the .N...
{ "language": "en", "url": "https://stackoverflow.com/questions/114238", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "53" }
Q: SQL: inner join on alias column Previously I have asked to strip text from a field and convert it to an int, this works successfully. But now, I would like to do an INNER JOIN on this new value. So I have this: SELECT CONVERT(int, SUBSTRING(accountingTab.id, PATINDEX('%[0-9]%', accountingTab.id), 999)) AS 'memId', ...
{ "language": "en", "url": "https://stackoverflow.com/questions/114242", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How can I share a variable value between classic asp, .NET and javascript? I've created an IHttpHandler in .NET C# which returns pieces of html to a classic asp page. The classic asp page communicates with the IHttpHandler through basic http requests using ServerXMLHTTP in vbscript or Ajax Calls in JavaScript. Now, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/114260", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Http Exception generated while validating viewstate I am getting the following error whenever I click on a postbacking control HttpException (0x80004005): Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that configuration specifies the same validationKey and vali...
{ "language": "en", "url": "https://stackoverflow.com/questions/114266", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Are there any utilites that will help me refactor CSS I am working with some CSS that is poorly written to say the least. I am not a design/CSS expert, but I at least understand the C in CSS. While the builtin CSS support inside of VS-2008 is far improved over previous versions, it still doesn't quite do what I am l...
{ "language": "en", "url": "https://stackoverflow.com/questions/114272", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "23" }
Q: Where can a save confirmation page be hooked into the Django admin? (similar to delete confirmation) I want to emulate the delete confirmation page behavior before saving certain models in the admin. In my case if I change one object, certain others should be deleted as they depend upon the object's now out-of-d...
{ "language": "en", "url": "https://stackoverflow.com/questions/114283", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Optimize SQL query on large-ish table First of all, this question regards MySQL 3.23.58, so be advised. I have 2 tables with the following definition: Table A: id INT (primary), customer_id INT, offlineid INT Table B: id INT (primary), name VARCHAR(255) Now, table A contains in the range of 65k+ records, while tab...
{ "language": "en", "url": "https://stackoverflow.com/questions/114284", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: What unit-test frameworks would you recommend for J2ME? I'm relatively new to J2ME and about to begin my first serious project. My experience in testing isn't too deep either. I'm looking for a unit test framework for J2ME. So far I've seen J2MEUnit, but I don't now how well supported it is. I've seen JavaTest Harn...
{ "language": "en", "url": "https://stackoverflow.com/questions/114288", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Can i use my WatiN tests to stresstest? In my current project we are testing our ASP.NET GUI using WatiN and Mbunit. When I was writing the tests I realized that it would be great if we also could use all of these for stresstesting. Currently we are using Grinder to stresstest but then we have to script our cases al...
{ "language": "en", "url": "https://stackoverflow.com/questions/114296", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Is the Win32 API function definition available in a "database"/XML format? I'm looking for a list of win32 API in some "database"/XML format. I'd need it to easily create a "conversion layer" between win32 API and the higher level language I'm using (harbour/xharbour). Since this runs Pcode, it is necessary to tran...
{ "language": "en", "url": "https://stackoverflow.com/questions/114302", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Monitor running .net apps I have some .net apps running that I need to monitor for example, then MethodA is called in App1, my monitor app should detect this. I have a lot of running apps and the solution proposed here is to recompile all those apps and include a new line in the desired methods that we want to monit...
{ "language": "en", "url": "https://stackoverflow.com/questions/114305", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to quickly add tickets in Trac? It's very painful to add multiple tickets to Trac or to have it as your own todo list. That causes people to use their own task management tools so tasks are then spread all around. Is there any plugin or macro that would quicken the process of adding a ticket? A: If you're using...
{ "language": "en", "url": "https://stackoverflow.com/questions/114306", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Creating Custom GnuCash Reports with Scheme Are there any resources which show how to create custom GnuCash reports? I don't know the intricacies of Scheme but I do know the basics of Lisp, based on tinkering with Emacs. Is there a site which lays out the API for GnuCash reports, ideally with a little explanation of...
{ "language": "en", "url": "https://stackoverflow.com/questions/114320", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Best way to deal with session timeout in web apps? I am currently building an internal web application used in a factory/warehouse type location. The users will be sharing a single PC between several people, so we need to have a fairly short session timeout to stop people wandering off and leaving the application lo...
{ "language": "en", "url": "https://stackoverflow.com/questions/114321", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Converting MS Access "OLE Objects" back to plain JPEGs - best way? Background: We have an old (but business-critical) SQL Server database with an MS Access ADP front-end; this was originally upsized to SQL Server from a series of Access databases. This database tracks hazardous materials for our customers, and store...
{ "language": "en", "url": "https://stackoverflow.com/questions/114326", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Abusing XmlReader ReadSubtree() I need to parse a xml file which is practically an image of a really big tree structure, so I'm using the XmlReader class to populate the tree 'on the fly'. Each node is passed just the xml chunk it expects from its parent via the ReadSubtree() function. This has the advantage of not ...
{ "language": "en", "url": "https://stackoverflow.com/questions/114327", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Visual Studio setup problem - 'A problem has been encountered while loading the setup components. Canceling setup.' I've had a serious issue with my Visual Studio 2008 setup. I receive the ever-so-useful error 'A problem has been encountered while loading the setup components. Canceling setup.' whenever I try to uni...
{ "language": "en", "url": "https://stackoverflow.com/questions/114332", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "152" }
Q: HTML Tag ClientID in a .NET Project If I want to manipulate an HTML tag's properties on the server within an aspx page based on a master page i.e. <a href="#" runat="server" ID="myLink">My Link</a> For example to give the link a different class depending on the current page i.e. if (Path.GetFileName(Request.Physic...
{ "language": "en", "url": "https://stackoverflow.com/questions/114339", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: IIS Error: Cannot connect to the configuration database After rebooting the Windows 2003 Server with the IIS I receive the follow error message: Cannot connect to the configuration database in the browser. The error occur on different pages and with different clients. that I think it is a server problem. What can ...
{ "language": "en", "url": "https://stackoverflow.com/questions/114398", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Using JET with EMF I need to run JET templates on a EMF model metadata - i.e. the model itself (not data) is input to my JET template. More practically - I want generate non java code, based on EMF templates. How I do it? Thank you A: I'm not sure I get you right, but you can pass your model just like any other ob...
{ "language": "en", "url": "https://stackoverflow.com/questions/114415", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Executing JavaScript on page load selectively Mending a bug in our SAP BW web application, I need to call two javascript functions from the web framework library upon page load. The problem is that each of these functions reloads the page as a side-effect. In addition, I don't have access to modify these functions. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/114417", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: When does ++ not produce the same results as +1? The following two C# code snippets produce different results (assuming the variable level is used both before and after the recursive call). Why? public DoStuff(int level) { // ... DoStuff(level++); // ... } , public DoStuff(int level) { // ... DoStuff(leve...
{ "language": "en", "url": "https://stackoverflow.com/questions/114419", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "27" }