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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
73,168 | 73,216 | Saving HTML tables to a Database | I am trying to scrape an html table and save its data in a database. What strategies/solutions have you found to be helpful in approaching this program. I'm most comfortable with Java and PHP but really a solution in any language would be helpful. EDIT: For more detail, the UTA (Salt Lake's Bus system) provides bus sch... | It all depends on how properly your HTML to scrape is? If it's valid XHTML, you can simply use some XPath queries on it to get whatever you want. Example of xpath in php: http://blogoscoped.com/archive/2004_06_23_index.html#108802750834787821 A helper class to scrape a table into an array: http://www.tgreer.com/class_h... | Saving HTML tables to a Database I am trying to scrape an html table and save its data in a database. What strategies/solutions have you found to be helpful in approaching this program. I'm most comfortable with Java and PHP but really a solution in any language would be helpful. EDIT: For more detail, the UTA (Salt La... | TITLE:
Saving HTML tables to a Database
QUESTION:
I am trying to scrape an html table and save its data in a database. What strategies/solutions have you found to be helpful in approaching this program. I'm most comfortable with Java and PHP but really a solution in any language would be helpful. EDIT: For more detail... | [
"html",
"screen-scraping"
] | 3 | 3 | 4,460 | 8 | 0 | 2008-09-16T14:50:50.690000 | 2008-09-16T14:54:08.687000 |
73,187 | 75,027 | How do I create a custom font for a blackberry application | I want to use a specific foreign language font for a Blackberry application. How is such a font created and loaded onto the Blackberry device? For example: ਪੰਜਾਬੀ | A quick google search shows that the same thing has been asked at blackberry forums. The solution they came up with is a class for loading the font from a fnt file. There are programs available to import and edit fnt files. | How do I create a custom font for a blackberry application I want to use a specific foreign language font for a Blackberry application. How is such a font created and loaded onto the Blackberry device? For example: ਪੰਜਾਬੀ | TITLE:
How do I create a custom font for a blackberry application
QUESTION:
I want to use a specific foreign language font for a Blackberry application. How is such a font created and loaded onto the Blackberry device? For example: ਪੰਜਾਬੀ
ANSWER:
A quick google search shows that the same thing has been asked at black... | [
"user-interface",
"blackberry",
"fonts"
] | 3 | 1 | 2,500 | 2 | 0 | 2008-09-16T14:52:14.823000 | 2008-09-16T17:50:12.243000 |
73,198 | 73,976 | When using Linq to SQL with stored procedures, must char(1) columns be returned as c# chars? | When using Linq to SQL and stored procedures, the class generated to describe the proc's result set uses char properties to represent char(1) columns in the SQL proc. I'd rather these be strings - is there any easy way to make this happen? | You could modify the {database}.designer.cs file. I don't have one handy to check, but I believe it's fairly straight forward --- you'll just have to plow through a lot of code, and remember to re-apply the change if you ever regenerate it. Alternately, you could create your own class and handle it in the select. For e... | When using Linq to SQL with stored procedures, must char(1) columns be returned as c# chars? When using Linq to SQL and stored procedures, the class generated to describe the proc's result set uses char properties to represent char(1) columns in the SQL proc. I'd rather these be strings - is there any easy way to make ... | TITLE:
When using Linq to SQL with stored procedures, must char(1) columns be returned as c# chars?
QUESTION:
When using Linq to SQL and stored procedures, the class generated to describe the proc's result set uses char properties to represent char(1) columns in the SQL proc. I'd rather these be strings - is there any... | [
"c#",
".net",
"visual-studio",
"linq-to-sql"
] | 1 | 3 | 829 | 4 | 0 | 2008-09-16T14:52:44.353000 | 2008-09-16T16:04:22.043000 |
73,212 | 73,311 | How can I exclude the bin folder from sourcesafe in a Visual Studio 2008 web application? | How can I exclude the bin folder from SourceSafe in a Visual Studio 2008 web application? I want to be able to check in everything recursively from the solution node without picking up anything in the bin folder. | Right-click the folder in your project select "Exclude from project" | How can I exclude the bin folder from sourcesafe in a Visual Studio 2008 web application? How can I exclude the bin folder from SourceSafe in a Visual Studio 2008 web application? I want to be able to check in everything recursively from the solution node without picking up anything in the bin folder. | TITLE:
How can I exclude the bin folder from sourcesafe in a Visual Studio 2008 web application?
QUESTION:
How can I exclude the bin folder from SourceSafe in a Visual Studio 2008 web application? I want to be able to check in everything recursively from the solution node without picking up anything in the bin folder.... | [
"visual-studio-2008",
"web-applications",
"visual-sourcesafe"
] | 2 | 2 | 3,994 | 3 | 0 | 2008-09-16T14:53:55.007000 | 2008-09-16T15:02:04.470000 |
73,227 | 73,819 | What is the difference between lambdas and delegates in the .NET Framework? | I get asked this question a lot and I thought I'd solicit some input on how to best describe the difference. | They are actually two very different things. "Delegate" is actually the name for a variable that holds a reference to a method or a lambda, and a lambda is a method without a permanent name. Lambdas are very much like other methods, except for a couple subtle differences. A normal method is defined in a "statement" and... | What is the difference between lambdas and delegates in the .NET Framework? I get asked this question a lot and I thought I'd solicit some input on how to best describe the difference. | TITLE:
What is the difference between lambdas and delegates in the .NET Framework?
QUESTION:
I get asked this question a lot and I thought I'd solicit some input on how to best describe the difference.
ANSWER:
They are actually two very different things. "Delegate" is actually the name for a variable that holds a ref... | [
"c#",
".net",
"lambda"
] | 112 | 121 | 39,975 | 18 | 0 | 2008-09-16T14:55:05.500000 | 2008-09-16T15:50:00.690000 |
73,230 | 73,283 | Firefox, saved passwords, and the change password dialogue | If a user saves the password on the login form, ff3 is putting the saved password in the change password dialoge on the profile page, even though its not the same input name as the login. how can I prevent this? | Try using autocomplete="off" as an attribute of the text box. I've used it in the past to stop credit card details being stored by the browser but i dont know if it works with passwords. e.g. print(" "); | Firefox, saved passwords, and the change password dialogue If a user saves the password on the login form, ff3 is putting the saved password in the change password dialoge on the profile page, even though its not the same input name as the login. how can I prevent this? | TITLE:
Firefox, saved passwords, and the change password dialogue
QUESTION:
If a user saves the password on the login form, ff3 is putting the saved password in the change password dialoge on the profile page, even though its not the same input name as the login. how can I prevent this?
ANSWER:
Try using autocomplete... | [
"html",
"firefox"
] | 3 | 2 | 3,886 | 4 | 0 | 2008-09-16T14:55:10.290000 | 2008-09-16T14:59:40.263000 |
73,261 | 74,950 | Best practice for passing parameters in Microsoft Visual Studio Tools for Office (VSTO) 3 (C#) | Many of the parameters for interacting with the Office Object model in VSTO require object parameters that are passed by reference, even when the notional type of the parameter is an int or string. I suppose that this mechanism is used so that code can modify the parameter, although I can't figure out why these need to... | I think it was just poor design of the original Word object model. I know that passing strings by reference can be slightly faster in the COM world because it avoids the need to make a copy, so perhaps that was part of the justification. But the downside is that the callee can modify the value, and in most cases with W... | Best practice for passing parameters in Microsoft Visual Studio Tools for Office (VSTO) 3 (C#) Many of the parameters for interacting with the Office Object model in VSTO require object parameters that are passed by reference, even when the notional type of the parameter is an int or string. I suppose that this mechani... | TITLE:
Best practice for passing parameters in Microsoft Visual Studio Tools for Office (VSTO) 3 (C#)
QUESTION:
Many of the parameters for interacting with the Office Object model in VSTO require object parameters that are passed by reference, even when the notional type of the parameter is an int or string. I suppose... | [
"c#",
"visual-studio-2008",
"vsto",
"officedev"
] | 1 | 0 | 2,240 | 4 | 0 | 2008-09-16T14:57:38.087000 | 2008-09-16T17:41:56.490000 |
73,305 | 73,410 | How do we create an installer than doesn't require administrator permissions? | When creating a setup/MSI with Visual Studio is it possible to make a setup for a simple application that doesn't require administrator permissions to install? If its not possible under Windows XP is it possible under Vista? For example a simple image manipulation application that allows you to paste photos on top of b... | ClickOnce is a good solution to this problem. If you go to Project Properties > Publish, you can setup settings for this. In particular, "Install Mode and Settings" is good to look at: The application is available online only -- this is effectively a "run once" application The application is avaiable offline as well (l... | How do we create an installer than doesn't require administrator permissions? When creating a setup/MSI with Visual Studio is it possible to make a setup for a simple application that doesn't require administrator permissions to install? If its not possible under Windows XP is it possible under Vista? For example a sim... | TITLE:
How do we create an installer than doesn't require administrator permissions?
QUESTION:
When creating a setup/MSI with Visual Studio is it possible to make a setup for a simple application that doesn't require administrator permissions to install? If its not possible under Windows XP is it possible under Vista?... | [
"installation",
"windows-xp",
"windows-vista",
"administrator"
] | 7 | 4 | 5,513 | 4 | 0 | 2008-09-16T15:01:33.067000 | 2008-09-16T15:13:01.963000 |
73,308 | 73,374 | True timeout on LWP::UserAgent request method | I am trying to implement a request to an unreliable server. The request is a nice to have, but not 100% required for my perl script to successfully complete. The problem is that the server will occasionally deadlock (we're trying to figure out why) and the request will never succeed. Since the server thinks it is live,... | You might try LWPx::ParanoidAgent, a subclass of LWP::UserAgent which is more cautious about how it interacts with remote webservers. Among other things, it allows you to specify a global timeout. It was developed by Brad Fitzpatrick as part of the LiveJournal project. | True timeout on LWP::UserAgent request method I am trying to implement a request to an unreliable server. The request is a nice to have, but not 100% required for my perl script to successfully complete. The problem is that the server will occasionally deadlock (we're trying to figure out why) and the request will neve... | TITLE:
True timeout on LWP::UserAgent request method
QUESTION:
I am trying to implement a request to an unreliable server. The request is a nice to have, but not 100% required for my perl script to successfully complete. The problem is that the server will occasionally deadlock (we're trying to figure out why) and the... | [
"perl",
"timeout",
"signals",
"lwp"
] | 12 | 12 | 17,667 | 4 | 0 | 2008-09-16T15:01:45.593000 | 2008-09-16T15:08:17.590000 |
73,312 | 258,673 | How you disable the processor cache on a PowerPC processor? | In our embedded system (using a PowerPC processor), we want to disable the processor cache. What steps do we need to take? To clarify a bit, the application in question must have as constant a speed of execution as we can make it. Variability in executing the same code path is not acceptable. This is the reason to turn... | I'm kind of late to the question, and also it's been a while since I did all the low-level processor init code on PPCs, but I seem to remember the cache & MMU being pretty tightly coupled (one had to be enabled to enable the other) and I think in the MMU page tables, you could define the cacheable attribute. So my poin... | How you disable the processor cache on a PowerPC processor? In our embedded system (using a PowerPC processor), we want to disable the processor cache. What steps do we need to take? To clarify a bit, the application in question must have as constant a speed of execution as we can make it. Variability in executing the ... | TITLE:
How you disable the processor cache on a PowerPC processor?
QUESTION:
In our embedded system (using a PowerPC processor), we want to disable the processor cache. What steps do we need to take? To clarify a bit, the application in question must have as constant a speed of execution as we can make it. Variability... | [
"embedded",
"processor",
"powerpc"
] | 1 | 4 | 4,492 | 5 | 0 | 2008-09-16T15:02:23.143000 | 2008-11-03T13:55:10.897000 |
73,313 | 75,659 | SQLGetData issues using C++ and SQL Native Client | I have a C++ application that uses SQL Native Client to connect to a MS SQL Server 2000. I am trying to retrieve a result from a TEXT column containing more data than the buffer initially allocated to it provides. To clarify my issue, I'll outline what I'm doing (code below): allocate buffer of 1024 bytes use bind buff... | Try to put SQLBindCol after SQLExecDirect. For TEXT column use retcode = SQLBindCol( StatementHandle, 1, SQL_C_CHAR, (SQLPOINTER) NULL, (SQLINTEGER) SQL_DATA_AT_EXEC, &length ); in this way you can repeat SQLGetData to read entire TEXT data in multiple pieces | SQLGetData issues using C++ and SQL Native Client I have a C++ application that uses SQL Native Client to connect to a MS SQL Server 2000. I am trying to retrieve a result from a TEXT column containing more data than the buffer initially allocated to it provides. To clarify my issue, I'll outline what I'm doing (code b... | TITLE:
SQLGetData issues using C++ and SQL Native Client
QUESTION:
I have a C++ application that uses SQL Native Client to connect to a MS SQL Server 2000. I am trying to retrieve a result from a TEXT column containing more data than the buffer initially allocated to it provides. To clarify my issue, I'll outline what... | [
"c++",
"sql-server",
"sqlncli"
] | 4 | 3 | 9,449 | 1 | 0 | 2008-09-16T15:02:24.627000 | 2008-09-16T18:50:46.153000 |
73,319 | 73,357 | How to duplicate a whole line in Vim? | How do I duplicate a whole line in Vim in a similar way to Ctrl + D in IntelliJ IDEA/ Resharper or Ctrl + Alt + ↑ / ↓ in Eclipse? | y y or Y to copy the line (mnemonic: y ank ) or d d to d elete the line (Vim copies what you deleted into a clipboard-like "register", like a cut operation) then p to p aste the copied or deleted text after the current line or Shift + P to p aste the copied or deleted text before the current line | How to duplicate a whole line in Vim? How do I duplicate a whole line in Vim in a similar way to Ctrl + D in IntelliJ IDEA/ Resharper or Ctrl + Alt + ↑ / ↓ in Eclipse? | TITLE:
How to duplicate a whole line in Vim?
QUESTION:
How do I duplicate a whole line in Vim in a similar way to Ctrl + D in IntelliJ IDEA/ Resharper or Ctrl + Alt + ↑ / ↓ in Eclipse?
ANSWER:
y y or Y to copy the line (mnemonic: y ank ) or d d to d elete the line (Vim copies what you deleted into a clipboard-like "r... | [
"vim",
"editor",
"keyboard-shortcuts",
"vi"
] | 2,016 | 3,340 | 948,862 | 22 | 0 | 2008-09-16T15:02:52.923000 | 2008-09-16T15:06:46.393000 |
73,335 | 73,371 | How can I save some JavaScript state information back to my server onUnload? | I have an ExtJS grid on a web page and I'd like to save some of its state information back to the server when the users leaves the page. Can I do this with an Ajax request onUnload? If not, what's a better solution? | You can use an Ajax request, but be sure to make it a synchronous request rather than an asychronous one. Alternatively, simply save state whenever the user makes a change, this also protects the data if the user's browser crashes. | How can I save some JavaScript state information back to my server onUnload? I have an ExtJS grid on a web page and I'd like to save some of its state information back to the server when the users leaves the page. Can I do this with an Ajax request onUnload? If not, what's a better solution? | TITLE:
How can I save some JavaScript state information back to my server onUnload?
QUESTION:
I have an ExtJS grid on a web page and I'd like to save some of its state information back to the server when the users leaves the page. Can I do this with an Ajax request onUnload? If not, what's a better solution?
ANSWER:
... | [
"javascript",
"ajax",
"extjs"
] | 1 | 2 | 2,263 | 4 | 0 | 2008-09-16T15:04:38.817000 | 2008-09-16T15:07:52.680000 |
73,359 | 73,770 | .NET Introspection VS Reflection | What is the difference between Introspection and Reflection in.NET | Introspection was introduced with FxCop in 2004 as an alternative to Reflection: What's new in FxCop 1.30 is that it now performs analysis through a technique called Introspection. The use of the Introspection engine allows for much faster analysis and supports multithreaded analysis. Unlike the Reflection engine from ... | .NET Introspection VS Reflection What is the difference between Introspection and Reflection in.NET | TITLE:
.NET Introspection VS Reflection
QUESTION:
What is the difference between Introspection and Reflection in.NET
ANSWER:
Introspection was introduced with FxCop in 2004 as an alternative to Reflection: What's new in FxCop 1.30 is that it now performs analysis through a technique called Introspection. The use of t... | [
".net",
"reflection",
"introspection"
] | 5 | 7 | 4,893 | 2 | 0 | 2008-09-16T15:06:58.577000 | 2008-09-16T15:45:26.737000 |
73,385 | 73,394 | asp.net Convert CSV string to string[] | Is there an easy way to convert a string from csv format into a string[] or list? I can guarantee that there are no commas in the data. | string[] splitString = origString.Split(','); (Following comment not added by original answerer) Please keep in mind that this answer addresses the SPECIFIC case where there are guaranteed to be NO commas in the data. | asp.net Convert CSV string to string[] Is there an easy way to convert a string from csv format into a string[] or list? I can guarantee that there are no commas in the data. | TITLE:
asp.net Convert CSV string to string[]
QUESTION:
Is there an easy way to convert a string from csv format into a string[] or list? I can guarantee that there are no commas in the data.
ANSWER:
string[] splitString = origString.Split(','); (Following comment not added by original answerer) Please keep in mind t... | [
"c#",
"string",
"csv"
] | 7 | 2 | 15,154 | 17 | 0 | 2008-09-16T15:10:30.347000 | 2008-09-16T15:11:19.957000 |
73,432 | 73,490 | How can I transfer my domains from my existing registrar/hosting service to something like GoDaddy? | Will I have to pay again? I have about 9 months left before renewal but my current provider doesn't offer many options / control panels. Update: thanks for everyone's help - I've finally completed this now. I had to: Ask my old registrar to "Unlock" the domain Ask my old registrar to set the admin email address of the ... | This is how it works Lets say you have 9 more months for your current domain to expire you transfer the domain to GoDaddy (or to any other decent Registrar) you will be charged the price (little more or equal) to the price of booking a new domain BUT, you will have the domain for 9 months + one year (or the no. of year... | How can I transfer my domains from my existing registrar/hosting service to something like GoDaddy? Will I have to pay again? I have about 9 months left before renewal but my current provider doesn't offer many options / control panels. Update: thanks for everyone's help - I've finally completed this now. I had to: Ask... | TITLE:
How can I transfer my domains from my existing registrar/hosting service to something like GoDaddy?
QUESTION:
Will I have to pay again? I have about 9 months left before renewal but my current provider doesn't offer many options / control panels. Update: thanks for everyone's help - I've finally completed this ... | [
"dns"
] | 4 | 2 | 2,223 | 10 | 0 | 2008-09-16T15:15:50.943000 | 2008-09-16T15:21:01.600000 |
73,433 | 115,261 | Does a caching-nameserver usually cache the negative DNS response SERVFAIL | Does a caching-nameserver usually cache the negative DNS response SERVFAIL? EDIT: To clarify the question, I can see the caching nameserver caching negative responses NXDOMAIN, NODATA. But it does not do this for SERVFAIL responses. Is this intentional? | SERVFAIL is covered by §7.1 of RFC2308: Server failures fall into two major classes. The first is where a server can determine that it has been misconfigured for a zone. This may be where it has been listed as a server, but not configured to be a server for the zone, or where it has been configured to be a server for t... | Does a caching-nameserver usually cache the negative DNS response SERVFAIL Does a caching-nameserver usually cache the negative DNS response SERVFAIL? EDIT: To clarify the question, I can see the caching nameserver caching negative responses NXDOMAIN, NODATA. But it does not do this for SERVFAIL responses. Is this inte... | TITLE:
Does a caching-nameserver usually cache the negative DNS response SERVFAIL
QUESTION:
Does a caching-nameserver usually cache the negative DNS response SERVFAIL? EDIT: To clarify the question, I can see the caching nameserver caching negative responses NXDOMAIN, NODATA. But it does not do this for SERVFAIL respo... | [
"dns"
] | 5 | 6 | 5,733 | 3 | 0 | 2008-09-16T15:15:55.997000 | 2008-09-22T14:48:44.287000 |
73,467 | 73,908 | What's the best way to tell if a method is a property from within Policy Injection? | I've got a custom handler applied to a class (using the Policy Injection Application Block in entlib 4) and I would like to know whether the input method is a property when Invoke is called. Following is what my handler looks like. [ConfigurationElementType(typeof(MyCustomHandlerData))] public class MyCustomHandler: IC... | You can also check IsSpecialName is true. this will be true in a property (amongst other things) At the il level the methods are exposed as follows (using Environment.ExitCode as example):.method public hidebysig specialname static int32 get_ExitCode() cil managed.method public hidebysig specialname static void set_Exi... | What's the best way to tell if a method is a property from within Policy Injection? I've got a custom handler applied to a class (using the Policy Injection Application Block in entlib 4) and I would like to know whether the input method is a property when Invoke is called. Following is what my handler looks like. [Con... | TITLE:
What's the best way to tell if a method is a property from within Policy Injection?
QUESTION:
I've got a custom handler applied to a class (using the Policy Injection Application Block in entlib 4) and I would like to know whether the input method is a property when Invoke is called. Following is what my handle... | [
"c#",
"enterprise-library",
"policy-injection"
] | 3 | 5 | 2,813 | 5 | 0 | 2008-09-16T15:18:33.527000 | 2008-09-16T15:58:19.127000 |
73,468 | 83,788 | Non-blocking pthread_join | I'm coding the shutdown of a multithreaded server.If everything goes as it should all the threads exit by their own, but there's a small chance that a thread gets stuck.In this case it would be convenient to have a non-blocking join so I could do. Is there a way of doing a non-blocking pthread_join? Some sort of timed ... | As others have pointed out there is not a non-blocking pthread_join available in the standard pthread libraries. However, given your stated problem (trying to guarantee that all of your threads have exited on program shutdown) such a function is not needed. You can simply do this: int killed_threads = 0; for(i = 0; i <... | Non-blocking pthread_join I'm coding the shutdown of a multithreaded server.If everything goes as it should all the threads exit by their own, but there's a small chance that a thread gets stuck.In this case it would be convenient to have a non-blocking join so I could do. Is there a way of doing a non-blocking pthread... | TITLE:
Non-blocking pthread_join
QUESTION:
I'm coding the shutdown of a multithreaded server.If everything goes as it should all the threads exit by their own, but there's a small chance that a thread gets stuck.In this case it would be convenient to have a non-blocking join so I could do. Is there a way of doing a no... | [
"c",
"multithreading",
"pthreads"
] | 25 | 1 | 41,009 | 8 | 0 | 2008-09-16T15:18:36.490000 | 2008-09-17T14:25:42.147000 |
73,471 | 74,256 | How can I highlight the current cell in a DataGridView when SelectionMode=FullRowSelect | I have an editable DataGridView with SelectionMode set to FullRowSelect (so the whole row is highlighted when the user clicks on any cell). However I would like the cell that currently has focus to be highlighted with a different back color (so the user can clearly see what cell they are about to edit). How can I do th... | I figured out a better way of doing this, using the CellFormatting event: Private Sub uxContacts_CellFormatting(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellFormattingEventArgs) Handles uxContacts.CellFormatting If uxContacts.CurrentCell IsNot Nothing Then If e.RowIndex = uxContacts.CurrentCe... | How can I highlight the current cell in a DataGridView when SelectionMode=FullRowSelect I have an editable DataGridView with SelectionMode set to FullRowSelect (so the whole row is highlighted when the user clicks on any cell). However I would like the cell that currently has focus to be highlighted with a different ba... | TITLE:
How can I highlight the current cell in a DataGridView when SelectionMode=FullRowSelect
QUESTION:
I have an editable DataGridView with SelectionMode set to FullRowSelect (so the whole row is highlighted when the user clicks on any cell). However I would like the cell that currently has focus to be highlighted w... | [
".net",
"vb.net",
"winforms",
"datagridview"
] | 5 | 9 | 12,490 | 4 | 0 | 2008-09-16T15:18:57.987000 | 2008-09-16T16:30:07.100000 |
73,474 | 73,549 | Not able to delete directory | I am having a frequent problems with my web hosting (its shared) I am not able to delete or change permission for a particular directory. The response is, Cannot delete. Directory may not be empty I checked the permissions and it looks OK. There are 100's of files in this folder which I don't want. I contacted my suppo... | You can't rmdir a directory with files in it. You must first rm all files and subdirectories. Many times, the easiest solution is: $ rm -rf old_directory It's entirely possible that some of the files or subdirectories have permission limitations that might prevent them from being removed. Occasionally, this can be solv... | Not able to delete directory I am having a frequent problems with my web hosting (its shared) I am not able to delete or change permission for a particular directory. The response is, Cannot delete. Directory may not be empty I checked the permissions and it looks OK. There are 100's of files in this folder which I don... | TITLE:
Not able to delete directory
QUESTION:
I am having a frequent problems with my web hosting (its shared) I am not able to delete or change permission for a particular directory. The response is, Cannot delete. Directory may not be empty I checked the permissions and it looks OK. There are 100's of files in this ... | [
"linux",
"web-hosting",
"file-permissions"
] | 0 | 4 | 906 | 3 | 0 | 2008-09-16T15:19:28.470000 | 2008-09-16T15:26:04.397000 |
73,476 | 73,483 | How do I encode arbitrary data to XML using Java 1.4 and SAX? | We use SAX to parse XML because it does not require the entire XML document to be read into memory in order to parse a single value. I read many articles that insisted SAX can only be used to parse/decode XML and not create it. Is this true? | No, it isn't true, you can encode XML to any Writer in Java using something similar to: char[] ch; AttributesImpl atts = new AttributesImpl(); Writer writer = new StringWriter(); StreamResult streamResult = new StreamResult(writer); SAXTransformerFactory tf = (SAXTransformerFactory) TransformerFactory.newInstance();
/... | How do I encode arbitrary data to XML using Java 1.4 and SAX? We use SAX to parse XML because it does not require the entire XML document to be read into memory in order to parse a single value. I read many articles that insisted SAX can only be used to parse/decode XML and not create it. Is this true? | TITLE:
How do I encode arbitrary data to XML using Java 1.4 and SAX?
QUESTION:
We use SAX to parse XML because it does not require the entire XML document to be read into memory in order to parse a single value. I read many articles that insisted SAX can only be used to parse/decode XML and not create it. Is this true... | [
"java",
"xml",
"sax"
] | 2 | 4 | 3,161 | 2 | 0 | 2008-09-16T15:19:30.467000 | 2008-09-16T15:20:20.370000 |
73,484 | 75,235 | How to 'bind' Text property of a label in markup | Basically I would like to find a way to ddo something like: I know I could set it from code behind (writing lId.Text = MyProperty), but I'd prefer doing it in the markup and I just can't seem to find the solution. (MyProperty is a string property) cheers | Code expressions are an option as well. These can be used inside of quotes in ASP tags, unlike standard <%= %> tags. The general syntax is: <%$ resources: ResourceKey %> There is a built-in expression for appSettings: <%$ appSettings: AppSettingsKey %> More info on this here: http://weblogs.asp.net/infinitiesloop/archi... | How to 'bind' Text property of a label in markup Basically I would like to find a way to ddo something like: I know I could set it from code behind (writing lId.Text = MyProperty), but I'd prefer doing it in the markup and I just can't seem to find the solution. (MyProperty is a string property) cheers | TITLE:
How to 'bind' Text property of a label in markup
QUESTION:
Basically I would like to find a way to ddo something like: I know I could set it from code behind (writing lId.Text = MyProperty), but I'd prefer doing it in the markup and I just can't seem to find the solution. (MyProperty is a string property) cheer... | [
"c#",
"asp.net"
] | 3 | 10 | 32,608 | 8 | 0 | 2008-09-16T15:20:26.377000 | 2008-09-16T18:08:46.940000 |
73,487 | 253,764 | Where can I get a simple explanation of policy injection? | I'd like a dead simple explanation of policy injection for less-informed co-workers. Where is a good resource for this? I learned about policy injection from the entlib help files, which I'm sure aren't the best option. | The MSDN documentation for Policy Injection has a pretty clear explanation: Applications include a mix of business logic and crosscutting concerns, and the two are typically intermingled—which can make the code harder to read and maintain. Each task or feature of an application is referred to as a "concern." Concerns t... | Where can I get a simple explanation of policy injection? I'd like a dead simple explanation of policy injection for less-informed co-workers. Where is a good resource for this? I learned about policy injection from the entlib help files, which I'm sure aren't the best option. | TITLE:
Where can I get a simple explanation of policy injection?
QUESTION:
I'd like a dead simple explanation of policy injection for less-informed co-workers. Where is a good resource for this? I learned about policy injection from the entlib help files, which I'm sure aren't the best option.
ANSWER:
The MSDN docume... | [
"enterprise-library",
"application-blocks",
"policy-injection"
] | 3 | 2 | 588 | 2 | 0 | 2008-09-16T15:20:45.783000 | 2008-10-31T14:44:04.403000 |
73,491 | 120,938 | Missing aar file in maven2 multi-project build | I'm trying to use maven2 to build an axis2 project. My project is configured as a parent project with AAR, WAR, and EAR modules. When I run the parent project's package goal, the console shows a successful build and all of the files are created. However the AAR file generated by AAR project is not included in the gener... | I was able to get my maven build working correctly by adding the following plugin to the ws-war pom file: org.apache.maven.plugins maven-dependency-plugin process-classes copy-dependencies ${project.build.directory}/${project.build.finalName}/WEB-INF/services ws-aar | Missing aar file in maven2 multi-project build I'm trying to use maven2 to build an axis2 project. My project is configured as a parent project with AAR, WAR, and EAR modules. When I run the parent project's package goal, the console shows a successful build and all of the files are created. However the AAR file genera... | TITLE:
Missing aar file in maven2 multi-project build
QUESTION:
I'm trying to use maven2 to build an axis2 project. My project is configured as a parent project with AAR, WAR, and EAR modules. When I run the parent project's package goal, the console shows a successful build and all of the files are created. However t... | [
"maven-2"
] | 2 | 2 | 5,881 | 2 | 0 | 2008-09-16T15:21:03.940000 | 2008-09-23T13:22:05.267000 |
73,498 | 73,531 | Programmatically select an MFC radio button | When I'm initializing a dialog, I'd like to select one of the radio buttons on the form. I don't see a way to associate a Control variable using the Class Wizard, like you would typically do with CButtons, CComboBoxes, etc... Further, it doesn't like a CRadioButton class even exists. How can I select one of the several... | Radio buttons and check buttons are just buttons. Use a CButton control and use GetCheck / SetCheck. | Programmatically select an MFC radio button When I'm initializing a dialog, I'd like to select one of the radio buttons on the form. I don't see a way to associate a Control variable using the Class Wizard, like you would typically do with CButtons, CComboBoxes, etc... Further, it doesn't like a CRadioButton class even... | TITLE:
Programmatically select an MFC radio button
QUESTION:
When I'm initializing a dialog, I'd like to select one of the radio buttons on the form. I don't see a way to associate a Control variable using the Class Wizard, like you would typically do with CButtons, CComboBoxes, etc... Further, it doesn't like a CRadi... | [
"winapi",
"mfc"
] | 3 | 8 | 28,618 | 5 | 0 | 2008-09-16T15:22:02.287000 | 2008-09-16T15:24:29.720000 |
73,515 | 73,583 | How to tell if .NET code is being run by Visual Studio designer | I am getting some errors thrown in my code when I open a Windows Forms form in Visual Studio's designer. I would like to branch in my code and perform a different initialization if the form is being opened by designer than if it is being run for real. How can I determine at run-time if the code is being executed as par... | To find out if you're in "design mode": Windows Forms components (and controls) have a DesignMode property. Windows Presentation Foundation controls should use the IsInDesignMode attached property. | How to tell if .NET code is being run by Visual Studio designer I am getting some errors thrown in my code when I open a Windows Forms form in Visual Studio's designer. I would like to branch in my code and perform a different initialization if the form is being opened by designer than if it is being run for real. How ... | TITLE:
How to tell if .NET code is being run by Visual Studio designer
QUESTION:
I am getting some errors thrown in my code when I open a Windows Forms form in Visual Studio's designer. I would like to branch in my code and perform a different initialization if the form is being opened by designer than if it is being ... | [
"visual-studio",
"gui-designer"
] | 61 | 52 | 46,784 | 25 | 0 | 2008-09-16T15:23:21.597000 | 2008-09-16T15:28:37.043000 |
73,518 | 73,613 | How do you direct traffic to/from a particular site to a specific NIC? | In Windows XP: How do you direct traffic to/from a particular site to a specific NIC? For Instance: How do I say, all connections to stackoverflow.com should use my wireless connection, while all other sites will use my ethernet? | I'm not sure if there's an easier way, but one way would be to add a route to the IP(s) of stackoverflow.com that explicitly specifies your wireless connection, using a lower metric (cost) than your default route. Running nslookup www.stackoverflow.com shows only one IP: 67.199.15.132, so the syntax would be: route -p ... | How do you direct traffic to/from a particular site to a specific NIC? In Windows XP: How do you direct traffic to/from a particular site to a specific NIC? For Instance: How do I say, all connections to stackoverflow.com should use my wireless connection, while all other sites will use my ethernet? | TITLE:
How do you direct traffic to/from a particular site to a specific NIC?
QUESTION:
In Windows XP: How do you direct traffic to/from a particular site to a specific NIC? For Instance: How do I say, all connections to stackoverflow.com should use my wireless connection, while all other sites will use my ethernet?
... | [
"networking"
] | 1 | 4 | 7,035 | 4 | 0 | 2008-09-16T15:23:43.343000 | 2008-09-16T15:31:00.330000 |
73,524 | 81,551 | How do I convert from a location (address) String to a YGeoPoint in Yahoo Maps API? | I have a list of addresses from a Database for which I'd like to put markers on a Yahoo Map. The addMarker() method on YMap takes a YGeoPoint, which requires a latitude and longitude. However, Yahoo Maps must know how to convert from addresses because drawZoomAndCenter(LocationType,ZoomLevel) can take an address. I cou... | You can ask the map object to do the geoCoding, and catch the callback: One thing to beware of -- in this example the drawAndZoom call will itself make a geoCoding request, so you'll get the callback from that too. You might want to filter that out, or set the map's centre based on a GeoPoint. | How do I convert from a location (address) String to a YGeoPoint in Yahoo Maps API? I have a list of addresses from a Database for which I'd like to put markers on a Yahoo Map. The addMarker() method on YMap takes a YGeoPoint, which requires a latitude and longitude. However, Yahoo Maps must know how to convert from ad... | TITLE:
How do I convert from a location (address) String to a YGeoPoint in Yahoo Maps API?
QUESTION:
I have a list of addresses from a Database for which I'd like to put markers on a Yahoo Map. The addMarker() method on YMap takes a YGeoPoint, which requires a latitude and longitude. However, Yahoo Maps must know how ... | [
"api",
"yahoo-maps"
] | 3 | 1 | 1,020 | 2 | 0 | 2008-09-16T15:24:02.547000 | 2008-09-17T09:47:11.630000 |
73,527 | 73,618 | What's the best option for searching in Ruby on Rails? | There are several plugin options for building a search engine into your Ruby on Rails application. Which of these is the best? Thinking Sphinx UltraSphinx Sphincter acts_as_sphinx acts_as_ferret Ferret acts_as_xapian acts_as_solr Hyper Estraier | Thinking Sphinx has more concise syntax to define which fields and which models are indexed. Both UltraSphinx and Thinking Sphinx (recently) have ultra-cool feature which takes into account geographical proximity of objects. UltraSphinx has annoying problems with how it loads models (it does not load entire Rails stack... | What's the best option for searching in Ruby on Rails? There are several plugin options for building a search engine into your Ruby on Rails application. Which of these is the best? Thinking Sphinx UltraSphinx Sphincter acts_as_sphinx acts_as_ferret Ferret acts_as_xapian acts_as_solr Hyper Estraier | TITLE:
What's the best option for searching in Ruby on Rails?
QUESTION:
There are several plugin options for building a search engine into your Ruby on Rails application. Which of these is the best? Thinking Sphinx UltraSphinx Sphincter acts_as_sphinx acts_as_ferret Ferret acts_as_xapian acts_as_solr Hyper Estraier
A... | [
"ruby-on-rails",
"ruby",
"search"
] | 16 | 17 | 11,830 | 18 | 0 | 2008-09-16T15:24:18.800000 | 2008-09-16T15:31:47.677000 |
73,536 | 73,561 | Are REST request headers encrypted by SSL? | I'm developing a client/server app that will communicate via rest. Some custom request data will be stored in the header of the request. Both the server sending the request and the receiving server have an SSL certificate - will the headers be encrypted, or just the content? | SSL encrypts the entire communications path from the client to the server and back, so yes - the headers will be encrypted. By the way, if you develop networked applications and care about data security, the least you should do is read a book like Practical Cryptography, by Niels Ferguson and Bruce Schneier, and probab... | Are REST request headers encrypted by SSL? I'm developing a client/server app that will communicate via rest. Some custom request data will be stored in the header of the request. Both the server sending the request and the receiving server have an SSL certificate - will the headers be encrypted, or just the content? | TITLE:
Are REST request headers encrypted by SSL?
QUESTION:
I'm developing a client/server app that will communicate via rest. Some custom request data will be stored in the header of the request. Both the server sending the request and the receiving server have an SSL certificate - will the headers be encrypted, or j... | [
"web-services",
"http",
"rest",
"ssl"
] | 47 | 65 | 31,173 | 8 | 0 | 2008-09-16T15:25:03.933000 | 2008-09-16T15:27:02.943000 |
73,542 | 73,563 | IList<T> to IQueryable<T> | I have an List and I'd like to wrap it into an IQueryable. Is this possible? | List list = new List () { 1, 2, 3, 4, }; IQueryable query = list.AsQueryable(); If you don't see the AsQueryable() method, add a using statement for System.Linq. | IList<T> to IQueryable<T> I have an List and I'd like to wrap it into an IQueryable. Is this possible? | TITLE:
IList<T> to IQueryable<T>
QUESTION:
I have an List and I'd like to wrap it into an IQueryable. Is this possible?
ANSWER:
List list = new List () { 1, 2, 3, 4, }; IQueryable query = list.AsQueryable(); If you don't see the AsQueryable() method, add a using statement for System.Linq. | [
"linq-to-objects",
"iqueryable"
] | 77 | 125 | 29,883 | 2 | 0 | 2008-09-16T15:25:35.180000 | 2008-09-16T15:27:14.020000 |
73,576 | 75,632 | Wildcard filename in schema.ini? | Was wondering if there was a way to put a wildcard in the schema.ini for example [*.txt] FMT=TabDelimited I've got an app that is imported tab delimited files and the only place I can seem to get the FMT="TabDelimited" is in the schema.ini (doesn't work in the connection string for some reason), but I will have no idea... | I guess I could potentially rename the file temporarily to match whatever I decide to put in the schema.ini or potentially modify the schema.ini on the fly and put the correct filename in there, but I'd love to do know if there was a better way. | Wildcard filename in schema.ini? Was wondering if there was a way to put a wildcard in the schema.ini for example [*.txt] FMT=TabDelimited I've got an app that is imported tab delimited files and the only place I can seem to get the FMT="TabDelimited" is in the schema.ini (doesn't work in the connection string for some... | TITLE:
Wildcard filename in schema.ini?
QUESTION:
Was wondering if there was a way to put a wildcard in the schema.ini for example [*.txt] FMT=TabDelimited I've got an app that is imported tab delimited files and the only place I can seem to get the FMT="TabDelimited" is in the schema.ini (doesn't work in the connecti... | [
".net"
] | 2 | 1 | 3,574 | 2 | 0 | 2008-09-16T15:27:53.300000 | 2008-09-16T18:46:45.587000 |
73,580 | 73,649 | How do I send an SMTP Message from Java? | Possible Duplicate: How do you send email from a Java app using Gmail? How do I send an SMTP Message from Java? | Here's an example for Gmail smtp: import java.io.*; import java.net.InetAddress; import java.util.Properties; import java.util.Date;
import javax.mail.*;
import javax.mail.internet.*;
import com.sun.mail.smtp.*;
public class Distribution {
public static void main(String args[]) throws Exception { Properties props ... | How do I send an SMTP Message from Java? Possible Duplicate: How do you send email from a Java app using Gmail? How do I send an SMTP Message from Java? | TITLE:
How do I send an SMTP Message from Java?
QUESTION:
Possible Duplicate: How do you send email from a Java app using Gmail? How do I send an SMTP Message from Java?
ANSWER:
Here's an example for Gmail smtp: import java.io.*; import java.net.InetAddress; import java.util.Properties; import java.util.Date;
import... | [
"java",
"smtp"
] | 28 | 37 | 99,792 | 6 | 0 | 2008-09-16T15:28:22.520000 | 2008-09-16T15:34:30.413000 |
73,607 | 77,109 | Premature Redo Log Switching in Oracle RAC | What are the possible causes of premature redo log switching in Oracle other than reaching the specified file size and executing ALTER SYSTEM SWITCH LOGFILE? We have a situation where some (but not all) of our nodes are prematurely switching redo log files before filling up. This happens every 5 - 15 minutes and the si... | This article says that it behaves differently in RAC. In a parallel server environment, the LGWR process in each instance holds a KK instance lock on its own thread. The id2 field identifies the thread number. This lock is used to trigger forced log switches from remote instances. A log switch is forced whenever the cu... | Premature Redo Log Switching in Oracle RAC What are the possible causes of premature redo log switching in Oracle other than reaching the specified file size and executing ALTER SYSTEM SWITCH LOGFILE? We have a situation where some (but not all) of our nodes are prematurely switching redo log files before filling up. T... | TITLE:
Premature Redo Log Switching in Oracle RAC
QUESTION:
What are the possible causes of premature redo log switching in Oracle other than reaching the specified file size and executing ALTER SYSTEM SWITCH LOGFILE? We have a situation where some (but not all) of our nodes are prematurely switching redo log files be... | [
"sql",
"database",
"oracle"
] | 2 | 1 | 1,557 | 1 | 0 | 2008-09-16T15:30:40.283000 | 2008-09-16T21:07:52.733000 |
73,628 | 73,644 | How can I execute Javascript before a JSF <h:commandLink> action is performed? | If you have a JSF (which uses the onclick event of an to submit the current form), how do you execute JavaScript (such as asking for delete confirmation) prior to the action being performed? | Other Javascript actions (like validating form input etc) could be performed by replacing the call to confirm() with a call to another function. | How can I execute Javascript before a JSF <h:commandLink> action is performed? If you have a JSF (which uses the onclick event of an to submit the current form), how do you execute JavaScript (such as asking for delete confirmation) prior to the action being performed? | TITLE:
How can I execute Javascript before a JSF <h:commandLink> action is performed?
QUESTION:
If you have a JSF (which uses the onclick event of an to submit the current form), how do you execute JavaScript (such as asking for delete confirmation) prior to the action being performed?
ANSWER:
Other Javascript action... | [
"javascript",
"jsf"
] | 11 | 7 | 61,238 | 8 | 0 | 2008-09-16T15:32:24.490000 | 2008-09-16T15:33:53.850000 |
73,629 | 73,734 | How can I Trim the leading comma in my string | I have a string that is like below.,liger, unicorn, snipe in other languages I'm familiar with I can just do a string.trim(",") but how can I do that in c#? Thanks. There's been a lot of back and forth about the StartTrim function. As several have pointed out, the StartTrim doesn't affect the primary variable. However,... | string sample = ",liger, unicorn, snipe"; sample = sample.TrimStart(','); // to remove just the first comma Or perhaps: sample = sample.Trim().TrimStart(','); // to remove any whitespace and then the first comma | How can I Trim the leading comma in my string I have a string that is like below.,liger, unicorn, snipe in other languages I'm familiar with I can just do a string.trim(",") but how can I do that in c#? Thanks. There's been a lot of back and forth about the StartTrim function. As several have pointed out, the StartTrim... | TITLE:
How can I Trim the leading comma in my string
QUESTION:
I have a string that is like below.,liger, unicorn, snipe in other languages I'm familiar with I can just do a string.trim(",") but how can I do that in c#? Thanks. There's been a lot of back and forth about the StartTrim function. As several have pointed ... | [
"c#",
".net",
"string",
"trim"
] | 12 | 17 | 32,998 | 17 | 0 | 2008-09-16T15:32:37.360000 | 2008-09-16T15:41:28.260000 |
73,646 | 812,821 | Subversion and Siteminder | Has anyone implements Subversion with Siteminder as authentication provider? If yes, would it be possible to provide an overview of how the whole setup is done? Since I am using only HTTP authentication, I think it would be easier to integrate with SM, but I am not able to find much help on this on the net. Is there an... | SVN with Siteminder has been implemented and is working now. Since there is not much of information out there on this, I would like to post the overview of steps followed: Cookie based authentcation was disabled on Siteminder end HTTP AUTH was enabled (in Siteminder) and all webdav methods were added to policy server t... | Subversion and Siteminder Has anyone implements Subversion with Siteminder as authentication provider? If yes, would it be possible to provide an overview of how the whole setup is done? Since I am using only HTTP authentication, I think it would be easier to integrate with SM, but I am not able to find much help on th... | TITLE:
Subversion and Siteminder
QUESTION:
Has anyone implements Subversion with Siteminder as authentication provider? If yes, would it be possible to provide an overview of how the whole setup is done? Since I am using only HTTP authentication, I think it would be easier to integrate with SM, but I am not able to fi... | [
"svn",
"siteminder"
] | 2 | 3 | 995 | 2 | 0 | 2008-09-16T15:34:07.203000 | 2009-05-01T19:13:53.537000 |
73,663 | 73,673 | How do I terminate a script? | How do I exit a script early, like the die() command in PHP? | import sys sys.exit() details from the sys module documentation: sys. exit ([ arg ]) Exit from Python. This is implemented by raising the SystemExit exception, so cleanup actions specified by finally clauses of try statements are honored, and it is possible to intercept the exit attempt at an outer level. The optional ... | How do I terminate a script? How do I exit a script early, like the die() command in PHP? | TITLE:
How do I terminate a script?
QUESTION:
How do I exit a script early, like the die() command in PHP?
ANSWER:
import sys sys.exit() details from the sys module documentation: sys. exit ([ arg ]) Exit from Python. This is implemented by raising the SystemExit exception, so cleanup actions specified by finally cla... | [
"python",
"termination"
] | 1,408 | 1,806 | 2,083,245 | 14 | 0 | 2008-09-16T15:35:55.637000 | 2008-09-16T15:36:36.680000 |
73,667 | 73,703 | How can I start an interactive console for Perl? | How can I start an interactive console for Perl, similar to the irb command for Ruby or python for Python? | You can use the perl debugger on a trivial program, like so: perl -de1 This command will start the Perl debugger ( -d ) on expression 1 ( -e1 ), because the debugger wants something to debug (usually a file containing Perl code). The command could be written as perl -d -e 1 as well. Alternatively there's Alexis Sukrieh... | How can I start an interactive console for Perl? How can I start an interactive console for Perl, similar to the irb command for Ruby or python for Python? | TITLE:
How can I start an interactive console for Perl?
QUESTION:
How can I start an interactive console for Perl, similar to the irb command for Ruby or python for Python?
ANSWER:
You can use the perl debugger on a trivial program, like so: perl -de1 This command will start the Perl debugger ( -d ) on expression 1 (... | [
"perl",
"console",
"interactive",
"read-eval-print-loop"
] | 315 | 345 | 157,662 | 24 | 0 | 2008-09-16T15:35:59.320000 | 2008-09-16T15:38:53.260000 |
73,674 | 73,719 | Using pictures as buttons? | I talked to a friend of mine and he told me that it's possible to create an image in an image editor (gimp/photoshop) and then use it as a button. He said that's the way applications that have great GUIs do it. He also said that there is a file describing which parts of the image make up the button. Is this possible, o... | This needs to be clarified with a language of choice, etc. In general, most languages (WinForms, Java AWT/SWT, etc) have an image or background image property that allows you to use images for buttons. There are even skinning frameworks that will let you use images for all controls in an easy-to-define manner. If you a... | Using pictures as buttons? I talked to a friend of mine and he told me that it's possible to create an image in an image editor (gimp/photoshop) and then use it as a button. He said that's the way applications that have great GUIs do it. He also said that there is a file describing which parts of the image make up the ... | TITLE:
Using pictures as buttons?
QUESTION:
I talked to a friend of mine and he told me that it's possible to create an image in an image editor (gimp/photoshop) and then use it as a button. He said that's the way applications that have great GUIs do it. He also said that there is a file describing which parts of the ... | [
"user-interface"
] | 0 | 3 | 612 | 7 | 0 | 2008-09-16T15:36:37.383000 | 2008-09-16T15:39:52.447000 |
73,684 | 73,869 | Companies doing Domain driven design | I've just finished reading Domain Driven Design and I'm enchanted with some of the ideas covered in it. Do you know any companies that implement ubiquitous language in their projects? | The Domain Driven Design Yahoo Group may be a better place to find an answer to your question. | Companies doing Domain driven design I've just finished reading Domain Driven Design and I'm enchanted with some of the ideas covered in it. Do you know any companies that implement ubiquitous language in their projects? | TITLE:
Companies doing Domain driven design
QUESTION:
I've just finished reading Domain Driven Design and I'm enchanted with some of the ideas covered in it. Do you know any companies that implement ubiquitous language in their projects?
ANSWER:
The Domain Driven Design Yahoo Group may be a better place to find an an... | [
"domain-driven-design"
] | 2 | 2 | 2,683 | 6 | 0 | 2008-09-16T15:37:31.890000 | 2008-09-16T15:53:21.837000 |
73,686 | 73,711 | cout prints "-0" instead of "0" | #include using namespace std;
int main() { double u = 0; double w = -u; cout << w << endl; return 0; } Why does this great piece of code output -0 and not 0, as one would expect? | The IEEE 754 standard for floating-point numbers has the sign bit separate from the mantissa, which allows for zero to be negative. Wikipedia should be able to help explain this. | cout prints "-0" instead of "0" #include using namespace std;
int main() { double u = 0; double w = -u; cout << w << endl; return 0; } Why does this great piece of code output -0 and not 0, as one would expect? | TITLE:
cout prints "-0" instead of "0"
QUESTION:
#include using namespace std;
int main() { double u = 0; double w = -u; cout << w << endl; return 0; } Why does this great piece of code output -0 and not 0, as one would expect?
ANSWER:
The IEEE 754 standard for floating-point numbers has the sign bit separate from t... | [
"c++",
"floating-point"
] | 4 | 13 | 1,437 | 7 | 0 | 2008-09-16T15:37:38.393000 | 2008-09-16T15:39:20.013000 |
73,713 | 73,732 | How do I check for nulls in an '==' operator overload without infinite recursion? | The following will cause infinite recursion on the == operator overload method Foo foo1 = null; Foo foo2 = new Foo(); Assert.IsFalse(foo1 == foo2);
public static bool operator ==(Foo foo1, Foo foo2) { if (foo1 == null) return foo2 == null; return foo1.Equals(foo2); } How do I check for nulls? | Use ReferenceEquals: Foo foo1 = null; Foo foo2 = new Foo(); Assert.IsFalse(foo1 == foo2);
public static bool operator ==(Foo foo1, Foo foo2) { if (object.ReferenceEquals(null, foo1)) return object.ReferenceEquals(null, foo2); return foo1.Equals(foo2); } | How do I check for nulls in an '==' operator overload without infinite recursion? The following will cause infinite recursion on the == operator overload method Foo foo1 = null; Foo foo2 = new Foo(); Assert.IsFalse(foo1 == foo2);
public static bool operator ==(Foo foo1, Foo foo2) { if (foo1 == null) return foo2 == nul... | TITLE:
How do I check for nulls in an '==' operator overload without infinite recursion?
QUESTION:
The following will cause infinite recursion on the == operator overload method Foo foo1 = null; Foo foo2 = new Foo(); Assert.IsFalse(foo1 == foo2);
public static bool operator ==(Foo foo1, Foo foo2) { if (foo1 == null) ... | [
"c#",
".net",
"operator-overloading"
] | 124 | 150 | 9,744 | 13 | 0 | 2008-09-16T15:39:37.470000 | 2008-09-16T15:41:17.013000 |
73,733 | 73,831 | Bootstrapper for SQL Server Express 2005 64 bit | Where can I get the 64 bit bootstrapper for SQL Server Express 2005 64 bit. The default bootstrapper is 32 bit only. This will not install on Vista 64 bit. | Microsoft's SQL Server Express Download page has a link to the 64-bit version, down near the bottom of the page | Bootstrapper for SQL Server Express 2005 64 bit Where can I get the 64 bit bootstrapper for SQL Server Express 2005 64 bit. The default bootstrapper is 32 bit only. This will not install on Vista 64 bit. | TITLE:
Bootstrapper for SQL Server Express 2005 64 bit
QUESTION:
Where can I get the 64 bit bootstrapper for SQL Server Express 2005 64 bit. The default bootstrapper is 32 bit only. This will not install on Vista 64 bit.
ANSWER:
Microsoft's SQL Server Express Download page has a link to the 64-bit version, down near ... | [
"sql",
"sql-server",
"sql-server-2005"
] | 2 | 1 | 1,139 | 1 | 0 | 2008-09-16T15:41:21.817000 | 2008-09-16T15:50:53.637000 |
73,745 | 73,777 | Long term source code archiving: Is it possible? | I'm curious about keeping source code around reliably and securely for several years. From my research/experience: Optical media, such as burned DVD-R's lose bits of data over time. After a couple years, I don't get all the files off that I put on them. Read errors, etc. Hard drives are mechanical and subject to failur... | The best answer is "in multiple places". If I were concerned about keeping my source code for as long as possible I would do: 1) Backup to some optical media on a regular basis, say burn it to DVD once a month and archive it offsite. 2) Back it up to multiple hard drives on my local machines 3) Back it up to Amazon's S... | Long term source code archiving: Is it possible? I'm curious about keeping source code around reliably and securely for several years. From my research/experience: Optical media, such as burned DVD-R's lose bits of data over time. After a couple years, I don't get all the files off that I put on them. Read errors, etc.... | TITLE:
Long term source code archiving: Is it possible?
QUESTION:
I'm curious about keeping source code around reliably and securely for several years. From my research/experience: Optical media, such as burned DVD-R's lose bits of data over time. After a couple years, I don't get all the files off that I put on them.... | [
"version-control",
"storage"
] | 9 | 7 | 1,965 | 17 | 0 | 2008-09-16T15:42:49.270000 | 2008-09-16T15:46:10.807000 |
73,748 | 74,251 | DropdownList autoposback after client confirmation | I have a dropdownlist with the autopostback set to true. I want the user to confirm if they really want to change the value, which on post back fires a server side event (selectedindexchanged). I have tried adding an onchange attribute "return confirm('Please click OK to change. Otherwise click CANCEL?';") but it will ... | Have you tried to set the onChange event to a javascript function and then inside the function display the javascript alert and utilize the __doPostback function if it passes? i.e. drpControl.Attributes("onChange") = "DisplayConfirmation();"
function DisplayConfirmation() { if (confirm('Are you sure you want to do thi... | DropdownList autoposback after client confirmation I have a dropdownlist with the autopostback set to true. I want the user to confirm if they really want to change the value, which on post back fires a server side event (selectedindexchanged). I have tried adding an onchange attribute "return confirm('Please click OK ... | TITLE:
DropdownList autoposback after client confirmation
QUESTION:
I have a dropdownlist with the autopostback set to true. I want the user to confirm if they really want to change the value, which on post back fires a server side event (selectedindexchanged). I have tried adding an onchange attribute "return confirm... | [
"asp.net",
"drop-down-menu",
"onchange",
"autopostback"
] | 3 | 8 | 29,459 | 8 | 0 | 2008-09-16T15:43:06.807000 | 2008-09-16T16:29:30.250000 |
73,751 | 73,772 | What is the dual table in Oracle? | I've heard people referring to this table and was not sure what it was about. | It's a sort of dummy table with a single record used for selecting when you're not actually interested in the data, but instead want the results of some system function in a select statement: e.g. select sysdate from dual; See http://www.adp-gmbh.ch/ora/misc/dual.html As of 23c, Oracle supports select sysdate /* or oth... | What is the dual table in Oracle? I've heard people referring to this table and was not sure what it was about. | TITLE:
What is the dual table in Oracle?
QUESTION:
I've heard people referring to this table and was not sure what it was about.
ANSWER:
It's a sort of dummy table with a single record used for selecting when you're not actually interested in the data, but instead want the results of some system function in a select ... | [
"oracle",
"dual-table"
] | 261 | 267 | 286,972 | 14 | 0 | 2008-09-16T15:43:19.863000 | 2008-09-16T15:45:29.483000 |
73,775 | 73,786 | C# P/Invoke with Variants | Anybody know what my DLLImport statement should look like here: extern "C" __declspec(dllexport) long SomeFunction(VARIANT *argNames, VARIANT *argValues, VARIANT *pVal) {... } | A variant is an object. Type Conversions During marshaling one of the most important steps is converting unmanaged types to managed types and vice versa.The CLR marshaling service knows how to perform many of these conversions for you, but you must still know how the various types match up to each other when converting... | C# P/Invoke with Variants Anybody know what my DLLImport statement should look like here: extern "C" __declspec(dllexport) long SomeFunction(VARIANT *argNames, VARIANT *argValues, VARIANT *pVal) {... } | TITLE:
C# P/Invoke with Variants
QUESTION:
Anybody know what my DLLImport statement should look like here: extern "C" __declspec(dllexport) long SomeFunction(VARIANT *argNames, VARIANT *argValues, VARIANT *pVal) {... }
ANSWER:
A variant is an object. Type Conversions During marshaling one of the most important steps ... | [
"c#",
"pinvoke"
] | 1 | 0 | 1,280 | 1 | 0 | 2008-09-16T15:45:30.903000 | 2008-09-16T15:47:20.947000 |
73,781 | 74,084 | Sending mail via sendmail from python | If I want to send mail not via SMTP, but rather via sendmail, is there a library for python that encapsulates this process? Better yet, is there a good library that abstracts the whole 'sendmail -versus- smtp' choice? I'll be running this script on a bunch of unix hosts, only some of which are listening on localhost:25... | Header injection isn't a factor in how you send the mail, it's a factor in how you construct the mail. Check the email package, construct the mail with that, serialise it, and send it to /usr/sbin/sendmail using the subprocess module: import sys from email.mime.text import MIMEText from subprocess import Popen, PIPE
m... | Sending mail via sendmail from python If I want to send mail not via SMTP, but rather via sendmail, is there a library for python that encapsulates this process? Better yet, is there a good library that abstracts the whole 'sendmail -versus- smtp' choice? I'll be running this script on a bunch of unix hosts, only some ... | TITLE:
Sending mail via sendmail from python
QUESTION:
If I want to send mail not via SMTP, but rather via sendmail, is there a library for python that encapsulates this process? Better yet, is there a good library that abstracts the whole 'sendmail -versus- smtp' choice? I'll be running this script on a bunch of unix... | [
"python",
"email",
"sendmail"
] | 84 | 133 | 97,531 | 8 | 0 | 2008-09-16T15:46:43.100000 | 2008-09-16T16:12:37.547000 |
73,785 | 73,900 | Iterating through all the cells in Excel VBA or VSTO 2005 | I need to simply go through all the cells in a Excel Spreadsheet and check the values in the cells. The cells may contain text, numbers or be blank. I am not very familiar / comfortable working with the concept of 'Range'. Therefore, any sample codes would be greatly appreciated. (I did try to google it, but the code s... | Sub CheckValues1() Dim rwIndex As Integer Dim colIndex As Integer For rwIndex = 1 To 10 For colIndex = 1 To 5 If Cells(rwIndex, colIndex).Value <> 0 Then _ Cells(rwIndex, colIndex).Value = 0 Next colIndex Next rwIndex End Sub Found this snippet on http://www.java2s.com/Code/VBA-Excel-Access-Word/Excel/Checksvaluesinara... | Iterating through all the cells in Excel VBA or VSTO 2005 I need to simply go through all the cells in a Excel Spreadsheet and check the values in the cells. The cells may contain text, numbers or be blank. I am not very familiar / comfortable working with the concept of 'Range'. Therefore, any sample codes would be gr... | TITLE:
Iterating through all the cells in Excel VBA or VSTO 2005
QUESTION:
I need to simply go through all the cells in a Excel Spreadsheet and check the values in the cells. The cells may contain text, numbers or be blank. I am not very familiar / comfortable working with the concept of 'Range'. Therefore, any sample... | [
"vba",
"excel",
"vsto"
] | 24 | 7 | 120,595 | 9 | 0 | 2008-09-16T15:47:16.843000 | 2008-09-16T15:57:50.950000 |
73,797 | 74,017 | How do I tell Subversion to treat a file as a binary file? | How do I tell Subversion (svn) to treat a file as a binary file? | It is possible to manually identify a file located within a repository as binary by using: svn propset svn:mime-type application/octet-stream This is generally not necessary, as Subversion will attempt to determine whether a file is binary when the file is first added. If Subversion is incorrectly tagging a certain typ... | How do I tell Subversion to treat a file as a binary file? How do I tell Subversion (svn) to treat a file as a binary file? | TITLE:
How do I tell Subversion to treat a file as a binary file?
QUESTION:
How do I tell Subversion (svn) to treat a file as a binary file?
ANSWER:
It is possible to manually identify a file located within a repository as binary by using: svn propset svn:mime-type application/octet-stream This is generally not neces... | [
"svn"
] | 67 | 84 | 81,569 | 10 | 0 | 2008-09-16T15:48:12.770000 | 2008-09-16T16:07:42.427000 |
73,825 | 74,130 | .NET Remoting exception | This is about when a.NET remoting exception is thrown. If you take a look at MSDN, it will mention that a remoting exception is thrown when something goes wrong with remoting. If my server is not running, I get a socket exception which is fine. What I am trying to figure out is: does getting a remoting exception indica... | Getting a remoting exception does not guarantee that your server is up and running. If something else happens to be running and listening on that port, the connection will succeed, and you will not get a socket exception. What happens in this case depends on how the application which actually got your connection behave... | .NET Remoting exception This is about when a.NET remoting exception is thrown. If you take a look at MSDN, it will mention that a remoting exception is thrown when something goes wrong with remoting. If my server is not running, I get a socket exception which is fine. What I am trying to figure out is: does getting a r... | TITLE:
.NET Remoting exception
QUESTION:
This is about when a.NET remoting exception is thrown. If you take a look at MSDN, it will mention that a remoting exception is thrown when something goes wrong with remoting. If my server is not running, I get a socket exception which is fine. What I am trying to figure out is... | [
".net",
"remoting"
] | 6 | 1 | 9,968 | 6 | 0 | 2008-09-16T15:50:19.363000 | 2008-09-16T16:17:40.950000 |
73,833 | 73,969 | How do you search for files containing DOS line endings (CRLF) with grep on Linux? | I want to search for files containing DOS line endings with grep on Linux. Something like this: grep -IUr --color '\r\n'. The above seems to match for literal rn which is not what is desired. The output of this will be piped through xargs into todos to convert crlf to lf like this grep -IUrl --color '^M'. | xargs -ifil... | grep probably isn't the tool you want for this. It will print a line for every matching line in every file. Unless you want to, say, run todos 10 times on a 10 line file, grep isn't the best way to go about it. Using find to run file on every file in the tree then grepping through that for "CRLF" will get you one line ... | How do you search for files containing DOS line endings (CRLF) with grep on Linux? I want to search for files containing DOS line endings with grep on Linux. Something like this: grep -IUr --color '\r\n'. The above seems to match for literal rn which is not what is desired. The output of this will be piped through xarg... | TITLE:
How do you search for files containing DOS line endings (CRLF) with grep on Linux?
QUESTION:
I want to search for files containing DOS line endings with grep on Linux. Something like this: grep -IUr --color '\r\n'. The above seems to match for literal rn which is not what is desired. The output of this will be ... | [
"linux",
"bash",
"grep",
"newline"
] | 171 | 226 | 122,304 | 9 | 0 | 2008-09-16T15:50:58.910000 | 2008-09-16T16:03:28.833000 |
73,879 | 74,356 | Translate C++/CLI to C# | I have a small to medium project that is in C++/CLI. I really hate the syntax extensions of C++/CLI and I would prefer to work in C#. Is there a tool that does a decent job of translating one to the other? EDIT: When I said Managed c++ before I apparently meant c++/CLI | You can only translate Managed C++ code (and C++/CLI code) to C# if the C++ code is pure managed. If it is not -- i.e. if there is native code included in the sources -- tools like.NET Reflector won't be able to translate the code for you. If you do have native C++ code mixed in, then I'd recommend trying to move the n... | Translate C++/CLI to C# I have a small to medium project that is in C++/CLI. I really hate the syntax extensions of C++/CLI and I would prefer to work in C#. Is there a tool that does a decent job of translating one to the other? EDIT: When I said Managed c++ before I apparently meant c++/CLI | TITLE:
Translate C++/CLI to C#
QUESTION:
I have a small to medium project that is in C++/CLI. I really hate the syntax extensions of C++/CLI and I would prefer to work in C#. Is there a tool that does a decent job of translating one to the other? EDIT: When I said Managed c++ before I apparently meant c++/CLI
ANSWER:... | [
"c#",
".net",
"c++-cli"
] | 5 | 6 | 20,017 | 6 | 0 | 2008-09-16T15:55:16.107000 | 2008-09-16T16:41:48.710000 |
73,881 | 74,114 | Quick and easy way to test OSGi bundles | Currently, I am working on a new version control system as part of a final year project at University. The idea is to make it highly adaptable and pluggable. We're using the OSGi framework (Equinox implementation) to manage our plug ins. My problem is that I can't find a simple & easy to use method for testing OSGi bun... | Spring Dynamic Modules has excellent support for testing OSGi bundles. | Quick and easy way to test OSGi bundles Currently, I am working on a new version control system as part of a final year project at University. The idea is to make it highly adaptable and pluggable. We're using the OSGi framework (Equinox implementation) to manage our plug ins. My problem is that I can't find a simple &... | TITLE:
Quick and easy way to test OSGi bundles
QUESTION:
Currently, I am working on a new version control system as part of a final year project at University. The idea is to make it highly adaptable and pluggable. We're using the OSGi framework (Equinox implementation) to manage our plug ins. My problem is that I can... | [
"java",
"testing",
"osgi"
] | 16 | 6 | 12,327 | 14 | 0 | 2008-09-16T15:55:26.870000 | 2008-09-16T16:15:11.253000 |
73,883 | 73,929 | String vs. StringBuilder | I understand the difference between String and StringBuilder ( StringBuilder being mutable) but is there a large performance difference between the two? The program I’m working on has a lot of case driven string appends (500+). Is using StringBuilder a better choice? | Yes, the performance difference is significant. See the KB article " How to improve string concatenation performance in Visual C# ". I have always tried to code for clarity first, and then optimize for performance later. That's much easier than doing it the other way around! However, having seen the enormous performanc... | String vs. StringBuilder I understand the difference between String and StringBuilder ( StringBuilder being mutable) but is there a large performance difference between the two? The program I’m working on has a lot of case driven string appends (500+). Is using StringBuilder a better choice? | TITLE:
String vs. StringBuilder
QUESTION:
I understand the difference between String and StringBuilder ( StringBuilder being mutable) but is there a large performance difference between the two? The program I’m working on has a lot of case driven string appends (500+). Is using StringBuilder a better choice?
ANSWER:
... | [
"c#",
".net",
"performance"
] | 234 | 255 | 223,866 | 24 | 0 | 2008-09-16T15:55:54.390000 | 2008-09-16T15:59:58.763000 |
73,884 | 73,916 | Can you set Visual Studio's "smart indent" to not remove tabs in blank lines? | When Visual Studio (2005) has Options -> Text Editor -> C/C++ -> Tabs -> Indenting set to Smart it will automatically indent code blocks and line up squiggly brackets, {}, as expected. However, if you hit enter inside a code block, move the cursor to another line, and then move it back, the inserted tabs are gone and t... | As far as I know, the only way to do that is to enter something (anything) on that line, then delete it. Or hit space and you'll never see it there until you return to that line. Once VS determines that you've edited a line of text, it won't automatically modify it for you (at least, not in that way that you've describ... | Can you set Visual Studio's "smart indent" to not remove tabs in blank lines? When Visual Studio (2005) has Options -> Text Editor -> C/C++ -> Tabs -> Indenting set to Smart it will automatically indent code blocks and line up squiggly brackets, {}, as expected. However, if you hit enter inside a code block, move the c... | TITLE:
Can you set Visual Studio's "smart indent" to not remove tabs in blank lines?
QUESTION:
When Visual Studio (2005) has Options -> Text Editor -> C/C++ -> Tabs -> Indenting set to Smart it will automatically indent code blocks and line up squiggly brackets, {}, as expected. However, if you hit enter inside a code... | [
"visual-studio-2005",
"tabs"
] | 6 | 2 | 4,677 | 2 | 0 | 2008-09-16T15:55:58.007000 | 2008-09-16T15:59:06.190000 |
73,885 | 74,082 | In jQuery, using ajaxSend to preview the url built by $.post call | How can I construct my ajaxSend call, this seems like the place to put it, to preview what is being passed back to the broker? also, can I stop the ajax call in ajaxSend?..so I can perfect my url string before dealing with errors from the broker? This is the complete URL that, when passed to the broker, will return the... | An easy way to preview the HTTP request being sent is to use Firebug for Firefox. Download and enable the plugin, and when the request is made it will show up in the firebug console. | In jQuery, using ajaxSend to preview the url built by $.post call How can I construct my ajaxSend call, this seems like the place to put it, to preview what is being passed back to the broker? also, can I stop the ajax call in ajaxSend?..so I can perfect my url string before dealing with errors from the broker? This is... | TITLE:
In jQuery, using ajaxSend to preview the url built by $.post call
QUESTION:
How can I construct my ajaxSend call, this seems like the place to put it, to preview what is being passed back to the broker? also, can I stop the ajax call in ajaxSend?..so I can perfect my url string before dealing with errors from t... | [
"jquery",
"ajax"
] | 0 | 1 | 3,349 | 2 | 0 | 2008-09-16T15:56:00.987000 | 2008-09-16T16:12:32.883000 |
73,889 | 214,717 | Which framework should I use to write modules? | What's the best framework for writing modules -- ExtUtils::MakeMaker (h2xs) or Module::Build? | NOTE This advice is out of date. Module::Build has been removed from the Perl core but lives on as a CPAN module. The pros and cons still stand, and my opinions about MakeMaker still stand. As the former maintainer of ExtUtils::MakeMaker, I like to recommend Module::Build because MakeMaker is a horror show. Module::Bui... | Which framework should I use to write modules? What's the best framework for writing modules -- ExtUtils::MakeMaker (h2xs) or Module::Build? | TITLE:
Which framework should I use to write modules?
QUESTION:
What's the best framework for writing modules -- ExtUtils::MakeMaker (h2xs) or Module::Build?
ANSWER:
NOTE This advice is out of date. Module::Build has been removed from the Perl core but lives on as a CPAN module. The pros and cons still stand, and my ... | [
"perl",
"perl-module"
] | 21 | 49 | 2,185 | 11 | 0 | 2008-09-16T15:56:55.930000 | 2008-10-18T07:35:47.763000 |
73,892 | 74,073 | Pre-Pending a file to all .cs file in directory and subdirectory using PowerShell | How can I pre pend (insert at beginning of file) a file to all files of a type in folder and sub-folders using Powershell? I need to add a standard header file to all.cs and was trying to use Powershell to do so, but while I was able to append it in a few lines of code I was stuck when trying to pre-pend it. | Here is a very simple example to show you one of the ways it could be done. $Content = "This is your content`n" Get-ChildItem *.cs | foreach-object { $FileContents = Get-Content -Path $_ Set-Content -Path $_ -Value ($Content + $FileContents) } | Pre-Pending a file to all .cs file in directory and subdirectory using PowerShell How can I pre pend (insert at beginning of file) a file to all files of a type in folder and sub-folders using Powershell? I need to add a standard header file to all.cs and was trying to use Powershell to do so, but while I was able to a... | TITLE:
Pre-Pending a file to all .cs file in directory and subdirectory using PowerShell
QUESTION:
How can I pre pend (insert at beginning of file) a file to all files of a type in folder and sub-folders using Powershell? I need to add a standard header file to all.cs and was trying to use Powershell to do so, but whi... | [
"powershell"
] | 3 | 9 | 351 | 3 | 0 | 2008-09-16T15:57:12.030000 | 2008-09-16T16:12:04.957000 |
73,895 | 74,300 | Delphi Component Serialization | Has anyone run into issues serializing components into a file and reading them back, specifically in the area where the component vendor upgrades the VCL components. For example a file serialized with DelphiX and then years later read back with delphiY. Do the serialization formats change and if so what can be done to ... | The built-in RTTI based system for serializing published properties is vulnerable to changes in the components. Going forwards is manageable as long as old properties are kept in new objects. I.e. you leave the property interface as is, but can toss away the contents if you like. Going backwards is worse - as a newer v... | Delphi Component Serialization Has anyone run into issues serializing components into a file and reading them back, specifically in the area where the component vendor upgrades the VCL components. For example a file serialized with DelphiX and then years later read back with delphiY. Do the serialization formats change... | TITLE:
Delphi Component Serialization
QUESTION:
Has anyone run into issues serializing components into a file and reading them back, specifically in the area where the component vendor upgrades the VCL components. For example a file serialized with DelphiX and then years later read back with delphiY. Do the serializat... | [
"delphi",
"serialization",
"components"
] | 6 | 3 | 3,020 | 3 | 0 | 2008-09-16T15:57:19.097000 | 2008-09-16T16:36:10.360000 |
73,902 | 73,973 | ASP.NET MVC "Components" | Is there someway to have a part of the page that renders like a little sub-page, like components? For example, if I have a shopping cart on all my pages? | If you want it to render another controllers action, as a component, to get encapsulation, you use. Html.RenderAction uses routedata to get you there, has its own viewdata and kind of mini life cycle | ASP.NET MVC "Components" Is there someway to have a part of the page that renders like a little sub-page, like components? For example, if I have a shopping cart on all my pages? | TITLE:
ASP.NET MVC "Components"
QUESTION:
Is there someway to have a part of the page that renders like a little sub-page, like components? For example, if I have a shopping cart on all my pages?
ANSWER:
If you want it to render another controllers action, as a component, to get encapsulation, you use. Html.RenderAct... | [
"asp.net",
"asp.net-mvc",
"partial-views"
] | 9 | 8 | 3,983 | 4 | 0 | 2008-09-16T15:57:52.980000 | 2008-09-16T16:03:54.090000 |
73,927 | 125,455 | Clustering Algorithm for Mapping Application | I'm looking into clustering points on a map (latitude/longitude). Are there any recommendations as to a suitable algorithm that is fast and scalable? More specifically, I have a series of latitude/longitude coordinates and a map viewport. I'm trying to cluster the points that are close together in order to remove clutt... | For a virtual earth application I've used the clustering described here. It's lightning fast and easily extensible. | Clustering Algorithm for Mapping Application I'm looking into clustering points on a map (latitude/longitude). Are there any recommendations as to a suitable algorithm that is fast and scalable? More specifically, I have a series of latitude/longitude coordinates and a map viewport. I'm trying to cluster the points tha... | TITLE:
Clustering Algorithm for Mapping Application
QUESTION:
I'm looking into clustering points on a map (latitude/longitude). Are there any recommendations as to a suitable algorithm that is fast and scalable? More specifically, I have a series of latitude/longitude coordinates and a map viewport. I'm trying to clus... | [
"algorithm",
"machine-learning",
"maps",
"artificial-intelligence",
"cluster-analysis"
] | 33 | 7 | 31,929 | 4 | 0 | 2008-09-16T15:59:42.540000 | 2008-09-24T04:44:51.943000 |
73,933 | 73,940 | How do I get my Disciplines to appear in published Site (in EPF Composer 1.5)? | I have a custom category ("disciplines") in my method plugin which I want to use to contain existing disciplines (from the Scrum plugin and EPF OpenUP library) as well as a few of my own (some are new, and others extend the OpenUP ones). I can add them simply, order them as desired, and view them in the Browsing Perspe... | Your custom disciplines and extensions must contain tasks. When you add some, they will be visible upon publishing. | How do I get my Disciplines to appear in published Site (in EPF Composer 1.5)? I have a custom category ("disciplines") in my method plugin which I want to use to contain existing disciplines (from the Scrum plugin and EPF OpenUP library) as well as a few of my own (some are new, and others extend the OpenUP ones). I c... | TITLE:
How do I get my Disciplines to appear in published Site (in EPF Composer 1.5)?
QUESTION:
I have a custom category ("disciplines") in my method plugin which I want to use to contain existing disciplines (from the Scrum plugin and EPF OpenUP library) as well as a few of my own (some are new, and others extend the... | [
"eclipse-plugin",
"methodology"
] | 1 | 0 | 187 | 1 | 0 | 2008-09-16T16:00:16.110000 | 2008-09-16T16:01:00.773000 |
73,947 | 74,841 | What is the best way to stop people hacking the PHP-based highscore table of a Flash game | I'm talking about an action game with no upper score limit and no way to verify the score on the server by replaying moves etc. What I really need is the strongest encryption possible in Flash/PHP, and a way to prevent people calling the PHP page other than through my Flash file. I have tried some simple methods in the... | This is a classic problem with Internet games and contests. Your Flash code works with users to decide a score for a game. But users aren't trusted, and the Flash code runs on the user's computer. You're SOL. There is nothing you can do to prevent an attacker from forging high scores: Flash is even easier to reverse en... | What is the best way to stop people hacking the PHP-based highscore table of a Flash game I'm talking about an action game with no upper score limit and no way to verify the score on the server by replaying moves etc. What I really need is the strongest encryption possible in Flash/PHP, and a way to prevent people call... | TITLE:
What is the best way to stop people hacking the PHP-based highscore table of a Flash game
QUESTION:
I'm talking about an action game with no upper score limit and no way to verify the score on the server by replaying moves etc. What I really need is the strongest encryption possible in Flash/PHP, and a way to p... | [
"php",
"actionscript-3",
"security",
"actionscript",
"actionscript-2"
] | 212 | 414 | 30,612 | 18 | 0 | 2008-09-16T16:01:27.887000 | 2008-09-16T17:32:22.097000 |
73,960 | 2,516,571 | Dropdownlist width in IE | In IE, the dropdown-list takes the same width as the dropbox (I hope I am making sense) whereas in Firefox the dropdown-list's width varies according to the content. This basically means that I have to make sure that the dropbox is wide enough to display the longest selection possible. This makes my page look very ugly... | Here's another jQuery based example. In contrary to all the other answers posted here, it takes all keyboard and mouse events into account, especially clicks: if (!$.support.leadingWhitespace) { // if IE6/7/8 $('select.wide').bind('focus mouseover', function() { $(this).addClass('expand').removeClass('clicked'); }).bin... | Dropdownlist width in IE In IE, the dropdown-list takes the same width as the dropbox (I hope I am making sense) whereas in Firefox the dropdown-list's width varies according to the content. This basically means that I have to make sure that the dropbox is wide enough to display the longest selection possible. This mak... | TITLE:
Dropdownlist width in IE
QUESTION:
In IE, the dropdown-list takes the same width as the dropbox (I hope I am making sense) whereas in Firefox the dropdown-list's width varies according to the content. This basically means that I have to make sure that the dropbox is wide enough to display the longest selection ... | [
"javascript",
"html",
"internet-explorer",
"drop-down-menu"
] | 92 | 102 | 101,362 | 27 | 0 | 2008-09-16T16:02:41.610000 | 2010-03-25T14:58:32.333000 |
73,964 | 74,374 | How do I turn a ColdFusion page into a PDF download? | I would like to turn the HTML generated by my CFM page into a PDF, and have the user prompted with the standard "Save As" prompt when navigating to my page. | You should use the cfdocument tag (with format="PDF") to generate the PDF by placing it around the page you are generating. You'll want to specify a filename attribute, otherwise the document will just stream right to your browser. After you have saved the content as a PDF, use cfheader and cfcontent in combination to ... | How do I turn a ColdFusion page into a PDF download? I would like to turn the HTML generated by my CFM page into a PDF, and have the user prompted with the standard "Save As" prompt when navigating to my page. | TITLE:
How do I turn a ColdFusion page into a PDF download?
QUESTION:
I would like to turn the HTML generated by my CFM page into a PDF, and have the user prompted with the standard "Save As" prompt when navigating to my page.
ANSWER:
You should use the cfdocument tag (with format="PDF") to generate the PDF by placin... | [
"pdf",
"coldfusion"
] | 16 | 19 | 29,039 | 4 | 0 | 2008-09-16T16:03:04.310000 | 2008-09-16T16:43:10.407000 |
73,971 | 74,040 | Using Javascript, how do I make sure a date range is valid? | In JavaScript, what is the best way to determine if a date provided falls within a valid range? An example of this might be checking to see if the user input requestedDate is part of the next valid work week. Note that this is not just checking to see if one date is larger than another as a valid date would be equal to... | This is actually a problem that I have seen come up before a lot in my works and the following bit of code is my answer to the problem. // checkDateRange - Checks to ensure that the values entered are dates and // are of a valid range. By this, the dates must be no more than the // built-in number of days appart. funct... | Using Javascript, how do I make sure a date range is valid? In JavaScript, what is the best way to determine if a date provided falls within a valid range? An example of this might be checking to see if the user input requestedDate is part of the next valid work week. Note that this is not just checking to see if one d... | TITLE:
Using Javascript, how do I make sure a date range is valid?
QUESTION:
In JavaScript, what is the best way to determine if a date provided falls within a valid range? An example of this might be checking to see if the user input requestedDate is part of the next valid work week. Note that this is not just checki... | [
"javascript",
"validation",
"date"
] | 15 | 18 | 48,149 | 3 | 0 | 2008-09-16T16:03:33.713000 | 2008-09-16T16:09:29.783000 |
73,972 | 74,004 | Disabling copy of empty text in Visual Studio | I have somehow misconfigured fingers. This leads to a very annoying situation. I select a block of text to copy; I move the cursor the place where I want to paste the code; I accidentally press Ctrl+C again instead of Ctrl+V; My block of copied text is replaced by an empty block; I have to go back and do it all over ag... | It's not copying an empty block, it's copying the blank line. You can change this setting in Tools > Options > Text Editor > All Languages > 'Apply Cut or Copy Commands to blank lines when there is no selection' | Disabling copy of empty text in Visual Studio I have somehow misconfigured fingers. This leads to a very annoying situation. I select a block of text to copy; I move the cursor the place where I want to paste the code; I accidentally press Ctrl+C again instead of Ctrl+V; My block of copied text is replaced by an empty ... | TITLE:
Disabling copy of empty text in Visual Studio
QUESTION:
I have somehow misconfigured fingers. This leads to a very annoying situation. I select a block of text to copy; I move the cursor the place where I want to paste the code; I accidentally press Ctrl+C again instead of Ctrl+V; My block of copied text is rep... | [
"visual-studio",
"keyboard"
] | 79 | 78 | 6,599 | 6 | 0 | 2008-09-16T16:03:38.003000 | 2008-09-16T16:06:24.737000 |
74,010 | 76,178 | What is the difference between explicit and implicit cursors in Oracle? | I am a bit rusty on my cursor lingo in PL/SQL. Anyone know this? | An implicit cursor is one created "automatically" for you by Oracle when you execute a query. It is simpler to code, but suffers from inefficiency (the ANSI standard specifies that it must fetch twice to check if there is more than one record) vulnerability to data errors (if you ever get two rows, it raises a TOO_MANY... | What is the difference between explicit and implicit cursors in Oracle? I am a bit rusty on my cursor lingo in PL/SQL. Anyone know this? | TITLE:
What is the difference between explicit and implicit cursors in Oracle?
QUESTION:
I am a bit rusty on my cursor lingo in PL/SQL. Anyone know this?
ANSWER:
An implicit cursor is one created "automatically" for you by Oracle when you execute a query. It is simpler to code, but suffers from inefficiency (the ANSI... | [
"oracle",
"plsql"
] | 28 | 44 | 143,364 | 16 | 0 | 2008-09-16T16:06:52.083000 | 2008-09-16T19:47:35.797000 |
74,019 | 74,049 | Specifying filename for dynamic PDF in asp.net | How can I specify the filename when dumping data into the response stream? Right now I'm doing the following: byte[] data= GetFoo(); Response.Clear(); Response.Buffer = true; Response.ContentType = "application/pdf"; Response.BinaryWrite(data); Response.End(); With the code above, I get "foo.aspx.pdf" as the filename t... | Add a content-disposition to the header: Response.AddHeader("content-disposition", @"attachment;filename=""MyFile.pdf"""); | Specifying filename for dynamic PDF in asp.net How can I specify the filename when dumping data into the response stream? Right now I'm doing the following: byte[] data= GetFoo(); Response.Clear(); Response.Buffer = true; Response.ContentType = "application/pdf"; Response.BinaryWrite(data); Response.End(); With the cod... | TITLE:
Specifying filename for dynamic PDF in asp.net
QUESTION:
How can I specify the filename when dumping data into the response stream? Right now I'm doing the following: byte[] data= GetFoo(); Response.Clear(); Response.Buffer = true; Response.ContentType = "application/pdf"; Response.BinaryWrite(data); Response.E... | [
"c#",
"asp.net",
"response"
] | 37 | 62 | 39,789 | 5 | 0 | 2008-09-16T16:07:47.043000 | 2008-09-16T16:10:34.540000 |
74,092 | 75,507 | Is there a common way to check in Python if an object is any function type? | I have a function in Python which is iterating over the attributes returned from dir(obj), and I want to check to see if any of the objects contained within is a function, method, built-in function, etc. Normally you could use callable() for this, but I don't want to include classes. The best I've come up with so far i... | The inspect module has exactly what you want: inspect.isroutine( obj ) FYI, the code is: def isroutine(object): """Return true if the object is any kind of function or method.""" return (isbuiltin(object) or isfunction(object) or ismethod(object) or ismethoddescriptor(object)) | Is there a common way to check in Python if an object is any function type? I have a function in Python which is iterating over the attributes returned from dir(obj), and I want to check to see if any of the objects contained within is a function, method, built-in function, etc. Normally you could use callable() for th... | TITLE:
Is there a common way to check in Python if an object is any function type?
QUESTION:
I have a function in Python which is iterating over the attributes returned from dir(obj), and I want to check to see if any of the objects contained within is a function, method, built-in function, etc. Normally you could use... | [
"python",
"types"
] | 9 | 17 | 3,343 | 4 | 0 | 2008-09-16T16:13:09.777000 | 2008-09-16T18:34:03.040000 |
74,100 | 74,169 | Generate thumbnail with white border | I need to generate thumbnails from a set of jpg's that need to have a small white border so that they appear to be "photos" when displayed on a map. Getting the thumbnails themselves is easy but I can't figure out how to get the border. | Here's a quick hack: public Image AppendBorder(Image original, int borderWidth) { var borderColor = Color.White;
var newSize = new Size( original.Width + borderWidth * 2, original.Height + borderWidth * 2);
var img = new Bitmap(newSize.Width, newSize.Height); var g = Graphics.FromImage(img);
g.Clear(borderColor); g.... | Generate thumbnail with white border I need to generate thumbnails from a set of jpg's that need to have a small white border so that they appear to be "photos" when displayed on a map. Getting the thumbnails themselves is easy but I can't figure out how to get the border. | TITLE:
Generate thumbnail with white border
QUESTION:
I need to generate thumbnails from a set of jpg's that need to have a small white border so that they appear to be "photos" when displayed on a map. Getting the thumbnails themselves is easy but I can't figure out how to get the border.
ANSWER:
Here's a quick hack... | [
"c#",
"vb.net",
"border",
"thumbnails"
] | 1 | 6 | 3,080 | 1 | 0 | 2008-09-16T16:13:31.163000 | 2008-09-16T16:20:12.770000 |
74,108 | 74,137 | Visualize Friend of a Friend (foaf) graph | I wrote a script to export twitter friends as foaf rdf description. Now I'm looking for a tool to visualize the friend networks. I tried http://foafscape.berlios.de/ but for 300+ Nodes it is really slow and does a bad job on auto formatting. Any hints for good graph visualization tools? It's ok if they do not support f... | perhaps the prefuse visualization toolkit might help you. It's based on Java and has many sample apps including a graph viewer. | Visualize Friend of a Friend (foaf) graph I wrote a script to export twitter friends as foaf rdf description. Now I'm looking for a tool to visualize the friend networks. I tried http://foafscape.berlios.de/ but for 300+ Nodes it is really slow and does a bad job on auto formatting. Any hints for good graph visualizati... | TITLE:
Visualize Friend of a Friend (foaf) graph
QUESTION:
I wrote a script to export twitter friends as foaf rdf description. Now I'm looking for a tool to visualize the friend networks. I tried http://foafscape.berlios.de/ but for 300+ Nodes it is really slow and does a bad job on auto formatting. Any hints for good... | [
"visualization",
"rdf",
"semantic-web",
"graph-layout",
"foaf"
] | 7 | 5 | 5,069 | 11 | 0 | 2008-09-16T16:14:17.963000 | 2008-09-16T16:18:25.787000 |
74,112 | 299,974 | How do I embed Media Player in a C# MailMessage to play an Attachment | I'm using a C# MailMessage to attach a wave file (8K) to an email message. I'd like to provide a player within the body of that email message that will play that wave file if the user chooses to do so. I've tried using the embedded version of WMP, and a cid: reference to the file, but Outlook 2003 rejects the object ta... | If you know the message recipients are running Outlook (which implies you're using this internally), you might be able to accomplish something even better by incorporating your player controls into a custom Outlook form. | How do I embed Media Player in a C# MailMessage to play an Attachment I'm using a C# MailMessage to attach a wave file (8K) to an email message. I'd like to provide a player within the body of that email message that will play that wave file if the user chooses to do so. I've tried using the embedded version of WMP, an... | TITLE:
How do I embed Media Player in a C# MailMessage to play an Attachment
QUESTION:
I'm using a C# MailMessage to attach a wave file (8K) to an email message. I'd like to provide a player within the body of that email message that will play that wave file if the user chooses to do so. I've tried using the embedded ... | [
"c#",
".net",
"wmp",
"embedded-control"
] | 1 | 0 | 1,677 | 4 | 0 | 2008-09-16T16:15:04.297000 | 2008-11-18T20:11:32.263000 |
74,113 | 74,255 | Access the camera with iOS | It seems obvious that some people have been able to figure out how to access the iPhone camera through the SDK (Spore Origins, for example). How can this be done? | You need to use the UIImagePickerController class, basically: UIImagePickerController *picker = [[UIImagePickerController alloc] init]; picker.delegate = pickerDelegate picker.sourceType = UIImagePickerControllerSourceTypeCamera The pickerDelegate object above needs to implement the following method: - (void)imagePicke... | Access the camera with iOS It seems obvious that some people have been able to figure out how to access the iPhone camera through the SDK (Spore Origins, for example). How can this be done? | TITLE:
Access the camera with iOS
QUESTION:
It seems obvious that some people have been able to figure out how to access the iPhone camera through the SDK (Spore Origins, for example). How can this be done?
ANSWER:
You need to use the UIImagePickerController class, basically: UIImagePickerController *picker = [[UIIma... | [
"ios",
"iphone",
"camera"
] | 35 | 48 | 60,003 | 2 | 0 | 2008-09-16T16:15:04.483000 | 2008-09-16T16:29:59.313000 |
74,126 | 74,200 | How to force a reboot instead of shutdown (XP) | I have a Windows XP SP2 virtual machine which can be accessed via VNC. It's also running Deep Freeze so there should be no problem in forcing it to reboot. I am looking for a way to force the operating system to reboot instead of shutting down or completely remove the ability to shut down the machine using software app... | To remove the ability to shut down then your best bet is to create a group policy for the user/user group and specify that they can only restart the system. I have done this in the past to ensure that only the administrator account can shut down a computer. it has prevented me from mistakenly shutting down a remote pc ... | How to force a reboot instead of shutdown (XP) I have a Windows XP SP2 virtual machine which can be accessed via VNC. It's also running Deep Freeze so there should be no problem in forcing it to reboot. I am looking for a way to force the operating system to reboot instead of shutting down or completely remove the abil... | TITLE:
How to force a reboot instead of shutdown (XP)
QUESTION:
I have a Windows XP SP2 virtual machine which can be accessed via VNC. It's also running Deep Freeze so there should be no problem in forcing it to reboot. I am looking for a way to force the operating system to reboot instead of shutting down or complete... | [
"windows",
"shutdown",
"restart",
"reboot"
] | 4 | 2 | 28,465 | 4 | 0 | 2008-09-16T16:17:10.827000 | 2008-09-16T16:23:21.857000 |
74,148 | 74,223 | How to convert numbers between hexadecimal and decimal | How do you convert between hexadecimal numbers and decimal numbers in C#? | To convert from decimal to hex do... string hexValue = decValue.ToString("X"); To convert from hex to decimal do either... int decValue = int.Parse(hexValue, System.Globalization.NumberStyles.HexNumber); or int decValue = Convert.ToInt32(hexValue, 16); | How to convert numbers between hexadecimal and decimal How do you convert between hexadecimal numbers and decimal numbers in C#? | TITLE:
How to convert numbers between hexadecimal and decimal
QUESTION:
How do you convert between hexadecimal numbers and decimal numbers in C#?
ANSWER:
To convert from decimal to hex do... string hexValue = decValue.ToString("X"); To convert from hex to decimal do either... int decValue = int.Parse(hexValue, System... | [
"c#",
"hex",
"type-conversion",
"decimal"
] | 175 | 337 | 446,774 | 20 | 0 | 2008-09-16T16:18:59.327000 | 2008-09-16T16:26:00.587000 |
74,162 | 74,204 | How to do INSERT into a table records extracted from another table | I'm trying to write a query that extracts and transforms data from a table and then insert those data into another table. Yes, this is a data warehousing query and I'm doing it in MS Access. So basically I want some query like this: INSERT INTO Table2(LongIntColumn2, CurrencyColumn2) VALUES (SELECT LongIntColumn1, Avg(... | No "VALUES", no parenthesis: INSERT INTO Table2(LongIntColumn2, CurrencyColumn2) SELECT LongIntColumn1, Avg(CurrencyColumn) as CurrencyColumn1 FROM Table1 GROUP BY LongIntColumn1; | How to do INSERT into a table records extracted from another table I'm trying to write a query that extracts and transforms data from a table and then insert those data into another table. Yes, this is a data warehousing query and I'm doing it in MS Access. So basically I want some query like this: INSERT INTO Table2(L... | TITLE:
How to do INSERT into a table records extracted from another table
QUESTION:
I'm trying to write a query that extracts and transforms data from a table and then insert those data into another table. Yes, this is a data warehousing query and I'm doing it in MS Access. So basically I want some query like this: IN... | [
"sql",
"ms-access"
] | 189 | 294 | 722,982 | 9 | 0 | 2008-09-16T16:19:55.923000 | 2008-09-16T16:23:34.010000 |
74,171 | 74,555 | Java Compilation - Is there a way to tell the compiler to ignore parts of my code? | I maintain a Java Swing application. For backwards compatibility with java 5 (for Apple machines), we maintain two codebases, 1 using features from Java 6, another without those features. The code is largely the same, except for 3-4 classes that uses Java 6 features. I wish to just maintain 1 codebase. Is there a way d... | Assuming that the classes have similar functionality with 1.5 vs. 6.0 differences in implementation you could merge them into one class. Then, without editing the source to comment/uncomment, you can rely on the optimization that the compiler always do. If an if expression is always false, the code in the if statement ... | Java Compilation - Is there a way to tell the compiler to ignore parts of my code? I maintain a Java Swing application. For backwards compatibility with java 5 (for Apple machines), we maintain two codebases, 1 using features from Java 6, another without those features. The code is largely the same, except for 3-4 clas... | TITLE:
Java Compilation - Is there a way to tell the compiler to ignore parts of my code?
QUESTION:
I maintain a Java Swing application. For backwards compatibility with java 5 (for Apple machines), we maintain two codebases, 1 using features from Java 6, another without those features. The code is largely the same, e... | [
"java",
"swing",
"compilation"
] | 12 | 4 | 9,232 | 14 | 0 | 2008-09-16T16:20:18.090000 | 2008-09-16T17:00:44.123000 |
74,206 | 74,237 | MS Word: Creating shortcut or toolbar button for the "Paste Special..Unformatted Text" option | I have been playing with this for a while, but the closest I have gotten is a button that opens the Paste Special dialog box and requires another couple of mouse clicks to paste the contents of the clipboard as unformatted text. So often I am doing a copy-paste from a web site into a document where I don't want the add... | Make the button call the macro: public sub PasteSpecialUnformatted() selection.pastespecial datatype:=wdpastetext end sub | MS Word: Creating shortcut or toolbar button for the "Paste Special..Unformatted Text" option I have been playing with this for a while, but the closest I have gotten is a button that opens the Paste Special dialog box and requires another couple of mouse clicks to paste the contents of the clipboard as unformatted tex... | TITLE:
MS Word: Creating shortcut or toolbar button for the "Paste Special..Unformatted Text" option
QUESTION:
I have been playing with this for a while, but the closest I have gotten is a button that opens the Paste Special dialog box and requires another couple of mouse clicks to paste the contents of the clipboard ... | [
"vba",
"ms-word",
"ms-office"
] | 8 | 7 | 1,747 | 4 | 0 | 2008-09-16T16:23:51.030000 | 2008-09-16T16:27:37.260000 |
74,248 | 74,646 | In JSTL/JSP, given a java.util.Date, how do I find the next day? | On a JSTL/JSP page, I have a java.util.Date object from my application. I need to find the day after the day specified by that object. I can use to drop into Java and use java.util.Calendar to do the necessary calculations, but this feels clumsy and inelegant to me. Is there some way to use JSP or JSTL tags to achieve ... | I'm not a fan of putting java code in your jsp. I'd use a static method and a taglib to accomplish this. Just my idea though. There are many ways to solve this problem. public static Date addDay(Date date){ //TODO you may want to check for a null date and handle it. Calendar cal = Calendar.getInstance(); cal.setTime (d... | In JSTL/JSP, given a java.util.Date, how do I find the next day? On a JSTL/JSP page, I have a java.util.Date object from my application. I need to find the day after the day specified by that object. I can use to drop into Java and use java.util.Calendar to do the necessary calculations, but this feels clumsy and inele... | TITLE:
In JSTL/JSP, given a java.util.Date, how do I find the next day?
QUESTION:
On a JSTL/JSP page, I have a java.util.Date object from my application. I need to find the day after the day specified by that object. I can use to drop into Java and use java.util.Calendar to do the necessary calculations, but this feel... | [
"java",
"jsp",
"jstl"
] | 1 | 6 | 16,783 | 5 | 0 | 2008-09-16T16:29:26.493000 | 2008-09-16T17:11:20.353000 |
74,261 | 74,281 | When is it time to change database backends? | Is there a general rule of thumb to follow when storing web application data to know what database backend should be used? Is the number of hits per day, number of rows of data, or other metrics that I should consider when choosing? My initial idea is that the order for this would look something like the following (but... | It's not quite that easy. The only general rule of thumb is that you should look for another solution when the current one can't keep up anymore. That could include using different software (not necessarily in any globally fixed order), hardware or architecture. You will probably get a lot more benefit out of caching d... | When is it time to change database backends? Is there a general rule of thumb to follow when storing web application data to know what database backend should be used? Is the number of hits per day, number of rows of data, or other metrics that I should consider when choosing? My initial idea is that the order for this... | TITLE:
When is it time to change database backends?
QUESTION:
Is there a general rule of thumb to follow when storing web application data to know what database backend should be used? Is the number of hits per day, number of rows of data, or other metrics that I should consider when choosing? My initial idea is that ... | [
"database",
"backend"
] | 1 | 8 | 997 | 14 | 0 | 2008-09-16T16:31:31.417000 | 2008-09-16T16:34:06.480000 |
74,266 | 75,619 | Rendering suggested values from an ext Combobox to an element in the DOM | I have an ext combobox which uses a store to suggest values to a user as they type. An example of which can be found here: combobox example Is there a way of making it so the suggested text list is rendered to an element in the DOM. Please note I do not mean the "applyTo" config option, as this would render the whole c... | You can use plugin for this, since you can call or even override private methods from within the plugin: var suggested_text_plugin = {
init: function(o) {
o.onTypeAhead = function() { // Original code from the sources goes here:
if(this.store.getCount() > 0){ var r = this.store.getAt(0); var newValue = r.data[this.d... | Rendering suggested values from an ext Combobox to an element in the DOM I have an ext combobox which uses a store to suggest values to a user as they type. An example of which can be found here: combobox example Is there a way of making it so the suggested text list is rendered to an element in the DOM. Please note I ... | TITLE:
Rendering suggested values from an ext Combobox to an element in the DOM
QUESTION:
I have an ext combobox which uses a store to suggest values to a user as they type. An example of which can be found here: combobox example Is there a way of making it so the suggested text list is rendered to an element in the D... | [
"javascript",
"extjs"
] | 2 | 1 | 3,176 | 5 | 0 | 2008-09-16T16:31:59.527000 | 2008-09-16T18:45:21.017000 |
74,267 | 74,321 | How to get an Batch file .bat continue onto the next statement if there is an error | I'm trying to script the shutdown of my VM Servers in a.bat. if one of the vmware-cmd commands fails (as the machine is already shutdown say), I'd like it to continue instead of bombing out. c: cd "c:\Program Files\VMWare\VmWare Server"
vmware-cmd C:\VMImages\TCVMDEVSQL01\TCVMDEVSQL01.vmx suspend soft -q vmware-cmd C:... | Run it inside another command instance with CMD /C CMD /C vmware-cmd C:\... This should keep the original BAT files running. | How to get an Batch file .bat continue onto the next statement if there is an error I'm trying to script the shutdown of my VM Servers in a.bat. if one of the vmware-cmd commands fails (as the machine is already shutdown say), I'd like it to continue instead of bombing out. c: cd "c:\Program Files\VMWare\VmWare Server"... | TITLE:
How to get an Batch file .bat continue onto the next statement if there is an error
QUESTION:
I'm trying to script the shutdown of my VM Servers in a.bat. if one of the vmware-cmd commands fails (as the machine is already shutdown say), I'd like it to continue instead of bombing out. c: cd "c:\Program Files\VMW... | [
"batch-file"
] | 20 | 32 | 50,893 | 5 | 0 | 2008-09-16T16:32:17.890000 | 2008-09-16T16:37:59.950000 |
74,269 | 74,504 | what is the difference between invalidateList and invalidateDisplayList? | I have a DataGrid, populated with objects in an ArrayCollection. After updating one of the objects' fields, I want the screen to update. The data source is not bindable, because I'm constructing it at runtime (and I don't understand how to make it bindable on the fly yet -- that's another question). In this situation, ... | invalidateList tells the component that the data has changed, and it needs to reload it and re-render it. invalidateDisplayList tells the component that it needs to redraw itself (but not necessarily reload its data). | what is the difference between invalidateList and invalidateDisplayList? I have a DataGrid, populated with objects in an ArrayCollection. After updating one of the objects' fields, I want the screen to update. The data source is not bindable, because I'm constructing it at runtime (and I don't understand how to make it... | TITLE:
what is the difference between invalidateList and invalidateDisplayList?
QUESTION:
I have a DataGrid, populated with objects in an ArrayCollection. After updating one of the objects' fields, I want the screen to update. The data source is not bindable, because I'm constructing it at runtime (and I don't underst... | [
"apache-flex",
"datagrid"
] | 10 | 18 | 14,310 | 2 | 0 | 2008-09-16T16:32:36.687000 | 2008-09-16T16:55:33.810000 |
74,315 | 144,686 | What is the best way to handle photo uploads? | I'm doing a website for a family member's wedding. A feature they requested was a photo section where all the guests could go after the wedding and upload their snaps. I said this was a stellar idea and I went off to build it. Well there's just the one problem: logistics. Upload speeds are slow and photos from modern c... | The most common solution for this is a java applet, although most of them are not free. Examples: http://www.jumploader.com/ http://www.aurigma.com/Products/ImageUploader/OnlineDemo.aspx http://www.javaatwork.com/java-upload-applet/details.html JUpload, mentioned by ScArcher2 | What is the best way to handle photo uploads? I'm doing a website for a family member's wedding. A feature they requested was a photo section where all the guests could go after the wedding and upload their snaps. I said this was a stellar idea and I went off to build it. Well there's just the one problem: logistics. U... | TITLE:
What is the best way to handle photo uploads?
QUESTION:
I'm doing a website for a family member's wedding. A feature they requested was a photo section where all the guests could go after the wedding and upload their snaps. I said this was a stellar idea and I went off to build it. Well there's just the one pro... | [
"java",
"php",
"javascript",
"flash"
] | 11 | 4 | 2,751 | 20 | 0 | 2008-09-16T16:37:26.783000 | 2008-09-27T23:05:29.970000 |
74,326 | 74,491 | How should I detect unnecessary #include files in a large C++ project? | I am working on a large C++ project in Visual Studio 2008, and there are a lot of files with unnecessary #include directives. Sometimes the #include s are just artifacts and everything will compile fine with them removed, and in other cases classes could be forward declared and the #include could be moved to the.cpp fi... | While it won't reveal unneeded include files, Visual studio has a setting /showIncludes (right click on a.cpp file, Properties->C/C++->Advanced ) that will output a tree of all included files at compile time. This can help in identifying files that shouldn't need to be included. You can also take a look at the pimpl id... | How should I detect unnecessary #include files in a large C++ project? I am working on a large C++ project in Visual Studio 2008, and there are a lot of files with unnecessary #include directives. Sometimes the #include s are just artifacts and everything will compile fine with them removed, and in other cases classes ... | TITLE:
How should I detect unnecessary #include files in a large C++ project?
QUESTION:
I am working on a large C++ project in Visual Studio 2008, and there are a lot of files with unnecessary #include directives. Sometimes the #include s are just artifacts and everything will compile fine with them removed, and in ot... | [
"c++",
"visual-studio-2008",
"include",
"header",
"dependencies"
] | 102 | 50 | 41,305 | 20 | 0 | 2008-09-16T16:38:54.830000 | 2008-09-16T16:54:14.200000 |
74,350 | 81,662 | How to fix an MFC Painting Glitch? | I'm trying to implement some drag and drop functionality for a material system being developed at my work. Part of this system includes a 'Material Library' which acts as a repository, divided into groups, of saved materials on the user's hard drive. As part of some UI polish, I was hoping to implement a 'highlight' ty... | Thanks for the answers guys, ajryan, you seem to always come up with help for my questions so extra thanks. Thankfully this time the answer was fairly straightforward.... ImageList_DragShowNolock(FALSE); m_pDragDropTargetWnd->SendMessage(WM_USER_DRAG_DROP_OBJECT_DRAG_ENTER, (WPARAM)pDragDropObject, (LPARAM)(&dragDropPo... | How to fix an MFC Painting Glitch? I'm trying to implement some drag and drop functionality for a material system being developed at my work. Part of this system includes a 'Material Library' which acts as a repository, divided into groups, of saved materials on the user's hard drive. As part of some UI polish, I was h... | TITLE:
How to fix an MFC Painting Glitch?
QUESTION:
I'm trying to implement some drag and drop functionality for a material system being developed at my work. Part of this system includes a 'Material Library' which acts as a repository, divided into groups, of saved materials on the user's hard drive. As part of some ... | [
"c++",
"mfc",
"paint"
] | 0 | 0 | 871 | 3 | 0 | 2008-09-16T16:41:09.897000 | 2008-09-17T10:05:47.687000 |
74,358 | 5,329,129 | How can I get LWP to validate SSL server certificates? | How can I get LWP to verify that the certificate of the server I'm connecting to is signed by a trusted authority and issued to the correct host? As far as I can tell, it doesn't even check that the certificate claims to be for the hostname I'm connecting to. That seems like a major security hole (especially with the r... | This long-standing security hole has finally been fixed in version 6.00 of libwww-perl. Starting with that version, by default LWP::UserAgent verifies that HTTPS servers present a valid certificate matching the expected hostname (unless $ENV{PERL_LWP_SSL_VERIFY_HOSTNAME} is set to a false value or, for backwards compat... | How can I get LWP to validate SSL server certificates? How can I get LWP to verify that the certificate of the server I'm connecting to is signed by a trusted authority and issued to the correct host? As far as I can tell, it doesn't even check that the certificate claims to be for the hostname I'm connecting to. That ... | TITLE:
How can I get LWP to validate SSL server certificates?
QUESTION:
How can I get LWP to verify that the certificate of the server I'm connecting to is signed by a trusted authority and issued to the correct host? As far as I can tell, it doesn't even check that the certificate claims to be for the hostname I'm co... | [
"perl",
"ssl",
"https",
"lwp"
] | 49 | 41 | 91,784 | 8 | 0 | 2008-09-16T16:41:49.597000 | 2011-03-16T17:20:31.593000 |
74,372 | 95,267 | How to overcome an incompatibility between the ksh on Linux vs. that installed on AIX/Solaris/HPUX? | I am involved in the process of porting a system containing several hundreds of ksh scripts from AIX, Solaris and HPUX to Linux. I have come across the following difference in the way ksh behaves on the two systems: #!/bin/ksh flag=false echo "a\nb" | while read x do flag=true done echo "flag = ${flag}" exit 0 On AIX, ... | After some advice from people in my company we decided to make the following modification to the code. This gives us the same result whether using the "real" ksh's (ksh88, ksh93) or any of the ksh clones (pdksh, MSK ksh). This also works correctly with bash. #!/bin/ksh echo "a\nb" > junk flag=false while read x do flag... | How to overcome an incompatibility between the ksh on Linux vs. that installed on AIX/Solaris/HPUX? I am involved in the process of porting a system containing several hundreds of ksh scripts from AIX, Solaris and HPUX to Linux. I have come across the following difference in the way ksh behaves on the two systems: #!/b... | TITLE:
How to overcome an incompatibility between the ksh on Linux vs. that installed on AIX/Solaris/HPUX?
QUESTION:
I am involved in the process of porting a system containing several hundreds of ksh scripts from AIX, Solaris and HPUX to Linux. I have come across the following difference in the way ksh behaves on the... | [
"linux",
"solaris",
"ksh",
"aix"
] | 6 | 3 | 19,660 | 8 | 0 | 2008-09-16T16:43:05.727000 | 2008-09-18T18:22:36.983000 |
74,385 | 74,469 | How to convert DateTime to VarChar | I need to convert a value which is in a DateTime variable into a varchar variable formatted as yyyy-mm-dd format (without time part). How do I do that? | With Microsoft Sql Server: -- -- Create test case -- DECLARE @myDateTime DATETIME SET @myDateTime = '2008-05-03'
-- -- Convert string -- SELECT LEFT(CONVERT(VARCHAR, @myDateTime, 120), 10) | How to convert DateTime to VarChar I need to convert a value which is in a DateTime variable into a varchar variable formatted as yyyy-mm-dd format (without time part). How do I do that? | TITLE:
How to convert DateTime to VarChar
QUESTION:
I need to convert a value which is in a DateTime variable into a varchar variable formatted as yyyy-mm-dd format (without time part). How do I do that?
ANSWER:
With Microsoft Sql Server: -- -- Create test case -- DECLARE @myDateTime DATETIME SET @myDateTime = '2008-... | [
"sql",
"sql-server",
"datetime",
"sql-convert"
] | 338 | 274 | 1,649,543 | 24 | 0 | 2008-09-16T16:44:22.087000 | 2008-09-16T16:52:35.047000 |
74,386 | 74,456 | Using DLR from Unmanaged Code | Is it possible to call managed code, specifically IronRuby or IronPython from unamanaged code such as C++ or Delphi? For example, we have an application written in Delphi that is being moved to C#.NET We'd like to provide Ruby or Python scripting in our new application to replace VBSCRIPT. However, we would need to pro... | Yes. Delphi for Win32 example here: http://interop.managed-vcl.com/ Shows how to use a C# as well as a Delphi.NET assembly from Delphi for Win32. | Using DLR from Unmanaged Code Is it possible to call managed code, specifically IronRuby or IronPython from unamanaged code such as C++ or Delphi? For example, we have an application written in Delphi that is being moved to C#.NET We'd like to provide Ruby or Python scripting in our new application to replace VBSCRIPT.... | TITLE:
Using DLR from Unmanaged Code
QUESTION:
Is it possible to call managed code, specifically IronRuby or IronPython from unamanaged code such as C++ or Delphi? For example, we have an application written in Delphi that is being moved to C#.NET We'd like to provide Ruby or Python scripting in our new application to... | [
".net",
"delphi",
"ironpython",
"unmanaged",
"ironruby"
] | 5 | 8 | 902 | 6 | 0 | 2008-09-16T16:44:27.547000 | 2008-09-16T16:51:53.990000 |
74,392 | 74,541 | Is it possible to use Jackpot outside of NetBeans, without NetBeans projects? | I know there is a Jackpot API http://jackpot.netbeans.org/docs/org-netbeans-modules-jackpot/overview-summary.html for programmatic access the the rules engine, has anyone had success seperating this from NetBeans itself? So it can operate on any Java source files? | Answering my own question, but the answer, sadly, is no. http://netbeans.org/community/articles/interviews/tom-ball-interview.html | Is it possible to use Jackpot outside of NetBeans, without NetBeans projects? I know there is a Jackpot API http://jackpot.netbeans.org/docs/org-netbeans-modules-jackpot/overview-summary.html for programmatic access the the rules engine, has anyone had success seperating this from NetBeans itself? So it can operate on ... | TITLE:
Is it possible to use Jackpot outside of NetBeans, without NetBeans projects?
QUESTION:
I know there is a Jackpot API http://jackpot.netbeans.org/docs/org-netbeans-modules-jackpot/overview-summary.html for programmatic access the the rules engine, has anyone had success seperating this from NetBeans itself? So ... | [
"java",
"netbeans"
] | 2 | 1 | 556 | 2 | 0 | 2008-09-16T16:45:29.807000 | 2008-09-16T16:59:05.673000 |
74,422 | 74,487 | Game Loop and GDI over .NET CF | Hi i want to write a game with a main game form and lot of other normal forms. What is the best way to manage update-paint cycle in that case? Should the game form paint loop only should be overriden? or should i do an application.do events() in the main method? Please guide me regarding this. i am new to windows forms... | Your logic thread should be separate from the form, so you won't need DoEvents(). If you're using GDI+, then you should force an Update() on a loop. Windows Forms doesn't do double buffering very well, so depending on how sophisticated your graphics will be you might have some difficulties with flicker. My suggestion i... | Game Loop and GDI over .NET CF Hi i want to write a game with a main game form and lot of other normal forms. What is the best way to manage update-paint cycle in that case? Should the game form paint loop only should be overriden? or should i do an application.do events() in the main method? Please guide me regarding ... | TITLE:
Game Loop and GDI over .NET CF
QUESTION:
Hi i want to write a game with a main game form and lot of other normal forms. What is the best way to manage update-paint cycle in that case? Should the game form paint loop only should be overriden? or should i do an application.do events() in the main method? Please g... | [
"c#",
"game-loop"
] | 0 | 1 | 2,557 | 3 | 0 | 2008-09-16T16:48:52.357000 | 2008-09-16T16:53:52.080000 |
74,430 | 75,427 | Random in python 2.5 not working? | I am trying to use the import random statement in python, but it doesn't appear to have any methods in it to use. Am I missing something? | You probably have a file named random.py or random.pyc in your working directory. That's shadowing the built-in random module. You need to rename random.py to something like my_random.py and/or remove the random.pyc file. To tell for sure what's going on, do this: >>> import random >>> print random.__file__ That will s... | Random in python 2.5 not working? I am trying to use the import random statement in python, but it doesn't appear to have any methods in it to use. Am I missing something? | TITLE:
Random in python 2.5 not working?
QUESTION:
I am trying to use the import random statement in python, but it doesn't appear to have any methods in it to use. Am I missing something?
ANSWER:
You probably have a file named random.py or random.pyc in your working directory. That's shadowing the built-in random mo... | [
"python"
] | 9 | 36 | 5,509 | 8 | 0 | 2008-09-16T16:49:33.963000 | 2008-09-16T18:26:02.610000 |
74,443 | 74,557 | Managing authorized_keys on a large number of hosts | What is the easiest way to manage the authorized_keys file for openssh across a large number of hosts? If I need to add or revoke a new key to an account on 10 hosts say, I must login and add the public key manually, or through a clumsy shell script, which is time consuming. Ideally there would be a central database li... | I'd checkout the Monkeysphere project. It uses OpenPGP's web of trust concepts to manage ssh's authorized_keys and known_hosts files, without requiring changes to the ssh client or server. | Managing authorized_keys on a large number of hosts What is the easiest way to manage the authorized_keys file for openssh across a large number of hosts? If I need to add or revoke a new key to an account on 10 hosts say, I must login and add the public key manually, or through a clumsy shell script, which is time con... | TITLE:
Managing authorized_keys on a large number of hosts
QUESTION:
What is the easiest way to manage the authorized_keys file for openssh across a large number of hosts? If I need to add or revoke a new key to an account on 10 hosts say, I must login and add the public key manually, or through a clumsy shell script,... | [
"unix",
"authentication",
"ssh",
"openssh"
] | 11 | 5 | 6,592 | 4 | 0 | 2008-09-16T16:50:57.347000 | 2008-09-16T17:00:50.770000 |
74,447 | 74,811 | Is it possible to connect to Mac OS X 10.5 Leopard's built in vnc server at a low color depth from Windows? | If I attempt to connect to Mac OS X 10.5 Leopard's built in vnc server at a low color depth from Windows, the client bombs after connecting. It only works when I set it to the highest color depth. I've tried with at least 3 windows VNC clients. Any ideas? There some setting I can set in Mac OS X? It takes about 20 seco... | Not with the builtin VNC server. Vine Server allows you to change the bit depth that clients connect at though. | Is it possible to connect to Mac OS X 10.5 Leopard's built in vnc server at a low color depth from Windows? If I attempt to connect to Mac OS X 10.5 Leopard's built in vnc server at a low color depth from Windows, the client bombs after connecting. It only works when I set it to the highest color depth. I've tried with... | TITLE:
Is it possible to connect to Mac OS X 10.5 Leopard's built in vnc server at a low color depth from Windows?
QUESTION:
If I attempt to connect to Mac OS X 10.5 Leopard's built in vnc server at a low color depth from Windows, the client bombs after connecting. It only works when I set it to the highest color dept... | [
"windows",
"macos",
"vnc"
] | 4 | 3 | 4,803 | 6 | 0 | 2008-09-16T16:51:29.387000 | 2008-09-16T17:28:30.390000 |
74,451 | 81,493 | Getting actual file name (with proper casing) on Windows | Windows file system is case insensitive. How, given a file/folder name (e.g. "somefile"), I get the actual name of that file/folder (e.g. it should return "SomeFile" if Explorer displays it so)? Some ways I know, all of which seem quite backwards: Given the full path, search for each folder on the path (via FindFirstFi... | And hereby I answer my own question, based on original answer from cspirz. Here's a function that given absolute, relative or network path, will return the path with upper/lower case as it would be displayed on Windows. If some component of the path does not exist, it will return the passed in path from that point. It ... | Getting actual file name (with proper casing) on Windows Windows file system is case insensitive. How, given a file/folder name (e.g. "somefile"), I get the actual name of that file/folder (e.g. it should return "SomeFile" if Explorer displays it so)? Some ways I know, all of which seem quite backwards: Given the full ... | TITLE:
Getting actual file name (with proper casing) on Windows
QUESTION:
Windows file system is case insensitive. How, given a file/folder name (e.g. "somefile"), I get the actual name of that file/folder (e.g. it should return "SomeFile" if Explorer displays it so)? Some ways I know, all of which seem quite backward... | [
"c++",
"c",
"windows",
"winapi"
] | 22 | 4 | 9,048 | 8 | 0 | 2008-09-16T16:51:45.410000 | 2008-09-17T09:35:02.750000 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.