text
string
meta
dict
Q: Parameter Sniffing (or Spoofing) in SQL Server A while ago I had a query that I ran quite a lot for one of my users. It was still being evolved and tweaked but eventually it stablised and ran quite quickly, so we created a stored procedure from it. So far, so normal. The stored procedure, though, was dog slow. No ...
{ "language": "en", "url": "https://stackoverflow.com/questions/211355", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "65" }
Q: How do I assign a custom icon to a Pushpin in Mappoint? I'm writing a MFC app that uses the MS Mappoint OCX. I need to display the locations of people and vehicles on the map and the best of doing this appears to be with Pushpin objects. I have no problem displaying a stock pushpin icon with some text but want to ch...
{ "language": "en", "url": "https://stackoverflow.com/questions/211369", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: jquery image selector not working in IE7 So I have some html like so: <div id="avatar_choices"> <label for="id_choice_0"> <input id="id_choice_0" type="radio" name="choice" value="7" /> <img src="someimage.jpg" /> </label> <label for="id_choice_1"> <input id="id_choice_1" type="ra...
{ "language": "en", "url": "https://stackoverflow.com/questions/211375", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: function overloading fail: why did these operators clash? I've got a big big code base that includes two main namespaces: the engine and the application. The engine defines a vector3 class as a typedef of another vector3 class, with equality operators that sit in the engine namespace, not in the vector3 class. I ...
{ "language": "en", "url": "https://stackoverflow.com/questions/211376", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Hidden features of Bash Shell scripts are often used as glue, for automation and simple one-off tasks. What are some of your favorite "hidden" features of the Bash shell/scripting language? * *One feature per answer *Give an example and short description of the feature, not just a link to documentation *Label t...
{ "language": "en", "url": "https://stackoverflow.com/questions/211378", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "72" }
Q: Updating Access 2003 to 2007, potential issues? I've written an Access 2003 application to handle internal things at my company over the past couple years and we are talking about upgrading all of our computers to Office 2007 which means Access will be updated. Is this going to cause a problem for me? A: Allen Bro...
{ "language": "en", "url": "https://stackoverflow.com/questions/211380", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: What methods of ‘clearfix’ can I use? I have the age-old problem of a div wrapping a two-column layout. My sidebar is floated, so my container div fails to wrap the content and sidebar. <div id="container"> <div id="content"></div> <div id="sidebar"></div> </div> There seem to be numerous methods of fixing the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/211383", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "890" }
Q: Open Source C++ Data Visualization Library We want to include data visualization in our desktop GUI (mostly timelines and graphs; clickable, draggable). We want to restrict to open-source, non-copyleft C++ libraries that allow commercial use and are portable across many platforms. Which library can I use? Our GUI is...
{ "language": "en", "url": "https://stackoverflow.com/questions/211384", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: WCF over MSMQ not working I have been tasked to implement a WCF service that makes use of NetMsmqBinding. I wrote the service and it works fine. The problem is that in the last minute they told me that there will be no Active Directory integration. So I don't know how to configure the security of the service. There ...
{ "language": "en", "url": "https://stackoverflow.com/questions/211385", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Update more than one row atomically I need to execute a select and then update some of the rows in the ResultSet in an atomic way. The code I am using looks like (simplified): stmt = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE); rs = stmt.executeQuery("SELECT ..."); while (rs.nex...
{ "language": "en", "url": "https://stackoverflow.com/questions/211399", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: PHP Array Help I have an array which is a list of domains, I want to print all of the items in the array except the one which contains $x. $x is variable so basically it never prints the array item when it contains $x. Can anyone help me? :) A: Darkey's answer is correct assuming you don't want to print array value...
{ "language": "en", "url": "https://stackoverflow.com/questions/211403", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Using Nutch crawler with Solr Am I able to integrate Apache Nutch crawler with the Solr Index server? Edit: One of our devs came up with a solution from these posts * *Running Nutch and Solr *Update for Running Nutch and Solr Answer Yes A: If you're willing to upgrade to nutch 1.0 you can use the solrindex as d...
{ "language": "en", "url": "https://stackoverflow.com/questions/211411", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: "Cannot implicitly convert type 'System.Guid?' to 'System.Guid'." - Nullable GUID In my database, in one of the table I have a GUID column with allow nulls. I have a method with a Guid? parameter that inserts a new data row in the table. However when I say myNewRow.myGuidColumn = myGuid I get the following error: C...
{ "language": "en", "url": "https://stackoverflow.com/questions/211436", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "31" }
Q: How does COM registration work in Windows I'm an application packager trying to make sense of how the COM registry keys (SelfReg) interrelate to the given .dll in Windows. ProgID's, AppID's, TypeLibs, Extensions & Verbs are all tied around the CLSID right? Do CLSID's always use Prog/App IDs or could you just have a ...
{ "language": "en", "url": "https://stackoverflow.com/questions/211440", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How to run Tomcat 6 on WinXP 64 bit? Installed Tomcat 6 on WinXP 64. It installed just fine. But when I try to launch it ( from Windows Services) I get the following error : "Can not start an the Apache Tomcat Service on Local computer." error 216:0xd8 A: I've struggled with this. I was trying to install Tomcat 6...
{ "language": "en", "url": "https://stackoverflow.com/questions/211446", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: ICollection, readonly collections, and synchronisation. Is this right? I have a custom class that implements ICollection, and this class is readonly, ie. IsReadOnly returns true (as opposed to using the readonly keyword), and all functions that would normally modify the data in the collection throw InvalidOperationE...
{ "language": "en", "url": "https://stackoverflow.com/questions/211448", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: adding text to TIFF I need to add text string to a TIFF image. I am planning to use libTIFF for editing the TIFF image. The plan is to convert text to image using freetype2 and then somehow render the text image on to TIFF. Is this the right approach? Any pointers on how to convert text to image? I saw the sample co...
{ "language": "en", "url": "https://stackoverflow.com/questions/211459", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: how do I add a test web service to my project in Visual Studio? I have a test web service replicating a live web service that hasn't been made public yet (It will be public when the app is released). I added a new ASP.NET Web Service Application to my solution. Now when I try and add a web reference from the main pr...
{ "language": "en", "url": "https://stackoverflow.com/questions/211465", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Reflecting method's actions in Java I'd like to know how to - if even possible - reflect what method calls are executed inside the method during execution. I'm especially interested in either external method calls (that is, methods in other classes) or calling some specific method like getDatabaseConnection(). My in...
{ "language": "en", "url": "https://stackoverflow.com/questions/211477", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Lightweight messaging (async invocations) in Java I am looking for lightweight messaging framework in Java. My task is to process events in a SEDA’s manner: I know that some stages of the processing could be completed quickly, and others not, and would like to decouple these stages of processing. Let’s say I have co...
{ "language": "en", "url": "https://stackoverflow.com/questions/211480", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: arguments to cryptographic functions I'm a bit confused that the argument to crypto functions is a string. Should I simply wrap non-string arguments with str() e.g. hashlib.sha256(str(user_id)+str(expiry_time)) hmac.new(str(random.randbits(256))) (ignore for the moment that random.randbits() might not be cryptograp...
{ "language": "en", "url": "https://stackoverflow.com/questions/211483", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I capture the audio that is being played? Does anyone know how to programmatically capture the sound that is being played (that is, everything that is coming from the sound card, not the input devices such as a microphone). A: You can use the Waveform Audio Interface, there is an MSDN article on how to acces...
{ "language": "en", "url": "https://stackoverflow.com/questions/211484", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "30" }
Q: How to add a JUnit 4 test that doesn't extend from TestCase to a TestSuite? In JUnit 3 I simply called suite.addTestSuite( MyTest.class ) However if MyTest is a JUnit 4 test which does not extend TestCase this doesn't work. What should I do instead to create a suite of tests? A: Found the answer myself: here Like ...
{ "language": "en", "url": "https://stackoverflow.com/questions/211487", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: TFS Sprint Item Print Plug-in Does anyone know if there is a plug-in for TFS that will print out our sprint backlog items in a format suitable for using on a Scrum Board, rather than us having to write them out by hand? A: If your setup is Team Foundation Server 2010/2012/2013 with the Microsoft Visual Studio Scrum...
{ "language": "en", "url": "https://stackoverflow.com/questions/211488", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: ASP.NET MVC Beta 1 - where is Html.RenderPartial? I'm just in the process of upgrading my Preview 5 application to Beta 1, and I'm nearly there save for this one error when trying to render a control: 'System.Web.Mvc.HtmlHelper' does not contain a definition for 'RenderPartial' and no extension method 'Render...
{ "language": "en", "url": "https://stackoverflow.com/questions/211493", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: WCF Service & Request queueing Is using a handrolled POCO queue class using pseudo code T Dequeue() { lock(syncRoot) { if(queue.Empty) Thread.Wait(); } } void Enqueue(T item) { queue.Enqueue(item); Thread.Notify(); } For WCF is request queueing a scalable approach? A: WCF service throttling wi...
{ "language": "en", "url": "https://stackoverflow.com/questions/211496", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Is there a .NET equivalent to SQL Server's newsequentialid() We use GUIDs for primary key, which you know is clustered by default. When inserting a new row into a table it is inserted at a random page in the table (because GUIDs are random). This has a measurable performance impact because the DB will split data pag...
{ "language": "en", "url": "https://stackoverflow.com/questions/211498", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "37" }
Q: Eclipse, where to change the current debug line background? Can anyone point me to the preferences page that has the setting of the DEBUG current line background color? I have changed almost all the colours to dark ones and still get annoyed by this almost white current line indicator while debugging (note that the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/211500", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "153" }
Q: Using SQLite in a Python program I have created a Python module that creates and populates several SQLite tables. Now, I want to use it in a program but I don't really know how to call it properly. All the tutorials I've found are essentially "inline", i.e. they walk through using SQLite in a linear fashion rather t...
{ "language": "en", "url": "https://stackoverflow.com/questions/211501", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Is it possible to change the properties of a WebReference in run-time? I am trying to come up with such a solution that the user is going to enter the URL of a web-service and it is going to be tested. Although what I want is a URL change, I guarantee the Service Description is always going to be the same (except th...
{ "language": "en", "url": "https://stackoverflow.com/questions/211510", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Suppressing popups in Windows Is there an easy way to tell Windows not to display popups on a headless server machine? Currently occasional application popups are causing my app to freeze because no one is available to press 'Okay' on the console. Just logging to the eventlog would be more than sufficient. A: Depen...
{ "language": "en", "url": "https://stackoverflow.com/questions/211529", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Why global.asax Application_Error method does not catch exceptions thrown by ASMX service? And how to fix it. I'd like to log every thrown exception for maintenance purpose. A: This is a known issue in .Net - Application_Error never fires for a web service. Not sure if there's any reason it would be by design, but ...
{ "language": "en", "url": "https://stackoverflow.com/questions/211530", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "43" }
Q: Fastest way to do a case-insensitive substring search in C/C++? Note The question below was asked in 2008 about some code from 2003. As the OP's update shows, this entire post has been obsoleted by vintage 2008 algorithms and persists here only as a historical curiosity. I need to do a fast case-insensitive substri...
{ "language": "en", "url": "https://stackoverflow.com/questions/211535", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Scripting in Java Me and some friends are writing a MORPG in Java, and we would like to use a scripting language to, eg. to create quests. We have non experience with scripting in Java. We have used Python, but we are very inexperienced with it. One of us also have used Javascript. What scripting language should we...
{ "language": "en", "url": "https://stackoverflow.com/questions/211536", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: DataGrid Paging Problem in IE I have a single templated column in a DataGrid, in an ASP.NET 2 web sites. The DataGrid is paged, with ten rows per page. In Firefox, all is good, as nearly always, but when I view the site trough IE, I get the following exception: Invalid postback or callback argument. Event valid...
{ "language": "en", "url": "https://stackoverflow.com/questions/211544", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to change system default regional settings in windows XP? How can I change the system-default regional settings in windows XP for use by services (run by the system user)? Regional and Language Options in the control panel modify the settings for the logged-in user. However, services don't use the user's setting...
{ "language": "en", "url": "https://stackoverflow.com/questions/211549", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Safari/WebKit table over-run when using whitespace: nowrap Having a strange rendering issue with Safari: I have a table inside a div. Inside the table <td> I have lots of div's floated left. So the normal display is all of the divs within the td stacked up to the left until they fill the width, then flow to the nex...
{ "language": "en", "url": "https://stackoverflow.com/questions/211550", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How can I execute javascript from the server when using asp:UpdatePanels? I used to do the following to execute javascript from the server: Page.ClientScript.RegisterStartupScript( ... ); And it would execute when the page loads back at the client. I am now modifing existing pages to use UpdatePanels and my javascr...
{ "language": "en", "url": "https://stackoverflow.com/questions/211553", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Enum and property naming conflicts When using a class that has an enum property, one usually gets a naming conflict between the property name and the enum type. Example: enum Day{ Monday, Tuesday, ... } class MyDateClass { private Day day; public Day Day{ get{ return day; } } } Since only flags enums should...
{ "language": "en", "url": "https://stackoverflow.com/questions/211567", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "49" }
Q: Precisely time a function call I am using a microcontroller with a C51 core. I have a fairly timeconsuming and large subroutine that needs to be called every 500ms. An RTOS is not being used. The way I am doing it right now is that I have an existing Timer interrupt of 10 ms. I set a flag after every 50 interrupts ...
{ "language": "en", "url": "https://stackoverflow.com/questions/211583", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: CaptureStackBackTrace on Visual Studio 2005 I've recently heard about the CaptureStackBackTrace function by reading this post. I cannot find it in any of my Visual Studio 2005 header files however, and I'm guessing (from the MSDN URL which mentions VS.85) that this may only be a Visual Studio 2008 thing. Is there a...
{ "language": "en", "url": "https://stackoverflow.com/questions/211586", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: TZ Multiple TimeZone under Windows If I start a number of process that could represent clients that is running in different TimeZones I can (depending on the actual code) use the TZ enivroment to make them look like they come from different timezones. Is there a more proper windows way to simulate this, without star...
{ "language": "en", "url": "https://stackoverflow.com/questions/211604", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Copy files to clipboard in C# I have a Windows Forms TreeView (node, subnodes). Each node contains some additional information in its Tag. Also, each nodes maps a file on the disk. What's the easiest way copy/cut/paste nodes/files in C#? It would be nice to have some sample code. A: Consider using the Clipboard cla...
{ "language": "en", "url": "https://stackoverflow.com/questions/211611", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "30" }
Q: Preferred fixture replacement plugin in Rails? There are a dozen Rails plugins whose goal is to replace fixtures in testing. Here are a few I can think of: * *fixture replacement *factory girl *factories and workers *rails scenarios *fixture-scenarios *object daddy There are probably others. Which of these...
{ "language": "en", "url": "https://stackoverflow.com/questions/211612", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: Hidden features of Objective-C Objective-C is getting wider use due to its use by Apple for Mac OS X and iPhone development. What are some of your favourite "hidden" features of the Objective-C language? * *One feature per answer. *Give an example and short description of the feature, not just a link to document...
{ "language": "en", "url": "https://stackoverflow.com/questions/211616", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Impersonation MFC C++ I want to impersonate other user in Windows. For example: I create a directory with permission only for user A and for the administrators, when logon with user B and run .exe I want to impersonate user A to have permission to edit/remove/insert in that specific directory. I found this: http://m...
{ "language": "en", "url": "https://stackoverflow.com/questions/211621", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Attaching the .net debugger while still providing useful logging on death I would like to have some kind of catch-all exceptions mechanism in the root of my code, so when an app terminates unexpectedly I can still provide some useful logging. Something along the lines of static void Main () { if (Debugger.IsAtta...
{ "language": "en", "url": "https://stackoverflow.com/questions/211622", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Using GNU Scientific "multimin" to find all local minima The GNU Scientific library has a multi-dimensional function minimization framework. However, its caveats explicitly says that when used on a function with several different local minima it just returns one arbitrary solution. Does anybody know how you might go...
{ "language": "en", "url": "https://stackoverflow.com/questions/211625", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to remove a shortcut file in c# How to remove the program icon from the Programs folder? A: To get the start menu location, use the SpecialFolder enumeration. Something like the following should get you started: string startMenuDir = Environment.GetFolderPath(Environment.SpecialFolder.StartMenu); string shortcu...
{ "language": "en", "url": "https://stackoverflow.com/questions/211629", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Hosted .NET runtime and window focus, problem and inconsistencies We have a Win32 application that hosts the .NET runtime and opens up .NET managed forms from the Win32 portion of the application. These windows are always opened as modal windows. On some machines, when these windows are closed, the Win32 window that...
{ "language": "en", "url": "https://stackoverflow.com/questions/211634", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Building Ajax Form in Google App Engine I have a form, when I click on submit button, I want to communicate with the server and get something from the server to be displayed on the same page. Everything must be done in AJAX manner. How to do it in Google App Engine? If possible, I want to do it in JQuery. Edit: The ...
{ "language": "en", "url": "https://stackoverflow.com/questions/211648", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Adding textbox in SQL Reporting services (Dynamically) I am having a problem like that i am having some 10 parameters. I am dispalying the parameter values in the textbox(10 different). I need to display the textbox based on my parameter values If the parameter has values - show them in textbox If the parameter has ...
{ "language": "en", "url": "https://stackoverflow.com/questions/211654", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: castle windsor: how to use a Type as constructor property in xml config? I have the following: TypeUser:ITypeUser { public TypeUser(Type usedType){..} } How do i configure the Type parameter in windsor config xml? A: For custom types you need provide a type converter to handle the conversion, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/211656", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Is there a way to use a custom JUnit Test Runner when running tests in Eclipse? I want to use JMockit's incremental test runner instead of the standard JUnit test runners from within Eclipse. Is there a way to do this? Edit Received the following answer to my email to the JMockit dev: You would need to start the JV...
{ "language": "en", "url": "https://stackoverflow.com/questions/211659", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How do I make a C# class with a dictionary-like member using XSD? I'm using xsd.exe to make the C# classes for our settings. I have a setting that is per-server and per-database, so I want the class to behave like Dictionary<string, string[][]>. So I want to be able to say string serverName = "myServer"; int datab...
{ "language": "en", "url": "https://stackoverflow.com/questions/211689", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Generate html documentation automatically during a build with Sandcastle What steps do I need to take to get HTML documentation automatically building via the build step in Visual Studio? I have all the comments in place and the comments.xml file being generated, and Sandcastle installed. I just need to know what to...
{ "language": "en", "url": "https://stackoverflow.com/questions/211693", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "21" }
Q: How can I do automated tests on non JavaScript applications? I am writing controls that work nice with JavaScript, but they have to work even without it. Now testing with selenium works fine for me. But all test with disabled JavaScript (in my browser) won't run with selenium. Is there a way to do automated test for...
{ "language": "en", "url": "https://stackoverflow.com/questions/211694", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: What is an easy way to create a trivial one-off Python object? I would like to create a trivial one-off Python object to hold some command-line options. I would like to do something like this: options = ?????? options.VERBOSE = True options.IGNORE_WARNINGS = False # Then, elsewhere in the code... if options.VERBOS...
{ "language": "en", "url": "https://stackoverflow.com/questions/211695", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Is it possible to get the position of div within the browser viewport? Not within the document. Within the window Is this doable in either IE7 or Firefox? A: Try the dimensions jQuery plugin. See this demo. $('#myelement.').offset(); A: You can do it in both - get the position relative to the document, then subt...
{ "language": "en", "url": "https://stackoverflow.com/questions/211703", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: Behaviour of exceptions within delegates in C# 2 hosted by MS Excel and COM Morning all, Bit of a language theory question here... I've found some references online suggesting that exception handling and delegates in C# have some different behaviour in some cases but I cannot find any concrete documentation on the m...
{ "language": "en", "url": "https://stackoverflow.com/questions/211714", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to make a macro which executes periodically in Excel? How does one execute some VBA code periodically, completely automated? A: You can use Application.OnTime to schedule a macro to be executed periodically. For example create a module with the code below. Call "Enable" to start the timer running. It is imp...
{ "language": "en", "url": "https://stackoverflow.com/questions/211715", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Common Lisp Programmatic Keyword Is there a function in Common Lisp that takes a string as an argument and returns a keyword? Example: (keyword "foo") -> :foo A: The answers given while being roughly correct do not produce a correct solution to the question's example. Consider: CL-USER(4): (intern "foo" :keyword) ...
{ "language": "en", "url": "https://stackoverflow.com/questions/211717", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "27" }
Q: Struts Logic Problem Why doesn't the code below work? The idea is that the page checks to see if the dropdown variable has changes since you last refreshed the page. <logic:equal name="Result" value = "-1"> <bean:define id="JOININGDATE" name="smlMoverDetailForm" property="empFDJoiningDate" type="java.la...
{ "language": "en", "url": "https://stackoverflow.com/questions/211718", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Should I use Ansi or Unicode charset with dllimport? When you use DllImport to import a function you can specify a CharSet to use. I noticed that in C#, C++ and visual basic the .Net runtime defaults to using Ansi instead of Unicode for this. So for any system call that has an A and a W version the A version will be...
{ "language": "en", "url": "https://stackoverflow.com/questions/211739", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: The origin of sprintf-style string formatting The string formatting concept found in sprintf can be found in almost any language today (you know, smothering a string with %s %d %f etc. and providing a list of variables to fill their places). Which langugage was it originally that had a library function or language ...
{ "language": "en", "url": "https://stackoverflow.com/questions/211741", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Friendly HTTP 401 Status Code Message? I'm a developer not a wordsmith and as such I'm stuck. We have a subscription based site whereby users may well come across our 401 page. We've decided that the IIS 401;2 page needs replacing. Does anyone have any examples or advise about writing a good non offensive 401 page?...
{ "language": "en", "url": "https://stackoverflow.com/questions/211747", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Do you use Unit Testing in your professional projects? We are about to start a new part of the project and there doesn't seem to be a lot of interest in unit testing (and it doesn't feel like they have experienced TDD). I believe it's nearly essential and it makes maintainance much easier. So what are your views? Th...
{ "language": "en", "url": "https://stackoverflow.com/questions/211751", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Set a SP return value to a variable in SQL Server I have a sproc that returns a single line and column with a text, I need to set this text to a variable, something like: declare @bla varchar(100) select @bla = sp_Name 9999, 99989999, 'A', 'S', null but of course, this code doesn't work... thanks! A: If you are un...
{ "language": "en", "url": "https://stackoverflow.com/questions/211758", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: ASDoc through the Flex Builder UI? Is there any way to run ASDoc on your project via the Flex Builder UI? Or, is there a good (preferably free) plugin that will do so? If there is no UI for it, does someone have a link to a tutorial on how to set it up to be automatic when I build my project, maybe via Ant (which I...
{ "language": "en", "url": "https://stackoverflow.com/questions/211760", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Add extra items to a Silverlight 2 Combobox For a Silverlight 2 webapp. I added a combobox. I have an IEnumerable as Itemsource to populate the combobox. Works fine. But I would like to add an extra item ("please select a....") to the combobox, anyone an idea how this can be done using the Silverlight 2 combobox. An...
{ "language": "en", "url": "https://stackoverflow.com/questions/211761", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: i have to access/commit/update SVN repository in WPF application using SVN API or libraries Any GOOD libraries available to access SVN from .net application (using C#). The only 3 I found so far that I will be trying out is: * *SVN# *SharpSVN *NSvn I want to create a very simple SVN client! A: I used SharpSvn....
{ "language": "en", "url": "https://stackoverflow.com/questions/211765", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "40" }
Q: What is the industry and community best practice for coding proper maintainable readable jQuery for a large codebase? Coming from a Ruby background, I'm used to writing all my code using classes with methods and such. I do know javascript quite well, but I'm new to jQuery and its best practices. Obviously there are ...
{ "language": "en", "url": "https://stackoverflow.com/questions/211769", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Are there any coding standards for JavaScript? What are the established coding standards for JavaScript? A: Google has posted a Javascript guide A: Not exactly what you're looking for, but (like Doug Crockford's vids) I think everybody who writes/edits/reviews JS should look at Chris Heilmann's slides and videos o...
{ "language": "en", "url": "https://stackoverflow.com/questions/211795", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "179" }
Q: PHP generating XML, time-outs randomly I have no idea. This causes seemingly random time-outs. These in turn break the flash that i am loading it into. Has anyone seen anything like this before? <?php require_once("../includes/class.database.php"); require_once("../includes/dbConnectInfo.inc"); require_once("../incl...
{ "language": "en", "url": "https://stackoverflow.com/questions/211800", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Is there a way to get a short CVS status from command line? When doing a cvs update, you get a nice summary of the state of the repository, for example: M src/file1.txt M src/file2.txt C src/file3.txt A src/file4.txt ? src/file5.txt Is there a way to get this without actually updating? I know there is cvs status, b...
{ "language": "en", "url": "https://stackoverflow.com/questions/211819", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "27" }
Q: Is Donut Caching working properly with ASP.NET MVC? And by donut caching, I'm refering to Scott Guthrie's blog post which is awesome. Does anyone know if that works properly? A: Note that this technique no longer works as of MVC 2.0. Which sucks. A: Cross-post from another question: Donut Caching (yes, the real th...
{ "language": "en", "url": "https://stackoverflow.com/questions/211827", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Perl/Tk GUI for C++ Application I have to do a college project using C++ that requires a GUI. I want to use Perl/Tk for the GUI, but I am not sure how to link the C++ to the Perl. The project requires being able to pass variables back and forth. Could anyone point me in the direction of some good tutorials/books for...
{ "language": "en", "url": "https://stackoverflow.com/questions/211830", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Databinding Fail - Help me get started with simple example OK... I'm a VB.NET WinForms guy trying to understand WPF and all of its awesomeness. I'm writing a basic app as a learning experience, and have been reading lots of information and watching tutorial videos, but I just can't get off the ground with simple Dat...
{ "language": "en", "url": "https://stackoverflow.com/questions/211834", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: "There appears to be a discrepancy between the solution's source control ...." We get this error in Visual Studio 2005 and TFS very often. Can anyone help us pinpoint the cause for this message? The full message is: There appears to be a discrepancy between the solution's source control information about some pro...
{ "language": "en", "url": "https://stackoverflow.com/questions/211839", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Is there a good JSP editor for Eclipse? I need a nice JSP editor plugin for Eclipse. What are my choices? A: I followed the advice of Simon Gibbs in this answer and found it worked out fine - if you're in a hurry, the "Web Page Editor (optional)" package from the Eclipse update site does the trick. For the Eclips...
{ "language": "en", "url": "https://stackoverflow.com/questions/211841", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "93" }
Q: Why are people using regexp for email and other complex validation? There are a number of email regexp questions popping up here, and I'm honestly baffled why people are using these insanely obtuse matching expressions rather than a very simple parser that splits the email up into the name and domain tokens, and the...
{ "language": "en", "url": "https://stackoverflow.com/questions/211842", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Mapping Enum from String I have a string column in a database table which maps to an Enum in code. In my dbml file when I set the "Type" to MyTypes.EnumType I get the following error: Error 1 DBML1005: Mapping between DbType 'VarChar(50) NOT NULL' and Type 'MyTypes.EnumType' in Column 'EnumCol' of Type 'Table1...
{ "language": "en", "url": "https://stackoverflow.com/questions/211875", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "27" }
Q: Is there a PHP function or variable giving the local host name? When a script runs under Apache, I insert $_SERVER['SERVER_NAME'] value into an error reporting e-mail message. However, if a Web script forks a "worker" job with nohup php ..., $_SERVER['SERVER_NAME'] appears to be empty there. Thus, if an error occurs...
{ "language": "en", "url": "https://stackoverflow.com/questions/211885", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Shared calendars on Thunderbird lightning I would like to setup an open source solution for calendaring in a medium sized enterprise. We would be using this from Thunderbird (lightning add-on), Microsoft Outlook. I want to see others' free/busy schedule, invite them to meetings etc. It would be really nice if I coul...
{ "language": "en", "url": "https://stackoverflow.com/questions/211888", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Storing Documents as Blobs in a Database - Any disadvantages? The requirements for my document management system were: * *Must be secure from theft by simple copying of directories, files etc. *Must be secure against traditional virus infection (infection of physical file) *Must be fast to retrieve *The reposi...
{ "language": "en", "url": "https://stackoverflow.com/questions/211895", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "55" }
Q: How to deal with an Undocumented API/Framework under .NET? For work I have to code with an external company's API to deal with their proprietary database solution. Unfortunately the documentation they provide is more of an example guide then proper API docs, so it is very light on nitty gritty details like error cod...
{ "language": "en", "url": "https://stackoverflow.com/questions/211920", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Dynamically Loading External Modules in a C Program? I'm sure this problem has been solved before and I'm curious how its done. I have code in which, when run, I want to scan the contents of a directory and load in functionality. Specifically, I am working with a scripting engine that I want to be able to add functi...
{ "language": "en", "url": "https://stackoverflow.com/questions/211934", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Logging a user out for a single web application page This is an extension of my earlier XSS question. Assuming that there isn't a Regex strong enough to guarantee XSS saftey for user entered URLs I'm looking at using a redirect. (Although if you do have one please add it under the other question) We have user input ...
{ "language": "en", "url": "https://stackoverflow.com/questions/211941", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Simple document repository Please recommend me a simple web-based document repository for keeping my small company documents (.DOCs, .PDFs) so i can access them from everywhere. There are many available on the internet, but they are heavy and filled with unnecessary features and requirements. I have little requireme...
{ "language": "en", "url": "https://stackoverflow.com/questions/211954", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: Iterating through list and creating summary lines on the fly EDIT: I missed a crucial point: .NET 2.0 Consider the case where I have a list of unsorted items, for the sake of simplicity of a type like this: class TestClass { DateTime SomeTime; decimal SomePrice; // constructor } I need to create a repo...
{ "language": "en", "url": "https://stackoverflow.com/questions/211958", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Problems with globalization when using Oracle collections with thin JDBC To summarise the issue: * *Retrieving strings in Java 1.5 (JDBC) works fine when the DB encoding is Western ISO 8859-2 *When switching to an Eastern European ISO (e.g. ISO 8859-5), all the normal JDBC string conversions work, except the one...
{ "language": "en", "url": "https://stackoverflow.com/questions/211959", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Scroll WPF Listview to specific line WPF, Browserlike app. I got one page containing a ListView. After calling a PageFunction I add a line to the ListView, and want to scroll the new line into view: ListViewItem item = ItemContainerGenerator.ContainerFromIndex(index) as ListViewItem; if (item != null) Scroll...
{ "language": "en", "url": "https://stackoverflow.com/questions/211971", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "23" }
Q: Dummy web service I received a WSDL file for a web service interface that our system should call somewhere in the future. Until then, I'd like to setup a dummy/mockup web service that does nothing else than to log the web service invocations and return dummy data. What I've done so far is to generate Java objects f...
{ "language": "en", "url": "https://stackoverflow.com/questions/211995", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: multiple definition error including c++ header file with inline code from multiple sources I have a c++ header file containing a class. I want to use this class in several projects, bu I don't want to create a separate library for it, so I'm putting both methods declarations and definitions in the header file: //...
{ "language": "en", "url": "https://stackoverflow.com/questions/212006", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "32" }
Q: Do I have to explicitly call System.exit() in a Webstart application? Recently I converted a Swing application to Webstart. The process was pretty straightforward, but I found that after I close all windows, my application's JVM did not terminate. The thread dump showed that there are a couple of non-daemon threads,...
{ "language": "en", "url": "https://stackoverflow.com/questions/212009", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Where are the Business Rules in MVC Now that everyone is talking about MVC, I notice that the business rules are not being addressed. In the old days of the 3-tier architecture, The business rules were in the middle layer. Where do they fall in the new MVC? A: A quote from a Wikipedia Article: MVC is often seen in ...
{ "language": "en", "url": "https://stackoverflow.com/questions/212027", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "26" }
Q: Caching delegate results I have a C# method which accepts a Predicate<Foo> and returns a list of matching items... public static List<Foo> FindAll( Predicate<Foo> filter ) { ... } The filter will often be one of a common set... public static class FooPredicates { public static readonly Predicate<Foo> IsElig...
{ "language": "en", "url": "https://stackoverflow.com/questions/212028", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How can I format text in GWT label widget I would like to break a long line of text assigned to the standard Label widget in GWT. I was experimenting with inline <br /> elements but with no success. Something like this: label = "My very very very long<br />long long text" A: I would use CSS to style the label to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/212031", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: What should students be taught first when first learning sorting algorithms? If you were a programming teacher and you had to choose one sorting algorithm to teach your students which one would it be? I am asking for only one because I just want to introduce the concept of sorting. Should it be the bubble sort or th...
{ "language": "en", "url": "https://stackoverflow.com/questions/212039", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: Displaying totals in the ListView LayoutTemplate I'm using the ListView control (ASP.NET 2008) to show a bunch of lines of data, and at the bottom I want some totals. I was initially going to define the header and footer in the LayoutTemplate and get the totals with some local function, i.e. <%#GetTheSum()%>, but it...
{ "language": "en", "url": "https://stackoverflow.com/questions/212048", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }