text
string
meta
dict
Q: Ajax GET requests: use parameters or put data in URL? What's the advantage of passing data as parameters vs part of the URL in an Ajax GET request? Using parameters: var ajax = new Ajax.Request('server.php',{ parameters: 'store=11200&product=Meat', onSuccess: function(myData){whatever} }); Using URL: var aj...
{ "language": "en", "url": "https://stackoverflow.com/questions/218399", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: COM class factory error I've been testing an application using my machine as a server, and everything's going fine with it, but when I try to set it up to run on the test server, I get this error: Retrieving the COM class factory for component with CLSID {XXXX} failed due to the following error: 80040154. Any ...
{ "language": "en", "url": "https://stackoverflow.com/questions/218405", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I broadcast in adhoc networks? How do I broadcast a message from a single source to all nodes, and from multiple sources to all nodes? Are there any libraries in java that may help? A: You could look into a distributed messaging framework such as JMS. One Open Source implementation of the protocol is Acti...
{ "language": "en", "url": "https://stackoverflow.com/questions/218421", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Monitoring a SharePoint document library I was wondering if there was a good way to monitor a document library on SharePoint for changes (new files added, files changed / checked-in, files deleted, etc.) Basically, what System.IO.FileSystemWatcher does on local / network directories. Are there events that get fired ...
{ "language": "en", "url": "https://stackoverflow.com/questions/218426", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How to get value of Expression> action quickly? Suppose we have the following code: ExpressionHelper.GetRouteValuesFromExpression<AccountController>(ax => ax.MyAction("a", "b")); (from ASP.NET MVC Futures assembly). Method is reasonably fast - it executes 10k iterations in 150ms. Now, we change code to this: string...
{ "language": "en", "url": "https://stackoverflow.com/questions/218439", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Best way to determine if a .NET Windows service has not hung? What is the best way to actively monitor if a .NET Windows service is still running (e.g not hung)? The service needs to periodically respond to events raised by a timer. Thanks Jon A: "Not hung" is always a hard condition to definitively detect, and wi...
{ "language": "en", "url": "https://stackoverflow.com/questions/218447", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Loading custom framework in iPhone I'm trying to use an external framework for UPnP browsing on the iPhone. The framework works perfectly on the Mac, But when I copy it to the iPhone app, it wouldn't run even if there's no code using the framework yet. It gives weird error that I can't understand. [Session started ...
{ "language": "en", "url": "https://stackoverflow.com/questions/218450", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Locking NFS files in PHP Part of my latest webapp needs to write to file a fair amount as part of its logging. One problem I've noticed is that if there are a few concurrent users, the writes can overwrite each other (instead of appending to file). I assume this is because of the destination file can be open in a nu...
{ "language": "en", "url": "https://stackoverflow.com/questions/218451", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Difference initializing static variable inline or in static constructor in C# I would like to know what is the difference between initializing a static member inline as in: class Foo { private static Bar bar_ = new Bar(); } or initializing it inside the static constructor as in: class Foo { static Foo() ...
{ "language": "en", "url": "https://stackoverflow.com/questions/218461", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: In a Firefox extension, how can I copy rich text/links to the clipboard? Specifically, I want to copy a link (with text and location) and then to be able to paste it, e.g., into Word as a link. A: Here's the actual code: var richText = "<a href=\"" + gContextMenu.linkURL + "\">" + gContextMenu.linkText() + "</a>"; ...
{ "language": "en", "url": "https://stackoverflow.com/questions/218462", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Ability to set the font to italics in Visual Studio Does anyone know how to set the code text editor font style to italics in Visual Studio 2005 or 2008? Note, I'm talking about the code editor not in code itself. A: You cannot through the standard IDE options, the editor only allows you to change the font or set ...
{ "language": "en", "url": "https://stackoverflow.com/questions/218463", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: C %[] conversion specifier and String functions I'm having a hard time coding understanding the format of the specifier and string functions. My aim is to use %[] to readin all characters and spaces and then use the strcpy function followed by the strcat function. So far i've managed to enter individual characters a...
{ "language": "en", "url": "https://stackoverflow.com/questions/218466", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Managing database changes between a Rails and Java project At a new job I started, we have both a Java application that handles most of the heavy lifting in the core business logic, and we also have a Rails application that of course handles the web interface to this server. Both of these access the same database. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/218472", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Finding "best matching key" for a given key in a sorted STL container Problem I have timestamped data, which I need to search based on the timestamp in order to get the one existing timestamp which matches my input timestamp the closest. Preferably this should be solved with the STL. boost::* or stl::tr1::* (from VS...
{ "language": "en", "url": "https://stackoverflow.com/questions/218488", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Windows Server 2003 Server to Server proxy avoidance configuration Is it possible to configure Windows Servers that reside on the same domain such that when a web service call is made from a web app using an IP address, the request does not go via a proxy server? The web service is running on one of the servers on t...
{ "language": "en", "url": "https://stackoverflow.com/questions/218491", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Asp.net Page Management When you open a page in the browser, an instance of the page is created on the server. But, when you use AJAX, does anyone know if the entire page object is created at the server on postbacks? A: When you are using ASP.NET Ajax, a AJAX request will still process all code-behind code, however...
{ "language": "en", "url": "https://stackoverflow.com/questions/218503", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Customized naming of columns in JPA relationships When I make relationsships with JPA using hibernate, some terrible long and ackward column names are generated. Eg. I have the following actionPlan_actionPlanPK, which means that the column actionPlan is a FK that points to actionPlanPK. To make it look just a little...
{ "language": "en", "url": "https://stackoverflow.com/questions/218504", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: When creating forms, are fieldsets a viable option anymore? I'm creating a few web forms that have areas to them. Are fieldsets viable options for sectioning forms anymore? Should I just use a div with styles to be similar? A: Fieldsets make more sense semantically. However, different browsers render them slightly ...
{ "language": "en", "url": "https://stackoverflow.com/questions/218505", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Suggestions please for a home version control system I have a home project that really needs to be in Source Control. I tried installing Subversion, which I have some experience with, but couldn't get it working. I don't particularly want to use SourceSafe. I'm a bit nervous about Git/Mercury as being somewhat cr...
{ "language": "en", "url": "https://stackoverflow.com/questions/218507", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: How can I change the language in Emacs when using ispell? I would like to use the ispell-buffer command in Emacs. It uses the English language by default. Is there an easy way to switch to another dictionary (for example, another language)? A: The following command proposes a list of installed dictionaries to use: ...
{ "language": "en", "url": "https://stackoverflow.com/questions/218512", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "55" }
Q: Tools for debugging xslt I have a Java servlet which generates xml, translates it with an xslt stylesheet, and then displays the resulting HTML. This is the first time I've worked with xslt. What's a good way to debug xslt? I have (or can get) some sample XML files to apply the transform too. But I'm not really even...
{ "language": "en", "url": "https://stackoverflow.com/questions/218522", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "40" }
Q: How can I create a repeatable signature of a data structure? I have a situation where I want to create a signature of a data structure: my $signature = ds_to_sig( { foo => 'bar', baz => 'bundy', boing => undef, number => 1_234_567, } ); The aim should be that if the data structure changes then s...
{ "language": "en", "url": "https://stackoverflow.com/questions/218531", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: How do I programmatically inspect a HTML document I have a database full of small HTML documents and I need to programmatically insert several into, say, a PDF document with iText or a Word document with Aspose.Words. I need to preserve any formatting within the HTML documents (within reason, honouring <b> tags is a...
{ "language": "en", "url": "https://stackoverflow.com/questions/218535", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Best way to use XML-RPC in Cocoa application? I wanted to write a GUI-wrapper for an application which uses XML-RPC and wondered if there are any XML-RPC frameworks available for Cocoa and if so what's the best? Thanks in advance A: Thank you very much for your answers. Yesterday I did an extensive Google session o...
{ "language": "en", "url": "https://stackoverflow.com/questions/218538", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: MySQL break SP execution in an Exception like fashion How can I break SP execution in an Exception like fashion in MySQL? I need a to break SP execution when an illegal argument is passed so no UPDATE/INSERT is performed. My teacher actually did it by creating an SP called "raise_error" which did nothing but execute...
{ "language": "en", "url": "https://stackoverflow.com/questions/218547", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Running doxygen as Custom Build Step in VS2008 I am generating doxygen documentation for my (fairly small) project on each build. I did the following to accomplish this: * *Added the index.html, which doxygen generates, to the project *Specified a Custom Build Step for this file (not the whole project) * *Com...
{ "language": "en", "url": "https://stackoverflow.com/questions/218551", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How do I stop UrlRewriter stripping my + symbols I'm using Intelligencia's UrlRewriter in my application and I'm having a problem where the rules I've setup appear to be stripping the + symbol from my url. For example I want to have the urls /category/catname/+tag+tag but it appears to me as /category/catname/ tag t...
{ "language": "en", "url": "https://stackoverflow.com/questions/218554", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How can I differentiate between single and double clicks in .Net? I want to override OnMouseClick and OnMouseDoubleClick and perform different actions depending on which click style was used. The problem is that OnMouseClick is happening for both single and double clicks, and is getting called before OnMouseDoubleCl...
{ "language": "en", "url": "https://stackoverflow.com/questions/218555", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Send document to printer with C# I've been given a requirement for an internal web application to send documents to a printer transparently. The idea would be that the user can select their nearest printer, and the web application would send their print jobs to the printer they selected. The first printer we have t...
{ "language": "en", "url": "https://stackoverflow.com/questions/218556", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: How to query an Oracle table from SQL Server 2000? A colleague would like to query a table in an Oracle database using SQL Server 2000, Enterprise Manager. He knows how to do the whole DTS thing, but doesn't want to go down that route for add hoc queries. Is there another way? A: Here's a step-by-step guide: Settin...
{ "language": "en", "url": "https://stackoverflow.com/questions/218561", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How can I implement the "tap and hold" behavior in an MFC CListCtrl? How can I implement the "tap and hold" behavior in an MFC CListCtrl? I have an MFC CListCtrl in a CDialog and I need to add to the CListCtrl the "tap and hold" behavior. That is what I mean for "tap and hold": If the user clicks (a "standard" click...
{ "language": "en", "url": "https://stackoverflow.com/questions/218563", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Placement of instance variable declarations I've seen some developers put instance variable declarations at the end of classes though I mostly see them placed at the top. The only reasons I can think of for doing this are stylistic preference or maybe it somehow makes them easier to work with in an IDE. Is there a...
{ "language": "en", "url": "https://stackoverflow.com/questions/218573", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Visual Studio jscript intellisense error with jQuery 1.2.6? I get the warning "childNodes is null or not an object' with different line numbers, depending on which version of the library I reference (I've tried about three different versions of 1.2.6). Consequently, I get jack for jQuery intellisense. I can hack th...
{ "language": "en", "url": "https://stackoverflow.com/questions/218578", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What's the best way to convert from network bitcount to netmask? For example, if I have a network spec like 172.20.10.0/24, "24" is the bitcount. What's the best way to convert that to a netmask like 0xffffff00 ? A: Assuming 32-bit mask and 32-bit int. int keepBits = 24; /* actually get it from somewhere else? */ ...
{ "language": "en", "url": "https://stackoverflow.com/questions/218604", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: A good library to do URL Query String manipulation in Java I need to do a few very simple URL manipulations in Java. Like get the value for a parameter in the query, or update it, ... I was expecting to find a simple utility class doing that in the commons-lang package, but no. I know it is a simple problem, but if ...
{ "language": "en", "url": "https://stackoverflow.com/questions/218608", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "40" }
Q: Proper disposal of SharePoint objects? I hope there's a SharePoint expert here on SO who can help with this. Here's the problem. My SharePoint logs contain this line, several times: An SPRequest object was not disposed before the end of this thread. To avoid wasting system resources, dispose of this object or its p...
{ "language": "en", "url": "https://stackoverflow.com/questions/218613", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to get method parameter names? Given that a function a_method has been defined like def a_method(arg1, arg2): pass Starting from a_method itself, how can I get the argument names - for example, as a tuple of strings, like ("arg1", "arg2")? A: inspect.signature is very slow. Fastest way is def f(a, b=1, *a...
{ "language": "en", "url": "https://stackoverflow.com/questions/218616", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "336" }
Q: Why use monospace fonts in your IDE? I've seen a couple of font topics on SO and it seems a majority of people use monospace fonts for programming tasks. I have been using Verdana for programming for a couple of years and I really like the enhanced readability, without missing anything monospace related. Why do you ...
{ "language": "en", "url": "https://stackoverflow.com/questions/218623", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "89" }
Q: How to exclude files by name in a ClearCase find command? Using the ClearCase find command, how do I find all files in a directory that do not have the name pom.xml? I'd like to pass other selection options to the ClearCase find command so I'd prefer not to execute another command. I am using a RedHat linux versio...
{ "language": "en", "url": "https://stackoverflow.com/questions/218638", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Ocx control in win form How to create instance of AxHost abstract class A: You cannot create an instance of an abstract class. You typically do not use the AxHost class directly. You can use the Windows Forms ActiveX Control Importer (Aximp.exe) to generate the wrappers that extend AxHost. See http://msdn.microsof...
{ "language": "en", "url": "https://stackoverflow.com/questions/218650", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: For those of you using SubSonic, what kind of performance are you seeing in large applications? I've used SubSonic in a few POC projects, but nothing large. It's so easy to use, and it's possible to abstract away the fact that it uses the active record pattern (can move it toward a more domain driven approach). Has ...
{ "language": "en", "url": "https://stackoverflow.com/questions/218659", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Catch a Paste Event? I work for a custom cabinetry manufacturer and we write our own pricing program for our product. I have a form that has a pop-up box so the user can select which side the hinge will be on for ambiguous doors on that cabinet. I've got that to work so far, but when they copy an item and paste it...
{ "language": "en", "url": "https://stackoverflow.com/questions/218663", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Can I test if a regex is valid in C# without throwing exception I allow users to enter a regular expression to match IP addresses, for doing an IP filtration in a related system. I would like to validate if the entered regular expressions are valid as a lot of userse will mess op, with good intentions though. I can ...
{ "language": "en", "url": "https://stackoverflow.com/questions/218680", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "61" }
Q: Opening XPS document in .Net causes a memory leak The following code snippet illustrates a memory leak when opening XPS files. If you run it and watch the task manager, it will grow and not release memory until the app exits. '****** Console application BEGINS. Module Main Const DefaultTestFilePath As String = ...
{ "language": "en", "url": "https://stackoverflow.com/questions/218681", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Are there any control libraries for Windows Mobile that enable iPhone-style touchscreen behavior? The way the iPhone uses the touchscreen to enable zooming in and out and scrolling and so forth is very cool, and I was wondering if there is anything available for Windows Mobile that provides a similar user experience...
{ "language": "en", "url": "https://stackoverflow.com/questions/218686", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Swap main Flex application Is there a way to temporary swap Flex's main application to another then switch back. Scenario : Main app started, display login box - then go on with main app. Login box is an application as well. Application.application is a read only property, that attempt failed. A: I've had great su...
{ "language": "en", "url": "https://stackoverflow.com/questions/218691", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Cloning Objects in VBA? Is there a generic way to clone objects in VBA? So that i could copy x to y instead of copying just the pointer? Dim x As New Class1 Dim y As Class1 x.Color = 1 x.Height = 1 Set y = x y.Color = 2 Debug.Print "x.Color=" & x.Color & ", x.Height=" & x.Height By generic i mean s...
{ "language": "en", "url": "https://stackoverflow.com/questions/218696", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Your choice of cross-browser javascript GUI UPDATE - A comprehensive comparison, updated as of February 2015, can be found here: Alternatives to Ext JS 2008 question: There are a number of great and not so-great Javascript GUI frameworks out there. I've looked at some (only superficially). And I can't make my mind ...
{ "language": "en", "url": "https://stackoverflow.com/questions/218699", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "43" }
Q: What is a good open source pastebin in Python or Perl? I'm looking for an open-source pastebin web-application written in either Python or Perl. I need it in order to implement a web-based specialized editor for my own needs, and I want to borrow code / ideas from the pastebin since I don't have much experience in ...
{ "language": "en", "url": "https://stackoverflow.com/questions/218717", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: How should I audit changes in a MySQL table (using MySQL 4)? I have been asked to audit any/all changes in a MySQL table. Does anyone know of any tools out there to help me do this or do I need to write my own solution? If I write my own audting, my initial thought it to make a separate table and build a string of c...
{ "language": "en", "url": "https://stackoverflow.com/questions/218722", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: VB.NET COMException Error I have written an application in VB.NET using MS Visual Studio 2005. I am using .NET version '2.0.50727'. The application was running without errors until recently. After being used for a while it begins to produce a System.Runtime.InteropServices.COMException error (80080005). The error ha...
{ "language": "en", "url": "https://stackoverflow.com/questions/218731", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I execute code AFTER a form has loaded? In .NET, Windows Forms have an event that fires before the Form is loaded (Form.Load), but there is no corresponding event that is fired AFTER the form has loaded. I would like to execute some logic after the form has loaded. Can anyone advise on a solution? A: I some...
{ "language": "en", "url": "https://stackoverflow.com/questions/218732", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "154" }
Q: Javascript before asp:ButtonField click I have a GridView control in an Asp.net application, that has a <asp:buttonField> of type="image" and CommandName="Delete". Is there any way to execute a piece of javascript before reaching the OnRowDelete event? I want just a simple confirm before deleting the row. Thanks! ED...
{ "language": "en", "url": "https://stackoverflow.com/questions/218733", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "25" }
Q: JIRA issue resolver I'm using the standard edition of JIRA and on the whole, I love it. However, it's a frequent source of irritation that JIRA doesn't seem to record who resolved an issue, just who the current assignee is, and who reported the issue. Because the "resolver" is not recorded there's no way to find iss...
{ "language": "en", "url": "https://stackoverflow.com/questions/218743", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Good reasons to prohibit inheritance in Java? What are good reasons to prohibit inheritance in Java, for example by using final classes or classes using a single, private parameterless constructor? What are good reasons of making a method final? A: Inheritance is like a chainsaw - very powerful, but awful in the wr...
{ "language": "en", "url": "https://stackoverflow.com/questions/218744", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "200" }
Q: How to change Text Rotation Axis I am using CGContextShowText to display text, but when rotating it using CGAffineTransformation, the rotation axis is located at the left, not at the center of the drawn text, the code I am using is this: CGContextSaveGState(context); CGContextSelectFont(context, "Helvetica", 20, kC...
{ "language": "en", "url": "https://stackoverflow.com/questions/218746", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: MSVCR90D.dll not found in debug mode with Visual C++ 2008 I have a problem with Visual C++ 2008. I have installed opencv and I've created a new program and I build it with no errors. However, it complains about not finding MSVCR90D.dll when debugging. In release mode there is no problem at all. I do have MSVCR90D.d...
{ "language": "en", "url": "https://stackoverflow.com/questions/218747", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: How do you keep parents of floated elements from collapsing? Although elements like <div>s normally grow to fit their contents, using the float property can cause a startling problem for CSS newbies: If floated elements have non-floated parent elements, the parent will collapse. For example: <div> <div style="fl...
{ "language": "en", "url": "https://stackoverflow.com/questions/218760", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1064" }
Q: Visual Studio project type for a WCF app to work under IIS? Is there a special project type for creating a WCF to be hosted in IIS? A: You don't need to use a special project type for hosing inside IIS. As long as you put the dlls in the bin folder and create a .svc file it will work. A standard web site project wo...
{ "language": "en", "url": "https://stackoverflow.com/questions/218765", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: When to use a private constant? Is it right to use a private constant in the following situation: Say I have a game with a lives variable and a startingLives variable. At the start of the game I set the lives variable to equal the startingLives variable. This is how I would normally do it: private var lives:int = 0;...
{ "language": "en", "url": "https://stackoverflow.com/questions/218777", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Is there a benefit to JUST a "throw" in a catch? Been having a "heated debate" with a colleague about his practice of wrapping most of his functions in a try/catch but the catch has JUST a "throw" in it e.g. Private sub foo() try 'Do something' catch throw 'And nothing else!' End Try End ...
{ "language": "en", "url": "https://stackoverflow.com/questions/218781", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: Concurrent programming c++? I keep on hearing about concurrent programing every where. Can you guys throw some light on what it's and how c++ new standards facilitate doing the same? A: Concurrency is about your code doing multiple things at the same time. This is typically done with explicit "threads", but there a...
{ "language": "en", "url": "https://stackoverflow.com/questions/218786", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "47" }
Q: Is there a way to use jQuery's serialize form fields and trim the value in the fields? I have a form that uses jQuery to submit an ajax post and it serializes the form that is sent up. The code looks like this: var form = $("form"); var action = form.attr("action"); var serializedForm = form.serialize(); $.post(acti...
{ "language": "en", "url": "https://stackoverflow.com/questions/218794", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: In javascript how can we identify whether an object is a Hash or an Array? The output of my JSON call can either be an Array or a Hash. How do I distinguish between these two? A: I made a function for determining if it's a dictionary. exports.is_dictionary = function (obj) { if(!obj) return false; if(Array....
{ "language": "en", "url": "https://stackoverflow.com/questions/218798", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "87" }
Q: What is the right info to cache? What's a good page load time? I'm in the process of developing a social network site. And been thinking of scalability from day one of the project, I've fine tuned the site and queries to the best of my ability. However; Certain pages are very data heavy and I'm not quite sure if the...
{ "language": "en", "url": "https://stackoverflow.com/questions/218801", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How do the ExceptionSorter classes in JBoss work? I am wondering how the JBoss ExceptionSorter classes are able to check for database errors. The application (the EJB or persistence framework) is holding the reference to the database Connection, so SQLExceptions are caught by the application. How is JBoss able to se...
{ "language": "en", "url": "https://stackoverflow.com/questions/218806", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: C# ADO.NET: nulls and DbNull -- is there more efficient syntax? I've got a DateTime? that I'm trying to insert into a field using a DbParameter. I'm creating the parameter like so: DbParameter datePrm = updateStmt.CreateParameter(); datePrm.ParameterName = "@change_date"; And then I want to put the value of the Dat...
{ "language": "en", "url": "https://stackoverflow.com/questions/218808", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "49" }
Q: jmock mocking a static method I have a static method in my code that I would like somehow to mock. I am using jmock. One way I suppose I could do this is to have "wrapper class" around the static method and mock this but I was hoping for a better solution. I am going about this the wrong way? FEEDBACK: I was going t...
{ "language": "en", "url": "https://stackoverflow.com/questions/218813", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: dropdownextender Ajax tool kit How to implement in dropdownextender to go to the selected item by keyboard or go to items starting with 'A' when i press 'A' on my keyboard, i need it work as a normal drop down control. good reference i got from it good ideas: http://www.dotnetcurry.com/ShowArticle.aspx?ID=167 A: On...
{ "language": "en", "url": "https://stackoverflow.com/questions/218822", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to reduce space between JCheckboxes in GridLayout I have three Java JCheckboxes in a column, arranged by setting the layout of the container JPanel to GridLayout(3, 1, 1, 1). When I run the program, there is too much vertical space between the JCheckBoxes; it looks like more than 1 pixel. Since I've already se...
{ "language": "en", "url": "https://stackoverflow.com/questions/218825", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How can I check my .NET assembly for freshness? All, I'm working on a SharePoint project, but this isn't a SharePoint-specific question per-se. I have an assembly I've deployed to a SharePoint farm, and I'd like to verify whether my "newest version" is sitting in the GAC, or if an older version from late yesterday i...
{ "language": "en", "url": "https://stackoverflow.com/questions/218827", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: VS2005 IDE: Automatically accept code change suggestions? I'm pasting test data from a SQL results into my code. I'm using the SQL results to manually populate a strongly typed dataset. However, the data types need to be casted to the correct data types. VS2005 tells me that I need to cast each field as an int, d...
{ "language": "en", "url": "https://stackoverflow.com/questions/218832", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Assigning TCP/IP Ports for In-House Application Use I've written a WCF Service hosted by a Windows Service and it needs to listen on a known TCP/IP port. From what range can I safely allocate a port for use within my organization? That port will be embedded in the config files for the service and the clients that ...
{ "language": "en", "url": "https://stackoverflow.com/questions/218839", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "60" }
Q: How do I define a catch-all route for an ASP.NET MVC site? I have a news site with articles tagged in categories. My Controller is called "Category" and this URL: http://mysite.com/Category/Sport passes Sport to action Index in controller Category. I want to allow the following URLs: http://mysite.com/Sport/Hocke...
{ "language": "en", "url": "https://stackoverflow.com/questions/218845", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Design decision: Dynamically adding data question I need to give users the ability to optionally add metadata to documents. Another way to state this is the fact that users need to add at least 5 categories to a document. Basically what I want to do is dynamically add metadata (or categories) to a document on an ad ...
{ "language": "en", "url": "https://stackoverflow.com/questions/218848", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Using AdjustTokenPrivileges securely/robustly? I'm just writing some code that enables the SeDebug privilege in Windows, using AdjustTokenPrivileges. The token came from OpenProcessToken; OpenThreadToken only returns a token if impersonating. A couple of things occur to me: * *What's the scope of the token? Is it...
{ "language": "en", "url": "https://stackoverflow.com/questions/218854", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: C#: Force Compiler error on use of myObj.ToString() I have a class that contains a bunch of properties. It is a mistake by a programmer if they call ToString() on an object of that type. Take this example code: using System; public class Foo { public int ID = 123; public string Name = "SomeName"; priva...
{ "language": "en", "url": "https://stackoverflow.com/questions/218857", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Will MS Visual Studio 2008 show help on my own functions if I use Javadoc style comments for them? For example in C# or in JavaScript documents. If not, is there point in using Javadoc comments in ASP.NET programming? A: I'm pretty sure the answer to that is no, it won't. Why would you use Javadoc style comments ra...
{ "language": "en", "url": "https://stackoverflow.com/questions/218859", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I display mysql data in row span using PHP? I have data from MySQL showing all organisations a customer got, with all details of employess in each organisation. I want to list each organisation name only once i.e. in a single cell ( row span) and all employees in that organisation against this name like: Org1...
{ "language": "en", "url": "https://stackoverflow.com/questions/218866", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: HTML Links and Usability Should links on a web page ALWAYS be underlined? I do not believe this should be a hard and fast RULE! I wrote a comment on my blog awhile back about this after another developer complained that I was not following web standards. It is coming up again, and I want to know what you think. Her...
{ "language": "en", "url": "https://stackoverflow.com/questions/218883", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: C# Generics: Can I constrain to a set of classes that don't implement an interface? I have 3 classes that are essentially the same but don't implement an interface because they all come from different web services. e.g. * *Service1.Object1 *Service2.Object1 *Service3.Object1 They all have the same properties...
{ "language": "en", "url": "https://stackoverflow.com/questions/218888", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: What happens when an Apache worker starts its own worker thread or process? If I'm using Apache with a pool of worker processes, and one of those launches its own long-running process, what happens to that worker? Will Apache kill it eventually, killing the child process? Will that worker be permanently unavailabl...
{ "language": "en", "url": "https://stackoverflow.com/questions/218902", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do I Automate Keeping my TortoiseSVN Project Up-to-date? I am using TortoiseSVN for my Subversion repository held on a USB drive. When I move from one PC to another, is there a way to automatically identify that files are out of date (without using the Check for Modifications menu). It would be nice just to be a...
{ "language": "en", "url": "https://stackoverflow.com/questions/218904", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How to handle multiple submissions server-side We all know the good old "disable the submit button" trick but what are the best ways to handle multiple submissions server side? I have an application where it is absolutely critical that a form only be sent once - it processes a credit card. I didn't write how it is r...
{ "language": "en", "url": "https://stackoverflow.com/questions/218907", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "36" }
Q: Best way to turn an integer into a month name in c#? Is there a best way to turn an integer into its month name in .net? Obviously I can spin up a datetime to string it and parse the month name out of there. That just seems like a gigantic waste of time. A: You can use a static method from the Microsoft.VisualBasi...
{ "language": "en", "url": "https://stackoverflow.com/questions/218908", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "125" }
Q: Returning a PDF file from a Java Bean to a JSP EDIT: See my working code in the answers below. In brief: I have a JSP file which calls a method in a Java Bean. This method creates a PDF file and in theory, returns it to the JSP so that the user can download it. However, upon loading the PDF, Adobe Reader gives the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/218909", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Getting jQuery tablesorter to work with hidden/grouped table rows I have the classical table with expandable and collapsible records that if expanded show several subrecords (as new records in the same parent table, not some child div/child table). I am also using tablesorter and absolutely love it. The problem is t...
{ "language": "en", "url": "https://stackoverflow.com/questions/218911", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Linux command (like cat) to read a specified quantity of characters Is there a command like cat in linux which can return a specified quantity of characters from a file? e.g., I have a text file like: Hello world this is the second line this is the third line And I want something that would return the first 5 chara...
{ "language": "en", "url": "https://stackoverflow.com/questions/218912", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "139" }
Q: How can I open a port in iptables for RMI access I'm trying to connect from my Java application to a development server that has port 8088 closed which is used for RMI. I appreciate any help on how to open that port. A: Assuming * *you want to allow access from everywhere *you want to allow access via the firs...
{ "language": "en", "url": "https://stackoverflow.com/questions/218920", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do you share data between a parent and forked child process in Python? I'm pretty sure one would do this using the os.plock(op) function, but I have no idea how. Also, if there's a better way, I'd be grateful to find out. Code snippets are very welcome. A: Take a look at the multiprocessing module new in pytho...
{ "language": "en", "url": "https://stackoverflow.com/questions/218935", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Simple Model Checker Tool Is there a simple Model Checker tool. I am planning to implement a model checker tool which will analyze the code for some of the predefined properties. A: One important tool is SPIN, with the Promela language. If you use LaTeX, there is also TLA+. These will not analyse your code, but wi...
{ "language": "en", "url": "https://stackoverflow.com/questions/218951", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Does a table join break Order By clause in Access Queries? I have a problem perplexing me to no end. When I run the following query against an access database: SELECT * FROM PreferredSpacer INNER JOIN SpacerThickness ON PreferredSpacer.SpacerTypeID = SpacerThickness.SpacerTypeID ORDER BY PreferredSpacer.UnitTypeID...
{ "language": "en", "url": "https://stackoverflow.com/questions/218969", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: SQL Server 2000/2005 identity column + replication I have looked at some resources already and just want to clarify and get an opinion. First of all to totally avoid any problems we could just not bother using identity columns as primary keys instead have them generated ourselves and just have those values replicate...
{ "language": "en", "url": "https://stackoverflow.com/questions/218986", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: how can i use sharepoint (via soap?) from python? I want to use Sharepoint with python (C-Python) Has anyone tried this before ? A: To get the wsdl : import sys # we use suds -> https://fedorahosted.org/suds from suds import WebFault from suds.client import * import urllib2 # my 2 url conf # url_sharepoint,url_NT...
{ "language": "en", "url": "https://stackoverflow.com/questions/218987", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: SPWorkflowTaskProperties.ExtendedProperties aren’t populating the fields in my task I am attempting to pass information from a task created within a workflow to its corresponding task form. Prior to the CreateTask activity, I create an SPWorkflowTaskProperties and fill it with the usual info (title, assigned-to, et...
{ "language": "en", "url": "https://stackoverflow.com/questions/218988", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to determine build architecture (32bit / 64bit) with ant? We have inherited an ant build file but now need to deploy to both 32bit and 64bit systems. The non-Java bits are done with GNUMakefiles where we just call "uname" to get the info. Is there a similar or even easier way to mimic this with ant? A: Here is...
{ "language": "en", "url": "https://stackoverflow.com/questions/218989", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: Detecting Virus Scanners We've had problems with a virus scanner murdering the performance of our app by slowing down writes to an H2 db. So we'd like to be able to detect the presence of any virus scanner and alert the user of the potential problem. It would be part of a problem detection retue that would alert use...
{ "language": "en", "url": "https://stackoverflow.com/questions/218990", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do you learn a new skill/framework/technology? I need to be able to contribute to a relatively large Adobe AIR project and I'm starting from scratch with this technology. What's the best way to go about it? I usually get a good book/tutorial and work my way through it but this time it seems there's just too much...
{ "language": "en", "url": "https://stackoverflow.com/questions/219006", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Merging and querying multiple lists I am still new to sharepoint and would like to know if it is possible to make a query that works across several lists. My list looks like this Customers (id, name and so forth) Orders ( id, order number, customer and some additional info) OrderItems (id, name, price, description a...
{ "language": "en", "url": "https://stackoverflow.com/questions/219007", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Jasper report generating bad HTML If I view the HTML generated by one of my Jasper reports in IE7 I see the following: <BR /><BR /> <A name="JR_PAGE_ANCHOR_0_1"> <TABLE style="WIDTH: 1000px" cellSpacing="0" cellPadding="0" bgColor="#ffffff" border="0"> <-- table body omitted --> </TABLE> The two BR tags are added ...
{ "language": "en", "url": "https://stackoverflow.com/questions/219009", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }