text
string
meta
dict
Q: How do you find the amount of free space on a mounted volume using Cocoa? I am using the following code to determine free space on a volume. The folder was provided using NSOpenPanel. The item selected was a mounted volume and the path returned is \Volumes\Name NSDictionary* fileAttributes = [[NSFileManager default...
{ "language": "en", "url": "https://stackoverflow.com/questions/263503", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Placing Zoom Controls in a MapView I'm trying to get the zoom controls to show up in a mapview, the following code almost works, but the zoom controls appear in the top left of the mapview, not the bottom center like I'm specifying via setGravity(). Can someone enlighten me as to what I'm missing? zoomView = (Linea...
{ "language": "en", "url": "https://stackoverflow.com/questions/263507", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: Any tips for using Subversion with .net project files? We just switched from TFS to SVN, and so far we're loving it. However, it did introduce a few new issues. One is the way project files (.vbproj specifically) are handled. The .vbproj file is of course always changing as files and references are changed, and if...
{ "language": "en", "url": "https://stackoverflow.com/questions/263514", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Uploading files to file server using webclient class Currently I have an application that receives an uploaded file from my web application. I now need to transfer that file to a file server which happens to be located on the same network (however this might not always be the case). I was attempting to use the webcl...
{ "language": "en", "url": "https://stackoverflow.com/questions/263518", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Is there a good VB6 documentation system similar to Javadoc? I'm working with a VB6 code base and I'm interested in beginning to generate documentation for future development efforts. I'm traditionally a Java developer and I've gotten quite used to the Javadoc system for generating such documentation. I found VB.DOC...
{ "language": "en", "url": "https://stackoverflow.com/questions/263534", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Open an IO stream from a local file or url I know there are libs in other languages that can take a string that contains either a path to a local file or a url and open it as a readable IO stream. Is there an easy way to do this in ruby? A: open-uri is part of the standard Ruby library, and it will redefine the be...
{ "language": "en", "url": "https://stackoverflow.com/questions/263536", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "113" }
Q: Reading Hibernate Properties from Web.config The C# project I'm working on uses nHibernate and the connection string is in the web.config as a property of a Hibernate element. I need to read the connection string in the installer to get a connection manually without using Hibernate. I know I can use configManager....
{ "language": "en", "url": "https://stackoverflow.com/questions/263548", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: We have a graphical designer, now they want a text based designer. Suggestions? I'm sorry I could not think of a better title. The problem is the following: For our customer we have created (as part of a larger application) a graphical designer which they can use to build "scenario's". These scenario's consist of "C...
{ "language": "en", "url": "https://stackoverflow.com/questions/263550", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: databind the Source property of the WebBrowser in WPF Does anyone know how to databind the .Source property of the WebBrowser in WPF ( 3.5SP1 )? I have a listview that I want to have a small WebBrowser on the left, and content on the right, and to databind the source of each WebBrowser with the URI in each object bo...
{ "language": "en", "url": "https://stackoverflow.com/questions/263551", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "91" }
Q: DirectoryEntry.NativeObject throws access denied for a user in Administrators group in windows 2008 I have a local user, which is member of Administrators local group. When I run this code: using System; using System.DirectoryServices; namespace nanttest { class Program { public static void Main(str...
{ "language": "en", "url": "https://stackoverflow.com/questions/263552", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Redundant Linux Kernel System Calls I'm currently working on a project that hooks into various system calls and writes things to a log, depending on which one was called. So, for example, when I change the permissions of a file, I write a little entry to a log file that tracks the old permission and new permission....
{ "language": "en", "url": "https://stackoverflow.com/questions/263563", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: SubSonic build errors I'm trying to use SubSonic for a new project with an existing database but when I try to build the project after generating the SubSonic files I'm getting these same two exceptions on different classes: * *Partial declarations of 'MyData.UserCollection' must not specify different base classe...
{ "language": "en", "url": "https://stackoverflow.com/questions/263566", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Good date-picker for ASP.NET I have always been a very big fan of the DHTML calendar http://www.dynarch.com/projects/calendar/ I was planning on using this for an upcoming project in ASP.NET, but I wouldn't mind finding a new calendar control that is specifically made as a ASP.NET user control. Does anyone know of s...
{ "language": "en", "url": "https://stackoverflow.com/questions/263574", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Report Viewer - Request for the permission of type SqlClientPermission failed I am using the ReportViewer control from Visual Studio 2008 in Local Mode with objects as the data source. My classes are mapped to data tables in my database. In the objects, it loads related objects as needed. So it leaves the reference ...
{ "language": "en", "url": "https://stackoverflow.com/questions/263578", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How to Structure Table to Model Mutually Exclusive 1:n Relationships? In the following table structure: Fruits ( fruit_id, fruitName ) Vegetables ( vegetable_id, vegetableName ) favoriteFoods ( food_id, foodName, type_id (References either a fruit or a vegetable) ) I realize that...
{ "language": "en", "url": "https://stackoverflow.com/questions/263582", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Immutable object pattern in C# - what do you think? I have over the course of a few projects developed a pattern for creating immutable (readonly) objects and immutable object graphs. Immutable objects carry the benefit of being 100% thread safe and can therefore be reused across threads. In my work I very often use...
{ "language": "en", "url": "https://stackoverflow.com/questions/263585", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "47" }
Q: What is the best way of implementing a stack of more than one type of object in C#? I'm writing an implementation of a virtual machine in C#, and I need to implement the VM's stack, which can contain two types of entry - return entries or backtrack entries. What is the best way of implementing this? I'm currently us...
{ "language": "en", "url": "https://stackoverflow.com/questions/263586", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Can one listen a twain (Maybe WIA) scanner? I am evaluating VintaSoft .net control and Atalasoft DotTwain Image Capture. And I am very but very lost with the most of the definitions and keywords. So I am asking this because I think I am in Lala land. Is it possible to listen or have the scanner tell my app that ther...
{ "language": "en", "url": "https://stackoverflow.com/questions/263588", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How quick is switching DBs with PHP + MySQL? I'm wondering how slow it's going to be switching between 2 databases on every call of every page of a site. The site has many different databases for different clients, along with a "global" database that is used for some general settings. I'm wondering if there would be...
{ "language": "en", "url": "https://stackoverflow.com/questions/263599", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Image caching, HTTPHandler and FormsAuthentication The Setup: I'm working on a website that uses Formsauthentication using cookies to store the login ticket. The site also has an HTTPHandler that manages images stored in the database. The handler caches the images to be public and expire in 20 minutes. We have no...
{ "language": "en", "url": "https://stackoverflow.com/questions/263607", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: SQL 2 LINQ query (called by databinding) completely freezing WPF application Earlier today I was hunting down a very weird bug... I finally traced it down to what seems to be causing the problem. The original report can be found here: original question The details have changed enough to warrant a new question. It wo...
{ "language": "en", "url": "https://stackoverflow.com/questions/263612", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Calculate the display width of a string in C#? A Java version of this question was just answered, and, well, I don't know how to do this in .net. So how do you calculate the display width of a string in C# / .net? A: Graphics.MeasureString but its a bit crappy, as is explained and improved upon; here A: An altern...
{ "language": "en", "url": "https://stackoverflow.com/questions/263614", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "59" }
Q: Best way to build trunk AND a branch on the same CruiseControl.Net server We currently have a CruiseControl.Net server that is merrily building the trunk on our svn server. I have a new requirement to build the "latest" branch as well; is there a best practice in CruiseControl to handle this? What specific changes...
{ "language": "en", "url": "https://stackoverflow.com/questions/263616", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: What is a Ruby equivalent for Python's "zip" builtin? Is there any Ruby equivalent for Python's builtin zip function? If not, what is a concise way of doing the same thing? A bit of context: this came up when I was trying to find a clean way of doing a check involving two arrays. If I had zip, I could have written s...
{ "language": "en", "url": "https://stackoverflow.com/questions/263623", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: searching VB6 code I've inherited a ASP/VB6 code base (not my forte... yet) and I'm trying tease it apart to figure out the cause on an error message I'm receiving when running the app. I've traced it back through an event that is being raised in on of my classes. Is there away in windows I can search the bulk of th...
{ "language": "en", "url": "https://stackoverflow.com/questions/263639", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Is there a performance hit when "Windows" authentication is enabled on an anonymous website? I've been having performance issues with a high traffic ASP.NET 2.0 site running on Windows 2000. While editing the web.config file I noticed that the authentication mode was set to 'Windows'. I changed it to 'None'. The ...
{ "language": "en", "url": "https://stackoverflow.com/questions/263640", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: access xslt elements from codebehind How can i set value(in code behind) for an element declared in the xslt ? Here is my xslt <xsl:for-each select="Header/Item"> <td class="rowHead" style="vertical-align:bottom;"> <a href="#"> <xsl:attribute name="id"> <xsl:text>aColumnText<...
{ "language": "en", "url": "https://stackoverflow.com/questions/263644", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I edit a text field (or ntext) in SQL Server 2000 or 2005 using the GUI? * *Is there a way to do this with SQL Server tools? *If not, is there a 3rd party tool that does this? There doesn't seem to be a good way to edit longer text columns in the SQL Server Managers for SQL Server 2000 or 2005. While SQ...
{ "language": "en", "url": "https://stackoverflow.com/questions/263647", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Graphing large amounts of data In a product I work on, there is an iteration loop which can have anywhere between a few hundred to a few million iterations. Each iteration computes a set of statistic variables (double precision), and the number of variables can be up to 1000 (typically 15-50). As part of the loop, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/263676", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: launching VS2008 build from python if I paste this into the command prompt by hand, it works, but if I run it from python, I get The filename, directgory name, or volume label syntax is incorrect. os.system('%comspec% /k ""C:\Program Files\Microsoft Visual Studio 9.0\VC\vcvarsall.bat"" x86') os.system('devenv Immers...
{ "language": "en", "url": "https://stackoverflow.com/questions/263690", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Best practice for maintaining updated Git binaries (Git by Git) on Mac OS X 10.5? On my Mac OS X 10.5 (Leopard) machine, I have installed Git 1.6.0.2 using the git-OSX-Installer from Google Code. The installer installs Git to /usr/local/Git. I would now like to keep up with the latest stable Git release (Master bran...
{ "language": "en", "url": "https://stackoverflow.com/questions/263695", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: PHP - Editing multiple array values (if they exist) I have a multidimensional array. I need to search it for a specific range of values, edit those values and return the edited data. Example array: array(3) { ["first"]=> array(1) { [0]=> string(4) "baz1" } ["second"]=> array(1) { [0]=> stri...
{ "language": "en", "url": "https://stackoverflow.com/questions/263697", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Adding an Excel file to be published with Window Apllication I have been trying for an hour or so and cannot get this right. I have a Visual Studio project which reads an Excel file, which I have added to the VS solution. When I run the project in VS, the file can be opened successfully. However, when I publish the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/263699", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Using WebDAV to access Exchange 2003 Inbox How do you (using .NET) use WebDAV to get a listing of emails in a user's inbox (not your own inbox) and then get the properties and/or contents of each email? I'd like to do this without WebDAV.NET, if at all possible. A: take a look at this post of mine about webdav. hop...
{ "language": "en", "url": "https://stackoverflow.com/questions/263724", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: fragment was not found at expected path (eclipse jsp) In eclipse, I have a javaproject (not a web project), though it does provide reusable tag files. layout +src +++META-INF ----my.tld +++++++++++tags ---------------include.jsp I keep on getting Fragment "/META-INF/tags/include.jsp" was not be found at expected pat...
{ "language": "en", "url": "https://stackoverflow.com/questions/263730", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Detecting SqlServr.exe WriteFile Operation Within C# There's a requirement that we will need to support querying a local SQL Server database for new data when the database is updated. Since these are external SQL Server databases, we may not be able to use SQL Server Notification Services nor can we make any change...
{ "language": "en", "url": "https://stackoverflow.com/questions/263734", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I decide if a selection of text in CRichEditCtrl has multiple font sizes? Problem: How can I tell if a selection of text in the CRichEditCtrl has multiple font sizes in it? Goal: I am sort of making my own RichEdit toolbar (bold, italic, font type, font size, etc). I want to emulate what MS Word does when a...
{ "language": "en", "url": "https://stackoverflow.com/questions/263735", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Using AppleScript to grab the URL from the frontmost window in web browsers: The definitive list I built a [widget][1] that grabs the URL from the frontmost window in Safari, then allows you to shorten it using the tr.im API. Works sweet as. I want to make this more flexible, so am investigating how to grab an URL f...
{ "language": "en", "url": "https://stackoverflow.com/questions/263741", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: How to get the caret column (not pixels) position in a textarea, in characters, from the start? How do you get the caret position in a <textarea> using JavaScript? For example: This is| a text This should return 7. How would you get it to return the strings surrounding the cursor / selection? E.g.: 'This is', '', ' ...
{ "language": "en", "url": "https://stackoverflow.com/questions/263743", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "177" }
Q: Set LINQ DSN for DataContext I normally store all my configs in the registry. Even though I have started using LINQ I would not like to have the DSN in the web.config, but rather let it stay in the registry and attach it (maybe in the Application Start Event) to the System Config. How can this be done? Thanx for any...
{ "language": "en", "url": "https://stackoverflow.com/questions/263748", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Visual Studio 2005 C++ debugger keeps stepping into disassembly view The Visual Studio 2005 C++ debugger keeps stepping into disassembly view when I "Step into" or "Step Over". This is not something I want, so I have to keep right-clicking and "Go To Source Code". It doesn't always do this - I think it gets confu...
{ "language": "en", "url": "https://stackoverflow.com/questions/263752", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Windows 7 on a virtual machine I know this question isn't "directly" programming related, but since I want to be able to be well-prepared on windows-programming when Windows 7 is released, I want to try it out now. But since I don't have two computers, I can't risk to install it as dual-boot in case it screws someth...
{ "language": "en", "url": "https://stackoverflow.com/questions/263764", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: What is the best way to add user ID to RubyOnRails log entries? I am looking for the best way to customize my Rails log entries (I want to add the user ID in there). I am using Rails 2.1.2. The only way I've found so far is to override method "add" of class BufferedLogger (as defined in active_support/lib/active_sup...
{ "language": "en", "url": "https://stackoverflow.com/questions/263770", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How can I ask for root password but perform the action at a later time? I have a python script that I would like to add a "Shutdown when done" feature to. I know I can use gksudo (when the user clicks on "shutdown when done") to ask the user for root privileges but how can I use those privileges at a later time (whe...
{ "language": "en", "url": "https://stackoverflow.com/questions/263773", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Where can I find resources on VectorScript programming language? Where one can learn more about VectorScript (the Pascal-like programming languaged built into NNA VectorWorks CAD application) to create custom "plug-in" objects and tools ? A: The "official" documentation wiki is now at http://developer.vectorworks.n...
{ "language": "en", "url": "https://stackoverflow.com/questions/263774", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Date/Time Range Validator for ASP.Net It looks like the standard asp.net 2 RangeValidator control doesn't allow times. e.g. 01/01/2008 12:00 is not accepted in my range, even though it should be valid. If I remove the time it works as expected. Is there a validator out there that allows for date/time format? Update ...
{ "language": "en", "url": "https://stackoverflow.com/questions/263779", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: What is the best way to make files live using subversion on a production server? Currently I have subversion set up so that when I make changes in Eclipse PDT, I can commit the changes and they will be saved in /home/administrator/Project File. This file has the /branches /tags and /trunk directories recommended by...
{ "language": "en", "url": "https://stackoverflow.com/questions/263782", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: SQL Compare GUI works, but command line gives problems I recently purchased SQL compare 7.1 pro for the command line capabilities. We have been using the GUI version with no problems for some time now. I am trying to exclude items from the sync, however its not working. I am using the .scp file created from the GUI....
{ "language": "en", "url": "https://stackoverflow.com/questions/263786", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to move documents and list items in Windows SharePoint Services? I need to provide users with an easy way to move documents and lists items in WSS 3.0. They want to be able to move across lists, sites and site collections without loss of version history, metadata, and author/date info. This functionality is unfo...
{ "language": "en", "url": "https://stackoverflow.com/questions/263800", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: SQL Server dynamic queries I have 15 stored procedures that return data from a common table and then join that table with a specific table to retrieve inventory. Example: Common: tblCommon Specific: tblSpecific Is there way I can pass the name "tblSpecific" into a single stored procedure as a variable, like the fol...
{ "language": "en", "url": "https://stackoverflow.com/questions/263801", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to process ragged right text files with many suppressed columns in SSIS or other tool? The ragged right flat file option is great for a single trailing field terminated with a CRLF, but when any number of trailing fields which are blank are suppressed and the line terminated early with CRLF, I have found no alte...
{ "language": "en", "url": "https://stackoverflow.com/questions/263809", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: MVC XHTML Compliance Question I have a model being populated by my data layer and then I have a partial view which is rendering an instance of that model. <li class="<%= td.Active ? "youarehere" : string.Empty %> <%= i == ViewData.Model.Count() - 1 ? "last" : string.Empty %>"> The problem is that class="" is invali...
{ "language": "en", "url": "https://stackoverflow.com/questions/263815", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: COALESCE SUM GROUP? Alright. I have a query that looks like this: SELECT SUM(`order_items`.`quantity`) as `count`, `menu_items`.`name` FROM `orders`, `menu_items`, `order_items` WHERE `orders`.`id` = `order_items`.`order_id` AND `menu_items`.`id` = `order_items`.`menu_item_id` AND ...
{ "language": "en", "url": "https://stackoverflow.com/questions/263816", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: What is the best way to store a user name and password for a Windows Service? What is the best way to store a user name and password for a Windows Service? The service has to be able to access an MS SQL Server database on a remote machine. We have to support MS SQL Server authentication (mixed mode) instead of NT A...
{ "language": "en", "url": "https://stackoverflow.com/questions/263818", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: launching vs2008 build from python The first batch file launches a command prompt, i need the second command to be in the ccontext of the first. how can I do this in python? As is, it launches the batch, and blocks until the batch (with its command prompt context) terminates, and then executes devenv without the ne...
{ "language": "en", "url": "https://stackoverflow.com/questions/263820", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How can I see what changes have been made in a git repository without pulling it into my working tree For example, I could just git pull and then git checkout HEAD-1. But is there a way of seeing the differences before deciding whether to git pull or not? A: Do a git fetch first to update your remote tracking branc...
{ "language": "en", "url": "https://stackoverflow.com/questions/263821", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Is writing code out still considered an algorithmic representation? I just lost 50% of my answer on a test because I wrote the code out instead of an algorithm on my midterm, bumping me from an A to a C. Is writing code out still considered an algorithmic representation? Wikipedia: Algorithm Representation (since pr...
{ "language": "en", "url": "https://stackoverflow.com/questions/263834", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Generating SQL Schema from XML We are using an Oracle 11 database and a java development environment (using Eclipse) and would like to migrate several xml schemas to SQL schemas. Have looked ax xsd but really need something that we can run from ant/ Eclipse without SQL Server installed. Regards, Andy A: What is the...
{ "language": "en", "url": "https://stackoverflow.com/questions/263836", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: HashMap default types for K and V I usually type my map declarations but was doing some maint and found one without typing. This got me thinking (Oh No!). What is the default typing of a Map declaration. Consider the following: Map map = new HashMap(); map.put("one", "1st"); map.put("two", new Integer(2)); map.pu...
{ "language": "en", "url": "https://stackoverflow.com/questions/263838", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Number/Date Conversion helpers in MVC, where to use them? Stackoverflow is built on MVC and does a bunch of simple but nice things with dates and numbers (answer counts, votes, etc...). I'm assuming this is all done with a couple of static helper classes. My question is should the view call these helper objects or ...
{ "language": "en", "url": "https://stackoverflow.com/questions/263839", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do you create a Distinct query in HQL Is there a way to create a Distinct query in HQL. Either by using the "distinct" keyword or some other method. I am not sure if distinct is a valid keywork for HQL, but I am looking for the HQL equivalent of the SQL keyword "distinct". A: You can also use Criteria.DISTINC...
{ "language": "en", "url": "https://stackoverflow.com/questions/263850", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "108" }
Q: Numbering a list via CSS, only if there are multiple items I have an XML document that I'm trying to style via CSS. A relevant snippet of this XML looks like this: <senseBlock> <prelim>Not numbered</prelim> <sense>first item</sense> <sense>second item</sense> <sense>third item</sense> </senseBlock> ...
{ "language": "en", "url": "https://stackoverflow.com/questions/263884", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How do I find the width & height of a terminal window? As a simple example, I want to write a CLI script which can print = across the entire width of the terminal window. #!/usr/bin/env php <?php echo str_repeat('=', ???); or #!/usr/bin/env python print '=' * ??? or #!/usr/bin/env bash x=0 while [ $x -lt ??? ]; do...
{ "language": "en", "url": "https://stackoverflow.com/questions/263890", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "383" }
Q: Change the background color in Gnome terminal through a command? I'm using Gnome terminal and I want to change the background color or the profile through a command so I can group some commands in an alias to visually differentiate my windows when I run certain processes. I'm running Ubuntu, and bash is my shell. Ar...
{ "language": "en", "url": "https://stackoverflow.com/questions/263892", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "28" }
Q: Using an array in the FileHelpers mapping class I have been searching for a way to allow one element of my FileHelpers mapping class to be an array of specific length. For instance, I have a class like this: [DelimitedRecord(",")] public class Example { public string code; public int month; public int da...
{ "language": "en", "url": "https://stackoverflow.com/questions/263899", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How can I exclude a module from a minicpan repository? I have a local MINICPAN repository, but I want to remove a specific version of a module, and inject an older version. This is the steps I've taken. - create the MINICPAN, not filtering any modules - use mcpani --add for the module in question - use mcpani --inje...
{ "language": "en", "url": "https://stackoverflow.com/questions/263901", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Points drawn in the onload event of the SVG element are NOT being displayed when rendered I'm working on drawing an SVG grid using Javascript. I've managed to get the axis drawn, as well as my quadrant labels. However I've run into an issue adding my dynamic points. I'm trying to draw the points in the onload event ...
{ "language": "en", "url": "https://stackoverflow.com/questions/263902", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: C++ construction weird uninitialized pointer AlertEvent::AlertEvent(const std::string& text) : IMEvent(kIMEventAlert, alertText.c_str()), alertText(text) { //inspection at time of crash shows alertText is a valid string } IMEvent::IMEvent(long eventID, const char* details) { //during construction, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/263906", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to shrink 'list' object in Reporting Services I have a table and an associated chart contained within a 'list' object in SSRS 2005. I am using an expression to determine the visibility of the table and chart, however when the table and chart are not visible an ugly large blank space (where they would otherwise ...
{ "language": "en", "url": "https://stackoverflow.com/questions/263909", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to set the "insert new row" as first row in DataGridView I am trying to get the DataGridView to render the "insert new row" row as the first row in the grid instead of the last row. How do I go about doing that, is it even possible in the control? A: I don't think there is any way to move the "new row" row to t...
{ "language": "en", "url": "https://stackoverflow.com/questions/263913", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: What is the barest bare-boned operating system available? What are some tiny open source operating systems? I'm looking for something several orders of magnitude smaller than Puppy Linux, Feather Linux, DSL, etc. I want to run a command-line text editor and compiler; anything else is extraneous. I'm looking for a sy...
{ "language": "en", "url": "https://stackoverflow.com/questions/263926", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: Packing rectangular image data into a square texture I have N items of 2D image data that will be rectangular and I want to pack them into a single power of 2 texture as efficiently as possible. A simple non-efficient and naive implementation of an algorithm to pack these rects would be easy to whip up, but I'm sure...
{ "language": "en", "url": "https://stackoverflow.com/questions/263932", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: Changing textarea wrapping using javascript For my small wiki application, I mostly need to have the textarea used to edit the contents to use soft (or virtual) wrapping. However, in some cases, not wrapping the content would be preferable. I thought I would do this by simply having a button to turn off wrapping. He...
{ "language": "en", "url": "https://stackoverflow.com/questions/263938", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: What happens if you call erase() on a map element while iterating from begin to end? In the following code I loop through a map and test if an element needs to be erased. Is it safe to erase the element and keep iterating or do I need to collect the keys in another container and do a second loop to call the erase()...
{ "language": "en", "url": "https://stackoverflow.com/questions/263945", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "140" }
Q: How can I make Eclipse output std:out to a standard windows console As eclipse users know, eclipse captures the output of std out and err by default and dumps it into the console that is integrated with the IDE. I would like eclipse to just use a standard windows cmd instance to display std:out and std:err by defaul...
{ "language": "en", "url": "https://stackoverflow.com/questions/263952", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: Stand-alone NetBeans-compatible .form editor Is there a stand-alone GUI designer that can read and write the .form files that NetBeans (Matisse) generates? I like the GUI designer, but I don't want all the overhead of a complete Java IDE just to create and edit .form XML files. A: You could check out JFormDesigner....
{ "language": "en", "url": "https://stackoverflow.com/questions/263959", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Best way to pass parameters to jQuery's .load() Is there a difference in passing parameters to .load $("#myDiv").load("myScript.php?var=x&var2=y&var3=z") vs $("#myDiv").load("myScript.php", {var1:x, var2:y, var3:z}) Also, is there a size limit to how much .load can handle? Can myScript.php return a couple hundred ...
{ "language": "en", "url": "https://stackoverflow.com/questions/263962", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "48" }
Q: Link to unless current -- is it possible in CodeIgniter? In Ruby (forgive me for mentioning it's name) I noticed you could do a anchor link with "link to unless current", which would remove the link if it was the current page. I know there's nothing built into CodeIgniter to do something similar, but I'm trying to c...
{ "language": "en", "url": "https://stackoverflow.com/questions/263963", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can I convert a string to boolean in JavaScript? Can I convert a string representing a boolean value (e.g., 'true', 'false') into a intrinsic type in JavaScript? I have a hidden form in HTML that is updated based upon a user's selection within a list. This form contains some fields which represent boolean values...
{ "language": "en", "url": "https://stackoverflow.com/questions/263965", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3371" }
Q: How do I convert NetBeans .form files to .java? What's the best way to convert NetBeans (Matisse) .form files into .java files, without using the NetBeans IDE itself? Ideally I'd like to package the .form files along with my source code, and generate the .java files at build time. This will prevent developers from "...
{ "language": "en", "url": "https://stackoverflow.com/questions/263968", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: NSColor and NSGradient as properties - any reason to copy? I'm quite familiar with the reasons for wanting to copy a property vs. retain. (Essentially the value vs. relationship argument. You almost always want to copy strings, for example.) What about NSColor and NSGradient? They both conform to NSCopying, but as ...
{ "language": "en", "url": "https://stackoverflow.com/questions/263977", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Interdisciplinary Algorithm Construction with Non-developers Yeah, I know the title is a mouthful... What I mean is to say is how do you communicate with a subject matter expert who needs a theory coded and tested? For example, weather simulation is a collaboration between meteorologists, computer scientists, and so...
{ "language": "en", "url": "https://stackoverflow.com/questions/263978", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Regex Question - One or more spaces outside of a quote enclosed block of text I want to be replace any occurrence of more than one space with a single space, but take no action in text between quotes. Is there any way of doing this with a Java regex? If so, can you please attempt it or give me a hint? A: Here's ano...
{ "language": "en", "url": "https://stackoverflow.com/questions/263985", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do I get a .NET assembly running under Delphi from a network drive? I have a Delphi 5 executable that calls into a .NET assembly via the free Delphi .NET code, and for the most part, this works great. However, one of the requirements of my application is that our clients be able to use this from a networked sha...
{ "language": "en", "url": "https://stackoverflow.com/questions/263987", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to remove relations from entity framework I don't want to include relations in my edmx entity framework, I want to have the foreign key field as a normal property in my entity. How can I do that? A: If you want plain foreign keys in your database then you're using the wrong one. As far as I know entity framewo...
{ "language": "en", "url": "https://stackoverflow.com/questions/263992", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How to use ASP.NET MVC ActionFilterAttribute/IResultFilter to modify output I am trying to modify the output stream to search/replace some XHTML tags returned from a View. I could use an traditional ASP.NET response filter, but thought to try the ASP.NET MVC action filter first. public class MyResultFilter : Action...
{ "language": "en", "url": "https://stackoverflow.com/questions/264002", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Tools for code snippet execution By "code snippet execution", I mean the ability to write a few lines of code, run and test it without having to fire up an IDE and create a dummy project. It's incredibly useful for helping people with a small code sample without creating a project, compiling everything cleanly, send...
{ "language": "en", "url": "https://stackoverflow.com/questions/264004", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Fastest possible XML handling in Delphi for very large documents I need recommendations on what to use in Delphi (I use Delphi 2009) to handle very large XML files (e.g. 100 MB) as fast as possible. I need to input the XML, access and update the data in it from my program, and then export the modified XML again. Ho...
{ "language": "en", "url": "https://stackoverflow.com/questions/264020", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: XMLHTTP POST request and System.Reflection I have a DTS job that is using the MSXML2.XMLHTTP3.0 object to generate a post request to an ASP.NET application. Under the covers, the ASP.NET application is using System.Reflection to acquire some assembly information and I receive the following exception: System.Web.Ht...
{ "language": "en", "url": "https://stackoverflow.com/questions/264022", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What overhead is there of using an MXML file in Flex vs. a plain actionscript class? I find it much easier to write MXML classes with embedded Script than trying to make an actionscript file. I was wondering however what kind of overhead there is of using an MXML file - in terms of file size. I'm not especially conc...
{ "language": "en", "url": "https://stackoverflow.com/questions/264043", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Have you used a traveling salesman algorithm to solve a problem? I studied TSP in college in the context of NP Completeness. I have never actually had a situation where it would apply to a practical problem. A little bit of research shows that it has been used to pick the cheapest path to move a drill around, t...
{ "language": "en", "url": "https://stackoverflow.com/questions/264050", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "22" }
Q: iostream linker error I have some old C code that I would like to combine with some C++ code. The C code used to have has the following includes: #include <windows.h> #include <stdio.h> #include <string.h> #include "mysql.h" Now I'm trying to make it use C++ with iostream like this: #include <windows.h> #include <s...
{ "language": "en", "url": "https://stackoverflow.com/questions/264057", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: VS 2008 keeps removing and re-adding ASPXCodeBehind I've got a VS 2008 C# Web project and whenever I make some changes to the files in it (not even to the project file itself) VS will remove some lines like this from the csproj file: <SubType>ASPXCodeBehind</SubType> So something like this: <Compile Include="Defaul...
{ "language": "en", "url": "https://stackoverflow.com/questions/264058", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "70" }
Q: Properties in partial class not appearing in Data Sources window! Entity Framework has created the required partial classes. I can add these partial classes to the Data Sources window and the properties display as expected. However, if I extend any of the classes in a separate source file these properties do not app...
{ "language": "en", "url": "https://stackoverflow.com/questions/264074", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do you make a ASP.NET Control talk to a Silverlight app on the same page in C# For example: First, say I have a Silverlight app with Windowless=true so that I can place ASP.NET controls on top of it. Then I place an ASP.NET button on the page. How can I have say the text of a control in the Silverlight app ch...
{ "language": "en", "url": "https://stackoverflow.com/questions/264075", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I calculate the closest power of 2 or 10 a number is? What is the most efficient way to cacluate the closest power of a 2 or 10 to another number? e.g. 3.5 would return 4 for power of 2 and 1 for power of 10 123 would return 128 for power of 2 and 100 for power of 10 0.24 would return 0.25 for power of 2 and ...
{ "language": "en", "url": "https://stackoverflow.com/questions/264080", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: In SQL, how to delete a row from one table if it doesn't have a corresponding row in another table? How can I make: DELETE FROM foo WHERE id=1 AND bar not contains id==1 To elaborate, how can I remove a row with id = 1, from table foo, only if there is not a row in table bar with id = 1. A: DELETE FROM foo WHERE id...
{ "language": "en", "url": "https://stackoverflow.com/questions/264090", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: MySQL data modeling I have this current problem with data I have to represent in a MySQL database: I have to support different kinds of products with different data each one, for example, cars, hotel rooms, books, etc. For my application there is some data which is common for each product, like name, description, pr...
{ "language": "en", "url": "https://stackoverflow.com/questions/264119", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to move build task into parent POM I have a POM for my ejb project. In it I have added a maven-antrun-plugin execution step to build websphere ejb stubs during the verify phase. This works but is quite verbose, and as I need to add similiar steps to a number of other ejb projects I want to move the common sectio...
{ "language": "en", "url": "https://stackoverflow.com/questions/264120", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: % VIM Key Command Is there a way to have % in vim find the next ([{ or whatever, even if it is not on the same line? Example: int main(int argc, char ** argv) { #Your cursor is somewhere in this comment, I want #it to get to the ( after printf printf("Hello there.\n"); } A: If you want to find openi...
{ "language": "en", "url": "https://stackoverflow.com/questions/264123", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }