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 ⌀ |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
39,061 | 1 | 39,072 | null | 1 | 432 | I've convinced myself that they can't.
Take for example:
4 4 + 4 /
stack: 4
stack: 4 4
4 + 4 = 8
stack: 8
stack: 8 4
8 / 4 = 2
stack: 2
There are two ways that you could write the above expression with the
same operators and operands such that the operands all come first: "4
4 4 + /" and "4 4 4 / +", neither of w... | Can all RPN expressions be represented such that all operators appear on the left and all operands appear on the right? | CC BY-SA 2.5 | null | 2008-09-02T09:01:50.137 | 2012-12-13T04:27:28.473 | 2008-09-02T09:03:11.723 | 718 | 4,175 | [
"rpn"
] |
39,065 | 1 | 39,083 | null | 9 | 21,635 | I am working on localization for a asp.net application that consists of several projects.
For this, there are some strings that are used in several of these projects. Naturally, I would prefer to have only one copy of the resource file in each project.
Since the resource files don't have an namespace (at least as far... | Referencing resource files from multiple projects in a solution | CC BY-SA 2.5 | 0 | 2008-09-02T09:05:04.433 | 2009-02-17T18:50:25.993 | 2008-09-02T09:08:50.213 | 718 | 1,090 | [
"c#",
"localization",
"resx"
] |
39,070 | 1 | 84,138 | null | 2 | 2,961 | We need to move off traditional FTP for security purposes (it transmits it's passwords unencrypted). I am hearing SSH touted as the obvious alternative. However I have been driving FTP from an ASP.NET program interface to automate my web-site development, which is now quite a highly web-enabled process.
Can anyone re... | Programmable, secure FTP replacement | CC BY-SA 2.5 | 0 | 2008-09-02T09:06:04.260 | 2014-01-24T23:33:48.993 | null | null | 4,180 | [
"asp.net",
"ftp"
] |
39,053 | 1 | null | null | 3 | 8,401 | I'm trying to access a data source that is defined within a web container (JBoss) from a fat client outside the container.
I've decided to look up the data source through JNDI. Actually, my persistence framework (Ibatis) does this.
When performing queries I always end up getting this error:
```
java.lang.IllegalAcce... | Accessing Datasource from Outside A Web Container (through JNDI) | CC BY-SA 2.5 | 0 | 2008-09-02T08:55:32.413 | 2009-01-20T17:39:48.077 | null | null | null | [
"jboss",
"datasource",
"jndi",
"ibatis"
] |
39,052 | 2 | null | 4,306 | 24 | null | The accepted answer recommends using strings to represent multi-dimensional indices.
However, constructing strings is needlessly wasteful for this. If the size isn’t known at compile time (and thus `std::tuple` doesn’t work), `std::vector` works well as an index, both with hash maps and ordered trees. For `std::map`, t... | null | CC BY-SA 4.0 | null | 2008-09-02T08:53:39.763 | 2020-12-17T18:30:29.483 | 2020-12-17T18:30:29.483 | 1,968 | 1,968 | null |
39,068 | 2 | null | 39,061 | 0 | null | It is enough to show one that can't in order to tell you the answer to this.
If you can't reorder the stack contents, then the expression (2+4)*(7+8) can't be rearranged.
2 4 + 7 8 + *
No matter how you reorder this, you'll end up with something that needs to be summed before you go on.
At least I believe so.
| null | CC BY-SA 2.5 | null | 2008-09-02T09:05:53.183 | 2008-09-02T09:05:53.183 | null | null | 267 | null |
39,066 | 1 | null | null | 26 | 41,605 | Whenever I use my MacBook away from my desk and later plug it into an external display (as primary), I get into the state of having windows deposited in both the notebook monitor and the external one.
To move all windows to a single screen, my current solution is to "Turn on mirroring" in the display preferences and t... | Move all windows to a single monitor (with two attached) in Mac OS X? | CC BY-SA 2.5 | 0 | 2008-09-02T09:05:28.643 | 2021-02-12T14:58:02.237 | 2017-05-23T12:17:33.887 | -1 | 4,161 | [
"macos",
"multiple-monitors"
] |
39,071 | 2 | null | 39,061 | 1 | null | Actually, you've not only given the answer but a conclusive proof as well, by examining a counter-example which is enough to disprove the assumption implied in the title.
| null | CC BY-SA 2.5 | null | 2008-09-02T09:06:25.897 | 2008-09-02T09:06:25.897 | null | null | 1,968 | null |
39,074 | 2 | null | 39,070 | 1 | null | We have used a variation of [this solution](http://www.jscape.com/articles/sftp_using_csharp.html) in the past which uses the SSH Factory for .NET
| null | CC BY-SA 2.5 | null | 2008-09-02T09:09:49.663 | 2008-09-02T09:09:49.663 | null | null | 3,201 | null |
39,069 | 2 | null | 39,059 | 1 | null | You will have to assign the `Lock pages in memory` privilege to any user that runs your application. This includes administrators.
1. Select Control Panel -> Administrative Tools -> Local Security Policy
2. Select Local Policies -> User Rights Assignment
3. Double click "Lock pages in memory", add users and/or group... | null | CC BY-SA 3.0 | null | 2008-09-02T09:05:58.987 | 2017-07-04T08:43:40.250 | 2017-07-04T08:43:40.250 | 5,423,108 | 770 | null |
39,064 | 1 | null | null | 2 | 2,625 | I'm trying to call a 3rd party vendor's C DLL from vb.net 2005 and am getting `P/Invoke` errors. I'm successfully calling other methods but have hit a bottle-neck on one of the more complex. The structures involved are horrendous and in an attempt to simplify the troubleshooting I'd like to create a C++ DLL to replic... | Very simple C++ DLL that can be called from .net | CC BY-SA 4.0 | 0 | 2008-09-02T09:04:08.600 | 2018-11-25T16:51:19.813 | 2018-11-25T16:51:19.813 | null | null | [
".net",
"c++",
"dll"
] |
39,075 | 2 | null | 39,070 | 4 | null | [sharpssh](http://www.codeproject.com/KB/IP/sharpssh.aspx) implements sending files via scp.
| null | CC BY-SA 2.5 | null | 2008-09-02T09:10:08.930 | 2008-09-02T09:10:08.930 | null | null | 720 | null |
39,072 | 2 | null | 39,061 | 2 | null | Consider the algebraic expression:
```
(a + b) * (c + d)
```
The obvious translation to RPN would be:
```
a b + c d + *
```
Even with a swap operation available, I don't think there is a way to collect all the operators on the right:
```
a b c d +
a b S
```
where S is the sum of c and d. At this point, you cou... | null | CC BY-SA 2.5 | null | 2008-09-02T09:08:08.793 | 2008-09-02T09:08:08.793 | null | null | 893 | null |
39,083 | 2 | null | 39,065 | 12 | null | You can just create a class library project, add a resource file there, and then refer to that assembly for common resources.
| null | CC BY-SA 2.5 | null | 2008-09-02T09:16:56.497 | 2008-09-02T09:16:56.497 | null | null | 372 | null |
39,079 | 2 | null | 39,064 | 2 | null | Try using the [__decspec(dllexport)](http://msdn.microsoft.com/en-us/library/3y1sfaz2.aspx) magic pixie dust in your C++ function declaration. This declaration sets up several things that you need to successfully export a function from a DLL. You may also need to use WINAPI or something similar:
```
__declspec(dllexpo... | null | CC BY-SA 2.5 | null | 2008-09-02T09:13:31.043 | 2008-09-02T09:13:31.043 | null | null | 893 | null |
39,089 | 2 | null | 39,086 | 5 | null | Create a new file, copy lines from the old to the new, and do the replacing before you write the lines to the new file.
| null | CC BY-SA 2.5 | null | 2008-09-02T09:24:20.953 | 2008-09-02T09:24:20.953 | null | null | 267 | null |
39,086 | 1 | 39,110 | null | 356 | 587,328 | I want to loop over the contents of a text file and do a search and replace on some lines and write the result back to the file. I could first load the whole file in memory and then write it back, but that probably is not the best way to do it.
What is the best way to do this, within the following code?
```
f = open(... | Search and replace a line in a file in Python | CC BY-SA 2.5 | 0 | 2008-09-02T09:19:04.417 | 2022-02-28T00:57:54.613 | 2009-09-07T10:11:09.283 | 12,855 | 4,166 | [
"python",
"file"
] |
39,091 | 2 | null | 33,250 | 3 | null | In order to take control over the properties that you want to be cached you can call 'RefreshCache()' passing the properties that you want to hang around:
```
System.DirectoryServices.DirectoryEntry entry = new System.DirectoryServices.DirectoryEntry();
// Push the property values from AD back to cache... | null | CC BY-SA 3.0 | null | 2008-09-02T09:26:14.133 | 2011-07-20T05:40:53.963 | 2011-07-20T05:40:53.963 | 684,890 | 4,171 | null |
39,095 | 2 | null | 15,694 | 3 | null | I think it is important to target as many users as you can, have you ever considered shipping your application without any managed code at all? You can convert your managed applications to pure machine code using tools such as [http://www.xenocode.com/](http://www.xenocode.com/) or [http://www.remotesoft.com/linker/](h... | null | CC BY-SA 2.5 | null | 2008-09-02T09:31:38.207 | 2008-09-02T09:31:38.207 | null | null | 4,171 | null |
39,096 | 2 | null | 39,092 | 14 | null | Start with OpenGL because there are good textbooks and other online references on it. Once you get the hang of writing 3D game, you would be able to make the judgment for yourself.
Finishing a game, even if it's really stupid and simple just to get you going, is more important than picking the right library. With [glu... | null | CC BY-SA 2.5 | null | 2008-09-02T09:32:30.920 | 2008-09-02T09:57:44.417 | 2008-09-02T09:57:44.417 | 3,827 | 3,827 | null |
39,094 | 2 | null | 39,070 | 0 | null | G'day,
You might like to look at [ProFPD](http://www.proftpd.org/).
Heavily customisable. Based on Apache module structure.
From their web site:
> ProFTPD grew out of the desire to have a secure and configurable FTP server, and out of a significant admiration of the Apache web server.
We use our adapted version for lar... | null | CC BY-SA 2.5 | null | 2008-09-02T09:31:30.220 | 2008-09-02T09:31:30.220 | 2020-06-20T09:12:55.060 | -1 | 2,974 | null |
39,098 | 2 | null | 39,092 | 0 | null | To start with, we've got the [Wikipedia comparison of OpenGL and Direct3D](http://en.wikipedia.org/wiki/Comparison_of_OpenGL_and_Direct3D).
But I'd really like to hear some practical viewpoints, especially in the light of recent developments of OpenGL 3.0 and DirectX 10.
| null | CC BY-SA 2.5 | null | 2008-09-02T09:34:31.350 | 2008-09-02T09:34:31.350 | null | null | 2,948 | null |
39,099 | 2 | null | 33,250 | 2 | null | Depends on how up to date you want the information to be. If you the very latest data in your report then querying directly from AD is reasonable. And I agree that AD is quite robust, a typical dedicated AD server is actually very lightly utilised in normal day to day operations
An alternative is to have a daily s... | null | CC BY-SA 2.5 | null | 2008-09-02T09:35:08.153 | 2008-09-02T09:35:08.153 | null | null | 993 | null |
39,092 | 1 | null | null | 10 | 6,832 | I'm starting a hobby game project on Windows that will make heavy use of 3D graphics effects. It will most likely be written in C++.
Should I use OpenGL or Direct3D for my graphics backend? Why?
Or should I use a ready-made graphics engine such as [OGRE 3D](http://www.ogre3d.org/)? Which one?
Some "how to get starte... | OpenGL or Direct3D for a new Windows game project? Or something else? | CC BY-SA 2.5 | 0 | 2008-09-02T09:28:12.630 | 2011-10-19T15:50:02.510 | 2017-05-23T12:09:11.293 | -1 | 2,948 | [
"windows",
"opengl",
"directx"
] |
39,101 | 2 | null | 2,658 | 0 | null | I started to use subversion after reading Wil Shipleys blog.
So I started checking in code, one machine and dreamhost account. Then after I accidentally deleted a function and saved my project I knew I was in deep "dudu", but with subversion I just checked out the latest version of that file and it was like nothing h... | null | CC BY-SA 2.5 | null | 2008-09-02T09:35:40.787 | 2008-09-02T09:35:40.787 | null | null | null | null |
39,078 | 2 | null | 39,065 | 4 | null | Some useful advice on how to manage a situation like this is available here:
[http://www.codeproject.com/KB/dotnet/Localization.aspx](http://www.codeproject.com/KB/dotnet/Localization.aspx)
| null | CC BY-SA 2.5 | null | 2008-09-02T09:13:17.410 | 2008-09-02T09:13:17.410 | null | null | 770 | null |
39,105 | 2 | null | 39,092 | 2 | null | I did my dissertation at uni on a comparison of OpenGL vs Direct3D. The real benefits of Direct3D are that it has a regular release schedule - it's always being updated to take advantage of the latest advances in graphics hardware. How long has it taken between the OpenGL 2.0 and 3.0 releases? Also, a lot of work has b... | null | CC BY-SA 2.5 | null | 2008-09-02T09:40:36.767 | 2008-09-02T09:40:36.767 | null | null | 986 | null |
39,106 | 2 | null | 30,653 | 7 | null | You can create COM+ components using System.EnterpriseServices.ServicedComponent. Consequently, you'll be able to create out-of-proc and in-proc (client) component activation as well as all COM+ benefits of pooling, remoting, run as a windows service etc.
| null | CC BY-SA 2.5 | null | 2008-09-02T09:41:09.230 | 2008-09-02T09:41:09.230 | null | null | 4,171 | null |
39,104 | 1 | null | null | 33 | 32,018 | I've written a Python package that includes a bsddb database of pre-computed values for one of the more time-consuming computations. For simplicity, my setup script installs the database file in the same directory as the code which accesses the database (on Unix, something like /usr/lib/python2.5/site-packages/mypacka... | Finding a file in a Python module distribution | CC BY-SA 3.0 | 0 | 2008-09-02T09:40:26.580 | 2019-06-22T09:51:10.703 | 2014-04-14T17:22:10.883 | 821,378 | 4,198 | [
"python",
"distutils"
] |
39,109 | 2 | null | 7,535 | 5 | null | You can set the database compatibility level, but there is no guarantee that this will cover all your bases. For example the new data types will be available on the SQL 2008 system, but they won't be available on the SQL 2005 server.
The only way to guarantee that everything will work from Dev to Prod is to put SQL 2... | null | CC BY-SA 2.5 | null | 2008-09-02T09:42:18.180 | 2008-09-02T09:42:18.180 | null | null | 4,197 | null |
39,111 | 2 | null | 39,107 | 3 | null | What kind of network traffic? If it's HTTP this will work for you:
[http://www.charlesproxy.com/](http://www.charlesproxy.com/)
| null | CC BY-SA 2.5 | null | 2008-09-02T09:42:36.277 | 2008-09-02T09:42:36.277 | null | null | 986 | null |
39,107 | 1 | 39,875 | null | 18 | 13,627 | I've written some applications than heavily use network, and I would like to test it over a slow network. I'm looking for a tool to simulate these kind of connections.
I'm only interested in Windows tools.
| Tools for degrading my network connection? | CC BY-SA 3.0 | 0 | 2008-09-02T09:41:23.410 | 2013-11-22T18:20:27.870 | 2013-07-18T19:17:12.570 | 1,128,737 | 1,578 | [
"networking",
"bandwidth",
"throttling"
] |
39,110 | 2 | null | 39,086 | 232 | null | I guess something like this should do it. It basically writes the content to a new file and replaces the old file with the new file:
```
from tempfile import mkstemp
from shutil import move, copymode
from os import fdopen, remove
def replace(file_path, pattern, subst):
#Create temp file
fh, abs_path = mkstemp... | null | CC BY-SA 4.0 | null | 2008-09-02T09:42:21.037 | 2020-01-17T12:59:49.743 | 2020-01-17T12:59:49.743 | 4,059 | 4,059 | null |
39,112 | 1 | 40,065 | null | 81 | 41,196 | I know in certain circumstances, such as long running processes, it is important to lock ASP.NET cache in order to avoid subsequent requests by another user for that resource from executing the long process again instead of hitting the cache.
What is the best way in c# to implement cache locking in ASP.NET?
| What is the best way to lock cache in asp.net? | CC BY-SA 2.5 | 0 | 2008-09-02T09:42:44.373 | 2023-01-16T10:34:07.180 | null | null | 2,471 | [
"c#",
".net",
"asp.net",
"caching"
] |
39,118 | 2 | null | 39,064 | 0 | null | You can try to look at the exported functions (through DumpBin or Dependency Walker) and see if the names are mangled.
| null | CC BY-SA 2.5 | null | 2008-09-02T09:46:13.930 | 2008-09-02T09:46:13.930 | null | null | 2,150 | null |
39,103 | 2 | null | 36,430 | 11 | null |
# Useful command: Rake
In addition to the commands listed by Joseph Pecoraro, the 'rake' command is also pretty standard when working with Ruby. Rake makes it easy to automate (simple) tasks; like building a RubyGem or running your unit tests.
With rake, the only important command to remember is 'rake -T', which s... | null | CC BY-SA 2.5 | null | 2008-09-02T09:37:49.753 | 2008-09-02T09:37:49.753 | null | null | 4,187 | null |
39,116 | 1 | 39,147 | null | 17 | 15,535 | I'm working on a module for a CMS. This module is distributed as a class library DLL.
I have several utility libraries I'd like to use in this module. Is there anyway I can link these libraries statically so I won't have to distribute several DLL's (thereby distributing my utility libraries separately)?
I would like ... | Linking statically in C# | CC BY-SA 2.5 | 0 | 2008-09-02T09:44:16.400 | 2016-10-16T07:20:00.980 | 2008-11-02T02:11:12.410 | null | 4,192 | [
"c#",
"visual-studio-2008",
"linker"
] |
39,120 | 2 | null | 39,107 | 3 | null | How about [this tool](http://www.softpedia.com/get/Network-Tools/Network-Testing/Network-Traffic-Generator.shtml) (network Traffic Generator) ?
| null | CC BY-SA 2.5 | null | 2008-09-02T09:46:32.523 | 2008-09-02T09:46:32.523 | null | null | 2,617 | null |
39,119 | 1 | 39,156 | null | 3 | 6,209 | I have a .Net desktop application with a TreeView as one of the UI elements.
I want to be able to multi-select that TreeView, only that isn't supported at all.
So I'm adding check-boxes to the tree, My problem is that only some items are selectable, and those that aren't can't consistently cascade selections.
Is th... | How can I control checkboxes in a .Net Forms.TreeView? | CC BY-SA 2.5 | null | 2008-09-02T09:46:16.940 | 2012-07-03T13:31:53.910 | 2008-09-02T10:12:13.023 | 615 | 905 | [
".net",
"winforms",
"treeview",
"treenode"
] |
39,122 | 2 | null | 10,819 | 12 | null | The most optimal function would be to use a table instead of a function. Using a function causes extra CPU load to create the values for the data being returned, especially if the values being returned cover a very large range.
| null | CC BY-SA 2.5 | null | 2008-09-02T09:48:19.837 | 2008-09-02T09:48:19.837 | null | null | 4,197 | null |
39,121 | 1 | 39,828 | null | 4 | 572 | I have a project that I would like to start beta testing soon, it is a PHP/MySQL site for programmers. I have beta tested sites before however it was always in-house, and I have never done betas that could/should be seen by someone other then those associated with the project.
How should I go about starting the beta, ... | How do I begin beta testing? | CC BY-SA 3.0 | null | 2008-09-02T09:46:36.907 | 2018-04-06T17:52:48.937 | 2018-04-06T17:52:48.937 | 6,332,918 | 115 | [
"testing",
"beta"
] |
39,123 | 2 | null | 39,121 | 2 | null | Check out [Jeff's post](http://www.codinghorror.com/blog/archives/001159.html) on it, I think he has recent experience ;-)
| null | CC BY-SA 2.5 | null | 2008-09-02T09:48:27.107 | 2008-09-02T09:48:27.107 | null | null | 905 | null |
39,097 | 2 | null | 39,066 | 3 | null | Here is a command-line script to do just that: [http://zach.in.tu-clausthal.de/software/](http://zach.in.tu-clausthal.de/software/).
It's a little down the page under "Move Off-Screen Windows to the Main Screen".
---
```
-- Source: http://www.jonathanlaliberte.com/2007/10/19/move-all-windows-to-your-main-screen/
-- ... | null | CC BY-SA 4.0 | null | 2008-09-02T09:33:30.700 | 2021-02-12T14:58:02.237 | 2021-02-12T14:58:02.237 | 2,061,684 | 4,192 | null |
39,108 | 1 | null | null | 5 | 1,629 | What would be the best way to draw a simple animation just before showing a modal [JDialog](https://docs.oracle.com/javase/9/docs/api/javax/swing/JDialog.html)? (i.e. expanding borders from the mouse click point to the dialog location). I thought it would be possible to draw on the glasspane of the parent frame on the ... | Drawing animations at the show of a JDialog | CC BY-SA 4.0 | null | 2008-09-02T09:41:44.017 | 2018-08-08T23:29:56.033 | 2018-08-08T23:29:56.033 | 770,254 | 3,993 | [
"java",
"user-interface",
"swing",
"animation"
] |
39,113 | 2 | null | 39,086 | 19 | null | As lassevk suggests, write out the new file as you go, here is some example code:
```
fin = open("a.txt")
fout = open("b.txt", "wt")
for line in fin:
fout.write( line.replace('foo', 'bar') )
fin.close()
fout.close()
```
| null | CC BY-SA 2.5 | null | 2008-09-02T09:42:57.213 | 2008-09-02T09:42:57.213 | null | null | 3,590 | null |
39,128 | 2 | null | 38,875 | 3 | null | pek, for a short term fix apply one of the solutions suggested by other users. For a mid to long term plan you consider migrating to one of existing web frameworks. They handle all low-level stuff like routing and files inclusion in reliable, secure way, so you can focus on core functionalities.
Any of them is bette... | null | CC BY-SA 2.5 | null | 2008-09-02T09:51:27.643 | 2008-09-02T13:18:36.773 | 2008-09-02T13:18:36.773 | 2,169 | 2,169 | null |
39,132 | 2 | null | 39,125 | 1 | null | I think what deanbates is saying is that he is trying to find a way to keep a DLL public within his own application and private for everything else
| null | CC BY-SA 2.5 | null | 2008-09-02T09:54:48.573 | 2008-09-02T09:54:48.573 | null | null | 372 | null |
39,129 | 2 | null | 39,125 | 1 | null | Forgive my ignorance, but if they're all class libraries, what does the code do? Isn't the purpose of having a dll so that the code can be referenced.
In any case if you mark everything [internal](http://msdn.microsoft.com/en-us/library/7c5ka91b.aspx) it won't be able to be accessed outside its own library
| null | CC BY-SA 2.5 | null | 2008-09-02T09:52:09.453 | 2008-09-02T09:52:09.453 | null | null | 2,975 | null |
39,125 | 1 | null | null | 4 | 1,307 | How can a .net class library project and resulting dll be protected so it cant be referenced by other applications (.net projects) except those projects in my own solution?
| How can a .net class libraries be protected so it cant be referenced by other applications? | CC BY-SA 3.0 | null | 2008-09-02T09:49:42.640 | 2016-09-05T09:15:17.173 | 2016-09-05T09:15:17.173 | 4,147,978 | 254 | [
"c#",
".net",
"class-library"
] |
39,137 | 2 | null | 3,448 | 2 | null | We should always try to make it validate according to standards. We'll be sure that the website will display and work fine on current browsers AND future browsers.
| null | CC BY-SA 2.5 | null | 2008-09-02T09:56:54.997 | 2008-09-02T09:56:54.997 | null | null | 2,868 | null |
39,133 | 2 | null | 39,125 | 8 | null | I think you can't forbid other applications to reference you library.
You can make library's classes internal and provide access to them via [InternalVisibleTo](http://msdn.microsoft.com/en-us/library/system.runtime.compilerservices.internalsvisibletoattribute.aspx) attribute but it won't save you from reflection.
| null | CC BY-SA 2.5 | null | 2008-09-02T09:54:58.713 | 2008-09-02T09:54:58.713 | null | null | 1,196 | null |
39,140 | 2 | null | 39,116 | 3 | null | The short answer for this is no!
You can not link in a dll during compilation.
I don't know if there is some subtle way to do this, but you would probably have to distribute the dlls along with your cms.
The best way to do this is to make some kind of re-distributable.
| null | CC BY-SA 2.5 | null | 2008-09-02T09:58:31.217 | 2008-09-02T09:58:31.217 | null | null | 4,189 | null |
39,144 | 2 | null | 39,112 | 2 | null | Craig Shoemaker has made an excellent show on asp.net caching:
[http://polymorphicpodcast.com/shows/webperformance/](http://polymorphicpodcast.com/shows/webperformance/)
| null | CC BY-SA 2.5 | null | 2008-09-02T10:00:37.327 | 2008-09-02T10:00:37.327 | null | null | 4,189 | null |
39,143 | 2 | null | 20,782 | 2 | null | I finally found the answer. You can call the LoginWindows PSI service an set the credentials to NetworkCredentials using the appropriate user, password and domain tokens. Then you can call any PSI method, as long as the credentials are explicit. Otherwise, using DefaultCredentials you'll get an Unauthorized Access erro... | null | CC BY-SA 2.5 | null | 2008-09-02T10:00:29.870 | 2008-09-02T10:00:29.870 | null | null | 1,360 | null |
39,138 | 2 | null | 37,185 | 1 | null | > "Synchronous sockets are not what I'm after."
Understood - but I think in that case the answer to your original question is that there just isn't a Delphi for async socket IO because it's actually a highly specialized and uncommon requirement.
As a side issue, you might find these links interesting. They're both a... | null | CC BY-SA 2.5 | null | 2008-09-02T09:57:59.407 | 2008-09-02T09:57:59.407 | null | null | 1,737 | null |
39,136 | 2 | null | 33,685 | 1 | null | You could try checking for the data type before casting and actually avoid throwing errors.
You could use functions like:
| null | CC BY-SA 2.5 | null | 2008-09-02T09:56:12.533 | 2008-09-02T10:06:03.193 | 2008-09-02T10:06:03.193 | 3,241 | 3,241 | null |
39,142 | 2 | null | 39,037 | 0 | null | [TallPDF.NET](http://www.xtras.net/products/tallpdfdotnet/) (comes with a hefty price tag) allows you to serve dynamic PDF from any .NET application including ASP.NET pages and web services.
[PDFEdit](http://pdfedit.petricek.net/index_e.html) (free and open source) is an editor for manipulating PDF documents. It has a... | null | CC BY-SA 3.0 | null | 2008-09-02T09:58:51.900 | 2012-05-10T01:02:01.053 | 2012-05-10T01:02:01.053 | 57,611 | 123 | null |
39,135 | 1 | null | null | 8 | 10,593 | I've had a FTP server (Mac OS X, but not the server version) set up for a while where the users are virtual, i.e. they are not actual user accounts in the server's OS, but accounts handled by the FTP server software -- to the OS they all look like the `ftp` user account. I'd like to retire the FTP server software and g... | Can you have virtual users using an SFTP server? | CC BY-SA 2.5 | 0 | 2008-09-02T09:56:01.783 | 2022-09-16T10:06:59.837 | 2008-09-09T07:31:02.680 | 714 | 1,109 | [
"macos",
"ftp",
"ssh",
"sftp"
] |
39,139 | 2 | null | 39,037 | 2 | null | Office 2007 allows for this. I have found [PDFCreator](http://sourceforge.net/projects/pdfcreator/) to be good, the VBA is included in sample files, and have heard that [CutePDF](http://www.cutepdf.com/) is also good. PDFCreator and CutePDF are free.
To work without Office, you would need viewers, as far as I know:
[h... | null | CC BY-SA 2.5 | null | 2008-09-02T09:58:17.707 | 2008-09-02T09:58:17.707 | null | null | 2,548 | null |
39,145 | 2 | null | 38,870 | 5 | null | Personally, I have the synthetic/surrogate key column in many-to-many tables for the following reasons:
- - -
The synthetic key is not a replacement to the natural/compound key nor becomes the `PRIMARY KEY` for that table just because it's the first column in the table, so I partially agree with the Josh Berkus art... | null | CC BY-SA 2.5 | null | 2008-09-02T10:01:00.010 | 2008-09-02T10:01:00.010 | null | null | 993 | null |
39,150 | 2 | null | 39,112 | 0 | null | This article from CodeGuru explains various cache locking scenarios as well as some best practices for ASP.NET cache locking:
[Synchronizing Cache Access in ASP.NET](http://www.codeguru.com/csharp/.net/net_asp/article.php/c5363/)
| null | CC BY-SA 2.5 | null | 2008-09-02T10:02:17.040 | 2008-09-02T10:02:17.040 | null | null | 372 | null |
39,155 | 2 | null | 39,092 | 2 | null | Best thing to do would be to abstract over your renderer as much as possible, to make porting to the other technology as painless as possible.
| null | CC BY-SA 2.5 | null | 2008-09-02T10:08:01.660 | 2008-09-02T10:08:01.660 | null | null | 61 | null |
39,149 | 2 | null | 39,125 | 2 | null | Yep, aku is right. In reality if you want certain types & methods to only be accessible to one application, you're better off compiling it all into one exe & marking those types all internal. You can then obfuscate the code to avoid the issue with reflection (see [here](https://stackoverflow.com/questions/2525/best-n... | null | CC BY-SA 2.5 | null | 2008-09-02T10:02:15.653 | 2008-09-02T10:02:15.653 | 2017-05-23T12:30:42.097 | -1 | 2,975 | null |
39,153 | 2 | null | 39,053 | 0 | null | I think the exception indicates that the SQLConnection object you're trying to retrieve doesn't implement the Serializable interface, so it can't be passed to you the way you asked for it.
From the limited work I've done with JDNI, if you're asking for an object via JNDI it must be serializable. As far as I know, ther... | null | CC BY-SA 2.5 | null | 2008-09-02T10:04:02.420 | 2009-01-20T17:39:48.077 | 2009-01-20T17:39:48.077 | 12,579 | 2,362 | null |
39,147 | 2 | null | 39,116 | 24 | null | You can merge your many DLLs with ILMERGE:
[http://research.microsoft.com/~mbarnett/ILMerge.aspx](http://research.microsoft.com/~mbarnett/ILMerge.aspx)
Haven't tried it myself. Hope it helps.
---
Download here:
[http://www.microsoft.com/downloads/details.aspx?familyid=22914587-B4AD-4EAE-87CF-B14AE6A939B0&display... | null | CC BY-SA 2.5 | null | 2008-09-02T10:01:43.110 | 2008-09-02T12:15:38.907 | 2008-09-02T12:15:38.920 | 2,429 | 2,429 | null |
39,157 | 2 | null | 39,154 | 1 | null | Not necessarily, although best practices for source control advise that you do not include generated files, for obvious reasons.
Is there another way for you to publish your generated files elsewhere for download, instead of relying on your version control to be your download server?
| null | CC BY-SA 2.5 | null | 2008-09-02T10:10:44.027 | 2008-09-02T10:10:44.027 | null | null | 372 | null |
39,158 | 2 | null | 39,119 | 1 | null | I had a very similar problem in an editor I wrote recently. In the end, I used the `TreeNode`'s `BackColor` property to determine the selection state of the node. I then wrote a handler for the `SelectionChanged` event that checked the state of the Shift/Control keys to determine if the selected node was being added to... | null | CC BY-SA 3.0 | null | 2008-09-02T10:10:49.940 | 2012-07-03T13:31:53.910 | 2012-07-03T13:31:53.910 | 142,162 | 1,898 | null |
39,162 | 2 | null | 38,746 | 3 | null | You could use something like this as your pre-commit script:
| null | CC BY-SA 2.5 | null | 2008-09-02T10:12:48.310 | 2008-09-02T15:02:59.707 | 2008-09-02T15:02:59.707 | 4,056 | 4,056 | null |
39,148 | 2 | null | 38,875 | 5 | null | Pek, there are many things to worry about an addition to sql injection, or even different types of code injection. Now might be a good time to look a little further into web application security in general.
From a previous question on [moving from desktop to web development](https://stackoverflow.com/questions/22072/fr... | null | CC BY-SA 2.5 | null | 2008-09-02T10:01:58.133 | 2008-09-02T10:16:37.193 | 2020-06-20T09:12:55.060 | -1 | 1,820 | null |
39,166 | 2 | null | 39,154 | 1 | null | Normally, derived files should not be stored in version control. In your case, you could build a release procedure that created a tarball that includes the derived files.
As you say, keeping the derived files in version control only increases the amount of noise you have to deal with.
| null | CC BY-SA 2.5 | null | 2008-09-02T10:13:51.617 | 2008-09-02T10:13:51.617 | null | null | 893 | null |
39,161 | 2 | null | 33,685 | 2 | null | Generally I don't like "loop through the record" solutions as they tend to be slow and you end up writing a lot of custom code.
So...
Depending on how many records are in your staging table, you could post process the data with a series of SQL statements that test the columns for correctness and mark any records that... | null | CC BY-SA 2.5 | null | 2008-09-02T10:12:35.037 | 2008-09-02T10:12:35.037 | null | null | 993 | null |
39,173 | 2 | null | 22,145 | 3 | null | What you described is indeed classified as a [Cutting Stock](http://en.wikipedia.org/wiki/Cutting_stock_problem) problem, as [Wheelie](https://stackoverflow.com/users/1131/wheelie) mentioned, and not a [Bin Packing](http://en.wikipedia.org/wiki/Bin_packing) problem because you try to minimize the waste (sum of leftover... | null | CC BY-SA 2.5 | null | 2008-09-02T10:20:56.437 | 2008-09-02T10:20:56.437 | 2017-05-23T12:08:51.063 | -1 | 4,177 | null |
39,174 | 2 | null | 39,154 | 4 | null | We don't version files that can be automatically generated using scripts included in the repository itself. The reason for this is that after a checkout, these files can be rebuild with a single click or command. In our projects we always try to make this as easy as possible, and thus preventing the need for versioning... | null | CC BY-SA 2.5 | null | 2008-09-02T10:21:06.327 | 2008-09-02T10:21:06.327 | null | null | 4,174 | null |
39,156 | 2 | null | 39,119 | 4 | null | The default behavior of TreeView is that when the [Checkboxes](http://msdn.microsoft.com/en-us/library/system.windows.forms.treeview.checkboxes%28VS.80%29.aspx) property is set to true, that checkboxes will be shown for all TreeNodes.
The behavior that you are looking for - to disable or hide some checkboxes - is a cu... | null | CC BY-SA 2.5 | null | 2008-09-02T10:08:44.827 | 2008-09-03T00:44:39.247 | 2008-09-03T00:44:39.247 | 1 | 51 | null |
39,175 | 2 | null | 39,070 | 1 | null | The traditional secure replacement for FTP is [SFTP](http://en.wikipedia.org/wiki/SSH_file_transfer_protocol), but if you have enough control over both endpoints, you might consider [rsync](http://en.wikipedia.org/wiki/SSH_file_transfer_protocol) instead: it is highly configurable, secure just by telling it to use ssh,... | null | CC BY-SA 2.5 | null | 2008-09-02T10:21:26.997 | 2008-09-02T10:21:26.997 | null | null | 4,203 | null |
39,164 | 2 | null | 38,875 | 1 | null | Some good answers so far, also worth pointing out a couple of PHP specifics:
The file open functions use [wrappers](http://uk.php.net/manual/en/wrappers.php) to support different protocols. This includes the ability to open files over a local windows network, HTTP and FTP, amongst others. Thus in a default configurati... | null | CC BY-SA 2.5 | null | 2008-09-02T10:13:11.460 | 2008-09-02T10:23:39.033 | 2008-09-02T10:23:39.033 | 1,820 | 1,820 | null |
39,179 | 2 | null | 39,154 | 2 | null | I am using Tortoise SVN for small system ASP.NET development. Most code is interpreted ASPX, but there are around a dozen binary DLLs generated by a manual compile step. Whilst it doesn't make a lot of sense to have these source-code versioned in theory, it certainly makes it convenient to ensure they are correctly mir... | null | CC BY-SA 2.5 | null | 2008-09-02T10:25:26.237 | 2008-09-02T10:33:00.260 | 2008-09-02T10:33:00.260 | 4,180 | 4,180 | null |
39,154 | 1 | 39,179 | null | 2 | 237 | Using online interfaces to a version control system is a nice way to have a published location for the most recent versions of code. For example, I have a LaTeX package here (which is released to CTAN whenever changes are verified to actually work):
[http://github.com/wspr/pstool/tree/master](http://github.com/wspr/ps... | Do you version "derived" files? | CC BY-SA 3.0 | null | 2008-09-02T10:06:25.487 | 2015-05-08T18:13:59.497 | 2017-05-23T12:01:24.217 | -1 | 4,161 | [
"version-control",
"versioning",
"revision-history",
"revisions"
] |
39,183 | 2 | null | 39,107 | 6 | null | Try [dummynet](http://info.iet.unipi.it/~luigi/ip_dummynet/).
You will find lots of resources on the web, including this [tutorial](http://www.scalabledesign.com/articles/dummynet.html).
| null | CC BY-SA 2.5 | null | 2008-09-02T10:29:40.207 | 2008-09-02T10:29:40.207 | null | null | 341 | null |
39,160 | 2 | null | 3,448 | 2 | null | I don't think that, if you specify a doctype, there is any reason not to adhere to this doctype.
Using XHTML makes automated error detection easy, every change can be automatically checked for invalid markup. This prevents errors, especially when using automatically generated content. It is really easy for a web devel... | null | CC BY-SA 2.5 | null | 2008-09-02T10:11:45.473 | 2008-09-02T10:11:45.473 | null | null | 4,174 | null |
39,169 | 2 | null | 39,065 | 5 | null | I have used this solution before to share a assembley info.cs file across all projects in a solution I would presume the same would work fro a resource file.
Create a linked file to each individual project/class library. There will be only one copy and every project will have a reference to the code via a linked file... | null | CC BY-SA 2.5 | null | 2008-09-02T10:16:03.593 | 2008-09-02T10:21:26.513 | 2008-09-02T10:21:26.513 | 4,026 | 4,026 | null |
39,201 | 2 | null | 39,121 | 1 | null | Hmm, problems related to the people? Are you referring to usability problems?
Also, if you are doing a beta,it means you already did everything you know (in my opinion). One of the goals of a beta is to show you what you didn't knew, besides unexpected code problems, etc.
| null | CC BY-SA 2.5 | null | 2008-09-02T10:38:53.803 | 2008-09-02T10:38:53.803 | null | null | 353,971 | null |
39,190 | 2 | null | 39,037 | 0 | null | The most common way to convert files to a pdf is to print them to a pdf printer driver. There are a number of such drivers, one that i know of that will do the job is [Black Ice](http://www.blackice.com/Printer%20Drivers/).
Another is to use Adobe Acrobat's SDK. from memory its very expensive.
Its been a while since... | null | CC BY-SA 4.0 | null | 2008-09-02T10:34:33.687 | 2019-12-11T19:48:08.160 | 2019-12-11T19:48:08.160 | -1 | 4,026 | null |
39,187 | 1 | 280,699 | null | 76 | 151,886 | I prefer dark backgrounds for coding, and I've downloaded a jar file containing an IntelliJ IDEA color theme that has a dark background. How do I tell IntelliJ about it?
| How do I install a color theme for IntelliJ IDEA 7.0.x | CC BY-SA 2.5 | 0 | 2008-09-02T10:31:38.813 | 2021-12-20T21:54:46.393 | 2008-09-25T16:35:18.390 | 410 | 4,203 | [
"intellij-idea",
"color-scheme"
] |
39,194 | 1 | 39,309 | null | 8 | 2,353 | I want to create a Java application bundle for Mac without using Mac.
According to [Java Deployment Options for Mac OS X](http://developer.apple.com/documentation/Java/Conceptual/Java14Development/03-JavaDeployment/JavaDeployment.html#//apple_ref/doc/uid/TP40001885-208447-TPXREF120), I can do this by using Xcode, Jar ... | Do I need a Mac to make a Java application bundle? | CC BY-SA 2.5 | 0 | 2008-09-02T10:37:06.333 | 2018-12-20T13:02:07.813 | 2010-01-08T13:41:26.273 | 3,827 | 3,827 | [
"java",
"macos",
"deployment"
] |
39,189 | 2 | null | 39,135 | 5 | null | The usual generic Unix answer to this is 'PAM'. If you want plain old OpenSSH SSHD to handle your SFTP, you need something plugged in to SSHD's PAM stack (/etc/pam.d/sshd) that does what you need and leaves out what you don't need. This might be a general-purpose directory server (probably LDAP) that maps all your virt... | null | CC BY-SA 3.0 | null | 2008-09-02T10:33:03.707 | 2012-02-24T04:57:24.633 | 2012-02-24T04:57:24.633 | 463,162 | 3,979 | null |
39,202 | 2 | null | 39,092 | 4 | null | You must remember that DirectX is a collection of technologies - Input, Audio and Graphics. However to most people DX is synonymous with the renderer.
In my opinion D3D (or DirectGraphics) has not really been that hard since DX8. I have not tried DX9 or DX10.
Bernard is right - try to abstract as much as possible. Tr... | null | CC BY-SA 2.5 | null | 2008-09-02T10:39:14.300 | 2008-09-02T10:39:14.300 | null | null | 342 | null |
39,198 | 2 | null | 39,092 | 7 | null | You could also base your work on [ogre](http://www.ogre3d.org/) they provide the abstraction themselves and they have really nice tools. Since this is a projects that's been around for over 6 years I think. The base library is not really for beginners since you need to know a bit about software design, but I found a lo... | null | CC BY-SA 2.5 | null | 2008-09-02T10:37:30.950 | 2008-09-02T10:37:30.950 | null | null | 4,204 | null |
39,185 | 2 | null | 38,746 | 4 | null | Using only `bash`:
```
x=`tail -n 1 your_textfile`
if [ "$x" == "" ]; then echo "empty line"; fi
```
(Take care to copy the whitespaces correctly!)
@grom:
> tail does not return an empty line
Damn. My test file didn't end on `\n` but on `\n\n`. Apparently `vim` can't create files that don't end on `\n` (?). Anywa... | null | CC BY-SA 2.5 | null | 2008-09-02T10:30:45.507 | 2008-09-04T09:31:12.187 | 2008-09-04T09:31:12.187 | 1,968 | 1,968 | null |
39,214 | 2 | null | 39,187 | 14 | null | Take a look here: [Third Party Add-ons](https://www.jetbrains.com/idea/help/configuring-third-party-tools.html)
You have to extract the jar using a zip application. Hopefully inside you'll find a collection of XML files.
---
[IntelliJ IDEA Plugins](http://plugins.jetbrains.com/?idea)
| null | CC BY-SA 3.0 | null | 2008-09-02T10:49:51.810 | 2015-01-30T06:44:03.483 | 2015-01-30T06:44:03.483 | 1,922,144 | 3,410 | null |
39,196 | 1 | null | null | 1 | 3,215 | A MySQL query is running significantly slower since adding a `group_concat` clause. Currently, this query looks as follows:
```
select ... group_concat(distinct category.name) .... from page where
left outer join page_category on page.id = page_category.page_id
left outer join category on page_category.category_id ... | group_concat query performance | CC BY-SA 3.0 | null | 2008-09-02T10:37:14.633 | 2015-04-29T15:58:00.817 | 2015-04-29T15:58:00.817 | 2,932,774 | 2,138 | [
"sql",
"mysql",
"performance"
] |
39,206 | 2 | null | 39,154 | 0 | null | In some cases we do, but it's more of a sysadmin type of use case, where the generated files (say, DNS zone files built from a script) have intrinsic interest in their own right, and the revision control is more linear audit trail than branching-and-tagging source control.
| null | CC BY-SA 2.5 | null | 2008-09-02T10:44:50.917 | 2008-09-02T10:44:50.917 | null | null | 3,979 | null |
39,209 | 2 | null | 38,864 | 4 | null | Technically, there is no "connected to the Internet". The real question is, which interface is routeable to a desired address. Right now, you're querying for the "default route" - the one that applies if no specific route to destination exists. But, you're ignoring any specific routes.
Fortunately, for 99.9% of home u... | null | CC BY-SA 2.5 | null | 2008-09-02T10:46:50.633 | 2008-09-02T10:46:50.633 | null | null | 2,199 | null |
39,229 | 1 | 39,232 | null | 5 | 772 | What are the options? How popular are they? Do these IDEs give similar/better functionality compared to visual studio?
| Can I use other IDEs other than Visual Studio for coding in .net? | CC BY-SA 2.5 | 0 | 2008-09-02T11:07:23.250 | 2013-02-14T01:55:08.580 | null | null | 184 | [
".net",
"visual-studio"
] |
39,228 | 2 | null | 2,232 | 68 | null | Here's the best article in my opinion about running shell scripts in Ruby: "[6 Ways to Run Shell Commands in Ruby](http://tech.natemurray.com/2007/03/ruby-shell-commands.html)".
If you only need to get the output use backticks.
I needed more advanced stuff like STDOUT and STDERR so I used the Open4 gem. You have all ... | null | CC BY-SA 3.0 | null | 2008-09-02T11:05:10.150 | 2013-10-11T01:11:06.803 | 2013-10-11T01:11:06.803 | 128,421 | 4,212 | null |
39,234 | 2 | null | 39,229 | 2 | null | [MonoDevelop](http://www.monodevelop.com/)
| null | CC BY-SA 2.5 | null | 2008-09-02T11:10:00.500 | 2008-09-02T11:10:00.500 | null | null | 3,583 | null |
39,208 | 2 | null | 32,597 | 8 | null | This is my recipe for installing TFS 2008 SP1.
There is no domain controller in this scenario, we are only a couple of users. If I was to do it again, I would consider changing our environement to use a active directory domain.
- - - - - - [Create a slipstreamed image of TFS 2008 with SP1](http://www.woodwardweb.co... | null | CC BY-SA 2.5 | null | 2008-09-02T10:46:29.697 | 2008-09-02T16:02:44.397 | 2008-09-02T16:02:44.397 | 224 | 224 | null |
39,232 | 2 | null | 39,229 | 5 | null | Yes - you can try using SharpDevelop:
[http://www.icsharpcode.net/OpenSource/SD/](http://www.icsharpcode.net/OpenSource/SD/)
Or you can just use notepad, or notepad++
[http://notepad-plus.sourceforge.net/](http://notepad-plus.sourceforge.net/)
Then compile on the command line.
: If you're looking for a free soluti... | null | CC BY-SA 2.5 | null | 2008-09-02T11:08:14.030 | 2008-09-02T11:24:48.247 | 2008-09-02T11:24:48.247 | 986 | 986 | null |
39,236 | 2 | null | 39,229 | 1 | null | Check out the mono project. [http://www.mono-project.com/](http://www.mono-project.com/)
It's the '.NET for linux' project.
They also have an ide based on eclipse as part of the whole thing. Never used it before but I've used eclipse for java and some php work, and eclipse is pretty good
: the ide is called MonoDevelo... | null | CC BY-SA 2.5 | null | 2008-09-02T11:10:35.380 | 2008-09-02T11:10:35.380 | null | null | 2,976 | null |
39,204 | 2 | null | 38,005 | 0 | null | @liammclennan
> Which will return IEnumerable. ... Linq-to-sql is an ORM. It does not affect the way that you design an N-tiered application. You use it the same way you would use any other ORM.
Then I guess I am still confused. Yes, Linq-to-Sql is an ORM; but as far as I can tell I am still littering my front end c... | null | CC BY-SA 2.5 | null | 2008-09-02T10:41:14.360 | 2008-09-02T10:41:14.360 | null | null | 4,050 | null |