text
string
meta
dict
Q: How can I make the "find" Command on OS X default to the current directory? I am a heavy command line user and use the find command extensively in my build system scripts. However on Mac OS X when I am not concentrating I often get output like this: $ find -name \*.plist find: illegal option -- n find: illegal optio...
{ "language": "en", "url": "https://stackoverflow.com/questions/194725", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: Can a Flex 3 method detect the calling object? If I have a method such as: private function testMethod(param:string):void { // Get the object that called this function } Inside the testMethod, can I work out what object called us? e.g. class A { doSomething() { var b:B = new B(); b.fooBar(); } } cl...
{ "language": "en", "url": "https://stackoverflow.com/questions/194733", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do you determine if an Internet connection is available for your WinForms App? What is the best way to determine whether there is an available Internet connection for a WinForms app. (Programatically of course) I want to disable/hide certain functions if the user is not connected to the Internet. A: I'm not a c...
{ "language": "en", "url": "https://stackoverflow.com/questions/194742", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: HTML in an ASP.NET Dynamic Data MultilineText Control I'm trying to enter a little bit of HTML into an ASP.NET Dynamic Data MultilineText_Edit control, just a couple of <br> tags to have line breaks when I output the value of the column on a web page. However, when I try to click the "Update" link on the Dynamic D...
{ "language": "en", "url": "https://stackoverflow.com/questions/194750", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Rendering UML diagrams from text files Is there any good tool or tool-chain that allows UML images in the .svg format to be created from a textual source file? The reason for this question is that I want to automate the generation of these images to avoid having to manually create and update this set of images. A:...
{ "language": "en", "url": "https://stackoverflow.com/questions/194754", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "29" }
Q: .Net Form POST I've got a client that, during testing, is giving me conflicting information. I don't think they are lying but more confused. So, I would like to setup some simple auditing in my ASP.Net application. Specifically, right when any page is called, I want to immediately insert the Querystring and/or fo...
{ "language": "en", "url": "https://stackoverflow.com/questions/194759", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Image Zoom using javascript? Has anyone got to some good code to zoom into an image using javascript? I know I could just resize it etc but was being lazy and looking for something clever to zoom to different levels, move around when zoomed etc A: Check this: * *jQZoom *Zoomimage - jQuery plugin *jQuery ImgZoo...
{ "language": "en", "url": "https://stackoverflow.com/questions/194761", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: CSS for a pre-like element in IE I want to define a CSS class that will provide the same style as HTML's <pre> element. I tried this: .mystyle { display: block; font-family: monospace; white-space: pre; } which works fine on FF but not on IE (white-spaces are not kept). Does anyone have a clue? A: white...
{ "language": "en", "url": "https://stackoverflow.com/questions/194762", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How do I get java logging output to appear on a single line? At the moment a default entry looks something like this: Oct 12, 2008 9:45:18 AM myClassInfoHere INFO: MyLogMessageHere How do I get it to do this? Oct 12, 2008 9:45:18 AM myClassInfoHere - INFO: MyLogMessageHere Clarification I'm using java.util.logging...
{ "language": "en", "url": "https://stackoverflow.com/questions/194765", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "150" }
Q: How do you use Squeak? I downloaded Squeak, the Image file, and the Sources file, but I can't figure out how to write Smalltalk code. Is there something obvious I'm missing? Is Squeak even the right IDE for serious Smalltalk development? A: Squeak is a great environment for learning Smalltalk, but don't confuse tha...
{ "language": "en", "url": "https://stackoverflow.com/questions/194784", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: In agile like development, who should write test cases? Our team has a task system where we post small incremental tasks assigned to each developer. Each task is developed in its own branch, and then each branch is tested before being merged to the trunk. My question is: Once the task is done, who should define the...
{ "language": "en", "url": "https://stackoverflow.com/questions/194790", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: Lucene.Net fails at my host because it calls GetTempPath(). What's the work around? I'm using Lucene.Net in an ASP.NET application on a shared host. Got this stack trace shown below. What's the work around? [SecurityException: Request for the permission of type 'System.Security.Permissions.EnvironmentPermission,...
{ "language": "en", "url": "https://stackoverflow.com/questions/194795", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to make text over flow into two columns automatically I'm currently developing a website and my client wants the text of various articles to overflow into two columns. Kind of like in a newspaper? So it would look like: Today in Wales, someone actually Nobody was harmed in did something interesting. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/194803", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Webtextedit Mousemove event in XSLT I need help please. No clue in xml & WebtextEdit, I am editing an xslt stylesheet that creates asp controls. Below is the WebTextEdit control, I want to add an mousemove event: <xsl:element name="igtxt:WebTextEdit"> <xsl:attribute name='id'><xsl:value-of select='$Name...
{ "language": "en", "url": "https://stackoverflow.com/questions/194805", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Batch node operations in Drupal 5 What is the most efficient way to go through and update every single node in a drupal site, to, for instance mechanically add tags? Drupal 6 has a shiny new batch API, but what to do in Drupal 5? I started writing a script that keeps a pointer and then goes around all nodes on a cro...
{ "language": "en", "url": "https://stackoverflow.com/questions/194821", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How can I initialize an array of pointers to structs? Is it possible to initialize an array of pointers to structs? Something like: struct country_t *countries[] = { {"United States of America", "America"}, {"England", "Europe"}, {"Ethiopia", "Africa"} } I want to do that in order to g...
{ "language": "en", "url": "https://stackoverflow.com/questions/194828", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: What is the code-coverage percentage on your project? What is the % code-coverage on your project? I'm curious as to reasons why. Is the dev team happy with it? If not, what stands in the way from increasing it? Stuart Halloway is one whose projects aim for 100% (or else the build breaks!). Is anyone at that level...
{ "language": "en", "url": "https://stackoverflow.com/questions/194836", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Is it possible to do a kind of Link / Button style using CSS with special effects like shadows, outlining of text, and/or gradient? Is it possible to make such buttons (http://img225.imageshack.us/img225/6452/buttonslw9.jpg) using CSS? It should be Menu, and PHP would just feed the text to html/css and css should ta...
{ "language": "en", "url": "https://stackoverflow.com/questions/194842", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Is it overkill to put MySQL select statements in a class and CRUD statements in a child class? I have 2 classes for accessing the database: MovieDAO - access database using "select" statements only; the purpose is for retrieving data for displaying in the web browser. and MovieExtendedDAO (extends MovieDAO) - which...
{ "language": "en", "url": "https://stackoverflow.com/questions/194843", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Is there hash code function accepting any object type? Basically, I'm trying to create an object of unique objects, a set. I had the brilliant idea of just using a JavaScript object with objects for the property names. Such as, set[obj] = true; This works, up to a point. It works great with string and numbers, but ...
{ "language": "en", "url": "https://stackoverflow.com/questions/194846", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "173" }
Q: How to concatenate text from multiple rows into a single text string in SQL Server Consider a database table holding names, with three rows: Peter Paul Mary Is there an easy way to turn this into a single string of Peter, Paul, Mary? A: DECLARE @Names VARCHAR(8000) SELECT @name = '' SELECT @Names = @Names + ',' + ...
{ "language": "en", "url": "https://stackoverflow.com/questions/194852", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2339" }
Q: Random date in C# I'm looking for some succinct, modern C# code to generate a random date between Jan 1 1995 and the current date. I'm thinking some solution that utilizes Enumerable.Range somehow may make this more succinct. A: Well, if you gonna present alternate optimization, we can also go for an iterator: sta...
{ "language": "en", "url": "https://stackoverflow.com/questions/194863", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "159" }
Q: Hardware Acceleration for non-SSL based signing and encryption I am working on a project that does a large amount of hashing, signing, and both asymmetric and symmetric encryption. Since these steps have a significant effect on our performance and available load, I was wondering if there is a hardware based solution...
{ "language": "en", "url": "https://stackoverflow.com/questions/194869", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Which map api would best support fictionally defined maps? I am researching the feasibility of setting up a mapping tool for my alliance in an online game. The game is not based in the real world so I am not interested in the content of the map tools available, just the functionality. Minimally, I would like the m...
{ "language": "en", "url": "https://stackoverflow.com/questions/194879", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Show file tree in visual studio 2005? I have a large project that I want to start using visual studio 2005 to edit. I want to tell it "Here are all the files I want you to track, now get on with it" and have them displayed as a directory tree, for example: Folder 1 - File A - File B - File C Folder 2 - Folder 3 ...
{ "language": "en", "url": "https://stackoverflow.com/questions/194890", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How can you efficiently check the VM mapping for an address? I am writing a tracing tool which needs to deal with the output of a a JIT, so the stack can look pretty bizarre at times. I'd like to try to apply some heuristics to addresses to determine if they are code, data or garbage. (If I'm wrong some of the tim...
{ "language": "en", "url": "https://stackoverflow.com/questions/194896", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Where does Visual Studio get the type description info used by Intellisense? Where do the type/member/parameter descriptions that you see in the Intellisense bubble come from? Are they stored in type attributes? EDIT: I'm specifically interested in the built-in types. A: I don't know about the built-in types, but w...
{ "language": "en", "url": "https://stackoverflow.com/questions/194899", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Any C++ libraries available to convert between floating point representations? I recently had a need to interpret a DEC 32-bit floating point representation. It differs from the IEEE floating point representations in the number of bits allocated to the exponent and mantissa. Here's a description of a bunch of float...
{ "language": "en", "url": "https://stackoverflow.com/questions/194912", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Adding spaces between strings What's the best way of adding spaces between strings myString = string.Concat("a"," ","b") or myString = string.Concat("a",Chr(9),"b") I am using stringbuilder to build an XML file and looking for something efficient. Thanks Edit ~ Language VB.NET A: Create your XML file with the Xml...
{ "language": "en", "url": "https://stackoverflow.com/questions/194914", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do I use LINQ Contains(string[]) instead of Contains(string) I got one big question. I got a linq query to put it simply looks like this: from xx in table where xx.uid.ToString().Contains(string[]) select xx The values of the string[] array would be numbers like (1,45,20,10,etc...) the Default for .Contains is ...
{ "language": "en", "url": "https://stackoverflow.com/questions/194930", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "108" }
Q: In C#, what is the best method to format a string as XML? I am creating a lightweight editor in C# and would like to know the best method for converting a string into a nicely formatted XML string. I would hope that there's a public method in the C# library like "public bool FormatAsXml(string text, out string form...
{ "language": "en", "url": "https://stackoverflow.com/questions/194944", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "43" }
Q: An Alternative to VS 2008 Designer Screen I thought the web page designer screen in 2005 was mediocre until I used the one in 2008 which I think is bad. There is an interesting white paper here: http://www.west-wind.com/weblog/posts/484172.aspx I've gotten very used to these WYSIWYG designers over the years, but I...
{ "language": "en", "url": "https://stackoverflow.com/questions/194976", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I find out what exceptions might be thrown by a .NET function? I might be missing something obvious but is there a reference somewhere about what exceptions are thrown by functions in .NET and why the exception might be thrown? As an example, I was recently trying out Linq in Visual C# 2008 and I was loading...
{ "language": "en", "url": "https://stackoverflow.com/questions/194995", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Are static class instances unique to a request or a server in ASP.NET? On an ASP.NET website, are static classes unique to each web request, or are they instantiated whenever needed and GCed whenever the GC decides to disposed of them? The reason I ask is because I've written some static classes before in C# and the...
{ "language": "en", "url": "https://stackoverflow.com/questions/194999", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "193" }
Q: What is code coverage and how do YOU measure it? What is code coverage and how do YOU measure it? I was asked this question regarding our automating testing code coverage. It seems to be that, outside of automated tools, it is more art than science. Are there any real-world examples of how to use code coverage? A: ...
{ "language": "en", "url": "https://stackoverflow.com/questions/195008", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "348" }
Q: How can I split multiple joined words? I have an array of 1000 or so entries, with examples below: wickedweather liquidweather driveourtrucks gocompact slimprojector I would like to be able to split these into their respective words, as: wicked weather liquid weather drive our trucks go compact slim projector I wa...
{ "language": "en", "url": "https://stackoverflow.com/questions/195010", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "57" }
Q: What is the best way to use JavaDoc to document a Java enum? I've just started using Java's enums in my own projects (I have to use JDK 1.4 at work) and I am confused as to the best practice of using JavaDoc for an enum. I have found that this method works, but the resultant code is a little unrefined: /** * Doc for...
{ "language": "en", "url": "https://stackoverflow.com/questions/195020", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "50" }
Q: Is using a front controller and headers the best way to mimic a response in PHP? I've been researching PHP frameworks as of late for some personal projects, and it looks like most of them use a front controller to mimic a response. The controller gets the params from the request, and re-routes by sending the appropr...
{ "language": "en", "url": "https://stackoverflow.com/questions/195036", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Using jQuery, how do you mimic the form serialization for a select with multiple options selected in a $.ajax call? Below is my $.ajax call, how do I put a selects (multiple) selected values in the data section? $.ajax({ type: "post", url: "http://myServer" , dataType: "text", data: { 'servic...
{ "language": "en", "url": "https://stackoverflow.com/questions/195058", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How to run NUnit programmatically I have some assembly that references NUnit and creates a single test class with a single test method. I am able to get the file system path to this assembly (e.g. "C:...\test.dll"). I would like to programmatically use NUnit to run against this assembly. So far I have: var runner = ...
{ "language": "en", "url": "https://stackoverflow.com/questions/195061", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: What is the quickest way to detect an unreachable host in Java? I would like the fastest and most accurate function boolean isReachable(String host, int port) that passes the following JUnit tests under the conditions below. Timeout values are specified by the JUnit test itself, and may be considered "unreachable." ...
{ "language": "en", "url": "https://stackoverflow.com/questions/195070", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Possible circular dependency issue with PHP application I'm experiencing what I believe is a circular dependency issue with my PHP application. Please let me know if this is incorrect. Here is the situation: Two classes, LogManager and DBSession. DBSession is used to interact with the database, and LogManager is use...
{ "language": "en", "url": "https://stackoverflow.com/questions/195072", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Is it possible to make the -init method private in Objective-C? I need to hide (make private) the -init method of my class in Objective-C. How can I do that? A: Objective-C, like Smalltalk, has no concept of "private" versus "public" methods. Any message can be sent to any object at any time. What you can do is th...
{ "language": "en", "url": "https://stackoverflow.com/questions/195078", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "156" }
Q: Is there a site that emails out daily C# tips and tricks? I subscribe to a newsletter from www.sqlservercentral.com that I like because each day I get an email digest with some interesting headlines & summaries of SQL Server articles that are already out there on the web. It's a great way to learn something new a b...
{ "language": "en", "url": "https://stackoverflow.com/questions/195096", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Running a web app in Grails vs Django I'm currently in the planning stage for a web application and I find myself trying to decide on using Grails or Django. From an operation perspective: * *Which ecosystem is easier to maintain (migrations, backup, disaster recovery etc.)? If using grails it'll probably be a ...
{ "language": "en", "url": "https://stackoverflow.com/questions/195101", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Running compiled python (py2exe) as administrator in Vista Is it possible to programaticly run compiled Python (comiled via py2exe) as administrator in Vista? Some more clarification: I have written a program that modifies the windows hosts file (c:\Windows\system32\drivers\etc\hosts) in Vista the program will not r...
{ "language": "en", "url": "https://stackoverflow.com/questions/195109", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Custom button in C#: How to remove hover background? I'm trying to do a custom button to my form (which has FormBorderStyle = none) using Visual Studio 2005. I have my 3 states button images in an ImageList linked to the button. this.btnClose.AutoSize = false; this.btnClose.BackColor = System.Drawing.Color.Transpare...
{ "language": "en", "url": "https://stackoverflow.com/questions/195114", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Is there a faster alternative to python's Decimal? Does anyone know of a faster decimal implementation in python? As the example below demonstrates, the standard library's decimal module is ~100 times slower than float. from timeit import Timer def run(val, the_class): test = the_class(1) for c in xrange(1...
{ "language": "en", "url": "https://stackoverflow.com/questions/195116", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: How do I set the login info for SQL Server 2008 in Entity Framework? Okay I'm still learning the ropes with the Entity Framework and I came across one more small issue. When I create my Entity Model from the SQL Server 2008 database it warns me about saving the login information in the connection string in the confi...
{ "language": "en", "url": "https://stackoverflow.com/questions/195117", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What are the options available for cross platform rich user interfaces development? Some of the requirements (restrictions) for such a ui framework/toolkit are: * *No single vendor lock down *Ability for real time data visualization *Good initial widgets *Good dash boarding capabilities *cross platform *Good...
{ "language": "en", "url": "https://stackoverflow.com/questions/195133", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Is it possible to sandbox JavaScript running in the browser? I'm wondering if it's possible to sandbox JavaScript running in the browser to prevent access to features that are normally available to JavaScript code running in an HTML page. For example, let's say I want to provide a JavaScript API for end users to let...
{ "language": "en", "url": "https://stackoverflow.com/questions/195149", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "168" }
Q: How to raise an event from a SWF in a SWFLoader to a parent Flex application? How can I raise an event from a SWF file loaded into a Flex application (using SWFLoader)? I want to be able to detect a) when a button is pressed b) when the animation ends A: You'll need to do 2 things: * *Dispatch an event from the...
{ "language": "en", "url": "https://stackoverflow.com/questions/195150", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do I handle foreign keys with WPF databinding? I have a ListView in WPF that is databound to a basic table that I pull from the database. The code for the ListView is as follows: <ListView Canvas.Left="402" Canvas.Top="480" Height="78" ItemsSource="{Binding}" Name="lsvViewEditCardPrint" Width="419"> <ListView...
{ "language": "en", "url": "https://stackoverflow.com/questions/195151", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Downloading the body of sites using user input I want to use shoes to be able to download the body of a website that a user enters in an edit_line. How can I make this work? Can anyone help explain why the below code does not work? It just pops up a new window, and does not download the site from the text entered...
{ "language": "en", "url": "https://stackoverflow.com/questions/195158", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I stop Visual Studio Express SP1 install detecting old version that doesn't exist I haven't installed Visual Studio before on my computer. However when I try to install Visual Studio 2008 Express SP1 I get an error message "Setup has detected that this computer does not meet the requirements to install this s...
{ "language": "en", "url": "https://stackoverflow.com/questions/195169", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: When running UPDATE ... datetime = NOW(); will all rows updated have the same date/time? When you run something similar to: UPDATE table SET datetime = NOW(); on a table with 1 000 000 000 records and the query takes 10 seconds to run, will all the rows have the exact same time (minutes and seconds) or will they ha...
{ "language": "en", "url": "https://stackoverflow.com/questions/195173", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "51" }
Q: Building User ID/Password Functionality with Ruby on Rails? Overkill? I am new to this community, but I am working on a site that requires implementation of a user/password/register check upon entry, which would check against a database, or write to the database, in the case of registration. I have experience with X...
{ "language": "en", "url": "https://stackoverflow.com/questions/195175", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to update contacts in Zimbra by scripting? I have a Zimbra installation and I need to programmaticaly update contacts in it. It seems that its REST interface is only working to add new contacts, but I need to update existing ones. Is there a way, tool or something, open-source, to do that ? A: Well, I have an a...
{ "language": "en", "url": "https://stackoverflow.com/questions/195177", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Quick Rhinomocks Help Can someone take a look at this code and tell me if there's any obvious reason it shouldn't be working? When service.getResponse is called within my code the mocking framework only returns null, not the object I specified. [Test] public void Get_All_Milestones() { var mockRe...
{ "language": "en", "url": "https://stackoverflow.com/questions/195189", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Unresolved external symbol on static class members Very simply put: I have a class that consists mostly of static public members, so I can group similar functions together that still have to be called from other classes/functions. Anyway, I have defined two static unsigned char variables in my class public scope, wh...
{ "language": "en", "url": "https://stackoverflow.com/questions/195207", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "153" }
Q: File.Move not working properly for UNC paths I'm attempting to use File.Move to move a file from one UNC location to another. This blows up if the UNC path for the destination happens to be the local machine (error: Access to the path is denied). Example File.Move(@"\\someServer\path\file.txt", @"\\blah2\somewhere...
{ "language": "en", "url": "https://stackoverflow.com/questions/195208", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: What are the advantages of using a GET request over a POST request? Several of my ajax applications in the past have used GET request but now I'm starting to use POST request instead. POST requests seem to be slightly more secure and definitely more url friendly/pretty. Thus, i'm wondering if there is any reason why...
{ "language": "en", "url": "https://stackoverflow.com/questions/195212", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "32" }
Q: How do I check if a tag exists in XSLT? I have the following template <h2>one</h2> <xsl:apply-templates select="one"/> <h2>two</h2> <xsl:apply-templates select="two"/> <h2>three</h2> <xsl:apply-templates select="three"/> I would like to only display the headers (one,two,three) if there is at least one member of the...
{ "language": "en", "url": "https://stackoverflow.com/questions/195240", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Can I turn off antialiasing on an HTML element? I'm playing around with the <canvas> element, drawing lines and such. I've noticed that my diagonal lines are antialiased. I'd prefer the jaggy look for what I'm doing - is there any way of turning this feature off? A: I want to add that I had trouble when downsizing...
{ "language": "en", "url": "https://stackoverflow.com/questions/195262", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "108" }
Q: Use Windows API from C# to set primary monitor I'm trying to use the Windows API to set the primary monitor. It doesn't seem to work - my screen just flicks and nothing happens. public const int DM_ORIENTATION = 0x00000001; public const int DM_PAPERSIZE = 0x00000002; public const int DM_PAPERLENGTH = 0x00000004;...
{ "language": "en", "url": "https://stackoverflow.com/questions/195267", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Professional jQuery based Combobox control? Are there any professional Combobox controls (dropdown list with autosuggestion) based on the jQuery library? It should be able to handle large datasets and have some skinning options. A multi-column result list would be great too. I'm working with ASP.NET, but it's a not ...
{ "language": "en", "url": "https://stackoverflow.com/questions/195270", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "87" }
Q: Connect to self-signed HTTPS web services from Flex In my project I need to connect to an intra-net web service but we need SSL connection between the two machines. Because this is an intra-net site the certificate of the web service might be a self-signed certificate. The web service and the web page that loads my ...
{ "language": "en", "url": "https://stackoverflow.com/questions/195275", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: A mod_rewrite problem I'm trying to implement the following mod_rewrite rule: host.com/developer/ => host.com/developer/index.py host.com/developer/branchX => host.com/developer/index.py?branch=branchX host.com/developer/branchX/commitY => host.com/developer/index.py?branch=branchX&commit=commitY Currently, the...
{ "language": "en", "url": "https://stackoverflow.com/questions/195286", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Swap every pair of characters in string I'd like to get all the permutations of swapped characters pairs of a string. For example: Base string: abcd Combinations: * *bacd *acbd *abdc etc. Edit I want to swap only letters that are next to each other. Like first with second, second with third, but not third with s...
{ "language": "en", "url": "https://stackoverflow.com/questions/195287", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: ASP.NET OleDbConnection Problem I'm working on an ASP.NET website where I am using an asp:repeater with paging done through a VB.NET code-behind file. I'm having trouble with the database connection though. As far as I can tell, the paging is working, but I can't get the data to be certain. The database is a Microso...
{ "language": "en", "url": "https://stackoverflow.com/questions/195288", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Disable Visual Studio's validation of non-xml files that look like xml? I have a bunch of Velocity template files in a Visual Studio 2008 project, the problem is that despite the fact that the extension is .vm instead of .xml or similar Visual Studio thinks that the HTML they contains must conform to XML naming stan...
{ "language": "en", "url": "https://stackoverflow.com/questions/195293", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: WebTextEdit ClientSideEvent Javascript - Can't Eval WebtextEdit ClientSideEvent execute javascript statement on mousemove event. I can successfully change the style of another object type on this WebTextEdit ClientSide MouseMove event: document.getElementById("Object2").style.backgroundColor = '#F0F5F7'; But when ...
{ "language": "en", "url": "https://stackoverflow.com/questions/195302", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Check if serial port is listening I have an Arduino sending and receiving instructions with a Python script via a serial port. The Arduino takes a button state and when it is pushed, it will send a message via the serial port to a Python script and await a response. (via Serial.available()). It works well enough. Ho...
{ "language": "en", "url": "https://stackoverflow.com/questions/195304", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Button generated for each item in an XSLT file runat server I am tryiing to create an "add to cart" button for each item that is displayed by an XSLT file. The button must be run at server (VB) and I need to pass parameters into the onlick, so that the requested item is added to the cart. Is this possible, and if so...
{ "language": "en", "url": "https://stackoverflow.com/questions/195317", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Why is Class.newInstance() "evil"? Ryan Delucchi asked here in comment #3 to Tom Hawtin's answer: why is Class.newInstance() "evil"? this in response to the code sample: // Avoid Class.newInstance, for it is evil. Constructor<? extends Runnable> ctor = runClass.getConstructor(); Runnable doRun = ctor.newInstance()...
{ "language": "en", "url": "https://stackoverflow.com/questions/195321", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "100" }
Q: What is the most elegant way to read a text file with c++? I'd like to read whole content of a text file to a std::string object with c++. With Python, I can write: text = open("text.txt", "rt").read() It is very simple and elegant. I hate ugly stuff, so I'd like to know - what is the most elegant way to read a te...
{ "language": "en", "url": "https://stackoverflow.com/questions/195323", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "66" }
Q: How to deal with old, obsolete database data of a long running system? What are the possibilities of a programmer to handle data that are rarely used but cannot be simply deleted because at least reporting still requires it? Some examples I am thinking of: * *Discountinued funding types of older years of a univer...
{ "language": "en", "url": "https://stackoverflow.com/questions/195332", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: How to test with RSpec a Rails plugin using "link_to" and "current_page?" I'm writing a Rails plugin that builds up a menu in a view. I'm using link_to to build the link and current_page? to set class="active" on the current page. I've included ActionView::Helpers::UrlHelper so I can use link_to. To get current_page...
{ "language": "en", "url": "https://stackoverflow.com/questions/195334", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Internet Explorer Debug Mode - Is there a quick way to enable/disable it? I do web site debugging with Internet Explorer (as well as other browsers), but my problem is with Internet Explorer, as it is the browser I usually use for regular browsing. In order to debug you need to turn on debug mode in the advanced opt...
{ "language": "en", "url": "https://stackoverflow.com/questions/195335", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: ASP.NET, XSLT and dynamic controls I wish to use xml and xsl to generate controls on an asp.net page. I currently have a asp.net content page that contains a xml control. When the page is loaded, an xml file is loaded and the required element is extracted and set as the xml control's DocumentContent and the xml cont...
{ "language": "en", "url": "https://stackoverflow.com/questions/195340", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Where to find a good reference when choosing a database? I and two others are working on a project at the university. In the project we are making a prototype of a MMORPG. We have decided to use PostgreSQL as our database. The other databases we considered were MS SQL-server and MySQL. Does somebody have a good ref...
{ "language": "en", "url": "https://stackoverflow.com/questions/195353", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: What is a handler? I am trying to learn some programming related terms, and I often come over the word "handler". Can anyone please explain what it means and when to use it? A: Code that's associated with and triggered by the occurrence of a specific event, like an incoming message, a thrown exception, a signal sen...
{ "language": "en", "url": "https://stackoverflow.com/questions/195357", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "100" }
Q: Where do I find the Eclipse JavaServer Faces config editor palette? While running through the cheat sheet "create a navigation rule" for the Eclipse JavaServer Faces tooling it says "select the page control from the palette and ...". But where's this "palette"? A: It turns out, in Ganymede at least, on the right-ha...
{ "language": "en", "url": "https://stackoverflow.com/questions/195359", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Inserting a newline into a pre tag (IE, Javascript) In IE when I insert text into a <pre> tag the newlines are ignored: <pre id="putItHere"></pre> <script> function putText() { document.getElementById("putItHere").innerHTML = "first line\nsecond line"; } </script> Using \r\n instead of a plain \n does not work....
{ "language": "en", "url": "https://stackoverflow.com/questions/195363", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: Dataset ReadXmlSchema Errors How is it possible for this to be true XmlDocument d = BuildReportXML(schema); DataSet ds = new DataSet(); ds.ReadXmlSchema(schema); ds.ReadXml(new XmlNodeReader(d)); Schema is the schema location that I apply to the XmlDocument before I start setting data, assuring that all the columns...
{ "language": "en", "url": "https://stackoverflow.com/questions/195368", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Transactions, when should be discarded and rolledback I'm trying to debug an application (under PostgreSQL) and came across the following error: "current transaction is aborted, commands ignored". As far as I can understand a "transaction" is just a notion related to the underlying database connection. If the connec...
{ "language": "en", "url": "https://stackoverflow.com/questions/195377", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Limit displayed length of string on web page I'm looking for a technique (javascript, CSS, whatever ???) that will let me control the amount of a string that is displayed. The string is the result of a search (and therefore not initially known). A simple Character count approach is trivial, but not acceptable, as it...
{ "language": "en", "url": "https://stackoverflow.com/questions/195408", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to log in an Oracle database? I am interested in what methods of logging is frequent in an Oracle database. Our method is the following: We create a log table for the table to be logged. The log table contains all the columns of the original table plus some special fields including timestamp, modification type (...
{ "language": "en", "url": "https://stackoverflow.com/questions/195410", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: TransactionScope bug in .NET? More information? I have read (or perhaps heard from a colleague) that in .NET, TransactionScope can hit its timeout and then VoteCommit (as opposed to VoteRollback). Is this accurate or hearsay? I couldn't track down information on the web that talked about this issue (if it IS an is...
{ "language": "en", "url": "https://stackoverflow.com/questions/195420", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "24" }
Q: How can I get top terms for a subset of documents in a Lucene index? I know its possible to get the top terms within a Lucene Index, but is there a way to get the top terms based on a subset of a Lucene index? I.e. What are the top terms in the Index for documents within a certain date range? A: Ideally there'd be ...
{ "language": "en", "url": "https://stackoverflow.com/questions/195434", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Loading JSP pages from custom sources Would it be possible to execute a JSP page and capture its output outside of a web application? Mode specifically, in my case there still exists a usual web application, but it loads JSP pages not from its classpath, but from an arbitrary source. It seems like I cannot simply ...
{ "language": "en", "url": "https://stackoverflow.com/questions/195437", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Can you have two forms on a page with ASP.NET MVC? Using web forms I know that you can only have one ASP.NET form on a page. I've done some implementations where I've used Javascript to add other forms to a page to support things like logon controls (that post back to Logon.aspx instead of the current page). I'm w...
{ "language": "en", "url": "https://stackoverflow.com/questions/195439", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: What should I use the "My" namespace for in VB .NET? I'm considering building a framework for VB.NET, and using the My namespace to plug it into VB seems like a reasonable idea. What is "My" used for? A: I really like the "My" Namespace in VB.NET and I always use it in my WindowsForms applications, because it is ve...
{ "language": "en", "url": "https://stackoverflow.com/questions/195450", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: How to fetch the middle mouse button in java? I use public boolean mouseDown(Event ev, int x, int y) to detect a click of the mouse. I can distinguish between the right mouse button (ev.metaDown() is true) and the left and middle. How can i differentiate the left from the middle button? Or if it is impossible with m...
{ "language": "en", "url": "https://stackoverflow.com/questions/195451", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Password protected .NET ClickOnce deployment? How can I protect a ClickOnce deployed application with a password? Do I have to change the IIS settings of the web or is there a way to do it programmatically? I'm using Visual Studio 2005 (.NET 2.0). If I have to use web credentials, are auto-updates of the application...
{ "language": "en", "url": "https://stackoverflow.com/questions/195454", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: How do I access IMetaDataEmit and other MetaData COM interfaces from C# or F#? I am writing a compiler in F# and I want to be able to access the unmanaged metadata COM interfaces in the .net runtime. Before anybody mentions it, Reflection.Emit is not suitable for my purposes, nor do I want to use any other method th...
{ "language": "en", "url": "https://stackoverflow.com/questions/195455", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Unit testing a module that checks internet connectivity I have a C# module responsible for acquiring the list of network adapters that are "connected to the internet" on a windows Vista machine. The module uses the "Network List Manager API" (or NLM API) to iterate over all network connections and returns all those ...
{ "language": "en", "url": "https://stackoverflow.com/questions/195460", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: synchronizing io operation in java on a string method argument? Basically, I have a class with 2 methods: one to serialize an object into an XML file and another to read an object from XML. Here is an example of synchronized part from the method that restores an object: public T restore(String from) throws Excep...
{ "language": "en", "url": "https://stackoverflow.com/questions/195468", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: C# check if a COM (Serial) port is already open Is there an easy way of programmatically checking if a serial COM port is already open/being used? Normally I would use: try { // open port } catch (Exception ex) { // handle the exception } However, I would like to programatically check so I can attempt to us...
{ "language": "en", "url": "https://stackoverflow.com/questions/195483", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "24" }
Q: Why do old editors like Vim and Emacs expose the difference between a File and a Buffer in the interface? Does my question make sense? Using either Vim or Emacs, you come to understand that the interface exposes the code's representation of the state of the file you are editing in the buffer, the file is the on-disk...
{ "language": "en", "url": "https://stackoverflow.com/questions/195485", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }