text
stringlengths
8
267k
meta
dict
Q: What is the recommended way to skin an entire application in WPF? I want my WPF application to be skinnable, by applying a certain XAML template, and the changes to be application wide, even for dynamic controls or controls that aren't even in the visual/logical tree. What can I use to accomplish this type of funct...
{ "language": "en", "url": "https://stackoverflow.com/questions/120914", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "24" }
Q: Create a database using T SQL on a specified location How to create a database using T SQL script on a specified location? Let's say, I want to create a SQL server database on D:\temp\dbFolder. How to do this? A: When you create the new database you specify the location. For example: USE [master] GO CREATE DAT...
{ "language": "en", "url": "https://stackoverflow.com/questions/120917", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: Why does Python pep-8 strongly recommend spaces over tabs for indentation? I see on Stack Overflow and PEP 8 that the recommendation is to use spaces only for indentation in Python programs. I can understand the need for consistent indentation and I have felt that pain. Is there an underlying reason for spaces to b...
{ "language": "en", "url": "https://stackoverflow.com/questions/120926", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "194" }
Q: SharePoint error: "Cannot import Web Part" I have a web part that I've developed, and if I manually install the web part it is fine. However when I have packaged the web part following the instructions on this web site as a guide: http://www.theartofsharepoint.com/2007/05/how-to-build-solution-pack-wsp.html I get th...
{ "language": "en", "url": "https://stackoverflow.com/questions/120928", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Can I add custom version strings to a .net DLL? I can add custom version strings to a C++ DLL in Visual Studio by editing the .rc file by hand. For example, if I add to the VersionInfo section of the .rc file VALUE "BuildDate", "2008/09/19 15:42:52" Then that date is visible in the file explorer, in the DLL's prop...
{ "language": "en", "url": "https://stackoverflow.com/questions/120936", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: What is Test-and-Set used for? After reading the Test-and-Set Wikipedia entry, I am still left with the question "What would a Test-and-Set be used for?" I realize that you can use it to implement Mutex (as described in wikipedia), but what other uses does it have? A: Imagine you were writing a banking application,...
{ "language": "en", "url": "https://stackoverflow.com/questions/120937", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: JDBC Database Connections in a Web App DAL I am building a small website for fun/learning using a fairly standard Web/Service/Data Access layered design. For the Data Access Layer, what is the best way to handle creating Connection objects to call my SQL stored procedures and why? Bearing in mind I am writing a lot ...
{ "language": "en", "url": "https://stackoverflow.com/questions/120941", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Running away from SharePoint Have any of you ever tried to run from sharepoint? I've worked with sharepoint enough to know that it is not something that interests me. My interests are more along the lines of APIs / backend / distributed development. Have any of you found ways, as consultants, to move away from share...
{ "language": "en", "url": "https://stackoverflow.com/questions/120949", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How can I normalize a URL in python I'd like to know do I normalize a URL in python. For example, If I have a url string like : "http://www.example.com/foo goo/bar.html" I need a library in python that will transform the extra space (or any other non normalized character) to a proper URL. A: Have a look at this mo...
{ "language": "en", "url": "https://stackoverflow.com/questions/120951", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "75" }
Q: Stored Procedure; Insert Slowness I have an SP that takes 10 seconds to run about 10 times (about a second every time it is ran). The platform is asp .net, and the server is SQL Server 2005. I have indexed the table (not on the PK also), and that is not the issue. Some caveats: * *usp_SaveKeyword is not the issue...
{ "language": "en", "url": "https://stackoverflow.com/questions/120952", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: C++ usage in embedded systems What features of C++ should be avoided in embedded systems? Please classify the answer by reason such as: * *memory usage *code size *speed *portability EDIT: Lets' use an ARM7TDMI with 64k ram as a target to control the scope of the answers. A: It's an interesting read for t...
{ "language": "en", "url": "https://stackoverflow.com/questions/120957", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "27" }
Q: Which search technology to use with ASP.NET? What's your preferred method of providing a search facility on a website? Currently I prefer to use Lucene.net over Indexing Service / SQL Server full-text search (as there's nothing to set up server-side), but what other ways are being used out there? A: We used both Lu...
{ "language": "en", "url": "https://stackoverflow.com/questions/120965", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Why does a T-SQL block give an error even if it shouldn't even be executed? I was writing a (seemingly) straight-forward SQL snippet that drops a column after it makes sure the column exists. The problem: if the column does NOT exist, the code inside the IF clause complains that it can't find the column! Well, doh, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/120966", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Is there a PHP security framework that protects phone numbers as well as passwords? I understand the mantra of "don't roll your own" when it comes to site security frameworks. For most cases anyway. I'm going to be collaborating on a site that integrates text-messaging into the system. I'd like to use an existing, w...
{ "language": "en", "url": "https://stackoverflow.com/questions/120977", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: ASP Nested Tags in a Custom User Control I'm just getting started with Custom User Controls in C# and I'm wondering if there are any examples out there of how to write one which accepts nested tags? For example, when you create an asp:repeater you can add a nested tag for itemtemplate. A: I followed Rob's blog post...
{ "language": "en", "url": "https://stackoverflow.com/questions/120997", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Stuck creating a "security trimmed" html.ActionLink extension method I'm trying to create an Extension Method for MVC's htmlHelper. The purpose is to enable or disable an ActionLink based on the AuthorizeAttribute set on the controller/action. Borrowing from the MVCSitemap code that Maarten Balliauw created, I wante...
{ "language": "en", "url": "https://stackoverflow.com/questions/121000", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Is it possible to develop for the iPhone without an iPhone? I know there are emulators, but is this good enough? If someone is serious about iPhone development, do they absolutely need an iPhone? A: Necessary: How the app handles in your hands is critical to something like the iPhone. you cannot tell how it will fe...
{ "language": "en", "url": "https://stackoverflow.com/questions/121018", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: How do I get the modified date/time of a file in Python? How do I get the modified date/time of a file in Python? A: os.path.getmtime(filepath) or os.stat(filepath).st_mtime A: Formated: import time print time.strftime("%m/%d/%Y %I:%M:%S %p",time.localtime(os.path.getmtime(fname)))
{ "language": "en", "url": "https://stackoverflow.com/questions/121025", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "23" }
Q: iPhone Full Screen Image How do I go about making an image or section of the page full screen on the iPhone? I have an image that is 480 x 320 and I want to pull that up full screen on the iPhone but it has to be within a webpage so that I can make the image a link back to the previous page. Currently if I drop the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/121051", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Conversion from 32 bit integer to 4 chars What is the best way to divide a 32 bit integer into four (unsigned) chars in C#. A: Quick'n'dirty: int value = 0x48454C4F; Console.WriteLine(Encoding.ASCII.GetString( BitConverter.GetBytes(value).Reverse().ToArray() )); Converting the int to bytes, reversing the byte-ar...
{ "language": "en", "url": "https://stackoverflow.com/questions/121059", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Why can't VS2008 place an exception helper popup onto a secondary monitor? I've recently acquired a second monitor and now run VS2008 SP1 maximized on my secondary (and bigger) monitor. This theoretically has the benefit of opening the application under development on the primary monitor, where -- as it seems to me ...
{ "language": "en", "url": "https://stackoverflow.com/questions/121063", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Event handling jQuery unclick() and unbind() events? I want to attach a click event to a button element and then later remove it, but I can't get unclick() or unbind() event(s) to work as expected. In the code below, the button is tan colour and the click event works. window.onload = init; function init() { $(...
{ "language": "en", "url": "https://stackoverflow.com/questions/121066", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Multi-select in the prompt is not working properly in Cognos 8.1 Changing a value prompt to a multi-select value prompt in Report studio, provide single select functionality. How can i get multi-select functionality? A: In addition to the above answer. If the prompt is embedded in the QuerySubject in your Framework...
{ "language": "en", "url": "https://stackoverflow.com/questions/121105", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Good Resource Loading System I'm currently looking for a resource management system for actionscript3. More specifically in this case, I'm looking for opinions on off-the-shelf resource loaders/managers from people who have used them, * *are they clean/simple to use? *are they designed to be extended? *I plan...
{ "language": "en", "url": "https://stackoverflow.com/questions/121110", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I keep Visual Studio from autoraising, when I activate "Focus Follows Mouse"? I'm running VS2008 and have used SystemParametersInfo to activate "Focus Follows Mouse" and "Do not Raise On Focus." Sadly though, VS2008 (with and without SP1) doesn't honour the "Do not Raise" part and eagerly pushes into the fore...
{ "language": "en", "url": "https://stackoverflow.com/questions/121111", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Slow treeview in C# I have a legacy application that is written in C# and it displays a very complex treeview with 10 to 20 thousand elements. In the past I encountered a similar problem (but in C++) that i solved with the OWNERDATA capability offered by the Win32 API. Is there a similar mechanism in C#? EDIT: The p...
{ "language": "en", "url": "https://stackoverflow.com/questions/121112", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: How to get the executable path from a Managed DLL I have a managed DLL (written in C++/CLI) that contains a class used by a C# executable. In the constructor of the class, I need to get access to the full path of the executable referencing the DLL. In the actual app I know I can use the Application object to do this...
{ "language": "en", "url": "https://stackoverflow.com/questions/121116", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Country, State, Province WebService? Are there any good webservices out there that provide good lookup information for Countries and States/Provinces? If so what ones do you use? A: A services that works well with .Net (because it leverages WSDL) is http://www.webservicex.net. They have a service for US ZIP codes a...
{ "language": "en", "url": "https://stackoverflow.com/questions/121117", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: Keyboards with the number pad in the middle? I'm suffering from early RSI symptoms and am looking for a way to avoid injury. My physiotherapist has determined that the worst thing I seem to be doing is using my mouse at such a weird angle. The problem for me is, I keep my keyboard positioned such that my left and ...
{ "language": "en", "url": "https://stackoverflow.com/questions/121119", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Securing a Web Service I have a Web Service (ASMX) with a few Web methods on our production Web server. On a separate internal Web server (which isn't publicly exposed) I have another Web site that will use the ASMX's public web methods. What are some of the best ways to secure the Web service such that only the i...
{ "language": "en", "url": "https://stackoverflow.com/questions/121123", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Determine if a directory is a bundle or package in the Mac OS X terminal? I'd like to be able to determine if a directory such as a '.app' is considered to be a package or bundle from Finder's point of view on the command line. I don't think this would be difficult to do with a small shell program, but I'd rather n...
{ "language": "en", "url": "https://stackoverflow.com/questions/121147", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: What does the explicit keyword mean? What does the explicit keyword mean in C++? A: Constructors append implicit conversion. To suppress this implicit conversion it is required to declare a constructor with a parameter explicit. In C++11 you can also specify an "operator type()" with such keyword http://en.cpprefer...
{ "language": "en", "url": "https://stackoverflow.com/questions/121162", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3552" }
Q: Hidden features of Greasemonkey What are some of the lesser-known but useful features and techniques that people are using in their Greasemonkey scripts? (Please, just one feature per answer.) Similar threads: * *Hidden Features of JavaScript *Hidden Features of Java *Hidden Features of C++ *Hidden Features of...
{ "language": "en", "url": "https://stackoverflow.com/questions/121167", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Configure trac for anonymous ticket submissions How would one configure trac to allow anonymous submission of tickets? A: In your trac config you need to give the anonymous user the TICKET_CREATE permission. A: Go to Admin > Permissions, then give "anonymous" the TICKET_CREATE and TICKET_MODIFY privileges (action...
{ "language": "en", "url": "https://stackoverflow.com/questions/121169", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Is There Still A Case For MFC What are the compelling features of MFC? Why would you select it for a new project? A: The advantage of MFC is that it's still nicer than coding to bare win32 and you can distribute a native .exe that doesn't require a 23-50Mb runtime like .Net. Now, if you're concerned about those thi...
{ "language": "en", "url": "https://stackoverflow.com/questions/121184", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: Surround with quotation marks How is it possible in Eclipse JDT to convert a multiline selection to String. Like the following From: xxxx yyyy zzz To: "xxxx " + "yyyy " + "zzz" I tried the following template "${line_selection}${cursor}"+ but that way I only get the whole block surrounded not each line separately...
{ "language": "en", "url": "https://stackoverflow.com/questions/121199", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "36" }
Q: Automatically folding #defines in vim I work with quite a bit of multi-platform C/C++ code, separated by common #defines (#if WIN, #if UNIX, etc). It would be nice if I could have vim automatically fold the sections I'm currently not interested in when I open a file. I've searched through the vim script archives, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/121202", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How to detect if JavaScript is disabled? There was a post this morning asking about how many people disable JavaScript. Then I began to wonder what techniques might be used to determine if the user has it disabled. Does anyone know of some short/simple ways to detect if JavaScript is disabled? My intention is to gi...
{ "language": "en", "url": "https://stackoverflow.com/questions/121203", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "700" }
Q: JMXQuery connection - authentication failed Hey all. Newbie question time. I'm trying to setup JMXQuery to connect to my MBean, so far this is what I got. java -classpath jmxquery org.nagios.JMXQuery -U service:jmx:rmi:///jndi/rmi://localhost:8004/jmxrmi -O java.lang:type=Memory -A "NonHeapMemoryUsage" Here's what I...
{ "language": "en", "url": "https://stackoverflow.com/questions/121205", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Is it legal to reverse engineer binary file formats Is it legal to add support for a 3rd party file format in my application by reverse engineer a unencrypted binary file format from another application, and reading the contents? A: Depends on the format in question, your location, etc. And this is not "cracking", ...
{ "language": "en", "url": "https://stackoverflow.com/questions/121208", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: Client-side detection of HTTP request method Is it possible to detect the HTTP request method (e.g. GET or POST) of a page from JavaScript? If so, how? A: If you need this functionality, have the server detect what method was used and then modify something in the DOM that you can then read out later. A: In a word...
{ "language": "en", "url": "https://stackoverflow.com/questions/121218", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "44" }
Q: Visual Studio ClickOnce deployment - certificate expiration I have a problem with a ClickOnce deployment of a Windows Forms application. When I built the new setup, and tried to export it overwriting as usual the previous setup, Visual Studio came up stating that my certificate is expired. This behaviour is describe...
{ "language": "en", "url": "https://stackoverflow.com/questions/121223", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How do you convert a string to a node in XQuery? I would like to convert a string into a node. I have a method that is defined to take a node, but the value I have is a string (it is hard coded). How do I turn that string into a node? So, given an XQuery method: define function foo($bar as node()*) as node() { (: ...
{ "language": "en", "url": "https://stackoverflow.com/questions/121237", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How to do unsigned saturating addition in C? What is the best (cleanest, most efficient) way to write saturating addition in C? The function or macro should add two unsigned inputs (need both 16- and 32-bit versions) and return all-bits-one (0xFFFF or 0xFFFFFFFF) if the sum overflows. Target is x86 and ARM using gcc...
{ "language": "en", "url": "https://stackoverflow.com/questions/121240", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "51" }
Q: Hidden Features of SQL Server What are some hidden features of SQL Server? For example, undocumented system stored procedures, tricks to do things which are very useful but not documented enough? Answers Thanks to everybody for all the great answers! Stored Procedures * *sp_msforeachtable: Runs a command with '?...
{ "language": "en", "url": "https://stackoverflow.com/questions/121243", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "215" }
Q: Using customBuildCallbacks.xml in an Eclipse RCP headless build I am trying to add some custom build steps to my headless build process for an Eclipse RCP application. I understand that the recommended way is to provide a customBuildCallbacks.xml file on the plug-in directory, and adding a link to it in the build.pr...
{ "language": "en", "url": "https://stackoverflow.com/questions/121244", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Best StAX Implementation My quick search reveals the reference implementation (http://stax.codehaus.org), the Woodstox implementation (http://woodstox.codehaus.org), and Sun's SJSXP implementation (https://sjsxp.dev.java.net/). Please comment on the relative merits of these, and fill me in on any other implementatio...
{ "language": "en", "url": "https://stackoverflow.com/questions/121251", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: "Pending checkins" window stuck; never finishes updating I'm having a strange problem in Visual Studio 2008 where my "Pending Checkins" window never updates. I open it up, and it says "Updating..." like usual, but I never see the "X remaining" message, and nothing happens. It just sits there doing nothing. Checked...
{ "language": "en", "url": "https://stackoverflow.com/questions/121253", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Testing a JAX-RS Web Service? I'm currently looking for ways to create automated tests for a JAX-RS (Java API for RESTful Web Services) based web service. I basically need a way to send it certain inputs and verify that I get the expected responses. I'd prefer to do this via JUnit, but I'm not sure how that can be ...
{ "language": "en", "url": "https://stackoverflow.com/questions/121266", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "86" }
Q: Is it possible to bind complex type properties to a datagrid? How would I go about binding the following object, Car, to a gridview? public class Car { long Id {get; set;} Manufacturer Maker {get; set;} } public class Manufacturer { long Id {get; set;} String Name {get; set;} } The primitive types get...
{ "language": "en", "url": "https://stackoverflow.com/questions/121274", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "21" }
Q: How do I detect what browser is used to access my site? How do I detect what browser (IE, Firefox, Opera) the user is accessing my site with? Examples in Javascript, PHP, ASP, Python, JSP, and any others you can think of would be helpful. Is there a language agnostic way to get this information? A: Comprehensive ...
{ "language": "en", "url": "https://stackoverflow.com/questions/121280", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Why do my keystrokes turn into crazy characters after I dump a bunch of binary data into my terminal? If I do something like: $ cat /bin/ls into my terminal, I understand why I see a bunch of binary data, representing the ls executable. But afterwards, when I get my prompt back, my own keystrokes look crazy. I type...
{ "language": "en", "url": "https://stackoverflow.com/questions/121282", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "21" }
Q: Separating Web Applications into multiple projects I have a web application that is becoming rather large. I want to separate it into smaller more logical projects, but the smaller projects are still going to need to access some of the classes in the app_code of the main project. What are some good methods to accomp...
{ "language": "en", "url": "https://stackoverflow.com/questions/121283", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Test accounts and products in a production system Is it worth designing a system to expect test accounts and products to be present and active in production, or should there be no contamination of production databases with test entities, even if your shipping crew knows not to ship any box addressed to "Test Custome...
{ "language": "en", "url": "https://stackoverflow.com/questions/121306", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Read in an XML String with Namespaces for Use in an XSL Transformation In an ASP.NET 2.0 website, I have a string representing some well-formed XML. I am currently creating an XmlDocument object with it and running an XSL transformation for display in a Web form. Everything was operating fine until the XML input s...
{ "language": "en", "url": "https://stackoverflow.com/questions/121309", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Unix Script reading a specific line and position I need to have a script read the files coming in and check information for verification. On the first line of the files to be read is a date but in numeric form. eg: 20080923 But before the date is other information, I need to read it from position 27. Meaning line ...
{ "language": "en", "url": "https://stackoverflow.com/questions/121318", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: A Java API to generate Java source files I'm looking for a framework to generate Java source files. Something like the following API: X clazz = Something.createClass("package name", "class name"); clazz.addSuperInterface("interface name"); clazz.addMethod("method name", returnType, argumentTypes, ...); File targetD...
{ "language": "en", "url": "https://stackoverflow.com/questions/121324", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "130" }
Q: What does the GDB backtrace message "0x0000000000000000 in ?? ()" mean? What does it mean when it gives a backtrace with the following output? #0 0x00000008009c991c in pthread_testcancel () from /lib/libpthread.so.2 #1 0x00000008009b8120 in sigaction () from /lib/libpthread.so.2 #2 0x00000008009c211a in pthread_m...
{ "language": "en", "url": "https://stackoverflow.com/questions/121326", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: Point ADO.Net DataSet to different databases at runtime? I have a large ADO.Net dataset and two database schemas (Oracle) with different constraints. The dataset will work with either schema, but I want to be able to tell the dataset which schema to use (via connection string) at runtime. Is that even possible? A:...
{ "language": "en", "url": "https://stackoverflow.com/questions/121350", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: WCF Routing Message Security I'm building some routing functionality between services. The original service and the service that does the routing have an identical configuration; both are using netTcpBinding with the following binding configuration: netTcpBinding security mode="Message" message clientCredentialTyp...
{ "language": "en", "url": "https://stackoverflow.com/questions/121354", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Built-in localization tools in VS2008 I am working on a WinForms application programmed in C# .NET 2.0 and VS2008. I am just about to start translating the app into several languages. Before I start, is it a good idea to use the VS2008 itself for all the localization? Or is it better to use some external tool right ...
{ "language": "en", "url": "https://stackoverflow.com/questions/121373", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Is there a way to comment out markup in an .ASPX page? Is there a way to comment out markup in an .ASPX page so that it isn't delivered to the client? I have tried the standard comments <!-- --> but this just gets delivered as a comment and doesn't prevent the control from rendering. A: While this works: <%-- <%@ ...
{ "language": "en", "url": "https://stackoverflow.com/questions/121382", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "223" }
Q: What are the key aspects of a strongly typed language? What makes a language strongly typed? I'm looking for the most important aspects of a strongly typed language. Yesterday I asked if PowerShell was strongly typed, but no one could agree on the definition of "strongly-typed", so I'm looking to clarify the definit...
{ "language": "en", "url": "https://stackoverflow.com/questions/121385", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: Fetch the rows which have the Max value for a column for each distinct value of another column Table: UserId, Value, Date. I want to get the UserId, Value for the max(Date) for each UserId. That is, the Value for each UserId that has the latest date. Is there a way to do this simply in SQL? (Preferably Oracle) Upd...
{ "language": "en", "url": "https://stackoverflow.com/questions/121387", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "654" }
Q: How to determine the line ending of a file I have a bunch (hundreds) of files that are supposed to have Unix line endings. I strongly suspect that some of them have Windows line endings, and I want to programmatically figure out which ones do. I know I can just run flip -u or something similar in a script to convert...
{ "language": "en", "url": "https://stackoverflow.com/questions/121392", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "53" }
Q: grails plugin for eclipse and netbeans 6.1 Has anyone been successful in getting the grails plugin for eclipse to work? How about grails plugin with netbeans? A: If you use the NetBeans 6.5 Beta you'll see the Grails functionality is promising, but still buggy(minor). The good thing is in 6.5 Groovy and Grails sup...
{ "language": "en", "url": "https://stackoverflow.com/questions/121393", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Accessing Object Memory Address When you call the object.__repr__() method in Python you get something like this back: <__main__.Test object at 0x2aba1c0cf890> Is there any way to get a hold of the memory address if you overload __repr__(), other then calling super(Class, obj).__repr__() and regexing it out? ...
{ "language": "en", "url": "https://stackoverflow.com/questions/121396", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "218" }
Q: Storing a calendar day in sqlite database I need to store items with a calendar date (just the day, no time) in a sqlite database. What's the best way to represent the date in the column? Julian days and unix seconds come to mind as reasonable alternatives. If I go with a unit other than days at what clock time s...
{ "language": "en", "url": "https://stackoverflow.com/questions/121408", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I include a stacktrace in my Django 500.html page? I'm running Django 1.0 and I'm close to deploying my app. As such, I'll be changing the DEBUG setting to False. With that being said, I'd still like to include the stacktrace on my 500.html page when errors occur. By doing so, users can copy-and-paste the e...
{ "language": "en", "url": "https://stackoverflow.com/questions/121439", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "26" }
Q: How to know Flash Player Version from Action Script 3.0 There is a way to know the flash player version installed on the computer that runs our SWF file with Action Script 3.0? A: If you are programming from within the IDE the following will get you the version trace(Capabilities.version); If you are building a c...
{ "language": "en", "url": "https://stackoverflow.com/questions/121453", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Access running mono application via command line What is the best way to access a running mono application via the command line (Linux/Unix)? Example: a mono server application is running and I want to send commands to it using the command line in the lightest/fastest way possible, causing the server to send back a...
{ "language": "en", "url": "https://stackoverflow.com/questions/121476", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Is there a good way of securing an ASP.Net web service call made via Javascript on the click event handler of an HTML button? The purpose of using a Javascript proxy for the Web Service using a service reference with Script Manager is to avoid a page load. If the information being retrieved is potentially sensitive,...
{ "language": "en", "url": "https://stackoverflow.com/questions/121490", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: 3DES with .cer public key? I'm no crypto expert, but as I understand it, 3DES is a symmetric encryption algorithm, which means it doesnt use public/private keys. Nevertheless, I have been tasked with encrypting data using a public key, (specifically, a .CER file). If you ignore the whole symmetric/asymmetric thang, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/121493", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: When a 'blur' event occurs, how can I find out which element focus went *to*? Suppose I attach an blur function to an HTML input box like this: <input id="myInput" onblur="function() { ... }"></input> Is there a way to get the ID of the element which caused the blur event to fire (the element which was clicked) ins...
{ "language": "en", "url": "https://stackoverflow.com/questions/121499", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "227" }
Q: Does SPSecurity.RunWithElevatedPrivileges do anything in a console app? From what I have gleaned from reflector, RunWithElevatedPriveleges simply reverts the current thread identity to the base (non-impersonated) identity. This makes perfect sense in the case of code running inside the WSS application pool, since t...
{ "language": "en", "url": "https://stackoverflow.com/questions/121504", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Reading XML with an "&" into C# XMLDocument Object I have inherited a poorly written web application that seems to have errors when it tries to read in an xml document stored in the database that has an "&" in it. For example there will be a tag with the contents: "Prepaid & Charge". Is there some secret simple th...
{ "language": "en", "url": "https://stackoverflow.com/questions/121511", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: How can I integrate a bitbucket repository with the hosted on-demand version of FogBugz? I use the on-demand (hosted) version of FogBugz. I would like to start using Mercurial for source control. I would like to integrate FogBugz and a BitBucket repository. I gave it a bit of a try but things weren't going very we...
{ "language": "en", "url": "https://stackoverflow.com/questions/121521", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: PHP: Use Pecl/Pear, or build my own systems? When building some of my PHP apps, a lot of the functionality could be coded using PEAR/PECL modules, however, the fact that some people using it may not have the access to install things, It poses a puzzler for me. Should I forsake some users to use PEAR/PECL for functio...
{ "language": "en", "url": "https://stackoverflow.com/questions/121525", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Rails Caching Log Level With the new caching options in Rails 2.1 i get nice entires in my log along the lines of Cached fragment hit: views/homepage (0.16549) However they are logged at the :debug level, which is the same level as the SQL output. I want to be able to disable the SQL output, and still see the cache ...
{ "language": "en", "url": "https://stackoverflow.com/questions/121546", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Strange unhandled exception from asp.net application - Validation of viewstate MAC failed I don't know if anyone has seen this issue before but I'm just stumped. Here's the unhandled exception message that my error page is capturing. Error Message: Validation of viewstate MAC failed. If this application is ho...
{ "language": "en", "url": "https://stackoverflow.com/questions/121579", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Simplest way to create a date that is the first day of the month, given another date In SQL Server what is the simplest/cleanest way to make a datetime representing the first of the month based on another datetime? eg I have a variable or column with 3-Mar-2005 14:23 and I want to get 1-Mar-2005 00:00 (as a datetime...
{ "language": "en", "url": "https://stackoverflow.com/questions/121581", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Best way of detecting if Windows has Windows Updates ready to download/install? I'm specifically interested in Windows 2000/XP, but Vista/7 would be interesting too (if different). I was thinking along the lines of task scheduling a batch file or equivalent on a daily basis. EDIT: Sorry, I should have provided more ...
{ "language": "en", "url": "https://stackoverflow.com/questions/121585", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: CouchDB backups and cloning the database We're looking at CouchdDB for a CMS-ish application. What are some common patterns, best practices and workflow advice surrounding backing up our production database? I'm particularly interested in the process of cloning the database for use in development and testing. Is it ...
{ "language": "en", "url": "https://stackoverflow.com/questions/121599", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "38" }
Q: How to reduce javax.faces.ViewState in JSF What is the best way to reduce the size of the viewstate hidden field in JSF? I have noticed that my view state is approximately 40k this goes down to the client and back to the server on every request and response espically coming to the server this is a significant slowdo...
{ "language": "en", "url": "https://stackoverflow.com/questions/121605", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: Databinding with Silverlight If I want to bind a collection to a some form of listing control in Silverlight. Is the only way to do it so make the underlying objects in the collection implement INotifyPropertyChanged and for the collection to be an Observablecollection? If I was using some sort of third party object...
{ "language": "en", "url": "https://stackoverflow.com/questions/121606", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How to tint a UIButton? I'm in the process of adding custom buttons to my iPhone UI and want to make them have the glassy look from Apple's apps. I have a good default glass image, but I'd hate to have to have a separate image for each tint I want (red, green, blue, etc.). Is there a way to load a grayscale PNG and...
{ "language": "en", "url": "https://stackoverflow.com/questions/121615", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Inner join vs Where Is there a difference in performance (in oracle) between Select * from Table1 T1 Inner Join Table2 T2 On T1.ID = T2.ID And Select * from Table1 T1, Table2 T2 Where T1.ID = T2.ID ? A: If the query optimizer is doing its job right, there should be no difference between those queries. They are...
{ "language": "en", "url": "https://stackoverflow.com/questions/121631", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "293" }
Q: MVC frameworks on hosted servers This may seem like a daft question, but i was wondering about how to use MVC frameworks on hosted servers. I am playing about (albeit slowly) at home with the RoR on Ubuntu and understand that if i want to do a live site then i need hosting with Rails and Ruby. However, what happens ...
{ "language": "en", "url": "https://stackoverflow.com/questions/121638", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Regular expression to remove XML tags and their content I have the following string and I would like to remove <bpt *>*</bpt> and <ept *>*</ept> (notice the additional tag content inside them that also needs to be removed) without using a XML parser (overhead too large for tiny strings). The big <bpt i="1" x="1" ty...
{ "language": "en", "url": "https://stackoverflow.com/questions/121656", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Implementing User-Controlled Style Changes in ASP.NET Ok, so we have clients and those clients get to customize their web facing page. One option we are giving them is to be able to change the color of a graphic (it's like a framish-looking bar) using one of those hex wheels or whatever. So, I've thought about it, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/121662", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to pipe stdout from a groovy method into a string How does one invoke a groovy method that prints to stdout, appending the output to a string? A: This demonstrates how you can do this. Paste this into a Groovy script file and run it. You will see the first call functions as normal. The second call produces n...
{ "language": "en", "url": "https://stackoverflow.com/questions/121665", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Multi-Core and Concurrency - Languages, Libraries and Development Techniques The CPU architecture landscape has changed, multiple cores is a trend that will change how we have to develop software. I've done multi-threaded development in C, C++ and Java, I've done multi-process development using various IPC mechanism...
{ "language": "en", "url": "https://stackoverflow.com/questions/121674", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "35" }
Q: Starting a process in C# with username & password throws "Access is Denied" exception Inside a .NET 3.5 web app running impersonation I am trying to execute a process via: var process = new Process { StartInfo = { CreateNoWindow = true, FileName = "someFileNa...
{ "language": "en", "url": "https://stackoverflow.com/questions/121676", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: What's the difference between 'int?' and 'int' in C#? I am 90% sure I saw this answer on stackoverflow before, in fact I had never seen the "int?" syntax before seeing it here, but no matter how I search I can't find the previous post, and it's driving me crazy. It's possible that I've been eating the funny mushroom...
{ "language": "en", "url": "https://stackoverflow.com/questions/121680", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "95" }
Q: How can I ensure fopen() won't block when not connected to the network? My win32 C++ application frequently checks a file that normally resides on a network share [in our corporate network]. But if the computer isn't connected to a network, the application freezes for several minutes and the user usually has to end ...
{ "language": "en", "url": "https://stackoverflow.com/questions/121685", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What Exception should be thrown when an ADO.NET query cannot retrieve the requested data? In an attempt to add some parameter validation and correct usage semantics to our application, we are trying to add correct exception handling to our .NET applications. My question is this: When throwing exceptions in ADO.NET i...
{ "language": "en", "url": "https://stackoverflow.com/questions/121700", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to use javascript with an asp.net dropdownlist control? I don't currently use ajax.net though I would be open to it if it is the only solution. I have a auto-complete control on screen that I am using to populate a asp.net dropdownlist with values through javascript (jQuery). I have had to use EnableEventValidat...
{ "language": "en", "url": "https://stackoverflow.com/questions/121707", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Preserve file creation date in Subversion My boss asked me to setup a Subversion server for him to use so that he can share all his documents across different machines in sync and still be able to access them when there is no Internet connection. I have this up for him, but now he's requesting that the 'create date'...
{ "language": "en", "url": "https://stackoverflow.com/questions/121713", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Dynamically added JTable not displaying Java Newbie here. I have a JFrame that I added to my netbeans project, and I've added the following method to it, which creates a JTable. Problem is, for some reason when I call this method, the JTable isn't displayed. Any suggestions? public void showFromVectors(Vector colNam...
{ "language": "en", "url": "https://stackoverflow.com/questions/121715", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Getting value from a cell from a gridview on RowDataBound event string percentage = e.Row.Cells[7].Text; I am trying to do some dynamic stuff with my GridView, so I have wired up some code to the RowDataBound event. I am trying to get the value from a particular cell, which is a TemplateField. But the code above al...
{ "language": "en", "url": "https://stackoverflow.com/questions/121722", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "33" }