text
stringlengths
8
267k
meta
dict
Q: Change value of attribute on an XML object in AS3 Is there a easy way to do this? Or do I have to parse the file and do some search/replacing on my own? The ideal would be something like: var myXML: XML = ???; // ... load xml data into the XML object myXML.someAttribute = newValue; A: Problem is with some attrib...
{ "language": "en", "url": "https://stackoverflow.com/questions/91305", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Attaching additional javadoc in Intellij IDEA When I use quick documentaion lookup (Ctrl+Q) on j2ee classes or annotations in IDEA I only get an empty javadoc. It only contains the basics like class name. How do I add the javadoc to the libs IDEA provides itself? A: You can attach javadoc to any library you have co...
{ "language": "en", "url": "https://stackoverflow.com/questions/91307", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "68" }
Q: How to extend default timeout period in flash application? I have an application written in flash (actually it is written in Haxe and run under SHWX but it doesn't matter here). I have a pretty complex task that consumes a lot of CPU power and sometimes executes for more that 15 seconds. If that happens, I've got an...
{ "language": "en", "url": "https://stackoverflow.com/questions/91318", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Can Visual Studio 2008 work with Team System 2005? I would like to upgrade my team from VS2005 to VS2008 without touching the version of Team Server which is 2005. Is that possible? And if so, how do I tell VS to recognize TFS? Currently in my VS2008 options menu, I don't have any source control to choose from. A...
{ "language": "en", "url": "https://stackoverflow.com/questions/91344", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Multiple forms on ASP.NET page Coming from a Classic ASP background, I'm used to multiple forms on a page, but this clearly limited in a ASP.NET page. However, I have a situation where I have a form that gathers input from the user, saves the data to a DB, and afterwards I want to render (and tweak the values of) a ...
{ "language": "en", "url": "https://stackoverflow.com/questions/91350", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: XMP Library for Ruby Can anyone recommend an open source Ruby library for adding XMP metadata to JPEG images? A: MiniExiftool, which is just a wrapper around the Exiftool command-line app, is the only open-source one I know of. There's a commercial library called Chilkat, but I do not have experience with it, being...
{ "language": "en", "url": "https://stackoverflow.com/questions/91352", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: GnuPG: "decryption failed: secret key not available" error from gpg on Windows Environment: HP laptop with Windows XP SP2 I had created some encrypted files using GnuPG (gpg) for Windows. Yesterday, my hard disk failed so I had reimage the hard disk. I have now reinstalled gpg and regenerated my keys using the sam...
{ "language": "en", "url": "https://stackoverflow.com/questions/91355", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "27" }
Q: What is the value of href attribute in openid.server link tag if Techorati OpenID is hosted at my site? I want to log in to Stack Overflow with Techorati OpenID hosted at my site. https://stackoverflow.com/users/login has some basic information. I understood that I should change <link rel="openid.delegate" href="htt...
{ "language": "en", "url": "https://stackoverflow.com/questions/91357", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to calculate the sum of values in a tree using SQL I need to sum points on each level earned by a tree of users. Level 1 is the sum of users' points of the users 1 level below the user. Level 2 is the Level 1 points of the users 2 levels below the user, etc... The calculation happens once a month on a non produc...
{ "language": "en", "url": "https://stackoverflow.com/questions/91360", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How to escape braces (curly brackets) in a format string in .NET How can brackets be escaped in using string.Format? For example: String val = "1,2,3" String.Format(" foo {{0}}", val); This example doesn't throw an exception, but it outputs the string foo {0}. Is there a way to escape the brackets? A: Almost there...
{ "language": "en", "url": "https://stackoverflow.com/questions/91362", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1150" }
Q: Mercury Quick Test Pro and Virtual machines: Works from one client machine but not another I have a virtual machine (VMware) with Mercury Quick Test Professional 9.2 installed. I have a script to test an application, written in VB.NET using the Infragistics library. If I access this virtual machine using my laptop (...
{ "language": "en", "url": "https://stackoverflow.com/questions/91364", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How to trace JavaScript events like onclick onblur? Is there a way to debug or trace every JavaScript event in Internet Explorer 7? I have a bug that prevents scrolling after text-selecting, and I have no idea which event or action creates the bug. I really want to see which events are being triggered when I move th...
{ "language": "en", "url": "https://stackoverflow.com/questions/91367", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Checking from shell script if a directory contains files From a shell script, how do I check if a directory contains files? Something similar to this if [ -e /some/dir/* ]; then echo "huzzah"; fi; but which works if the directory contains one or several files (the above one only works with exactly 0 or 1 files). A...
{ "language": "en", "url": "https://stackoverflow.com/questions/91368", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "146" }
Q: Unit testing for C++ code - Tools and methodology I'm working on a large c++ system that is has been in development for a few years now. As part of an effort to improve the quality of the existing code we engaged on a large long-term refactoring project. Do you know a good tool that can help me write unit tests in C...
{ "language": "en", "url": "https://stackoverflow.com/questions/91384", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "139" }
Q: Best way to debug an ODBC driver on Windows What is the best way to debug a custom ODBC driver on Windows? A former member of our team wrote the driver so we have the source available. How do you attach a debugger to the driver? Or is it easier to just add "trace prints" to the driver to see what is going on? A: Th...
{ "language": "en", "url": "https://stackoverflow.com/questions/91398", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to represent date and/or time information in JSON? JSON text (RFC 4627) has unambigious representation of objects, arrays, strings, numbers, Boolean values (literally true or false) and null. However, it has nothing defined for representing time information like date and time of day, which is very common in appl...
{ "language": "en", "url": "https://stackoverflow.com/questions/91413", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: Export variable from C++ static library I have a static library written in C++ and I have a structure describing data format, i.e. struct Format{ long fmtId; long dataChunkSize; long headerSize; Format(long, long, long); bool operator==(Format const & other) const; }; Some of data formats are ...
{ "language": "en", "url": "https://stackoverflow.com/questions/91420", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: javascript message box I want to display an error message on my asp.net application. This message is a warning message, this is the way I did it: CmdCalcInvoke.Attributes["onclick"] = "return confirm('Are you sure you want to calculate the certification? WARNING: If the quarter has not finished, all the partners sta...
{ "language": "en", "url": "https://stackoverflow.com/questions/91434", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Amazon S3 standalone stub server I seem to recall reading about an Amazon S3-compatible test server that you could run on your own server for unit tests or whatever. However, I've just exhausted my patience looking for this with both Google and AWS. Does such a thing exist? If not, I think I'll write one. Note: I'm ...
{ "language": "en", "url": "https://stackoverflow.com/questions/91443", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: Examples of Hierarchical-Model-View-Controller (HMVC)? I'm interested in the Presentation-Abstraction-Control? (aka Hierarchical-Model-View-Controller (HMVC)) Architectural Pattern for constructing complex user interfaces (GUI or web) and was wondering if anyone was aware of any examples in the wild where I could re...
{ "language": "en", "url": "https://stackoverflow.com/questions/91478", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: How to change default order of Group By clause in mysql By default data extracted by the GROUP BY clause is ordered as ascending. How to change it to descending. A: Add DESC to the GROUP BY clause, e.g. : GROUP BY myDate DESC A: As the MySQL documentation says, SELECT * FROM foo GROUP BY bar is equivalent to SE...
{ "language": "en", "url": "https://stackoverflow.com/questions/91479", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: source for eclipse plugin.xml page I would like to know where can I find the code which eclipse uses to display the forms in the plugin.xml file. In particular I am looking for the form layout used in the extension tab in the plugin.xml A: Unfortunately, Eclipse's plugin search doesn't work for referenced plugins. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/91480", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do you get an embedded Jetty webserver to dump its interim Java code for JSPs I keep running into this problem when debugging JSP pages in OpenNMS. The Jetty wiki talks about keepGenerated (http://docs.codehaus.org/display/JETTY/KeepGenerated) in webdefault.xml but it seems unclear how this works in embedded set...
{ "language": "en", "url": "https://stackoverflow.com/questions/91487", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How to wrap an existing memory buffer as a DC for GDI I have a memory buffer corresponding to my screen resolution (1280x800 at 24-bits-per-pixel) that contains my screen contents at 24bpp. I want to convert this to 8-bpp (ie. Halftone color palette in Windows). I currently do this: 1. Use CreateDIBSection to alloca...
{ "language": "en", "url": "https://stackoverflow.com/questions/91511", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: jQuery attribute selectors: How to query for an attribute with a custom namespace Suppose I have a simple XHTML document that uses a custom namespace for attributes: <html xmlns="..." xmlns:custom="http://www.example.com/ns"> ... <div class="foo" custom:attr="bla"/> ... </html> How do I match each eleme...
{ "language": "en", "url": "https://stackoverflow.com/questions/91518", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "34" }
Q: How can drawString method be used for writing diagonal way I am using c# 2005 i want to write string diagonally on image. But by default c# provides the option to write horizontally or vertically. how we write diagonally? Thanks A: You can use the RotateTransform and TranslateTransform that are available on the Gra...
{ "language": "en", "url": "https://stackoverflow.com/questions/91521", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Streaming audio with Flash / Actionscript 3 - Slow playback problem I've written a simple Flash player for a Shoutcast stream. At first it seemed to work reliably, however about 5% of the time users experience slow playback where the stream plays at roughly half of normal speed. All files being streamed are MP3, enc...
{ "language": "en", "url": "https://stackoverflow.com/questions/91525", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Switch over PropertyType How can I make this work? switch(property.PropertyType){ case typeof(Boolean): //doStuff break; case typeof(String): //doOtherStuff break; default: break; } I don't want to use the name since string comparing for types is just awfull and can be ...
{ "language": "en", "url": "https://stackoverflow.com/questions/91563", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "38" }
Q: crti.o file missing I'm building a project using a GNU tool chain and everything works fine until I get to linking it, where the linker complains that it is missing/can't find crti.o. This is not one of my object files, it seems to be related to libc but I can't understand why it would need this crti.o, wouldn't it ...
{ "language": "en", "url": "https://stackoverflow.com/questions/91576", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "29" }
Q: What do you need from a test harness? I'm one of the people involved in the Test Anything Protocol (TAP) IETF group (if interested, feel free to join the mailing list). Many programming languages are starting to adopt TAP as their primary testing protocol and they want more from it than what we currently offer. As...
{ "language": "en", "url": "https://stackoverflow.com/questions/91585", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: Easiest cross platform widget toolkit? What is the easiest cross platform widget toolkit? I'm looking for one that minimally covers Windows, OSX, and Linux with a C or C++ interface. A: I really like Qt. Have been working with it in several projects now. Although the project, I am currently working on, will be rele...
{ "language": "en", "url": "https://stackoverflow.com/questions/91616", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Generating classes automatically from unit tests? I am looking for a tool that can take a unit test, like IPerson p = new Person(); p.Name = "Sklivvz"; Assert.AreEqual("Sklivvz", p.Name); and generate, automatically, the corresponding stub class and interface interface IPerson // inferred from IPerson p = ...
{ "language": "en", "url": "https://stackoverflow.com/questions/91617", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: Is there any point for interfaces in dynamic languages? In static languages like Java you need interfaces because otherwise the type system just won't let you do certain things. But in dynamic languages like PHP and Python you just take advantage of duck-typing. PHP supports interfaces. Ruby and Python don't have th...
{ "language": "en", "url": "https://stackoverflow.com/questions/91618", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "26" }
Q: JBoss 4.23 and EJB 2 support Does anyone know if the JBoss 4.2.3 release that is compiled for Java 6 still supports EJB 2? I'm having issues where it can't cast a class to a certain interface where I never had this problem before and the code hasn't changed. A: EJB2-style beans should still work in the 4.2 release...
{ "language": "en", "url": "https://stackoverflow.com/questions/91627", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: MS SQL Server 2005 - How to Auto Increment a field (not primary key) I would like to automatically increment a field named `incrementID' anytime any field in any row within the table named 'tb_users' is updated. Currently I am doing it via the sql update statement. i.e "UPDATE tb_users SET name = @name, incrementID ...
{ "language": "en", "url": "https://stackoverflow.com/questions/91628", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: JavaScript RegEx Elements Match I'm trying to match elements with a name that is 'container1$container2$chkChecked', using a regex of '.+\$chkChecked', but I'm not getting the matches I expect when the element name is as described. What am I doing wrong? A: try string.match( /[$]chkChecked$/ ) alternatively, you...
{ "language": "en", "url": "https://stackoverflow.com/questions/91629", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: PostSharp - il weaving - thoughts I am considering using Postsharp framework to ease the burden of application method logging. It basically allows me to adorn methods with logging attribute and at compile time injects the logging code needed into the il. I like this solution as it keeps the noise out of the deign ti...
{ "language": "en", "url": "https://stackoverflow.com/questions/91635", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: NI CVI with Python I'd like to integrate a Python IDLE-esque command prompt interface into an existing NI-CVI (LabWindows) application. I've tried to follow the Python.org discussions but seem to get lost in the details. Is there a resource out there for dummies like me? A: Here is a python sample code calling a ...
{ "language": "en", "url": "https://stackoverflow.com/questions/91666", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What is the best way to add users to multiple groups in a database? In an application where users can belong to multiple groups, I'm currently storing their groups in a column called groups as a binary. Every four bytes is a 32 bit integer which is the GroupID. However, this means that to enumerate all the users in ...
{ "language": "en", "url": "https://stackoverflow.com/questions/91672", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How can I specify the local address on a java.net.URLConnection? My Tomcat instance is listening to multiple IP addresses, but I want to control which source IP address is used when opening a URLConnection. How can I specify this? A: This should do the trick: URL url = new URL(yourUrlHere); Proxy proxy = new Proxy...
{ "language": "en", "url": "https://stackoverflow.com/questions/91678", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: How do you implement unit-testing in large scale C++ projects? I believe strongly in using unit-tests as part of building large multi-platform applications. We currently are planning on having our unit-tests within a separate project. This has the benefit of keeping our code base clean. I think, however, that this w...
{ "language": "en", "url": "https://stackoverflow.com/questions/91683", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "43" }
Q: What are the differences between a clustered and a non-clustered index? What are the differences between a clustered and a non-clustered index? A: Clustered indexes physically order the data on the disk. This means no extra data is needed for the index, but there can be only one clustered index (obviously). Accessi...
{ "language": "en", "url": "https://stackoverflow.com/questions/91688", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "305" }
Q: JSTL/JSP EL (Expression Language) in a non JSP (standalone) context Can anyone recommend a framework for templating/formatting messages in a standalone application along the lines of the JSP EL (Expression Language)? I would expect to be able to instantiate a an object of some sort, give it a template along the line...
{ "language": "en", "url": "https://stackoverflow.com/questions/91692", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: PHP equivalent of Perl's 'use strict' (to require variables to be initialzied before use) Python's convention is that variables are created by first assignment, and trying to read their value before one has been assigned raises an exception. PHP by contrast implicitly creates a variable when it is read, with a null ...
{ "language": "en", "url": "https://stackoverflow.com/questions/91699", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: End-to-End application testing from a users standpoint I am looking for a good way to consistently test my web applications from the end users point of view. I have all kinds of ways to check to make sure my code is working behind the scenes. I can't count the number of times that I make a change to a piece of code,...
{ "language": "en", "url": "https://stackoverflow.com/questions/91703", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: When people talk about scaling a website with 'shards', what do they mean? I have heard the 'shard' technique mentioned several times with regard to solving scaling problems for large websites. What is this 'shard' technique and why is it so good? A: Karl Seguin has a good blog post about sharding. From the post: ...
{ "language": "en", "url": "https://stackoverflow.com/questions/91710", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: C++ strings without and STL I've not used C++ very much in the past, and have recently been doing a lot of C#, and I'm really struggling to get back into the basics of C++ again. This is particularly tricky as work mandates that none of the most handy C++ constructs can be used, so all strings must be char *'s, and...
{ "language": "en", "url": "https://stackoverflow.com/questions/91715", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Cross browser issue (iframe sizing) I am displaying pages from an external site (that I own) in an iframe in one of my pages. It's all fine except when viewed in Opera with the browser window size reduced (not widescreen), when the iframe shrinks and squashes the content. It works in widescreen (maximize browser win...
{ "language": "en", "url": "https://stackoverflow.com/questions/91721", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: JIRA - Updating summary from post function How do you update a summary field's value from post function in JIRA? A: There is an inbuilt post function that allows you to change the summary - though only to a hard coded value. If you wanted to modify the current summary, you will need to create a post function as men...
{ "language": "en", "url": "https://stackoverflow.com/questions/91731", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to transform a date-string in classic asp I'm a little blockheaded right now… I have a date string in european format dd.mm.yyyy and need to transform it to mm.dd.yyyy with classic ASP. Any quick ideas? A: If its always in that format you could use split d = split(".","dd.mm.yyyy") s = d(1) & "." & d(0) & "." &...
{ "language": "en", "url": "https://stackoverflow.com/questions/91734", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: DataGridViewComboBoxColumn adding different items to each row . I am building a table using the DataGridView where a user can select items from a dropdown in each cell. To simplify the problem, lets say i have 1 column. I am using the DataGridViewComboBoxColumn in the designer. I am trying to support having eac...
{ "language": "en", "url": "https://stackoverflow.com/questions/91745", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: Background color of a ListBox item (Windows Forms) How can I set the background color of a specific item in a System.Windows.Forms.ListBox? I would like to be able to set multiple ones if possible. A: Thanks for the answer by Grad van Horck. It guided me in the correct direction. To support text (not just backgrou...
{ "language": "en", "url": "https://stackoverflow.com/questions/91747", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "53" }
Q: How do I sort an ASP.NET DataGrid by the length of a field? I have a DataGrid where each column has a SortExpression. I would like the sort expression to be the equivalent of "ORDER BY LEN(myField)". I have tried SortExpression="LEN(myField)" but this throws an exception as it is not valid syntax. Any ideas? A: ...
{ "language": "en", "url": "https://stackoverflow.com/questions/91766", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to remove all event handlers from an event To create a new event handler on a control you can do this c.Click += new EventHandler(mainFormButton_Click); or this c.Click += mainFormButton_Click; and to remove an event handler you can do this c.Click -= mainFormButton_Click; But how do you remove all event hand...
{ "language": "en", "url": "https://stackoverflow.com/questions/91778", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "426" }
Q: How can I delete duplicate rows in a table I have a table with say 3 columns. There's no primary key so there can be duplicate rows. I need to just keep one and delete the others. Any idea how to do this is Sql Server? A: Add an identity column to act as a surrogate primary key, and use this to identify two of the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/91784", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: Grep and Sed Equivalent for XML Command Line Processing When doing shell scripting, typically data will be in files of single line records like csv. It's really simple to handle this data with grep and sed. But I have to deal with XML often, so I'd really like a way to script access to that XML data via the command ...
{ "language": "en", "url": "https://stackoverflow.com/questions/91791", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "149" }
Q: Order SharePoint search results by more columns I'm using a FullTextSqlQuery in SharePoint 2007 (MOSS) and need to order the results by two columns: SELECT WorkId FROM SCOPE() ORDER BY Author ASC, Rank DESC However it seems that only the first column from ORDER BY is taken into account when returning results. In th...
{ "language": "en", "url": "https://stackoverflow.com/questions/91800", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What database privileges does a Wordpress Blog really need? I am setting up a few Wordpress blog sites. I have created a user in mysql that wordpress will use to access its database. The docs say to give this user all privileges on the database. Does it really need full privileges? I expect not, so does anyone know ...
{ "language": "en", "url": "https://stackoverflow.com/questions/91805", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Is there a pretty printer for python data? Working with python interactively, it's sometimes necessary to display a result which is some arbitrarily complex data structure (like lists with embedded lists, etc.) The default way to display them is just one massive linear dump which just wraps over and over and you hav...
{ "language": "en", "url": "https://stackoverflow.com/questions/91810", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "21" }
Q: What's the use/meaning of the @ character in variable names in C#? I discovered that you can start your variable name with a '@' character in C#. In my C# project I was using a web service (I added a web reference to my project) that was written in Java. One of the interface objects defined in the WSDL had a member...
{ "language": "en", "url": "https://stackoverflow.com/questions/91817", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "332" }
Q: Google App Engine: how can I programmatically access the properties of my Model class? I have a model class: class Person(db.Model): first_name = db.StringProperty(required=True) last_name = db.StringProperty(required=True) I have an instance of this class in p, and string s contains the value 'first_name'. I w...
{ "language": "en", "url": "https://stackoverflow.com/questions/91821", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: FitNesse for Delphi 2006 / Delphi 2007 /Delphi 2009 Is there a version of FitNesse that works on Delphi 2006/2007/2009? If so where can I find It? Are there any other programs like FitNesse that work on Delphi 2006? A: Fitnesse has support for Delphi. See the FitServers page at fitnesse.org. A: EDIT: The Delphi f...
{ "language": "en", "url": "https://stackoverflow.com/questions/91826", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Detecting Web.Config Authentication Mode Say I have the following web.config: <?xml version="1.0" encoding="utf-8"?> <configuration> <system.web> <authentication mode="Windows"></authentication> </system.web> </configuration> Using ASP.NET C#, how can I detect the Mode value of the Authentication ta...
{ "language": "en", "url": "https://stackoverflow.com/questions/91831", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: D-Editor with debugging i've been programming a while in D (http://www.digitalmars.com/d/) now. I prefer it to Java because it is faster. However, i have not found an Editor that supports Code-Completion and Debugging (Step-Over, Step-Into, Breakpoints,...). Do you have any suggestions? P.S: gdb did not work. A: De...
{ "language": "en", "url": "https://stackoverflow.com/questions/91834", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Multi tenant architecture and NHibernate Could anyone explain me finally what is the best strategy to implement transparent and fluent support of multi-tenant functionality in NHibernate powered domain model? Im looking for the way, how to keep the domain logic as isolated as possible from the multi-tenant stuff li...
{ "language": "en", "url": "https://stackoverflow.com/questions/91840", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to get all datatype sizes and function stack footprint sizes in a C/C++ project? I have a large inherited C/C++ project. Are there any good tools or techniques to produce a report on the "sizeof" of all the datatypes, and a breakdown of the stack footprints of each function in such a project. A: I'm curious to...
{ "language": "en", "url": "https://stackoverflow.com/questions/91849", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Software Design Description Practise How many people actually write an SDD document before writing a single line of code? How do you handle large CSCI's? What standard do you use for SDD content? What tailoring have you done? A: I certainly have. Historically and on recent projects. Years ago I worked in organisat...
{ "language": "en", "url": "https://stackoverflow.com/questions/91851", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Are indexes on temporary tables deleted when the table is deleted? Would the following SQL remove also the index - or does it have to be removed separately? CREATE TABLE #Tbl (field int) CREATE NONCLUSTERED INDEX idx ON #Tbl (field) DROP TABLE #Tbl A: It will be removed automatically, as there is nothing left to...
{ "language": "en", "url": "https://stackoverflow.com/questions/91856", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "21" }
Q: Renaming/Mapping Cygwin Folders Can I safely rename the cygdrive folder? Also, I would like to add other folders at root and map them to folders on windows in the same way as /cygdrive/c maps to my C drive. Is that possible? A: Yes, you can. See The Cygwin Mount Table in Cygwin's documentation. I have my document...
{ "language": "en", "url": "https://stackoverflow.com/questions/91857", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Reading quicken data files Looking for an open source library, for C++, Java, C# or Python, for reading the data from Quicken .qdf files. @Swati: Quicken .qif format is for transfer only and is not kept up to date by the application like the .qdf file is. A: QDF is proprietary and not really meant for reading oth...
{ "language": "en", "url": "https://stackoverflow.com/questions/91890", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Use grep to find content in files and move them if they match I'm using grep to generate a list of files I need to move: grep -L -r 'Subject: \[SPAM\]' . How can I pass this list to the mv command and move the files somewhere else? A: If you want to find and move files that do not match your pattern (move files th...
{ "language": "en", "url": "https://stackoverflow.com/questions/91899", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "64" }
Q: Adding urgent priority to mail set from mailto link I want to add a mailto link on our web page. I want to add a urgent priority to this mail. A: mailto links just doesn't support this feature , sorry. however, you could use a specific subject and filter it in your inbox <a href="mailto:webmaster@website.com?subjec...
{ "language": "en", "url": "https://stackoverflow.com/questions/91905", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: How can we share individual rules between .drl files in JBoss Rules? We are using JBoss Rules (a.k.a. Drools) and have several .drl files that each contain several rules. Is there a way to avoid duplication between files, so that we can define common rules that are available to more than one .drl file? Unfortunately...
{ "language": "en", "url": "https://stackoverflow.com/questions/91917", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How does the Strategy Pattern work? How does it work, what is it used for and when should one use it? A: Let's explain the strategy pattern the easy way: You have a class Car() with a method run(), so you use it this way in a pseudo language: mycar = new Car() mycar.run() Now, you may want to change the run() beha...
{ "language": "en", "url": "https://stackoverflow.com/questions/91932", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "65" }
Q: Performance when checking for duplicates I've been working on a project where I need to iterate through a collection of data and remove entries where the "primary key" is duplicated. I have tried using a List<int> and Dictionary<int, bool> With the dictionary I found slightly better performance, even though I nev...
{ "language": "en", "url": "https://stackoverflow.com/questions/91933", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Windows API spying/hijacking techniques I'm interested in using API spying/hijacking to implement some core features of a project I'm working on. It's been mentioned in this question as well, but that wasn't really on topic so I figured it'd be better with a question of its own for this., I'd like to gather as much ...
{ "language": "en", "url": "https://stackoverflow.com/questions/91935", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: How do I use groovy to search+replace in XML? How do I use groovy to search+replace in XML? I need something as short/easy as possible, since I'll be giving this code to the testers for their SoapUI scripting. More specifically, how do I turn: <root><data></data></root> into: <root><data>value</data></root> A: So...
{ "language": "en", "url": "https://stackoverflow.com/questions/91957", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to mock object construction? Is there a way to mock object construction using JMock in Java? For example, if I have a method as such: public Object createObject(String objectType) { if(objectType.equals("Integer") { return new Integer(); } else if (objectType.equals("String") { return n...
{ "language": "en", "url": "https://stackoverflow.com/questions/91981", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: How do I hotkey directly to File Search tab in Eclipse When I use CTRL+H I end up on the Java Search tab. I would very much like a shortcut to go directly to File Search instead. Is that possible? See image here for what I'm talking about: A: Another option is to open the search dialog (Ctrl+H) then click customiz...
{ "language": "en", "url": "https://stackoverflow.com/questions/91984", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "116" }
Q: LINQ to SQL: How to write a 'Like' select? I've got the following SQL: select * from transaction_log where stoptime like '%2008%' How do I write this in LINQ to SQL syntax? A: If you want to use the literal method, it's like this: var query = from l in transaction_log where SqlMethods.Like(l.stoptime, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/91986", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: relational operator expression order This is probably a silly question, but curiosity has gotten the better of me. I've been seeing code lately that seems to "reverse" the order of expressions for relational operators e.g.: if (0 == someVariable) As opposed to what I normally see/write: if (someVariable == 0) To m...
{ "language": "en", "url": "https://stackoverflow.com/questions/91994", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What is the real difference between Pointers and References? AKA - What's this obsession with pointers? Having only really used modern, object oriented languages like ActionScript, Java and C#, I don't really understand the importance of pointers and what you use them for. What am I missing out on here? A: It's all...
{ "language": "en", "url": "https://stackoverflow.com/questions/92001", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "29" }
Q: Programmatically Make Bound Column Invisible I'm trying to make a data bound column invisible after data binding, because it won't exist before data binding. However, the DataGrid.Columns collection indicates a count of 0, making it seem as if the automatically generated columns don't belong to the collection. How ...
{ "language": "en", "url": "https://stackoverflow.com/questions/92004", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I determine if a random string sounds like English? I have an algorithm that generates strings based on a list of input words. How do I separate only the strings that sounds like English words? ie. discard RDLO while keeping LORD. EDIT: To clarify, they do not need to be actual words in the dictionary. They j...
{ "language": "en", "url": "https://stackoverflow.com/questions/92006", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "22" }
Q: Programmatically setting the record pointer in a C# DataGridView How do I programmatically set the record pointer in a C# DataGridView? I've tried "DataGridView.Rows[DesiredRowIndex].Selected=true;", and that does not work. All it does is highlight that row within the grid; it doesn not move the record pointer to...
{ "language": "en", "url": "https://stackoverflow.com/questions/92008", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to display only one validation error message with a with MyFaces Trinidad? For a registration form I have something simple like: <tr:panelLabelAndMessage label="Zip/City" showRequired="true"> <tr:inputText id="zip" value="#{data['regis...
{ "language": "en", "url": "https://stackoverflow.com/questions/92027", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: .NET UML generation from code? Is there anything out there that for .NET that can generate UML diagrams from code. Preferably an addin for Visual Studio. Starting work on a mature project that has little architectural documentation can be painful at first. Eventually you get the ins and outs of the code but helping ...
{ "language": "en", "url": "https://stackoverflow.com/questions/92029", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Set selected item on a DataGridViewComboboxColumn I have a datagridview with a DataGridViewComboboxColumn column with 3 values: "Small", "Medium", "Large" I get back the users default which in this case is "Medium" I want to show a dropdown cell in the datagridview but default the value to "Medium". i would do thi...
{ "language": "en", "url": "https://stackoverflow.com/questions/92035", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: " Attach to Process " in Visual Studio 2005 I installed Visual Studio 2005 ( with SP1 ) and made the default settings as what is required for C++ . Now i open a solution and run the exe . Under " Tools " menu item i go and Select " Attach the process " and i attach it to the exe i just ran . I put breakpoints seve...
{ "language": "en", "url": "https://stackoverflow.com/questions/92039", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Is there a simple tool to convert mysql to postgresql syntax? I've tried the tools listed here, some with more success than others, but none gave me valid postgres syntax I could use (tinyint errors etc.) A: After some time on Google I found this post. * *Install the mysql2psql gem using [sudo] gem install mysql...
{ "language": "en", "url": "https://stackoverflow.com/questions/92043", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "23" }
Q: session variable mixup in ASP.NET? Is it possible for ASP.NET to mix up which user is associated with which session variable on the server? Are session variables immutably tied to the original user that created them across time, space & dimension? A: It depends on your session provider, if you have overriden the se...
{ "language": "en", "url": "https://stackoverflow.com/questions/92052", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: GUI Testing tools and feedbacks I am working on the issue of testing my GUI and I am not entirely sure of the best approach here. My GUI is built using a traditional MVC framework so I am easily able to test the logic parts of the GUI without bringing up the GUI itself. However, when it comes to testing the function...
{ "language": "en", "url": "https://stackoverflow.com/questions/92059", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: Smallest Unicode encodings for different languages? What are the typical average bytes-per-character rates for different unicode encodings in different languages? E.g. if I wanted the smallest number of bytes to encode some english text, then on average UTF-8 would be 1-byte per character and UTF-16 would be 2 so I'...
{ "language": "en", "url": "https://stackoverflow.com/questions/92073", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to use node-set function in a platform-independent way? I'm writing some xlst file which I want to use under linux and Windows. In this file I use node-set function which declared in different namespaces for MSXML and xsltproc ("urn:schemas-microsoft-com:xslt" and "http://exslt.org/common" respectively). Is the...
{ "language": "en", "url": "https://stackoverflow.com/questions/92076", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Borland C++ Builder 6 always compiles all files Why does C++ Builder 6 always compile all files? I make some changes on one file but BCB 6 compiles all files when I start the app. Any idea? I use Windows XP SP2. A: Are you source files and binary objects located on the same machine? If not sounds like you have a n...
{ "language": "en", "url": "https://stackoverflow.com/questions/92079", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Add a column with a default value to an existing table in SQL Server How can I add a column with a default value to an existing table in SQL Server 2000 / SQL Server 2005? A: If you want to add multiple columns you can do it this way for example: ALTER TABLE YourTable ADD Column1 INT NOT NULL DEFAULT 0, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/92082", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3178" }
Q: Removing leading zeroes from a field in a SQL statement I am working on a SQL query that reads from a SQLServer database to produce an extract file. One of the requirements to remove the leading zeroes from a particular field, which is a simple VARCHAR(10) field. So, for example, if the field contains '00001A', the...
{ "language": "en", "url": "https://stackoverflow.com/questions/92093", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "109" }
Q: Is it possible to set code behind a resource dictionary in WPF for event handling? Is it possible to set code behind a resource dictionary in WPF. For example in a usercontrol for a button you declare it in XAML. The event handling code for the button click is done in the code file behind the control. If I was to cr...
{ "language": "en", "url": "https://stackoverflow.com/questions/92100", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "156" }
Q: MySQL slow query log - how slow is slow? What do you find is the optimal setting for mysql slow query log parameter, and why? A: Whatever time /you/ feel is unacceptably slow for a query on your systems. It depends on the kind of queries you run and the kind of system; a query taking several seconds might not matte...
{ "language": "en", "url": "https://stackoverflow.com/questions/92103", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "21" }
Q: How do you get through the inevitable motivational "slump" near the end of projects? When working on a project, after the interesting parts are coded, my motivation is severely diminished. What do you do to get over this problem? A: Don't leave all the "boring" bits to the end - make sure that each component works...
{ "language": "en", "url": "https://stackoverflow.com/questions/92113", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }