text
stringlengths
8
267k
meta
dict
Q: Clipping shapes in Silverlight2 I am writing a simple application in SilverLight2, which needs to draw an ellipse inside a canvas element - the ellipse position, height and width are computed during runtime. What I need to fix is the clipping of the ellipse. If it gets to big it is drawn partially outside the canvas...
{ "language": "en", "url": "https://stackoverflow.com/questions/300088", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How to find the disk that holds a given partition in C#? Does anyone know a way to find out programatically which physical disk holds a given partition? Manually, I can find this info using Start->Run->diskmgmt.msc , where I can see that (on my computer) that partitions C: and D: are on disk 1, E: & F: on disk 0. Th...
{ "language": "en", "url": "https://stackoverflow.com/questions/300089", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Preferred namespace syntax for source files Assuming a class called Bar in a namespace called foo, which syntax do you prefer for your source (.cpp/.cc) file? namespace foo { ... void Bar::SomeMethod() { ... } } // foo or void foo::Bar::SomeMethod() { ... } I use namespaces heavily and prefer the first sy...
{ "language": "en", "url": "https://stackoverflow.com/questions/300091", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: accessing SessionState in Global.Application_Error In the Application_Error method in Global.asax I am trying to retrieve a value from session state. I am able to access session state as long as I throw the exception. EG: thow new Exception("Test exception"); However if it is an unhandled exception, i get the foll...
{ "language": "en", "url": "https://stackoverflow.com/questions/300093", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Understanding and using ffmpeg settings Where is the best documentation of ffmpeg and libavcodec? It appears that ffmpeg supports many undocumented options that it is very hard to find a good reference. A: One of the things that can be quite useful: ffmpeg -formats lists all the codecs and containers that can be u...
{ "language": "en", "url": "https://stackoverflow.com/questions/300095", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: many-to-many lookup I am making a waitlist application. I'd like to be able to send applications a unique confirmation code - and later on be able to find a user either by confirmation code or by username. Will Symfony be able to call Models to say either: Code->findUser($code_string); User->getCode(); I believe t...
{ "language": "en", "url": "https://stackoverflow.com/questions/300104", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Move rows between tables in SQL I have 2 tables, an active table and an inactive table. I want to move rows from the active to the inactive table. My first thought was insert into inactive select * from active where ... delete from active active where ... However about .42 seconds later I noticed this will drop/dup...
{ "language": "en", "url": "https://stackoverflow.com/questions/300118", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Combining queries in MySQL I know you can combine multiple table-selects using a Join statement but is there a way to combine these two queries into one? SELECT Statistics.StatisticID FROM Statistics ORDER BY `SubmittedTime` DESC LIMIT 0, 10 And this one? SELECT COUNT(Votes.StatisticID) FROM Votes WHERE Votes.Stat...
{ "language": "en", "url": "https://stackoverflow.com/questions/300123", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I wrap a span around a section of text in javascript? I have markup like this: <p>one two three four</p> And I want to use javascript to convert it to this: <p>one <span>two three<span> four</p> I have the offset and length of the section I want to wrap in a span, in this case offset = 4 and length = 9. If ...
{ "language": "en", "url": "https://stackoverflow.com/questions/300129", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to keep a C++ realtime server application with a modern web client interface? I develop industrial client/server application (C++) with strong real time requirements. I feel it is time to change the look of the client interface - which is developed in MFC - but I am wondering which would be the right choice. If...
{ "language": "en", "url": "https://stackoverflow.com/questions/300144", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Sharepoint Workflow Development (2 part question) I'm trying to develop some SharePoint workflows for the company I work for, and I'm not too familiar with the ins and outs of the technology. Normally when I want to familiarize myself with something, I just play with it, look at the properties, find all the methods...
{ "language": "en", "url": "https://stackoverflow.com/questions/300145", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Can I integrate checked out files into a different branch on perforce We were working on a design, and for that we created the skeleton of the classes in our main branch. Now, we are starting to code, and for that we got a new branch. So, it would be nice if I can move all the new files in the main branch into the...
{ "language": "en", "url": "https://stackoverflow.com/questions/300160", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: What is a context switch? I was reading about the debuggerstepperboundary attribute and a site says it is is useful in a context switch. What exactly is a context switch? I'm assuming it is a switch from one thread to another, or in execution or security context? However, these are not particularly educated guesses ...
{ "language": "en", "url": "https://stackoverflow.com/questions/300167", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "21" }
Q: css li menu dynamic line widths in IE6 I've got a css menu like this: <ul> <li><a>Item1</a></li> <li><a>Item Two</a></li> <li><a>Item C</a></li> <li><a>A Rather Long Menu Item Down Here</a></li> </ul> I want to create this: |-----------------------------------| | Item1 | |------...
{ "language": "en", "url": "https://stackoverflow.com/questions/300175", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Why do I need a mocking framework for my unittests? Recently there has been quite some hype around all the different mocking frameworks in the .NET world. I still haven't quite grasped what is so great about them. It doesn't seem to be to hard to write the mocking objects I need myself. Especially with the help of V...
{ "language": "en", "url": "https://stackoverflow.com/questions/300177", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "38" }
Q: C#: Determine derived object type from a base class static method In a C# program, I have an abstract base class with a static "Create" method. The Create method is used to create an instance of the class and store it locally for later use. Since the base class is abstract, implementation objects will always deriv...
{ "language": "en", "url": "https://stackoverflow.com/questions/300181", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Does implementing IEquatable methods break serialization? I have an object I can serialize to XML without a problem. However when I implement IEquatable and override the functions, I get an error about the XML not being generated correctly. Anyone come across this before? A: You may need to override Equals and GetH...
{ "language": "en", "url": "https://stackoverflow.com/questions/300183", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Google Chrome - JavaScript version Which version of JavaScript does Google Chrome support in relation to Mozilla Firefox? In other words, does Chrome support JavaScript 1.6, 1.7, or 1.8 which Firefox also supports or some combination of them? A: Google Chrome supports up to Javascript 1.7: <script language="javasc...
{ "language": "en", "url": "https://stackoverflow.com/questions/300185", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "48" }
Q: Are there any FlowDocument diff viewers for WPF? We have 2 flowdocuments that we'd like to compare similar to when using a diff viewer (winmerge, beyond compare, etc). Has anybody done this or know how to get the text out of a flowdocument to do a compare? A: Here's a way to save it as raw xaml (text file) from th...
{ "language": "en", "url": "https://stackoverflow.com/questions/300187", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to unmount WebDAV volumes using Carbon without a lengthy blocking period? I'm trying to unmount a WebDAV volume (mounted with FSMountServerVolumeSync()) using either FSUnmountVolumeSync() or FSEjectVolumeSync(). Thus far I've been unable to get either of them to reliably unmount the volume without blocking for ...
{ "language": "en", "url": "https://stackoverflow.com/questions/300188", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: W3C XML Schema and the maximum integer for maxOccurs I work on a W3C XML Schema (not written by me). One tool, xmllint, refuses to use the schema: traceroute.xsd:658: element element: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element', attribute 'maxOccurs': The value '4294967295' is not va...
{ "language": "en", "url": "https://stackoverflow.com/questions/300196", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to embed a swf on top of a html page? I want to embed a swf over a html page, like a floating video watching panel. I already have a swf file which will automatically adjust its size according to the browser size, and the swf file is partially transparent. I thought I can just add a div tag, make the position ab...
{ "language": "en", "url": "https://stackoverflow.com/questions/300200", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How does one execute a no-op in C/C++? for the following: ( a != b ) ? cout<<"not equal" : cout<<"equal"; suppose I don't care if it's equal, how can I use the above statement by substituting cout<<"equal" with a no-op. A: The only thing missing from the other answers is this: There is no way, directly, to code a ...
{ "language": "en", "url": "https://stackoverflow.com/questions/300208", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: HTML - xml data islands I am designing a web app and I intent to embed data on an xml island so that I can dynamically render it on an HTML table on the client-side based on options the users will select. I have the broad concepts, but I need pointers on how to use DOM in navigating my xml. And how to update my xml ...
{ "language": "en", "url": "https://stackoverflow.com/questions/300210", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Javascript frames discovery In javascript how do I get a handle on the frame that I'm in based on an element in that frame? function myFunction(elementInFrame){ // here I want to get a handle on the frame that elementInFrame lives in } A: elementInFrame.document.defaultView for non-IE browsers. (It's not quite ...
{ "language": "en", "url": "https://stackoverflow.com/questions/300217", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to prevent text in a table cell from wrapping Does anyone know how I can prevent the text in a table cell from wrapping? This is for the header of a table, and the heading is a lot longer than the data under it, but I need it to display on only one line. It is okay if the column is very wide. The HTML of my (s...
{ "language": "en", "url": "https://stackoverflow.com/questions/300220", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "350" }
Q: jdbcTemplate and Oracle 10 Trying to do an insert, I have: jdbcTemplate.update("insert into....", new Object[]{foo.getId(), foo.getName()}) foo.getId() returns a long, and getName() a String. I have "NUMBER" as the id type in Oracle, and varchar2 for the name field. I'm getting SQLtype unknown problem. the update me...
{ "language": "en", "url": "https://stackoverflow.com/questions/300236", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Mapping traditional caches to memcached? (but in .NET) I'm building a caching system and I want it to be ready for distributed caching a la memcached. What I'm looking to do is to convert a traditional Hashtable/Dictionary of (string -> object) and to allow per-item expiration to be handled by the Cache itself, in ...
{ "language": "en", "url": "https://stackoverflow.com/questions/300245", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What are some SWT datagrids/tables? I need to be able to display some data in Eclipse in a grid/table control... I need things like paging, multiple column sorting, column choosing, etc. There is an SWT Table and the Nebula project has a grid in alpha. Does what I need exist? 3rd party maybe? Doesn't have to be free...
{ "language": "en", "url": "https://stackoverflow.com/questions/300246", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: C# - Best Approach to Parsing Webpage? I've saved an entire webpage's html to a string, and now I want to grab the "href" values from the links, preferably with the ability to save them to different strings later. What's the best way to do this? I've tried saving the string as an .xml doc and parsing it using an XPa...
{ "language": "en", "url": "https://stackoverflow.com/questions/300252", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: How to make mockup screenshots without VB I am looking for a program to make mockup screenshots with. I first found out I could do it with Visual Basic (uglier names I have yet to hear a programming language being called) from joelonsoftware.com. I don't want to start learning VB now, especially since I am still in ...
{ "language": "en", "url": "https://stackoverflow.com/questions/300254", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How do I make my controls inside a UserControl private? I have a user control with a ComboBox and a TextBox. Everything is working great except I noticed that from my user control's instance object, I can access those two controls. They shouldn't be accessible except via my own exposed properties. A: You can use ...
{ "language": "en", "url": "https://stackoverflow.com/questions/300255", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "32" }
Q: How do I get these strange characters when I try to "echo" the html string? I am sending the echo to mail function via PHP from variable that includes HTML code. The strange thing is, that this <����}im� shows up AFTER the string.. but I do not manipulate with it anymore. The charset of mail function (the attachme...
{ "language": "en", "url": "https://stackoverflow.com/questions/300259", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: .net 2.0 security configuration Are there some help resources, or can anyone give me a brief Idea how I would configure the .net 2 runtime security policies for the following scenario: I have a windows forms control hosted in IE. The control tries to read from a serial port and write to the event log. Both of thes...
{ "language": "en", "url": "https://stackoverflow.com/questions/300268", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Entity Framework and Crystal Reports As I understand it, Crystal Reports can use EntityFramework, is the correct? I'd rather use Entity Framework instead using datasets. How would I do this? A: Crystal reports support .net objects. So you can pass an ienumerable of your entity framework object to a report instea...
{ "language": "en", "url": "https://stackoverflow.com/questions/300284", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Constructor injection and default overloads Let's say we have public interface ITimestampProvider { DateTime GetTimestamp(); } and a class which consumes it public class Timestamped { private ITimestampProvider _timestampProvider public Timestamped(ITimestampProvider timestampProvider) { //...
{ "language": "en", "url": "https://stackoverflow.com/questions/300286", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Generic Architecture for a Network Server/Client using a State Machine All, so, I inventedmade up a simple protocol that I want to use for a client to talk to a server. It's the typical (I think) three-phase layout: * *Connection Establishment (will eventually include capability negotiation) *Actual Data Exchan...
{ "language": "en", "url": "https://stackoverflow.com/questions/300289", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Initiate script in embedded browser from the container application If I have an embedded browser in a windows form, is it possible to initiate a javascript method from the container application? A: You can use Document.InvokeScript, as outlined in this excellent MSDN article: How to: Implement Two-Way Communicati...
{ "language": "en", "url": "https://stackoverflow.com/questions/300298", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Rails: Tidy Stylesheets Anyone know how to take the awesome method mentioned in this tutorial and have the stylesheet tags generate with absolute URLs? A: Figured it out. In what goes in the application_helper.rb: def get_stylesheets stylesheets = [] unless stylesheets ["http://www.example.com/stylesheets/#{con...
{ "language": "en", "url": "https://stackoverflow.com/questions/300299", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to get container of draggable inside drop event? I have an html like this: <div id="container1"> <div class="dragme">drag me</div> </div> <div id="container2"> <div class="dragme">drag me</div> </div> <div id="droponme"></div> $(".dragme").draggable(); $("#droponme").droppable({ accept: ".dragme", ...
{ "language": "en", "url": "https://stackoverflow.com/questions/300303", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I execute JS XHR responses in Dojo? What I'm looking for looks like this in jQuery: jQuery.ajaxSetup({ 'beforeSend': function(xhr) { xhr.setRequestHeader("Accept", "text/javascript"); } }); ... $("#my_form").submit({ $.post($(this).attr("action", $(this).serialize(), null, "script"); return false;...
{ "language": "en", "url": "https://stackoverflow.com/questions/300306", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Linq to SQL and Entity Framework differences? What is the differences between those 2 assuming I'm using SQL Server as my database? Are they the same? A: This post points to some info. in particular 3 main differences: * *The ability to query relational stores other than Microsoft SQL Server *A full textual que...
{ "language": "en", "url": "https://stackoverflow.com/questions/300314", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Is there a way to force IE or FF into a handheld mode for testing "@media handheld" stylesheets? Is there a way to force IE or FF into a handheld mode for testing "@media handheld" stylesheets? Or, do I have to publish the pages and test with my Blackberry? I'd prefer to test this without pushing the application to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/300315", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Java concurrency scenario -- do I need synchronization or not? Here's the deal. I have a hash map containing data I call "program codes", it lives in an object, like so: Class Metadata { private HashMap validProgramCodes; public HashMap getValidProgramCodes() { return validProgramCodes; } public void se...
{ "language": "en", "url": "https://stackoverflow.com/questions/300316", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: Where do you put your javascript? Do you localize your javascript to the page, or have a master "application.js" or similar? If it's the latter, what is the best practice to make sure your .js isn't executing on the wrong pages? EDIT: by javascript I mean custom javascript you write as a developer, not js libraries....
{ "language": "en", "url": "https://stackoverflow.com/questions/300321", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: How to Include Multiple Javascript Files in .NET (Like they do in rails) I'm jealous of the rails guys. They can do this: <%= javascript_include_tag "all_min" %> ... and I'm stuck doing this: <script src="/public/javascript/jquery/jquery.js" type="text/javascript"></script> <script src="/public/javascript/jquery/jq...
{ "language": "en", "url": "https://stackoverflow.com/questions/300327", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Eclipse: Attach source/javadoc to a library via a local property I have a third-party library in my SVN repository and I'd like to associate source/javadoc with it locally in Eclipse. I.e., there should be some local setting (for example, an entry in the local.properties file) that associates the source/javadoc with...
{ "language": "en", "url": "https://stackoverflow.com/questions/300328", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: How to Send Encrypted Emails Programmatically (from an automated process) I have a process that runs on a UNIX (Solaris) server that runs nightly and needs to be able to send out encrypted emails. I only need the "encryption" portion, NOT the digital signature / self-repudiation part of PKI. I use MS Outlook in a co...
{ "language": "en", "url": "https://stackoverflow.com/questions/300334", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Display Parameter(Multi-value) in Report Can anyone tell me how to display all the selected value of my multi value parameter in SSRS report. When giving parameter.value option it gives error. A: I didn't know about the join function - Nice! I had written a function that I placed in the code section (report propert...
{ "language": "en", "url": "https://stackoverflow.com/questions/300339", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "81" }
Q: PHP - member encapsulation returns strange reference I have a class which has a private member $content. This is wrapped by a get-method: class ContentHolder { private $content; public function __construct() { $this->content = ""; } public function getContent() { return $this...
{ "language": "en", "url": "https://stackoverflow.com/questions/300344", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: VFSVolumeSize overflow on 6GB+ cards on Palm Centro When I call VFSVolumeSize on Palm OS on a Palm Centro with a 6GB SanDisk card inserted, it returns 1810366464 as the size of the card but 2098102272 bytes used. Obviously there's an overflow going on with the card size. Is there a way to detect this overflow and g...
{ "language": "en", "url": "https://stackoverflow.com/questions/300356", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Best Design for a User/Role Management System? Here's a software design question I've encountered several times and have never found an ideal solution for (I'm also dealing with it now again.) Many applications need some form of user/role management. You have base users, groups that these users can belong to (not l...
{ "language": "en", "url": "https://stackoverflow.com/questions/300359", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "33" }
Q: Create a button with an icon in actionscript I want to create buttons with icons in Flex dynamically using Actionscript. I tried this, with no success: var closeButton = new Button(); closeButton.setStyle("icon", "@Embed(source='images/closeWindowUp.png"); A: You can use this one option of dynamic change of button...
{ "language": "en", "url": "https://stackoverflow.com/questions/300360", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Selecting author name field from Atom feed using LINQ (C#) I'm trying to select the "name" field from the author node in an ATOM feed using LINQ. I can get all the fields I need like so: XDocument stories = XDocument.Parse(xmlContent); XNamespace xmlns = "http://www.w3.org/2005/Atom"; var story = from entry in stori...
{ "language": "en", "url": "https://stackoverflow.com/questions/300376", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How to find slow-down in Javascript in IE6 Something's slowing down my Javascript code in IE6 to where there's a noticeable lag on hover. It's fine in FF, so using firebug isn't that helpful. What tools are out there to help debug this in IE? A little more info: I don't think there's actually any JS running on the o...
{ "language": "en", "url": "https://stackoverflow.com/questions/300380", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Dynamic column cell width I have some Jasper reports which are displayed in HTML format. I would like the width of the columns in the HTML tables to automatically resize to fit the content of the widest cell (in that column), such that all the data is displayed. Currently this does not happen because the HTML genera...
{ "language": "en", "url": "https://stackoverflow.com/questions/300383", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Borland C++: Ambiguity with std (error E2015) I've been developing a DLL in Visual Studio 2005. At the moment it compiles and does what it's supposed to. However, I wanted to compile it using Borland C++ 2006 because I've heard that is better and makes faster code. When I try to do it I get error messages like this ...
{ "language": "en", "url": "https://stackoverflow.com/questions/300386", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: On which Page life cycle are the Client IDs generated? i am programatically adding Webcontrols in to a User Control i am also adding a javascript event passing the controlID as a parameter but the clientID is the one i assigned a it does not contain the one that asp.net generates var txt = new TextBox(); txt.I...
{ "language": "en", "url": "https://stackoverflow.com/questions/300389", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How can I force Linq to SQL NOT to use the cache? When I make the same query twice, the second time it does not return new rows form the database (I guess it just uses the cache). This is a Windows Form application, where I create the dataContext when the application starts. How can I force Linq to SQL not to use th...
{ "language": "en", "url": "https://stackoverflow.com/questions/300402", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How do I build deployment project without un-signing my assemblies? I'm not very experienced with builds - this may be really easy! I have a simple application with a simple deployment project. I went to the directory where the release-compiled versions of the DLLs are, signed all of them (verisign), and then went...
{ "language": "en", "url": "https://stackoverflow.com/questions/300405", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Validating an uploaded file's ContentType in ASP.NET I'm storing some files in my database and since I'm storing them in binary format and not keeping any other information, I have to make sure that all of them are in the same format so that I'll be able to "serve" them later (If there's a simple way to infer the fi...
{ "language": "en", "url": "https://stackoverflow.com/questions/300406", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How can I indicate to users that my IIS website is undergoing maintenance? For my IIS website, I'd like to redirect ALL requests to ONE page. The purpose of this is that I want to do some maintenance on the database (take it off-line) that all my web applications use. I have about 50 web apps running under this webs...
{ "language": "en", "url": "https://stackoverflow.com/questions/300416", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "62" }
Q: How do I set a "Default Action" for my Controller that will be called when no other action matches? Say I have the following route: routes.MapRoute("Default", "{controller}/{action}/{id}", new { controller = "Home", action = "Index", id = "" }); Lets also say that my controller has the following methods: Index...
{ "language": "en", "url": "https://stackoverflow.com/questions/300417", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: How to display HTML stored in a database from an ASP.NET MVC view? I have HTML code edited by FCKEditor stored in a database and would like to display (well render) it onto a view. So, for instance, something stored as: &lt;&gt;pre&lt;&gt;This is some sample text&lt;&gt;pre&lt;/&gt Will be displayed to the user as:...
{ "language": "en", "url": "https://stackoverflow.com/questions/300424", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "30" }
Q: Using an arbitrary number of parameters in T-SQL Is it possible to create a parameterized SQL statement that will taken an arbitrary number of parameters? I'm trying to allow users to filter a list based on multiple keywords, each separated by a semicolon. So the input would be something like "Oakland;City;Plannin...
{ "language": "en", "url": "https://stackoverflow.com/questions/300427", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do I make my RoR's links absolute? <%= link_to 'Show', buddy, :only_path => false %> Doesn't seem to work. I need the full path: http://www.my-server.com/buddy How do I do this? A: If you've defined buddy as a resource in your routes.rb: map.resources :buddy then you should be able to do the following: <%= l...
{ "language": "en", "url": "https://stackoverflow.com/questions/300439", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to unquote a urlencoded unicode string in python? I have a unicode string like "Tanım" which is encoded as "Tan%u0131m" somehow. How can i convert this encoded string back to original unicode. Apparently urllib.unquote does not support unicode. A: %uXXXX is a non-standard encoding scheme that has been rejected...
{ "language": "en", "url": "https://stackoverflow.com/questions/300445", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "54" }
Q: Porting a unicode enabled Delphi 2006 application to Delphi 2009 I have an application which is fully unicode compatible in Delphi 2006. I had replaced all AnsiStrings with WideStrings, replaced all VCL controls with TNT controls, and changed all string functions from AnsiStrings to WideStrings. It looks like all th...
{ "language": "en", "url": "https://stackoverflow.com/questions/300446", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: CSS Borderless tabs using images On the user pages of Stack Overflow where the tabs are (Stats, Recent, Responses, etc.) you get the illusion that the tabs are extensions of the line they're sitting on. Stack Overflow creates this effect by defining pure CSS borders. I want to achieve the same effect but I have imag...
{ "language": "en", "url": "https://stackoverflow.com/questions/300448", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do you get the UserName of the owner of a process? I'm trying to get a list of processes currently owned by the current user (Environment.UserName). Unfortunately, the Process class doesn't have any way of getting the UserName of the user owning a process. How do you get the UserName of the user which is the own...
{ "language": "en", "url": "https://stackoverflow.com/questions/300449", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: What does the gnuwin32 program: [.exe do? Looking in the gnuwin32/bin directory, there is an odd-looking program file named [.exe I couldn't find it in the documentation, gnuwin32.sourceforge.net or in a google search, so I ran it and got: $ [ [: missing `]' $ so I gave it ] as a parameter and got $ [ ] $ It didn...
{ "language": "en", "url": "https://stackoverflow.com/questions/300472", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Prevent Save As Functionality I need to prevent a document from being saved / saved as (say from ms word). I've looked around and I havn't quite found a satifying answer. I've considered EFS... but I don't think it prevents the user from saving the document as... (though it prevents access to the original source ...
{ "language": "en", "url": "https://stackoverflow.com/questions/300487", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Does evidence based scheduling work right with heterogenous estimations? Observing one year of estimations during a project I found out some strange things that make me wonder if evidence based scheduling would work right here? * *individual programmers seem to have favorite numbers (e.g. 2,4,8,16,30 hours) *th...
{ "language": "en", "url": "https://stackoverflow.com/questions/300488", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Why is it bad to commit lines with trailing whitespace into source control? Why is it bad to check in lines with trailing whitespace to your source control? What kinds of problems could that cause? A: Because many people remove them you will have them show up as modified lines in diff tools if you don't use all t...
{ "language": "en", "url": "https://stackoverflow.com/questions/300489", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "22" }
Q: How to get distinct results in hibernate with joins and row-based limiting (paging)? I'm trying to implement paging using row-based limiting (for example: setFirstResult(5) and setMaxResults(10)) on a Hibernate Criteria query that has joins to other tables. Understandably, data is getting cut off randomly; and the r...
{ "language": "en", "url": "https://stackoverflow.com/questions/300491", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "76" }
Q: Downsides to merging DLLs and EXE into single EXE file I am developing a .NET application which uses a few projects that I've pieced together from other internal projects. I was thinking about merging the .exe and the DLLS into a single executable file with a tool called ILMerge. I may be sending the executable out...
{ "language": "en", "url": "https://stackoverflow.com/questions/300496", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How do I include HTML in a JS Rails response? I have a FooController that responds to HTML and JS (AJAX) queries: # app/controllers/foo_controller.rb: class FooController < ApplicationController layout 'foo' def bar respond_to do |format| format.html # foo/bar.html.erb format.js # foo/bar.js.er...
{ "language": "en", "url": "https://stackoverflow.com/questions/300498", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: What is the minimum knowledge of CLR a .NET programmer must have to be a good programmer? When we talk about the .NET world the CLR is what everything we do depends on. What is the minimum knowledge of CLR a .NET programmer must have to be a good programmer? Can you give me one/many you think is/are the most importa...
{ "language": "en", "url": "https://stackoverflow.com/questions/300499", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: How to launch a file protocol URL with an anchor from Java? From a Java program, I need to launch the default browser on a local HTML file, pointed to an anchor inside the file. In Java SE 6, the java.awt.Desktop.browse method will open the file, but will not honor the anchor, so something like the following opens ...
{ "language": "en", "url": "https://stackoverflow.com/questions/300509", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Client side modal dialog in asp.net from the server side code. (how do I do this) I need a technique for dealing with what seems pretty simple! I have a form, with some logic on the server side for validation. if the server side code indicates that there is an issue, I want to display a modal popup to the client. I ...
{ "language": "en", "url": "https://stackoverflow.com/questions/300515", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: j2me service discovery and discoverable same time I try to write a simple client/server application (all application is a bluetooth service and client). The client code find the bluetooth devices and register in to the local db. But when the inquiry running, it's not discoverable. (The server code run on another thr...
{ "language": "en", "url": "https://stackoverflow.com/questions/300516", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: ArrayList vs. Vectors in Java if thread safety isn't a concern Is there really that much of a difference between the performance of Vector and ArrayList? Is it good practice to use ArrayLists at all times when thread safety isn't an issue? A: If thread safety isn't an issue you should always use ArrayList. Vector ...
{ "language": "en", "url": "https://stackoverflow.com/questions/300519", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "30" }
Q: LaTeX package for syntax highlighting of code in various languages I am looking for a LaTeX package that does syntax highlighting on code. For example, right now I use the verbatim block to write code: \begin{verbatim} <html> <head> <title>Hello</title> </head> <body>Hello</body> ...
{ "language": "en", "url": "https://stackoverflow.com/questions/300521", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "185" }
Q: count vs length vs size in a collection From using a number of programming languages and libraries I have noticed various terms used for the total number of elements in a collection. The most common seem to be length, count, and size. eg. array.length vector.size() collection.count Is there any preferred term to be...
{ "language": "en", "url": "https://stackoverflow.com/questions/300522", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "202" }
Q: Why does this code not work in Scheme? (define a 42) (set! 'a 10) (define a 42) (define (symbol) 'a) (set! (symbol) 10) (define a (cons 1 2)) (set! (car a) 10) I tried running them in DrScheme and they don't work. Why? A: Think of set! is a special form like define which does not evaluate its first operand. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/300551", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Cross table join using MYSQL rather than MSSQL Is it possible to do a cross table join in mysql spaning different tables? in different databases. This seem to be easily possible in MSSQL, and greatly speeds up data transfer? How about mysql, do you need to use a powerful IDE to achieve this? or do you have to write ...
{ "language": "en", "url": "https://stackoverflow.com/questions/300553", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Can I identify matched terms when searching with sphinx? I am using sphinx to do full text search on a mysql database through thinking sphinx. I would like to highlight the matched terms in the results I show to the user. Shpinx is smart enough that searching for 'botulism' will match "i like to inject botulinum int...
{ "language": "en", "url": "https://stackoverflow.com/questions/300554", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Move / Copy File Operations in Java Is there a standard Java library that handles common file operations such as moving/copying files/folders? A: Google's Guava library also has these: http://guava-libraries.googlecode.com/svn/trunk/javadoc/com/google/common/io/Files.html A: Here's how to do this with java.nio ope...
{ "language": "en", "url": "https://stackoverflow.com/questions/300559", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "71" }
Q: Has anyone heard of how .NET 4.0 may change/affect Asp.net MVC? We should have a full release of asp.net MVC well before .NET 4.0 and VS 10 come out, right? I'm really hoping MS can keep MVC as dynamic as other more open frameworks are. A: Yes, MVC 1.0 RTM will ship as a fully supported Out-of-Band Framework befo...
{ "language": "en", "url": "https://stackoverflow.com/questions/300572", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: SharePoint - Adding users from Active Directory in a custom administration form I have a project where I need to add users to a SharePoint portal, but when I add them, I also need to set addition parameters inside a separate database. I want to add a custom administration screen where the administration can set thes...
{ "language": "en", "url": "https://stackoverflow.com/questions/300576", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: C# WPF resolution independancy? I am developing a map control in WPF with C#. I am using a canvas control e.g. 400 x 200 which is assigned a map area of e.g. 2,000m x 1,000m. The scale of the map would be: canvas_size_in_meters / real_size_in_meters. I want to find the canvas_size_in_meters. The canvas.ActualWidth ...
{ "language": "en", "url": "https://stackoverflow.com/questions/300577", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Get the startup path in a vb.net console exe How do get the startup path ( system.windows.forms.application.StartupPath ) of my exe without adding a reference to system.windows.forms? A: EDIT: @KiwiBastard's answer is the correct method: System.AppDomain.CurrentDomain.BaseDirectory Add a reference to System.Refle...
{ "language": "en", "url": "https://stackoverflow.com/questions/300578", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Better way to build objects in C# I have an application with my object types that inherit from a base class that contains the majority of properties for the application objects. All the object types are stored in one table in the database. The "ClassType" column determines what object type I cast the SqlDataReader...
{ "language": "en", "url": "https://stackoverflow.com/questions/300581", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: SSCrypto/OpenSSL to C# Crypto Has anyone been able to use the SSCrypto Framework for Cocoa to encrypt text and then decrypt it in C#/.NET ? Or can someone offer some guidance? I'm pretty sure my issue has to do with getting the crypto settings correct but I am far from fluent in Cocoa so I can't really tell what set...
{ "language": "en", "url": "https://stackoverflow.com/questions/300582", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Enum in C++ like Enum in Ada? At one point I had looked at implementing a class/template in C++ that would support an Enum that would behave like it does in Ada. It has been some time since I thought about this problem and I was wondering if anyone has ever solved this problem? EDIT: My apologies, I should clarify w...
{ "language": "en", "url": "https://stackoverflow.com/questions/300592", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Tips for implementing a 'Please wait' control for a Flex application What would be a clever way to make a 'please wait' control for a Flex application for long running operations like calling a webservice. I am not asking about the graphical portion of it - just the 'controller' part. How should I trigger it and hid...
{ "language": "en", "url": "https://stackoverflow.com/questions/300595", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Scrum, but with no testing or documentation What do you do when you join a team that says they use Scrum, but only use it as a time-management tool and not the whole process? How can I reinstate back testing and documentation? I was thinking to start off with adding user stories specifically for testing and document...
{ "language": "en", "url": "https://stackoverflow.com/questions/300605", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: In Powershell how can I convert a string with a trailing 'sign' to a number? I need to convert strings with optional trailing signs into actual numbers using Powershell. Possible strings are: * *1000- *323+ *456 I'm trying to use System.Int.TryParse with a NumberStyles of AllowTrailingSign, but I can't work o...
{ "language": "en", "url": "https://stackoverflow.com/questions/300606", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How do I set Network Management settings or make the dialog appear in C# on Windows Mobile? In Windows Mobile, when you open Internet Explorer and type in a URL that your device can't connect to, you are notified of this and prompted to (manually) navigate to the screen where you can actually do something about this...
{ "language": "en", "url": "https://stackoverflow.com/questions/300607", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Sending email in Java I have read that to send email in Java I need to obtain my ISP's SMTP address, but if I am intending to host my web app online, will this be my hosts ISP SMTP address? EDIT: So I need to find out my clients ISP's SMTP address and send via this? A: JavaMail is the built-in API for e-mail. Ask y...
{ "language": "en", "url": "https://stackoverflow.com/questions/300611", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }