text
stringlengths
8
267k
meta
dict
Q: Simple Frameworks for Displaying Bitmaps and Handling Button Presses We have a set of applications that basically display a bunch of bitmaps and text, then allow user to press "buttons" (certain bitmaps) that cause actions to occur. We currently have these implemented using DirectX and a bunch of code to place the b...
{ "language": "en", "url": "https://stackoverflow.com/questions/24196", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What's the fastest way to bulk insert a lot of data in SQL Server (C# client) I am hitting some performance bottlenecks with my C# client inserting bulk data into a SQL Server 2005 database and I'm looking for ways in which to speed up the process. I am already using the SqlClient.SqlBulkCopy (which is based on TDS)...
{ "language": "en", "url": "https://stackoverflow.com/questions/24200", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "60" }
Q: “rusage” statistics I'm trying to use “rusage” statistics in my program to get data similar to that of the time tool. However, I'm pretty sure that I'm doing something wrong. The values seem about right but can be a bit weird at times. I didn't find good resources online. Does somebody know how to do it better? Sorr...
{ "language": "en", "url": "https://stackoverflow.com/questions/24207", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Use QItemDelegate to show image thumbnails What's the best way to use QT4's QItemDelegate to show thumbnails for images in a view? Specifically, how do you stop the item delegate from blocking when generating pixmaps from very large image files (> 500MB)? Can anyone link to some example code that achieves this? The...
{ "language": "en", "url": "https://stackoverflow.com/questions/24212", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Java Annotations What is the purpose of annotations in Java? I have this fuzzy idea of them as somewhere in between a comment and actual code. Do they affect the program at run time? What are their typical usages? Are they unique to Java? Is there a C++ equivalent? A: Annotations are primarily used by code that is ...
{ "language": "en", "url": "https://stackoverflow.com/questions/24221", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "120" }
Q: Code Injection With C# Can you use windows hooks or other methods to do code injection with c#? I've seen lots of things about code injection but all of them are done in C/C++. I don't know either of those languages and have a really hard time translating. Does anyone have any ideas on how to do this? A: Kevin, it ...
{ "language": "en", "url": "https://stackoverflow.com/questions/24241", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Select existing data from database to create test data I have a SqlServer database that I've manually filled with some test data. Now I'd like to extract this test data as insert statements and check it in to source control. The idea is that other team members should be able to create the same database, run the crea...
{ "language": "en", "url": "https://stackoverflow.com/questions/24243", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: About File permissions in C# While creating a file synchronization program in C# I tried to make a method copy in LocalFileItem class that uses System.IO.File.Copy(destination.Path, Path, true) method where Path is a string. After executing this code with destination. Path = "C:\\Test2" and this.Path = "C:\\Test\\F1...
{ "language": "en", "url": "https://stackoverflow.com/questions/24262", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: What's the point of OOP? As far as I can tell, in spite of the countless millions or billions spent on OOP education, languages, and tools, OOP has not improved developer productivity or software reliability, nor has it reduced development costs. Few people use OOP in any rigorous sense (few people adhere to or unde...
{ "language": "en", "url": "https://stackoverflow.com/questions/24270", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "126" }
Q: Functional programming and non-functional programming In my second year of University we were "taught" Haskell, I know almost nothing about it and even less about functional programming. What is functional programming, why and/xor where would I want to use it instead of non-functional programming and am I correct in...
{ "language": "en", "url": "https://stackoverflow.com/questions/24279", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "74" }
Q: Best Solution For Authentication in Ruby on Rails I'm looking for a pre-built solution I can use in my RoR application. I'm ideally looking for something similar to the ASP.NET Forms authentication that provides email validation, sign-up controls, and allows users to reset their passwords. Oh yeah, and easily allo...
{ "language": "en", "url": "https://stackoverflow.com/questions/24298", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "84" }
Q: Programming a simple IRC (Internet-Relay-Chat) Client I started using IRC at a young age, and I have always been fascinated with it. As a language exercise, I was thinking about programming a simple IRC client in Ruby with Shoes as a graphical front-end. My question to you, kind-sirs, what do I need to become fami...
{ "language": "en", "url": "https://stackoverflow.com/questions/24310", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Is It Possible To Raise An Event When A File Becomes Accessible? In C# I can use the FileSystemWatcher object to watch for a specific file and raise an event when it is created, modified, etc. The problem I have with this class is that it raises the event the moment the file becomes created, even if the process whic...
{ "language": "en", "url": "https://stackoverflow.com/questions/24315", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Database query representation impersonating file on Windows share? Is there any way to have something that looks just like a file on a Windows file share, but is really a resource served up over HTTP? For context, I'm working with an old app that can only deal with files on a Windows file share, I want to create a s...
{ "language": "en", "url": "https://stackoverflow.com/questions/24408", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Can I capture Windows Mobile PIE keyboard events? Anyone know of a way to capture keyboard events (keyup / keydown) in Portable IE under Window mobile? I noticed that key events are not supported in JS, and would like to come up with a solution that works without any client side additions. A: Without any client sid...
{ "language": "en", "url": "https://stackoverflow.com/questions/24414", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: IE 7+ Favorites Is it possible to develop a plug-in for Internet Explorer that can replace the existing favorites functionality? A: Absolutely, however, it does depend somewhat on what you expect "replacing" to mean. You can develop an extension to provide a new set of menus or dropdown toolbar of some kind like th...
{ "language": "en", "url": "https://stackoverflow.com/questions/24439", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Are there any legitimate use-cases for "goto" in a language that supports loops and functions? I've long been under the impression that goto should never be used if possible. However, while perusing libavcodec (which is written in C) the other day, I was surprised to notice multiple uses of it. Is it ever advantageo...
{ "language": "en", "url": "https://stackoverflow.com/questions/24451", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "220" }
Q: Embedding IPTC image data with PHP GD I'm trying to embed a IPTC data onto a JPEG image using iptcembed() but am having a bit of trouble. I have verified it is in the end product: // Embed the IPTC data $content = iptcembed($data, $path); // Verify IPTC data is in the end image $iptc = iptcparse($content); var_dump...
{ "language": "en", "url": "https://stackoverflow.com/questions/24456", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: (N)Hibernate Auto-Join I'm developing a web- application using NHibernate. Can you tell me how to write a NHibernate Query for the following SQL query: SELECT v1.Id FROM VIEW v1 LEFT JOIN VIEW v2 ON v1.SourceView = v2.Id ORDER BY v1.Position It's basically a auto-join but I don't know how to write this in Nhibernat...
{ "language": "en", "url": "https://stackoverflow.com/questions/24467", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Running "partially trusted" .NET assemblies from a network share When I try to run a .NET assembly (boo.exe) from a network share (mapped to a drive), it fails since it's only partially trusted: Unhandled Exception: System.Security.SecurityException: That assembly does not allow partially trusted callers. at Syst...
{ "language": "en", "url": "https://stackoverflow.com/questions/24468", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: SQL Server: Examples of PIVOTing String data Trying to find some simple SQL Server PIVOT examples. Most of the examples that I have found involve counting or summing up numbers. I just want to pivot some string data. For example, I have a query returning the following. Action1 VIEW Action1 EDIT Action2 VIEW ...
{ "language": "en", "url": "https://stackoverflow.com/questions/24470", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "131" }
Q: What is the "best" way to store international addresses in a database? What is the "best" way to store international addresses in a database? Answer in the form of a schema and an explanation of the reasons why you chose to normalize (or not) the way you did. Also explain why you chose the type and length of each fi...
{ "language": "en", "url": "https://stackoverflow.com/questions/24481", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "39" }
Q: Reading model objects mapped in Velocity Templates I have a Struts + Velocity structure like for example, a Person class, whose one property is a Car object (with its own getter/setter methods) and it is mapped to a Velocity form that submits to an Action, using ModelDriven and getModel structure. I what to put a bu...
{ "language": "en", "url": "https://stackoverflow.com/questions/24495", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: What Alternatives Are There to Model-View-Controller? While going through university and from following the development of SO, I've heard a lot about the Model-View-Controller architectural design pattern. I inadvertently used the MVC pattern even before I knew what it was, and still use it in my everyday job. From ...
{ "language": "en", "url": "https://stackoverflow.com/questions/24496", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "34" }
Q: What is the purpose of the AppManifest.xaml file in Silverlight applications? In opening up the .xap file that is generated as output from a Silverlight application I've been tinkering with lately, I noticed a file called AppManifest.xaml. I've also noticed an option in the property pages for the Silverlight project...
{ "language": "en", "url": "https://stackoverflow.com/questions/24506", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: "bad words" filter Not very technical, but... I have to implement a bad words filter in a new site we are developing. So I need a "good" bad words list to feed my db with... any hint / direction? Looking around with google I found this one, and it's a start, but nothing more. Yes, I know that this kind of filters ar...
{ "language": "en", "url": "https://stackoverflow.com/questions/24515", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "52" }
Q: Resolving reduce/reduce conflict in yacc/ocamlyacc I'm trying to parse a grammar in ocamlyacc (pretty much the same as regular yacc) which supports function application with no operators (like in Ocaml or Haskell), and the normal assortment of binary and unary operators. I'm getting a reduce/reduce conflict with the...
{ "language": "en", "url": "https://stackoverflow.com/questions/24516", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: What are your experiences running SVN on Windows? I'm curious to hear the experiences of those who are currently running their SVN server on Windows. Jeff Atwood has a post on how to setup SVN as a Windows service. It's a great first step, but it doesn't touch on other topics, such as: * *What to use for a web-b...
{ "language": "en", "url": "https://stackoverflow.com/questions/24528", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Create a database from another database? Is there an automatic way in SQL Server 2005 to create a database from several tables in another database? I need to work on a project and I only need a few tables to run it locally, and I don't want to make a backup of a 50 gig DB. UPDATE I tried the Tasks -> Export Data in ...
{ "language": "en", "url": "https://stackoverflow.com/questions/24541", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Using bitwise operators for Booleans in C++ Is there any reason not to use the bitwise operators &, |, and ^ for "bool" values in C++? I sometimes run into situations where I want exactly one of two conditions to be true (XOR), so I just throw the ^ operator into a conditional expression. I also sometimes want all ...
{ "language": "en", "url": "https://stackoverflow.com/questions/24542", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "99" }
Q: Why can't I fetch wikipedia pages with LWP::Simple? I'm trying to fetch Wikipedia pages using LWP::Simple, but they're not coming back. This code: #!/usr/bin/perl use strict; use LWP::Simple; print get("http://en.wikipedia.org/wiki/Stack_overflow"); doesn't print anything. But if I use some other webpage, say http...
{ "language": "en", "url": "https://stackoverflow.com/questions/24546", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Initialize class fields in constructor or at declaration? I've been programming in C# and Java recently and I am curious where the best place is to initialize my class fields. Should I do it at declaration?: public class Dice { private int topFace = 1; private Random myRand = new Random(); public void R...
{ "language": "en", "url": "https://stackoverflow.com/questions/24551", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "461" }
Q: Attaching entities to data contexts In LINQ to SQL, is it possible to check to see if an entity is already part of the data context before trying to attach it? A little context if it helps... I have this code in my global.asax as a helper method. Normally, between requests, this isn't a problem. But right after si...
{ "language": "en", "url": "https://stackoverflow.com/questions/24556", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: WYSIWYG editor gem for Rails? Is there a good ruby gem for a WYSIWYG editor that will easily work with a rails app? A: While I know this has been answered I wanted to add regarding the use of textile... I completely agree, but I'd recommend processing it in a before_save filter. Let's say you have a database field ...
{ "language": "en", "url": "https://stackoverflow.com/questions/24579", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: How do you automate a Visual Studio build? How do you turn a Visual Studio build that you'd perform in the IDE into a script that you can run from the command line? A: Simplest way: navigate to the directory containing the solution or project file, and run msbuild (assuming you have Visual Studio 2005 or newer). Mo...
{ "language": "en", "url": "https://stackoverflow.com/questions/24580", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "52" }
Q: Code Classic ASP in Linux What should i use to code Classic ASP under Linux. I have really tried to use Emacs and Vim but I don't have the time to learn them. What i'm looking for is: * *Syntax highlighting *Code Browser (Ctags) *Preferably som sort of code insight Something like Ultra Edit or E-texteditor. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/24595", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What are the pros and cons of the assorted Java web frameworks? I am considering creating my own website using Java and am trying to decide what framework to use. However, doing a quick search for Java frameworks returns more than 50 to choose from! My website is just going to be for my own enjoyment of building it ...
{ "language": "en", "url": "https://stackoverflow.com/questions/24596", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "85" }
Q: Stylus/tablet input device I need to make a WebCast presentation soon and need to do some "whiteboarding" during that WebCast. Does anyone have any stylus/tablet input device recommendations? Anyone ever used such an input device with WebEx's whiteboard feature? rp A: Wacom http://www.wacom.com/index2.cfm makes by ...
{ "language": "en", "url": "https://stackoverflow.com/questions/24599", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-2" }
Q: Vi editing for Visual Studio I'm used to the Vi(m) editor and am using MS Visual Studio 2005 at work. I couldn't find a free Vi add-in (there's only one for the 2003 version). I googled a bit, saw that there was a 'Google summer of code' project this year to write such an add-in, and am eagerly awaiting the result. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/24610", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Why should you prevent a class from being subclassed? What can be reasons to prevent a class from being inherited? (e.g. using sealed on a c# class) Right now I can't think of any. A: How about if you are not sure about the interface yet and don't want any other code depending on the present interface? [That's off ...
{ "language": "en", "url": "https://stackoverflow.com/questions/24620", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Setting PHP Include Path on a per site basis? I can set the PHP include path in the php.ini: include_path = /path/to/site/includes/ But then other websites are affected so that is no good. I can set the PHP include in the start of every file: $path = '/path/to/site/includes/'; set_include_path(get_include_path() . ...
{ "language": "en", "url": "https://stackoverflow.com/questions/24622", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: Java EE - DAO DVO I have seen two ways of implementing DAO-DVO design. 1) DVO are objects and DAOs are instantiated using factories i.e DAOs are also objects 2) DVOs are again objects but in this case, DAOs are classes which contain only static methods which accept DVOs to perform tasks. I was wondering which way is...
{ "language": "en", "url": "https://stackoverflow.com/questions/24623", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Abstraction VS Information Hiding VS Encapsulation Can you tell me what is the difference between abstraction and information hiding in software development? I am confused. Abstraction hides detail implementation and information hiding abstracts whole details of something. Update: I found a good answer for these thr...
{ "language": "en", "url": "https://stackoverflow.com/questions/24626", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "183" }
Q: Hooking my program with windows explorer's rename event Is there any way, in any language, to hook my program when a user renames a file? For example: A user renames a file and presses enter (or clicks away) to confirm the rename action. BEFORE the file is actually renamed, my program "listens" to this event and pop...
{ "language": "en", "url": "https://stackoverflow.com/questions/24644", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: What's the best way to get to know linux or BSD kernel internals? I'd like to gain better knowledge of operating system internals. Process management, memory management, and stuff like that. I was thinking of learning by getting to know either linux or BSD kernel. Which one kernel is better for learning purposes? W...
{ "language": "en", "url": "https://stackoverflow.com/questions/24648", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: Tactics for using PHP in a high-load site Before you answer this I have never developed anything popular enough to attain high server loads. Treat me as (sigh) an alien that has just landed on the planet, albeit one that knows PHP and a few optimisation techniques. I'm developing a tool in PHP that could attain qui...
{ "language": "en", "url": "https://stackoverflow.com/questions/24675", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "253" }
Q: JavaScript editor within Eclipse I'm looking for the best JavaScript editor available as an Eclipse plugin. I've been using Spket which is good. But, is there more better one? A: Ganymede's version of WTP includes a revamped Javascript editor that's worth a try. The key version numbers are Eclipse 3.4 and WTP 3.0....
{ "language": "en", "url": "https://stackoverflow.com/questions/24678", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "133" }
Q: Using Subversion with Visual Basic 6 My team is moving from Visual SourceSafe to Subversion soon, while developing/supporting a legacy project in Visual Basic 6.0, so I have a couple of questions: * *What's the best tool for Subversion IDE integration in Visual Studio 6? (or is it not worth the trouble...) *Are ...
{ "language": "en", "url": "https://stackoverflow.com/questions/24680", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: Where do I find information about Blog APIs and how to use them? I'm thinking of creating a small offline blog editor for personal use and I don't know how do the APIs work. Where can I find this information? I'm particularly looking for the most common providers: Blogger, Wordpress, MovableType, Live Spaces (not su...
{ "language": "en", "url": "https://stackoverflow.com/questions/24708", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: SQL many-to-many matching I'm implementing a tagging system for a website. There are multiple tags per object and multiple objects per tag. This is accomplished by maintaining a table with two values per record, one for the ids of the object and the tag. I'm looking to write a query to find the objects that match a ...
{ "language": "en", "url": "https://stackoverflow.com/questions/24715", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Best regex to catch XSS (Cross-site Scripting) attack (in Java)? Jeff actually posted about this in Sanitize HTML. But his example is in C# and I'm actually more interested in a Java version. Does anyone have a better version for Java? Is his example good enough to just convert directly from C# to Java? [Update] I h...
{ "language": "en", "url": "https://stackoverflow.com/questions/24723", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "31" }
Q: What is this 'Multiple-step OLE DB' error? I'm doing a little bit of work on a horrid piece of software built by Bangalores best. It's written in mostly classic ASP/VbScript, but "ported" to ASP.NET, though most of the code is classic ASP style in the ASPX pages :( I'm getting this message when it tries to connect t...
{ "language": "en", "url": "https://stackoverflow.com/questions/24730", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Displaying version of underlying software in footer of web app? I am thinking about providing a version of say, the database schema and the dlls for business logic in the footer of my web application. Is this advised? Are there any pitfalls, or pointers of how to do this best? Usability concerns? I already have a ve...
{ "language": "en", "url": "https://stackoverflow.com/questions/24731", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: SelectNodes not working on stackoverflow feed I'm trying to add support for stackoverflow feeds in my rss reader but SelectNodes and SelectSingleNode have no effect. This is probably something to do with ATOM and xml namespaces that I just don't understand yet. I have gotten it to work by removing all attributes fro...
{ "language": "en", "url": "https://stackoverflow.com/questions/24734", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: How do I write a Firefox Addon? What are some resources for getting started writing a Firefox Addon? Is there an API guide somewhere? Is there a getting started tutorial somewhere? Is there a developer discussion board somewhere? A: We tried to make https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExt...
{ "language": "en", "url": "https://stackoverflow.com/questions/24772", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "145" }
Q: Effectively Converting dates between UTC and Local (ie. PST) time in SQL 2005 What is the best way to convert a UTC datetime into local datetime. It isn't as simple as a getutcdate() and getdate() difference because the difference changes depending on what the date is. CLR integration isn't an option for me either. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/24797", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "30" }
Q: Recommendations needed for good AI references I've been asked to help out on an XNA project with the AI. I'm not totally new to the concepts (pathfinding, flocking, etc.) but this would be the first "real" code. I'd be very thankful for any resources (links or books); I want to make sure I do this right. A: These l...
{ "language": "en", "url": "https://stackoverflow.com/questions/24812", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "23" }
Q: Automating MSI Build Process Does anyone have a good way to build MSI (vdproj) projects using MsBuild or Nant? I know one answer was to install Visual Studio on the build server and just use devenv.exe to build the project, but, I prefer not to install Visual Studio on our build servers. A: Short of the method yo...
{ "language": "en", "url": "https://stackoverflow.com/questions/24813", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Escaping HTML strings with jQuery Does anyone know of an easy way to escape HTML from strings in jQuery? I need to be able to pass an arbitrary string and have it properly escaped for display in an HTML page (preventing JavaScript/HTML injection attacks). I'm sure it's possible to extend jQuery to do this, but I d...
{ "language": "en", "url": "https://stackoverflow.com/questions/24816", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "652" }
Q: Why is Response.BufferOutput = False, not working? This problem started on a different board, but Dave Ward, who was very prompt and helpful there is also here, so I'd like to pick up here for hopefully the last remaining piece of the puzzle.­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­...
{ "language": "en", "url": "https://stackoverflow.com/questions/24821", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Implementing a custom Windows Workflow activity that executes an asynchronous operation I'm having some conceptual trouble on figuring out how to best implement this... I want to create a custom Activity class for Windows Workflow. The activity has to call out to a third party library method that itself runs anothe...
{ "language": "en", "url": "https://stackoverflow.com/questions/24823", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How does .net managed memory handle value types inside objects? public class MyClass { public int Age; public int ID; } public void MyMethod() { MyClass m = new MyClass(); int newID; } To my understanding, the following is true: * *The reference m lives on the stack and goes out of scope when M...
{ "language": "en", "url": "https://stackoverflow.com/questions/24829", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Execute script after specific delay using JavaScript Is there any JavaScript method similar to the jQuery delay() or wait() (to delay the execution of a script for a specific amount of time)? A: why can't you put the code behind a promise? (typed in off the top of my head) new Promise(function(resolve, reject) { ...
{ "language": "en", "url": "https://stackoverflow.com/questions/24849", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "200" }
Q: What is the difference between ++i and i++? In C, what is the difference between using ++i and i++, and which should be used in the incrementation block of a for loop? A: i++ and ++i This little code may help to visualize the difference from a different angle than the already posted answers: int i = 10, j = 10; ...
{ "language": "en", "url": "https://stackoverflow.com/questions/24853", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1123" }
Q: Is it essential that I use libraries to manipulate XML? I am using Java back end for creating an XML string which is passed to the browser. Currently I am using simple string manipulation to produce this XML. Is it essential that I use some XML library in Java to produce the XML string? I find the libraries very dif...
{ "language": "en", "url": "https://stackoverflow.com/questions/24866", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: How do I fix "for loop initial declaration used outside C99 mode" GCC error? I'm trying to solve the 3n+1 problem and I have a for loop that looks like this: for(int i = low; i <= high; ++i) { res = runalg(i); if (res > highestres) { hi...
{ "language": "en", "url": "https://stackoverflow.com/questions/24881", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "126" }
Q: Is there a performance difference between i++ and ++i in C? Is there a performance difference between i++ and ++i if the resulting value is not used? A: @Mark Even though the compiler is allowed to optimize away the (stack based) temporary copy of the variable and gcc (in recent versions) is doing so, doesn't mean ...
{ "language": "en", "url": "https://stackoverflow.com/questions/24886", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "525" }
Q: C Memory Management I've always heard that in C you have to really watch how you manage memory. And I'm still beginning to learn C, but thus far, I have not had to do any memory managing related activities at all.. I always imagined having to release variables and do all sorts of ugly things. But this doesn't seem t...
{ "language": "en", "url": "https://stackoverflow.com/questions/24891", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "101" }
Q: Is there a performance difference between i++ and ++i in C++? We have the question is there a performance difference between i++ and ++i in C? What's the answer for C++? A: Yes. There is. The ++ operator may or may not be defined as a function. For primitive types (int, double, ...) the operators are built in, so...
{ "language": "en", "url": "https://stackoverflow.com/questions/24901", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "407" }
Q: BizTalk DB2 adapter connection error My colleagues are attempting to connect BizTalk 2006 R2 via DB2/MVS adapter to a database hosted on z/OS mainframe. When testing the connecting settings, they are getting the following error Could not connect to data source 'New Data Source': The network connection was terminated...
{ "language": "en", "url": "https://stackoverflow.com/questions/24915", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Difference between EXISTS and IN in SQL? What is the difference between the EXISTS and IN clause in SQL? When should we use EXISTS, and when should we use IN? A: Based on rule optimizer: * *EXISTS is much faster than IN, when the sub-query results is very large. *IN is faster than EXISTS, when the sub-query r...
{ "language": "en", "url": "https://stackoverflow.com/questions/24929", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "498" }
Q: How to capture Python interpreter's and/or CMD.EXE's output from a Python script? * *Is it possible to capture Python interpreter's output from a Python script? *Is it possible to capture Windows CMD's output from a Python script? If so, which librar(y|ies) should I look into? A: I think I can point you to a g...
{ "language": "en", "url": "https://stackoverflow.com/questions/24931", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Where can I find extended HTML reporters for Simpletest? I am using Simpletest as my unit test framework for the PHP site I am currently working on. I like the fact that it is shipped with a simple HTML reporter, but I would like a bit more advanced reporter. I have read the reporter API documentation, but it would ...
{ "language": "en", "url": "https://stackoverflow.com/questions/24941", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Windows: List and Launch applications associated with an extension How to determine the applications associated with a particular extension (e.g. .JPG) and then determine where the executable to that application is located so that it can be launched via a call to say System.Diagnostics.Process.Start(...). I already ...
{ "language": "en", "url": "https://stackoverflow.com/questions/24954", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: Debugging asp.net with firefox and visual studio.net - very slow compared to IE Debugging asp.net websites/web projects in visual studio.net 2005 with Firefox is loads slower than using IE. I've read something somewhere that there is a way of fixing this but i can't for the life of me find it again. Does anyone kno...
{ "language": "en", "url": "https://stackoverflow.com/questions/24959", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: How to learn MDX I am currently learning OLAP & MDX after many years of relational database development. Any tips on getting started in MDX? What are the best books and resources to learn MDX? A: Here is an MDX gentle introduction. A: I found the Spoffard book not very helpful. MDX is such an oddity compared to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/24963", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "31" }
Q: Beginning TDD - Challenges? Solutions? Recommendations? OK, I know there have already been questions about getting started with TDD.. However, I guess I kind of know the general concensus is to just do it , However, I seem to have the following problems getting my head into the game: * *When working with collecti...
{ "language": "en", "url": "https://stackoverflow.com/questions/24965", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "43" }
Q: How do I profile a Maven Application in Netbeans? I've got a project using Maven 2 as the build tool. Now I am using Netbeans 6 as my IDE and really want to be able to use the profiler. Is there any way I can get this to work? A: I thought this might be more complicated. It wasn't. To use the Netbeans profiler w...
{ "language": "en", "url": "https://stackoverflow.com/questions/24986", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Why can't I explicitly pass the type argument to a generic Java method? I have defined a Java function: static <T> List<T> createEmptyList() { return new ArrayList<T>(); } One way to call it is like so: List<Integer> myList = createEmptyList(); // Compiles Why can't I call it by explicitly passing the generic ...
{ "language": "en", "url": "https://stackoverflow.com/questions/24991", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "32" }
Q: InvalidOperationException while creating wcf web service instance I have a WCF Web Service which is referenced from a class library. After the project is run, when creating the service client object from inside a class library, I receive an InvalidOperationException with message: Could not find default endpoint ele...
{ "language": "en", "url": "https://stackoverflow.com/questions/24993", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Is there a functional language for C++ ecosystem? Java has Scala and .NET has F#. Both of these languages are very highly integrated into the respective Java and .NET platforms. Classes can be written in Scala then extended in Java for example. Does there exist an equivalent functional language that interoperates ...
{ "language": "en", "url": "https://stackoverflow.com/questions/24995", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Conditional formatting -- percentage to color conversion What's the easiest way to convert a percentage to a color ranging from Green (100%) to Red (0%), with Yellow for 50%? I'm using plain 32bit RGB - so each component is an integer between 0 and 255. I'm doing this in C#, but I guess for a problem like this the l...
{ "language": "en", "url": "https://stackoverflow.com/questions/25007", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "21" }
Q: I Am Not Getting the Result I Expect Using readLine() in Java I am using the code snippet below, however it's not working quite as I understand it should. public static void main(String[] args) { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String line; try { lin...
{ "language": "en", "url": "https://stackoverflow.com/questions/25033", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: span tag height in Firefox Using CSS, I'm trying to specify the height of a span tag in Firefox, but it's just not accepting it (IE does). Firefox accepts the height if I use a div, but the problem with using a div is the annoying line break after it, which I can't have in this particular instance. I tried setting ...
{ "language": "en", "url": "https://stackoverflow.com/questions/25041", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: Am I allowed to have "incomplete" aggregates in DDD? DDD states that you should only ever access entities through their aggregate root. So say for instance that you have an aggregate root X which potentially has a lot of child Y entities. Now, for some scenario, you only really care about a subset of these Y entitie...
{ "language": "en", "url": "https://stackoverflow.com/questions/25042", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: Lisp Executable I've just started learning Lisp and I can't figure out how to compile and link lisp code to an executable. I'm using clisp and clisp -c produces two files: * *.fas *.lib What do I do next to get an executable? A: I was actually trying to do this today, and I found typing this into the CLisp RE...
{ "language": "en", "url": "https://stackoverflow.com/questions/25046", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "59" }
Q: How to mentor a junior programmer Does anyone have any suggestions on how to mentor a junior programmer ? If you have mentored someone did you follow any process or was it quite informal ? If you've been mentored in the past what kind of things did you find most helpful ? A: At my first place of employment there wa...
{ "language": "en", "url": "https://stackoverflow.com/questions/25063", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "47" }
Q: Binary buffer in Python In Python you can use StringIO for a file-like buffer for character data. Memory-mapped file basically does similar thing for binary data, but it requires a file that is used as the basis. Does Python have a file object that is intended for binary data and is memory only, equivalent to Java's...
{ "language": "en", "url": "https://stackoverflow.com/questions/25116", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "69" }
Q: How to create images in PHP Is it possible to create images with PHP (as opposed to simply linking to them via HTML) and if so, where should I go first to learn about such a thing? A: Yes this is possible. I believe there are multiple libraries to accomplish this. The most widely used is probably ImageMagick which ...
{ "language": "en", "url": "https://stackoverflow.com/questions/25128", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Are named entities in HTML still necessary in the age of Unicode aware browsers? I did a lot of PHP programming in the last years and one thing that keeps annoying me is the weak support for Unicode and multibyte strings (to be sure, natively there is none). For example, "htmlentities" seems to be a much used functi...
{ "language": "en", "url": "https://stackoverflow.com/questions/25132", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: What is your experience with software model checking? * *What types of applications have you used model checking for? *What model checking tool did you use? *How would you summarize your experience w/ the technique, specifically in evaluating its effectiveness in delivering higher quality software? In the cou...
{ "language": "en", "url": "https://stackoverflow.com/questions/25137", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Stored Procedure and Timeout I'm running a long process stored procedure. I'm wondering if in case of a timeout or any case of disconnection with the database after initiating the call to the stored procedure. Is it still working and implementing the changes on the server? ­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­...
{ "language": "en", "url": "https://stackoverflow.com/questions/25142", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can I merge PHP arrays? I have two arrays of animals (for example). $array = array( array( 'id' => 1, 'name' => 'Cat', ), array( 'id' => 2, 'name' => 'Mouse', ) ); $array2 = array( array( 'id' => 2, 'age' => 321, ), array( 'id' ...
{ "language": "en", "url": "https://stackoverflow.com/questions/25147", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Building C# .NET windows application with multiple views I'm rewriting an old application and use this as a good opportunity to try out C# and .NET development (I usually do a lot of plug-in stuff in C). The application is basically a timer collecting data. It has a start view with a button to start the measurement....
{ "language": "en", "url": "https://stackoverflow.com/questions/25158", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Tooltips on an image I have an image and on it are logos (it's a map), I want to have a little box popup with information about that logo's location when the user moves their mouse over said logo. Can I do this without using a javascript framework and if so, are there any small libraries/scripts that will let me do ...
{ "language": "en", "url": "https://stackoverflow.com/questions/25161", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: How to prevent session timeout in Symfony 1.0? I've used the PHP MVC framework Symfony to build an on-demand web app. It has an annoying bug - the session expires after about 15-30 minutes of inactivity. There is a config directive to prevent session expiration but it does not work. Even workarounds such as this one...
{ "language": "en", "url": "https://stackoverflow.com/questions/25174", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: What's optimal? UNION vs WHERE IN (str1, str2, str3) I'm writing a program that sends an email out at a client's specific local time. I have a .NET method that takes a timezone & time and destination timezone and returns the time in that timezone. So my method is to select every distinct timezone in the database, ch...
{ "language": "en", "url": "https://stackoverflow.com/questions/25182", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Java SWIFT Library I'm looking for a Java library for SWIFT messages. I want to * *parse SWIFT messages into an object model *validate SWIFT messages (including SWIFT network validation rules) *build / change SWIFT messages by using an object model Theoretically, I need to support all SWIFT message types. But...
{ "language": "en", "url": "https://stackoverflow.com/questions/25192", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "32" }
Q: C#.NET Winforms: Is it possible to override Label.Autosize? I don't like the AutoSize property of the Label control. I have a custom Label that draws a fancy rounded border among other things. I'm placing a AutoSize = false in my constructor, however, when I place it in design mode, the property always is True. I h...
{ "language": "en", "url": "https://stackoverflow.com/questions/25200", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: joining latest of various usermetadata tags to user rows I have a postgres database with a user table (userid, firstname, lastname) and a usermetadata table (userid, code, content, created datetime). I store various information about each user in the usermetadata table by code and keep a full history. so for example...
{ "language": "en", "url": "https://stackoverflow.com/questions/25224", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }