text
stringlengths
8
267k
meta
dict
Q: Programmatically setting Emacs frame size My emacs (on Windows) always launches with a set size, which is rather small, and if I resize it, it's not "remembered" at next start-up. I've been playing with the following: (set-frame-position (selected-frame) 200 2) ; pixels x y from upper left (set-frame-size (selecte...
{ "language": "en", "url": "https://stackoverflow.com/questions/335487", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "28" }
Q: How do you find the least optimized parts of a program? Are there any tools to give some sort of histogram of where most of the execution time of the program is spent at? This is for a project using c++ in visual studio 2008. A: You need a profiler. Visual Studio Team edition includes a profiler (which is what you ...
{ "language": "en", "url": "https://stackoverflow.com/questions/335494", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Are there tools to compile CIL to a binary? After seeing a previous post "Making Applications programmed in .NET languages work on older machines", I've got to wonder; Are there tools to compile CIL to a binary? If so, you could convert a CIL file to a native Windows app if you didn't want the user to require the .N...
{ "language": "en", "url": "https://stackoverflow.com/questions/335499", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: exchange powershell : finding the active directory office property I wrote this small script to pull the office property from get-user by piping the exchange mailbox object. $server = "tms08" $arrUser = get-mailbox -Server $server |Get-MailboxStatistics |select identity foreach ( $id in $arrUuser) { $office = g...
{ "language": "en", "url": "https://stackoverflow.com/questions/335514", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Simple JavaScript problem: onClick confirm not preventing default action I'm making a simple remove link with an onClick event that brings up a confirm dialog. I want to confirm that the user wants to delete an entry. However, it seems that when Cancel is clicked in the dialog, the default action (i.e. the href link...
{ "language": "en", "url": "https://stackoverflow.com/questions/335516", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "53" }
Q: Dictionary API (lexical) Does anyone know a good .NET dictionary API? I'm not interested in meanings, rather I need to be able to query words in a number of different ways - return words of x length, return partial matches and so on... A: You might want to look for a Trie implementation. That will certainly help wi...
{ "language": "en", "url": "https://stackoverflow.com/questions/335517", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: Using .NET Framework 3.5 in a SQL Server 2005 Stored Procedure I have an SQL Server 2005 server, and I'd like to run a .Net CLR stored procedure on it. However, I'd like to use .NET Framework 3.5. If I try this right now, I get this error: Error: Assembly 'system.core, version=3.5.0.0, culture=neutral, publickeytoke...
{ "language": "en", "url": "https://stackoverflow.com/questions/335524", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Lookup table size reduction I have an application in which I have to store a couple of millions of integers, I have to store them in a Look up table, obviously I cannot store such amount of data in memory and in my requirements I am very limited I have to store the data in an embebedded system so I am very limited i...
{ "language": "en", "url": "https://stackoverflow.com/questions/335525", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: View position in DBGrid when scrolling in Delphi I have a DBGrid on a form. The DBGrid has many columns, so an horizontal scroller is displayed. I scroll the DBGrid view to the right to see more columns. If I select a row, the DBGrid view is automatically reset to view the first column (As if I scroll back to the...
{ "language": "en", "url": "https://stackoverflow.com/questions/335526", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do you detect that monkey patching has occurred in Ruby? How do you check that monkey patching has been done to a specific class in Ruby? If that is possible, is it also possible to get the previous implementation(s) of the attribute that's been patched? A: There are the hooks method_added and method_undefined...
{ "language": "en", "url": "https://stackoverflow.com/questions/335530", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: if statement inside a variable I am building a conditional navigation menu that has 3 levels (the 3rd level added today by business, no worries its not like I launch next week. Oh wait I do:)). I have a javascript var that contains the html for my first conditional level. I am now trying to insert another level insi...
{ "language": "en", "url": "https://stackoverflow.com/questions/335531", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Normalizing EnumStringType in NHibernate I am currently using an enumeration in an NHibernate mapped as follows.. public enum UploadMethod { Java, Silverlight, Gears, Flash } class UploadMethodType : EnumStringType { public UploadMethodType() : base(typeof(UploadMethod), 255) { } } public class Person { ...
{ "language": "en", "url": "https://stackoverflow.com/questions/335533", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: TFS shell integration TortoiseTFS? I love TortoiseSVN, as I'm sure many do. we've fairly recently moved to TFS at work, and I find myself wanting Tortoise for TFS. I tried the TFS Power Toys ( I'm running under Windows Server 2003) but no icons turned up). Is it a vista only thing? Is there a way to get TFS to expos...
{ "language": "en", "url": "https://stackoverflow.com/questions/335534", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "21" }
Q: Software engineering and patterns in Matlab GUI application? I've been asked to develop a simple GUI application using Matlab and GUIDE, which will interact with a separate backend engine (also Matlab). I'm coming from a Java and .Net background. The Matlab documentation is strong on how to technically do this, but ...
{ "language": "en", "url": "https://stackoverflow.com/questions/335535", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: What techniques are available for memory optimizing in 8051 assembly language? I need to optimize code to get room for some new code. I do not have the space for all the changes. I can not use code bank switching (80c31 with 64k). A: With assembly language, you'll have to optimize by hand. Here are a few technique...
{ "language": "en", "url": "https://stackoverflow.com/questions/335540", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Even column heights without using a TABLE Is there a way to have two columns, that match each other in height, without using table cells, fixed heights or Javascript? Using a TABLE <table> <tr> <td style="background:#F00;"> This is a column </td> <td style="background:#FF0;"> ...
{ "language": "en", "url": "https://stackoverflow.com/questions/335546", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How can I determine if SQL Server Management Studio Express (2005) is installed? I need a way to determine from Wise Install Script if SQL Server Management Studio Express 2005 is installed on computer. Does someone know a Registry entry or something that will be present when SSMSE is installed? A: Most reliable w...
{ "language": "en", "url": "https://stackoverflow.com/questions/335558", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: 'undefined' matches in AS3 RegExp? huh? I've got a long regex in AS3 / Flex which finds one of a couple dozen words. The Regex looks like: word|wordup|wordly|wordster When I do "wordup wordster!".match(regex) I'm getting undefined matches! the match array that's returned has matches: [0] 'wordup' [1] undefined ...
{ "language": "en", "url": "https://stackoverflow.com/questions/335562", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to use WS-Security with EJB3? For one of our projects, I should be able to call a webservice that uses WS-Security, i.e. the SOAP request should be signed with an X.509 certificate. I've been doing some tests to call the webservice through the use of the WebServiceRef annotation and I'm able to call the webservi...
{ "language": "en", "url": "https://stackoverflow.com/questions/335567", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Simple Hackable URL implementation for ASP.NET (3.5) I'm looking for a good sample project, or web site reference, which gives a simple easy to understand overview of URL Rewriting and making Hackable URLs. I've read a good amount about the concept, but I'm specifically looking for a good implementation example for ...
{ "language": "en", "url": "https://stackoverflow.com/questions/335575", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Python: smtpd (or alternative) for production mail receiving? I'm looking to do various processing of email - eg. inspect the headers, and if they meet some criteria (look like spam), drop the connection, or inspect the recipient list and perform special filtering. Looks like Python's smtpd library provides a nice a...
{ "language": "en", "url": "https://stackoverflow.com/questions/335582", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Accessing host machine IIS from a guest OS in VMWare How can I access a site configured in IIS 7 on the host machine from a guest OS in VMWare (Fedora 10). I have configured the VM to use "NAT" A: Depends on your network configuration of vmware product you are using (player, server, workstation). If it is set for a...
{ "language": "en", "url": "https://stackoverflow.com/questions/335585", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Best way to implement functionality similar to lazy="extra" using NHibernate 2.0.1 I have a many-to-one relationship where the child table can have hundreds of thousands of records. In this case, calling Parent.ChildCollection.Count forces a lazy initialization of the child collection which is extremely expensive. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/335597", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: html - scrollbar jump by itself I'm experiencing this weird problem which my scrollbar jumps by itself to somewhere that I don't want it to. I have a table with scrollbar inside this page, if the user have a smaller screen, the page automatically adds a scrollbar. If I scroll down to the bottom of the table and cli...
{ "language": "en", "url": "https://stackoverflow.com/questions/335598", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Collision Detection between two images in Java I have two characters displayed in a game I am writing, the player and the enemy. defined as such: public void player(Graphics g) { g.drawImage(plimg, x, y, this); } public void enemy(Graphics g) { g.drawImage(enemy, 200, 200, this); } Then called with: player...
{ "language": "en", "url": "https://stackoverflow.com/questions/335600", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: How to Instantiate User control in Master page cs file I have added uc in contentplace holder of master page but how do you instantiate the user control in master page .cs file to make it visible when the master page loads A: If you add it to a ContentPlaceHolder, and a child page adds content to that ContentPlaceH...
{ "language": "en", "url": "https://stackoverflow.com/questions/335601", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Best pageable table implementation in GWT I need to add a paging, sortable table to my GWT application. I see lots of these out there so I'm looking for your experience to save me time by choosing the best one. So far I'm looking at... http://code.google.com/p/gwt-advanced-table/ http://code.google.com/p/google-web-...
{ "language": "en", "url": "https://stackoverflow.com/questions/335602", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: NETCF DateTimePicker control problem running on hardware I have been developing a compact framework app on an emulator, and some of the forms use DateTimePickers. These work fine in the emulator, but when running on the hardware they cause the form to close when a date is selected. No exception is thrown...the for...
{ "language": "en", "url": "https://stackoverflow.com/questions/335604", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I make an outgoing socket to a SPECIFIC network interface? I have a server with two different network interfaces, each with a different IP address. How can I create a socket so it'll go out a specific IP address? I'd prefer a python example, but the question is language agnostic, so shoot away. EDIT: Please d...
{ "language": "en", "url": "https://stackoverflow.com/questions/335607", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "24" }
Q: Unit testing code that sends JMS messages I have a class that after it does some stuff, sends a JMS message. I'd like to unit test the "stuff", but not necessarily the sending of the message. When I run my test, the "stuff" green bars, but then fails when sending the message (it should, the app server is not running...
{ "language": "en", "url": "https://stackoverflow.com/questions/335621", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Can you have "ByRef" arguments in AS3 functions? Any idea how to return multiple variables from a function in ActionScript 3? Anything like VB.NET where you can have the input argument's variable modified (ByRef arguments)? Sub do (ByRef inout As Integer) inout *= 5; End Sub Dim num As Integer = 10 Debug.WriteLin...
{ "language": "en", "url": "https://stackoverflow.com/questions/335624", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How to implement design time validations for XAML, that result in compile errors? How to enforce that developers writing XAML in Visual Studio should follow certain standards and validations need to be run and if invalid compile time errors are thrown. For example, making sure that all the databinding expressions (s...
{ "language": "en", "url": "https://stackoverflow.com/questions/335645", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Merging multiple Google Calendar feeds for display on my desktop I have several Google calendars that I'd like to merge and place on my windows desktop using Samurize. I've tried using Samurize's Page Scraper plugin, but it doesn't appear to be up to the task. I can get Samurize to run a script and place it's output...
{ "language": "en", "url": "https://stackoverflow.com/questions/335648", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do you call a method from a variable in ASP Classic? For example, how can I run me.test below? myvar = 'test' me.myvar ASP looks for the method "myvar" and doesn't find it. In PHP I could simply say $me->$myvar but ASP's syntax doesn't distinguish between variables and methods. Suggestions? Closely related to t...
{ "language": "en", "url": "https://stackoverflow.com/questions/335659", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Non-axis aligned scaling Finding a good way to do this has stumped me for a while now: assume I have a selection box with a set of points in it. By dragging the corners you can scale the (distance between) points in the box. Now for an axis aligned box this is easy. Take a corner as an anchor point (subtract this co...
{ "language": "en", "url": "https://stackoverflow.com/questions/335660", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Create a Search Engine with SQL 2000 and ASP.NET C# I am looking to create a search engine that will be based on 5 columns in a SQL 2000 DB. I have looked into Lucene.NET and read the documentation on it, but wondering if anyone has any previous experience with this? Thanks A: IMHO it's not so much about performan...
{ "language": "en", "url": "https://stackoverflow.com/questions/335670", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Is there a DBI proxy that handles SQL restrictions and transactions? I am looking for a DBI (or similar) proxy that supports both SQL restrictions and transactions. The two I know about are: * *DBD::Proxy *DBD::Gofer DBD::Proxy The problem I have found with DBD::Proxy is that its server, DBI::ProxyServer, doesn'...
{ "language": "en", "url": "https://stackoverflow.com/questions/335677", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: MVC Examples use of var Maybe I live in a bubble, or am just too new, but I was wondering if anyone else has noticed the heavy use of 'var' to declare variables instead of a specific type in many of the MVC examples by Microsoft? Is there a purpose for this, or is it the "in" thing to do now, or just personal style?...
{ "language": "en", "url": "https://stackoverflow.com/questions/335682", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: SOAP Attachment from .NET 3.5 to PHP web service We've got a PHP web service which we need to send a file from a .NET 3.5 web app. The PHP team has stated that we need to provide the file in the form of a SOAP attachment, but we can't find a way from which we can do that in .NET. All reference examples that we've be...
{ "language": "en", "url": "https://stackoverflow.com/questions/335688", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Lists in ConfigParser The typical ConfigParser generated file looks like: [Section] bar=foo [Section 2] bar2= baz Now, is there a way to index lists like, for instance: [Section 3] barList={ item1, item2 } Related question: Python’s ConfigParser unique keys per section A: One thing a lot of people don't k...
{ "language": "en", "url": "https://stackoverflow.com/questions/335695", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "232" }
Q: How can I configure WCF to use x509 certificates over the internet? I need to use an x509 certificate to get secure message level authentication from a rich client via the internet to a secure WCF Web Service. Specifically, I am looking for a working step-by-step guide to setup, configuration, coding, and deployment...
{ "language": "en", "url": "https://stackoverflow.com/questions/335719", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "38" }
Q: Is it possible to animate the vertical size of the Silverlight plugin? Would like to have the plugin change size as part of an internal Silverlight animation. Possible? Can't seem to find answer. Thx. A: You probably don't want to do that. You're much better off having the plugin take up 100% of the window and t...
{ "language": "en", "url": "https://stackoverflow.com/questions/335731", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: how can I check what site a javascript badge is embedded on? I want to allow users to embed badges on their personal site or blogs with a snippet of javascript. The badge is customized on our site based on information in their profiles that at some point is "approved". Is there a best practice to check what website...
{ "language": "en", "url": "https://stackoverflow.com/questions/335732", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Writing code to fire the last method to throw an exception in a multi-threaded web app I was writing some try-catch blocks for various methods today, and thought to myself it would be good to have utility method which would automatically call the method again for a number of times specified in a parameter, at a cer...
{ "language": "en", "url": "https://stackoverflow.com/questions/335736", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Rails app, and need to add tags to a model I have this quiz rails app linked to an IRC bot who asks questions (yes, on IRC), where I have this Question model which contains, well, questions, answers, hints, and a few more things. I started with Quiz model (like, say, the special Halloween or Christmas quiz) with a ...
{ "language": "en", "url": "https://stackoverflow.com/questions/335742", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Iterating Through Records - Crystal Reports 2008 I need to know how to iterate through records in CR2008 and when it reaches a record that is NOT NULL, record that in a variable. I have a formula called "frmAccum" that I drop in the details section and suppress it. I use this to gather information for each record t...
{ "language": "en", "url": "https://stackoverflow.com/questions/335753", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What are the uses of svn copy? Example: $ svn copy foo.txt bar.txt A bar.txt * *When would you use this technique, and why? *Will this command (taken from svn's "red book") creates a copy of <foo.txt> while preserving the history of it to be shared with <bar.txt>? *If I'm changing <bar.txt>, what wil...
{ "language": "en", "url": "https://stackoverflow.com/questions/335770", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "27" }
Q: Appropriate use of DL and DD? I had some site templates designed for me recently. I got the final HTML code, which validates, but the structure of the document is laid out using DL-DD pairs: <dl> <dd class="some-class"> Some text. </dd> </dl> I'm not especially familiar with those tags as I've never used th...
{ "language": "en", "url": "https://stackoverflow.com/questions/335774", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How can maven be used in a continuous integration situation to install versioned artifacts in the repository? We are in the process of converting our main build process from ant to maven. We use TeamCity for our Continuous Integration server (CI). We'd like to use the CI server to kick off (nightly) builds whose ver...
{ "language": "en", "url": "https://stackoverflow.com/questions/335781", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How can I pass cookies into an external web browser? I'm writing an application that will need to open up browser windows (probably can stick to IE) to websites that use Forms Authentication. The trick is that they need to be authenticated already, in order to save time due to the sheer number of sites we need to g...
{ "language": "en", "url": "https://stackoverflow.com/questions/335783", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Linq to SQL: How do I stop the auto generated object name from being renamed? In visual studio 2008, when I drag a database table into my dbml screen, any tables that end with the letter s automatcially get the s removed from the dbml object. Is there any way to disable this? Also, the collection of rows also gets ...
{ "language": "en", "url": "https://stackoverflow.com/questions/335792", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: HTML editor — edit both start and end tag at once Is there an HTML editor which automatically changes the end tag when you edit the start tag? A: Aptana Studio Does. Just set modify pair tag in Window Menu > Preferences > Aptana > Editor > HTML > Typing It is off by default. A: IntelliJ has a bunch of XML refact...
{ "language": "en", "url": "https://stackoverflow.com/questions/335799", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: When you start thinking about a programming project what do you do first? When you start thinking about a programming project what do you do first? Do you pull out a piece of paper and start sketching out the architecture? Do you have a notebook for ideas? Do you start coding something? Or do you model the software ...
{ "language": "en", "url": "https://stackoverflow.com/questions/335802", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How can I synchronize views and stored procedures between SQL Server databases? I have a 'reference' SQL Server 2005 database that is used as our global standard. We're all set up for keeping general table schema and data properly synchronized, but don't yet have a good solution for other objects like views, stored ...
{ "language": "en", "url": "https://stackoverflow.com/questions/335805", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Back to basics; for-loops, arrays/vectors/lists, and optimization I was working on some code recently and came across a method that had 3 for-loops that worked on 2 different arrays. Basically, what was happening was a foreach loop would walk through a vector and convert a DateTime from an object, and then another ...
{ "language": "en", "url": "https://stackoverflow.com/questions/335807", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: CruiseControl.Net on Windows Server 2003 x64 I'm having an issue with CruiseControl.net where the web dashboard just won't work in IIS. I have tried switching ASP.Net between 64 and 32 bit modes and reinstalling cruise control, but nothing seems to work. Has anyone else had issues with CruiseControl.Net on 64 bit pl...
{ "language": "en", "url": "https://stackoverflow.com/questions/335812", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to read DOM of the iframe loaded with a page from another domain? Is there a way to access the DOM of the document in an iframe from parent doc if the doc in the iframe is on another domain? I can easily access it if both parent and child pages are on the same domain, but I need to be able to do that when they a...
{ "language": "en", "url": "https://stackoverflow.com/questions/335817", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: how to display thumbnails in listview like explorer does? could you please point c++ code example to display videos and images thumbnails in listview? A: I can help with images, but not videos: http://www.codeproject.com/KB/GDI-plus/GdiPThumbnailsViewer.aspx Basically you use a normal list control and add the image...
{ "language": "en", "url": "https://stackoverflow.com/questions/335823", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Case-insensitive KVC in Cocoa? I'd appreciate some feedback on a particular approach I'm thinking of using. The scenario is below. I have an object (lets call it MObject) that has a number of properties, say, x and y coordinates, height and width. The properties are named according to the KVC guidelines (MObject.x; ...
{ "language": "en", "url": "https://stackoverflow.com/questions/335833", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: VS2010 Extensibility - how different is it? A question to those of you who already looked at VS2010. How big are the changes that add-in developers will have to make in order to get their add-ins working under VS2010? A: As luck would have it I've just written about this exact subject and shown what it took to upgr...
{ "language": "en", "url": "https://stackoverflow.com/questions/335838", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Can you really have a function/method without a body but just a try/catch block? Note that this function does not have a "{" and "}" body. Just a try/catch block: void func( void ) try { ... } catch(...) { ... } Is this intentionally part of C++, or is this a g++ extension? Is there any purpose to this oth...
{ "language": "en", "url": "https://stackoverflow.com/questions/335839", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: What is the relative difference between in-proc, interprocess, and inter machine calls? Ignoring payload size, what is relative difference in latency between an in-proc call (say in C++ or Java), a socket call to a process on the same machine, and a socket call to a process on another machine? This can be expressed ...
{ "language": "en", "url": "https://stackoverflow.com/questions/335840", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: MVC Beta [HandleError] Attribute (need help) I've tried this both with and without the 'ExceptionType' parameter. I have an Error.aspx page in both the Views/Shared folder and the Views/thisController folder. But everytime I run this I get a "Server Error in '/' Application." error page, rather than the nice one in ...
{ "language": "en", "url": "https://stackoverflow.com/questions/335841", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to tell if a DOM element is displayed? This is not to be confused with "How to tell if a DOM element is visible?" I want to determine if a given DOM element is visible on the page. E.g. if the element is a child of a parent which has display:none; set, then it won't be visible. (This has nothing to do with wheth...
{ "language": "en", "url": "https://stackoverflow.com/questions/335847", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: WPF CommandParameter is NULL first time CanExecute is called I have run into an issue with WPF and Commands that are bound to a Button inside the DataTemplate of an ItemsControl. The scenario is quite straight forward. The ItemsControl is bound to a list of objects, and I want to be able to remove each object in the...
{ "language": "en", "url": "https://stackoverflow.com/questions/335849", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "96" }
Q: Creating a GUI application that wraps command-line programs on Linux and Windows I'm writing a GUI application that will let users interact with command-line programs. The programs are crystallography programs, in this case. They take a long time to run. There's a certain common workflow using the command-line pro...
{ "language": "en", "url": "https://stackoverflow.com/questions/335855", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Files used by mount /dev/md1 6068992 5204648 551080 91% / I have 91% taken and am trying to discover what files are taking up space. I'm using linux. Does any one know the command? thanks A: du -k -S -x / | sort -n -r | head -10 Will return the 10 largest files on the root file system. Edit: @...
{ "language": "en", "url": "https://stackoverflow.com/questions/335863", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What is the limitation in the length of an SqlCommand query Is there a limitation in the length of a query that SQL Server can handle? I have a normal SqlCommand object and pass a very long select statement as a string. The query seems to be fine when running against an SQL Server 2005/2008 engine but doesn't execu...
{ "language": "en", "url": "https://stackoverflow.com/questions/335873", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Forms Authentication / Reporting Services - Getting the Username From what variable can you pick up the username from Forms Authentication in Microsoft SQL Reporting Services? The User!UserId value comes back as the Windows Account that reporting services is running under. A: I'm not 100% sure where you are confuse...
{ "language": "en", "url": "https://stackoverflow.com/questions/335879", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do I get the UIPickerView to slide up over another view? I am looking for a way to slide a UIPickerView (and UIDatePickerView) up over a view (UITableView in particular) when a particular button press takes place. I understand how to get the events for clicks into the UITableView, but there doesn't seem to be a ...
{ "language": "en", "url": "https://stackoverflow.com/questions/335885", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to pass parameters to Table Valued Function I want to do something like select * from tvfHello(@param) where @param in (Select ID from Users) A: The following works in the AdventureWorks database: CREATE FUNCTION dbo.EmployeeByID(@employeeID int) RETURNS TABLE AS RETURN ( SELECT * FROM HumanResources.Emplo...
{ "language": "en", "url": "https://stackoverflow.com/questions/335886", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "26" }
Q: What function to use to hash passwords in MySQL? I have a user table in my mysql database that has a password column. Currently, I use the MD5 algorithm to hash the users' password for storage in the database. Now I like to think that I am a security conscience person. I noticed while reading the MySQL docs that the...
{ "language": "en", "url": "https://stackoverflow.com/questions/335888", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Shell Script doesn't run automatically though it is registered in Mac OS X Login Items I have the following shell script registered in my "Login Items" preferences but it does not seem to have any effect. It is meant to launch the moinmoin wiki but only works when it is run by hand from a terminal window, after whic...
{ "language": "en", "url": "https://stackoverflow.com/questions/335891", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How to complete this python function to save in the same folder? I am trying to write my first real python function that does something real. What i want to accomplish is searching a given folder, and then open all images and merging them together so they make a filmstrip image. Imagine 5 images stacked on top of ea...
{ "language": "en", "url": "https://stackoverflow.com/questions/335896", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How reliable is SQL server replication? We have a database on SQL Server 2000 which should be truncated from time to time. It looks like the easiest solution would be to create a duplicate database and copy the primary database there. Then the primary database may be safely truncated by specially tailored stored pro...
{ "language": "en", "url": "https://stackoverflow.com/questions/335898", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: ld cannot find an existing library I am attempting to link an application with g++ on this Debian lenny system. ld is complaining it cannot find specified libraries. The specific example here is ImageMagick, but I am having similar problems with a few other libraries too. I am calling the linker with: g++ -w (..lots...
{ "language": "en", "url": "https://stackoverflow.com/questions/335928", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "179" }
Q: Discarding the output of a function that accepts an output iterator Suppose there´s a template function in C++ that does some useful work but also outputs a sequence of values via an output iterator. Now suppose that the sequence of values sometimes is interesting, but at others is not useful. Is there a ready-to-us...
{ "language": "en", "url": "https://stackoverflow.com/questions/335930", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "26" }
Q: Using a Base Controller for obtaining Common ViewData I am working on an ASP.NET MVC application that contains a header and menu on each page. The menu and header are dynamic. In other words, the menu items and header information are determined at runtime. My initial thought is to build a base Controller from whic...
{ "language": "en", "url": "https://stackoverflow.com/questions/335932", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: What's the best way to raise an exception in C#? I traditionally deploy a set of web pages which allow for manual validation of core application functionality. One example is LoggerTest.aspx which generates and logs a test exception. I've always chosen to raise a DivideByZeroException using an approach similar to th...
{ "language": "en", "url": "https://stackoverflow.com/questions/335933", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "56" }
Q: Apache2 won't start - Mac OS X - Passenger I've installed passenger a little while back and when I restarted my mac tonight, Apache2 won't start. Here is what I get. Anyone have any ideas? Re-install Apache2? dyld: Library not loaded: /usr/lib/libaprutil-1.0.dylib Referenced from: /usr/sbin/httpd Reason: no sui...
{ "language": "en", "url": "https://stackoverflow.com/questions/335934", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Providing MySQL users with just the minimum privileges For a web application, when creating the user which will connect to the MySQL database, you have the choice of privileges. Assuming that the only actions intended to be done by that user are SELECT/INSERT/UPDATE/DELETE, it seems to make sense to only provide tho...
{ "language": "en", "url": "https://stackoverflow.com/questions/335951", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: Project Euler #211 - efficiency issue I've been slowly working my way through the list of Project Euler problems, and I've come to one that I know how to solve, but it seems like I can't (given the way my solution was written). I am using Common Lisp to do this with and my script has been running for over 24 hours (...
{ "language": "en", "url": "https://stackoverflow.com/questions/335955", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How do I customise the CREATE DATABASE statement in VSTS DB Edition Deploy? I'm using VSTS Database Edition GDR Version 9.1.31024.02 I've got a project where we will be creating multiple databases with identical schema, on the fly, as customers are added to the system. It's one DB per customer. I thought I should be...
{ "language": "en", "url": "https://stackoverflow.com/questions/335963", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How do I launch my settings bundle from my application? I am working on adding in a settings bundle for my application as a cheap way of getting a GUI on my preferences. Is it possible to launch this from a button in my application or will my users always have to access it manually via the built in settings applica...
{ "language": "en", "url": "https://stackoverflow.com/questions/335965", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Is there a way to logically group controls in WPF Here's the scenario I have a Grid with some TextBlock controls, each in a separate cell in the grid. Logically I want to be able to set the Visibility on them bound to a property in my ViewModel. But since they're each in a separate cell in the grid, I have to set ea...
{ "language": "en", "url": "https://stackoverflow.com/questions/335966", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: Regex expression to split string into items I've got text in a form of [1/12/2008 2:32:11 p.m. - name] line 1 [1/12/2008 2:36:00 p.m. - name] - PRIVATE line 2 [some text] sd [1/12/2008 2:36:00 p.m. - name] line 3 which i want to split into items so i have access to time, name and text of each item, e.g.: (item 1) ...
{ "language": "en", "url": "https://stackoverflow.com/questions/335970", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Is Switch (Case) always wrong? Are there instances where switch(case) is is a good design choice (except for simplicity) over strategy or similar patterns... A: For one, readability. A: Yes, definitely. Many times your switch is only relevant to a very small part of your overall logic and it would be a mistake to...
{ "language": "en", "url": "https://stackoverflow.com/questions/335971", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: methods: multiple parameters or structure? I noticed by looking at sample code from Apple, that they tend to design methods that receive structures instead of multiple parameters. Why is that? As far as ease of use, I personally prefer the latter, but as far as performance goes, is there one better choice than the o...
{ "language": "en", "url": "https://stackoverflow.com/questions/335974", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What causes svn commit to fail and report a file/dir as obstructed? I am pretty much the only person making check ins to the svn repo but for some reason over the past week Tortoise is reported that my WCF Service Reference directory is 'obstructed' and I cant commit my changes. If I have no even made any changes to...
{ "language": "en", "url": "https://stackoverflow.com/questions/335980", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: How can a SVN repository become corrupt? A few times already, I got into situations where one of my SVN repository got corrupt and we could do anything with some versions or branches of the project without really knowing what we did. So I'm asking what can cause a repository to become corrupt? It seems that incompa...
{ "language": "en", "url": "https://stackoverflow.com/questions/335987", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: Timeout on a NamedPipe in C# I have a couple of apps talking to each other, and I use a NamedPipe. But if the other app isn't available then the NamedPipe waits for ever to connect. It also doesn't support timeouts. What's the right way to do this? A: Are you using the NamedPipeClientStream class? If so there is a...
{ "language": "en", "url": "https://stackoverflow.com/questions/335989", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What are your experiences with NetAdvantage or DXperience? I'm looking into both of them, and while I have been quite pleased with NetAdvantage at my previous employer, I find the price point (plus testimonials like at What is the best winform UI component set?) to make me hesitate and consider DXExperience. That sa...
{ "language": "en", "url": "https://stackoverflow.com/questions/336004", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Where is the handy designer for setting Permissions and schema diagram designer in a SQL2005 Database Project in VSTS2008 Database Edition GDR RTM? I have just installed the GDR RTM version of Visual Studio Team System Database Edition GDR RTM. It all seems to work wonderfully, but I seem to have to edit XML (Databa...
{ "language": "en", "url": "https://stackoverflow.com/questions/336009", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to handle a glade project with many windows I'm working on a PyGTK/glade application that currently has 16 windows/dialogs and is about 130KB, and will eventually have around 25 windows/dialogs and be around 200KB. Currently, I'm storing all the windows in one monolithic glade file. When I run a window I call ...
{ "language": "en", "url": "https://stackoverflow.com/questions/336013", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Can you get a calling class's variables? I have a class Page that creates an instance of DB, which is named $db. In the __construct() of Page, I create the new $db object and I pull a bunch of config data from a file. Now the DB class has a method _connectToDB() which (attempts) to connect to the database. Is there ...
{ "language": "en", "url": "https://stackoverflow.com/questions/336018", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Calling a class method within a class I realize this perhaps a naive question but still I cant figure out how to call one method from another in a Ruby class. i.e. In Ruby is it possible to do the following: class A def met1 end def met2 met1 #call to previously defined method1 end end Thanks, RM ...
{ "language": "en", "url": "https://stackoverflow.com/questions/336024", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: Set value of bound field to NULL using DataGridViewComboBoxColumn in DataGridView I have a DataGridViewComboBoxColumn in a DataGridView that's based on a lookup table. The ValueMember and DisplayMember fields are bound to string columns in the DataTable. All rows have a value for both fields - except for a special r...
{ "language": "en", "url": "https://stackoverflow.com/questions/336035", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: ASP.NET URL rewriting for DB query from URL content without extension I am trying to create a very simple ASP.NET application that presents information retrieved from a database based on the URL, in a similar way to a wiki, but in this case the site is read-only. An example of a URL I'd like would be: http://www.foo...
{ "language": "en", "url": "https://stackoverflow.com/questions/336038", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How are the classes in the Sketch example AppKit application separated into Models/Views/Controllers? I am a little confused as to the definition of classes as Models or Views in the Sketch example AppKit application (found at /Developer/Examples/AppKit/Sketch). The classes SKTRectangle, SKTCircle etc. are considere...
{ "language": "en", "url": "https://stackoverflow.com/questions/336039", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Visual Studio - show all calls to a function in source code level I am wondering if there is any way to list all the calls to a function in source code, so that I could see the dependencies if I modify that function. One method I use is to search the function name in the "Entire Solution" but I am looking for a bett...
{ "language": "en", "url": "https://stackoverflow.com/questions/336051", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }