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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
125,019 | 125,052 | Beginner looking for beautiful and instructional Python code | As a complete beginner with no programming experience, I am trying to find beautiful Python code to study and play with. Please answer by pointing to a website, a book or some software project. I have the following criterias: complete code listings (working, hackable code) beautiful code (highly readable, simple but ef... | Buy Programming Collective Intelligence. Great book of interesting AI algorithms based on mining data and all of the examples are in very easy to read Python. The other great book is Text Processing in Python | Beginner looking for beautiful and instructional Python code As a complete beginner with no programming experience, I am trying to find beautiful Python code to study and play with. Please answer by pointing to a website, a book or some software project. I have the following criterias: complete code listings (working, ... | TITLE:
Beginner looking for beautiful and instructional Python code
QUESTION:
As a complete beginner with no programming experience, I am trying to find beautiful Python code to study and play with. Please answer by pointing to a website, a book or some software project. I have the following criterias: complete code l... | [
"python"
] | 14 | 19 | 7,141 | 9 | 0 | 2008-09-24T02:11:05.323000 | 2008-09-24T02:20:16.457000 |
125,022 | 125,039 | Install PHP on XP / IIS 5.1? | I am trying to install PHP onto my development box (XP SP3 / IIS 5.1) I've got PHP 5.2.6 stable downloaded (the MSI installer package) and I am getting an error "Cannot find httpd.conf". After that the install seems to breeze by quickly (more quickly than I would have expected) and when I try to execute a simple PHP sc... | Not sure if you already have this but I use WAMP from http://www.wampserver.com/en It's easy and simple to set up, it has an icon in the system tray to show that its active and you can make it go online or available to the outside by clicking the icon and setting it. I used this when I was first learning PHP since it h... | Install PHP on XP / IIS 5.1? I am trying to install PHP onto my development box (XP SP3 / IIS 5.1) I've got PHP 5.2.6 stable downloaded (the MSI installer package) and I am getting an error "Cannot find httpd.conf". After that the install seems to breeze by quickly (more quickly than I would have expected) and when I t... | TITLE:
Install PHP on XP / IIS 5.1?
QUESTION:
I am trying to install PHP onto my development box (XP SP3 / IIS 5.1) I've got PHP 5.2.6 stable downloaded (the MSI installer package) and I am getting an error "Cannot find httpd.conf". After that the install seems to breeze by quickly (more quickly than I would have expe... | [
"php",
"windows-xp",
"installation",
"windows-installer"
] | 2 | 2 | 3,326 | 3 | 0 | 2008-09-24T02:11:34.933000 | 2008-09-24T02:17:21.830000 |
125,028 | 125,071 | Sending SVN commits to an RSS feed | So my favourite web tool, Subtlety, was recently discontinued, which means that I no longer have easy access to the commit logs of various SVN projects that I follow. Are there any other tools that easily pump out an RSS feed of commits for a public SVN repo? | I was going to suggest Trac as well, until I realized you probably don't have administrative control over the repositories in question. Perhaps this apparent solution will work for you? http://svnfeed.com/ It seems to work well for the one repository I tried it on, and it's surprisingly fast. | Sending SVN commits to an RSS feed So my favourite web tool, Subtlety, was recently discontinued, which means that I no longer have easy access to the commit logs of various SVN projects that I follow. Are there any other tools that easily pump out an RSS feed of commits for a public SVN repo? | TITLE:
Sending SVN commits to an RSS feed
QUESTION:
So my favourite web tool, Subtlety, was recently discontinued, which means that I no longer have easy access to the commit logs of various SVN projects that I follow. Are there any other tools that easily pump out an RSS feed of commits for a public SVN repo?
ANSWER... | [
"svn",
"rss"
] | 18 | 9 | 6,515 | 9 | 0 | 2008-09-24T02:13:25.600000 | 2008-09-24T02:24:52.093000 |
125,034 | 125,061 | What is the easiest, most concise way to make selected attributes in an instance be readonly? | In Python, I want to make selected instance attributes of a class be readonly to code outside of the class. I want there to be no way outside code can alter the attribute, except indirectly by invoking methods on the instance. I want the syntax to be concise. What is the best way? (I give my current best answer below..... | You should use the @property decorator. >>> class a(object):... def __init__(self, x):... self.x = x... @property... def xval(self):... return self.x... >>> b = a(5) >>> b.xval 5 >>> b.xval = 6 Traceback (most recent call last): File " ", line 1, in AttributeError: can't set attribute | What is the easiest, most concise way to make selected attributes in an instance be readonly? In Python, I want to make selected instance attributes of a class be readonly to code outside of the class. I want there to be no way outside code can alter the attribute, except indirectly by invoking methods on the instance.... | TITLE:
What is the easiest, most concise way to make selected attributes in an instance be readonly?
QUESTION:
In Python, I want to make selected instance attributes of a class be readonly to code outside of the class. I want there to be no way outside code can alter the attribute, except indirectly by invoking method... | [
"python",
"attributes",
"readonly"
] | 8 | 7 | 433 | 6 | 0 | 2008-09-24T02:15:21.430000 | 2008-09-24T02:22:16.967000 |
125,050 | 125,337 | What's the difference between Polymorphism and Multiple Dispatch? | ...or are they the same thing? I notice that each has its own Wikipedia entry: Polymorphism, Multiple Dispatch, but I'm having trouble seeing how the concepts differ. Edit: And how does Overloading fit into all this? | Polymorphism is the facility that allows a language/program to make decisions during runtime on which method to invoke based on the types of the parameters sent to that method. The number of parameters used by the language/runtime determines the 'type' of polymorphism supported by a language. Single dispatch is a type ... | What's the difference between Polymorphism and Multiple Dispatch? ...or are they the same thing? I notice that each has its own Wikipedia entry: Polymorphism, Multiple Dispatch, but I'm having trouble seeing how the concepts differ. Edit: And how does Overloading fit into all this? | TITLE:
What's the difference between Polymorphism and Multiple Dispatch?
QUESTION:
...or are they the same thing? I notice that each has its own Wikipedia entry: Polymorphism, Multiple Dispatch, but I'm having trouble seeing how the concepts differ. Edit: And how does Overloading fit into all this?
ANSWER:
Polymorphi... | [
"oop",
"polymorphism",
"multiple-dispatch",
"double-dispatch"
] | 35 | 55 | 10,856 | 7 | 0 | 2008-09-24T02:20:08.923000 | 2008-09-24T03:53:47.043000 |
125,081 | 125,332 | What is the worst project failure you've ever been on? | Most importantly, why did it fail? What I'm looking for here is pathologies that anyone, whether new to the team or just waking up one day,can spot. | Read ' Death March '. That pretty much sums up pathologies etc. | What is the worst project failure you've ever been on? Most importantly, why did it fail? What I'm looking for here is pathologies that anyone, whether new to the team or just waking up one day,can spot. | TITLE:
What is the worst project failure you've ever been on?
QUESTION:
Most importantly, why did it fail? What I'm looking for here is pathologies that anyone, whether new to the team or just waking up one day,can spot.
ANSWER:
Read ' Death March '. That pretty much sums up pathologies etc. | [
"project-management"
] | 0 | 4 | 727 | 3 | 0 | 2008-09-24T02:27:42.897000 | 2008-09-24T03:52:44.987000 |
125,094 | 125,454 | Transparently swapping pointers to character arrays in C++ | I have a 2D character array: char nm[MAX1][MAX2] = { "john", "bob", "david" }; I want to swap two of these elements (without std::swap ) by simply writing swapPointers(nm[0], nm[1]); where swapPointers looks like this void swapPointers(char *&a, char *&b) { char *temp = a; a = b; b = a; } However, this does not compile... | Zan is close, but his problem is that his 'swap' function can take any pointer to characters. This can cause problems if misused. Here is a safer version: void swap(char (&x)[MAX2], char (&y)[MAX2]) { char temp[MAX2];
memcpy(temp, x, MAX2); memcpy(x, y, MAX2); memcpy(y, temp, MAX2); } There is also a misunderstanding ... | Transparently swapping pointers to character arrays in C++ I have a 2D character array: char nm[MAX1][MAX2] = { "john", "bob", "david" }; I want to swap two of these elements (without std::swap ) by simply writing swapPointers(nm[0], nm[1]); where swapPointers looks like this void swapPointers(char *&a, char *&b) { cha... | TITLE:
Transparently swapping pointers to character arrays in C++
QUESTION:
I have a 2D character array: char nm[MAX1][MAX2] = { "john", "bob", "david" }; I want to swap two of these elements (without std::swap ) by simply writing swapPointers(nm[0], nm[1]); where swapPointers looks like this void swapPointers(char *&... | [
"c++",
"pointers"
] | 2 | 4 | 5,244 | 5 | 0 | 2008-09-24T02:34:16.203000 | 2008-09-24T04:44:46.623000 |
125,096 | 217,452 | Can I turn off impersonation just in a couple instances | I have an app that has impersonation used throughout. But when a user is logged in as an admin, a few operation require them to write to the server itself. Now if these users do not have rights on the actual server (some don't) it will not let them write. What I want to do is turn off impersonation for just a couple co... | Make sure the Application Pool do have the proper rights that you need. Then, when you want to revert to the application pool identity... run the following: private WindowsImpersonationContext context = null; public void RevertToAppPool() { try { if (!WindowsIdentity.GetCurrent().IsSystem) { context = WindowsIdentity.I... | Can I turn off impersonation just in a couple instances I have an app that has impersonation used throughout. But when a user is logged in as an admin, a few operation require them to write to the server itself. Now if these users do not have rights on the actual server (some don't) it will not let them write. What I w... | TITLE:
Can I turn off impersonation just in a couple instances
QUESTION:
I have an app that has impersonation used throughout. But when a user is logged in as an admin, a few operation require them to write to the server itself. Now if these users do not have rights on the actual server (some don't) it will not let th... | [
"c#",
"asp.net",
"impersonation"
] | 19 | 24 | 14,112 | 4 | 0 | 2008-09-24T02:34:40.477000 | 2008-10-20T03:25:02.403000 |
125,102 | 125,122 | Adding New Element to Text Substring | Say I have the following string: "I am the most foo h4ck3r ever!!" I'm trying to write a makeSpecial(foo) function where the foo substring would be wrapped in a new span element, resulting in: "I am the most foo> h4ck3r ever!!" BeautifulSoup seemed like the way to go, but I haven't been able to make it work. I could al... | How about this: Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> def makeSpecial(mystring, special_substr):... return mystring.replace(special_substr, ' %s ' % special_substr)... >>> makeSpecial("I am the mos... | Adding New Element to Text Substring Say I have the following string: "I am the most foo h4ck3r ever!!" I'm trying to write a makeSpecial(foo) function where the foo substring would be wrapped in a new span element, resulting in: "I am the most foo> h4ck3r ever!!" BeautifulSoup seemed like the way to go, but I haven't ... | TITLE:
Adding New Element to Text Substring
QUESTION:
Say I have the following string: "I am the most foo h4ck3r ever!!" I'm trying to write a makeSpecial(foo) function where the foo substring would be wrapped in a new span element, resulting in: "I am the most foo> h4ck3r ever!!" BeautifulSoup seemed like the way to ... | [
"javascript",
"jquery",
"python",
"beautifulsoup"
] | 2 | 3 | 483 | 3 | 0 | 2008-09-24T02:37:49.427000 | 2008-09-24T02:46:54.350000 |
125,107 | 127,045 | Where can I find a template for documentation about server-side installation of software? | I'm looking for a good template on server-side installation of software for a project I'm working on. The client-side is pretty straight-forward. The server-side installation is a little trickier. It is made up of several pieces (services, database connections, dependencies, ports that need to be unblocked, etc.). Duri... | What should be tested? Well, in the case of a web site, "can you get to the page?" Include a URL as a starting point and let the admin click through to a certain point. It is not necessary for the admin to go through the whole QA cycle, just a confirmation that what you meant to be deployed is really what got deployed.... | Where can I find a template for documentation about server-side installation of software? I'm looking for a good template on server-side installation of software for a project I'm working on. The client-side is pretty straight-forward. The server-side installation is a little trickier. It is made up of several pieces (... | TITLE:
Where can I find a template for documentation about server-side installation of software?
QUESTION:
I'm looking for a good template on server-side installation of software for a project I'm working on. The client-side is pretty straight-forward. The server-side installation is a little trickier. It is made up o... | [
"installation",
"documentation"
] | 0 | 0 | 445 | 3 | 0 | 2008-09-24T02:40:10.840000 | 2008-09-24T13:13:37.260000 |
125,113 | 125,125 | PHP code to convert a MySQL query to CSV | What is the most efficient way to convert a MySQL query to CSV in PHP please? It would be best to avoid temp files as this reduces portability (dir paths and setting file-system permissions required). The CSV should also include one top line of field names. | SELECT * INTO OUTFILE "c:/mydata.csv" FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY "\n" FROM my_table; ( the documentation for this is here: http://dev.mysql.com/doc/refman/5.0/en/select.html ) or: $select = "SELECT * FROM table_name";
$export = mysql_query ( $select ) or die ( "Sql error: "... | PHP code to convert a MySQL query to CSV What is the most efficient way to convert a MySQL query to CSV in PHP please? It would be best to avoid temp files as this reduces portability (dir paths and setting file-system permissions required). The CSV should also include one top line of field names. | TITLE:
PHP code to convert a MySQL query to CSV
QUESTION:
What is the most efficient way to convert a MySQL query to CSV in PHP please? It would be best to avoid temp files as this reduces portability (dir paths and setting file-system permissions required). The CSV should also include one top line of field names.
AN... | [
"php",
"mysql",
"csv"
] | 137 | 141 | 256,550 | 6 | 0 | 2008-09-24T02:42:46.387000 | 2008-09-24T02:47:44.113000 |
125,117 | 125,128 | Rounded corners, is this Mozilla specific? | I was looking at how some site implemented rounded corners, and the CSS had these odd tags that I've never really seen before. -moz-border-radius-topright: 5px; -webkit-border-top-right-radius: 5px; -moz-border-radius-bottomright: 5px; -webkit-border-bottom-right-radius: 5px; I googled it, and they seem to be Firefox s... | The -moz-* properties are Gecko-only (Firefox, Mozilla, Camino), the -webkit-* properties are WebKit-only (Chrome, Safari, Epiphany). Vendor-specific prefixes are common for implementing CSS capabilities that have not yet been standardized by the W3C. Twitter's not "alienating" their IE users. There's simply adding sty... | Rounded corners, is this Mozilla specific? I was looking at how some site implemented rounded corners, and the CSS had these odd tags that I've never really seen before. -moz-border-radius-topright: 5px; -webkit-border-top-right-radius: 5px; -moz-border-radius-bottomright: 5px; -webkit-border-bottom-right-radius: 5px; ... | TITLE:
Rounded corners, is this Mozilla specific?
QUESTION:
I was looking at how some site implemented rounded corners, and the CSS had these odd tags that I've never really seen before. -moz-border-radius-topright: 5px; -webkit-border-top-right-radius: 5px; -moz-border-radius-bottomright: 5px; -webkit-border-bottom-r... | [
"css"
] | 1 | 8 | 677 | 5 | 0 | 2008-09-24T02:45:59.717000 | 2008-09-24T02:48:11.117000 |
125,124 | 125,225 | C++ Passing Options To Executable | How do you pass options to an executable? Is there an easier way than making the options boolean arguments? EDIT: The last two answers have suggested using arguments. I know I can code a workable solution like that, but I'd rather have them be options. EDIT2: Per requests for clarification, I'll use this simple example... | You seem to think that there is some fundamental difference between "options" that start with " -- " and "arguments" that don't. The only difference is in how you parse them. It might be worth your time to look at GNU's getopt() / getopt_long() option parser. It supports passing arguments with options such as --number-... | C++ Passing Options To Executable How do you pass options to an executable? Is there an easier way than making the options boolean arguments? EDIT: The last two answers have suggested using arguments. I know I can code a workable solution like that, but I'd rather have them be options. EDIT2: Per requests for clarifica... | TITLE:
C++ Passing Options To Executable
QUESTION:
How do you pass options to an executable? Is there an easier way than making the options boolean arguments? EDIT: The last two answers have suggested using arguments. I know I can code a workable solution like that, but I'd rather have them be options. EDIT2: Per requ... | [
"c++",
"arguments"
] | 3 | 4 | 1,964 | 8 | 0 | 2008-09-24T02:47:23.910000 | 2008-09-24T03:16:49.567000 |
125,143 | 403,108 | WYSIWYG HTML Editor for Windows Mobile forms app | I am developing a forms app (not web) for Windows Mobile, using.NET CF 3.5. I need an HTML editor control. I'm looking for something along the lines of a simple FCKEditor, but for using in a forms app (EXE). Any suggestions? | Pocket IE (the web browser included with Windows Mobile) is about as powerful as Netscape 2... without the Javascript support. So using a browser-based HTML editor isn't going to work with it. Opera has most of the power of the desktop version (including DOM and Javascript support), but I'm not sure it has an enbedding... | WYSIWYG HTML Editor for Windows Mobile forms app I am developing a forms app (not web) for Windows Mobile, using.NET CF 3.5. I need an HTML editor control. I'm looking for something along the lines of a simple FCKEditor, but for using in a forms app (EXE). Any suggestions? | TITLE:
WYSIWYG HTML Editor for Windows Mobile forms app
QUESTION:
I am developing a forms app (not web) for Windows Mobile, using.NET CF 3.5. I need an HTML editor control. I'm looking for something along the lines of a simple FCKEditor, but for using in a forms app (EXE). Any suggestions?
ANSWER:
Pocket IE (the web ... | [
"windows-mobile",
"compact-framework",
"wysiwyg"
] | 2 | 1 | 2,209 | 3 | 0 | 2008-09-24T02:51:29.080000 | 2008-12-31T14:44:22.400000 |
125,146 | 125,179 | Long running ruby process that uses ActiveRecord to store records in a database | I'm trying to write an app using Ruby on Rails and I'm trying to achieve the following: The app needs to receive UDP messages coming in on a specific port (possibly 1 or more per second) and store them in the database so that the rest of my Rails app can access it. I was thinking of writing a separate daemon that would... | You definitely don't want to load the Rails stack for each incoming request -- that would be way too slow; you'll want to use something lower-level to handle the incoming connections. You might look at the internals of Webrick to see a simple server daemon coded in ruby -- or, if you want something more performant, loo... | Long running ruby process that uses ActiveRecord to store records in a database I'm trying to write an app using Ruby on Rails and I'm trying to achieve the following: The app needs to receive UDP messages coming in on a specific port (possibly 1 or more per second) and store them in the database so that the rest of my... | TITLE:
Long running ruby process that uses ActiveRecord to store records in a database
QUESTION:
I'm trying to write an app using Ruby on Rails and I'm trying to achieve the following: The app needs to receive UDP messages coming in on a specific port (possibly 1 or more per second) and store them in the database so t... | [
"ruby-on-rails",
"ruby"
] | 2 | 3 | 575 | 2 | 0 | 2008-09-24T02:52:05.803000 | 2008-09-24T03:02:23.017000 |
125,171 | 125,266 | Passing a regex substitution as a variable in Perl | I need to pass a regex substitution as a variable: sub proc { my $pattern = shift; my $txt = "foo baz";
$txt =~ $pattern; }
my $pattern = 's/foo/bar/'; proc($pattern); This, of course, doesn't work. I tried eval'ing the substitution: eval("$txt =~ $pattern;"); but that didn't work either. What horribly obvious thing ... | I need to pass a regex substitution as a variable Do you? Why not pass a code reference? Example: sub modify { my($text, $code) = @_; $code->($text); return $text; }
my $new_text = modify('foo baz', sub { $_[0] =~ s/foo/bar/ }); In general, when you want to pass "something that does something" to a subroutine ("a rege... | Passing a regex substitution as a variable in Perl I need to pass a regex substitution as a variable: sub proc { my $pattern = shift; my $txt = "foo baz";
$txt =~ $pattern; }
my $pattern = 's/foo/bar/'; proc($pattern); This, of course, doesn't work. I tried eval'ing the substitution: eval("$txt =~ $pattern;"); but th... | TITLE:
Passing a regex substitution as a variable in Perl
QUESTION:
I need to pass a regex substitution as a variable: sub proc { my $pattern = shift; my $txt = "foo baz";
$txt =~ $pattern; }
my $pattern = 's/foo/bar/'; proc($pattern); This, of course, doesn't work. I tried eval'ing the substitution: eval("$txt =~ $... | [
"regex",
"perl"
] | 24 | 32 | 31,126 | 9 | 0 | 2008-09-24T03:00:42.443000 | 2008-09-24T03:30:35.273000 |
125,177 | 125,256 | What's a good tool to screen-scrape with Javascript support? | Is there a good test suite or tool set that can automate website navigation -- with Javascript support -- and collect the HTML from the pages? Of course I can scrape straight HTML with BeautifulSoup. But this does me no good for sites that require Javascript.:) | You could use Selenium or Watir to drive a real browser. Ther are also some JavaScript-based headless browsers: PhantomJS is a headless Webkit browser. pjscrape is a scraping framework based on PhantomJS and jQuery. CasperJS is a navigation scripting & testing utility bsaed on PhantomJS, if you need to do a little more... | What's a good tool to screen-scrape with Javascript support? Is there a good test suite or tool set that can automate website navigation -- with Javascript support -- and collect the HTML from the pages? Of course I can scrape straight HTML with BeautifulSoup. But this does me no good for sites that require Javascript.... | TITLE:
What's a good tool to screen-scrape with Javascript support?
QUESTION:
Is there a good test suite or tool set that can automate website navigation -- with Javascript support -- and collect the HTML from the pages? Of course I can scrape straight HTML with BeautifulSoup. But this does me no good for sites that r... | [
"javascript",
"screen-scraping"
] | 28 | 26 | 27,211 | 8 | 0 | 2008-09-24T03:01:46.187000 | 2008-09-24T03:27:21.320000 |
125,188 | 125,261 | Does Postscript have a concept of a table? | What I'm trying to achieve is to determine if the Postscript that I'm parsing contains any element that resides in a table (box). Im asking whether if it had a built-in way to lay out tabular data on the page. My guess is that postscript doesnt have a concept of a table, cos I couldnt find it anywhere in the spec. The ... | Sounds like you are trying to draw something and test if any part of draws within some specified box. You can create a path for the thing to be tested (just don't stroke or fill it), and create another path for the box (e.g. a table cell). Leave these two paths on the stack, and use one of the operators inufill, inustr... | Does Postscript have a concept of a table? What I'm trying to achieve is to determine if the Postscript that I'm parsing contains any element that resides in a table (box). Im asking whether if it had a built-in way to lay out tabular data on the page. My guess is that postscript doesnt have a concept of a table, cos I... | TITLE:
Does Postscript have a concept of a table?
QUESTION:
What I'm trying to achieve is to determine if the Postscript that I'm parsing contains any element that resides in a table (box). Im asking whether if it had a built-in way to lay out tabular data on the page. My guess is that postscript doesnt have a concept... | [
"pdf",
"postscript"
] | 2 | 3 | 1,972 | 3 | 0 | 2008-09-24T03:03:52.983000 | 2008-09-24T03:28:40.067000 |
125,190 | 137,138 | Any quirks I should be aware of in Drupal's XML-RPC and BlogAPI implementations? | I'm beginning work on a project that will access a Drupal site to create (and eventually edit) nodes on the site, via the XML-RPC facility and BlogAPI module shipped with Drupal. This includes file uploading, as the project is to allow people to upload pictures en mass to a Drupal site with minimal ado. What I'd like t... | While the XML-RPC facility is pretty stable and works well, the BlogAPI module has various issues, especially with discovery, that make using it for anything but regular blogs painful. Currently, there is no use of blogIds in the generated Really Simple Discovery document (of which only one exists for a site) or for th... | Any quirks I should be aware of in Drupal's XML-RPC and BlogAPI implementations? I'm beginning work on a project that will access a Drupal site to create (and eventually edit) nodes on the site, via the XML-RPC facility and BlogAPI module shipped with Drupal. This includes file uploading, as the project is to allow peo... | TITLE:
Any quirks I should be aware of in Drupal's XML-RPC and BlogAPI implementations?
QUESTION:
I'm beginning work on a project that will access a Drupal site to create (and eventually edit) nodes on the site, via the XML-RPC facility and BlogAPI module shipped with Drupal. This includes file uploading, as the proje... | [
"php",
"drupal",
"file-upload",
"xml-rpc",
"blogs"
] | 1 | 1 | 993 | 1 | 0 | 2008-09-24T03:04:24.337000 | 2008-09-26T00:38:37.167000 |
125,222 | 125,386 | extracting text from MS word files in python | for working with MS word files in python, there is python win32 extensions, which can be used in windows. How do I do the same in linux? Is there any library? | You could make a subprocess call to antiword. Antiword is a linux commandline utility for dumping text out of a word doc. Works pretty well for simple documents (obviously it loses formatting). It's available through apt, and probably as RPM, or you could compile it yourself. | extracting text from MS word files in python for working with MS word files in python, there is python win32 extensions, which can be used in windows. How do I do the same in linux? Is there any library? | TITLE:
extracting text from MS word files in python
QUESTION:
for working with MS word files in python, there is python win32 extensions, which can be used in windows. How do I do the same in linux? Is there any library?
ANSWER:
You could make a subprocess call to antiword. Antiword is a linux commandline utility for... | [
"python",
"linux",
"ms-word"
] | 32 | 22 | 70,351 | 15 | 0 | 2008-09-24T03:15:13.627000 | 2008-09-24T04:13:03.270000 |
125,230 | 125,249 | MySQL search and replace some text in a field | What MySQL query will do a text search and replace in one particular field in a table? I.e. search for foo and replace with bar so a record with a field with the value hello foo becomes hello bar. | Change table_name and field to match your table name and field in question: UPDATE table_name SET field = REPLACE(field, 'foo', 'bar') WHERE INSTR(field, 'foo') > 0; REPLACE (string functions) INSTR (string functions) | MySQL search and replace some text in a field What MySQL query will do a text search and replace in one particular field in a table? I.e. search for foo and replace with bar so a record with a field with the value hello foo becomes hello bar. | TITLE:
MySQL search and replace some text in a field
QUESTION:
What MySQL query will do a text search and replace in one particular field in a table? I.e. search for foo and replace with bar so a record with a field with the value hello foo becomes hello bar.
ANSWER:
Change table_name and field to match your table na... | [
"mysql",
"sql",
"search",
"replace"
] | 301 | 553 | 249,788 | 7 | 0 | 2008-09-24T03:18:13.447000 | 2008-09-24T03:23:46.867000 |
125,245 | 125,251 | Is there an equivalent to Ctrl-Shift-R in Safari/WebKit? | Something that would really reload the page or resource, ignoring whatever might be in cache. | Safari always reloads (ctrl+r) a page ignoring whatever that might be in the cache. As Athena points out, iframes are cached. It's actually not the iframe content, but the request that's cached. In those cases, Safari caches the page, and then no matter which link you click, shows the iframe from the last click BEFORE ... | Is there an equivalent to Ctrl-Shift-R in Safari/WebKit? Something that would really reload the page or resource, ignoring whatever might be in cache. | TITLE:
Is there an equivalent to Ctrl-Shift-R in Safari/WebKit?
QUESTION:
Something that would really reload the page or resource, ignoring whatever might be in cache.
ANSWER:
Safari always reloads (ctrl+r) a page ignoring whatever that might be in the cache. As Athena points out, iframes are cached. It's actually no... | [
"caching",
"safari",
"webkit"
] | 2 | 5 | 4,496 | 1 | 0 | 2008-09-24T03:23:20.487000 | 2008-09-24T03:24:35.570000 |
125,262 | 195,043 | Is there a way to validate hAtom microformat? | I have implemented hAtom microformat on my blog. At least, I think I have, but I can't find any validator (or any software that uses hAtom) in order to determine if I have done this correctly. A Google search for "hatom validator" currently doesn't return anything useful. Does anyone know of a way to confirm that it is... | Convert it to Atom, validate Atom and manually check if it contains all data you expected. There's open-source hCard validator. Maybe someone could adapt it to validate hAtom as well… | Is there a way to validate hAtom microformat? I have implemented hAtom microformat on my blog. At least, I think I have, but I can't find any validator (or any software that uses hAtom) in order to determine if I have done this correctly. A Google search for "hatom validator" currently doesn't return anything useful. D... | TITLE:
Is there a way to validate hAtom microformat?
QUESTION:
I have implemented hAtom microformat on my blog. At least, I think I have, but I can't find any validator (or any software that uses hAtom) in order to determine if I have done this correctly. A Google search for "hatom validator" currently doesn't return ... | [
"validation",
"microformats"
] | 6 | 0 | 1,091 | 3 | 0 | 2008-09-24T03:28:49.553000 | 2008-10-12T03:11:20.063000 |
125,265 | 127,522 | How does Perl 6 evaluate truthiness? | In reading about Perl 6, I see a feature being trumpeted about, where you no longer have to do: return "0 but true";...but can instead do: return 0 but True; If that's the case, how does truth work in Perl 6? In Perl 5, it was pretty simple: 0, "", and undef are false, everything else is true. What are the rules in Per... | So to combine what I think to be the best of everyone's answers: When you evaluate a variable in boolean context, its.true() method gets called. The default.true() method used by an object does a Perl 5-style <0, "", undef> check of the object's value, but when you say "but True" or "but False", this method is overridd... | How does Perl 6 evaluate truthiness? In reading about Perl 6, I see a feature being trumpeted about, where you no longer have to do: return "0 but true";...but can instead do: return 0 but True; If that's the case, how does truth work in Perl 6? In Perl 5, it was pretty simple: 0, "", and undef are false, everything el... | TITLE:
How does Perl 6 evaluate truthiness?
QUESTION:
In reading about Perl 6, I see a feature being trumpeted about, where you no longer have to do: return "0 but true";...but can instead do: return 0 but True; If that's the case, how does truth work in Perl 6? In Perl 5, it was pretty simple: 0, "", and undef are fa... | [
"raku",
"truthiness"
] | 27 | 3 | 1,156 | 6 | 0 | 2008-09-24T03:30:00.190000 | 2008-09-24T14:28:45.097000 |
125,268 | 125,388 | Chaining Static Methods in PHP? | Is it possible to chain static methods together using a static class? Say I wanted to do something like this: $value = TestClass::toValue(5)::add(3)::subtract(2)::add(8)::result();... and obviously I would want $value to be assigned the number 14. Is this possible? Update: It doesn't work (you can't return "self" - it'... | I like the solution provided by Camilo above, essentially since all you're doing is altering the value of a static member, and since you do want chaining (even though it's only syntatic sugar), then instantiating TestClass is probably the best way to go. I'd suggest a Singleton pattern if you want to restrict instantia... | Chaining Static Methods in PHP? Is it possible to chain static methods together using a static class? Say I wanted to do something like this: $value = TestClass::toValue(5)::add(3)::subtract(2)::add(8)::result();... and obviously I would want $value to be assigned the number 14. Is this possible? Update: It doesn't wor... | TITLE:
Chaining Static Methods in PHP?
QUESTION:
Is it possible to chain static methods together using a static class? Say I wanted to do something like this: $value = TestClass::toValue(5)::add(3)::subtract(2)::add(8)::result();... and obviously I would want $value to be assigned the number 14. Is this possible? Upda... | [
"php",
"oop",
"method-chaining"
] | 63 | 60 | 35,086 | 17 | 0 | 2008-09-24T03:32:13.147000 | 2008-09-24T04:13:20.663000 |
125,269 | 125,312 | How would you handle users who don't read dialog boxes? | A recent article on Ars Technica discusses a recent study performed by the Psychology Department of North Carolina State University, that showed users have a tendency to do whatever it takes to get rid of a dialog box to get back to their task at hand. Most of them would click OK or yes, minimize the dialog, or close t... | I try to design applications to be robust in the face of accidents -- either slips (inadvertent operations, such as clicking in the wrong place) or mistakes (cognitive errors, such as clicking Ok vs. Cancel on a dialog). Some ways to do this are: infinite (or at least multi-step) undo / redo integrate documentation wit... | How would you handle users who don't read dialog boxes? A recent article on Ars Technica discusses a recent study performed by the Psychology Department of North Carolina State University, that showed users have a tendency to do whatever it takes to get rid of a dialog box to get back to their task at hand. Most of the... | TITLE:
How would you handle users who don't read dialog boxes?
QUESTION:
A recent article on Ars Technica discusses a recent study performed by the Psychology Department of North Carolina State University, that showed users have a tendency to do whatever it takes to get rid of a dialog box to get back to their task at... | [
"user-interface",
"dialog"
] | 29 | 34 | 1,905 | 22 | 0 | 2008-09-24T03:32:20.653000 | 2008-09-24T03:46:02.740000 |
125,272 | 125,301 | What's the easiest way to commit and push a single file while leaving other modifications alone? | I'm relatively new to Mercurial and my team is trying it out right now as a replacement for Subversion. How can I commit and push a single file out to another repository while leaving other modifications in my working directory uncommitted (or at least not pushed to the other repository)? This happens for us with datab... | There's a Mercurial feature that implements shelve and unshelve commands, which give you an interactive way to specify changes to store away until a later time: Shelve. Then you can hg shelve and hg unshelve to temporarily store changes away. It lets you work at the "patch hunk" level to pick and choose the items to sh... | What's the easiest way to commit and push a single file while leaving other modifications alone? I'm relatively new to Mercurial and my team is trying it out right now as a replacement for Subversion. How can I commit and push a single file out to another repository while leaving other modifications in my working direc... | TITLE:
What's the easiest way to commit and push a single file while leaving other modifications alone?
QUESTION:
I'm relatively new to Mercurial and my team is trying it out right now as a replacement for Subversion. How can I commit and push a single file out to another repository while leaving other modifications i... | [
"version-control",
"mercurial",
"merge",
"push"
] | 72 | 31 | 39,235 | 6 | 0 | 2008-09-24T03:33:09.510000 | 2008-09-24T03:41:32.393000 |
125,281 | 125,340 | How do I remove the file suffix and path portion from a path string in Bash? | Given a string file path such as /foo/fizzbuzz.bar, how would I use bash to extract just the fizzbuzz portion of said string? | Here's how to do it with the # and % operators in Bash. $ x="/foo/fizzbuzz.bar" $ y=${x%.bar} $ echo ${y##*/} fizzbuzz ${x%.bar} could also be ${x%.*} to remove everything after a dot or ${x%%.*} to remove everything after the first dot. Example: $ x="/foo/fizzbuzz.bar.quux" $ y=${x%.*} $ echo $y /foo/fizzbuzz.bar $ y=... | How do I remove the file suffix and path portion from a path string in Bash? Given a string file path such as /foo/fizzbuzz.bar, how would I use bash to extract just the fizzbuzz portion of said string? | TITLE:
How do I remove the file suffix and path portion from a path string in Bash?
QUESTION:
Given a string file path such as /foo/fizzbuzz.bar, how would I use bash to extract just the fizzbuzz portion of said string?
ANSWER:
Here's how to do it with the # and % operators in Bash. $ x="/foo/fizzbuzz.bar" $ y=${x%.b... | [
"string",
"bash",
"filenames"
] | 539 | 775 | 497,212 | 15 | 0 | 2008-09-24T03:37:00.517000 | 2008-09-24T03:54:28.167000 |
125,308 | 128,260 | How can I associate a scriptable Mozilla plugin instance with its NObject? | I'm running into a problem associating an invoked method in a plugin I'm writing with the appropriate plugin instance. The documentation at http://developer.mozilla.org/en/Gecko_Plugin_API_Reference/Scripting_plugins doesn't give enough information to be truly useful on this. In a nutshell, I'm trying to understand jus... | I guess I'm answering my own question... The solution I found (and I would still appreciate comments on its validity, especially if you think there's a better way of doing it) was to allocate an NPObject derived structure which has a pointer to my implementation class in the allocate() function I expose to Firefox from... | How can I associate a scriptable Mozilla plugin instance with its NObject? I'm running into a problem associating an invoked method in a plugin I'm writing with the appropriate plugin instance. The documentation at http://developer.mozilla.org/en/Gecko_Plugin_API_Reference/Scripting_plugins doesn't give enough informat... | TITLE:
How can I associate a scriptable Mozilla plugin instance with its NObject?
QUESTION:
I'm running into a problem associating an invoked method in a plugin I'm writing with the appropriate plugin instance. The documentation at http://developer.mozilla.org/en/Gecko_Plugin_API_Reference/Scripting_plugins doesn't gi... | [
"firefox",
"plugins",
"npapi"
] | 1 | 1 | 1,082 | 1 | 0 | 2008-09-24T03:43:15.400000 | 2008-09-24T16:39:29.137000 |
125,319 | 151,560 | Should 'using' directives be inside or outside the namespace in C#? | I have been running StyleCop over some C# code, and it keeps reporting that my using directives should be inside the namespace. Is there a technical reason for putting the using directives inside instead of outside the namespace? | There is actually a (subtle) difference between the two. Imagine you have the following code in File1.cs: // File1.cs using System; namespace Outer.Inner { class Foo { static void Bar() { double d = Math.PI; } } } Now imagine that someone adds another file (File2.cs) to the project that looks like this: // File2.cs nam... | Should 'using' directives be inside or outside the namespace in C#? I have been running StyleCop over some C# code, and it keeps reporting that my using directives should be inside the namespace. Is there a technical reason for putting the using directives inside instead of outside the namespace? | TITLE:
Should 'using' directives be inside or outside the namespace in C#?
QUESTION:
I have been running StyleCop over some C# code, and it keeps reporting that my using directives should be inside the namespace. Is there a technical reason for putting the using directives inside instead of outside the namespace?
ANS... | [
"c#",
".net",
"namespaces",
"stylecop",
"code-organization"
] | 2,406 | 2,396 | 280,264 | 15 | 0 | 2008-09-24T03:49:50.173000 | 2008-09-30T02:33:54.337000 |
125,333 | 125,354 | How to implement simple threading with a fixed number of worker threads | I'm looking for the simplest, most straightforward way to implement the following: The main program instantiates worker threads to do a task. Only n tasks can be running at once. When n is reached, no more workers are started until the count of running threads drops back below n. | I think that Executors.newFixedThreadPool fits your requirements. There are a number of different ways to use the resulting ExecutorService, depending on whether you want a result returned to the main thread, or whether the task is totally self-contained, and whether you have a collection of tasks to perform up front, ... | How to implement simple threading with a fixed number of worker threads I'm looking for the simplest, most straightforward way to implement the following: The main program instantiates worker threads to do a task. Only n tasks can be running at once. When n is reached, no more workers are started until the count of run... | TITLE:
How to implement simple threading with a fixed number of worker threads
QUESTION:
I'm looking for the simplest, most straightforward way to implement the following: The main program instantiates worker threads to do a task. Only n tasks can be running at once. When n is reached, no more workers are started unti... | [
"java",
"multithreading",
"concurrency"
] | 50 | 56 | 27,381 | 7 | 0 | 2008-09-24T03:52:45.253000 | 2008-09-24T04:00:24.080000 |
125,341 | 125,356 | How do you do Impersonation in .NET? | Is there a simple out of the box way to impersonate a user in.NET? So far I've been using this class from code project for all my impersonation requirements. Is there a better way to do it by using.NET Framework? I have a user credential set, (username, password, domain name) which represents the identity I need to imp... | Here is some good overview of.NET impersonation concepts. Michiel van Otegem: WindowsImpersonationContext made easy WindowsIdentity.Impersonate Method (check out the code samples) Basically you will be leveraging these classes that are out of the box in the.NET framework: WindowsImpersonationContext WindowsIdentity The... | How do you do Impersonation in .NET? Is there a simple out of the box way to impersonate a user in.NET? So far I've been using this class from code project for all my impersonation requirements. Is there a better way to do it by using.NET Framework? I have a user credential set, (username, password, domain name) which ... | TITLE:
How do you do Impersonation in .NET?
QUESTION:
Is there a simple out of the box way to impersonate a user in.NET? So far I've been using this class from code project for all my impersonation requirements. Is there a better way to do it by using.NET Framework? I have a user credential set, (username, password, d... | [
"c#",
".net",
"impersonation"
] | 156 | 63 | 322,311 | 7 | 0 | 2008-09-24T03:55:09.147000 | 2008-09-24T04:01:16.917000 |
125,359 | 126,017 | Any clever ways of handling the context in a web app? | In Java, web apps are bundled in to WARs. By default, many servlet containers will use the WAR name as the context name for the application. Thus myapp.war gets deployed to http://example.com/myapp. The problem is that the webapp considers its "root" to be, well, "root", or simply "/", whereas HTML would consider the r... | You can use JSTL for creating urls. For example, will prefix the context root. With CSS, this usually isn't an issue for me. I have a web root structure like this: /css /images In the CSS file, you then just need to use relative URLs (../images/header.jpg) and it doesn't need to be aware of the context root. As for Jav... | Any clever ways of handling the context in a web app? In Java, web apps are bundled in to WARs. By default, many servlet containers will use the WAR name as the context name for the application. Thus myapp.war gets deployed to http://example.com/myapp. The problem is that the webapp considers its "root" to be, well, "r... | TITLE:
Any clever ways of handling the context in a web app?
QUESTION:
In Java, web apps are bundled in to WARs. By default, many servlet containers will use the WAR name as the context name for the application. Thus myapp.war gets deployed to http://example.com/myapp. The problem is that the webapp considers its "roo... | [
"java",
"jsp",
"servlets",
"contextpath"
] | 39 | 24 | 26,878 | 13 | 0 | 2008-09-24T04:02:20.330000 | 2008-09-24T08:24:51.090000 |
125,367 | 125,379 | Dynamic type languages versus static type languages | What are the advantages and limitations of dynamic type languages compared to static type languages? See also: whats with the love of dynamic languages (a far more argumentative thread...) | The ability of the interpreter to deduce type and type conversions makes development time faster, but it also can provoke runtime failures which you just cannot get in a statically typed language where you catch them at compile time. But which one's better (or even if that's always true) is hotly discussed in the commu... | Dynamic type languages versus static type languages What are the advantages and limitations of dynamic type languages compared to static type languages? See also: whats with the love of dynamic languages (a far more argumentative thread...) | TITLE:
Dynamic type languages versus static type languages
QUESTION:
What are the advantages and limitations of dynamic type languages compared to static type languages? See also: whats with the love of dynamic languages (a far more argumentative thread...)
ANSWER:
The ability of the interpreter to deduce type and ty... | [
"programming-languages",
"dynamic-languages",
"type-systems"
] | 207 | 140 | 130,892 | 9 | 0 | 2008-09-24T04:05:00.947000 | 2008-09-24T04:10:22.073000 |
125,369 | 125,375 | Adding a web reference to a DLL which is GACed | I come across this problem when i am writing an event handler in SharePoint. My event handler has a web reference. When i create this web reference, the URL of the web service will be added in the.config file of the assembly. If i have to change the web reference URL i just have to change the link in the config file. P... | If you have Visual Studio 2008, use a Service Reference instead of a Web Reference, which will generate partial classes that you can use to override functionality without your code overwritten by the generator. For Visual Studio 2005, you could just add the partial keyword to the class in Reference.cs and keep a separa... | Adding a web reference to a DLL which is GACed I come across this problem when i am writing an event handler in SharePoint. My event handler has a web reference. When i create this web reference, the URL of the web service will be added in the.config file of the assembly. If i have to change the web reference URL i jus... | TITLE:
Adding a web reference to a DLL which is GACed
QUESTION:
I come across this problem when i am writing an event handler in SharePoint. My event handler has a web reference. When i create this web reference, the URL of the web service will be added in the.config file of the assembly. If i have to change the web r... | [
".net",
"sharepoint",
"events",
"moss",
"gac"
] | 4 | 1 | 4,413 | 4 | 0 | 2008-09-24T04:05:10.213000 | 2008-09-24T04:07:23.220000 |
125,394 | 125,412 | Interrupts and exceptions | I've seen several question on here about exceptions, and some of them hint at interrupts as exceptions, but none make the connection clear. What is an interrupt? What is an exception? (please explain what exceptions are for each language you know, as there are some differences) When is an exception an interrupt and vic... | An interupt is a CPU signal generated by hardware, or specific CPU instructions. These cause interupt handlers to be executed. Things such as I/O signals from I/O hardware generate interupts. An exception can be thought of as a software-version of an interupt, that only affects its process. I'm not sure on the exact de... | Interrupts and exceptions I've seen several question on here about exceptions, and some of them hint at interrupts as exceptions, but none make the connection clear. What is an interrupt? What is an exception? (please explain what exceptions are for each language you know, as there are some differences) When is an exce... | TITLE:
Interrupts and exceptions
QUESTION:
I've seen several question on here about exceptions, and some of them hint at interrupts as exceptions, but none make the connection clear. What is an interrupt? What is an exception? (please explain what exceptions are for each language you know, as there are some difference... | [
"exception",
"terminology",
"interrupt"
] | 23 | 8 | 24,892 | 11 | 0 | 2008-09-24T04:17:40.527000 | 2008-09-24T04:25:02.007000 |
125,399 | 125,411 | How can I dynamically switch web service addresses in .NET without a recompile? | I have code that references a web service, and I'd like the address of that web service to be dynamic (read from a database, config file, etc.) so that it is easily changed. One major use of this will be to deploy to multiple environments where machine names and IP addresses are different. The web service signature wil... | When you generate a web reference and click on the web reference in the Solution Explorer. In the properties pane you should see something like this: Changing the value to dynamic will put an entry in your app.config. Here is the CodePlex article that has more information. | How can I dynamically switch web service addresses in .NET without a recompile? I have code that references a web service, and I'd like the address of that web service to be dynamic (read from a database, config file, etc.) so that it is easily changed. One major use of this will be to deploy to multiple environments w... | TITLE:
How can I dynamically switch web service addresses in .NET without a recompile?
QUESTION:
I have code that references a web service, and I'd like the address of that web service to be dynamic (read from a database, config file, etc.) so that it is easily changed. One major use of this will be to deploy to multi... | [
"c#",
"visual-studio",
"web-services",
"url",
"wsdl"
] | 75 | 60 | 139,823 | 11 | 0 | 2008-09-24T04:20:36.340000 | 2008-09-24T04:24:55.363000 |
125,400 | 125,418 | Generic LINQ query predicate? | Not sure if this is possible or if I'm expressing correctly what I'm looking for, but I have the following piece of code in my library repeatedly and would like to practice some DRY. I have set of SQL Server tables that I'm querying based on a simple user-supplied search field ala Google. I'm using LINQ to compose the ... | It sounds like you're looking for Dynamic Linq. Take a look here. This allows you to pass strings as arguments to the query methods, like: var query = dataSource.Where("CategoryID == 2 && UnitPrice > 3").OrderBy("SupplierID"); Edit: Another set of posts on this subject, using C# 4's Dynamic support: Part 1 and Part 2. | Generic LINQ query predicate? Not sure if this is possible or if I'm expressing correctly what I'm looking for, but I have the following piece of code in my library repeatedly and would like to practice some DRY. I have set of SQL Server tables that I'm querying based on a simple user-supplied search field ala Google. ... | TITLE:
Generic LINQ query predicate?
QUESTION:
Not sure if this is possible or if I'm expressing correctly what I'm looking for, but I have the following piece of code in my library repeatedly and would like to practice some DRY. I have set of SQL Server tables that I'm querying based on a simple user-supplied search ... | [
"c#",
".net",
"sql",
"linq",
"lambda"
] | 20 | 17 | 34,584 | 5 | 0 | 2008-09-24T04:20:38.023000 | 2008-09-24T04:29:11.123000 |
125,409 | 125,531 | How do you remotely update Java applications? | We've got a Java server application that runs on a number of computers, all connected to the Internet, some behind firewalls. We need to remotely update the JAR files and startup scripts from a central site, with no noticeable interruption to the app itself. The process has to be unattended and foolproof (i.e. we can't... | You didn't specify the type of server apps - I'm going to assume that you aren't running web apps (as deploying a WAR already does what you are talking about, and you very rarely need a web app to do pull type updates. If you are talking about a web app, the following discussion can still apply - you'll just implement ... | How do you remotely update Java applications? We've got a Java server application that runs on a number of computers, all connected to the Internet, some behind firewalls. We need to remotely update the JAR files and startup scripts from a central site, with no noticeable interruption to the app itself. The process has... | TITLE:
How do you remotely update Java applications?
QUESTION:
We've got a Java server application that runs on a number of computers, all connected to the Internet, some behind firewalls. We need to remotely update the JAR files and startup scripts from a central site, with no noticeable interruption to the app itsel... | [
"java",
"release-management"
] | 28 | 10 | 17,413 | 9 | 0 | 2008-09-24T04:24:53.613000 | 2008-09-24T05:18:29.150000 |
125,449 | 126,032 | Protecting cells in Excel but allow these to be modified by VBA script | I am using Excel where certain fields are allowed for user input and other cells are to be protected. I have used Tools Protect sheet, however after doing this I am not able to change the values in the VBA script. I need to restrict the sheet to stop user input, at the same time allow the VBA code to change the cell va... | Try using Worksheet.Protect "Password", UserInterfaceOnly:= True If the UserInterfaceOnly parameter is set to true, VBA code can modify protected cells. Note however that this parameter does not stick. It needs to be reapplied each time the file is opened. | Protecting cells in Excel but allow these to be modified by VBA script I am using Excel where certain fields are allowed for user input and other cells are to be protected. I have used Tools Protect sheet, however after doing this I am not able to change the values in the VBA script. I need to restrict the sheet to sto... | TITLE:
Protecting cells in Excel but allow these to be modified by VBA script
QUESTION:
I am using Excel where certain fields are allowed for user input and other cells are to be protected. I have used Tools Protect sheet, however after doing this I am not able to change the values in the VBA script. I need to restric... | [
"vba",
"excel"
] | 68 | 101 | 254,032 | 6 | 0 | 2008-09-24T04:43:02.713000 | 2008-09-24T08:29:55.833000 |
125,453 | 129,573 | Implementation example for Repository pattern with Linq to Sql and C# | I am looking for a Repository pattern implementation example/resource that follows domain driven design principles for my ASP.net MVC application. Does anyone have a good example or learning resource that can be shared? | It's not an uncontroversial implementation, but Rob Conery's web storefront project has implemented repository via Linq to Sql in C#. http://blog.wekeroad.com/ Source is available. He's not quite doing strict DDD, but his TDD is generally sending him out in that direction. The one caveat is that he has multiple reposit... | Implementation example for Repository pattern with Linq to Sql and C# I am looking for a Repository pattern implementation example/resource that follows domain driven design principles for my ASP.net MVC application. Does anyone have a good example or learning resource that can be shared? | TITLE:
Implementation example for Repository pattern with Linq to Sql and C#
QUESTION:
I am looking for a Repository pattern implementation example/resource that follows domain driven design principles for my ASP.net MVC application. Does anyone have a good example or learning resource that can be shared?
ANSWER:
It'... | [
"domain-driven-design",
"repository-pattern"
] | 11 | 10 | 10,150 | 3 | 0 | 2008-09-24T04:44:31.023000 | 2008-09-24T20:08:21.740000 |
125,457 | 125,499 | What is the T-SQL syntax to connect to another SQL Server? | If I need to copy a stored procedure (SP) from one SQL Server to another I right click on the SP in SSMS and select Script Stored Procedure as > CREATE to > New Query Editor Window. I then change the connection by right clicking on that window and selecting Connection > Change Connection... and then selecting the new s... | Also, make sure when you write the query involving the linked server, you include brackets like this: SELECT * FROM [LinkedServer].[RemoteDatabase].[User].[Table] I've found that at least on 2000/2005 the [] brackets are necessary, at least around the server name. | What is the T-SQL syntax to connect to another SQL Server? If I need to copy a stored procedure (SP) from one SQL Server to another I right click on the SP in SSMS and select Script Stored Procedure as > CREATE to > New Query Editor Window. I then change the connection by right clicking on that window and selecting Con... | TITLE:
What is the T-SQL syntax to connect to another SQL Server?
QUESTION:
If I need to copy a stored procedure (SP) from one SQL Server to another I right click on the SP in SSMS and select Script Stored Procedure as > CREATE to > New Query Editor Window. I then change the connection by right clicking on that window... | [
"sql-server",
"t-sql",
"stored-procedures",
"ssms"
] | 63 | 53 | 201,579 | 10 | 0 | 2008-09-24T04:45:49.040000 | 2008-09-24T05:04:02.460000 |
125,462 | 125,559 | GPU programming on Xbox 360 | I'm looking for some insight into XNA on Xbox 360, mainly if its possible to run vector-based float mathematics on its GPU? If there's a way, can you point me into the right direction? | I don't claim to be an expert on this, but hopefully this can point you in a helpful direction. Is it possible? Yes. You probably already know that the GPU is good at such calculations (hence the question) and you can indeed control the GPU using XNA. Whether or not it will suit your needs is a different matter. To mak... | GPU programming on Xbox 360 I'm looking for some insight into XNA on Xbox 360, mainly if its possible to run vector-based float mathematics on its GPU? If there's a way, can you point me into the right direction? | TITLE:
GPU programming on Xbox 360
QUESTION:
I'm looking for some insight into XNA on Xbox 360, mainly if its possible to run vector-based float mathematics on its GPU? If there's a way, can you point me into the right direction?
ANSWER:
I don't claim to be an expert on this, but hopefully this can point you in a hel... | [
"matrix",
"gpu",
"xbox360"
] | 7 | 6 | 1,895 | 3 | 0 | 2008-09-24T04:47:26.103000 | 2008-09-24T05:28:07.487000 |
125,463 | 125,494 | Bad OO design problem - I need some general functionality in Java but don't know how to implement it | I'm developping a small UML Class editor in Java, mainly a personal project, it might end up on SourceForge if I find the time to create a project on it. The project is quite advanced: I can create classes, move them around, create interfaces, create links, etc. What I'm working on is the dialog box for setting class/i... | When I read your question it really seems like you are describing a place to use the visitor pattern. The reason the visitor pattern should work here is an idea known as double dispatch. Your UI code will make a call and pass a reference to itself, then the class or interface ends up calling the original caller. Since ... | Bad OO design problem - I need some general functionality in Java but don't know how to implement it I'm developping a small UML Class editor in Java, mainly a personal project, it might end up on SourceForge if I find the time to create a project on it. The project is quite advanced: I can create classes, move them ar... | TITLE:
Bad OO design problem - I need some general functionality in Java but don't know how to implement it
QUESTION:
I'm developping a small UML Class editor in Java, mainly a personal project, it might end up on SourceForge if I find the time to create a project on it. The project is quite advanced: I can create cla... | [
"oop",
"interface",
"uml"
] | 2 | 3 | 523 | 3 | 0 | 2008-09-24T04:47:56.383000 | 2008-09-24T05:01:23.043000 |
125,465 | 125,471 | mobile page: dynamically created image sporadic loading | i have a page for a small mobile site that has an image that has its src value set via a getImage.aspx method, wherein an image is dynamically built and returned to the image tag. Most of the time it works great. However, there are moments where the image just doesnt load on the first shot. Hitting refresh helps most o... | I have never had the issue with an dynamic image not loading without code errors. A suggestion would be to move the image generation to a handler instead of a page to avoid the additional overhead. It could be the async requests on the mobile devices getting limited. | mobile page: dynamically created image sporadic loading i have a page for a small mobile site that has an image that has its src value set via a getImage.aspx method, wherein an image is dynamically built and returned to the image tag. Most of the time it works great. However, there are moments where the image just doe... | TITLE:
mobile page: dynamically created image sporadic loading
QUESTION:
i have a page for a small mobile site that has an image that has its src value set via a getImage.aspx method, wherein an image is dynamically built and returned to the image tag. Most of the time it works great. However, there are moments where ... | [
"image",
"mobile"
] | 1 | 1 | 119 | 1 | 0 | 2008-09-24T04:49:39.217000 | 2008-09-24T04:52:10.740000 |
125,466 | 125,486 | Using glibc, why does my gethostbyname fail after I/DHCP has changed the DNS server? | If our server (running on a device) starts before a DHCP lease had been acquired then it can never connect using a hostname. If that happens it can find hosts by IP address but not by DNS. I initially thought that the Curl DNS cache was at fault as the curl connections failed. But I used CURLOPT_DNS_CACHE_TIMEOUT to pr... | It turns out that glibc gethostbyname_r won't automatically reload it's configuration if that configuration changes. You have to manually call res_init. See bug report below. Note: Neither the man page for gethostbyname_r nor for rer_init mentioned this limitation. My solution is very specific. It works for our long ru... | Using glibc, why does my gethostbyname fail after I/DHCP has changed the DNS server? If our server (running on a device) starts before a DHCP lease had been acquired then it can never connect using a hostname. If that happens it can find hosts by IP address but not by DNS. I initially thought that the Curl DNS cache wa... | TITLE:
Using glibc, why does my gethostbyname fail after I/DHCP has changed the DNS server?
QUESTION:
If our server (running on a device) starts before a DHCP lease had been acquired then it can never connect using a hostname. If that happens it can find hosts by IP address but not by DNS. I initially thought that the... | [
"dns",
"glibc",
"dhcp"
] | 6 | 11 | 4,712 | 1 | 0 | 2008-09-24T04:50:30.980000 | 2008-09-24T04:58:27.667000 |
125,467 | 125,497 | Best Way to Conditional Redirect? | Using Rails v2.1, lets say you have an action for a controller that is accessible from more than one location. For example, within the Rails app, you have a link to edit a user from two different views, one on the users index view, and another from another view (lets say from the nav bar on every page). I'm wondering w... | I think that using before_filter on the edit action is the least obtrusive. The referer should be reliable enough... simply have a default in the case of no referer being available (say: someone bookmarked the edit page) and you should be fine. | Best Way to Conditional Redirect? Using Rails v2.1, lets say you have an action for a controller that is accessible from more than one location. For example, within the Rails app, you have a link to edit a user from two different views, one on the users index view, and another from another view (lets say from the nav b... | TITLE:
Best Way to Conditional Redirect?
QUESTION:
Using Rails v2.1, lets say you have an action for a controller that is accessible from more than one location. For example, within the Rails app, you have a link to edit a user from two different views, one on the users index view, and another from another view (lets ... | [
"ruby-on-rails",
"ruby",
"model-view-controller",
"redirect"
] | 6 | 1 | 2,669 | 3 | 0 | 2008-09-24T04:50:42.960000 | 2008-09-24T05:02:08.003000 |
125,468 | 125,480 | How to make SVN only update files but not add new ones | I have a repository of files which are unrelated to each other but are common to multiple projects. Each project might only need a subset of these files. For example: /myRepo: /jquery.js /jquery.form.js /jquery.ui.js Project A requires jquery.js and jquery.form.js, whereas Project B requires jquery.js and jquery.ui.js ... | Don't complicate yourself. Either pull out all files (what is the disadvatage of this? a few more 100s of Ks of space?), or divide the files into several directories, and only check out the needed directories (using the 'externals' property) in relevant projects. | How to make SVN only update files but not add new ones I have a repository of files which are unrelated to each other but are common to multiple projects. Each project might only need a subset of these files. For example: /myRepo: /jquery.js /jquery.form.js /jquery.ui.js Project A requires jquery.js and jquery.form.js,... | TITLE:
How to make SVN only update files but not add new ones
QUESTION:
I have a repository of files which are unrelated to each other but are common to multiple projects. Each project might only need a subset of these files. For example: /myRepo: /jquery.js /jquery.form.js /jquery.ui.js Project A requires jquery.js a... | [
"svn"
] | 0 | 3 | 1,679 | 4 | 0 | 2008-09-24T04:50:48.403000 | 2008-09-24T04:56:36.033000 |
125,470 | 145,320 | Need to create a dynamic ConfigurationSection that also holds the type | I need to create a configuration section, that is able to store key-value pairs in an app.config file and the key-value pairs can be added runtime regardless of their type. It is also important that the value keeps its original type. I need to extend the following interface public interface IPreferencesBackend { bool T... | I found two great articles on codeproject.com that are explaining these issues in great detail. Unraveling the Mysteries of.NET 2.0 Configuration http://www.codeproject.com/KB/dotnet/mysteriesofconfiguration.aspx User Settings Applied http://www.codeproject.com/KB/dotnet/user_settings.aspx?display=PrintAll&fid=1286606&... | Need to create a dynamic ConfigurationSection that also holds the type I need to create a configuration section, that is able to store key-value pairs in an app.config file and the key-value pairs can be added runtime regardless of their type. It is also important that the value keeps its original type. I need to exten... | TITLE:
Need to create a dynamic ConfigurationSection that also holds the type
QUESTION:
I need to create a configuration section, that is able to store key-value pairs in an app.config file and the key-value pairs can be added runtime regardless of their type. It is also important that the value keeps its original typ... | [
".net",
"configurationsection",
"system.configuration"
] | 2 | 2 | 3,347 | 3 | 0 | 2008-09-24T04:51:36.547000 | 2008-09-28T06:11:28.493000 |
125,473 | 125,474 | How can I wire users with their respective folders in ASP.NET? | When userA uploads a file, his files will be uploaded to folderA, when userB, to folderB, and so on. Roles/Profiles in ASP.NET. Folders will be pre-existing. Anyone? | You'll probably want to hand-code that. There's nothing intrinsic to ASP.NET for managing user files. However, the code to do so should be relatively easy. Assuming the username is unique and never changes, you can combine the username with a path (use Path.Combine) and upload to that location. I would also lock down t... | How can I wire users with their respective folders in ASP.NET? When userA uploads a file, his files will be uploaded to folderA, when userB, to folderB, and so on. Roles/Profiles in ASP.NET. Folders will be pre-existing. Anyone? | TITLE:
How can I wire users with their respective folders in ASP.NET?
QUESTION:
When userA uploads a file, his files will be uploaded to folderA, when userB, to folderB, and so on. Roles/Profiles in ASP.NET. Folders will be pre-existing. Anyone?
ANSWER:
You'll probably want to hand-code that. There's nothing intrinsi... | [
"membership",
"roles",
"asp.net-profiles"
] | 4 | 5 | 281 | 4 | 0 | 2008-09-24T04:53:10.427000 | 2008-09-24T04:55:29.047000 |
125,496 | 127,702 | Rails Check box on MySql stored as a null or zero | On my rails app I have a list of items (like a task list) and for each item there is a couple of check box to set parameters. When I submit the form, the checked box are stored as zero and the unchecked as null on DB. the question is: Is there a way to configure it? To store the data on a more traditional 0 or 1, becau... | Let's assume that the attribute you are working with is club_member as in "are you a club_member?". Note that in Ruby/Rails, the way it is working now, if model.club_member will return false if it is not checked (value is null or in Ruby, nil) and true if it is checked (value is 0). On the whole, I would strongly recom... | Rails Check box on MySql stored as a null or zero On my rails app I have a list of items (like a task list) and for each item there is a couple of check box to set parameters. When I submit the form, the checked box are stored as zero and the unchecked as null on DB. the question is: Is there a way to configure it? To ... | TITLE:
Rails Check box on MySql stored as a null or zero
QUESTION:
On my rails app I have a list of items (like a task list) and for each item there is a couple of check box to set parameters. When I submit the form, the checked box are stored as zero and the unchecked as null on DB. the question is: Is there a way to... | [
"ruby-on-rails",
"ruby"
] | 7 | 3 | 2,911 | 4 | 0 | 2008-09-24T05:01:50 | 2008-09-24T15:02:10.417000 |
125,512 | 127,613 | How to change "3 errors prohibited this foobar from being saved" validation message in Rails? | In my rails app I use the validation helpers in my active record objects and they are great. When there is a problem I see the standard "3 errors prohibited this foobar from being saved" on my web page along with the individual problems. Is there any way I can override this default message with my own? | The error_messages_for helper that you are using to display the errors accepts a:header_message option that allows you to change that default header text. As in: error_messages_for 'model',:header_message => "You have some errors that prevented saving this model" The RubyOnRails API is your friend. | How to change "3 errors prohibited this foobar from being saved" validation message in Rails? In my rails app I use the validation helpers in my active record objects and they are great. When there is a problem I see the standard "3 errors prohibited this foobar from being saved" on my web page along with the individua... | TITLE:
How to change "3 errors prohibited this foobar from being saved" validation message in Rails?
QUESTION:
In my rails app I use the validation helpers in my active record objects and they are great. When there is a problem I see the standard "3 errors prohibited this foobar from being saved" on my web page along ... | [
"ruby-on-rails",
"ruby",
"validation"
] | 8 | 11 | 4,143 | 3 | 0 | 2008-09-24T05:08:08.673000 | 2008-09-24T14:45:13.297000 |
125,532 | 304,672 | Why can't I change the value of a segment register? (MASM) | I decided to teach myself assembly language. I have realized that my program will not compile if I attempt to change the value of any segment register. Every article that I have found says that I can indeed change the value of at least 4 segment registers, so what gives? I am really only interested in the why at this p... | You said you were interested in why, so: In real mode, a segment is a 64K "window" to physical memory and these windows are spaced 16 bytes apart. In protected mode, a segment is a window to either physical or virtual memory, whose size and location is determined by the OS, and it has many other properties, including w... | Why can't I change the value of a segment register? (MASM) I decided to teach myself assembly language. I have realized that my program will not compile if I attempt to change the value of any segment register. Every article that I have found says that I can indeed change the value of at least 4 segment registers, so w... | TITLE:
Why can't I change the value of a segment register? (MASM)
QUESTION:
I decided to teach myself assembly language. I have realized that my program will not compile if I attempt to change the value of any segment register. Every article that I have found says that I can indeed change the value of at least 4 segme... | [
"assembly",
"x86",
"masm"
] | 8 | 12 | 7,118 | 2 | 0 | 2008-09-24T05:18:53.860000 | 2008-11-20T08:48:20.893000 |
125,536 | 125,582 | WPF DataBinding with simple arithmetic operation? | I want to add a constant value onto an incoming bound integer. In fact I have several places where I want to bind to the same source value but add different constants. So the ideal solution would be something like this... (NOTE: This is an example to show the idea, my actual binding scenario is not to the canvas proper... | I believe you can do this with a value converter. Here is a blog entry that addresses passing a parameter to the value converter in the xaml. And this blog gives some details of implementing a value converter. | WPF DataBinding with simple arithmetic operation? I want to add a constant value onto an incoming bound integer. In fact I have several places where I want to bind to the same source value but add different constants. So the ideal solution would be something like this... (NOTE: This is an example to show the idea, my a... | TITLE:
WPF DataBinding with simple arithmetic operation?
QUESTION:
I want to add a constant value onto an incoming bound integer. In fact I have several places where I want to bind to the same source value but add different constants. So the ideal solution would be something like this... (NOTE: This is an example to s... | [
"wpf",
"data-binding"
] | 18 | 7 | 17,014 | 5 | 0 | 2008-09-24T05:19:29.707000 | 2008-09-24T05:36:50.883000 |
125,540 | 353,915 | Deploy multiple instance of reporting services or connect to multiple versions of DLLs | Is there any way in SSRS2008 to deploy multiple instances of the ReportServer running separate code sets? I'm developing a very specific deployment of reporting services where I have a number of custom extensions plugged in. But, my company typically deploys multiple versions of a release at once on the same server. I'... | You can install multiple RS front ends onto one DB backend. It works well. We use it to have 2 primary RS boxes (load balanced) with 3rd BCP/DR hot standby box. They are all in the farm. You can have multiple instances on the same box too. How to: Configure a Report Server Scale-Out Deployment (Reporting Services Confi... | Deploy multiple instance of reporting services or connect to multiple versions of DLLs Is there any way in SSRS2008 to deploy multiple instances of the ReportServer running separate code sets? I'm developing a very specific deployment of reporting services where I have a number of custom extensions plugged in. But, my ... | TITLE:
Deploy multiple instance of reporting services or connect to multiple versions of DLLs
QUESTION:
Is there any way in SSRS2008 to deploy multiple instances of the ReportServer running separate code sets? I'm developing a very specific deployment of reporting services where I have a number of custom extensions pl... | [
".net",
"sql-server",
"ssrs-2008"
] | 1 | 2 | 2,221 | 2 | 0 | 2008-09-24T05:21:03.683000 | 2008-12-09T19:25:09.197000 |
125,541 | 125,635 | How can I show data in the header of a multipage SSRS 2005 report? | This question was very helpful, however I have a list control in my report, and when the report grows over 1 page, data in the header only shows up on the last page of the report. Apparently, hidden textboxes have to be on every page of the report for header to function properly. How do I do that? The only control I ha... | sExchange website to the rescue!!! All I needed to do is to use Report Parameters with queried values from my dataset; and then reference =Parameters!Name.Value in the textbox in the header of the report. | How can I show data in the header of a multipage SSRS 2005 report? This question was very helpful, however I have a list control in my report, and when the report grows over 1 page, data in the header only shows up on the last page of the report. Apparently, hidden textboxes have to be on every page of the report for h... | TITLE:
How can I show data in the header of a multipage SSRS 2005 report?
QUESTION:
This question was very helpful, however I have a list control in my report, and when the report grows over 1 page, data in the header only shows up on the last page of the report. Apparently, hidden textboxes have to be on every page o... | [
"reporting-services",
"header",
"report"
] | 3 | 3 | 17,993 | 4 | 0 | 2008-09-24T05:22:04.727000 | 2008-09-24T06:03:04.160000 |
125,570 | 125,738 | SQL Job Status | I am actually working on SP in SQL 2005. Using SP i am creating a job and am scheduling it for a particular time. These jobs take atleast 5 to 10 min to complete as the database is very huge. But I am not aware of how to check the status of the Job. I want to know if it has got completed successfully or was there any e... | This is what I could find, maybe it solves your problem: SP to get the current job activiity. exec msdb.dbo.sp_help_jobactivity @job_id = (your job_id here) You can execute this SP and place the result in a temp table and get the required result from there. Otherwise have a look at these tables: msdb.dbo.sysjobactivity... | SQL Job Status I am actually working on SP in SQL 2005. Using SP i am creating a job and am scheduling it for a particular time. These jobs take atleast 5 to 10 min to complete as the database is very huge. But I am not aware of how to check the status of the Job. I want to know if it has got completed successfully or ... | TITLE:
SQL Job Status
QUESTION:
I am actually working on SP in SQL 2005. Using SP i am creating a job and am scheduling it for a particular time. These jobs take atleast 5 to 10 min to complete as the database is very huge. But I am not aware of how to check the status of the Job. I want to know if it has got complete... | [
"sql",
"sql-server",
"stored-procedures"
] | 3 | 4 | 6,404 | 3 | 0 | 2008-09-24T05:31:55.827000 | 2008-09-24T06:48:10.667000 |
125,577 | 125,668 | .NET ODBC Connection Pooling | I open a connection like this: Using conn as New OdbcConnection(connectionString) conn.Open() //do stuff End Using If connection pooling is enabled, the connection is not physically closed but released to the pool and will get reused. If it is disabled, it will be physically closed. Is there any way of knowing programm... | Looks like you can just read this registry key: [HKEYLOCALMACHINE]\SOFTWARE\ODBC\ODBCINST.INI\SQL Server\CPTimeout (or some variant thereof, depending on your OS and user account). If the value is 0, then connection pooling is disabled. If it's any value above 0, it's enabled. See: http://msdn.microsoft.com/en-us/libra... | .NET ODBC Connection Pooling I open a connection like this: Using conn as New OdbcConnection(connectionString) conn.Open() //do stuff End Using If connection pooling is enabled, the connection is not physically closed but released to the pool and will get reused. If it is disabled, it will be physically closed. Is ther... | TITLE:
.NET ODBC Connection Pooling
QUESTION:
I open a connection like this: Using conn as New OdbcConnection(connectionString) conn.Open() //do stuff End Using If connection pooling is enabled, the connection is not physically closed but released to the pool and will get reused. If it is disabled, it will be physical... | [
".net",
"odbc",
"connection-pooling"
] | 3 | 1 | 5,696 | 3 | 0 | 2008-09-24T05:33:51.797000 | 2008-09-24T06:16:25.873000 |
125,580 | 125,605 | What are the advantages of using the C++ Boost libraries? | So, I've been reading through and it appears that the Boost libraries get used a lot in practice (not at my shop, though). Why is this? and what makes it so wonderful? | Boost is used so extensively because: It is open-source and peer-reviewed. It provides a wide range of platform agnostic functionality that STL missed. It is a complement to STL rather than a replacement. Many of Boost developers are on the C++ standard committee. In fact, many parts of Boost is considered to be includ... | What are the advantages of using the C++ Boost libraries? So, I've been reading through and it appears that the Boost libraries get used a lot in practice (not at my shop, though). Why is this? and what makes it so wonderful? | TITLE:
What are the advantages of using the C++ Boost libraries?
QUESTION:
So, I've been reading through and it appears that the Boost libraries get used a lot in practice (not at my shop, though). Why is this? and what makes it so wonderful?
ANSWER:
Boost is used so extensively because: It is open-source and peer-re... | [
"c++",
"boost"
] | 137 | 152 | 87,196 | 11 | 0 | 2008-09-24T05:35:23.680000 | 2008-09-24T05:48:59.980000 |
125,597 | 125,811 | Boost dependency for a C++ open source project? | Boost is meant to be the standard non-standard C++ library that every C++ user can use. Is it reasonable to assume it's available for an open source C++ project, or is it a large dependency too far? | Basically your question boils down to “is it reasonable to have [free library xyz] as a dependency for a C++ open source project.” Now consider the following quote from Stroustrup and the answer is really a no-brainer: Without a good library, most interesting tasks are hard to do in C++; but given a good library, almos... | Boost dependency for a C++ open source project? Boost is meant to be the standard non-standard C++ library that every C++ user can use. Is it reasonable to assume it's available for an open source C++ project, or is it a large dependency too far? | TITLE:
Boost dependency for a C++ open source project?
QUESTION:
Boost is meant to be the standard non-standard C++ library that every C++ user can use. Is it reasonable to assume it's available for an open source C++ project, or is it a large dependency too far?
ANSWER:
Basically your question boils down to “is it r... | [
"c++",
"boost",
"standard-library"
] | 30 | 45 | 7,810 | 10 | 0 | 2008-09-24T05:44:09.913000 | 2008-09-24T07:22:18.570000 |
125,610 | 125,611 | How can I hyperlink to a file that is not in my Web Application? | Ok, my web application is at C:\inetpub\wwwroot\website The files I want to link to are in S:\someFolder Can I make a link in the webapp that will direct to the file in someFolder? | If its on a different drive on the server, you will need to make a virtual directory in IIS. You would then link to " /virtdirect/somefolder/ " | How can I hyperlink to a file that is not in my Web Application? Ok, my web application is at C:\inetpub\wwwroot\website The files I want to link to are in S:\someFolder Can I make a link in the webapp that will direct to the file in someFolder? | TITLE:
How can I hyperlink to a file that is not in my Web Application?
QUESTION:
Ok, my web application is at C:\inetpub\wwwroot\website The files I want to link to are in S:\someFolder Can I make a link in the webapp that will direct to the file in someFolder?
ANSWER:
If its on a different drive on the server, you ... | [
"c#",
"asp.net"
] | 0 | 8 | 675 | 6 | 0 | 2008-09-24T05:49:50.213000 | 2008-09-24T05:51:47.447000 |
125,612 | 125,706 | How do I apply css to second level menu items? | I have a menu running off of a sitemap which one of the SiteMapNode looks like this: I also have a Skin applied to the asp:menu which uses the following css definition:.nav-bar { z-index: 2; margin-top: -5%; position: absolute; top: 281px; font-family: Jokewood; font-style: italic; } When I run the website and mouseOve... | You should bind styles like this (for both static and dynamic menu items): | How do I apply css to second level menu items? I have a menu running off of a sitemap which one of the SiteMapNode looks like this: I also have a Skin applied to the asp:menu which uses the following css definition:.nav-bar { z-index: 2; margin-top: -5%; position: absolute; top: 281px; font-family: Jokewood; font-style... | TITLE:
How do I apply css to second level menu items?
QUESTION:
I have a menu running off of a sitemap which one of the SiteMapNode looks like this: I also have a Skin applied to the asp:menu which uses the following css definition:.nav-bar { z-index: 2; margin-top: -5%; position: absolute; top: 281px; font-family: Jo... | [
"asp.net",
"css",
"sitemap"
] | 1 | 0 | 4,452 | 4 | 0 | 2008-09-24T05:52:29.660000 | 2008-09-24T06:32:01.827000 |
125,619 | 125,645 | How do I prevent the iPhone screen from dimming or turning off while my application is running? | I'm working on an app that requires no user input, but I don't want the iPhone to enter the power saving mode. Is it possible to disable power saving from an app? | Objective-C [[UIApplication sharedApplication] setIdleTimerDisabled:YES]; Swift UIApplication.shared.isIdleTimerDisabled = true | How do I prevent the iPhone screen from dimming or turning off while my application is running? I'm working on an app that requires no user input, but I don't want the iPhone to enter the power saving mode. Is it possible to disable power saving from an app? | TITLE:
How do I prevent the iPhone screen from dimming or turning off while my application is running?
QUESTION:
I'm working on an app that requires no user input, but I don't want the iPhone to enter the power saving mode. Is it possible to disable power saving from an app?
ANSWER:
Objective-C [[UIApplication shared... | [
"ios",
"uiapplication"
] | 126 | 186 | 28,331 | 5 | 0 | 2008-09-24T05:55:29.577000 | 2008-09-24T06:07:02.217000 |
125,627 | 125,637 | How do I call a webservice without a web reference? | I want to call a web service, but I won't know the url till runtime. Whats the best way to get the web reference in, without actually committing to a url. What about having 1 client hit the same web service on say 10 different domains? | Create the web reference, and convert the web service to a dynamic web service. A dynamic web service allows you to modify the Url. You need to create the web reference now to ensure your application understands the interfaces available. By switching to a dynamic web service you can then modify the.Url property after y... | How do I call a webservice without a web reference? I want to call a web service, but I won't know the url till runtime. Whats the best way to get the web reference in, without actually committing to a url. What about having 1 client hit the same web service on say 10 different domains? | TITLE:
How do I call a webservice without a web reference?
QUESTION:
I want to call a web service, but I won't know the url till runtime. Whats the best way to get the web reference in, without actually committing to a url. What about having 1 client hit the same web service on say 10 different domains?
ANSWER:
Creat... | [
".net",
"visual-studio-2008",
"web-services"
] | 6 | 8 | 5,077 | 3 | 0 | 2008-09-24T06:00:30.890000 | 2008-09-24T06:04:17.103000 |
125,632 | 125,650 | Is it possible to link to a bookmark within a PDF using URL parameters? | When providing a link to a PDF file on a website, is it possible to include information in the URL (request parameters) which will make the PDF browser plugin (if used) jump to a particular bookmark instead of just opening at the beginning? Something like: http://www.somehost.com/user-guide.pdf?bookmark=chapter3? If no... | Yes, you can link to specific pages by number or named locations and that will always work if the user's browser uses Adobe Reader as plugin for viewing PDF files. For a specific page by number: Link text For a named location (destination): Link text To create destinations within a PDF with Acrobat: Manually navigate t... | Is it possible to link to a bookmark within a PDF using URL parameters? When providing a link to a PDF file on a website, is it possible to include information in the URL (request parameters) which will make the PDF browser plugin (if used) jump to a particular bookmark instead of just opening at the beginning? Somethi... | TITLE:
Is it possible to link to a bookmark within a PDF using URL parameters?
QUESTION:
When providing a link to a PDF file on a website, is it possible to include information in the URL (request parameters) which will make the PDF browser plugin (if used) jump to a particular bookmark instead of just opening at the ... | [
"url",
"pdf",
"hyperlink",
"bookmarks"
] | 84 | 79 | 98,803 | 5 | 0 | 2008-09-24T06:02:15.363000 | 2008-09-24T06:09:55.187000 |
125,638 | 128,093 | Create WPF ItemTemplate DYNAMICALLY at runtime | At run time I want to dynamically build grid columns (or another display layout) in a WPF ListView. I do not know the number and names of the columns before hand. I want to be able to do: MyListView.ItemSource = MyDataset; MyListView.CreateColumns(); | i'd try following approach: A) you need to have the list box display grid view - i believe this you've done already B) define a style for GridViewColumnHeader: in my case, i had a whole bunch of other properties set, but in the basic scenario - you'd need Loaded event. Clicked - this is useful if you want to add sortin... | Create WPF ItemTemplate DYNAMICALLY at runtime At run time I want to dynamically build grid columns (or another display layout) in a WPF ListView. I do not know the number and names of the columns before hand. I want to be able to do: MyListView.ItemSource = MyDataset; MyListView.CreateColumns(); | TITLE:
Create WPF ItemTemplate DYNAMICALLY at runtime
QUESTION:
At run time I want to dynamically build grid columns (or another display layout) in a WPF ListView. I do not know the number and names of the columns before hand. I want to be able to do: MyListView.ItemSource = MyDataset; MyListView.CreateColumns();
ANS... | [
"wpf",
"listview"
] | 4 | 1 | 14,467 | 7 | 0 | 2008-09-24T06:04:27.947000 | 2008-09-24T16:08:22.863000 |
125,646 | 125,675 | Smarty templates i18n | I just wonder about an easy way to make i18n inside Smarty templates. Something like gettext() which I already use inside my PHP scripts. Any ideas? | My recent attempt to use intSmarty ( http://code.google.com/p/intsmarty/ ) was unsuccessful -- it seemed to me that the intSmarty class is not compatible with the latest Smarty code, which isn't surprising since the intSmarty design broke encapsulation by overriding a private method. This one: http://blog.piins.com/200... | Smarty templates i18n I just wonder about an easy way to make i18n inside Smarty templates. Something like gettext() which I already use inside my PHP scripts. Any ideas? | TITLE:
Smarty templates i18n
QUESTION:
I just wonder about an easy way to make i18n inside Smarty templates. Something like gettext() which I already use inside my PHP scripts. Any ideas?
ANSWER:
My recent attempt to use intSmarty ( http://code.google.com/p/intsmarty/ ) was unsuccessful -- it seemed to me that the in... | [
"internationalization",
"smarty"
] | 1 | 5 | 3,402 | 1 | 0 | 2008-09-24T06:07:40.560000 | 2008-09-24T06:20:57.050000 |
125,656 | 125,689 | Categories of design patterns | The classic "Design Patterns: Elements of Reusable Object-Oriented Software" actually introduced most of us to the idea of design patterns. However these days I find a book such as "Patterns of Enterprise Application Architecture" (POEA) by Martin Fowler, much more useful in my day to day work. In discussions with fell... | CategoryPatterns on Ward's wiki contains a categorized list of patterns. The first three are the GoF patterns Creational Structural Behavioural Then there are problem specific problems Security Concurrency RealTime Fowler's pattern are Enterprise Application Patterns. There are also Enterprise Integration Patterns. UI ... | Categories of design patterns The classic "Design Patterns: Elements of Reusable Object-Oriented Software" actually introduced most of us to the idea of design patterns. However these days I find a book such as "Patterns of Enterprise Application Architecture" (POEA) by Martin Fowler, much more useful in my day to day ... | TITLE:
Categories of design patterns
QUESTION:
The classic "Design Patterns: Elements of Reusable Object-Oriented Software" actually introduced most of us to the idea of design patterns. However these days I find a book such as "Patterns of Enterprise Application Architecture" (POEA) by Martin Fowler, much more useful... | [
"design-patterns",
"poeaa"
] | 4 | 7 | 6,857 | 3 | 0 | 2008-09-24T06:11:25.590000 | 2008-09-24T06:24:29.490000 |
125,677 | 128,619 | PHP Application URL Routing | So I'm writing a framework on which I want to base a few apps that I'm working on (the framework is there so I have an environment to work with, and a system that will let me, for example, use a single sign-on) I want to make this framework, and the apps it has use a Resource Oriented Architecture. Now, I want to creat... | I prefer to use reg ex over making my own format since it is common knowledge. I wrote a small class that I use which allows me to nest these reg ex routing tables. I use to use something similar that was implemented by inheritance but it didn't need inheritance so I rewrote it. I do a reg ex on a key and map to my own... | PHP Application URL Routing So I'm writing a framework on which I want to base a few apps that I'm working on (the framework is there so I have an environment to work with, and a system that will let me, for example, use a single sign-on) I want to make this framework, and the apps it has use a Resource Oriented Archit... | TITLE:
PHP Application URL Routing
QUESTION:
So I'm writing a framework on which I want to base a few apps that I'm working on (the framework is there so I have an environment to work with, and a system that will let me, for example, use a single sign-on) I want to make this framework, and the apps it has use a Resour... | [
"php",
"url",
"routes",
"url-routing"
] | 19 | 14 | 38,063 | 8 | 0 | 2008-09-24T06:20:58.593000 | 2008-09-24T17:44:40.417000 |
125,697 | 125,772 | WCF Application Caching Implementation | i just wondering how the.net wcf application caching is implemented?? It's single thread or multiple thread?? and if it's multiple thread how we enforce application caching to be single thread. Thank You:) | WCF doesn't come with its own caching implementation. You are left on your own to use, say, the Cache object that comes with ASP.NET or if you want to use a third party tool or Microsoft's Caching Application Block. | WCF Application Caching Implementation i just wondering how the.net wcf application caching is implemented?? It's single thread or multiple thread?? and if it's multiple thread how we enforce application caching to be single thread. Thank You:) | TITLE:
WCF Application Caching Implementation
QUESTION:
i just wondering how the.net wcf application caching is implemented?? It's single thread or multiple thread?? and if it's multiple thread how we enforce application caching to be single thread. Thank You:)
ANSWER:
WCF doesn't come with its own caching implementa... | [
".net",
"web-services"
] | 0 | 5 | 1,151 | 1 | 0 | 2008-09-24T06:28:19.170000 | 2008-09-24T07:04:27.257000 |
125,701 | 125,714 | Getting "database is locked" error messages from Trac | Wondering if anyone has gotten the infamous "database is locked" error from Trac and how you solved it. It is starting to occur more and more often for us. Will we really have to bite the bullet and migrate to a different DB backend, or is there another way? See these two Trac bug entries for more info: http://trac.edg... | That's a problem with the current SQLite adapter. There are scripts to migrate to postgres and I can really recommend that, postgres is a lot speeder for trac. | Getting "database is locked" error messages from Trac Wondering if anyone has gotten the infamous "database is locked" error from Trac and how you solved it. It is starting to occur more and more often for us. Will we really have to bite the bullet and migrate to a different DB backend, or is there another way? See the... | TITLE:
Getting "database is locked" error messages from Trac
QUESTION:
Wondering if anyone has gotten the infamous "database is locked" error from Trac and how you solved it. It is starting to occur more and more often for us. Will we really have to bite the bullet and migrate to a different DB backend, or is there an... | [
"trac"
] | 3 | 3 | 2,929 | 3 | 0 | 2008-09-24T06:29:30.757000 | 2008-09-24T06:37:09.677000 |
125,710 | 127,379 | How can I programmatically manipulate any Windows application's common dialog box? | My ultimate goal here is to write a utility that lets me quickly set the folder on any dialog box, choosing from a preset list of 'favorites'. As I'm just a hobbyist, not a pro, I'd prefer to use.NET as that's what I know best. I do realize that some of this stuff might require something more than what I could do in C#... | For something like this you're probably going to get heavy into Win32 API calls. Working from.Net means making a lot of pinvokes. I'm afraid I can't help you much, but I do remember there being a book called " Subclassing and Hooking with Visual Basic" that might help. It was written mostly for VB 6, but I believe it h... | How can I programmatically manipulate any Windows application's common dialog box? My ultimate goal here is to write a utility that lets me quickly set the folder on any dialog box, choosing from a preset list of 'favorites'. As I'm just a hobbyist, not a pro, I'd prefer to use.NET as that's what I know best. I do real... | TITLE:
How can I programmatically manipulate any Windows application's common dialog box?
QUESTION:
My ultimate goal here is to write a utility that lets me quickly set the folder on any dialog box, choosing from a preset list of 'favorites'. As I'm just a hobbyist, not a pro, I'd prefer to use.NET as that's what I kn... | [
".net",
"filedialog"
] | 5 | 1 | 2,014 | 2 | 0 | 2008-09-24T06:33:57.097000 | 2008-09-24T14:11:09.773000 |
125,711 | 125,779 | Project Transference | I would like to know your experience when you need to take over somebody else's software project - more so when the original software developer has already resigned. | Cases where original devs leaved before handing over the project are always the most interesting: you're stuck with a codebase in an unknown state. What I always find intriguing is how the new devs often do their utmost best to comment on how badly designed the code is: they forget about the constraints the old devs mi... | Project Transference I would like to know your experience when you need to take over somebody else's software project - more so when the original software developer has already resigned. | TITLE:
Project Transference
QUESTION:
I would like to know your experience when you need to take over somebody else's software project - more so when the original software developer has already resigned.
ANSWER:
Cases where original devs leaved before handing over the project are always the most interesting: you're s... | [
"project-management"
] | 3 | 3 | 310 | 5 | 0 | 2008-09-24T06:34:05.397000 | 2008-09-24T07:08:12.833000 |
125,719 | 125,728 | DataGridView Edit Column Names | Is there any way to edit column names in a DataGridView? | I don't think there is a way to do it without writing custom code. I'd implement a ColumnHeaderDoubleClick event handler, and create a TextBox control right on top of the column header. | DataGridView Edit Column Names Is there any way to edit column names in a DataGridView? | TITLE:
DataGridView Edit Column Names
QUESTION:
Is there any way to edit column names in a DataGridView?
ANSWER:
I don't think there is a way to do it without writing custom code. I'd implement a ColumnHeaderDoubleClick event handler, and create a TextBox control right on top of the column header. | [
"c#",
"winforms",
"datagridview"
] | 12 | 7 | 76,261 | 7 | 0 | 2008-09-24T06:38:56.350000 | 2008-09-24T06:43:11.613000 |
125,725 | 125,750 | IDL enumeration not displayed in type library | I have a COM object written using the MS ATL library. I have declared a bunch of enumerations in the IDL but they do NOT appear when viewing the type library using the MS COM Object Viewer tool. The problem seems to be that the missing enums are not actually used as parameters by any of the COM methods - how can I forc... | Did you put them in the library section of the IDL? Only types mentioned in the library section go into the TLB. library MyLib { //... enum BAR; | IDL enumeration not displayed in type library I have a COM object written using the MS ATL library. I have declared a bunch of enumerations in the IDL but they do NOT appear when viewing the type library using the MS COM Object Viewer tool. The problem seems to be that the missing enums are not actually used as paramet... | TITLE:
IDL enumeration not displayed in type library
QUESTION:
I have a COM object written using the MS ATL library. I have declared a bunch of enumerations in the IDL but they do NOT appear when viewing the type library using the MS COM Object Viewer tool. The problem seems to be that the missing enums are not actual... | [
"com",
"idl"
] | 7 | 15 | 4,696 | 1 | 0 | 2008-09-24T06:42:45.873000 | 2008-09-24T06:54:37.873000 |
125,730 | 126,769 | Why do I get an error when starting ruby on rails app with mongrel_rails | Why do I get following error when trying to start a ruby on rails application with mongrel_rails start? C:\RailsTest\cookbook2>mongrel_rails start ** WARNING: Win32 does not support daemon mode. ** Daemonized, any open files are closed. Look at log/mongrel.pid and log/mongr el.log for info. ** Starting Mongrel listenin... | You already have a process listening on port 3000 (the default port for mongrel). Try: mongrel_rails start -p 3001 and see whether you get a similar error. If you're trying to install more than one Rails app, you need to assign each mongrel to a separate port and edit you apache conf accordingly. If you not trying to d... | Why do I get an error when starting ruby on rails app with mongrel_rails Why do I get following error when trying to start a ruby on rails application with mongrel_rails start? C:\RailsTest\cookbook2>mongrel_rails start ** WARNING: Win32 does not support daemon mode. ** Daemonized, any open files are closed. Look at lo... | TITLE:
Why do I get an error when starting ruby on rails app with mongrel_rails
QUESTION:
Why do I get following error when trying to start a ruby on rails application with mongrel_rails start? C:\RailsTest\cookbook2>mongrel_rails start ** WARNING: Win32 does not support daemon mode. ** Daemonized, any open files are ... | [
"ruby-on-rails",
"ruby",
"mongrel"
] | 1 | 2 | 1,485 | 3 | 0 | 2008-09-24T06:44:49.940000 | 2008-09-24T12:18:48 |
125,743 | 126,864 | Techniques to Get rid of low level Locking | I'm wondering, and in need, of strategies that can be applied to reducing low-level locking. However the catch here is that this is not new code (with tens of thousands of lines of C++ code) for a server application, so I can't just rewrite the whole thing. I fear there might not be a solution to this problem by now (t... | Why do you need to eliminate the low-level locking? Do you have deadlock issues? Do you have performance problems? Or scaling issues? Are the locks generally contended or uncontended? What environment are you using? The answers in C++ will be different to the ones in Java, for example. E.g. uncontended synchronization ... | Techniques to Get rid of low level Locking I'm wondering, and in need, of strategies that can be applied to reducing low-level locking. However the catch here is that this is not new code (with tens of thousands of lines of C++ code) for a server application, so I can't just rewrite the whole thing. I fear there might ... | TITLE:
Techniques to Get rid of low level Locking
QUESTION:
I'm wondering, and in need, of strategies that can be applied to reducing low-level locking. However the catch here is that this is not new code (with tens of thousands of lines of C++ code) for a server application, so I can't just rewrite the whole thing. I... | [
"language-agnostic",
"design-patterns",
"locking"
] | 3 | 4 | 744 | 3 | 0 | 2008-09-24T06:52:03.853000 | 2008-09-24T12:33:49.413000 |
125,756 | 126,318 | Setting default language in EPiServer? | I'm looking for a way to set the default language for visitors comming to a site built in EPiServer for the first time. Not just administrators/editors in the backend, people comming to the public site. | Depends on your setup. If the site languages is to change under different domains you can do this. Add to configuration -> configSections nodes in web.config:..and add this to episerver node in web.config: Otherwhise you can do something like this. Add to appSettings in web.config: | Setting default language in EPiServer? I'm looking for a way to set the default language for visitors comming to a site built in EPiServer for the first time. Not just administrators/editors in the backend, people comming to the public site. | TITLE:
Setting default language in EPiServer?
QUESTION:
I'm looking for a way to set the default language for visitors comming to a site built in EPiServer for the first time. Not just administrators/editors in the backend, people comming to the public site.
ANSWER:
Depends on your setup. If the site languages is to ... | [
"c#",
".net",
"episerver"
] | 1 | 4 | 5,237 | 3 | 0 | 2008-09-24T06:56:14.077000 | 2008-09-24T10:05:06.993000 |
125,791 | 125,905 | Should .NET developers *really* be spending time learning C for low-level exposure? | When Joel Spolsky and Jeff Atwood began the disagreement in their podcast over whether programmers should learn C, regardless of their industry and platform of delivery, it sparkled quite an explosive debate within the developer community that probably still rages amongst certain groups today. I have been reading a num... | I already know C and that helped me during the 1.1 days where there are a lot of things that are not yet in the.NET base libraries and I have to P/Invoke something from the Platform SDK. My take is that we should always allocate a time for learning something that we don't know yet. To answer your question, I don't thin... | Should .NET developers *really* be spending time learning C for low-level exposure? When Joel Spolsky and Jeff Atwood began the disagreement in their podcast over whether programmers should learn C, regardless of their industry and platform of delivery, it sparkled quite an explosive debate within the developer communi... | TITLE:
Should .NET developers *really* be spending time learning C for low-level exposure?
QUESTION:
When Joel Spolsky and Jeff Atwood began the disagreement in their podcast over whether programmers should learn C, regardless of their industry and platform of delivery, it sparkled quite an explosive debate within the... | [
"c",
"clr",
"il"
] | 14 | 6 | 1,636 | 15 | 0 | 2008-09-24T07:15:21.350000 | 2008-09-24T07:50:26.240000 |
125,806 | 128,327 | Capturing Input in Linux | First, yes I know about this question, but I'm looking for a bit more information that that. I have actually, a fairly similar problem, in that I need to be able to capture input for mouse/keyboard/joystick, and I'd also like to avoid SDL if at all possible. I was more or less wondering if anyone knows where I can get ... | Using the link below look at the function void kGUISystemX::Loop(void) This is my main loop for getting input via keyboard and mouse using X Windows on Linux. http://code.google.com/p/kgui/source/browse/trunk/kguilinux.cpp Here is a snippet: if(XPending(m_display)) { XNextEvent(m_display, &m_e); switch(m_e.type) { case... | Capturing Input in Linux First, yes I know about this question, but I'm looking for a bit more information that that. I have actually, a fairly similar problem, in that I need to be able to capture input for mouse/keyboard/joystick, and I'd also like to avoid SDL if at all possible. I was more or less wondering if anyo... | TITLE:
Capturing Input in Linux
QUESTION:
First, yes I know about this question, but I'm looking for a bit more information that that. I have actually, a fairly similar problem, in that I need to be able to capture input for mouse/keyboard/joystick, and I'd also like to avoid SDL if at all possible. I was more or less... | [
"c++",
"linux"
] | 5 | 5 | 6,781 | 5 | 0 | 2008-09-24T07:19:47.563000 | 2008-09-24T16:52:22.710000 |
125,812 | 125,827 | Managing ThreadPool starvation within a multithreaded work queue processor? | I am investigating the design of a work queue processor where the QueueProcessor retrieves a Command Pattern object from the Queue and executes it in a new thread. I am trying to get my head around a potential Queue lockup scenario where nested Commands may result in a deadlock. E.G. A FooCommand object is placed onto ... | For simple cases like this an additional monitoring thread that can spin off more threads on demand is helpful. Basically every N seconds check to see if any jobs have been finished, if not, add another thread. This won't necessarily handle even more complex deadlock problems, but it will solve this one. My recommendat... | Managing ThreadPool starvation within a multithreaded work queue processor? I am investigating the design of a work queue processor where the QueueProcessor retrieves a Command Pattern object from the Queue and executes it in a new thread. I am trying to get my head around a potential Queue lockup scenario where nested... | TITLE:
Managing ThreadPool starvation within a multithreaded work queue processor?
QUESTION:
I am investigating the design of a work queue processor where the QueueProcessor retrieves a Command Pattern object from the Queue and executes it in a new thread. I am trying to get my head around a potential Queue lockup sce... | [
"c#",
".net",
"multithreading"
] | 3 | 1 | 2,513 | 5 | 0 | 2008-09-24T07:22:40.787000 | 2008-09-24T07:27:15.453000 |
125,813 | 125,825 | How to determine the OS path separator in JavaScript? | How can I tell in JavaScript what path separator is used in the OS where the script is running? | Afair you can always use / as a path separator, even on Windows. Quote from http://bytes.com/forum/thread23123.html: So, the situation can be summed up rather simply: All DOS services since DOS 2.0 and all Windows APIs accept either forward slash or backslash. Always have. None of the standard command shells (CMD or CO... | How to determine the OS path separator in JavaScript? How can I tell in JavaScript what path separator is used in the OS where the script is running? | TITLE:
How to determine the OS path separator in JavaScript?
QUESTION:
How can I tell in JavaScript what path separator is used in the OS where the script is running?
ANSWER:
Afair you can always use / as a path separator, even on Windows. Quote from http://bytes.com/forum/thread23123.html: So, the situation can be s... | [
"javascript",
"file",
"directory"
] | 120 | 29 | 88,909 | 5 | 0 | 2008-09-24T07:23:24.950000 | 2008-09-24T07:26:28.733000 |
125,815 | 125,843 | Windows CE 5.0 image building: Possible without Platform Builder? | Is it possible to create Windows CE 5.0 images (ie: nk.bin) from VS2005/VS2008 without using Platform Builder? If so, how? Can a vendor BSP for WinCE 5 be loaded into VS2005/2008? Are there the parts to do this available for download from Microsoft (ie: the SDK), or must you buy the special bits (a la PB) from a "speci... | No it is not possible to build an actual operating system image from Visual Studio. You can build it from the command line without actually running the Platform Builder IDE, but you still need to have it installed. Simply said the Platform Builder installation contains all of the public/driver source code and the priva... | Windows CE 5.0 image building: Possible without Platform Builder? Is it possible to create Windows CE 5.0 images (ie: nk.bin) from VS2005/VS2008 without using Platform Builder? If so, how? Can a vendor BSP for WinCE 5 be loaded into VS2005/2008? Are there the parts to do this available for download from Microsoft (ie: ... | TITLE:
Windows CE 5.0 image building: Possible without Platform Builder?
QUESTION:
Is it possible to create Windows CE 5.0 images (ie: nk.bin) from VS2005/VS2008 without using Platform Builder? If so, how? Can a vendor BSP for WinCE 5 be loaded into VS2005/2008? Are there the parts to do this available for download fr... | [
"visual-studio-2008",
"visual-studio-2005",
"windows-ce",
"platform-builder"
] | 1 | 2 | 6,173 | 2 | 0 | 2008-09-24T07:24:38.877000 | 2008-09-24T07:32:02.637000 |
125,826 | 126,426 | What is the best method to achieve dynamic URL Rewriting in ASP.Net? | I'm currently using Intelligencia.UrlRewriter does anyone have better suggestions? | System.Web.Routing is part of.NET 3.5 SP1 and you can use it both for your ASP.NET WebForm-application and your MVC-application. The official ASP.NET site has a good QuickStart Tutorial on System.Web.Routing. | What is the best method to achieve dynamic URL Rewriting in ASP.Net? I'm currently using Intelligencia.UrlRewriter does anyone have better suggestions? | TITLE:
What is the best method to achieve dynamic URL Rewriting in ASP.Net?
QUESTION:
I'm currently using Intelligencia.UrlRewriter does anyone have better suggestions?
ANSWER:
System.Web.Routing is part of.NET 3.5 SP1 and you can use it both for your ASP.NET WebForm-application and your MVC-application. The official... | [
"asp.net",
"routes",
"url-rewriting"
] | 2 | 7 | 2,137 | 5 | 0 | 2008-09-24T07:27:00.760000 | 2008-09-24T10:37:45.043000 |
125,831 | 125,882 | How to get up to speed on SOA? | I've been given the task of laying the groundwork of a SOA for my client. The goal is to open up various processes in an end-client independent way and also to make data available offline e.g. for reps visiting customers. I do have extensive experience with J2EE (Websphere) and web services but I would appreciate advic... | Pitfalls Versioning/backwards compatibility: it gets really hard to change a contract once you have loads of clients. I have seen many sites version the APIs by introducing the version in the URL Granularity Each service should be reasonly self-contained (don't expect people to do 3 calls before they get what they need... | How to get up to speed on SOA? I've been given the task of laying the groundwork of a SOA for my client. The goal is to open up various processes in an end-client independent way and also to make data available offline e.g. for reps visiting customers. I do have extensive experience with J2EE (Websphere) and web servic... | TITLE:
How to get up to speed on SOA?
QUESTION:
I've been given the task of laying the groundwork of a SOA for my client. The goal is to open up various processes in an end-client independent way and also to make data available offline e.g. for reps visiting customers. I do have extensive experience with J2EE (Websphe... | [
"web-services",
"architecture",
"soa"
] | 9 | 6 | 887 | 8 | 0 | 2008-09-24T07:28:08.323000 | 2008-09-24T07:44:12.247000 |
125,838 | 125,842 | Visual Studio Context Menu Shortcut | Does anyone know the keyboard shortcut in Visual Studio to open the context menu? i.e The equivalent of right clicking. Thanks. | Shift + F10 works in most Windows applications, but I don't have Visual Studio. | Visual Studio Context Menu Shortcut Does anyone know the keyboard shortcut in Visual Studio to open the context menu? i.e The equivalent of right clicking. Thanks. | TITLE:
Visual Studio Context Menu Shortcut
QUESTION:
Does anyone know the keyboard shortcut in Visual Studio to open the context menu? i.e The equivalent of right clicking. Thanks.
ANSWER:
Shift + F10 works in most Windows applications, but I don't have Visual Studio. | [
"visual-studio",
"keyboard-shortcuts"
] | 11 | 29 | 11,021 | 2 | 0 | 2008-09-24T07:29:54.513000 | 2008-09-24T07:32:00.247000 |
125,849 | 415,776 | MS-SQL Server 2005: Initializing a merge subscription with alternate snapshot location | We started some overseas merge replication 1 year ago and everything is going fine till now. My problem is that we have now so much data in our system that any crash on one of the subscriber's servers will be a disaster: reinitialising a subscription the standard way will take days (our connexions are definitely slow, ... | I had to do something similar to this when replicating data from Los Angeles, CA to China. The snap would have taken 44 days to load using normal methods. What I did was configure the SQL Replication to use a local path to the snapshot. I then disabled the transactional job (in your case the merge job). I then ran the ... | MS-SQL Server 2005: Initializing a merge subscription with alternate snapshot location We started some overseas merge replication 1 year ago and everything is going fine till now. My problem is that we have now so much data in our system that any crash on one of the subscriber's servers will be a disaster: reinitialisi... | TITLE:
MS-SQL Server 2005: Initializing a merge subscription with alternate snapshot location
QUESTION:
We started some overseas merge replication 1 year ago and everything is going fine till now. My problem is that we have now so much data in our system that any crash on one of the subscriber's servers will be a disa... | [
"sql-server",
"synchronization",
"replication",
"snapshot"
] | 3 | 1 | 1,718 | 2 | 0 | 2008-09-24T07:33:39.747000 | 2009-01-06T08:01:26.397000 |
125,850 | 125,864 | Adapt an Apache mod_rewrite RewriteRule not to act on physical directories | I have this RewriteRule that works too well:-) RewriteRule ^([^/]*)/$ /script.html?id=$1 [L] The bad thing about this rule is that it also matches physical directories which I don't want. How can I tell the mod_rewrite to ignore physical directories and apply the above rule only when the directory matched does not exis... | Take a look at RewriteCond. Put the following before your rule to exempt out directories and files RewriteCond %{REQUEST_FILENAME}!-d RewriteCond %{REQUEST_FILENAME}!-f | Adapt an Apache mod_rewrite RewriteRule not to act on physical directories I have this RewriteRule that works too well:-) RewriteRule ^([^/]*)/$ /script.html?id=$1 [L] The bad thing about this rule is that it also matches physical directories which I don't want. How can I tell the mod_rewrite to ignore physical directo... | TITLE:
Adapt an Apache mod_rewrite RewriteRule not to act on physical directories
QUESTION:
I have this RewriteRule that works too well:-) RewriteRule ^([^/]*)/$ /script.html?id=$1 [L] The bad thing about this rule is that it also matches physical directories which I don't want. How can I tell the mod_rewrite to ignor... | [
"apache",
"mod-rewrite"
] | 1 | 3 | 371 | 2 | 0 | 2008-09-24T07:34:55 | 2008-09-24T07:38:19.873000 |
125,857 | 125,908 | .NET TreeView won't show images | Having a problem getting a TreeView control to display node images. The code below works sometimes but fails to show any image at other times. private TreeNode AddNodeForCore(TreeNode root, Core c) { string key = GetImageKey(c); TreeNode t = root.Nodes.Add(c.Name, c.Name, key, key); t.Tag = c; return t; } Note that whe... | The helpful bit of the googled posts above is in fact: "This is a known bug in the Windows XP visual styles implementation. Certain controls, like ImageList, do not get properly initialized when they've been created before the app calls Application.EnableVisualStyles(). The normal Main() implementation in a C#'s Progra... | .NET TreeView won't show images Having a problem getting a TreeView control to display node images. The code below works sometimes but fails to show any image at other times. private TreeNode AddNodeForCore(TreeNode root, Core c) { string key = GetImageKey(c); TreeNode t = root.Nodes.Add(c.Name, c.Name, key, key); t.Ta... | TITLE:
.NET TreeView won't show images
QUESTION:
Having a problem getting a TreeView control to display node images. The code below works sometimes but fails to show any image at other times. private TreeNode AddNodeForCore(TreeNode root, Core c) { string key = GetImageKey(c); TreeNode t = root.Nodes.Add(c.Name, c.Nam... | [
"c#",
".net",
"winforms"
] | 5 | 9 | 3,656 | 4 | 0 | 2008-09-24T07:37:29.690000 | 2008-09-24T07:51:11.373000 |
125,877 | 126,029 | Versioning Database Persisted Objects, How would you? | (Not related to versioning the database schema) Applications that interfaces with databases often have domain objects that are composed with data from many tables. Suppose the application were to support versioning, in the sense of CVS, for these domain objects. For some arbitry domain object, how would you design a da... | Think carefully about the requirements for revisions. Once your code-base has pervasive history tracking built into the operational system it will get very complex. Insurance underwriting systems are particularly bad for this, with schemas often running in excess of 1000 tables. Queries also tend to be quite complex an... | Versioning Database Persisted Objects, How would you? (Not related to versioning the database schema) Applications that interfaces with databases often have domain objects that are composed with data from many tables. Suppose the application were to support versioning, in the sense of CVS, for these domain objects. For... | TITLE:
Versioning Database Persisted Objects, How would you?
QUESTION:
(Not related to versioning the database schema) Applications that interfaces with databases often have domain objects that are composed with data from many tables. Suppose the application were to support versioning, in the sense of CVS, for these d... | [
"database",
"database-design",
"versioning",
"auditing"
] | 45 | 23 | 10,703 | 9 | 0 | 2008-09-24T07:41:40.833000 | 2008-09-24T08:29:15.557000 |
125,880 | 125,899 | Can anyone recommend a C++ std::map replacement container? | Maps are great to get things done easily, but they are memory hogs and suffer from caching issues. And when you have a map in a critical loop that can be bad. So I was wondering if anyone can recommend another container that has the same API but uses lets say a vector or hash implementation instead of a tree implementa... | See Loki::AssocVector and/or hash_map (most of STL implementations have this one). | Can anyone recommend a C++ std::map replacement container? Maps are great to get things done easily, but they are memory hogs and suffer from caching issues. And when you have a map in a critical loop that can be bad. So I was wondering if anyone can recommend another container that has the same API but uses lets say a... | TITLE:
Can anyone recommend a C++ std::map replacement container?
QUESTION:
Maps are great to get things done easily, but they are memory hogs and suffer from caching issues. And when you have a map in a critical loop that can be bad. So I was wondering if anyone can recommend another container that has the same API b... | [
"c++",
"stdmap"
] | 10 | 4 | 3,554 | 4 | 0 | 2008-09-24T07:43:42.467000 | 2008-09-24T07:49:26.557000 |
125,885 | 125,942 | C++ Function List | I'm working on a fairly complex project, a custom encryption routine if you will (just for fun) and I've run into this issue in designing my code layout. I have a number of functions that I want to be able to call by index. Specifically, I need to be able to call one randomly for the encrypt process, but then address t... | You could write something like: class EncryptionFunction { public: virtual Foo Run(Bar input) = 0; virtual ~MyFunction() {} };
class SomeSpecificEncryptionFunction: public EncryptionFunction { // override the Run function };
//...
std::vector functions;
//...
functions[2]->Run(data); You could use operator() inste... | C++ Function List I'm working on a fairly complex project, a custom encryption routine if you will (just for fun) and I've run into this issue in designing my code layout. I have a number of functions that I want to be able to call by index. Specifically, I need to be able to call one randomly for the encrypt process, ... | TITLE:
C++ Function List
QUESTION:
I'm working on a fairly complex project, a custom encryption routine if you will (just for fun) and I've run into this issue in designing my code layout. I have a number of functions that I want to be able to call by index. Specifically, I need to be able to call one randomly for the... | [
"c++",
"function",
"maintainability"
] | 1 | 2 | 1,481 | 8 | 0 | 2008-09-24T07:45:36.957000 | 2008-09-24T08:00:09.760000 |
125,911 | 126,051 | Saving contents of the WMD Editor Control | I'm trying to implement the WMD editor used on StackOverflow to create some basic Wiki-style functionality. I'm up to the point where it's time to save to the database, but I'm unsure as to what I should be saving. If I save the produced HTML then I can retrieve and display it correctly, but on re-edit I'm faced with e... | Absolutely save the Markdown code as entered by the user. Then you'll need a Markdown converter that will convert it to HTML for displaying it. You'll find a bunch of these at http://en.wikipedia.org/wiki/Markdown#Converters and http://markdown.infogami.com/ I'd vote against using JS in your case. There appears to be a... | Saving contents of the WMD Editor Control I'm trying to implement the WMD editor used on StackOverflow to create some basic Wiki-style functionality. I'm up to the point where it's time to save to the database, but I'm unsure as to what I should be saving. If I save the produced HTML then I can retrieve and display it ... | TITLE:
Saving contents of the WMD Editor Control
QUESTION:
I'm trying to implement the WMD editor used on StackOverflow to create some basic Wiki-style functionality. I'm up to the point where it's time to save to the database, but I'm unsure as to what I should be saving. If I save the produced HTML then I can retrie... | [
"markdown",
"wmd-editor"
] | 12 | 7 | 1,330 | 2 | 0 | 2008-09-24T07:51:52.040000 | 2008-09-24T08:37:30.247000 |
125,921 | 125,975 | MSWinsock.Winsock event handling in VisualBasic | I'm trying to handle Winsock_Connect event (Actually I need it in Excel macro) using the following code: Dim Winsock1 As Winsock 'Object type definition
Sub Init() Set Winsock1 = CreateObject("MSWinsock.Winsock") 'Object initialization Winsock1.RemoteHost = "MyHost" Winsock1.RemotePort = "22" Winsock1.Connect
Do Whil... | Are you stuck using MSWinsock? Here is a site/tutorial using a custom winsock object. Also... You need to declare Winsock1 WithEvents within a "Class" module: Private WithEvents Winsock1 As Winsock And finally, make sure you reference the winsock ocx control. Tools -> References -> Browse -> %SYSEM%\MSWINSCK.OCX | MSWinsock.Winsock event handling in VisualBasic I'm trying to handle Winsock_Connect event (Actually I need it in Excel macro) using the following code: Dim Winsock1 As Winsock 'Object type definition
Sub Init() Set Winsock1 = CreateObject("MSWinsock.Winsock") 'Object initialization Winsock1.RemoteHost = "MyHost" Wins... | TITLE:
MSWinsock.Winsock event handling in VisualBasic
QUESTION:
I'm trying to handle Winsock_Connect event (Actually I need it in Excel macro) using the following code: Dim Winsock1 As Winsock 'Object type definition
Sub Init() Set Winsock1 = CreateObject("MSWinsock.Winsock") 'Object initialization Winsock1.RemoteHo... | [
"events",
"excel",
"winsock",
"vba"
] | 7 | 4 | 26,368 | 2 | 0 | 2008-09-24T07:54:35.437000 | 2008-09-24T08:12:01.197000 |
125,934 | 126,001 | System.Diagnostics.Process.Start weird behaviour | I'm writing an application to start and monitor other applications in C#. I'm using the System.Diagnostics.Process class to start applications and then monitor the applications using the Process.Responding property to poll the state of the application every 100 milisecs. I use Process.CloseMainWindow to stop the applic... | Now, I need to check this out later, but I am sure there is a method that tells the thread to wait until it is ready for input. Are you monitoring GUI processes only? Isn't Process.WaitForInputIdle of any help to you? Or am I missing the point?:) Update Following a chit-chat on Twitter (or tweet-tweet?) with Mendelt I ... | System.Diagnostics.Process.Start weird behaviour I'm writing an application to start and monitor other applications in C#. I'm using the System.Diagnostics.Process class to start applications and then monitor the applications using the Process.Responding property to poll the state of the application every 100 milisecs.... | TITLE:
System.Diagnostics.Process.Start weird behaviour
QUESTION:
I'm writing an application to start and monitor other applications in C#. I'm using the System.Diagnostics.Process class to start applications and then monitor the applications using the Process.Responding property to poll the state of the application e... | [
"c#",
".net",
"asynchronous"
] | 8 | 8 | 4,341 | 4 | 0 | 2008-09-24T07:58:56.737000 | 2008-09-24T08:19:46.700000 |
125,951 | 143,148 | Command line program to create website screenshots (on Linux) | What is a good command line tool to create screenshots of websites on Linux? I need to automatically generate screenshots of websites without human interaction. The only tool that I found was khtml2png, but I wonder if there are others that aren't based on khtml (i.e. have good JavaScript support,...). | A little more detail might be useful... Start a firefox (or other browser) in an X session, either on your console or using a vncserver. You can use the --height and --width options to set the size of the window to full screen. Another firefox command can be used to set the URL being displayed in the first firefox wind... | Command line program to create website screenshots (on Linux) What is a good command line tool to create screenshots of websites on Linux? I need to automatically generate screenshots of websites without human interaction. The only tool that I found was khtml2png, but I wonder if there are others that aren't based on k... | TITLE:
Command line program to create website screenshots (on Linux)
QUESTION:
What is a good command line tool to create screenshots of websites on Linux? I need to automatically generate screenshots of websites without human interaction. The only tool that I found was khtml2png, but I wonder if there are others that... | [
"linux",
"screenshot"
] | 68 | 57 | 98,635 | 10 | 0 | 2008-09-24T08:03:46.427000 | 2008-09-27T06:52:37.593000 |
125,964 | 126,016 | Easier way to debug a Windows service | Is there an easier way to step through the code than to start the service through the Windows Service Control Manager and then attaching the debugger to the thread? It's kind of cumbersome and I'm wondering if there is a more straightforward approach. | If I want to quickly debug the service, I just drop in a Debugger.Break() in there. When that line is reached, it will drop me back to VS. Don't forget to remove that line when you are done. UPDATE: As an alternative to #if DEBUG pragmas, you can also use Conditional("DEBUG_SERVICE") attribute. [Conditional("DEBUG_SERV... | Easier way to debug a Windows service Is there an easier way to step through the code than to start the service through the Windows Service Control Manager and then attaching the debugger to the thread? It's kind of cumbersome and I'm wondering if there is a more straightforward approach. | TITLE:
Easier way to debug a Windows service
QUESTION:
Is there an easier way to step through the code than to start the service through the Windows Service Control Manager and then attaching the debugger to the thread? It's kind of cumbersome and I'm wondering if there is a more straightforward approach.
ANSWER:
If ... | [
"c#",
".net",
"windows",
"debugging",
"windows-services"
] | 355 | 279 | 295,291 | 30 | 0 | 2008-09-24T08:08:37.010000 | 2008-09-24T08:24:47.453000 |
125,976 | 125,999 | How to tell using T-SQL whether a SQL server database has the TRUSTWORTHY property set to on or off | How to tell using T-SQL whether a SQL server database has the TRUSTWORTHY property set to on or off | In SSMS: Right click over the database, Properties, Options last record under Miscellaneous In T-SQL: select is_trustworthy_on from sys.databases where name = 'dbname' | How to tell using T-SQL whether a SQL server database has the TRUSTWORTHY property set to on or off How to tell using T-SQL whether a SQL server database has the TRUSTWORTHY property set to on or off | TITLE:
How to tell using T-SQL whether a SQL server database has the TRUSTWORTHY property set to on or off
QUESTION:
How to tell using T-SQL whether a SQL server database has the TRUSTWORTHY property set to on or off
ANSWER:
In SSMS: Right click over the database, Properties, Options last record under Miscellaneous I... | [
"sql-server"
] | 17 | 26 | 12,802 | 1 | 0 | 2008-09-24T08:12:56.373000 | 2008-09-24T08:19:39.680000 |
126,002 | 135,884 | What processes are using which ports on unix? | I need to find out what ports are attached to which processes on a Unix machine (HP Itanium). Unfortunately, lsof is not installed and I have no way of installing it. Does anyone know an alternative method? A fairly lengthy Googling session hasn't turned up anything. | Assuming this is HP-UX? What about the Ptools - do you have those installed? If so you can use "pfiles" to find the ports in use by the application: pfiles prints information about all open file descriptors of a process. If file descriptor corresponds to a file, then pfiles prints the fstat(2) and fcntl(2) information.... | What processes are using which ports on unix? I need to find out what ports are attached to which processes on a Unix machine (HP Itanium). Unfortunately, lsof is not installed and I have no way of installing it. Does anyone know an alternative method? A fairly lengthy Googling session hasn't turned up anything. | TITLE:
What processes are using which ports on unix?
QUESTION:
I need to find out what ports are attached to which processes on a Unix machine (HP Itanium). Unfortunately, lsof is not installed and I have no way of installing it. Does anyone know an alternative method? A fairly lengthy Googling session hasn't turned u... | [
"hp-ux"
] | 35 | 10 | 136,451 | 9 | 0 | 2008-09-24T08:20:29.663000 | 2008-09-25T20:37:04.377000 |
126,005 | 130,049 | How do I escape a PHP script to an external editor and return afterwards? | Specifically I have a PHP command-line script that at a certain point requires input from the user. I would like to be able to execute an external editor (such as vi), and wait for the editor to finish execution before resuming the script. My basic idea was to use a temporary file to do the editing in, and to retrieve ... | You can redirect the editor's output to the terminal: system("vim > `tty`"); | How do I escape a PHP script to an external editor and return afterwards? Specifically I have a PHP command-line script that at a certain point requires input from the user. I would like to be able to execute an external editor (such as vi), and wait for the editor to finish execution before resuming the script. My bas... | TITLE:
How do I escape a PHP script to an external editor and return afterwards?
QUESTION:
Specifically I have a PHP command-line script that at a certain point requires input from the user. I would like to be able to execute an external editor (such as vi), and wait for the editor to finish execution before resuming ... | [
"php",
"shell",
"command-line",
"user-input"
] | 6 | 9 | 2,198 | 5 | 0 | 2008-09-24T08:21:51.563000 | 2008-09-24T21:19:33.753000 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.