text
stringlengths
8
267k
meta
dict
Q: Cannot delete directory with Directory.Delete(path, true) I'm using .NET 3.5, trying to recursively delete a directory using: Directory.Delete(myPath, true); My understanding is that this should throw if files are in use or there is a permissions problem, but otherwise it should delete the directory and all of its ...
{ "language": "en", "url": "https://stackoverflow.com/questions/329355", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "416" }
Q: Can I overload operators for my own classes in Delphi? I faced a little trouble - I do not know if I can define my own operators for my classes. For example: type TMinMatrix = class(TMatrix) private RowAmount: Byte; ColAmount: Byte; Data: DataMatrix; DemVector, SupVector: SupplyDemand; ...
{ "language": "en", "url": "https://stackoverflow.com/questions/329359", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to use a DateTime formatted GridViewColumn of WPF ListView? I have a small WPF application; all column templates are ok and they are textboxes but I couldn't find how to bind a DateTime Column (i.e. like a DateTimePicker) to GridViewColumn. A: I don't know if it will work but you can check out this. Also there ...
{ "language": "en", "url": "https://stackoverflow.com/questions/329373", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: ASP.NET MVC Session State I am currently trying to create an upload control with progress bar in MVC using jquery. I keep running into a problem however in that mvc doesn't work in parallel threads? When I upload a file and show the progress during upload from JS performed through several callbacks to server, I am t...
{ "language": "en", "url": "https://stackoverflow.com/questions/329383", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Singleton heritage The singleton is explained here: http://en.wikipedia.org/wiki/Singleton_pattern#PHP_5. I want to use the singleton class as a superclass, and extend it in other classes that are supposed to be singletons. The problem is, the superclass makes an instance of itself, not the subclass. Any idea how I ...
{ "language": "en", "url": "https://stackoverflow.com/questions/329390", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: What happens when a code signing certificate expires? I am considering purchasing a code signing certificate from VeriSign or Thawte to sign an XBAP with. My question is this: What happens when that certificate expires? $299 and $599 are pretty hefty prices for 1-year/2-year cerificates, and if I have to deliver a n...
{ "language": "en", "url": "https://stackoverflow.com/questions/329396", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "59" }
Q: Is a pointer variable also assigned a memory address? In C++, on the stack, a simple variable is assigned a memory address so that we can use a pointer to contain this memory to point to it; then is a pointer also assigned a memory address? If yes, can we have a pointer of pointers? A: A pointer is just a variable ...
{ "language": "en", "url": "https://stackoverflow.com/questions/329399", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: SmtpClient class not picking up default parameters from Web.Config file config file : <system.net> <mailSettings> <smtp from="YYYYY@xxxxxx.com"> <network host="mail.xxxxxx.com" port="25" password="password" userName="user@xxxxxx.com" defaultCredentials="false" /> </smtp> </mailSettings> </system.net> I've already t...
{ "language": "en", "url": "https://stackoverflow.com/questions/329411", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Can I hold any data members in abstract base class? I have an abstract class: type TInterfaceMethod = class abstract public destructor Destroy; virtual; abstract; function GetBasePlan: Word; virtual; abstract; procedure CountBasePlan; virtual; abstract; procedure Calculate; virt...
{ "language": "en", "url": "https://stackoverflow.com/questions/329414", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: What .NET language you use to write Unit Tests? In the past I wrote most of my unit tests using C# even when the actual software development was in another .NET language (VB.NET, C++.NET etc.) but I could use VB to get the same results. I guess the only reason I use C# is because most of the examples in the internet...
{ "language": "en", "url": "https://stackoverflow.com/questions/329422", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Parallelizing the "Reduce" in "MapReduce" I understand how Map is easily parallelizable - each computer/CPU can just operate on a small portion of the array. Is Reduce/foldl parallelizable? It seems like each computation depends on the previous one. Is it just parallelizable for certain types of functions? A: Yes, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/329423", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Building reports from an XML data sources I'm looking for a graphically oriented D&D type tool/utility that can be used to build ad hoc reports from data contained in XML data files. The users are technical, but not developers -- so XSLT is right out... Eclipse' BIRT does this kind of thing, but something more light...
{ "language": "en", "url": "https://stackoverflow.com/questions/329424", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Subversion's hidden revision files You know how Subversion stores a copy of every file it has checked-out in the hidden .svn folders? The website I'm building is pretty big (has over 1Gig of PDF files). These PDF files will very rarely change throughout the existence of the website. I was wondering if there was a wa...
{ "language": "en", "url": "https://stackoverflow.com/questions/329429", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: MySaifu JVM and BlueCove API on an iPAQ Having a bit of an issue running BlueCove on my iPAQ (h5550). I installed MySaifu JVM and added the BlueCove jar library to the classpath, but whenever I try to run the tester jar or any other files that reference the BlueCove API, I get class not found exceptions. Anyone had ...
{ "language": "en", "url": "https://stackoverflow.com/questions/329430", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: In ASP.NET MVC, how do I get the mangled name of a control when a form is submitted? I've got a form inside an <asp:Content> block that is being submitted to a controller. For one of the controls, I need to get some information from it directly that won't happen automatically by calling UpdateModel(). However, in t...
{ "language": "en", "url": "https://stackoverflow.com/questions/329447", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do you copy from a rectangular source region to a non-rectangular/non-paralellogram destination region in .NET? I know how to use the DrawImage() method of the Graphics object to copy from a rectangular source region to a rectangular destination region, and how to copy to a paralellogram region defined by a thre...
{ "language": "en", "url": "https://stackoverflow.com/questions/329448", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What method(s) do you use to test a debian/ubuntu package? I'm talking about testing a package that you're building, especially one that spawns a daemon and/or fiddles with init.d. Do you log into some sort of chroot? Do you create a virtualized distribution and tear it down? How do you test your runtime dependencie...
{ "language": "en", "url": "https://stackoverflow.com/questions/329463", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: SQL group by day, show orders for each day I have an SQL 2005 table, let's call it Orders, in the format: OrderID, OrderDate, OrderAmount 1, 25/11/2008, 10 2, 25/11/2008, 2 3, 30/1002008, 5 Then I need to produce a report table showing the ordered amount on each day in the last 7 days: Day, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/329477", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: Identifying memory problems in an ASP.NET application I've got an ASP.NET application running and on the production box it's using about 450MB RAM, however, it shouldn't be using quite so much, and it seems to increase over time, so it seems there might be a leak or atleast something not being released properly. I ...
{ "language": "en", "url": "https://stackoverflow.com/questions/329485", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: How do I programatically change options in Access? in Microsoft Access, is there a way which I can programatically set the Confirm Action Queries flag on the options screen to False? Ideally when the database is started up I would like to check if it's true, and if so, mark it as false for the currently logged in us...
{ "language": "en", "url": "https://stackoverflow.com/questions/329490", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: iframe shifts 1 pixel to left on some browser sizes i have code like, sorry i dont have the exact code now. but its valid. <iframe src="..." borderframe="0" scrolling="no" width=728px" height="90px"></iframe> the target is a html file that contains code for a banner. everything displays well. but when i resize bro...
{ "language": "en", "url": "https://stackoverflow.com/questions/329497", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to find all built in libraries in Python I've recently started with Python, and am enjoying the "batteries included" design. I'e already found out I can import time, math, re, urllib, but don't know how to know that something is builtin rather than writing it from scratch. What's included, and where can I get ot...
{ "language": "en", "url": "https://stackoverflow.com/questions/329498", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Can you enable [Authorize] for controller but disable it for a single action? I would like to use [Authorize] for every action in my admin controller except the Login action. [Authorize (Roles = "Administrator")] public class AdminController : Controller { // what can I place here to disable authorize? publ...
{ "language": "en", "url": "https://stackoverflow.com/questions/329500", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: Is there a multiple input JOptionPane in Java? I was wondering if there is a JOptionPane where you can get multiple inputs from a user instead of just one? If not, how could i accomplish this using some type of prompt. I am creating Battleship, and wanted to prompt the user to specify locations to place each ship. T...
{ "language": "en", "url": "https://stackoverflow.com/questions/329506", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Preserving application state across restarts I've been trying to preserve the state of my iPhone application by serializing my main UITabBarController using [NSKeyedArchiver archiveRootObject:toFile:], but I'm running into difficulties. First I had a problem with UIImage, since it doesn't implement the NSCoding prot...
{ "language": "en", "url": "https://stackoverflow.com/questions/329511", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: IE6 Navigation hovers I'm using the following code to have a non-JS navigation: <ol id="navigation"> <li id="home"><a href="#"><img src="./images/nav/home-hover.png" alt="Home" /></li> ... </ol> And the CSS: #navigation a { display: block; height: 25px; } #navigation a img { display: none; } #...
{ "language": "en", "url": "https://stackoverflow.com/questions/329516", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: There is a function to use pattern matching (using regular expressions) in C++? There is a simple C++ method to use pattern matching on strings? The code should sound like this: if (regexpcmp("l?nole*[0-9]", "linoleum1")) { //we have a match! } else { //no match } A: Not in the core language. Use Boost.Regex...
{ "language": "en", "url": "https://stackoverflow.com/questions/329517", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: WMV file in an ASP.NET page How do I embed a WMV file in an ASP.NET Web page? I want it visible as a player, not just a link. Is there an ASP.NET control for this? I don't see one on the VS 2008 toolbar, and can't find one in the help. And I'm not yet ready to move this site to Silverlight, where media is really eas...
{ "language": "en", "url": "https://stackoverflow.com/questions/329532", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: SharePoint - Get a list of current users What's the best way to get a list of users that are assigned to a SharePoint portal? A: It depends on exactly what list of users you want. All users that exist in a SharePoint web (but don't necessarily have permission): SPWeb.AllUsers Users that exist in a SharePoint web bu...
{ "language": "en", "url": "https://stackoverflow.com/questions/329535", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: How do I find out the name of the current controller/action/view? I have some code that I am putting in the code-behind of a master page. This master page is my main layout and the purpose of the code is to check whether the user is logged in and take the appropriate action depending on whether they are or not. I wo...
{ "language": "en", "url": "https://stackoverflow.com/questions/329547", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: objc warning: "discard qualifiers from pointer target type" When compiling this: char *str = [[NSString stringWithFormat:@"%i days and %i hours", days, hours] UTF8String]; I get this warning: initialization discards qualifiers from pointer target type How do I get rid of it? A: The qualifier you’re missing is con...
{ "language": "en", "url": "https://stackoverflow.com/questions/329555", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Focus on a TextBox in a DataTemplate I have DataTemplate containing a TextBox. I'm setting this template to a listbox item on a selection. I'm unable to set focus to textbox in the template. I tried to call MyTemplate.FindName, but it ends up with an Invalid Operation Exception: This operation is valid only on eleme...
{ "language": "en", "url": "https://stackoverflow.com/questions/329556", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Change color of DataGrid in flash cs4 I am using the as3 DataGrid component in a flash project and I want to change the color from black on white to white on black but can't find how to change the colors of the DataGrid control. Can anyone help? This is the flash component, I'm not using flex. A: http://www.adobe.c...
{ "language": "en", "url": "https://stackoverflow.com/questions/329566", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to setup 2 actions with the same name, 1 Authorized and 1 not Authorized? Is it possble to have something like this in ASP.NET MVC... [Authorize] [AcceptVerbs(HttpVerbs.Get)] public string AddData(string Issues, string LabelGUID) { return "Authorized"; } [AcceptVerbs(HttpVerbs.Get)] public string AddData() ...
{ "language": "en", "url": "https://stackoverflow.com/questions/329570", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Dynamic ASP.NET MVC Routes I have a requirement to dynamically change a ASP.NET MVC route depending on the contents of the URL. For example: routes.MapRoute( "Default", "{controller}/{action}/{id}/{value}", new { controller = "Home", action = "Index", id = 0, value = "" } ); I'd like to use the above route fo...
{ "language": "en", "url": "https://stackoverflow.com/questions/329581", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Database Access I want to write a new application that will use a DBMS. In the design stages of this application and weighing the options I found out that the there will be a lot of database accessing which means many queries. My biggest concern with developing this system is the unwieldy nature of SQL select, updat...
{ "language": "en", "url": "https://stackoverflow.com/questions/329601", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Stream compression for network traffic I am writing an xmpp library and I am trying to write a stream to support the zlib compressed data. I have two different versions one based on zlib.net and the other using SharpZipLib. The zlib.net version doesn't recognize the compression and the SharpZipLib version enters a...
{ "language": "en", "url": "https://stackoverflow.com/questions/329607", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Protect Email on Web Site From Robots and Crawlers Closed as duplicate of What are some ways to protect emails on websites from spambots? I am finally puting up my personal web site. I want to publish a webmaster/feedback email on every page, but I am concerned about SPAM crawlers extracting the email address and ...
{ "language": "en", "url": "https://stackoverflow.com/questions/329608", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Decimal vs Double Speed I write financial applications where I constantly battle the decision to use a double vs using a decimal. All of my math works on numbers with no more than 5 decimal places and are not larger than ~100,000. I have a feeling that all of these can be represented as doubles anyways without round...
{ "language": "en", "url": "https://stackoverflow.com/questions/329613", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "56" }
Q: How can I implement commit/rollback for MySQL in PHP? Well basically I have this script that takes a long time to execute and occasionally times out and leaves semi-complete data floating around my database. (Yes I know in a perfect world I would fix THAT instead of implementing commits and rollbacks but I am forced...
{ "language": "en", "url": "https://stackoverflow.com/questions/329622", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: An easy way to run an ASP.Net application at home? I'd like to run some small private/home applications on a local machine, but I dislike the idea to set up a full Win2003 Server with IIS for this. Is there a easy and cheap way to get an ASP.Net application running at home? A: Windows 2000 has ASP, Windows XP Prof...
{ "language": "en", "url": "https://stackoverflow.com/questions/329626", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How does "Find Nearest Locations" work? Nowadays most of the Restaurants and other businesses have a "Find Locations" functionality on their websites which lists nearest locations for a given address/Zip. How is this implemented? Matching the zipcode against the DB is a simple no-brainer way to do but may not always...
{ "language": "en", "url": "https://stackoverflow.com/questions/329628", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Enums in AS3 / Flash / Flex? One thing I really like about AS3 over AS2 is how much more compile-time type-checking it adds. However, it seems to be somewhat lacking in that there is no type-checked enumeration structure available. What's a good (best / accepted) way to do custom enumerated types in AS3? A: your an...
{ "language": "en", "url": "https://stackoverflow.com/questions/329652", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "21" }
Q: ASP.NET MVC Authorization How do I achieve authorization with MVC asp.net? A: Use the Authorize attribute [Authorize] public ActionResult MyAction() { //stuff } You can also use this on the controller. Can pass in users or roles too. If you want something with a little more control, you could try something like...
{ "language": "en", "url": "https://stackoverflow.com/questions/329658", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "32" }
Q: How to use connection pool with java,MySQL and Tomcat 6 How can I use Connection pool in Java+MySQL+Tomcat 6? I've read this article http://dev.mysql.com/tech-resources/articles/connection_pooling_with_connectorj.html but it is still not quite clear for me. Where do I use the Connector/J? Do I put it in a static v...
{ "language": "en", "url": "https://stackoverflow.com/questions/329666", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: How to display a progress bar on top of a control in WPF In a WPF UserControl, I have to make to call to a WebService. I am making this call on a separate thread but I want to inform the user that the call may take some time. The WebMethod returns me a collection of objects and I bind it to a ListBox in my UC. So f...
{ "language": "en", "url": "https://stackoverflow.com/questions/329676", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Where to find the status of the WPF Image Control? One of the nice feature of the Image control is that we can specified an Uri as the ImageSource and the image is automatically downloaded for us. This is great! However, the control doesn't seem to have a property indicating if the image loading is in progress or no...
{ "language": "en", "url": "https://stackoverflow.com/questions/329682", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Representing overloaded methods in UML I am attempting to create a UML diagram representative of some Java code. In a class I have a method that is overloaded. As far as I know, parameters for methods aren't shown in UML diagrams. How do I represent method overloading in UML? Thanks. A: In the sub class you specify...
{ "language": "en", "url": "https://stackoverflow.com/questions/329686", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Can any processing be done on the model? [MVC] I've decided to make a big push towards MVC for all new sites I make. I have a question about whether or not you can have any processing on the model level. The case that brought up this question is a video site. I have a Video class (model) and one of the things I ne...
{ "language": "en", "url": "https://stackoverflow.com/questions/329720", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to handle templates for MVC websites? I have this marked as PHP but only because I'll be using PHP code to show my problem. So I have some code like this for the controller: switch ($page) { case "home": require "views/home.php"; break; case "search": require "views/search.php"; ...
{ "language": "en", "url": "https://stackoverflow.com/questions/329724", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Favourite Colour: Myrtle At work we use confluence. On occasion it crashes, resulting in an error 500 page being generated. This page includes some interesting reference information, including: System Information: favouriteColour: Myrtle javaRuntime: Java(TM) SE Runtime Environment jvmVersion: 1.0 operatin...
{ "language": "en", "url": "https://stackoverflow.com/questions/329726", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Communication between PHP and application I'm playing with an embedded Linux device and looking for a way to get my application code to communicate with a web interface. I need to show some status information from the application on the devices web interface and also would like to have a way to inform the applicatio...
{ "language": "en", "url": "https://stackoverflow.com/questions/329728", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Programming coordinates-based game, like dots or checkers I'm looking to learn some fundamentals on cartesian geometry or coordinates based game programming. Platform is irrelevant, although I'm most proficient in JavaScript, C, Objective-C. Ultimately being able to create something such as dots or checkers would be...
{ "language": "en", "url": "https://stackoverflow.com/questions/329745", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: Did you mean...? How to Guess What the User Meant to Type (on a 404 Page) I'm customizing the 404 page for my website. I'd like it to include a "Did you mean...?" I need to figure out how to do this. Here's what I'm doing so far: I come up with a broad list of files that the user might be looking for, then use lev...
{ "language": "en", "url": "https://stackoverflow.com/questions/329769", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What's the deal with ASP.NET 3.5 Extensions Preview 2? I'm trying to get the MVCToolkit working with an ASP.NET MVC Beta application and ran into an unresolved reference to System.Web.Extensions version 3.6 (ASP.NET MVC Beta comes with System.Web.Extensions version 3.5). All my google searches seem to point to a bro...
{ "language": "en", "url": "https://stackoverflow.com/questions/329772", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Occasional Deadlock I'm having trouble with a web application that will deadlock occasionally There are 3 queries involved. 2 are trying to update a table UPDATE AttendanceRoll SET ErrorFlag = 0 WHERE ContractID = @ContractID AND DATEPART(month,AttendanceDate) = DATEPART(month,@Month_Beginning) AND DATEPART(year,Att...
{ "language": "en", "url": "https://stackoverflow.com/questions/329775", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: ASP.NET - best queue system for a new application My organization is getting ready to implement a new system, which is a asp.net application. The application will have a large queue of offline work that is initiated by the website. This queue will hold different types of activity, ideally in XML messages. Think o...
{ "language": "en", "url": "https://stackoverflow.com/questions/329779", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: submit form when elements change In jQuery, if I assign class=auto_submit_form to a form, it will be submitted whenever any element is changed, with the following code: /* automatically submit if any element in the form changes */ $(function() { $(".auto_submit_form").change(function() { this.submit(); }); }...
{ "language": "en", "url": "https://stackoverflow.com/questions/329805", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: App crashes on changing tabs that contain ListBoxes with ItemTemplates I have a WPF TabControl with two TabItems. Each TabItem contains a ListBox with a separate ObservableCollection as its ItemsSource. Each ListBox has a different ItemTemplate. No matter which TabItem I set to be selected at startup, that tab w...
{ "language": "en", "url": "https://stackoverflow.com/questions/329816", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: MySQL strict select of rows involving many to many tables I have three tables in the many-to-many format. I.e, table A, B, and AB set up as you'd expect. Given some set of A ids, I need to select only the rows in AB that match all of the ids. Something like the following won't work: "SELECT * FROM AB WHERE A_id = ...
{ "language": "en", "url": "https://stackoverflow.com/questions/329822", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Source Control Layout I develop a variety of applications and have 3-4 miscellaneous libraries that I reuse across these apps (one for math, one for database functions etc.). Currently I have one master source directory with each project as a top level directory (including my helper projects). And each project that ...
{ "language": "en", "url": "https://stackoverflow.com/questions/329831", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Encapsulation in javascript I need to create simple reusable javascript object publishing several methods and parameterized constructor. After reading through several "OOP in JavaScript" guides I'm sitting here with an empty head. How on the Earth can I do this? Here my last non-working code: SomeClass = function(id...
{ "language": "en", "url": "https://stackoverflow.com/questions/329837", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: C++ design - Network packets and serialization I have, for my game, a Packet class, which represents network packet and consists basically of an array of data, and some pure virtual functions I would then like to have classes deriving from Packet, for example: StatePacket, PauseRequestPacket, etc. Each one of these ...
{ "language": "en", "url": "https://stackoverflow.com/questions/329838", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: External Repository Changes I use svn:externals to reference several open source projects. I then make some local changes to one of these external projects. Obviously I cannot check these changes back into the external repository. How do I keep these changes in my repository while still maintaining the ability to ea...
{ "language": "en", "url": "https://stackoverflow.com/questions/329843", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Creating a Serial Port in code in VB.net I am trying to create a serial port in VB.net using code only. Because I am creating a class library I cannot use the built-in component. I have tried instantiating a new SeialPort() object, but that does not seem to be enough. I'm sure there is something simple I am missing ...
{ "language": "en", "url": "https://stackoverflow.com/questions/329865", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: connecting to mysql from cygwin I can successfully connect to MySQL from a DOS prompt, but when I try to connect from cygwin, it just hangs. $/cygdrive/c/Program\ Files/MySQL/MySQL\ Server\ 5.1/bin/mysql -u root -p What's wrong? A: Other answers lack the following key detail: Cygwin has two shells: * *Default: ...
{ "language": "en", "url": "https://stackoverflow.com/questions/329866", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "58" }
Q: Can Silverlight 2.0 pages be removed from a collection manually (garbage collected)? I have multiple xaml based pages stored as children of a canvas on another page. I add and remove the children pages as the application runs. However, pages that are removed from the children collection are still running and respo...
{ "language": "en", "url": "https://stackoverflow.com/questions/329870", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: IEnumerator to generics . i have a few classes that i am trying to move to using generics Class1: Curve this class has the following code: public class Curve : IEnumerable IEnumerator IEnumerable.GetEnumerator() { return GetEnumerator(); // Calls non-interface method } public RTRatePointEnumer...
{ "language": "en", "url": "https://stackoverflow.com/questions/329876", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: In Python, is there a concise way to use a list comprehension with multiple iterators? Basically, I would like to build a list comprehension over the "cartesian product" of two iterators. Think about the following Haskell code: [(i,j) | i <- [1,2], j <- [1..4]] which yields [(1,1),(1,2),(1,3),(1,4),(2,1),(2,2),(2,3...
{ "language": "en", "url": "https://stackoverflow.com/questions/329886", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: MVC: View and Model Interaction Regarding Data Access, etc Should the model just be data structures? Where do the services (data access, business logic) sit in MVC? Lets assume I have a view that shows a list of customer orders. I have a controller class that handles the clicks on the view controls (buttons, etc)....
{ "language": "en", "url": "https://stackoverflow.com/questions/329891", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: What happened if CFile::Write throws an exception? Assume that write operation throws an exception half-way. Is there any data written into the file, or is no data written in the file? A: Since you have no view of the internals of CFile (or shouldn't, if it's encapsulated properly), you need to rely on the 'contra...
{ "language": "en", "url": "https://stackoverflow.com/questions/329899", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: CSS: Fixed or Float Layout? My question revolves around CSS Fixed Layout vs a Float Layout that extends to fill the width of the browser. Right now the issue I'm running into is to have the masthead resize depending on the width of the page (something that I understand isn't possible given current browser implementa...
{ "language": "en", "url": "https://stackoverflow.com/questions/329900", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: running ocaml on Mac OS X gives bus error I've just installed Ocaml on Mac OS X, and when I run the ocaml program I get a "Bus Error" with no other clues to what might be going on. Can anyone offer suggestions on where to go from here? EDIT: I installed via the package: http://caml.inria.fr/pub/distrib/ocaml-3.10...
{ "language": "en", "url": "https://stackoverflow.com/questions/329911", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to paste CSV data to Windows Clipboard with C# What I'm trying to accomplish * *My app generates some tabular data *I want the user to be able to launch Excel and click "paste" to place the data as cells in Excel *Windows accepts a format called "CommaSeparatedValue" that is used with it's APIs so this seem...
{ "language": "en", "url": "https://stackoverflow.com/questions/329918", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "34" }
Q: Extracting MAC addresses from UUIDs A program that I work on assumes that the UUID generated by the Windows RPC API call UuidCreateSequential() contains the MAC address of the primary ethernet adapter. Is this assumption correct or should I use a different method to get the MAC address? A: I wouldn't rely on this -...
{ "language": "en", "url": "https://stackoverflow.com/questions/329925", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: To Ajaxify Or Not? I really love the way Ajax makes a web app perform more like a desktop app, but I'm worried about the hits on a high volume site. I'm developing a database app right now that's intranet based, that no more then 2-4 people are going to be accessing at one time. I'm Ajaxing the hell out of it, but...
{ "language": "en", "url": "https://stackoverflow.com/questions/329929", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: SQL select join: is it possible to prefix all columns as 'prefix.*'? I'm wondering if this is possible in SQL. Say you have two tables A and B, and you do a select on table A and join on table B: SELECT a.*, b.* FROM TABLE_A a JOIN TABLE_B b USING (some_id); If table A has columns 'a_id', 'name', and 'some_id', and...
{ "language": "en", "url": "https://stackoverflow.com/questions/329931", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "304" }
Q: When AppInitialize method get invoked in ASP.NET? During practice of customizing VirtualPathProvider, I found that it the custom VirtualPathProvider can be registered in Global.asax or in AppInitialize method according to MSDN http://msdn.microsoft.com/en-us/library/system.web.hosting.virtualpathprovider.aspx. Howev...
{ "language": "en", "url": "https://stackoverflow.com/questions/329936", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: how can I draw it using starUml I am using staruml, I find it is hard to draw a perfect UML class diagram when the relation is complex.uml diagram A: If your UML Diagrams are getting too complex try breaking the digram up into several diagrams each of which covers a smaller subset of classes. You may even want to m...
{ "language": "en", "url": "https://stackoverflow.com/questions/329940", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: Rationale behind return 0 as default value in C/C++ Is there a reason why zero is used as a "default" function return value? I noticed that several functions from the stdlib and almost everywhere else, when not returning a proper number (e.g pow(), strcpy()) or an error (negative numbers), simply return zero. I just...
{ "language": "en", "url": "https://stackoverflow.com/questions/329950", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: Python crypt module -- what's the correct use of salts? First, context: I'm trying to create a command-line-based tool (Linux) that requires login. Accounts on this tool have nothing to do with system-level accounts -- none of this looks at /etc/passwd. I am planning to store user accounts in a text file using the s...
{ "language": "en", "url": "https://stackoverflow.com/questions/329956", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Truncate Decimal number not Round Off Possible Duplicate: c# - How do I round a decimal value to 2 decimal places (for output on a page) I want to truncate the decimals like below i.e. * *2.22939393 -> 2.229 *2.22977777 -> 2.229 A: A function to truncate an arbitrary number of decimals: public decimal Trun...
{ "language": "en", "url": "https://stackoverflow.com/questions/329957", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "38" }
Q: Static Variables, Separate Compilation I wrote a program out, which was all in one file, and the methods were forward declared in a header. The program initially worked perfectly when it was in one file. But when I separated the program, I kept getting random occurrences for the destructor of one of the classes wh...
{ "language": "en", "url": "https://stackoverflow.com/questions/329962", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Replace textarea with rich text editor in Django Admin? I would like to know the best way to replace a standard textarea field with a rich text editor in Django Admin? A: At the date of the post and the answers TinyMCE was quite popular (as it probably remains today). But after some time ckeditor has appeared and m...
{ "language": "en", "url": "https://stackoverflow.com/questions/329963", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "48" }
Q: Is a literal NSString autoreleased or does it need to be released? When creating a string using the following notation: NSString *foo = @"Bar"; Does one need to release foo? Or is foo autoreleased in this case? A: I agree with @Ben\ Gottlieb at "Compiler allocated strings (of the format @"STRING") are constants" b...
{ "language": "en", "url": "https://stackoverflow.com/questions/329977", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "21" }
Q: Activate Firefox tab in Greasemonkey/Javascript? Is this possible? I developed a greasemonkey script that refreshes a page and checks for certain updates. I would like to run this script in a tab and browse the internet in another tab, but then have the script automatically activate it's tab when an update is found....
{ "language": "en", "url": "https://stackoverflow.com/questions/329986", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to paginate an ObservableCollection? I have a ListBox with way too many items in it and the UI is getting slower and slower (virtualization is on, etc). So I was thinking about displaying only the first 20 items and allow to user to navigate through the result set (i.e. ObservableCollection). Does anybody know i...
{ "language": "en", "url": "https://stackoverflow.com/questions/329988", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Are browsers other than Firefox planning on supporting -moz CSS properties, or does CSS3 have an equivalent? As of right now I believe only Firefox support -moz-border-radius property. I am surprised that twitter uses it. Are any other browsers planning on supporting this or does CSS3 have something like this in the...
{ "language": "en", "url": "https://stackoverflow.com/questions/329993", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Flash CS3 error: fl.getDocumentDOM() has no properties What causes the publish error: "fl.getDocumentDOM() has no properties" ? The error occurs only when using the "Test Project" button in the project pane. It doesn't cause the publish to fail, it's just annoying. A: This occurs when you don't have any flash docum...
{ "language": "en", "url": "https://stackoverflow.com/questions/330004", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: In Ruby, getoptlong destructively parses ARGV. Is there a way around this? I need to invoke getoptlong multiple times, but after the first time ARGV is empty. A: Capture the args before the first call, put them back when you're done. Sounds like you're doing something kind of weird, though. Edit: (expanded) There'...
{ "language": "en", "url": "https://stackoverflow.com/questions/330008", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do I show a caret (^) in math mode in LaTeX? I'm trying to display a caret (^) in math mode in LaTeX to represent the exclusive or operation implemented in the "C languages". By default, ^ is for creating a superscript in math mode. The closest I can seem to get is by using \wedge, which isn't the same. A: How ...
{ "language": "en", "url": "https://stackoverflow.com/questions/330010", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: What is the difference between Eclipse and Netbeans if I want to use only the Java in it? I recently got a Dell XPS 64-bit Vista for myself. Eclipse doesn't have their 64-bit version, but I've read on forums that they download Eclipse and work with Java 1.5 on the Vista with only some problems. I have Java 1.6 and N...
{ "language": "en", "url": "https://stackoverflow.com/questions/330027", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "26" }
Q: List selectors for Objective-C object I have an object, and I want to list all the selectors to which it responds. It feels like this should be perfectly possible, but I'm having trouble finding the APIs. A: This is also possible with Swift: let obj = NSObject() var mc: UInt32 = 0 let mcPointer = withUnsafeMutable...
{ "language": "en", "url": "https://stackoverflow.com/questions/330030", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "43" }
Q: Checking if a file is a .NET assembly I've seen some methods of checking if a PEFile is a .NET assembly by examining the binary structure. Is that the fastest method to test multiple files? I assume that trying to load each file (e.g. via Assembly.ReflectionOnlyLoad) file might be pretty slow since it'll be loading ...
{ "language": "en", "url": "https://stackoverflow.com/questions/330032", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Silverlight & WCF: Max message size When I pass a list of objects out of my silverlight app using WCF everything works fine until the List grows too big. It seems that when I exceed 80 items I get the error: The remote server returned an unexpected response: (404) Not Found I'm presuming that it's because the List h...
{ "language": "en", "url": "https://stackoverflow.com/questions/330034", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Persisting Child Objects when the Parent is incomplete in a web application I am trying to establish the best practice for handling the creation of child objects when the parent object is incomplete or doesn't yet exist in a web application. I want to handle this in a stateless way so in memory objects are out. For ...
{ "language": "en", "url": "https://stackoverflow.com/questions/330035", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: C++ CLI structure to byte array I have a structure that represents a wire format packet. In this structure is an array of other structures. I have generic code that handles this very nicely for most cases but this array of structures case is throwing the marshaller for a loop. Unsafe code is a no go since I can't ...
{ "language": "en", "url": "https://stackoverflow.com/questions/330043", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: SharePoint Calendar List : Restrict entering second item with same From and To date I want to restrict entry of new item into sharepoint calendar list with the same from and to dates for the same created user. Let me know this can done, accessing sharepoint object model with C#. Environment WSS3.0, MOSS 2007, C# Tha...
{ "language": "en", "url": "https://stackoverflow.com/questions/330051", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How much overhead does 'Update Check' have for LINQ UPDATES I have a simple row that I edit using LINQ. It has about 30 columns, including a primary key numeric sequence. When an UPDATE is performed through LINQ, the UPDATE statement includes all the columns of the table (for concurrency checking). I'm wondering ho...
{ "language": "en", "url": "https://stackoverflow.com/questions/330053", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Clustering Lat/Longs in a Database I'm trying to see if anyone knows how to cluster some Lat/Long results, using a database, to reduce the number of results sent over the wire to the application. There are a number of resources about how to cluster, either on the client side OR in the server (application) side .. bu...
{ "language": "en", "url": "https://stackoverflow.com/questions/330056", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }