text
stringlengths
8
267k
meta
dict
Q: How to allow my control to detect the Escape key before the DataGridView close my control? I have a control with an undo feature, when the user press Escape the control will revert the original value. The problem is when I integrated my control to DataGridView. The DataGridView "eats" the Escape key, hence my contr...
{ "language": "en", "url": "https://stackoverflow.com/questions/442009", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: In zsh, how do I pass anonymous arrays into functions? In zsh, how do I pass anonymous arrays into functions? e.g. looking for something like: foo() { echo ${1[2]} '\n'; } a=(abc def ghi) foo $a --> def Or ideally: foo (abc def ghi) A: You can't. Functions take positional parameters like any other command. N...
{ "language": "en", "url": "https://stackoverflow.com/questions/442012", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: How do I enumerate all time zones in .NET? I would like to have a list of all the time zones available on a Windows Machine. How can I do this in .NET? I know about the TimeZoneInfo.GetSystemTimeZones method, but this returns only the currently selected time zone(s) DateTimeOffset current = DateTimeOffset.Now; Read...
{ "language": "en", "url": "https://stackoverflow.com/questions/442019", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "28" }
Q: How to build a threaded Comment System in C#? Help Im building a Threaded Comment System for a website of mine and I ran into a problem... I have a list PULLED FROM A DATABASE that has a ID field and a Parent ID Field. The parent ID field can be null, but the ID field will NEVER be null. Since this will be a thread...
{ "language": "en", "url": "https://stackoverflow.com/questions/442022", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Function overloading by return type? Why don't more mainstream statically typed languages support function/method overloading by return type? I can't think of any that do. It seems no less useful or reasonable than supporting overload by parameter type. How come it's so much less popular? A: Contrary to what oth...
{ "language": "en", "url": "https://stackoverflow.com/questions/442026", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "265" }
Q: Pre-populate an inline FormSet? I'm working on an attendance entry form for a band. My idea is to have a section of the form to enter event information for a performance or rehearsal. Here's the model for the event table: class Event(models.Model): event_id = models.AutoField(primary_key=True) date = model...
{ "language": "en", "url": "https://stackoverflow.com/questions/442040", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "45" }
Q: Calling stored procedure from web application on UNIX throwing error on xp_cmdshell Hey all, I'm pulling my hair out on this one. I've checked all my permissions, on both the database server (SQL Server 2000) and the file system to ensure that what I am trying to do should be possible. Here's the situation: I have a...
{ "language": "en", "url": "https://stackoverflow.com/questions/442045", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do you select elements based on their style? Using jQuery, how would you find elements which have a particular style (eg: float: left), regardless of whether it's an inline style or one defined in a CSS file? A: Using the filter function: $('*').filter(function() { return $(this).css('float') == 'left'; })...
{ "language": "en", "url": "https://stackoverflow.com/questions/442048", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "27" }
Q: Replacing a Window Class all across Windows I need to replace one of the pre-defined window classes all across Windows. For example, I would like to replace the "EDIT" class so that my own custom edit box is used whenever any Windows program calls CreateWindowEx with "EDIT" as the class name argument. How can I achi...
{ "language": "en", "url": "https://stackoverflow.com/questions/442054", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I create an HTTP server in Python using the first available port? I want to avoid hardcoding the port number as in the following: httpd = make_server('', 8000, simple_app) The reason I'm creating the server this way is that I want to use it as a 'kernel' for an Adobe AIR app so it will communicate using PyAM...
{ "language": "en", "url": "https://stackoverflow.com/questions/442062", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Method for animating images (like a movie) on iPhone without using MPMoviePlayer I need to be able to display an animation over a static image. Given that MPMoviePlayer gives you no control over anything useful, the only way I can think to do this is to use multiple static images, which we display (one-by-one) to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/442076", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Is there a way to draw UML in Visio for Java? I have Visio2007 and I really like it. However, it doesn't seem to have UML model/datatypes for Java. Is there some template I can download for Java? Or should I just forget about Visio altogether and get an Elipse plugin? Thanks! A: I had the same question, but then I...
{ "language": "en", "url": "https://stackoverflow.com/questions/442099", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: An irb-type tool for C/C++ When writing ruby code, it is easy to test how different functions behave by testing them out in irb. But to test code in C, I usually have to open up a separate IDE and write code there to test how it works. Is there an interpreter-like tool available in Unix or Windows platform? A: C ...
{ "language": "en", "url": "https://stackoverflow.com/questions/442105", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Mantis Roadmap Feature How do I enable and use the Roadmap feature in the Mantis bugtracker? I am answering this myself and I hope it will be useful to other Mantis users. Here is a discussion on the same topic. Update: As an example, here is the Mantis Roadmap for Mantis itself. A: Also be sure to NOT set the Rele...
{ "language": "en", "url": "https://stackoverflow.com/questions/442128", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Can I have regular parameters along with CGI::Application::Dispatch? I appreciate the ability to be able to do: http://server/controller/runmode or even http://server/controller/runmode/id. But if I have a lot of optional parameters I'd like to be able to do the regular: http://server/controller/runmode?foo=bar&baz...
{ "language": "en", "url": "https://stackoverflow.com/questions/442135", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Eclipse: Accessing a editor template from plugin code Let's say I have a editor template (which inserts some arbitrary snippet of code) defined in my editor preferences. I'd like to access that template programmatically. How do I do this? I know the classes TemplateStore, TemplatePreferencesPage, and TemplatePersis...
{ "language": "en", "url": "https://stackoverflow.com/questions/442138", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Compile old C++ unix application for using in windows I need to have a windows executable for some code which was written in 1994 for UNIX. I tried to do this from cygwin environment. The C++ standard was changed from this time and the standard libraries too. I tried to use -std= and -traditional-cpp options, but th...
{ "language": "en", "url": "https://stackoverflow.com/questions/442139", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I have a persistent DBIx::Class in CGI::Application with mod_perl? I am using CGI::Application on mod_perl with DBIx::Class and I'd like to have something like new define a new dbic schema on instantiation. So far I haven't been able to get it to work. The closest thing I have come to is a superclass that ...
{ "language": "en", "url": "https://stackoverflow.com/questions/442144", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How do you do a copy and paste in the Type Library Editor in Delphi? Help I am busy making changes to a type library in a Datasnap project. How do I copy and paste text with in the type library editor ? P.s. I am using BDS2006 EDIT 1 Is there a way to chnage the Type Library without using the TLB Editor ? EDIT 2 Is ...
{ "language": "en", "url": "https://stackoverflow.com/questions/442145", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: ASP.Net: How to add rows to a repeater using DOM/Javascript? I know that the asp.net repeater doesnt have a Client side object model, and we are stuck with improving the performance of many pages which have repeater/gridview with the functionality of adding rows to them by server-side code. We have used updatepanels...
{ "language": "en", "url": "https://stackoverflow.com/questions/442151", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Can I call a function in a lambda expression? I would like to do the following but I don't think this will work: .OrderByDescending(s => Score(s)), ... private double Score(Story s) { DateTime now = DateTime.Now; TimeSpan elapsed = now.Subtract(s.PostedOn); double daysAg...
{ "language": "en", "url": "https://stackoverflow.com/questions/442155", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: VB.NET: how to reference a DataTable? I am trying to reference a DataTable and I do not know how to achieve this. Please help and thank you very much. In my code, I would like to assign dtTmp to dtTarget(i) through the reference dtCurr. Is it possible to achieve that in VB.NET? Private dtA, dtB As DataTable Dim dtT...
{ "language": "en", "url": "https://stackoverflow.com/questions/442158", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Insert Data into SQL Table The Data in my DataTable is like ID ContactName1 Designation1 ContactName2 Designation2 1 A dummy B sam The Table structure of my Table is ID ContactName Designation I am passing the values in the stored procedure as: @ContactName1 @Designation1 @Contact...
{ "language": "en", "url": "https://stackoverflow.com/questions/442159", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to get an outline effect on text in SVG? I just want a simple SVG image that has some arbitrary text on an angle, which I can do. Thing is, I also want the text to have a sort of "outline" effect. Like rather than a solid D, the inside and outside edges of the letter D are drawn with a line of a specified thic...
{ "language": "en", "url": "https://stackoverflow.com/questions/442164", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "63" }
Q: How do I have mod_perl reload source files on change? I am developing an application with mod_perl and restarting the server every time I change code is a huge drag. I'd like to still use mod_perl for development because it's what I plan on using for the live server. I didn't see anything in the documentation abou...
{ "language": "en", "url": "https://stackoverflow.com/questions/442166", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: get the value of variable name stored in SQL Sproc This is what I am trying to do Declare @Var varchar(50) Declare @Num1 varchar(50) Declare @Num2 varchar(50) Declare @Counter smallint Set @Counter=1 Set @Num1='Hello' Set @Num2='Hi' while (@Counter<2) begin Set @Var=N'@Num'+convert(varchar,@Counter) //N...
{ "language": "en", "url": "https://stackoverflow.com/questions/442174", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What's the best way to represent a stage script in HTML? I have a sketch that I want to put up on my website, and I also intend to write a short play at some point which I'd also want to make freely available. I'm trying to work out the best way of representing this in HTML. I basically need two columns - one for th...
{ "language": "en", "url": "https://stackoverflow.com/questions/442176", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "30" }
Q: how to set postbackurl on linkbutton control from clientside? I have a server control ( linkbutton ) on the aspx page. For some complicated reason - I need to set the postbackurl from client side for this button. Is there a way to set the postback url from client side ? I got some reference to javascript:WebForm_Do...
{ "language": "en", "url": "https://stackoverflow.com/questions/442185", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can I get the Silverlight ComboBox to resize the dropdown after I change ItemsSource? There are various posts on the web about this issue whereby the ComboBox only changes its dropdown height to fit the items on its very first dropdown. Any changes to the items shown doesn't cause the dropdown to resize. The var...
{ "language": "en", "url": "https://stackoverflow.com/questions/442187", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: ReadInt(), ReadByte(), ReadString(), etc. in Python? The functions ReadInt(), ReadByte(), and ReadString() (to name a few) exist in other languages for reading input from streams. I am trying to read from a socket, and I want to use functions like these. Are they tucked away in Python somewhere under a different way...
{ "language": "en", "url": "https://stackoverflow.com/questions/442188", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How do you implement Related tags functionality as used in Stackoverflow.com? How do you implement the 'related tags' functionality as used in many websites like our stackoverflow.com and http://tagexplorer.sandbox.yahoo.com/. A: My guess is that it is a correlation between which tags are most often used together....
{ "language": "en", "url": "https://stackoverflow.com/questions/442201", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: VS2008 SP1: Pressing F5 takes ages to start website I have a Silverlight project (with ASP.net MVC web project) Suddenly, when I press F5 it takes like 20 seconds, from the moment that Internet explorer opens, to when the debugger is attached. Mind you, it is a project that works perfectly since about 3 months. The ...
{ "language": "en", "url": "https://stackoverflow.com/questions/442213", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Java or Python or Ruby for Web Application? If I were to implement a web application from scratch today, which app stack should I go for? Three main candidates are java, python and Ruby on Rails (RoR). There is also .NET, but its biased towards M$. Pro-java: 1) Stacks of thick books 2) Largest developer community 3...
{ "language": "en", "url": "https://stackoverflow.com/questions/442216", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "32" }
Q: How do I use a 2-d boolean array to select from a 1-d array on a per-row basis in numpy? Let me illustrate this question with an example: import numpy matrix = numpy.identity(5, dtype=bool) #Using identity as a convenient way to create an array with the invariant that there will only be one True value per row, the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/442218", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to manually install an artifact in Maven 2? I've encountered some errors when I tried to install an artifact manually with Maven 2. I wanted to install a jar from a local directory with the command mvn install:install-file -Dfile=jta-1.0.1B.jar But Maven gave a build error which reads like: Invalid task '.01B.j...
{ "language": "en", "url": "https://stackoverflow.com/questions/442230", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "99" }
Q: What's the best way to synchronize XmlWriter access to a file to prevent IOExceptions? There are multiple places in an application which call XmlWriter.Create on the same file, all accessed through the following function. When one calls while another is still writing, I get an IOException. What's the best way to loc...
{ "language": "en", "url": "https://stackoverflow.com/questions/442235", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Import from Team Foundation Server 2005 into 2008 We have an existing TFS 2005 install and a newer 2008. The 2008 server already has some newer projects on it but I am looking to move the older projects from 2005 onto this newer server. Does anyone know an easy way to do this and maintain the audit history rather th...
{ "language": "en", "url": "https://stackoverflow.com/questions/442239", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: What's the best way to serialize JavaScript objects to XML? I am looking for a best proved way to serialize JavaScript objects to XML, that could be sent to server further in Ajax style. Just googling I've found some options like http://svn.mirekrusin.com/pub/javascript/to_xml/trunk/to_xml.js, but does somebody has...
{ "language": "en", "url": "https://stackoverflow.com/questions/442242", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: C# Replace with Callback Function like in AS3 In AS3 you have a function on a string with this signature: function replace(pattern:*, repl:Object):String The repl:Object can also specify a function. If you specify a function, the string returned by the function is inserted in place of the matching content. Also, i...
{ "language": "en", "url": "https://stackoverflow.com/questions/442245", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Getting Trace messages into Failed Request Tracing from Controllers On ASP.NET MVC Preview 5, we're having trouble getting any trace messages from Global or Controllers to appear in either a page (View) or Failed Request Tracing (FREB). Neither of these calls work in a Controller Action: HttpContext.Trace.Write("hel...
{ "language": "en", "url": "https://stackoverflow.com/questions/442258", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What is the benefit of developing the application as a windows service? I am going to develop an application which will process online data (comming through socket) and it does not need any user interaction. I am thinking of a simple console application, but what about windows service does it provide extra benefit? ...
{ "language": "en", "url": "https://stackoverflow.com/questions/442264", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: Unit Test a class that contains an IDictionary I am creating a class that determines which of number of registered WCF client callbacks to call. When a client registers with the server, it supplies the token it is interested in. The class then stores a mapping of token to IClientCallback interface for that token, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/442265", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: jQuery scripts in the response of Ajax does not work I am using jQuery $.load() function to get content from server. the loaded content contain this: <p id="p1">123</p> <script> $(document).ready(function(){ $('#p1').html('ABC'); alert($('#p1').html()); }); </script> changing text of paragraph to '...
{ "language": "en", "url": "https://stackoverflow.com/questions/442269", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Converting SCORM 1.2 XML to 2004 with wrapper tool I found a nice wrapper tool to convert SCORM 1.2 api to 2004, however what are the minimum changes needed to XML files in addition? I assume at least imsmanifest.xml needs updating? A: To convert a SCORM 1.2 manifest to a SCORM 2004 manifest, you will need to make...
{ "language": "en", "url": "https://stackoverflow.com/questions/442272", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Catching exceptions thrown by plugin UserControl I am writing a WinForms application that accepts dynamic user interface controls, in the form of plugins (think widgets). For this, the main function of each plugin returns a UserControl that is then added to the main form. Since my application doesn't have direct con...
{ "language": "en", "url": "https://stackoverflow.com/questions/442273", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Why is passenger hitting my index page so aggressively I just moved my apache/mongrel setups to use passenger and I started noticing my index page is getting hit pretty aggressively (approx 5000 hits a day) I chucked in some logging and it turns out the ip address (REMOTE_ADDR) is showing up as "::1" for these hits...
{ "language": "en", "url": "https://stackoverflow.com/questions/442289", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Datagridview custom vscrollbar I would like disable vertical scroll bar in datagridview and managing the scrolling using separate vscroll control. I am using c# 2.0. Any one can help....???? A: You can set DataGridView.ScrollBars property to ScrollBars.None or ScrollBars.Horizontal (to have just horizontal scrollba...
{ "language": "en", "url": "https://stackoverflow.com/questions/442290", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Microsoft Blend June 2.5 expired I can't find newer Microsoft Blend Preview. Is it available? A: I read in another forum a while ago, that 2.5 was replaced by Blend 2 with SP1. Edit: I found it here: Q. What happened to Expression Blend 2.5? A. Expression Blend 2.5 provided support for Silverlight 2 through its...
{ "language": "en", "url": "https://stackoverflow.com/questions/442293", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Linear Programming with Complication I'm trying to solve a problem that looks like a standard Linear Programming problem with one twist. We have as input a set of "phrases" each of which has a weight. We need to choose how many times to repeat each phrase in a text to maximize the total weight, subject to a max cha...
{ "language": "en", "url": "https://stackoverflow.com/questions/442299", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Tabbing visual selection In many GUIs when I select a section of text and then hit the Tab or Shift+Tab button the selected section will indent in or out. In VIM I can select a visual section and then hit the < or > key to change indenting, however once I hit the < key my selection is cleared so I am stuck selectin...
{ "language": "en", "url": "https://stackoverflow.com/questions/442302", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "35" }
Q: How can I extract external referrers from an Apache access log with Perl? I need some help getting a regex working to parse all referrers from an apache access log file which come from real links offsite and which are valid referrals from real people rather than bots or spiders. I'm working in Perl. This bit of code...
{ "language": "en", "url": "https://stackoverflow.com/questions/442311", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Do I have to make a select query to create a relationship in Entity Framework? I want to create a Blog object which has a relation between User. To create the relationship do I have to select User entity first, then set it to User property of Blog object? In Entity Framework samples suggest to set the User object to...
{ "language": "en", "url": "https://stackoverflow.com/questions/442317", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: CANopen PDOs and a communication profile If the data contains more than one value, how do I know what these values represent? And how do I break up the data into individual values? Am I right to say that the relationship between the PDOs and data to be transmitted are defined in the communication profile? (I thank M...
{ "language": "en", "url": "https://stackoverflow.com/questions/442320", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Should Java break backwards compatibility in future versions for the benefit of a cleaner language? * *Are primitives worth keeping? *Should all the deprecated stuff be deleted? *Do we need 2 GUI frameworks? *... A: There are several types of backwards compatibility: * *Can old source code compile with the...
{ "language": "en", "url": "https://stackoverflow.com/questions/442322", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Chomsky Hierarchy and LL(*) parsers I want to parse a programming language. I read a lot about formal languages and the Chomsky hierarchy and ANTLR. But I could not find information on how to relate the languages ANTLR v3 as an LL(*) recursive descent parser accepts to the chomsky hierarchy. How do the Chomsky types...
{ "language": "en", "url": "https://stackoverflow.com/questions/442325", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Core Animation with a Core Graphics drawing I am inside a UIView subclass (CustomView in the code below). I am drawing a border around an image in a UIImageView subclass (containerView). The Core Graphics code for this is located inside drawInRect: in the subclass. The Core Animation transition is a flip, however w...
{ "language": "en", "url": "https://stackoverflow.com/questions/442326", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: iPhone native apps - access to call logs, SMS, calendar, iTunes library As I understand there aren't any public APIs available or any 'legal'/'official' way of accessing those... I was just wondering how come some Desktop apps (MissingSync, iPhoneDrive) have access to those then... UPDATE: I found that Desktop App s...
{ "language": "en", "url": "https://stackoverflow.com/questions/442328", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Convert an array to object[] I am working on a winforms application that uses Sybase Datawindow.net. Basically I have a datawindow that retrieves data (dw_retailer.Retrieve(id)) and what I get back is an object list. The datawindow itself excists of labels and textboxes and I bind the data like this newRetailer.foto...
{ "language": "en", "url": "https://stackoverflow.com/questions/442334", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Detect change of resolution c# WinForms is there an easy way to hook to an event that is triggered on change of global screen resolution? A: Sure you don't have to unsubscribe to static events (or any events) if your program (process) is dying. The OS will take care of releasing all memory of your process to the OS...
{ "language": "en", "url": "https://stackoverflow.com/questions/442337", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "29" }
Q: WCF WSDL location address with HTTPS A common issue for WCF appears to be how the hostname is resolved within the wsdl for the links to other files. The issue is that the machine name of the computer is placed into the wsdl to link the other wsdl files, so if you visit http://myhost/service.svc it may point to the r...
{ "language": "en", "url": "https://stackoverflow.com/questions/442342", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Generic catch for python I have some extremely weird behavior that seems to result in silent exceptions. How can I write a general try catch where I can debug all exceptions. Something along the lines of: try: # something that fails except e: print e A bit more about the problem at hand in detail: I have a ...
{ "language": "en", "url": "https://stackoverflow.com/questions/442343", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "108" }
Q: How to categorize Mime Types (PHP) I'm looking for a code snippet which categorizes mime types. For example, application/msword application/vnd.oasis.opendocument.text application/pdf Both of them are office files. When I pass these mime type to the function, I want it to return a result which is 'office', 'image',...
{ "language": "en", "url": "https://stackoverflow.com/questions/442346", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Commandline arguments not working - Skips over them completely Alright, I'm trying to get arguments to work properly with a small test application. My code is below. I'm not too experienced at C++, so I'm not sure why when I launch test with -print (or --print) it automatically states "Not a valid option" and then f...
{ "language": "en", "url": "https://stackoverflow.com/questions/442354", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: What is the best approach to implement configuration app with Django? I need to program kind of configuration registry for Django-based application. Requirements: * *Most likely param_name : param_value structure *Editable via admin interface *Has to work with syncdb. How to deal with a situation in which othe...
{ "language": "en", "url": "https://stackoverflow.com/questions/442355", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Publish failed in Web Application Project (MVC) I usually use the "Publish" feature in VS 2008 to get the correct files and so on that I can publish to my website. But from time to time publish fails without any good error message at all. I know that it can be a couple of different reasons but I am starting to grow ...
{ "language": "en", "url": "https://stackoverflow.com/questions/442374", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Jumping to a new HTML page with JavaScript In my HTML page, I need to check if Adobe Flash player is installed. If not, I want to automatically jump to another HTML page to tell the user that Flash player is required. I'm using JavaScript to check if the Flash player is available, using the 'JavaScript Flash detecti...
{ "language": "en", "url": "https://stackoverflow.com/questions/442384", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Hyper-V: Delete snapshot fail, invalid state The drive the VM's are running on have run out of space and this caused all my VM's to go into Paused-Critical state. To free up some space I want to delete some snapshots I took. Where my snapshot is extended from the main VM with the Now (green arrow) extending the sna...
{ "language": "en", "url": "https://stackoverflow.com/questions/442386", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to give title to NSPersistentDocument window I have subclassed NSPersistentDocument. I have renamed the window too. But when I run the application I get the title of the application window as "Untitled". There is no -setTitle: method which I can use to change the title. Any ideas how can I go about doing this? ...
{ "language": "en", "url": "https://stackoverflow.com/questions/442396", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Retrieve the position (X,Y) of an HTML element I want to know how to get the X and Y position of HTML elements such as img and div in JavaScript. A: If you are using jQuery, this could be a simple solution: <script> var el = $("#element"); var position = el.position(); console.log( "left: " + position.left + ...
{ "language": "en", "url": "https://stackoverflow.com/questions/442404", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2186" }
Q: Regex to match all valid links In regards to this: http://stackoverflow.uservoice.com/pages/general/suggestions/103227-parser-does-not-match-all-valid-urls is this regex adequate or will it need to be refined, if it needs to be refined how so? \b(?P<link>(?:.*?://)[\w\-\_\.\@\:\/\?\#\=]*)\b A: Even though the ques...
{ "language": "en", "url": "https://stackoverflow.com/questions/442405", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Calculating Bandwidth Is there any way i can calculate bandwidth (packets sent and received) by an exe/application via net? have looked into IPGlobalProperties, and other classes. I want packets sent and received by a single application. I have checked http://netstatagent.com/ and need something similar. Is there an...
{ "language": "en", "url": "https://stackoverflow.com/questions/442409", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: Can't get updatable View in Linq and Sql 2005 to work. I'm trying to do the following in the VS2008 Linq O/R designer, SQL 2005: I have a table called Entity with an auto-incrementing primary key named PKey, and another field called Parent I've made a View from this table, calling it vwEmployees, with a simple where...
{ "language": "en", "url": "https://stackoverflow.com/questions/442413", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to guarantee delivery of data in a Compact Framework Webservice call? We have a mobile Application in a very unsteady WLan Environment. Sending Data to a webserver could result in a timeout or in a lost WLan connection. How do we ensure, that our data is delivered correctly? Is there a possibility of having Web ...
{ "language": "en", "url": "https://stackoverflow.com/questions/442417", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: When to prefer XAMPP over a complete installation of Linux, Apache, MySQL, and PHP In which cases, except development, would you prefer XAMPP over a complete installation and configuration of Linux, Apache, MySQL, and PHP? A: Other than development, the only other time I use it is for demos - it's nice being able t...
{ "language": "en", "url": "https://stackoverflow.com/questions/442423", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I create a nested group-by dictionary using LINQ? How would I create a nested grouping for the table below, using LINQ? I want to group by Code, then by Mktcode. Code Mktcode Id ==== ======= ==== 1 10 0001 2 20 0010 1 10 0012 1 20 0010 1 20 0014 2 20 0001 2...
{ "language": "en", "url": "https://stackoverflow.com/questions/442425", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "23" }
Q: Windows Explorer sort method I'm looking for an algorithm that sorts strings similar to the way files (and folders) are sorted in Windows Explorer. It seems that numeric values in strings are taken into account when sorted which results in something like name 1, name 2, name 10 instead of name 1, name 10, name 2 w...
{ "language": "en", "url": "https://stackoverflow.com/questions/442429", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "21" }
Q: Microsoft SSIS 2005 removing columns from an XML source I have an XML source in a Microsoft SSIS 2005 package and when I debug the package I am receiving warnings like: [DTS.Pipeline] Warning: The output column "AccBasicRateDesc" (15229) on output "AccFwdDetail" (303) and component "XML Source" (1) is not subsequent...
{ "language": "en", "url": "https://stackoverflow.com/questions/442437", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Problem with CLRProfiler I am trying to use Microsoft's CLRProfiler to profile my fairly large app, and it is crashing whenever it tries to write (or read) a log file. Ironically, the exact bug is documented on the MS 'Feedback' site as being not reproducible, and seems never to have been fixed. I am getting a NullR...
{ "language": "en", "url": "https://stackoverflow.com/questions/442439", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How to know when you are in a symbolic link How to know, in Python, that the directory you are in is inside a symbolic link ? I have a directory /tmp/foo/kiwi I create a symlink /tmp/bar pointing to /tmp/foo I enter into /tmp/bar/kiwi the linux command pwd tells me I'm in /tmp/bar/kiwi, which is correct. The python ...
{ "language": "en", "url": "https://stackoverflow.com/questions/442442", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Is there some sort of secure local storage on Windows? I was thinking of making a small tool. It is not important what the tool will do. The important thing, is that the tool will need to store some sensitive information on the user's HDD. EDIT: The information that will be stored is USER'S information - I'm not try...
{ "language": "en", "url": "https://stackoverflow.com/questions/442443", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "21" }
Q: Counting no. of Delimiter in a row in a File in Unix I have a file 'records.txt' which contains over 200,000 records. Each record is on a separate line and has multiple fields separated by a delimiter '|'. Each row should have 35 fields, but the problem is one of these rows has <>35 fields, i.e. <>35 '|' characters....
{ "language": "en", "url": "https://stackoverflow.com/questions/442456", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Render HTML checkbox inputs based on MySQL data I have this table contains name and value, how can i convert the contents of $row=mysql_fetch_array($result); into checkboxes? A: Assuming $row is an associative array mapping column name onto a boolean 1 or 0 value, you could do something like this: foreach($row as ...
{ "language": "en", "url": "https://stackoverflow.com/questions/442460", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: jQuery event on responsed data from server I have some content from server using $.ajax() function. I try to replace some element with this data and then manipulate it. Here is code: $.ajax({ type: "GET", url: "smpl.php", success: function(servmsg){ $('#panelInfo').replaceWith('<p>' + servmsg + '...
{ "language": "en", "url": "https://stackoverflow.com/questions/442462", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Finding the number of documents in a Lucene index Using the Java version of Lucene, how would you find out the number of documents in an index? A: The official documentation: http://lucene.apache.org/java/2_4_0/api/org/apache/lucene/index/IndexReader.html#numDocs() A: Using java you can find the number of document...
{ "language": "en", "url": "https://stackoverflow.com/questions/442463", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Background color not covering full height of div ---HTML <div id="story"> <div id="individual"> <img src='uploads/1231924837Picture.png'/> <h2>2009-01-14</h2> <h1>Headline</h1> <p>stroy story etc stroy story etc stroy story etc</p> </div> <br /> <div id="storynav"> <a href='home.php?start=0'>1</a> <a href='hom...
{ "language": "en", "url": "https://stackoverflow.com/questions/442464", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: InvalidOperationException when executing SqlCommand with transaction I have this code, running parallel in two separate threads. It works fine for a few times, but at some random point it throws InvalidOperationException: The transaction is either not associated with the current connection or has been completed. At ...
{ "language": "en", "url": "https://stackoverflow.com/questions/442465", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Structure Map configuration Consider the following class public class SchemaExecutor: ISchemaExecutor { public SchemaExecutor(SqlPlusSettings sqlPlusSettings) { _sqlPlusSettings = sqlPlusSettings; } ... And container configuration ObjectFactory.Initialize( x => { SqlPlusSettings sqlPlusSetti...
{ "language": "en", "url": "https://stackoverflow.com/questions/442471", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to get the Windows SDK folder in MSBuild? What would be the way to retrieve the Windows SDK folder in an MSBuild task? Using the generateBootstrapper task I'm creating a bootstrapper for my setup to be able to install the pre-requisites. This task needs the path to the folder where the pre-requisite packages are...
{ "language": "en", "url": "https://stackoverflow.com/questions/442476", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "27" }
Q: How to use regex to get part of string in c# I am try use (?<key>.{5}keyword.{5}?) to test "other string keyword other text" it will get "ring keyword othe" and I want "akeyword other text" or "other string keyworda" or "akeywordc" are match, too. How to modify regex? I have a long string and I want get find keyw...
{ "language": "en", "url": "https://stackoverflow.com/questions/442482", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I draw double height text using Graphics.DrawString? I am trying to emulate a POS printer with System.Drawing and one of the functions I need is to draw text at double height. Any idea how I can do this using .Net's Graphics class? Do I need to draw the text twice as large and condense it or draw normal size ...
{ "language": "en", "url": "https://stackoverflow.com/questions/442485", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Solving JPA query finding the last entry in connected list Following class structure is given: class Job { String description; Collection<JobHistory> history; } class JobHistory { Date assignDate; User jobOwner; } class JobOwner { String name; String id; } This class-structure is accessi...
{ "language": "en", "url": "https://stackoverflow.com/questions/442488", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Hiding the Keyboard I have a UISearchBar and on the delegate method I hide the keyboard when the text field is cleared: - (void)searchBar:(UISearchBar *)filterBar textDidChange:(NSString *)filterText { NSLog(@"filter: %@", filterText); if ([filterText length] == 0) { NSLog(@"hiding keyboard"); ...
{ "language": "en", "url": "https://stackoverflow.com/questions/442491", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to install JDK 1.5 for Solaris 10 I been trying to install but keep on getting file is corrupted when unpacking the file after accepting the license agreement. Anyone have any advice. http://java.sun.com/javase/downloads/index_jdk5.jsp I installing this jdk-1_5_0_17-solaris-sparc.sh A: Installer (jdk-1_5_0_17-s...
{ "language": "en", "url": "https://stackoverflow.com/questions/442494", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Android HTTP Connection Can anybody tell my why this doesn't work in the Android emulator? From the browser I have access and the server is internal. All I can think of is that I'm missing some configuration on my app so it can access the network layer. try { InetAddress server = Inet4Address.getByName("thehost"...
{ "language": "en", "url": "https://stackoverflow.com/questions/442496", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: How do I represent an XML file as a Java object using commons-digester? Following on from my recent question regarding parsing XML files in Java I have decided to use the commons-digester library. I am now familiar with this process and now want to create a Java class representing the XML file, so that when a user i...
{ "language": "en", "url": "https://stackoverflow.com/questions/442498", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Bind a column default value to a function in SQL 2005 I have a column containing items that can be sorted by the user: DOC_ID DOC_Order DOC_Name 1 1 aaa 2 3 bbb 3 2 ccc I'm trying to figure out a way to properly initialize DOC_Order when the entry is created. A good ...
{ "language": "en", "url": "https://stackoverflow.com/questions/442503", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: Measuring CPU load for specific IIS websites on same server I have a IIS server running on Windows Server 2003. The server hosts multiple websites. Occasionally the CPU load peaks in long durations of time, such that the server stops responding or responds with lag. The problem is that we don't know which of the mul...
{ "language": "en", "url": "https://stackoverflow.com/questions/442505", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How can I access specific subsets of a large NSDictionary in Cocoa? I have a single NSDictionary object which contains a large number of custom objects. The objects will either be of class B or of class C, both of which inherit from class A. If the objects are of type B, they will have an internal flag (kindOfCIsh) ...
{ "language": "en", "url": "https://stackoverflow.com/questions/442513", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Is there a standard naming convention for XML elements? Is there any standard, de facto or otherwise, for XML documents? For example which is the "best" way to write a tag? <MyTag /> <myTag /> <mytag /> <my-tag /> <my_tag /> Likewise if I have an enumerated value for an attribute which is better <myTag attribute="v...
{ "language": "en", "url": "https://stackoverflow.com/questions/442529", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "106" }
Q: Creating nested master pages in ASP.NET Web Application Is it possible to create nested master pages in an ASP.NET Web Application projects as one can do in ASP.NET Website projects? I am using Visual Studio 2008 and working on an ASP.NET Web Application. While creating a master page there is no option to choose ano...
{ "language": "en", "url": "https://stackoverflow.com/questions/442535", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }