Id int64 4 8.51M | PostTypeId int64 1 7 | AcceptedAnswerId int64 7 75.5M ⌀ | ParentId int64 4 41.8M ⌀ | Score int64 -208 27.7k | ViewCount int64 11 12.4M ⌀ | Body stringlengths 0 45k | Title stringlengths 2 150 ⌀ | ContentLicense stringclasses 3
values | FavoriteCount int64 0 225 ⌀ | CreationDate stringdate 2008-07-31 21:42:52 2011-12-14 18:48:47 | LastActivityDate stringdate 2008-08-01 12:19:17 2023-03-05 04:40:26 | LastEditDate stringdate 2008-08-01 13:54:25 2023-03-05 03:12:45 ⌀ | LastEditorUserId int64 -1 21.3M ⌀ | OwnerUserId int64 -1 21.1M ⌀ | Tags listlengths 1 6 ⌀ |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
13,766 | 2 | null | 13,763 | 0 | null | You should be able to use the .RemoveNode method of the node or the .RemoveChild method of the parent node.
| null | CC BY-SA 2.5 | null | 2008-08-17T17:54:01.707 | 2008-08-17T17:54:01.707 | null | null | 1,358 | null |
13,760 | 2 | null | 13,753 | 0 | null | I believe it has to do with the way that PS interpolates information in the "". Try this:
"Server name in quotes $($_.properties).name"
Or you may even need one more set of $(). I'm not somewhere that I can test it at right now.
| null | CC BY-SA 2.5 | null | 2008-08-17T17:41:14.103 | 2008-08-17T17:41:14.103 | null | null | 1,358 | null |
13,753 | 1 | 13,972 | null | 1 | 2,219 | I'm missing something here:
```
$objSearcher = New-Object System.DirectoryServices.DirectorySearcher
$objSearcher.SearchRoot = New-Object System.DirectoryServices.DirectoryEntry
$objSearcher.Filter = ("(objectclass=computer)")
$computers = $objSearcher.findall()
```
So the question is why do the two following ... | quoting System.DirectoryServices.ResultPropertyCollection | CC BY-SA 2.5 | null | 2008-08-17T17:33:54.727 | 2015-09-10T13:48:04.913 | 2009-03-10T03:50:25.547 | 5,640 | 1,635 | [
".net",
"powershell",
"scripting",
"active-directory"
] |
13,757 | 2 | null | 13,655 | 1 | null | > Is it possible in .NET to list files on a remote location like an URL?
You should specify which protocol we're talking about.
For HTTP, lubos hasko provided the answer: no. HTTP has no concept of files; only of resources. If you have control over the web server, you can ask it to provide a directory listing, or, be... | null | CC BY-SA 2.5 | null | 2008-08-17T17:36:21.727 | 2008-08-17T17:36:21.727 | null | null | 1,600 | null |
13,763 | 1 | 14,782 | null | 82 | 133,381 | Is there a function like `document.getElementById("FirstDiv").clear()`?
| How can I remove a child node in HTML using JavaScript? | CC BY-SA 3.0 | 0 | 2008-08-17T17:48:04.057 | 2020-08-12T21:05:48.377 | 2016-02-08T11:48:13.467 | 92,701 | 184 | [
"javascript",
"html",
"dom"
] |
13,774 | 2 | null | 13,725 | 0 | null | I prefer the standard c style declarations but only because I switch between several languages and I don't have to think too much about it but sounds like I should start looking at nsinteger
| null | CC BY-SA 2.5 | null | 2008-08-17T17:58:56.970 | 2008-08-17T17:58:56.970 | null | null | 1,075 | null |
13,769 | 2 | null | 13,763 | 49 | null | If you want to clear the div and remove all child nodes, you could put:
```
var mydiv = document.getElementById('FirstDiv');
while(mydiv.firstChild) {
mydiv.removeChild(mydiv.firstChild);
}
```
| null | CC BY-SA 3.0 | null | 2008-08-17T17:56:17.130 | 2017-03-12T03:38:41.147 | 2017-03-12T03:38:41.147 | 707,401 | 1,370 | null |
13,773 | 2 | null | 13,763 | 0 | null | You should probably use a JavaScript library to do things like this.
For example, MochiKit has a function [removeElement](http://mochikit.com/doc/html/MochiKit/DOM.html#fn-removeelement), and jQuery has [remove](http://docs.jquery.com/Manipulation/remove#expr).
| null | CC BY-SA 2.5 | null | 2008-08-17T17:58:55.923 | 2008-08-17T17:58:55.923 | null | null | 122 | null |
13,777 | 2 | null | 13,698 | 4 | null | Zend framework should work without `mod_rewrite`. If you can live with your URL:s looking more like "/path/to/app/index.php/controller/action". If you had mod_rewrite you could do away with the "index.php" bit, but it should work with too.
It's all a matter of setting up the routes to accept the index.php part.
| null | CC BY-SA 2.5 | null | 2008-08-17T18:00:47.387 | 2008-08-17T18:14:22.040 | 2008-08-17T18:14:22.040 | 1,109 | 1,109 | null |
13,758 | 2 | null | 6,633 | 2 | null | You could manually 'fake' the register globals effect but add some security. (I partly grabbed this from the osCommerce fork called xoops)
```
// Detect bad global variables
$bad_global_list = array('GLOBALS', '_SESSION', 'HTTP_SESSION_VARS', '_GET', 'HTTP_GET_VARS', '_POST', 'HTTP_POST_VARS', '_COOKIE', 'HTTP_COOKIE... | null | CC BY-SA 2.5 | null | 2008-08-17T17:36:54.673 | 2008-08-17T17:36:54.673 | null | null | 1,430 | null |
13,779 | 2 | null | 13,763 | 4 | null | You have to remove any event handlers you've set on the node before you remove it, to avoid memory leaks in IE
| null | CC BY-SA 2.5 | null | 2008-08-17T18:03:46.133 | 2008-08-17T18:03:46.133 | null | null | 137 | null |
13,768 | 1 | 13,923 | null | 17 | 1,031 | So I'm not quite convinced about OpenID yet, and here is why:
I already have an OpenID because I have a Blogger account. But I discovered that Blogger seems to be a poor provider when I tried to identify myself on the [altdotnet](http://altdotnet.org) page and recieved the following message:
>
Lets forget the deta... | Open ID - What happens when you decide you don't like your existing provider? | CC BY-SA 2.5 | 0 | 2008-08-17T17:55:57.723 | 2009-05-26T20:21:44.703 | null | null | 48,281 | [
"openid"
] |
13,746 | 2 | null | 13,678 | 34 | null | Before I arrived, our group (PhD scientists, with little programming background) had been trying to implement a LabVIEW application on-and-off for nearly a year. The code was untidy, too complex (front and back-end) and most importantly, did not work. I am a keen programmer but had never used LabVIEW. With a little he... | null | CC BY-SA 2.5 | null | 2008-08-17T17:23:27.023 | 2010-03-06T15:18:04.853 | 2010-03-06T15:18:04.853 | 199 | 199 | null |
13,785 | 2 | null | 13,594 | 1 | null | > > Do you know of any differences in handling HTML tags/properties in different browsers
Is this question asking for information on all differences, including DOM and CSS? Bit of a big topic. I thought the OP was asking about HTML behaviour specifically, not all this other stuff...
| null | CC BY-SA 2.5 | null | 2008-08-17T18:07:40.540 | 2008-08-17T18:07:40.540 | null | null | 137 | null |
13,784 | 2 | null | 13,698 | 0 | null | If you can find a non-mod_rewrite way to redirect all requests to index.php (or wherever your init script is), you can, as mentioned above, use 'REQUEST_URI' to grab the portion of the address after the domain and then parse it as you like and make the request do what you want it to. This is how Wordpress does it (gran... | null | CC BY-SA 2.5 | null | 2008-08-17T18:07:22.927 | 2008-08-17T18:07:22.927 | null | null | 1,344 | null |
13,775 | 1 | null | null | 0 | 14,037 | I have a .net web application that has a Flex application embedded within a page. This flex application calls a .net webservice. I can trace the execution proccess through the debugger and all looks great until I get the response:
```
soap:ReceiverSystem.Web.Services.Protocols.SoapException: Server was unable to proce... | SoapException: Root element is missing occurs when .NET web service called from Flex | CC BY-SA 2.5 | null | 2008-08-17T17:58:57.170 | 2011-09-21T21:01:56.230 | 2008-08-23T19:18:11.997 | 2,134 | 1,638 | [
"apache-flex",
"web-services",
"soap"
] |
13,794 | 2 | null | 11,632 | 2 | null | Although the syntax sugar on C#3 has really pushed the bar forward, I must say some of the Linq to XML stuff in VB.Net seems quite nice and makes handling complex, deeply nested XML a little bit more tolerable. Just a little bit.
| null | CC BY-SA 2.5 | null | 2008-08-17T18:21:27.780 | 2008-08-17T18:21:27.780 | null | null | null | null |
13,786 | 1 | 13,930 | null | 15 | 5,728 | Are we supposed to find workarounds in our web applications so that they will work in every situation? Is it time to do away with IE6 programming?
| Should we support IE6 anymore? | CC BY-SA 2.5 | 0 | 2008-08-17T18:15:14.097 | 2014-07-09T06:09:28.283 | 2014-07-09T06:09:28.283 | 3,302,887 | 184 | [
"internet-explorer",
"internet-explorer-6"
] |
13,804 | 2 | null | 13,786 | 2 | null | Depends on the situation. A site like this, were most people are techy I think it is safe to assume people have the latest browsers.
However if you are open to a wide public of possibly not-so techy people, you'll probably have IE6 hitting your site alot.
| null | CC BY-SA 2.5 | null | 2008-08-17T18:26:14.027 | 2008-08-17T18:26:14.027 | null | null | null | null |
13,789 | 2 | null | 1,304 | 4 | null | > Then between the two lines, another process could easily lock the file, giving you the same problem you were trying to avoid to begin with: exceptions.
However, this way, you would know that the problem is temporary, and to retry later. (E.g., you could write a thread that, if encountering a lock while trying to wri... | null | CC BY-SA 2.5 | null | 2008-08-17T18:17:12.937 | 2008-08-17T18:17:12.937 | null | null | 1,600 | null |
13,802 | 2 | null | 13,786 | 3 | null | I recommend people check their own user stats for their site before making this decision, but here's a common reference regarding popular browser versions :
[http://www.w3schools.com/browsers/browsers_stats.asp](http://www.w3schools.com/browsers/browsers_stats.asp)
| null | CC BY-SA 2.5 | null | 2008-08-17T18:25:21.800 | 2008-08-17T18:25:21.800 | null | null | 1,645 | null |
13,806 | 1 | 13,870 | null | 5 | 3,551 | I am trying to snoop on a log file that an application is writing to.
I have successfully hooked createfile with the detours library from MSR, but createfile never seems to be called with file I am interested in snooping on. I have also tried hooking openfile with the same results.
I am not an experienced Windows/C++ ... | Any Windows APIs to get file handles besides createfile and openfile? | CC BY-SA 4.0 | null | 2008-08-17T18:27:08.473 | 2022-09-06T12:04:15.020 | 2022-09-06T12:04:15.020 | 472,495 | 1,646 | [
"c++",
"windows",
"api",
"logfile"
] |
13,809 | 2 | null | 13,786 | 0 | null | I'm all for pushing users to upgrade to the newest available version of IE (since problems improve with every release), however I'm also against telling people to upgrade or change their browsers.
I still support IE6 on my website. I even support as far back as IE5.5 pretty well I think.
Generally it is a good pract... | null | CC BY-SA 2.5 | null | 2008-08-17T18:29:43.117 | 2008-08-17T18:29:43.117 | null | null | 392 | null |
13,811 | 2 | null | 11,632 | 0 | null | One glaring difference is in how they handle extension methods (Vb.Net actually allows something that C# doesn't - passing the type on which the extension method is being defined as ref): [http://blog.gadodia.net/extension-methods-in-vbnet-and-c/](http://blog.gadodia.net/extension-methods-in-vbnet-and-c/)
| null | CC BY-SA 2.5 | null | 2008-08-17T18:30:56.653 | 2008-08-17T18:30:56.653 | null | null | 380 | null |
13,812 | 2 | null | 11,632 | 2 | null | One glaring difference is in how they handle extension methods (Vb.Net actually allows something that C# doesn't - passing the type on which the extension method is being defined as ref): [http://blog.gadodia.net/extension-methods-in-vbnet-and-c/](http://blog.gadodia.net/extension-methods-in-vbnet-and-c/)
| null | CC BY-SA 2.5 | null | 2008-08-17T18:32:08.353 | 2008-08-17T18:32:08.353 | null | null | 380 | null |
13,817 | 2 | null | 888 | 1 | null | i use zend studio for eclipse with the built in debugger. Its still slow compared to debugging with eclipse pdt with xdebug. Hopefully they will fix those issues, the speed has improved over the recent releases but still stepping over things takes 2-3 seconds.
The zend firefox toolbar really makes things easy (debug ne... | null | CC BY-SA 2.5 | null | 2008-08-17T18:38:01.570 | 2008-08-17T18:38:01.570 | null | null | 1,425 | null |
13,791 | 1 | 13,943 | null | 17 | 2,294 | I am trying to implement string unescaping with Python regex and backreferences, and it doesn't seem to want to work very well. I'm sure it's something I'm doing wrong but I can't figure out what...
```
>>> import re
>>> mystring = r"This is \n a test \r"
>>> p = re.compile( "\\\\(\\S)" )
>>> p.sub( "\\1", mystring )
... | Python Regular Expressions to implement string unescaping | CC BY-SA 3.0 | 0 | 2008-08-17T18:20:21.060 | 2016-12-30T12:57:33.183 | 2016-12-30T12:57:33.183 | 2,336,654 | 1,370 | [
"python",
"regex",
"backreference"
] |
13,813 | 2 | null | 13,786 | 0 | null | Dean Edwards' [ie7.js](http://code.google.com/p/ie7-js/) makes IE6 behave (mostly) like a respectable web browser. It requires the client to have Javascript turned on, but that's a reasonable concession to make. I use that script and the script from [Save the Developers](http://www.savethedevelopers.org/) on sites I cr... | null | CC BY-SA 2.5 | null | 2008-08-17T18:32:09.163 | 2008-08-17T18:32:09.163 | null | null | 1,370 | null |
13,821 | 2 | null | 12,936 | 1 | null | currently we use apc, free and was just a simple plug and play on our live servers. Provided a huge performance increase for our site, especially as the project size increased. I also have the apc.stat disabled so it doesn't check if the code has been updated, so whenever we need to update the code on the live site we ... | null | CC BY-SA 2.5 | null | 2008-08-17T18:43:18.487 | 2008-11-03T18:10:30.037 | null | null | 1,425 | null |
13,815 | 2 | null | 13,786 | 2 | null | Someone [asked the same question](https://stackoverflow.com/questions/6611/ie6-to-support-or-not-to-support) about a week ago and got some good answers. My personal favorite was [doekman's suggestion to try IE7-js](https://stackoverflow.com/questions/6611/ie6-to-support-or-not-to-support#6698).
| null | CC BY-SA 2.5 | null | 2008-08-17T18:35:17.457 | 2008-08-17T18:35:17.457 | 2017-05-23T12:33:26.220 | -1 | 437 | null |
13,833 | 2 | null | 3,667 | 1 | null | We don't use branches for staging web-related stuff; only for testing experimental things that will take a long time (read: more than a day) to merge back into trunk. The trunk, in 'continuous integration' style, represents a (hopefully) working, current state.
Thus, most changes get committed straight to trunk. A Cru... | null | CC BY-SA 2.5 | null | 2008-08-17T18:52:14.333 | 2008-08-17T18:52:14.333 | null | null | 1,600 | null |
13,854 | 2 | null | 13,851 | 3 | null | Try the IE Developer Toolbar, which will let you inspect what is going on with the elements and give you outlines of the areas covered. It might give you a better understanding of the problem.
| null | CC BY-SA 2.5 | null | 2008-08-17T19:12:09.193 | 2008-08-17T19:12:09.193 | null | null | 17 | null |
13,855 | 2 | null | 13,851 | 0 | null | The solution:
```
img {
padding: 0px;
margin: 0px;
display: block;
}
```
display: block
| null | CC BY-SA 2.5 | null | 2008-08-17T19:12:51.407 | 2008-08-17T19:12:51.407 | null | null | null | null |
13,848 | 1 | 13,861 | null | 6 | 2,780 | Using TortoiseSVN against VisualSVN I delete a source file that I should not have deleted. Now this isn't a train smash because I can get the file back from the daily backup. However I would like to undelete it from SVN (VisualSVN) so that I can get the history back. However I can't work out how to do that.
Anybody kn... | VisualSVN undelete with TortoiseSVN | CC BY-SA 2.5 | null | 2008-08-17T19:03:33.500 | 2014-10-21T08:39:58.320 | 2014-10-21T08:39:58.320 | 761,095 | 1,463 | [
"svn",
"tortoisesvn",
"visualsvn-server"
] |
13,832 | 1 | null | null | 2 | 1,896 | I have taken over the development of a web application that is targeted at the .net 1.0 framework and is written in C# and Visual Basic.
I decided that the first thing we need to do is refine the build process, I wrote build files for the C# projects, but am having tons of problems creating a build file for Visual Ba... | How do I create an automated build file for VB.Net in NAnt? | CC BY-SA 2.5 | null | 2008-08-17T18:52:13.803 | 2009-01-22T21:46:12.070 | 2009-01-22T21:32:29.463 | 1,249 | 1,638 | [
"vb.net",
"nant",
".net-1.0"
] |
13,849 | 2 | null | 13,806 | 6 | null | Here's a link which might be of use:
[Guerilla-Style File Monitoring with C# and C++](http://www.codingthewheel.com/archives/how-i-built-a-working-online-poker-bot-6)
It is possible to create a file without touching CreateFile API but can I ask ? If you're using something like Windows Hooks your DLL won't be installe... | null | CC BY-SA 2.5 | null | 2008-08-17T19:04:47.227 | 2008-08-17T19:04:47.227 | null | null | null | null |
13,857 | 1 | 141,426 | null | 98 | 16,439 | I've been reading a lot about closures and I think I understand them, but without clouding the picture for myself and others, I am hoping someone can explain closures as succinctly and clearly as possible. I'm looking for a simple explanation that might help me understand where and why I would want to use them.
| Can you explain closures (as they relate to Python)? | CC BY-SA 3.0 | 0 | 2008-08-17T19:14:30.747 | 2018-05-12T04:23:09.093 | 2014-02-23T22:43:02.420 | 1,217,270 | 1,649 | [
"python",
"functional-programming",
"closures"
] |
13,820 | 2 | null | 11,903 | 17 | null | Here on Stack Overflow, we're just using the [Simple Registration](http://openid.net/specs/openid-simple-registration-extension-1_0.html) extension for now, as there were some issues with Attribute Exchange (AX).
The biggest was OpenID Providers (OP) not agreeing on which [attribute type urls](http://www.axschema.org/... | null | CC BY-SA 2.5 | null | 2008-08-17T18:42:03.340 | 2010-04-17T08:52:02.277 | 2010-04-17T08:52:02.277 | 117,069 | 3 | null |
13,864 | 2 | null | 13,848 | 1 | null | Did you only delete it locally, or did you commit the deletion? In the latter case, try checking out the previous revision.
| null | CC BY-SA 2.5 | null | 2008-08-17T19:21:45.850 | 2008-08-17T19:21:45.850 | null | null | 1,600 | null |
13,860 | 2 | null | 13,851 | 0 | null | I run into this a lot. Rather than hunting down the specific behavior, try sanity checking by explicity setting padding and margin properties for img/div/etc selectors to 0, set border-style: none border-width: 0px border="0" etc.
IE Dev Toolbar is a must-have but whether it helps you with figuring out single-pixel is... | null | CC BY-SA 2.5 | null | 2008-08-17T19:16:03.380 | 2008-08-17T19:16:03.380 | null | null | null | null |
13,868 | 2 | null | 13,851 | 0 | null | CSS Resets (like the [YUI Reset CSS](http://developer.yahoo.com/yui/reset/)) are great for this kind of thing. They reset paddings, margins, and other display properties on a lot of HTML elements to minimize the display differences.
| null | CC BY-SA 2.5 | null | 2008-08-17T19:25:43.813 | 2008-08-17T19:25:43.813 | null | null | 5 | null |
13,866 | 2 | null | 13,851 | 0 | null | Instead of resorting to display block, note that IE7 does some seriously odd things with whitespace; try removing the whitespace between the image and the div, and see what happens.
| null | CC BY-SA 2.5 | null | 2008-08-17T19:23:49.933 | 2008-08-17T19:23:49.933 | null | null | 1,370 | null |
13,861 | 2 | null | 13,848 | 12 | null | What you have to do is the following:
1. Right click on the folder where you think it is.
2. Choose Show Log under TortioseSVN
3. Find the checkin that the file was deleted in
4. Go down the list and find the file
5. Select Revert changes for this version to undelete.
| null | CC BY-SA 2.5 | null | 2008-08-17T19:17:43.783 | 2008-08-17T19:17:43.783 | null | null | 17 | null |
13,851 | 1 | 13,854 | null | 1 | 509 | I am having trouble with IE7. I have a header, which is an IMG. Under it I have a div that represents a menu, they have to be attached to each other without space in between. Both are 1000px width. In Opera and FireFox the header and the menu are neatly attached to each other. However, in IE7, there is a small space be... | IE7: header above menu | CC BY-SA 4.0 | null | 2008-08-17T19:10:28.510 | 2021-10-24T17:07:55.360 | 2021-10-24T17:07:55.360 | 12,848,411 | null | [
"html",
"css",
"internet-explorer-7"
] |
13,844 | 2 | null | 13,791 | 3 | null | Well, I think you might have missed the r or miscounted the backslashes...
```
"\\n" == r"\n"
>>> import re
>>> mystring = r"This is \\n a test \\r"
>>> p = re.compile( r"[\\][\\](.)" )
>>> print p.sub( r"\\\1", mystring )
This is \n a test \r
>>>
```
Which, if I understood is what was requested.
I suspect the mor... | null | CC BY-SA 2.5 | null | 2008-08-17T19:01:02.990 | 2008-08-17T19:41:23.160 | 2008-08-17T19:41:23.160 | 1,421 | 1,421 | null |
13,870 | 2 | null | 13,806 | 8 | null | You can use Sysinternal's [FileMon](http://technet.microsoft.com/en-us/sysinternals/bb896642.aspx).
It is an excellent monitor that can tell you exactly which file-related system calls are being
made and what are the parameters.
I think that this approach is much easier than hooking API calls and much less intrusive.... | null | CC BY-SA 2.5 | null | 2008-08-17T19:26:56.637 | 2008-08-17T19:26:56.637 | null | null | 1,651 | null |
13,863 | 1 | null | null | 7 | 7,222 | I have been trying to find an easy way to parse a search query and convert it to an SQL query for my DB.
I have found two solutions:
1. Lucene: Powerful Java-based search engine, contains a query parser but it isn't very configurable and I could find a way to easily hack/adapt it to create SQL queries.
2. ANTLR: A ... | Parsing search queries in Java | CC BY-SA 3.0 | null | 2008-08-17T19:21:26.037 | 2015-04-17T16:27:49.970 | 2015-04-17T16:27:49.970 | 660,990 | 1,651 | [
"java",
"search"
] |
13,871 | 2 | null | 13,863 | 0 | null | Depends a lot on the kind of queries you've got to parse and somewhat on the structure of the data in your database. I'm going to assume that you're not trying to do full text search in a DB (i.e. a search engine across your entire DB) because, as most Information Retrieval people will tell you, the performance for tha... | null | CC BY-SA 2.5 | null | 2008-08-17T19:28:04.760 | 2008-08-17T19:28:04.760 | null | null | 1,035 | null |
13,873 | 2 | null | 13,863 | 2 | null | What exactly do you have in mind? I've used Lucene for text-searching, but where it excels is building an index and searching that of hitting the database at all.
I recently set up an system where I index a table in Lucene by concatenating all the columns (separated by spaces) into one field, and popping that into L... | null | CC BY-SA 2.5 | null | 2008-08-17T19:30:37.063 | 2008-08-17T19:30:37.063 | null | null | 1,266 | null |
13,875 | 2 | null | 13,857 | 47 | null | It's simple: A function that references variables from a containing scope, potentially after flow-of-control has left that scope. That last bit is very useful:
```
>>> def makeConstantAdder(x):
... constant = x
... def adder(y):
... return y + constant
... return adder
...
>>> f = makeConstantAdde... | null | CC BY-SA 2.5 | null | 2008-08-17T19:32:33.160 | 2008-08-17T19:32:33.160 | null | null | 1,421 | null |
13,869 | 2 | null | 13,791 | 0 | null | You are being tricked by Python's representation of the result string. The Python expression:
```
'This is \\n a test \\r'
```
represents the string
```
This is \n a test \r
```
which is I think what you wanted. Try adding 'print' in front of each of your p.sub() calls to print the actual string returned instead ... | null | CC BY-SA 2.5 | null | 2008-08-17T19:26:33.250 | 2008-08-17T19:26:33.250 | null | null | 893 | null |
13,877 | 2 | null | 13,863 | 0 | null | You are correct to assume that I am not looking for full text search.
The information looks something like this schema for book info:
Name: string, publisher:string, num_pages int, publish_date:date...
The search queries are of the sort:
1. Harry Potter (search any books whos name has both Harry and Potter)
2. publi... | null | CC BY-SA 2.5 | null | 2008-08-17T19:37:41.620 | 2008-08-17T19:37:41.620 | null | null | 1,651 | null |
13,884 | 2 | null | 13,881 | -2 | null | I would start with the Picasa API:
[Picasa API](http://code.google.com/apis/picasaweb/overview.html)
| null | CC BY-SA 2.5 | null | 2008-08-17T19:43:53.527 | 2008-08-17T19:43:53.527 | null | null | 1,358 | null |
13,878 | 2 | null | 13,753 | 0 | null | Close-- The below works correctly, but I'd be interested if anyone has a deeper explanation.
```
PS C:\> $computers[0] | %{ "$_.properties.name"; "$($_.properties.name)" }
System.DirectoryServices.SearchResult.properties.name
GORILLA
```
So it would seem that $_.properties.name doesn't deference like I expected it t... | null | CC BY-SA 2.5 | null | 2008-08-17T19:37:45.070 | 2008-08-17T19:51:14.417 | 2008-08-17T19:51:14.417 | 1,635 | 1,635 | null |
13,858 | 2 | null | 7,084 | 18 | null | I use type abstraction very rarely. Here are my arguments, sorted in increasing order of subjectivity:
1. Local variables are different from struct members and arrays in the sense that you want them to fit in a register. On a 32b/64b target, a local int16_t can make code slower compared to a local int since the compi... | null | CC BY-SA 2.5 | null | 2008-08-17T19:15:31.027 | 2008-08-17T19:15:31.027 | null | null | 1,648 | null |
13,881 | 1 | null | null | 5 | 3,192 | Does anyone here know any resources on how to get started writing a plugin for Google's Picasa? I love it for photo management, but I have some ideas for how it could be better.
- - [Someone already made a very nice version](http://apps.new.facebook.com/picasauploader/)-
I know there are certain APIs and a Picasa2F... | Getting started with a Picasa Plugin | CC BY-SA 3.0 | 0 | 2008-08-17T19:39:51.697 | 2013-04-30T13:48:54.160 | 2013-04-30T13:48:54.160 | 21,960 | 1,266 | [
"api",
"plugins",
"picasa",
"photo-management"
] |
13,902 | 2 | null | 13,857 | 8 | null | I've never heard of transactions being used in the same context as explaining what a closure is and there really aren't any transaction semantics here.
It's called a closure because it "closes over" the outside variable (constant)--i.e., it's not just a function but an enclosure of the environment where the function w... | null | CC BY-SA 3.0 | null | 2008-08-17T20:20:20.333 | 2015-12-19T10:43:31.323 | 2015-12-19T10:43:31.323 | 2,925,169 | 1,659 | null |
13,882 | 2 | null | 13,791 | 1 | null | The idea is that I'll read in an escaped string, and unescape it (a feature notably lacking from Python, which you shouldn't need to resort to regular expressions for in the first place). Unfortunately I'm not being tricked by the backslashes...
Another illustrative example:
```
>>> mystring = r"This is \n ridiculous... | null | CC BY-SA 2.5 | null | 2008-08-17T19:40:49.820 | 2008-08-17T19:40:49.820 | null | null | 1,370 | null |
13,903 | 2 | null | 13,851 | 0 | null | > > The solution...display: block
That question couldn't be answered properly without knowing the rendering mode that the browser was in; you need to tell people what doctype you have if you have CSS rendering issues. The image behaviour you refer to is different in quirks mode as opposed to standards mode. A minimal ... | null | CC BY-SA 2.5 | null | 2008-08-17T20:20:50.193 | 2008-08-17T20:20:50.193 | null | null | 137 | null |
13,904 | 2 | null | 10,478 | 1 | null | [Introduction to Range](http://www.quirksmode.org/dom/range_intro.html) has some details on how different browsers give you access to the text selection.
My experience is that working with these different APIs directly is quite clumsy so if [wrapSelection](http://plugins.jquery.com/project/wrapSelection) works for you... | null | CC BY-SA 2.5 | null | 2008-08-17T20:21:46.323 | 2008-08-17T20:21:46.323 | null | null | 1,654 | null |
13,899 | 2 | null | 10,313 | 3 | null | Powershell uses the abstraction of Providers to provide a common interface into datastores. These seem to stick with the common noun "Item", so you can get a complete list with `man *item*`. If you know another way to copy and otherwise work with data from a store, you might as well use it, but using the cmdlets prov... | null | CC BY-SA 2.5 | null | 2008-08-17T20:13:50.427 | 2008-08-17T21:18:01.263 | 2008-08-17T21:18:01.263 | 1,635 | 1,635 | null |
13,893 | 1 | 526,939 | null | 4 | 1,068 | For .net 3.5 SP1, Microsoft have the new client profile which installs only a subset of .net 3.5 SP1 on to Windows XP user's machines.
I'm aware of how to make my assemblies client-profile ready. And I've read the articles on how to implement an installer for [ClickOnce](http://msdn.microsoft.com/en-us/library/cc65691... | How do I make a custom .net client profile installer? | CC BY-SA 2.5 | 0 | 2008-08-17T20:03:22.600 | 2012-01-10T19:15:33.840 | 2012-01-10T19:15:33.840 | 50,776 | 483 | [
"deployment",
".net-3.5",
"installation",
".net-client-profile"
] |
13,907 | 2 | null | 10,478 | -3 | null | The behaviour of individual browsers with regard to selection is [outlined here](http://quirksmode.org/dom/w3c_range.html).
| null | CC BY-SA 2.5 | null | 2008-08-17T20:25:28.047 | 2008-08-17T20:25:28.047 | null | null | 1,370 | null |
13,914 | 2 | null | 10,478 | -3 | null | This code works in Safari, IE and Firefox - hope it's of some help
```
var str = (window.getSelection) ? window.getSelection() : document.selection.createRange();
str = str.text || str;
str = str + ''; // the best way to make object a string...
```
| null | CC BY-SA 3.0 | null | 2008-08-17T20:35:22.440 | 2015-02-07T19:38:37.680 | 2015-02-07T19:38:37.680 | 722 | 137 | null |
13,905 | 2 | null | 2,630 | 0 | null | ls (Get-ChildItem)
rm (Remove-Item)
ps (Get-Process)
and the rest of my familiar commands that now "just work" :)
but seriously... New-Object would have to get my vote. With it, powershell can do ANYTHING :)
| null | CC BY-SA 2.5 | null | 2008-08-17T20:23:44.167 | 2008-08-17T20:23:44.167 | null | null | 1,635 | null |
13,919 | 2 | null | 13,786 | 1 | null | Unfortunately not - I'd rate myself as a fairly techy person and at home I use Firefox 3 and IE7, but at work (a large American Pharma) I have to use IE6, and I don't think that's going change any time soon. The company has a significant investment in an internal line of web-based apps - the business case for testing ... | null | CC BY-SA 2.5 | null | 2008-08-17T20:49:36.517 | 2008-08-17T20:49:36.517 | null | null | 1,461 | null |
13,910 | 2 | null | 1,836 | 12 | null | The "correct" way to do this is to respond to the WM_SYSCOMMAND message. In C# this looks something like this:
```
protected override void WndProc(ref Message m)
{
// Abort screensaver and monitor power-down
const int WM_SYSCOMMAND = 0x0112;
const int SC_MONITOR_POWER = 0xF170;
const int SC_SCREENSAVE ... | null | CC BY-SA 2.5 | null | 2008-08-17T20:29:35.697 | 2008-08-17T20:29:35.697 | null | null | 891 | null |
13,924 | 2 | null | 13,893 | 0 | null | Can you clarify: Are you trying to write an installer for your app, which depends on the Client-Profile, or are you trying to write a custom installer the client-profile?
I haven't used it personally, but if it's anything like the dotnetfx 1 and 2 msi's, you basically have to just invoke it's executable yourself from... | null | CC BY-SA 2.5 | null | 2008-08-17T21:02:04.820 | 2008-08-17T21:02:04.820 | null | null | 234 | null |
13,906 | 2 | null | 13,857 | 15 | null | I like [this rough, succinct definition](http://effbot.org/zone/closure.htm):
> A function that can refer to environments that are no longer active.
I'd add
> A closure allows you to bind variables into a function .
Decorators which accept parameters are a common use for closures. Closures are a common implementat... | null | CC BY-SA 2.5 | null | 2008-08-17T20:25:18.687 | 2008-08-17T21:11:20.903 | 2008-08-17T21:11:20.903 | 150 | 150 | null |
13,923 | 2 | null | 13,768 | 16 | null | Ideally Stack Overflow would allow you to change your OpenID.
OTOH, ideally you would have set up [OpenID delegation](http://wiki.openid.net/Delegation) on your own site, and used that to identify yourself.
With delegation, you would need only change which service you delegate to. You'd still be identified by your ow... | null | CC BY-SA 2.5 | null | 2008-08-17T20:59:10.850 | 2008-08-17T20:59:10.850 | null | null | 1,472 | null |
13,927 | 1 | 14,054 | null | 23 | 7,305 | When I've registered an object to receive KVO notifications from another object (using addObserver:...), if I then deallocate do I need to send a `removeObserver:forKeyPath:` message to in -dealloc?
| In Cocoa do I need to remove an Object from receiving KVO notifications when deallocating it? | CC BY-SA 3.0 | 0 | 2008-08-17T21:05:13.083 | 2022-09-20T14:27:30.610 | 2012-09-11T14:07:18.413 | 672,989 | 1,512 | [
"cocoa",
"macos"
] |
13,920 | 2 | null | 9,355 | 1 | null | > This is one of those questions where it may be good to consider what you're trying to achieve, and whether there's a better method.
To add some more context -
Our company develops a C# client application, which allows users to load files and do stuff with them, kind of like how iTunes manages your MP3 files without... | null | CC BY-SA 2.5 | null | 2008-08-17T20:52:22.750 | 2009-12-23T23:57:54.310 | 2009-12-23T23:57:54.310 | 234 | 234 | null |
13,926 | 2 | null | 13,678 | 0 | null | It seems that if you are trying to prepare our team for a future in programming that C(++) ma be the better route. The promise of general programming languages that are built with visual building blocks has never seemed to materialize and I am beginning to wonder if they ever will. It seems that while it can be done fo... | null | CC BY-SA 2.5 | null | 2008-08-17T21:02:37.910 | 2008-08-17T21:02:37.910 | null | null | 1,104 | null |
13,886 | 2 | null | 13,678 | 12 | null | I've encountered a somewhat similar situation in the research group I'm currently working in. It's a biophysics group, and we're using LabVIEW all over the place to control our instruments. That works absolutely great: it's easy to assemble a UI to control all aspects of your instruments, to view its status and to save... | null | CC BY-SA 2.5 | null | 2008-08-17T19:44:21.653 | 2008-08-17T19:44:21.653 | null | null | 1,037 | null |
13,933 | 2 | null | 13,832 | 1 | null | I'm not sure, if you talk about VB or VB.Net.
Either way, have a look at [Nant Contrib](http://nantcontrib.sourceforge.net/release/latest/help/tasks/). Maybe they have a solution.
| null | CC BY-SA 2.5 | null | 2008-08-17T21:15:22.237 | 2008-08-17T21:15:22.237 | null | null | 1,069 | null |
13,931 | 2 | null | 13,786 | 0 | null | It would be nice if we could deny support for terribly non-compliant browsers. The problem is, That's note exactly what we're going for. I propose a different technique. What if all anti-IE developers put a "Please stop using your crappy browser" splash screen for all IE(6) users accessing their web site. They co... | null | CC BY-SA 2.5 | null | 2008-08-17T21:12:29.107 | 2008-08-17T21:12:29.107 | null | null | 1,615 | null |
13,942 | 2 | null | 13,678 | 4 | null | I think that graphical languages wil always be limited in expressivity compared to textual ones. Compare trying to communicate in visual symbols (e.g., REBUS or sign language) to communicating using words.
For simple tasks, using a graphical language is usually easier but for more intricate logic, I find that graphic... | null | CC BY-SA 2.5 | null | 2008-08-17T21:34:02.650 | 2008-08-17T21:34:02.650 | null | null | 1,659 | null |
13,932 | 2 | null | 9,033 | 27 | null | There's also the ThreadStaticAttribute to make a static field unique per thread, so you can have strongly typed thread-local storage.
Even if extension methods aren't that secret (LINQ is based on them), it may not be so obvious as to how useful and more readable they can be for utility helper methods:
```
//for addi... | null | CC BY-SA 2.5 | null | 2008-08-17T21:13:24.393 | 2008-08-17T21:13:24.393 | null | null | 1,659 | null |
13,930 | 2 | null | 13,786 | 15 | null | This depends so much on the context of the application, and of its users. There are two key aspects: what browsers are your users using; and how important is it that they can access/interact with your site.
The first part is generally easily establish, you have an existing version with stats (Google Analytics or simi... | null | CC BY-SA 3.0 | null | 2008-08-17T21:08:32.343 | 2013-02-01T07:35:24.333 | 2013-02-01T07:35:24.333 | 14,149 | 1,521 | null |
13,943 | 2 | null | 13,791 | 10 | null | Isn't that what Anders' second example does?
In 2.5 there's also a `string-escape` encoding you can apply:
```
>>> mystring = r"This is \n a test \r"
>>> mystring.decode('string-escape')
'This is \n a test \r'
>>> print mystring.decode('string-escape')
This is
a test
>>>
```
| null | CC BY-SA 2.5 | null | 2008-08-17T21:36:32.693 | 2008-08-17T21:36:32.693 | null | null | 1,472 | null |
13,944 | 2 | null | 12,501 | 0 | null | I'm guessing that this is a change to the cmdlet made during the configuration process Configure-Wsman.ps1. I don't have an environment setup to test right now, but I'm guessing something went wrong with the configuration. I can verify that on XP the parameter is not available (duh). I'd assume that you will find th... | null | CC BY-SA 2.5 | null | 2008-08-17T21:37:37.230 | 2008-08-17T21:37:37.230 | null | null | 1,635 | null |
13,941 | 1 | 13,949 | null | 72 | 82,688 | I'd like to have a python program alert me when it has completed its task by making a beep noise. Currently, I use `import os` and then use a command line speech program to say "Process complete". I much rather it be a simple "bell."
I know that there's a function that can be used in apps, `NSBeep`, but I don't thi... | Python Sound ("Bell") | CC BY-SA 4.0 | 0 | 2008-08-17T21:33:39.780 | 2022-06-20T18:57:17.270 | 2020-07-02T15:02:41.017 | 4,000,964 | 1,615 | [
"python",
"macos",
"audio",
"terminal"
] |
13,959 | 2 | null | 13,941 | 7 | null | I had to turn off the "Silence terminal bell" option in my active Terminal Profile in iTerm for `print('\a')` to work. It seemed to work fine by default in Terminal.
You can also use the Mac module `Carbon.Snd` to play the system beep:
```
>>> import Carbon.Snd
>>> Carbon.Snd.SysBeep(1)
>>>
```
The Carbon modules d... | null | CC BY-SA 2.5 | null | 2008-08-17T21:56:10.750 | 2008-08-17T21:56:10.750 | null | null | 1,472 | null |
13,953 | 2 | null | 13,938 | 0 | null | This is a bit of fiddly solution, but you could configure some [external tools](http://blogs.msdn.com/saraford/archive/2008/04/24/did-you-know-you-can-run-external-tools-within-visual-studio-201.aspx) for each of group of tests you want to run. I'm not sure if you'll be able to launch the ReSharper test runner this way... | null | CC BY-SA 2.5 | null | 2008-08-17T21:52:03.737 | 2008-08-17T21:52:03.737 | null | null | 1,367 | null |
13,958 | 2 | null | 13,791 | 0 | null | Mark; his second example requires every escaped character thrown into an array initially, which generates a KeyError if the escape sequence happens not to be in the array. It will die on anything but the three characters provided (give \v a try), and enumerating every possible escape sequence every time you want to une... | null | CC BY-SA 2.5 | null | 2008-08-17T21:55:54.167 | 2008-08-17T21:55:54.167 | null | null | 1,370 | null |
13,963 | 1 | 13,990 | null | 9 | 3,054 | I want to parse a config file sorta thing, like so:
```
[KEY:Value]
[SUBKEY:SubValue]
```
Now I started with a `StreamReader`, converting lines into character arrays, when I figured there's gotta be a better way. So I ask you, humble reader, to help me.
One restriction is that it has to work in a Linux/Mon... | Best method of Textfile Parsing in C#? | CC BY-SA 3.0 | 0 | 2008-08-17T22:02:31.097 | 2015-12-29T02:45:57.650 | 2015-11-20T11:36:42.473 | 3,218,692 | 61 | [
"c#",
"fileparse"
] |
13,949 | 2 | null | 13,941 | 88 | null | Have you tried :
```
import sys
sys.stdout.write('\a')
sys.stdout.flush()
```
That works for me here on Mac OS 10.5
Actually, I think your original attempt works also with a little modification:
```
print('\a')
```
(You just need the single quotes around the character sequence).
| null | CC BY-SA 2.5 | null | 2008-08-17T21:46:02.533 | 2008-08-17T21:46:02.533 | null | null | 1,667 | null |
13,967 | 2 | null | 10,524 | 0 | null | The Entity framework converts LINQ expressions into Entity Command trees and within that only its canonical functions are supported. You'd have to use the command trees with canonical functions to do something like PredicateBuilder.
| null | CC BY-SA 2.5 | null | 2008-08-17T22:06:30.667 | 2008-08-17T22:06:30.667 | null | null | 1,659 | null |
13,938 | 1 | 13,969 | null | 4 | 1,528 | 
I need some advice as to how I easily can separate test runs for unit tests and integration test in Visual Studio. Often, or always, I structure the solution as presented in the above picture: separate projects for unit tests and integration tests.... | How do I run (unit) tests in different folders/projects separately in Visual Studio? | CC BY-SA 3.0 | 0 | 2008-08-17T21:21:07.670 | 2012-04-01T10:02:32.397 | 2012-04-01T10:02:32.397 | 1,219,121 | 446 | [
"visual-studio",
"unit-testing",
"configuration",
"vsx",
"extensibility"
] |
13,974 | 2 | null | 13,963 | 0 | null | It looks to me that you would be better off using an XML based config file as there are already .NET classes which can read and store the information for you relatively easily. Is there a reason that this is not possible?
@Bernard:
Then yes, has a good method there.
| null | CC BY-SA 2.5 | null | 2008-08-17T22:12:15.740 | 2008-08-17T22:39:34.843 | 2008-08-17T22:39:34.843 | 1,053 | 1,053 | null |
13,935 | 2 | null | 12,565 | 74 | null | It depends on the context:
1. When on their own, or assigning to a variable, [] creates arrays, and {} creates hashes. e.g. a = [1,2,3] # an array
b = {1 => 2} # a hash
2. [] can be overridden as a custom method, and is generally used to fetch things from hashes (the standard library sets up [] as a method on hashes ... | null | CC BY-SA 3.0 | null | 2008-08-17T21:17:44.680 | 2014-12-04T05:34:45.623 | 2014-12-04T05:34:45.623 | 128,421 | 234 | null |
13,982 | 2 | null | 4,913 | 2 | null | You could probably also use the ControlPaint class for this.
| null | CC BY-SA 2.5 | null | 2008-08-17T22:25:53.047 | 2008-08-17T22:25:53.047 | null | null | 1,659 | null |
13,969 | 2 | null | 13,938 | 2 | null | I actually found kind of a solution for this on my own by using keyboard command bound to a macro. The macro was recorded from the menu Tools>Macros>Record TemporaryMacro. While recording I selected my [Tests] folder and ran ReSharpers UnitTest.ContextRun. This resulted in the following macro,
```
Sub TemporaryMacro(... | null | CC BY-SA 2.5 | null | 2008-08-17T22:08:13.627 | 2008-08-17T22:08:13.627 | null | null | 446 | null |
13,975 | 2 | null | 13,963 | 0 | null | You can also use a stack, and use a push/pop algorithm. This one matches open/closing tags.
```
public string check()
{
ArrayList tags = getTags();
int stackSize = tags.Count;
Stack stack = new Stack(stackSize);
foreach (string tag in tags)
{
if (!tag.Contain... | null | CC BY-SA 2.5 | null | 2008-08-17T22:12:19.267 | 2008-08-17T22:12:19.267 | null | null | null | null |
13,978 | 2 | null | 13,550 | 0 | null | The project I'm on originally went w/ the Oracle Development Suite to put together a web application.
Over time (5+ years), customer requirements became more complex than originally anticipated, and the screens were not easily maintainable. So, the team informally decided to start doing custom (hand coded) screens in... | null | CC BY-SA 2.5 | null | 2008-08-17T22:17:46.947 | 2008-08-17T22:17:46.947 | null | null | null | null |
13,972 | 2 | null | 13,753 | 1 | null | When you included $_.properties.name in the string, it was returning the type name of the property. When a variable is included in a string and the string is evaluated, it calls the ToString method on that object referenced by the variable (not including the members specified after).
In this case, the ToString meth... | null | CC BY-SA 3.0 | null | 2008-08-17T22:10:02.907 | 2015-09-10T13:48:04.913 | 2015-09-10T13:48:04.913 | 4,779,472 | 1,233 | null |
13,987 | 2 | null | 13,981 | 1 | null | A good starting point is probably to read the source of the [ParseTree](http://rubyforge.org/projects/parsetree/) library, which lets you get at and mess with the AST from ruby.
| null | CC BY-SA 2.5 | null | 2008-08-17T22:36:13.103 | 2008-08-17T22:36:13.103 | null | null | 234 | null |
13,992 | 2 | null | 9,304 | 1 | null | One thing to note here is that, to my understanding, this is syntactic sugar on the C# 3.0 end, meaning that the IL generated by the compiler is the same. I agree about avoiding black magic, but all the same, fewer lines for the same thing is usually a good thing.
| null | CC BY-SA 2.5 | null | 2008-08-17T22:40:15.170 | 2008-08-17T22:40:15.170 | null | null | 1,266 | null |
14,007 | 2 | null | 11,055 | 1 | null | You also need to include indexes in your estimates. I've seen systems where the indexes were as big as the data. The only way I would trust the answer is to do prototyping like Eric Z Beard suggests. Different datbase systems have different overhead, but they all have it.
| null | CC BY-SA 2.5 | null | 2008-08-17T23:22:37.067 | 2008-08-17T23:22:37.067 | null | null | 791 | null |
13,981 | 1 | null | null | 2 | 710 | I understand that the `Ruby 1.8 AST` is traversed at runtime using a big switch statement, and many things like calling a method in a class or parent module involve the interpreter looking up and down the tree as it goes. Is there a straightforward way of accessing this `AST` in a `Ruby C` extension? Does it involve th... | How do I access the Ruby AST from C level code? | CC BY-SA 3.0 | null | 2008-08-17T22:23:58.790 | 2015-08-11T07:46:15.140 | 2013-07-04T12:15:19.907 | 1,584,286 | 14,446 | [
"c",
"ruby",
"tree",
"interpreter"
] |