text
stringlengths
8
267k
meta
dict
Q: Any thoughts on DevExpress XPO ORM Package? XPO is the object relational mapper of choice at my company. Any thoughts on the pros and cons? I was just looking for general feeling and anecdotes about the product. We are not switching to XPO. We are just getting rid of hard coded sql strings living in the app and mov...
{ "language": "en", "url": "https://stackoverflow.com/questions/31559", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "22" }
Q: Keeping CL and Scheme straight in your head Depending on my mood I seem to waffle back and forth between wanting a Lisp-1 and a Lisp-2. Unfortunately beyond the obvious name space differences, this leaves all kinds of amusing function name/etc problems you run into. Case in point, trying to write some code tonight...
{ "language": "en", "url": "https://stackoverflow.com/questions/31561", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Query to list all tables that contain a specific column with SQL Server 2005 Question as stated in the title. A: http://blog.sqlauthority.com/2008/08/06/sql-server-query-to-find-column-from-all-tables-of-database/ USE AdventureWorks GO SELECT t.name AS table_name ,SCHEMA_NAME(schema_id) AS schema_name ...
{ "language": "en", "url": "https://stackoverflow.com/questions/31566", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How to properly cast objects created through reflection I'm trying to wrap my head around reflection, so I decided to add plugin capability to a program that I'm writing. The only way to understand a concept is to get your fingers dirty and write the code, so I went the route of creating a simple interface library c...
{ "language": "en", "url": "https://stackoverflow.com/questions/31567", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Broadcast like UDP with the reliability of TCP I'm working on a .net solution that is run completely inside a single network. When users make a change to the system, I want to launch an announcement and have everyone else hear it and act accordingly. Is there a way that we can broadcast out messages like this (like...
{ "language": "en", "url": "https://stackoverflow.com/questions/31572", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: How scalable is System.Threading.Timer? I'm writing an app that will need to make use of Timers, but potentially very many of them. How scalable is the System.Threading.Timer class? The documentation merely say it's "lightweight", but doesn't explain further. Do these timers get sucked into a single thread (or ve...
{ "language": "en", "url": "https://stackoverflow.com/questions/31581", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "26" }
Q: Design: Java and returning self-reference in setter methods For classes that have a long list of setters that are used frequently, I found this way very useful (although I have recently read about the Builder pattern in Effective Java that is kinda the same). Basically, all setter methods return the object itself so...
{ "language": "en", "url": "https://stackoverflow.com/questions/31584", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "22" }
Q: How to get the libraries you need into the bin folder when using IoC/DI I'm using Castle Windsor to do some dependency injection, specifically I've abstracted the DAL layer to interfaces that are now being loaded by DI. Once the project is developed & deployed all the .bin files will be in the same location, but for...
{ "language": "en", "url": "https://stackoverflow.com/questions/31592", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Testing a client-server application I am coding a client-server application using Eclipse's RCP. We are having trouble testing the interaction between the two sides as they both contain a lot of GUI and provide no command-line or other remote API. Got any ideas? A: I have about 1.5 years worth of experience with th...
{ "language": "en", "url": "https://stackoverflow.com/questions/31598", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Alternative to VSS for a one man show (army of one?) I've been programming for 10+ years now for the same employer and only source code control we've ever used is VSS. (Sorry - That's what they had when I started). There's only ever been a few of us; two right now and we usually work alone, so VSS has worked ok for ...
{ "language": "en", "url": "https://stackoverflow.com/questions/31627", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Remove Meta Data from .NET applications? Is this possible? Does the .NET framework depend on the meta data in the bytecode? I'd like to have an application i write not work in reflector or a similar .NET decompiler. A: If you remove the metadata the framework won't be able to load your code, or figure out which oth...
{ "language": "en", "url": "https://stackoverflow.com/questions/31637", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Learning FORTRAN In the Modern Era I've recently come to maintain a large amount of scientific calculation-intensive FORTRAN code. I'm having difficulties getting a handle on all of the, say, nuances, of a forty year old language, despite google & two introductory level books. The code is rife with "performance en...
{ "language": "en", "url": "https://stackoverflow.com/questions/31672", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "80" }
Q: Wifi Management on XP (SP2/SP3) Wifi support on Vista is fine, but Native Wifi on XP is half baked. NDIS 802.11 Wireless LAN Miniport Drivers only gets you part of the way there (e.g. network scanning). From what I've read (and tried), the 802.11 NDIS drivers on XP will not allow you to configure a wireless connecti...
{ "language": "en", "url": "https://stackoverflow.com/questions/31673", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: What are the differences between Generics in C# and Java... and Templates in C++? I mostly use Java and generics are relatively new. I keep reading that Java made the wrong decision or that .NET has better implementations etc. etc. So, what are the main differences between C++, C#, Java in generics? Pros/cons of eac...
{ "language": "en", "url": "https://stackoverflow.com/questions/31693", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "203" }
Q: How to control layer ordering in Virtual Earth I have a mapping application that needs to draw a path, and then display icons on top of the path. I can't find a way to control the order of virtual earth layers, other than the order in which they are added. Does anyone know how to change the z index of Virtual Earth...
{ "language": "en", "url": "https://stackoverflow.com/questions/31701", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How can I convert IEnumerable to List in C#? I am using LINQ to query a generic dictionary and then use the result as the datasource for my ListView (WebForms). Simplified code: Dictionary<Guid, Record> dict = GetAllRecords(); myListView.DataSource = dict.Values.Where(rec => rec.Name == "foo"); myListView.DataBind()...
{ "language": "en", "url": "https://stackoverflow.com/questions/31708", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: How to plot a long path with Virtual Earth The obvious way to plot a path with virtual earth (VEMap.GetDirections) is limited to 25 points. When trying to plot a vehicle's journey this is extremely limiting. How can I plot a by-road journey of more than 25 points on a virtual earth map? A: According to this you nee...
{ "language": "en", "url": "https://stackoverflow.com/questions/31711", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Anyone have a diff algorithm for rendered HTML? I'm interested in seeing a good diff algorithm, possibly in Javascript, for rendering a side-by-side diff of two HTML pages. The idea would be that the diff would show the differences of the rendered HTML. To clarify, I want to be able to see the side-by-side diffs as ...
{ "language": "en", "url": "https://stackoverflow.com/questions/31722", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "90" }
Q: How many ServiceContracts can a WCF service have? How many ServiceContracts can a WCF service have? Specifically, since a ServiceContract is an attribute to an interface, how many interfaces can I code into one WCF web service? Is it a one-to-one? Does it make sense to separate the contracts across multiple web serv...
{ "language": "en", "url": "https://stackoverflow.com/questions/31790", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Help accessing application settings using ConfigurationManager In .net frameworks 1.1, I use System.Configuration.ConfigurationSettings.AppSettings["name"]; for application settings. But in .Net 2.0, it says ConfigurationSettings is obsolete and to use ConfigurationManager instead. So I swapped it out with this: ...
{ "language": "en", "url": "https://stackoverflow.com/questions/31794", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Preventing XML Serialization of IEnumerable and ICollection & Inherited Types NOTE: XMLIgnore is NOT the answer! OK, so following on from my question on XML Serialization and Inherited Types, I began integrating that code into my application I am working on, stupidly thinking all will go well.. I ran into problems w...
{ "language": "en", "url": "https://stackoverflow.com/questions/31799", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How to respond to an alternate URI in a RESTful web service I'm building a RESTful web service which has multiple URIs for one of its resources, because there is more than one unique identifier. Should the server respond to a GET request for an alternate URI by returning the resource, or should I send an HTTP 3xx re...
{ "language": "en", "url": "https://stackoverflow.com/questions/31800", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Performance issues regarding Access 2003 and the OLE Object data type In MS Access 2003 (I know, I know), I'm using the OLE Object data type to persist the sate of some objects that are marked as serializable (just using a IO.BinaryFormatter to serialize to a MemoryStream, and then saving that to the db as a Byte ar...
{ "language": "en", "url": "https://stackoverflow.com/questions/31812", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to find out which Service Pack is installed on SQL Server? How can I find out which Service Pack is installed on my copy of SQL Server? A: Select @@Version Ex: My machine has the following one installed. Microsoft SQL Server 2008 R2 (RTM) - 10.50.1600.1 (Intel X86) Apr 2 2010 15:53:02 Copyright (c) Microsof...
{ "language": "en", "url": "https://stackoverflow.com/questions/31818", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Algorithmic complexity of XML parsers/validators I need to know how the performance of different XML tools (parsers, validators, XPath expression evaluators, etc) is affected by the size and complexity of the input document. Are there resources out there that document how CPU time and memory usage are affected by......
{ "language": "en", "url": "https://stackoverflow.com/questions/31826", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: Generating random terrain in Blender3D I tried finding a python script in google that will generate a random terrain when the game starts (or each time a the player advances to a new scene) but all the tools I found are for creating a terrain to render it, not for the game mode. Any idea how/where to find one? (I'm ...
{ "language": "en", "url": "https://stackoverflow.com/questions/31834", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Java Logging vs Log4J Is it still worth to add the log4j library to a Java 5 project just to log let's say some exceptions to a file with some nice rollover settings. Or will the standard util.logging facility do the job as well? What do you think? A: log4j is a much nicer package overall, and doesn't have some of ...
{ "language": "en", "url": "https://stackoverflow.com/questions/31840", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "149" }
Q: XML Schema construct for "Any number of these elements - in any order" I need to create an XML schema that looks something like this: <xs:element name="wrapperElement"> <xs:complexType> <xs:sequence> <xs:element type="el1"> <xs:element type="el2"> </xs:sequence> <xs:WhatGoesHere?> ...
{ "language": "en", "url": "https://stackoverflow.com/questions/31847", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Capturing Cmd-C (or Ctrl-C) keyboard event from modular Flex application in browser or AIR It seems that it is impossible to capture the keyboard event normally used for copy when running a Flex application in the browser or as an AIR app, presumably because the browser or OS is intercepting it first. Is there a way...
{ "language": "en", "url": "https://stackoverflow.com/questions/31849", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to marshal an array of structs - (.Net/C# => C++) Disclaimer: Near zero with marshalling concepts.. I have a struct B that contains a string + an array of structs C. I need to send this across the giant interop chasm to a COM - C++ consumer. What are the right set of attributes I need to decorate my struct defin...
{ "language": "en", "url": "https://stackoverflow.com/questions/31854", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Good reasons for not letting the browser launch local applications I know this might be a no-brainer, but please read on. I also know it's generally not considered a good idea, maybe the worst, to let a browser run and interact with local apps, even in an intranet context. We use Citrix for home-office, and people r...
{ "language": "en", "url": "https://stackoverflow.com/questions/31865", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Are there any examples where we *need* protected inheritance in C++? While I've seen rare cases where private inheritance was needed, I've never encountered a case where protected inheritance is needed. Does someone have an example? A: There is a very rare use case of protected inheritance. It is where you want to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/31867", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: Upload a file to SharePoint through the built-in web services What is the best way to upload a file to a Document Library on a SharePoint server through the built-in web services that version WSS 3.0 exposes? Following the two initial answers... * *We definitely need to use the Web Service layer as we will be mak...
{ "language": "en", "url": "https://stackoverflow.com/questions/31868", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "31" }
Q: Using an HTML entity in XSLT (e.g.  ) What is the best way to include an html entity in XSLT? <xsl:template match="/a/node"> <xsl:value-of select="."/> <xsl:text>&nbsp;</xsl:text> </xsl:template> this one returns a XsltParseError A: this one returns a XsltParseError Yes, and the reason for that is that &...
{ "language": "en", "url": "https://stackoverflow.com/questions/31870", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "67" }
Q: WSACancelBlockingCall exception Ok, I have a strange exception thrown from my code that's been bothering me for ages. System.Net.Sockets.SocketException: A blocking operation was interrupted by a call to WSACancelBlockingCall at System.Net.Sockets.Socket.Accept() at System.Net.Sockets.TcpListener.AcceptTcpClie...
{ "language": "en", "url": "https://stackoverflow.com/questions/31871", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "54" }
Q: Is there a simple, elegant way to define singletons? There seem to be many ways to define singletons in Python. Is there a consensus opinion on Stack Overflow? A: The module approach works well. If I absolutely need a singleton I prefer the Metaclass approach. class Singleton(type): def __init__(cls, name, base...
{ "language": "en", "url": "https://stackoverflow.com/questions/31875", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "520" }
Q: (Why) should I use obfuscation? It seems to me obfuscation is an idea that falls somewhere in the "security by obscurity" or "false sense of protection" camp. To protect intellectual property, there's copyright; to prevent security issues from being found, there's fixing those issues. In short, I regard it as a tech...
{ "language": "en", "url": "https://stackoverflow.com/questions/31882", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Does Visual Studio Server Explorer support custom database providers? I had used Server Explorer and related tools for graphical database development with Microsoft SQL Server in some of my learning projects - and it was a great experience. However, in my work I deal with Oracle DB and SQLite and my hobby projects u...
{ "language": "en", "url": "https://stackoverflow.com/questions/31885", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: How to efficiently archive older parts of a big (multi-GB) SQL Server database? Right now I am working on a solution to archive older data from a big working database to a separate archive database with the same schema. I move the data using SQL scripts and SQL Server Management Objects (SMO) from a .Net executable ...
{ "language": "en", "url": "https://stackoverflow.com/questions/31906", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: A more generic visitor pattern I'm sorry if my question is so long and technical but I think it's so important other people will be interested about it I was looking for a way to separate clearly some softwares internals from their representation in c++ I have a generic parameter class (to be later stored in a conta...
{ "language": "en", "url": "https://stackoverflow.com/questions/31913", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: How to make the process of debugging ASP.NET Sharepoint applications less time consuming? I'm comparing it Java where you can start your application server in debug mode, then attach your IDE to the server. And you can change your code "on the fly" without restarting the server. As long as your changes don't affect ...
{ "language": "en", "url": "https://stackoverflow.com/questions/31919", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: What are the best practices for JSF? I have done Java and JSP programming in the past, but I am new to Java Server Faces and want to know if there's a set of best practices for JSF development. A: Consider using facelets- it greatly simplifies the worst parts of JSF development. I'm doing a CMS-based JSF project n...
{ "language": "en", "url": "https://stackoverflow.com/questions/31924", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Sending e-mail from a Custom SQL Server Reporting Services Delivery Extension I've developed my own delivery extension for Reporting Services 2005, to integrate this with our SaaS marketing solution. It takes the subscription, and takes a snapshot of the report with a custom set of parameters. It then renders the re...
{ "language": "en", "url": "https://stackoverflow.com/questions/31930", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What's the simplest way to decrement a date in Javascript by 1 day? I need to decrement a Javascript date by 1 day, so that it rolls back across months/years correctly. That is, if I have a date of 'Today', I want to get the date for 'Yesterday'. It always seems to take more code than necessary when I do this, so I...
{ "language": "en", "url": "https://stackoverflow.com/questions/31931", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "23" }
Q: ASP.NET AJAX: Firing an UpdatePanel after the page load is complete I'm sure this is easy but I can't figure it out: I have an ASP.NET page with some UpdatePanels on it. I want the page to completely load with some 'Please wait' text in the UpdatePanels. Then once the page is completely loaded I want to call a cod...
{ "language": "en", "url": "https://stackoverflow.com/questions/31935", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: C# - SQLClient - Simplest INSERT I'm basically trying to figure out the simplest way to perform your basic insert operation in C#.NET using the SqlClient namespace. I'm using SqlConnection for my db link, I've already had success executing some reads, and I want to know the simplest way to insert data. I'm finding ...
{ "language": "en", "url": "https://stackoverflow.com/questions/32000", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Resettable Java Timer I'd like to have a java.utils.Timer with a resettable time in java.I need to set a once off event to occur in X seconds. If nothing happens in between the time the timer was created and X seconds, then the event occurs as normal. If, however, before X seconds has elapsed, I decide that the eve...
{ "language": "en", "url": "https://stackoverflow.com/questions/32001", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "40" }
Q: Tool for commandline "bookmarks" on windows? Im searching a tool which allows me to specify some folders as "bookmarks" and than access them on the commandline (on Windows XP) via a keyword. Something like: C:\> go home D:\profiles\user\home\> go svn-project1 D:\projects\project1\svn\branch\src\> I'm currently usin...
{ "language": "en", "url": "https://stackoverflow.com/questions/32003", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Is regex case insensitivity slower? Source RegexOptions.IgnoreCase is more expensive than I would have thought (eg, should be barely measurable) Assuming that this applies to PHP, Python, Perl, Ruby etc as well as C# (which is what I assume Jeff was using), how much of a slowdown is it and will I incur a similar p...
{ "language": "en", "url": "https://stackoverflow.com/questions/32010", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: Is soapUI the best web services testing tool/client/framework? I have been working on a web services related project for about the last year. Our team found soapUI near the start of our project and we have been mostly(*) satisfied with it (the free version, that is). My question is: are there other tools/clients/fr...
{ "language": "en", "url": "https://stackoverflow.com/questions/32020", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: NAnt and dual platform build - best way to build on Windows AND Mono/Linux I'm new to NAnt but have some experience with Ant and CruiseControl. What I want to do is have my SVN project include all tools needed (like NUnit and Mocks etc) so I can check out onto a fresh machine and build. This strategy is outlined by ...
{ "language": "en", "url": "https://stackoverflow.com/questions/32027", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: In C#, isn't the observer pattern already implemented using Events? After reading the Head First Design Patterns book and using a number of other design patterns, I'm trying to understand the Observer pattern. Isn't this already implemented using Events in the .NET Framework? A: Yes, it's identical. A note: if you ...
{ "language": "en", "url": "https://stackoverflow.com/questions/32034", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "33" }
Q: How to remove debug statements from production code in Java Is it possible for the compiler to remove statements used for debugging purposes (such as logging) from production code? The debug statements would need to be marked somehow, maybe using annotations. It's easy to set a property (debug = true) and check it a...
{ "language": "en", "url": "https://stackoverflow.com/questions/32041", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: How can I render a tree structure (recursive) using a django template? I have a tree structure in memory that I would like to render in HTML using a Django template. class Node(): name = "node name" children = [] There will be some object root that is a Node, and children is a list of Nodes. root will be passe...
{ "language": "en", "url": "https://stackoverflow.com/questions/32044", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "74" }
Q: How do I extract the inner exception from a soap exception in ASP.NET? I have a simple web service operation like this one: [WebMethod] public string HelloWorld() { throw new Exception("HelloWorldException"); return "Hello World"; } And then I have a client application that consumes ...
{ "language": "en", "url": "https://stackoverflow.com/questions/32058", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: How can I get the number of occurrences in a SQL IN clause? Let's say I have four tables: PAGE, USER, TAG, and PAGE-TAG: Table | Fields ------------------------------------------ PAGE | ID, CONTENT TAG | ID, NAME USER | ID, NAME PAGE-TAG | ID, PAGE-ID, TAG-ID, USER-ID And let's say I h...
{ "language": "en", "url": "https://stackoverflow.com/questions/32059", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Nodesets Length In XLST how would you find out the length of a node-set? A: there is no need to put that into a <xsl:variable name="length" select="count(nodes/node)"/> though... you can just print it out as follows: <xsl:value-of select="count(nodes/node)"/> or use it in a if-clause as follows: <xsl:if test="co...
{ "language": "en", "url": "https://stackoverflow.com/questions/32085", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: What tools and languages are available for windows shell scripting? I want to know what are the options to do some scripting jobs in windows platform. I need functionality like file manipulations, registry editing etc. Can files be edited using scripting tools? What other functionality does windows scripting tools o...
{ "language": "en", "url": "https://stackoverflow.com/questions/32087", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: What is the simplest SQL Query to find the second largest value? What is the simplest SQL query to find the second largest integer value in a specific column? There are maybe duplicate values in the column. A: The easiest would be to get the second value from this result set in the application: SELECT DISTINCT val...
{ "language": "en", "url": "https://stackoverflow.com/questions/32100", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "200" }
Q: how do you programmatically invoke a listview label edit in C# I'd like to invoke the label edit of a newly added item to a ListView. basically, if I have a click here to add scenario, as soon as the new item is added, I want the text label to be in a user editable state. Thanks! A: found it! ListViewItem::BeginEdi...
{ "language": "en", "url": "https://stackoverflow.com/questions/32103", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: procmail lockfile utility and NFS Has anyone used the lockfile utility that ships with procmail in conjunction with NFS mounted directories? The lockfile man page states that "Lockfile is NFS-resistant and eight-bit clean." A: I've used it. My company had an very NFS-intensive infrastructure at one point (less so ...
{ "language": "en", "url": "https://stackoverflow.com/questions/32123", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Why can't SQL Server run on a Novell server? I'm not sure whether I'm asking the question correctly, but I've been told SQL Server cannot run on a Novell server. Is this true? If yes, why not? A: Your problem is your directory service, whether it's Microsoft's Active Directory or Novell's Directory Services (I thin...
{ "language": "en", "url": "https://stackoverflow.com/questions/32144", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Is this a reasonable way to handle getters/setters in a PHP class? I'm going to try something with the format of this question and I'm very open to suggestions about a better way to handle it. I didn't want to just dump a bunch of code in the question so I've posted the code for the class on refactormycode. base cla...
{ "language": "en", "url": "https://stackoverflow.com/questions/32145", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Does anyone have a good Proper Case algorithm Does anyone have a trusted Proper Case or PCase algorithm (similar to a UCase or Upper)? I'm looking for something that takes a value such as "GEORGE BURDELL" or "george burdell" and turns it into "George Burdell". I have a simple one that handles the simple cases. The...
{ "language": "en", "url": "https://stackoverflow.com/questions/32149", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "26" }
Q: Best way to export html to Word without having MS Word installed? Is there a way to export a simple HTML page to Word (.doc format, not .docx) without having Microsoft Word installed? A: There's a tool called JODConverter which hooks into open office to expose it's file format converters, there's versions available...
{ "language": "en", "url": "https://stackoverflow.com/questions/32151", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: C++ cast syntax styles A question related to Regular cast vs. static_cast vs. dynamic_cast: What cast syntax style do you prefer in C++? * *C-style cast syntax: (int)foo *C++-style cast syntax: static_cast<int>(foo) *constructor syntax: int(foo) They may not translate to exactly the same instructions (do they?)...
{ "language": "en", "url": "https://stackoverflow.com/questions/32168", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "37" }
Q: Disable asp.net radiobutton with javascript I'm trying to disable a bunch of controls with JavaScript (so that they post back values). All the controls work fine except for my radio buttons as they lose their value. In the below code which is called via a recursive function to disable all child controls the Second e...
{ "language": "en", "url": "https://stackoverflow.com/questions/32173", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Installing a .NET service using InstallUtil I'm trying to install a .NET service I wrote. As recommended by MSDN, I'm using InstallUtil. But I have missed how I can set the default service user on the command-line or even in the service itself. Now, when InstallUtil is run, it will display a dialog asking the use...
{ "language": "en", "url": "https://stackoverflow.com/questions/32175", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "38" }
Q: How do you minimize the number of threads used in a tcp server application? I am looking for any strategies people use when implementing server applications that service client TCP (or UDP) requests: design patterns, implementation techniques, best practices, etc. Let's assume for the purposes of this question that ...
{ "language": "en", "url": "https://stackoverflow.com/questions/32198", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Data model for a extensible web form Suppose that I have a form that contains three 10 fields: field1..field10. I store the form data in one or more database tables, probably using 10 database columns. Now suppose a few months later that I want to add 3 more fields. And in the future I may add/delete fields fro...
{ "language": "en", "url": "https://stackoverflow.com/questions/32227", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Adaptive Database Are there any rapid Database protoyping tools that don't require me to declare a database schema, but rather create it based on the way I'm using my entities. For example, assuming an empty database (pseudo code): user1 = new User() // Creates the user table with a single id column user1.firstName...
{ "language": "en", "url": "https://stackoverflow.com/questions/32231", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Algorithm to format text to Pascal or camel casing Using this question as the base is there an alogrithm or coding example to change some text to Pascal or Camel casing. For example: mynameisfred becomes Camel: myNameIsFred Pascal: MyNameIsFred A: I found a thread with a bunch of Perl guys arguing the toss on thi...
{ "language": "en", "url": "https://stackoverflow.com/questions/32241", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Can PNG image transparency be preserved when using PHP's GDlib imagecopyresampled? The following PHP code snippet uses GD to resize a browser-uploaded PNG to 128x128. It works great, except that the transparent areas in the original image are being replaced with a solid color- black in my case. Even though imagesav...
{ "language": "en", "url": "https://stackoverflow.com/questions/32243", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "113" }
Q: how to get the googlebot to get the correct GEOIPed content? OK. This problem is doing my head in. And I don't know if there even IS a definitive answer. We have a website, lets call it mycompany.com. It's a UK-based site, with UK based content. Google knows about it, and we have done a load of SEO on it. All is wel...
{ "language": "en", "url": "https://stackoverflow.com/questions/32246", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Sending email in .NET through Gmail Instead of relying on my host to send an email, I was thinking of sending the email messages using my Gmail account. The emails are personalized emails to the bands I play on my show. Is it possible to do it? A: If you want to send background email, then please do the below pub...
{ "language": "en", "url": "https://stackoverflow.com/questions/32260", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "951" }
Q: Passing null to a method I am in the middle of reading the excellent Clean Code One discussion is regarding passing nulls into a method. public class MetricsCalculator { public double xProjection(Point p1, Point p2) { return (p2.x - p1.x) * 1.5; } } ... calculator.xProjection(null, new Point(12,13));...
{ "language": "en", "url": "https://stackoverflow.com/questions/32280", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: How can test I regular expressions using multiple RE engines? How can I test the same regex against different regular expression engines? A: Here are some for the Mac: (Note: don't judge the tools by their websites) * *RegExhibit - My Favorite, powerful and easy *Reggy - Simple and Clean *RegexWidget - A Dashb...
{ "language": "en", "url": "https://stackoverflow.com/questions/32282", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "85" }
Q: Why don't the std::fstream classes take a std::string? This isn't a design question, really, though it may seem like it. (Well, okay, it's kind of a design question). What I'm wondering is why the C++ std::fstream classes don't take a std::string in their constructor or open methods. Everyone loves code examples so:...
{ "language": "en", "url": "https://stackoverflow.com/questions/32332", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "36" }
Q: How can I program defensively in Ruby? Here's a perfect example of the problem: Classifier gem breaks Rails. ** Original question: ** One thing that concerns me as a security professional is that Ruby doesn't have a parallel of Java's package-privacy. That is, this isn't valid Ruby: public module Foo public modul...
{ "language": "en", "url": "https://stackoverflow.com/questions/32333", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Are there similar tools to Clone Detective for other languages/IDEs? I just saw Clone Detective linked on YCombinator news, and the idea heavily appeals to me. It seems like it would be useful for many languages, not just C#, but I haven't seen anything similar elsewhere. Edit: For those who don't want to follow the...
{ "language": "en", "url": "https://stackoverflow.com/questions/32338", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How do I list all Entries with a certain tag in Wordpress? I may just be missing this functionality, but does anyone know if there is a widget available: I need to list the subject for all the entries that are associated with a given tag. For example: I have 5 articles tagged with "Tutorial", I'd like to see a list ...
{ "language": "en", "url": "https://stackoverflow.com/questions/32341", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I spawn threads on different CPU cores? Let's say I had a program in C# that did something computationally expensive, like encoding a list of WAV files into MP3s. Ordinarily I would encode the files one at a time, but let's say I wanted the program to figure out how many CPU cores I had and spin up an encodin...
{ "language": "en", "url": "https://stackoverflow.com/questions/32343", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "66" }
Q: 1:1 Foreign Key Constraints How do you specify that a foreign key constraint should be a 1:1 relationship in transact sql? Is declaring the column UNIQUE enough? Below is my existing code.! CREATE TABLE [dbo].MyTable( [MyTablekey] INT IDENTITY(1,1) NOT FOR REPLICATION NOT NULL, [OtherTableKey] INT NOT NULL U...
{ "language": "en", "url": "https://stackoverflow.com/questions/32360", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Assert action redirected to correct action/route? How do I exercise an action to ensure it redirects to the correct action or route? A: public ActionResult Foo() { return RedirectToAction("Products", "Index"); } [Test] public void foo_redirects_to_products_index() { var controller = new BarController(); v...
{ "language": "en", "url": "https://stackoverflow.com/questions/32364", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: What are the key considerations when creating a web crawler? I just started thinking about creating/customizing a web crawler today, and know very little about web crawler/robot etiquette. A majority of the writings on etiquette I've found seem old and awkward, so I'd like to get some current (and practical) insigh...
{ "language": "en", "url": "https://stackoverflow.com/questions/32366", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Disable browser 'Save Password' functionality One of the joys of working for a government healthcare agency is having to deal with all of the paranoia around dealing with PHI (Protected Health Information). Don't get me wrong, I'm all for doing everything possible to protect people's personal information (health, fi...
{ "language": "en", "url": "https://stackoverflow.com/questions/32369", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "457" }
Q: What is a good open source B-tree implementation in C? I am looking for a lean and well constructed open source implementation of a B-tree library written in C. It needs to be under a non-GPL license so that it can be used in a commercial application. Ideally, this library supports the B-tree index to be stored/mani...
{ "language": "en", "url": "https://stackoverflow.com/questions/32376", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "34" }
Q: Programmatically editing Python source This is something that I think would be very useful. Basically, I'd like there to be a way to edit Python source programmatically without requiring human intervention. There are a couple of things I would like to do with this: * *Edit the configuration of Python apps that ...
{ "language": "en", "url": "https://stackoverflow.com/questions/32385", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Accessing static fields in XAML How does one go about referencing a class's static properties in xaml? In other words, I want to do something like this: Class BaseThingy { public static readonly Style BaseStyle; ... } <ResoureDictionary ...> <Style BasedOn="BaseThingy.Style" TargetType="BaseThingy" /> </Reso...
{ "language": "en", "url": "https://stackoverflow.com/questions/32395", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Popularity algorithm On SO 18 Joel mentioned an algorithm that would rank items based on their age and popularity and it's based on gravity. Could someone post this? C# would be lovely, but really any language (well, I can't do LISP) would be fine. A: alt text http://www.mt-soft.com.ar/wordpress/wp-content/plugi...
{ "language": "en", "url": "https://stackoverflow.com/questions/32397", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: Validate a UK phone number How do I validate a UK phone number in C# using a regex? A: The regex in the accepted answer does not match all valid UK numbers, as it is too restricive (additional number ranges have been opened up in the meanwhile such as 0203, which it sees as invalid). UK phone numbers follow fairly ...
{ "language": "en", "url": "https://stackoverflow.com/questions/32401", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How do you run a Python script as a service in Windows? I am sketching the architecture for a set of programs that share various interrelated objects stored in a database. I want one of the programs to act as a service which provides a higher level interface for operations on these objects, and the other programs to...
{ "language": "en", "url": "https://stackoverflow.com/questions/32404", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "324" }
Q: What's the best way of cleaning up after a SQL Injection? I've been tasked with the the maintenance of a nonprofit website that recently fell victim to a SQL injection attack. Someone exploited a form on the site to add text to every available text-like field in the database (varchar, nvarchar, etc.) which, when ren...
{ "language": "en", "url": "https://stackoverflow.com/questions/32412", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: How can I force clients to refresh JavaScript files? We are currently working in a private beta and so are still in the process of making fairly rapid changes, although obviously as usage is starting to ramp up, we will be slowing down this process. That being said, one issue we are running into is that after we pu...
{ "language": "en", "url": "https://stackoverflow.com/questions/32414", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "691" }
Q: How do I resolve a System.Security.SecurityException with custom code in SSRS? I've created an assembly and referenced it in my Reporting Services report. I've tested the report locally (works), and I then uploaded the report to a report server (doesn't work). Here is the error that is thrown by the custom code I've...
{ "language": "en", "url": "https://stackoverflow.com/questions/32428", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Creating a LINQ select from multiple tables This query works great: var pageObject = (from op in db.ObjectPermissions join pg in db.Pages on op.ObjectPermissionName equals page.PageName where pg.PageID == page.PageID select op) .SingleOrDefault()...
{ "language": "en", "url": "https://stackoverflow.com/questions/32433", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "54" }
Q: Which 4.x version of gcc should one use? The product-group I work for is currently using gcc 3.4.6 (we know it is ancient) for a large low-level c-code base, and want to upgrade to a later version. We have seen performance benefits testing different versions of gcc 4.x on all hardware platforms we tested it on. We a...
{ "language": "en", "url": "https://stackoverflow.com/questions/32448", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Random data in Unit Tests? I have a coworker who writes unit tests for objects which fill their fields with random data. His reason is that it gives a wider range of testing, since it will test a lot of different values, whereas a normal test only uses a single static value. I've given him a number of different reas...
{ "language": "en", "url": "https://stackoverflow.com/questions/32458", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "180" }
Q: Get the DefaultView DataRowView from a DataRow Here's the situation: I need to bind a WPF FixedPage against a DataRow. Bindings don't work against DataRows; they work against DataRowViews. I need to do this in the most generic way possible, as I know nothing about and have no control over what is in the DataRow. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/32460", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Pulling limited tagged photos from Flickr So I've got a hobby site I'm working on. I've got items that are tagged and I want to associate those items with photos from Flickr. Even with restrictive searches, I might get results numbering in the thousands. Requirements: * *I want to display between 10-20 pictures...
{ "language": "en", "url": "https://stackoverflow.com/questions/32462", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }