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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
197,759 | 197,846 | Dealing with a string containing multiple character encodings | I'm not exactly sure how to ask this question really, and I'm no where close to finding an answer, so I hope someone can help me. I'm writing a Python app that connects to a remote host and receives back byte data, which I unpack using Python's built-in struct module. My problem is with the strings, as they include mul... | There's no built-in functionality for decoding a string like this, since it is really its own custom codec. You simply need to split up the string on those control characters and decode it accordingly. Here's a (very slow) example of such a function that handles latin1 and shift-JIS: latin1 = "latin-1" japanese = "Shif... | Dealing with a string containing multiple character encodings I'm not exactly sure how to ask this question really, and I'm no where close to finding an answer, so I hope someone can help me. I'm writing a Python app that connects to a remote host and receives back byte data, which I unpack using Python's built-in stru... | TITLE:
Dealing with a string containing multiple character encodings
QUESTION:
I'm not exactly sure how to ask this question really, and I'm no where close to finding an answer, so I hope someone can help me. I'm writing a Python app that connects to a remote host and receives back byte data, which I unpack using Pyth... | [
"python",
"string",
"unicode",
"encoding"
] | 9 | 4 | 3,737 | 5 | 0 | 2008-10-13T14:26:10.293000 | 2008-10-13T14:52:14.907000 |
197,760 | 198,780 | Beanstalk like Functionality | I'm finally getting my team to embrace source code management now that we're working on projects where more than one dev is touching the same codebase, and I setup a free/trial account on Beanstalk for hosted Subversion so people could get a taste of how it works. That said, we've discussed a somewhat ambitious plan to... | There are probably a lot of people on Stack Overflow who know lots about Subversion, but have never heard of Beanstalk and therefore can't help you. Specifically what web front-end functionality are you looking for? My team only ever needs to browse our SVN repositories via a web browser (and compare revisions) and for... | Beanstalk like Functionality I'm finally getting my team to embrace source code management now that we're working on projects where more than one dev is touching the same codebase, and I setup a free/trial account on Beanstalk for hosted Subversion so people could get a taste of how it works. That said, we've discussed... | TITLE:
Beanstalk like Functionality
QUESTION:
I'm finally getting my team to embrace source code management now that we're working on projects where more than one dev is touching the same codebase, and I setup a free/trial account on Beanstalk for hosted Subversion so people could get a taste of how it works. That sai... | [
"svn",
"version-control",
"beanstalk-svn"
] | 0 | 1 | 2,523 | 1 | 0 | 2008-10-13T14:26:27.203000 | 2008-10-13T19:41:34.213000 |
197,762 | 197,785 | Is it possible to see more than 65536 rows in Excel 2007? | I have an excel file which has more than 65536 rows. However, I can see only first 65536 of them. Is it possible to see all of them in Excel 2007? | Here is an interesting blog entry about numbers / limitations of Excel 2007. According to the author the new limit is approximately one million rows. Sounds like you have a pre-Excel 2007 workbook open in Excel 2007 in compatibility mode (look in the title bar and see if it says compatibility mode). If so, the workbook... | Is it possible to see more than 65536 rows in Excel 2007? I have an excel file which has more than 65536 rows. However, I can see only first 65536 of them. Is it possible to see all of them in Excel 2007? | TITLE:
Is it possible to see more than 65536 rows in Excel 2007?
QUESTION:
I have an excel file which has more than 65536 rows. However, I can see only first 65536 of them. Is it possible to see all of them in Excel 2007?
ANSWER:
Here is an interesting blog entry about numbers / limitations of Excel 2007. According t... | [
"excel"
] | 16 | 34 | 194,487 | 6 | 0 | 2008-10-13T14:27:30.617000 | 2008-10-13T14:32:25.897000 |
197,769 | 198,031 | When is JavaScript's eval() not evil? | I'm writing some JavaScript code to parse user-entered functions (for spreadsheet-like functionality). Having parsed the formula I could convert it into JavaScript and run eval() on it to yield the result. However, I've always shied away from using eval() if I can avoid it because it's evil (and, rightly or wrongly, I'... | I'd like to take a moment to address the premise of your question - that eval() is " evil ". The word " evil ", as used by programming language people, usually means "dangerous", or more precisely "able to cause lots of harm with a simple-looking command". So, when is it OK to use something dangerous? When you know wha... | When is JavaScript's eval() not evil? I'm writing some JavaScript code to parse user-entered functions (for spreadsheet-like functionality). Having parsed the formula I could convert it into JavaScript and run eval() on it to yield the result. However, I've always shied away from using eval() if I can avoid it because ... | TITLE:
When is JavaScript's eval() not evil?
QUESTION:
I'm writing some JavaScript code to parse user-entered functions (for spreadsheet-like functionality). Having parsed the formula I could convert it into JavaScript and run eval() on it to yield the result. However, I've always shied away from using eval() if I can... | [
"javascript",
"coding-style",
"eval"
] | 305 | 286 | 116,192 | 27 | 0 | 2008-10-13T14:28:28.683000 | 2008-10-13T15:40:39.707000 |
197,784 | 197,808 | Transferring files between web applications running in the same Tomcat Instance | I have two web applications running in the same Tomcat Instance. In one of these applications the user will have the ability to upload files such as images and pdf files. I would like the uploaded files to be available to the second application. Is there a best practice for such a scenario? Or just a pointer to a techn... | Cheap, bad answer - have both applications softlink to a shared directory. This has the benefit of being stupid-simple to do but has evil transactional-type issues. Since you say that only one application is changing the data, and the other is read-only you might be able to get away with it, as long as the second app c... | Transferring files between web applications running in the same Tomcat Instance I have two web applications running in the same Tomcat Instance. In one of these applications the user will have the ability to upload files such as images and pdf files. I would like the uploaded files to be available to the second applica... | TITLE:
Transferring files between web applications running in the same Tomcat Instance
QUESTION:
I have two web applications running in the same Tomcat Instance. In one of these applications the user will have the ability to upload files such as images and pdf files. I would like the uploaded files to be available to ... | [
"java",
"tomcat"
] | 3 | 3 | 430 | 3 | 0 | 2008-10-13T14:32:22.027000 | 2008-10-13T14:39:33.247000 |
197,819 | 197,849 | .NET Code Security Review Tool | I am looking for a utility that can be used against.NET assemblies to validate code against best practices, and most importantly can review the code for Security, Injection, and Cross Site Scripting vulnerabilities. I know that it isn't an exact science, but I'm looking for anyones experience/recommendations on the bes... | FxCop is a static code analysis tool, though not specifically targetting security, it will pick up alot of common errors (be sure to turn off the naming rules you aren't interested in). Also, I came across the "Performance Code Review Tool – Practices Checker" here. | .NET Code Security Review Tool I am looking for a utility that can be used against.NET assemblies to validate code against best practices, and most importantly can review the code for Security, Injection, and Cross Site Scripting vulnerabilities. I know that it isn't an exact science, but I'm looking for anyones experi... | TITLE:
.NET Code Security Review Tool
QUESTION:
I am looking for a utility that can be used against.NET assemblies to validate code against best practices, and most importantly can review the code for Security, Injection, and Cross Site Scripting vulnerabilities. I know that it isn't an exact science, but I'm looking ... | [
".net"
] | 7 | 2 | 1,261 | 2 | 0 | 2008-10-13T14:43:02.973000 | 2008-10-13T14:54:01.733000 |
197,834 | 402,639 | What is wrong when you get an "Unrecognized configuration section runtime" configuration exception | In particular from this web.config: | It looks like.NET was installed using a corporate re-packaging technology and not all the bits were there. We installed from the original Microsoft image and all is fine. | What is wrong when you get an "Unrecognized configuration section runtime" configuration exception In particular from this web.config: | TITLE:
What is wrong when you get an "Unrecognized configuration section runtime" configuration exception
QUESTION:
In particular from this web.config:
ANSWER:
It looks like.NET was installed using a corporate re-packaging technology and not all the bits were there. We installed from the original Microsoft image and ... | [
".net",
"exception",
"configuration"
] | 2 | 1 | 5,563 | 4 | 0 | 2008-10-13T14:49:18.733000 | 2008-12-31T10:02:52.233000 |
197,835 | 197,850 | How to get rid of security exception? | I start a.Net server side program on my local workstation, but soon it throws a security exception. I searched the web for answers, but no quick fix was found / worked. I just want to run my program. How do I get rid of the exception? I fully trust the program, because its mine. Edit: Oh, yes, I do run the program from... | .NET 3.5 SP1 has better support for running applications on the local intranet. If you can't target 3.5 SP1, you can map the share you're running the application from to a local drive and use CasPol to set that mapped drive to a fully trusted location. | How to get rid of security exception? I start a.Net server side program on my local workstation, but soon it throws a security exception. I searched the web for answers, but no quick fix was found / worked. I just want to run my program. How do I get rid of the exception? I fully trust the program, because its mine. Ed... | TITLE:
How to get rid of security exception?
QUESTION:
I start a.Net server side program on my local workstation, but soon it throws a security exception. I searched the web for answers, but no quick fix was found / worked. I just want to run my program. How do I get rid of the exception? I fully trust the program, be... | [
".net",
"security",
"exception",
"full-trust"
] | 0 | 2 | 398 | 2 | 0 | 2008-10-13T14:49:33.367000 | 2008-10-13T14:54:14.480000 |
197,839 | 197,900 | Can you obtain the size of an array allocated with new T[]? | This question was inspired by a similar question: How does delete[] “know” the size of the operand array? My question is a little different: Is there any way to determine the size of a C++ array programmatically? And if not, why? Every function I've seen that takes an array also requires an integer parameter to give it... | delete [] does know the size that was allocated. However, that knowledge resides in the runtime or in the operating system's memory manager, meaning that it is not available to the compiler during compilation. And sizeof() is not a real function, it is actually evaluated to a constant by the compiler, which is somethin... | Can you obtain the size of an array allocated with new T[]? This question was inspired by a similar question: How does delete[] “know” the size of the operand array? My question is a little different: Is there any way to determine the size of a C++ array programmatically? And if not, why? Every function I've seen that ... | TITLE:
Can you obtain the size of an array allocated with new T[]?
QUESTION:
This question was inspired by a similar question: How does delete[] “know” the size of the operand array? My question is a little different: Is there any way to determine the size of a C++ array programmatically? And if not, why? Every functi... | [
"c++",
"arrays",
"pointers",
"memory-management",
"new-operator"
] | 63 | 70 | 71,173 | 20 | 0 | 2008-10-13T14:50:36.593000 | 2008-10-13T15:03:26.007000 |
197,845 | 199,979 | Scope issue - Controlling a movieclip inside a button with actionscript | I'm trying to show/hide a movieclip (or graphic) symbol that is on a layer of a button symbol using actionscript 2. Here's what I tried in the actions for the button: on (release) { this.button_name.movieclip_name._alpha = 0; trace(this.button_name.movieclip_name); } and the trace returns undefined... so I think I've g... | For AS2, it's not a good idea to put MovieClips inside buttons. The easiest and most direct approach is to restructure things so that your button and the movieclip you had inside it are at the same level, perhaps within a new MC created to contain them. You should think of the Button symbol as a thing that only provide... | Scope issue - Controlling a movieclip inside a button with actionscript I'm trying to show/hide a movieclip (or graphic) symbol that is on a layer of a button symbol using actionscript 2. Here's what I tried in the actions for the button: on (release) { this.button_name.movieclip_name._alpha = 0; trace(this.button_name... | TITLE:
Scope issue - Controlling a movieclip inside a button with actionscript
QUESTION:
I'm trying to show/hide a movieclip (or graphic) symbol that is on a layer of a button symbol using actionscript 2. Here's what I tried in the actions for the button: on (release) { this.button_name.movieclip_name._alpha = 0; trac... | [
"actionscript",
"scope",
"actionscript-2"
] | 2 | 1 | 5,403 | 2 | 0 | 2008-10-13T14:52:10.740000 | 2008-10-14T03:58:53.757000 |
197,858 | 197,878 | Possible to export FireFox extensions and settings? | Want my FireFox at work to be in sync with my FireFox at my home. Is there a way to simply export all extensions and settings? | Just copy the files from your FireFox/Profiles folder to get the settings/saved passwords etc. That contains settngs and passwords. I believe you can do a similar process for extensions as well | Possible to export FireFox extensions and settings? Want my FireFox at work to be in sync with my FireFox at my home. Is there a way to simply export all extensions and settings? | TITLE:
Possible to export FireFox extensions and settings?
QUESTION:
Want my FireFox at work to be in sync with my FireFox at my home. Is there a way to simply export all extensions and settings?
ANSWER:
Just copy the files from your FireFox/Profiles folder to get the settings/saved passwords etc. That contains settn... | [
"firefox"
] | 2 | 1 | 9,453 | 5 | 0 | 2008-10-13T14:56:18.173000 | 2008-10-13T14:59:38.090000 |
197,864 | 200,595 | How to best write an RSpec custom matcher to test access control in a Rails app | OK, so instead of writing a whole bunch of access control specs, and duplicating them across many of my spec files, I'm looking to create a custom matcher. So instead of this: describe "access control" do it "should prevent access by non-logged-in users" it "should prevent access by normal users" it "should prevent acc... | OK, I have found a method of achieving this, though it doesn't use a custom matcher. Include the following code in your spec_helper.rb: def access_control (code, options={}) options = {:allow => [],:disallow => []}.merge(options)
options[:allow].each do |user| it "#{code} should allow #{user.to_s}" do login_as(user) e... | How to best write an RSpec custom matcher to test access control in a Rails app OK, so instead of writing a whole bunch of access control specs, and duplicating them across many of my spec files, I'm looking to create a custom matcher. So instead of this: describe "access control" do it "should prevent access by non-lo... | TITLE:
How to best write an RSpec custom matcher to test access control in a Rails app
QUESTION:
OK, so instead of writing a whole bunch of access control specs, and duplicating them across many of my spec files, I'm looking to create a custom matcher. So instead of this: describe "access control" do it "should preven... | [
"ruby-on-rails",
"testing",
"rspec"
] | 2 | 2 | 1,148 | 2 | 0 | 2008-10-13T14:57:19.090000 | 2008-10-14T10:03:37.217000 |
197,867 | 197,930 | Getting Count from Grouped DataTable in VB via Linq | I'm running into a mental roadblock here and I'm hoping that I'm missing something obvious. Anyway, assume I have a table that looks like this: ID LookupValue SortOrder ============================================ 1 A 1000 2 B 2000 3 B 2000 4 C 3000 5 C 4000 I'm trying to find, using Linq, places where the LookupValue ... | Key is a string. Key.Count counts the characters in the string. Change the select to include the group Select Key, SortOrder, Group and change the where clause to count the group KeySortPairs.Where(Function(t) t.Group.Count() > 1) Alternatively, counting the group might be overkill. "Any" can save time by doing a short... | Getting Count from Grouped DataTable in VB via Linq I'm running into a mental roadblock here and I'm hoping that I'm missing something obvious. Anyway, assume I have a table that looks like this: ID LookupValue SortOrder ============================================ 1 A 1000 2 B 2000 3 B 2000 4 C 3000 5 C 4000 I'm tryin... | TITLE:
Getting Count from Grouped DataTable in VB via Linq
QUESTION:
I'm running into a mental roadblock here and I'm hoping that I'm missing something obvious. Anyway, assume I have a table that looks like this: ID LookupValue SortOrder ============================================ 1 A 1000 2 B 2000 3 B 2000 4 C 3000 ... | [
"vb.net",
"linq",
"datatable"
] | 2 | 2 | 8,999 | 3 | 0 | 2008-10-13T14:57:36.657000 | 2008-10-13T15:12:03.260000 |
197,876 | 197,941 | How do I uninstall a Windows service if the files do not exist anymore? | How do I uninstall a.NET Windows Service if the service files do not exist anymore? I installed a.NET Windows Service using InstallUtil. I have since deleted the files but forgot to run InstallUtil /u first, so the service is still listed in the Services MMC. Do I have to go into the registry? Or is there a better way? | You have at least three options. I have presented them in order of usage preference. Method 1 - You can use the SC tool (Sc.exe) included in the Resource Kit. (included with Windows 7/8) Open a Command Prompt and enter sc delete Tool help snippet follows: DESCRIPTION: SC is a command line program used for communicating... | How do I uninstall a Windows service if the files do not exist anymore? How do I uninstall a.NET Windows Service if the service files do not exist anymore? I installed a.NET Windows Service using InstallUtil. I have since deleted the files but forgot to run InstallUtil /u first, so the service is still listed in the Se... | TITLE:
How do I uninstall a Windows service if the files do not exist anymore?
QUESTION:
How do I uninstall a.NET Windows Service if the service files do not exist anymore? I installed a.NET Windows Service using InstallUtil. I have since deleted the files but forgot to run InstallUtil /u first, so the service is stil... | [
"windows",
"windows-services",
"installation"
] | 620 | 1,218 | 835,870 | 15 | 0 | 2008-10-13T14:59:03.923000 | 2008-10-13T15:14:12.770000 |
197,891 | 198,151 | Is there a text wrap function in the java standard library? | The Python standard lib comes with the module textwrap which provides a simple text wrapping functionality. Is there something comparable in the java standard library? in Python it is something like this: >>> t = "a really really long string with lots of characters" >>> import textwrap >>> textwrap.wrap(t, 20) ['a real... | There is not in the standard Java library, but there is in Apache Commons: WordUtils.wrap | Is there a text wrap function in the java standard library? The Python standard lib comes with the module textwrap which provides a simple text wrapping functionality. Is there something comparable in the java standard library? in Python it is something like this: >>> t = "a really really long string with lots of chara... | TITLE:
Is there a text wrap function in the java standard library?
QUESTION:
The Python standard lib comes with the module textwrap which provides a simple text wrapping functionality. Is there something comparable in the java standard library? in Python it is something like this: >>> t = "a really really long string ... | [
"java"
] | 4 | 8 | 2,635 | 1 | 0 | 2008-10-13T15:02:03.777000 | 2008-10-13T16:17:05.310000 |
197,903 | 197,911 | How to detect application activation | I need to perform some action when my application receives focus. I've tried hooking both GotFocus- and Enter-events, but they only trigger when focus changes within my application. Scenario is that my application detects some problem that must be resolved elsewhere, and I would like to do the check again when the user... | I would try overriding Form.OnActivated (or handling the Form.Activated event) in your application form. | How to detect application activation I need to perform some action when my application receives focus. I've tried hooking both GotFocus- and Enter-events, but they only trigger when focus changes within my application. Scenario is that my application detects some problem that must be resolved elsewhere, and I would lik... | TITLE:
How to detect application activation
QUESTION:
I need to perform some action when my application receives focus. I've tried hooking both GotFocus- and Enter-events, but they only trigger when focus changes within my application. Scenario is that my application detects some problem that must be resolved elsewher... | [
"c#",
"winforms"
] | 2 | 4 | 177 | 2 | 0 | 2008-10-13T15:05:20.870000 | 2008-10-13T15:07:38.230000 |
197,904 | 5,807,110 | How do I use cygwin behind the corporate firewall | I'm in a Microsoft IE environment, but I want to use cygwin for a number of quick scripting tasks. How would I configure it to use my windows proxy information? Ruby gems, ping, etc are all trying to make direct connections. How can I get them to respect the proxy information that IE and firefox use? | Just for the records if you need to authenticate to the Proxy use: export http_proxy=http://username:password@host:port/ Taken from: http://samueldotj.blogspot.com/2008/06/configuring-cygwin-to-use-proxy-server.html | How do I use cygwin behind the corporate firewall I'm in a Microsoft IE environment, but I want to use cygwin for a number of quick scripting tasks. How would I configure it to use my windows proxy information? Ruby gems, ping, etc are all trying to make direct connections. How can I get them to respect the proxy infor... | TITLE:
How do I use cygwin behind the corporate firewall
QUESTION:
I'm in a Microsoft IE environment, but I want to use cygwin for a number of quick scripting tasks. How would I configure it to use my windows proxy information? Ruby gems, ping, etc are all trying to make direct connections. How can I get them to respe... | [
"networking",
"proxy",
"cygwin"
] | 54 | 58 | 80,207 | 5 | 0 | 2008-10-13T15:06:11.913000 | 2011-04-27T16:03:30.640000 |
197,929 | 198,055 | What Pros & Cons would there be to saving code more granularly at the file level? | What do you think of this kind of code-to-files-mapping? ~/proj/MyClass.ext ~/proj/MyClass:constructors.ext ~/proj/MyClass:properties.ext ~/proj/MyClass:method-one.ext ~/proj/MyClass:method-two:int.ext ~/proj/MyClass:method-two:string.ext In a language which is more functional-oriented: ~/proj/definitions.ext ~/proj/fu... | Perhaps the better question to ask in response is: What is the problem you would hope to solve with this approach? The.NET languages support some level of this idea with partial classes, although I've never seen it carried to that extreme and the editing experience is not as seamless as you describe in your "perfect im... | What Pros & Cons would there be to saving code more granularly at the file level? What do you think of this kind of code-to-files-mapping? ~/proj/MyClass.ext ~/proj/MyClass:constructors.ext ~/proj/MyClass:properties.ext ~/proj/MyClass:method-one.ext ~/proj/MyClass:method-two:int.ext ~/proj/MyClass:method-two:string.ext... | TITLE:
What Pros & Cons would there be to saving code more granularly at the file level?
QUESTION:
What do you think of this kind of code-to-files-mapping? ~/proj/MyClass.ext ~/proj/MyClass:constructors.ext ~/proj/MyClass:properties.ext ~/proj/MyClass:method-one.ext ~/proj/MyClass:method-two:int.ext ~/proj/MyClass:met... | [
"language-agnostic",
"version-control"
] | 0 | 4 | 320 | 10 | 0 | 2008-10-13T15:11:44.290000 | 2008-10-13T15:48:53.043000 |
197,933 | 197,953 | What's the best way to clear the screen in Perl? | Ideally, something cross-platform. | The CPAN is probably the best way to go. Take a look at Term::Screen:Uni: require Term::Screen::Uni; my $scr = new Term::Screen::Uni;
$scr->clrscr() | What's the best way to clear the screen in Perl? Ideally, something cross-platform. | TITLE:
What's the best way to clear the screen in Perl?
QUESTION:
Ideally, something cross-platform.
ANSWER:
The CPAN is probably the best way to go. Take a look at Term::Screen:Uni: require Term::Screen::Uni; my $scr = new Term::Screen::Uni;
$scr->clrscr() | [
"perl"
] | 16 | 15 | 33,132 | 8 | 0 | 2008-10-13T15:13:10.183000 | 2008-10-13T15:17:18.117000 |
197,938 | 198,035 | Django with custom, non-SQL service to store models? | Can I have a custom service providing the storage of the models I use in Django? That service would not be speaking SQL. I would like to build a web frontend to a system that consists of multiple services linked with a network based IPC, one of which provides an interface to commonly used, persistent objects (stored in... | You might take a look at An introduction to using couchdb with django. Dunno if connecting to CouchDB is directly something that interests you, but this is a pretty good example of how to use django to connect to a RESTful webservice. | Django with custom, non-SQL service to store models? Can I have a custom service providing the storage of the models I use in Django? That service would not be speaking SQL. I would like to build a web frontend to a system that consists of multiple services linked with a network based IPC, one of which provides an inte... | TITLE:
Django with custom, non-SQL service to store models?
QUESTION:
Can I have a custom service providing the storage of the models I use in Django? That service would not be speaking SQL. I would like to build a web frontend to a system that consists of multiple services linked with a network based IPC, one of whic... | [
"django",
"django-models"
] | 6 | 7 | 1,843 | 2 | 0 | 2008-10-13T15:13:41.773000 | 2008-10-13T15:42:13.260000 |
197,939 | 198,032 | Difference between Data Access Layer and Model in MVC | I have implemented what I thought was a pretty decent representation of MVC in several web applications but since having joined crackoverflow, I'm finding that perhaps my initial definitions were a bit simplistic and thus I'd really like some clarification on the differences between the Data Access Layer and the Model ... | The model classes stand alone as a good, clean, high-fidelity model of real-world entities. If it's a business domain, they might be customers, plans, products, payments, all that kind of stuff. Your application works with these classes. The idea is that your application is a model of real-world handling of the domain ... | Difference between Data Access Layer and Model in MVC I have implemented what I thought was a pretty decent representation of MVC in several web applications but since having joined crackoverflow, I'm finding that perhaps my initial definitions were a bit simplistic and thus I'd really like some clarification on the di... | TITLE:
Difference between Data Access Layer and Model in MVC
QUESTION:
I have implemented what I thought was a pretty decent representation of MVC in several web applications but since having joined crackoverflow, I'm finding that perhaps my initial definitions were a bit simplistic and thus I'd really like some clari... | [
"php",
"model-view-controller",
"data-access-layer"
] | 18 | 34 | 14,616 | 2 | 0 | 2008-10-13T15:13:45.160000 | 2008-10-13T15:40:50.283000 |
197,940 | 198,014 | What is the best way to display one value and store another on .net comboboxes? | I can't seem to find an easy to use,.net native way to get Comboboxes on.net winforms to display one value and return another based on the selection without creating my own helper class, with the knowledge that winforms is going to display the ToString method on the object that you put in it. This is how I'm doing it n... | This is a bit of a hack, but it means you don't have to write your own Name-Value pair class - not a big deal (could be there's something better already in the framework). But what you could do is use the DictionaryEntry class - which is effectively a name value pair. Add the items to a list, then use the DataMember an... | What is the best way to display one value and store another on .net comboboxes? I can't seem to find an easy to use,.net native way to get Comboboxes on.net winforms to display one value and return another based on the selection without creating my own helper class, with the knowledge that winforms is going to display ... | TITLE:
What is the best way to display one value and store another on .net comboboxes?
QUESTION:
I can't seem to find an easy to use,.net native way to get Comboboxes on.net winforms to display one value and return another based on the selection without creating my own helper class, with the knowledge that winforms is... | [
".net",
"winforms"
] | 2 | 6 | 1,390 | 4 | 0 | 2008-10-13T15:13:56.280000 | 2008-10-13T15:36:32.007000 |
197,948 | 199,526 | Reduce flicker with GDI+ and C++ | I'm using GDI+ in a C++/MFC application and I just can't seem to avoid flickering whenever the window is resized. I have already tried these steps: returned TRUE on OnEraseBkGnd(); returned NULL on OnCtlColor(); used double buffering according to this code: void vwView::OnDraw(CDC* pDC) { CRect rcClient; GetClientRect(... | To completely avoid flicker, you would need to complete all drawing in the interval between screen updates. Windows does not provide any easy means of accomplishing this for normal window painting (Vista provides composite drawing via the DWM, but this cannot be relied on even on systems running Vista). Therefore, the ... | Reduce flicker with GDI+ and C++ I'm using GDI+ in a C++/MFC application and I just can't seem to avoid flickering whenever the window is resized. I have already tried these steps: returned TRUE on OnEraseBkGnd(); returned NULL on OnCtlColor(); used double buffering according to this code: void vwView::OnDraw(CDC* pDC)... | TITLE:
Reduce flicker with GDI+ and C++
QUESTION:
I'm using GDI+ in a C++/MFC application and I just can't seem to avoid flickering whenever the window is resized. I have already tried these steps: returned TRUE on OnEraseBkGnd(); returned NULL on OnCtlColor(); used double buffering according to this code: void vwView... | [
"c++",
"windows",
"gdi+"
] | 21 | 43 | 25,099 | 6 | 0 | 2008-10-13T15:16:16.353000 | 2008-10-14T00:13:16.693000 |
197,951 | 885,481 | How can I determine for which platform an executable is compiled? | I have a need to work with Windows executables which are made for x86, x64, and IA64. I'd like to programmatically figure out the platform by examining the files themselves. My target language is PowerShell but a C# example will do. Failing either of those, if you know the logic required that would be great. | (from another Q, since removed) Machine type: This is a quick little bit of code I based on some that gets the linker timestamp. This is in the same header, and it seems to work - it returns I386 when compiled -any cpu-, and x64 when compiled with that as the target platform. The Exploring PE Headers (K. Stanton,MSDN) ... | How can I determine for which platform an executable is compiled? I have a need to work with Windows executables which are made for x86, x64, and IA64. I'd like to programmatically figure out the platform by examining the files themselves. My target language is PowerShell but a C# example will do. Failing either of tho... | TITLE:
How can I determine for which platform an executable is compiled?
QUESTION:
I have a need to work with Windows executables which are made for x86, x64, and IA64. I'd like to programmatically figure out the platform by examining the files themselves. My target language is PowerShell but a C# example will do. Fai... | [
"c#",
"powershell",
"cpu-architecture"
] | 58 | 29 | 40,863 | 12 | 0 | 2008-10-13T15:16:55.060000 | 2009-05-19T23:11:09.110000 |
197,957 | 197,972 | Forms and no Cookies - elegant way to submit forms | Hoi! I have a form I wish to submit, but I need to add the PHPSESSID, because some clients allow no cookies. There are several javascript functions on my page which displays a list of users (search, sort, open details), the page is generated by PHP. Now I am looking for an elegant way to have the PHPSESSID included in ... | Using a hidden field should work - if it doesn't then session.use_trans_sid is probably off in your php.ini You could add it to a hidden field then say if (!empty($_POST['PHPSESSID'])) session_start($_POST['PHPSESSID']); else session_start(); | Forms and no Cookies - elegant way to submit forms Hoi! I have a form I wish to submit, but I need to add the PHPSESSID, because some clients allow no cookies. There are several javascript functions on my page which displays a list of users (search, sort, open details), the page is generated by PHP. Now I am looking fo... | TITLE:
Forms and no Cookies - elegant way to submit forms
QUESTION:
Hoi! I have a form I wish to submit, but I need to add the PHPSESSID, because some clients allow no cookies. There are several javascript functions on my page which displays a list of users (search, sort, open details), the page is generated by PHP. N... | [
"php",
"javascript",
"html",
"session"
] | 0 | 2 | 1,367 | 2 | 0 | 2008-10-13T15:17:52.247000 | 2008-10-13T15:21:47.653000 |
197,958 | 198,090 | What is the difference between the onMouseUp/Down and onPress/Release events in Flash? | In Flash, there seem to be two sets of mouse click events: onMouseUp, onMouseDown onPress, onRelease Is there any actual difference between these events? I can't tell from the documentation, and I haven't noticed anything in actual usage, but it seems odd to have two different sets of names for the same basic events. A... | onMouseDown and onMouseUp are general events that anything can listen to via Mouse.addListener(). They get triggered no matter where the mouse is clicked. onPress and onRelease are specific to a particular MovieClip. They only get triggered if the mouse is pressed or released while on top of that MovieClip. Also import... | What is the difference between the onMouseUp/Down and onPress/Release events in Flash? In Flash, there seem to be two sets of mouse click events: onMouseUp, onMouseDown onPress, onRelease Is there any actual difference between these events? I can't tell from the documentation, and I haven't noticed anything in actual u... | TITLE:
What is the difference between the onMouseUp/Down and onPress/Release events in Flash?
QUESTION:
In Flash, there seem to be two sets of mouse click events: onMouseUp, onMouseDown onPress, onRelease Is there any actual difference between these events? I can't tell from the documentation, and I haven't noticed an... | [
"flash",
"events",
"actionscript",
"mouse",
"actionscript-2"
] | 3 | 5 | 5,911 | 5 | 0 | 2008-10-13T15:17:52.297000 | 2008-10-13T15:59:43.007000 |
197,976 | 197,997 | Executing multiple commands from a Windows cmd script | I'm trying to write a Windows cmd script to perform several tasks in series. However, it always stops after the first command in the script. The command it stops after is a maven build (not sure if that's relevant). How do I make it carry on and run each task in turn please? Installing any software or configuring the r... | When you call another.bat file, I think you need "call" in front of the call: call otherCommand.bat | Executing multiple commands from a Windows cmd script I'm trying to write a Windows cmd script to perform several tasks in series. However, it always stops after the first command in the script. The command it stops after is a maven build (not sure if that's relevant). How do I make it carry on and run each task in tur... | TITLE:
Executing multiple commands from a Windows cmd script
QUESTION:
I'm trying to write a Windows cmd script to perform several tasks in series. However, it always stops after the first command in the script. The command it stops after is a maven build (not sure if that's relevant). How do I make it carry on and ru... | [
"windows",
"batch-file",
"scripting",
"cmd"
] | 141 | 144 | 289,454 | 8 | 0 | 2008-10-13T15:23:54.747000 | 2008-10-13T15:31:36.183000 |
197,977 | 197,991 | NCover not picking up web application dlls | Im using NCover 1.5.8, and its doesn't seem to produce and metrics relating to my website applications. The ncover output indicates the tests relating to the website have been run. Is there anything special I need to do for website dlls? | NCover requires the PDB files to be present, else it just simply ignore it. | NCover not picking up web application dlls Im using NCover 1.5.8, and its doesn't seem to produce and metrics relating to my website applications. The ncover output indicates the tests relating to the website have been run. Is there anything special I need to do for website dlls? | TITLE:
NCover not picking up web application dlls
QUESTION:
Im using NCover 1.5.8, and its doesn't seem to produce and metrics relating to my website applications. The ncover output indicates the tests relating to the website have been run. Is there anything special I need to do for website dlls?
ANSWER:
NCover requi... | [
"ncover"
] | 0 | 2 | 327 | 1 | 0 | 2008-10-13T15:24:02.173000 | 2008-10-13T15:29:18.730000 |
197,983 | 197,989 | What is a basic example of "low-level" multi-threading in C++? | I'm a kinda newbie developer with a few years under my belt. Recently I interviewed at a game company and was asked "have you done any multi-threading?" I told them about having a C# app with a few Threads... and then I said a bit about transactions and locking etc in Sql. The interviewer politely told me that this was... | The canonical implementation of "low level threads" is pthreads. The most basic examples of threading problems that are usually taught along with pthreads are some form of readers and writers problem. That page also links to more classical threading problems like producers/consumers and dining philosophers. | What is a basic example of "low-level" multi-threading in C++? I'm a kinda newbie developer with a few years under my belt. Recently I interviewed at a game company and was asked "have you done any multi-threading?" I told them about having a C# app with a few Threads... and then I said a bit about transactions and loc... | TITLE:
What is a basic example of "low-level" multi-threading in C++?
QUESTION:
I'm a kinda newbie developer with a few years under my belt. Recently I interviewed at a game company and was asked "have you done any multi-threading?" I told them about having a C# app with a few Threads... and then I said a bit about tr... | [
"c++",
"multithreading"
] | 5 | 12 | 5,855 | 8 | 0 | 2008-10-13T15:24:48.147000 | 2008-10-13T15:28:15.177000 |
197,986 | 197,993 | What causes javac to issue the "uses unchecked or unsafe operations" warning | For example: javac Foo.java Note: Foo.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. | This comes up in Java 5 and later if you're using collections without type specifiers (e.g., Arraylist() instead of ArrayList () ). It means that the compiler can't check that you're using the collection in a type-safe way, using generics. To get rid of the warning, you need to be specific about what type of objects yo... | What causes javac to issue the "uses unchecked or unsafe operations" warning For example: javac Foo.java Note: Foo.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. | TITLE:
What causes javac to issue the "uses unchecked or unsafe operations" warning
QUESTION:
For example: javac Foo.java Note: Foo.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details.
ANSWER:
This comes up in Java 5 and later if you're using collections without type specifiers... | [
"java",
"generics",
"warnings"
] | 353 | 448 | 534,705 | 12 | 0 | 2008-10-13T15:27:28.920000 | 2008-10-13T15:29:56.403000 |
197,987 | 198,308 | Multiple Interchangeable Views (MFC/C++) | I have a main frame with a splitter. On the left I have my (imaginatively named) CAppView_Leftand on the right I have CAppView_Right_1and CAppView_Right_2. Through the following code I initialise the two primary views correctly: if (!m_wndSplitter.CreateStatic(this, 1, 2)) { TRACE0("Failed to CreateStaticSplitter\n"); ... | There is a CodeProject article that should help you achieve what you want: http://www.codeproject.com/KB/splitter/usefulsplitter.aspx I have replaced views in a splitter before, so if the above doesn't help I'll post some of my own code. | Multiple Interchangeable Views (MFC/C++) I have a main frame with a splitter. On the left I have my (imaginatively named) CAppView_Leftand on the right I have CAppView_Right_1and CAppView_Right_2. Through the following code I initialise the two primary views correctly: if (!m_wndSplitter.CreateStatic(this, 1, 2)) { TRA... | TITLE:
Multiple Interchangeable Views (MFC/C++)
QUESTION:
I have a main frame with a splitter. On the left I have my (imaginatively named) CAppView_Leftand on the right I have CAppView_Right_1and CAppView_Right_2. Through the following code I initialise the two primary views correctly: if (!m_wndSplitter.CreateStatic(... | [
"c++",
"view",
"mfc",
"document",
"csplitterwnd"
] | 1 | 1 | 2,085 | 3 | 0 | 2008-10-13T15:27:37.610000 | 2008-10-13T17:14:48.160000 |
197,999 | 198,025 | Need Advice on Implementing a Time-limited Trial | I'm developing a shareware desktop application. I'm to the point where I need to implement the trial-use/activation code. How do you approach something like this? I have my own ideas, but I want to see what the stackoverflow community thinks. I'm developing with C++/Qt. The intended platform is Windows/Mac/Linux. Thank... | What to protect against and what not to protect against: Keep in mind that people will always find a way to get around your trial period. So you want to make it annoying for the person to have to get around your trial period, but it doesn't matter if it's impossible to get around you trial period. Most people will thin... | Need Advice on Implementing a Time-limited Trial I'm developing a shareware desktop application. I'm to the point where I need to implement the trial-use/activation code. How do you approach something like this? I have my own ideas, but I want to see what the stackoverflow community thinks. I'm developing with C++/Qt. ... | TITLE:
Need Advice on Implementing a Time-limited Trial
QUESTION:
I'm developing a shareware desktop application. I'm to the point where I need to implement the trial-use/activation code. How do you approach something like this? I have my own ideas, but I want to see what the stackoverflow community thinks. I'm develo... | [
"c++",
"desktop",
"shareware",
"trialware",
"time-trial"
] | 22 | 23 | 10,502 | 5 | 0 | 2008-10-13T15:31:41.487000 | 2008-10-13T15:38:48.227000 |
198,006 | 247,624 | Need a distributed key-value lookup system | I need a way to do key-value lookups across (potentially) hundreds of GB of data. Ideally something based on a distributed hashtable, that works nicely with Java. It should be fault-tolerant, and open source. The store should be persistent, but would ideally cache data in memory to speed things up. It should be able to... | You might want to check out Hazelcast. It is distributed/partitioned, super lite, easy and free. java.util.Map map = Hazelcast.getMap ("mymap"); map.put ("key1", "value1"); Regards, -talip | Need a distributed key-value lookup system I need a way to do key-value lookups across (potentially) hundreds of GB of data. Ideally something based on a distributed hashtable, that works nicely with Java. It should be fault-tolerant, and open source. The store should be persistent, but would ideally cache data in memo... | TITLE:
Need a distributed key-value lookup system
QUESTION:
I need a way to do key-value lookups across (potentially) hundreds of GB of data. Ideally something based on a distributed hashtable, that works nicely with Java. It should be fault-tolerant, and open source. The store should be persistent, but would ideally ... | [
"java",
"database",
"bigtable",
"key-value-store",
"distributed-database"
] | 16 | 12 | 5,817 | 10 | 0 | 2008-10-13T15:33:20.003000 | 2008-10-29T17:10:45.563000 |
198,007 | 201,787 | PHP function imagettftext() and unicode | I'm using the PHP function imagettftext() to convert text into a GIF image. The text I am converting has Unicode characters including Japanese. Everything works fine on my local machine (Ubuntu 7.10), but on my webhost server, the Japanese characters are mangled. What could be causing the difference? Everything should ... | Here's the solution that finally worked for me: $text = "你好"; // Convert UTF-8 string to HTML entities $text = mb_convert_encoding($text, 'HTML-ENTITIES',"UTF-8"); // Convert HTML entities into ISO-8859-1 $text = html_entity_decode($text,ENT_NOQUOTES, "ISO-8859-1"); // Convert characters > 127 into their hexidecimal eq... | PHP function imagettftext() and unicode I'm using the PHP function imagettftext() to convert text into a GIF image. The text I am converting has Unicode characters including Japanese. Everything works fine on my local machine (Ubuntu 7.10), but on my webhost server, the Japanese characters are mangled. What could be ca... | TITLE:
PHP function imagettftext() and unicode
QUESTION:
I'm using the PHP function imagettftext() to convert text into a GIF image. The text I am converting has Unicode characters including Japanese. Everything works fine on my local machine (Ubuntu 7.10), but on my webhost server, the Japanese characters are mangled... | [
"php",
"unicode",
"gd"
] | 12 | 13 | 25,569 | 5 | 0 | 2008-10-13T15:33:38.923000 | 2008-10-14T16:02:47.710000 |
198,023 | 320,123 | Tools to help with Internationalization of Strings in JSP | Are there any tools to assist with the internationalization of Strings within JSP files? Most IDEs (for example, NetBeans ) offer such a feature for Java code. However, in the case of NetBeans, no such feature exists for JSP files. With gettext, for example, there is are various tools out there that assist with extract... | This is a vey powerful product / solution to your problem: Globalyzer I haven't used it myself, but I did a bit of research into it for a project at my previous employer. We needed to extract all Strings out of a lot of Java code and JSPs. We found that Globalyzer covered all our needs. In the end we decided not to go ... | Tools to help with Internationalization of Strings in JSP Are there any tools to assist with the internationalization of Strings within JSP files? Most IDEs (for example, NetBeans ) offer such a feature for Java code. However, in the case of NetBeans, no such feature exists for JSP files. With gettext, for example, the... | TITLE:
Tools to help with Internationalization of Strings in JSP
QUESTION:
Are there any tools to assist with the internationalization of Strings within JSP files? Most IDEs (for example, NetBeans ) offer such a feature for Java code. However, in the case of NetBeans, no such feature exists for JSP files. With gettext... | [
"jsp",
"internationalization",
"jstl"
] | 3 | 0 | 4,279 | 5 | 0 | 2008-10-13T15:38:46.403000 | 2008-11-26T09:15:50.977000 |
198,024 | 198,094 | Get radio value inside iframe | How do I go about doing this with jQuery? Basically the structure: First Second Third I tried various examples from the net such as $("input[@type=radio][@checked]"); But failed. Even with jQuery form plugin's.fieldValue() failed. | Try $('#myForm iframe').contents().find('input[name=myradio]').val() I'll assume that the iframe contents have already been loaded and are accessible e.g same domain. | Get radio value inside iframe How do I go about doing this with jQuery? Basically the structure: First Second Third I tried various examples from the net such as $("input[@type=radio][@checked]"); But failed. Even with jQuery form plugin's.fieldValue() failed. | TITLE:
Get radio value inside iframe
QUESTION:
How do I go about doing this with jQuery? Basically the structure: First Second Third I tried various examples from the net such as $("input[@type=radio][@checked]"); But failed. Even with jQuery form plugin's.fieldValue() failed.
ANSWER:
Try $('#myForm iframe').contents... | [
"jquery",
"jquery-plugins"
] | 3 | 11 | 12,514 | 2 | 0 | 2008-10-13T15:38:47.667000 | 2008-10-13T16:00:34.317000 |
198,030 | 198,232 | Are there problems with rendering WPF over Remote Desktop under Windows XP? | I have heard that WPF primitives will not be supported by remote desktop on windows XP. The implication of this is that if you run a WPF application on a vista machine and display it on an XP machine (via remote desktop) the display will be sent as a compressed bitmap. This issue is resolved in Vista-Vista comunication... | As of.NET 3.5 SP1, all WPF graphics are remoted as bitmaps, even on Vista-to-Vista communication. From http://blogs.msdn.com/jgoldb/archive/2008/05/15/what-s-new-for-performance-in-wpf-in-net-3-5-sp1.aspx: We now remote as bitmaps in ALL cases. The reason is that WPF 3.5 SP1 now uses a new graphics DLL (wpfgfx.dll) and... | Are there problems with rendering WPF over Remote Desktop under Windows XP? I have heard that WPF primitives will not be supported by remote desktop on windows XP. The implication of this is that if you run a WPF application on a vista machine and display it on an XP machine (via remote desktop) the display will be sen... | TITLE:
Are there problems with rendering WPF over Remote Desktop under Windows XP?
QUESTION:
I have heard that WPF primitives will not be supported by remote desktop on windows XP. The implication of this is that if you run a WPF application on a vista machine and display it on an XP machine (via remote desktop) the d... | [
"c#",
".net",
"wpf",
"windows-xp",
"remote-desktop"
] | 8 | 6 | 8,509 | 3 | 0 | 2008-10-13T15:40:34.760000 | 2008-10-13T16:48:02.190000 |
198,041 | 198,218 | eclipse beakpoint: stop before leaving a Java method | Is there a way to tell the debugger to stop just before returning, on whichever statement exits from the method, be it return, exception, or fall out the bottom? I am inspired by the fact that the Java editor shows me all the places that my method can exit - it highlights them when you click on the return type of the m... | Put a breakpoint on the line of the method signature. That is where you write public void myMethod() { Then right-click on the breakpoint and select "Breakpoint Properties". At the bottom of the pop-up there are two checkboxes: "Method Entry", "Method Exit". Check the latter. | eclipse beakpoint: stop before leaving a Java method Is there a way to tell the debugger to stop just before returning, on whichever statement exits from the method, be it return, exception, or fall out the bottom? I am inspired by the fact that the Java editor shows me all the places that my method can exit - it highl... | TITLE:
eclipse beakpoint: stop before leaving a Java method
QUESTION:
Is there a way to tell the debugger to stop just before returning, on whichever statement exits from the method, be it return, exception, or fall out the bottom? I am inspired by the fact that the Java editor shows me all the places that my method c... | [
"java",
"eclipse",
"debugging",
"breakpoints",
"eclipse-3.4"
] | 20 | 35 | 2,009 | 3 | 0 | 2008-10-13T15:44:33.990000 | 2008-10-13T16:41:24.827000 |
198,045 | 198,164 | Excel charts - setting series end dynamically | I've got a spreadsheet with plenty of graphs in it and one sheet with loads of data feeding those graphs. I've plotted the data on each graph using =Sheet1!$C5:$C$3000 This basically just plots the values in C5 to C3000 on a graph. Regularly though I just want to look at a subset of the data i.e. I might just want to l... | OK, I had to do a little more research, here's how to make it work, completely within the spreadsheet (without VBA): Using A1 as the end of your desired range, and the chart being on the same sheet as the data: Name the first cell of the data (C5) as a named range, say TESTRANGE. Created a named range MYDATA as the fol... | Excel charts - setting series end dynamically I've got a spreadsheet with plenty of graphs in it and one sheet with loads of data feeding those graphs. I've plotted the data on each graph using =Sheet1!$C5:$C$3000 This basically just plots the values in C5 to C3000 on a graph. Regularly though I just want to look at a ... | TITLE:
Excel charts - setting series end dynamically
QUESTION:
I've got a spreadsheet with plenty of graphs in it and one sheet with loads of data feeding those graphs. I've plotted the data on each graph using =Sheet1!$C5:$C$3000 This basically just plots the values in C5 to C3000 on a graph. Regularly though I just ... | [
"excel",
"charts",
"worksheet-function"
] | 7 | 6 | 53,411 | 7 | 0 | 2008-10-13T15:46:11.380000 | 2008-10-13T16:22:35.940000 |
198,049 | 198,160 | Prevent js alert() from pausing timers | So I made some timers for a quiz. The thing is, I just realized when I put javascript: alert("blah"); in the address, the popup alert box pauses my timer. Which is very unwanted in a quiz. I don't think there is any way to stop this behaviour... but I'll ask anyway. If there is not, mind suggesting what should I do? | Apparently the preview rendering differs from the posted rendering. This paragraph is here to make sure the next two lines show up as code. // Preserve native alert() if you need it for something special window.nativeAlert = window.alert;
window.alert = function(msg) { // Do something with msg here. I always write min... | Prevent js alert() from pausing timers So I made some timers for a quiz. The thing is, I just realized when I put javascript: alert("blah"); in the address, the popup alert box pauses my timer. Which is very unwanted in a quiz. I don't think there is any way to stop this behaviour... but I'll ask anyway. If there is no... | TITLE:
Prevent js alert() from pausing timers
QUESTION:
So I made some timers for a quiz. The thing is, I just realized when I put javascript: alert("blah"); in the address, the popup alert box pauses my timer. Which is very unwanted in a quiz. I don't think there is any way to stop this behaviour... but I'll ask anyw... | [
"javascript",
"timer"
] | 5 | 6 | 7,562 | 8 | 0 | 2008-10-13T15:47:22.627000 | 2008-10-13T16:21:10.887000 |
198,051 | 198,065 | Why "delete [][]... multiDimensionalArray;" operator in C++ does not exist | I was always wondering if there is operator for deleting multi dimensional arrays in the standard C++ language. If we have created a pointer to a single dimensional array int *array = new int[size]; the delete looks like: delete [] array; That's great. But if we have two dimension array, we can not do delete [][] twoDi... | Technically, there aren't two dimensional arrays in C++. What you're using as a two dimensional array is a one dimensional array with each element being a one dimensional array. Since it doesn't technically exist, C++ can't delete it. | Why "delete [][]... multiDimensionalArray;" operator in C++ does not exist I was always wondering if there is operator for deleting multi dimensional arrays in the standard C++ language. If we have created a pointer to a single dimensional array int *array = new int[size]; the delete looks like: delete [] array; That's... | TITLE:
Why "delete [][]... multiDimensionalArray;" operator in C++ does not exist
QUESTION:
I was always wondering if there is operator for deleting multi dimensional arrays in the standard C++ language. If we have created a pointer to a single dimensional array int *array = new int[size]; the delete looks like: delet... | [
"c++",
"arrays"
] | 23 | 25 | 18,603 | 9 | 0 | 2008-10-13T15:48:01.330000 | 2008-10-13T15:52:04.333000 |
198,071 | 198,162 | Code for checking write-permissions for directories in Win2K/XP | Greetings! I am trying to check directory write-permissions from within a Windows MFC/ATL program using C++. My first guess is to use the C-standard _access function, e.g.: if (_access("C:\mydir", 2) == -1) // Directory is not writable. But apparently on Windows 2000 and XP, _access can't determine directory permission... | You can call CreateFile with GENERIC_WRITE access to check this. http://msdn.microsoft.com/en-us/library/aa363858(VS.85).aspx It's not a C++ library but it still counts as elegant because it directly does what you want... | Code for checking write-permissions for directories in Win2K/XP Greetings! I am trying to check directory write-permissions from within a Windows MFC/ATL program using C++. My first guess is to use the C-standard _access function, e.g.: if (_access("C:\mydir", 2) == -1) // Directory is not writable. But apparently on W... | TITLE:
Code for checking write-permissions for directories in Win2K/XP
QUESTION:
Greetings! I am trying to check directory write-permissions from within a Windows MFC/ATL program using C++. My first guess is to use the C-standard _access function, e.g.: if (_access("C:\mydir", 2) == -1) // Directory is not writable. B... | [
"c++",
"windows",
"security",
"permissions",
"atl"
] | 4 | 4 | 6,612 | 3 | 0 | 2008-10-13T15:53:46.467000 | 2008-10-13T16:21:47.813000 |
198,079 | 198,136 | Where can I learn about the various types of .NET lists? | Does anyone know a good resource to concisely explain the different types of lists available in C# and when their usage is appropriate? For example, List, Hashtable, Dictionaries etc. I'm never quite sure when I should be using what. | These aren't all lists, although they're all collections. Here's a quick summary. Non-generic collections (API is in terms of object. Values types are boxed. These are mostly in the System.Collections namespace: ArrayList: A list of items, backed by an array. Fast random read/write access. Fast add to the tail end, if ... | Where can I learn about the various types of .NET lists? Does anyone know a good resource to concisely explain the different types of lists available in C# and when their usage is appropriate? For example, List, Hashtable, Dictionaries etc. I'm never quite sure when I should be using what. | TITLE:
Where can I learn about the various types of .NET lists?
QUESTION:
Does anyone know a good resource to concisely explain the different types of lists available in C# and when their usage is appropriate? For example, List, Hashtable, Dictionaries etc. I'm never quite sure when I should be using what.
ANSWER:
Th... | [
".net",
"collections"
] | 29 | 32 | 5,387 | 10 | 0 | 2008-10-13T15:57:00.920000 | 2008-10-13T16:13:09.733000 |
198,082 | 198,386 | How to find out size of session in ASP.NET from web application? | How to find out size of session in ASP.NET from web application? | If you're trying to get the size of Session during runtime rather than in debug tracing, you might want to try something like this: long totalSessionBytes = 0; BinaryFormatter b = new BinaryFormatter(); MemoryStream m; foreach(var obj in Session) { m = new MemoryStream(); b.Serialize(m, obj); totalSessionBytes += m.Len... | How to find out size of session in ASP.NET from web application? How to find out size of session in ASP.NET from web application? | TITLE:
How to find out size of session in ASP.NET from web application?
QUESTION:
How to find out size of session in ASP.NET from web application?
ANSWER:
If you're trying to get the size of Session during runtime rather than in debug tracing, you might want to try something like this: long totalSessionBytes = 0; Bin... | [
"asp.net",
"session",
"size"
] | 20 | 31 | 27,515 | 4 | 0 | 2008-10-13T15:57:47.097000 | 2008-10-13T17:42:09.633000 |
198,087 | 198,130 | How do I list installed MSI from the command line? | We recently switched our Windows software packages from RPM (cygwin) to MSI (wix). Having a native packaging is a much welcome change and we intend to stick with it. However, MSI feels overly complicated for what it does and doesn't seem to provide some basic abilities. But I'm probably mistaken. Is there a way to list... | Mabybe this is a good starting point for you example VB Script from MSDN: strComputer = "."
Set objWMIService = GetObject("winmgmts:" & _ "{impersonationLevel=impersonate}!\\" & _ strComputer & _ "\root\cimv2")
Set colSoftware = objWMIService.ExecQuery _ ("SELECT * FROM Win32_Product")
If colSoftware.Count > 0 Then
... | How do I list installed MSI from the command line? We recently switched our Windows software packages from RPM (cygwin) to MSI (wix). Having a native packaging is a much welcome change and we intend to stick with it. However, MSI feels overly complicated for what it does and doesn't seem to provide some basic abilities... | TITLE:
How do I list installed MSI from the command line?
QUESTION:
We recently switched our Windows software packages from RPM (cygwin) to MSI (wix). Having a native packaging is a much welcome change and we intend to stick with it. However, MSI feels overly complicated for what it does and doesn't seem to provide so... | [
"windows",
"windows-installer"
] | 17 | 13 | 31,804 | 3 | 0 | 2008-10-13T15:59:00.217000 | 2008-10-13T16:11:13.543000 |
198,097 | 198,327 | Creating test run configurations in VS 2008 | I am working with an n-tiered architecture in Visual Studio 2008 (Developer Edition), and I have run into an issue. We are running unit tests on every method of our services layer, and I am attempting to see the code coverage results, to ensure I'm hitting all the main paths through my methods. When I attempt to view t... | Right-click the solution, choose Add, New item, choose Test run configuration in the resulting dialog. The only tricky part is that you don't get this choice unless you right-click the solution. | Creating test run configurations in VS 2008 I am working with an n-tiered architecture in Visual Studio 2008 (Developer Edition), and I have run into an issue. We are running unit tests on every method of our services layer, and I am attempting to see the code coverage results, to ensure I'm hitting all the main paths ... | TITLE:
Creating test run configurations in VS 2008
QUESTION:
I am working with an n-tiered architecture in Visual Studio 2008 (Developer Edition), and I have run into an issue. We are running unit tests on every method of our services layer, and I am attempting to see the code coverage results, to ensure I'm hitting a... | [
"visual-studio",
"visual-studio-2008",
"unit-testing",
"code-coverage"
] | 7 | 11 | 2,633 | 1 | 0 | 2008-10-13T16:01:20.913000 | 2008-10-13T17:21:48.177000 |
198,108 | 198,229 | Is there a difference between commit and rollback in a transaction only having selects? | The in-house application framework we use at my company makes it necessary to put every SQL query into transactions, even though if I know that none of the commands will make changes in the database. At the end of the session, before closing the connection, I commit the transaction to close it properly. I wonder if the... | Databases often preserve either a before-image journal (what it was before the transaction) or an after-image journal (what it will be when the transaction completes.) If it keeps a before-image, that has to be restored on a rollback. If it keeps an after-image, that has to replace data in the event of a commit. Oracle... | Is there a difference between commit and rollback in a transaction only having selects? The in-house application framework we use at my company makes it necessary to put every SQL query into transactions, even though if I know that none of the commands will make changes in the database. At the end of the session, befor... | TITLE:
Is there a difference between commit and rollback in a transaction only having selects?
QUESTION:
The in-house application framework we use at my company makes it necessary to put every SQL query into transactions, even though if I know that none of the commands will make changes in the database. At the end of ... | [
"sql",
"oracle",
"transactions",
"commit",
"rollback"
] | 21 | 14 | 10,826 | 7 | 0 | 2008-10-13T16:04:29.503000 | 2008-10-13T16:46:18.060000 |
198,111 | 198,286 | MSDN links in Visual Studio | I'm looking for a plugin or way to simply go from any namespace, type, method, property, etc in my.Net code to the MSDN page that covers it via a context menu item or hyperlink-like mechanism. Does anyone know of anything that will do that? The "Go to Definition" option when you right click almost covers this, but it d... | Have you tried F1. This will automatically open the help to the appropriate method or object. Not sure if this works for namespaces. | MSDN links in Visual Studio I'm looking for a plugin or way to simply go from any namespace, type, method, property, etc in my.Net code to the MSDN page that covers it via a context menu item or hyperlink-like mechanism. Does anyone know of anything that will do that? The "Go to Definition" option when you right click ... | TITLE:
MSDN links in Visual Studio
QUESTION:
I'm looking for a plugin or way to simply go from any namespace, type, method, property, etc in my.Net code to the MSDN page that covers it via a context menu item or hyperlink-like mechanism. Does anyone know of anything that will do that? The "Go to Definition" option whe... | [
"visual-studio",
"plugins",
"msdn"
] | 4 | 4 | 470 | 2 | 0 | 2008-10-13T16:05:36.647000 | 2008-10-13T17:06:16.413000 |
198,122 | 198,410 | How can I replace the current Java process, like a unix-style exec? | I have a server written in Java that runs as a Windows service (thanks to Install4J). I want this service to be able to download the latest version of the JAR file it runs from, and start running the new code. The stitch is that I don't want the Windows service to fully exit. Ideally, I would accomplish this by a unix-... | Here is a complicated, but portable, way. Split your code into two jars. One very small jar is there just to manage process startup. It creates a ClassLoader that holds the other jar on its classpath. When you want to load a new version, you terminate all threads running code from the old jar. Null out all references t... | How can I replace the current Java process, like a unix-style exec? I have a server written in Java that runs as a Windows service (thanks to Install4J). I want this service to be able to download the latest version of the JAR file it runs from, and start running the new code. The stitch is that I don't want the Window... | TITLE:
How can I replace the current Java process, like a unix-style exec?
QUESTION:
I have a server written in Java that runs as a Windows service (thanks to Install4J). I want this service to be able to download the latest version of the JAR file it runs from, and start running the new code. The stitch is that I don... | [
"java",
"windows-services"
] | 6 | 1 | 1,701 | 5 | 0 | 2008-10-13T16:09:20.570000 | 2008-10-13T17:49:08.497000 |
198,124 | 199,834 | How can I get the path of a Windows "special folder" for a specific user? | Inside a service, what is the best way to determine a special folder path (e.g., "My Documents") for a specific user? SHGetFolderPath allows you to pass in a token, so I am assuming there is some way to impersonate the user whose folder you are interested in. Is there a way to do this based just on a username? If not, ... | I would mount the user's registry hive and look for the path value. Yes, it's a sub-optimal solution, for all the reasons mentioned (poor forwards compatibility, etc.). However, like many other things in Windows, MS didn't provide an API way to do what you want to do, so it's the best option available. You can get the ... | How can I get the path of a Windows "special folder" for a specific user? Inside a service, what is the best way to determine a special folder path (e.g., "My Documents") for a specific user? SHGetFolderPath allows you to pass in a token, so I am assuming there is some way to impersonate the user whose folder you are i... | TITLE:
How can I get the path of a Windows "special folder" for a specific user?
QUESTION:
Inside a service, what is the best way to determine a special folder path (e.g., "My Documents") for a specific user? SHGetFolderPath allows you to pass in a token, so I am assuming there is some way to impersonate the user whos... | [
"c++",
"windows",
"winapi",
"special-folders"
] | 10 | 3 | 10,318 | 4 | 0 | 2008-10-13T16:09:48.557000 | 2008-10-14T02:35:11.960000 |
198,152 | 199,084 | How do I assign weights to different columns in a full text search? | In my full text search query, I want to assign particular columns a higher weightage. Consider this query: SELECT Key_Table.RANK, FT_Table.* FROM Restaurants AS FT_Table INNER JOIN FREETEXTTABLE(Restaurants, *, 'chilly chicken') AS Key_Table ON FT_Table.RestaurantID = Key_Table.[KEY] ORDER BY Key_Table.RANK DESC Now, I... | The best solution is to use ContainsTable. Use a union to create a query that searches all 3 columns and adds an integer used to indicate which column was searched. Sort the results by that integer and then rank desc. The rank is internal to sql server and not something you can adjust. You could also manipulate the ret... | How do I assign weights to different columns in a full text search? In my full text search query, I want to assign particular columns a higher weightage. Consider this query: SELECT Key_Table.RANK, FT_Table.* FROM Restaurants AS FT_Table INNER JOIN FREETEXTTABLE(Restaurants, *, 'chilly chicken') AS Key_Table ON FT_Tabl... | TITLE:
How do I assign weights to different columns in a full text search?
QUESTION:
In my full text search query, I want to assign particular columns a higher weightage. Consider this query: SELECT Key_Table.RANK, FT_Table.* FROM Restaurants AS FT_Table INNER JOIN FREETEXTTABLE(Restaurants, *, 'chilly chicken') AS Ke... | [
"sql-server",
"full-text-search"
] | 11 | 7 | 5,626 | 1 | 0 | 2008-10-13T16:17:17.450000 | 2008-10-13T21:23:35.193000 |
198,153 | 198,165 | Why does the CSS min-width attribute not force a div to have the specified minimum width? | This is some text. I believe the div should be 50 percent of the page, unless, for some reason, the text inside the div makes it larger. However, the border around the div stretches across the entire page width. This occurs in both IE and Firefox. Suggestions? | If you provide absolute positioning to the element, it will be 50% in Firefox. However, IE doesn't like the min-width or min-height attributes, so you will have to define width as 50% also for it to work in IE. | Why does the CSS min-width attribute not force a div to have the specified minimum width? This is some text. I believe the div should be 50 percent of the page, unless, for some reason, the text inside the div makes it larger. However, the border around the div stretches across the entire page width. This occurs in bot... | TITLE:
Why does the CSS min-width attribute not force a div to have the specified minimum width?
QUESTION:
This is some text. I believe the div should be 50 percent of the page, unless, for some reason, the text inside the div makes it larger. However, the border around the div stretches across the entire page width. ... | [
"html",
"css"
] | 19 | 8 | 39,925 | 6 | 0 | 2008-10-13T16:18:15.387000 | 2008-10-13T16:22:52.320000 |
198,155 | 198,161 | xcopy /exclude issue | I am trying to run xcopy that copies files excluding.obj, etc. What I am seeing is that Microsoft.Practices.ObjectBuilder.dll is not copied when my excludes.txt file contains.obj as an extension. When.obj is removed, I Microsoft.Practices.ObjectBuilder.dll is copied correctly. This does not happen to other dlls though.... | I guess because the substring.obj is found in the name Microsoft.Practices**.Obj**ectBuilder.dll and since windows is not case sensitive, it will exclude it. | xcopy /exclude issue I am trying to run xcopy that copies files excluding.obj, etc. What I am seeing is that Microsoft.Practices.ObjectBuilder.dll is not copied when my excludes.txt file contains.obj as an extension. When.obj is removed, I Microsoft.Practices.ObjectBuilder.dll is copied correctly. This does not happen ... | TITLE:
xcopy /exclude issue
QUESTION:
I am trying to run xcopy that copies files excluding.obj, etc. What I am seeing is that Microsoft.Practices.ObjectBuilder.dll is not copied when my excludes.txt file contains.obj as an extension. When.obj is removed, I Microsoft.Practices.ObjectBuilder.dll is copied correctly. Thi... | [
"windows",
"batch-file",
"xcopy"
] | 2 | 4 | 2,639 | 4 | 0 | 2008-10-13T16:18:53.030000 | 2008-10-13T16:21:21.013000 |
198,157 | 198,263 | Can I tell the Table Name of an ActiveRecord class in c#? | I'm trying to verify if a schema matches the objects I'm initializing. Is there a way to get the TableName of a class other than simply reflecting the class name? I am using some class with explicit TableNames Edit: using Joe's solution I added the case where you don't specify the table name, it could probably use a co... | If you have something like the following: [ActiveRecord(Table = "NewsMaster")] public class Article { [PrimaryKey(Generator = PrimaryKeyType.Identity)] public int NewsId { get; set; }
[Property(Column = "NewsHeadline")] public string Headline { get; set; }
[Property(Column = "EffectiveStartDate")] public DateTime Sta... | Can I tell the Table Name of an ActiveRecord class in c#? I'm trying to verify if a schema matches the objects I'm initializing. Is there a way to get the TableName of a class other than simply reflecting the class name? I am using some class with explicit TableNames Edit: using Joe's solution I added the case where yo... | TITLE:
Can I tell the Table Name of an ActiveRecord class in c#?
QUESTION:
I'm trying to verify if a schema matches the objects I'm initializing. Is there a way to get the TableName of a class other than simply reflecting the class name? I am using some class with explicit TableNames Edit: using Joe's solution I added... | [
"c#",
"castle-activerecord"
] | 1 | 3 | 892 | 2 | 0 | 2008-10-13T16:20:29.547000 | 2008-10-13T16:58:21.017000 |
198,174 | 198,563 | How Do You Use jQuery to Simplify Your MVC Views? | I have found jQuery to be a great tool to simplify my MVC Views. For example, instead of including complicated logic to add alternating styles to my tables I just do this... $(document).ready(function() { $("table.details tr:odd").addClass("detailsAlternatingRow"); $("table.details tr:even").addClass("detailsRow"); });... | MVC Framework has a JsonResult that can be very nice to eliminate server round trips and might be able to get rid of some of the logic in your view page. I wrote a tutorial on this available at: http://www.dev102.com/2008/08/19/jquery-and-the-aspnet-mvc-framework/ | How Do You Use jQuery to Simplify Your MVC Views? I have found jQuery to be a great tool to simplify my MVC Views. For example, instead of including complicated logic to add alternating styles to my tables I just do this... $(document).ready(function() { $("table.details tr:odd").addClass("detailsAlternatingRow"); $("t... | TITLE:
How Do You Use jQuery to Simplify Your MVC Views?
QUESTION:
I have found jQuery to be a great tool to simplify my MVC Views. For example, instead of including complicated logic to add alternating styles to my tables I just do this... $(document).ready(function() { $("table.details tr:odd").addClass("detailsAlte... | [
"jquery",
"asp.net-mvc",
"model-view-controller"
] | 6 | 3 | 563 | 3 | 0 | 2008-10-13T16:25:08.867000 | 2008-10-13T18:36:44.220000 |
198,177 | 198,182 | How to specify the order of class members when formatting in Eclipse | In Eclipse IDE how do you customize the Java code style formatter to have it sort the class members with a specified order, for example to group all instance methods by visibility? | If the question is, "how do you customize the 'Source -> Format' command to re-order members?", I don't think it can be done. To change the order used for the 'Source -> Sort Members' command, change the "Members Sort Order" preference: "Window -> Preferences -> Java -> Appearance -> Members Sort Order" | How to specify the order of class members when formatting in Eclipse In Eclipse IDE how do you customize the Java code style formatter to have it sort the class members with a specified order, for example to group all instance methods by visibility? | TITLE:
How to specify the order of class members when formatting in Eclipse
QUESTION:
In Eclipse IDE how do you customize the Java code style formatter to have it sort the class members with a specified order, for example to group all instance methods by visibility?
ANSWER:
If the question is, "how do you customize t... | [
"eclipse"
] | 3 | 10 | 7,088 | 3 | 0 | 2008-10-13T16:26:27.960000 | 2008-10-13T16:28:45.023000 |
198,191 | 198,220 | Hosting Windows Workflow Designer | Does anyone have any experience hosting the Windows Workflow designer surface? I've seen a couple of rather difficult to follow examples on MSDN, but not much else - certainly nothing that offers an explanation into the process of hosting WF that is clear or easy to read... Are there better resources out there for host... | There is a reference application from MSDN if you want to learn from code. WF Sample Workflow Designer Visual Studio 2005 Solution There was a blog maintained by the developer of the workflow designer. Will update the post as soon as I am able to dig it out. | Hosting Windows Workflow Designer Does anyone have any experience hosting the Windows Workflow designer surface? I've seen a couple of rather difficult to follow examples on MSDN, but not much else - certainly nothing that offers an explanation into the process of hosting WF that is clear or easy to read... Are there b... | TITLE:
Hosting Windows Workflow Designer
QUESTION:
Does anyone have any experience hosting the Windows Workflow designer surface? I've seen a couple of rather difficult to follow examples on MSDN, but not much else - certainly nothing that offers an explanation into the process of hosting WF that is clear or easy to r... | [
".net",
"workflow",
"hosting",
"workflow-foundation"
] | 2 | 3 | 2,189 | 4 | 0 | 2008-10-13T16:33:07.853000 | 2008-10-13T16:42:19.457000 |
198,193 | 198,239 | JSF / CSS attribute conflicts | It's our first JSF app, and I'm in the middle of integrating our graphic designer's CSS into our facelets files. He tells me that he needs the name and id attributes of the input tags to be the same as the for attribute of the label tag. His request: User Name: However, when JSF code renders the HTML, I get extra ident... | You can use the JSF outputLabel tag, which should handle the ids automatically: Edit: To avoid confusion: You can also put the outputLabel outside the inputText Element. I just use it mostly like this. | JSF / CSS attribute conflicts It's our first JSF app, and I'm in the middle of integrating our graphic designer's CSS into our facelets files. He tells me that he needs the name and id attributes of the input tags to be the same as the for attribute of the label tag. His request: User Name: However, when JSF code rende... | TITLE:
JSF / CSS attribute conflicts
QUESTION:
It's our first JSF app, and I'm in the middle of integrating our graphic designer's CSS into our facelets files. He tells me that he needs the name and id attributes of the input tags to be the same as the for attribute of the label tag. His request: User Name: However, w... | [
"jsf"
] | 2 | 5 | 1,592 | 1 | 0 | 2008-10-13T16:34:32.077000 | 2008-10-13T16:49:39.753000 |
198,199 | 198,264 | How do you reverse a string in place in C or C++? | How do you reverse a string in C or C++ without requiring a separate buffer to hold the reversed string? | The standard algorithm is to use pointers to the start / end, and walk them inward until they meet or cross in the middle. Swap as you go. Reverse ASCII string, i.e. a 0-terminated array where every character fits in 1 char. (Or other non-multibyte character sets). void strrev(char *head) { if (!head) return; char *tai... | How do you reverse a string in place in C or C++? How do you reverse a string in C or C++ without requiring a separate buffer to hold the reversed string? | TITLE:
How do you reverse a string in place in C or C++?
QUESTION:
How do you reverse a string in C or C++ without requiring a separate buffer to hold the reversed string?
ANSWER:
The standard algorithm is to use pointers to the start / end, and walk them inward until they meet or cross in the middle. Swap as you go.... | [
"c++",
"c",
"string",
"reverse"
] | 197 | 134 | 342,800 | 21 | 0 | 2008-10-13T16:36:21.920000 | 2008-10-13T16:58:34.760000 |
198,233 | 198,290 | How to make a window have taskbar text but no title bar | How can I make my window not have a title bar but appear in the task bar with some descriptive text? If you set the Form's.Text property then.net gives it a title bar, which I don't want. this.ControlBox = false; this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; this.MaximizeBox = false; this.Min... | One approach to look into might be to set the FormBorderStyle property of your Form to None (instead of FixedDialog ). The drawback to this approach is that you lose the borders of your window as well as the Titlebar. A result of this is that you lose the form repositioning/resizing logic that you normally get "for fre... | How to make a window have taskbar text but no title bar How can I make my window not have a title bar but appear in the task bar with some descriptive text? If you set the Form's.Text property then.net gives it a title bar, which I don't want. this.ControlBox = false; this.FormBorderStyle = System.Windows.Forms.FormBor... | TITLE:
How to make a window have taskbar text but no title bar
QUESTION:
How can I make my window not have a title bar but appear in the task bar with some descriptive text? If you set the Form's.Text property then.net gives it a title bar, which I don't want. this.ControlBox = false; this.FormBorderStyle = System.Win... | [
"c#",
".net",
"winforms"
] | 11 | 6 | 7,755 | 4 | 0 | 2008-10-13T16:48:05.140000 | 2008-10-13T17:07:21.997000 |
198,244 | 199,291 | checkstyle + suppression filters | I have a checkstyle suppression filter setup (e.g. ignore magic numbers in unit test code). The suppression xml file resides in the same folder as the checkstyle xml file. However, where this file actually is varies: on my windows dev box it is in d:\dev\shared\checkstyle\config on the Linux CI server it will be in /ro... | I had this same problem with the Checkstyle suppression configuration when I was going back and forth between Linux and Windows. Here's how I solved it in my Ant-based build system: Basically, I inject the proper, platform-specific directory value into the main Checkstyle configuration file by configuring a Checkstyle ... | checkstyle + suppression filters I have a checkstyle suppression filter setup (e.g. ignore magic numbers in unit test code). The suppression xml file resides in the same folder as the checkstyle xml file. However, where this file actually is varies: on my windows dev box it is in d:\dev\shared\checkstyle\config on the ... | TITLE:
checkstyle + suppression filters
QUESTION:
I have a checkstyle suppression filter setup (e.g. ignore magic numbers in unit test code). The suppression xml file resides in the same folder as the checkstyle xml file. However, where this file actually is varies: on my windows dev box it is in d:\dev\shared\checkst... | [
"java",
"code-analysis",
"static-analysis",
"checkstyle"
] | 9 | 12 | 17,073 | 6 | 0 | 2008-10-13T16:51:06.383000 | 2008-10-13T22:39:23.573000 |
198,248 | 216,199 | What's the bare minimum Cygwin install to have DDD running properly on XP? | I’m using the gcc in MinGW that comes with Strawberry Perl, on Windows XP. I’d like to have ddd (the Data Display Debugger) as well but apparently on Windows the simplest way to get ddd is by running Cygwin. So what's the bare minimum of Cygwin I can install to get ddd up and running? I'd prefer if I could run ddd nati... | As far as I can tell so far, only the following (with Cygwin DLL release version 1.5.25-15), and allowing setup to install any other packages to meet dependencies. Base: base-files, grep Develop: ddd, gdb Math: gnuplot | What's the bare minimum Cygwin install to have DDD running properly on XP? I’m using the gcc in MinGW that comes with Strawberry Perl, on Windows XP. I’d like to have ddd (the Data Display Debugger) as well but apparently on Windows the simplest way to get ddd is by running Cygwin. So what's the bare minimum of Cygwin ... | TITLE:
What's the bare minimum Cygwin install to have DDD running properly on XP?
QUESTION:
I’m using the gcc in MinGW that comes with Strawberry Perl, on Windows XP. I’d like to have ddd (the Data Display Debugger) as well but apparently on Windows the simplest way to get ddd is by running Cygwin. So what's the bare ... | [
"windows-xp",
"gdb",
"cygwin",
"gnu",
"ddd-debugger"
] | 3 | 1 | 5,687 | 4 | 0 | 2008-10-13T16:52:04.540000 | 2008-10-19T09:12:37.173000 |
198,252 | 198,398 | ASP.NET - ObjectDataSource: using multi-select ListBox as ControlParameter | I have a form that contains a GridView control which is databound to an ObjectDataSource Control. There are several TextBox controls that are already being used as ControlParameters for the ObjectDataSource. I also have a custom data object that the ObjectDataSource is associated with {TypeName="myDataClass"}. The valu... | Multi-select list boxes are tricky. You need to loop through the items in code to build a list of selected values. So you will probably need to implement a custom parameter that does this for you. You might end up needing to bind to the grid from code-behind, instead of doing it declaratively. | ASP.NET - ObjectDataSource: using multi-select ListBox as ControlParameter I have a form that contains a GridView control which is databound to an ObjectDataSource Control. There are several TextBox controls that are already being used as ControlParameters for the ObjectDataSource. I also have a custom data object that... | TITLE:
ASP.NET - ObjectDataSource: using multi-select ListBox as ControlParameter
QUESTION:
I have a form that contains a GridView control which is databound to an ObjectDataSource Control. There are several TextBox controls that are already being used as ControlParameters for the ObjectDataSource. I also have a custo... | [
"asp.net",
"listbox",
"objectdatasource"
] | 3 | 2 | 4,233 | 2 | 0 | 2008-10-13T16:53:32.960000 | 2008-10-13T17:44:46.117000 |
198,279 | 198,311 | FCKeditor Plugin Issues | I am a complete beginner trying to develop for FCKeditor so please bear with me here. I have been tasked with developing a custom plugin that will allow users to browse a specific set of images that the user uploads. Essentially the user first attaches images, then uses the FCKeditor to insert those images. So I have m... | You don't need the lang directory unless you're planning on supporting multiple languages. But even then, I would get the plugin working in one language first. I would probably put mybrowser.asp in the plugin directory. Here's some code for fckplugin.js to get you started. // Register the related command. // RegisterCo... | FCKeditor Plugin Issues I am a complete beginner trying to develop for FCKeditor so please bear with me here. I have been tasked with developing a custom plugin that will allow users to browse a specific set of images that the user uploads. Essentially the user first attaches images, then uses the FCKeditor to insert t... | TITLE:
FCKeditor Plugin Issues
QUESTION:
I am a complete beginner trying to develop for FCKeditor so please bear with me here. I have been tasked with developing a custom plugin that will allow users to browse a specific set of images that the user uploads. Essentially the user first attaches images, then uses the FCK... | [
"javascript",
"asp-classic",
"wysiwyg",
"fckeditor"
] | 0 | 1 | 1,246 | 2 | 0 | 2008-10-13T17:00:54.240000 | 2008-10-13T17:16:15.207000 |
198,285 | 200,895 | SharpLibZip: Add file without path | I'm using the following code, using the SharpZipLib library, to add files to a.zip file, but each file is being stored with its full path. I need to only store the file, in the 'root' of the.zip file. string[] files = Directory.GetFiles(folderPath); using (ZipFile zipFile = ZipFile.Create(zipFilePath)) { zipFile.BeginU... | My solution was to set the NameTransform object property of the ZipFile to a ZipNameTransform with its TrimPrefix set to the directory of the file. This causes the directory part of the entry names, which are full file paths, to be removed. public static void ZipFolderContents(string folderPath, string zipFilePath) { s... | SharpLibZip: Add file without path I'm using the following code, using the SharpZipLib library, to add files to a.zip file, but each file is being stored with its full path. I need to only store the file, in the 'root' of the.zip file. string[] files = Directory.GetFiles(folderPath); using (ZipFile zipFile = ZipFile.Cr... | TITLE:
SharpLibZip: Add file without path
QUESTION:
I'm using the following code, using the SharpZipLib library, to add files to a.zip file, but each file is being stored with its full path. I need to only store the file, in the 'root' of the.zip file. string[] files = Directory.GetFiles(folderPath); using (ZipFile zi... | [
"compression",
"sharpziplib"
] | 16 | 25 | 9,411 | 3 | 0 | 2008-10-13T17:04:34.030000 | 2008-10-14T12:11:13.730000 |
198,320 | 199,159 | Linq to SQL class lifespan | As far as I can understand, when I new up a Linq to SQL class, it is the equivalent of new'ing up a SqlConnection object. Suppose I have an object with two methods: Delete() and SubmitChanges(). Would it be wise of me to new up the Linq to SQL class in each of the methods, or would a private variable holding the Linq t... | Having now reviewed the code sample you edited to post, I would definitely refactor your class to take advantage of LINQ-to-SQL's built in functionality. (I won't edit my previous comment because it's a better answer to the general question) Your class's fields appear to be a pretty direct mapping of the columns on the... | Linq to SQL class lifespan As far as I can understand, when I new up a Linq to SQL class, it is the equivalent of new'ing up a SqlConnection object. Suppose I have an object with two methods: Delete() and SubmitChanges(). Would it be wise of me to new up the Linq to SQL class in each of the methods, or would a private ... | TITLE:
Linq to SQL class lifespan
QUESTION:
As far as I can understand, when I new up a Linq to SQL class, it is the equivalent of new'ing up a SqlConnection object. Suppose I have an object with two methods: Delete() and SubmitChanges(). Would it be wise of me to new up the Linq to SQL class in each of the methods, o... | [
"c#",
"linq-to-sql",
"oop",
"c#-3.0"
] | 4 | 2 | 1,047 | 5 | 0 | 2008-10-13T17:18:55.453000 | 2008-10-13T21:57:26.013000 |
198,322 | 198,326 | Redirect Trace output to Console | Let's say I'm working on a little batch-processing console app in VB.Net. I want to be able to structure the app like this: Sub WorkerMethod() 'Do some work Trace.WriteLine("Work progress")
'Do more work Trace.WriteLine("Another progress update")
'... End Sub
Sub Main()
'Do any setup, like confirm the user wants to... | You can add the following to your exe's.config file. I included the TextWriter as well, in case you're interested in logging to a file. | Redirect Trace output to Console Let's say I'm working on a little batch-processing console app in VB.Net. I want to be able to structure the app like this: Sub WorkerMethod() 'Do some work Trace.WriteLine("Work progress")
'Do more work Trace.WriteLine("Another progress update")
'... End Sub
Sub Main()
'Do any setu... | TITLE:
Redirect Trace output to Console
QUESTION:
Let's say I'm working on a little batch-processing console app in VB.Net. I want to be able to structure the app like this: Sub WorkerMethod() 'Do some work Trace.WriteLine("Work progress")
'Do more work Trace.WriteLine("Another progress update")
'... End Sub
Sub Ma... | [
".net",
"vb.net",
".net-2.0",
"console",
"trace"
] | 75 | 160 | 38,057 | 3 | 0 | 2008-10-13T17:19:31.427000 | 2008-10-13T17:21:45.853000 |
198,337 | 198,354 | Testing HTML/CSS/Javascript skills when hiring | When hiring a front-end developer, what specific skills and practices should you test for? What is a good metric for evaluating their skill in HTML, CSS and Javascript? Obviously, table-less semantic HTML and pure CSS layout are probably the key skills. But what about specific techniques? Should he/she be able to effor... | When I interview people for a position of Client-Side developer I try to figure out: 1) Understanding DOM (what is that, how is it related to HTML etc) 2) Understanding XML/namespaces 3) Understanding JavaScript (object-oriented? what otherwise) 4) Knowing approaches to componentization (XBL, HTC) - plus 5) Understandi... | Testing HTML/CSS/Javascript skills when hiring When hiring a front-end developer, what specific skills and practices should you test for? What is a good metric for evaluating their skill in HTML, CSS and Javascript? Obviously, table-less semantic HTML and pure CSS layout are probably the key skills. But what about spec... | TITLE:
Testing HTML/CSS/Javascript skills when hiring
QUESTION:
When hiring a front-end developer, what specific skills and practices should you test for? What is a good metric for evaluating their skill in HTML, CSS and Javascript? Obviously, table-less semantic HTML and pure CSS layout are probably the key skills. B... | [
"javascript",
"html",
"css",
"frontend"
] | 27 | 19 | 19,907 | 13 | 0 | 2008-10-13T17:26:31.600000 | 2008-10-13T17:33:06.610000 |
198,341 | 248,624 | Progressbar from Spring Context? | I would like to create a window with a progressbar which shows the current status of Spring's object instantiation. From Spring.Net's documentation it seems that IObjectPostProcessors is the right point to start and track whenever an Object has been instanciated. However in order to get "Percentage of instantiated clas... | I can provide you with a workaround, although it's not perfect it should probably be a good estimate. You use a persistent storage mechanism (properties files, db, whatever) to keep track of the number of created beans. You use IObjectPostProcessors to update the count of initializations On the first run, obviously the... | Progressbar from Spring Context? I would like to create a window with a progressbar which shows the current status of Spring's object instantiation. From Spring.Net's documentation it seems that IObjectPostProcessors is the right point to start and track whenever an Object has been instanciated. However in order to get... | TITLE:
Progressbar from Spring Context?
QUESTION:
I would like to create a window with a progressbar which shows the current status of Spring's object instantiation. From Spring.Net's documentation it seems that IObjectPostProcessors is the right point to start and track whenever an Object has been instanciated. Howev... | [
"c#",
"spring",
"spring.net"
] | 2 | 1 | 656 | 2 | 0 | 2008-10-13T17:28:37.647000 | 2008-10-29T22:13:08.917000 |
198,346 | 198,459 | What's the best way to create a single-file upload form using PHP? | I've found a few samples online but I'd like to get feedback from people who use PHP daily as to potential security or performance considerations and their solutions. Note that I am only interested in uploading a single file at a time. Ideally no browser plugin would be required (Flash/Java), although it would be inter... | File Upload Tutorial HTML action.php is the name of a PHP file that will process the upload (shown below) MAX_FILE_SIZE must appear immediately before the input with type file. This value can easily be manipulated on the client so should not be relied upon. Its main benefit is to provide the user with early warning tha... | What's the best way to create a single-file upload form using PHP? I've found a few samples online but I'd like to get feedback from people who use PHP daily as to potential security or performance considerations and their solutions. Note that I am only interested in uploading a single file at a time. Ideally no browse... | TITLE:
What's the best way to create a single-file upload form using PHP?
QUESTION:
I've found a few samples online but I'd like to get feedback from people who use PHP daily as to potential security or performance considerations and their solutions. Note that I am only interested in uploading a single file at a time.... | [
"php",
"upload",
"file-upload"
] | 21 | 34 | 21,201 | 4 | 0 | 2008-10-13T17:30:32.807000 | 2008-10-13T18:07:13.140000 |
198,357 | 198,437 | What is this called in computer science? | A lot of programming languages and frameworks do/allow/require something that I can't seem to find the name for, even though there probably is one in computer science. What they basically do is bind to a variable/object/class/function by name. Flex example ("selectAll()"): Mate example ("price"): Java example ("Foo"): ... | It's called "late binding", "dynamic binding", or "runtime binding". The fact that it binds by a string is just an implementation detail, although it does imply that the string-to-symbol mapping exists at runtime (which some languages, like c++, don't provide). "Introspection" or "reflection", on the other hand, refer ... | What is this called in computer science? A lot of programming languages and frameworks do/allow/require something that I can't seem to find the name for, even though there probably is one in computer science. What they basically do is bind to a variable/object/class/function by name. Flex example ("selectAll()"): Mate ... | TITLE:
What is this called in computer science?
QUESTION:
A lot of programming languages and frameworks do/allow/require something that I can't seem to find the name for, even though there probably is one in computer science. What they basically do is bind to a variable/object/class/function by name. Flex example ("se... | [
"apache-flex",
"computer-science",
"mate"
] | 7 | 15 | 2,317 | 17 | 0 | 2008-10-13T17:34:03.113000 | 2008-10-13T17:56:10.197000 |
198,359 | 991,481 | Why is Microsoft.SharePoint.Search.dll copied in my project? | When working on a VS2005 project that involves referencing Microsoft.SharePoint.dll, building the project causes Microsoft.SharePoint.Search.dll to be copied to my bin folder. Why is this? Okay, maybe it's just a bug, but I want to know the mechanism. [Edit: Copy local is most definitely turned off -- Microsoft.SharePo... | What worked for me is to add reference to Microsoft.SharePoint and Microsoft.SharePoint.Search (even if you don't need it) set Copy Local to false for both references. When you build the project none of them gets copied to debug/release/whatever directory. | Why is Microsoft.SharePoint.Search.dll copied in my project? When working on a VS2005 project that involves referencing Microsoft.SharePoint.dll, building the project causes Microsoft.SharePoint.Search.dll to be copied to my bin folder. Why is this? Okay, maybe it's just a bug, but I want to know the mechanism. [Edit: ... | TITLE:
Why is Microsoft.SharePoint.Search.dll copied in my project?
QUESTION:
When working on a VS2005 project that involves referencing Microsoft.SharePoint.dll, building the project causes Microsoft.SharePoint.Search.dll to be copied to my bin folder. Why is this? Okay, maybe it's just a bug, but I want to know the ... | [
"sharepoint",
"visual-studio-2005"
] | 4 | 1 | 2,777 | 8 | 0 | 2008-10-13T17:34:27.603000 | 2009-06-13T20:45:34.680000 |
198,360 | 208,920 | Silverlight Hosted in Winforms | I would like to host a silverlight control in winforms via a winforms browser, but for it to work I need some way for the forms to talk to the silverlight, and also the other way around. Would it be possible to somehow have the two interact with each other using JavaScript as a middleman? I.e., have the form speak to t... | I think using the Windows Forms WebBrowser control is your best bet. To do this, you'll need your Silverlight app on a webpage, then you point your WebBrowser at the page's URI. To keep your WebBrowser control from acting like IE, I'd recommend setting the following: webBrowser.AllowNavigation = false; webBrowser.Allow... | Silverlight Hosted in Winforms I would like to host a silverlight control in winforms via a winforms browser, but for it to work I need some way for the forms to talk to the silverlight, and also the other way around. Would it be possible to somehow have the two interact with each other using JavaScript as a middleman?... | TITLE:
Silverlight Hosted in Winforms
QUESTION:
I would like to host a silverlight control in winforms via a winforms browser, but for it to work I need some way for the forms to talk to the silverlight, and also the other way around. Would it be possible to somehow have the two interact with each other using JavaScri... | [
"c#",
"javascript",
"wpf",
"winforms",
"silverlight"
] | 11 | 16 | 14,418 | 4 | 0 | 2008-10-13T17:34:32.177000 | 2008-10-16T15:02:53.837000 |
198,409 | 198,702 | How do you test running time of VBA code? | Is there code in VBA I can wrap a function with that will let me know the time it took to run, so that I can compare the different running times of functions? | Unless your functions are very slow, you're going to need a very high-resolution timer. The most accurate one I know is QueryPerformanceCounter. Google it for more info. Try pushing the following into a class, call it CTimer say, then you can make an instance somewhere global and just call.StartCounter and.TimeElapsed ... | How do you test running time of VBA code? Is there code in VBA I can wrap a function with that will let me know the time it took to run, so that I can compare the different running times of functions? | TITLE:
How do you test running time of VBA code?
QUESTION:
Is there code in VBA I can wrap a function with that will let me know the time it took to run, so that I can compare the different running times of functions?
ANSWER:
Unless your functions are very slow, you're going to need a very high-resolution timer. The ... | [
"optimization",
"testing",
"vba",
"profiling",
"performance"
] | 106 | 91 | 163,922 | 9 | 0 | 2008-10-13T17:49:02.240000 | 2008-10-13T19:16:17.587000 |
198,414 | 198,423 | What is the best way to display and edit a large array of hex data in WinForms? | I am looking to display an array from 128 to 512 bytes in size of hexadecimal data (0x00 to 0xFF) in a 16 X n grid-like display. It needs the capability of selecting a single element or group of elements and highlighting the data in some way. It also needs to allow editing. I'm writing this in C# 3,5 using Winforms. I'... | Take a look at the DataGridView. You'd need to break this up into the constituent cells, but it definitely is great for putting together a grid of data (like Excel). | What is the best way to display and edit a large array of hex data in WinForms? I am looking to display an array from 128 to 512 bytes in size of hexadecimal data (0x00 to 0xFF) in a 16 X n grid-like display. It needs the capability of selecting a single element or group of elements and highlighting the data in some wa... | TITLE:
What is the best way to display and edit a large array of hex data in WinForms?
QUESTION:
I am looking to display an array from 128 to 512 bytes in size of hexadecimal data (0x00 to 0xFF) in a 16 X n grid-like display. It needs the capability of selecting a single element or group of elements and highlighting t... | [
"c#",
"winforms",
"controls",
"ui-design"
] | 1 | 2 | 389 | 2 | 0 | 2008-10-13T17:50:29.727000 | 2008-10-13T17:52:10.377000 |
198,419 | 198,576 | How do I collapse empty xml tags? | I'm getting XML like this: This is valid XML, as you know, but another library I'm using is busted and it will only accept XML in this format: I'm already reading the XML into XmlDocuments, manipulating them, and rewriting them using an XmlWriter(), what's the easiest (and most efficient) way for me to "collapse" these... | Set the IsEmpty property of each XmlElement you want to collapse to true. | How do I collapse empty xml tags? I'm getting XML like this: This is valid XML, as you know, but another library I'm using is busted and it will only accept XML in this format: I'm already reading the XML into XmlDocuments, manipulating them, and rewriting them using an XmlWriter(), what's the easiest (and most efficie... | TITLE:
How do I collapse empty xml tags?
QUESTION:
I'm getting XML like this: This is valid XML, as you know, but another library I'm using is busted and it will only accept XML in this format: I'm already reading the XML into XmlDocuments, manipulating them, and rewriting them using an XmlWriter(), what's the easiest... | [
"c#",
"xml"
] | 2 | 4 | 3,528 | 5 | 0 | 2008-10-13T17:51:33.920000 | 2008-10-13T18:40:00.250000 |
198,431 | 198,442 | How do you compare two version Strings in Java? | Is there a standard idiom for comparing version numbers? I can't just use a straight String compareTo because I don't know yet what the maximum number of point releases there will be. I need to compare the versions and have the following hold true: 1.0 < 1.1 1.0.1 < 1.1 1.9 < 1.10 | Tokenize the strings with the dot as delimiter and then compare the integer translation side by side, beginning from the left. | How do you compare two version Strings in Java? Is there a standard idiom for comparing version numbers? I can't just use a straight String compareTo because I don't know yet what the maximum number of point releases there will be. I need to compare the versions and have the following hold true: 1.0 < 1.1 1.0.1 < 1.1 1... | TITLE:
How do you compare two version Strings in Java?
QUESTION:
Is there a standard idiom for comparing version numbers? I can't just use a straight String compareTo because I don't know yet what the maximum number of point releases there will be. I need to compare the versions and have the following hold true: 1.0 <... | [
"java",
"comparison",
"versioning"
] | 212 | 69 | 166,308 | 33 | 0 | 2008-10-13T17:54:41.370000 | 2008-10-13T17:57:23.283000 |
198,438 | 198,498 | Efficiently detect corrupted jpeg file? | Is there an efficient way of detecting if a jpeg file is corrupted? Background info: solutions needs to work from within a php script the jpeg files are on disk manual checking is no option (user uploaded data) I know that imagecreatefromjpeg(string $filename); can do it. But it is quite slow at doing so. Does anybody ... | From the command line you can use jpeginfo to find out if a jpeg file is OK or not. $ jpeginfo -c test.jpeg test.jpeg 260 x 264 24bit JFIF N 15332 [OK] It should be trivial to call jpeginfo from php. | Efficiently detect corrupted jpeg file? Is there an efficient way of detecting if a jpeg file is corrupted? Background info: solutions needs to work from within a php script the jpeg files are on disk manual checking is no option (user uploaded data) I know that imagecreatefromjpeg(string $filename); can do it. But it ... | TITLE:
Efficiently detect corrupted jpeg file?
QUESTION:
Is there an efficient way of detecting if a jpeg file is corrupted? Background info: solutions needs to work from within a php script the jpeg files are on disk manual checking is no option (user uploaded data) I know that imagecreatefromjpeg(string $filename); ... | [
"php",
"jpeg",
"corruption"
] | 19 | 18 | 16,332 | 8 | 0 | 2008-10-13T17:56:30.417000 | 2008-10-13T18:19:47.403000 |
198,460 | 198,470 | How to get a random number in Ruby | How do I generate a random number between 0 and n? | Use rand(range) From Ruby Random Numbers: If you needed a random integer to simulate a roll of a six-sided die, you'd use: 1 + rand(6). A roll in craps could be simulated with 2 + rand(6) + rand(6). Finally, if you just need a random float, just call rand with no arguments. As Marc-André Lafortune mentions in his answe... | How to get a random number in Ruby How do I generate a random number between 0 and n? | TITLE:
How to get a random number in Ruby
QUESTION:
How do I generate a random number between 0 and n?
ANSWER:
Use rand(range) From Ruby Random Numbers: If you needed a random integer to simulate a roll of a six-sided die, you'd use: 1 + rand(6). A roll in craps could be simulated with 2 + rand(6) + rand(6). Finally,... | [
"ruby-on-rails",
"ruby",
"ruby-on-rails-3",
"ruby-on-rails-4",
"random"
] | 834 | 994 | 574,017 | 18 | 0 | 2008-10-13T18:07:24.043000 | 2008-10-13T18:10:25.520000 |
198,461 | 198,510 | Are there any programs to draw and test state machines, turing machines, etc? | When I go back to school after Thanksgiving, I'll be taking a course in CS Theory covering topics such as deterministic and nondeterministic finite state machines, turing machines, pushdown automata and a few other things. However, I haven't found a good application that can produce a visual representation of them as w... | It was JFlap that I used in college. I didn't find it that awkward to use, but it looks like it may have changed since then. Sorry I don't have a better answer for you than that. | Are there any programs to draw and test state machines, turing machines, etc? When I go back to school after Thanksgiving, I'll be taking a course in CS Theory covering topics such as deterministic and nondeterministic finite state machines, turing machines, pushdown automata and a few other things. However, I haven't ... | TITLE:
Are there any programs to draw and test state machines, turing machines, etc?
QUESTION:
When I go back to school after Thanksgiving, I'll be taking a course in CS Theory covering topics such as deterministic and nondeterministic finite state machines, turing machines, pushdown automata and a few other things. H... | [
"computer-science",
"state-machine",
"finite-automata"
] | 5 | 8 | 9,171 | 6 | 0 | 2008-10-13T18:07:57.553000 | 2008-10-13T18:22:38.413000 |
198,462 | 198,473 | Is either GET or POST more secure than the other? | When comparing an HTTP GET to an HTTP POST, what are the differences from a security perspective? Is one of the choices inherently more secure than the other? If so, why? I realize that POST doesn't expose information on the URL, but is there any real value in that or is it just security through obscurity? Is there eve... | As far as security, they are inherently the same. While it is true that POST doesn't expose information via the URL, it exposes just as much information as a GET in the actual network communication between the client and server. If you need to pass information that is sensitive, your first line of defense would be to p... | Is either GET or POST more secure than the other? When comparing an HTTP GET to an HTTP POST, what are the differences from a security perspective? Is one of the choices inherently more secure than the other? If so, why? I realize that POST doesn't expose information on the URL, but is there any real value in that or i... | TITLE:
Is either GET or POST more secure than the other?
QUESTION:
When comparing an HTTP GET to an HTTP POST, what are the differences from a security perspective? Is one of the choices inherently more secure than the other? If so, why? I realize that POST doesn't expose information on the URL, but is there any real ... | [
"html",
"http",
"security",
"post",
"get"
] | 315 | 220 | 186,076 | 29 | 0 | 2008-10-13T18:08:01.937000 | 2008-10-13T18:11:03.693000 |
198,465 | 198,553 | Get File Object used by a CSV Reader/Writer Object | Is there any way to access the file object used by a CSV writer/reader object after it has been instantiated? I openned up the csv module, and it appears it's contest are builtin. I also tried setting the file object as a property but I get the following error: AttributeError: '_csv.writer' object has no attribute 'fil... | csv.writer is a "builtin" function. That is, it is written in compiled C code rather than Python. So its internal variables can't be accessed from Python code. That being said, I'm not sure why you would need to inspect the csv.writer object to find out the file object. That object is specified when creating the object... | Get File Object used by a CSV Reader/Writer Object Is there any way to access the file object used by a CSV writer/reader object after it has been instantiated? I openned up the csv module, and it appears it's contest are builtin. I also tried setting the file object as a property but I get the following error: Attribu... | TITLE:
Get File Object used by a CSV Reader/Writer Object
QUESTION:
Is there any way to access the file object used by a CSV writer/reader object after it has been instantiated? I openned up the csv module, and it appears it's contest are builtin. I also tried setting the file object as a property but I get the follow... | [
"python",
"csv"
] | 2 | 3 | 1,947 | 2 | 0 | 2008-10-13T18:09:06.380000 | 2008-10-13T18:33:54.817000 |
198,477 | 198,503 | How do I set a source control plug in default for Visual Studio 2008? | We recently installed Team Foundation Server 2008 and we are using it for both Visual Studio 2008 code and Visual FoxPro 9 code that we are still migrating to.Net. I had to install the TFS MSSCCI provider to get connectivity from the VFP9 IDE. That works fine, but Visual Studio now seems to get confused about which sou... | Have you tried switching which source control pluggin VS 2008 is using to TFS? You can find the option under Tools>Options>Source Control. It does not appear to have a default setting option but it should save the value if you close VS after setting it. Good Luck. | How do I set a source control plug in default for Visual Studio 2008? We recently installed Team Foundation Server 2008 and we are using it for both Visual Studio 2008 code and Visual FoxPro 9 code that we are still migrating to.Net. I had to install the TFS MSSCCI provider to get connectivity from the VFP9 IDE. That w... | TITLE:
How do I set a source control plug in default for Visual Studio 2008?
QUESTION:
We recently installed Team Foundation Server 2008 and we are using it for both Visual Studio 2008 code and Visual FoxPro 9 code that we are still migrating to.Net. I had to install the TFS MSSCCI provider to get connectivity from th... | [
"visual-studio-2008",
"version-control",
"tfs",
"visual-foxpro",
"foxpro"
] | 3 | 1 | 11,981 | 5 | 0 | 2008-10-13T18:11:29.387000 | 2008-10-13T18:21:28.510000 |
198,478 | 198,554 | Advantages of SQL Server 2008 over SQL Server 2005? | What are the key differences between Microsoft's SQL Server 2005 and SQL Server 2008? Are there any compelling reasons for upgrading (any edition, as I have a customer with multiple editions)? Or is there a website with either a chart or bullet point comparison of the two servers? Also, is there anything noteworthy in ... | Transparent Data Encryption. The ability to encrypt an entire database. Backup Encryption. Executed at backup time to prevent tampering. External Key Management. Storing Keys separate from the data. Auditing. Monitoring of data access. Data Compression. Fact Table size reduction and improved performance. Resource Gover... | Advantages of SQL Server 2008 over SQL Server 2005? What are the key differences between Microsoft's SQL Server 2005 and SQL Server 2008? Are there any compelling reasons for upgrading (any edition, as I have a customer with multiple editions)? Or is there a website with either a chart or bullet point comparison of the... | TITLE:
Advantages of SQL Server 2008 over SQL Server 2005?
QUESTION:
What are the key differences between Microsoft's SQL Server 2005 and SQL Server 2008? Are there any compelling reasons for upgrading (any edition, as I have a customer with multiple editions)? Or is there a website with either a chart or bullet point... | [
"sql-server-2005",
"sql-server-2008",
"comparison"
] | 69 | 84 | 160,494 | 11 | 0 | 2008-10-13T18:11:30.620000 | 2008-10-13T18:34:06.860000 |
198,482 | 198,507 | Real World ASP.NET MVC Applications with Source Code? | I think all of the tutorials and stuff are great on blogs, but sometimes when you actually build an application the way you would code or interact with a system is quite different. I was wondering if you all knew some good real world type ASP.NET MVC applications that have the source code available for experimentation.... | I'm sure you know of storefront. I've heard it's a good tutorial and it comes with source code. | Real World ASP.NET MVC Applications with Source Code? I think all of the tutorials and stuff are great on blogs, but sometimes when you actually build an application the way you would code or interact with a system is quite different. I was wondering if you all knew some good real world type ASP.NET MVC applications th... | TITLE:
Real World ASP.NET MVC Applications with Source Code?
QUESTION:
I think all of the tutorials and stuff are great on blogs, but sometimes when you actually build an application the way you would code or interact with a system is quite different. I was wondering if you all knew some good real world type ASP.NET M... | [
"asp.net-mvc"
] | 17 | 3 | 14,996 | 5 | 0 | 2008-10-13T18:12:52.223000 | 2008-10-13T18:22:21.050000 |
198,488 | 200,243 | Drag/Drop inside an Application AND to another Application | I have a ListView containing file names. These file names need to be draggable to a TreeView, which is a drag/drop inside the application and works with the built in drag/drop support of Delphi - no problem. But I must also be able to drag/drop the ListView items to another application, e.g. Windows Explorer. This also... | The Drag and Drop Component Suite you mentioned does this. You can initiate a drag which you can drop in your own app or other apps by default. Just pick the right clipboard format that other applications understand. What is your problem with it? | Drag/Drop inside an Application AND to another Application I have a ListView containing file names. These file names need to be draggable to a TreeView, which is a drag/drop inside the application and works with the built in drag/drop support of Delphi - no problem. But I must also be able to drag/drop the ListView ite... | TITLE:
Drag/Drop inside an Application AND to another Application
QUESTION:
I have a ListView containing file names. These file names need to be draggable to a TreeView, which is a drag/drop inside the application and works with the built in drag/drop support of Delphi - no problem. But I must also be able to drag/dro... | [
"delphi",
"drag-and-drop"
] | 5 | 5 | 4,551 | 3 | 0 | 2008-10-13T18:17:09.093000 | 2008-10-14T07:22:53.300000 |
198,496 | 198,500 | Difference between the System.Array.CopyTo() and System.Array.Clone() | What’s the difference between the System.Array.CopyTo() and System.Array.Clone()? | The Clone() method returns a new array (a shallow copy) object containing all the elements in the original array. The CopyTo() method copies the elements into another existing array. Both perform a shallow copy. A shallow copy means the contents (each array element) contains references to the same object as the element... | Difference between the System.Array.CopyTo() and System.Array.Clone() What’s the difference between the System.Array.CopyTo() and System.Array.Clone()? | TITLE:
Difference between the System.Array.CopyTo() and System.Array.Clone()
QUESTION:
What’s the difference between the System.Array.CopyTo() and System.Array.Clone()?
ANSWER:
The Clone() method returns a new array (a shallow copy) object containing all the elements in the original array. The CopyTo() method copies ... | [
"c#",
".net",
"arrays",
".net-2.0"
] | 95 | 74 | 127,553 | 12 | 0 | 2008-10-13T18:19:40.650000 | 2008-10-13T18:20:13.487000 |
198,501 | 198,515 | Books & resources to teach myself Linear Algebra | I'm looking for books and resource to teach myself linear algebra to be used in 3D graphics programming. I prefer practical approaches to teaching over theoretical (even though math is what, 99.99% theory?) ones, so the dream resource for me would be a book that tackles linear algebra as it's used with 3D graphics prog... | MIT OpenCourseWare offers a free course in Linear Algebra. May be too general for your very specific interests, but it's free.:) | Books & resources to teach myself Linear Algebra I'm looking for books and resource to teach myself linear algebra to be used in 3D graphics programming. I prefer practical approaches to teaching over theoretical (even though math is what, 99.99% theory?) ones, so the dream resource for me would be a book that tackles ... | TITLE:
Books & resources to teach myself Linear Algebra
QUESTION:
I'm looking for books and resource to teach myself linear algebra to be used in 3D graphics programming. I prefer practical approaches to teaching over theoretical (even though math is what, 99.99% theory?) ones, so the dream resource for me would be a ... | [
"math",
"linear-algebra",
"algebra"
] | 9 | 12 | 3,339 | 5 | 0 | 2008-10-13T18:20:59.930000 | 2008-10-13T18:24:08.847000 |
198,520 | 908,348 | How to best prevent CSRF attacks in a GAE app? | So, what is the best way to prevent an XSRF attack for a GAE application? Imagine the following: Anyone can see a user's public object, and the db.Model id is used in the request to figure out which object to show. Malicious user now has the id. Malicious user creates their own object and checks out the delete form. Th... | When you generate the page that lets the user delete an object, generate a random token and include it in a hidden form field. Also set a HTTP-only cookie with that value. When you receive a delete request, check that the random token from the form and the value from the cookie match. Your random token shouldn't just b... | How to best prevent CSRF attacks in a GAE app? So, what is the best way to prevent an XSRF attack for a GAE application? Imagine the following: Anyone can see a user's public object, and the db.Model id is used in the request to figure out which object to show. Malicious user now has the id. Malicious user creates thei... | TITLE:
How to best prevent CSRF attacks in a GAE app?
QUESTION:
So, what is the best way to prevent an XSRF attack for a GAE application? Imagine the following: Anyone can see a user's public object, and the db.Model id is used in the request to figure out which object to show. Malicious user now has the id. Malicious... | [
"google-app-engine",
"csrf"
] | 11 | 13 | 5,282 | 3 | 0 | 2008-10-13T18:25:46.190000 | 2009-05-25T23:16:50.670000 |
198,532 | 199,278 | Changing the background color of a DateTimePicker in .NET | In.NET (at least in the 2008 version, and maybe in 2005 as well), changing the BackColor property of a DateTimePicker has absolutely no affect on the appearance. How do I change the background color of the text area, not of the drop-down calendar? Edit: I was talking about Windows forms, not ASP. | According to MSDN: Setting the BackColor has no effect on the appearance of the DateTimePicker. You need to write a custom control that extends DateTimePicker. Override the BackColor property and the WndProc method. Whenever you change the BackColor, don't forget to call the myDTPicker.Invalidate() method. This will fo... | Changing the background color of a DateTimePicker in .NET In.NET (at least in the 2008 version, and maybe in 2005 as well), changing the BackColor property of a DateTimePicker has absolutely no affect on the appearance. How do I change the background color of the text area, not of the drop-down calendar? Edit: I was ta... | TITLE:
Changing the background color of a DateTimePicker in .NET
QUESTION:
In.NET (at least in the 2008 version, and maybe in 2005 as well), changing the BackColor property of a DateTimePicker has absolutely no affect on the appearance. How do I change the background color of the text area, not of the drop-down calend... | [
"c#",
".net",
"vb.net",
"winforms"
] | 16 | 18 | 53,453 | 3 | 0 | 2008-10-13T18:28:29.290000 | 2008-10-13T22:34:15.643000 |
198,534 | 205,455 | Dithering gouraud-shaded vertex-colored polygons to remove banding | I'm using OpenGL ES on a low-resolution, embedded device. I've applied a vertical color gradient, using vertex coloring, to a large polygon serving as a backdrop to my rendered scene. I can see clear visible banding artifacts in the color gradient. My main experience is using software renderers. With software renderers... | Have you tried glEnable(GL_DITHER)? It's normally initially enabled, but I've never worked with GL ES or on an embedded device. It may also depend on the color depth you're using in the frame buffer, you're going to get artifacts if you've only got 4 bits per channel. | Dithering gouraud-shaded vertex-colored polygons to remove banding I'm using OpenGL ES on a low-resolution, embedded device. I've applied a vertical color gradient, using vertex coloring, to a large polygon serving as a backdrop to my rendered scene. I can see clear visible banding artifacts in the color gradient. My m... | TITLE:
Dithering gouraud-shaded vertex-colored polygons to remove banding
QUESTION:
I'm using OpenGL ES on a low-resolution, embedded device. I've applied a vertical color gradient, using vertex coloring, to a large polygon serving as a backdrop to my rendered scene. I can see clear visible banding artifacts in the co... | [
"opengl-es",
"quantization",
"dithering"
] | 3 | 1 | 1,575 | 2 | 0 | 2008-10-13T18:28:59.710000 | 2008-10-15T16:41:10.440000 |
198,535 | 198,675 | asp.net: Getting SelectedItem of a DropDownList and retaining list items | I have small page which has label, DropDownList and a submit button. Which city do you wish to look at on hotels for? On form load I am inserting items into the DropDownList and on the button click I am displaying the count of the items in the DropDownList. Here's the code for that. if (Page.IsPostBack) { Message.Text ... | It sounds like you may have EnableViewState disabled at the page level. Contrary to the other responses, you don't need to repopulate your lists on PostBack if ViewState is enabled. Try adding the EnableViewState="true" attribute in your page header. I think it is a bug. If EnableViewState="false" at the page level, an... | asp.net: Getting SelectedItem of a DropDownList and retaining list items I have small page which has label, DropDownList and a submit button. Which city do you wish to look at on hotels for? On form load I am inserting items into the DropDownList and on the button click I am displaying the count of the items in the Dro... | TITLE:
asp.net: Getting SelectedItem of a DropDownList and retaining list items
QUESTION:
I have small page which has label, DropDownList and a submit button. Which city do you wish to look at on hotels for? On form load I am inserting items into the DropDownList and on the button click I am displaying the count of th... | [
"asp.net",
".net",
"drop-down-menu",
"viewstate",
"selecteditem"
] | 2 | 4 | 3,317 | 3 | 0 | 2008-10-13T18:29:11.083000 | 2008-10-13T19:06:36.717000 |
198,543 | 586,156 | How do I raise an event via reflection in .NET/C#? | I have a third-party editor that basically comprises a textbox and a button (the DevExpress ButtonEdit control). I want to make a particular keystroke ( Alt + Down ) emulate clicking the button. In order to avoid writing this over and over, I want to make a generic KeyUp event handler that will raise the ButtonClick ev... | Here's a demo using generics (error checks omitted): using System; using System.Reflection; static class Program { private class Sub { public event EventHandler SomethingHappening; } internal static void Raise (this object source, string eventName, TEventArgs eventArgs) where TEventArgs: EventArgs { var eventDelegate =... | How do I raise an event via reflection in .NET/C#? I have a third-party editor that basically comprises a textbox and a button (the DevExpress ButtonEdit control). I want to make a particular keystroke ( Alt + Down ) emulate clicking the button. In order to avoid writing this over and over, I want to make a generic Key... | TITLE:
How do I raise an event via reflection in .NET/C#?
QUESTION:
I have a third-party editor that basically comprises a textbox and a button (the DevExpress ButtonEdit control). I want to make a particular keystroke ( Alt + Down ) emulate clicking the button. In order to avoid writing this over and over, I want to ... | [
"c#",
".net",
"event-handling",
"devexpress"
] | 34 | 42 | 26,641 | 9 | 0 | 2008-10-13T18:31:30.440000 | 2009-02-25T14:19:41.900000 |
198,551 | 198,601 | Oracle DB Mac Address or other unique identifier | I am interacting with an Oracle DB using SQL over an ODBC connection. Is there an SQL command I can use to get the MAC address of the server, or something that uniquely identifies the server hardware or software installation. This is so I can be sure (or at least fairly sure) that I'm talking to the same database all t... | Check http://download.oracle.com/docs/cd/B28359_01/server.111/b28320/dynviews_1086.htm#REFRN30047 The v$database performance view has a column dbid. This is a rather unique identification number of your database. (ofcourse the name column could be unique as well) | Oracle DB Mac Address or other unique identifier I am interacting with an Oracle DB using SQL over an ODBC connection. Is there an SQL command I can use to get the MAC address of the server, or something that uniquely identifies the server hardware or software installation. This is so I can be sure (or at least fairly ... | TITLE:
Oracle DB Mac Address or other unique identifier
QUESTION:
I am interacting with an Oracle DB using SQL over an ODBC connection. Is there an SQL command I can use to get the MAC address of the server, or something that uniquely identifies the server hardware or software installation. This is so I can be sure (o... | [
"sql",
"oracle"
] | 0 | 2 | 3,029 | 2 | 0 | 2008-10-13T18:33:05.833000 | 2008-10-13T18:45:44.840000 |
198,552 | 198,628 | Programmatically determine column name of GridView controls? | I have a row of data that I need to modify in a database, using a stored procedure. But in order to call that stored procedure, I need to know the name of the each column. How do I determine the name of the columns? (Hardcoding is not an option as we are talking a LOT of columns whose names may change). EDIT: given the... | To get the header text of the column you can use this: string colText = grid.Columns[i].HeaderText; Where i is the index of the column. | Programmatically determine column name of GridView controls? I have a row of data that I need to modify in a database, using a stored procedure. But in order to call that stored procedure, I need to know the name of the each column. How do I determine the name of the columns? (Hardcoding is not an option as we are talk... | TITLE:
Programmatically determine column name of GridView controls?
QUESTION:
I have a row of data that I need to modify in a database, using a stored procedure. But in order to call that stored procedure, I need to know the name of the each column. How do I determine the name of the columns? (Hardcoding is not an opt... | [
"asp.net",
"gridview"
] | 1 | 3 | 14,689 | 5 | 0 | 2008-10-13T18:33:45.550000 | 2008-10-13T18:53:06.667000 |
198,561 | 198,944 | How hard is it to master semantic markup and good CSS? | I know this won't be a popular question, because a lot of web designers want to assume that their craft is difficult and valuable. IT IS. But I do not believe that it is difficult because HTML and CSS are difficult to master, I believe its difficult because being a good creative designer is difficult. Please resist the... | "Is HTML and CSS impossible to learn well in a week?" In a word, yes. Can you write a basic page by following something like, "Learn html in 24 hours"? Absolutely. Will you know why it does or does not work - probably not. "...a good CSS reset handles 99% of the issues." Possibly. Why it does is likely way beyond one w... | How hard is it to master semantic markup and good CSS? I know this won't be a popular question, because a lot of web designers want to assume that their craft is difficult and valuable. IT IS. But I do not believe that it is difficult because HTML and CSS are difficult to master, I believe its difficult because being a... | TITLE:
How hard is it to master semantic markup and good CSS?
QUESTION:
I know this won't be a popular question, because a lot of web designers want to assume that their craft is difficult and valuable. IT IS. But I do not believe that it is difficult because HTML and CSS are difficult to master, I believe its difficu... | [
"html",
"css"
] | 10 | 20 | 3,396 | 22 | 0 | 2008-10-13T18:35:49.930000 | 2008-10-13T20:35:28.143000 |
198,564 | 202,111 | How to configure Apache to work as proxy (load balancer) for j2ee server? | I have apache web server installed as frontend and I have j2ee SAP Netweaver Application Server installed in Intranet server. How can I configure apache to forward requests and response to/from j2ee app server. for example, external apache server's ip is 9.20.1.1:80. internal sap server's address is 192.168.0.1/sap/bc/... | You mentioned load balancing- so presumably you want to be able to add more Application Servers that are served through a single address. I hope they are stateless or storing session information in a database. You can use Apache to serve as a reverse proxy load balancer with mod_proxy_balancer. Docs are here. Here's an... | How to configure Apache to work as proxy (load balancer) for j2ee server? I have apache web server installed as frontend and I have j2ee SAP Netweaver Application Server installed in Intranet server. How can I configure apache to forward requests and response to/from j2ee app server. for example, external apache server... | TITLE:
How to configure Apache to work as proxy (load balancer) for j2ee server?
QUESTION:
I have apache web server installed as frontend and I have j2ee SAP Netweaver Application Server installed in Intranet server. How can I configure apache to forward requests and response to/from j2ee app server. for example, exte... | [
"apache",
"jakarta-ee",
"mod-proxy"
] | 6 | 4 | 8,774 | 3 | 0 | 2008-10-13T18:37:26.340000 | 2008-10-14T17:39:40.293000 |
198,568 | 198,680 | What is the simplest way to export Excel data to Matlab? | What is the simplest way to programmatically export Excel data to Matlab? | If you are running Matlab on Windows with Excel installed, try XLSREAD. | What is the simplest way to export Excel data to Matlab? What is the simplest way to programmatically export Excel data to Matlab? | TITLE:
What is the simplest way to export Excel data to Matlab?
QUESTION:
What is the simplest way to programmatically export Excel data to Matlab?
ANSWER:
If you are running Matlab on Windows with Excel installed, try XLSREAD. | [
"excel",
"matlab",
"export"
] | 7 | 7 | 5,837 | 5 | 0 | 2008-10-13T18:38:03.203000 | 2008-10-13T19:07:14.470000 |
198,577 | 198,651 | Real differences between "java -server" and "java -client"? | Is there any real practical difference between "java -server" and "java -client"? All I can find on Sun's site is a vague "-server starts slower but should run faster". What are the real differences? (Using JDK 1.6.0_07 currently.) | This is really linked to HotSpot and the default option values ( Java HotSpot VM Options ) which differ between client and server configuration. From Chapter 2 of the whitepaper ( The Java HotSpot Performance Engine Architecture ): The JDK includes two flavors of the VM -- a client-side offering, and a VM tuned for ser... | Real differences between "java -server" and "java -client"? Is there any real practical difference between "java -server" and "java -client"? All I can find on Sun's site is a vague "-server starts slower but should run faster". What are the real differences? (Using JDK 1.6.0_07 currently.) | TITLE:
Real differences between "java -server" and "java -client"?
QUESTION:
Is there any real practical difference between "java -server" and "java -client"? All I can find on Sun's site is a vague "-server starts slower but should run faster". What are the real differences? (Using JDK 1.6.0_07 currently.)
ANSWER:
T... | [
"java",
"jvm",
"jvm-hotspot"
] | 424 | 397 | 267,656 | 11 | 0 | 2008-10-13T18:40:13.260000 | 2008-10-13T18:57:45.393000 |
198,580 | 201,812 | What are optimal settings for Recycling of Application Pools in IIS7 in shared environment? | What are optimal settings for Recycling of Application Pools in IIS7 in a shared environment? | As a Hoster, you definitely want to recycle on Memory & Time, potentially Request limits and CPU. You want to be pretty aggressive about these limits, but make sure you publish them to your clients. Memory - 512 for an x86 box, maybe 768. For x64, you can set this much higher depending on the number of hosts per server... | What are optimal settings for Recycling of Application Pools in IIS7 in shared environment? What are optimal settings for Recycling of Application Pools in IIS7 in a shared environment? | TITLE:
What are optimal settings for Recycling of Application Pools in IIS7 in shared environment?
QUESTION:
What are optimal settings for Recycling of Application Pools in IIS7 in a shared environment?
ANSWER:
As a Hoster, you definitely want to recycle on Memory & Time, potentially Request limits and CPU. You want ... | [
"iis-7",
"application-pool",
"recycle"
] | 34 | 36 | 83,364 | 4 | 0 | 2008-10-13T18:41:04.850000 | 2008-10-14T16:08:02.053000 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.