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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
186,527 | 186,550 | How to synchronize the access to a List<T> used in ASP.NET? | I have some problems on a site with the concurrent access to a list. This list keeps a cart of items, and multiple deletes are crashing the site. Which is the best method to sync them? Is a lock enough? The lock option seems to be ugly because the code is spread all over the place and is pretty messy. Update: This is a... | So is this in-memory list shared between requests? That sounds like a potential cause of problems even when you've got locking. Mutable shared collections should generally be avoided, IME. Note that if you do decide to synchronize, you'll need to do things like locking the list for the whole course of iterating over it... | How to synchronize the access to a List<T> used in ASP.NET? I have some problems on a site with the concurrent access to a list. This list keeps a cart of items, and multiple deletes are crashing the site. Which is the best method to sync them? Is a lock enough? The lock option seems to be ugly because the code is spre... | TITLE:
How to synchronize the access to a List<T> used in ASP.NET?
QUESTION:
I have some problems on a site with the concurrent access to a list. This list keeps a cart of items, and multiple deletes are crashing the site. Which is the best method to sync them? Is a lock enough? The lock option seems to be ugly becaus... | [
"c#",
"asp.net",
".net",
"multithreading",
"access-synchronization"
] | 5 | 7 | 10,900 | 4 | 0 | 2008-10-09T09:27:38.257000 | 2008-10-09T09:40:21.103000 |
186,549 | 186,598 | Anyone using Microsoft ASML language? | To me the concept of "Gurevich Abstract State Machine" (formerly known as "evolving algebras") seems very promising to provide a solid fundation to systems behaviours. It could be what relational algebra is for databases: the underlying theoretic fundation. The most complete implementation, to my knowledge, is the Micr... | I tried it several years back, but it seemed the project became stale. It is a pity, as I kinda liked it. | Anyone using Microsoft ASML language? To me the concept of "Gurevich Abstract State Machine" (formerly known as "evolving algebras") seems very promising to provide a solid fundation to systems behaviours. It could be what relational algebra is for databases: the underlying theoretic fundation. The most complete implem... | TITLE:
Anyone using Microsoft ASML language?
QUESTION:
To me the concept of "Gurevich Abstract State Machine" (formerly known as "evolving algebras") seems very promising to provide a solid fundation to systems behaviours. It could be what relational algebra is for databases: the underlying theoretic fundation. The mo... | [
".net",
"asml"
] | 3 | 1 | 407 | 1 | 0 | 2008-10-09T09:40:15.267000 | 2008-10-09T09:57:33.190000 |
186,569 | 186,595 | Does a user need admin rights to install Flash player? | Will users who do not have admin rights on their computers be able to upgrade to new Flash player version by themselves? This would be interesting to know for: Windows 98 Windows XP/2000/Vista Macs Unix/Linux | Take a look at the Adobe instructions for more clarification... I know on Linux, at least, you do not need admin privs. Flash is installed in ~/.mozilla/plugins when you use the.tar.gz ed installer script. On Windows, I think there's only the option of doing a system-wide install so you need Administrator rights. From ... | Does a user need admin rights to install Flash player? Will users who do not have admin rights on their computers be able to upgrade to new Flash player version by themselves? This would be interesting to know for: Windows 98 Windows XP/2000/Vista Macs Unix/Linux | TITLE:
Does a user need admin rights to install Flash player?
QUESTION:
Will users who do not have admin rights on their computers be able to upgrade to new Flash player version by themselves? This would be interesting to know for: Windows 98 Windows XP/2000/Vista Macs Unix/Linux
ANSWER:
Take a look at the Adobe inst... | [
"windows",
"linux",
"flash",
"macos",
"unix"
] | 3 | 5 | 12,478 | 5 | 0 | 2008-10-09T09:44:28.097000 | 2008-10-09T09:56:30.460000 |
186,572 | 186,582 | Retrieving the date in SQL Server; CURRENT_TIMESTAMP vs GetDate() | Using SQL Server, which is the fastest or best practice method to use for date retrieval? Is there a difference between CURRENT_TIMESTAMP and GetDate()? | CURRENT_TIMESTAMP is standard ANSI SQL, and so is theoretically one tiny little island of 'don't need to change' amongst your thousands of SQL Server-specific lines of SQL if you ever need to move databases.... | Retrieving the date in SQL Server; CURRENT_TIMESTAMP vs GetDate() Using SQL Server, which is the fastest or best practice method to use for date retrieval? Is there a difference between CURRENT_TIMESTAMP and GetDate()? | TITLE:
Retrieving the date in SQL Server; CURRENT_TIMESTAMP vs GetDate()
QUESTION:
Using SQL Server, which is the fastest or best practice method to use for date retrieval? Is there a difference between CURRENT_TIMESTAMP and GetDate()?
ANSWER:
CURRENT_TIMESTAMP is standard ANSI SQL, and so is theoretically one tiny l... | [
"sql-server",
"datetime",
"getdate"
] | 74 | 96 | 30,588 | 4 | 0 | 2008-10-09T09:47:36.983000 | 2008-10-09T09:52:15.540000 |
186,581 | 186,593 | When do you design the GUI first and the backend code later, or vice versa? | When I'm working on a project, sometimes I'll design the GUI first and then write the backend code to make it work, but other times I'll do the opposite and make the GUI once I have the system working. How do you choose which way round to code and are there any particular types of project or circumstances that would le... | You need to create something which would let your testers start immediately. Try to think from that prospective. If they are working on manual UI testing give them a shell of UI with stubs for all the functionality. If there is an interface to be tested make sure it works (even if it returns dummy data) so they could s... | When do you design the GUI first and the backend code later, or vice versa? When I'm working on a project, sometimes I'll design the GUI first and then write the backend code to make it work, but other times I'll do the opposite and make the GUI once I have the system working. How do you choose which way round to code ... | TITLE:
When do you design the GUI first and the backend code later, or vice versa?
QUESTION:
When I'm working on a project, sometimes I'll design the GUI first and then write the backend code to make it work, but other times I'll do the opposite and make the GUI once I have the system working. How do you choose which ... | [
"user-interface",
"language-agnostic"
] | 13 | 12 | 7,514 | 9 | 0 | 2008-10-09T09:51:42.030000 | 2008-10-09T09:55:39.777000 |
186,588 | 188,682 | Which is fastest? SELECT SQL_CALC_FOUND_ROWS FROM `table`, or SELECT COUNT(*) | When you limit the number of rows to be returned by a SQL query, usually used in paging, there are two methods to determine the total number of records: Method 1 Include the SQL_CALC_FOUND_ROWS option in the original SELECT, and then get the total number of rows by running SELECT FOUND_ROWS(): SELECT SQL_CALC_FOUND_ROW... | It depends. See the MySQL Performance Blog post on this subject: To SQL_CALC_FOUND_ROWS or not to SQL_CALC_FOUND_ROWS? Just a quick summary: Peter says that it depends on your indexes and other factors. Many of the comments to the post seem to say that SQL_CALC_FOUND_ROWS is almost always slower - sometimes up to 10x s... | Which is fastest? SELECT SQL_CALC_FOUND_ROWS FROM `table`, or SELECT COUNT(*) When you limit the number of rows to be returned by a SQL query, usually used in paging, there are two methods to determine the total number of records: Method 1 Include the SQL_CALC_FOUND_ROWS option in the original SELECT, and then get the ... | TITLE:
Which is fastest? SELECT SQL_CALC_FOUND_ROWS FROM `table`, or SELECT COUNT(*)
QUESTION:
When you limit the number of rows to be returned by a SQL query, usually used in paging, there are two methods to determine the total number of records: Method 1 Include the SQL_CALC_FOUND_ROWS option in the original SELECT,... | [
"mysql",
"optimization"
] | 194 | 131 | 160,791 | 8 | 0 | 2008-10-09T09:53:56.067000 | 2008-10-09T18:58:57.933000 |
186,600 | 186,613 | Get Visual Studio to throw exceptions across threads | In my Silverlight project I have a thread that fires every x milliseconds. In this thread I was attempting to change the state of the application. This wasn't working and I didn't know why, so put a breakpoint in to the Timer callback. The breakpoint was hit, but the minute I attempted to change the state it just baile... | Can you change the break handling for InvalidOperationException so it breaks immediately rather than only if it's unhandled? | Get Visual Studio to throw exceptions across threads In my Silverlight project I have a thread that fires every x milliseconds. In this thread I was attempting to change the state of the application. This wasn't working and I didn't know why, so put a breakpoint in to the Timer callback. The breakpoint was hit, but the... | TITLE:
Get Visual Studio to throw exceptions across threads
QUESTION:
In my Silverlight project I have a thread that fires every x milliseconds. In this thread I was attempting to change the state of the application. This wasn't working and I didn't know why, so put a breakpoint in to the Timer callback. The breakpoin... | [
"visual-studio-2008",
"multithreading",
"exception",
"silverlight-2-rc0"
] | 0 | 4 | 2,094 | 1 | 0 | 2008-10-09T09:58:30.723000 | 2008-10-09T10:04:35.577000 |
186,615 | 187,317 | How to set up Eclipse TPTP | I need to profile a java application for a customer. It's an eclipse/maven project, so I decided on using eclipse TPTP ( http://www.eclipse.org/tptp ). I tried to install eclipse TPTP through the update manager from a standard eclipse installation, but I gave up because of the unbelievable complex setup and downloading... | An alternative is to use Netbeans to profile an Eclipse Application. I have a blog post on the link below that explains how to configure both applications: http://www.jroller.com/ortegon/entry/on_profiling_eclipse_rcp_applications It works very well. I've been profiling this way from over a year. Easy to use, easy to s... | How to set up Eclipse TPTP I need to profile a java application for a customer. It's an eclipse/maven project, so I decided on using eclipse TPTP ( http://www.eclipse.org/tptp ). I tried to install eclipse TPTP through the update manager from a standard eclipse installation, but I gave up because of the unbelievable co... | TITLE:
How to set up Eclipse TPTP
QUESTION:
I need to profile a java application for a customer. It's an eclipse/maven project, so I decided on using eclipse TPTP ( http://www.eclipse.org/tptp ). I tried to install eclipse TPTP through the update manager from a standard eclipse installation, but I gave up because of t... | [
"java",
"eclipse",
"jakarta-ee",
"profiling"
] | 10 | 1 | 12,749 | 5 | 0 | 2008-10-09T10:05:34.327000 | 2008-10-09T13:48:34.563000 |
186,619 | 186,632 | How to unit test a pseudo random number generator? | I have a pseudo random number generator (PRNG) class that I want to unit test. There are two approaches: write a test case that takes a large amount of samples and test whether they are properly distributed. This approach may lead to a fairly long execution time for the test case; calculate a small series of samples 'b... | Get another implementation of the same PRNG algorithm, generate a smallish number of longish test cases based on known seeds, and verify that your implementation of the algorithm matches everyone else's implementations. The more data you test, the more chance it does. If you want to be serious, look into how FIPS valid... | How to unit test a pseudo random number generator? I have a pseudo random number generator (PRNG) class that I want to unit test. There are two approaches: write a test case that takes a large amount of samples and test whether they are properly distributed. This approach may lead to a fairly long execution time for th... | TITLE:
How to unit test a pseudo random number generator?
QUESTION:
I have a pseudo random number generator (PRNG) class that I want to unit test. There are two approaches: write a test case that takes a large amount of samples and test whether they are properly distributed. This approach may lead to a fairly long exe... | [
"unit-testing",
"random"
] | 36 | 32 | 18,369 | 13 | 0 | 2008-10-09T10:06:43.390000 | 2008-10-09T10:12:01.520000 |
186,621 | 187,116 | How to add jars dynamically with jython embedded in Tomcat app? | I want to let the users of my app, which is in turn an app container (app contains subapps), add java jars to their jython path. I let the subapp managers write thir own extensions in jython, but some of the functionality they want to add needs additional jars. For example, if they want to check a svn repo, they need t... | It is funny. It did not work from the command line, but it does when trying from tomcat. Might there be a delay in caching or so? In the command line, if I try a non-existant import, the cache manager shows the new package found for the newly added jar. And then it works. | How to add jars dynamically with jython embedded in Tomcat app? I want to let the users of my app, which is in turn an app container (app contains subapps), add java jars to their jython path. I let the subapp managers write thir own extensions in jython, but some of the functionality they want to add needs additional ... | TITLE:
How to add jars dynamically with jython embedded in Tomcat app?
QUESTION:
I want to let the users of my app, which is in turn an app container (app contains subapps), add java jars to their jython path. I let the subapp managers write thir own extensions in jython, but some of the functionality they want to add... | [
"tomcat",
"classpath",
"jython"
] | 2 | 1 | 2,448 | 1 | 0 | 2008-10-09T10:06:59.240000 | 2008-10-09T12:52:46.267000 |
186,631 | 186,695 | REST / SOAP endpoints for a WCF service | I have a WCF service and I want to expose it as both a RESTfull service and as a SOAP service. Anyone has done something like this before? | You can expose the service in two different endpoints. the SOAP one can use the binding that support SOAP e.g. basicHttpBinding, the RESTful one can use the webHttpBinding. I assume your REST service will be in JSON, in that case, you need to configure the two endpoints with the following behaviour configuration An exa... | REST / SOAP endpoints for a WCF service I have a WCF service and I want to expose it as both a RESTfull service and as a SOAP service. Anyone has done something like this before? | TITLE:
REST / SOAP endpoints for a WCF service
QUESTION:
I have a WCF service and I want to expose it as both a RESTfull service and as a SOAP service. Anyone has done something like this before?
ANSWER:
You can expose the service in two different endpoints. the SOAP one can use the binding that support SOAP e.g. bas... | [
"wcf",
"rest",
"soap"
] | 436 | 593 | 281,630 | 6 | 0 | 2008-10-09T10:11:30.150000 | 2008-10-09T10:39:29.563000 |
186,633 | 186,721 | window.showModalDialog Page Load not being executed | I am actually loading a page as a modal dialog box as window.showModalDialog("url.aspx"). The first time the modal dialog is poped up the page load event gets called. When i close it and call the same again, the Control does not come to the PageLoad. Instead the page pops up with the previous values in all its controls... | ok....you do know showModalDialog is an proprietary IE only feature? As long as you are aware of this then I think you may need to add a unique querystring value to the url that you are using to avoid ie showing the cached version. So generate a random number and append it to the url e.g url.aspx?rnd=12237827348273. Th... | window.showModalDialog Page Load not being executed I am actually loading a page as a modal dialog box as window.showModalDialog("url.aspx"). The first time the modal dialog is poped up the page load event gets called. When i close it and call the same again, the Control does not come to the PageLoad. Instead the page ... | TITLE:
window.showModalDialog Page Load not being executed
QUESTION:
I am actually loading a page as a modal dialog box as window.showModalDialog("url.aspx"). The first time the modal dialog is poped up the page load event gets called. When i close it and call the same again, the Control does not come to the PageLoad.... | [
"asp.net",
"asp.net-1.1"
] | 2 | 1 | 4,379 | 3 | 0 | 2008-10-09T10:12:37.777000 | 2008-10-09T10:50:13.550000 |
186,640 | 186,664 | Create COM component and ActiveX controls | Is is possible to create COM component and ActiveX controls in.Net (using c# language). I searched internet but i could`t get anything. Thanks, santhosh | Declare an interface and implement it with class. If you have parameters/return values that are not OLE Automation compatible (custom structs, enums and so on), you might need to decorate them with the MarshalAs attribute. Add the GUID attribute to both. Add the COMVisible attribute to both. Alternatively, you can mark... | Create COM component and ActiveX controls Is is possible to create COM component and ActiveX controls in.Net (using c# language). I searched internet but i could`t get anything. Thanks, santhosh | TITLE:
Create COM component and ActiveX controls
QUESTION:
Is is possible to create COM component and ActiveX controls in.Net (using c# language). I searched internet but i could`t get anything. Thanks, santhosh
ANSWER:
Declare an interface and implement it with class. If you have parameters/return values that are no... | [
"c#",
".net",
".net-3.5"
] | 5 | 7 | 6,541 | 4 | 0 | 2008-10-09T10:15:19.660000 | 2008-10-09T10:24:56.427000 |
186,643 | 186,685 | Visual Studio References and versioning - how does it work? | We have several common libs. Ideally we want them all to use the latest version of a dll even if they have been compiled against an older different version (assume the latest version is backward compatible) e.g we have: Project dll Common controls dll Logging dll Database access dll Project and common controls referenc... | By default, for versioned DLLs I believe VS will force an exact match. If you look in the properties of the reference, however, you'll find a property called "Specific Version". Set that to "false" and it will match later versions. I don't have the full version of VS with me to find an appropriate MSDN link, unfortunat... | Visual Studio References and versioning - how does it work? We have several common libs. Ideally we want them all to use the latest version of a dll even if they have been compiled against an older different version (assume the latest version is backward compatible) e.g we have: Project dll Common controls dll Logging ... | TITLE:
Visual Studio References and versioning - how does it work?
QUESTION:
We have several common libs. Ideally we want them all to use the latest version of a dll even if they have been compiled against an older different version (assume the latest version is backward compatible) e.g we have: Project dll Common con... | [
".net",
"visual-studio",
"dll"
] | 14 | 11 | 18,867 | 4 | 0 | 2008-10-09T10:16:05.133000 | 2008-10-09T10:35:36.280000 |
186,653 | 186,667 | Get the index of the nth occurrence of a string? | Unless I am missing an obvious built-in method, what is the quickest way to get the n th occurrence of a string within a string? I realize that I could loop the IndexOf method by updating its start index on each iteration of the loop. But doing it this way seems wasteful to me. | That's basically what you need to do - or at least, it's the easiest solution. All you'd be "wasting" is the cost of n method invocations - you won't actually be checking any case twice, if you think about it. (IndexOf will return as soon as it finds the match, and you'll keep going from where it left off.) | Get the index of the nth occurrence of a string? Unless I am missing an obvious built-in method, what is the quickest way to get the n th occurrence of a string within a string? I realize that I could loop the IndexOf method by updating its start index on each iteration of the loop. But doing it this way seems wasteful... | TITLE:
Get the index of the nth occurrence of a string?
QUESTION:
Unless I am missing an obvious built-in method, what is the quickest way to get the n th occurrence of a string within a string? I realize that I could loop the IndexOf method by updating its start index on each iteration of the loop. But doing it this ... | [
"c#",
".net",
"string",
"indexing",
"indexof"
] | 107 | 54 | 76,975 | 11 | 0 | 2008-10-09T10:20:00.210000 | 2008-10-09T10:26:51.290000 |
186,655 | 186,712 | dd/mm automatically got changed to mm/dd | I coded something using Date statement in Access VBA. It was working fine until the start of this month, but now I am seeing that the Date has automatically changed the format from dd/mm/yyyy to mm/dd/yyyy. Has anyone else encountered the same problem? | The default Access SQL date format, regardless of locale, is mm/dd/yyyy. If you use an invalid date format, it will 'helpfully' try to convert that to a valid date for you. So, if you use '30/09/2008', it will recognize you're using dd/mm/yyyy, and convert it appropriately. However, a value like '10/01/2008' is a valid... | dd/mm automatically got changed to mm/dd I coded something using Date statement in Access VBA. It was working fine until the start of this month, but now I am seeing that the Date has automatically changed the format from dd/mm/yyyy to mm/dd/yyyy. Has anyone else encountered the same problem? | TITLE:
dd/mm automatically got changed to mm/dd
QUESTION:
I coded something using Date statement in Access VBA. It was working fine until the start of this month, but now I am seeing that the Date has automatically changed the format from dd/mm/yyyy to mm/dd/yyyy. Has anyone else encountered the same problem?
ANSWER:... | [
"vba",
"ms-access",
"ms-office"
] | 5 | 8 | 16,909 | 6 | 0 | 2008-10-09T10:20:50.817000 | 2008-10-09T10:45:15.933000 |
186,656 | 186,672 | Where to store uploaded files (sound, pictures and video) | A while a go I had to developed a music site that allowed audio files to be uploaded to a site and then converted in to various formats using ffmpeg, people would then download the uploaded audio files after purchasing them and a tmp file would be created and placed at the download location and was only valid for each ... | See this earlier StackOverflow question Storing images in a database, Yea or nay?. I know you mentioned images and video, however this question has relevance to all large binary content media files. The consensus seems to be that storing file paths to the images on the filesystem, rather then the actual images is the w... | Where to store uploaded files (sound, pictures and video) A while a go I had to developed a music site that allowed audio files to be uploaded to a site and then converted in to various formats using ffmpeg, people would then download the uploaded audio files after purchasing them and a tmp file would be created and pl... | TITLE:
Where to store uploaded files (sound, pictures and video)
QUESTION:
A while a go I had to developed a music site that allowed audio files to be uploaded to a site and then converted in to various formats using ffmpeg, people would then download the uploaded audio files after purchasing them and a tmp file would... | [
"php",
"mysql",
"storage",
"blob"
] | 5 | 12 | 5,361 | 5 | 0 | 2008-10-09T10:21:19.070000 | 2008-10-09T10:28:09.680000 |
186,657 | 186,691 | Enable ViewState for few controls and disable for others/page | When I disable ViewState for the page. It does not allow any other control to use ViewState.. even if I set EnableViewState="true" for that particular control.. is it possible to enable ViewState for a control when ViewState is disabled for the page itself? if not how can disable viewstate for controls on page except f... | If you set turn page's ViewState off, then there is no way for you to enable ViewState for specific components. This is because ViewState is serialzed recursively, so when if the Page is not allowing ViewState, it will not serialize the ViewState for any of it's child controls. In answer to your question, if you don't ... | Enable ViewState for few controls and disable for others/page When I disable ViewState for the page. It does not allow any other control to use ViewState.. even if I set EnableViewState="true" for that particular control.. is it possible to enable ViewState for a control when ViewState is disabled for the page itself? ... | TITLE:
Enable ViewState for few controls and disable for others/page
QUESTION:
When I disable ViewState for the page. It does not allow any other control to use ViewState.. even if I set EnableViewState="true" for that particular control.. is it possible to enable ViewState for a control when ViewState is disabled for... | [
"c#",
"asp.net",
"viewstate"
] | 13 | 22 | 23,583 | 8 | 0 | 2008-10-09T10:21:32.393000 | 2008-10-09T10:38:09.237000 |
186,693 | 186,705 | How do I cope with rounding errors on doubles in vb.net? | I'm trying to balance a set of currency values using vb.net. The totals for both these values is cast as a double. I'm getting rounding errors in some situations. What's the best way to avoid this? Is there a type I can use in preference to double? How do I round the resultant value to two decimal places? Here's my cod... | For financial calculations I believe that the current wisdom is to use Decimals instead of Doubles. You might be interested in this discussion Decimal Vs. Double. | How do I cope with rounding errors on doubles in vb.net? I'm trying to balance a set of currency values using vb.net. The totals for both these values is cast as a double. I'm getting rounding errors in some situations. What's the best way to avoid this? Is there a type I can use in preference to double? How do I round... | TITLE:
How do I cope with rounding errors on doubles in vb.net?
QUESTION:
I'm trying to balance a set of currency values using vb.net. The totals for both these values is cast as a double. I'm getting rounding errors in some situations. What's the best way to avoid this? Is there a type I can use in preference to doub... | [
"vb.net",
"rounding-error"
] | 2 | 5 | 3,266 | 2 | 0 | 2008-10-09T10:38:32.200000 | 2008-10-09T10:43:39.647000 |
186,718 | 186,739 | Delphi 7 exception not caught | I have some really complicated legacy code I've been working on that crashes when collecting big chunks of data. I've been unable to find the exact reason for the crashes and am trying different ways to solve it or at least recover nicely. The last thing I did was enclose the crashing code in a try... except cleanup();... | "Very low address" probably means that somebody tried to call a virtual method on an object that was not really there (i.e. was 'nil'). For example: TStringList(nil).Clear; The first part is very mysterious, though. I have no idea how that can happen. I think you should try to catch that exception with madExcept. It ha... | Delphi 7 exception not caught I have some really complicated legacy code I've been working on that crashes when collecting big chunks of data. I've been unable to find the exact reason for the crashes and am trying different ways to solve it or at least recover nicely. The last thing I did was enclose the crashing code... | TITLE:
Delphi 7 exception not caught
QUESTION:
I have some really complicated legacy code I've been working on that crashes when collecting big chunks of data. I've been unable to find the exact reason for the crashes and am trying different ways to solve it or at least recover nicely. The last thing I did was enclose... | [
"delphi",
"exception"
] | 3 | 9 | 3,804 | 7 | 0 | 2008-10-09T10:49:34.317000 | 2008-10-09T10:55:55.990000 |
186,734 | 186,749 | How do I detect Mobile Safari server side using PHP? | Mobile Safari is a very capable browser, and it can handle my website as it is perfectly. However, there are a few elements on my page that could be optimized for browsing using this device; such as serving specific thumbnails that are smaller than the desktop counterparts to help fit more content into the screen. I wo... | Compare the user agent string with the one of a Safari Mobile uses: Safari Mobile User Agent String | How do I detect Mobile Safari server side using PHP? Mobile Safari is a very capable browser, and it can handle my website as it is perfectly. However, there are a few elements on my page that could be optimized for browsing using this device; such as serving specific thumbnails that are smaller than the desktop counte... | TITLE:
How do I detect Mobile Safari server side using PHP?
QUESTION:
Mobile Safari is a very capable browser, and it can handle my website as it is perfectly. However, there are a few elements on my page that could be optimized for browsing using this device; such as serving specific thumbnails that are smaller than ... | [
"php",
"iphone",
"optimization",
"mobile-safari"
] | 8 | 2 | 18,657 | 6 | 0 | 2008-10-09T10:54:32.747000 | 2008-10-09T10:59:50.270000 |
186,737 | 186,748 | What's the fastest way to delete a large folder in Windows? | I want to delete a folder that contains thousands of files and folders. If I use Windows Explorer to delete the folder it can take 10-15 minutes (not always, but often). Is there a faster way in Windows to delete folders? Other details: I don't care about the recycle bin. It's an NTFS drive. | Using Windows Command Prompt: rmdir /s /q folder Using Powershell: powershell -Command "Remove-Item -LiteralPath 'folder' -Force -Recurse" Note that in more cases del and rmdir wil leave you with leftover files, where Powershell manages to delete the files. | What's the fastest way to delete a large folder in Windows? I want to delete a folder that contains thousands of files and folders. If I use Windows Explorer to delete the folder it can take 10-15 minutes (not always, but often). Is there a faster way in Windows to delete folders? Other details: I don't care about the ... | TITLE:
What's the fastest way to delete a large folder in Windows?
QUESTION:
I want to delete a folder that contains thousands of files and folders. If I use Windows Explorer to delete the folder it can take 10-15 minutes (not always, but often). Is there a faster way in Windows to delete folders? Other details: I don... | [
"windows",
"windows-xp",
"file-management"
] | 224 | 404 | 534,734 | 6 | 0 | 2008-10-09T10:55:05.210000 | 2008-10-09T10:59:14.157000 |
186,752 | 186,855 | Groovy "except" syntax? | I am a total Groovy newbie. I saw the following code here. def beforeInterceptor = [action:this.&auth,except:'login'] How would I expand this to also include a second exception, say, if the action was 'login2'? | Wow, would have expected a quick answer on this! Well, found my own answer: you can't have more than one exception with except. See the feature request here. Instead, they recommend creating a Filter. See here. | Groovy "except" syntax? I am a total Groovy newbie. I saw the following code here. def beforeInterceptor = [action:this.&auth,except:'login'] How would I expand this to also include a second exception, say, if the action was 'login2'? | TITLE:
Groovy "except" syntax?
QUESTION:
I am a total Groovy newbie. I saw the following code here. def beforeInterceptor = [action:this.&auth,except:'login'] How would I expand this to also include a second exception, say, if the action was 'login2'?
ANSWER:
Wow, would have expected a quick answer on this! Well, fou... | [
"grails",
"groovy"
] | 1 | 4 | 1,006 | 1 | 0 | 2008-10-09T11:01:19.143000 | 2008-10-09T11:37:02.863000 |
186,756 | 186,814 | Generating a range of numbers in MySQL | How do I generate a range of consecutive numbers (one per line) from a MySQL query so that I can insert them into a table? For example: nr 1 2 3 4 5 I would like to use only MySQL for this (not PHP or other languages). | If you need the records in a table and you want to avoid concurrency issues, here's how to do it. First you create a table in which to store your records CREATE TABLE `incr` ( `Id` int(11) NOT NULL auto_increment, PRIMARY KEY (`Id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; Secondly create a stored procedure like this: DEL... | Generating a range of numbers in MySQL How do I generate a range of consecutive numbers (one per line) from a MySQL query so that I can insert them into a table? For example: nr 1 2 3 4 5 I would like to use only MySQL for this (not PHP or other languages). | TITLE:
Generating a range of numbers in MySQL
QUESTION:
How do I generate a range of consecutive numbers (one per line) from a MySQL query so that I can insert them into a table? For example: nr 1 2 3 4 5 I would like to use only MySQL for this (not PHP or other languages).
ANSWER:
If you need the records in a table ... | [
"sql",
"mysql"
] | 68 | 39 | 101,762 | 14 | 0 | 2008-10-09T11:03:40.700000 | 2008-10-09T11:24:58.770000 |
186,768 | 186,889 | Can you use Amazon S3 via Flex? | Due to the lack of clientaccesspolicy.xml, there appears to be problems with using Amazon S3 via Flex. Are there any work arounds? Edit: Both of the below answers are great and work, I've upvoted both (I'm not going to assign an answer to the question as they both work): Can you use Amazon S3 via Flex? Can you use Amaz... | You can CNAME a subdomain you control at Amazon S3 (to a bucket with the name of the subdomain), like so: http://s3.ceejayoz.com/ (goes to my 's3.ceejayoz.com' bucket) Uploading your own clientaccesspolicy.xml file to the root of that bucket (and setting the permissions to be globally viewable) should do the trick, if ... | Can you use Amazon S3 via Flex? Due to the lack of clientaccesspolicy.xml, there appears to be problems with using Amazon S3 via Flex. Are there any work arounds? Edit: Both of the below answers are great and work, I've upvoted both (I'm not going to assign an answer to the question as they both work): Can you use Amaz... | TITLE:
Can you use Amazon S3 via Flex?
QUESTION:
Due to the lack of clientaccesspolicy.xml, there appears to be problems with using Amazon S3 via Flex. Are there any work arounds? Edit: Both of the below answers are great and work, I've upvoted both (I'm not going to assign an answer to the question as they both work)... | [
"apache-flex",
"amazon-web-services",
"amazon-s3"
] | 8 | 11 | 3,072 | 3 | 0 | 2008-10-09T11:06:46.357000 | 2008-10-09T11:49:12.277000 |
186,785 | 186,805 | Transitioning from WinForms to AJAX, what do I need to know? | I currently have a functioning in-house Windows Forms application which extensively uses the DataGridView control for data entry. There are some support issues which are expected when we roll this out to more locations, so one of our consultants has recommended putting together an AJAX application with substantially th... | The easiest way, but not neccessarly the best way is to get familiar with the UpdatePanel, which is part of the ASP.net AJAX controls. You can use an ASP.net GridView control (which shares much of the Winforms equiv. functionality), wrap an UpdatePanel around it and you're away. Further on from that you will want to ge... | Transitioning from WinForms to AJAX, what do I need to know? I currently have a functioning in-house Windows Forms application which extensively uses the DataGridView control for data entry. There are some support issues which are expected when we roll this out to more locations, so one of our consultants has recommend... | TITLE:
Transitioning from WinForms to AJAX, what do I need to know?
QUESTION:
I currently have a functioning in-house Windows Forms application which extensively uses the DataGridView control for data entry. There are some support issues which are expected when we roll this out to more locations, so one of our consult... | [
"c#",
".net",
"ajax",
"user-interface",
"asp.net-ajax"
] | 1 | 2 | 403 | 2 | 0 | 2008-10-09T11:13:32.240000 | 2008-10-09T11:21:02.553000 |
186,798 | 186,844 | How to determine what log level to use? | The log levels WARN, ERROR and FATAL are pretty clear. But when is something DEBUG, and when INFO? I've seen some projects that are annoyingly verbose on the INFO level, but I've also seen code that favors the DEBUG level too much. In both cases, useful information is hidden in the noise. What are the criteria for dete... | I don't think there are any hard-and-fast rules; using the log4j-type levels, my 'rules of thumb' are something like: FATAL: the app (or at the very least a thread) is about to die horribly. This is where the info explaining why that's happening goes. ERROR: something that the app's doing that it shouldn't. This isn't ... | How to determine what log level to use? The log levels WARN, ERROR and FATAL are pretty clear. But when is something DEBUG, and when INFO? I've seen some projects that are annoyingly verbose on the INFO level, but I've also seen code that favors the DEBUG level too much. In both cases, useful information is hidden in t... | TITLE:
How to determine what log level to use?
QUESTION:
The log levels WARN, ERROR and FATAL are pretty clear. But when is something DEBUG, and when INFO? I've seen some projects that are annoyingly verbose on the INFO level, but I've also seen code that favors the DEBUG level too much. In both cases, useful informat... | [
"language-agnostic",
"logging",
"verbosity"
] | 66 | 126 | 13,593 | 6 | 0 | 2008-10-09T11:18:27.737000 | 2008-10-09T11:33:40.483000 |
186,799 | 187,425 | ResultSet: Retrieving column values by index versus retrieving by label | When using JDBC, I often come across constructs like ResultSet rs = ps.executeQuery(); while (rs.next()) { int id = rs.getInt(1); // Some other actions } I asked myself (and authors of code too) why not to use labels for retrieving column values: int id = rs.getInt("CUSTOMER_ID"); The best explanation I've heard is som... | You should use string labels by default. Pros: Independence of column order Better readability/maintainability Cons: You have no control over the column names (access via stored procedures) Which would you prefer? ints? int i = 1; customerId = resultSet.getInt(i++); customerName = resultSet.getString(i++); customerAddr... | ResultSet: Retrieving column values by index versus retrieving by label When using JDBC, I often come across constructs like ResultSet rs = ps.executeQuery(); while (rs.next()) { int id = rs.getInt(1); // Some other actions } I asked myself (and authors of code too) why not to use labels for retrieving column values: i... | TITLE:
ResultSet: Retrieving column values by index versus retrieving by label
QUESTION:
When using JDBC, I often come across constructs like ResultSet rs = ps.executeQuery(); while (rs.next()) { int id = rs.getInt(1); // Some other actions } I asked myself (and authors of code too) why not to use labels for retrievin... | [
"java",
"optimization",
"jdbc",
"resultset"
] | 56 | 50 | 109,305 | 14 | 0 | 2008-10-09T11:18:50.233000 | 2008-10-09T14:07:06.493000 |
186,800 | 194,414 | Is it possible to specify proxy credentials in your web.config? | I need to configure a website to access a webservice on another machine, via a proxy. I can configure the website to use a proxy, but I can't find a way of specifying the credentials that the proxy requires, is that possible? Here is my current configuration: I know you can do this via code, but the software the websit... | Yes, it is possible to specify your own credentials without modifying the current code. It requires a small piece of code from your part though. Create an assembly called SomeAssembly.dll with this class: namespace SomeNameSpace { public class MyProxy: IWebProxy { public ICredentials Credentials { get { return new Netw... | Is it possible to specify proxy credentials in your web.config? I need to configure a website to access a webservice on another machine, via a proxy. I can configure the website to use a proxy, but I can't find a way of specifying the credentials that the proxy requires, is that possible? Here is my current configurati... | TITLE:
Is it possible to specify proxy credentials in your web.config?
QUESTION:
I need to configure a website to access a webservice on another machine, via a proxy. I can configure the website to use a proxy, but I can't find a way of specifying the credentials that the proxy requires, is that possible? Here is my c... | [
"c#",
"web-services",
"proxy"
] | 63 | 107 | 115,670 | 5 | 0 | 2008-10-09T11:19:18.187000 | 2008-10-11T18:29:33.220000 |
186,817 | 235,601 | How have you customised work items in Team System? | At my company we use the default agile process template with some modificiations. One modification we have made is added a field that indicates how to report time spent on a work item. What customisations of the default process templates have you made? Have you customised a third party process template or maybe rolled ... | I've done a number of different modifications for several different clients. The majority of them are to add new "States" and "Transitions" to support the client's change control, and SOX Compliance in once case. That particular client also wanted to enforce security on WHO could change the states in certain transition... | How have you customised work items in Team System? At my company we use the default agile process template with some modificiations. One modification we have made is added a field that indicates how to report time spent on a work item. What customisations of the default process templates have you made? Have you customi... | TITLE:
How have you customised work items in Team System?
QUESTION:
At my company we use the default agile process template with some modificiations. One modification we have made is added a field that indicates how to report time spent on a work item. What customisations of the default process templates have you made... | [
"tfs",
"tfs-workitem",
"tfs-process-template"
] | 0 | 1 | 218 | 1 | 0 | 2008-10-09T11:26:06.660000 | 2008-10-24T23:31:55.930000 |
186,822 | 186,833 | Capturing console output from a .NET application (C#) | How do I invoke a console application from my.NET application and capture all the output generated in the console? (Remember, I don't want to save the information first in a file and then relist as I would love to receive it as live.) | This can be quite easily achieved using the ProcessStartInfo.RedirectStandardOutput property. A full sample is contained in the linked MSDN documentation; the only caveat is that you may have to redirect the standard error stream as well to see all output of your application. Process compiler = new Process(); compiler.... | Capturing console output from a .NET application (C#) How do I invoke a console application from my.NET application and capture all the output generated in the console? (Remember, I don't want to save the information first in a file and then relist as I would love to receive it as live.) | TITLE:
Capturing console output from a .NET application (C#)
QUESTION:
How do I invoke a console application from my.NET application and capture all the output generated in the console? (Remember, I don't want to save the information first in a file and then relist as I would love to receive it as live.)
ANSWER:
This... | [
"c#",
".net",
"debugging",
"console"
] | 155 | 186 | 160,076 | 8 | 0 | 2008-10-09T11:27:14.803000 | 2008-10-09T11:32:02.903000 |
186,829 | 186,848 | How do ports work with IPv6? | Conventional IPv4 dotted quad notation separates the address from the port with a colon, as in this example of a webserver on the loopback interface: 127.0.0.1:80 but with IPv6 notation the address itself can contain colons. For example, this is the short form of the loopback address:::1 How are ports (or their functio... | They work almost the same as today. However, be sure you include [] around your IP. For example: http://[1fff:0:a88:85a3::ac1f]:8001/index.html Wikipedia has a pretty good article about IPv6: http://en.wikipedia.org/wiki/IPv6#Addressing | How do ports work with IPv6? Conventional IPv4 dotted quad notation separates the address from the port with a colon, as in this example of a webserver on the loopback interface: 127.0.0.1:80 but with IPv6 notation the address itself can contain colons. For example, this is the short form of the loopback address:::1 Ho... | TITLE:
How do ports work with IPv6?
QUESTION:
Conventional IPv4 dotted quad notation separates the address from the port with a colon, as in this example of a webserver on the loopback interface: 127.0.0.1:80 but with IPv6 notation the address itself can contain colons. For example, this is the short form of the loopb... | [
"tcp",
"udp",
"ipv6",
"ports"
] | 192 | 272 | 178,086 | 6 | 0 | 2008-10-09T11:29:26.857000 | 2008-10-09T11:34:11.183000 |
186,854 | 186,879 | How to prevent an exception in a background thread from terminating an application? | I can hookup to AppDomain.CurrentDomain.UnhandledException to log exceptions from background threads, but how do I prevent them terminating the runtime? | First, you really should try not to have exceptions thrown - and not handled - in a background thread. If you control the way your delegate is run, encapsulate it in a try catch block and figure a way to pass the exception information back to your main thread (using EndInvoke if you explicitly called BeginInvoke, or by... | How to prevent an exception in a background thread from terminating an application? I can hookup to AppDomain.CurrentDomain.UnhandledException to log exceptions from background threads, but how do I prevent them terminating the runtime? | TITLE:
How to prevent an exception in a background thread from terminating an application?
QUESTION:
I can hookup to AppDomain.CurrentDomain.UnhandledException to log exceptions from background threads, but how do I prevent them terminating the runtime?
ANSWER:
First, you really should try not to have exceptions thro... | [
"c#",
".net",
"exception"
] | 42 | 44 | 31,942 | 5 | 0 | 2008-10-09T11:36:55.390000 | 2008-10-09T11:44:51.147000 |
186,857 | 186,873 | Splitting a semicolon-separated string to a dictionary, in Python | I have a string that looks like this: "Name1=Value1;Name2=Value2;Name3=Value3" Is there a built-in class/function in Python that will take that string and construct a dictionary, as though I had done this: dict = { "Name1": "Value1", "Name2": "Value2", "Name3": "Value3" } I have looked through the modules available but... | There's no builtin, but you can accomplish this fairly simply with a generator comprehension: s= "Name1=Value1;Name2=Value2;Name3=Value3" dict(item.split("=") for item in s.split(";")) [Edit] From your update you indicate you may need to handle quoting. This does complicate things, depending on what the exact format yo... | Splitting a semicolon-separated string to a dictionary, in Python I have a string that looks like this: "Name1=Value1;Name2=Value2;Name3=Value3" Is there a built-in class/function in Python that will take that string and construct a dictionary, as though I had done this: dict = { "Name1": "Value1", "Name2": "Value2", "... | TITLE:
Splitting a semicolon-separated string to a dictionary, in Python
QUESTION:
I have a string that looks like this: "Name1=Value1;Name2=Value2;Name3=Value3" Is there a built-in class/function in Python that will take that string and construct a dictionary, as though I had done this: dict = { "Name1": "Value1", "N... | [
"python",
"string",
"dictionary",
"split"
] | 91 | 153 | 112,385 | 6 | 0 | 2008-10-09T11:38:22.347000 | 2008-10-09T11:43:42.087000 |
186,865 | 188,775 | The most flexible framework architecture for web development? | EDIT, 2020/09: If anyone is wondering, 12 years later, yes, we've all moved to JSON and Kubernetes by now. Original text follows. Obviously, there is no one single solution that would satisfy everyone's needs; an architecture is always a trade-off. I want to create a framework, originally aimed at RAD of web games. Tar... | XSLT can be bulky to manage, and essentially adds an extra programming language that developers would have to work in (at least if I understand your description correctly). My experience has been that relatively few people know it, and even fewer can make it do what they want. | The most flexible framework architecture for web development? EDIT, 2020/09: If anyone is wondering, 12 years later, yes, we've all moved to JSON and Kubernetes by now. Original text follows. Obviously, there is no one single solution that would satisfy everyone's needs; an architecture is always a trade-off. I want to... | TITLE:
The most flexible framework architecture for web development?
QUESTION:
EDIT, 2020/09: If anyone is wondering, 12 years later, yes, we've all moved to JSON and Kubernetes by now. Original text follows. Obviously, there is no one single solution that would satisfy everyone's needs; an architecture is always a tr... | [
"architecture",
"frameworks"
] | 4 | 3 | 1,756 | 5 | 0 | 2008-10-09T11:40:16.133000 | 2008-10-09T19:18:55.753000 |
186,867 | 186,898 | What content type to force download of text response? | I need to stream a file to the Response for saving on the end user's machine. The file is plain text, so what content type can I use to prevent the text being displayed in the browser? | To be on the safe side and ensure consistent behavior in all browsers, it's usually better to use both: Content-Type: application/octet-stream Content-Disposition: attachment;filename=\"My Text File.txt\" | What content type to force download of text response? I need to stream a file to the Response for saving on the end user's machine. The file is plain text, so what content type can I use to prevent the text being displayed in the browser? | TITLE:
What content type to force download of text response?
QUESTION:
I need to stream a file to the Response for saving on the end user's machine. The file is plain text, so what content type can I use to prevent the text being displayed in the browser?
ANSWER:
To be on the safe side and ensure consistent behavior ... | [
"asp.net"
] | 21 | 31 | 56,700 | 3 | 0 | 2008-10-09T11:40:50.297000 | 2008-10-09T11:51:36.187000 |
186,876 | 187,126 | jQuery CSS selectors in IE | The following works in Firefox, but breaks in IE7 & 8: $("#my-first-div, #my-second-div").hide(); so I have to do this: $("#my-first-div").hide(); $("#my-second-div").hide(); Is this normal? EDIT: ok, my actual real-life code is this: $("#charges-gsm,#charges-gsm-faq,#charges-gsm-prices").html(html); and my error is th... | The location you specify states: Message: 'nodeName' is null or not an object Line: 19 Char: 150 Code: 0 URI: http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js That particular piece of jquery is: nodeName:function(elem,name){ return elem.nodeName&&elem.nodeName.toUpperCase()==name.toUpperCase(); } which i... | jQuery CSS selectors in IE The following works in Firefox, but breaks in IE7 & 8: $("#my-first-div, #my-second-div").hide(); so I have to do this: $("#my-first-div").hide(); $("#my-second-div").hide(); Is this normal? EDIT: ok, my actual real-life code is this: $("#charges-gsm,#charges-gsm-faq,#charges-gsm-prices").htm... | TITLE:
jQuery CSS selectors in IE
QUESTION:
The following works in Firefox, but breaks in IE7 & 8: $("#my-first-div, #my-second-div").hide(); so I have to do this: $("#my-first-div").hide(); $("#my-second-div").hide(); Is this normal? EDIT: ok, my actual real-life code is this: $("#charges-gsm,#charges-gsm-faq,#charge... | [
"jquery",
"cross-browser"
] | 2 | 2 | 7,452 | 5 | 0 | 2008-10-09T11:44:34.207000 | 2008-10-09T12:54:51.757000 |
186,887 | 187,107 | How to meake file upload control with resume in ASP.NET? | How to make ASP.NET file upload control with resume, without file size limitation and with secure connection? Any idea? | You can split file to small part. Upload each part separately. If connection broke, just re upload last part and continue with other. After all parts are uploaded, just combine all parts on server in one file. | How to meake file upload control with resume in ASP.NET? How to make ASP.NET file upload control with resume, without file size limitation and with secure connection? Any idea? | TITLE:
How to meake file upload control with resume in ASP.NET?
QUESTION:
How to make ASP.NET file upload control with resume, without file size limitation and with secure connection? Any idea?
ANSWER:
You can split file to small part. Upload each part separately. If connection broke, just re upload last part and con... | [
"asp.net",
".net",
"file-upload"
] | 1 | 1 | 1,216 | 1 | 0 | 2008-10-09T11:47:46.103000 | 2008-10-09T12:49:59.550000 |
186,891 | 186,907 | Why use the 'ref' keyword when passing an object? | If I am passing an object to a method, why should I use the ref keyword? Isn't this the default behaviour anyway? For example: class Program { static void Main(string[] args) { TestRef t = new TestRef(); t.Something = "Foo";
DoSomething(t); Console.WriteLine(t.Something); }
static public void DoSomething(TestRef t) {... | Pass a ref if you want to change what the object is: TestRef t = new TestRef(); t.Something = "Foo"; DoSomething(ref t);
void DoSomething(ref TestRef x) { x = new TestRef(); x.Something = "Not just a changed TestRef, but a completely different TestRef object"; } After calling DoSomething, t does not refer to the origi... | Why use the 'ref' keyword when passing an object? If I am passing an object to a method, why should I use the ref keyword? Isn't this the default behaviour anyway? For example: class Program { static void Main(string[] args) { TestRef t = new TestRef(); t.Something = "Foo";
DoSomething(t); Console.WriteLine(t.Somethin... | TITLE:
Why use the 'ref' keyword when passing an object?
QUESTION:
If I am passing an object to a method, why should I use the ref keyword? Isn't this the default behaviour anyway? For example: class Program { static void Main(string[] args) { TestRef t = new TestRef(); t.Something = "Foo";
DoSomething(t); Console.Wr... | [
"c#",
".net",
"pass-by-reference",
"ref"
] | 352 | 355 | 205,543 | 11 | 0 | 2008-10-09T11:49:35.507000 | 2008-10-09T11:52:51.647000 |
186,894 | 186,931 | Test if a website is alive from a C# application | I am looking for the best way to test if a website is alive from a C# application. Background My application consists of a Winforms UI, a backend WCF service and a website to publish content to the UI and other consumers. To prevent the situation where the UI starts up and fails to work properly because of a missing WC... | HttpWebResponse response = (HttpWebResponse)request.GetResponse(); if (response == null || response.StatusCode!= HttpStatusCode.OK) As @Yanga mentioned, HttpClient is probably the more common way to do this now. HttpClient client = new HttpClient(); var checkingResponse = await client.GetAsync(url); if (!checkingRespon... | Test if a website is alive from a C# application I am looking for the best way to test if a website is alive from a C# application. Background My application consists of a Winforms UI, a backend WCF service and a website to publish content to the UI and other consumers. To prevent the situation where the UI starts up a... | TITLE:
Test if a website is alive from a C# application
QUESTION:
I am looking for the best way to test if a website is alive from a C# application. Background My application consists of a Winforms UI, a backend WCF service and a website to publish content to the UI and other consumers. To prevent the situation where ... | [
"c#",
"webrequest"
] | 55 | 94 | 110,636 | 7 | 0 | 2008-10-09T11:50:44.070000 | 2008-10-09T11:58:44.363000 |
186,895 | 186,913 | Automatic namespaces import | Is there a way in Visual Studio (a hotkey) to automatically import a type (or choosing between known namespaces) like the Ctrl + O in Eclipse? | When the red caret appears at the end of your member, just hit Shift + Alt + F10, then use arrows keys to choose the right option: | Automatic namespaces import Is there a way in Visual Studio (a hotkey) to automatically import a type (or choosing between known namespaces) like the Ctrl + O in Eclipse? | TITLE:
Automatic namespaces import
QUESTION:
Is there a way in Visual Studio (a hotkey) to automatically import a type (or choosing between known namespaces) like the Ctrl + O in Eclipse?
ANSWER:
When the red caret appears at the end of your member, just hit Shift + Alt + F10, then use arrows keys to choose the right... | [
"visual-studio",
"import",
"keyboard-shortcuts",
"hotkeys"
] | 73 | 55 | 67,486 | 3 | 0 | 2008-10-09T11:51:14.457000 | 2008-10-09T11:53:55.747000 |
186,900 | 197,688 | Tool for web server redirect management? | I'm considering rolling my own, but just in case there's a good piece of software already available, I'm asking here: Is there something that will provide an interface to webserver redirect configuration, and allow redirects to be managed by a fairly non-technical userbase. The following requirements must be fulfilled:... | You could use either a RewriteMap script/program, or a static map (whichever is easiest for you/your users). Check http://rewrite.drbacchus.com/rewritewiki/RewriteMap out for a basic example of the scripting capabilities. The performance hit is not as huge as you'd think because the process is launched one time only an... | Tool for web server redirect management? I'm considering rolling my own, but just in case there's a good piece of software already available, I'm asking here: Is there something that will provide an interface to webserver redirect configuration, and allow redirects to be managed by a fairly non-technical userbase. The ... | TITLE:
Tool for web server redirect management?
QUESTION:
I'm considering rolling my own, but just in case there's a good piece of software already available, I'm asking here: Is there something that will provide an interface to webserver redirect configuration, and allow redirects to be managed by a fairly non-techni... | [
"webserver"
] | 0 | 3 | 1,720 | 1 | 0 | 2008-10-09T11:51:50.057000 | 2008-10-13T14:08:59.110000 |
186,916 | 187,628 | Configuration file with list of key-value pairs in python | I have a python script that analyzes a set of error messages and checks for each message if it matches a certain pattern (regular expression) in order to group these messages. For example "file x does not exist" and "file y does not exist" would match "file.* does not exist" and be accounted as two occurrences of "file... | You have two decent options: Python standard config file format using ConfigParser YAML using a library like PyYAML The standard Python configuration files look like INI files with [sections] and key: value or key = value pairs. The advantages to this format are: No third-party libraries necessary Simple, familiar file... | Configuration file with list of key-value pairs in python I have a python script that analyzes a set of error messages and checks for each message if it matches a certain pattern (regular expression) in order to group these messages. For example "file x does not exist" and "file y does not exist" would match "file.* do... | TITLE:
Configuration file with list of key-value pairs in python
QUESTION:
I have a python script that analyzes a set of error messages and checks for each message if it matches a certain pattern (regular expression) in order to group these messages. For example "file x does not exist" and "file y does not exist" woul... | [
"python",
"configuration",
"serialization"
] | 25 | 36 | 41,538 | 6 | 0 | 2008-10-09T11:55:48.643000 | 2008-10-09T14:57:08.293000 |
186,917 | 187,061 | How do I catch ClassCastException? | I'm trying to catch a ClassCastException when deserializing an object from xml. So, try { restoredItem = (T) decoder.readObject(); } catch (ClassCastException e){ //don't need to crash at this point, //just let the user know that a wrong file has been passed. } And yet this won't as the exception doesn't get caught. Wh... | The code in the question should give you an unchecked cast warning. Listen to -Xlint. All the compiler knows about T is its bounds, which it probably doesn't have (other than explicitly extending Object and a super of the null type). So effectively the cast at runtime is (Object) - not very useful. What you can do is p... | How do I catch ClassCastException? I'm trying to catch a ClassCastException when deserializing an object from xml. So, try { restoredItem = (T) decoder.readObject(); } catch (ClassCastException e){ //don't need to crash at this point, //just let the user know that a wrong file has been passed. } And yet this won't as t... | TITLE:
How do I catch ClassCastException?
QUESTION:
I'm trying to catch a ClassCastException when deserializing an object from xml. So, try { restoredItem = (T) decoder.readObject(); } catch (ClassCastException e){ //don't need to crash at this point, //just let the user know that a wrong file has been passed. } And y... | [
"java",
"exception"
] | 12 | 11 | 37,048 | 4 | 0 | 2008-10-09T11:56:07.753000 | 2008-10-09T12:36:44.850000 |
186,918 | 187,023 | C# - How to change HTML elements attributes | My master page contains a list as shown here. What I'd like to do though, is add the "class=active" attribute to the list li thats currently active but I have no idea how to do this. I know that the code goes in the aspx page's page_load event, but no idea how to access the li I need to add the attribute. Please enligh... | In order to access these controls from the server-side, you need to make them runat="server" Screenshots Future News Download Home in the code-behind: foreach(Control ctrl in nav.controls) { if(!ctrl is HtmlAnchor) { string url = ((HtmlAnchor)ctrl).Href; if(url == GetCurrentPage()) // <-- you'd need to write that ctrl.... | C# - How to change HTML elements attributes My master page contains a list as shown here. What I'd like to do though, is add the "class=active" attribute to the list li thats currently active but I have no idea how to do this. I know that the code goes in the aspx page's page_load event, but no idea how to access the l... | TITLE:
C# - How to change HTML elements attributes
QUESTION:
My master page contains a list as shown here. What I'd like to do though, is add the "class=active" attribute to the list li thats currently active but I have no idea how to do this. I know that the code goes in the aspx page's page_load event, but no idea h... | [
"c#",
"html",
"asp.net"
] | 18 | 28 | 86,315 | 12 | 0 | 2008-10-09T11:56:36.677000 | 2008-10-09T12:26:21.890000 |
186,921 | 187,418 | Can I speed up the YUI layout manager, when I have a large table on the page? | I am using the YUI layout manager which seems to work at an OK speed. However if the page contains a large with about 500 rows, the YUI render() function takes about a minute longer to run. When I open the same page without the layout manager it opens in less than a second. My only concern is with IE 7. I tried it on f... | I finally figured it out myself. The trick is to hide the content that should be ignored by the layout manager. Before calling render() set the style.display = 'none' for a tag that contains a large chunk of the page you don't need the layout manager to manage. Set it back to normal after with style.display = 'block'. | Can I speed up the YUI layout manager, when I have a large table on the page? I am using the YUI layout manager which seems to work at an OK speed. However if the page contains a large with about 500 rows, the YUI render() function takes about a minute longer to run. When I open the same page without the layout manager... | TITLE:
Can I speed up the YUI layout manager, when I have a large table on the page?
QUESTION:
I am using the YUI layout manager which seems to work at an OK speed. However if the page contains a large with about 500 rows, the YUI render() function takes about a minute longer to run. When I open the same page without ... | [
"javascript",
"internet-explorer",
"layout",
"yui"
] | 0 | 5 | 1,147 | 2 | 0 | 2008-10-09T11:57:15.553000 | 2008-10-09T14:06:26.900000 |
186,922 | 192,438 | Remote log viewer for Java/Glassfish log files | I'm looking for a log viewer with similar capablilties as Chainsaw, in which I can tail Glassfish log files over for instance SSH/SCP. Does anyone know if such a tool exist? | From other post: Configure putty to write out a log file from the connection. Do the log analysis against the putty log file. | Remote log viewer for Java/Glassfish log files I'm looking for a log viewer with similar capablilties as Chainsaw, in which I can tail Glassfish log files over for instance SSH/SCP. Does anyone know if such a tool exist? | TITLE:
Remote log viewer for Java/Glassfish log files
QUESTION:
I'm looking for a log viewer with similar capablilties as Chainsaw, in which I can tail Glassfish log files over for instance SSH/SCP. Does anyone know if such a tool exist?
ANSWER:
From other post: Configure putty to write out a log file from the connec... | [
"java",
"logging"
] | 11 | 1 | 9,787 | 8 | 0 | 2008-10-09T11:57:26.067000 | 2008-10-10T17:50:37.683000 |
186,932 | 187,013 | Adding a TLS/SSL layer to communications..? | My stuff is made with several components among which some are written in C. As I would like to add some security features, I am thinking of communicating over an SSL/TLS layer. Could you advise me some good lib to do this (if possible)? | We use axTLS which works great on both our server (.NET) and our embedded systems (Linux and uClinux). We had problems getting OpenSSL to work well on uClinux. axTLS is not as feature complete as OpenSSL yet so make sure it meets your requirements before using it. | Adding a TLS/SSL layer to communications..? My stuff is made with several components among which some are written in C. As I would like to add some security features, I am thinking of communicating over an SSL/TLS layer. Could you advise me some good lib to do this (if possible)? | TITLE:
Adding a TLS/SSL layer to communications..?
QUESTION:
My stuff is made with several components among which some are written in C. As I would like to add some security features, I am thinking of communicating over an SSL/TLS layer. Could you advise me some good lib to do this (if possible)?
ANSWER:
We use axTLS... | [
"c",
"ssl"
] | 2 | 2 | 1,034 | 5 | 0 | 2008-10-09T11:59:00.120000 | 2008-10-09T12:22:26.483000 |
186,935 | 187,010 | iPhone "Web Site Error" | I'm writing server-side programs in PHP for an iPhone app. And I have no iPhone.:P The iPhone app requests XML files from the site whenever a user runs the iPhone app. You may visit http://www.appvee.com/iphone/ads or http://www.appvee.com/iphone/latest for the XML files. And a message box will show up with the followi... | I agree with ceejayoz, looks like this is a special characters issue. I would suggest using the htmlentities method to encode the data in the xml file. | iPhone "Web Site Error" I'm writing server-side programs in PHP for an iPhone app. And I have no iPhone.:P The iPhone app requests XML files from the site whenever a user runs the iPhone app. You may visit http://www.appvee.com/iphone/ads or http://www.appvee.com/iphone/latest for the XML files. And a message box will ... | TITLE:
iPhone "Web Site Error"
QUESTION:
I'm writing server-side programs in PHP for an iPhone app. And I have no iPhone.:P The iPhone app requests XML files from the site whenever a user runs the iPhone app. You may visit http://www.appvee.com/iphone/ads or http://www.appvee.com/iphone/latest for the XML files. And a... | [
"iphone",
"encoding",
"utf-8"
] | 2 | 3 | 1,284 | 2 | 0 | 2008-10-09T12:00:41.553000 | 2008-10-09T12:21:28.030000 |
186,942 | 187,095 | Generate Multiple and Filtered Drop + Create Stored Procedures | I have this script: select name,create_date,modify_date from sys.procedures order by modify_date desc I can see what procedures were modified lately. I will add a "where modify_date >= " And I'd like to use some system stored procedure, that will generate me: drop + create scripts for the (let's say 5 matching) stored ... | This ain't pretty, but it works. Run the output from it manually or execute it with sp_executesql. SELECT OBJECT_DEFINITION(object_id), 'drop procedure [' + name + ']' FROM sys.procedures WHERE modify_date >= @date You will have to worry about lost rights as well. | Generate Multiple and Filtered Drop + Create Stored Procedures I have this script: select name,create_date,modify_date from sys.procedures order by modify_date desc I can see what procedures were modified lately. I will add a "where modify_date >= " And I'd like to use some system stored procedure, that will generate m... | TITLE:
Generate Multiple and Filtered Drop + Create Stored Procedures
QUESTION:
I have this script: select name,create_date,modify_date from sys.procedures order by modify_date desc I can see what procedures were modified lately. I will add a "where modify_date >= " And I'd like to use some system stored procedure, th... | [
"sql",
"sql-server",
"stored-procedures",
"system-stored-procedures"
] | 1 | 2 | 1,091 | 5 | 0 | 2008-10-09T12:01:19.553000 | 2008-10-09T12:47:15.077000 |
186,963 | 189,462 | How to stop Excel from prompting to reopen a workbook? | I have a readonly Excel workbook containing a VBA application. The application saves any data that needs to be saved in a database, and the workbook is always closed without saving (by setting ThisWorkbook.Saved = True in BeforeClose). I have the following problem: User double-clicks on the workbook in Windows Explorer... | Man...this seems easy but it is a tough one. I toyed around with every event and application/workbook property that I could think of in my 7 or so years of experience working with Excel VBA and I couldn't come up with anything elegant at all... I think the short answer is that there is not really a short elegant soluti... | How to stop Excel from prompting to reopen a workbook? I have a readonly Excel workbook containing a VBA application. The application saves any data that needs to be saved in a database, and the workbook is always closed without saving (by setting ThisWorkbook.Saved = True in BeforeClose). I have the following problem:... | TITLE:
How to stop Excel from prompting to reopen a workbook?
QUESTION:
I have a readonly Excel workbook containing a VBA application. The application saves any data that needs to be saved in a database, and the workbook is always closed without saving (by setting ThisWorkbook.Saved = True in BeforeClose). I have the ... | [
"excel",
"vba"
] | 7 | 2 | 12,783 | 3 | 0 | 2008-10-09T12:07:04.923000 | 2008-10-09T22:36:30.957000 |
187,000 | 339,345 | Large File Download - Connection With Server Reset | I have an asp.net website that allows the user to download largish files - 30mb to about 60mb. Sometimes the download works fine but often it fails at some varying point before the download finishes with the message saying that the connection with the server was reset. Originally I was simply using Server.TransmitFile ... | The final fix for this problem was to make a modification in the web.config file. I simply had to change sessionState mode="InProc" to sessionState mode="StateServer". | Large File Download - Connection With Server Reset I have an asp.net website that allows the user to download largish files - 30mb to about 60mb. Sometimes the download works fine but often it fails at some varying point before the download finishes with the message saying that the connection with the server was reset.... | TITLE:
Large File Download - Connection With Server Reset
QUESTION:
I have an asp.net website that allows the user to download largish files - 30mb to about 60mb. Sometimes the download works fine but often it fails at some varying point before the download finishes with the message saying that the connection with the... | [
"asp.net",
"download"
] | 3 | 0 | 6,542 | 4 | 0 | 2008-10-09T12:18:42.577000 | 2008-12-04T01:19:53.103000 |
187,001 | 2,111,642 | WCF Custom Http Proxy Authentication | Is it possible to provide WCF with a custom proxy address and custom credentials? I've found this answer on stackoverflow: How to set proxy with credentials to generated WCF client?, but I've got a complication, the service I'm authenticating against uses its own authentication, so I've got to use two sets of credentia... | If you set the WebRequest.DefaultWebProxy property to a new WebProxy with credentials, WCF will use it for all HTTP requests that it makes. (This will affect all HttpWebRequests used by the application unless explicitly overridden). // get this information from the user / config file / etc. Uri proxyAddress; string use... | WCF Custom Http Proxy Authentication Is it possible to provide WCF with a custom proxy address and custom credentials? I've found this answer on stackoverflow: How to set proxy with credentials to generated WCF client?, but I've got a complication, the service I'm authenticating against uses its own authentication, so ... | TITLE:
WCF Custom Http Proxy Authentication
QUESTION:
Is it possible to provide WCF with a custom proxy address and custom credentials? I've found this answer on stackoverflow: How to set proxy with credentials to generated WCF client?, but I've got a complication, the service I'm authenticating against uses its own a... | [
"wcf",
"authentication",
"proxy"
] | 5 | 14 | 12,640 | 2 | 0 | 2008-10-09T12:18:44.247000 | 2010-01-21T18:05:33.530000 |
187,005 | 187,441 | Implementing LDAP compliance | I'm working profesionally on a php web application which contains contacts, among other data. I was wondering how hard it would be to make this data available to external programs using the LDAP protocol. Are there specific tools out there for this? I couldn't really find anything, but I can't imagine I'm the first to ... | The LDAP server protocol is big, and I don't think there is a PHP server in existence. I would suggest running an LDAP server and pushing records to it. I like OpenLDAP, but there are plenty of servers out there, depending on your platform. Even ActiveDirectory is an LDAP server. Typically, LDAP objects have internal t... | Implementing LDAP compliance I'm working profesionally on a php web application which contains contacts, among other data. I was wondering how hard it would be to make this data available to external programs using the LDAP protocol. Are there specific tools out there for this? I couldn't really find anything, but I ca... | TITLE:
Implementing LDAP compliance
QUESTION:
I'm working profesionally on a php web application which contains contacts, among other data. I was wondering how hard it would be to make this data available to external programs using the LDAP protocol. Are there specific tools out there for this? I couldn't really find ... | [
"php",
"ldap"
] | 4 | 3 | 619 | 3 | 0 | 2008-10-09T12:20:26.677000 | 2008-10-09T14:11:00.947000 |
187,006 | 187,079 | How to expose objects through WCF? | My project is split up into a typical 3 layer structure for a Silverlight app. That is: A base layer, which is a class library that contains all my business objects, logic, data access etc. A middle layer which is a WCF service which communicates with; My Silverlight front end The problem I have is that currently the B... | It seems that you are expecting internal classes used in the WCF service which you have marked as DataContracts to be exported as.NET objects to your client code (the Silverlight UI). WCF does not support this capability. A class marked as a DataContract is just that, a data structure with no methods. If you need a goo... | How to expose objects through WCF? My project is split up into a typical 3 layer structure for a Silverlight app. That is: A base layer, which is a class library that contains all my business objects, logic, data access etc. A middle layer which is a WCF service which communicates with; My Silverlight front end The pro... | TITLE:
How to expose objects through WCF?
QUESTION:
My project is split up into a typical 3 layer structure for a Silverlight app. That is: A base layer, which is a class library that contains all my business objects, logic, data access etc. A middle layer which is a WCF service which communicates with; My Silverlight... | [
".net",
"wcf",
"silverlight"
] | 3 | 8 | 10,020 | 4 | 0 | 2008-10-09T12:20:36.007000 | 2008-10-09T12:42:53.073000 |
187,018 | 201,309 | Can I add ASP.NET AJAX Extentions to a page programmatically (server side)? | In a page, on the load event, I am dynamically creating controls for display on the page. This is all working properly. the trouble I am having is when adding extenders from the AJAX control toolkit, specifically I am trying to add rounded corners to a button control. No errors are thrown, but the AJAX Extension functi... | You cannot apply a RoundedCornersExtender to input elements such as TextBox or Buttons. | Can I add ASP.NET AJAX Extentions to a page programmatically (server side)? In a page, on the load event, I am dynamically creating controls for display on the page. This is all working properly. the trouble I am having is when adding extenders from the AJAX control toolkit, specifically I am trying to add rounded corn... | TITLE:
Can I add ASP.NET AJAX Extentions to a page programmatically (server side)?
QUESTION:
In a page, on the load event, I am dynamically creating controls for display on the page. This is all working properly. the trouble I am having is when adding extenders from the AJAX control toolkit, specifically I am trying t... | [
"asp.net-ajax",
"controls"
] | 0 | 1 | 2,267 | 3 | 0 | 2008-10-09T12:24:42.580000 | 2008-10-14T14:12:00.400000 |
187,040 | 187,055 | How do I return an exit code from a VBScript console application | I Have an old vbs script file being kicked off by an AutoSys job. Can I, and how do I, return an int return value to indicate success or failure? | I found the answer:0) DIM returnValue returnValue = 99 WScript.Quit(returnValue) This seems to work well. | How do I return an exit code from a VBScript console application I Have an old vbs script file being kicked off by an AutoSys job. Can I, and how do I, return an int return value to indicate success or failure? | TITLE:
How do I return an exit code from a VBScript console application
QUESTION:
I Have an old vbs script file being kicked off by an AutoSys job. Can I, and how do I, return an int return value to indicate success or failure?
ANSWER:
I found the answer:0) DIM returnValue returnValue = 99 WScript.Quit(returnValue) T... | [
"vbscript"
] | 46 | 37 | 92,641 | 2 | 0 | 2008-10-09T12:32:03.313000 | 2008-10-09T12:35:18.377000 |
187,057 | 195,803 | glBlendFunc and alpha blending | I want to know how the glBlendFunc works. For example, i have 2 gl textures, where the alpha is on tex1, i want to have alpha in my final image. Where the color is on tex1, i want the color from tex2 to be. | Sadly, this is for openGL ES on the iPhone, so no shaders, but point taken. My problem was a very simplified version of the questions, i needed to apply a simple color ( incl alpha ), to a part of a defined texture. As Lee pointed out, texture blending is to allow alpha to show up on the framebuffer. The solution was t... | glBlendFunc and alpha blending I want to know how the glBlendFunc works. For example, i have 2 gl textures, where the alpha is on tex1, i want to have alpha in my final image. Where the color is on tex1, i want the color from tex2 to be. | TITLE:
glBlendFunc and alpha blending
QUESTION:
I want to know how the glBlendFunc works. For example, i have 2 gl textures, where the alpha is on tex1, i want to have alpha in my final image. Where the color is on tex1, i want the color from tex2 to be.
ANSWER:
Sadly, this is for openGL ES on the iPhone, so no shade... | [
"c++",
"opengl"
] | 2 | 0 | 3,859 | 4 | 0 | 2008-10-09T12:36:02.027000 | 2008-10-12T18:12:41.833000 |
187,059 | 187,222 | How to get all the controls in page using javascript in ASP.net page | I have a page with a tab control and each control has almost 15 controls. In total there are 10 tabs and about 150 controls in a page (controls like drop down list, textbox, radiobutton, listbox only). My requirement is that there is a button (submit) at the bottom of the page. I need to check using JavaScript that at ... | Assuming there's only one form on the page (if more then loop through forms and nest the below loop within). var selectedCount = 0; var element;
for (var i = 0; i < document.forms[0].elements.length; i++) { element = document.forms[0].elements[i];
switch (element.type) { case 'text': if (element.value.length > 0) { s... | How to get all the controls in page using javascript in ASP.net page I have a page with a tab control and each control has almost 15 controls. In total there are 10 tabs and about 150 controls in a page (controls like drop down list, textbox, radiobutton, listbox only). My requirement is that there is a button (submit)... | TITLE:
How to get all the controls in page using javascript in ASP.net page
QUESTION:
I have a page with a tab control and each control has almost 15 controls. In total there are 10 tabs and about 150 controls in a page (controls like drop down list, textbox, radiobutton, listbox only). My requirement is that there is... | [
"asp.net",
"javascript"
] | 1 | 4 | 24,224 | 5 | 0 | 2008-10-09T12:36:12.447000 | 2008-10-09T13:21:55.663000 |
187,066 | 187,129 | Best solution for modifying a key in a record while selecting on it | I have an UPDATE sql command that modifies a Date/Time field in a particular table. This table has two keys, ProductionCode and TestTime, which is what is being modified. The Production Code never changes for a particular record, but often a user will find that they entered the wrong test time and need to change it. I ... | Add a new column "id" that holds a unique number that can identify each row. If your users need to modify the primary key you have probably not chosen a good primary key? | Best solution for modifying a key in a record while selecting on it I have an UPDATE sql command that modifies a Date/Time field in a particular table. This table has two keys, ProductionCode and TestTime, which is what is being modified. The Production Code never changes for a particular record, but often a user will ... | TITLE:
Best solution for modifying a key in a record while selecting on it
QUESTION:
I have an UPDATE sql command that modifies a Date/Time field in a particular table. This table has two keys, ProductionCode and TestTime, which is what is being modified. The Production Code never changes for a particular record, but ... | [
"sql",
"database"
] | 0 | 3 | 114 | 2 | 0 | 2008-10-09T12:39:28.510000 | 2008-10-09T12:55:35.327000 |
187,069 | 187,081 | Can not operate ObservableCollection in multi threads | It seems the ObservableCollection only support add, remove, clear operation from the UI thread, It throw Not Support Exception if it is operated by a NO UI thread. I tried to override methods of ObservableCollection, unfortunatly, I met lots of problems. Any one can provide me a ObservableCollection sample which can be... | Using the link provided by Kent, you could use the following code to modify a collection across threads: while (!Monitor.TryEnter(_lock, 10)) { DoEvents(); }
try { //modify collection } finally { Monitor.Exit(_lock); } If however you're just looking to modify the collection on your original thread you can try using a ... | Can not operate ObservableCollection in multi threads It seems the ObservableCollection only support add, remove, clear operation from the UI thread, It throw Not Support Exception if it is operated by a NO UI thread. I tried to override methods of ObservableCollection, unfortunatly, I met lots of problems. Any one can... | TITLE:
Can not operate ObservableCollection in multi threads
QUESTION:
It seems the ObservableCollection only support add, remove, clear operation from the UI thread, It throw Not Support Exception if it is operated by a NO UI thread. I tried to override methods of ObservableCollection, unfortunatly, I met lots of pro... | [
"wpf",
"multithreading",
"observablecollection"
] | 7 | 7 | 8,863 | 4 | 0 | 2008-10-09T12:40:16.667000 | 2008-10-09T12:43:23.120000 |
187,073 | 187,111 | jQuery sortables | I'm using the sortable function in jquery to sequence a faq list. Needless to say, i'm new to this concept. Anybody have any good examples of the backend for this. I have the front working fine, but updating the sequence in the database is another story. My backend is ColdFusion btw. Thanks in advance | Define the faq:...... (...).. Make faq sortable: Form submitted:... Add sorted sequence to form | jQuery sortables I'm using the sortable function in jquery to sequence a faq list. Needless to say, i'm new to this concept. Anybody have any good examples of the backend for this. I have the front working fine, but updating the sequence in the database is another story. My backend is ColdFusion btw. Thanks in advance | TITLE:
jQuery sortables
QUESTION:
I'm using the sortable function in jquery to sequence a faq list. Needless to say, i'm new to this concept. Anybody have any good examples of the backend for this. I have the front working fine, but updating the sequence in the database is another story. My backend is ColdFusion btw. ... | [
"jquery",
"sequence",
"sortables"
] | 3 | 21 | 7,492 | 2 | 0 | 2008-10-09T12:40:58.350000 | 2008-10-09T12:50:46.287000 |
187,076 | 187,101 | Replacing or Removing a new line with something else but only between single or double quotes using PHP on a CSV file | I have a CSV file that holds about 200,000 - 300,000 records. Most of the records can be separated and inserted into a MySQL database with a simple $line = explode("\n", $fileData); and then the values separated with $lineValues = explode(',', $line); and then inserted into the database using the proper data type i.e i... | If the csv data is in a file, you can just use fgetcsv() as others have pointed out. fgetcsv handles embedded newlines correctly. However if your csv data is in a string (like $fileData in your example) the following method may be useful as str_getcsv() only works on a row at a time and cannot split a whole file into r... | Replacing or Removing a new line with something else but only between single or double quotes using PHP on a CSV file I have a CSV file that holds about 200,000 - 300,000 records. Most of the records can be separated and inserted into a MySQL database with a simple $line = explode("\n", $fileData); and then the values ... | TITLE:
Replacing or Removing a new line with something else but only between single or double quotes using PHP on a CSV file
QUESTION:
I have a CSV file that holds about 200,000 - 300,000 records. Most of the records can be separated and inserted into a MySQL database with a simple $line = explode("\n", $fileData); an... | [
"php",
"csv"
] | 1 | 1 | 1,464 | 5 | 0 | 2008-10-09T12:42:24.293000 | 2008-10-09T12:48:02.563000 |
187,098 | 187,415 | Cross-platform, cross-browser way to play sound from Javascript? | I am writing a dhtml application that creates an interactive simulation of a system. The data for the simulation is generated from another tool, and there is already a very large amount of legacy data. Some steps in the simulation require that we play "voice-over" clips of audio. I've been unable to find an easy way to... | You will have to include a plug-in like Real Audio or QuickTime to handle the.wav file, but this should work... //====================================================================== var soundEmbed = null; //====================================================================== function soundPlay(which) { if (!soundE... | Cross-platform, cross-browser way to play sound from Javascript? I am writing a dhtml application that creates an interactive simulation of a system. The data for the simulation is generated from another tool, and there is already a very large amount of legacy data. Some steps in the simulation require that we play "vo... | TITLE:
Cross-platform, cross-browser way to play sound from Javascript?
QUESTION:
I am writing a dhtml application that creates an interactive simulation of a system. The data for the simulation is generated from another tool, and there is already a very large amount of legacy data. Some steps in the simulation requir... | [
"javascript",
"audio",
"cross-browser",
"cross-platform",
"dhtml"
] | 80 | 63 | 61,010 | 10 | 0 | 2008-10-09T12:47:30.537000 | 2008-10-09T14:05:12.753000 |
187,100 | 187,112 | Implement validation as a method or as a property? | I have an object that needs a test if the object data is valid. The validation itself would be called from the thread that instatiated the object, it looks like this: { if (_step.Equals(string.Empty)) return false; if (_type.Equals(string.Empty)) return false; if (_setup.Equals(string.Empty)) return false; return true;... | My personal opinion here would be: If the "validate" method mutates the object in any way (which your example doesn't) then make it a method. If the object remains un-changed after validation, make it a property. | Implement validation as a method or as a property? I have an object that needs a test if the object data is valid. The validation itself would be called from the thread that instatiated the object, it looks like this: { if (_step.Equals(string.Empty)) return false; if (_type.Equals(string.Empty)) return false; if (_set... | TITLE:
Implement validation as a method or as a property?
QUESTION:
I have an object that needs a test if the object data is valid. The validation itself would be called from the thread that instatiated the object, it looks like this: { if (_step.Equals(string.Empty)) return false; if (_type.Equals(string.Empty)) retu... | [
"c#"
] | 2 | 7 | 279 | 3 | 0 | 2008-10-09T12:47:48.103000 | 2008-10-09T12:50:49.360000 |
187,109 | 187,257 | Is there a FOSS batch compiling solution for Delphi that takes version as an input parameter? | Is there a FOSS batch compiling solution for Delphi that takes version as an input parameter? I am using Delphi 7 and this remains the most tedious operation. Are there any other solutions, workarounds to make this easy. | Not really sure on your question, but I'm going to assume you are asking how to set the version number for a product from a batch file when compiling. I previously used a program called StampVer, You will need to already have version information in the file to use StampVer. StampVer is Freeware but not Open Source. A g... | Is there a FOSS batch compiling solution for Delphi that takes version as an input parameter? Is there a FOSS batch compiling solution for Delphi that takes version as an input parameter? I am using Delphi 7 and this remains the most tedious operation. Are there any other solutions, workarounds to make this easy. | TITLE:
Is there a FOSS batch compiling solution for Delphi that takes version as an input parameter?
QUESTION:
Is there a FOSS batch compiling solution for Delphi that takes version as an input parameter? I am using Delphi 7 and this remains the most tedious operation. Are there any other solutions, workarounds to mak... | [
"delphi",
"command-line",
"compiler-construction"
] | 2 | 6 | 632 | 5 | 0 | 2008-10-09T12:50:22.293000 | 2008-10-09T13:33:53.813000 |
187,125 | 187,165 | Unit test Custom membership provider with NUnit throws null reference error | Trying to create a user account in a test. But getting a Object reference is not set to an instanve of an object error when running it. Here's my MemberShip provider class, it's in a class library MyCompany.MyApp.Domain.dll: using System; using System.Collections.Generic; using System.Web.Security;
namespace MyCompany... | I'm quite sure you should call provider.Initialize(...) in your test code before calling CreateUser. | Unit test Custom membership provider with NUnit throws null reference error Trying to create a user account in a test. But getting a Object reference is not set to an instanve of an object error when running it. Here's my MemberShip provider class, it's in a class library MyCompany.MyApp.Domain.dll: using System; using... | TITLE:
Unit test Custom membership provider with NUnit throws null reference error
QUESTION:
Trying to create a user account in a test. But getting a Object reference is not set to an instanve of an object error when running it. Here's my MemberShip provider class, it's in a class library MyCompany.MyApp.Domain.dll: u... | [
"c#",
".net",
"unit-testing",
"nunit",
"membership"
] | 0 | 2 | 3,122 | 3 | 0 | 2008-10-09T12:54:30.693000 | 2008-10-09T13:06:46.067000 |
187,137 | 187,175 | How to output data from tables with same column names in CodeIgniter? | This is my query: $query = $this->db->query(' SELECT archives.id, archives.signature, type_of_source.description, media_type.description, origin.description FROM archives, type_of_source, media_type, origin WHERE archives.type_of_source_id = type_of_source.id AND type_of_source.media_type_id = media_type.id AND archive... | This actually has very little to do with CodeIgniter and a lot with how mysql_fetch_assoc provides the query results. The solution is that you should rename the columns inside the query using "AS", e.g. select type_of_source.description as type_of_source_description, origin.descripotion as origin_descripotion from.... | How to output data from tables with same column names in CodeIgniter? This is my query: $query = $this->db->query(' SELECT archives.id, archives.signature, type_of_source.description, media_type.description, origin.description FROM archives, type_of_source, media_type, origin WHERE archives.type_of_source_id = type_of_... | TITLE:
How to output data from tables with same column names in CodeIgniter?
QUESTION:
This is my query: $query = $this->db->query(' SELECT archives.id, archives.signature, type_of_source.description, media_type.description, origin.description FROM archives, type_of_source, media_type, origin WHERE archives.type_of_so... | [
"sql",
"database",
"codeigniter"
] | 2 | 5 | 4,288 | 3 | 0 | 2008-10-09T12:58:26.630000 | 2008-10-09T13:09:10.493000 |
187,138 | 187,362 | Storing formatted text in a DB while maintaining abstraction | How would you store formatted blocks of text (line breaks, tabs, lists - etc.) in a database (nothing specific) to be displayed on the web (XHTML) while maintaining a level of abstraction so that the data can be used in other applications or if the structure of the website were to change in the future? | There are two ideas that clash slightly in your question - that of keeping the data separate to the content so it can be re purposed, and that of including formatting data. Is the formatting data part of the data, or just meta data? Haven't we seen this before; it basically seems to be a CSS / HTML conundrum. If these ... | Storing formatted text in a DB while maintaining abstraction How would you store formatted blocks of text (line breaks, tabs, lists - etc.) in a database (nothing specific) to be displayed on the web (XHTML) while maintaining a level of abstraction so that the data can be used in other applications or if the structure ... | TITLE:
Storing formatted text in a DB while maintaining abstraction
QUESTION:
How would you store formatted blocks of text (line breaks, tabs, lists - etc.) in a database (nothing specific) to be displayed on the web (XHTML) while maintaining a level of abstraction so that the data can be used in other applications or... | [
"database",
"text",
"formatting",
"abstraction"
] | 21 | 5 | 10,303 | 2 | 0 | 2008-10-09T12:59:26.100000 | 2008-10-09T13:55:14.940000 |
187,146 | 187,277 | Inner join & outer join; is the order of tables in from important? | Why is the order of tables important when combining an outer & an inner join? the following fails with postgres: SELECT grp.number AS number, tags.value AS tag FROM groups grp, insrel archiverel LEFT OUTER JOIN ownrel ownrel ON grp.number = ownrel.dnumber LEFT OUTER JOIN tags tags ON tags.number = ownrel.snumber WHERE ... | I believe that you can think of this as an operator precedence issue. When you write this: FROM groups grp, insrel archiverel LEFT OUTER JOIN ownrel ownrel ON grp.number = ownrel.dnumber LEFT OUTER JOIN tags tags ON tags.number = ownrel.snumber I think it is interpreted by the parser like this: FROM groups grp, ( ( ins... | Inner join & outer join; is the order of tables in from important? Why is the order of tables important when combining an outer & an inner join? the following fails with postgres: SELECT grp.number AS number, tags.value AS tag FROM groups grp, insrel archiverel LEFT OUTER JOIN ownrel ownrel ON grp.number = ownrel.dnumb... | TITLE:
Inner join & outer join; is the order of tables in from important?
QUESTION:
Why is the order of tables important when combining an outer & an inner join? the following fails with postgres: SELECT grp.number AS number, tags.value AS tag FROM groups grp, insrel archiverel LEFT OUTER JOIN ownrel ownrel ON grp.num... | [
"postgresql"
] | 20 | 21 | 33,324 | 5 | 0 | 2008-10-09T13:00:54.707000 | 2008-10-09T13:39:29.107000 |
187,153 | 187,212 | Is there a role for a DBA when an app uses a persistence layer or repository? | I'm taking on the re-architecting of a pair of applications which use Hibernate in one case, and a combination of Hibernate and a Java Content Repository (specifially JackRabbit ) in the second. A key issue in the rearchitecting is to improve performance, so I'm wondering whether there's any value in bringing in a DBA ... | There are DBA's and there are DBA's. Some DBA's are administrators -- backup, restore, grant, revoke -- kind of people. Keep The Lights On. Foundational. Other DBA's are architect/designers. "Fixing this will involve data modeling" That's what this second tier of DBA's should be doing. Many admin DBA's are thrust into ... | Is there a role for a DBA when an app uses a persistence layer or repository? I'm taking on the re-architecting of a pair of applications which use Hibernate in one case, and a combination of Hibernate and a Java Content Repository (specifially JackRabbit ) in the second. A key issue in the rearchitecting is to improve... | TITLE:
Is there a role for a DBA when an app uses a persistence layer or repository?
QUESTION:
I'm taking on the re-architecting of a pair of applications which use Hibernate in one case, and a combination of Hibernate and a Java Content Repository (specifially JackRabbit ) in the second. A key issue in the rearchitec... | [
"hibernate",
"database-design"
] | 4 | 7 | 820 | 5 | 0 | 2008-10-09T13:02:11.180000 | 2008-10-09T13:18:40.863000 |
187,155 | 649,123 | InstallShield Basic MSI optimizations | My InstallShield 2009 basic MSI project installs pretty slowly. We have a 65MB.msi and a 110MB.cab. The project was upgraded from IS12, using which it took about half as long to install. Did the 2009 upgrade make some default modifications that I can reverse? Are there any general optimizations that can speed up basic ... | The phrase I emphasized in the paragraph below, found on this page describing possible issues upgrading to 2009, could be taken as a euphamism: Previously, InstallShield did not include any support for compressing files that were streamed into the Setup.exe file or the ISSetup.dll file at build time. Thus, if you compa... | InstallShield Basic MSI optimizations My InstallShield 2009 basic MSI project installs pretty slowly. We have a 65MB.msi and a 110MB.cab. The project was upgraded from IS12, using which it took about half as long to install. Did the 2009 upgrade make some default modifications that I can reverse? Are there any general ... | TITLE:
InstallShield Basic MSI optimizations
QUESTION:
My InstallShield 2009 basic MSI project installs pretty slowly. We have a 65MB.msi and a 110MB.cab. The project was upgraded from IS12, using which it took about half as long to install. Did the 2009 upgrade make some default modifications that I can reverse? Are ... | [
"optimization",
"windows-installer",
"installshield"
] | 3 | 2 | 2,191 | 2 | 0 | 2008-10-09T13:03:30.427000 | 2009-03-16T03:02:57.293000 |
187,181 | 187,251 | Removing header text in NSIS installer | I would like to replace the entire header area in an NSIS installer with a bitmap. I have set MUI-HEADERIMAGE-BITMAP and set all the subcaptions to " ", however on the install files page I see empty white boxes over top my bitmap where the text would normally be. Is there a way around this? Cheers, Chris | Why don't you post the relevant code from your installer? Here's what I use:!define MUI_HEADERIMAGE!define MUI_HEADERIMAGE_BITMAP "Banner.bmp"!define MUI_HEADERIMAGE_BITMAP_NOSTRETCH!define MUI_HEADER_TRANSPARENT_TEXT | Removing header text in NSIS installer I would like to replace the entire header area in an NSIS installer with a bitmap. I have set MUI-HEADERIMAGE-BITMAP and set all the subcaptions to " ", however on the install files page I see empty white boxes over top my bitmap where the text would normally be. Is there a way ar... | TITLE:
Removing header text in NSIS installer
QUESTION:
I would like to replace the entire header area in an NSIS installer with a bitmap. I have set MUI-HEADERIMAGE-BITMAP and set all the subcaptions to " ", however on the install files page I see empty white boxes over top my bitmap where the text would normally be.... | [
"nsis"
] | 1 | 3 | 1,531 | 1 | 0 | 2008-10-09T13:10:18.323000 | 2008-10-09T13:31:43.570000 |
187,188 | 187,230 | How do I include a header into my site that is hosted externally? | We are hosting a site for a client and they want us to include the header they have on their server into the pages we are hosting. So whenever they change it, it will automatically change on our site. We are attempting to use the "include" tag in our JSP code. The code we are using is as follows: <%@ include file="www.... | If you choose to do this in Java, it's nice and easy using the HttpClient from Apache Commons. public static String fetchSourceHtml( String urlString ) {
try { HttpClient httpClient = new HttpClient(); GetMethod getMethod = new GetMethod( urlString ); getMethod.setFollowRedirects( true );
int httpStatus = httpClient.... | How do I include a header into my site that is hosted externally? We are hosting a site for a client and they want us to include the header they have on their server into the pages we are hosting. So whenever they change it, it will automatically change on our site. We are attempting to use the "include" tag in our JSP... | TITLE:
How do I include a header into my site that is hosted externally?
QUESTION:
We are hosting a site for a client and they want us to include the header they have on their server into the pages we are hosting. So whenever they change it, it will automatically change on our site. We are attempting to use the "inclu... | [
"java",
"jsp",
"include",
"jspinclude"
] | 2 | 3 | 2,884 | 4 | 0 | 2008-10-09T13:12:00.533000 | 2008-10-09T13:24:24.613000 |
187,189 | 187,239 | Response.Redirect("") inside "using{ }" | Assume the following code: using (SqlConnection conn = new SqlConnection(connectionString)) {... using (SqlCommand comm = new SqlCommand(...)) {.. do stuff.. if(condition) Response.Redirect("somepage.aspx");
} } Will the Response.Redirect() exit from the using blocks cause it to dispose all connections? Or, alternativ... | From http://msdn.microsoft.com/en-us/library/aa973248.aspx Calling Response.Redirect WILL NOT execute the finally block. Therefore, before any redirection or transfer of processing can occur, you must dispose of the objects. Yes, it does not directly address the Using statement, but it is a common enough programming pr... | Response.Redirect("") inside "using{ }" Assume the following code: using (SqlConnection conn = new SqlConnection(connectionString)) {... using (SqlCommand comm = new SqlCommand(...)) {.. do stuff.. if(condition) Response.Redirect("somepage.aspx");
} } Will the Response.Redirect() exit from the using blocks cause it to... | TITLE:
Response.Redirect("") inside "using{ }"
QUESTION:
Assume the following code: using (SqlConnection conn = new SqlConnection(connectionString)) {... using (SqlCommand comm = new SqlCommand(...)) {.. do stuff.. if(condition) Response.Redirect("somepage.aspx");
} } Will the Response.Redirect() exit from the using ... | [
".net",
"using",
"response.redirect"
] | 4 | 2 | 2,361 | 7 | 0 | 2008-10-09T13:12:41.343000 | 2008-10-09T13:29:43.260000 |
187,194 | 189,888 | RoR: What steps are you going through in the preparation phase of application development? | Let's say you already "know" what your client wants from you (i.e. you already did some analysis and have some clue about what are you supposed to deliver). What are the next steps you usually go through after this phase? In other words, what are the steps (in terms of preparation of the framework, plugins, repository,... | The first thing that we usually do here at work is to get a hosted virtual private server (VPS) as a development server (slicehost? whatever that fits your pocket) where you can ssh into and configure the following Setup up server combination of your choice (apache, lighttpd, nginx, thin, etc.) Setup ruby, rails, gems ... | RoR: What steps are you going through in the preparation phase of application development? Let's say you already "know" what your client wants from you (i.e. you already did some analysis and have some clue about what are you supposed to deliver). What are the next steps you usually go through after this phase? In othe... | TITLE:
RoR: What steps are you going through in the preparation phase of application development?
QUESTION:
Let's say you already "know" what your client wants from you (i.e. you already did some analysis and have some clue about what are you supposed to deliver). What are the next steps you usually go through after t... | [
"ruby-on-rails",
"ruby",
"project-management",
"project-planning"
] | 2 | 2 | 357 | 4 | 0 | 2008-10-09T13:14:58.640000 | 2008-10-10T02:15:13.620000 |
187,195 | 187,202 | Is there a difference between installing mod_python via httpd.conf and conf.d in apache? | I am working with a hosting provider who has installed mod_python for me. I followed the install instructions locally and included it in httpd.conf but they have opted to put it in conf.d/python.conf. Is there any difference/benefit to doing it either way? | No, all the files are parsed at run time, you can include as many as you want. They've just opted to seperate out the configuration for easier management. | Is there a difference between installing mod_python via httpd.conf and conf.d in apache? I am working with a hosting provider who has installed mod_python for me. I followed the install instructions locally and included it in httpd.conf but they have opted to put it in conf.d/python.conf. Is there any difference/benefi... | TITLE:
Is there a difference between installing mod_python via httpd.conf and conf.d in apache?
QUESTION:
I am working with a hosting provider who has installed mod_python for me. I followed the install instructions locally and included it in httpd.conf but they have opted to put it in conf.d/python.conf. Is there any... | [
"mod-python",
"apache"
] | 2 | 5 | 298 | 1 | 0 | 2008-10-09T13:15:22.790000 | 2008-10-09T13:17:26 |
187,198 | 187,350 | Tree Algorithm | I was thinking earlier today about an idea for a small game and stumbled upon how to implement it. The idea is that the player can make a series of moves that cause a little effect, but if done in a specific sequence would cause a greater effect. So far so good, this I know how to do. Obviously, I had to make it be mor... | I'm not absolutely completely sure that I understand exactly what you're saying, but as an analagous situation, say someone's inputting an endless stream of numbers on the keyboard. '117' is a magic sequence, '468' is another one, '411799' is another (which contains the first one). So if the user enters: 55468411799 yo... | Tree Algorithm I was thinking earlier today about an idea for a small game and stumbled upon how to implement it. The idea is that the player can make a series of moves that cause a little effect, but if done in a specific sequence would cause a greater effect. So far so good, this I know how to do. Obviously, I had to... | TITLE:
Tree Algorithm
QUESTION:
I was thinking earlier today about an idea for a small game and stumbled upon how to implement it. The idea is that the player can make a series of moves that cause a little effect, but if done in a specific sequence would cause a greater effect. So far so good, this I know how to do. O... | [
"algorithm",
"tree",
"switch-statement"
] | 3 | 3 | 865 | 7 | 0 | 2008-10-09T13:16:53.240000 | 2008-10-09T13:53:59.437000 |
187,205 | 187,288 | WSS/MOSS Development ... Where to draw the line? | Our organization started on the SharePoint path about two years ago. Before that, we (the developers) wrote mostly asp.net front ends for SQL back ends. Now it seems like every time a new project comes up, we are asked to “make” it fit in SharePoint; and we have stuffed some things into SharePoint that probably should ... | I sort of agree with you that this is sometimes a tough question. In general, though, I agree with the cliche that you just have to think about a sharepoint app a little differently. If your data can be considered as list-based, then SharePoint probably isn't a necessarily bad development framework. It may seem like mo... | WSS/MOSS Development ... Where to draw the line? Our organization started on the SharePoint path about two years ago. Before that, we (the developers) wrote mostly asp.net front ends for SQL back ends. Now it seems like every time a new project comes up, we are asked to “make” it fit in SharePoint; and we have stuffed ... | TITLE:
WSS/MOSS Development ... Where to draw the line?
QUESTION:
Our organization started on the SharePoint path about two years ago. Before that, we (the developers) wrote mostly asp.net front ends for SQL back ends. Now it seems like every time a new project comes up, we are asked to “make” it fit in SharePoint; an... | [
"sharepoint",
"moss",
"wss"
] | 1 | 3 | 421 | 5 | 0 | 2008-10-09T13:17:45.297000 | 2008-10-09T13:42:06.387000 |
187,207 | 191,810 | If DoCmd.SendObject fails? | I am using DoCmd.SendObject to send emails from MS access 2003. It opens the outlook with all relevant fields filled. But the user may not choose to send the email at that time. In that case, a prompt 'Send Action was cancelled' appears. Is there a way to catch this non-sending of email by user | It is possible to use Outlook events from Microsoft Access with a class module. You will find details in the LessThanDot wiki, under the heading "Example: Use Outlook Events with Access" | If DoCmd.SendObject fails? I am using DoCmd.SendObject to send emails from MS access 2003. It opens the outlook with all relevant fields filled. But the user may not choose to send the email at that time. In that case, a prompt 'Send Action was cancelled' appears. Is there a way to catch this non-sending of email by us... | TITLE:
If DoCmd.SendObject fails?
QUESTION:
I am using DoCmd.SendObject to send emails from MS access 2003. It opens the outlook with all relevant fields filled. But the user may not choose to send the email at that time. In that case, a prompt 'Send Action was cancelled' appears. Is there a way to catch this non-send... | [
"ms-access",
"vba",
"ms-office"
] | 1 | 2 | 1,660 | 4 | 0 | 2008-10-09T13:17:52.410000 | 2008-10-10T15:16:22.393000 |
187,216 | 5,264,810 | What is the best way for converting phone numbers into international format (E.164) using Java? | What is the best way for converting phone numbers into international format (E.164) using Java? Given a 'phone number' and a country id (let's say an ISO country code), I would like to convert it into a standard E.164 international format phone number. I am sure I can do it by hand quite easily - but I would not be sur... | Google provides a library for working with phone numbers. The same one they use for Android http://code.google.com/p/libphonenumber/ String swissNumberStr = "044 668 18 00" PhoneNumberUtil phoneUtil = PhoneNumberUtil.getInstance(); try { PhoneNumber swissNumberProto = phoneUtil.parse(swissNumberStr, "CH"); } catch (Num... | What is the best way for converting phone numbers into international format (E.164) using Java? What is the best way for converting phone numbers into international format (E.164) using Java? Given a 'phone number' and a country id (let's say an ISO country code), I would like to convert it into a standard E.164 intern... | TITLE:
What is the best way for converting phone numbers into international format (E.164) using Java?
QUESTION:
What is the best way for converting phone numbers into international format (E.164) using Java? Given a 'phone number' and a country id (let's say an ISO country code), I would like to convert it into a sta... | [
"java",
"validation",
"formatting",
"phone-number"
] | 38 | 60 | 76,868 | 7 | 0 | 2008-10-09T13:20:07.460000 | 2011-03-10T19:30:00.903000 |
187,219 | 187,393 | How do I get a terminal program to honour cursor keys? | I'm using ccl/openmcl on Mac OS X. (latest versions of both). When the lisp prompt is displayed, using the cursor keys to navigate the current line results in escape codes, rather than movement, eg: Welcome to Clozure Common Lisp Version 1.2-r9226-RC1 (DarwinX8664)!? (^[[D Here I've pressed the ( key, and then the left... | If Clozure CL doesn't provide native readline/editline/whatever support or is configured not to use it, you can run it with rlwrap, for example: rlwrap openmcl rlwrap can be obtained via MacPorts or directly from http://utopia.knoware.nl/~hlub/rlwrap/. | How do I get a terminal program to honour cursor keys? I'm using ccl/openmcl on Mac OS X. (latest versions of both). When the lisp prompt is displayed, using the cursor keys to navigate the current line results in escape codes, rather than movement, eg: Welcome to Clozure Common Lisp Version 1.2-r9226-RC1 (DarwinX8664)... | TITLE:
How do I get a terminal program to honour cursor keys?
QUESTION:
I'm using ccl/openmcl on Mac OS X. (latest versions of both). When the lisp prompt is displayed, using the cursor keys to navigate the current line results in escape codes, rather than movement, eg: Welcome to Clozure Common Lisp Version 1.2-r9226... | [
"macos",
"lisp",
"terminal"
] | 2 | 4 | 828 | 2 | 0 | 2008-10-09T13:21:03.137000 | 2008-10-09T14:01:16.847000 |
187,229 | 190,205 | Why does JQuery keydown work for window but not textbox? | Why does this work: $(window).keydown(function(event){ alert(event.keyCode); }); but not this: $('#ajaxSearchText').keydown(function(event){ alert(event.keyCode); }); I'm testing with Firefox 3. Interestingly, neither of them work in IE7. | Checked this in Chrome, IE7 and Firefox 3.0.3. Works as it should. jQuery version 1.2.6. | Why does JQuery keydown work for window but not textbox? Why does this work: $(window).keydown(function(event){ alert(event.keyCode); }); but not this: $('#ajaxSearchText').keydown(function(event){ alert(event.keyCode); }); I'm testing with Firefox 3. Interestingly, neither of them work in IE7. | TITLE:
Why does JQuery keydown work for window but not textbox?
QUESTION:
Why does this work: $(window).keydown(function(event){ alert(event.keyCode); }); but not this: $('#ajaxSearchText').keydown(function(event){ alert(event.keyCode); }); I'm testing with Firefox 3. Interestingly, neither of them work in IE7.
ANSWE... | [
"jquery"
] | 3 | 7 | 22,354 | 6 | 0 | 2008-10-09T13:24:15.580000 | 2008-10-10T05:18:41.817000 |
187,237 | 191,630 | Using FromBase64Transform with CryptoStream? | I have a.NET string which is Base64 encoded representation of an array of encrypted bytes. It is produced like this: String Encrypt( String message ) { CryptoStream cryptostream =... StreamWriter stream = new StreamWriter( cryptostream );... return Convert.ToBase64String(... ); } Now I want a decryption function like S... | I always the the Convert class to convert the string into an array of Byte. An example: public static string DeCryptString(string s) { byte[] b = System.Convert.FromBase64String(s);
using (MemoryStream ms = new MemoryStream(b)) using (CryptoStream cs = /* Create decrypting stream here */) using (StreamReader sr = new ... | Using FromBase64Transform with CryptoStream? I have a.NET string which is Base64 encoded representation of an array of encrypted bytes. It is produced like this: String Encrypt( String message ) { CryptoStream cryptostream =... StreamWriter stream = new StreamWriter( cryptostream );... return Convert.ToBase64String(...... | TITLE:
Using FromBase64Transform with CryptoStream?
QUESTION:
I have a.NET string which is Base64 encoded representation of an array of encrypted bytes. It is produced like this: String Encrypt( String message ) { CryptoStream cryptostream =... StreamWriter stream = new StreamWriter( cryptostream );... return Convert.... | [
".net"
] | 0 | 1 | 1,636 | 2 | 0 | 2008-10-09T13:29:16.320000 | 2008-10-10T14:36:42.490000 |
187,252 | 187,379 | Finding Expression Blend Designers | What are some recommendations for finding Expression Blend/WPF Designers to perform contract work? I think a (local) freelance designer might be the most reasonably priced, but I don't even know where to start. As additional background, I am located in the Midwest region of the US, where designers are not as prevalent. | I think you might discover it is extremely difficult to find these people right now... as most designers are familiar with the Adobe suite of products and not the Expression suite. I think a lot of people are learning that these skills need to be cultivated... whether a software developer with designer tendencies moves... | Finding Expression Blend Designers What are some recommendations for finding Expression Blend/WPF Designers to perform contract work? I think a (local) freelance designer might be the most reasonably priced, but I don't even know where to start. As additional background, I am located in the Midwest region of the US, wh... | TITLE:
Finding Expression Blend Designers
QUESTION:
What are some recommendations for finding Expression Blend/WPF Designers to perform contract work? I think a (local) freelance designer might be the most reasonably priced, but I don't even know where to start. As additional background, I am located in the Midwest re... | [
"wpf",
"expression-blend"
] | 5 | 2 | 1,036 | 3 | 0 | 2008-10-09T13:32:04.363000 | 2008-10-09T13:58:19.677000 |
187,255 | 187,270 | How to have a range in a MySQL If statement? | I'm trying to make a select that calculates affiliate payouts. my approach is pretty simple. SELECT month(payments.timestmap),sum(if(payments.amount>=29.95,4,0)) As Tier4,sum(if(payments.amount>=24.95<=29.94,3,0)) As Tier3,sum(if(payments.amount>=19.95<=24.94,2,0)) As Tier2 FROM payments GROUP BY month(payments.timesta... | The second part of the expression evaluates when you use AND - SELECT month(payments.timestmap),sum(if(payments.amount>=29.95,4,0)) As Tier4,sum(if(payments.amount>=24.95 AND payments.amount<=29.94,3,0)) As Tier3,sum(if(payments.amount>=19.95 AND payments.amount<=24.94,2,0)) As Tier2 FROM payments GROUP BY month(paymen... | How to have a range in a MySQL If statement? I'm trying to make a select that calculates affiliate payouts. my approach is pretty simple. SELECT month(payments.timestmap),sum(if(payments.amount>=29.95,4,0)) As Tier4,sum(if(payments.amount>=24.95<=29.94,3,0)) As Tier3,sum(if(payments.amount>=19.95<=24.94,2,0)) As Tier2 ... | TITLE:
How to have a range in a MySQL If statement?
QUESTION:
I'm trying to make a select that calculates affiliate payouts. my approach is pretty simple. SELECT month(payments.timestmap),sum(if(payments.amount>=29.95,4,0)) As Tier4,sum(if(payments.amount>=24.95<=29.94,3,0)) As Tier3,sum(if(payments.amount>=19.95<=24.... | [
"mysql"
] | 3 | 7 | 16,935 | 4 | 0 | 2008-10-09T13:33:23.643000 | 2008-10-09T13:37:54.977000 |
187,273 | 187,536 | Base-2 (Binary) Representation Using Python | Building on How Do You Express Binary Literals in Python, I was thinking about sensible, intuitive ways to do that Programming 101 chestnut of displaying integers in base-2 form. This is the best I came up with, but I'd like to replace it with a better algorithm, or at least one that should have screaming-fast performa... | For best efficiency, you generally want to process more than a single bit at a time. You can use a simple method to get a fixed width binary representation. eg. def _bin(x, width): return ''.join(str((x>>i)&1) for i in xrange(width-1,-1,-1)) _bin(x, 8) will now give a zero padded representation of x's lower 8 bits. Thi... | Base-2 (Binary) Representation Using Python Building on How Do You Express Binary Literals in Python, I was thinking about sensible, intuitive ways to do that Programming 101 chestnut of displaying integers in base-2 form. This is the best I came up with, but I'd like to replace it with a better algorithm, or at least ... | TITLE:
Base-2 (Binary) Representation Using Python
QUESTION:
Building on How Do You Express Binary Literals in Python, I was thinking about sensible, intuitive ways to do that Programming 101 chestnut of displaying integers in base-2 form. This is the best I came up with, but I'd like to replace it with a better algor... | [
"python"
] | 7 | 14 | 17,199 | 2 | 0 | 2008-10-09T13:38:32.947000 | 2008-10-09T14:29:59.550000 |
187,279 | 187,313 | Strange float behaviour in IE7 | I want to create a simple box with a header bar containing a title and some tool buttons. I have the following markup: title toolbar content This renders fine in Firefox and Chrome: http://www.boplicity.nl/images/firefox.jpg However IE7 totally messes up and puts the right floated element to the right of the page: http... | Specify width in outermost div. If that width in your content div means this is the total width of your box, simply add it to the outermost div, and (optionally) remove it from content, like this: title toolbar content | Strange float behaviour in IE7 I want to create a simple box with a header bar containing a title and some tool buttons. I have the following markup: title toolbar content This renders fine in Firefox and Chrome: http://www.boplicity.nl/images/firefox.jpg However IE7 totally messes up and puts the right floated element... | TITLE:
Strange float behaviour in IE7
QUESTION:
I want to create a simple box with a header bar containing a title and some tool buttons. I have the following markup: title toolbar content This renders fine in Firefox and Chrome: http://www.boplicity.nl/images/firefox.jpg However IE7 totally messes up and puts the rig... | [
"css",
"internet-explorer-7",
"css-float"
] | 12 | 23 | 61,763 | 6 | 0 | 2008-10-09T13:39:43.490000 | 2008-10-09T13:46:23.977000 |
187,281 | 187,297 | SQL SELECT FROM ... AS with data type specifier? | I have a problem with an SQL query on Postgresql. This select clause is an example from a lecture on databases: 1 select t.CourseNr, t.StudentsPerCourse, g.StudentCount, 2 t.StudentsPerCourse/g.StudentCount as Marketshare 3 from (select CourseNr, count(*) as StudentsPerCourse 4 from taking 5 group by CourseNr) t, 6 (se... | CAST() one or both of the source columns as a decimal/float/real/double/etc type. | SQL SELECT FROM ... AS with data type specifier? I have a problem with an SQL query on Postgresql. This select clause is an example from a lecture on databases: 1 select t.CourseNr, t.StudentsPerCourse, g.StudentCount, 2 t.StudentsPerCourse/g.StudentCount as Marketshare 3 from (select CourseNr, count(*) as StudentsPerC... | TITLE:
SQL SELECT FROM ... AS with data type specifier?
QUESTION:
I have a problem with an SQL query on Postgresql. This select clause is an example from a lecture on databases: 1 select t.CourseNr, t.StudentsPerCourse, g.StudentCount, 2 t.StudentsPerCourse/g.StudentCount as Marketshare 3 from (select CourseNr, count(... | [
"sql",
"postgresql"
] | 11 | 10 | 24,162 | 1 | 0 | 2008-10-09T13:40:13.037000 | 2008-10-09T13:43:30.517000 |
187,284 | 188,730 | log4net not logging ThreadContext | I have log4net running on my AsP.NET site. I'm able to log messages to my DB Table, but it isn't logging the ThreadContext properties. For example: ThreadContext.Properties["Url"] = HttpContext.Current.Request.Url.ToString(); ThreadContext.Properties["HttpReferer"] = HttpContext.Current.Request.ServerVariables["HTTP_RE... | So, it turns out the config was to blame. It was slightly wrong: Original: Changed: I had to take out the "log4net:" inside of property. What's odd is that one property still required log4net:propertyName. I have absolutely no idea why it works this way, but that's the fix that worked! | log4net not logging ThreadContext I have log4net running on my AsP.NET site. I'm able to log messages to my DB Table, but it isn't logging the ThreadContext properties. For example: ThreadContext.Properties["Url"] = HttpContext.Current.Request.Url.ToString(); ThreadContext.Properties["HttpReferer"] = HttpContext.Curren... | TITLE:
log4net not logging ThreadContext
QUESTION:
I have log4net running on my AsP.NET site. I'm able to log messages to my DB Table, but it isn't logging the ThreadContext properties. For example: ThreadContext.Properties["Url"] = HttpContext.Current.Request.Url.ToString(); ThreadContext.Properties["HttpReferer"] = ... | [
"asp.net",
"log4net"
] | 6 | 11 | 4,352 | 2 | 0 | 2008-10-09T13:40:37.513000 | 2008-10-09T19:08:30.643000 |
187,295 | 187,351 | Random distribution of data | How do I distribute a small amount of data in a random order in a much larger volume of data? For example, I have several thousand lines of 'real' data, and I want to insert a dozen or two lines of control data in a random order throughout the 'real' data. Now I am not trying to ask how to use random number generators,... | There's always a possibility that they get close to each other if you do it really random:) But What I would do is: You have N rows of real data and x of control data To get an index of a row you should insert i -th control row, I'd use: N/(x+1) * i + r, where r is some random number, diffrent for each of the control r... | Random distribution of data How do I distribute a small amount of data in a random order in a much larger volume of data? For example, I have several thousand lines of 'real' data, and I want to insert a dozen or two lines of control data in a random order throughout the 'real' data. Now I am not trying to ask how to u... | TITLE:
Random distribution of data
QUESTION:
How do I distribute a small amount of data in a random order in a much larger volume of data? For example, I have several thousand lines of 'real' data, and I want to insert a dozen or two lines of control data in a random order throughout the 'real' data. Now I am not tryi... | [
"random",
"controls",
"distribution",
"random-seed"
] | 5 | 3 | 1,402 | 4 | 0 | 2008-10-09T13:43:15.450000 | 2008-10-09T13:53:59.483000 |
187,319 | 187,395 | Regular expression that uses an "OR" conditional | I could use some help writing a regular expression. In my Django application, users can hit the following URL: http://www.example.com/A1/B2/C3 I'd like to create a regular expression that allows accepts any of the following as a valid URL: http://www.example.com/A1 http://www.example.com/A1/B2 http://www.example.com/A1... | Skip the |, use the? and () http://www\.example\.com/A1(/B2(/C3)?)? And if you replace the A1-C3 with a pattern: http://www\.example\.com/[^/]*(/[^/]*(/[^/]*)?)? Explanation: it matches every string that starts with http://www.example.com/A1 it can match an additional /B2 and even an additional /C3, but /C3 is only mat... | Regular expression that uses an "OR" conditional I could use some help writing a regular expression. In my Django application, users can hit the following URL: http://www.example.com/A1/B2/C3 I'd like to create a regular expression that allows accepts any of the following as a valid URL: http://www.example.com/A1 http:... | TITLE:
Regular expression that uses an "OR" conditional
QUESTION:
I could use some help writing a regular expression. In my Django application, users can hit the following URL: http://www.example.com/A1/B2/C3 I'd like to create a regular expression that allows accepts any of the following as a valid URL: http://www.ex... | [
"regex",
"django",
"django-urls"
] | 2 | 6 | 11,492 | 6 | 0 | 2008-10-09T13:48:53.533000 | 2008-10-09T14:02:13.133000 |
187,321 | 324,287 | What are the advantages of RTSP? | I am looking for the advantages of using RTSP to support streaming video to multiple devices. I have: Benefits of TCP. Commonly used protocol on web so supported by lots of infrastructure. Commonly used on web so lots of tools and stacks. Can use SSL. Wide device support (not sure on this one) Any other ideas? | RTSP has the benefit of being highly flexible, but at the cost of being more complicated to implement. It is also a widely supported standard, especially on mobile phones where it is a part of the 3GPP stack. Answering directly to your list points: RTSP can use UDP and TCP. Some clients will switch gracefully between t... | What are the advantages of RTSP? I am looking for the advantages of using RTSP to support streaming video to multiple devices. I have: Benefits of TCP. Commonly used protocol on web so supported by lots of infrastructure. Commonly used on web so lots of tools and stacks. Can use SSL. Wide device support (not sure on th... | TITLE:
What are the advantages of RTSP?
QUESTION:
I am looking for the advantages of using RTSP to support streaming video to multiple devices. I have: Benefits of TCP. Commonly used protocol on web so supported by lots of infrastructure. Commonly used on web so lots of tools and stacks. Can use SSL. Wide device suppo... | [
"streaming",
"protocols"
] | 1 | 3 | 5,351 | 1 | 0 | 2008-10-09T13:49:38.913000 | 2008-11-27T17:19:25.553000 |
187,349 | 187,469 | What is your "generic" web application testing plan? | Like, testing for: invalid inputs (strings containing "'"s) giving random id's in url parameters to access "unauthorized" pages prevent sql injection... | I would recommend reading this brilliant book to learn more about the test plans. In particular a test plan is much more than a list of techniques like you mentioned (these should most likely go into the details for the security testing) It should at least contain: The answers to the main questions: why bother (what is... | What is your "generic" web application testing plan? Like, testing for: invalid inputs (strings containing "'"s) giving random id's in url parameters to access "unauthorized" pages prevent sql injection... | TITLE:
What is your "generic" web application testing plan?
QUESTION:
Like, testing for: invalid inputs (strings containing "'"s) giving random id's in url parameters to access "unauthorized" pages prevent sql injection...
ANSWER:
I would recommend reading this brilliant book to learn more about the test plans. In pa... | [
"language-agnostic",
"testing"
] | 2 | 1 | 2,742 | 4 | 0 | 2008-10-09T13:53:57.703000 | 2008-10-09T14:18:02.710000 |
187,357 | 189,527 | Linq to SQL: DataTable.Rows[0]["ColumnName"] equivalent | Consider this: var query = from r in this._db.Recipes where r.RecipesID == recipeID select new { r.RecipesID, r.RecipesName }; How would i get individual columns in my query object without using a for-loop? Basicly: how do I translate DataTable.Rows[0]["ColumnName"] into Linq syntax? | This is the way to go about it: DataContext dc = new DataContext();
var recipe = (from r in dc.Recipes where r.RecipesID == 1 select r).FirstOrDefault();
if (recipe!= null) { id = recipe.RecipesID; name = recipe.RecipesName; } | Linq to SQL: DataTable.Rows[0]["ColumnName"] equivalent Consider this: var query = from r in this._db.Recipes where r.RecipesID == recipeID select new { r.RecipesID, r.RecipesName }; How would i get individual columns in my query object without using a for-loop? Basicly: how do I translate DataTable.Rows[0]["ColumnName... | TITLE:
Linq to SQL: DataTable.Rows[0]["ColumnName"] equivalent
QUESTION:
Consider this: var query = from r in this._db.Recipes where r.RecipesID == recipeID select new { r.RecipesID, r.RecipesName }; How would i get individual columns in my query object without using a for-loop? Basicly: how do I translate DataTable.R... | [
"c#",
"linq",
"c#-3.0"
] | 1 | 1 | 13,239 | 4 | 0 | 2008-10-09T13:55:00.370000 | 2008-10-09T23:00:02.097000 |
187,359 | 296,353 | Hidding source control files within Visual Studio's solution tree | We use Visual Studio 2008 and Surround SCM for source control. SCM drops files into each directory named ".MySCMServerInfo" which are user specific data files that shouldn't be checked into source control. They are similar to the.scc files dropped by Visual Source Safe. We also have several WAPs (Web Application Projec... | I have new information about this issue. Setting the hidden bit on.MySCMServerInfo file causes Surround SCM to loose track of the modification state for files. It starts thinking files are out-of-date when they are not, and it always attemps to get new versions. Instead, set this registry key if you're using Visual Stu... | Hidding source control files within Visual Studio's solution tree We use Visual Studio 2008 and Surround SCM for source control. SCM drops files into each directory named ".MySCMServerInfo" which are user specific data files that shouldn't be checked into source control. They are similar to the.scc files dropped by Vis... | TITLE:
Hidding source control files within Visual Studio's solution tree
QUESTION:
We use Visual Studio 2008 and Surround SCM for source control. SCM drops files into each directory named ".MySCMServerInfo" which are user specific data files that shouldn't be checked into source control. They are similar to the.scc fi... | [
"visual-studio",
"version-control"
] | 3 | 4 | 1,416 | 3 | 0 | 2008-10-09T13:55:07.797000 | 2008-11-17T18:01:31.090000 |
187,380 | 189,248 | Why use Ruby instead of Smalltalk? | Ruby is becoming popular, largely from the influence Ruby on Rails, but it feels like it is currently struggling through its adolescence. There are a lot of similarities between Ruby and Smalltalk -- maglev is a testament to that. Despite having a more unusual syntax, Smalltalk has all (if not more) of the object-orien... | I'm more of a Pythonista than a Ruby user, however the same things hold for Ruby for much the same reasons. The architecture of Smalltalk is somewhat insular whereas Python and Ruby were built from the ground up to facilitate integration. Smalltalk never really gained a body of hybrid application support in the way tha... | Why use Ruby instead of Smalltalk? Ruby is becoming popular, largely from the influence Ruby on Rails, but it feels like it is currently struggling through its adolescence. There are a lot of similarities between Ruby and Smalltalk -- maglev is a testament to that. Despite having a more unusual syntax, Smalltalk has al... | TITLE:
Why use Ruby instead of Smalltalk?
QUESTION:
Ruby is becoming popular, largely from the influence Ruby on Rails, but it feels like it is currently struggling through its adolescence. There are a lot of similarities between Ruby and Smalltalk -- maglev is a testament to that. Despite having a more unusual syntax... | [
"ruby-on-rails",
"ruby",
"smalltalk",
"seaside"
] | 124 | 88 | 24,778 | 28 | 0 | 2008-10-09T13:58:41.330000 | 2008-10-09T21:16:21.697000 |
187,391 | 266,440 | WatiN test using IE.GetCookie failing only from CruiseControl | I added some simple WatiN tests to our app today to check that a cookie value is stored correctly. The tests pass locally on all machines in the team. However, when CruiseControl runs the tests on our Build server these new tests fail on the line containing browser.GetCookie(url, cookieName) The error given in the Crui... | Try running CruiseControl as a application instead of as a service. WatiN tends to hang when run from a service (since windows services are not attached to a UI session, and WatiN requires one for handling dialog boxes in IE). But besides that... recall that IE cookies are stored in your user profile. Profiles are not ... | WatiN test using IE.GetCookie failing only from CruiseControl I added some simple WatiN tests to our app today to check that a cookie value is stored correctly. The tests pass locally on all machines in the team. However, when CruiseControl runs the tests on our Build server these new tests fail on the line containing ... | TITLE:
WatiN test using IE.GetCookie failing only from CruiseControl
QUESTION:
I added some simple WatiN tests to our app today to check that a cookie value is stored correctly. The tests pass locally on all machines in the team. However, when CruiseControl runs the tests on our Build server these new tests fail on th... | [
"c#",
"cookies",
"watin",
"cruisecontrol",
"mbunit"
] | 1 | 2 | 1,125 | 1 | 0 | 2008-10-09T14:01:08.017000 | 2008-11-05T20:05:55.327000 |
187,396 | 187,446 | Configuration Across Multiple Applications | What is recommended for sharing configuration data amongst several related applications in a winforms solution? The two possible solutions I envisage are using a custom section in the machine.config (?) file, and the other is to create an extra config service application that maintains settings via its Properties class... | One issue with the config service app is that you then potentially need to authenticate/authorize callers of the service if the settings contain sensitive data (such as database passwords). May or may not be an issue depending on your environment. Similarly you could use some other shared resource to store the settings... | Configuration Across Multiple Applications What is recommended for sharing configuration data amongst several related applications in a winforms solution? The two possible solutions I envisage are using a custom section in the machine.config (?) file, and the other is to create an extra config service application that ... | TITLE:
Configuration Across Multiple Applications
QUESTION:
What is recommended for sharing configuration data amongst several related applications in a winforms solution? The two possible solutions I envisage are using a custom section in the machine.config (?) file, and the other is to create an extra config service... | [
".net",
"architecture"
] | 0 | 2 | 183 | 1 | 0 | 2008-10-09T14:02:21.243000 | 2008-10-09T14:11:59.430000 |
187,406 | 187,416 | C# nullable string error | private string? typeOfContract { get { return (string?)ViewState["typeOfContract"]; } set { ViewState["typeOfContract"] = value; } } Later in the code I use it like this: typeOfContract = Request.QueryString["type"]; I am getting the following error at the declaration of typeOfContract line stating: The type 'string' m... | System.String is a reference type and already "nullable". Nullable and the? suffix are for value types such as Int32, Double, DateTime, etc. | C# nullable string error private string? typeOfContract { get { return (string?)ViewState["typeOfContract"]; } set { ViewState["typeOfContract"] = value; } } Later in the code I use it like this: typeOfContract = Request.QueryString["type"]; I am getting the following error at the declaration of typeOfContract line sta... | TITLE:
C# nullable string error
QUESTION:
private string? typeOfContract { get { return (string?)ViewState["typeOfContract"]; } set { ViewState["typeOfContract"] = value; } } Later in the code I use it like this: typeOfContract = Request.QueryString["type"]; I am getting the following error at the declaration of typeO... | [
"c#",
"nullable"
] | 135 | 303 | 140,281 | 5 | 0 | 2008-10-09T14:03:57.560000 | 2008-10-09T14:05:47.120000 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.