question_id int64 4 6.31M | answer_id int64 7 6.31M | title stringlengths 9 150 | question_body stringlengths 0 28.8k | answer_body stringlengths 60 27.2k | question_text stringlengths 40 28.9k | combined_text stringlengths 124 39.6k | tags listlengths 1 6 | question_score int64 0 26.3k | answer_score int64 0 28.8k | view_count int64 15 14M | answer_count int64 0 182 | favorite_count int64 0 32 | question_creation_date stringdate 2008-07-31 21:42:52 2011-06-10 18:12:18 | answer_creation_date stringdate 2008-07-31 22:17:57 2011-06-10 18:14:17 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
100,504 | 100,513 | What is the SQL command to return the field names of a table? | Say I have a table called myTable. What is the SQL command to return all of the field names of this table? If the answer is database specific then I need SQL Server right now but would be interested in seeing the solution for other database systems as well. | MySQL 3 and 4 (and 5): desc tablename which is an alias for show fields from tablename SQL Server (from 2000) and MySQL 5: select COLUMN_NAME from INFORMATION_SCHEMA.COLUMNS where TABLE_NAME = 'tablename' Completing the answer: like people below have said, in SQL Server you can also use the stored procedure sp_help exe... | What is the SQL command to return the field names of a table? Say I have a table called myTable. What is the SQL command to return all of the field names of this table? If the answer is database specific then I need SQL Server right now but would be interested in seeing the solution for other database systems as well. | TITLE:
What is the SQL command to return the field names of a table?
QUESTION:
Say I have a table called myTable. What is the SQL command to return all of the field names of this table? If the answer is database specific then I need SQL Server right now but would be interested in seeing the solution for other database... | [
"sql",
"mysql",
"sql-server",
"database"
] | 42 | 68 | 130,107 | 13 | 0 | 2008-09-19T08:33:25.020000 | 2008-09-19T08:36:25.760000 |
100,519 | 100,527 | What are the quickest and easiest ways to ensure existing web pages display well on mobile platforms? | The pages in question contain a lot of javascript and CSS. How well are these supported by mobile platforms generally? Is there a browser emulator (or equivalent tool) to assist testing? | Opera has an option to view pages as through a mobile device. I've found it useful in the past. | What are the quickest and easiest ways to ensure existing web pages display well on mobile platforms? The pages in question contain a lot of javascript and CSS. How well are these supported by mobile platforms generally? Is there a browser emulator (or equivalent tool) to assist testing? | TITLE:
What are the quickest and easiest ways to ensure existing web pages display well on mobile platforms?
QUESTION:
The pages in question contain a lot of javascript and CSS. How well are these supported by mobile platforms generally? Is there a browser emulator (or equivalent tool) to assist testing?
ANSWER:
Oper... | [
"javascript",
"css",
"browser",
"mobile"
] | 5 | 4 | 434 | 6 | 0 | 2008-09-19T08:37:50.563000 | 2008-09-19T08:39:26.347000 |
100,543 | 155,363 | How do I set specific environment variables when debugging in Visual Studio? | On a class library project, I set the "Start Action" on the Debug tab of the project properties to "Start external program" ( NUnit in this case). I want to set an environment variable in the environment this program is started in. How do I do that? (Is it even possible?) EDIT: It's an environment variable that influen... | In Visual Studio 2008 and Visual Studio 2005 at least, you can specify changes to environment variables in the project settings. Open your project. Go to Project -> Properties... Under Configuration Properties -> Debugging, edit the 'Environment' value to set environment variables. For example, if you want to add the d... | How do I set specific environment variables when debugging in Visual Studio? On a class library project, I set the "Start Action" on the Debug tab of the project properties to "Start external program" ( NUnit in this case). I want to set an environment variable in the environment this program is started in. How do I do... | TITLE:
How do I set specific environment variables when debugging in Visual Studio?
QUESTION:
On a class library project, I set the "Start Action" on the Debug tab of the project properties to "Start external program" ( NUnit in this case). I want to set an environment variable in the environment this program is start... | [
"visual-studio",
"debugging",
"environment-variables"
] | 96 | 104 | 309,901 | 13 | 0 | 2008-09-19T08:45:39.077000 | 2008-09-30T22:24:10.013000 |
100,557 | 100,621 | How can I perform a Google search on different Google datacentres? | I would like to get up-to-date information on Google's index of a website, and it seems that results vary depending on which datacentre happens to process your search query. | You can use one of the many tools designed specifically for this. One of them is Google Datacenter Search at iWebTool. (It's really all about getting a list of data center IPs and sending the same GET variable to them as to google.com.) | How can I perform a Google search on different Google datacentres? I would like to get up-to-date information on Google's index of a website, and it seems that results vary depending on which datacentre happens to process your search query. | TITLE:
How can I perform a Google search on different Google datacentres?
QUESTION:
I would like to get up-to-date information on Google's index of a website, and it seems that results vary depending on which datacentre happens to process your search query.
ANSWER:
You can use one of the many tools designed specifica... | [
"seo"
] | 0 | 1 | 240 | 1 | 0 | 2008-09-19T08:48:47.633000 | 2008-09-19T09:01:47.243000 |
100,592 | 100,644 | What's the best automation or scripting tool to automate repetitive tasks with applications? | I realize you can script Microsoft Office apps, but I'm looking for something more general that I can apply to other apps, such as Adobe Acrobat, web browsers and other apps with no scripting ability. I've used AutoIt but it's a bit clunky, especially when trying to debug why a script fails or stalls. Also, getting the... | I recommend AutoHotKey. Its syntax is not pretty, but most of the times you don't have to concoct your own scripts, because its community is so large and well organized. Even if you do, the documentation is extensive and good and the forums will answer your questions quickly. The developer is active and responsive, whi... | What's the best automation or scripting tool to automate repetitive tasks with applications? I realize you can script Microsoft Office apps, but I'm looking for something more general that I can apply to other apps, such as Adobe Acrobat, web browsers and other apps with no scripting ability. I've used AutoIt but it's ... | TITLE:
What's the best automation or scripting tool to automate repetitive tasks with applications?
QUESTION:
I realize you can script Microsoft Office apps, but I'm looking for something more general that I can apply to other apps, such as Adobe Acrobat, web browsers and other apps with no scripting ability. I've use... | [
"scripting",
"automation"
] | 2 | 3 | 16,387 | 3 | 0 | 2008-09-19T08:56:44.573000 | 2008-09-19T09:07:55.420000 |
100,596 | 1,657,329 | Best resources for converting C/C++ dll headers to Delphi? | A rather comprehensive site explaining the difficulties and solutions involved in using a dll written in c/c++ and the conversion of the.h header file to delphi/pascal was posted to a mailing list I was on recently, so I thought I'd share it, and invite others to post other useful resources for this, whether they be li... | Over at Rudy's Delphi Corner, he has an excellent article about the pitfalls of converting C/C++ to Delphi. In my opinion, this is essential information when attempting this task. Here is the description: This article is meant for everyone who needs to translate C/C++ headers to Delphi. I want to share some of the pitf... | Best resources for converting C/C++ dll headers to Delphi? A rather comprehensive site explaining the difficulties and solutions involved in using a dll written in c/c++ and the conversion of the.h header file to delphi/pascal was posted to a mailing list I was on recently, so I thought I'd share it, and invite others ... | TITLE:
Best resources for converting C/C++ dll headers to Delphi?
QUESTION:
A rather comprehensive site explaining the difficulties and solutions involved in using a dll written in c/c++ and the conversion of the.h header file to delphi/pascal was posted to a mailing list I was on recently, so I thought I'd share it, ... | [
"c++",
"c",
"delphi",
"dll",
"header"
] | 16 | 17 | 14,803 | 7 | 0 | 2008-09-19T08:56:53.747000 | 2009-11-01T14:38:43.680000 |
100,614 | 1,177,745 | Can you turn off Visual Studio 2008 Query formatting? | Is it possible to turn off the query re-formatting that happens when you edit a query for a database in Visual Studio? (i.e. r-click a data source and select New Query) This is happening when we are writing sql queries against a sql compact 3.5 database. Its rather irritating when your carefully indented and formatted ... | Just to close this one off, as far as I can tell, there is no way to do this. | Can you turn off Visual Studio 2008 Query formatting? Is it possible to turn off the query re-formatting that happens when you edit a query for a database in Visual Studio? (i.e. r-click a data source and select New Query) This is happening when we are writing sql queries against a sql compact 3.5 database. Its rather ... | TITLE:
Can you turn off Visual Studio 2008 Query formatting?
QUESTION:
Is it possible to turn off the query re-formatting that happens when you edit a query for a database in Visual Studio? (i.e. r-click a data source and select New Query) This is happening when we are writing sql queries against a sql compact 3.5 dat... | [
"sql",
"visual-studio-2008"
] | 0 | 0 | 582 | 2 | 0 | 2008-09-19T09:00:05.580000 | 2009-07-24T13:41:25.887000 |
100,622 | 100,736 | Flash should open window in new tab, but instead it opens a new pop up on Mac | using target="_blank" in the navigateToUrl with Firefox on Windows it opens in new tab, with Firefox on Mac it opens a 'popup', How to make the window popup in a new tab on Firefox on Mac as well? | Check your Firefox preferences >> Tabs >> New windows should be opened in (a new window | a new tab). Do you have different settings for your Firefox on your Windows and on your Mac? | Flash should open window in new tab, but instead it opens a new pop up on Mac using target="_blank" in the navigateToUrl with Firefox on Windows it opens in new tab, with Firefox on Mac it opens a 'popup', How to make the window popup in a new tab on Firefox on Mac as well? | TITLE:
Flash should open window in new tab, but instead it opens a new pop up on Mac
QUESTION:
using target="_blank" in the navigateToUrl with Firefox on Windows it opens in new tab, with Firefox on Mac it opens a 'popup', How to make the window popup in a new tab on Firefox on Mac as well?
ANSWER:
Check your Firefox... | [
"flash",
"actionscript-3",
"macos",
"firefox",
"cross-platform"
] | 1 | 3 | 2,881 | 3 | 0 | 2008-09-19T09:02:05.090000 | 2008-09-19T09:30:27.753000 |
100,624 | 100,886 | Python on Windows - how to wait for multiple child processes? | How to wait for multiple child processes in Python on Windows, without active wait (polling)? Something like this almost works for me: proc1 = subprocess.Popen(['python','mytest.py']) proc2 = subprocess.Popen(['python','mytest.py']) proc1.wait() print "1 finished" proc2.wait() print "2 finished" The problem is that whe... | It might seem overkill, but, here it goes: import Queue, thread, subprocess
results= Queue.Queue() def process_waiter(popen, description, que): try: popen.wait() finally: que.put( (description, popen.returncode) ) process_count= 0
proc1= subprocess.Popen( ['python', 'mytest.py'] ) thread.start_new_thread(process_wait... | Python on Windows - how to wait for multiple child processes? How to wait for multiple child processes in Python on Windows, without active wait (polling)? Something like this almost works for me: proc1 = subprocess.Popen(['python','mytest.py']) proc2 = subprocess.Popen(['python','mytest.py']) proc1.wait() print "1 fin... | TITLE:
Python on Windows - how to wait for multiple child processes?
QUESTION:
How to wait for multiple child processes in Python on Windows, without active wait (polling)? Something like this almost works for me: proc1 = subprocess.Popen(['python','mytest.py']) proc2 = subprocess.Popen(['python','mytest.py']) proc1.w... | [
"python",
"windows",
"asynchronous"
] | 25 | 19 | 22,805 | 6 | 0 | 2008-09-19T09:02:43.217000 | 2008-09-19T10:09:47.050000 |
100,631 | 101,250 | "MySQL server has gone away" with Ruby on Rails | After our Ruby on Rails application has run for a while, it starts throwing 500s with "MySQL server has gone away". Often this happens overnight. It's started doing this recently, with no obvious change in our server configuration. Mysql::Error: MySQL server has gone away: SELECT * FROM `widgets` Restarting the mongrel... | This is probably caused by the persistent connections to MySQL going away (time out is likely if it's happening over night) and Ruby on Rails is failing to restore the connection, which it should be doing by default: In the file vendor/rails/actionpack/lib/action_controller/dispatcher.rb is the code: if defined?(Active... | "MySQL server has gone away" with Ruby on Rails After our Ruby on Rails application has run for a while, it starts throwing 500s with "MySQL server has gone away". Often this happens overnight. It's started doing this recently, with no obvious change in our server configuration. Mysql::Error: MySQL server has gone away... | TITLE:
"MySQL server has gone away" with Ruby on Rails
QUESTION:
After our Ruby on Rails application has run for a while, it starts throwing 500s with "MySQL server has gone away". Often this happens overnight. It's started doing this recently, with no obvious change in our server configuration. Mysql::Error: MySQL se... | [
"mysql",
"ruby-on-rails"
] | 42 | 22 | 36,360 | 12 | 0 | 2008-09-19T09:06:01.930000 | 2008-09-19T11:42:00.347000 |
100,633 | 100,664 | Why do you not declare several variables of the same type on the same line? | Why is it bad practice to declare variables on one line? e.g. private String var1, var2, var3 instead of: private String var1; private String var2; private String var3; | I think that there are various reasons, but they all boil down to that the first is just less readable and more prone to failure because a single line is doing more than one thing. And all that for no real gain, and don't you tell me you find two lines of saved space is a real gain. It's a similar thing to what happens... | Why do you not declare several variables of the same type on the same line? Why is it bad practice to declare variables on one line? e.g. private String var1, var2, var3 instead of: private String var1; private String var2; private String var3; | TITLE:
Why do you not declare several variables of the same type on the same line?
QUESTION:
Why is it bad practice to declare variables on one line? e.g. private String var1, var2, var3 instead of: private String var1; private String var2; private String var3;
ANSWER:
I think that there are various reasons, but they... | [
"language-agnostic",
"refactoring",
"conventions"
] | 16 | 10 | 18,151 | 17 | 0 | 2008-09-19T09:06:16.533000 | 2008-09-19T09:13:28.747000 |
100,654 | 100,675 | Why do some wav files play in my c# directsound app but some don't? | I've got a c# application that plays simple wav files through directsound. With the test data I had, the code worked fine. However when I used real-world data, it produced a very unhelpful error on creation of the secondary buffer: "ArgumentException: Value does not fall within the expected range." The test wavs had a ... | Not all soundcards support 24 bit sample playback, and even when they do, they often have to be exclusively opened in that mode. There is a similar issue with sample rates. Your soundcard may be operating at 44.1kHz, in which case 48kHz needs to be resampled to be played. I have written an open source.NET audio library... | Why do some wav files play in my c# directsound app but some don't? I've got a c# application that plays simple wav files through directsound. With the test data I had, the code worked fine. However when I used real-world data, it produced a very unhelpful error on creation of the secondary buffer: "ArgumentException: ... | TITLE:
Why do some wav files play in my c# directsound app but some don't?
QUESTION:
I've got a c# application that plays simple wav files through directsound. With the test data I had, the code worked fine. However when I used real-world data, it produced a very unhelpful error on creation of the secondary buffer: "A... | [
"c#",
"audio",
"directx",
"directsound"
] | 3 | 7 | 4,795 | 2 | 0 | 2008-09-19T09:10:44.477000 | 2008-09-19T09:16:35.150000 |
100,689 | 100,706 | Menu Control: How to Make Whole Item Clickable, not Just Text | I have a problem that confuses my users, being that although an item is highlighted (by the hover style) when the user mouses over it, they have to mouse over the actual item text, sometimes quite small compared to the item. Is there a way to make the whole item clickable? | Add some padding to the A element? Or if it's in a menu contained within a block-level element, make the A display as block too: a { display: block; width: 100%; } | Menu Control: How to Make Whole Item Clickable, not Just Text I have a problem that confuses my users, being that although an item is highlighted (by the hover style) when the user mouses over it, they have to mouse over the actual item text, sometimes quite small compared to the item. Is there a way to make the whole ... | TITLE:
Menu Control: How to Make Whole Item Clickable, not Just Text
QUESTION:
I have a problem that confuses my users, being that although an item is highlighted (by the hover style) when the user mouses over it, they have to mouse over the actual item text, sometimes quite small compared to the item. Is there a way ... | [
"asp.net"
] | 1 | 2 | 2,633 | 2 | 0 | 2008-09-19T09:21:06.713000 | 2008-09-19T09:24:18.610000 |
100,691 | 100,714 | Moving to ASP.NET - VB or C#? | We have a large ASP classic code base but I'm looking to do future development in ASP.NET (and potentially in the future port across what we have). The natural choice of language seems to be VB (existing code is VBScript) but am I being too hasty? Does the choice of language, in the long run, even make a difference? | It's learning.Net (framework) that takes the time. The specific language doesn't matter and is more a matter of taste. I'd normally recommend trying a few play projects in both languages (and any others that may take your fancy), and then decide which one you're more comfortable with (or have more success with!) | Moving to ASP.NET - VB or C#? We have a large ASP classic code base but I'm looking to do future development in ASP.NET (and potentially in the future port across what we have). The natural choice of language seems to be VB (existing code is VBScript) but am I being too hasty? Does the choice of language, in the long r... | TITLE:
Moving to ASP.NET - VB or C#?
QUESTION:
We have a large ASP classic code base but I'm looking to do future development in ASP.NET (and potentially in the future port across what we have). The natural choice of language seems to be VB (existing code is VBScript) but am I being too hasty? Does the choice of langu... | [
"c#",
".net",
"asp.net",
"vb.net",
"webforms"
] | 3 | 16 | 4,103 | 15 | 0 | 2008-09-19T09:21:38.243000 | 2008-09-19T09:25:46.017000 |
100,705 | 100,787 | Location of WSDL.exe | I recently heard of WSDL.Exe, but I am not sure where to find this program. Does anyone know where I can find or download it? | You'll get it as part of a Visual Studio install (if you included the SDK), or in a standalone SDK install. It'll live somewhere like C:\program files\Microsoft Visual Studio 8\SDK\v2.0\Bin If you don't already have it, you can download the.NET SDKs from http://msdn.microsoft.com/en-us/netframework/aa569263.aspx | Location of WSDL.exe I recently heard of WSDL.Exe, but I am not sure where to find this program. Does anyone know where I can find or download it? | TITLE:
Location of WSDL.exe
QUESTION:
I recently heard of WSDL.Exe, but I am not sure where to find this program. Does anyone know where I can find or download it?
ANSWER:
You'll get it as part of a Visual Studio install (if you included the SDK), or in a standalone SDK install. It'll live somewhere like C:\program f... | [
".net",
"web-services",
"sdk",
"wsdl"
] | 30 | 19 | 119,895 | 9 | 0 | 2008-09-19T09:24:18.500000 | 2008-09-19T09:42:58.380000 |
100,707 | 100,751 | How much resources do sleeping and waiting threads consume | I'm wondering, how expensive it is to have many threads in waiting state in java 1.6 x64. To be more specific, I'm writing application which runs across many computers and sends/receives data from one to another. I feel more comfortable to have separate thread for each connected machine and task, like 1) sending data, ... | For most cases, the resources consumed by a sleeping thread will be its stack space. Using a 2-threads-per-connection-model, which I think is similar to what you're describing, is known to cause great scalability issues for this very reason when the number of connections grow large. I've been in this situation myself, ... | How much resources do sleeping and waiting threads consume I'm wondering, how expensive it is to have many threads in waiting state in java 1.6 x64. To be more specific, I'm writing application which runs across many computers and sends/receives data from one to another. I feel more comfortable to have separate thread ... | TITLE:
How much resources do sleeping and waiting threads consume
QUESTION:
I'm wondering, how expensive it is to have many threads in waiting state in java 1.6 x64. To be more specific, I'm writing application which runs across many computers and sends/receives data from one to another. I feel more comfortable to hav... | [
"java",
"multithreading",
"sleep",
"wait"
] | 19 | 15 | 7,236 | 5 | 0 | 2008-09-19T09:24:30.030000 | 2008-09-19T09:34:09.587000 |
100,717 | 101,816 | Determine when application cache item will timeout? | In ASP.NET, when storing a value in the application cache with absolute expiry is there a method to retrieve the date/time when the item will expire? The application cache item will be refreshed if expired based on user requests. | There is a method signature on the HttContext.Cache object which allows you to specify a method to be called in the event that a Cached item is removed when you set a new Cache item. Define yourself a method that'll allow you to process that information, whether you want it to re-submit the item to the Applcation Cache... | Determine when application cache item will timeout? In ASP.NET, when storing a value in the application cache with absolute expiry is there a method to retrieve the date/time when the item will expire? The application cache item will be refreshed if expired based on user requests. | TITLE:
Determine when application cache item will timeout?
QUESTION:
In ASP.NET, when storing a value in the application cache with absolute expiry is there a method to retrieve the date/time when the item will expire? The application cache item will be refreshed if expired based on user requests.
ANSWER:
There is a ... | [
"c#",
"asp.net",
"asp.net-1.1"
] | 0 | 4 | 1,497 | 3 | 0 | 2008-09-19T09:26:00.197000 | 2008-09-19T13:30:20.477000 |
100,721 | 100,822 | DirectoryInfo.GetDirectories() and attributes | I am using DirectoryInfo.GetDirectories() recursively to find the all the sub-directories under a given path. However, I want to exclude the System folders and there is no clear way for that. In FindFirstFile/FindNextFile things were clearer with the attributes. | @rslite is right,.NET doesn't give such filtering out-of-box, but it's not hard to implement: static IEnumerable GetNonSystemDirs(string path) { var dirs = from d in Directory.GetDirectories(path) let inf = new DirectoryInfo(d) where (inf.Attributes & FileAttributes.System) == 0 select d;
foreach (var dir in dirs) { y... | DirectoryInfo.GetDirectories() and attributes I am using DirectoryInfo.GetDirectories() recursively to find the all the sub-directories under a given path. However, I want to exclude the System folders and there is no clear way for that. In FindFirstFile/FindNextFile things were clearer with the attributes. | TITLE:
DirectoryInfo.GetDirectories() and attributes
QUESTION:
I am using DirectoryInfo.GetDirectories() recursively to find the all the sub-directories under a given path. However, I want to exclude the System folders and there is no clear way for that. In FindFirstFile/FindNextFile things were clearer with the attri... | [
".net",
"file-io",
"attributes",
"directoryinfo",
"getdirectories"
] | 6 | 8 | 7,051 | 4 | 0 | 2008-09-19T09:26:38.527000 | 2008-09-19T09:51:44.160000 |
100,732 | 100,762 | Why is "if not someobj:" better than "if someobj == None:" in Python? | I've seen several examples of code like this: if not someobj: #do something But I'm wondering why not doing: if someobj == None: #do something Is there any difference? Does one have an advantage over the other? | In the first test, Python try to convert the object to a bool value if it is not already one. Roughly, we are asking the object: are you meaningful or not? This is done using the following algorithm: If the object has a __nonzero__ special method (as do numeric built-ins, int and float ), it calls this method. It must ... | Why is "if not someobj:" better than "if someobj == None:" in Python? I've seen several examples of code like this: if not someobj: #do something But I'm wondering why not doing: if someobj == None: #do something Is there any difference? Does one have an advantage over the other? | TITLE:
Why is "if not someobj:" better than "if someobj == None:" in Python?
QUESTION:
I've seen several examples of code like this: if not someobj: #do something But I'm wondering why not doing: if someobj == None: #do something Is there any difference? Does one have an advantage over the other?
ANSWER:
In the first... | [
"python"
] | 147 | 211 | 110,312 | 9 | 0 | 2008-09-19T09:29:19.317000 | 2008-09-19T09:38:10.247000 |
100,737 | 100,972 | How can I access the classes loaded by Java Web Start when dynamically compiling code? | I am dynamically compiling code in my client application. When I start the application with Java Web Start I get an exception. The exception only occurs when it is run through Java Web Start. //The exception evolver.core.model.change.execution.ExecutionException: Compilation failed!
DynamicComparator.java:2: package e... | As it currently stands, you'll have to compile the code on the server. The server should not serve any code that might allow cross site attacks, so be very careful. The client can then use URLClassLoader.newInstance to load it. | How can I access the classes loaded by Java Web Start when dynamically compiling code? I am dynamically compiling code in my client application. When I start the application with Java Web Start I get an exception. The exception only occurs when it is run through Java Web Start. //The exception evolver.core.model.change... | TITLE:
How can I access the classes loaded by Java Web Start when dynamically compiling code?
QUESTION:
I am dynamically compiling code in my client application. When I start the application with Java Web Start I get an exception. The exception only occurs when it is run through Java Web Start. //The exception evolver... | [
"java",
"jnlp",
"java-web-start",
"dynamic-compilation"
] | 1 | 1 | 313 | 1 | 0 | 2008-09-19T09:30:38.097000 | 2008-09-19T10:27:31.733000 |
100,767 | 101,780 | Communication Gap: User vs Analyst-Designer | Normal practice is to use case studies, construct work- and data-flows, etc. But this does not necessarily create a shared vocabulary between the user/sponsor and the analyst-designer: one or the other, both normally, will have to acquire terms and views of the "internals" of the others area of expertise, and this usua... | Try to eliminate as many intermediate steps between the user and final implementer as possible. Every such step obscures and loses information. The most valuable members of your team may be people who can wear both suits - "interface" with users, and actually implement the thing. If not, make sure you have rapid iterat... | Communication Gap: User vs Analyst-Designer Normal practice is to use case studies, construct work- and data-flows, etc. But this does not necessarily create a shared vocabulary between the user/sponsor and the analyst-designer: one or the other, both normally, will have to acquire terms and views of the "internals" of... | TITLE:
Communication Gap: User vs Analyst-Designer
QUESTION:
Normal practice is to use case studies, construct work- and data-flows, etc. But this does not necessarily create a shared vocabulary between the user/sponsor and the analyst-designer: one or the other, both normally, will have to acquire terms and views of ... | [
"communication",
"analysis"
] | 3 | 1 | 684 | 4 | 0 | 2008-09-19T09:38:56.063000 | 2008-09-19T13:25:59.270000 |
100,774 | 110,853 | javascript XSLTProcessor occasionally not working | The following JavaScript supposes to read the popular tags from an XML file and applies the XSL Stylesheet and output to the browser as HTML. function ShowPopularTags() { xml = XMLDocLoad("http://localhost/xml/tags/popular.xml?s=94987898"); xsl = XMLDocLoad("http://localhost/xml/xsl/popular-tags.xsl"); if (window.Activ... | Are you forced into the synchronous solution you are using now, or is an asynchronous solution an option as well? I recall Firefox has had it's share of problems with synchronous calls in the past, and I don't know how much of that is still carried with it. I have seen situations where the entire Firefox interface woul... | javascript XSLTProcessor occasionally not working The following JavaScript supposes to read the popular tags from an XML file and applies the XSL Stylesheet and output to the browser as HTML. function ShowPopularTags() { xml = XMLDocLoad("http://localhost/xml/tags/popular.xml?s=94987898"); xsl = XMLDocLoad("http://loca... | TITLE:
javascript XSLTProcessor occasionally not working
QUESTION:
The following JavaScript supposes to read the popular tags from an XML file and applies the XSL Stylesheet and output to the browser as HTML. function ShowPopularTags() { xml = XMLDocLoad("http://localhost/xml/tags/popular.xml?s=94987898"); xsl = XMLDo... | [
"javascript",
"xml",
"firefox",
"xslt"
] | 1 | 1 | 6,115 | 5 | 0 | 2008-09-19T09:39:30.557000 | 2008-09-21T12:04:02.740000 |
100,808 | 100,874 | Receiving multipart POST data requests in PHP | I want to receive the following HTTP request in PHP: Content-type: multipart/form-data;boundary=main_boundary
--main_boundary Content-type: text/xml Some content goes here --main_boundary Content-type: multipart/mixed;boundary=sub_boundary
--sub_boundary Content-type: application/octet-stream
File A contents
--sub_... | $HTTP_GET_VARS, $HTTP_POST_VARS, etc. is an obsolete notation, you should be using $_GET, $_POST, etc. Now, the file contents should be in the $_FILES global array, whereas, if there are no element names, I'm not sure about whether the rest of the content will show up in $_POST. Anyway, if always_populate_raw_post_data... | Receiving multipart POST data requests in PHP I want to receive the following HTTP request in PHP: Content-type: multipart/form-data;boundary=main_boundary
--main_boundary Content-type: text/xml Some content goes here --main_boundary Content-type: multipart/mixed;boundary=sub_boundary
--sub_boundary Content-type: app... | TITLE:
Receiving multipart POST data requests in PHP
QUESTION:
I want to receive the following HTTP request in PHP: Content-type: multipart/form-data;boundary=main_boundary
--main_boundary Content-type: text/xml Some content goes here --main_boundary Content-type: multipart/mixed;boundary=sub_boundary
--sub_boundary... | [
"php",
"http",
"mime",
"multipart",
"form-data"
] | 1 | 4 | 16,793 | 3 | 0 | 2008-09-19T09:49:11.453000 | 2008-09-19T10:07:14.733000 |
100,824 | 101,153 | Is there a better way to explain the behaviour differences between structs and classes in .net? | The code below shows a sample that I've used recently to explain the different behaviour of structs and classes to someone brand new to development. Is there a better way of doing so? (Yes - the code uses public fields - that's purely for brevity) namespace StructsVsClasses { class Program { static void Main(string[] a... | The difference might be easier to understand when the struct/class is a member of another class. Example with class: class PointClass { int double X; int double Y; }
class Circle { PointClass Center = new PointClass() { X = 0, Y = 0; } }
static void Main() { Circle c = new Circle(); Console.WriteLine(c.Center.X); c.C... | Is there a better way to explain the behaviour differences between structs and classes in .net? The code below shows a sample that I've used recently to explain the different behaviour of structs and classes to someone brand new to development. Is there a better way of doing so? (Yes - the code uses public fields - tha... | TITLE:
Is there a better way to explain the behaviour differences between structs and classes in .net?
QUESTION:
The code below shows a sample that I've used recently to explain the different behaviour of structs and classes to someone brand new to development. Is there a better way of doing so? (Yes - the code uses p... | [
"c#",
".net"
] | 2 | 1 | 389 | 7 | 0 | 2008-09-19T09:51:56.330000 | 2008-09-19T11:17:59.290000 |
100,829 | 101,016 | Spawning an interactive telnet session from a shell script | I'm trying to write a script to allow me to log in to a console servers 48 ports so that I can quickly determine what devices are connected to each serial line. Essentially I want to be able to have a script that, given a list of hosts/ports, telnets to the first device in the list and leaves me in interactive mode so ... | You need to redirect the Terminal input to the telnet process. This should be /dev/tty. So your script will look something like: #!/bin/bash
for HOST in `cat` do echo Connecting to $HOST... telnet $HOST | Spawning an interactive telnet session from a shell script I'm trying to write a script to allow me to log in to a console servers 48 ports so that I can quickly determine what devices are connected to each serial line. Essentially I want to be able to have a script that, given a list of hosts/ports, telnets to the fir... | TITLE:
Spawning an interactive telnet session from a shell script
QUESTION:
I'm trying to write a script to allow me to log in to a console servers 48 ports so that I can quickly determine what devices are connected to each serial line. Essentially I want to be able to have a script that, given a list of hosts/ports, ... | [
"bash",
"telnet"
] | 11 | 7 | 35,220 | 9 | 0 | 2008-09-19T09:53:58.070000 | 2008-09-19T10:41:43.730000 |
100,841 | 100,859 | Artificially create a connection timeout error | I've had a bug in our software that occurs when I receive a connection timeout. These errors are very rare (usually when my connection gets dropped by our internal network). How can I generate this kind of effect artificially so I can test our software? If it matters the app is written in C++/MFC using CAsyncSocket cla... | Connect to an existing host but to a port that is blocked by the firewall that simply drops TCP SYN packets. For example, www.google.com:81. | Artificially create a connection timeout error I've had a bug in our software that occurs when I receive a connection timeout. These errors are very rare (usually when my connection gets dropped by our internal network). How can I generate this kind of effect artificially so I can test our software? If it matters the a... | TITLE:
Artificially create a connection timeout error
QUESTION:
I've had a bug in our software that occurs when I receive a connection timeout. These errors are very rare (usually when my connection gets dropped by our internal network). How can I generate this kind of effect artificially so I can test our software? I... | [
"networking",
"network-programming",
"connection",
"tcp"
] | 396 | 388 | 224,148 | 22 | 0 | 2008-09-19T09:57:47.283000 | 2008-09-19T10:02:57.660000 |
100,851 | 100,980 | How do you cast an IEnumerable<t> or IQueryable<t> to an EntitySet<t>? | In this situation I am trying to perform a data import from an XML file to a database using LINQ to XML and LINQ to SQL. Here's my LINQ data model: public struct Page { public string Name; public char Status; public EntitySet PageContents;
} public struct PageContent { public string Content; public string Username; pu... | you can construct your entity set from a IEnumerable using a helper class, something like: public static class EntityCollectionHelper { public static EntitySet ToEntitySet (this IEnumerable source) where T:class { EntitySet set = new EntitySet (); set.AddRange(source); return set; } } and use it like so: PageContents =... | How do you cast an IEnumerable<t> or IQueryable<t> to an EntitySet<t>? In this situation I am trying to perform a data import from an XML file to a database using LINQ to XML and LINQ to SQL. Here's my LINQ data model: public struct Page { public string Name; public char Status; public EntitySet PageContents;
} public... | TITLE:
How do you cast an IEnumerable<t> or IQueryable<t> to an EntitySet<t>?
QUESTION:
In this situation I am trying to perform a data import from an XML file to a database using LINQ to XML and LINQ to SQL. Here's my LINQ data model: public struct Page { public string Name; public char Status; public EntitySet PageC... | [
"c#",
".net",
"linq"
] | 12 | 26 | 9,025 | 2 | 0 | 2008-09-19T10:00:41.860000 | 2008-09-19T10:29:09.983000 |
100,853 | 100,888 | What is the difference between the <%# and <%= opening tags? | While editing an aspx file I found both these opening tags used for seemingly the same thing. Is there a difference and if yes, what is it? | <%= is a equivalent to <% Repsonse.Write() You can write any content out here: for example <%=myProperty + " additional Text" %> <%# is a binding expression. You can retrieve any public value in the current context (for example in GridViews). But you cannot mix content here. Take a look at MSDN for more information. | What is the difference between the <%# and <%= opening tags? While editing an aspx file I found both these opening tags used for seemingly the same thing. Is there a difference and if yes, what is it? | TITLE:
What is the difference between the <%# and <%= opening tags?
QUESTION:
While editing an aspx file I found both these opening tags used for seemingly the same thing. Is there a difference and if yes, what is it?
ANSWER:
<%= is a equivalent to <% Repsonse.Write() You can write any content out here: for example <... | [
".net",
"asp.net"
] | 5 | 12 | 555 | 3 | 0 | 2008-09-19T10:01:11.767000 | 2008-09-19T10:09:49.967000 |
100,854 | 100,929 | Reuse define statement from .h file in C# code | I have C++ project (VS2005) which includes header file with version number in #define directive. Now I need to include exactly the same number in twin C# project. What is the best way to do it? I'm thinking about including this file as a resource, then parse it at a runtime with regex to recover version number, but may... | You can achieve what you want in just a few steps: Create a MSBuild Task - http://msdn.microsoft.com/en-us/library/t9883dzc.aspx Update the project file to include a call to the task created prior to build The task receives a parameter with the location of the header.h file you referred. It then extracts the version an... | Reuse define statement from .h file in C# code I have C++ project (VS2005) which includes header file with version number in #define directive. Now I need to include exactly the same number in twin C# project. What is the best way to do it? I'm thinking about including this file as a resource, then parse it at a runtim... | TITLE:
Reuse define statement from .h file in C# code
QUESTION:
I have C++ project (VS2005) which includes header file with version number in #define directive. Now I need to include exactly the same number in twin C# project. What is the best way to do it? I'm thinking about including this file as a resource, then pa... | [
"c#",
"c++",
"header",
"c-preprocessor",
"versioning"
] | 6 | 2 | 11,844 | 7 | 0 | 2008-09-19T10:02:03.217000 | 2008-09-19T10:18:02.333000 |
100,860 | 100,928 | Help needed for extending Asp.Net | As most of you would know, if I drop a file named app_offline.htm in the root of an asp.net application, it takes the application offline as detailed here. You would also know, that while this is great, IIS actually returns a 404 code when this is in process and Microsoft is not going to do anything about it as mention... | The handling of app_offline.htm is hardcoded in the ASP.NET pipeline, and can't be modified: see CheckApplicationEnabled() in HttpRuntime.cs, where it throws a very non-configurable 404 error if the application is deemed to be offline. However, creating your own HTTP module to do something similar is of course trivial ... | Help needed for extending Asp.Net As most of you would know, if I drop a file named app_offline.htm in the root of an asp.net application, it takes the application offline as detailed here. You would also know, that while this is great, IIS actually returns a 404 code when this is in process and Microsoft is not going ... | TITLE:
Help needed for extending Asp.Net
QUESTION:
As most of you would know, if I drop a file named app_offline.htm in the root of an asp.net application, it takes the application offline as detailed here. You would also know, that while this is great, IIS actually returns a 404 code when this is in process and Micro... | [
"asp.net"
] | 4 | 6 | 333 | 4 | 0 | 2008-09-19T10:03:08.597000 | 2008-09-19T10:17:53.927000 |
100,898 | 100,925 | Browser Detection | What's the best / simplest / most accurate way to detect the browser of a user? Ease of extendability and implementation is a plus. The less technologies used, the better. The solution can be server side, client side, or both. The results should eventually end up at the server, though. The solution can be framework agn... | On the server you're pretty much limited to the UserAgent string the browser provides (which is fraught with problems, have a read about the UserAgent string's history ). On the client (ie in Javascript), you have more options. But the best option is to not actually worry about working out which browser it is. Simply c... | Browser Detection What's the best / simplest / most accurate way to detect the browser of a user? Ease of extendability and implementation is a plus. The less technologies used, the better. The solution can be server side, client side, or both. The results should eventually end up at the server, though. The solution ca... | TITLE:
Browser Detection
QUESTION:
What's the best / simplest / most accurate way to detect the browser of a user? Ease of extendability and implementation is a plus. The less technologies used, the better. The solution can be server side, client side, or both. The results should eventually end up at the server, thoug... | [
"browser",
"browser-detection"
] | 10 | 12 | 7,459 | 12 | 0 | 2008-09-19T10:11:55.640000 | 2008-09-19T10:17:12.400000 |
100,904 | 100,991 | How can I overcome inconsistent behaviour of snprintf in different UNIX-like operating systems? | Per man pages, snprintf is returning number of bytes written from glibc version 2.2 onwards. But on lower versions of libc2.2 and HP-UX, it returns a positive integer, which could lead to a buffer overflow. How can one overcome this and write portable code? Edit: For want of more clarity This code is working perfectly ... | you could create a snprintf wrapper that returns -1 for each case when there is not enough space in the buffer. See the man page for more docs. It has also an example which threats all the cases. while (1) { /* Try to print in the allocated space. */ va_start(ap, fmt); n = vsnprintf (p, size, fmt, ap); va_end(ap); /* I... | How can I overcome inconsistent behaviour of snprintf in different UNIX-like operating systems? Per man pages, snprintf is returning number of bytes written from glibc version 2.2 onwards. But on lower versions of libc2.2 and HP-UX, it returns a positive integer, which could lead to a buffer overflow. How can one overc... | TITLE:
How can I overcome inconsistent behaviour of snprintf in different UNIX-like operating systems?
QUESTION:
Per man pages, snprintf is returning number of bytes written from glibc version 2.2 onwards. But on lower versions of libc2.2 and HP-UX, it returns a positive integer, which could lead to a buffer overflow.... | [
"c",
"cross-platform",
"buffer-overflow",
"buffer-overrun"
] | 3 | 4 | 1,595 | 6 | 0 | 2008-09-19T10:12:36.840000 | 2008-09-19T10:32:47.963000 |
100,917 | 108,288 | Can you access a Delphi DBIV database without it creating lock files? | I'm trying to read data from a Delphi DBIV database, every time I access the database it creates a Paradox.lck and a Pdoxusrs.lck file. I'm using only a TQuery Object to do this (nothing else). can I access a Delphi DBIV database without it creating these lock files? | Thanks for your responses. I'll look into both of your suggestions. To A I Breveleri: yeah I know what your saying, I'm reluctant to switch them off, but the other App that uses the database is far more important than mine. Ideally I'd like the following to happen: My app starts getting data, if the other app wants to ... | Can you access a Delphi DBIV database without it creating lock files? I'm trying to read data from a Delphi DBIV database, every time I access the database it creates a Paradox.lck and a Pdoxusrs.lck file. I'm using only a TQuery Object to do this (nothing else). can I access a Delphi DBIV database without it creating ... | TITLE:
Can you access a Delphi DBIV database without it creating lock files?
QUESTION:
I'm trying to read data from a Delphi DBIV database, every time I access the database it creates a Paradox.lck and a Pdoxusrs.lck file. I'm using only a TQuery Object to do this (nothing else). can I access a Delphi DBIV database wi... | [
"database",
"delphi"
] | 0 | 0 | 1,137 | 3 | 0 | 2008-09-19T10:16:08.830000 | 2008-09-20T14:23:37.717000 |
100,922 | 100,951 | Default constructor vs IOC container | Can someone explain to me the advantages of using an IOC container over simply hardcoding the default implementation into a default constructor? In other words, what is wrong about this code? public class MyClass { private IMyInterface _myInterface;
public MyClass() { _myInterface = new DefaultMyInterface(); }
public... | The idea of IoC is to delegate part of your component's functionality to another part of the system. In IoC world, you have components that don't know about each other. Your example violates this, as you're creating tight coupling between MyClass and some implementation of IMyInterface. The main idea is that your compo... | Default constructor vs IOC container Can someone explain to me the advantages of using an IOC container over simply hardcoding the default implementation into a default constructor? In other words, what is wrong about this code? public class MyClass { private IMyInterface _myInterface;
public MyClass() { _myInterface ... | TITLE:
Default constructor vs IOC container
QUESTION:
Can someone explain to me the advantages of using an IOC container over simply hardcoding the default implementation into a default constructor? In other words, what is wrong about this code? public class MyClass { private IMyInterface _myInterface;
public MyClass... | [
"inversion-of-control"
] | 12 | 12 | 2,225 | 8 | 0 | 2008-09-19T10:16:34.647000 | 2008-09-19T10:22:59.857000 |
100,948 | 102,094 | How do you stop MySQL on a Mac OS install? | I installed MySQL via MacPorts. What is the command I need to stop the server (I need to test how my application behave when MySQL is dead)? | There are different cases depending on whether you installed MySQL with the official binary installer, using MacPorts, or using Homebrew: Homebrew brew services start mysql brew services stop mysql brew services restart mysql MacPorts sudo port load mysql57-server sudo port unload mysql57-server Note: this is persisten... | How do you stop MySQL on a Mac OS install? I installed MySQL via MacPorts. What is the command I need to stop the server (I need to test how my application behave when MySQL is dead)? | TITLE:
How do you stop MySQL on a Mac OS install?
QUESTION:
I installed MySQL via MacPorts. What is the command I need to stop the server (I need to test how my application behave when MySQL is dead)?
ANSWER:
There are different cases depending on whether you installed MySQL with the official binary installer, using ... | [
"mysql",
"macos"
] | 251 | 534 | 344,056 | 24 | 0 | 2008-09-19T10:21:42.700000 | 2008-09-19T14:08:18.373000 |
100,993 | 101,078 | RMI vs. Web Services. What's best for Java2Java remoting? | I'm new to both Web Services and RMI and I wonder which is the better way to do remoting between different web applications, when these applications are all written in Java, that is when different programming languages don't matter (which would be the advantage of WS). While on the one hand I would guess that there's a... | The web services do allow a loosely coupled architecture. With RMI, you have to make sure that the class definitions stay in sync in all application instances, which means that you always have to deploy all of them at the same time even if only one of them is changed (not necessarily, but it is required quite often bec... | RMI vs. Web Services. What's best for Java2Java remoting? I'm new to both Web Services and RMI and I wonder which is the better way to do remoting between different web applications, when these applications are all written in Java, that is when different programming languages don't matter (which would be the advantage ... | TITLE:
RMI vs. Web Services. What's best for Java2Java remoting?
QUESTION:
I'm new to both Web Services and RMI and I wonder which is the better way to do remoting between different web applications, when these applications are all written in Java, that is when different programming languages don't matter (which would... | [
"web-services",
"remoting",
"jax-ws",
"rmi"
] | 48 | 35 | 51,630 | 9 | 0 | 2008-09-19T10:32:55.670000 | 2008-09-19T10:56:20.463000 |
100,995 | 101,017 | What is domain driven design? | So I got this question from one of the developers in my team: What is domain driven design? I could of course point to the book from Evans but is that actually an answer? How would you explain DDD in a few sentences to junior software engineers in your team? | I would say this practice promotes concentrating your efforts on the 'problem space' rather than the 'solution space'. Driving an emergent solution (the design) by studying and really getting to know and understand the domain. One of the practices (taken from XP) would be the writing of stories that occur in the proble... | What is domain driven design? So I got this question from one of the developers in my team: What is domain driven design? I could of course point to the book from Evans but is that actually an answer? How would you explain DDD in a few sentences to junior software engineers in your team? | TITLE:
What is domain driven design?
QUESTION:
So I got this question from one of the developers in my team: What is domain driven design? I could of course point to the book from Evans but is that actually an answer? How would you explain DDD in a few sentences to junior software engineers in your team?
ANSWER:
I wo... | [
"domain-driven-design"
] | 50 | 46 | 8,335 | 7 | 0 | 2008-09-19T10:33:35.060000 | 2008-09-19T10:42:01.683000 |
100,998 | 101,133 | Delphi 7 and Windows Vista | I have a simple software that is made in Delphi 7, and it crashes on Vista after a while. These are totally random crashes, nothing is written in any crash log, just stops working and then Vista tries to find a solution. Does anyone have any ideas? | Try one of the exception catchers, like madExcept. It can often help you find out what is happening inside your app at the time of trouble. In general though Delphi apps are fine in Vista, so there must be some interaction, perhaps user rights, that is causing trouble. | Delphi 7 and Windows Vista I have a simple software that is made in Delphi 7, and it crashes on Vista after a while. These are totally random crashes, nothing is written in any crash log, just stops working and then Vista tries to find a solution. Does anyone have any ideas? | TITLE:
Delphi 7 and Windows Vista
QUESTION:
I have a simple software that is made in Delphi 7, and it crashes on Vista after a while. These are totally random crashes, nothing is written in any crash log, just stops working and then Vista tries to find a solution. Does anyone have any ideas?
ANSWER:
Try one of the ex... | [
"delphi",
"windows-vista"
] | 2 | 7 | 1,269 | 3 | 0 | 2008-09-19T10:33:53.263000 | 2008-09-19T11:11:03.673000 |
101,004 | 101,050 | Choosing XPath version for .net IIS apps | We've got a.net CMS running on IIS 6 which uses XSLT templates. It seems to be running XPath 1.0 (as we can't use any 2.0 functionality). How do we go about installing or specifying that IIS should use XPath 2.0? Is it installed per server, or can we specify which version to use on a per-application pool or per-site ba... | As far as I can tell (I haven't seen any definitive source on this),.NET doesn't have any support for XPath 2.0. I've read things that suggest its so, but I can't get any 2.0 XPath functions to run without providing custom function definitions. You can use an external library to get 2.0 compatability, however. | Choosing XPath version for .net IIS apps We've got a.net CMS running on IIS 6 which uses XSLT templates. It seems to be running XPath 1.0 (as we can't use any 2.0 functionality). How do we go about installing or specifying that IIS should use XPath 2.0? Is it installed per server, or can we specify which version to use... | TITLE:
Choosing XPath version for .net IIS apps
QUESTION:
We've got a.net CMS running on IIS 6 which uses XSLT templates. It seems to be running XPath 1.0 (as we can't use any 2.0 functionality). How do we go about installing or specifying that IIS should use XPath 2.0? Is it installed per server, or can we specify wh... | [
".net",
"iis",
"xpath",
"installation",
"xpath-2.0"
] | 3 | 1 | 396 | 1 | 0 | 2008-09-19T10:35:32.840000 | 2008-09-19T10:50:34.987000 |
101,012 | 101,027 | Customising the generic Rails error message | Our rails app is designed as a single code base linking to multiple client databases. Based on the subdomain the app determines which db to connect to. We use liquid templates to customise the presentation for each client. We are unable to customise the generic 'We're Sorry, somethign went wrong..' message for each cli... | For catching exceptions in Rails 2, rescue_from controller method is a great way to specify actions which handle various cases. class ApplicationController < ActionController::Base rescue_from MyAppError,:with =>:show_errors
def show_errors render:action => "..." end end This way you can make dynamic error pages to re... | Customising the generic Rails error message Our rails app is designed as a single code base linking to multiple client databases. Based on the subdomain the app determines which db to connect to. We use liquid templates to customise the presentation for each client. We are unable to customise the generic 'We're Sorry, ... | TITLE:
Customising the generic Rails error message
QUESTION:
Our rails app is designed as a single code base linking to multiple client databases. Based on the subdomain the app determines which db to connect to. We use liquid templates to customise the presentation for each client. We are unable to customise the gene... | [
"ruby-on-rails"
] | 3 | 5 | 2,123 | 2 | 0 | 2008-09-19T10:39:02.033000 | 2008-09-19T10:44:03.113000 |
101,021 | 101,206 | How to get notified of Windows process maximizing CPU? | Is there a tool for Windows XP and Vista (built-in or otherwise ideally freeware/ OSS ) that can notify the user when the CPU is above a (configurable) threshold for some (configurable) duration? I am particularly interested in a minimalist tool that fits the following bill and in order of importance (which a lot of th... | Maybe ProcessTamer could be helpfull. It does not exactly what you are look for. But it might be a quick and dirty solution. Process Tamer is a tiny (140k) and super efficient utility for Microsoft Windows XP/2K/NT that runs in your system tray and constantly monitors the cpu usage of other processes. When it sees a pr... | How to get notified of Windows process maximizing CPU? Is there a tool for Windows XP and Vista (built-in or otherwise ideally freeware/ OSS ) that can notify the user when the CPU is above a (configurable) threshold for some (configurable) duration? I am particularly interested in a minimalist tool that fits the follo... | TITLE:
How to get notified of Windows process maximizing CPU?
QUESTION:
Is there a tool for Windows XP and Vista (built-in or otherwise ideally freeware/ OSS ) that can notify the user when the CPU is above a (configurable) threshold for some (configurable) duration? I am particularly interested in a minimalist tool t... | [
"windows",
"performance",
"utilities"
] | 0 | 1 | 357 | 2 | 0 | 2008-09-19T10:43:24.787000 | 2008-09-19T11:31:06.870000 |
101,024 | 102,032 | How to choose the max thread count for an HTTP servlet container? | I'm developing a restful Web service that runs as a servlet (using blocking IO) in Jetty. Figuring out the optimal setting for max threads seems hard. Is there a researched formula for deciding the max number of threads from some easily measurable characteristics of the rest of the setup? | Very simple and primitive one: max_number_of_threads = number_of_CPUs * C Where C depends on other factors of your application:-) Ask yourself following questions: Will your application be CPU intensive (lower C) or spend most time waiting for a third systems (higher C)? Do you need quicker response times (lower C) or ... | How to choose the max thread count for an HTTP servlet container? I'm developing a restful Web service that runs as a servlet (using blocking IO) in Jetty. Figuring out the optimal setting for max threads seems hard. Is there a researched formula for deciding the max number of threads from some easily measurable charac... | TITLE:
How to choose the max thread count for an HTTP servlet container?
QUESTION:
I'm developing a restful Web service that runs as a servlet (using blocking IO) in Jetty. Figuring out the optimal setting for max threads seems hard. Is there a researched formula for deciding the max number of threads from some easily... | [
"java",
"http",
"optimization",
"servlets",
"concurrency"
] | 7 | 3 | 5,734 | 6 | 0 | 2008-09-19T10:43:34.893000 | 2008-09-19T13:59:48.830000 |
101,046 | 146,788 | Oracle OCI array fetch of simple data types? | I cannot understand the Oracle documentation.:-( Does anybody know how to fetch multiple rows of simple data from Oracle via OCI? I currently use OCIDefineByPos to define single variables (I only need to do this for simple integers -- SQLT_INT /4-byte ints) and then fetch a single row at a time with OCIStmtExecute / OC... | You can use OCIDefineArrayOfStruct to support fetching arrays of records. You do this by passing the base of the array to OCIDefineByPos, and use OCIDefineArrayOfStruct to tell Oracle about the size of the records (skip size). I believe that you then call OCIFetch telling it to fetch the array size. An alternative is t... | Oracle OCI array fetch of simple data types? I cannot understand the Oracle documentation.:-( Does anybody know how to fetch multiple rows of simple data from Oracle via OCI? I currently use OCIDefineByPos to define single variables (I only need to do this for simple integers -- SQLT_INT /4-byte ints) and then fetch a ... | TITLE:
Oracle OCI array fetch of simple data types?
QUESTION:
I cannot understand the Oracle documentation.:-( Does anybody know how to fetch multiple rows of simple data from Oracle via OCI? I currently use OCIDefineByPos to define single variables (I only need to do this for simple integers -- SQLT_INT /4-byte ints)... | [
"c++",
"c",
"database",
"oracle",
"oracle-call-interface"
] | 1 | 3 | 5,595 | 2 | 0 | 2008-09-19T10:49:41.057000 | 2008-09-28T21:31:17.503000 |
101,055 | 101,077 | When is a language considered a scripting language? | What makes a language a scripting language? I've heard some people say "when it gets interpreted instead of compiled". That would make PHP (for example) a scripting language. Is that the only criterion? Or are there other criteria? See also: What’s the difference between a “script” and an “application”? | A scripting language is a language that "scripts" other things to do stuff. The primary focus isn't primarily building your own apps so much as getting an existing app to act the way you want, e.g. JavaScript for browsers, VBA for MS Office. | When is a language considered a scripting language? What makes a language a scripting language? I've heard some people say "when it gets interpreted instead of compiled". That would make PHP (for example) a scripting language. Is that the only criterion? Or are there other criteria? See also: What’s the difference betw... | TITLE:
When is a language considered a scripting language?
QUESTION:
What makes a language a scripting language? I've heard some people say "when it gets interpreted instead of compiled". That would make PHP (for example) a scripting language. Is that the only criterion? Or are there other criteria? See also: What’s t... | [
"programming-languages",
"scripting",
"terminology",
"semantics"
] | 107 | 52 | 129,697 | 40 | 0 | 2008-09-19T10:51:26.717000 | 2008-09-19T10:56:16.143000 |
101,061 | 101,087 | Building Python C extension modules for Windows | I have a C extension module and it would be nice to distribute built binaries. Setuptools makes it easy to build extensions modules on OS X and GNU/Linux, since those OSs come with GCC, but I don't know how to do it in Windows. Would I need to buy a copy of Visual Studio, or does Visual Studio Express work? Can I just ... | You can use both MinGW and VC++ Express (free, no need to buy it). See: http://eli.thegreenplace.net/2008/06/28/compiling-python-extensions-with-distutils-and-mingw/ http://eli.thegreenplace.net/2008/06/27/creating-python-extension-modules-in-c/ | Building Python C extension modules for Windows I have a C extension module and it would be nice to distribute built binaries. Setuptools makes it easy to build extensions modules on OS X and GNU/Linux, since those OSs come with GCC, but I don't know how to do it in Windows. Would I need to buy a copy of Visual Studio,... | TITLE:
Building Python C extension modules for Windows
QUESTION:
I have a C extension module and it would be nice to distribute built binaries. Setuptools makes it easy to build extensions modules on OS X and GNU/Linux, since those OSs come with GCC, but I don't know how to do it in Windows. Would I need to buy a copy... | [
"python",
"windows"
] | 13 | 16 | 10,339 | 2 | 0 | 2008-09-19T10:53:12.920000 | 2008-09-19T10:57:36.950000 |
101,066 | 101,315 | What little things do I need to do before deploying a rails application | EDIT What small things which are too easy to overlook do I need to do before deploying a rails application? I have set up another question for any task that takes more than a minute or two, and so ought to be scheduled into a deployment process. In this question I'm mostly concerned with on-line config options and simi... | Freeze the gems you are using rake gems:unpack Change the secret in config/environment.rb Filter sensitive informtion like passwords: in app/controllers/application.rb filter_parameter_logging:password,:password_confirmation | What little things do I need to do before deploying a rails application EDIT What small things which are too easy to overlook do I need to do before deploying a rails application? I have set up another question for any task that takes more than a minute or two, and so ought to be scheduled into a deployment process. In... | TITLE:
What little things do I need to do before deploying a rails application
QUESTION:
EDIT What small things which are too easy to overlook do I need to do before deploying a rails application? I have set up another question for any task that takes more than a minute or two, and so ought to be scheduled into a depl... | [
"ruby-on-rails",
"deployment",
"config"
] | 6 | 5 | 1,114 | 8 | 0 | 2008-09-19T10:54:35.837000 | 2008-09-19T12:01:31.470000 |
101,072 | 692,078 | Java: Why aren't NullPointerExceptions called NullReferenceExceptions? | Was this an oversight? Or is it to do with the JVM? | Java does indeed have pointers--pointers on which you cannot perform pointer arithmetic. From the venerable JLS: There are two kinds of types in the Java programming language: primitive types (§4.2) and reference types (§4.3). There are, correspondingly, two kinds of data values that can be stored in variables, passed ... | Java: Why aren't NullPointerExceptions called NullReferenceExceptions? Was this an oversight? Or is it to do with the JVM? | TITLE:
Java: Why aren't NullPointerExceptions called NullReferenceExceptions?
QUESTION:
Was this an oversight? Or is it to do with the JVM?
ANSWER:
Java does indeed have pointers--pointers on which you cannot perform pointer arithmetic. From the venerable JLS: There are two kinds of types in the Java programming lang... | [
"java"
] | 35 | 26 | 2,832 | 4 | 0 | 2008-09-19T10:55:42.167000 | 2009-03-28T02:49:19.257000 |
101,079 | 102,686 | SQL Server Management Studio – tips for improving the TSQL coding process | I used to work in a place where a common practice was to use Pair Programming. I remember how many small things we could learn from each other when working together on the code. Picking up new shortcuts, code snippets etc. with time significantly improved our efficiency of writing code. Since I started working with SQL... | community owned wiki Answer - feel free to edit or add comments: Keyboard Shortcuts F5, CTRL + E or ALT + X - execute currently selected TSQL code CTRL + R – show/hide Results Pane CTRL + N – Open New Query Window CTRL + L – Display query execution plan Editing Shortcuts CTRL + K + C and CTRL + K + U - comment/uncommen... | SQL Server Management Studio – tips for improving the TSQL coding process I used to work in a place where a common practice was to use Pair Programming. I remember how many small things we could learn from each other when working together on the code. Picking up new shortcuts, code snippets etc. with time significantly... | TITLE:
SQL Server Management Studio – tips for improving the TSQL coding process
QUESTION:
I used to work in a place where a common practice was to use Pair Programming. I remember how many small things we could learn from each other when working together on the code. Picking up new shortcuts, code snippets etc. with ... | [
"sql-server",
"t-sql",
"optimization",
"keyboard-shortcuts"
] | 42 | 24 | 106,211 | 30 | 0 | 2008-09-19T10:56:32.413000 | 2008-09-19T15:15:38.677000 |
101,099 | 102,557 | How you setup a greenfield project | I'm setting yup a Greenfield (yeeea!) web application just now was wondering how other people first setup their project with regards to automated/CI build? I generally follow this: Create SVN Repository with basic layout (trunk, braches, lib, etc.) Create basic solution structure (core, ui, tests) Create a basic test t... | A repost from the question text: Create SVN Repository with basic layout (trunk, braches, lib, etc.) Create basic solution structure (core, ui, tests) Create a basic test that fails Copy NAnt scripts, update and tweak, make sure the failing test breaks the build locally Commit Setup default debug build on CI server (Te... | How you setup a greenfield project I'm setting yup a Greenfield (yeeea!) web application just now was wondering how other people first setup their project with regards to automated/CI build? I generally follow this: Create SVN Repository with basic layout (trunk, braches, lib, etc.) Create basic solution structure (cor... | TITLE:
How you setup a greenfield project
QUESTION:
I'm setting yup a Greenfield (yeeea!) web application just now was wondering how other people first setup their project with regards to automated/CI build? I generally follow this: Create SVN Repository with basic layout (trunk, braches, lib, etc.) Create basic solut... | [
"build-process",
"build-automation",
"build",
"continuous-integration"
] | 2 | 1 | 960 | 1 | 0 | 2008-09-19T11:00:51.420000 | 2008-09-19T15:00:56.060000 |
101,100 | 101,305 | CSV API for Java | Can anyone recommend a simple API that will allow me to use read a CSV input file, do some simple transformations, and then write it. A quick google has found http://flatpack.sourceforge.net/ which looks promising. I just wanted to check what others are using before I couple myself to this API. | Apache Commons CSV Check out Apache Common CSV. This library reads and writes several variations of CSV, including the standard one RFC 4180. Also reads/writes Tab-delimited files. Excel InformixUnload InformixUnloadCsv MySQL Oracle PostgreSQLCsv PostgreSQLText RFC4180 TDF | CSV API for Java Can anyone recommend a simple API that will allow me to use read a CSV input file, do some simple transformations, and then write it. A quick google has found http://flatpack.sourceforge.net/ which looks promising. I just wanted to check what others are using before I couple myself to this API. | TITLE:
CSV API for Java
QUESTION:
Can anyone recommend a simple API that will allow me to use read a CSV input file, do some simple transformations, and then write it. A quick google has found http://flatpack.sourceforge.net/ which looks promising. I just wanted to check what others are using before I couple myself to... | [
"java",
"csv"
] | 172 | 38 | 218,340 | 10 | 0 | 2008-09-19T11:01:12.793000 | 2008-09-19T11:58:32.350000 |
101,125 | 515,904 | Force browser to use new CSS | Is there a way to check if the user has a different version of the CSS cached by their browser and if so force their browser to pull the new version? | I don´t know if it is correct usage, but I think you can force a reload of the css file using a query string: I remember I used this method years ago to force a reload of a web-cam image, but time has probably moved on... | Force browser to use new CSS Is there a way to check if the user has a different version of the CSS cached by their browser and if so force their browser to pull the new version? | TITLE:
Force browser to use new CSS
QUESTION:
Is there a way to check if the user has a different version of the CSS cached by their browser and if so force their browser to pull the new version?
ANSWER:
I don´t know if it is correct usage, but I think you can force a reload of the css file using a query string: I re... | [
"c#",
"asp.net",
"css",
"master-pages"
] | 11 | 22 | 7,843 | 8 | 0 | 2008-09-19T11:08:45.303000 | 2009-02-05T13:33:57.517000 |
101,128 | 101,167 | How do I read text from the Windows clipboard in Python? | How do I read text from the (windows) clipboard with python? | You can use the module called win32clipboard, which is part of pywin32. Here is an example that first sets the clipboard data then gets it: import win32clipboard
# set clipboard data win32clipboard.OpenClipboard() win32clipboard.EmptyClipboard() win32clipboard.SetClipboardText('testing 123') win32clipboard.CloseClipbo... | How do I read text from the Windows clipboard in Python? How do I read text from the (windows) clipboard with python? | TITLE:
How do I read text from the Windows clipboard in Python?
QUESTION:
How do I read text from the (windows) clipboard with python?
ANSWER:
You can use the module called win32clipboard, which is part of pywin32. Here is an example that first sets the clipboard data then gets it: import win32clipboard
# set clipbo... | [
"python",
"windows",
"interop",
"clipboard"
] | 157 | 151 | 193,603 | 15 | 0 | 2008-09-19T11:09:27.390000 | 2008-09-19T11:20:29.610000 |
101,146 | 107,622 | Anything better than PHPDoc out there? | Does anybody use anything else to document their PHP code than PHPDoc? Are there any tools that read the same documentation syntax but give richer output? | I´ll go for doxygen too. Here are several reasons: compatible with phpdoc tags and other popular ones: it´s interoperable works with various programming languages: a better time investment there is alternative syntaxes: can choose the commenting style that suit you very efficient with advanced formating / tagging / met... | Anything better than PHPDoc out there? Does anybody use anything else to document their PHP code than PHPDoc? Are there any tools that read the same documentation syntax but give richer output? | TITLE:
Anything better than PHPDoc out there?
QUESTION:
Does anybody use anything else to document their PHP code than PHPDoc? Are there any tools that read the same documentation syntax but give richer output?
ANSWER:
I´ll go for doxygen too. Here are several reasons: compatible with phpdoc tags and other popular on... | [
"php",
"documentation",
"documentation-generation",
"phpdoc"
] | 25 | 20 | 10,708 | 9 | 0 | 2008-09-19T11:16:12.523000 | 2008-09-20T08:29:29.473000 |
101,162 | 101,256 | JSON and ASP.NET MVC | How do you return a serialized JSON object to the client side using ASP.NET MVC via an AJAX call? | From the controller you can just return a JsonResult: public ActionResult MyAction() {... // Populate myObject return new JsonResult{ Data = myObject }; } The form of the Ajax call will depend on which library you're using, of course. Using jQuery it would be something like: $.getJSON("/controllerName/MyAction", callba... | JSON and ASP.NET MVC How do you return a serialized JSON object to the client side using ASP.NET MVC via an AJAX call? | TITLE:
JSON and ASP.NET MVC
QUESTION:
How do you return a serialized JSON object to the client side using ASP.NET MVC via an AJAX call?
ANSWER:
From the controller you can just return a JsonResult: public ActionResult MyAction() {... // Populate myObject return new JsonResult{ Data = myObject }; } The form of the Aja... | [
"c#",
"asp.net-mvc",
"ajax",
"json"
] | 15 | 24 | 1,851 | 5 | 0 | 2008-09-19T11:20:08.363000 | 2008-09-19T11:47:35.793000 |
101,174 | 101,222 | Is there a zip-like method in .Net? | In Python there is a really neat function called zip which can be used to iterate through two lists at the same time: list1 = [1, 2, 3] list2 = ["a", "b", "c"] for v1, v2 in zip(list1, list2): print v1 + " " + v2 The above code should produce the following: 1 a 2 b 3 c I wonder if there is a method like it available in... | Update: It is built-in in C# 4 as System.Linq.Enumerable.Zip Method Here is a C# 3 version: IEnumerable Zip (IEnumerable a, IEnumerable b, Func combine) { using (var f = a.GetEnumerator()) using (var s = b.GetEnumerator()) { while (f.MoveNext() && s.MoveNext()) yield return combine(f.Current, s.Current); } } Dropped th... | Is there a zip-like method in .Net? In Python there is a really neat function called zip which can be used to iterate through two lists at the same time: list1 = [1, 2, 3] list2 = ["a", "b", "c"] for v1, v2 in zip(list1, list2): print v1 + " " + v2 The above code should produce the following: 1 a 2 b 3 c I wonder if th... | TITLE:
Is there a zip-like method in .Net?
QUESTION:
In Python there is a really neat function called zip which can be used to iterate through two lists at the same time: list1 = [1, 2, 3] list2 = ["a", "b", "c"] for v1, v2 in zip(list1, list2): print v1 + " " + v2 The above code should produce the following: 1 a 2 b ... | [
".net",
"python",
"list",
"iteration"
] | 13 | 26 | 2,488 | 4 | 0 | 2008-09-19T11:21:57.657000 | 2008-09-19T11:34:43.540000 |
101,180 | 375,036 | Which is the best .Net XML-RPC library? | I need to communicate with an XML-RPC server from a.NET 2.0 client. Can you recommend any libraries? EDIT: Having tried XML-RPC.Net, I like the way it generates dynamic proxies, it is very neat. Unfortunately, as always, things are not so simple. I am accessing an XML-RPC service which uses the unorthodox technique of ... | If the method name is all that is changing (i.e., the method signature is static) XML-RPC.NET can handle this for you. This is addressed in the FAQ, noting "However, there are some XML-RPC APIs which require the method name to be generated dynamically at runtime..." From the FAQ: ISumAndDiff proxy = (ISumAndDiff)XmlRpc... | Which is the best .Net XML-RPC library? I need to communicate with an XML-RPC server from a.NET 2.0 client. Can you recommend any libraries? EDIT: Having tried XML-RPC.Net, I like the way it generates dynamic proxies, it is very neat. Unfortunately, as always, things are not so simple. I am accessing an XML-RPC service... | TITLE:
Which is the best .Net XML-RPC library?
QUESTION:
I need to communicate with an XML-RPC server from a.NET 2.0 client. Can you recommend any libraries? EDIT: Having tried XML-RPC.Net, I like the way it generates dynamic proxies, it is very neat. Unfortunately, as always, things are not so simple. I am accessing ... | [
".net",
"xml-rpc"
] | 9 | 4 | 4,618 | 3 | 0 | 2008-09-19T11:24:36.323000 | 2008-12-17T16:01:48.780000 |
101,182 | 174,188 | MOSS 2007 Crawl | I'm trying to get crawl to work on two separate farms I have but can't get it to work on either one. They both have two WFE's with an additional WFE configured as an Index server. There is one more server dedicated for Query and two clustered SQL 2005 back end servers for the database. I have unsuccessfully tried at le... | One thing to remember is that crawling SharePoint sites is different from crawling file shares or non-SharePoint websites. A few other quick pointers: the sps3: protocol is for crawling user profiles for People Search. You can disregard anything the crawler says about it until you're ready for user profiles. your crawl... | MOSS 2007 Crawl I'm trying to get crawl to work on two separate farms I have but can't get it to work on either one. They both have two WFE's with an additional WFE configured as an Index server. There is one more server dedicated for Query and two clustered SQL 2005 back end servers for the database. I have unsuccessf... | TITLE:
MOSS 2007 Crawl
QUESTION:
I'm trying to get crawl to work on two separate farms I have but can't get it to work on either one. They both have two WFE's with an additional WFE configured as an Index server. There is one more server dedicated for Query and two clustered SQL 2005 back end servers for the database.... | [
"sharepoint",
"search"
] | 3 | 4 | 16,840 | 6 | 0 | 2008-09-19T11:25:07.260000 | 2008-10-06T13:05:29.847000 |
101,184 | 101,197 | How can I confirm a database is Oracle & what version it is using SQL? | I'm building an installer for an application. The user gets to select a datasource they have configured and nominate what type of database it is. I want to confirm that the database type is indeed Oracle, and if possible, what version of Oracle they are running by sending a SQL statement to the datasource. | Run this SQL: select * from v$version; And you'll get a result like: BANNER ---------------------------------------------------------------- Oracle Database 10g Release 10.2.0.3.0 - 64bit Production PL/SQL Release 10.2.0.3.0 - Production CORE 10.2.0.3.0 Production TNS for Solaris: Version 10.2.0.3.0 - Production NLSRTL... | How can I confirm a database is Oracle & what version it is using SQL? I'm building an installer for an application. The user gets to select a datasource they have configured and nominate what type of database it is. I want to confirm that the database type is indeed Oracle, and if possible, what version of Oracle they... | TITLE:
How can I confirm a database is Oracle & what version it is using SQL?
QUESTION:
I'm building an installer for an application. The user gets to select a datasource they have configured and nominate what type of database it is. I want to confirm that the database type is indeed Oracle, and if possible, what vers... | [
"sql",
"oracle"
] | 174 | 297 | 260,357 | 11 | 0 | 2008-09-19T11:27:01.467000 | 2008-09-19T11:29:06.907000 |
101,196 | 1,349,556 | Triggering a .NET garbage collection externally | Is there a way to trigger a garbage collection in a.NET process from another process or from inside WinDBG? There are the Managed Debugging Assistants that force a collection as you move across a native/managed boundary, and AQTime seems to have button that suggests it does this, but I can't find any documentation on h... | John Cocktoastan's answer to use GC.Collect when in Visual Studio is the best option if there. I still can't find an alternative to actually do the collection under WinDBG but taking a step back to problem of "How much memory is reclaimable?" (see my comment to John's answer) I think there is an alternative by using a ... | Triggering a .NET garbage collection externally Is there a way to trigger a garbage collection in a.NET process from another process or from inside WinDBG? There are the Managed Debugging Assistants that force a collection as you move across a native/managed boundary, and AQTime seems to have button that suggests it do... | TITLE:
Triggering a .NET garbage collection externally
QUESTION:
Is there a way to trigger a garbage collection in a.NET process from another process or from inside WinDBG? There are the Managed Debugging Assistants that force a collection as you move across a native/managed boundary, and AQTime seems to have button t... | [
".net",
"debugging",
"garbage-collection",
"windbg"
] | 27 | 3 | 10,709 | 4 | 0 | 2008-09-19T11:29:03.943000 | 2009-08-28T21:47:37.430000 |
101,198 | 101,214 | How can I confirm a database is Postgres & what version it is using SQL? | I'm building an installer for an application. The user gets to select a datasource they have configured and nominate what type of database it is. I want to confirm that the database type is indeed Postgres, and if possible, what version of Postgres they are running by sending a SQL statement to the datasource. | Try this: mk=# SELECT version(); version ----------------------------------------------------------------------------------------------- PostgreSQL 8.3.3 on i486-pc-linux-gnu, compiled by GCC cc (GCC) 4.2.3 (Ubuntu 4.2.3-2ubuntu7) (1 row) The command works too in MySQL: mysql> select version(); +-----------------------... | How can I confirm a database is Postgres & what version it is using SQL? I'm building an installer for an application. The user gets to select a datasource they have configured and nominate what type of database it is. I want to confirm that the database type is indeed Postgres, and if possible, what version of Postgre... | TITLE:
How can I confirm a database is Postgres & what version it is using SQL?
QUESTION:
I'm building an installer for an application. The user gets to select a datasource they have configured and nominate what type of database it is. I want to confirm that the database type is indeed Postgres, and if possible, what ... | [
"sql",
"postgresql"
] | 5 | 4 | 925 | 6 | 0 | 2008-09-19T11:29:11.650000 | 2008-09-19T11:33:30.157000 |
101,238 | 102,258 | Letting several assemblies access the same text file | I've got many assemblies/projects in the same c#/.net solution. A setting needs to be saved by people using the web application gui, and then a console app and some test projects need to access the same file. Where should I put the file and how to access it? I've tried using "AppDomain.CurrentDomain.BaseDirectory" but ... | Personally, I would be leveraging the database because the alternative is either a configuration headache or is more trouble than it's worth. You could configure each application to point to the same file, but that becomes problematic if you want to move the file. Or you could write a service to manage the file and exp... | Letting several assemblies access the same text file I've got many assemblies/projects in the same c#/.net solution. A setting needs to be saved by people using the web application gui, and then a console app and some test projects need to access the same file. Where should I put the file and how to access it? I've tri... | TITLE:
Letting several assemblies access the same text file
QUESTION:
I've got many assemblies/projects in the same c#/.net solution. A setting needs to be saved by people using the web application gui, and then a console app and some test projects need to access the same file. Where should I put the file and how to a... | [
"c#",
".net",
"file",
"file-io",
"filesystems"
] | 0 | 1 | 227 | 4 | 0 | 2008-09-19T11:38:23.717000 | 2008-09-19T14:28:01.197000 |
101,244 | 101,277 | What command(s) control the behavior of /etc/rc*.d on Redhat/CentOS? | /etc/init.d/*
/etc/rc{1-5}.d/* | in one word: init. This process always has pid of 1 and controls (spawns) all other processes in your unix according to the rules in /etc/init.d. init is usually called with a number as an argument, e.g. init 3 This will make it run the contents of the rc3.d folder. For more information: Wikipedia article for init. Edi... | What command(s) control the behavior of /etc/rc*.d on Redhat/CentOS? /etc/init.d/*
/etc/rc{1-5}.d/* | TITLE:
What command(s) control the behavior of /etc/rc*.d on Redhat/CentOS?
QUESTION:
/etc/init.d/*
/etc/rc{1-5}.d/*
ANSWER:
in one word: init. This process always has pid of 1 and controls (spawns) all other processes in your unix according to the rules in /etc/init.d. init is usually called with a number as an arg... | [
"linux",
"system",
"centos",
"redhat",
"init"
] | 0 | 0 | 507 | 3 | 0 | 2008-09-19T11:38:58.957000 | 2008-09-19T11:53:34.640000 |
101,258 | 101,292 | In Vim, is there a way to paste text in the search line? | I want to search for $maximumTotalAllowedAfterFinish and replace it with $minimumTotalAllowedAfterFinish. Instead of typing the long text::%s/$maximumTotalAllowedAfterFinish/$minimumTotalAllowedAfterFinish/g Is there a way to COPY these long variable names down into the search line, since, on the command line I can't t... | You can insert the contents of a numbered or named register by typing CTRL R {0-9a-z"%#:-=.}. By typing CTRL-R CTRL-W you can paste the current word under the cursor. See::he cmdline-editing for more information. | In Vim, is there a way to paste text in the search line? I want to search for $maximumTotalAllowedAfterFinish and replace it with $minimumTotalAllowedAfterFinish. Instead of typing the long text::%s/$maximumTotalAllowedAfterFinish/$minimumTotalAllowedAfterFinish/g Is there a way to COPY these long variable names down i... | TITLE:
In Vim, is there a way to paste text in the search line?
QUESTION:
I want to search for $maximumTotalAllowedAfterFinish and replace it with $minimumTotalAllowedAfterFinish. Instead of typing the long text::%s/$maximumTotalAllowedAfterFinish/$minimumTotalAllowedAfterFinish/g Is there a way to COPY these long var... | [
"vim"
] | 135 | 171 | 38,543 | 8 | 0 | 2008-09-19T11:47:54.980000 | 2008-09-19T11:56:42.213000 |
101,265 | 101,313 | Why is there no ForEach extension method on IEnumerable? | Inspired by another question asking about the missing Zip function: Why is there no ForEach extension method on the IEnumerable interface? Or anywhere? The only class that gets a ForEach method is List<>. Is there a reason why it's missing, maybe performance? | There is already a foreach statement included in the language that does the job most of the time. I'd hate to see the following: list.ForEach( item => { item.DoSomething(); } ); Instead of: foreach(Item item in list) { item.DoSomething(); } The latter is clearer and easier to read in most situations, although maybe a b... | Why is there no ForEach extension method on IEnumerable? Inspired by another question asking about the missing Zip function: Why is there no ForEach extension method on the IEnumerable interface? Or anywhere? The only class that gets a ForEach method is List<>. Is there a reason why it's missing, maybe performance? | TITLE:
Why is there no ForEach extension method on IEnumerable?
QUESTION:
Inspired by another question asking about the missing Zip function: Why is there no ForEach extension method on the IEnumerable interface? Or anywhere? The only class that gets a ForEach method is List<>. Is there a reason why it's missing, mayb... | [
"c#",
".net",
"vb.net",
"extension-methods"
] | 476 | 231 | 203,457 | 21 | 0 | 2008-09-19T11:49:53.773000 | 2008-09-19T12:00:44.577000 |
101,267 | 102,747 | Is there any way to define a constant value to Java at compile time | When I used to write libraries in C/C++ I got into the habit of having a method to return the compile date/time. This was always a compiled into the library so would differentiate builds of the library. I got this by returning a #define in the code: C++: #ifdef _BuildDateTime_ char* SomeClass::getBuildDateTime() { retu... | I would favour the standards based approach. Put your version information (along with other useful publisher stuff such as build number, subversion revision number, author, company details, etc) in the jar's Manifest File. This is a well documented and understood Java specification. Strong tool support exists for creat... | Is there any way to define a constant value to Java at compile time When I used to write libraries in C/C++ I got into the habit of having a method to return the compile date/time. This was always a compiled into the library so would differentiate builds of the library. I got this by returning a #define in the code: C+... | TITLE:
Is there any way to define a constant value to Java at compile time
QUESTION:
When I used to write libraries in C/C++ I got into the habit of having a method to return the compile date/time. This was always a compiled into the library so would differentiate builds of the library. I got this by returning a #defi... | [
"java",
"c++",
"c"
] | 14 | 16 | 7,755 | 8 | 0 | 2008-09-19T11:50:35.490000 | 2008-09-19T15:21:11.520000 |
101,270 | 3,621,753 | Vim errorformat for Visual Studio | I want to use Vim's quickfix features with the output from Visual Studio's devenv build process or msbuild. I've created a batch file called build.bat which executes the devenv build like this: devenv MySln.sln /Build Debug In vim I've pointed the:make command to that batch file::set makeprg=build.bat When I now run:ma... | I have a blog post which walks through all the details of getting C# projects building in Vim, including the error format. You can find it here: http://kevin-berridge.blogspot.com/2008/09/vim-c-compiling.html In short you need the following::set errorformat=\ %#%f(%l\\\,%c):\ %m:set makeprg=msbuild\ /nologo\ /v:q\ /pro... | Vim errorformat for Visual Studio I want to use Vim's quickfix features with the output from Visual Studio's devenv build process or msbuild. I've created a batch file called build.bat which executes the devenv build like this: devenv MySln.sln /Build Debug In vim I've pointed the:make command to that batch file::set m... | TITLE:
Vim errorformat for Visual Studio
QUESTION:
I want to use Vim's quickfix features with the output from Visual Studio's devenv build process or msbuild. I've created a batch file called build.bat which executes the devenv build like this: devenv MySln.sln /Build Debug In vim I've pointed the:make command to that... | [
"visual-studio",
"vim",
"errorformat"
] | 34 | 23 | 7,061 | 7 | 0 | 2008-09-19T11:50:59.670000 | 2010-09-01T20:07:04.063000 |
101,275 | 104,966 | Big things to do when deploying a rails app | In the question What little things do I need to do before deploying a rails application I am getting a lot of answers that are bigger than "little things". So this question is slighly different. What reasonably major steps do I need to take before deploying a rails application. In this case, i mean things which are are... | Set up Capistrano to deploy You'll want to learn capistrano if you don't already know it, and use it to deploy your code in an automated way. This will involve setting up your shared directory and shared resources like database.yml. Install C Based MySQL gem If you don't have all the required libs, this can take a litt... | Big things to do when deploying a rails app In the question What little things do I need to do before deploying a rails application I am getting a lot of answers that are bigger than "little things". So this question is slighly different. What reasonably major steps do I need to take before deploying a rails applicatio... | TITLE:
Big things to do when deploying a rails app
QUESTION:
In the question What little things do I need to do before deploying a rails application I am getting a lot of answers that are bigger than "little things". So this question is slighly different. What reasonably major steps do I need to take before deploying ... | [
"ruby-on-rails",
"deployment"
] | 9 | 11 | 1,060 | 3 | 0 | 2008-09-19T11:53:13.953000 | 2008-09-19T19:51:01.543000 |
101,290 | 101,494 | How many bits are there in a nibble? | binary question:) | The answer is 4 bits. 2 nibbles make a byte. See here for a cute poem. | How many bits are there in a nibble? binary question:) | TITLE:
How many bits are there in a nibble?
QUESTION:
binary question:)
ANSWER:
The answer is 4 bits. 2 nibbles make a byte. See here for a cute poem. | [
"binary"
] | 2 | 19 | 20,042 | 10 | 0 | 2008-09-19T11:56:19.500000 | 2008-09-19T12:37:49.867000 |
101,316 | 102,262 | How to manage concurrent Input/Output access to a XML file from multiple instances of an EXE, using Delphi. | I have a command line tool, written in Delphi, which job is to insert a node in a XML file and then immediately exit. I need to make it possible several instances of the tool to be executed simultaneously and insert nodes to one and the same XML. To achieve this purpose I have introduced a simple file "mutex" - the too... | A named semaphore or mutex can do this for you on a single machine. Use e.g. TMutex from SyncObjs, and use one of the constructors which takes a name argument. If you use the same name in all the applications, they will be synchronizing over the same kernel mutex. Use TMutex.Acquire to access, and TMutex.Release when y... | How to manage concurrent Input/Output access to a XML file from multiple instances of an EXE, using Delphi. I have a command line tool, written in Delphi, which job is to insert a node in a XML file and then immediately exit. I need to make it possible several instances of the tool to be executed simultaneously and ins... | TITLE:
How to manage concurrent Input/Output access to a XML file from multiple instances of an EXE, using Delphi.
QUESTION:
I have a command line tool, written in Delphi, which job is to insert a node in a XML file and then immediately exit. I need to make it possible several instances of the tool to be executed simu... | [
"xml",
"delphi",
"mutex"
] | 5 | 6 | 2,364 | 5 | 0 | 2008-09-19T12:01:40.767000 | 2008-09-19T14:28:23.050000 |
101,326 | 103,661 | IIS Wildcard Mapping not working for ASP.NET | I've set up wildcard mapping on IIS 6, by adding "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll", and ensured "Verify that file exists" is not checked: on the "websites" directory in IIS on the website However, after a iisreset, when I go to http://myserver/something.gif, I still get IIS 404 error, not... | You need to add an HTTP Handler in your web config for gif files: That forces.Net to handle the file, then you'll get the.Net error. Server Error in '/' Application. The resource cannot be found. Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name c... | IIS Wildcard Mapping not working for ASP.NET I've set up wildcard mapping on IIS 6, by adding "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll", and ensured "Verify that file exists" is not checked: on the "websites" directory in IIS on the website However, after a iisreset, when I go to http://myserver/... | TITLE:
IIS Wildcard Mapping not working for ASP.NET
QUESTION:
I've set up wildcard mapping on IIS 6, by adding "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll", and ensured "Verify that file exists" is not checked: on the "websites" directory in IIS on the website However, after a iisreset, when I go t... | [
"asp.net",
"iis"
] | 4 | 4 | 6,496 | 3 | 0 | 2008-09-19T12:02:53.557000 | 2008-09-19T16:53:39.253000 |
101,329 | 101,583 | If classes with virtual functions are implemented with vtables, how is a class with no virtual functions implemented? | In particular, wouldn't there have to be some kind of function pointer in place anyway? | Non virtual member functions are really just a syntactic sugar as they are almost like an ordinary function but with access checking and an implicit object parameter. struct A { void foo (); void bar () const; }; is basically the same as: struct A { };
void foo (A * this); void bar (A const * this); The vtable is need... | If classes with virtual functions are implemented with vtables, how is a class with no virtual functions implemented? In particular, wouldn't there have to be some kind of function pointer in place anyway? | TITLE:
If classes with virtual functions are implemented with vtables, how is a class with no virtual functions implemented?
QUESTION:
In particular, wouldn't there have to be some kind of function pointer in place anyway?
ANSWER:
Non virtual member functions are really just a syntactic sugar as they are almost like ... | [
"c++",
"virtual-functions"
] | 6 | 12 | 1,150 | 9 | 0 | 2008-09-19T12:03:25.240000 | 2008-09-19T12:49:14.100000 |
101,333 | 311,472 | The ultimate MySQL legacy database nightmare | Table1: Everything including the kitchen sink. Dates in the wrong format (year last so you cannot sort on that column), Numbers stored as VARCHAR, complete addresses in the 'street' column, firstname and lastname in the firstname column, city in the lastname column, incomplete addresses, Rows that update preceeding row... | The Log Files (binary Logs) were my first thought too. If you knew how they did things you would shudder. For every row there are many many entries in the log as pieces are added and changed. Its just HUGE! For now I settled upon the Hash approach. With some clever file memory paging this is quite fast. | The ultimate MySQL legacy database nightmare Table1: Everything including the kitchen sink. Dates in the wrong format (year last so you cannot sort on that column), Numbers stored as VARCHAR, complete addresses in the 'street' column, firstname and lastname in the firstname column, city in the lastname column, incomple... | TITLE:
The ultimate MySQL legacy database nightmare
QUESTION:
Table1: Everything including the kitchen sink. Dates in the wrong format (year last so you cannot sort on that column), Numbers stored as VARCHAR, complete addresses in the 'street' column, firstname and lastname in the firstname column, city in the lastnam... | [
"mysql",
"database",
"refactoring",
"binary-log"
] | 10 | 1 | 2,386 | 4 | 0 | 2008-09-19T12:06:30.943000 | 2008-11-22T16:10:47.647000 |
101,337 | 101,345 | What is the difference between a non-secure random number generator and a secure random number generator? | As the title says: What is the difference between a non-secure random number generator and a secure random number generator? | No computationally feasible algorithm should: recover the seed, or predict the "next bit" for a secure random number generator. Example: a linear feedback shift register produces lots of random numbers out there, but given enough output, the seed can be discovered and all subsequent numbers predicted. | What is the difference between a non-secure random number generator and a secure random number generator? As the title says: What is the difference between a non-secure random number generator and a secure random number generator? | TITLE:
What is the difference between a non-secure random number generator and a secure random number generator?
QUESTION:
As the title says: What is the difference between a non-secure random number generator and a secure random number generator?
ANSWER:
No computationally feasible algorithm should: recover the seed... | [
"random",
"cryptography"
] | 28 | 33 | 6,002 | 7 | 0 | 2008-09-19T12:07:12.673000 | 2008-09-19T12:08:59.547000 |
101,338 | 101,772 | Is it valid to have a 'choice' of 'group' elements when defining an XML Schema (XSD) | Is it valid to have a 'choice' of 'group' elements when defining an XML Schema (XSD) i.e. is the following valid Where an XML message can represent, for example, either a new reservation or a cancellation of an existing reservation. If the message is for a reservation, then it must include all the elements defined in t... | I'm no XML expert, although I use it quite a lot. This isn't the way I'd generally do this sort of structure. I would prefer a separate complex types rather than a choice of two groups (see the very end of this answer). I suspect that the problem is that ReservationGroup and CancellationGroup start with the same elemen... | Is it valid to have a 'choice' of 'group' elements when defining an XML Schema (XSD) Is it valid to have a 'choice' of 'group' elements when defining an XML Schema (XSD) i.e. is the following valid Where an XML message can represent, for example, either a new reservation or a cancellation of an existing reservation. If... | TITLE:
Is it valid to have a 'choice' of 'group' elements when defining an XML Schema (XSD)
QUESTION:
Is it valid to have a 'choice' of 'group' elements when defining an XML Schema (XSD) i.e. is the following valid Where an XML message can represent, for example, either a new reservation or a cancellation of an existi... | [
"xml",
"xsd",
"schema"
] | 10 | 10 | 12,009 | 2 | 0 | 2008-09-19T12:07:21.017000 | 2008-09-19T13:24:21.287000 |
101,347 | 101,864 | What's the best way to port an application from ActionScript2 to ActionScript3? | Our application is written in ActionScript2 and has about 50.000+ lines of code. We want to port it to ActionScript3 and we're trying to find out what our options are. Do we have to do it manually or can we use a converter, and what problems can we expect? | I asked a similar question a little while ago that you might find useful: What is the best approach to moving a preexisting project from Flash 7/AS2 to Flex/AS3? Some minor tasks might be automatable (fixing package declarations mainly), but other than that I doubt it could be automated. | What's the best way to port an application from ActionScript2 to ActionScript3? Our application is written in ActionScript2 and has about 50.000+ lines of code. We want to port it to ActionScript3 and we're trying to find out what our options are. Do we have to do it manually or can we use a converter, and what problem... | TITLE:
What's the best way to port an application from ActionScript2 to ActionScript3?
QUESTION:
Our application is written in ActionScript2 and has about 50.000+ lines of code. We want to port it to ActionScript3 and we're trying to find out what our options are. Do we have to do it manually or can we use a converter... | [
"flash",
"actionscript-3",
"actionscript-2",
"port"
] | 3 | 1 | 992 | 4 | 0 | 2008-09-19T12:09:15.553000 | 2008-09-19T13:36:03.677000 |
101,362 | 102,227 | How do you generate passwords? | How do you generate passwords? Random Characters? Passphrases? High Ascii? Something like this? cat /dev/urandom | strings | Mac OS X's "Keychain Access" application gives you access to the nice OS X password generator. Hit command-N and click the key icon. You get to choose password style (memorable, numeric, alphanumeric, random, FIPS-181) and choose the length. It also warns you about weak passwords. | How do you generate passwords? How do you generate passwords? Random Characters? Passphrases? High Ascii? Something like this? cat /dev/urandom | strings | TITLE:
How do you generate passwords?
QUESTION:
How do you generate passwords? Random Characters? Passphrases? High Ascii? Something like this? cat /dev/urandom | strings
ANSWER:
Mac OS X's "Keychain Access" application gives you access to the nice OS X password generator. Hit command-N and click the key icon. You ge... | [
"random",
"passwords",
"ascii",
"character",
"passphrase"
] | 35 | 97 | 19,520 | 43 | 0 | 2008-09-19T12:13:08.663000 | 2008-09-19T14:23:52.563000 |
101,363 | 133,100 | How do I do Dependency Injection in a test project (TFS 2008) using Castle | I'm using Castle Windsor for dependency injection in my test project. I'm trying to create an instance one of my 'Repository' classes. "It works fine on my machine", but when I run a nightly build in TFS, my tests are not able to load said classes. private static readonly WindsorContainer _container = new WindsorContai... | That is...interesting. I found this blog post that may help your issue. It looks like MSTest is using that as its working directory, which is annoying to say the least. The blog post shows how to change the directory, so that you can have consistent results. I would also do some Googling to find out if a more elegant s... | How do I do Dependency Injection in a test project (TFS 2008) using Castle I'm using Castle Windsor for dependency injection in my test project. I'm trying to create an instance one of my 'Repository' classes. "It works fine on my machine", but when I run a nightly build in TFS, my tests are not able to load said class... | TITLE:
How do I do Dependency Injection in a test project (TFS 2008) using Castle
QUESTION:
I'm using Castle Windsor for dependency injection in my test project. I'm trying to create an instance one of my 'Repository' classes. "It works fine on my machine", but when I run a nightly build in TFS, my tests are not able ... | [
".net",
"tfs",
"dependency-injection",
"castle-windsor",
"automated-tests"
] | 1 | 0 | 925 | 2 | 0 | 2008-09-19T12:13:34.403000 | 2008-09-25T12:45:33.310000 |
101,386 | 101,404 | Dynamic class variables | Does PHP have a method of having auto-generated class variables? I think I've seen something like this before but I'm not certain. public class TestClass { private $data = array();
public function TestClass() { $this->data['firstValue'] = "cheese"; } } The $this->data array is always an associative array but they keys... | See here: http://www.php.net/manual/en/language.oop5.overloading.php What you want is the "__get" method. There is an example for what you need on the link. | Dynamic class variables Does PHP have a method of having auto-generated class variables? I think I've seen something like this before but I'm not certain. public class TestClass { private $data = array();
public function TestClass() { $this->data['firstValue'] = "cheese"; } } The $this->data array is always an associa... | TITLE:
Dynamic class variables
QUESTION:
Does PHP have a method of having auto-generated class variables? I think I've seen something like this before but I'm not certain. public class TestClass { private $data = array();
public function TestClass() { $this->data['firstValue'] = "cheese"; } } The $this->data array is... | [
"php",
"oop"
] | 6 | 11 | 8,341 | 2 | 0 | 2008-09-19T12:18:11.430000 | 2008-09-19T12:22:59.140000 |
101,394 | 1,259,133 | Is there any free tool for monitoring BizTalk applications remotely? | whether command line or GUI, I'd be interested in testing every of them. | Your question is very generic and all the answers above assumed various things. When it comes to BizTalk monitoring its means different things to different people. Your BizTalk administrator might monitor the overall health of the BizTalk environment by opening the BizTalk Administration console. BizTalk Admin console ... | Is there any free tool for monitoring BizTalk applications remotely? whether command line or GUI, I'd be interested in testing every of them. | TITLE:
Is there any free tool for monitoring BizTalk applications remotely?
QUESTION:
whether command line or GUI, I'd be interested in testing every of them.
ANSWER:
Your question is very generic and all the answers above assumed various things. When it comes to BizTalk monitoring its means different things to diffe... | [
"user-interface",
"command-line",
"monitoring",
"biztalk"
] | 2 | 5 | 5,785 | 10 | 0 | 2008-09-19T12:19:25.140000 | 2009-08-11T08:51:14.507000 |
101,415 | 101,436 | Thumbnail image from .3gp file | Does anybody know how to get thumbnail (still image) from 3gb video file? First frame or something like that. I'm using.net, but solution can be in any language (managed or native), or third-party product. | This is using ffmpeg on Linux and called from PHP, but if you can use ffmpeg then that dosen't matter: ffmpeg -i path/to/your/video.3gp -an -ss 00:00:00 -t 00:00:01 -y -s 400x300 path/to/your/image%d.jpg Note the "%d"; you are only generating one frame but ffmpeg still needs this so it knows where to put the number whe... | Thumbnail image from .3gp file Does anybody know how to get thumbnail (still image) from 3gb video file? First frame or something like that. I'm using.net, but solution can be in any language (managed or native), or third-party product. | TITLE:
Thumbnail image from .3gp file
QUESTION:
Does anybody know how to get thumbnail (still image) from 3gb video file? First frame or something like that. I'm using.net, but solution can be in any language (managed or native), or third-party product.
ANSWER:
This is using ffmpeg on Linux and called from PHP, but i... | [
"ffmpeg",
"3gp"
] | 3 | 5 | 1,716 | 1 | 0 | 2008-09-19T12:24:59.743000 | 2008-09-19T12:30:18.997000 |
101,416 | 102,563 | Multiple local connections in flash - what's the better architecture? | I'm using localConnection in AS3 to allow several flash applications to interact with a central application. (Some are AS2, some AS3). The central application must use a seperate localConnection variable for each receiving connection (otherwise the second app that tries to connect will be rejected). But what about send... | It would seem more organised to communicate with each Flash application separately, although I think it will work either way. | Multiple local connections in flash - what's the better architecture? I'm using localConnection in AS3 to allow several flash applications to interact with a central application. (Some are AS2, some AS3). The central application must use a seperate localConnection variable for each receiving connection (otherwise the s... | TITLE:
Multiple local connections in flash - what's the better architecture?
QUESTION:
I'm using localConnection in AS3 to allow several flash applications to interact with a central application. (Some are AS2, some AS3). The central application must use a seperate localConnection variable for each receiving connectio... | [
"flash",
"actionscript-3",
"actionscript-2",
"localconnection"
] | 0 | 1 | 1,537 | 1 | 0 | 2008-09-19T12:25:24.377000 | 2008-09-19T15:01:33.487000 |
101,422 | 101,430 | Encoding spaces with the javascript encodeURIComponent function | Why does the JavaScript function encodeURIComponent encode spaces to the hex Unicode value %20 instead of +. Should URI parameters not spaces to +? | Spaces encode to %20, I believe that's their ASCII character code. However, developers have taken a shine to encoding spaces to + because it generates URLs that are readable and typeable by human beings. | Encoding spaces with the javascript encodeURIComponent function Why does the JavaScript function encodeURIComponent encode spaces to the hex Unicode value %20 instead of +. Should URI parameters not spaces to +? | TITLE:
Encoding spaces with the javascript encodeURIComponent function
QUESTION:
Why does the JavaScript function encodeURIComponent encode spaces to the hex Unicode value %20 instead of +. Should URI parameters not spaces to +?
ANSWER:
Spaces encode to %20, I believe that's their ASCII ch... | [
"javascript"
] | 3 | 5 | 5,615 | 4 | 0 | 2008-09-19T12:26:11.800000 | 2008-09-19T12:28:45.287000 |
101,423 | 101,456 | How do you continue to improve your SQL skills? | How do SQL developers go about keeping up on current techniques and trends in the SQL world? Are there any blogs, books, articles, techniques, etc that are being used to keep up to date and in the know? There are a lot of opportunities out their for OO, procedural, and functional programmers to take part in a variety o... | Find challenging questions that test your TRANSACT-SQL knowledge... personally I enjoy Joe Celko's SQL Puzzles and Answers. Joe Celko's SQL Puzzles and Answers http://ecx.images-amazon.com/images/I/51DTJ099P7L._SL500_BO2,204,203,200_PIsitb-dp-500-arrow,TopRight,45,-64_OU01_AA240_SH20_.jpg | How do you continue to improve your SQL skills? How do SQL developers go about keeping up on current techniques and trends in the SQL world? Are there any blogs, books, articles, techniques, etc that are being used to keep up to date and in the know? There are a lot of opportunities out their for OO, procedural, and fu... | TITLE:
How do you continue to improve your SQL skills?
QUESTION:
How do SQL developers go about keeping up on current techniques and trends in the SQL world? Are there any blogs, books, articles, techniques, etc that are being used to keep up to date and in the know? There are a lot of opportunities out their for OO, ... | [
"sql-server"
] | 15 | 8 | 16,031 | 22 | 0 | 2008-09-19T12:26:33.640000 | 2008-09-19T12:33:28.130000 |
101,427 | 101,557 | Flex and crossdomain.xml | I was wondering are there any security concerns with adding crossdomain.xml to the root of an application server? Can it be added to any other parts of the server and are you aware of any work arounds that dont require the server to have this file in place? Thanks Damien | By adding the crossdomain.xml, the main security concern is that flash applications can now connect to your server. So if someone logs into your site, and then browses over to another website with a malicious flash app, that flash app can connect back to your site. Since it's in a browser, cookies are shared to the fla... | Flex and crossdomain.xml I was wondering are there any security concerns with adding crossdomain.xml to the root of an application server? Can it be added to any other parts of the server and are you aware of any work arounds that dont require the server to have this file in place? Thanks Damien | TITLE:
Flex and crossdomain.xml
QUESTION:
I was wondering are there any security concerns with adding crossdomain.xml to the root of an application server? Can it be added to any other parts of the server and are you aware of any work arounds that dont require the server to have this file in place? Thanks Damien
ANSW... | [
"apache-flex",
"security",
"crossdomain.xml"
] | 7 | 10 | 26,788 | 5 | 0 | 2008-09-19T12:27:58.487000 | 2008-09-19T12:46:36.510000 |
101,439 | 101,613 | The most efficient way to implement an integer based power function pow(int, int) | What is the most efficient way given to raise an integer to the power of another integer in C? // 2^3 pow(2,3) == 8
// 5^5 pow(5,5) == 3125 | Exponentiation by squaring. int ipow(int base, int exp) { int result = 1; for (;;) { if (exp & 1) result *= base; exp >>= 1; if (!exp) break; base *= base; }
return result; } This is the standard method for doing modular exponentiation for huge numbers in asymmetric cryptography. | The most efficient way to implement an integer based power function pow(int, int) What is the most efficient way given to raise an integer to the power of another integer in C? // 2^3 pow(2,3) == 8
// 5^5 pow(5,5) == 3125 | TITLE:
The most efficient way to implement an integer based power function pow(int, int)
QUESTION:
What is the most efficient way given to raise an integer to the power of another integer in C? // 2^3 pow(2,3) == 8
// 5^5 pow(5,5) == 3125
ANSWER:
Exponentiation by squaring. int ipow(int base, int exp) { int result =... | [
"c",
"algorithm",
"math",
"exponentiation"
] | 312 | 453 | 277,724 | 20 | 0 | 2008-09-19T12:30:30.620000 | 2008-09-19T12:54:36.193000 |
101,449 | 102,085 | Has anyone got NVelocity working with ASP.NET MVC Preview 5? | I'm guessing I need to implement an NVelocityViewEngine and NVelocityView - but before I do I wanted to check to see if anyone has already done this. I can't see anything in the trunk for MVCContrib. I've already seen the post below - I'm looking specifically for something which works with Preview 5: Testing ScottGu: A... | There's an NVelocity implementation in MvcContrib. You need to reference the MvcContrib.Castle dll. | Has anyone got NVelocity working with ASP.NET MVC Preview 5? I'm guessing I need to implement an NVelocityViewEngine and NVelocityView - but before I do I wanted to check to see if anyone has already done this. I can't see anything in the trunk for MVCContrib. I've already seen the post below - I'm looking specifically... | TITLE:
Has anyone got NVelocity working with ASP.NET MVC Preview 5?
QUESTION:
I'm guessing I need to implement an NVelocityViewEngine and NVelocityView - but before I do I wanted to check to see if anyone has already done this. I can't see anything in the trunk for MVCContrib. I've already seen the post below - I'm lo... | [
"asp.net-mvc",
"nvelocity"
] | 0 | 0 | 538 | 2 | 0 | 2008-09-19T12:32:37.400000 | 2008-09-19T14:07:15.800000 |
101,452 | 101,501 | Can you use the Phoenix compiler as a more powerful NGEN? | In case you don't know of Phoenix, it's a compiler framework from Microsoft that's apparantly going to be the foundation of all their new compilers. It can read in code from CIL, x86, x64, and IA64; and emit code in x86, x64, IA64, or CIL. Can I use it to transform a pure.Net app into a pure native app? By which I mean... | Without knowing too much about Phoenix, in order to have a.NET app run natively you're going to also need a native version of the framework, unless you don't use the framework (which is pretty much impossible). Also the CLR includes garbage collection, assembly loading, etc, so dumping the interpreting part of the CLR ... | Can you use the Phoenix compiler as a more powerful NGEN? In case you don't know of Phoenix, it's a compiler framework from Microsoft that's apparantly going to be the foundation of all their new compilers. It can read in code from CIL, x86, x64, and IA64; and emit code in x86, x64, IA64, or CIL. Can I use it to transf... | TITLE:
Can you use the Phoenix compiler as a more powerful NGEN?
QUESTION:
In case you don't know of Phoenix, it's a compiler framework from Microsoft that's apparantly going to be the foundation of all their new compilers. It can read in code from CIL, x86, x64, and IA64; and emit code in x86, x64, IA64, or CIL. Can ... | [
".net",
"compiler-construction",
"native",
"ngen"
] | 2 | 5 | 638 | 1 | 0 | 2008-09-19T12:32:54.280000 | 2008-09-19T12:38:47.837000 |
101,460 | 101,483 | Is there a way to prevent google search terms from matching urls? | At the moment, I am doing a number of searches which include "html" in them, for example "html rearrange". Unfortunately, I get a lot of hits from sites that include "rearrange" on a.html page but have no mention of html in the page itself. Is there a way to prevent search terms from matching urls? | try something like "html rearrange -inurl:html" the inurl means "match the following pattern in the URL", the - means to exclude those pages | Is there a way to prevent google search terms from matching urls? At the moment, I am doing a number of searches which include "html" in them, for example "html rearrange". Unfortunately, I get a lot of hits from sites that include "rearrange" on a.html page but have no mention of html in the page itself. Is there a wa... | TITLE:
Is there a way to prevent google search terms from matching urls?
QUESTION:
At the moment, I am doing a number of searches which include "html" in them, for example "html rearrange". Unfortunately, I get a lot of hits from sites that include "rearrange" on a.html page but have no mention of html in the page its... | [
"google-search"
] | 0 | 3 | 217 | 3 | 0 | 2008-09-19T12:33:45.713000 | 2008-09-19T12:36:35.877000 |
101,463 | 101,509 | How to change schema name of a table in all stored procedures | I know how to change the schema of a table in SQL server 2005: ALTER SCHEMA NewSchama TRANSFER dbo.Table1 But how can i check and/or alter stored procedures that use the old schema name? Sorry: I mean: There are stored procedures that have the old schema name of the table in the sql of the stored procedure... How can i... | Get a list of dependent objects by right-clicking on the table before you change the schema and then look at what is dependent on the table, make a list and then change those. There is, however, always a possibility that you'll miss something because it is possible to break the dependencies SQL server tracks. But the b... | How to change schema name of a table in all stored procedures I know how to change the schema of a table in SQL server 2005: ALTER SCHEMA NewSchama TRANSFER dbo.Table1 But how can i check and/or alter stored procedures that use the old schema name? Sorry: I mean: There are stored procedures that have the old schema nam... | TITLE:
How to change schema name of a table in all stored procedures
QUESTION:
I know how to change the schema of a table in SQL server 2005: ALTER SCHEMA NewSchama TRANSFER dbo.Table1 But how can i check and/or alter stored procedures that use the old schema name? Sorry: I mean: There are stored procedures that have ... | [
"sql-server",
"stored-procedures"
] | 5 | 0 | 19,749 | 4 | 0 | 2008-09-19T12:34:05.867000 | 2008-09-19T12:40:08.817000 |
101,487 | 101,504 | Is it correct to use the backtick / comma idiom inside a (loop ...)? | I have some code which collects points (consed integers) from a loop which looks something like this: (loop for x from 1 to 100 for y from 100 downto 1 collect `(,x.,y)) My question is, is it correct to use `(,x.,y) in this situation? Edit: This sample is not about generating a table of 100x100 items, the code here jus... | It would be much 'better' to just do (cons x y). But to answer the question, there is nothing wrong with doing that:) (except making it a tad slower). | Is it correct to use the backtick / comma idiom inside a (loop ...)? I have some code which collects points (consed integers) from a loop which looks something like this: (loop for x from 1 to 100 for y from 100 downto 1 collect `(,x.,y)) My question is, is it correct to use `(,x.,y) in this situation? Edit: This sampl... | TITLE:
Is it correct to use the backtick / comma idiom inside a (loop ...)?
QUESTION:
I have some code which collects points (consed integers) from a loop which looks something like this: (loop for x from 1 to 100 for y from 100 downto 1 collect `(,x.,y)) My question is, is it correct to use `(,x.,y) in this situation... | [
"lisp",
"iteration"
] | 1 | 7 | 886 | 4 | 0 | 2008-09-19T12:37:05.143000 | 2008-09-19T12:39:30.473000 |
101,532 | 101,953 | How to catch all exceptions in Flex? | When I run a Flex application in the debug flash player I get an exception pop up as soon as something unexpected happened. However when a customer uses the application he does not use the debug flash player. In this case he does not get an exception pop up, but he UI is not working. So for supportability reasons, I wo... | There is no way to be notified on uncaught exceptions in Flex 3. Adobe are aware of the problem but I don't know if they plan on creating a workaround. The only solution as it stands is to put try/catch in logical places and make sure you are listening to the ERROR (or FAULT for webservices) event for anything that dis... | How to catch all exceptions in Flex? When I run a Flex application in the debug flash player I get an exception pop up as soon as something unexpected happened. However when a customer uses the application he does not use the debug flash player. In this case he does not get an exception pop up, but he UI is not working... | TITLE:
How to catch all exceptions in Flex?
QUESTION:
When I run a Flex application in the debug flash player I get an exception pop up as soon as something unexpected happened. However when a customer uses the application he does not use the debug flash player. In this case he does not get an exception pop up, but he... | [
"apache-flex",
"exception",
"error-handling"
] | 43 | 52 | 31,852 | 9 | 0 | 2008-09-19T12:43:59.137000 | 2008-09-19T13:49:01.197000 |
101,533 | 101,598 | Serializing DateTime to time without milliseconds and gmt | I have created a C# class file by using a XSD-file as an input. One of my properties look like this: private System.DateTime timeField;
[System.Xml.Serialization.XmlElementAttribute(DataType="time")] public System.DateTime Time { get { return this.timeField; } set { this.timeField = value; } } When serialized, the con... | You could create a string property that does the translation to/from your timeField field and put the serialization attribute on that instead the the real DateTime property that the rest of the application uses. | Serializing DateTime to time without milliseconds and gmt I have created a C# class file by using a XSD-file as an input. One of my properties look like this: private System.DateTime timeField;
[System.Xml.Serialization.XmlElementAttribute(DataType="time")] public System.DateTime Time { get { return this.timeField; } ... | TITLE:
Serializing DateTime to time without milliseconds and gmt
QUESTION:
I have created a C# class file by using a XSD-file as an input. One of my properties look like this: private System.DateTime timeField;
[System.Xml.Serialization.XmlElementAttribute(DataType="time")] public System.DateTime Time { get { return ... | [
".net",
"time",
"xml-serialization",
"attributes"
] | 12 | 14 | 19,023 | 2 | 0 | 2008-09-19T12:44:18.887000 | 2008-09-19T12:52:10.130000 |
101,536 | 101,554 | Best Javascript drop-down menu? | I am looking for a drop-down JavaScript menu. It should be the simplest and most elegant accessible menu that works in IE6 and Firefox 2 also. It would be fine if it worked on an unnumbered list ( ul ) so the user can use the page without JavaScript support. Which one do you recommend and where can I find the code to s... | I think the jquery superfish menu is fantastic and easy to use: http://users.tpg.com.au/j_birch/plugins/superfish/ Javascript is not required, and it is based on simple valid ul unorder lists. | Best Javascript drop-down menu? I am looking for a drop-down JavaScript menu. It should be the simplest and most elegant accessible menu that works in IE6 and Firefox 2 also. It would be fine if it worked on an unnumbered list ( ul ) so the user can use the page without JavaScript support. Which one do you recommend an... | TITLE:
Best Javascript drop-down menu?
QUESTION:
I am looking for a drop-down JavaScript menu. It should be the simplest and most elegant accessible menu that works in IE6 and Firefox 2 also. It would be fine if it worked on an unnumbered list ( ul ) so the user can use the page without JavaScript support. Which one d... | [
"javascript",
"menu",
"dhtml"
] | 16 | 12 | 14,900 | 7 | 0 | 2008-09-19T12:44:39.353000 | 2008-09-19T12:46:19.503000 |
101,538 | 101,576 | What does a "WARNING: did not see LOP_CKPT_END" message mean on SQL Server 2005? | The above error message comes up just before SQL Server marks the database as "Suspect" and refuses to open it. Does anyone know what the message means and how to fix it? I think it's a matter of grabbing the backup, but would be nice if it was possible to recover the data. I've had a look at the kb article but there a... | It appears that it means your distributed transaction coordinator failed to start correctly when bringing the SQL Server online. please refer to this ASP.NET forum post and knowledge base article Depending on the level of logging, you should be able to take the last known backup and slowly recover the logs using point ... | What does a "WARNING: did not see LOP_CKPT_END" message mean on SQL Server 2005? The above error message comes up just before SQL Server marks the database as "Suspect" and refuses to open it. Does anyone know what the message means and how to fix it? I think it's a matter of grabbing the backup, but would be nice if i... | TITLE:
What does a "WARNING: did not see LOP_CKPT_END" message mean on SQL Server 2005?
QUESTION:
The above error message comes up just before SQL Server marks the database as "Suspect" and refuses to open it. Does anyone know what the message means and how to fix it? I think it's a matter of grabbing the backup, but ... | [
"sql",
"sql-server",
"database"
] | 2 | 1 | 4,302 | 2 | 0 | 2008-09-19T12:44:42.660000 | 2008-09-19T12:48:09.407000 |
101,540 | 101,563 | Prototype get by tag function | How do I get an element or element list by it's tag name. Take for example that I want all elements from. | document.getElementsByTagName('a') returns an array. Look here for more information: http://web.archive.org/web/20120511135043/https://developer.mozilla.org/en/DOM/element.getElementsByTagName Amendment: If you want a real array, you should use something like Array.from(document.getElementsByTagName('a')), or these day... | Prototype get by tag function How do I get an element or element list by it's tag name. Take for example that I want all elements from. | TITLE:
Prototype get by tag function
QUESTION:
How do I get an element or element list by it's tag name. Take for example that I want all elements from.
ANSWER:
document.getElementsByTagName('a') returns an array. Look here for more information: http://web.archive.org/web/20120511135043... | [
"javascript",
"prototypejs"
] | 1 | 6 | 8,861 | 5 | 0 | 2008-09-19T12:45:02.427000 | 2008-09-19T12:47:08.550000 |
101,556 | 101,618 | Quickest way to get ical email attachment into Google Calendar | I'm running Thunderbird on Windows. I often receive.ics (iCal) attachments - invitations to meetings. Currently I save the attachment to my desktop, open Google Calendar, choose 'Add>Import Calendar', browse to the.ics file, and return to the calendar. Is there any tool that can speed this up... e.g. I forward the emai... | Lightning gives you a plug-in way for Thunderbird to sync with Google Calendar, works both directions. I've used it without any issues, hopefully it will do what you're after. | Quickest way to get ical email attachment into Google Calendar I'm running Thunderbird on Windows. I often receive.ics (iCal) attachments - invitations to meetings. Currently I save the attachment to my desktop, open Google Calendar, choose 'Add>Import Calendar', browse to the.ics file, and return to the calendar. Is t... | TITLE:
Quickest way to get ical email attachment into Google Calendar
QUESTION:
I'm running Thunderbird on Windows. I often receive.ics (iCal) attachments - invitations to meetings. Currently I save the attachment to my desktop, open Google Calendar, choose 'Add>Import Calendar', browse to the.ics file, and return to ... | [
"email",
"google-calendar-api",
"icalendar"
] | 3 | 3 | 2,978 | 2 | 0 | 2008-09-19T12:46:29.707000 | 2008-09-19T12:55:13.930000 |
101,574 | 101,660 | How to open an external file from HTML | I want a list of hyperlinks on a basic html page, which point to files on our corporate intranet. When a user clicks the link, I want the file to open. They are excel spreadsheets, and this is an intranet environment, so I can count on everyone having Excel installed. I've tried two things: The obvious and simple thing... | Try formatting the link like this (looks hellish, but it works in Firefox 3 under Vista for me): file.ext | How to open an external file from HTML I want a list of hyperlinks on a basic html page, which point to files on our corporate intranet. When a user clicks the link, I want the file to open. They are excel spreadsheets, and this is an intranet environment, so I can count on everyone having Excel installed. I've tried t... | TITLE:
How to open an external file from HTML
QUESTION:
I want a list of hyperlinks on a basic html page, which point to files on our corporate intranet. When a user clicks the link, I want the file to open. They are excel spreadsheets, and this is an intranet environment, so I can count on everyone having Excel insta... | [
"html"
] | 20 | 17 | 221,420 | 9 | 0 | 2008-09-19T12:47:52.263000 | 2008-09-19T13:03:03.363000 |
101,579 | 101,788 | When do you use a JSP and when a Servlet? | I have an application that sends the customer to another site to handle the payments. The other site, outside of the customer, calls a page on our server to let us know what the status is of the payment. The called page checks the parameters that are given by the payment application and checks to see whether the transa... | A JSP is compiled to a servlet the first time it is run. That means that there's no real runtime difference between them. However, most have a tradition to use servlets for controllers and JSPs for views. Since controllers are just java classes you can get full tool support (code completion etc.) from all IDEs. That gi... | When do you use a JSP and when a Servlet? I have an application that sends the customer to another site to handle the payments. The other site, outside of the customer, calls a page on our server to let us know what the status is of the payment. The called page checks the parameters that are given by the payment applic... | TITLE:
When do you use a JSP and when a Servlet?
QUESTION:
I have an application that sends the customer to another site to handle the payments. The other site, outside of the customer, calls a page on our server to let us know what the status is of the payment. The called page checks the parameters that are given by ... | [
"java",
"jsp",
"servlets"
] | 40 | 31 | 68,977 | 13 | 0 | 2008-09-19T12:48:30.857000 | 2008-09-19T13:26:56.317000 |
101,647 | 101,676 | How to schedule a task to run when shutting down windows | How do you schedule a task in Windows XP to run when you shut down windows. Such that I want to run a simple command line program I wrote in c# everytime I shut down windows. There doesn't seem to be an option in scheduled tasks to perform this task when my computer shuts down. | Execute gpedit.msc (local Policies) Computer Configuration -> Windows settings -> Scripts -> Shutdown -> Properties -> Add | How to schedule a task to run when shutting down windows How do you schedule a task in Windows XP to run when you shut down windows. Such that I want to run a simple command line program I wrote in c# everytime I shut down windows. There doesn't seem to be an option in scheduled tasks to perform this task when my compu... | TITLE:
How to schedule a task to run when shutting down windows
QUESTION:
How do you schedule a task in Windows XP to run when you shut down windows. Such that I want to run a simple command line program I wrote in c# everytime I shut down windows. There doesn't seem to be an option in scheduled tasks to perform this ... | [
"windows",
"windows-xp"
] | 96 | 106 | 176,476 | 12 | 0 | 2008-09-19T13:00:41.497000 | 2008-09-19T13:05:54.963000 |
101,662 | 101,684 | What HTTP header to use for setting form field names (multipart/form-data) | I'm passing raw HTTP requests to an apache server (received by PHP). The request is of type multipart/form-data, i.e. the same MIME type used when submitting HTML forms. However, I'm not sure what HTTP header to use for setting the form field name (I'm just assuming it's a header defining this, don't know what else it ... | The Content-Disposition header has a name argument that has the control name. There should be one after each --sub_boundary --sub_boundary Content-Disposition: form-data; name="mycontrol" I almost forgot: If the field is a file control, there's also a filename field and a Content-Type header --sub_boundary Content-Disp... | What HTTP header to use for setting form field names (multipart/form-data) I'm passing raw HTTP requests to an apache server (received by PHP). The request is of type multipart/form-data, i.e. the same MIME type used when submitting HTML forms. However, I'm not sure what HTTP header to use for setting the form field na... | TITLE:
What HTTP header to use for setting form field names (multipart/form-data)
QUESTION:
I'm passing raw HTTP requests to an apache server (received by PHP). The request is of type multipart/form-data, i.e. the same MIME type used when submitting HTML forms. However, I'm not sure what HTTP header to use for setting... | [
"php",
"http",
"multipartform-data"
] | 1 | 4 | 5,877 | 1 | 0 | 2008-09-19T13:03:26.483000 | 2008-09-19T13:06:59.783000 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.