text
stringlengths
8
267k
meta
dict
Q: Elegantly selecting attributes from has_many :through join models in Rails I'm wondering what the easiest/most elegant way of selecting attributes from join models in has_many :through associations is. Lets say we have Items, Catalogs, and CatalogItems with the following Item class: class Item < ActiveRecord::Base ...
{ "language": "en", "url": "https://stackoverflow.com/questions/428066", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: What is the worst case time complexity for this algorithm? procedure matrixvector(n:integer); var i,j:integer; begin for i<-1 to n do begin B[i] = 0; C[i] = 0; for j<-1 to i do B[i]<- B[i]+ A[i,j]; for j<-n down to i+1 do C[i]<-C[i] + A[i,j] end end; A: O(n^2), if I read it right. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/428068", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Determine if a specific Windows application is running using SQL Server 2005 I need to determine if a specific application is running from a SQL Server 2005 job. The issue is that one of our applications we use to send data will hang, causing problems with any subsequent jobs that invokes it. If I can also obtain ...
{ "language": "en", "url": "https://stackoverflow.com/questions/428072", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What is the best/simplest way to read in an XML file in Java application? Currently our Java application uses the values held within a tab delimited *.cfg file. We need to change this application so that it now uses an XML file. What is the best/simplest library to use in order to read in values from this file? A: ...
{ "language": "en", "url": "https://stackoverflow.com/questions/428073", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "56" }
Q: How to Use [XmlElement(DataType="date")] with WebMethod Attribute of a WebService My Web Service Signature is [WebMethod] public DataSet GetPatientLastWeighing(int pFacilityID,string pSessionID) { } A: You don't have much control over DataSet/DataTable serialization. IMO, the best answer here is: don't use DataSet...
{ "language": "en", "url": "https://stackoverflow.com/questions/428075", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I set a path in Visual Studio? How do I set a path for DLL files to be searched in Visual Studio for a particular project alone? Now I am setting it in the environment path variable, but I would like better control over this. A: You have a couple of options: * *You can add the path to the DLLs to the Exec...
{ "language": "en", "url": "https://stackoverflow.com/questions/428085", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "92" }
Q: OnItemChanged not called when trying to implement VirtualizingPanel in WPF I'm trying to implement my own VirtualWrapPanel in WPF. I implement it this way : public class VirtualWrapPanel : VirtualizingPanel, IScrollInfo { .... protected override void OnItemsChanged(object sender, ItemsChangedEvent...
{ "language": "en", "url": "https://stackoverflow.com/questions/428088", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Extract substring in Bash Given a filename in the form someletters_12345_moreleters.ext, I want to extract the 5 digits and put them into a variable. So to emphasize the point, I have a filename with x number of characters then a five digit sequence surrounded by a single underscore on either side then another set o...
{ "language": "en", "url": "https://stackoverflow.com/questions/428109", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1028" }
Q: How can I replicate the trashing animation of Mail.app In my iPhone app, I have put a UIBarBUtton of type UIBarButtonSystemItemTrash in my UIToolBar. When pressed, I'd like to replicate the animation of Mail.app: the bin opens, the UIView folds and flies into it. Is there a way to access this animation ithrough the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/428110", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "38" }
Q: Calling a JavaScript function inside jQuery I am using JavaScript and jQuery. My main file has My.js and Ajax. My.js function build_one(){ alert("inside build_one"); } My main file <script type="text/javascript"> .. // Here I want to make call function defined in My.js build_one() .. // Here ...
{ "language": "en", "url": "https://stackoverflow.com/questions/428112", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Document icon changes after first launch on Windows I have an application that gets installed with a Wise installer (EDIT: Wise creates a Setup.exe file, not an MSI). Upon installation, an icon is set for a certain file type: HKEY_CLASSES_ROOT\.auz\DefaultIcon = C:\Path\To\App\some_icon.ico,0 Right after the instal...
{ "language": "en", "url": "https://stackoverflow.com/questions/428121", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How can i split a binary in erlang What I want is, I think, relatively simple: > Bin = <<"Hello.world.howdy?">>. > split(Bin, "."). [<<"Hello">>, <<"world">>, <<"howdy?">>] Any pointers? A: There is about 15% faster version of binary split working in R12B: split2(Bin, Chars) -> split2(Chars, Bin, 0, []). spli...
{ "language": "en", "url": "https://stackoverflow.com/questions/428124", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: MSBuild return value from database does anyone know how to return a value from a (sql) database into an MSBuild script? I want to get the value into a property so I can pass it to subsequent build tasks. I am fiddling round with something like the following at the moment, but this is returning -1 to indicate the que...
{ "language": "en", "url": "https://stackoverflow.com/questions/428126", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What's the best way to compile Ruby from source on 64-bit RedHat Linux On RedHat Enterprise Linux 5 the latest Ruby version available via RPM is 1.8.5. My Rails app requires 1.8.6 or above so I need to compile Ruby from source. I have tried the following to build it and it seems to build ok, but then I'm seeing gcc...
{ "language": "en", "url": "https://stackoverflow.com/questions/428144", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: SQL Identity Column out of step We have a set of databases that have a table defined with an Identity column as the primary key. As a sub-set of these are replicated to other servers, a seed system was created so that they could never clash. That system was by using a starting seed with an increment of 50. In this w...
{ "language": "en", "url": "https://stackoverflow.com/questions/428147", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Ordered lists in django i have very simple problem. I need to create model, that represent element of ordered list. This model can be implemented like this: class Item(models.Model): data = models.TextField() order = models.IntegerField() or like this: class Item(models.Model): data = models.TextField()...
{ "language": "en", "url": "https://stackoverflow.com/questions/428149", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Fluent NHibernate API and .NET 2.0 Can I use Fluent NHibernate API for .NET 2.0 applications. A: No, FluentNhibernate requires .NET 3.5
{ "language": "en", "url": "https://stackoverflow.com/questions/428151", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: How do I call a C++ static library from Perl? I'm writing a C++ static library that needs to be shared among several applications, one of them written in Perl. Unfortunately, I only barely know the core Perl language (I read the Llama book), and I'm not all that familiar with its libraries. How do you make calls t...
{ "language": "en", "url": "https://stackoverflow.com/questions/428153", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: How to resolve naming conflicts when multiply instantiating a program in VxWorks I need to run multiple instances of a C program in VxWorks (VxWorks has a global namespace). The problem is that the C program defines global variables (which are intended for use by a specific instance of that program) which conflict i...
{ "language": "en", "url": "https://stackoverflow.com/questions/428158", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do Views work in a DBM? Say that I have two tables like those: Employers (id, name, .... , deptId). Depts(id, deptName, ...). But Those data is not going to be modified so often and I want that a query like this SELECT name, deptName FROM Employers, Depts WHERE deptId = Depts.id AND Employers.id="ID" be ...
{ "language": "en", "url": "https://stackoverflow.com/questions/428175", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Is this control of flow structure good practice? I want to re-write a method that has way too many nested if statements. I came up with this approach and wanted your opinions: public void MyMethod() { bool hasFailed = false; try { GetNewOrders(out hasFailed); if(!hasFailed) CheckInve...
{ "language": "en", "url": "https://stackoverflow.com/questions/428183", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Generate Data Change Scripts from VSTS Database Edition I'm using the GDR release of VSTS Database edition source control the DB and generate deployment scripts. It works pretty well but the problem is that it only seems to handle scripting and deploying the schema. It stops short of handling scripting and deploym...
{ "language": "en", "url": "https://stackoverflow.com/questions/428192", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Why is a cached Regexp outperforming a compiled one? This is just a question to satisfy my curiosity. But to me it is interesting. I wrote this little simple benchmark. It calls 3 variants of Regexp execution in a random order a few thousand times: Basically, I use the same pattern but in different ways. * *Your ...
{ "language": "en", "url": "https://stackoverflow.com/questions/428196", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Multiple Icons into c# 2.0 WinApp I have small problem with my .net 2.0 winforms application. I want to embed a few different icons to app. There are also other requirements: * *must be automatic rebuildable by ms-build; using external gui apps for preparation isn't allowed *application must contain versioninfo....
{ "language": "en", "url": "https://stackoverflow.com/questions/428214", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: reading 16-bit greyscale TIFF I'm trying to read a 16-bit greyscale TIFF file (BitsPerSample=16) using a small C program to convert into an array of floating point numbers for further analysis. The pixel data are, according to the header information, in a single strip of 2048x2048 pixels. Encoding is little-endian...
{ "language": "en", "url": "https://stackoverflow.com/questions/428216", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Jogl Shader programming I just started Shader programming(GLSL) and created a few with RenderMonkey. Now I want to use this Shaders in my java code. Are there any simple examples of how I do that? A: I have found a very simple example int v = gl.glCreateShader(GL.GL_VERTEX_SHADER); int f = gl.glCreateShader(GL.GL_F...
{ "language": "en", "url": "https://stackoverflow.com/questions/428225", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: How do I extract the data in a FoxPro memo field using .NET? I'm writing a C# program to convert a FoxPro database to XML, and everything works except the memo field is blank. Is there something I'm missing to convert that bit? I'm using C# .Net 3.5 SP1, Visual FoxPro 9 SP 1 OLE DB Driver. Connection string is okay,...
{ "language": "en", "url": "https://stackoverflow.com/questions/428237", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Visual Studio 2005 - Projects disappearing Hmmm, a new odd issue that has just started. Every now and then VS drops a whole bunch of projects from the solution. It will say at the top of Solution explorer "42 projects" when it is displaying only about 20 or so. Closing VS and re-opening it fixes this, although it is...
{ "language": "en", "url": "https://stackoverflow.com/questions/428238", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Best to have hundreds of columns or split into multiple tables? I'm designing a database of statistics about the operation of mechanical equipment. Each batch of data will contain hundreds of statistics, so I'm trying to decide whether to create a single table with hundreds of columns or to split it up into multipl...
{ "language": "en", "url": "https://stackoverflow.com/questions/428243", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Java for the web I posted this question: https://stackoverflow.com/questions/418597/java-and-net-for-php-programmer and the answers I was given didn't really help me out. I read a few of the tutorials at sun. The basic syntax I understand. The thing I don't understand and really need to (because I think my company ...
{ "language": "en", "url": "https://stackoverflow.com/questions/428254", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can I best lay out these components in Swing? What would be the best approach / LayoutManager for a JPanel that needed to display the components shown in the image? (Note that the fields should resize horizontally when the size of the window is changed, but not the labels). I'm currently trying (and struggling) ...
{ "language": "en", "url": "https://stackoverflow.com/questions/428256", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Using event of control under datalist I have a datalist control which some controls(ex: button) are in it. I want to write some code into click event of button which is in the datalist control. But in the code behind page I can't see the name of controls into datalist. How can I solve this problem? A: Attach your e...
{ "language": "en", "url": "https://stackoverflow.com/questions/428257", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Help refactor this messed-up-nested-if of a method Ok I want some opinions how I can fix this mess of a method! It has WAY to many nested 'if' statements. But realize I have to know exactly where the method fails, currently in each of the respective 'else' clause I am logging the error (the failed 'if' condition'). ...
{ "language": "en", "url": "https://stackoverflow.com/questions/428262", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Why do managed attributes just work for class attributes and not for instance attributes in python? To illustrate the question check the following code: class MyDescriptor(object): def __get__(self, obj, type=None): print "get", self, obj, type return self._v def __set__(self, obj, value): self._v = ...
{ "language": "en", "url": "https://stackoverflow.com/questions/428264", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What would be a good algorithm for a circular reference check in this case? Given you have the following class (bad C#, but you get the drift): public abstract class AmICircular { // assume Children is never null private List<AmICircular> Children {get;set;} // assume target is never null public void Add(Am...
{ "language": "en", "url": "https://stackoverflow.com/questions/428267", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: Displaying PDFs within a desktop app I have a client that has a requirement to display PDFs directly within a desktop application. Apparently it is not acceptable to use Adobe Reader or some other 3rd party viewer. To complicate this, the app needs to run on both Windows and Mac OS X. Does anyone know of ways to do...
{ "language": "en", "url": "https://stackoverflow.com/questions/428274", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to execute a command in a remote computer? I have a shared folder in a server and I need to remotely execute a command on some files. How do I do that? What services need to be running on the server to make that work? Some details: Only C# can be used. Nothing can be installed in the server. A: You could use S...
{ "language": "en", "url": "https://stackoverflow.com/questions/428276", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "25" }
Q: css : round cornered div on hover I am trying to accomplish something that seemed quite simple... I have 3 divs that contain a radiobutton and some content: Content of DIV1, [] this can be as long or as tall as wanted [] Content of DIV2 [] Content of DIV3 It's easy to create rounded corners for e...
{ "language": "en", "url": "https://stackoverflow.com/questions/428280", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Referencing an implementing base type in an interface I'm faced with a design decision that doesn't smell to me, but gives me pause. Take a look at the following code sample: public interface IGenerator { ///<summary> /// Combines two generators; performs magic as well /// </summary> BaseGenerator Combine(B...
{ "language": "en", "url": "https://stackoverflow.com/questions/428282", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: SQL: Batch update table based on MIN of another? Probably easy, but stuck I think this will be easy but I can't see how to do it! I want to update the Author Table, so that the Earliest field contains the year of the earliest book. I need to use MIN somehow but how to update them all with one query? BookTable (BookI...
{ "language": "en", "url": "https://stackoverflow.com/questions/428283", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Correlating a PDF into an orchestration BizTalk I need to correlate a PDF and a XML file in BizTalk using the PDF filename and value in the XML. How can I read a PDF-file into an orchestration? I somehow have to handle it as XML ... The reason for the correlation is that I have to have both the PDF and the XML from ...
{ "language": "en", "url": "https://stackoverflow.com/questions/428285", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Avoid runtime 3075 when running this query Can someone tell what is wrong with this query? sqltext = "SELECT utyp, count(*) AS anzahl INTO UTYP_Anzahl FROM 01_umwelt WHERE [01_umwelt].status = Me.Controls(""STATUS"").Value GROUP BY utyp;" I am getting run time error 3075. A: The ...
{ "language": "en", "url": "https://stackoverflow.com/questions/428292", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to programmatically change urls of images in word documents I have a set of word documents that contains a lot of non-embedded images in them. The url that the images point to no longer exist. I would like to programmatically change the domain name of the url to something else. How can I go about doing this in J...
{ "language": "en", "url": "https://stackoverflow.com/questions/428308", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: A machine has 2 NICs. Which one will be utilized when connecting to a socket? Suppose I create a very simple socket connection, how can one programatically: * *Find out what interface (ip address / NIC) is being used. *Force the other interface A: a. After a connection is established, most socket APIs have a ...
{ "language": "en", "url": "https://stackoverflow.com/questions/428313", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Open Source Project Suggestion, where to go from here I have a project in mind, here's the pitch. When I come to a new workspace, school, a friends computer and want to check all my favorite blogs, log into facebook, SO and all other amazing websites. I find that it's always a site that i forget to visit. The soluti...
{ "language": "en", "url": "https://stackoverflow.com/questions/428317", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: generate xml from xsd Is there an IDE out there that can generate XML from XSD? Not Oxygen or XmlSpy, they are too expensive for me... command line based is ofcourse the preferred method! A: You can do it in the Eclipse Web Tools (included in the Eclipse IDE for Java EE Developers). A: How to generate sample XML d...
{ "language": "en", "url": "https://stackoverflow.com/questions/428359", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "22" }
Q: Pure Javascript YAML library that supports both dump and load? Does such a thing exist for YAML (aka YAML)? If this existed at one time, it must have been obliterated because the latest search turned up nada. It looks like there are plenty of implementations that dump from Javascript to YAML output only, but having ...
{ "language": "en", "url": "https://stackoverflow.com/questions/428364", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: IE6 CSS Trouble I upgraded a website I've been working on (http://barsannapolis.com) to a CSS Layout, and things appeared to go well for the most part. The site renders correctly in Firefox, Chrome, IE 7, and Safari, but the design appears to be complete borked in IE 6. Does anybody have any guidance regarding how...
{ "language": "en", "url": "https://stackoverflow.com/questions/428368", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Microsoft Office Document's Viewer Component We need a user control that can show Microsoft Office files (Word, Excel..). There is no need for editing them. As I can see, there are available standalone viewer applications that can be downloaded from Microsoft site, but I am wondering if it could be embedded within a...
{ "language": "en", "url": "https://stackoverflow.com/questions/428374", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Telerik UI controls vs client-side UI with jQuery I am trying decide on how I want to handle the UI for an external-facing web app. Because it is external, latency caused by page bloat could be an issue. I have used jQuery some in the past, and I am evaluating the Telerik controls now. I have seen a lot of good reco...
{ "language": "en", "url": "https://stackoverflow.com/questions/428376", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: UML class diagram web service How do I draw a class in UML that uses a web service? A: You could also use WSDL (Web Services Description Language) UML profile with the appropriate WSDL stereotypes. That would give for example: -------------------- | <<wsdl:service>> | -------------------- | MyWebService | -----...
{ "language": "en", "url": "https://stackoverflow.com/questions/428377", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Using Triggers To Enforce Constraints I'm trying to enforce integrity on a table in a way which I do not think a Constraint can... CREATE TABLE myData ( id INTEGER IDENTITY(1,1) NOT NULL, fk_item_id INTEGER NOT NULL, valid_from DATETIME NOT NULL, invlaid_fro...
{ "language": "en", "url": "https://stackoverflow.com/questions/428384", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What are your thoughts on this article about ViewState v.s Cache? I was looking at this article from 2005 and wanted to get some thoughts on it, advantages and disadvantages that the article does not point out about ViewState and Cache? http://www.codersource.net/asp_net_viewstate_versus_data_caching.aspx A: That a...
{ "language": "en", "url": "https://stackoverflow.com/questions/428385", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How would I determine on the server side if a given HttpRequest was sent via ajax? I was wondering what is the best way (if at all possible) to determine on the server side if a given HttpRequest was sent via ajax? A: An XMLHttpRequest appears just like any other browser request. As far as I know, there's no way to...
{ "language": "en", "url": "https://stackoverflow.com/questions/428406", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Select either a file or folder from the same dialog in .NET Is there an "easy" way to select either a file OR a folder from the same dialog? In many apps I create I allow for both files or folders as input. Until now i always end up creating a switch to toggle between file or folder selection dialogs or stick with d...
{ "language": "en", "url": "https://stackoverflow.com/questions/428410", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "33" }
Q: VBA code for SUMIFS? I'm trying to write a custom function that will let me retrieve a cell from the first row in a range that meets x number of criteria. I imagine this would be very similar to the way SUMIFS works, just simpler in that it doesn't continue processing after the first match. Does anyone know code to...
{ "language": "en", "url": "https://stackoverflow.com/questions/428414", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Setting the umask of the Apache user I am setting up a LAMP server and would like to set Apache's umask setting to 002 so that all Apache-created files have the group write permission bit set (so members of the same group can overwrite the files). Does anyone know how to do this? I know that on Ubuntu, you can use...
{ "language": "en", "url": "https://stackoverflow.com/questions/428416", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "60" }
Q: Are there any HTML coding conventions/style/standard I mean to name ids, names, values, etc? A: w3c recommendations? A: With anyone interested in standards I always recommend these two books: Designing with Web Standards (2nd Edition) (Paperback) Eric Meyer on CSS: Mastering the Language of Web Design (VOICES) (Pa...
{ "language": "en", "url": "https://stackoverflow.com/questions/428431", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Slow "Find All References" in Visual Studio I have a VS solution that contains 6 library projects and 1 web folder project. When I try to use the "Find All References" feature on an object or method, it takes more than 6 minutes to finish ! It seems to be refactoring every aspx & ascx file of the web project. Any id...
{ "language": "en", "url": "https://stackoverflow.com/questions/428436", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Is there any extendable editor out there with vi-like modes? I'm looking for a perfect text editor :) The "must have" list: * *vim-like modal editing, keybindings similar to vim *emacs like extendibility - same "real" language for plugins and the editor itself, so that the extension can affect almost anything in...
{ "language": "en", "url": "https://stackoverflow.com/questions/428438", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Business reporting with per-page print control Does anyone know of a reporting tool that allows for controlling the print job on a page by page basis? Specifically, I need to be able to insert escape sequences to the printer. The closest I have found is ActiveReports. It provides an interface like this: SystemPrin...
{ "language": "en", "url": "https://stackoverflow.com/questions/428448", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Performance Point, Dashboard Designer * *I am brand new to this product. Microsoft has some good free videos...but I am looking for a site where I can ask question about 'how to', or post problems..any recommendations? (http://www.microsoft.com/business/performancepoint/resources/training.aspx) *Just in case t...
{ "language": "en", "url": "https://stackoverflow.com/questions/428450", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Do you accept interfaces as constructor parameters? Does Krzysztof's recommendation apply to constructors? If so, how do you implement it properly? We recommend using Collection, ReadOnlyCollection, or KeyedCollection for outputs and properties and interfaces IEnumerable, ICollection, IList for inputs. For exampl...
{ "language": "en", "url": "https://stackoverflow.com/questions/428452", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Counting rows for all tables at once I'm using SQL Server 2005 and would like to know how I can get a list of all tables with the number of records in each. I know I can get a list of tables using the sys.tables view, but I'm unable to find the count. Thank you A: I might add that sysindexes.rows is an approximatio...
{ "language": "en", "url": "https://stackoverflow.com/questions/428458", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: Cross Domain security error in Silverlight? I'm trying to read a feed from Yahoo Pipes into a Silverlight Application. I keep getting a SecurityException, which sounds like a cross domain policy problem, but Yahoo pipes, if you go through the pipes.yahooapis domain, has a cross domain policy, so should be ok. I trie...
{ "language": "en", "url": "https://stackoverflow.com/questions/428461", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How can I hide some content from some users with PHP? I have created an intranet for our company using PHP. The same menu appears on every page, and includes links to sensitive pages and documents (like Word files). Currently only in-office employees have access to the site, but we'd like to open it up to some out-o...
{ "language": "en", "url": "https://stackoverflow.com/questions/428470", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Matrix artihmetic in PHP? Does anyone know of a PHP library that handles matrix multiplication, inversion, etc.? A: You could try the Math_Matrix library. I haven't used it, but it seems to be fairly comprehensive, going beyond simple matrix arithmetic to also include things like calculating the determinant or solv...
{ "language": "en", "url": "https://stackoverflow.com/questions/428473", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Should I html encode values in an input field? Which should I use? <input type="hidden" name="first_name" value="<%= person.first_name %>" /> or <input type="hidden" name="first_name" value="<%= Html.Encode( person.first_name ) %>" /> A: You should Html.Encode else a " in the field could lead to injection pr...
{ "language": "en", "url": "https://stackoverflow.com/questions/428478", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Is there an API that I can use to duplicate the "Places" functionality of iPhoto '09? I saw the Apple keynote address and was very impressed by the new Places functionality that's been added to iPhoto '09. In short, it takes the geocode information from a photo and translates it into a real place. So instead of -41....
{ "language": "en", "url": "https://stackoverflow.com/questions/428481", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Configuring Application Verifier to generate a full-memory .DMP file? Under AppVerifier, one of our apps blows up. I get a DMP file, but it's a minidump. Specifically, while I've got the call stack, I'd also like the user-space memory for the faulting process (it uses a lot of globals). How do I configure App Verifi...
{ "language": "en", "url": "https://stackoverflow.com/questions/428493", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Is it possible to use ShowDialog without blocking all forms? I hope I can explain this clearly enough. I have my main form (A) and it opens 1 child form (B) using form.Show() and a second child form (C) using form.Show(). Now I want child form B to open a form (D) using form.ShowDialog(). When I do this, it blocks f...
{ "language": "en", "url": "https://stackoverflow.com/questions/428494", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "61" }
Q: How can you set default values for merge fields in a Microsoft Word document I am using Aspose (.NET/C#) to generate a word document which contains multiple mail-merge fields. However as I have one methode handling a couple of different templates, not every merge field may get handled/merged. Is there a way to set a...
{ "language": "en", "url": "https://stackoverflow.com/questions/428496", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: Why am I losing the Session here? I have a page with a button that when I click, it retrieves data from a database and stores it into a datatable and binds it to a GridView. This datatable is stored in a Session variable. I also have a button that exports specified columns from the datatable to an excel file, but ...
{ "language": "en", "url": "https://stackoverflow.com/questions/428513", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Java web service frameworks This is my first time with Web services. I have to develop web services in java which should be having good WS-* standards, should loosely-coupled, scalable, highly secure, fast response time. I know I've to consider trade-offs. I have checked on some frameworks like Axis2, CXF, Spring WS...
{ "language": "en", "url": "https://stackoverflow.com/questions/428514", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: ASP.NET output expense report in Excel On this project I am working on right now, one of the newest feature requests is to output expense information which is stored into expense report that matches an Excel worksheet they already use for all of their expense reporting. I was curious if there was a way that I could...
{ "language": "en", "url": "https://stackoverflow.com/questions/428529", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How? Deploying WCF App on server without Framework 3.0 installed If I just want to run the new style web services on, say a Windows 2000, IIS 5 machine with .NET 2.0 installed, but .NET 3.0 not installed, can I do it by just adding the System.ServiceModel.dll to my bin? A: I doubt this would work. System.ServiceMod...
{ "language": "en", "url": "https://stackoverflow.com/questions/428541", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Is there something similar to LINQ in Objective-C? I wonder if it is possible (and how) to provide a class in Objective-C with something like: Person.Select(@"Name").OrderAsc(@"Name").Where(@"Id").EqualTo(1).And(@"Id").NotEqualTo(2).Load<Array> That could be very handy for a project I'm doing. I like this way of co...
{ "language": "en", "url": "https://stackoverflow.com/questions/428542", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "21" }
Q: Is it impractical to put an HTML form into an email? I've had several clients ask this, and I've never been able to get or give a satisfactory answer. Can you (practically) put a working form into an HTML email? My understanding is that you can, but that there's no guarantee of email clients properly handling it, so...
{ "language": "en", "url": "https://stackoverflow.com/questions/428543", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Unable to get hudson to parse JUnit test output XML EDIT: This issue has been fixed by google in gtest 1.4.0; see the original bug report for more information. I've recently switched to gtest for my C++ testing framework, and one great feature of it which I am presently unable to use is the ability to generate JUnit...
{ "language": "en", "url": "https://stackoverflow.com/questions/428553", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Converting a JPG to a Class at runtime Some methods in the Flex API such as CursorManager.setCursor(cursorClass:Class, priority:int = 2, xOffset:Number = 0, yOffset:Number = 0) take a parameter of type Class for a graphic. This example lets you specify a JPG/BMP/SWF as the cursor, but the only way I know to get a Cl...
{ "language": "en", "url": "https://stackoverflow.com/questions/428559", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What should programmers know when moving from XP/Vista to Windows 7? I have not used Windows Vista. I knew that many APIs have been changed/deprecated in Vista, so programs need to be fixed or configured to execute in XP Compatible mode. So, what should windows programmer know when they move from XP/Vista to Windows...
{ "language": "en", "url": "https://stackoverflow.com/questions/428564", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Do smarter compilers, languages, and frameworks make dumber programmers? The more and more advanced compilers, languages, and frameworks we have that either automate tasks, or hide certain intricacies from us, do they ultimately make us dumber programmers? Jim C gives the following analogy of a calculator: Any one ...
{ "language": "en", "url": "https://stackoverflow.com/questions/428571", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Managing complex Web.Config files between deployment environments Does anyone know of any good tools/utilities for managing Web.Config files between different build/deployment environments? For example, I have a WCF project that in development I don't want to enable SSL, but I do want it enabled in production. I wa...
{ "language": "en", "url": "https://stackoverflow.com/questions/428573", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "53" }
Q: What are some good Java web development tools (across the board) For web development what are some standard/good java tools. That apply to all aspects of development. For example, The IDE (Eclipse, RAD, Intellij) is important, but what else is there. Ant is a good one. Cygwin, Linux OS possibly. A: Another good ID...
{ "language": "en", "url": "https://stackoverflow.com/questions/428594", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: OpenSSO or ESOE for .NET? Does something like OpenSSO (https://opensso.dev.java.net/) or ESOE (http://esoeproject.org/) exist for the .NET platform? A: I found a Danish open source .NET library (OIOSAML) implementing the SAML 2.0 standard. It was developed as a project for the danish government as their common SSO ...
{ "language": "en", "url": "https://stackoverflow.com/questions/428599", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How can I address (hopefully in XAML) a linked resource properly in WPF? I'm trying to do something rather simple: add a simple icon to the main window of the application. This can be done rather easily. The icon itself is placed in the Resources directory and its build action is set to Resource. The XAML code fo...
{ "language": "en", "url": "https://stackoverflow.com/questions/428609", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What are 'closures' in .NET? What is a closure? Do we have them in .NET? If they do exist in .NET, could you please provide a code snippet (preferably in C#) explaining it? A: Here is a contrived example for C# which I created from similar code in JavaScript: public delegate T Iterator<T>() where T : class; public...
{ "language": "en", "url": "https://stackoverflow.com/questions/428617", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "219" }
Q: Are there any Videos/Screen casts on how to use exceptions in Delphi Hi are there any nice videos on how to use exceptions in Delphi. A: Jim McKeeth did one for CodeRage III called: "Delayed Exception Handling This is a more robust way of handling exceptions. Learn to prevent memory leaks and simplify code when dea...
{ "language": "en", "url": "https://stackoverflow.com/questions/428623", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Best practicies for JUnit and RMI Apps, RMI Registry I'm looking to write a set of system integration tests for an RMI client application. I'd like to start the RMI server in JUnit 3.8.2 and then run those tests. Has anyone done this? I'm using something like this in a pojo with main: import java.rmi.registry...
{ "language": "en", "url": "https://stackoverflow.com/questions/428627", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Assigning cout to a variable name In ANSI C++, how can I assign the cout stream to a variable name? What I want to do is, if the user has specified an output file name, I send output there, otherwise, send it to the screen. So something like: ofstream outFile; if (outFileRequested) outFile.open("foo.txt", ios::...
{ "language": "en", "url": "https://stackoverflow.com/questions/428630", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: Advantages of Cache vs Session What is the difference between storing a datatable in Session vs Cache? What are the advantages and disadvantages? So, if it is a simple search page which returns result in a datatable and binds it to a gridview. If user 'a' searches and user 'b' searches, is it better to store it in S...
{ "language": "en", "url": "https://stackoverflow.com/questions/428634", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "73" }
Q: Double click event for List box Can a list box have double click event on its items? A: Yes: MSDN DHTML Reference. Since your tags say javascript and HTML I am assuming you are talking about a Select element. <select ondblclick = "handler" ... > A: You can try create links with select options. Links support ondb...
{ "language": "en", "url": "https://stackoverflow.com/questions/428642", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Hex-Value in Visual Basic Can someone just help me refresh my mind? How do you specify hex values in a Visual Basic 6 / VBScript Source? It's not 0xABCD as it is in C++, that's what I can remember... It was something similar... But what? A: VBScript \ VBA \ VB6 (and lower): Dim MyValue As Integer MyValue = &h1234 ...
{ "language": "en", "url": "https://stackoverflow.com/questions/428643", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "37" }
Q: XML File as database? Is it possible to use single XML file for Ruby on Rails as an ActiveRecord database? A: No, AFAIK, I would suggest you to use sqlite3 as database, since it's lightweight and small. If you want to generate XML from that, you can just use to_xml method :) A: Read this stackoverflow posting for...
{ "language": "en", "url": "https://stackoverflow.com/questions/428645", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Windows .Net controls - Creating property templates Assume that all text box controls in my .Net Windows application created by dragging a TextBox control onto the Form editor should have the following default properties (some text box instances can override these properties) : Text Align: Centre Resize : As per c...
{ "language": "en", "url": "https://stackoverflow.com/questions/428670", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Should Visual Studio 2008 throw an accessibility error (508) with a 100% table driven layout? I'm trying to make sure my work is 508 compliant more and more these days, but noticed that VS2008 doesn't throw an error if you have a 100% table driven layout instead of css. I always thought that to be 508 compliant yo...
{ "language": "en", "url": "https://stackoverflow.com/questions/428682", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: cf.net queuing for webservice This question is related to this other question I recently asked... cf.net exception and other logging I am generating log messages to be sent to a server using a webservice over a GPRS connection and I want to simply queue these messages in the case the connection to the server is not ...
{ "language": "en", "url": "https://stackoverflow.com/questions/428697", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Possible to expose CONSTANTS defined in webservice to consuming client (.Net both sides) I have several constant defined for a webservice, and I would like to make these available to consuming client. Both the server and client are .Net. I think it is possible to achieve this by using enum's, but many of my constan...
{ "language": "en", "url": "https://stackoverflow.com/questions/428703", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Measure load time for python cgi script? I use python cgi for our intranet application. When I measure time, the script takes 4s to finish. But after that, it still takes another 11s to show the screen in the browser. The screen is build with tables (size: 10 KB, 91 KB uncompressed) and has a large css file (5 KB, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/428704", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do I save my object back into my database in LINQ to SQL? With LINQ to SQL in a ASP.NET MVC website I can display objects (records) from my database table. Now I would like to create a new object and save it back to the database. In my Controller, I do this: var dataContext = new MessageDataContext(); Me...
{ "language": "en", "url": "https://stackoverflow.com/questions/428715", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }