text
string
meta
dict
Q: Javascript style dot notation for dictionary keys unpythonic? I've started to use constructs like these: class DictObj(object): def __init__(self): self.d = {} def __getattr__(self, m): return self.d.get(m, None) def __setattr__(self, m, v): super.__setattr__(self, m, v) Update: ...
{ "language": "en", "url": "https://stackoverflow.com/questions/224026", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "24" }
Q: C Shell: How to execute a program with non-command line arguments? My $SHELL is tcsh. I want to run a C shell script that will call a program many times with some arguments changed each time. The program I need to call is in Fortran. I do not want to edit it. The program only takes arguments once it is executed, but...
{ "language": "en", "url": "https://stackoverflow.com/questions/224038", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What is the best solution for storing ASP.NET session variables? StateServer or SQLServer? StateServer or SQLServer? * *What is the best solution for storing ASP.NET session variables? *What are the pros and cons of each? *Are one better then other in any particular situation? A: I think the assumption would ...
{ "language": "en", "url": "https://stackoverflow.com/questions/224039", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: How do I calculate the previous business day in ksh shell script? What is the most elegant way to calculate the previous business day in shell ksh script ? What I got until now is : #!/bin/ksh set -x DAY_DIFF=1 case `date '+%a'` in "Sun") DAY_DIFF=2 ;; "Mon") DAY_DIFF=3 ;; esac PREV_DT=`perl -e '($sec...
{ "language": "en", "url": "https://stackoverflow.com/questions/224040", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Running VBA before any forms open So I have an Access database with a front and a back end. I will be distributing it to users soon, but I have no control over where exactly they will put the files on their computers. However, I think I can count on them putting front and back ends in the same folder. As such, whe...
{ "language": "en", "url": "https://stackoverflow.com/questions/224041", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Timer in a win32 service Can someone please point me to the easiest way to have a timer in a Win32 service? I suppose I could create a dummy window for this purpose or have a second thread do tick counts, but what's best? Is there a more elegant way? Thanks in advance. A: Instead of using UI timers (even though you...
{ "language": "en", "url": "https://stackoverflow.com/questions/224043", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Need ActiveX control to embed Excel into a dialog I'm building an "import from Excel" function. It has to be in a DLL, called from a non-MFC app. Has to provide an image of the spreadsheet that users can drag a select box around (to select cells), then click an IMPORT button, and have the right thing happen. Havin...
{ "language": "en", "url": "https://stackoverflow.com/questions/224044", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: SQL Server Stored Proc Argument Type Conversion Suppose I have a bunch of varchar(6000) fields in a table and want to change those to text fields. What are the ramifications of the stored procedures whose arguments are of type varchar(6000). Does each stored procedure also need those argument data types changed? ...
{ "language": "en", "url": "https://stackoverflow.com/questions/224047", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Isn't CSRF a browser security issue? Regarding cross-site request forgery (CSRF) attacks, if cookies are most used authentication method, why do web browsers allow sending cookies of some domain (and to that domain) from a page generated from another domain? Isn't CSRF easily preventable in browser by disallowing su...
{ "language": "en", "url": "https://stackoverflow.com/questions/224049", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: Distributed Random Number Generation I was wondering if there is a way for a network of N participants to agree that a number from 1 to M was chosen at random. (e.g. not influenced by any of the participants) This has been solved for values of n=2 and m=2 by the coin tossing protocol. Does anyone know of any solutio...
{ "language": "en", "url": "https://stackoverflow.com/questions/224058", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: Test loops at the top or bottom? (while vs. do while) When I was taking CS in college (mid 80's), one of the ideas that was constantly repeated was to always write loops which test at the top (while...) rather than at the bottom (do ... while) of the loop. These notions were often backed up with references to studie...
{ "language": "en", "url": "https://stackoverflow.com/questions/224059", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "28" }
Q: Is there a Entity Attribute Value (EAV) framework out there for PHP/MySQL? Is there a Entity Attribute Value framework out there for PHP/MySQL? I'm starting to write my own, but I feel like its been done already. Any suggestions? A: I think Magento makes use of an EAV style architecture, might be worth having a l...
{ "language": "en", "url": "https://stackoverflow.com/questions/224065", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "22" }
Q: Is the Open Source Jalopy Eclipse plugin compatible with Ganymede? After much searching, I found the download for the eclipse version of jalopy. Is this compatible with Eclipse 3.4? It's dated 2006. I've copied the extracted folder to my plugins directory and run eclipse -clean, but I can't find anything matching '...
{ "language": "en", "url": "https://stackoverflow.com/questions/224072", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to print only parts of a page? I am trying to hide some divs before the user prints this giant form, then display the divs again afterward. Thus I want to ignore the rest of the page, and only print the form itself. Sure I could open a separate page when the user clicks the print button. The only thing is that t...
{ "language": "en", "url": "https://stackoverflow.com/questions/224078", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: local variables in constructors are not followed. Is this a bug in gdb ? I am currently running gdb version 6.7.1 on Ubuntu Linux, and working in a C++ project. Surprisingly I was trying to debug a constructor and I have found that local variables declared within the scope of the constructor are not followed or noti...
{ "language": "en", "url": "https://stackoverflow.com/questions/224090", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Appending to an array variable in a parent class in PHP How do I extend my parent's options array for child classes in PHP? I have something like this: class ParentClass { public $options = array( 'option1'=>'setting1' ); //The rest of the functions would follow } I would like to append t...
{ "language": "en", "url": "https://stackoverflow.com/questions/224106", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do you make a method apply to a collection of ActiveRecord objects Currently, if I want to apply a method to a group of ActiveRecord objects, I have to structure the call like so: messages = Message.find(:all) csv = Message.to_csv(messages) How can I define the method so it's structured like so? messages = Mess...
{ "language": "en", "url": "https://stackoverflow.com/questions/224128", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: QuickBooks Item Query help needed I'm sure this is going to be a long shot, but I need help with a query involving QuickBooks Items. I need to query for all QuickBooks Items that are linked to an Income account. Is there an easy way to do this, or do I need to make 2 queries (one for items ans one for accounts) and ...
{ "language": "en", "url": "https://stackoverflow.com/questions/224130", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Infinite loops - top or bottom? In the spirit of questions like Do your loops test at the top or bottom?: Which style do you use for an infinite loop, and why? * *while (true) { } *do { } while (true); *for (;;) { } *label: ... goto label; A: while(1) { //do it } That's how I roll. A: I like to use the fo...
{ "language": "en", "url": "https://stackoverflow.com/questions/224138", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: What would be a better implementation of all combinations in lexicographic order of a jagged list? I was put in a position today in which I needed to enumerate all possible combinations of jagged list. For instance, a naive approach would be: for a in [1,2,3]: for b in [4,5,6,7,8,9]: for c in [1,2]: ...
{ "language": "en", "url": "https://stackoverflow.com/questions/224145", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: When Clearing an ObservableCollection, There are No Items in e.OldItems I have something here that is really catching me off guard. I have an ObservableCollection of T that is filled with items. I also have an event handler attached to the CollectionChanged event. When you Clear the collection it causes an Collectio...
{ "language": "en", "url": "https://stackoverflow.com/questions/224155", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "101" }
Q: Formula based pricing. Storage in RDBMS and use in application layer I'm about to enter the 1st phases of designing a commodities trading application. A major function of this application is the capture and evaluation of pricing information. Pricing in this market is not fixed. It is usually a market benchmark +/- a...
{ "language": "en", "url": "https://stackoverflow.com/questions/224162", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Capturing R6025 pure virtual call I currently capture MiniDumps of unhandled exceptions using SetUnhandledExceptionFilter however at times I am getting "R6025: pure virtual function". I understand how a pure virtual function call happens I am just wondering if it is possible to capture them so I can create a MiniDum...
{ "language": "en", "url": "https://stackoverflow.com/questions/224163", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: Using PHP variables on multiple pages Is it possible to use a variable from one page in a piece of code on another? e.g. submit a form on one page and on the second page use a PHP script to add the data from the form to a MySQL table Thanks for all the help A: Your best bet would be to use PHP's session functions....
{ "language": "en", "url": "https://stackoverflow.com/questions/224173", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Different Interop references on two different computers doesn't work When I add a reference to Microsoft.Office.Interop.Excel on my computer, Visual Studio adds this to the project file: <COMReference Include="Excel"> <Guid>{00020813-0000-0000-C000-000000000046}</Guid> <VersionMajor>1</VersionMajor> <VersionMi...
{ "language": "en", "url": "https://stackoverflow.com/questions/224181", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: How to update a column value incrementally I'm experimenting with a personal finance application, and I'm thinking about what approach to take to update running balances when entering a transaction in an account. Currently the way I'm using involves retrieving all records more recent than the inserted/modified one, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/224185", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: SQL: How do I SELECT only the rows with a unique value on certain column? Thanks a million everyone for everyone's response. Unfortunately, none of the solutions appear to be working on my end, and my guess is that the example I've provided is messed up. So let me try again. My table looks like this: contract ...
{ "language": "en", "url": "https://stackoverflow.com/questions/224200", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: Why use infinite loops? Another poster asked about preferred syntax for infinite loops. A follow-up question: Why do you use infinite loops in your code? I typically see a construct like this: for (;;) { int scoped_variable = getSomeValue(); if (scoped_variable == some_value) { break; } } Which lets you g...
{ "language": "en", "url": "https://stackoverflow.com/questions/224204", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Create an Application without a Window How would you program a C/C++ application that could run without opening a window or console? A: When you write a WinMain program, you automatically get the /SUBSYSTEM option to be windows in the compiler. (Assuming you use Visual Studio). For any other compiler a similar opt...
{ "language": "en", "url": "https://stackoverflow.com/questions/224225", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "31" }
Q: What is the "cost" of .NET reflection? Possible Duplicate: How costly is .NET reflection? I am currently in a programming mentality that reflection is my best friend. I use it a lot for dynamic loading of content that allows "loose implementation" rather than strict interfaces, as well as a lot of custom attribut...
{ "language": "en", "url": "https://stackoverflow.com/questions/224232", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "82" }
Q: Is there a way to check if an istream was opened in binary mode? I'm using an istream which could be stringstream, ifstream or a user-defined stream type and I need to know if, in the case of an ifstream, it was not opened in binary mode (so I can throw an exception). I have tried the following method: if ((_is.flag...
{ "language": "en", "url": "https://stackoverflow.com/questions/224234", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "23" }
Q: Building websites that will be localized Does anyone have some guidelines or links to articles when designing a website that needs to be localized in 20+ languages? The initial translation isn't so much the problem, rather ongoing maintenance (i.e. when an update is made on the English site, how are people notified ...
{ "language": "en", "url": "https://stackoverflow.com/questions/224235", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Adding a newline into a string in C# I have a string. string strToProcess = "fkdfdsfdflkdkfk@dfsdfjk72388389@kdkfkdfkkl@jkdjkfjd@jjjk@"; I need to add a newline after every occurence of "@" symbol in the string. My Output should be like this fkdfdsfdflkdkfk@ dfsdfjk72388389@ kdkfkdfkkl@ jkdjkfjd@ jjjk@ A: You can...
{ "language": "en", "url": "https://stackoverflow.com/questions/224236", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "279" }
Q: What's the best way to write a short[] array to a file in C#? I have an array of shorts (short[]) that I need to write out to a file. What's the quickest way to do this? A: Following up on Jon B's answer, if your file contains any other data, you might want to prefix the data with the count of values. i.e.: static...
{ "language": "en", "url": "https://stackoverflow.com/questions/224239", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: What is the difference between iPod touch and iPod touch 2nd generation? When submitting an app to the app store what is the real difference between iPod Touch and iPod Touch 2nd generation? A: The following: * *Slightly thinner *Built-in support for Nike+ *Volume bar *External speaker *Faster processor (5...
{ "language": "en", "url": "https://stackoverflow.com/questions/224240", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Change order of XML using XDocument I want to change the order of XML using XDocument <root> <one>1</one> <two>2</two> </root> I want to change the order so that 2 appears before 1. Is this capability baked in or do I have to do it myself. For example, remove then AddBeforeSelf()? Thanks A: Similar to above...
{ "language": "en", "url": "https://stackoverflow.com/questions/224253", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Can I use -selectRowAtIndexPath: (or anything else) on a UITableView to trigger delegated -didSelectRowAtIndexPath: method? I have a UITableView set up as a navigation controller type deal (like the default in Xcode). I have added an "Add" button which adds an element to the UITableView. When I call -selectRowAtInde...
{ "language": "en", "url": "https://stackoverflow.com/questions/224254", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Why are there multiple different hashing algorithm providers in System.Security.Cryptography? As documented by MSDN, there are several providers for many of the different hashing algorithms (e.g. MD5, SHA, RIPE). For each of the algorithms, any available implementation seems to fall into 1 of 3 categories: * *[Al...
{ "language": "en", "url": "https://stackoverflow.com/questions/224272", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: jQuery datepicker - Restrict dates from server side (ASP.NET) I have a jQuery datepicker that I want to restrict non work days - weekends, public holidays etc. I have seen examples on how to do this from the client side (javascript), but is there a way to restrict the dates from server side ASP.NET code? I figure yo...
{ "language": "en", "url": "https://stackoverflow.com/questions/224283", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do I get count of duplicated values and join the table to retrieve each value's name? I have two tables, one that contains volunteers, and one that contains venues. Volunteers are assigned one venue each. The id of the venues table (venues.id) is placed within the volunteers table in the venue_id column (volunte...
{ "language": "en", "url": "https://stackoverflow.com/questions/224295", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: In Ruby on Rails, how do I make a polymorphic model associate to a namespaced model? I have the following models. # app/models/domain/domain_object.rb class Domain::DomainObject < ActiveRecord::Base has_many :links_from, :class_name => "Link", :as => :from, :dependent => :destroy end # app/models/link.rb class Li...
{ "language": "en", "url": "https://stackoverflow.com/questions/224297", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Are there benefits to a case sensitive database? We have just 'migrated' an SQL Server 2005 database from DEVEL into TEST. Somehow during the migration process the DB was changed from case insensitive to sensitive - so most SQL queries broke spectacularly. What I would like to know, is - are there any clear benefit...
{ "language": "en", "url": "https://stackoverflow.com/questions/224298", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "22" }
Q: Exporting an MS Excel 2003 workbook to PDF via VBA I have an Excel 2003 workbook that contains a macro to copy certain of its sheets across to a new workbook, then save and close the new workbook. It does this several dozen times, with slightly different sheet selections each time. I would like to add an extra step...
{ "language": "en", "url": "https://stackoverflow.com/questions/224301", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Is there a way to prioritize web services in ASP.NET The goal is having a way to guarantee a certain SLA (Service Level Agreement) for some of the web services to guarantee backend database uptime. Ideally this should be achieved with no specific code in the services but by controlling the underlying infrastructure/...
{ "language": "en", "url": "https://stackoverflow.com/questions/224306", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Set Appointment using iPhone SDK I know you can access the Contact Store from the SDk, but is it possible to create and read appointment data? A: This is currently not accessable through the 2.x SDK. If this is something you need you should go to http://bugreport.apple.com/ and signin with your developer account an...
{ "language": "en", "url": "https://stackoverflow.com/questions/224309", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Cleanest way to toggle a boolean variable in Java? Is there a better way to negate a boolean in Java than a simple if-else? if (theBoolean) { theBoolean = false; } else { theBoolean = true; } A: This answer came up when searching for "java invert boolean function". The example below will prevent certain st...
{ "language": "en", "url": "https://stackoverflow.com/questions/224311", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "234" }
Q: Web Development Tools Question - Automatic File Upload This should a quick question for some easy rep. I'm doing some PHP Website development, decided to check out and play around with jQuery as well. I don't want to install and manage a local PHP server/service, but I would like a quick one click method for automat...
{ "language": "en", "url": "https://stackoverflow.com/questions/224315", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: United States State shapes for Office I want to create visuals along the lines of CNN's "red-state, blue-state" shadings of the states in the U.S. for my project. I'm planning to do something fancier than just shading the state's shape in a color. Are there open source libraries of state shapes/polygons (or - if not...
{ "language": "en", "url": "https://stackoverflow.com/questions/224322", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Alternatives to a wizard I'm making a program that fits the wizard concept ideally; the user is walked through the steps to create a character for a game. However, I'm realizing that the limitations of the wizard are making it difficult to design "elegant" logic flow. For example, because all pages of the wizard are...
{ "language": "en", "url": "https://stackoverflow.com/questions/224337", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Which edition of SQL Server 2005 would allow me to continue to run DTS packages? I heard about SSIS, a new replacement of the old DTS. I believe it has the same functionality which I used to perform. Now, like any other product from Microsoft, you have to mess with 10 different choices for a single package. I would ...
{ "language": "en", "url": "https://stackoverflow.com/questions/224339", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Is there a "right" way to do inheritance in JavaScript? If so, what is it? I have been trying to learn how to add testing to existing code -- currently reading reading Working Effectively With Legacy Code. I have been trying to apply some of the principles in JavaScript, and now I'm trying to extract an interface. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/224345", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Why does a floated control in a floated element slide over too far to the right in IE7, but not in Firefox? Hopefully a picture is worth a thousand lines of code because I don't want to have to strip down all of the ASP.Net code, HTML, JavaScript, and CSS to provide an example (but I'll supply what I can upon reque...
{ "language": "en", "url": "https://stackoverflow.com/questions/224352", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Open Source Competition or Collaboration I always have found the open source space interesting but have never actually participated in any projects. I recently had what I thought was a great a idea that was different from other projects I had seen in the area (in case it matters it was a .NET DI framework). My ques...
{ "language": "en", "url": "https://stackoverflow.com/questions/224354", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Cleanest syntax to delete a record in linqtosql What is the best way to delete a database record using LINQ when I have the primary key? A: That approach is acceptable and typical. It is a little wasteful because you're requesting the whole record. This cannot be avoided given the DeleteOnSubmit method signature....
{ "language": "en", "url": "https://stackoverflow.com/questions/224359", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What is the lowest SQL Server 2005 edition to support SSIS? What is the lowest SQL Server 2005 edition to support SSIS? A: The standard edition for the basic transforms. The advance edition for the advanced transforms. http://www.microsoft.com/sqlserver/2005/en/us/compare-features.aspx#integration
{ "language": "en", "url": "https://stackoverflow.com/questions/224362", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Handling unconventional source directory for a web project in maven I've inherited a web project (Servlets) which is currently build inside eclipse. I want to add maven around it. But the project's source directory is not following the maven convention. Instead of being inside src/main/java, it's src/package/name/.....
{ "language": "en", "url": "https://stackoverflow.com/questions/224373", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: Any issues running a daemon via XSP2? We want to run a daemon that exposes itself via ASMX, using Mono 2.0 (or later). Instead of dealing with the ASP.NET hosting APIs, we're thinking about just starting a daemon thread in the Application_Start event. XSP2 shouldn't restart the appdomain, so our daemon will be safe....
{ "language": "en", "url": "https://stackoverflow.com/questions/224378", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: What does __FILE__ mean in Ruby? I see this all the time in Ruby: require File.dirname(__FILE__) + "/../../config/environment" What does __FILE__ mean? A: The value of __FILE__ is a relative path that is created and stored (but never updated) when your file is loaded. This means that if you have any calls to Dir...
{ "language": "en", "url": "https://stackoverflow.com/questions/224379", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "229" }
Q: Should I look at version control systems beyond Subversion? Within the last year I have become addicted to subversion. I am an only developer and I also work on a few of my own projects. With SVN its really easy to manage everything - and because it is hosted on an online server though HTTPS I can access my code fro...
{ "language": "en", "url": "https://stackoverflow.com/questions/224396", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "28" }
Q: Why do people use __ (double underscore) so much in C++ I was taking a look through some open-source C++ code and I noticed a lot of double underscores used within in the code, mainly at the start of variable names. return __CYGWIN__; Just wondering: Is there a reason for this, or is it just some people's code styl...
{ "language": "en", "url": "https://stackoverflow.com/questions/224397", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "104" }
Q: Return total number of files within a folder using PHP Is there a better/simpler way to find the number of images in a directory and output them to a variable? function dirCount($dir) { $x = 0; while (($file = readdir($dir)) !== false) { if (isImage($file)) {$x = $x + 1} } return $x; } This seems like s...
{ "language": "en", "url": "https://stackoverflow.com/questions/224408", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: log4net with ASP.NET 3.5 problems I'm having some trouble getting log4net to work from ASP.NET 3.5. This is the first time I've tried to use log4net, I feel like I'm missing a piece of the puzzle. My project references the log4net assembly, and as far as I can tell, it is being deployed successfully on my server. My...
{ "language": "en", "url": "https://stackoverflow.com/questions/224410", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: PHP + WSDL + SOAP - how do I display a webservice result on screen I'm just starting out in PHP and would like some advice as to how to get a webservice result to display in an array. For example I would like to print the currency codes into an array from the following WSDL $wsdl="http://www.webservicex.com/Currenc...
{ "language": "en", "url": "https://stackoverflow.com/questions/224417", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Constant value in conditional expression In a coding style question about infinite loops, some people mentioned they prefer the for(;;) style because the while(true) style gives warning messages on MSVC about a conditional expression being constant. This surprised me greatly, since the use of constant values in cond...
{ "language": "en", "url": "https://stackoverflow.com/questions/224421", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: "Bootstrapping" a remote swf into the application SecurityDomain (actionscript3) My Flash (AS3/AIR) application is currently using a slightly unusual architecture (for a Flash app) to provide particular base classes for loaded content at runtime. The external content is published with 'stub' base classes, which are ...
{ "language": "en", "url": "https://stackoverflow.com/questions/224422", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: xcopy ASP.NET deployment of a Subversion-managed project I'm currently using Subversion to manage my ASP.NET website. I'm finding that whenever I go to upload my website to my server, I'm copying a large number of hidden .svn folders and whatever contents may lie within them. Does anyone have any suggestions for avo...
{ "language": "en", "url": "https://stackoverflow.com/questions/224430", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Is it possible to see the CODE for sp_executesql? Is it TSQL? Is it possible to see the CODE for sp_executesql? I would like to see the actual code. I could not find it in sql server management studio. A: sp_executesql is an extended stored procedure. It's binary in a DLL.
{ "language": "en", "url": "https://stackoverflow.com/questions/224440", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Decrypt PHP encrypted string in C# I have a string encrypted in PHP that I would like to decrypt in C#. I used the tutorial below to do the encryption, but am having problems decrypting. Can anyone post an example on how to do this? http://www.sanity-free.org/131/triple_des_between_php_and_csharp.html A: Hope t...
{ "language": "en", "url": "https://stackoverflow.com/questions/224453", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: Checkout from TFS with MSBuild What's the easiest way to checkout a file from our TFS with MSBUILD. From what I can see it's to shell out to TF.EXE and manually call the checkout command. Is there really no built in command?! A: the 'itemspec' can be a list of space-delimited items and can use wildcards. A: Ther...
{ "language": "en", "url": "https://stackoverflow.com/questions/224460", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: Storing money in a decimal column - what precision and scale? I'm using a decimal column to store money values on a database, and today I was wondering what precision and scale to use. Since supposedly char columns of a fixed width are more efficient, I was thinking the same could be true for decimal columns. Is it?...
{ "language": "en", "url": "https://stackoverflow.com/questions/224462", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "200" }
Q: Avoiding Mixup of Language Details Today someone asked me what was wrong with their source code. It was obvious. "Use double equals in place of that single equal in that if statement. Um, I think..." As I remember some languages actually take a single equals for comparison. Since I sometimes forget or mix up the...
{ "language": "en", "url": "https://stackoverflow.com/questions/224466", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How can I Fail a WebTest? I'm using Microsoft WebTest and want to be able to do something similar to NUnit's Assert.Fail(). The best i have come up with is to throw new webTestException() but this shows in the test results as an Error rather than a Failure. Other than reflecting on the WebTest to set a private memb...
{ "language": "en", "url": "https://stackoverflow.com/questions/224467", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: iframe shimming or ie6 (and below) select z-index bug Uhm I'm not sure if anyone has encountered this problem a brief description is on IE6 any <select> objects get displayed over any other item, even div's... meaning if you have a fancy javascript effect that displays a div that's supposed to be on top of everythi...
{ "language": "en", "url": "https://stackoverflow.com/questions/224471", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: No suitable MySQL driver found for JBoss application I am new to creating Java web applications and came across this problem when trying to interact with my database (called ccdb) through my application: java.sql.SQLException: No suitable driver found for jdbc:mysql://localhost/ccdb/ My application runs on JBoss and...
{ "language": "en", "url": "https://stackoverflow.com/questions/224473", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to get a webserice to serialize/deserialize the same type in .net I want to use typed parameters in the web methods. But when visual studio 2005 creates the web reference on for the client it automatically creates it's own types. I am using a .net web service and a .net client. For example: < WebMethod > _ Publ...
{ "language": "en", "url": "https://stackoverflow.com/questions/224474", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Is it possible to use Full Text Search (FTS) with LINQ? I wonder if is possible to use FTS with LINQ using .NET Framework 3.5. I'm searching around the documentation that I didn't find anything useful yet. Does anyone have any experience on this? A: I don't believe so. You can use 'contains' on a field, but it onl...
{ "language": "en", "url": "https://stackoverflow.com/questions/224475", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "77" }
Q: Creating a custom Hibernate UserType - What does isMutable() mean? I am creating a custom UserType in Hibernate for a project. It has been relatively straightforward until I came to the isMutable method. I am trying to figure out what this method means, contract-wise. Does it mean the class I am creating the UserTy...
{ "language": "en", "url": "https://stackoverflow.com/questions/224481", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Why the query strings in my ASP.NET MVC route? On an ASP.NET MVC (Beta) site that I am developing sometimes calls to ActionLink will return to me URLs containing querying strings. I have isolated the circumstances that produce this behavior, but I still do not understand why, instead of producing a clean URL, it dec...
{ "language": "en", "url": "https://stackoverflow.com/questions/224484", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Why is my SQL Server cursor very slow? I am using a Cursor in my stored procedure. It works on a database that has a huge number of data. for every item in the cursor i do a update operation. This is taking a huge amount of time to complete. Almost 25min. :( .. Is there anyway i can reduce the time consumed for this...
{ "language": "en", "url": "https://stackoverflow.com/questions/224485", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: .NET CF mobile device application - best methodology to handle potential offline-ness? I'm building a mobile application in VB.NET (compact framework), and I'm wondering what the best way to approach the potential offline interactions on the device. Basically, the devices have cellular and 802.11, but may still be o...
{ "language": "en", "url": "https://stackoverflow.com/questions/224496", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: What is the best way to calculate word frequency in VB.NET? There are some good examples on how to calculate word frequencies in C#, but none of them are comprehensive and I really need one in VB.NET. My current approach is limited to one word per frequency count. What is the best way to change this so that I can ge...
{ "language": "en", "url": "https://stackoverflow.com/questions/224499", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How does "Edit and continue" work in Visual Studio? I have always found this to be a very useful feature in Visual Studio. For those who don't know about it, it allows you to edit code while you are debugging a running process, re-compile the code while the binary is still running and continue using the application...
{ "language": "en", "url": "https://stackoverflow.com/questions/224500", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "26" }
Q: Repeating background image in native iPhone app Short of putting a UIWebView as the back-most layer in my nib file, how can I add a repeating background image to an iPhone app (like the corduroy look in the background of a grouped UITableView)? Do I need to create an image that's the size of the iPhone's screen and ...
{ "language": "en", "url": "https://stackoverflow.com/questions/224503", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "48" }
Q: Why is this line breaking Rails with Passenger on DreamHost? Ok, so I have a Rails app set up on DreamHost and I had it working a while ago and now it's broken. I don't know a lot about deployment environments or anything like that so please forgive my ignorance. Anyway, it looks like the app is crashing at this l...
{ "language": "en", "url": "https://stackoverflow.com/questions/224504", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Redirect the "puts" command output to a log file I am working on creating a daemon in Ruby using the daemons gem. I want to add output from the daemon into a log file. I am wondering what is the easiest way to redirect puts from the console to a log file. A: If you need to capture both STDERR and STDOUT and don't w...
{ "language": "en", "url": "https://stackoverflow.com/questions/224512", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: How do Microsoft (and other software companies with a large installed base) manage patch dependencies? OS (usually security-based) patches and hotfixes that Microsoft releases to the community normally consist of, in my understanding, a series of updated DLLs or other binaries. How does Microsoft, and other companie...
{ "language": "en", "url": "https://stackoverflow.com/questions/224515", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How do you estimate a EAI project using Function point? How do you estimate a EAI project using Function point? A: FP analysis is inappropriate for integration projects of any sort as it presupposes that you can specify the application up-front. Most of the work in any integration project of non-trivial complexity...
{ "language": "en", "url": "https://stackoverflow.com/questions/224526", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Loosely coupled events in WPF without using Prism I'm working on a WPF application and is using the Model-View-ViewModel pattern. The application consists of two modules at the moment: * *Left Panel to browse a tree and select a node *Main Panel to show the content of the selected tree node. I want to keep the...
{ "language": "en", "url": "https://stackoverflow.com/questions/224527", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: are XML standard parsers faster than other kind of custom written parsers? Are XML parsers (provided by standard libraries) faster than custom written parsers? If so, why? A: Custom written parsers for what? Still XML? If so, I'd expect standard libraries to generally have higher quality, faster, more robust code t...
{ "language": "en", "url": "https://stackoverflow.com/questions/224537", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: Unlinked web pages on a server - security hole? On my website, I have several html files I do not link off the main portal page. Without other people linking to them, is it possible for Jimmy Evil Hacker to find them? A: If anyone accesses the pages with advanced options turned on on their Google toolbar, then the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/224541", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Graphically laying out wx app Being really new to wx, I'm wondering if there is an IDE (especially for Linux) which would help me lay out a frame or dialog or whatever just to help me see what I'm doing. That means also creating the code for those changes. I remember way back when using resource compilers for OS/2 ...
{ "language": "en", "url": "https://stackoverflow.com/questions/224547", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Event handling in embedded code I want to know how events are used in embedded system code. Main intention is to know how exactly event flags are set/reset in code. and how to identify which task is using which event flag and which bits of the flag are getting set/reset by each task. Please put your suggestion or co...
{ "language": "en", "url": "https://stackoverflow.com/questions/224553", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Custom get line input function I am reading over the K&R book, and am a little stuck. What is wrong with the following? void getInput(int* output) { int c, i; for(i=0; (c = getchar()) != '\n'; i++) output[i] = c; // printf("%c", c) prints the c value as expected output[++i] = '\0'; } When I run the pr...
{ "language": "en", "url": "https://stackoverflow.com/questions/224562", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Server.Transfer Vs. Response.Redirect What is difference between Server.Transfer and Response.Redirect? * *What are advantages and disadvantages of each? *When is one appropriate over the other? *When is one not appropriate? A: There are many differences as specified above. Apart from above all, there is one ...
{ "language": "en", "url": "https://stackoverflow.com/questions/224569", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "274" }
Q: How to remove the background from a fingerprint image? I have a fingerprint image taken from a sliding scanner. However the output does not have clean background. It looks like this: dirty http://img208.imageshack.us/img208/2622/dirtyie0.png I want to remove the background so that further processing will be more acc...
{ "language": "en", "url": "https://stackoverflow.com/questions/224570", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Will SQL Server 2005 penalize me for using an nvarchar(50) as a primary key, instead of an integer? I'm considering altering some tables to use nvarchar(50) as primary key instead of an int primary key. Using an int ID for a key really is irrelevant data, it's the string I'm interested in. What sort of performance h...
{ "language": "en", "url": "https://stackoverflow.com/questions/224576", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Deep-Initialising Java Bean properties Do you bother initialising java bean values? Say, for example: ([g|s]etters omitted) public class SomeClass { private String foo; private Date bar; private Baz someObject; } (Yes, this is a POJO being used as a bean rather than a Java Bean in the strictest sens...
{ "language": "en", "url": "https://stackoverflow.com/questions/224583", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do you make div elements display inline? Given this HTML: <div>foo</div><div>bar</div><div>baz</div> How do you make them display inline like this: foo bar baz not like this: foo bar baz A: As mentioned, display:inline is probably what you want. Some browsers also support inline-blocks. http://www...
{ "language": "en", "url": "https://stackoverflow.com/questions/224602", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "287" }
Q: Is it possible to write a stored procedure with dynamic parameters like sp_executesql? Is it possible to write a stored procedure (in tsql or other variants) with dynamic parameters like sp_executesql? i.e. the number and type of parameters in not known in advance and should be built dynamically on client side. jus...
{ "language": "en", "url": "https://stackoverflow.com/questions/224606", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Gnuplot: How to plot each line in a file after some pause i have a 3 column datafile and i wanted to use splot to plot the same. But what i want is that gnuplot plots first row (in some colour, say red) and then pauses for say 0.3 secs and then moves on to plotting next row (in other colour, not in red, say in green...
{ "language": "en", "url": "https://stackoverflow.com/questions/224617", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }