text
stringlengths
8
267k
meta
dict
Q: Obtain a std::ostream either from std::cout or std::ofstream(file) how do I bind a std::ostream to either std::cout or to an std::ofstream object, depending on a certain program condition? Although this invalid for many reasons, I would like to achieve something that is semantically equivalent to the following: std:...
{ "language": "en", "url": "https://stackoverflow.com/questions/366955", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "57" }
Q: Is there a graphical widget for selecting timezone in Rails? I know there's a dropdown selector for timezone, but I was hoping for a map where the user can click on a region and have that set a hidden field for what time zone it is. A: I don't know if it has been done, but it's a great idea. You could do one based ...
{ "language": "en", "url": "https://stackoverflow.com/questions/366962", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Is there a way to get the UTC offset for a timezone based on a geocoded location? This would be useful when I have a user's address or zipcode, and used that to find their timezone so they don't have to enter it in a separate field. A: I would recommend against trying to deduce the timezone from the users zip code....
{ "language": "en", "url": "https://stackoverflow.com/questions/366966", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: ASP Line-breaks - \n? I have been searching for a way to insert linebreaks in my code for when I view my source. I am not looking for <br /> Something like the PHP equiv to \n Any ideas on how to do this in ASP? I will be placing this inside a string. A: There's no way to do it inside a string. You will have to ap...
{ "language": "en", "url": "https://stackoverflow.com/questions/366968", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: Simple ASP form validation - swapped? I am trying to do some very simple form validation checking for null or '' (empty) using a conditional, but when I submit my form with ALL BLANK FIELDS, it does the latter section of my code. And when I fill out all of my fields it does that other part. So when they are blank, t...
{ "language": "en", "url": "https://stackoverflow.com/questions/366972", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What are the differences between Perl, Python, AWK and sed? What are the main differences among them? And in which typical scenarios is it better to use each language? A: In order of appearance, the languages are sed, awk, perl, python. The sed program is a stream editor and is designed to apply the actions from a ...
{ "language": "en", "url": "https://stackoverflow.com/questions/366980", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "283" }
Q: ASP.net and SQL Server 2005: ASPNET account setting I'm a bit confuse about the ASP.NET account in SQL Server 2005. In my web site connection string, I use sa account to connect to the SQL Server database. When I use Firefox to login to my website, I get an error Login failed for user: 'AccountName' I have found ...
{ "language": "en", "url": "https://stackoverflow.com/questions/366995", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Good resources on programming language design? Javascript: The Good Parts is a great book. Often I find myself reading passages like the following from the perspective of a language designer: undefined and NaN are not constants. They are global variables, and you can change their values. This should not be possible...
{ "language": "en", "url": "https://stackoverflow.com/questions/366998", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Temporary text attributes causing massive slowdown I am using the code I posted as an answer to this question to display hidden characters in an NSTextView as bullets. I am coloring the bullets gray with the addTemporaryAttributes:forCharacterRange: method of NSLayoutManager. Each range is of length 1 and colors a ...
{ "language": "en", "url": "https://stackoverflow.com/questions/367001", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Heading not displaying before floated element On the page http://tesselaar.com/gallery/ I have a heading (level 1) at the top of the page "Photo Gallery" that doesn't display in IE7 and I can't work out why. It follows the same CSS and page-structure as the rest of the site, the only difference being there is an ele...
{ "language": "en", "url": "https://stackoverflow.com/questions/367007", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Master/detail form in Axapta/Dynamics Ax How do I create a master/detail form in Axapta/Dynamics Ax, with a master grid and a detail grid, where choosing a record in the master grid changes the content of the detail grid accordingly? A: http://daxdave.blogspot.com/2006/10/creating-headerdetail-based-linkage-on.html...
{ "language": "en", "url": "https://stackoverflow.com/questions/367017", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Easiest way to animate background image sliding left? What's the best way to animate a background image sliding to the left, and looping it? Say I've got a progress bar with a background I want to animate when it's active (like in Gnome or OS X). I've been playing with the $(...).animate() function and trying to mod...
{ "language": "en", "url": "https://stackoverflow.com/questions/367020", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Deleting erroneous ReferenceProperty properties in AppEngine Most of the time, the errors you get from your model properties will happen when you're saving data. For instance, if you try saving a string as an IntegerProperty, that will result in an error. The one exception (no pun intended) is ReferenceProperty. If ...
{ "language": "en", "url": "https://stackoverflow.com/questions/367029", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Descendant Enumeration in Objective-C Is it possible to get a list of all descendant classes of a particular class in objective-c? Something like: @interface A : NSObject @end @interface B : A @end @interface C : A @end NSArray *descendants = [A allDescendants]; // descendants = [B, C] A: The onl...
{ "language": "en", "url": "https://stackoverflow.com/questions/367030", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Using Matlab, how can I find the value K in the following root locus? In Matlab, how can I find value of K, in a system that has oscillation? (system's tf, if needed: (K * (s + 25))/(s^3 + 24 s^2 + 100 s) ) PS. I'm using root locus. A: I assume this is the plant for a closed-loop system with gain compensation ...
{ "language": "en", "url": "https://stackoverflow.com/questions/367040", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Databinding ListView including its columns I have a list of objects where each contains an arbitary number of parameters (name,value pairs). Now I want to bind the list of objects to a listview. Each column should represent a parameter (the column header is the name of the parameter) and each row an object with the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/367042", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Apple automator video tutorials Where can I find some Automator video tutorials ? Thanks A: After some deep search on google I found this: http://automator.us/leopard/video/index.html I hope it helps. A: YouTube is always the first place I go when looking for tutorial videos. http://www.youtube.com/results?search_...
{ "language": "en", "url": "https://stackoverflow.com/questions/367043", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Case preserving find/replace in Visual Studio There seems to be no built-in support for case preserving find/replace in VisualStudio (see also a respective feature request). What I mean is: searching for 'BadJob' and replacing with 'GoodJob' would do the following replacements 'badjob' -> 'goodjob' 'BadJob' -> 'Go...
{ "language": "en", "url": "https://stackoverflow.com/questions/367052", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "41" }
Q: No print output from child multiprocessing.Process unless the program crashes I am having trouble with the Python multiprocessing module. I am using the Process class to spawn a new process in order to utilize my second core. This second process loads a bunch of data into RAM and then waits patiently instead of cons...
{ "language": "en", "url": "https://stackoverflow.com/questions/367053", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: Browsable website while version-controled? I browsed around here on Stackoverflow and found this topic : https://stackoverflow.com/questions/279/aspnet-visual-studio-and-subversion-how-to-integrate However that didn't help me in my case, or i might just be a little stupid. So to my problem! Installed VisualSVN on a ...
{ "language": "en", "url": "https://stackoverflow.com/questions/367058", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Visual Studio 2005 - Add webreference fails for secured webservice I have a webservice (asmx file) in a directory requiring form authentication When I try to add the WebReference through VS2005 - I get the following error: The request failed with the error message: -- <html><head><title>Object moved</title></head>...
{ "language": "en", "url": "https://stackoverflow.com/questions/367061", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: C# Events/Subscriptions .... listen to non-referenced projects I am developing an application trying to employ the Observer pattern. Basically I have a base form from which various components (forms) can be loaded. The base form references each of the components and some of the components reference each other. If I ...
{ "language": "en", "url": "https://stackoverflow.com/questions/367066", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Listing the processes running on one's computer in Python Is there a cross-platform way to list the processes running on one's computer through a python script? For Unix based system "ps -ef" works, but I am new to Python and don't know a way to write something that would work across any platform. Thanks! A: Python...
{ "language": "en", "url": "https://stackoverflow.com/questions/367068", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How can I negate the return-value of a process? I'm looking for a simple, but cross-platform negate-process that negates the value a process returns. It should map 0 to some value != 0 and any value != 0 to 0, i.e. the following command should return "yes, nonexistingpath doesn't exist": ls nonexistingpath | negate...
{ "language": "en", "url": "https://stackoverflow.com/questions/367069", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "140" }
Q: Ruby Implementation of RSA Data Security, Inc. MD5 Message-Digest Algorithm Does anybody know of ruby implementation of RSA Data Security, Inc. MD5 Message-Digest Algorithm defined at https://www.rfc-editor.org/rfc/rfc1321 I found a javascript implementation at https://developer.openx.org/fisheye/browse/openads/bran...
{ "language": "en", "url": "https://stackoverflow.com/questions/367079", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Title (in ASP.NET @ Page directive) not rendering in web page I was intending on use the Title attribute in the @Page directive to customise each pages title, but it simply doesn't appear to do anything. The site uses master pages - I don't know if that is a consideration. Master Page snippet: <%@ Master Language="V...
{ "language": "en", "url": "https://stackoverflow.com/questions/367090", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Should you always use enums instead of constants in Java In java <1.5, constants would be implemented like this public class MyClass { public static int VERTICAL = 0; public static int HORIZONTAL = 1; private int orientation; public MyClass(int orientation) { this.orientation = orientation;...
{ "language": "en", "url": "https://stackoverflow.com/questions/367104", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Is there a Python equivalent to `perl -pi -e`? I know of python -c '<code>', but I'm wondering if there's a more elegant python equivalent to perl -pi -e '<code>'. I still use it quite a bit for things like find and replace in a whole directory (perl -pi -e s/foo/bar/g * or even find . | xargs perl -pi -e s/foo/bar...
{ "language": "en", "url": "https://stackoverflow.com/questions/367115", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: Web statistic tracking and RSS With RSS feeds how do you set up google analytics (or any other statistical tracker) to track people who are subscribed to the feed? A: It looks like you have two options. Use FeedBurner (owned by Google) for your feed which will provide you with lots of stats (even more than you may ...
{ "language": "en", "url": "https://stackoverflow.com/questions/367116", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: NHibernate child objects update I have an object that called 'category' and the table looks like this. CATEGORY ------------------------------------------------- ID int ParentCatalogID int ParentCategoryID int << This is the ID of this table Position int Title nvarc...
{ "language": "en", "url": "https://stackoverflow.com/questions/367119", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Cross-Platform Desktop Apps -- An Approach? I have what I believe is a killer idea for an application. By definition, this would be a desktop application, and it ties into some fairly low-level services provided by the platforms for which I'd write it (Windows Search Service, Mac OS X Spotlight server). My intent is...
{ "language": "en", "url": "https://stackoverflow.com/questions/367121", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: I want to assign a record to TStringList.Objects I want create a Playlist control. I have a lot of information to display into a TStringList. I want to assign a record to TStringGrid.Objects instead of an object because so many objects may take a while to create/destroy. It also take a lot of RAM. A record will be m...
{ "language": "en", "url": "https://stackoverflow.com/questions/367130", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: How to ask Windows to open an external file based on file association? Using Win32-specific APIs, is there an easy way to start an external application to open a file simply by passing in the path/name of the file? For example, say I have a file called C:\tmp\image.jpg. Is there a single API that I can call to tell...
{ "language": "en", "url": "https://stackoverflow.com/questions/367141", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Multipart response in Ruby/Rack I want my server to send a multipart response (multipart/x-mixed-replace). I'd prefer some kind of solution using the Sinatra framework or a generic Rack app, but any example in ruby would be nice. Here's the equivalent of what I'm trying to do, in PHP: <?php header('Content-type: m...
{ "language": "en", "url": "https://stackoverflow.com/questions/367151", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Splitting a string into words and punctuation I'm trying to split a string up into words and punctuation, adding the punctuation to the list produced by the split. For instance: >>> c = "help, me" >>> print c.split() ['help,', 'me'] What I really want the list to look like is: ['help', ',', 'me'] So, I want the st...
{ "language": "en", "url": "https://stackoverflow.com/questions/367155", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "76" }
Q: Usage of IoC Containers; specifically Windsor I think the answer to this question is so obivous that noone has bothered writing about this, but its late and I really can't get my head around this. I've been reading into IoC containers (Windsor in this case) and I'm missing how you talk to the container from the vari...
{ "language": "en", "url": "https://stackoverflow.com/questions/367178", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "28" }
Q: Are there any good sites to view screenshots of actual web applications? I am looking for some websites that have actual screenshots of web applications, as well as, things like login screens, grids/tables, edit forms, CSS examples and so on. I find that looking at other applications helps with the creative process ...
{ "language": "en", "url": "https://stackoverflow.com/questions/367179", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Is it safe to run a pool under NT AUTHORITY\NETWORK SERVICE? I normally would create a limited rights user and run the process under that but the fact that pools automatically created under IIS7 in 2008 use this account makes me think that this is perfectly safe, and possibly more so than something I create? The who...
{ "language": "en", "url": "https://stackoverflow.com/questions/367180", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Why does Property Set throw StackOverflow exception? I know java and would normally put in getter/setter methods. I am interested in doing it in C# with the following code, but it throws a StackOverflow exception. What am I doing wrong? Calling Code c.firstName = "a"; Property Code public String firstName; { ...
{ "language": "en", "url": "https://stackoverflow.com/questions/367192", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "65" }
Q: JavaScript: given a list of image URLs, how would one display the first non-broken image? I receive a list of image URLs and currently I have several hidden img elements on my page (one for each URL in the list). When the page has finished loading, I use JavaScript to check the images and display (i.e., set myImage....
{ "language": "en", "url": "https://stackoverflow.com/questions/367197", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How can I ensure atomicity of a get-and-set operation to redirect Console.Out for logging console output? I need to intercept the console output stream(s) in order to capture it for a log but still pass things through to the original stream so the application works properly. This obviously means storing the origina...
{ "language": "en", "url": "https://stackoverflow.com/questions/367201", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do I kill an unruly spid in Sybase? I've got a couple of rogue spid's in my database that I can see are sleeping when I log in as sa and use sp_who, but attempts to use kill <spid> to eliminate them have failed and I don't actually have access to the server itself to bounce it. Is there any other way of killing ...
{ "language": "en", "url": "https://stackoverflow.com/questions/367210", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Finding the HTML element that a Silverlight control is hosted in Is there a way to find the HTML element on the page that a Silverlight control is hosted in from within Silverlight? A: Use this: System.Windows.Browser.HtmlElement plugin = System.Windows.Browser.HtmlPage.Plugin; A: Use firefox and install FireBug ...
{ "language": "en", "url": "https://stackoverflow.com/questions/367213", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: document.write() vs inserting DOM nodes: preserve form information? Consider two web pages with the following in their body respectively: <body> <script> document.writeln('<textarea></textarea>') </script> </body> and <body> <script> var t = document.createElement('textarea'); document.body.appendChild(t); </script...
{ "language": "en", "url": "https://stackoverflow.com/questions/367214", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Does using STL increase footprint significantly? Does using STL increase footprint significantly? Could you guys share your experience regarding this matter? What are the best practices to build a small footprint library? A: Using the STL will increase your binary size for two basic reasons: Inlining By default, th...
{ "language": "en", "url": "https://stackoverflow.com/questions/367216", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: When is it prudent to use friendship in OOP? I'm currently getting through the http://www.cplusplus.com tutorial and I came across this section here: http://www.cplusplus.com/doc/tutorial/inheritance.html that deals with the subject of friend functions and friend classes in C++. My question is, when When is it prud...
{ "language": "en", "url": "https://stackoverflow.com/questions/367219", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: What is the best way to test mailing list software? I recently wrote mailing list software in Ruby On Rails. I would like to get some expert advice on the best way to test it. For example, it would be cool if I could write a script generate 10,000 email addresses, use the software to send an email to those 10,000 ...
{ "language": "en", "url": "https://stackoverflow.com/questions/367222", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: SqlDataReader throws NullReferenceException! what could cause this and how can I debug? I found this in an error log and am trying to work out how it's possible. It's not every day that a NullReferenceException turns up deep within the .net base classes! 1) Exception Information *************************************...
{ "language": "en", "url": "https://stackoverflow.com/questions/367225", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Flood Fill Algorithms Its the weekend again, and that means I get to play with my hobby project. I've gotten tired of creating test levels by hand, so I thought I'd take a break from engine development and work on a level editor: Level Editor http://gfilter.net/junk/Editor.JPG I'd like to implement a flood fill algo...
{ "language": "en", "url": "https://stackoverflow.com/questions/367226", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Automatically reformatting inherited PHP spaghetti code I've taken over a mixed PHP4/PHP5 project which has been handed down from developer to developer, with each one making things worse. Before I spend too much time on it I'd like to develop a base-standard, with consistent formatting at a minimum. Can anyone reco...
{ "language": "en", "url": "https://stackoverflow.com/questions/367257", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: git commit - setting timestamps into the future I need to make some commits using Git but I would like the timestamp in git-log to be in the future. How can I do a commit in git that causes a future timestamp to register in the git-log? A: You should wait a bit. Or you can do this: /tmp/x 604% env GIT_AUTHOR_DATE='...
{ "language": "en", "url": "https://stackoverflow.com/questions/367262", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "45" }
Q: Saving database data changes in commits (if not sqlite) We have a Rails project that uses PostgreSQL-specific queries, so it's uncomfortable to use sqlite even in development mode. The problem is, I'd love to track schema changes in database and omit running migrations on request, and I'd also love to track db-data ...
{ "language": "en", "url": "https://stackoverflow.com/questions/367273", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What is the difference between Abstraction and Polymorphism I seem to not understand two OOP concepts very well. Could you explain what abstraction and polymorphism are, preferably with real examples and code? Thank you. A: Abstraction refers to the act of representing essential features without including the backg...
{ "language": "en", "url": "https://stackoverflow.com/questions/367276", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "42" }
Q: What are some options for a 'local' version control repository? I'm a fan of SVN and I am comfortable setting up my own svn repository, but I'm wondering if there are better options than creating a separate repository. Basically I'm just looking for a way to keep track of or roll back changes before my code is revie...
{ "language": "en", "url": "https://stackoverflow.com/questions/367278", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Disable web.config inheritance? I have a content management application in the root of my website, and I'm trying to use a different app (a billing application) under a sub-folder. Unfortunately, the web.config of the root site is interfering with the sub-app. Is there a way to just disable web.config inheritance fo...
{ "language": "en", "url": "https://stackoverflow.com/questions/367282", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "40" }
Q: How can I make Eclipse provide more help with Hivemind configuration files? A project I work on uses Apache Hivemind to do dependency injection for our app. We have various Hivemind configuration files that define service points, configuration points, etc. And if a developer erroneously edits one of these Hivemind c...
{ "language": "en", "url": "https://stackoverflow.com/questions/367295", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Using mock objects outside of testing, bad practice? I'm working on a project where there is a lot of external service messaging. A good way to describe it in only a slightly "hyperbolas" way would be an application where the system has to send messages to the Flicker API, the Facebook API, and the Netflix API. To s...
{ "language": "en", "url": "https://stackoverflow.com/questions/367308", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Dynamic Memory Allocation Failure Recovery I'm working on an embedded processor (400 MHz Intel PXA255 XScale), and I thought I saw one case where there wasn't enough memory to satisfy a 'new' operation. The program didn't crash, so I assumed other threads had freed their memory and it was just a transient thing. Th...
{ "language": "en", "url": "https://stackoverflow.com/questions/367310", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: _dl_close Assertion failure I'm using dlopen() in an Apache module that I am writing so that I can have a plugin system for my module. I've found that if I compile my module, compile my plugin, and start Apache, everything works peachy-keen. If, however, after I have done all that, I recompile my plugin, (making a s...
{ "language": "en", "url": "https://stackoverflow.com/questions/367323", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: 'If' statement and the colon Here is an interesting piece of code that my fellow team members were just having a slightly heated discussion about... Dim fred As Integer If True Then fred = 5 : fred = 3 : fred = 6 Else fred = 4 : fred = 2 : fred = 1 After executing the above code snippet, what is the value of f...
{ "language": "en", "url": "https://stackoverflow.com/questions/367325", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: loaded a subversion dump but it's inaccessible I received a dump file of a SVN repository that I'm moving to my server. Let's call it myserver.com/svn. The load statement prints out a long list of files loaded and reports no error. However, once I try to access the repository for checkout, or relocate my existing...
{ "language": "en", "url": "https://stackoverflow.com/questions/367328", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Would the MSFT Report Viewer (rdlc) Work with MVC I am interested in learning MVC, and have experimented with a couple of the sample apps. As a project, I'd like to move part or all of my own office app to MVC. An important part of this app, and of ALL of my apps for customers, is the printing of invoices, purchas...
{ "language": "en", "url": "https://stackoverflow.com/questions/367332", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Can PHP do a fairly trivial inheritance thing? I have the following code: abstract class AbstractParent { function __construct($param) { print_r($param); } public static function test() { return new self(1234); } } class SpecificClass extends AbstractParent {} When I invoke SpecificClass::test(), I am getting an...
{ "language": "en", "url": "https://stackoverflow.com/questions/367343", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do you submit a dropdownlist in asp.net mvc from an Ajax form How do you submit from a dropdownlist "onchange" event from inside of an ajax form? According to the following question: How do you submit a dropdownlist in asp.net mvc, from inside of an Html.BeginFrom you can set onchange="this.form.submit" and chan...
{ "language": "en", "url": "https://stackoverflow.com/questions/367349", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "22" }
Q: How do I write custom action DLL for use in an MSI? This is a question I intend to answer myself, but please feel free to add other ways to accomplish this. I was packaging an application for use on a wide variety of configurations, and I determined that the most reliable way to perform custom logic within my MSI w...
{ "language": "en", "url": "https://stackoverflow.com/questions/367365", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How to define a preprocessor symbol in Xcode Is it possible to set a symbol for conditional compilation by setting up properties in an Xcode project? My aim is to to create a symbol that is available to all files, without having to use import/include, so that a set of common classes can have a special behavior in so...
{ "language": "en", "url": "https://stackoverflow.com/questions/367368", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "105" }
Q: How can I make a Ruby gem package copy files to arbitrary locations? Suppose you have a software package. You want to make it a gem, because gems are the de facto standard way to distribute anything in the Ruby world. Gems are great -- for libraries. But for real applications, the Rubygems system seems lacking. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/367377", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Returning a default value. (C#) I'm creating my own dictionary and I am having trouble implementing the TryGetValue function. When the key isn't found, I don't have anything to assign to the out parameter, so I leave it as is. This results in the following error: "The out parameter 'value' must be assigned to bef...
{ "language": "en", "url": "https://stackoverflow.com/questions/367378", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: Stored Proc not executing with LINQ This issue is driving me mad. I have several tables defined, and CRUD stored procs for those tables. I have wired up the stored procs to the tables in Visual Studio using the dbml mapper. All work fine, except for one table. The insert stored proc is not being hit for my history ...
{ "language": "en", "url": "https://stackoverflow.com/questions/367379", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: late static binding: which languages commonly used for web development support it? Lately I've been seeing a lot of talk regarding PHP's lack of late static binding until 5.3. From what I've read proper implementations of stuff like ActiveRecord are not possible until the language has this feature. So, I'm curious ...
{ "language": "en", "url": "https://stackoverflow.com/questions/367400", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Early binding vs. late binding: what are the comparative benefits and disadvantages? When discussing the evolution of computer languages, Alan Kay says that the single most important attribute of his Smalltalk is late binding; it gives the language its malleability and extensibility, and allows inappropriate couplin...
{ "language": "en", "url": "https://stackoverflow.com/questions/367411", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: Formatting inline items? What does the general code look like? This is a total newbie question, so thanks in advance. I'm trying to get my head around the difference between divs and spans, and when and how to use them. Say for instance, I want to have an image left justified, and I want the text to flow around the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/367426", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to create a distribution minus some packages in maven? I have a maven project with the following packages (for illustration only): Root: src/main/java * */com/foo */com/foo/api */com/foo/impl Now I want to create a jar which includes only code in /com/foo/api and /com/foo/impl. How does one hack pom.xml to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/367431", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Associative array without toString, etc I want to create an associative array: var aa = {} // Equivalent to Object(), new Object(), etc... And I want to be sure that any key I access is going to be a number: aa['hey'] = 4.3; aa['btar'] = 43.1; I know JavaScript doesn't have typing, so I can't automatically check t...
{ "language": "en", "url": "https://stackoverflow.com/questions/367440", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Getting Emacs ansi-term and Zsh to play nicely I've been trying to use Zsh within my emacs session, without emacs remapping all the Zsh keys. I found ansi-term works pretty well for this but, I'm still having some problems. I was getting lots of junk characters outputted with, I was able to fix it with: ## Setup pro...
{ "language": "en", "url": "https://stackoverflow.com/questions/367442", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: Read-only PropertyGrid I need to show an object in PropertyGrid with the following requirements: the object and its sub object must be read-only, able to activate PropertyGrid's CollectionEditors. I found a sample that's closely match to what I need but there's an unexpected behaviour I couldn't figure out. I have m...
{ "language": "en", "url": "https://stackoverflow.com/questions/367444", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Evernote app "Tips" image overlaying UITableView The Evernote application has a tips pane which hangs over a UITableView on the initial window. When you click on tips, a straight forward animation happens with a tips pane sliding up into view. My question is, how is that tips pane implemented in the sense that, you ...
{ "language": "en", "url": "https://stackoverflow.com/questions/367447", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: VB 6.0 system tray application doesn't close gracefully when Windows shuts down I'm using the following code within a VB 6.0 application to allow give the application a system tray icon: Option Explicit 'user defined type required by Shell_NotifyIcon API call Public Type NOTIFYICONDATA cbSize As Long hwnd As ...
{ "language": "en", "url": "https://stackoverflow.com/questions/367448", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: What exactly is BGR color space? An RGB color is composed of three components: Red (0-255), Green (0-255) and Blue (0-255). What exactly is BGR color space? How is it different from RGB color space? A: It is about the way the color components are laid out in memory. For BGR the order is BGRBGRBGRBGR..., and for RGB...
{ "language": "en", "url": "https://stackoverflow.com/questions/367449", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "46" }
Q: internal member in an interface I have a list of objects implementing an interface, and a list of that interface: public interface IAM { int ID { get; set; } void Save(); } public class concreteIAM : IAM { public int ID { get; set; } internal void Save(){ //save the object } //other...
{ "language": "en", "url": "https://stackoverflow.com/questions/367457", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "50" }
Q: Testing REST web service client when the services don't yet exist I have already read the posts link text and link text but these are covering the use case of building a REST service on the server and requiring a rapid client in order to test those services. We have the opposite problem, we are building a web client...
{ "language": "en", "url": "https://stackoverflow.com/questions/367459", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Setting up a foreign key to an abstract base class with Django I've factored out common attributes from two classes into an abstract base class, however I have another model that needs to reference either one of those classes. It's not possible to reference an ABC as it doesn't actually have a database table. The fo...
{ "language": "en", "url": "https://stackoverflow.com/questions/367461", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "32" }
Q: How to get all properties of an object and its sub objects I have a similar question to this one except I need to loop all the sub objects and change the property to read-only Please check my code below. This one loop only the main object. When I tried to loop its sub objects, I got an overflow. Thanks. Public Cl...
{ "language": "en", "url": "https://stackoverflow.com/questions/367462", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I directly read the timezone files included in the JRE distribution? Timezone information for Java are kept in a folder called "zi". For eg. C:\Program Files\Java\jdk6\jre\lib\zi files in this folder are in binary format. But it is very important for me to see exactly what they say. Can anyone share a way, t...
{ "language": "en", "url": "https://stackoverflow.com/questions/367467", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Fixed labels in the selection bar of a UIPickerView In the clocks application, the timer screen shows a picker (probably a UIPicker in UIDatePickerModeCountDownTimer mode) with some text in the selection bar ("hours" and "mins" in this case). (edit) Note that these labels are fixed: They don't move when the picker w...
{ "language": "en", "url": "https://stackoverflow.com/questions/367471", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "34" }
Q: Using elements of a constant array as cases in a switch statement I'm attempting to map a set of key presses to a set of commands. Because I process the commands from several places, I'd like to set up a layer of abstraction between the keys and the commands so that if I change the underlying key mappings, I don't ...
{ "language": "en", "url": "https://stackoverflow.com/questions/367494", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Why there is no hasOne relationship in castle activerecord in contrast to Ruby on Rails? or how can i represent an address to country mapping where an address has one one country in castle activerecord? A: The [BelongsTo] attribute is there for one-to-one relations. http://api.castleproject.org/html/T_Castle_Active...
{ "language": "en", "url": "https://stackoverflow.com/questions/367495", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: UIViewController not loading my custom UIView This should be straight forward for a guru. I don't have any code really written out, just a couple of controllers and a custom UIView. All connected through nibs. The app loads without crashing, yet I can't see my NSLog() hit from my custom UIView. My application delega...
{ "language": "en", "url": "https://stackoverflow.com/questions/367518", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How to ensure an event is only subscribed to once I would like to ensure that I only subscribe once in a particular class for an event on an instance. For example I would like to be able to do the following: if (*not already subscribed*) { member.Event += new MemeberClass.Delegate(handler); } How would I go abo...
{ "language": "en", "url": "https://stackoverflow.com/questions/367523", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "52" }
Q: In Java: How to handshake a secured connection using Keystore and Truststore certificate? If I have 2 terminals A and B. T-A is connect T-B over secured socket connection. I need to write code to implement a connection between the 2 terminals. How do I do handshake such connection using Keystore and Truststore. Anot...
{ "language": "en", "url": "https://stackoverflow.com/questions/367530", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Get all the defined functions for an object Is there an equivalent of get_defined_functions() which only shows the functions of a given object? Example usage and output: class A { function foo() { } function bar() { } } class B extends A { function foobar() { } } $b = new B(); print_r(get_object_function...
{ "language": "en", "url": "https://stackoverflow.com/questions/367545", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: ORM/MDA/UML tool for VB6 I know of Rational Rose and we have got Rational Rose 6. But I am looking for some other tools which are more usable, which do not complain that they are not running in Windows 98/2000 (when installed and run in WinXP) and has got better features as compared to Rational Rose 6. A: Check out...
{ "language": "en", "url": "https://stackoverflow.com/questions/367552", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: C# Generic Setup Wizard I have been tasked with creating a program what will create take files in specified folders and create an installer based on those files. For example, having a folder for "All User's Desktop", "Start menu", "Application Data", and "Program Files" My boss wants to put the files into each folde...
{ "language": "en", "url": "https://stackoverflow.com/questions/367556", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Good DataGridView tutorial I'm writing a windows C# application which I wish to use data grid views, but unable to find a good tutorial on to take complete control of the datagrid eg: add columns, add data etc. A: I like some of the tips provided here A: You can take a look here: http://msdn2.microsoft.com/en-us/l...
{ "language": "en", "url": "https://stackoverflow.com/questions/367559", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "24" }
Q: How much input validation should I be doing on my python functions/methods? I'm interested in how much up front validation people do in the Python they write. Here are a few examples of simple functions: def factorial(num): """Computes the factorial of num.""" def isPalindrome(inputStr): """Tests to see if ...
{ "language": "en", "url": "https://stackoverflow.com/questions/367560", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: From where to download compiled and ready to use MonoDev for Mono 2 under Windows? I have heard a lot about Mono and its usability compared to .NET and its cross platform support. I tried to find a working version of MonoDev which will give me a visual way (like MS visual Studio) of working with Mono 2.x. Have we to...
{ "language": "en", "url": "https://stackoverflow.com/questions/367561", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Ruby timeout for Python? Does anyone know a good solution for implementing a function similar to Ruby's timeout in Python? I've googled it and didn't really see anything very good. Thanks for the help. Here's a link to the Ruby documentation http://www.ruby-doc.org/stdlib/libdoc/timeout/rdoc/index.html A: def tim...
{ "language": "en", "url": "https://stackoverflow.com/questions/367562", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do I build a numpy array from a generator? How can I build a numpy array out of a generator object? Let me illustrate the problem: >>> import numpy >>> def gimme(): ... for x in xrange(10): ... yield x ... >>> gimme() <generator object at 0x28a1758> >>> list(gimme()) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] >>> nump...
{ "language": "en", "url": "https://stackoverflow.com/questions/367565", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "205" }
Q: Gantt Chart Controls on Windows Forms We are evaluating options for a Gantt chart control (on Windows Forms) as opposed developing one on our own. What are the various Gantt Chart controls you have had experience with? Pros and cons? Is it a viable idea to develop such a control from scratch (given that the control ...
{ "language": "en", "url": "https://stackoverflow.com/questions/367570", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Detecting infinite loop in brainfuck program I have written a simple brainfuck interpreter in MATLAB script language. It is fed random bf programs to execute (as part of a genetic algorithm project). The problem I face is, the program turns out to have an infinite loop in a sizeable number of cases, and hence the GA...
{ "language": "en", "url": "https://stackoverflow.com/questions/367571", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "24" }