text
stringlengths
8
267k
meta
dict
Q: How to add Average to the Pivot table in Excel? I have columns with count of Customers and count of orders. how can i show the average count of orders? A: Drop the orders column onto the Pivot layout again and then double click to select the summary method.
{ "language": "en", "url": "https://stackoverflow.com/questions/273985", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Inclusion cycles in C header files How does one prevent an inclusion cycle in C? ie. You shouldn't have a.h #include "b.h", which #include's "c.h" which #include's "a.h". I'm looking for a way of preventing this from happening using some sort of C directive. I had originally thought this would've prevented this from...
{ "language": "en", "url": "https://stackoverflow.com/questions/273995", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: C# Parsing Best Practices I need to parse some known file formats, one of them is the CUSCAR format, i strongly believe that RegEx will do the job ,any suggestions ? A: I just looked at the CUSCAR spec, and I think you'll get some pretty ugly regex code to parse that. You could get away with it, if you are parsing...
{ "language": "en", "url": "https://stackoverflow.com/questions/274007", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: Why is the caret suddenly centered in an edit field? I have a "username" TEdit on a Delphi 2006 login form. When the application starts up the user is asked to enter the username. The TEdit gets focus and the caret is placed in its horizontal center for some reason. As soon as anything is typed the caret is left ali...
{ "language": "en", "url": "https://stackoverflow.com/questions/274009", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Crystal Reports 8.5 grouping I am grouping using a formula fCity which goes like this If {X.MailingCity} > "" Then {X.MailingCity} Else {X.City} I have two different fields in my view (Home City and Mailing City) Now, these fields contain many rural communities and in my report I want to have these smaller rural com...
{ "language": "en", "url": "https://stackoverflow.com/questions/274010", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Random Text generator based on regex I would like to know if there is software that, given a regex and of course some other constraints like length, produces random text that always matches the given regex. Thanks A: Check out the RandExp Ruby gem. It does what you want, though only in a limited fashion. (It won'...
{ "language": "en", "url": "https://stackoverflow.com/questions/274011", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "37" }
Q: How do I pronounce "=>" as used in lambda expressions in .Net I very rarely meet any other programmers! My thought when I first saw the token was "implies that" since that's what it would read it as in a mathematical proof but that clearly isn't its sense. So how do I say or read "=>" as in:- IEnumerable<Person> Adu...
{ "language": "en", "url": "https://stackoverflow.com/questions/274022", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "159" }
Q: Regular expressions: Differences between browsers I'm increasingly becoming aware that there must be major differences in the ways that regular expressions will be interpreted by browsers. As an example, a co-worker had written this regular expression, to validate that a file being uploaded would have a PDF extensio...
{ "language": "en", "url": "https://stackoverflow.com/questions/274024", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Given a crash offset, .PDB, and source, how can I find the source line? I have a Windows Event Log entry giving the offset of the failed call triggering an application crash. I have a release build, the corresponding .PDB file, and the source. I do not have a .MAP or .COD file. How can I find the failing source line...
{ "language": "en", "url": "https://stackoverflow.com/questions/274034", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: Resolve FilterAttributes On Controller And Action I would like to do this: [RequiresAuthentication(CompanyType.Client)] public class FooController { public ActionResult OnlyClientUsersCanDoThis() public ActionResult OnlyClientUsersCanDoThisToo() [RequiresAuthentication] public ActionResult ...
{ "language": "en", "url": "https://stackoverflow.com/questions/274039", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to create an extension method on a class in C#? I'd like to write an extension method for string, which appears as a static method on System.String - I've not managed to get that done. Is that possible? If so how? Thanks! A: It's not possible. Extension methods let you add what look like instance methods, and n...
{ "language": "en", "url": "https://stackoverflow.com/questions/274049", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Long lived JMS sessions. Is Keeping JMS connections / JMS sessions always opened a bad practice? Is keeping JMS connections / sessions / consumer always open a bad practice? Code draft example: // app startup code ConnectionFactory cf = (ConnectionFactory)jndiContext.lookup(CF_JNDI_NAME); Connection connection = cf...
{ "language": "en", "url": "https://stackoverflow.com/questions/274051", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: How to create conditional content within a databound Repeater I'm setting up a User Control driven by a XML configuration. It is easier to explain by example. Take a look at the following configuration snippet: <node> <text lbl="Text:"/> <checkbox lbl="Check me:" checked="true"/> </node> What I'm trying to achi...
{ "language": "en", "url": "https://stackoverflow.com/questions/274056", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Name Generator for .NET Has anyone written, or know of a library, that generates fairly accurate looking Western European style names? i.e. John, Susan, Smith, Julien, April, etc., etc... A: Not sure if this will work but check FakeNameGenerator it will generate names and some information as well. One at a time o...
{ "language": "en", "url": "https://stackoverflow.com/questions/274062", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Build automation: MSBuild vs. Windows Mobile SDK I'm trying to automate the build of the project I'm working on. My ultimate goal is to eventually have a continuous integration server and so far everything was great. In order to find out what is the minimal setup I can have for my project, I started configuring a fr...
{ "language": "en", "url": "https://stackoverflow.com/questions/274064", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Search entire project for includes in Eclipse CDT I have a large existing c++ codebase. Typically the users of the codebase edit the source with gvim, but we'd like to start using the nifty IDE features in Eclipse. The codebase has an extensive directory hierarchy, but the source files use include directives witho...
{ "language": "en", "url": "https://stackoverflow.com/questions/274066", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Where do I start designing when using O/R mapping? Objects or database tables? I'm starting a new database application and I wonder if it would be better to start the design at the objects (with UML) and build the database schema accordingly, or start at the design of the database (with ER) and create the objects ac...
{ "language": "en", "url": "https://stackoverflow.com/questions/274090", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Is there a reliable mail server on Windows 2008 web edition? I'm currently looking for a webhost that offers Windows 2008 virtual or dedicated hosting for my ASP.NET app. On dedicated hosting you pay a monthly fee for Windows, I noticed there's a noticeable difference in cost between the web edition and the standard...
{ "language": "en", "url": "https://stackoverflow.com/questions/274096", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do you handle developer access to windows servers? When it comes to code launches how do you handle developer access to the server? Do they have RDP access to the machines to deploy code and make changes? Are they only given ftps access to the servers docroots and any .NET configuration changes are handled by ...
{ "language": "en", "url": "https://stackoverflow.com/questions/274123", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: WIA Twain support C# How can I use WIA and Twain in C#? The TWIAIN/C# example found at http://www.codeproject.com/KB/dotnet/twaindotnet.aspx Throws an exception at line 59 on TwainLib.cs "an attempt was made to load a program with an incorrect format." on Vista 64. I would use WIA but it does not have support for al...
{ "language": "en", "url": "https://stackoverflow.com/questions/274127", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Repeat table headers in print mode Is it possible in CSS using a property inside an @page to say that table headers (th) should be repeated on every page if the table spreads over multiple pages? A: Some browsers repeat the thead element on each page, as they are supposed to. Others need some help: Add this to your...
{ "language": "en", "url": "https://stackoverflow.com/questions/274149", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "128" }
Q: Wordpress, PHP, URL Encoding Issue Wordpress provides a function called "the_permalink()" that returns, you guessed it!, the permalink to a given post while in a loop of posts. I am trying to URL encode that permalink and when I execute this code: <?php print(the_permalink()); $permalink = the_permalink(); print($pe...
{ "language": "en", "url": "https://stackoverflow.com/questions/274157", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: C# ushort[] to string conversion; is this possible? I have a very painful library which, at the moment, is accepting a C# string as a way to get arrays of data; apparently, this makes marshalling for pinvokes easier. So how do I make a ushort array into a string by bytes? I've tried: int i; String theOutData = ""...
{ "language": "en", "url": "https://stackoverflow.com/questions/274158", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Is there a benefit to using the HtmlHelper in MVC? Is there a specific reason why I should be using the Html.CheckBox, Html.TextBox, etc methods instead of just manually writing the HTML? <%= Html.TextBox("uri") %> renders the following HTML <input type="text" value="" name="uri" id="uri"/> It guess it saves you a...
{ "language": "en", "url": "https://stackoverflow.com/questions/274162", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Type parameters cannot be used as qualifiers VB.Net2005 Simplified Code: MustInherit Class InnerBase(Of Inheritor) End Class MustInherit Class OuterBase(Of Inheritor) Class Inner Inherits InnerBase(Of Inner) End Class End Class Class ChildClass Inherits OuterBase(Of ChildClass) End Class Clas...
{ "language": "en", "url": "https://stackoverflow.com/questions/274172", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: NoSuchPortException using RXTX Java library on Windows? I have followed the instructions to setup rxtx on windows from http://www.jcontrol.org/download/readme_rxtx_en.html. What I did exactly was copy rxtxSerial.dll to "C:\Program Files\Java\jdk1.6.0_07\jre\bin" and copied RXTXcomm.jar to "C:\Program Files\Java\jdk1...
{ "language": "en", "url": "https://stackoverflow.com/questions/274179", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Is there a GZIP merger that merges two GZIP files without decompressing them? Let's say there's a.gz, and b.gz. $ gzip_merge a.gz b.gz -output c.gz I'd like to have this program. Of course, $ cat a.gz b.gz > c.gz doesn't work. Because the final DEFLATE block of a.gz has BFINAL, and the GZIP header of b.gz. (Refer to...
{ "language": "en", "url": "https://stackoverflow.com/questions/274185", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: Image library recommendations I'm looking for some image library that can work with multiple formats (jpg,gif,png), and is fast at displaying the images to the screen. Also, it would be nice if I could specify only part of the image to render to the screen. In the end I want to have lots of images on the screen that...
{ "language": "en", "url": "https://stackoverflow.com/questions/274191", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Compression for a unique stream of data I've got a large number of integer arrays. Each one has a few thousand integers in it, and each integer is generally the same as the one before it or is different by only a single bit or two. I'd like to shrink each array down as small as possible to reduce my disk IO. Zli...
{ "language": "en", "url": "https://stackoverflow.com/questions/274196", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Cross-reference Distance chart in SQL Server 2008 or Excel? I would like to cross-reference construct a distance chart similar to the one here (example is a road-distance cross-reference chart) and, ideally, store the data in SQL Server 2008 (preferably the Express version). It needs these properties / abilities *...
{ "language": "en", "url": "https://stackoverflow.com/questions/274211", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How does the fill operation work in paint applications? All paint programs, independent of how simple or complex they are, come with a fill tool. This basically replaces the color of a closed region with another color. I know that there are different APIs to do this, but I am interested in the algorithm. What would ...
{ "language": "en", "url": "https://stackoverflow.com/questions/274213", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Does Castle-Windsor support ForwardedTypes via XML configuration I have a class that implements multiple interfaces. I would like to register these interfaces via XML. All I've found is documentation for the new Fluent Interface. Is this option supported via XML? What would be involved in adding this feature? A: [...
{ "language": "en", "url": "https://stackoverflow.com/questions/274220", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Convert frustum to a projection matrix in Java 3d I need to prepare for my exam and this is the probable question for the test. Given a frustum method such as frustum(-1,1, -0.5, 0.5, 1, 2) how to convert this to a projection matrix? The above example from my textbook but the writers don't define it in detail. If an...
{ "language": "en", "url": "https://stackoverflow.com/questions/274241", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Vista Speech Recognition in Delphi I would like to be able to dictate into my Delphi application using Microsoft Vista's speech recognition. However when attempting to dictate into a TMemo, it simply does not work. I noticed that Firefox 3.0 has the same issue and after they contacted Microsoft about the problem, th...
{ "language": "en", "url": "https://stackoverflow.com/questions/274255", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How to layout sidebar and main body without using 'absolute' or 'float'? I can't for the life of me find a way to make this work. If I have 3 divs (a left sidebar, a main body, and a footer), how can I have the sidebar and main body sit next to each other without setting their positions as "absolute" or floating the...
{ "language": "en", "url": "https://stackoverflow.com/questions/274265", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Is it secure to submit from a HTTP form to HTTPS? Is it acceptable to submit from an http form through https? It seems like it should be secure, but it allows for a man in the middle attack (here is a good discussion). There are sites like mint.com that allow you to sign-in from an http page but does an https post...
{ "language": "en", "url": "https://stackoverflow.com/questions/274274", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "74" }
Q: How to determine direction of navigation from IE WebBrowser (IHtmlWindow2 or Javascript) I'm uisng the WPF Web Browser control and when it fires the Navigating event, the event args always contain NavigationMode.New. It should be set to NavigationMode.Back if the user chooses to 'Go Back' from the web control. So i...
{ "language": "en", "url": "https://stackoverflow.com/questions/274284", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Php - Connecting to remote database very slow I have a new VPS server, and I'm trying to get it to connect to another server at the same ISP. When I connect via mysql's command line tool, the connection is very fast. When I use PHP to connect to the remote DB, the connection time may take up to 5 seconds. Queries ...
{ "language": "en", "url": "https://stackoverflow.com/questions/274286", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Any big sites using Client Side XSLT? Lately, I've been pondering the somewhat non-mainstream architecture of building raw XML on the server side, and then using an XSLT stylesheet on the client to transform the XML into the full UI. Of course, a fallback mechanism would have to exist if the client was not capable ...
{ "language": "en", "url": "https://stackoverflow.com/questions/274290", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "22" }
Q: Does anyone know of a money type in .NET? Does anyone know of an already implemented money type for the .NET framework that supports i18n (currencies, formatting, etc)? I have been looking for a well implemented type and can't seem to find one. A: I think you want to use the decimal data type, and use the appropria...
{ "language": "en", "url": "https://stackoverflow.com/questions/274296", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: How do I get autotest to properly inflect singular models and plural controllers Just as an example, if I have a Book model and a BooksController, autotest, part of the ZenTest suite will pick up the association between the two and load test/unit/book_test.rb and test/functional/books_controller_test.rb into the tes...
{ "language": "en", "url": "https://stackoverflow.com/questions/274307", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How does geographic lookup by IP work? Is which IPs are assigned to which ISPs public information? How do geo IP services obtain this information and maintain this information? How can I personally figure out where a certain IP belongs without using one of these services? A: There are a variety of libraries that h...
{ "language": "en", "url": "https://stackoverflow.com/questions/274308", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "28" }
Q: Is there any benefit to using windows winsock API functions compared to BSD-style socket functions? Is there any benefit on Windows to use the WSA winsock functions compared to the BSD-style ones? A: Only if you plan to deploy to a legacy platform like Windows 95 or there is something in the winsock API that you ab...
{ "language": "en", "url": "https://stackoverflow.com/questions/274309", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: C# WebBrowser HTML with references to scripts and images I'm writing a C# app using the WebBrowser control, and I want all content I display to come from embedded resources - not static local files, and not remote files. Setting the initial text of the control to an embedded HTML file works great with this code insp...
{ "language": "en", "url": "https://stackoverflow.com/questions/274315", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Mixing different versions of Java libraries My project uses Java libraries that have their own dependencies (Hadoop, Jetty for example). I end up with different versions of the same dependencies, like ant 1.4.5, 1.4.6. My project may want to use ant 1.4.7. This is a small example, can get more complicated with la...
{ "language": "en", "url": "https://stackoverflow.com/questions/274317", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: How do you dismiss the keyboard when editing a UITextField I know that I need to tell my UITextField to resign first responder when I want to dismis the keyboard, but I'm not sure how to know when the user has pressed the "Done" key on the keyboard. Is there a notification I can watch for? A: If you connect the Did...
{ "language": "en", "url": "https://stackoverflow.com/questions/274319", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "191" }
Q: Best way to make fancy UIs in .NET How would one create fancy UIs in .NET, with glossy buttons and smooth animations? You can point me to 3rd party frameworks, but I would like to understand the technical details also. A: Maybe take a look at WPF. In terms of 3rd party libraries: * *DevExpress *Telerik *Infra...
{ "language": "en", "url": "https://stackoverflow.com/questions/274339", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Does the lock(objlocker) make that object thread safe app wide? And are static members automatically thread safe? When you lock an object is that object locked throughout the whole application? For Example, this snippet from C# 3.0 in a Nutshell Section 19.6.1 "Thread Safety and .NET Framework Types": static void Ad...
{ "language": "en", "url": "https://stackoverflow.com/questions/274344", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Binding one collection to multiple tabs with filters In my small WPF project, I have a TabControl with three tabs. On each tab is a ListBox. This project keeps track of groceries we need to buy. (No, it's not homework, it's for my wife.) So I have a list of ShoppingListItems, each of which has a Name and a Neede...
{ "language": "en", "url": "https://stackoverflow.com/questions/274348", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: running single rails unit/functional test As title. ruby test/functionals/whatevertest.rb doesn't work, that requires me to replace all require 'test_helper' to require File.dirname(__FILE__) + '/../test_helper'. For some reason most of those test templates have such issue, so I rather to see if there is a hack I c...
{ "language": "en", "url": "https://stackoverflow.com/questions/274349", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "31" }
Q: Checking if an instance's class implements an interface? Given a class instance, is it possible to determine if it implements a particular interface? As far as I know, there isn't a built-in function to do this directly. What options do I have (if any)? A: nlaq points out that instanceof can be used to test if the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/274360", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "186" }
Q: UTF-8 latin-1 conversion issues, python django ok so my issue is i have the string '\222\222\223\225' which is stored as latin-1 in the db. What I get from django (by printing it) is the following string, 'ââââ¢' which I assume is the UTF conversion of it. Now I need to pass the string into a function that does t...
{ "language": "en", "url": "https://stackoverflow.com/questions/274361", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Intercepting traffic to memcached for statistics/analysis I want to setup a statistics monitoring platform to watch a specific service, but I'm not quiet sure how to go about it. Processing the intercepted data isn't my concern, just how to go about it. One idea was to setup a proxy between the client application ...
{ "language": "en", "url": "https://stackoverflow.com/questions/274375", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How can I share user sessions across multiple domains using Rails? Is anyone aware of any gems, tutorials, or solutions enabling a user to sign in to a website at one domain and automatically given access to other partner domains in the same session? I have two rails apps running, let's call them App-A and App-B. A...
{ "language": "en", "url": "https://stackoverflow.com/questions/274384", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: How to determine the orientation of the screen in C# for mobile devices? How can I know in a C#-Application, in which direction the screen of the mobile device is orientated? (i.e. horizontal or vertical). A: In Microsoft.WindowsMobile.Status there is a class which keeps track of all kinds of properties of your dev...
{ "language": "en", "url": "https://stackoverflow.com/questions/274404", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Using SMO to get create script for table defaults I'm trying to create a database scripter tool for a local database I'm using. I've been able to generate create scripts for the tables, primary keys, indexes, and foreign keys, but I can't find any way to generate create scripts for the table defaults. For indexes, i...
{ "language": "en", "url": "https://stackoverflow.com/questions/274408", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: OpenGL background transparency? I'm using QT's QGLFramebufferObject for off-screen rendering. After rendering to the buffer I read the result using glReadPixels() The problem is that sometimes the background color I read is just 0 (transparent black) and sometimes it is 0xFF000000 (opaque black) This seem to be rela...
{ "language": "en", "url": "https://stackoverflow.com/questions/274410", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Do Stored Procedures really boost performance in MS SQL / .NET? Jeff Atwood wrote about this here, and while I understand the theoretical performance boost a stored procedure could offer, it does seem like a tremendous pain. What types of queries would you see the most performance increase using stored procedures, a...
{ "language": "en", "url": "https://stackoverflow.com/questions/274411", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "25" }
Q: How to keep your Stored Procedures DRY in C#.NET? We're using Stored Procedures for every query to the DB. This seems incredibly un-DRY: * *Design the table *Design CRUD operation SPs for that table *Design code (preferably a class) to fill parameters and execute CRUD SPs If we add a single column, or change...
{ "language": "en", "url": "https://stackoverflow.com/questions/274418", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Built in .Net algorithm to round value to the nearest 10 interval How to, in C# round any value to 10 interval? For example, if I have 11, I want it to return 10, if I have 136, then I want it to return 140. I can easily do it by hand return ((int)(number / 10)) * 10; But I am looking for an builtin algorithm to d...
{ "language": "en", "url": "https://stackoverflow.com/questions/274439", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "73" }
Q: Using default tab-controller created project... first view controller doesn't respond to addsubview I created a project using the default tab-controller project. I am using interface builder to edit the .xib file and add images and buttons. I hook them up to the FirstViewController object in interface builder (that ...
{ "language": "en", "url": "https://stackoverflow.com/questions/274457", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Ajax dropdown limit to list pretty much what the title says. I am using an Ajax Drop Down as illustrated here: http://www.asp.net/AJAX/AjaxControlToolkit/Samples/DropDown/DropDown.aspx using linkbuttons ... is there a way to limit to list? Thank you. Edit: I think it was VB 6 maybe that you could select "LimitToLi...
{ "language": "en", "url": "https://stackoverflow.com/questions/274459", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: ActiveX in IE. Dialog Box not showing XP Visual Style I have an ActiveX control in IE (7). When it shows a dialog box, the dialog box is not showing in XP visual style. I have tried embedding manifests to no avail. Anybody got any idea? by the way, the dialog boxes were implemented using wtl. A: Build your dll wi...
{ "language": "en", "url": "https://stackoverflow.com/questions/274461", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do I make for loops run side by side? I have been working on a childish little program: there are a bunch of little circles on the screen, of different colors and sizes. When a larger circle encounters a smaller circle it eats the smaller circle, and when a circle has eaten enough other circles it reproduces. It...
{ "language": "en", "url": "https://stackoverflow.com/questions/274462", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Authentication system for ASP.NET web applications? I have some question: How to make a role based web application? Such as in forum sites, there is many user types, admin, moderator etc... is the roles of these user types stored in database or web.config? And when a user login to our site, how to control this users...
{ "language": "en", "url": "https://stackoverflow.com/questions/274465", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Can't do shell script with a repeat with i from 1 to n loop This works (prints, for example, “3 arguments”): to run argv do shell script "echo " & (count argv) & " arguments" end run This doesn't (prints only “Argument 3: three”, and not the previous two arguments): to run argv do shell script "echo " & (co...
{ "language": "en", "url": "https://stackoverflow.com/questions/274469", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Creating a DLNA server/service in VB.NET I would like to create a DLNA server in VB.NET. Since a lot of multimedia devices start supporting DLNA, i would like to see what is possible. Not only streaming video/audio and pictures but see what else can be done. Anybody any starting points? protocol info, some basic cod...
{ "language": "en", "url": "https://stackoverflow.com/questions/274470", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: How do I use JDK6 ToolProvider and JavaCompiler with the context classloader? My usage case is compiling generated source files from a java program using the ToolProvider and JavaCompiler classes provided in JDK 6. The source files contain references to classes in the context classloader (it runs in a J2EE containe...
{ "language": "en", "url": "https://stackoverflow.com/questions/274474", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: CodeIgniter questions: native PHP sessions, code flow, layout issues? I am just getting started with CodeIgniter, and I am trying to hash out my regular modules/functions to get them working properly within the MVC framework. I have a few specific questions for anyone who has a strong CodeIgniter background: SESSION...
{ "language": "en", "url": "https://stackoverflow.com/questions/274482", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Data Transfer Objects, Domain Objects and Repositories I'm trying to figure out how all these work together. I know that a DTO is basically just a container of data for the Domain Objects to pass back and forth to forms and such. Does the Domain object contain a DTO or do the DTO and the Domain Object happen to just...
{ "language": "en", "url": "https://stackoverflow.com/questions/274484", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Parallel quicksort: recursion using Boost Bind? I am working on making quicksort parallel, threads being the first attempt. The non threaded version sorts correctly but the threaded doesn't (no surprise there). What I found interesting was when I removed the threads but kept the boost::bind calls it still doesn't ...
{ "language": "en", "url": "https://stackoverflow.com/questions/274490", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to copy a file in Python with a progress bar? When copying large files using shutil.copy(), you get no indication of how the operation is progressing.. I have put together something that works - it uses a simple ProgressBar class (which simple returns a simple ASCII progress bar, as a string), and a loop of open...
{ "language": "en", "url": "https://stackoverflow.com/questions/274493", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Application Using PhpBB Session Data - can't use the short code I've built web apps before that utilize phpBB session, and user data. The common move is to use code like this: define('IN_PHPBB', true); //replace $phpbb_root_path with path to your forum $phpbb_root_path = '../forum/'; $phpEx = substr(strrchr(__FILE__...
{ "language": "en", "url": "https://stackoverflow.com/questions/274496", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Good SMTP server on Windows for a production server I'm going to have my website hosted soon on a VPS or dedicated server (with Windows 2008), so I'm trying to plan ahead. I wonder whether the built-in SMTP server that comes with IIS7 is reliable enough for a production server or should I look for an alternative? I ...
{ "language": "en", "url": "https://stackoverflow.com/questions/274512", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Form.Release + NIL if Form.Release is called after using the form, it will free all related memory but not set the form variable to nil. if not assigned (Form1) then begin Application.CreateForm(Tform1, Form1); try // Do something finally Form1.Release end; end; To be able to call th...
{ "language": "en", "url": "https://stackoverflow.com/questions/274523", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: How do I list items in my Django models? Am working with django Publisher example, I want to list all the publishers in the db via my list_publisher.html template, my template looks like; {% extends "admin/base_site.html" %} {% block title %}List of books by publisher{% endblock %} {% block content %} <div id="cont...
{ "language": "en", "url": "https://stackoverflow.com/questions/274529", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Choosing best security option for WCF We have a project that contains a WCF Service and a few clients that connect to it. Some of them are PCs using NetTcp to connect to the service. Few others run on Windows Mobile Devices(Compact Framework), using BasicHttp to connect. We can't use Windows Authentication, because ...
{ "language": "en", "url": "https://stackoverflow.com/questions/274533", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: ASP.NET MVC - Script Combine The ASP.NET team released the script combining feature in 3.5 SP1 as detailed here http://www.asp.net/Learn/3.5-SP1/video-296.aspx. Is there a similar feature already for the MVC framework? If not, is this in scope or is it possible to somehow leverage the webforms capability in MVC? I s...
{ "language": "en", "url": "https://stackoverflow.com/questions/274536", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: How to publish our Webservices I have created an web service I need to publish this service. I need to host and authenticated users need to access my services using ASP.net 2.0 A: I'm not sure if you are asking for an alternative, but I've been experimenting with this code that seems to work well on codeproject.com...
{ "language": "en", "url": "https://stackoverflow.com/questions/274540", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Retrieving annotated method from attribute constructor If I annotate a method of a class with an attribute, I can then retrieve custom attributes for that class and see if it has that attribute or not. For example, I'm building a message-oriented program so I have classes like public class ErrorHandler { [HandleMe...
{ "language": "en", "url": "https://stackoverflow.com/questions/274544", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Converting WAV files to MP3 using VB6? I need help converting WAV files to MP3 format in VB6. I did already find source code in C#, but I can't use that A: Here is a code example from the greatest programmer on Earth (Google): VB6 Lame MP3 Encoder Don't let the word "lame" fool you - it stands for "LAme Mp3 Encoder...
{ "language": "en", "url": "https://stackoverflow.com/questions/274553", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do you test a public/private DSA keypair? Is there an easy way to verify that a given private key matches a given public key? I have a few *.puband a few *.key files, and I need to check which go with which. Again, these are pub/key files, DSA. I would really prefer a one-liner of some sort... A: Enter the fol...
{ "language": "en", "url": "https://stackoverflow.com/questions/274560", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "181" }
Q: Best way to learn Ext JS for use with ASP.NET? I have very basic knowledge of Javascript and now I am looking forward to learn Ext JS and implement in in my ASP.NET application. If anyone can guide me on how to start and which book I should follow, I'd be thankful. A: Nor sure if it is the quickest approach, but a...
{ "language": "en", "url": "https://stackoverflow.com/questions/274565", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How can I debug a MinGW EXE with the Microsoft Visual C++ debugger? How can I debug a MinGW EXE with the Microsoft Visual C++ debugger? A: You can attach the Visual C++ debugger to any process running on the system (from the Visual C++ menu). But for being able to step through your source code Visual C++ would have...
{ "language": "en", "url": "https://stackoverflow.com/questions/274566", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to extend this simple DataMapper? Can someone please derive a concrete example from the following: http://www.urdalen.com/blog/?p=210 ..that shows how to deal with one-to-many and many-to-many relationships? I've emailed the author some time ago but received no reply. I like his idea, but can't figure out how t...
{ "language": "en", "url": "https://stackoverflow.com/questions/274567", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Implementing Message Security in NETCF As far as I know only a subset of WS-Security version 1.0 is supported in NETCF and it uses X.509 certificates. How can I obtain such a certificate to implement it in my application and prevent others to use my WCF service? A: This article describes how to create an X.509 cert...
{ "language": "en", "url": "https://stackoverflow.com/questions/274568", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Should LOC counting include tests and comments? While LOC (# lines of code) is a problematic measurement of a code's complexity, it is the most popular one, and when used very carefully, can provide a rough estimate of at least relative complexities of code bases (i.e. if one program is 10KLOC and another is 100KLOC...
{ "language": "en", "url": "https://stackoverflow.com/questions/274575", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: Intuitive way of understanding hexadecimal html color codes? Is there an intuitive way, or a good mnemonic, for understanding the correspondence between colors and their hexadecimal values? A: Just think of it as mixing paint. There are the three components RR, GG, BB, (RRGGBB) which can be mixed with different str...
{ "language": "en", "url": "https://stackoverflow.com/questions/274581", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: Mocks... and Verifiers? currently, I am looking deeper into testing techniques, even though I am not sure if I still reside in the unittest-land or left it into the land of integration tests already. Let me elaborate a bit, Given two components A and B and A uses B, then we have a certain "upwards-contract" for B a...
{ "language": "en", "url": "https://stackoverflow.com/questions/274585", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Including an anchor tag in an ASP.NET MVC Html.ActionLink In ASP.NET MVC, I'm trying to create a link that includes an anchor tag (that is, directing the user to a page, and a specific section of the page). The URL I am trying to create should look like the following: <a href="/category/subcategory/1#section12">Titl...
{ "language": "en", "url": "https://stackoverflow.com/questions/274586", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "155" }
Q: What might cause connection errors when using bidirectional localConnection in Flash? I'm trying to setup a bidirectional localConnection (LC) between two flash objects on the same web page. One object is AS2 and the other AS3. * *I'm using one LC object to send and receive data on each swf. (This shouldn't matte...
{ "language": "en", "url": "https://stackoverflow.com/questions/274599", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to list all running CLR instances Just forgot the command which I used to execute at DOS Prompt to list all running CLR instances on a Machine. Anyone remembers it?? A: tasklist /m mscor* tasklist /m mscor* will show processes that have loaded modules (usaully .DLL files) hosting the .NET runtime. The same tech...
{ "language": "en", "url": "https://stackoverflow.com/questions/274603", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What is the best way to debug a NUnit test? My platform: Visual C# 2008 Express Edition with NUnit 2.2.7 I have a solution with my code in one project and my NUnit unit tests in a different project in the same solution. I have been struggling hard to debug and single-step through the NUnit tests. I found some refer...
{ "language": "en", "url": "https://stackoverflow.com/questions/274619", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: What is object slicing? In c++ what is object slicing and when does it occur? A: "Slicing" is where you assign an object of a derived class to an instance of a base class, thereby losing part of the information - some of it is "sliced" away. For example, class A { int foo; }; class B : public A { int bar; }...
{ "language": "en", "url": "https://stackoverflow.com/questions/274626", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "882" }
Q: config_vars.mk missing in default xampp-linux installation I extracted the xampp package xampp-linux-1.6.7 on a Ubuntu 8.10 system and followed the instuctions from mod_wsgi documentation. I get the error below: ravi@Ibex:~/mod_wsgi-2.3$ ./configure --with-apxs=/opt/lampp/bin/apxs checking Apache version... cannot...
{ "language": "en", "url": "https://stackoverflow.com/questions/274638", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How To Create a Quick Minimal Firefox Extension? What the minimum basic setup required to begin developing a Firefox extension? A: Precaution: In order to prevent messing with your default Firefox experience, try the tip below on a newly created disposable test account. Step 1: Create a new Firefox profile. For thi...
{ "language": "en", "url": "https://stackoverflow.com/questions/274639", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: Plug-in for Visual Studio for quick-searching files in solution I want to write an Add-In for Visual Studio that provides instant search for the solution explorer. So you press a key combination and while you are typing a list first containing all files of the solution explorer gets narrowed down. But how can I get ...
{ "language": "en", "url": "https://stackoverflow.com/questions/274645", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: ASP.NET [HttpException (0x80004005): Cannot use a leading .. to exit above the top directory.] I am getting the following error while loading a page. [HttpException (0x80004005): Cannot use a leading .. to exit above the top directory.] No idea what to do ? Can anyone help me ? A: I'm guessing you have done someth...
{ "language": "en", "url": "https://stackoverflow.com/questions/274646", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: VSTO problem - cannot create visual studio excel workbook project When I try to create a Excel 2007 Workbook project, in Visual Studio 2008, I get the following errormessage: Project cannot be created because the "Excel Visual Studio Design-Time Adaptor Add-in" is not working correctly. Excel might have disabled th...
{ "language": "en", "url": "https://stackoverflow.com/questions/274653", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Building Subversion 1.5.4 on Debian: could not find library containing RSA_new I've been trying to build subversion (on a limited account) for a long time but without any luck :( The instructions I'm following: http://wiki.dreamhost.com/Subversion_Installation Running this: ./configure --prefix=${RUN} --without-berk...
{ "language": "en", "url": "https://stackoverflow.com/questions/274656", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }