content
stringlengths
86
88.9k
title
stringlengths
0
150
question
stringlengths
1
35.8k
answers
list
answers_scores
list
non_answers
list
non_answers_scores
list
tags
list
name
stringlengths
30
130
Q: Offsite backups I was recently tasked with coming up with an offsite backup strategy. We have about 2TB of data that would need to be backed up so our needs are a little out of the norm. I looked into Iron Mountain and they wanted $12,000 a month! Does anyone have any suggestions on how best to handle backing up...
Offsite backups
I was recently tasked with coming up with an offsite backup strategy. We have about 2TB of data that would need to be backed up so our needs are a little out of the norm. I looked into Iron Mountain and they wanted $12,000 a month! Does anyone have any suggestions on how best to handle backing up this much data on a ...
[ "You can buy external eSATA RAID boxes in the 8TB capacity range for $2600. I'm not saying that particular product is the right choice, but that's the kind of box that will do 6TB in RAID5 and still be portable enough to buy a couple of them and rotate them through the bank, like Stu says. \nObviously if you have t...
[ 8, 5, 3, 2, 2, 2, 1, 1, 0 ]
[]
[]
[ "backup", "offsite" ]
stackoverflow_0000009231_backup_offsite.txt
Q: Audio/Video Remote Control Profile (AVRCP) on Windows Mobile Is there a general way to handle Bluetooth Audio/Video Remote Control Profile (AVRCP) events on a WM device? I'm especially interested in a Compact Framework way, but I would be happy with just a simple P/Invoke API. Update. I've read MSDN articles on th...
Audio/Video Remote Control Profile (AVRCP) on Windows Mobile
Is there a general way to handle Bluetooth Audio/Video Remote Control Profile (AVRCP) events on a WM device? I'm especially interested in a Compact Framework way, but I would be happy with just a simple P/Invoke API. Update. I've read MSDN articles on this topic, but I still have no idea on how to facilitate this knowl...
[ "Here is the MSDN page about AVRCP\nMicrosofts solution uses the Audio/Video Control Transport Control Protocol (AVCTP). The Microsoft component is an extension layer to the L2CAP layer in the Microsoft Bluetooth Protocol Stack.\nThe following list shows the supported commands:\n\nPlay\nStop\nPause\nForward\nBackwa...
[ 1 ]
[]
[]
[ "windows_mobile" ]
stackoverflow_0000021347_windows_mobile.txt
Q: Batch file to "Script" a Database Is it possible to somehow use a .bat file to script the schema and/or content of a SQL Server database? I can do this via the wizard, but would like to streamline the creation of this file for source control purposes. I would like to avoid the use of 3rd party tools, just limiting...
Batch file to "Script" a Database
Is it possible to somehow use a .bat file to script the schema and/or content of a SQL Server database? I can do this via the wizard, but would like to streamline the creation of this file for source control purposes. I would like to avoid the use of 3rd party tools, just limiting myself to the tools that come with SQL...
[ "There is a free tool called SubCommander that is a part of the open source SubSonic software. I have successfully used this tool myself to create both schema and data \"dumps\" each night.\n\nYou can script out your schema and\n data (and then version it in your\n favorite source control system) using\n SubComm...
[ 6 ]
[]
[]
[ "batch_file", "batch_processing", "command_line", "scripting", "sql_server" ]
stackoverflow_0000021353_batch_file_batch_processing_command_line_scripting_sql_server.txt
Q: How to create Projects/Tasks for Project Server 2003 via C#? I need to be able to create basic MS Project items (tasks, projects, resources, etc.) programmatically from my app to my Project Server 2003 install, and haven't found any good examples. Can anyone point me to some good references or have some sample cod...
How to create Projects/Tasks for Project Server 2003 via C#?
I need to be able to create basic MS Project items (tasks, projects, resources, etc.) programmatically from my app to my Project Server 2003 install, and haven't found any good examples. Can anyone point me to some good references or have some sample code of connecting to the server and creating these items?
[ "Developing against Project Server 2003 isn't the friendliest experience around, but I have worked a little bit with the PDS (Project Data Services) which is SOAP based\nhttp://msdn.microsoft.com/en-us/library/aa204408(office.11).aspx\nIt contains .NET samples there\n", "As far as I know, the only programatic acc...
[ 1, 0 ]
[]
[]
[ "c#", "project_server" ]
stackoverflow_0000018705_c#_project_server.txt
Q: Anyone have a link to a technical discussion of anything akin to the Facebook news feed system? I'm looking for a presentation, PDF, blog post, or whitepaper discussing the technical details of how to filter down and display massive amounts of information for individual users in an intelligent (possibly machine le...
Anyone have a link to a technical discussion of anything akin to the Facebook news feed system?
I'm looking for a presentation, PDF, blog post, or whitepaper discussing the technical details of how to filter down and display massive amounts of information for individual users in an intelligent (possibly machine learning) kind of way. I've had coworkers hear presentations on the Facebook news feed but I can't find...
[ "Are you looking for something along the lines of distributed pub/sub with content based filtering? If so, you may want to look into Siena and some of the associated papers such as Design and Evaluation of a Wide-Area Event Notification Service\n" ]
[ 4 ]
[]
[]
[ "facebook" ]
stackoverflow_0000021243_facebook.txt
Q: Get application name from Windows XP cut and paste? This is a bit of a long shot, but if anyone can figure it out, you guys can... In Windows XP, is there any meta-data that comes with a cut and paste action, from which I can ascertain the application that provided the clipboard contents? Bonus question... if ther...
Get application name from Windows XP cut and paste?
This is a bit of a long shot, but if anyone can figure it out, you guys can... In Windows XP, is there any meta-data that comes with a cut and paste action, from which I can ascertain the application that provided the clipboard contents? Bonus question... if there is such information, is there any way I can access it t...
[ "The API function GetClipboardOwner returns the clipboard owner \n(http://msdn.microsoft.com/en-us/library/ms649041(VS.85).aspx), -sorry cannot mark as link because the \"()\" in the URL-\nDon't know Java, I suppose you can call native API functions from inside the Java VM.\nA \"quick and dirty\" approach could be ...
[ 2, 1 ]
[]
[]
[ "clipboard", "java", "windows_xp" ]
stackoverflow_0000021211_clipboard_java_windows_xp.txt
Q: Is there any way to configure windows to not change the focus? I'm tired of being in the middle of typing something, having a pop-up with a question appear, and hitting enter before reading it... (it also happens with some windows that are not pop-ups) Do you know if there's some setting I could touch for this not...
Is there any way to configure windows to not change the focus?
I'm tired of being in the middle of typing something, having a pop-up with a question appear, and hitting enter before reading it... (it also happens with some windows that are not pop-ups) Do you know if there's some setting I could touch for this not to happen?
[ "Not that I know of. This has been a plague of Windows versions for quite some time.\n", "Actually Windows XP tries to avoid that. Of course some programs found a way to circumvented that. Microsoft Powertoy TweakUI has a way to turn the option on again in case it was turned off. You could also edit the registry ...
[ 0, 0, 0 ]
[]
[]
[ "configuration", "windows" ]
stackoverflow_0000021060_configuration_windows.txt
Q: What Predefined #if symbos does c# have? #if SYMBOL //code #endif what values does C# predefine for use? A: Depends on what /define compiler options you use. Visual Studio puts the DEBUG symbol in there for you via the project settings, but you could create any ones that you want. A: To add to what Nick sa...
What Predefined #if symbos does c# have?
#if SYMBOL //code #endif what values does C# predefine for use?
[ "Depends on what /define compiler options you use. Visual Studio puts the DEBUG symbol in there for you via the project settings, but you could create any ones that you want.\n", "To add to what Nick said, the MSDN documentation does not list any pre-defined names. It would seem that all need to come from #defin...
[ 4, 4, 0 ]
[]
[]
[ "c#" ]
stackoverflow_0000021461_c#.txt
Q: How to maintain a recursive invariant in a MySQL database? I have a tree encoded in a MySQL database as edges: CREATE TABLE items ( num INT, tot INT, PRIMARY KEY (num) ); CREATE TABLE tree ( orig INT, term INT FOREIGN KEY (orig,term) REFERENCES items (num,num) ) For each leaf in th...
How to maintain a recursive invariant in a MySQL database?
I have a tree encoded in a MySQL database as edges: CREATE TABLE items ( num INT, tot INT, PRIMARY KEY (num) ); CREATE TABLE tree ( orig INT, term INT FOREIGN KEY (orig,term) REFERENCES items (num,num) ) For each leaf in the tree, items.tot is set by someone. For interior nodes, items.t...
[ "I am not sure I understand correctly your question, but this could work My take on trees in SQL.\nLinked post described method of storing tree in database -- PostgreSQL in that case -- but the method is clear enough, so it can be adopted easily for any database.\nWith this method you can easy update all the nodes ...
[ 1, 1 ]
[]
[]
[ "algorithm", "data_structures", "invariants", "mysql" ]
stackoverflow_0000020426_algorithm_data_structures_invariants_mysql.txt
Q: Mocking and IQueryable I've ran into a problem while trying to test following IRepository based on NHibernate: public class NHibernateRepository<T>: Disposable, IRepository<T> where T : IdentifiableObject { ... public IQueryable<T> Query() { return NHibernateSession.Linq<T>(); } } Ho...
Mocking and IQueryable
I've ran into a problem while trying to test following IRepository based on NHibernate: public class NHibernateRepository<T>: Disposable, IRepository<T> where T : IdentifiableObject { ... public IQueryable<T> Query() { return NHibernateSession.Linq<T>(); } } How on the Hell to mock return...
[ "In Moq it would be:\nmockRepository.Expect( r => r.Query() ).Returns( myEnumerable.AsQueriable() );\n\nIn RhinoMocks it would be:\nExpect.Call( repository.Query() ).Return( myEnumerable.AsQueriable() );\n\n" ]
[ 7 ]
[]
[]
[ "linq" ]
stackoverflow_0000021355_linq.txt
Q: Fast(er) way to get file inode using PHP To grab the inode of a file in PHP, you can use this: $fs = stat($file); echo $fs['ino']; The problem with this is EVERYWHERE says it's slow and you should avoid it. So the question becomes what's the fast(er) way to do it? A: You could use fileinode() but you should ru...
Fast(er) way to get file inode using PHP
To grab the inode of a file in PHP, you can use this: $fs = stat($file); echo $fs['ino']; The problem with this is EVERYWHERE says it's slow and you should avoid it. So the question becomes what's the fast(er) way to do it?
[ "You could use fileinode() but you should run benchmarks if you think it is slow.\n", "I think you should benchmark and take a look at what you are doing to determine if stat() is the slowest part of your code. Stating 1 file on each request on a server that gets about 100 hits/day is not a problem. Stating every...
[ 1, 0 ]
[]
[]
[ "inode", "php" ]
stackoverflow_0000019708_inode_php.txt
Q: I/O permission settings using .net installer I am creating a program that will be installed using the .net installer project. The program writes to settings files to its directory in the Program Files dir. It believe there are some active directory settings that will prevent the application from righting to that d...
I/O permission settings using .net installer
I am creating a program that will be installed using the .net installer project. The program writes to settings files to its directory in the Program Files dir. It believe there are some active directory settings that will prevent the application from righting to that directory if a limited user is running the program....
[ "Writing to the Program Files folder is a really bad idea, you should assume that this location is \"read only\" once installed. \nSaving user settings in Program Files causes problems if more than two people use the computer at once (eg. Terminal Services) who's settings should be saved, do you want other users to...
[ 2 ]
[ "You can write a custom installer class which can change the security permissions of the folder. This would assume the installation is done by a user who has permission to change file/directory security.\nThe best option is to not write to directories under Program Files at all.\n" ]
[ -1 ]
[ ".net", "active_directory", "installation", "io" ]
stackoverflow_0000018675_.net_active_directory_installation_io.txt
Q: Grouping runs of data SQL Experts, Is there an efficient way to group runs of data together using SQL? Or is it going to be more efficient to process the data in code. For example if I have the following data: ID|Name 01|Harry Johns 02|Adam Taylor 03|John Smith 04|John Smith 05|Bill Manning 06|John Smith I need...
Grouping runs of data
SQL Experts, Is there an efficient way to group runs of data together using SQL? Or is it going to be more efficient to process the data in code. For example if I have the following data: ID|Name 01|Harry Johns 02|Adam Taylor 03|John Smith 04|John Smith 05|Bill Manning 06|John Smith I need to display this: Harry Joh...
[ "Try this:\nselect n.name, \n (select count(*) \n from myTable n1\n where n1.name = n.name and n1.id >= n.id and (n1.id <=\n (\n select isnull(min(nn.id), (select max(id) + 1 from myTable))\n from myTable nn\n where nn.id > n.id and nn.name <> n.name\n )\n ))\nfrom ...
[ 2, 2, 2, 1, 1, 0 ]
[]
[]
[ "sql" ]
stackoverflow_0000021489_sql.txt
Q: Pushing out MSI files I have a product which has been traditionally shipped as an MSI file. It is deployed through some sort of SMS push to thousands of desktops by our various clients. The software we use to create these installers is getting long in the tooth and we are looking to replace it. We have already ...
Pushing out MSI files
I have a product which has been traditionally shipped as an MSI file. It is deployed through some sort of SMS push to thousands of desktops by our various clients. The software we use to create these installers is getting long in the tooth and we are looking to replace it. We have already standardized on InstallAnyw...
[ "If you want to create MSI files, try WiX: Windows Installer XML (WiX) toolset.\nIt's an addon to Visual Studio 2005 and 2008, is open-source, and Microsoft developed. You can use XML to specify and create MSI files. There is a wealth of resources available on it, and WiX 3.0 is, although in beta, is very complet...
[ 4, 4, 1 ]
[]
[]
[ "deployment", "installation", "windows_installer" ]
stackoverflow_0000021635_deployment_installation_windows_installer.txt
Q: RSS/Atom for professional use I wondered if anyone can give an example of a professional use of RSS/Atom feeds in a company product. Does anyone use feeds for other things than updating news? For example, did you create a product that gives results as RSS/Atom feeds? Like price listings or current inventory, or ma...
RSS/Atom for professional use
I wondered if anyone can give an example of a professional use of RSS/Atom feeds in a company product. Does anyone use feeds for other things than updating news? For example, did you create a product that gives results as RSS/Atom feeds? Like price listings or current inventory, or maybe dates of training lessons? Or a...
[ "Some of my team's new systems generate RSS feeds that the developers syndicate.\nThese feeds push out events that interest the developers at certain times and the information is controlled using different loggers. Thus when debugging you can get the debugging feed, when you want to see completed transactions you g...
[ 4, 1, 1, 0, 0, 0, 0, 0, 0 ]
[]
[]
[ "atom_feed", "feed", "rss", "use_case" ]
stackoverflow_0000016164_atom_feed_feed_rss_use_case.txt
Q: Whats the best way to securely publish a site post build? So, in your experience, whats the best way? Is there a secure way that's also scriptable/triggerable in a build automation tool? Edit: I should mention this is windows/.net and I'll be deploying to iis6 A: For some projects I use Capistrano to push out to...
Whats the best way to securely publish a site post build?
So, in your experience, whats the best way? Is there a secure way that's also scriptable/triggerable in a build automation tool? Edit: I should mention this is windows/.net and I'll be deploying to iis6
[ "For some projects I use Capistrano to push out to live. It is built on top of ruby and makes deploy script writing super easy and uses ssh. \nOn other projects I have a tiny deploy app that uses bash to do an svn export to a temporary directory and then rsync it over to the live server. You can make rsync use ssh....
[ 6, 4, 1, 1, 1, 0, 0, 0 ]
[]
[]
[ ".net", "deployment", "iis_6", "windows" ]
stackoverflow_0000018224_.net_deployment_iis_6_windows.txt
Q: IntelliSense for XElement objects with XML schema Reading an article called "Increase LINQ Query Performance" in July's MSDN magazine, the author states that using an Imports in VB providing a path to schema in the current project will turn IntelliSense on for XElement. In the code provided, he uses statements lik...
IntelliSense for XElement objects with XML schema
Reading an article called "Increase LINQ Query Performance" in July's MSDN magazine, the author states that using an Imports in VB providing a path to schema in the current project will turn IntelliSense on for XElement. In the code provided, he uses statements like xelement.@name to retreive attributes values and so o...
[ "This post claims to have a link to a video that shows how to use VB9's XML Literals in C#. However, it only really discusses them and from what I can gather, you cannot use them in C#. http://blogs.msdn.com/bethmassi/archive/2008/07/03/teched-panel-vb-xml-literals-for-c-developers.aspx\n" ]
[ 4 ]
[]
[]
[ "c#", "linq", "linq_to_xml", "vb.net_to_c#", "xsd" ]
stackoverflow_0000021912_c#_linq_linq_to_xml_vb.net_to_c#_xsd.txt
Q: How to enable multisampling for a wxWidgets OpenGL program? Multisampling is a way of applying full screen anti-aliasing (FSAA) in 3D applications. I need to use multisampling in my OpenGL program, which is currently embedded in a wxWidgets GUI. Is there a way to do this? Please respond only if you know the detail...
How to enable multisampling for a wxWidgets OpenGL program?
Multisampling is a way of applying full screen anti-aliasing (FSAA) in 3D applications. I need to use multisampling in my OpenGL program, which is currently embedded in a wxWidgets GUI. Is there a way to do this? Please respond only if you know the detailed steps to achieve this. I'm aware of enabling multisampling usi...
[ "I finally got Multisampling working with my wxWidgets OpenGL program. It's a bit messy right now, but here's how:\nwxWidgets doesn't have Multisampling support in their stable releases right now (latest version at this time is 2.8.8). But, it's available as a patch and also through their daily snapshot. (The latte...
[ 4 ]
[]
[]
[ "multisampling", "opengl", "wxwidgets" ]
stackoverflow_0000021560_multisampling_opengl_wxwidgets.txt
Q: Process raw HTTP request content I am doing an e-commerce solution in ASP.NET which uses PayPal's Website Payments Standard service. Together with that I use a service they offer (Payment Data Transfer) that sends you back order information after a user has completed a payment. The final thing I need to do is to p...
Process raw HTTP request content
I am doing an e-commerce solution in ASP.NET which uses PayPal's Website Payments Standard service. Together with that I use a service they offer (Payment Data Transfer) that sends you back order information after a user has completed a payment. The final thing I need to do is to parse the POST request from them and pe...
[ "Something like this placed in your onload event.\nif (Request.RequestType == \"POST\")\n{\n using (StreamReader sr = new StreamReader(Request.InputStream))\n {\n if (sr.ReadLine() == \"SUCCESS\")\n {\n /* Do your parsing here */\n }\n }\n}\n\nMind you that they might want s...
[ 14, 3, 2, 1, 0 ]
[]
[]
[ "asp.net", "e_commerce", "http" ]
stackoverflow_0000020245_asp.net_e_commerce_http.txt
Q: Date/time conversion using time.mktime seems wrong >>> import time >>> time.strptime("01-31-2009", "%m-%d-%Y") (2009, 1, 31, 0, 0, 0, 5, 31, -1) >>> time.mktime((2009, 1, 31, 0, 0, 0, 5, 31, -1)) 1233378000.0 >>> 60*60*24 # seconds in a day 86400 >>> 1233378000.0 / 86400 14275.208333333334 time.mktime should retu...
Date/time conversion using time.mktime seems wrong
>>> import time >>> time.strptime("01-31-2009", "%m-%d-%Y") (2009, 1, 31, 0, 0, 0, 5, 31, -1) >>> time.mktime((2009, 1, 31, 0, 0, 0, 5, 31, -1)) 1233378000.0 >>> 60*60*24 # seconds in a day 86400 >>> 1233378000.0 / 86400 14275.208333333334 time.mktime should return the number of seconds since the epoch. Since I'm givi...
[ "Short answer: Because of timezones.\nThe Epoch is in UTC.\nFor example, I'm on IST (Irish Standard Time) or UTC+1. time.mktime() is relative to my timezone, so on my system this refers to\n>>> time.mktime((2009, 1, 31, 0, 0, 0, 5, 31, -1))\n1233360000.0\n\nBecause you got the result 1233378000, that would suggest ...
[ 7, 3, 2, 0 ]
[]
[]
[ "datetime", "python" ]
stackoverflow_0000021961_datetime_python.txt
Q: Loading assemblies and its dependencies My application dynamically loads assemblies at runtime from specific subfolders. These assemblies are compiled with dependencies to other assemblies. The runtime trys to load these from the application directory. But I want to put them into the modules directory. Is there a ...
Loading assemblies and its dependencies
My application dynamically loads assemblies at runtime from specific subfolders. These assemblies are compiled with dependencies to other assemblies. The runtime trys to load these from the application directory. But I want to put them into the modules directory. Is there a way to tell the runtime that the dlls are in ...
[ "One nice approach I've used lately is to add an event handler for the AppDomain's AssemblyResolve event.\nAppDomain currentDomain = AppDomain.CurrentDomain;\ncurrentDomain.AssemblyResolve += new ResolveEventHandler(MyResolveEventHandler);\n\nThen in the event handler method you can load the assembly that was attem...
[ 18, 4, 1 ]
[]
[]
[ ".net", "c#" ]
stackoverflow_0000022012_.net_c#.txt
Q: Table cells larger than they are meant to be I've created a map system for a game that runs on the principle of drawing the picture of the map from tiles. There are many reasons for this which I won't go into here but if you really want to know then I'm sure you can find out how to contact me ;) I have made the la...
Table cells larger than they are meant to be
I've created a map system for a game that runs on the principle of drawing the picture of the map from tiles. There are many reasons for this which I won't go into here but if you really want to know then I'm sure you can find out how to contact me ;) I have made the latest version live so you can see exactly where the...
[ "I think you need to use display: block on your images. When images are inline there's a little extra space for the line spacing.\n", "You could also adjust the line height of the td element:\ntd {\n line-height: 0\n}\n\n", "I know this might sound bad, but you need to ensure there is no whitespace between t...
[ 35, 5, 3, 1 ]
[]
[]
[ "css", "html" ]
stackoverflow_0000022000_css_html.txt
Q: How to use BITS to download from a UNC path? What is the best way to distribute files to users in remote offices, using BITS with a UNC path or BITS with HTTP? I have a VB.NET project which currently downloads from a HTTP path, but there is added complexity involved (e.g. having a web server). Or is there a bette...
How to use BITS to download from a UNC path?
What is the best way to distribute files to users in remote offices, using BITS with a UNC path or BITS with HTTP? I have a VB.NET project which currently downloads from a HTTP path, but there is added complexity involved (e.g. having a web server). Or is there a better way to do this? Low bandwith usage is more impor...
[ "Maybe consider not using BITS at all and use the old favourite Robocopy. Robocopy is a standalone command-line executable which is part of the Windows Server 2003 ResKit tools and now standard on Vista/2008. Robocopy has the /IPG:ms (Inter-Packet Gap) switch to \"dribble\" the download, which is designed specifica...
[ 1 ]
[]
[]
[ "bit", "vb.net" ]
stackoverflow_0000021753_bit_vb.net.txt
Q: MSVC6: Breakpoint stops program Using Microsoft Visual Studio 98, Microsoft Visual C++ 6.0 SP6 When running under the debugger, there's only one problem. If I pause the program and resume, everything's fine. The problem? When I hit a breakpoint, my program stops. But not in a good way; execution halts, I'm thro...
MSVC6: Breakpoint stops program
Using Microsoft Visual Studio 98, Microsoft Visual C++ 6.0 SP6 When running under the debugger, there's only one problem. If I pause the program and resume, everything's fine. The problem? When I hit a breakpoint, my program stops. But not in a good way; execution halts, I'm thrown out of debug mode into edit mode. ...
[ "Stop beating on VC6. It's old. The STL was updated in 1996 from HP code written in 1994. C++ was ratified in 1998.\nWhat is the code doing when you are breaking? Can you reduce the situation into a simple test. When I try that I usually find the cause. If you can do that so it still happens then I'll take a look a...
[ 1, 1, 0, 0, 0 ]
[ "I haven't used MSVC6 in years, but I remember the debugger basically being a flaky piece of crap. Things like this would regularly happen for no apparent reason because it just didn't like your code that day.\nIn addition to the debugger being a flaky piece of crap, the rest of it was too.\nIt's STL implementation...
[ -1 ]
[ "c++", "debugging", "visual_c++", "visual_c++_6", "windows" ]
stackoverflow_0000008443_c++_debugging_visual_c++_visual_c++_6_windows.txt
Q: Difference between `/dev/ttyS0` and `/dev/ttys0`? In Linux, what is the difference between /dev/ttyS0 and /dev/ttys0? I know that the first is a serial port, but what about the second, with the small s? A: see this For a pseudo terminal pair such as ptyp3 and ttyp3, the pty... is the master or controlling t...
Difference between `/dev/ttyS0` and `/dev/ttys0`?
In Linux, what is the difference between /dev/ttyS0 and /dev/ttys0? I know that the first is a serial port, but what about the second, with the small s?
[ "see this\n\nFor a pseudo terminal pair such as\n ptyp3 and ttyp3, the pty... is the\n master or controlling terminal and the\n tty... is the slave. There are only 16\n ttyp's: ttyp0-ttypf (f is a\n hexadecimal digit). To get more\n pairs, the 3 letters q, r, s may be\n used instead of p. For example the\n ...
[ 1, 0, 0 ]
[]
[]
[ "linux", "serial_port" ]
stackoverflow_0000022106_linux_serial_port.txt
Q: Switching to ORMs I'm toying with the idea of phasing in an ORM into an application I support. The app is not very structured with no unit tests. So any change will be risky. I'm obviously concerned that I've got a good enough reason to change. The idea is that there will be less boiler plate code for data access ...
Switching to ORMs
I'm toying with the idea of phasing in an ORM into an application I support. The app is not very structured with no unit tests. So any change will be risky. I'm obviously concerned that I've got a good enough reason to change. The idea is that there will be less boiler plate code for data access and there for greater p...
[ "I would strongly recommend getting a copy of Michael Feather's book Working Effectively With Legacy Code (by \"Legacy Code\" Feathers means any system that isn't adequately covered by unit tests). It is full of good ideas which should help you with your refactoring and phasing in of best practices.\nSure, you coul...
[ 3, 2, 1, 0, 0, 0, 0 ]
[]
[]
[ "language_agnostic", "orm" ]
stackoverflow_0000022011_language_agnostic_orm.txt
Q: Authenticate on an ASP.Net Forms Authorization website from a console app I'm trying to build a C# console application to automate grabbing certain files from our website, mostly to save myself clicks and - frankly - just to have done it. But I've hit a snag that for which I've been unable to find a working solut...
Authenticate on an ASP.Net Forms Authorization website from a console app
I'm trying to build a C# console application to automate grabbing certain files from our website, mostly to save myself clicks and - frankly - just to have done it. But I've hit a snag that for which I've been unable to find a working solution. The website I'm trying to which I'm trying to connect uses ASP.Net forms a...
[ "This page should get you started. You need to first make a request to the page, and then saving the cookie to a container that you include in all later request. That should keep you logged in, and able to retrieve the files.\n", "I have dealt with something similar, and the hardest part is figuring out exactly w...
[ 3, 3 ]
[]
[]
[ "asp.net", "authentication", "c#" ]
stackoverflow_0000022269_asp.net_authentication_c#.txt
Q: Get a list of available domains (NT4 and Active Directory) Does anyone know (in c#) a way of getting the available NT4 domains (a bit like the WinXP login box dropdown)? I know that this is fairly easy for Active Directory using the DirectoryServices namespace, but I can't find anything for the old NT4 domains. I...
Get a list of available domains (NT4 and Active Directory)
Does anyone know (in c#) a way of getting the available NT4 domains (a bit like the WinXP login box dropdown)? I know that this is fairly easy for Active Directory using the DirectoryServices namespace, but I can't find anything for the old NT4 domains. I'd rather not use API calls if at all possible (that might be as...
[ "Unfortunately I think your only option is to use the ADSI API. You can switch between NT4 and Active Directory by changing providers in your code. NT4 uses the WinNT provider and Active Directory uses the LDAP provider.\nIf you query the RootDSE node of whichever provider you are using, that should return naming c...
[ 1 ]
[]
[]
[ "active_directory", "c#", "nt4" ]
stackoverflow_0000022265_active_directory_c#_nt4.txt
Q: What is the best way to deploy a VB.NET application? Generally when I use ClickOnce when I build a VB.NET program but it has a few downsides. I've never really used anything else, so I'm not sure what my options are. Downsides to ClickOnce: Consists of multiple files - Seems easier to distribute one file than man...
What is the best way to deploy a VB.NET application?
Generally when I use ClickOnce when I build a VB.NET program but it has a few downsides. I've never really used anything else, so I'm not sure what my options are. Downsides to ClickOnce: Consists of multiple files - Seems easier to distribute one file than manageing a bunch of file and the downloader to download thos...
[ "Have you seen WiX yet?\nhttp://wix.sourceforge.net/\nIt builds windows installers using an XML file and has additional libraries to use if you want to fancify your installers and the like. I'll admit the learning curve for me was medium-high in getting things started, but afterwards I was able to build a second in...
[ 6, 2, 1, 1, 1 ]
[]
[]
[ "clickonce", "installation", "vb.net", "visual_studio" ]
stackoverflow_0000003544_clickonce_installation_vb.net_visual_studio.txt
Q: Implementing a log watcher I'm wondering how you can implement a program similar to tail -f in C/C++, a program that watches for and processes new lines added to a log file? A: You can use fseek() to clear the eof condition on the stream. Essentially, read to the end of the file, sleep for a while, fseek() (wit...
Implementing a log watcher
I'm wondering how you can implement a program similar to tail -f in C/C++, a program that watches for and processes new lines added to a log file?
[ "You can use fseek() to clear the eof condition on the stream. Essentially, read to the end of the file, sleep for a while, fseek() (without changing your position) to clear eof, the read to end of file again. wash, rinse, repeat. man fseek(3) for details.\nHere's what it looks like in perl. perl's seek() is es...
[ 5, 0, 0, 0 ]
[]
[]
[ "c", "c++", "file", "io" ]
stackoverflow_0000022379_c_c++_file_io.txt
Q: Adding Inline Search function to web page Is it possible to embed an inline search box into a web page which provides similar functionality to the IE7Pro Inline Search or similar plugins for Firefox/Safari? A: jQuery inline search plugin provides this functionality A: If I understand your question, you are ask...
Adding Inline Search function to web page
Is it possible to embed an inline search box into a web page which provides similar functionality to the IE7Pro Inline Search or similar plugins for Firefox/Safari?
[ "jQuery inline search plugin provides this functionality\n", "If I understand your question, you are asking if it is possible to allow a user to type in a query that will search the text of page they are on?\nYou can certainly do that. I would suggest looking into one of the javascript libraries, jQuery is my li...
[ 1, 1 ]
[]
[]
[ "html", "javascript" ]
stackoverflow_0000022429_html_javascript.txt
Q: What is the difference between HttpHandler and a Web User Control and when to use each one? I've been using user controls extensively but never use a HttpHandler and was wondering if I am doing something suboptimal or wrong A: Unfortunately your question is a little like "Should I use a sandwich or a cement mixe...
What is the difference between HttpHandler and a Web User Control and when to use each one?
I've been using user controls extensively but never use a HttpHandler and was wondering if I am doing something suboptimal or wrong
[ "Unfortunately your question is a little like \"Should I use a sandwich or a cement mixer\". HttpHandlers and User controls are completely different things.\nHttpHandlers are used to process HTTP requests. For example, if you wanted to dynamically create an RSS feed, you could write an HTTP handler that handles a...
[ 6, 1, 0, 0, 0 ]
[]
[]
[ "asp.net" ]
stackoverflow_0000022156_asp.net.txt
Q: How do I display records containing specific information in SQl How do I select all records that contain "LCS" within the title column in sql. A: SELECT * FROM TABLE WHERE TABLE.TITLE LIKE '%LCS%'; % is the wild card matcher. A: Look into the LIKE clause A: Are you looking for all the tables with a column n...
How do I display records containing specific information in SQl
How do I select all records that contain "LCS" within the title column in sql.
[ "SELECT * FROM TABLE WHERE TABLE.TITLE LIKE '%LCS%';\n\n% is the wild card matcher.\n", "Look into the LIKE clause\n", "Are you looking for all the tables with a column name which contains the LCS in them? If yes the do this\nselect table_name \nfrom information_schema.columns \nwhere column_name like '%lcs%'\n...
[ 2, 0, 0 ]
[]
[]
[ "sql", "sql_server" ]
stackoverflow_0000022474_sql_sql_server.txt
Q: SQL Query Help - Scoring Multiple Choice Tests Say I have a Student table, it's got an int ID. I have a fixed set of 10 multiple choice questions with 5 possible answers. I have a normalized answer table that has the question id, the Student.answer (1-5) and the Student.ID I'm trying to write a single query that...
SQL Query Help - Scoring Multiple Choice Tests
Say I have a Student table, it's got an int ID. I have a fixed set of 10 multiple choice questions with 5 possible answers. I have a normalized answer table that has the question id, the Student.answer (1-5) and the Student.ID I'm trying to write a single query that will return all scores over a certain pecentage. T...
[ "If I understand your schema and question correctly, how about something like this:\nselect student_name, score\nfrom students\n join (select student_answers.student_id, count(*) as score\n from student_answers, answer_key\n group by student_id\n where student_answers.question_id = answer_key....
[ 2, 1, 0, 0, 0, 0 ]
[]
[]
[ "dynamic_sql" ]
stackoverflow_0000022417_dynamic_sql.txt
Q: XmlHttpRequest return values I'm looking for (arguably) the correct way to return data from a XmlHttpRequest. Options I see are: Plain HTML. Let the request format the data and return it in a usable format. Advantage: easy to consume by the calling page.Disadvantage: Very rigid, stuck with a fixed layout. XML. Le...
XmlHttpRequest return values
I'm looking for (arguably) the correct way to return data from a XmlHttpRequest. Options I see are: Plain HTML. Let the request format the data and return it in a usable format. Advantage: easy to consume by the calling page.Disadvantage: Very rigid, stuck with a fixed layout. XML. Let the request return XML, format i...
[ "If you're looking for a quick solution that should work with most available frameworks, I'd go for JSON. It's easy to start with and works.\nIf you're trying to build a larger application that you're going to extend (in terms of size or maybe your own API for 3rd party extensions) I'd go for XML. You could write a...
[ 2, 2, 0, 0, 0 ]
[]
[]
[ "ajax", "javascript" ]
stackoverflow_0000021992_ajax_javascript.txt
Q: How to set up a DB2 linked server on a 64-bit SQL Server 2005? I need to create a linked server to a DB2 database on a mainframe. Has anyone done this successfully on a 64-bit version of SQL Server 2005? If so, which provider and settings were used? It's important that the linked server work whether we are using a...
How to set up a DB2 linked server on a 64-bit SQL Server 2005?
I need to create a linked server to a DB2 database on a mainframe. Has anyone done this successfully on a 64-bit version of SQL Server 2005? If so, which provider and settings were used? It's important that the linked server work whether we are using a Windows authenticated account to login to SQL Server or a SQL Serve...
[ "We had this same issue with a production system late last year (sept 2007) and the official word from our Microsoft contact was that they had a 64 bit oledb driver to connect to ASI/DB2 but it was in BETA at the time.\nNot sure when it will be out of beta but that was the news as of last year.\nWe decided to move ...
[ 1, 0, 0 ]
[]
[]
[ "db2", "sql_server" ]
stackoverflow_0000010898_db2_sql_server.txt
Q: Why is ASP.NET gzip compression corrupting CSS? I have an ASP.NET webforms application (3.5 SP1) that I'm working on, and attempting to enable gzip fpr HTML and CSS that comes down the pipe. I'm using this implementation (and tried a few others that hook into Application_BeginRequest), and it seems to be corruptin...
Why is ASP.NET gzip compression corrupting CSS?
I have an ASP.NET webforms application (3.5 SP1) that I'm working on, and attempting to enable gzip fpr HTML and CSS that comes down the pipe. I'm using this implementation (and tried a few others that hook into Application_BeginRequest), and it seems to be corrupting the external CSS file that the pages use, but inter...
[ "Is it only CSS files that get corrupted? Do JS files (or any other static text files) come through ok?\nAlso can you duplicate the behavior if you browse directly to the CSS file?\nI've only enabled compression on Windows 2003 server's IIS using this approach:\n\nIIS → Web Sites → Properties → Service tab, check b...
[ 5, 0 ]
[]
[]
[ "asp.net", "compression", "gzip" ]
stackoverflow_0000022509_asp.net_compression_gzip.txt
Q: Passing a commented, multi-line (freespace) regex to preg_match I have a regex that is going to end up being a bit long and it'd make it much easier to read to have it across multiple lines. I tried this but it just barfs. preg_match( '^J[0-9]{7}:\s+ (.*?) #Extract the Transaction Start Date ms...
Passing a commented, multi-line (freespace) regex to preg_match
I have a regex that is going to end up being a bit long and it'd make it much easier to read to have it across multiple lines. I tried this but it just barfs. preg_match( '^J[0-9]{7}:\s+ (.*?) #Extract the Transaction Start Date msg \s+J[0-9]{7}:\s+Project\sname:\s+ (.*?) #Extrac...
[ "You can use the extended syntax:\npreg_match(\"/\n test\n/x\", $foo, $bar);\n\n", "Yes, you can add the /x Pattern Modifier.\n\nThis modifier turns on additional\n functionality of PCRE that is\n incompatible with Perl. Any backslash\n in a pattern that is followed by a\n letter that has no special meanin...
[ 5, 3, 1, 1, 0 ]
[]
[]
[ "php", "regex" ]
stackoverflow_0000022552_php_regex.txt
Q: PHP includes vs OOP I would like to have a reference for the pros and cons of using include files vs objects(classes) when developing PHP applications. I know I would benefit from having one place to go for this answer...I have a few opinions of my own but I look forward to hearing others. A Simple Example: Certai...
PHP includes vs OOP
I would like to have a reference for the pros and cons of using include files vs objects(classes) when developing PHP applications. I know I would benefit from having one place to go for this answer...I have a few opinions of my own but I look forward to hearing others. A Simple Example: Certain pages on my site are on...
[ "These are not really opposite choices. You will have to include the checking code anyway. I read your question as procedural programming vs. OO programming.\nWriting a few lines of code, or a function, and including it in your page header was how things were done in PHP3 or PHP4. It's simple, it works (that's how ...
[ 13, 5, 1, 1, 0, 0 ]
[]
[]
[ "coding_style", "php" ]
stackoverflow_0000022528_coding_style_php.txt
Q: How do I cluster an upload folder with ASP.Net? We have a situation where users are allowed to upload content, and then separately make some changes, then submit a form based on those changes. This works fine in a single-server, non-failover environment, however we would like some sort of solution for sharing the ...
How do I cluster an upload folder with ASP.Net?
We have a situation where users are allowed to upload content, and then separately make some changes, then submit a form based on those changes. This works fine in a single-server, non-failover environment, however we would like some sort of solution for sharing the files between servers that supports failover. Has any...
[ "In our scenario, we have a separate file server that both of our front end app servers write to, that way you either server has access to the same sets of files.\n", "At a former job we had a cluster of web servers with an F5 load balancer in front of them. We had a very similar problem in that our applications...
[ 1, 1, 0, 0 ]
[]
[]
[ "asp.net", "cluster_computing", "failover", "iis_6", "windows_server_2003" ]
stackoverflow_0000022590_asp.net_cluster_computing_failover_iis_6_windows_server_2003.txt
Q: What are the main differences between programming for Windows XP and for Vista? From a desktop application developer point of view, is there any difference between developing for Windows XP and developing for Windows Vista? A: User Interface Looking at the Windows Vista User Experience Guidelines you can see tha...
What are the main differences between programming for Windows XP and for Vista?
From a desktop application developer point of view, is there any difference between developing for Windows XP and developing for Windows Vista?
[ "User Interface\nLooking at the Windows Vista User Experience Guidelines you can see that they have changed many UI elements, which you should be aware of. Some major things to take note of:\n\nLarger icons\nNew font (Which affects some custom UI constistency)\nNew dialog box features (task dialogs)\nAltered comm...
[ 20, 5, 1, 0 ]
[]
[]
[ "windows_vista", "windows_xp" ]
stackoverflow_0000022674_windows_vista_windows_xp.txt
Q: Sharepoint COMException 0x81020037 I am working on a SharePoint application that supports importing multiple documents in a single operation. I also have an ItemAdded event handler that performs some basic maintenance of the item metadata. This event fires for both imported documents and manually created ones. ...
Sharepoint COMException 0x81020037
I am working on a SharePoint application that supports importing multiple documents in a single operation. I also have an ItemAdded event handler that performs some basic maintenance of the item metadata. This event fires for both imported documents and manually created ones. The final piece of the puzzle is a batch...
[ "Sometimes I see the ItemAdded or ItemUpdated firing twice for a single operation. \nYou can try to put a breakpoint in the ItemAdded() method to confirm that.\nThe solution in my case was to single thread the ItemAdded() method:\nprivate static object myLock = new object();\npublic override void ItemAdded(SPItemEv...
[ 1, 0 ]
[]
[]
[ "com", "multithreading", "sharepoint" ]
stackoverflow_0000022354_com_multithreading_sharepoint.txt
Q: What strategies have you employed to improve web application performance? Any personal experience in overcoming web application performance hurdles? Any recommended strategies for improving the performance of a data-driven web application? My development team works on a web application (JSP reports, HTML, JavaS...
What strategies have you employed to improve web application performance?
Any personal experience in overcoming web application performance hurdles? Any recommended strategies for improving the performance of a data-driven web application? My development team works on a web application (JSP reports, HTML, JavaScript) that uses an Oracle database (PL/SQL). The key functionality the applic...
[ "While my answer may not contain any concrete steps to help this is always where I start.\nFirst thing I would do is try to throw away all of your assumptions about what the trouble is and take steps to install metrics everywhere you can. Let the metrics guide you rather than your intuition. I've chased many, man...
[ 6, 2, 2, 1, 1, 1 ]
[]
[]
[ "oracle", "performance", "web_applications" ]
stackoverflow_0000022704_oracle_performance_web_applications.txt
Q: ASP.NET - Building your own routing system In a recent project, I built my own MVC framework in PHP. One of the things I implemented was a routing system. I used Apache's mod_rewrite to send all requests to index.php, and then parsed the URI to extract information and route the request. I'm dabbling in ASP.NET no...
ASP.NET - Building your own routing system
In a recent project, I built my own MVC framework in PHP. One of the things I implemented was a routing system. I used Apache's mod_rewrite to send all requests to index.php, and then parsed the URI to extract information and route the request. I'm dabbling in ASP.NET now, and I'm wondering if/how I might perform some...
[ "This is going to be a long answer, because I want to make sure you are fully aware of all the ways you can accomplish what you want to do.\nThe routing engine that powers the ASP.NET MVC Framework will work with the traditional ASP.NET Framework. You can take advantage of using the RouteTable and assigning routes...
[ 6 ]
[]
[]
[ "asp.net", "routing", "url_rewriting" ]
stackoverflow_0000022869_asp.net_routing_url_rewriting.txt
Q: ASP.Net: How to do pagination with a Repeater? I'm using the Repeater control on my site to display data from the database. I need to do pagination ("now displaying page 1 of 10", 10 items per page, etc) but I'm not sure I'm going about it the best way possible. I know the Repeater control doesn't have any built-i...
ASP.Net: How to do pagination with a Repeater?
I'm using the Repeater control on my site to display data from the database. I need to do pagination ("now displaying page 1 of 10", 10 items per page, etc) but I'm not sure I'm going about it the best way possible. I know the Repeater control doesn't have any built-in pagination, so I'll have to make my own. Is there ...
[ "You have to use the PagedDataSource, it allows you to turn a standard data source into one that can be paged. Here's an example article\n", "This isn't a way to page the data, but have you looked into the ListView control? It gives the flexibility of repeater / data list but with built in paging like the grid v...
[ 3, 2, 0 ]
[]
[]
[ "asp.net", "sql_server" ]
stackoverflow_0000022981_asp.net_sql_server.txt
Q: What to use Windows CardSpace for? I'm doing some funky authentication work (and yes, I know, open-id is awesome, but then again my open-id doesn't work right at this moment!). Stumbling across Windows CardSpace I was wondering if anyone has used this in a real product-system. If you have used it, what were the pr...
What to use Windows CardSpace for?
I'm doing some funky authentication work (and yes, I know, open-id is awesome, but then again my open-id doesn't work right at this moment!). Stumbling across Windows CardSpace I was wondering if anyone has used this in a real product-system. If you have used it, what were the pros and cons for you? And how can i use i...
[ "Umm no you don't; you can accept information cards on a web site using a cheap and cheerful certificate (but not self signed) or no certificate at all.\nAnd yes, I've used it as part of a production system which grew out of a proof of concept I did at Microsoft.\nCons: If you don't have an EV SSL certificate you g...
[ 2 ]
[]
[]
[ "authentication", "security", "windows" ]
stackoverflow_0000019956_authentication_security_windows.txt
Q: Does anybody know of existing code to read a mork file (Thunderbird Address Book)? I have the need to read the Thunderbird address book on the fly. It is stored in a file format called Mork. Not a pleasant file format to read. I found a 1999 article explaining the file format. I would love to know if someone a...
Does anybody know of existing code to read a mork file (Thunderbird Address Book)?
I have the need to read the Thunderbird address book on the fly. It is stored in a file format called Mork. Not a pleasant file format to read. I found a 1999 article explaining the file format. I would love to know if someone already has gone through this process and could make the code available. I found mork.pl...
[ "The Beagle search engine had code to parse Mork files. It's not the most memory efficient solution, but it worked and could be a useful starting point. Here's a link to the file:\nhttp://svn.gnome.org/viewvc/beagle/tags/BEAGLE_0_2_18/Util/Mork.cs?view=markup\n(These days Beagle doesn't use this parser anymore; w...
[ 4 ]
[]
[]
[ ".net", "file_format", "mork", "thunderbird" ]
stackoverflow_0000022943_.net_file_format_mork_thunderbird.txt
Q: XML Collection Best Practices I'm creating an application that will store a hierarchical collection of items in an XML file and I'm wondering about the industry standard for storing collections in XML. Which of the following two formats is preferred? (If there is another option I'm not seeing, please advise.) Opti...
XML Collection Best Practices
I'm creating an application that will store a hierarchical collection of items in an XML file and I'm wondering about the industry standard for storing collections in XML. Which of the following two formats is preferred? (If there is another option I'm not seeing, please advise.) Option A <School> <Student Name="Ja...
[ "I'm no XML expert, but I find Option B to be more human readable, and I think it's just as machine readable as Option A. I believe that XML is designed to be both human and machine readable, so I would go for Option B myself.\n\nI just realized something else after Ryan Farley's post. If the Students or Classes se...
[ 4, 4, 2, 2 ]
[]
[]
[ "xml" ]
stackoverflow_0000023064_xml.txt
Q: Acts-as-readable Rails plugin Issue I'm using Intridea's Acts as Readable Rails plugin for a messaging system I'm currently building. I've defined my message class accordingly: class Post < ActiveRecord::Base acts-as-readable end And everything seems to be working according to plan, but when trying to make the ...
Acts-as-readable Rails plugin Issue
I'm using Intridea's Acts as Readable Rails plugin for a messaging system I'm currently building. I've defined my message class accordingly: class Post < ActiveRecord::Base acts-as-readable end And everything seems to be working according to plan, but when trying to make the app show unread messages in my message vi...
[ "The following will work\n<%= Post.find_unread_by(current_user).size %>\n\nor\n<%= Post.find_unread_by(current_user).length %>\n\nHowever if you check your development.log you should see that it gets the unread count by\n\nRetrieving all the posts\nRetrieving all the posts read by the user\nRemoving all of 2. from ...
[ 11 ]
[]
[]
[ "plugins", "ruby", "ruby_on_rails" ]
stackoverflow_0000022980_plugins_ruby_ruby_on_rails.txt
Q: How to process Excel files stored in an image data type column using SSIS package? I have a .NET webforms front end that allows admin users to upload two .xls files for offline processing. As these files will be used for validation (and aggregation) I store these in an image field in a table. My ultimate goal i...
How to process Excel files stored in an image data type column using SSIS package?
I have a .NET webforms front end that allows admin users to upload two .xls files for offline processing. As these files will be used for validation (and aggregation) I store these in an image field in a table. My ultimate goal is to create an SSIS package that will process these files offline. Does anyone know how ...
[ "In my (admittedly limited) experience with SSIS, it is quite good at rapidly getting something up and running, but frusteratingly limited in getting something that \"feels\" like the most elegant, efficient solution to a programmer. \nSince the Excel Source Editor seems to take only files as input, you need to gi...
[ 1 ]
[]
[]
[ "ssis" ]
stackoverflow_0000022968_ssis.txt
Q: Any good tools to automate SQL Server management tasks? I know I could write scripts and create jobs to run them, but at least some of what I'm wanting it to do is beyond my programming abilities for that to be an option. What I'm imagining is something that can run on a regular schedule that will examine all the ...
Any good tools to automate SQL Server management tasks?
I know I could write scripts and create jobs to run them, but at least some of what I'm wanting it to do is beyond my programming abilities for that to be an option. What I'm imagining is something that can run on a regular schedule that will examine all the databases on a server and automatically shrink data and log f...
[ "That stuff is all built in, it is called a maintenance plan\n", "If you are using SQL Server 2005. Fire up the Management Studio and look at the Maintenance Plan section.\nSee http://msdn.microsoft.com/en-us/library/ms187658.aspx for an overview and http://msdn.microsoft.com/en-us/library/ms189036.aspx for deta...
[ 2, 2, 0, 0 ]
[]
[]
[ "sql_server" ]
stackoverflow_0000023001_sql_server.txt
Q: Suggestions on Ajax development environment for PHP I am a C/C++ programmer professionally, but I've created a couple of personal web sites using PHP and MySQL. They're pretty basic, and I'd like to jazz them up using Ajax, but I've never done any Ajax. I've done all the development so far manually, i.e. no IDE o...
Suggestions on Ajax development environment for PHP
I am a C/C++ programmer professionally, but I've created a couple of personal web sites using PHP and MySQL. They're pretty basic, and I'd like to jazz them up using Ajax, but I've never done any Ajax. I've done all the development so far manually, i.e. no IDE or anything like that. Does anyone have suggestions on Aja...
[ "If you want an IDE, try Aptana Studio. It supports HTML, CSS, JavaScript, PHP, XML, Ruby, Ruby on Rails, and more....\n", "As T.O. says, try Aptana. There's a very good free version, and they really push the AJAX. They even have Jaxer, an \"AJAX Server\" that they're working on. If nothing else, the plugins are ...
[ 2, 2, 2, 1, 0, 0 ]
[]
[]
[ "ajax", "ide", "javascript", "php" ]
stackoverflow_0000023176_ajax_ide_javascript_php.txt
Q: "All Users" Folder Is there a .NET variable that returns the "All Users" directory? A: You'll want to use the system.environment variables. Most of the predefined ones are shown here. For the "All Users" you would use: System.Environment.GetEnvironmentVariable("ALLUSERSPROFILE") I know I got a lot of upmods a...
"All Users" Folder
Is there a .NET variable that returns the "All Users" directory?
[ "You'll want to use the system.environment variables.\nMost of the predefined ones are shown here. \nFor the \"All Users\" you would use:\nSystem.Environment.GetEnvironmentVariable(\"ALLUSERSPROFILE\")\n\nI know I got a lot of upmods and a correct answer for my other stuff, but this actually works. where as the ot...
[ 7, 1, 1 ]
[]
[]
[ ".net", "io" ]
stackoverflow_0000023178_.net_io.txt
Q: Need to test an ajax timeout condition As the title mentions, I have a timeout callback handler on an ajax call, and I want to be able to test that condition but nothing is coming to mind immediately on ways I can force my application to hit that state, any suggestions? A: You could always run a server-side scri...
Need to test an ajax timeout condition
As the title mentions, I have a timeout callback handler on an ajax call, and I want to be able to test that condition but nothing is coming to mind immediately on ways I can force my application to hit that state, any suggestions?
[ "You could always run a server-side script that keeps running for a period of time. \nFor example:\n<?php\n sleep(10); //sleep for 10 seconds.\n print \"This script has finished.\";\n>\n\n", "First off, I think you need to be clearer in your question - what technology are you using and where is this process t...
[ 3, 2, 1 ]
[]
[]
[ "ajax", "asp.net", "testing" ]
stackoverflow_0000023124_ajax_asp.net_testing.txt
Q: Summary of differences in regular expression syntax for various tools and languages? I can never remember the differences in regular expression syntax used by tools like grep and AWK, or languages like Python and PHP. Generally, Perl has the most expansive syntax, but I'm often hamstrung by the limitations of even...
Summary of differences in regular expression syntax for various tools and languages?
I can never remember the differences in regular expression syntax used by tools like grep and AWK, or languages like Python and PHP. Generally, Perl has the most expansive syntax, but I'm often hamstrung by the limitations of even egrep ("extended" grep). Is there a site that lists the differences in a concise and easy...
[ "For my own future reference, I'll offer the Regexp Syntax Summary page which contrasts the syntax for grep, egrep, Emacs, Perl, Python, and Tcl. As expected, Perl supports the greatest variety of operators, but Python looks equally capable, if not more so.\n", "Mastering Regular Expressions, devotes the last fou...
[ 11, 7, 5 ]
[]
[]
[ "grep", "regex" ]
stackoverflow_0000023216_grep_regex.txt
Q: Caching Schemes for Managed Languages This is mostly geared toward desktop application developers. How do I design a caching block which plays nicely with the GC? How do I tell the GC that I have just done a cache sweep and it is time to do a GC? How do I get an accurate measure of when it is time to do a cache...
Caching Schemes for Managed Languages
This is mostly geared toward desktop application developers. How do I design a caching block which plays nicely with the GC? How do I tell the GC that I have just done a cache sweep and it is time to do a GC? How do I get an accurate measure of when it is time to do a cache sweep? Are there any prebuilt caching sche...
[ "All you'll ever need to know (and then some):\nhttp://msdn.microsoft.com/en-us/library/ee817645.aspx\nOh, and GC.Collect() forces a collect.\n", "While I obviously cannot speak to the specifics of your application, in most instances you should not tie your caching implementation to some perceived expectation for...
[ 1, 1 ]
[]
[]
[ "caching", "garbage_collection" ]
stackoverflow_0000023175_caching_garbage_collection.txt
Q: Notification of drop in drag-drop in Windows My C# program has a list of files that can be dragged from it and dropped into another program. My requirements are that the file be copied to a different directory first. So, can I be notified of the drop operation so that I can only copy the file if operation succeeds...
Notification of drop in drag-drop in Windows
My C# program has a list of files that can be dragged from it and dropped into another program. My requirements are that the file be copied to a different directory first. So, can I be notified of the drop operation so that I can only copy the file if operation succeeds? I'd rather wait till I know it needs to be copie...
[ "There are a few ambiguities in your question. What operation needs to be successful?\nFor everything you want to know about drag and drop, browse through these search results (multiple pages worth):\nRaymond Chen on drag and drop\n", "So, you intend to modify the data being dropped based on the drop target? I d...
[ 1, 0 ]
[]
[]
[ "c#", "c++", "com", "winapi", "windows" ]
stackoverflow_0000023370_c#_c++_com_winapi_windows.txt
Q: In Visual Studio you must be a member of Debug Users or Administrators to start debugging. What if you are but it doesn't work? On my Windows XP machine Visual Studio 2003 2005 and 2008 all complain that I cannot start debugging my web application because I must either be a member of the Debug Users group or of th...
In Visual Studio you must be a member of Debug Users or Administrators to start debugging. What if you are but it doesn't work?
On my Windows XP machine Visual Studio 2003 2005 and 2008 all complain that I cannot start debugging my web application because I must either be a member of the Debug Users group or of the Administrators group. So, I am an Administrator and I added Debug Users just in case, and it still complains. Short of reformatting...
[ "Which users and/or groups are in your \"Debug programs\" right (under User Rights Assignment)? Maybe that setting got overridden by group policy (Daniel's answer), or just got out of whack for some reason. It should, obviously, include the \"Debug Users\" group.\n", "We encountered an issue like this and found t...
[ 2, 1, 0, 0 ]
[]
[]
[ "debugging", "permissions", "visual_studio" ]
stackoverflow_0000011724_debugging_permissions_visual_studio.txt
Q: Is it better to structure an SQL table to have a match, or return no result I've got an interesting design question. I'm designing the security side of our project, to allow us to have different versions of the program for different costs and also to allow Manager-type users to grant or deny access to parts of th...
Is it better to structure an SQL table to have a match, or return no result
I've got an interesting design question. I'm designing the security side of our project, to allow us to have different versions of the program for different costs and also to allow Manager-type users to grant or deny access to parts of the program to other users. Its going to web-based and hosted on our servers. I'm ...
[ "If it's only going to be Allow/Deny, then a simple linking table between Users and Resources would work fine. If there is an entry keyed to the User-Resource in the linking table, allow access.\nUserResources\n-------------\nUserId FK->Users\nResourceId FK->Resources\n\nand the sql would be something like \nif ex...
[ 4, 1, 0, 0 ]
[]
[]
[ "optimization", "sql", "sql_server" ]
stackoverflow_0000023399_optimization_sql_sql_server.txt
Q: How do I search content, within audio files/streams? I have always wondered how many different search techniques existed, for searching text, for searching images and even for videos. However, I have never come across a solution that searched for content within audio files. For example: Let us assume that I have ...
How do I search content, within audio files/streams?
I have always wondered how many different search techniques existed, for searching text, for searching images and even for videos. However, I have never come across a solution that searched for content within audio files. For example: Let us assume that I have about 200 podcasts downloaded to my PC in the form of mp3,...
[ "If you want to search for text (i.e. what is being said) inside an audio stream you would have to process it with some kind of speech recognition algorithm and store the text as meta data associated with the files. For video you could also do text recognition for text inside the video. Evernote already does this f...
[ 9 ]
[]
[]
[ "audio", "search", "speech_recognition" ]
stackoverflow_0000023592_audio_search_speech_recognition.txt
Q: CruiseControl.NET and NAnt I have a CC.NET project configured to call a common NAnt build file, which does some stuff, and then calls a child NAnt build file. The child build file name is specified by CC.NET to the command build file using a property. The hurdle that I am trying to get over is that the common buil...
CruiseControl.NET and NAnt
I have a CC.NET project configured to call a common NAnt build file, which does some stuff, and then calls a child NAnt build file. The child build file name is specified by CC.NET to the command build file using a property. The hurdle that I am trying to get over is that the common build file log gets overwritten by t...
[ "Use the nant task, so you get one single build file.\n", "Is there any way that you could include the child nant file as opposed to executing it as a full-fledged child nant project? This would prevent the overwrite, but not sure if it's possible in your situation.\n" ]
[ 1, 0 ]
[]
[]
[ "cruisecontrol.net", "nant" ]
stackoverflow_0000023503_cruisecontrol.net_nant.txt
Q: What WCF best practices do you follow in object model design? I've noticed that a handful of WCF applications choose to "break" their objects apart; that is, a project might have a DataObjects assembly that contains DataContracts/Members in addition to a meaningful class library that performs business logic. Is th...
What WCF best practices do you follow in object model design?
I've noticed that a handful of WCF applications choose to "break" their objects apart; that is, a project might have a DataObjects assembly that contains DataContracts/Members in addition to a meaningful class library that performs business logic. Is this an unnecessary level of abstraction? Is there any inherent evil ...
[ "The key reason to separating internal business objects from the data contracts/message contracts is that you don't want internal changes to your app to necessarily change the service contract. If you're creating versioned web services (with more than 1 version of the implemented interfaces) then you often have a s...
[ 17 ]
[]
[]
[ "wcf" ]
stackoverflow_0000023564_wcf.txt
Q: Running Apache alongside another web server? Has anyone had any success running two different web servers -- such as Apache and CherryPy -- alongside each other on the same machine? I am experimenting with other web servers right now, and I'd like to see if I can do my experiments while keeping my other sites up ...
Running Apache alongside another web server?
Has anyone had any success running two different web servers -- such as Apache and CherryPy -- alongside each other on the same machine? I am experimenting with other web servers right now, and I'd like to see if I can do my experiments while keeping my other sites up and running. You could say that this isn't so muc...
[ "You can't have two processes bound to the same port on the same IP address. You can add another IP address to the box and have each server listen on one.\nAnother option is to proxy pass one server to the other. With Apache, you could do something like:\nNameVirtualHost *\n<virtualhost *>\n ServerName other.site....
[ 7, 0, 0 ]
[]
[]
[ "apache", "linux" ]
stackoverflow_0000023715_apache_linux.txt
Q: Reporting Systems for ASP.NET What are the best open source (open source and commercial) reporting tools for ASP.NET similar to Crystal Reports for ASP.NET? A: Microsoft Reporting Services, free and included with SQL Server 2005 and 2008. Of course, this is great if you need a separation of report design and app...
Reporting Systems for ASP.NET
What are the best open source (open source and commercial) reporting tools for ASP.NET similar to Crystal Reports for ASP.NET?
[ "Microsoft Reporting Services, free and included with SQL Server 2005 and 2008.\nOf course, this is great if you need a separation of report design and application, which for Enterprise applications is a huge plus.\nHowever, if what you want is to be able to create \"in application\" dashboards, where \"you\" desig...
[ 8, 2, 1, 0, 0, 0 ]
[]
[]
[ "asp.net", "report" ]
stackoverflow_0000023614_asp.net_report.txt
Q: MySQL Administrator Backups: "Compatibility Mode", What Exactly is this doing? In Mysql Administrator, when doing backups, what exactly is "Compatibility Mode"? I'm trying to bridge backups generated by webmin with the upload tool available inside mysql administrator. My data already has a couple of inconsistenci...
MySQL Administrator Backups: "Compatibility Mode", What Exactly is this doing?
In Mysql Administrator, when doing backups, what exactly is "Compatibility Mode"? I'm trying to bridge backups generated by webmin with the upload tool available inside mysql administrator. My data already has a couple of inconsistencies (ticks, commas, etc, I think) I just wont try to kink out (they might just reappe...
[ "Compatibility mode - the mode that helps you create exports compabible with different versions of MYSQL or other databases.\nYou see, some versions of MySQL had different commands that were used in various versions. So what compatibility mode allows you to do is take a database and export the SQL to be compatible...
[ 1 ]
[]
[]
[ "backup", "mysql" ]
stackoverflow_0000008365_backup_mysql.txt
Q: Syncing library/project subversion respositories I'm developing a library alongside several projects that use it, and I've found myself frequently modifying the library at the same time as a project (e.g., adding a function to the library and immediately using it in the project). As a result, the project would no ...
Syncing library/project subversion respositories
I'm developing a library alongside several projects that use it, and I've found myself frequently modifying the library at the same time as a project (e.g., adding a function to the library and immediately using it in the project). As a result, the project would no longer compile with previous versions of the library. ...
[ "An option that might work for you is to use an svn:external reference to the library. When tagging the project, you can do one of two things:\n\nUpdate the svn:external to refer to a specific revision of the library; OR\nUpdate the svn:external to refer to a new tag that you make on the library. \n\nSince the svn:...
[ 3, 2, 2, 0 ]
[]
[]
[ "svn", "synchronization" ]
stackoverflow_0000023603_svn_synchronization.txt
Q: Cleanest Way to Find a Match In a List What is the best way to find something in a list? I know LINQ has some nice tricks, but let's also get suggestions for C# 2.0. Lets get the best refactorings for this common code pattern. Currently I use code like this: // mObjList is a List<MyObject> MyObject match = null;...
Cleanest Way to Find a Match In a List
What is the best way to find something in a list? I know LINQ has some nice tricks, but let's also get suggestions for C# 2.0. Lets get the best refactorings for this common code pattern. Currently I use code like this: // mObjList is a List<MyObject> MyObject match = null; foreach (MyObject mo in mObjList) { if ...
[ "\n@ Konrad: So how do you use it? Let's say I want to match mo.ID to magicNumber.\n\nIn C# 2.0 you'd write:\nresult = mObjList.Find(delegate(int x) { return x.ID == magicNumber; });\n\n3.0 knows lambdas:\nresult = mObjList.Find(x => x.ID == magicNumber);\n\n", "Using a Lambda expression:\nList<MyObject> list = n...
[ 17, 4, 1, 1 ]
[]
[]
[ "c#", "refactoring" ]
stackoverflow_0000023787_c#_refactoring.txt
Q: The difference between loops It's about PHP but I've no doubt many of the same comments will apply to other languages. Simply put, what are the differences in the different types of loop for PHP? Is one faster/better than the others or should I simply put in the most readable loop? for ($i = 0; $i < 10; $i++) { ...
The difference between loops
It's about PHP but I've no doubt many of the same comments will apply to other languages. Simply put, what are the differences in the different types of loop for PHP? Is one faster/better than the others or should I simply put in the most readable loop? for ($i = 0; $i < 10; $i++) { # code... } foreach ($array as...
[ "For loop and While loops are entry condition loops. They evaluate condition first, so the statement block associated with the loop won't run even once if the condition fails to meet \nThe statements inside this for loop block will run 10 times, the value of $i will be 0 to 9;\nfor ($i = 0; $i < 10; $i++)\n{\n ...
[ 10, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0 ]
[]
[]
[ "loops", "php" ]
stackoverflow_0000022801_loops_php.txt
Q: What's a good way to check if two datetimes are on the same calendar day in TSQL? Here is the issue I am having: I have a large query that needs to compare datetimes in the where clause to see if two dates are on the same day. My current solution, which sucks, is to send the datetimes into a UDF to convert them t...
What's a good way to check if two datetimes are on the same calendar day in TSQL?
Here is the issue I am having: I have a large query that needs to compare datetimes in the where clause to see if two dates are on the same day. My current solution, which sucks, is to send the datetimes into a UDF to convert them to midnight of the same day, and then check those dates for equality. When it comes to ...
[ "This is much more concise:\nwhere \n datediff(day, date1, date2) = 0\n\n", "You pretty much have to keep the left side of your where clause clean. So, normally, you'd do something like:\nWHERE MyDateTime >= @activityDateMidnight \n AND MyDateTime < (@activityDateMidnight + 1)\n\n(Some folks prefer DATEADD(...
[ 76, 21, 6, 4, 2, 2, 1, 1, 0, 0 ]
[]
[]
[ "datetime", "sql", "sql_server", "tsql", "user_defined_functions" ]
stackoverflow_0000022570_datetime_sql_sql_server_tsql_user_defined_functions.txt
Q: Silverlight programmatic access to Sony RZ30N Video Feed I would like to bypass the web-server functionality of a Sony SNC-RZ30N network attached web cam and display the video feed in a Silverlight application. I can't seem to find any examples of interfacing with the camera programatically. Any leads would be muc...
Silverlight programmatic access to Sony RZ30N Video Feed
I would like to bypass the web-server functionality of a Sony SNC-RZ30N network attached web cam and display the video feed in a Silverlight application. I can't seem to find any examples of interfacing with the camera programatically. Any leads would be much appreciated. Thx. Update 09/09/2008: Found a good site with...
[ "I don't know the details of the Sony network camera and the server side software. But what do you mean by web-server functionality - is that the UI that get served up to the users in form of a HTML page? Or is it something more, like a server capturing the video stream and transcoding it?\nI think the direction yo...
[ 1 ]
[]
[]
[ "silverlight", "streaming", "video", "webcam" ]
stackoverflow_0000023539_silverlight_streaming_video_webcam.txt
Q: What are OpenGL extensions, and what are the benefits/tradeoffs of using them? In relation to this question on Using OpenGL extensions, what's the purpose of these extension functions? Why would I want to use them? Further, are there any tradeoffs or gotchas associated with using them? A: The OpenGL standard all...
What are OpenGL extensions, and what are the benefits/tradeoffs of using them?
In relation to this question on Using OpenGL extensions, what's the purpose of these extension functions? Why would I want to use them? Further, are there any tradeoffs or gotchas associated with using them?
[ "The OpenGL standard allows individual vendors to provide additional functionality through extensions as new technology is created. Extensions may introduce new functions and new constants, and may relax or remove restrictions on existing OpenGL functions. \nEach vendor has an alphabetic abbreviation that is used i...
[ 23, 8, 7 ]
[]
[]
[ "opengl" ]
stackoverflow_0000017352_opengl.txt
Q: .NET Security Policy change by standard users? The .NET Security Policy can be changed from a script by using CasPol.exe. Say I will be distributing an application to several users on a local network. Most of those users will be unprivileged, standard accounts, so they will not have necessary permissions for the r...
.NET Security Policy change by standard users?
The .NET Security Policy can be changed from a script by using CasPol.exe. Say I will be distributing an application to several users on a local network. Most of those users will be unprivileged, standard accounts, so they will not have necessary permissions for the relevant command. I think I shall be looking into dom...
[ "The latest version of .Net 3.5 SP1 now allows you to run managed executables over a network share without using CasPol.\nSee this post\n" ]
[ 1 ]
[]
[]
[ ".net", "security", "windows" ]
stackoverflow_0000023713_.net_security_windows.txt
Q: Sorting a composite collection So WPF doesn't support standard sorting or filtering behavior for views of CompositeCollections, so what would be a best practice for solving this problem. There are two or more object collections of different types. You want to combine them into a single sortable and filterable col...
Sorting a composite collection
So WPF doesn't support standard sorting or filtering behavior for views of CompositeCollections, so what would be a best practice for solving this problem. There are two or more object collections of different types. You want to combine them into a single sortable and filterable collection (withing having to manually ...
[ "\"Brute force\" method you mention is actually ideal solution. Mind you, all objects are in RAM, there is no I/O bottleneck, so you can pretty much sort and filter millions of objects in less than a second on any modern computer.\nThe most elegant way to work with collections is System.Linq namespace in .NET 3.5\n...
[ 1, 1, 1 ]
[]
[]
[ ".net", "c#", "collections", "data_binding", "wpf" ]
stackoverflow_0000011288_.net_c#_collections_data_binding_wpf.txt
Q: How do I add existing comments to RDoc in Ruby? I want to format my existing comments as 'RDoc comments' so they can be viewed using ri. What are some recommended resources for starting out using RDoc? A: A few things that have bitten me: :main: -- RDoc uses only the last one evaluated; best to make sure there'...
How do I add existing comments to RDoc in Ruby?
I want to format my existing comments as 'RDoc comments' so they can be viewed using ri. What are some recommended resources for starting out using RDoc?
[ "A few things that have bitten me:\n\n:main: -- RDoc uses only the last one evaluated; best to make sure there's only one in your project and you don't also use the --main command-line argument.\nsame as previous, but for :title:\n:section: doesn't work very well\n\n", "RDoc uses SimpleMarkup so it's fairly simpl...
[ 16, 10 ]
[]
[]
[ "rdoc", "ruby" ]
stackoverflow_0000000072_rdoc_ruby.txt
Q: Why is an s-box input longer than its output? I don't understand where the extra bits are coming from in this article about s-boxes. Why doesn't the s-box take in the same number of bits for input as output? A: It is the way s-boxes work. They can be m * n ==> m bit input , n bit output. For example, in the A...
Why is an s-box input longer than its output?
I don't understand where the extra bits are coming from in this article about s-boxes. Why doesn't the s-box take in the same number of bits for input as output?
[ "It is the way s-boxes work. They can be m * n ==> m bit input , n bit output.\nFor example, in the AES S-box the number of bits in input is equal to the number of bits in output.\nIn DES, m=6 and n=4.\nThe input is expanded from 32 to 48 bits in the first stages of DES. So it is be reduced to 32 bits again by ap...
[ 3, 1 ]
[]
[]
[ "cryptography" ]
stackoverflow_0000023988_cryptography.txt
Q: Best method to get objects from a BlockingQueue in a concurrent program? What is the best method to get objects out of a BlockingQueue, in a concurrent program, without hitting a race condition? I'm currently doing the following and I'm not convinced it is the best method: BlockingQueue<Violation> vQueue; /* in ...
Best method to get objects from a BlockingQueue in a concurrent program?
What is the best method to get objects out of a BlockingQueue, in a concurrent program, without hitting a race condition? I'm currently doing the following and I'm not convinced it is the best method: BlockingQueue<Violation> vQueue; /* in the constructor I pass in a BlockingQueue object full of violations that need...
[ "class Producer implements Runnable {\n private final BlockingQueue queue;\n Producer(BlockingQueue q) { queue = q; }\n public void run() {\n try {\n while (true) { queue.put(produce()); }\n } catch (InterruptedException ex) { ... handle ...}\n }\n Object produce() { ... }\n }\n\n class Cons...
[ 6 ]
[]
[]
[ "concurrency", "java" ]
stackoverflow_0000023950_concurrency_java.txt
Q: Create an EXE from a SWF using Flex 3 without requiring AIR? I have a simple little test app written in Flex 3 (MXML and some AS3). I can compile it to a SWF just fine, but I'd like to make it into an EXE so I can give it to a couple of my coworkers who might find it useful. With Flash 8, I could just target an E...
Create an EXE from a SWF using Flex 3 without requiring AIR?
I have a simple little test app written in Flex 3 (MXML and some AS3). I can compile it to a SWF just fine, but I'd like to make it into an EXE so I can give it to a couple of my coworkers who might find it useful. With Flash 8, I could just target an EXE instead of a SWF and it would wrap the SWF in a projector, and ...
[ "In your Flex SDK folders you should see a 'runtimes\\player\\win\\FlashPlayer.exe' which is a stand alone Flash player. Open your SWF with that and you'll see a 'Create Projector...' menu item in the File menu which will create the stand-alone EXE.\n", "imaginaryboy gets it right, I believe. Btw, since you don'...
[ 22, 2, 1 ]
[]
[]
[ "actionscript_3", "apache_flex", "flash" ]
stackoverflow_0000023373_actionscript_3_apache_flex_flash.txt
Q: Enumerate Windows user group members on remote system using c# Within c#, I need to be able to Connect to a remote system, specifying username/password as appropriate List the members of a localgroup on that system Fetch the results back to the executing computer So for example I would connect to \SOMESYSTEM wit...
Enumerate Windows user group members on remote system using c#
Within c#, I need to be able to Connect to a remote system, specifying username/password as appropriate List the members of a localgroup on that system Fetch the results back to the executing computer So for example I would connect to \SOMESYSTEM with appropriate creds, and fetch back a list of local administrators i...
[ "davidg was on the right track, and I am crediting him with the answer.\nBut the WMI query necessary was a little less than straightfoward, since I needed not just a list of users for the whole machine, but the subset of users and groups, whether local or domain, that were members of the local Administrators group....
[ 2, 1, 1, 0, 0 ]
[]
[]
[ "c#", "user_management", "usergroups", "windows" ]
stackoverflow_0000021514_c#_user_management_usergroups_windows.txt
Q: Experiences Using ASP.NET MVC Framework I am wondering what experiences people are having using the ASP.NET MVC Framework? In particular I am looking for feedback on the type of experience folks are having using the framework. What are people using for their view engine? What about the db layer, NHibernate, LINQ...
Experiences Using ASP.NET MVC Framework
I am wondering what experiences people are having using the ASP.NET MVC Framework? In particular I am looking for feedback on the type of experience folks are having using the framework. What are people using for their view engine? What about the db layer, NHibernate, LINQ to SQL or something else? I know stackoverfl...
[ "I've been building a few sites with the framework since the first preview came out, and it has certainly come a long way already. It feels like a very light-weight and tidy framework.\nThere are a couple of areas where I think it really excels over \"vanilla\" asp.net:\n\nEnables a much cleaner separation of conce...
[ 4, 2, 2, 1, 0, 0 ]
[]
[]
[ ".net", "asp.net", "asp.net_mvc" ]
stackoverflow_0000023994_.net_asp.net_asp.net_mvc.txt
Q: How to handle including needed classes in PHP I'm wondering what the best practice is for handling the problem with having to "include" so many files in my PHP scripts in order to ensure that all the classes I need to use are accessible to my script. Currently, I'm just using include_once to include the classes I...
How to handle including needed classes in PHP
I'm wondering what the best practice is for handling the problem with having to "include" so many files in my PHP scripts in order to ensure that all the classes I need to use are accessible to my script. Currently, I'm just using include_once to include the classes I access directly. Each of those would include_once...
[ "I my applications I usually have setup.php file that includes all core classes (i.e. framework and accompanying libraries). My custom classes are loaded using autoloader aided by directory layout map.\nEach time new class is added I run command line builder script that scans whole directory tree in search for mode...
[ 6, 2, 1, 0, 0, 0, 0 ]
[]
[]
[ "autoload", "class", "include", "php" ]
stackoverflow_0000023802_autoload_class_include_php.txt
Q: What Comes After The %? I've searched for this a little but I have not gotten a particularly straight answer. In C (and I guess C++), how do you determine what comes after the % when using printf?. For example: double radius = 1.0; double area = 0.0; area = calculateArea( radius ); printf( "%10.1f %10.2\n", ra...
What Comes After The %?
I've searched for this a little but I have not gotten a particularly straight answer. In C (and I guess C++), how do you determine what comes after the % when using printf?. For example: double radius = 1.0; double area = 0.0; area = calculateArea( radius ); printf( "%10.1f %10.2\n", radius, area ); I took this ex...
[ "http://en.wikipedia.org/wiki/Printf#printf_format_placeholders is Wikipedia's reference for format placeholders in printf. http://www.cplusplus.com/reference/clibrary/cstdio/printf.html is also helpful\nBasically in a simple form it's %[width].[precision][type]. Width allows you to make sure that the variable whic...
[ 15, 7, 2, 2, 1, 0, 0 ]
[ "One issue that hasn't been raised by others is whether double is the same as a float. On some systems a different format specifier was needed for a double compared to a float. Not least because the parameters passed could be of different sizes.\n\n %f - float\n %lf - double\n %g - double\n\n" ]
[ -1 ]
[ "c" ]
stackoverflow_0000017980_c.txt
Q: Using an ocx in a console application I want to quickly test an ocx. How do I drop that ocx in a console application. I have found some tutorials in CodeProject and but are incomplete. A: Isn't an OCX an ActiveX User Control? (something that you put onto a form for the user to interact with)? The easiest way I ...
Using an ocx in a console application
I want to quickly test an ocx. How do I drop that ocx in a console application. I have found some tutorials in CodeProject and but are incomplete.
[ "Isn't an OCX an ActiveX User Control? (something that you put onto a form for the user to interact with)?\nThe easiest way I know of to test COM/ActiveX stuff is to use excel. (Yes I know it sounds dumb, bear with me)\n\nRun Excel, create a new file if it hasn't done this for you\nPress Alt+F11 to launch the Visua...
[ 3, 2, 1 ]
[]
[]
[ "activex", "c++", "console", "visual_c++" ]
stackoverflow_0000017928_activex_c++_console_visual_c++.txt
Q: How can I create virtual machines as part of a build process using MSBuild and MS Virtual Server and/or Hyper-V Server Virtualization? What I would like to do is create a clean virtual machine image as the output of a build of an application. So a new virtual machine would be created (from a template is fine, with...
How can I create virtual machines as part of a build process using MSBuild and MS Virtual Server and/or Hyper-V Server Virtualization?
What I would like to do is create a clean virtual machine image as the output of a build of an application. So a new virtual machine would be created (from a template is fine, with the OS installed, and some base software installed) --- a new web site would be created in IIS, and the web app build output copied to a lo...
[ "You can actually script a fair number of tasks in MS Virtual Server:\nhttp://www.microsoft.com/technet/scriptcenter/scripts/vs/default.mspx?mfr=true\nhttp://msdn.microsoft.com/en-us/library/aa368876(VS.85).aspx\nAlso Virtual PC guy has got a ton of stuff on his blog about scripting Virtual Server/PC and now Hyper-...
[ 3, 3 ]
[]
[]
[ "hyper_v", "msbuild", "virtualization" ]
stackoverflow_0000011720_hyper_v_msbuild_virtualization.txt
Q: Embedding IPTC image data with PHP GD I'm trying to embed a IPTC data onto a JPEG image using iptcembed() but am having a bit of trouble. I have verified it is in the end product: // Embed the IPTC data $content = iptcembed($data, $path); // Verify IPTC data is in the end image $iptc = iptcparse($content); var_du...
Embedding IPTC image data with PHP GD
I'm trying to embed a IPTC data onto a JPEG image using iptcembed() but am having a bit of trouble. I have verified it is in the end product: // Embed the IPTC data $content = iptcembed($data, $path); // Verify IPTC data is in the end image $iptc = iptcparse($content); var_dump($iptc); Which returns the tags entered....
[ "getimagesize has an optional second parameter Imageinfo which contains the info you need. \nFrom the manual:\n\nThis optional parameter allows you to extract some extended information from the image file. Currently, this will return the different JPG APP markers as an associative array. Some programs use these APP...
[ 3 ]
[]
[]
[ "gd", "iptc", "php" ]
stackoverflow_0000024456_gd_iptc_php.txt
Q: How much extra overhead is generated when sending a file over a web service as a byte array? This question and answer shows how to send a file as a byte array through an XML web service. How much overhead is generated by using this method for file transfer? I assume the data looks something like this: <?xml versi...
How much extra overhead is generated when sending a file over a web service as a byte array?
This question and answer shows how to send a file as a byte array through an XML web service. How much overhead is generated by using this method for file transfer? I assume the data looks something like this: <?xml version="1.0" encoding="UTF-8" ?> <bytes> <byte>16</byte> <byte>28</byte> <byte>127</byte> ...
[ "Typically a byte array is sent as a base64 encoded string, not as individual bytes in tags. \nhttp://en.wikipedia.org/wiki/Base64\nThe base64 encoded version is about 137% of the size of the original content.\n", "I use this method for some internal corporate webservices, and I haven't noticed any major slow-dow...
[ 11, 0, 0, 0, 0 ]
[]
[]
[ "web_services", "xml" ]
stackoverflow_0000011820_web_services_xml.txt
Q: What is the purpose of the AppManifest.xaml file in Silverlight applications? In opening up the .xap file that is generated as output from a Silverlight application I've been tinkering with lately, I noticed a file called AppManifest.xaml. I've also noticed an option in the property pages for the Silverlight proje...
What is the purpose of the AppManifest.xaml file in Silverlight applications?
In opening up the .xap file that is generated as output from a Silverlight application I've been tinkering with lately, I noticed a file called AppManifest.xaml. I've also noticed an option in the property pages for the Silverlight project that appears to allow you to optionally not output AppManifest.xaml for the proj...
[ "Maybe this blog post will help: http://blogs.msdn.com/katriend/archive/2008/03/16/silverlight-2-structure-of-the-new-xap-file-silverlight-packaged-application.aspx. It discusses the .xap file and its parts including the AppManifest.\nTo save people a link click, in short, it defines the application for deployment...
[ 6 ]
[]
[]
[ "silverlight" ]
stackoverflow_0000024506_silverlight.txt
Q: Stylus/tablet input device I need to make a WebCast presentation soon and need to do some "whiteboarding" during that WebCast. Does anyone have any stylus/tablet input device recommendations? Anyone ever used such an input device with WebEx's whiteboard feature? rp A: Wacom http://www.wacom.com/index2.cfm makes ...
Stylus/tablet input device
I need to make a WebCast presentation soon and need to do some "whiteboarding" during that WebCast. Does anyone have any stylus/tablet input device recommendations? Anyone ever used such an input device with WebEx's whiteboard feature? rp
[ "Wacom http://www.wacom.com/index2.cfm\nmakes by far the best tablets I have ever used. They come in a variety of prices with associated features. If you want to be able to draw 'on-screen' they have the Cintiq, which is the most expensive, starting at $999 but definitely worth it. For a cheaper more 'traditiona...
[ 2, 0 ]
[]
[]
[ "webex" ]
stackoverflow_0000024599_webex.txt
Q: What Javascript rich text editor will not break the browser's spellcheck? I'm using TinyMCE in an ASP.Net project, and I need a spell check. The only TinyMCE plugins I've found use PHP on the server side, and I guess I could just break down and install PHP on my server and do that, but quite frankly, what a pain. ...
What Javascript rich text editor will not break the browser's spellcheck?
I'm using TinyMCE in an ASP.Net project, and I need a spell check. The only TinyMCE plugins I've found use PHP on the server side, and I guess I could just break down and install PHP on my server and do that, but quite frankly, what a pain. I don't want to do that. As it turns out, Firefox's built-in spell check will w...
[ "TinyMCE only goes out of its way to disable spell-checking when you don't specify the gecko_spellcheck option (i verified this with their example code). Might want to double-check your tinyMCE.init() call - it should look something like this:\ntinyMCE.init({\n mode : \"textareas\",\n theme : \"simple\",\n ...
[ 4, 1, 0 ]
[]
[]
[ "javascript", "spell_checking" ]
stackoverflow_0000023620_javascript_spell_checking.txt
Q: Vi editing for Visual Studio I'm used to the Vi(m) editor and am using MS Visual Studio 2005 at work. I couldn't find a free Vi add-in (there's only one for the 2003 version). I googled a bit, saw that there was a 'Google summer of code' project this year to write such an add-in, and am eagerly awaiting the result...
Vi editing for Visual Studio
I'm used to the Vi(m) editor and am using MS Visual Studio 2005 at work. I couldn't find a free Vi add-in (there's only one for the 2003 version). I googled a bit, saw that there was a 'Google summer of code' project this year to write such an add-in, and am eagerly awaiting the result. I've also heard of ViEmu (not fr...
[ "ViEmu works great with Visual Studio. I used Vi(m) strictly in Linux, but I was turned on to bringing the Vi(m) editing process into the Windows world by JP Boodhoo. JP praises about it also.\n", "ViEmu works great. I've been using it for about a year now and couldn't imagine coding in Visual Studio without it...
[ 6, 3 ]
[]
[]
[ "editor", "ide", "vim", "visual_studio" ]
stackoverflow_0000024610_editor_ide_vim_visual_studio.txt
Q: Securing a linux webserver for public access I'd like to set up a cheap Linux box as a web server to host a variety of web technologies (PHP & Java EE come to mind, but I'd like to experiment with Ruby or Python in the future as well). I'm fairly versed in setting up Tomcat to run on Linux for serving up Java EE ...
Securing a linux webserver for public access
I'd like to set up a cheap Linux box as a web server to host a variety of web technologies (PHP & Java EE come to mind, but I'd like to experiment with Ruby or Python in the future as well). I'm fairly versed in setting up Tomcat to run on Linux for serving up Java EE applications, but I'd like to be able to open this...
[ "This article has some of the best ways to lock things down:\nhttp://www.petefreitag.com/item/505.cfm\nSome highlights:\n\nMake sure no one can browse the directories\nMake sure only root has write privileges to everything, and only root has read privileges to certain config files\nRun mod_security\n\nThe article a...
[ 5, 5, 2, 2, 2, 1, 1, 1, 1, 1, 0, 0 ]
[]
[]
[ "linux", "security", "webserver" ]
stackoverflow_0000005078_linux_security_webserver.txt
Q: IE 7+ Favorites Is it possible to develop a plug-in for Internet Explorer that can replace the existing favorites functionality? A: Absolutely, however, it does depend somewhat on what you expect "replacing" to mean. You can develop an extension to provide a new set of menus or dropdown toolbar of some kind like...
IE 7+ Favorites
Is it possible to develop a plug-in for Internet Explorer that can replace the existing favorites functionality?
[ "Absolutely, however, it does depend somewhat on what you expect \"replacing\" to mean. You can develop an extension to provide a new set of menus or dropdown toolbar of some kind like the Google Bookmarks toolbar for example, or like the Delicious toolbar & sidebar. These IMO are much better designs for managing b...
[ 5 ]
[]
[]
[ "bookmarks", "favorites", "internet_explorer" ]
stackoverflow_0000024439_bookmarks_favorites_internet_explorer.txt
Q: What's the general consensus on supporting Windows 2000? What's the general consensus on supporting Windows 2000 for software distribution? Are people supporting Windows XP SP2+ for new software development or is this too restrictive still? A: "OK" is a subjective judgement. You'll need to take a look at your cl...
What's the general consensus on supporting Windows 2000?
What's the general consensus on supporting Windows 2000 for software distribution? Are people supporting Windows XP SP2+ for new software development or is this too restrictive still?
[ "\"OK\" is a subjective judgement. You'll need to take a look at your client base and see what they're using.\nHaving said that, I dropped support for Win2K over a year ago with no negative impact.\n", "I'd say MS have made the decision for you if they themselves wont support it in .NET 3.5.\n", "The latest ver...
[ 8, 3, 1, 1, 0, 0, 0, 0, 0 ]
[]
[]
[ "compatibility", "deployment", "windows" ]
stackoverflow_0000011801_compatibility_deployment_windows.txt
Q: SelectNodes not working on stackoverflow feed I'm trying to add support for stackoverflow feeds in my rss reader but SelectNodes and SelectSingleNode have no effect. This is probably something to do with ATOM and xml namespaces that I just don't understand yet. I have gotten it to work by removing all attributes f...
SelectNodes not working on stackoverflow feed
I'm trying to add support for stackoverflow feeds in my rss reader but SelectNodes and SelectSingleNode have no effect. This is probably something to do with ATOM and xml namespaces that I just don't understand yet. I have gotten it to work by removing all attributes from the feed tag, but that's a hack and I would lik...
[ "Don't confuse the namespace names in the XML file with the namespace names for your namespace manager. They're both shortcuts, and they don't necessarily have to match.\nSo you can register \"http://www.w3.org/2005/Atom\" as \"atom\", and then do a SelectNodes for \"atom:entry\".\n", "You might need to add a Xml...
[ 9, 6, 2, 0 ]
[]
[]
[ ".net", "atom_feed", "c#", "rss" ]
stackoverflow_0000024734_.net_atom_feed_c#_rss.txt
Q: Displaying version of underlying software in footer of web app? I am thinking about providing a version of say, the database schema and the dlls for business logic in the footer of my web application. Is this advised? Are there any pitfalls, or pointers of how to do this best? Usability concerns? I already have a ...
Displaying version of underlying software in footer of web app?
I am thinking about providing a version of say, the database schema and the dlls for business logic in the footer of my web application. Is this advised? Are there any pitfalls, or pointers of how to do this best? Usability concerns? I already have a version scheme, for both schema and dlls, used in my CI solution.
[ "Don't do this. It gives away free information to a potential attacker and makes their job easier. If there are exploits known for your given version of the software, there's no need to tell them that. There are actually search engines built on top of Google who use this information incontinence to power massive ex...
[ 10, 6, 2 ]
[]
[]
[ "assemblies", "versioning", "web_applications" ]
stackoverflow_0000024731_assemblies_versioning_web_applications.txt
Q: SQL many-to-many matching I'm implementing a tagging system for a website. There are multiple tags per object and multiple objects per tag. This is accomplished by maintaining a table with two values per record, one for the ids of the object and the tag. I'm looking to write a query to find the objects that match ...
SQL many-to-many matching
I'm implementing a tagging system for a website. There are multiple tags per object and multiple objects per tag. This is accomplished by maintaining a table with two values per record, one for the ids of the object and the tag. I'm looking to write a query to find the objects that match a given set of tags. Suppose I ...
[ "Given:\n\nobject table (primary key id)\nobjecttags table (foreign keys objectId, tagid)\ntags table (primary key id)\nSELECT distinct o.*\n from object o join objecttags ot on o.Id = ot.objectid\n join tags t on ot.tagid = t.id\n where t.Name = 'fruit' or t.name = 'food';\n\n\nThis seems backwards...
[ 4, 4, 0, 0, 0 ]
[ "I'd suggest making your table have 1 tag per record, like this:\n apple -> fruit\n apple -> red\n apple -> food\n banana -> fruit\n banana -> yellow\n banana -> food\n\nThen you could just\n SELECT object WHERE tag = 'fruit' OR tag = 'food';\n\nIf you really want to do it your way though, you could do it like this...
[ -2 ]
[ "many_to_many", "sql", "tagging" ]
stackoverflow_0000024715_many_to_many_sql_tagging.txt
Q: ASP.NET Tutorials can you recommend some good ASP.NET tutorials or a good book? Should I jump right to ASP.NET MVC/html/javascript or learn web forms first? Thanks A: A great book if you're just beginning is Matthew MacDonald's Beginning ASP.NET 3.5 in C# 2008: From Novice to Professional. Once you're done with...
ASP.NET Tutorials
can you recommend some good ASP.NET tutorials or a good book? Should I jump right to ASP.NET MVC/html/javascript or learn web forms first? Thanks
[ "A great book if you're just beginning is Matthew MacDonald's Beginning ASP.NET 3.5 in C# 2008: From Novice to Professional. Once you're done with that a great reference (also by MacDonald) is Pro ASP.NET 3.5 in C# 2008. One of my favorite sources of information online is 4GuysFromRolla.\n", "MVC or WebForms...it...
[ 2, 1, 0, 0, 0 ]
[]
[]
[ "asp.net", "asp.net_mvc" ]
stackoverflow_0000022598_asp.net_asp.net_mvc.txt
Q: Where do I find information about Blog APIs and how to use them? I'm thinking of creating a small offline blog editor for personal use and I don't know how do the APIs work. Where can I find this information? I'm particularly looking for the most common providers: Blogger, Wordpress, MovableType, Live Spaces (not ...
Where do I find information about Blog APIs and how to use them?
I'm thinking of creating a small offline blog editor for personal use and I don't know how do the APIs work. Where can I find this information? I'm particularly looking for the most common providers: Blogger, Wordpress, MovableType, Live Spaces (not sure if this has an API) etc.
[ "See the following links:\nBlogger\nWordpress\nLive Spaces\n", "The Blogger API link you provided says:\n\nThis documentation is provided for\n historical interest only. The Blogger\n 1.0 API is no longer supported and must not be used for new client\n development. Please use our GData API \n instead.\n\nSo t...
[ 3, 1, 1 ]
[]
[]
[ "api", "blogs" ]
stackoverflow_0000024708_api_blogs.txt
Q: Hooking my program with windows explorer's rename event Is there any way, in any language, to hook my program when a user renames a file? For example: A user renames a file and presses enter (or clicks away) to confirm the rename action. BEFORE the file is actually renamed, my program "listens" to this event and p...
Hooking my program with windows explorer's rename event
Is there any way, in any language, to hook my program when a user renames a file? For example: A user renames a file and presses enter (or clicks away) to confirm the rename action. BEFORE the file is actually renamed, my program "listens" to this event and pops up a message saying "Are you sure you want to rename C:\t...
[ "You can probably solve this by using the FileSystemWatcher class in .NET framework.\nFrom the class remarks:\n\nYou can watch for renaming, deletion,\n or creation of files or directories.\n For example, to watch for renaming of\n text files, set the Filter property to\n \"*.txt\" and call the WaitForChanged\n...
[ 5, 0, 0 ]
[]
[]
[ ".net", "c#", "file", "io" ]
stackoverflow_0000024644_.net_c#_file_io.txt
Q: About File permissions in C# While creating a file synchronization program in C# I tried to make a method copy in LocalFileItem class that uses System.IO.File.Copy(destination.Path, Path, true) method where Path is a string. After executing this code with destination. Path = "C:\\Test2" and this.Path = "C:\\Test\\...
About File permissions in C#
While creating a file synchronization program in C# I tried to make a method copy in LocalFileItem class that uses System.IO.File.Copy(destination.Path, Path, true) method where Path is a string. After executing this code with destination. Path = "C:\\Test2" and this.Path = "C:\\Test\\F1.txt" I get an exception saying ...
[ "It seems you have misplaced the parameters in File.Copy(), it should be File.Copy(string source, string destination).\nAlso is \"C:\\Test2\" a directory? You can't copy file to a directory. \nUse something like that instead:\n\nFile.Copy( \n sourceFile,\n Path.Combine(destinationDir,Path.GetFileName(sourceF...
[ 4, 0, 0 ]
[]
[]
[ "c#", "copy", "file" ]
stackoverflow_0000024262_c#_copy_file.txt
Q: Automating WSDL.exe in a Custom Build I have a web application written in C# that consumes several internal web services. We have a development tier, a testing tier, and a production tier. Also, we use the WSDL.exe command to generate a Proxies.cs file for a given tier's web services. When we are ready to deploy...
Automating WSDL.exe in a Custom Build
I have a web application written in C# that consumes several internal web services. We have a development tier, a testing tier, and a production tier. Also, we use the WSDL.exe command to generate a Proxies.cs file for a given tier's web services. When we are ready to deploy our code up the stack from development to ...
[ "There are a number of way to do it. A NAnt build script will do it, but I think the most commonly accepted method now is to use MSBuild. See MSDN for details.\n", "Our company uses a combination of NANT + Cruise Control + Custom Utility apps to build our products. More specifically, the task in NANT will all...
[ 2, 1 ]
[]
[]
[ "asp.net", "build_process", "wsdl" ]
stackoverflow_0000017948_asp.net_build_process_wsdl.txt