text
stringlengths
8
267k
meta
dict
Q: Is there a free/pay web service that I can query to get MLS data? Given an MLS#, I'd like to get an XML document with details about the listing, like address, price and such. Not a NAR or CREA member. Mostly interested in North American rental property listing data. A: If you're an NAR member, you can utilize their...
{ "language": "en", "url": "https://stackoverflow.com/questions/130170", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: IE TextRange select method not working properly I'm having an unusual problem with an IE document with contentEditable set to true. Calling select() on a range that is positioned at the end of a text node that immediately precedes a block element causes the selection to be shifted to the right one character and app...
{ "language": "en", "url": "https://stackoverflow.com/questions/130186", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: how can i change this view? I want to index this view but because it has subquery i cant index. Can anyone suggest how to change this view so that i can index it. ALTER VIEW [dbo].[Recon2] WITH SCHEMABINDING AS SELECT dbo.Transactions.CustomerCode, dbo.Customer_Master.CustomerName, dbo.Transactions.TransDate,...
{ "language": "en", "url": "https://stackoverflow.com/questions/130187", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: Expressing an is-a relationship in a relational database I was wondering if there is a clean way to represent an is-a relationship as illustrated by this example: This DB stores recording times for three types of programs: movies, game shows, drama. In an object oriented sense each of these is-a program. Each of the...
{ "language": "en", "url": "https://stackoverflow.com/questions/130192", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Is it possible to modify a registry entry via a .bat/.cmd script? Is it possible to modify a registry value (whether string or DWORD) via a .bat/.cmd script? A: You can use the REG command. From http://www.ss64.com/nt/reg.html: Syntax: REG QUERY [ROOT\]RegKey /v ValueName [/s] REG QUERY [ROOT\]RegKey /ve --...
{ "language": "en", "url": "https://stackoverflow.com/questions/130193", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "51" }
Q: What's the best way to instantiate a generic from its name? Assuming I have only the class name of a generic as a string in the form of "MyCustomGenericCollection(of MyCustomObjectClass)" and don't know the assembly it comes from, what is the easiest way to create an instance of that object? If it helps, I know tha...
{ "language": "en", "url": "https://stackoverflow.com/questions/130208", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: What is a good algorithm for compacting records in a blocked file? Suppose you have a large file made up of a bunch of fixed size blocks. Each of these blocks contains some number of variable sized records. Each record must fit completely within a single block and then such records by definition are never larger tha...
{ "language": "en", "url": "https://stackoverflow.com/questions/130227", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Is it possible to do a SVN export without shell access? I started using subversion for one of my projects and it would be absolutely amazing if I could just export the latest version from the repository on my production server by for example running a php or perl script. The production site is hosted with a shared h...
{ "language": "en", "url": "https://stackoverflow.com/questions/130233", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to package a Linux binary for my Open Source application? I have an Open Source app and I currently only post the binary for the Windows build. At this point Linux users have to get the source and compile it. Is there a standard way for posting a Linux binary? My app is in c / c++ and compiled with gcc, the onl...
{ "language": "en", "url": "https://stackoverflow.com/questions/130237", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Can I use a generated variable name in PHP? I have a bunch a values I would like to add together which are entered into a form. Right now, the form has 11 lines but it could get larger in the future. I can easily add all the values together with something like: $total = $value1 + $value2 + ... + $value11; All the v...
{ "language": "en", "url": "https://stackoverflow.com/questions/130240", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I efficiently filter computed values within a Python list comprehension? The Python list comprehension syntax makes it easy to filter values within a comprehension. For example: result = [x**2 for x in mylist if type(x) is int] Will return a list of the squares of integers in mylist. However, what if the t...
{ "language": "en", "url": "https://stackoverflow.com/questions/130262", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "22" }
Q: Impact of AWS Account Identifiers I'm using Amazon's tools to build a web app. I'm very happy with them, but I have a security concern. Right now, I'm using multiple EC2 instances, S3, SimpleDB and SQS. In order to authenticate requests to the different services, you include your Access Identifiers (login required)....
{ "language": "en", "url": "https://stackoverflow.com/questions/130264", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: How to eager load objects with a custom join in rails? Background Normal rails eager-loading of collections works like this: Person.find(:all, :include=>:companies) This generates some sql which does LEFT OUTER JOIN companies ON people.company_id = companies.id Question However, I need a custom join (this could al...
{ "language": "en", "url": "https://stackoverflow.com/questions/130268", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "33" }
Q: .cmd and .bat file converting return code to an error message I'm trying to automate a program I made with a test suite via a .cmd file. I can get the program that I ran's return code via %errorlevel%. My program has certain return codes for each type of error. For example: 1 - means failed for such and such a rea...
{ "language": "en", "url": "https://stackoverflow.com/questions/130273", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: streaming wav files I have a server that sends data via a socket, the data is a wav 'file'. I can easily write the data to disk and then play it in WMP, but I have no idea how I can play it as I read it from the socket. Is it possible? Bonus question: how would I do it if the stream was in mp3 or other format? This ...
{ "language": "en", "url": "https://stackoverflow.com/questions/130287", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: What is the proper way to inject a data access dependency for lazy loading? What is the proper way to inject a data access dependency when I do lazy loading? For example I have the following class structure class CustomerDao : ICustomerDao public Customer GetById(int id) {...} class Transaction { int customer_i...
{ "language": "en", "url": "https://stackoverflow.com/questions/130292", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Getting stated with NHibernate. Real world project example? One of my goals over the next few months is to get familiar with NHibernate and am curious if anyone out there has any suggestions of where to begin. Preferably, I'd like to find a example project that demonstrates what you would see in an in-the-field appl...
{ "language": "en", "url": "https://stackoverflow.com/questions/130306", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Cross-model relationships in NSManagedObjectModel from merged models? Is it possible to model relationships between entities that are defined in separate NSManagedObjectModels if the entities are always used within an NSManagedObjectModel that is created by merging the relevant models? For example, say model 1 defin...
{ "language": "en", "url": "https://stackoverflow.com/questions/130316", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Haskell newbie: use layout or not? What are the pro's and con's (use examples) I cant seem to find much info on haskells layout features, as I understand it is something like pythons formatting requirements except that is optional. How can I choose not to use this option correctly? Would it be a good idea to start w...
{ "language": "en", "url": "https://stackoverflow.com/questions/130317", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do you pass a member function pointer? I am trying to pass a member function within a class to a function that takes a member function class pointer. The problem I am having is that I am not sure how to properly do this within the class using the this pointer. Does anyone have suggestions? Here is a copy of th...
{ "language": "en", "url": "https://stackoverflow.com/questions/130322", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "27" }
Q: nHibernate isn't retrieving manually changed data nHibernate is not able to retrieve manually changed data from repository table? I have disabled second level cache also but looks like it(nhibernate) is retrieving sometimes from cache and sometimes from repository table. A: There are two types of caches in nhiberna...
{ "language": "en", "url": "https://stackoverflow.com/questions/130324", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Linux-based solution for domain management? Using any member of the Windows Server family, I can set up an active directory, and have a single pool of users for a large scale of computers; access can be given / removed for any shared resources in the given domain (including access to client computers, etc). What sim...
{ "language": "en", "url": "https://stackoverflow.com/questions/130327", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do I get the caller's IP address in a WebMethod? How do I get the caller's IP address in a WebMethod? [WebMethod] public void Foo() { // HttpRequest... ? - Not giving me any options through intellisense... } using C# and ASP.NET A: Just a caution. IP addresses can't be used to uniquely identify clients. NA...
{ "language": "en", "url": "https://stackoverflow.com/questions/130328", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "54" }
Q: How do you prevent a user from posting data multiple times on a website I am working on a web application (J2EE) and I would like to know the options that are available for handling a double post from the browser. The solutions that I have seen and used in the past are all client-side: * *Disable the submit butto...
{ "language": "en", "url": "https://stackoverflow.com/questions/130337", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: Webpart feature not adding Description I am adding a webpart to the webpart gallery as part of a feature within a solution. When the webpart is added to the gallery, the webparts Description field is being overwritten by an empty string. I have added a description to everywhere I can think of, including: * *The ...
{ "language": "en", "url": "https://stackoverflow.com/questions/130352", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I simulate a low bandwidth, high latency environment? I need to simulate a low bandwidth, high latency connection to a server in order to emulate the conditions of a VPN at a remote site. The bandwidth and latency should be tweakable so I can discover the best combination in order to run our software package....
{ "language": "en", "url": "https://stackoverflow.com/questions/130354", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "221" }
Q: Can you keep Visual Studio source control binding info out of .sln and .csproj files? My Visual Studio 2005 is storing the info about which projects and solutions go with which source control repositories in the .sln and .csproj files. Is it possible to make it store that binding information in some external file in...
{ "language": "en", "url": "https://stackoverflow.com/questions/130358", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Are there constants in JavaScript? Is there a way to use constants in JavaScript? If not, what's the common practice for specifying variables that are used as constants? A: Yet there is no exact cross browser predefined way to do it , you can achieve it by controlling the scope of variables as showed on other answe...
{ "language": "en", "url": "https://stackoverflow.com/questions/130396", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1175" }
Q: JavaScript data formatting/pretty printer I'm trying to find a way to "pretty print" a JavaScript data structure in a human-readable form for debugging. I have a rather big and complicated data structure being stored in JS and I need to write some code to manipulate it. In order to work out what I'm doing and where ...
{ "language": "en", "url": "https://stackoverflow.com/questions/130404", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "129" }
Q: Call a certain method before each webservice call Here's the situation. I have a webservice (C# 2.0), which consists of (mainly) a class inheriting from System.Web.Services.WebService. It contains a few methods, which all need to call a method that checks if they're authorized or not. Basically something like this (...
{ "language": "en", "url": "https://stackoverflow.com/questions/130427", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Auto-organize Visual Studio Tabs? Is there any setting in Visual Studio 2008 to group/organize tabs? For example, I'd prefer to have all code-behind files open in a tab next to its .aspx page if that page is open and vice versa. Dragging tabs around really kills my productivity. A: Jonathan, Tabs Studio (developed...
{ "language": "en", "url": "https://stackoverflow.com/questions/130431", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Do UTF-8, UTF-16, and UTF-32 differ in the number of characters they can store? Okay. I know this looks like the typical "Why didn't he just Google it or go to www.unicode.org and look it up?" question, but for such a simple question the answer still eludes me after checking both sources. I am pretty sure that all t...
{ "language": "en", "url": "https://stackoverflow.com/questions/130438", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "54" }
Q: Should I store all projects in one repository or multiple? I am currently using TortoiseSVN to manage a couple of the projects that I have on the go at the moment. When I first moved everything into source control I wasn't really sure how everything should be laid out so I ended up putting each project into its own...
{ "language": "en", "url": "https://stackoverflow.com/questions/130447", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "38" }
Q: How does AOP apply to Drupal? How does AOP (Aspect Oriented Programming) work in Drupal? I have learned about AOP in terms of using it for logging and security, but how does it apply to Drupal? A: Drupal mimics AOP paradigms through hooks, which basically allow developers to weave in bits of code during the flow of...
{ "language": "en", "url": "https://stackoverflow.com/questions/130467", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Why is Lisp used for AI? I've been learning Lisp to expand my horizons because I have heard that it is used in AI programming. After doing some exploring, I have yet to find AI examples or anything in the language that would make it more inclined towards it. Was Lisp used in the past because it was available, or is ...
{ "language": "en", "url": "https://stackoverflow.com/questions/130475", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "196" }
Q: Does a hash shrink in Perl as you delete elements? Does a hash shrink in Perl as you delete elements. More specifically I had a perl program that I inherited that would parse a huge file ( 1 GB ) and load up a hash of hashes. it would do that same for another file and then do a comparison of different elements. The...
{ "language": "en", "url": "https://stackoverflow.com/questions/130486", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: In .net, what's the best / safest way to add a "end of line" character to a text file? I assume there must be a system and language independent way to just stick the "current" EOL character into a text file, but my MSDN-fu seems to be weak today. Bonus points if there is a way to do this in a web application that w...
{ "language": "en", "url": "https://stackoverflow.com/questions/130492", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Is there a source code formatter for Groovy? I use the commercial version of Jalopy for my Java projects but it doesn't work on Groovy files. IntelliJ has a serviceable formatter but I don't like requiring a particular IDE. A: Try "BUSL" 2022-10-26 NOTE: HISTORIC. "BUSL" seems to be dead. Last archived webpage is ...
{ "language": "en", "url": "https://stackoverflow.com/questions/130494", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "27" }
Q: MFC "Warning: skipping non-radio button in group." When running an old MFC application in Visual Studio's debugger I've seen a lot of warnings in the Output window like the following: Warning: skipping non-radio button in group. I understand that in MFC you put radio buttons in groups to indicate which sets of rad...
{ "language": "en", "url": "https://stackoverflow.com/questions/130496", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Oracle load spikes couple hours after startup We use oracle as the back-end database for our product. I have been running series of stress tests on our system and I have started noticing that oracle is much faster right after the database was restarted. Over time (a couple hours or so) the database seems to get slow...
{ "language": "en", "url": "https://stackoverflow.com/questions/130500", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How many threads should I use in my Java program? I recently inherited a small Java program that takes information from a large database, does some processing and produces a detailed image regarding the information. The original author wrote the code using a single thread, then later modified it to allow it to use m...
{ "language": "en", "url": "https://stackoverflow.com/questions/130506", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: How can I use WPF's D3DImage with managed DirectX or XNA? I'd really like to get into some D3D coding, but I don't have the time lately to learn C++ for what will amount to a hobby project. A: It's not officially supported as far as I know. Looks like some folks hacked it to make it work. A: Looks like this might ...
{ "language": "en", "url": "https://stackoverflow.com/questions/130507", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: PHP: Current encoding used to send data to the browser How can I know what encoding will be used by PHP when sending data to the browser? I.e. with the Cotent-Type header, for instance: iso-8859-1. A: You can use the header() solution that William suggested, however if you are running Apache, and the Apache config ...
{ "language": "en", "url": "https://stackoverflow.com/questions/130511", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Renaming Objects in PowerPoint Probably a very stupid question but I can't figure how to rename an object in PowerPoint.. For example, all my Graphs are called by default "Graph 1" etc. Could someone help me on that? Thanks! A: In PowerPoint 2007 you can do this from the Selection pane. To show the Selection pane,...
{ "language": "en", "url": "https://stackoverflow.com/questions/130526", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: Can anyone recommend a good Hashtable implementation in Javascript? I've found jCache and some other home-grown methods using associative arrays. If you've had experience with jCache, were there any limitations?
{ "language": "en", "url": "https://stackoverflow.com/questions/130543", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "28" }
Q: In FinalBuilder, how do I use the HTTP Get File action with Windows Authentication? I have a FinalBuilder project where I deploy an ASP.Net website to a remote folder, configured as a website in IIS. As part of my build script, I want to use the FinalBuilder action HTTP Get File to help determine whether my deployme...
{ "language": "en", "url": "https://stackoverflow.com/questions/130546", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Setting up Rails to work with sqlserver Ok I followed the steps for setting up ruby and rails on my Vista machine and I am having a problem connecting to the database. Contents of database.yml development: adapter: sqlserver database: APPS_SETUP Host: WindowsVT06\SQLEXPRESS Username: se Password: paswd Ru...
{ "language": "en", "url": "https://stackoverflow.com/questions/130547", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Example client implementation for the Service Location Protocol? Does anyone know of a good example implementation of the Service Location Protocol that can be build/ran on a windows box? A: OpenSLP is said to compile fine on Windows. A: OpenSLP referenced above is the code base that Novell uses for its SLP implem...
{ "language": "en", "url": "https://stackoverflow.com/questions/130558", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: update page text using web user control I am building an application where a page will load user controls (x.ascx) dynamically based on query string. I have a validation summary on the page and want to update it from the User Controls. This will allow me to have multiple controls using one Validation Summary. How c...
{ "language": "en", "url": "https://stackoverflow.com/questions/130561", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can I let a table's body scroll but keep its head fixed in place? I am writing a page where I need an HTML table to maintain a set size. I need the headers at the top of the table to stay there at all times but I also need the body of the table to scroll no matter how many rows are added to the table. Think a mi...
{ "language": "en", "url": "https://stackoverflow.com/questions/130564", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "148" }
Q: In Installshield, what is the best event to use to launch applications only on install, not on uninstall or repair? We have recently moved back to InstallShield 2008 from rolling our own install. So, I am still trying to get up the learning curve on it. We are using Firebird and a usb driver, that we couldn't find ...
{ "language": "en", "url": "https://stackoverflow.com/questions/130570", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Does the windows FILETIME structure include leap seconds? The FILETIME structure counts from January 1 1601 (presumably the start of that day) according to the Microsoft documentation, but does this include leap seconds? A: Here's some more info about why that particular date was chosen. The FILETIME structure rec...
{ "language": "en", "url": "https://stackoverflow.com/questions/130573", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: Decoding letters ('a' .. 'z') from a bit sequence without waste I seek an algorithm that will let me represent an incoming sequence of bits as letters ('a' .. 'z' ), in a minimal matter such that the stream of bits can be regenerated from the letters, without ever holding the entire sequence in memory. That is, give...
{ "language": "en", "url": "https://stackoverflow.com/questions/130574", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do you like the new Ribbon Controls in D2009? How do they compare to the DevXpress ones or the original MSOffice ones. Are they worth investing time in them (for practical usage now, not academic curiosity which I'll do anyway)? A: From my experience, the new ribbon control implements the entire specification a...
{ "language": "en", "url": "https://stackoverflow.com/questions/130576", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Preferred protocols to upload static files to your Apache server? If you were the administrator of an Apache web server, what protocol(s) would you prefer to provide, for the web developers to upload static files (html/gif/css/...), with the goal of maximum security ? If you were the web developer/graphic designer, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/130585", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to pass all Visual Studio 2008 "Macros" to Python script? [NOTE: This questions is similar to but not the same as this one.] Visual Studio defines several dozen "Macros" which are sort of simulated environment variables (completely unrelated to C++ macros) which contain information about the build in progress. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/130587", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to implement a company-internal icon gallery I love writing my own web-based applications, but don't want to succumb to the not invented here syndrome. So before I go write this myself, I'm looking for solutions that either do this, or perhaps frameworks (like Django or Joomla, etc.) that give me a starting poi...
{ "language": "en", "url": "https://stackoverflow.com/questions/130589", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Is Continuous Integration important for a solo developer? I've never used CI tools before, but from what I've read, I'm not sure it would provide any benefit to a solo developer that isn't writing code every day. First - what benefits does CI provide to any project? Second - who should use CI? Does it benefit all de...
{ "language": "en", "url": "https://stackoverflow.com/questions/130592", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "70" }
Q: Looking for a .NET Function that sums up number and instead of overflowing simply returns int.MaxValue I use int.MaxValue as a penalty and sometimes I am computing the penalties together. Is there a function or how would you create one with the most grace and efficiency that does that. ie. 50 + 100 = 150 int.Max +...
{ "language": "en", "url": "https://stackoverflow.com/questions/130604", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Can LINQ (to SQL) do bitwise queries? I have a table of Users that includes a bitmask of roles that the user belongs to. I'd like to select users that belong to one or more of the roles in a bitmask value. For example: select * from [User] where UserRolesBitmask | 22 = 22 This selects all users that have the role...
{ "language": "en", "url": "https://stackoverflow.com/questions/130605", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Change cardinality of item in C# dictionary I've got a dictionary, something like Dictionary<Foo,String> fooDict I step through everything in the dictionary, e.g. foreach (Foo foo in fooDict.Keys) MessageBox.show(fooDict[foo]); It does that in the order the foos were added to the dictionary, so the first item ...
{ "language": "en", "url": "https://stackoverflow.com/questions/130614", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Starting service as a user with no password I'm trying to start a service as a user and things work fine, until I try a user that doesn't have a password. Then, it fails to start (due to log-on error). Am I doing something wrong or is this "by design"? The code to register this service: SC_HANDLE schService = Cr...
{ "language": "en", "url": "https://stackoverflow.com/questions/130616", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do you check for permissions to write to a directory or file? I got a program that writes some data to a file using a method like the one below. public void ExportToFile(string filename) { using(FileStream fstream = new FileStream(filename,FileMode.Create)) using (TextWriter writer = new StreamWriter(...
{ "language": "en", "url": "https://stackoverflow.com/questions/130617", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "62" }
Q: Python Date Comparisons I would like to find out if a particular python datetime object is older than X hours or minutes. I am trying to do something similar to: if (datetime.now() - self.timestamp) > 100 # Where 100 is either seconds or minutes This generates a type error. What is the proper way to do date time...
{ "language": "en", "url": "https://stackoverflow.com/questions/130618", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "64" }
Q: How to compile Clisp 2.46? When I try to compile the newest version of Clisp on Ubuntu 8.04 I always get this error after running configure: Configure findings: FFI: no (user requested: default) readline: yes (user requested: yes) libsigsegv: no, consider installing GNU libsigsegv ./configure: libsigsegv wa...
{ "language": "en", "url": "https://stackoverflow.com/questions/130636", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: ACCESS_VIOLATION_BAD_IP I am trying to figure out a crash in my application. WinDbg tells me the following: (using dashes in place of underscores) LAST-CONTROL-TRANSFER: from 005f5c7e to 6e697474 DEFAULT-BUCKET-ID: BAD_IP BUGCHECK-STR: ACCESS-VIOLATION It is obvious to me that 6e697474 is NOT a valid address. I h...
{ "language": "en", "url": "https://stackoverflow.com/questions/130637", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Is there a reasonable way to implement a cd command on VMS? I would like to be able to say things like cd [.fred] and have my default directory go there, and my prompt change to indicate the full path to my current location. A: Just type cd:==set default at the command prompt. You can also put this in your LOGIN....
{ "language": "en", "url": "https://stackoverflow.com/questions/130640", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Combining two executables I have a command line executable that alters some bits in a file that i want to use from my program. Is it possible to create my own executable that uses this tool and distribute only one executable? [edit] Clarification: The command line tool takes an offset and some bits and changes the b...
{ "language": "en", "url": "https://stackoverflow.com/questions/130664", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I protect quotes in a batch file? I want to wrap a Perl one-liner in a batch file. For a (trivial) example, in a Unix shell, I could quote up a command like this: perl -e 'print localtime() . "\n"' But DOS chokes on that with this helpful error message: Can't find string terminator "'" anywhere before EOF a...
{ "language": "en", "url": "https://stackoverflow.com/questions/130698", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How do you access Control.ViewState with a dynamically added Control subclass? We have created a control that needs to persist data via the ViewState property of the Control class. Our class subclasses control strictly to get access to the ViewState property (it's protected on the Page object). We are adding the con...
{ "language": "en", "url": "https://stackoverflow.com/questions/130705", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Expanding a Region will expand children in Visual Studio I am developing an ASP.NET Ajax form, and decided to make most of the site in one page, because it isn't a very involved site (it's more of a form). In the codebehind, I have been making my code more organized by adding regions to it (inside are the click even...
{ "language": "en", "url": "https://stackoverflow.com/questions/130708", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How long would it take to setup a new CI repository? I wonder how long it would usually take for: * *Professional *Average *Beginner to setup and configure CI for a new project? A: I have never set up CI before, which puts me squarely in your "Beginner" category. Your question nudged me to try and setup a CI...
{ "language": "en", "url": "https://stackoverflow.com/questions/130711", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Flex: Why can't I handle certain events? In certain cases, I can't seem to get components to receive events. [edit] To clarify, the example code is just for demonstration sake, what I was really asking was if there was a central location that a listener could be added, to which one can reliably dispatch events to a...
{ "language": "en", "url": "https://stackoverflow.com/questions/130720", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Impersonating a User in Asp.Net My DBA requires all database access to be done through trusted domain account. This can be done if you set the web.config . This requires the user to login or to be on the domain for IE pass the credentials through. I want to impersonate a user by using code. I am using the code ...
{ "language": "en", "url": "https://stackoverflow.com/questions/130721", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to unit test immutable class constructors? I have an immutable class with some private fields that are set during the constructor execution. I want to unit test this constructor but I'm not sure the "best practice" in this case. Simple Example This class is defined in Assembly1: public class Class2Test { pr...
{ "language": "en", "url": "https://stackoverflow.com/questions/130730", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How can one close HTML tags in Vim quickly? It's been a while since I've had to do any HTML-like code in Vim, but recently I came across this again. Say I'm writing some simple HTML: <html><head><title>This is a title</title></head></html> How do I write those closing tags for title, head and html down quickly? I f...
{ "language": "en", "url": "https://stackoverflow.com/questions/130734", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "127" }
Q: Link error when compiling gcc atomic operation in 32-bit mode I have the following program: ~/test> cat test.cc int main() { int i = 3; int j = __sync_add_and_fetch(&i, 1); return 0; } I'm compiling this program using GCC 4.2.2 on Linux running on a multi-cpu 64-bit Intel machine: ~/test> uname --all Linux do...
{ "language": "en", "url": "https://stackoverflow.com/questions/130740", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: Best way to swap two .NET controls based on radio buttons I've got a form where I have two radio buttons and two interchangeable controls (made up of a ListView and a handful of buttons). Based on which radio button is selected I want to display the proper control to the user. The way I'm doing this now is just load...
{ "language": "en", "url": "https://stackoverflow.com/questions/130748", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Last time a Stored Procedure was executed On Sql Server 2000, is there a way to find out the date and time when a stored procedure was last executed? A: Not without logging or tracing, I'm afraid A: If a stored procedure is still in the procedure cache, you can find the last time it was executed by querying the s...
{ "language": "en", "url": "https://stackoverflow.com/questions/130753", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: Request UAC elevation from within a Python script? I want my Python script to copy files on Vista. When I run it from a normal cmd.exe window, no errors are generated, yet the files are NOT copied. If I run cmd.exe "as administator" and then run my script, it works fine. This makes sense since User Account Control (...
{ "language": "en", "url": "https://stackoverflow.com/questions/130763", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "121" }
Q: Is a variable named i unacceptable? As far as variable naming conventions go, should iterators be named i or something more semantic like count? If you don't use i, why not? If you feel that i is acceptable, are there cases of iteration where it shouldn't be used? A: Here's another example of something that's perfe...
{ "language": "en", "url": "https://stackoverflow.com/questions/130775", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: Can you use Decision Tables in Relational Databases I heard that decision tables in relational database have been researched a lot in academia. I also know that business rules engines use decision tables and that many BPMS use them as well. I was wondering if people today use decision tables within their relational...
{ "language": "en", "url": "https://stackoverflow.com/questions/130789", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: GDI+ System.Drawing.Bitmap gives error Parameter is not valid intermittently I have some C# code in an ASP.Net application that does this: Bitmap bmp = new Bitmap(1184, 1900); And occasionally it throws an exception "Parameter is not valid". Now i've been googling around and apparently GDI+ is infamous for throwing ...
{ "language": "en", "url": "https://stackoverflow.com/questions/130790", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: What is dependency injection? There have been several questions already posted with specific questions about dependency injection, such as when to use it and what frameworks are there for it. However, What is dependency injection and when/why should or shouldn't it be used? A: Before going to the technical descript...
{ "language": "en", "url": "https://stackoverflow.com/questions/130794", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3548" }
Q: Data visualization in desktop applications I would like to create data visualizations in desktop apps, using frameworks, languages and libraries that help with this kind of task. Visualizations should be interactive: clickable, draggable, customizable, animated... What I would like to create is something similar to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/130800", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do you create tests for "make check" with GNU autotools I'm using GNU autotools for the build system on a particular project. I want to start writing automated tests for verifcation. I would like to just type "make check" to have it automatically run these. My project is in C++, although I am still curious about...
{ "language": "en", "url": "https://stackoverflow.com/questions/130801", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "31" }
Q: VB.NET - Application has encountered a user-defined breakpoint I'm not that up on VB.NET, the application I'm working on was not written by myself. It works fine through the IDE but once I run it from the exe it gives me the above error. Any clues? This is really hacking me off! A: The only user defined break point...
{ "language": "en", "url": "https://stackoverflow.com/questions/130803", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Performance penalty on putting classes in aspx and ascx codebehinds What's the performance penalty on defining classes in an aspx/ascx codebehind rather than compiling them into a dll beforehand? I know that this isn't a best practice and that there are numerous problems with this (e.g. difficult to unit test, code...
{ "language": "en", "url": "https://stackoverflow.com/questions/130814", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Write VB6 on Visual Studio 2008 without .NET support? I have to continue to support VB6 applications. I've got both VB6 (Visual Studio 6) installed and Visual Studio 2008 as well. Can I read and write to VB6 projects while in Visual Studio 2008? Will it damage or destroy my VB6 application? It would be very c...
{ "language": "en", "url": "https://stackoverflow.com/questions/130819", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: JQuery TypeWatch Functionality in Delphi TypeWatch is a JQuery plugin that monitors the time between key strokes in a text input box. It allows for features like refreshing of search results as a user types their search terms, as demonstrated in the 'Users' page in Stack Overflow. If you are typing in the name o...
{ "language": "en", "url": "https://stackoverflow.com/questions/130822", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: 3d to 2d Projection Matrix I have 3 points in a 3D space of which I know the exact locations. Suppose they are: (x0,y0,z0), (x1,y1,z1) and (x2,y2,z2). Also I have a camera that is looking at these 3 points and I know the 2D locations of those three points on camera view plane. So for example (x0,y0,z0) will be (x0',...
{ "language": "en", "url": "https://stackoverflow.com/questions/130829", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: What's the (JavaScript) Regular Expression I should use to ensure a string is a valid file name? I'm still learning RegEx at the moment, but for the time being could someone help me out with this? I have a few special requirements for formatting the string: * *No directories. JUST the file name. *File name nee...
{ "language": "en", "url": "https://stackoverflow.com/questions/130837", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do I add a using Element with Prototype in IE6? Using Prototype 1.6's "new Element(...)" I am trying to create a <table> element with both a <thead> and <tbody> but nothing happens in IE6. var tableProto = new Element('table').update('<thead><tr><th>Situation Task</th><th>Action</th><th>Result</th></tr></thead>...
{ "language": "en", "url": "https://stackoverflow.com/questions/130843", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How do you determine Daylight Savings Time in VBA? What function will let us know whether a date in VBA is in DST or not? A: For non-current dates (DST 2007+): First, you need a function to find the number of specific weekdays in a month: Public Function NDow(Y As Integer, M As Integer, _ N As Integ...
{ "language": "en", "url": "https://stackoverflow.com/questions/130877", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Global or Singleton for database connection? What is the benefit of using singleton instead of global for database connections in PHP? I feel using singleton instead of global makes the code unnecessarily complex. Code with Global $conn = new PDO(...); function getSomething() { global $conn; . . . }...
{ "language": "en", "url": "https://stackoverflow.com/questions/130878", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "81" }
Q: How to build a Debian/Ubuntu package from source? I have the source of a program (taken from cvs/svn/git/...) and I'd like to build a Debian/Ubuntu package for it. The package is present in the repositories, but: * *It is an older version (lacking features I need) *I need slightly different compile options than ...
{ "language": "en", "url": "https://stackoverflow.com/questions/130894", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "118" }
Q: Introduction to C# list comprehensions How can I perform list comprehensions in C#? A: A List Comprehension is a type of set notation in which the programmer can describe the properties that the members of a set must meet. It is usually used to create a set based on other, already existing, set or sets by applying ...
{ "language": "en", "url": "https://stackoverflow.com/questions/130898", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "67" }
Q: What is the state of C++ refactor support in Eclipse? Is it at the state where it is actually useful and can do more than rename classes? A: CDT (C/C++ Development Tools - eclipse project) 5.0 has a bunch of new refactorings * Declare Method * Extract Baseclass * Extract Constant * Extract Method * Extract Subclass...
{ "language": "en", "url": "https://stackoverflow.com/questions/130913", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: Keeping a file in the OS block buffer I need to keep as much as I can of large file in the operating system block cache even though it's bigger than I can fit in ram, and I'm continously reading another very very large file. ATM I'll remove large chunk of large important file from system cache when I stream read for...
{ "language": "en", "url": "https://stackoverflow.com/questions/130916", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Design & Coding - top to bottom or bottom to top? When coding, what in your experience is a better approach? * *Break the problem down into small enough pieces and then implement each piece. *Break the problem down, but then implement using a top-down approach. *Any other? A: You might want to look over the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/130933", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }