text
stringlengths
8
267k
meta
dict
Q: ReportViewer Division by zero I have some formulas in my reports, and to prevent divsion by zero I do like this in the expression field: =IIF(Fields!F1.Value <> 0, Fields!F2.Value/Fields!F1.Value, 0) This normally works fine, but when both F1 and F2 are zero, I get "#Error" in the report, and I get this warning: "Th...
{ "language": "en", "url": "https://stackoverflow.com/questions/158508", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: .NET enterprise application platform (same as JBoss to Java) As a .NET developer I'm asking whether JBoss alternatives exist to be "more suitable for .NET development" as an enterprise application platform. Please do not make any suggestions, such as "make JBoss to expose WebServices"... A: Java lacks a "hosting" s...
{ "language": "en", "url": "https://stackoverflow.com/questions/158509", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Is it possible to make git svn dcommit result in a single svn commit? According to the manual, git dcommit “will create a revision in SVN for each commit in git.” But is there a way to avoid multiple Subversion revisions? That is, to have git merge all changes prior to performing the svn commit? A: Ryan Tomayko wro...
{ "language": "en", "url": "https://stackoverflow.com/questions/158514", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "42" }
Q: How to handle a lot of flags for a SQL record I need advice on how to handle relatively large set of flags in my SQL2k8 table. Two question, bear with me please :) Let's say I have 20 flags I'd like to store for one record. For example: CanRead = 0x1 CanWrite = 0x2 CanModify = 0x4 ... and so on to the final flag 2^2...
{ "language": "en", "url": "https://stackoverflow.com/questions/158519", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: In PowerShell, how can I determine the root of a drive (supposing it's a networked drive) In PowerShell, even if it's possible to know if a drive is a network drive: see In PowerShell, how can I determine if the current drive is a networked drive or not? When I try to get the "root" of the drive, I get back the driv...
{ "language": "en", "url": "https://stackoverflow.com/questions/158520", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Is there an easy way to implement LINQ to object with a DataContext? I have a working LINQ to SQL model. I want to be able to use the same model but with a connection to a DataSet object, instead of SQL Server. I need to be able to query the model, modify fields, as well as do insert and delete operations. Is ther...
{ "language": "en", "url": "https://stackoverflow.com/questions/158521", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Reading a windows *.dmp file I was wonder if any knows how to open up a windows *.dmp file after a application crash written C/C++. A: Here's a link to an article from Microsoft on reading the small memory dump files that Windows creates for debugging A: When using Debugging Tools for Windows be sure to setup symb...
{ "language": "en", "url": "https://stackoverflow.com/questions/158534", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: Setting Focus on a Control within a ControlTemplate in WPF In an application I'm working on, we have a bunch of custom controls with their ControlTemplates defined in Generic.xaml. For instance, our custom textbox would look similar to this: <Style TargetType="{x:Type controls:FieldTextBox}"> <Setter Property="T...
{ "language": "en", "url": "https://stackoverflow.com/questions/158536", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: not working in firefox and chrome A: You're looking for <br /> instead of </br> Self closing tags such as br have the slash at the end of the tag. Here are the other self-closing tags in XHTML: * *What are all the valid self-closing tags in XHTML (as implemented by the major browsers)? A: IE7 is more forgiving...
{ "language": "en", "url": "https://stackoverflow.com/questions/158539", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Check/uncheck parents and children Can you do a better code? I need to check/uncheck all childs according to parent and when an child is checked, check parent, when all childs are unchecked uncheck parent. $(".parent").children("input").click(function() { $(this).parent().siblings("input").attr("checked", th...
{ "language": "en", "url": "https://stackoverflow.com/questions/158544", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Best way to store and use a large text-file in python I'm creating a networked server for a boggle-clone I wrote in python, which accepts users, solves the boards, and scores the player input. The dictionary file I'm using is 1.8MB (the ENABLE2K dictionary), and I need it to be available to several game solver clas...
{ "language": "en", "url": "https://stackoverflow.com/questions/158546", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Get street address at lat/long pair I've seen that it's possible to get the latitude and longitude (geocoding, like in Google Maps API) from a street address, but is it possible to do the reverse and get the street address when you know what the lat/long already is? The application would be an iPhone app (and why th...
{ "language": "en", "url": "https://stackoverflow.com/questions/158557", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "22" }
Q: Tomcat 6: how to delete temporary files after a web method call has ended? I have a temporary file with data that's returned as part of a SOAP response via a MTOM binary attachment. I would like to trash it as soon as the method call "ends" (i.e., finishes transferring). What's the best way for me to do this? The...
{ "language": "en", "url": "https://stackoverflow.com/questions/158568", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Best practices: .NET: How to return PK against an oracle database? With SQLServer, it seems to be generally accepted that adding a SELECT SCOPE_IDENTITY() to the end of your insert is the best way to return the PK of the newly-inserted record, assuming you're using an auto-increment field for the pk. However, I can...
{ "language": "en", "url": "https://stackoverflow.com/questions/158571", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Programmatically align a toolbar on top of the iPhone keyboard In several cases I want to add a toolbar to the top of the iPhone keyboard (as in iPhone Safari when you're navigating form elements, for example). Currently I am specifying the toolbar's rectangle with constants but because other elements of the inter...
{ "language": "en", "url": "https://stackoverflow.com/questions/158574", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "94" }
Q: Simple .net portal. Easy to add new modules I am writing a simple database with web access. I have previous experience with microsoft's (very!) old IBuySpy portal system. I am sure there must be something a bit more up to date I could use now! I want a simple light weight system that will allow my friend to have tab...
{ "language": "en", "url": "https://stackoverflow.com/questions/158584", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do you add a timed delay to a C++ program? I am trying to add a timed delay in a C++ program, and was wondering if anyone has any suggestions on what I can try or information I can look at? I wish I had more details on how I am implementing this timed delay, but until I have more information on how to add a time...
{ "language": "en", "url": "https://stackoverflow.com/questions/158585", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "131" }
Q: How do I rig Firebug 1.2 to behave the way previous versions did? After waffling for months I've installed Firefox 3 on my development machine and am regretting it, because the new Firebug is sucking my will to live. Flakiness aside--it's not catching basic syntax errors--there's a whole new layer of UI all over ev...
{ "language": "en", "url": "https://stackoverflow.com/questions/158593", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Synchronize DataSet What is the best approach to synchronizing a DataSet with data in a database? Here are the parameters: * *We can't simply reload the data because it's bound to a UI control which a user may have configured (it's a tree grid that they may expand/collapse) *We can't use a changeflag (like a Up...
{ "language": "en", "url": "https://stackoverflow.com/questions/158617", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: MainSoft Grasshopper, .Net to Java I just stumbled upon MainSoft's Grasshopper, which claims to cross-compile .Net ILM to Java bytecode. It seems to use the Mono implementation of the .Net libraries. All of the samples refer to web apps, but my requirement would be to cross-compile a .Net API (class library) to a Ja...
{ "language": "en", "url": "https://stackoverflow.com/questions/158618", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Marshal C++ "string" class in C# P/Invoke I have a function in a native DLL defined as follows: #include <string> void SetPath(string path); I tried to put this in Microsoft's P/Invoke Interop Assistant, but it chokes on the "string" class (which I think is from MFC?). I have tried marshaling it as a variety of dif...
{ "language": "en", "url": "https://stackoverflow.com/questions/158628", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How can I send an HTTP POST request to a server from Excel using VBA? What VBA code is required to perform an HTTP POST from an Excel spreadsheet? A: You can use ServerXMLHTTP in a VBA project by adding a reference to MSXML. * *Open the VBA Editor (usually by editing a Macro) *Go to the list of Available ...
{ "language": "en", "url": "https://stackoverflow.com/questions/158633", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "160" }
Q: Doing a Cast Within a LINQ Query Is it possible to do a cast within a LINQ query (for the compiler's sake)? The following code isn't terrible, but it would be nice to make it into one query: Content content = dataStore.RootControl as Controls.Content; List<TabSection> tabList = (from t in content.ChildControls ...
{ "language": "en", "url": "https://stackoverflow.com/questions/158634", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "30" }
Q: Same Presenter working with different Repositories You do you manage the same presenter working with different repositories using the MVP pattern? I just have multiple constructor overloads and the presenter simply uses the one that is suitable for the scenario. AddCustomerPresenter presenter = new AddCustomerPres...
{ "language": "en", "url": "https://stackoverflow.com/questions/158651", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What should I do when 'svn cleanup' fails? I have a lot of changes in a working folder, and something screwed up trying to do an update. Now when I issue an 'svn cleanup' I get: >svn cleanup . svn: In directory '.' svn: Error processing command 'modify-wcprop' in '.' svn: 'MemPoolTests.cpp' is not under version cont...
{ "language": "en", "url": "https://stackoverflow.com/questions/158664", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "255" }
Q: How do I delete a dirset of directories with Ant? I want to delete all directories and subdirectories under a root directory that are contain "tmp" in their names. This should include any .svn files too. My first guess is to use <delete> <dirset dir="${root}"> <include name="**/*tmp*" /> </dirset>...
{ "language": "en", "url": "https://stackoverflow.com/questions/158665", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: onbeforeunload support detection I'd like to check if the current browser supports the onbeforeunload event. The common javascript way to do this does not seem to work: if (window.onbeforeunload) { alert('yes'); } else { alert('no'); } Actually, it only checks whether some handler has been attached to the e...
{ "language": "en", "url": "https://stackoverflow.com/questions/158673", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "21" }
Q: TCP Connection Life How long can I expect a client/server TCP connection to last in the wild? I want it to stay permanently connected, but things happen, so the client will have to reconnect. At what point do I say that there's a problem in the code rather than there's a problem with some external equipment? A: It...
{ "language": "en", "url": "https://stackoverflow.com/questions/158674", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "28" }
Q: Spreadsheet-like functionality in web app I have a web app for commercial property management that needs spreadsheet-like functionality for doing budgets. I don't want to use Google Sheets because my users won't necessarily have a Google account. So is there anything out there that I could use? I looked and could o...
{ "language": "en", "url": "https://stackoverflow.com/questions/158695", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Is it OK to use HttpRuntime.Cache outside ASP.NET applications? Scott Hanselman says yes. Adding System.Web to your non-web project is a good way to get folks to panic. Another is adding a reference to Microsoft.VisualBasic in a C# application. Both are reasonable and darned useful things to do, though. MSDN says ...
{ "language": "en", "url": "https://stackoverflow.com/questions/158703", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "39" }
Q: How do I properly clean up Excel interop objects? I'm using the Excel interop in C# (ApplicationClass) and have placed the following code in my finally clause: while (System.Runtime.InteropServices.Marshal.ReleaseComObject(excelSheet) != 0) { } excelSheet = null; GC.Collect(); GC.WaitForPendingFinalizers(); Althoug...
{ "language": "en", "url": "https://stackoverflow.com/questions/158706", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "800" }
Q: How do you find the largest font size that won't break a given text? I'm trying to use CSS (under @media print) and JavaScript to print a one-page document with a given piece of text made as large as possible while still fitting inside a given width. The length of the text is not known beforehand, so simply using a...
{ "language": "en", "url": "https://stackoverflow.com/questions/158710", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do you efficiently generate a list of K non-repeating integers between 0 and an upper bound N The question gives all necessary data: what is an efficient algorithm to generate a sequence of K non-repeating integers within a given interval [0,N-1]. The trivial algorithm (generating random numbers and, before addi...
{ "language": "en", "url": "https://stackoverflow.com/questions/158716", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "29" }
Q: What information has been released regarding the .NET Framework 4.0? As Microsoft seems to have started their trickle feed of information regarding .NET 4.0, I thought I'd ask the question as I'm sure there's more out there than I've spotted! What information has been released regarding the .NET Framework 4.0? A: I...
{ "language": "en", "url": "https://stackoverflow.com/questions/158729", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How would you migrate a multi-site ClearCase/ClearQuest environment to all Open Source? I work in an multi-site environment that's currently using Rational ClearCase for source control and Rational ClearQuest for issue tracking (I accept your condolences ahead of time). As a rough estimate I would say this is suppo...
{ "language": "en", "url": "https://stackoverflow.com/questions/158737", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: What is an appropriate use for ASP.NET's MultiView control? What are some scenarios where MultiView would be a good choice? The MultiView control along with its View controls simply seem to extend the notion of Panels. Both Panels and MultiViews seem prone to abuse. If your UI concerns and biz logic concerns are p...
{ "language": "en", "url": "https://stackoverflow.com/questions/158741", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Can you combine multiple images into a single one using JavaScript? I am wondering if there is a way to combine multiple images into a single image using only JavaScript. Is this something that Canvas will be able to do. The effect can be done with positing, but can you combine them into a single image for downloa...
{ "language": "en", "url": "https://stackoverflow.com/questions/158750", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: Using Linq with WCF I am looking for any examples or guides to using Linq over WCF (n-tier application). Please specify if you are showing something for Linq-to-SQL or Linq-to-entities. I would like to see usage examples for both. I am wondering how things like deffered execution works over WCF (if it works at all)...
{ "language": "en", "url": "https://stackoverflow.com/questions/158760", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Handle exception on service startup I'm writing a series of Windows services. I want them to fail if errors are thrown during startup (in OnStart() method). I had assumed that merely throwing an error in OnStart() would do this, but I'm finding that instead it "Starts" and presents me with a message stating "The s...
{ "language": "en", "url": "https://stackoverflow.com/questions/158772", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: Are there any data warehouse frameworks? I've got a lot of mysql data that I need to generate reports from. It's mostly historic data so it won't be changing much, but it weighs in at 20-30 gigabytes easily and is expected to grow. I currently have a collection of php scripts that will do some complex queries and ou...
{ "language": "en", "url": "https://stackoverflow.com/questions/158775", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: Should I return null from or apply the "null object" pattern to a function returning a Date? Let's say you have a function that returns a date: Date myFunc(paramA, paramB){ //conditionally return a date? } Is it appropriate to return null from this function? This seems ugly because it forces clients to check fo...
{ "language": "en", "url": "https://stackoverflow.com/questions/158778", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Update fonts recursively on a Delphi form I'm trying to iterate all the controls on a form and enable ClearType font smoothing. Something like this: procedure TForm4.UpdateControls(AParent: TWinControl); var I: Integer; ACtrl: TControl; tagLOGFONT: TLogFont; begin for I := 0 to AParent.ControlCount-1 do be...
{ "language": "en", "url": "https://stackoverflow.com/questions/158780", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Is there a way to override ConfigurationManager.AppSettings? I really want to be able to have a way to take an app that currently gets its settings using ConfigurationManager.AppSettings["mysettingkey"] to actually have those settings come from a centralized database instead of the app.config file. I can make a cus...
{ "language": "en", "url": "https://stackoverflow.com/questions/158783", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "22" }
Q: Get the NTLM credentials from the Response on an APSX page I have an ASPX page (On server A) which is invoked using NTLM credentials. Part of that page's job is to call an HTML page (On server B) and proxy it back to the client. (The firewall allows access to A, but not to B. The user would normally be allowed ac...
{ "language": "en", "url": "https://stackoverflow.com/questions/158800", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Change .NET Framework version of application pool to 3.5? I've installed .NET Framework 3.5 SP1 on web server (Server 2008 Enterprise), so running IIS 7.0. I want to change the version of .NET Framework used by an existing site. So I right-click on appropriate Application Pool and selected Edit Application Pool. T...
{ "language": "en", "url": "https://stackoverflow.com/questions/158804", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: jEditable input-box CSS style I am trying to style an input-box rendered using jEditable. I want to change the color of the table-cell when the text is double-clicked and made editable. Like this: alt text http://www.hongaijitsu.com/temp/foobar/public/Picture-2.png This is where I am at the moment: jEditable CSS Pro...
{ "language": "en", "url": "https://stackoverflow.com/questions/158806", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Costs vs Consistant gets What does it indicate to see a query that has a low cost in the explain plan but a high consistent gets count in autotrace? In this case the cost was in the 100's and the CR's were in the millions. A: At best, the cost is the optimizer's estimate of the number of I/O's that a query would pe...
{ "language": "en", "url": "https://stackoverflow.com/questions/158814", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How hard is it to migrate a web app from localhost to a hosting platform? Since I'm not a huge fan of any of the current solutions for managing the resources and knowledge that I have, I was thinking about making my own solution, which will involve custom code as well as possible integration of FOSS solutions. I wou...
{ "language": "en", "url": "https://stackoverflow.com/questions/158816", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Create JSON with .net First off, let me start off that I am not a .net developer. The reason why I am asking this question is that we rolled out our REST-API and one of our first integration partners is a .net shop. So basically we assumed that .net would provide some sort of wrapper to create JSON, but the develope...
{ "language": "en", "url": "https://stackoverflow.com/questions/158818", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: Managed C++ Assembly Attributes Is there a way to add assembly attributes to a Managed C++ assembly? In a typical C# project, there is usually a line of code in the AssemblyInfo.cs file like the following one: [assembly: AssemblyTitle("Some Assembly")] I have a private assembly attribute that I want to add (not one ...
{ "language": "en", "url": "https://stackoverflow.com/questions/158821", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Random element in a map what is a good way to select a random element from a map? C++. It is my understanding that maps don't have random access iterators. The key is a long long and the map is sparsely populated. A: Maybe draw up a random key, then use lower_bound to find the closest key actually contained. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/158836", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "45" }
Q: mod_rewrite for trailing slash problem I'm pulling my hair out on what should be an insanely simple problem. We are running WebSphere IHS (Apache) through an F5 BigIP. BigIP is doing the https translation for us. Our url (changed for web, not valid) is https://superniftyserver.com/lawson/portal. When someone type...
{ "language": "en", "url": "https://stackoverflow.com/questions/158848", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: What are some good pop-up dialog boxes for Ruby on Rails I want to use modal pop-up windows in our web app in Ruby on Rails. Note that I don't want to create a new browser window, but a sub-window inside the existing webpage. We've tried things like TinyBox, but there are issues with returning error information fr...
{ "language": "en", "url": "https://stackoverflow.com/questions/158851", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Creating a file progress bar in PHP Does anyone know of any methods to create a file upload progress bar in PHP? I have often heard that it's impossible. I have one idea, but not sure if it would work: have a normal file upload, but instead submit to an iframe. When this is submitted, store the file information (siz...
{ "language": "en", "url": "https://stackoverflow.com/questions/158853", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Knowing whether SubVersion working copy has been updated Is there a way to have a file that is modified / touched whenever the WC is updated to a new revision? Or, as the second-best option, whenever svn update is executed? Here's the motivation: I want to have the SVN revision number inside my executable. So I have...
{ "language": "en", "url": "https://stackoverflow.com/questions/158856", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Am I subscribing to YUI Menu events improperly? I've read and followed YUI's tutorial for subscribing to Menu events. I also looked through the API and bits of the code for Menu, MenuBar, and Custom Events, but the following refuses to work // oMenuBar is a MenuBar instance with submenus var buyMenu = oMenuBar.getS...
{ "language": "en", "url": "https://stackoverflow.com/questions/158864", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Are doubles faster than floats in C#? I'm writing an application which reads large arrays of floats and performs some simple operations with them. I'm using floats, because I thought it'd be faster than doubles, but after doing some research I've found that there's some confusion about this topic. Can anyone elabora...
{ "language": "en", "url": "https://stackoverflow.com/questions/158889", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "56" }
Q: Limiting HTML Input into Text Box How do I limit the types of HTML that a user can input into a textbox? I'm running a small forum using some custom software that I'm beta testing, but I need to know how to limit the HTML input. Any suggestions? A: You didn't state what the forum was built with, but if it's PHP, ch...
{ "language": "en", "url": "https://stackoverflow.com/questions/158893", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to make a Windows Forms .NET application display as tray icon? What needs to be done to have your .NET application show up in Window's system tray as icon? And how do you handle mousebutton clicks on said icon? A: You can add the NotifyIcon component from the toolbox onto your main form. This has events such as...
{ "language": "en", "url": "https://stackoverflow.com/questions/158895", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: MFC File upload How would I upload a file to a webserver using c++ and MFC. We are not using .Net. Would I need to open a socket and do everything myself? If so, where is a good reference to follow? A: You don't want to use direct socket calls. It's hard to get HTTP right this way. The easier way is to the WinIN...
{ "language": "en", "url": "https://stackoverflow.com/questions/158908", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Cropping an UIImage I've got some code that resizes an image so I can get a scaled chunk of the center of the image - I use this to take a UIImage and return a small, square representation of an image, similar to what's seen in the album view of the Photos app. (I know I could use a UIImageView and adjust the crop m...
{ "language": "en", "url": "https://stackoverflow.com/questions/158914", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "218" }
Q: Easiest way to migrate Word 2003 custom macro toolbars into Word 2007? I have a series of macros and toolbars that I developed for Word 2003. Now that my office is upgrading to Word 2007, I need to migrate them. The macros themselves migrate with zero effort, but the toolbars are a different issue. A random subse...
{ "language": "en", "url": "https://stackoverflow.com/questions/158930", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Find top 3 closest targets in Actionscript 3 I have an array of characters that are Points and I want to take any character and be able to loop through that array and find the top 3 closest (using Point.distance) neighbors. Could anyone give me an idea of how to do this? A: This is a new and improved version of the...
{ "language": "en", "url": "https://stackoverflow.com/questions/158933", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Why I can't parse a SimpleDateFormat with pattern "MMMMM dd" in Java? I need to parse a string like "February 12, 1981" as a Date. I use SimpleDateFormat. But if I do: new SimpleDateFormat("MMMMM dd, yyyy").parse("February 12, 1981") I get java.text.ParseException. I tried to reduce it to see where the problem is. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/158935", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Resetting Buffers in Vim Is it possible to reset the alternate buffer in a vim session to what it was previously? By alternate buffer, I mean the one that is referred to by #, i.e. the one that is displayed when you enter cntl-^. Say I've got two files open main.c and other.c and :ls gives me: 1 %a "main.c" ...
{ "language": "en", "url": "https://stackoverflow.com/questions/158940", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: TFS checkin RSS feed How can I to generate an RSS feed of Team Foundation Server commit messages? In Visual Studio's Source Control Explorer, the "View History" option produces a nice GUI view. Likewise, the command line tf history /recursive /stopafter:40 . produces a nice GUI view. I'd like an RSS feed that w...
{ "language": "en", "url": "https://stackoverflow.com/questions/158941", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: What are the legalities of repackaging other's RSS feeds into a new presentation? I know that services like my.yahoo.com allow you to add content from RSS feeds to your personal page, but in general they are links which draw the user to the site which provided the feed. What are the legalities and implications of u...
{ "language": "en", "url": "https://stackoverflow.com/questions/158943", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: When should an oldschool flash developer use flex? What are the key differences between Flash and Flex? I have over five years experience with flash and feel very comfortable developing with it and ActionScript3. I find myself more and more curious about Flex and want to know when it is best to use flash or flex. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/158954", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: What types should I use to represent percentages in C# and SQL Server? I'm thinking floats. For the record I'm also using NHibernate. A: The answer is application-dependent. Others have pointed out that decimal is better than float for representing an exact value. But sometimes it's better to use a float for the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/158966", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "25" }
Q: Changing Vim indentation behavior by file type Could someone explain to me in simple terms the easiest way to change the indentation behavior of Vim based on the file type? For instance, if I open a Python file it should indent with 2 spaces, but if I open a Powershell script it should use 4 spaces. A: This might b...
{ "language": "en", "url": "https://stackoverflow.com/questions/158968", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "434" }
Q: ASP.NET UpdatePanel Time Out I'm making a request from an UpdatePanel that takes more then 90 seconds. I'm getting this timeout error: Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerTimeoutException: The server request timed out. Does anyone know if there is a way to increase the amount of tim...
{ "language": "en", "url": "https://stackoverflow.com/questions/158975", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "58" }
Q: How to relate objects from multiple contexts using the Entity Framework I am very new to the entity framework, so please bear with me... How can I relate two objects from different contexts together? The example below throws the following exception: System.InvalidOperationException: The relationship between the t...
{ "language": "en", "url": "https://stackoverflow.com/questions/158986", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: PrintDialog filter list of printers I need to, preferably in C# - but c++ will do, find a way to filter the list of printers in the windows print dialog for any windows printing. I have come across WinAPIOverride and have figured I am going to have to write my own dll which overrides the method to get the printers l...
{ "language": "en", "url": "https://stackoverflow.com/questions/158993", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Runtime CSS fails silently when Flex application is loaded by a non-Flex application I have compiled a CSS swf file which includes embedded skins for my Flex application. In our download product, this CSS works fine. On the web, a non-Flex container is loading the Flex application, and the CSS fails silently. When...
{ "language": "en", "url": "https://stackoverflow.com/questions/158996", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Max and min values in a C++ enum Is there a way to find the maximum and minimum defined values of an enum in c++? A: No. An enum in C or C++ is simply a list of constants. There is no higher structure that would hold such information. Usually when I need this kind of information I include in the enum a max and min ...
{ "language": "en", "url": "https://stackoverflow.com/questions/159006", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "87" }
Q: generate HTML document server-side with jquery and classic asp Here is my question, Would it be possible, knowing that classic asp support server-side javascript, to be able to generate "server side HTML" to send to the client like Response.write $(page).html() Of course it would be great to use jQuery to do it b...
{ "language": "en", "url": "https://stackoverflow.com/questions/159011", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What is the use of a Dispatcher Object in WPF? What is the use of a Dispatcher Object in WPF? A: Almost every WPF element has thread affinity. This means that access to such an element should be made only from the thread that created the element. In order to do so, every element that requires thread affinity is der...
{ "language": "en", "url": "https://stackoverflow.com/questions/159015", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "23" }
Q: Named string formatting in C# Is there any way to format a string by name rather than position in C#? In python, I can do something like this example (shamelessly stolen from here): >>> print '%(language)s has %(#)03d quote types.' % \ {'language': "Python", "#": 2} Python has 002 quote types. Is there any wa...
{ "language": "en", "url": "https://stackoverflow.com/questions/159017", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "156" }
Q: Are C++ enums signed or unsigned? Are C++ enums signed or unsigned? And by extension is it safe to validate an input by checking that it is <= your max value, and leave out >= your min value (assuming you started at 0 and incremented by 1)? A: Even some old answers got 44 upvotes, I tend to disagree with all of the...
{ "language": "en", "url": "https://stackoverflow.com/questions/159034", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "116" }
Q: How can foreign key constraints be temporarily disabled using T-SQL? Are disabling and enabling foreign key constraints supported in SQL Server? Or is my only option to drop and then re-create the constraints? A: First post :) For the OP, kristof's solution will work, unless there are issues with massive data and t...
{ "language": "en", "url": "https://stackoverflow.com/questions/159038", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "910" }
Q: Wasabi like web programming language Are there any open source or commercial web programming language that function much like Fog Creek's Wasabi? As in you write your web app in this parent language and it then compiles down to php for Linux hosts and ASP.NET for Windows hosts. A: Haxe is the closest I've seen, bu...
{ "language": "en", "url": "https://stackoverflow.com/questions/159039", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: What is the correct term for the documentation that we put just above a method declaration? I'm writing a whitepaper and realized that I am not sure what the official term is for the kind of internal documentation that we put as a comment block before a declaration of definition. The same thing that eventually becom...
{ "language": "en", "url": "https://stackoverflow.com/questions/159059", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Windows services with windows forms in the same process I have a c# application that runs as a windows service controlling socket connections and other things. Also, there is another windows forms application to control and configure this service (systray with start, stop, show form with configuration parameters). I...
{ "language": "en", "url": "https://stackoverflow.com/questions/159076", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Composite primary keys versus unique object ID field I inherited a database built with the idea that composite keys are much more ideal than using a unique object ID field and that when building a database, a single unique ID should never be used as a primary key. Because I was building a Rails front-end for this d...
{ "language": "en", "url": "https://stackoverflow.com/questions/159087", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "71" }
Q: DependencyProperty and DataBinding? In WPF: Can someone please explain the relationship between DependencyProperty and Databinding? I have a property in my code behind I want to be the source of my databinding. When does a DependencyProperty (or does it) come into play if I want to bind this object to textboxes on t...
{ "language": "en", "url": "https://stackoverflow.com/questions/159088", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Issue with XDocument and the BOM (Byte Order Mark) Is there any way to output the contents of an XDocument without the BOM? When reading the output with Flash, it causes errors. A: If you're writing the XML with an XmlWriter, you can set the Encoding to one that has been initialized to leave out the BOM. EG: Syste...
{ "language": "en", "url": "https://stackoverflow.com/questions/159097", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Is it possible to use a C++ .lib file from within a C# program? Is it possible to use a C++ .lib file from within a C# program? A: There are plenty of ways. Read about "interop" in MSDN.. One way is to expose the lib as a DLL, and then use pinvoke to call these functions from a C# project. That limits you to a C-st...
{ "language": "en", "url": "https://stackoverflow.com/questions/159103", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Which Type of Input is Least Vulnerable to Attack? Which type of input is least vulnerable to Cross-Site Scripting (XSS) and SQL Injection attacks. PHP, HTML, BBCode, etc. I need to know for a forum I'm helping a friend set up. A: (I just posted this in a comment, but it seems a few people are under the impression ...
{ "language": "en", "url": "https://stackoverflow.com/questions/159114", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I match any character across multiple lines in a regular expression? For example, this regex (.*)<FooBar> will match: abcde<FooBar> But how do I get it to match across multiple lines? abcde fghij<FooBar> A: "." normally doesn't match line-breaks. Most regex engines allows you to add the S-flag (also calle...
{ "language": "en", "url": "https://stackoverflow.com/questions/159118", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "559" }
Q: DLL versions and Visual Studio attach to process I'm trying to use VS's attach to process tool to debug add-ins I'm developing for Sql Server Reporting Services. I am able to correctly debug it with attach to process when I copy dll's and pdb's in my project debug/bin dir to the ReportServer/bin dir. But, if I use ...
{ "language": "en", "url": "https://stackoverflow.com/questions/159135", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Getting MAC Address I need a cross platform method of determining the MAC address of a computer at run time. For windows the 'wmi' module can be used and the only method under Linux I could find was to run ifconfig and run a regex across its output. I don't like using a package that only works on one OS, and parsi...
{ "language": "en", "url": "https://stackoverflow.com/questions/159137", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "135" }
Q: Branch Current changes then "rollback" in TFS I have a specific changeset that I want to "rollback" my Development branch to, but I want to take all of the the changes after that specific changeset and put them in to a new branch. Is this possible in TFS? If so, how could I do such a thing? Thanks, Dave A: Well.. T...
{ "language": "en", "url": "https://stackoverflow.com/questions/159138", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Groovy executing shell commands Groovy adds the execute method to String to make executing shells fairly easy; println "ls".execute().text but if an error happens, then there is no resulting output. Is there an easy way to get both the standard error and standard out? (other than creating a bunch of code to; crea...
{ "language": "en", "url": "https://stackoverflow.com/questions/159148", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "210" }
Q: Check out from a remote SVN repository TO a remote location? Is there a way with SVN to check out from a remote repository to another remote location rather than my local file system? Something like: svn co http://myrepository/svn/project ssh me@otherlocation.net:/var/www/project A: I think you could do: ssh me@ot...
{ "language": "en", "url": "https://stackoverflow.com/questions/159152", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Sql 05 express management studio versus standard What are the differences between the free sql express 05 management studio and the licensed version? A: Management Studio Express cannot manage the following: * *SQL Server Analysis Services *Integration Services *Notification Services *Reporting Services *SQL...
{ "language": "en", "url": "https://stackoverflow.com/questions/159154", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What's the difference between DTCPing and DTCTester? I've used DTCTester before to diagnose MSDTC problems. However, I just noticed DTCPing seems to do about the same thing. What's the difference between these two? From what I can tell so far, DTCPing needs to run on both client and server machines, whereas DTCTeste...
{ "language": "en", "url": "https://stackoverflow.com/questions/159173", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How do you convert pixels to printed inches in JavaScript? I want to resize the font of a SPAN element's style until it the SPAN's text is 7.5 inches wide when printed out on paper, but JavaScript only reports the SPAN's clientWidth property in pixels. <span id="test">123456</span> And then: #test { font-size:1.2...
{ "language": "en", "url": "https://stackoverflow.com/questions/159183", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Eclipse RCP Toolbar buttons with the Eclipse Look In Eclipse, its easy to specify buttons for your toolbar using the ActionSets extension point. However, when I need to specify some items programmatically, I can't get the same look. I don't believe that the framework is using native buttons for these, but so far, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/159190", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: timeout error when on an ad hoc network I am doing an InternetConnect (Wininet) to an FTP server that happens to be running on an iPhone. When the user is on a normal WiFi network it works fine for him. When he has an ad hoc network with his iPhone he gets an ERROR_INTERNET_TIMEOUT. I presume this is some kind of...
{ "language": "en", "url": "https://stackoverflow.com/questions/159214", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I create a bundle of reusable code in Xcode? I am developing an iPhone app and have to parse xml files in order to put them into a database. I will also be using those same xml parsers in my app so users can import their own data. I was wondering how I can extract those xml parsers into a bundle or a library ...
{ "language": "en", "url": "https://stackoverflow.com/questions/159221", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }