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 ⌀ |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
38,208 | 2 | null | 38,198 | 1 | null | Floating point constants should have the available highest precision. The result can be assigned to a float without undue trouble.
| null | CC BY-SA 2.5 | null | 2008-09-01T17:51:30.433 | 2008-09-01T17:51:30.433 | null | null | 2,509 | null |
38,206 | 2 | null | 38,197 | 5 | null | `subprocess.Popen` replaces the group of `os.popenX` POSIX functions (which have a long history). I suppose that the name `Popen` makes it more likely for people used to the old functions to find and use the new ones.
The [PEP for subprocess (PEP 324)](http://www.python.org/dev/peps/pep-0324/) has a little bit of disc... | null | CC BY-SA 2.5 | null | 2008-09-01T17:50:26.473 | 2008-09-01T17:50:26.473 | null | null | 3,002 | null |
38,212 | 2 | null | 38,005 | 1 | null | Hm, [Rockford Lhotka](http://www.lhotka.net/) sad, that LINQ to SQL is wonderful technology for fetching data from database. He suggests that afterwards they'll must to be bind to "reach domain objects" (aka. CSLA objetcs).
Seriously speaking, LINQ to SQL had it's support for n-tier architecture see method.
| null | CC BY-SA 2.5 | null | 2008-09-01T17:53:20.630 | 2008-09-01T17:53:20.630 | null | null | 2,313 | null |
38,213 | 2 | null | 38,190 | 6 | null | [CreateFile](http://msdn.microsoft.com/en-us/library/aa363858.aspx) has support for direct disk access. Read the notes under "Physical Disks and Volumes". You should be able to P/Invoke the call.
Note that Vista and Server 2008 have [severely restricted](http://support.microsoft.com/kb/942448) this.
| null | CC BY-SA 2.5 | null | 2008-09-01T17:53:24.187 | 2008-09-01T17:53:24.187 | null | null | 2,199 | null |
38,209 | 2 | null | 38,193 | 9 | null | The ps is a really poor way of doing that and probably open to race conditions.
The traditional Unix/Linux way would be to write the PID to a file (typically in /var/run) and check to see if that file exists on startup.
e.g. the pidfile being located at /var/run/myscript.pid then you'd check to see if that exists bef... | null | CC BY-SA 2.5 | null | 2008-09-01T17:52:38.153 | 2008-09-01T17:52:38.153 | null | null | 1,087 | null |
38,224 | 2 | null | 37,976 | 19 | null | Sure there is. This is all you need to do:
-
- -
| null | CC BY-SA 2.5 | null | 2008-09-01T17:59:26.997 | 2008-09-01T17:59:26.997 | null | null | 1,830 | null |
38,215 | 2 | null | 38,117 | 2 | null | We've invested in a few licenses of [Simply File](http://www.techhit.com/SimplyFile/) for our employees. Works a treat at managing your inbox - it learns (don't ask me how, but it is very good) how to file things for you and does it automatically.
I was sceptical about it at first, until I tried it then I was a conve... | null | CC BY-SA 2.5 | null | 2008-09-01T17:54:08.430 | 2008-09-01T17:54:08.430 | null | null | 770 | null |
38,225 | 2 | null | 38,160 | 21 | null | null | CC BY-SA 3.0 | null | 2008-09-01T18:00:43.140 | 2016-08-29T05:26:20.833 | 2016-08-29T05:26:20.833 | 78,351 | 4,056 | null | |
38,226 | 2 | null | 17,117 | 0 | null | Compiling the boost libraries for yourself is actually quite simple, if not that well documented. The documentation is in the jamroot file. Run `bjam --help` in the boost root directory for a detailed list of options. As an example I used the following command line to build my current set up with boost 1.36.0:
```
bja... | null | CC BY-SA 2.5 | null | 2008-09-01T18:01:18.520 | 2008-09-01T18:01:18.520 | null | null | 4,086 | null |
38,230 | 2 | null | 38,056 | 56 | null | Mark's answer is the way to go, after all, that's why the /proc file system is there. For something a little more copy/pasteable:
```
>>> import os.path
>>> os.path.exists("/proc/0")
False
>>> os.path.exists("/proc/12")
True
```
| null | CC BY-SA 2.5 | null | 2008-09-01T18:06:42.690 | 2008-09-01T18:06:42.690 | null | null | 2,603 | null |
38,236 | 2 | null | 35,355 | 1 | null | Is it signed? Also are you trying to use the debug visualizer in the same host process as the application you are trying to debug?
Try compiling the visualizer and then just reference it by it's library and file location not the project.
| null | CC BY-SA 2.5 | null | 2008-09-01T18:15:34.463 | 2008-09-01T18:15:34.463 | null | null | 17 | null |
38,229 | 2 | null | 38,198 | 26 | null | ```
celsius = (5.0/9.0) * (fahr-32.0);
```
In this expression, `5.0`, `9.0`, and `32.0` are `double`s. That's the default type for a floating-point constant - if you wanted them to be `float`s, then you would use the `F` suffix:
```
celsius = (5.0F/9.0F) * (fahr-32.0F);
```
Note that if `fahr` was a `double`, then... | null | CC BY-SA 2.5 | null | 2008-09-01T18:06:24.437 | 2008-09-01T18:06:24.437 | null | null | 811 | null |
38,235 | 1 | 38,384 | null | 3 | 2,174 | While I know IronRuby isn't quite ready for the world to use it, I was wondering if anyone here tried it and tested how well it faired against the other Rubies out there in terms of raw performance?
If so, what are the results, and how did you go about measuring the performance (which benchmarks etc)?
: The IronRuby ... | IronRuby performance? | CC BY-SA 2.5 | null | 2008-09-01T18:15:21.123 | 2009-08-21T05:55:06.893 | 2009-06-02T18:24:39.353 | 2,018 | 2,018 | [
".net",
"ruby",
"performance",
"ironruby"
] |
38,222 | 2 | null | 38,197 | 8 | null | Now, I'm not saying that this is the greatest name in the world, but here was the idea as I understand it.
Originally, the popen family was in the os module and was an implementation of the venerable posix popen. The movement to the subprocess module would have been an opportune time to rename them, but I guess that ... | null | CC BY-SA 3.0 | null | 2008-09-01T17:57:42.633 | 2018-03-26T01:31:49.353 | 2018-03-26T01:31:49.353 | 217,324 | 4,080 | null |
38,242 | 2 | null | 37,969 | 0 | null | I'm not aware of a simple client. I remember looking for one a long time ago when I researched different queue systems and trying JMS I couldn't find one then, and I couldn't find one now. One thing though - there are a ton of tutorials that get you started and you could do a simple form to achieve that.
Sorry to be n... | null | CC BY-SA 2.5 | null | 2008-09-01T18:18:00.027 | 2008-09-01T18:18:00.027 | null | null | 2,859 | null |
38,243 | 2 | null | 38,193 | 1 | null | You should probably also check that the process is actually running, so that if your script dies without cleaning itself up, it will run the next time rather than simply checking that
/var/run/foo.pid exists and exiting.
| null | CC BY-SA 2.5 | null | 2008-09-01T18:18:23.957 | 2008-09-01T18:18:23.957 | null | null | 2,603 | null |
38,246 | 2 | null | 38,235 | 1 | null | I have used it and it has worked great for what I have done. However my measuring of performance isn't really scientific, because it was all visual. However I did notice that IronRuby seemed a little more snappier when I compared the two program on equal tasks. I really think this had to do more with the strong and ... | null | CC BY-SA 2.5 | null | 2008-09-01T18:19:12.143 | 2008-09-01T18:19:12.143 | null | null | 17 | null |
38,252 | 2 | null | 36,114 | 1 | null | Do you understand how when you say "num1" you're referring to the same variable each time, and that each time you change num1 you replace the previous value?
| null | CC BY-SA 2.5 | null | 2008-09-01T18:27:18.927 | 2008-09-01T18:27:18.927 | null | null | 2,131 | null |
38,245 | 2 | null | 38,035 | 0 | null | I think your best bet is to get the result via SQL query and apply a regular expression programatically that will allow you to retrieve a group of words before and after the searched word.
I can't test it now, but the regular expression should be something like:
```
.*(\w+)\s*WORD\s*(\w+).*
```
where you replace `W... | null | CC BY-SA 2.5 | null | 2008-09-01T18:19:03.360 | 2008-09-01T18:19:03.360 | null | null | 2,274 | null |
38,254 | 2 | null | 38,238 | 29 | null | Alternative constructors are the classic example.
| null | CC BY-SA 2.5 | null | 2008-09-01T18:27:27.523 | 2008-09-01T18:27:27.523 | null | null | 2,603 | null |
38,234 | 2 | null | 38,198 | 3 | null | The reason that the expression is cast to double-precision is because the literals specified are double-precision values by default. If you specify the literals used in the equation as floats, the expression will return a float. Consider the following code (Mac OS X using gcc 4.01).
```
#include <stdio.h>
int main(... | null | CC BY-SA 2.5 | null | 2008-09-01T18:14:40.970 | 2008-09-01T18:14:40.970 | null | null | 3,499 | null |
38,255 | 2 | null | 38,005 | 1 | null | You might want to look into the [ADO .Net Entity Framework](http://en.wikipedia.org/wiki/ADO.NET_Entity_Framework) as an alternative to LINQ to SQL, although it does support LINQ as well. I believe LINQ to SQL is designed to be fairly lightweight and simple, whereas the Entity Framework is more heavy duty and probably... | null | CC BY-SA 2.5 | null | 2008-09-01T18:27:48.130 | 2008-09-01T18:27:48.130 | null | null | 637 | null |
38,258 | 2 | null | 37,804 | 3 | null | I'd probably just setup Apache on the SAMBA servers and let it serve the files via HTTP. That'd give you a nice autoindex default page too, and you could just wget and concatenate each index for your master list.
A couple of other thoughts:
1. file://server/share/file is the defacto Windows way of doing it
2. You ca... | null | CC BY-SA 2.5 | null | 2008-09-01T18:32:23.157 | 2008-09-01T18:32:23.157 | null | null | 2,199 | null |
38,259 | 2 | null | 37,882 | 1 | null | Using Linq-to-Sql, you can have columns in the DataGridView appear different than in the original table by:
1. In your Linq query, extract the columns that you want, in the order than you want, and store them in a var. Then the autogenerate columns should show them in that order in the DataGridView
2. Use Template co... | null | CC BY-SA 2.5 | null | 2008-09-01T18:34:08.193 | 2008-09-01T18:34:08.193 | null | null | 51 | null |
38,256 | 2 | null | 38,181 | 165 | null | A unit test should test a single codepath through a single method. When the execution of a method passes outside of that method, into another object, and back again, you have a dependency.
When you test that code path with the actual dependency, you are not unit testing; you are integration testing. While that's good... | null | CC BY-SA 4.0 | null | 2008-09-01T18:27:57.177 | 2021-01-02T10:09:51.313 | 2021-01-02T10:09:51.313 | 4,956,907 | null | null |
38,239 | 1 | null | null | 92 | 7,902 |
### Background
Last year, I did an internship in a physics research group at a university. In this group, we mostly used [LabVIEW](http://en.wikipedia.org/wiki/LabVIEW) to write programs for controlling our setups, doing data acquisition and analyzing our data. For the first two purposes, that works quite OK, but f... | Practices for programming in a scientific environment? | CC BY-SA 3.0 | 0 | 2008-09-01T18:16:41.980 | 2017-08-22T13:12:56.870 | 2017-08-22T13:12:56.870 | 1,000,551 | 1,037 | [
"physics",
"scientific-computing",
"collaboration"
] |
38,231 | 2 | null | 35,219 | 3 | null | The limitation of MOSS crawling sites with different forms authentication should have been addressed in MOSS SP1. :
[](http://www.microsoft.com/downloads/details.aspx?FamilyID=ad59175c-ad6a-4027-8c2f-db25322f791b&displaylang=en)[http://www.microsoft.com/downloads/details.aspx?FamilyID=ad59175c-ad6a-4027-8c2f-db25322f7... | null | CC BY-SA 2.5 | null | 2008-09-01T18:09:03.400 | 2008-09-01T18:09:03.400 | null | null | 4,083 | null |
38,265 | 2 | null | 38,239 | 1 | null | I'm no expert in this area, but I've always understood that this is what [MATLAB](http://en.wikipedia.org/wiki/MATLAB) was created for. There is [a way to integrate MATLAB with SVN for source control](http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=11596&objectType=file) as well.
| null | CC BY-SA 2.5 | null | 2008-09-01T18:36:38.797 | 2009-10-18T11:27:41.883 | 2009-10-18T11:27:41.883 | 63,550 | null | null |
38,261 | 2 | null | 38,239 | 9 | null | I'm not exactly a 'natural' scientist (I study transportation) but am an academic who writes a lot of my own software for data analysis. I try to write as much as I can in Python, but sometimes I'm forced to use other languages when I'm working on extending or customizing an existing software tool. There is very litt... | null | CC BY-SA 2.5 | null | 2008-09-01T18:34:17.617 | 2008-09-01T19:01:21.967 | 2008-09-01T19:01:21.967 | 2,600 | 2,600 | null |
38,238 | 1 | 38,276 | null | 288 | 153,451 | I'm teaching myself Python and my most recent lesson was that [Python is not Java](http://dirtsimple.org/2004/12/python-is-not-java.html), and so I've just spent a while turning all my Class methods into functions.
I now realise that I don't need to use Class methods for what I would done with `static` methods in Java... | What is the purpose of class methods? | CC BY-SA 4.0 | 0 | 2008-09-01T18:16:41.107 | 2021-02-10T13:45:10.990 | 2018-09-26T19:34:20.183 | 355,230 | 3,171 | [
"python",
"class-method"
] |
38,270 | 2 | null | 38,239 | 1 | null | First of all, I would definitely go with a scripting language to avoid having to explain a lot of extra things (for example manual memory management is - mostly - ok if you are writing low-level, performance sensitive stuff, but for somebody who just wants to use a computer as an upgraded scientific calculator it's def... | null | CC BY-SA 2.5 | null | 2008-09-01T18:40:13.653 | 2008-09-01T18:40:13.653 | null | null | 1,265 | null |
38,263 | 2 | null | 38,239 | 11 | null | This might be slightly tangential, but hopefully relevant.
I used to work for National Instruments, R&D, where I wrote software for NI RF & Communication toolkits. We used LabVIEW quite a bit, and here are the practices we followed:
1. Source control. NI uses Perforce. We did the regular thing - dev/trunk branches, ... | null | CC BY-SA 2.5 | null | 2008-09-01T18:36:10.700 | 2008-09-01T18:36:10.700 | null | null | 1,386,292 | null |
38,276 | 2 | null | 38,238 | 203 | null | Class methods are for when you need to have methods that aren't specific to any particular instance, but still involve the class in some way. The most interesting thing about them is that they can be overridden by subclasses, something that's simply not possible in Java's static methods or Python's module-level functio... | null | CC BY-SA 2.5 | null | 2008-09-01T18:45:56.807 | 2008-09-01T18:45:56.807 | null | null | 3,560 | null |
38,203 | 2 | null | 36,567 | 6 | null |
1. This problem is basically about mapping functions to arrays of numbers. A language that supports first-class functions would come in really handy here.
2. Check out http://www.harmony-central.com/Computer/Programming and http://www.developer.com/java/other/article.php/3071021 for some Java-related info.
3. If you d... | null | CC BY-SA 3.0 | null | 2008-09-01T17:48:33.683 | 2016-02-09T21:40:46.167 | 2016-02-09T21:40:46.167 | 19,750 | 4,085 | null |
38,282 | 2 | null | 38,280 | 0 | null | When you run into serious issues, with Firefox you can trace it down to the code and maybe get someone to fix it. With IE, you can't.
| null | CC BY-SA 2.5 | null | 2008-09-01T18:52:19.757 | 2008-09-01T18:52:19.757 | null | null | 3,827 | null |
38,281 | 2 | null | 38,280 | 2 | null | Your last point, solving the "webpage has expired" problem, can be solved entirely on the server side by judicious use of the "303 see other" HTTP status code. Instead of returning a new page immediately as the result of an HTTP POST, return a 303 result code that redirects to another page that is a GET, that gets the ... | null | CC BY-SA 2.5 | null | 2008-09-01T18:51:56.700 | 2008-09-01T18:51:56.700 | null | null | 893 | null |
38,280 | 1 | 38,298 | null | 1 | 4,608 | I am in a position where I can choose the client browser for my web app. The app is being used internally, and we are installing each client "manually".I would like to find a better solution for the browser,so :
What is a good browser that I can use as a client to a web application?
General functionalities I would li... | Best browser for web application | CC BY-SA 2.5 | null | 2008-09-01T18:48:22.433 | 2008-09-22T15:41:36.687 | null | null | 3,263 | [
"browser",
"web-applications"
] |
38,285 | 2 | null | 38,280 | 2 | null | Because of your specific requirements you might want to consider embedding the IE ActiveX into a desktop application. That way you get full control of the client.
| null | CC BY-SA 2.5 | null | 2008-09-01T18:53:11.750 | 2008-09-01T18:53:11.750 | null | null | 2,443 | null |
38,283 | 2 | null | 38,151 | 1 | null | There isn't really something you can to prevent a window from being closed on the client.
My guess is this is a problem with the system installation.
Test this again using another browser on the same computer, and then on another computer.
| null | CC BY-SA 3.0 | null | 2008-09-01T18:52:54.030 | 2016-12-20T05:28:55.867 | 2016-12-20T05:28:55.867 | 1,380,867 | 3,263 | null |
38,266 | 2 | null | 38,239 | 16 | null | Nuclear/particle physics here.
- [Fortran](http://en.wikipedia.org/wiki/Fortran)[CERNLIB](http://en.wikipedia.org/wiki/CERN_Program_Library)[GEANT3](http://en.wikipedia.org/wiki/GEANT_(program))[ROOT](http://en.wikipedia.org/wiki/ROOT)[Geant4](http://en.wikipedia.org/wiki/Geant4)[LabVIEW](http://en.wikipedia.org/wiki/... | null | CC BY-SA 2.5 | null | 2008-09-01T18:36:42.507 | 2009-10-18T11:26:56.720 | 2009-10-18T11:26:56.720 | 63,550 | 2,509 | null |
38,287 | 2 | null | 38,238 | 7 | null | Honestly? I've never found a use for staticmethod or classmethod. I've yet to see an operation that can't be done using a global function or an instance method.
It would be different if python used private and protected members more like Java does. In Java, I need a static method to be able to access an instance's ... | null | CC BY-SA 2.5 | null | 2008-09-01T18:54:29.470 | 2008-09-01T18:54:29.470 | null | null | 2,147 | null |
38,288 | 1 | 38,289 | null | 66 | 77,763 | Specifically, what commands do I run from the terminal?
| How do I add a user in Ubuntu? | CC BY-SA 2.5 | 0 | 2008-09-01T18:59:14.590 | 2018-02-17T23:16:54.793 | 2018-02-17T23:16:54.793 | 736,054 | 3,624 | [
"linux",
"ubuntu",
"sysadmin",
"user-management"
] |
38,286 | 2 | null | 31,693 | 1 | null | Looks like, among other very interesting proposals, there is one about refining generics and breaking backwards compatibility:
> Currently, generics are implemented
using erasure, which means that the
generic type information is not
available at runtime, which makes some
kind of code hard to write. Generics
... | null | CC BY-SA 2.5 | null | 2008-09-01T18:53:36.413 | 2010-07-23T07:36:09.630 | 2010-07-23T07:36:09.630 | 20,402 | 2,644 | null |
38,284 | 2 | null | 38,239 | 4 | null | > What languages/environments have you used for developing scientific software, esp. data analysis? What libraries? (E.g., what do you use for plotting?)
Python, [NumPy](http://en.wikipedia.org/wiki/NumPy) and pylab (plotting).
> Was there any training for people without any significant background in programming?
No... | null | CC BY-SA 2.5 | null | 2008-09-01T18:53:06.713 | 2009-10-18T11:28:33.707 | 2009-10-18T11:28:33.707 | 63,550 | 2,603 | null |
38,289 | 2 | null | 38,288 | 138 | null | Without a home directory
```
sudo useradd myuser
```
With home directory
```
sudo useradd -m myuser
```
Then set the password
```
sudo passwd myuser
```
Then set the shell
```
sudo usermod -s /bin/bash myuser
```
| null | CC BY-SA 3.0 | null | 2008-09-01T18:59:20.970 | 2012-11-18T02:40:13.800 | 2012-11-18T02:40:13.800 | 59,087 | 3,624 | null |
38,295 | 1 | 38,396 | null | 4 | 9,124 | How does one convert an image from one color profile to another (screen to printer, or scanner to screen). In Visual C++ you would use the function in ICM.h, is there a managed way to do this with GDI+?
I need to use GDI+, not WPF. I'd prefer to have a managed solution, but if it is not available, I guess PInkvoke w... | Apply an ICC Color Profile to an image in C# (Dotnet) | CC BY-SA 2.5 | 0 | 2008-09-01T19:02:13.883 | 2022-09-28T14:54:02.327 | 2008-09-30T19:25:39.677 | 3,937 | 3,798 | [
"c#",
".net",
"gdi+",
"color-management"
] |
38,296 | 2 | null | 38,288 | 16 | null | There's basicly 2 commands to do this...
- -
You have to run them has root.
Just read their manuals to find out how to use them.
| null | CC BY-SA 2.5 | null | 2008-09-01T19:03:24.580 | 2008-09-01T19:03:24.580 | null | null | 2,907 | null |
38,298 | 2 | null | 38,280 | 7 | null | [Mozilla Prism](http://developer.mozilla.org/en/Prism) seems ideal for your purposes.
It shares code with Firefox but is designed to run web applications without the usual Browser interface to make them appear more like desktop applications. So no back button or address bar to worry about.
[Google Chrome](http://ww... | null | CC BY-SA 2.5 | null | 2008-09-01T19:03:56.453 | 2008-09-03T10:09:50.900 | 2008-09-03T10:09:50.900 | 3,171 | 3,171 | null |
38,299 | 1 | 38,568 | null | 7 | 2,651 | I have Carbide.c++ Developer from Nokia and I want to create applications for my S60 phone.
I've looked at the samples that goes with the different SDK's for S60 but I haven't found any simple explanation on how strings, called descriptors, are used in Symbian.
One of the problems are that I'm visually impaired and th... | Tutorial on understanding strings in Symbian | CC BY-SA 2.5 | 0 | 2008-09-01T19:04:06.170 | 2013-08-20T12:56:45.540 | 2013-08-20T12:56:45.540 | null | 4,101 | [
"c++",
"symbian",
"carbide"
] |
38,300 | 2 | null | 38,280 | 1 | null | Firefox:
- - - - -
| null | CC BY-SA 2.5 | null | 2008-09-01T19:04:57.277 | 2008-09-01T19:04:57.277 | null | null | null | null |
38,304 | 2 | null | 38,302 | 0 | null | Is it really prohibitive to store the pair of array reference and index?
| null | CC BY-SA 2.5 | null | 2008-09-01T19:08:46.283 | 2008-09-01T19:08:46.283 | null | null | 2,131 | null |
38,260 | 2 | null | 38,181 | 215 | null | Mock objects are useful when you want to between a class under test and a particular interface.
For example, we want to test that method `sendInvitations(MailServer mailServer)` calls `MailServer.createMessage()` exactly once, and also calls `MailServer.sendMessage(m)` exactly once, and no other methods are called on ... | null | CC BY-SA 3.0 | null | 2008-09-01T18:34:09.283 | 2014-01-29T23:05:05.103 | 2020-06-20T09:12:55.060 | -1 | 3,997 | null |
38,306 | 2 | null | 38,014 | 1 | null | For starters, I would suggest that you use the .net data providers from Oracle - if at all possible. If you are starting off in a project it will be the best way to save yourself pain further down the line. You can get them from [here](http://www.oracle.com/technology/tech/windows/odpnet/index.html)
| null | CC BY-SA 2.5 | null | 2008-09-01T19:09:20.480 | 2008-09-01T19:09:20.480 | null | null | 3,893 | null |
38,309 | 2 | null | 38,305 | 0 | null | jar is just a zip file, so I guess you can. If you could get to the source, it's cleaner. Maybe try disassembling the class?
| null | CC BY-SA 2.5 | null | 2008-09-01T19:13:55.617 | 2008-09-01T19:13:55.617 | null | null | 3,827 | null |
38,305 | 1 | 38,591 | null | 4 | 2,030 | It may not be best practice but are there ways of removing unsused classes from a third party's jar files. Something that looks at the way in which my classes are using the library and does some kind of coverage analysis, then spits out another jar with all of the untouched classes removed.
Obviously there are issues... | How do I strip the fluff out of a third party library? | CC BY-SA 2.5 | 0 | 2008-09-01T19:09:19.917 | 2009-11-24T07:47:12.163 | 2008-09-10T18:13:51.503 | -1 | 2,443 | [
"java",
"optimization",
"size"
] |
38,302 | 1 | 38,311 | null | 1 | 2,763 | I'm currently working on a ray-tracer in C# as a hobby project. I'm trying to achieve a decent rendering speed by implementing some tricks from a c++ implementation and have run into a spot of trouble.
The objects in the scenes which the ray-tracer renders are stored in a KdTree structure and the tree's nodes are, in ... | Pinning pointer arrays in memory | CC BY-SA 2.5 | 0 | 2008-09-01T19:06:01.003 | 2016-02-01T13:59:59.770 | null | null | 4,055 | [
"c#",
"optimization",
"unsafe",
"raytracing"
] |
38,308 | 1 | 320,969 | null | 2 | 1,486 | Drawing a parallelgram is nicely supported with Graphics.DrawImage:
```
Bitmap destImage = new Bitmap(srcImage.Width, srcImage.Height);
using (Graphics gr = new Graphics.FromImage(destImage))
{
Point[] destPts = new Point[] { new PointF(x1, y1),
new PointF(x2, y2), new PointF(x4, y4)};
gr.DrawImage(sr... | Is there any way to draw an image to use 4 points rather than 3 (perspective warp) | CC BY-SA 2.5 | null | 2008-09-01T19:13:10.767 | 2019-02-07T17:53:00.093 | null | null | 3,798 | [
"c#",
".net",
"gdi+"
] |
38,315 | 2 | null | 38,305 | 0 | null | Adding to this question, can that improve performance? Since the classes not used would not be JIT compiled improving startup time or does the java automatically detect that while compiling to bytecode and do not even deal with the code that is not used?
| null | CC BY-SA 2.5 | null | 2008-09-01T19:16:11.570 | 2008-09-01T19:16:11.570 | null | null | 3,485 | null |
38,303 | 2 | null | 38,238 | 72 | null | Factory methods (alternative constructors) are indeed a classic example of class methods.
Basically, class methods are suitable anytime you would like to have a method which naturally fits into the namespace of the class, but is not associated with a particular instance of the class.
As an example, in the excellent [... | null | CC BY-SA 3.0 | null | 2008-09-01T19:08:25.660 | 2012-10-23T06:19:35.627 | 2012-10-23T06:19:35.627 | 1,404,462 | 4,080 | null |
38,316 | 2 | null | 37,375 | 7 | null | It depends on what the thin WCF service does. If it's really thin and there's no interesting code there, don't bother unit testing it. Don't be afraid to not unit test something if there's no real code there. If the test cannot be at least one level simpler then the code under the test, don't bother. If the code is dum... | null | CC BY-SA 2.5 | null | 2008-09-01T19:19:36.430 | 2008-09-01T19:19:36.430 | null | null | 3,997 | null |
38,311 | 2 | null | 38,302 | 4 | null | Firstly, if you're using C# normally, you can't suddenly get a null reference due to the garbage collector moving stuff, because the garbage collector also updates all references, so you don't need to worry about it moving stuff around.
You can pin things in memory but this may cause more problems than it solves. For... | null | CC BY-SA 2.5 | null | 2008-09-01T19:14:11.233 | 2008-09-01T19:14:11.233 | null | null | 3,974 | null |
38,312 | 2 | null | 38,239 | 22 | null | The course [Software Carpentry](http://www.swc.scipy.org/) is aimed specifically at people doing scientific computing and aims to teach the basics and lessons of software engineering, and how best to apply them to projects.
It covers topics like version control, debugging, testing, scripting and various other issues.
... | null | CC BY-SA 2.5 | null | 2008-09-01T19:14:14.180 | 2009-10-18T11:26:34.117 | 2009-10-18T11:26:34.117 | 63,550 | 277 | null |
38,317 | 2 | null | 37,799 | 8 | null | We've certainly used gcov to get coverage information on our multi-threaded application.
You want to compile with gcc 4.3 which can do coverage on dynamic code.
You compile with the `-fprofile-arcs -ftest-coverage` options, and the code will generate .gcda files which gcov can then process.
We do a separate build of... | null | CC BY-SA 3.0 | null | 2008-09-01T19:19:56.383 | 2013-08-02T01:03:11.817 | 2013-08-02T01:03:11.817 | 234,175 | 3,978 | null |
38,318 | 2 | null | 38,305 | 1 | null | At a previous job, I used a Java obfuscator that as well as obfuscating the code, also removed classes and methods that weren't being used. If you were doing "Class.byName" or any other type of reflection stuff, you needed to tell the obfuscator because it couldn't tell by inspecting the code what classes or methods c... | null | CC BY-SA 2.5 | null | 2008-09-01T19:20:53.947 | 2008-09-01T19:41:51.883 | 2008-09-01T19:41:51.883 | 3,333 | 3,333 | null |
38,321 | 2 | null | 4,689 | 0 | null | I have been using Proggy Clean TT with Visual Studio for a couple of years now. I like the ability to choose a zero slashed font so when management decides to program instead of manage they don't confuse 0101 with 0101(zeros).
[http://www.proggyfonts.com/](http://www.proggyfonts.com/)
| null | CC BY-SA 2.5 | null | 2008-09-01T19:25:06.370 | 2008-09-01T19:25:06.370 | null | null | 4,096 | null |
38,320 | 2 | null | 37,551 | 0 | null | Maybe you should use another jdk version.
For your "puzzling one", there is a bug entry for 1.5.0_08. A memory leak is reported (I do not know, if this is related to your problem):
[http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6469701](http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6469701)
Also you could ... | null | CC BY-SA 2.5 | null | 2008-09-01T19:22:39.293 | 2008-09-01T19:22:39.293 | null | null | 1,069 | null |
38,324 | 2 | null | 37,799 | 0 | null | I have not used gcov for multi-threaded coverage work. However, on MacOS the Shark tool from Apple handles multiple threads. It's primarily a profiler, but can do coverage info too.
[http://developer.apple.com/tools/sharkoptimize.html](http://developer.apple.com/tools/sharkoptimize.html)
| null | CC BY-SA 2.5 | null | 2008-09-01T19:27:28.737 | 2008-09-01T19:27:28.737 | null | null | 1,244 | null |
38,322 | 2 | null | 17,054 | 0 | null | You cannot use OpenSSL with Indy version 10.5 that shippes with Delphi 2007. You have to download version 10,6 from [http://www.indyproject.org/](http://www.indyproject.org/) and install it into the IDE.
Note that other packages might use Indy, like RemObjects, and therefore they have to be re-compiled too and this ca... | null | CC BY-SA 2.5 | null | 2008-09-01T19:26:40.047 | 2008-09-01T19:26:40.047 | null | null | 4,101 | null |
38,323 | 1 | 38,332 | null | 9 | 4,307 | I'm looking to replace a couple of machines in the office with a more powerful multi-processor machine running either VMware or Microsoft's Hyper-V with a view to hosting a mix of Windows Server 2003, Windows Server 2008 and Linux operating systems. The machines are used mainly for testing ASP.Net or Perl web sites. I ... | VMware or Hyper-V for Developers | CC BY-SA 2.5 | 0 | 2008-09-01T19:26:42.217 | 2011-01-31T13:51:25.430 | null | null | 3,010 | [
"vmware",
"virtualization",
"hyper-v"
] |
38,326 | 2 | null | 38,183 | -1 | null | I am not sure is it 100% what your looking for, . It uses JSF/EJB3/ApacheDerby. I played around with it for like 20 minutes and thought it was pretty cool as a simple/starter JavaEE application to learn from.
| null | CC BY-SA 2.5 | null | 2008-09-01T19:30:38.243 | 2008-09-01T19:30:38.243 | null | null | 506 | null |
38,278 | 2 | null | 37,662 | 6 | null | Adding to what Matthew already said, it looks like the following modules would be suitable:
[Tree::Nary](http://search.cpan.org/perldoc?Tree::Nary)
[Tree::Simple](http://search.cpan.org/perldoc?Tree::Simple)
[Tree](http://search.cpan.org/perldoc?Tree)
| null | CC BY-SA 2.5 | null | 2008-09-01T18:47:02.310 | 2008-09-01T18:47:02.310 | null | null | 3,853 | null |
38,333 | 2 | null | 38,323 | 3 | null | My problem with Hyper-V is that it kills performance on some things on the host OS, especially A/V stuff. Whenever I would be playing music on the host OS and do something that hits the disk hard (like compiling), the music would begin skipping. Similarly, playing streaming video, you'd have to wait until it was comple... | null | CC BY-SA 2.5 | null | 2008-09-01T19:42:29.603 | 2008-09-01T19:42:29.603 | null | null | 1,554 | null |
38,330 | 2 | null | 38,005 | 0 | null | > Seriously speaking, LINQ to SQL had it's support for n-tier architecture see DataContext.Update method
Some of what I've read suggests that the business logic wraps the DataContext - in other words you wrap the update in the way that you suggest.
The way i traditionally write business objects i usually encapsulat... | null | CC BY-SA 2.5 | null | 2008-09-01T19:37:42.703 | 2008-09-01T19:43:33.860 | 2008-09-01T19:43:33.860 | 4,050 | 4,050 | null |
38,334 | 2 | null | 33,233 | 1 | null | I've also since discovered that DXCore from DevExpress is a tool that simplifies plugin development. The default implementation wouldn't let me dock as document (central) but regardless one can still easily generate a plugin with it that can compile a file on the fly and render the contents of it which may well do the ... | null | CC BY-SA 2.5 | null | 2008-09-01T19:45:29.503 | 2008-09-01T19:45:29.503 | null | null | 1,143 | null |
38,336 | 1 | 39,692 | null | 27 | 1,655 | Because Linux (and its variants) have a completely different set of fonts than Windows and Mac OS X, is there anyone with any experience of creating cross-platform font families - ideally finding equivalents to the common fonts found on the aforementioned operating systems?
If so, what is the best route to take?
| On the web, what fonts should I use to create an equivalent experience cross-platform? | CC BY-SA 2.5 | 0 | 2008-09-01T19:48:10.013 | 2010-01-05T08:59:16.687 | 2010-01-05T08:59:16.687 | 134,877 | 3,654 | [
"css",
"linux",
"fonts",
"cross-platform"
] |
38,328 | 2 | null | 10,752 | 65 | null | When I write unit tests I limit the scope of the code being tested to the class I am currently writing by mocking dependencies. If I am writing a Sentence class, and Sentence has a dependency on Word, I will use a mock Word. By mocking Word I can focus only on its interface and test the various behaviors of my Sentence... | null | CC BY-SA 3.0 | null | 2008-09-01T19:33:42.823 | 2018-04-16T20:15:33.397 | 2018-04-16T20:15:33.397 | 4,873,295 | 1,642,688 | null |
38,335 | 2 | null | 37,471 | 0 | null | @Tynan The system can be described (somewhat over simplified) as a systems of rules describing categorizations. "Things are in category A if they are in B but not in C", "Nodes connected to nodes in Z are also in Z", "Every category in M is connected to a node N and has 'child' categories, also in M for every node conn... | null | CC BY-SA 2.5 | null | 2008-09-01T19:47:27.847 | 2008-09-01T19:59:00.063 | 2008-09-01T19:59:00.063 | 1,343 | 1,343 | null |
38,339 | 2 | null | 37,185 | 2 | null | @Roddy - Synchronous sockets are not what I'm after. Burning a whole thread for the sake of a possibly long-lived connection means you limit the amount of concurrent connections to the number of threads that your process can contain. Since threads use a lot of resources - reserved stack address space, committed stack m... | null | CC BY-SA 2.5 | null | 2008-09-01T19:51:09.927 | 2008-09-01T19:51:09.927 | null | null | 3,712 | null |
38,346 | 2 | null | 26,002 | 6 | null | I'm happy with Oracle XE for development purposes.
I do have this piece of wisdow to share; if you're having problems like ORA-12519: TNS:no appropriate service handler found or ORA-12560: TNS:protocol adapter error from time to time then try to change your PROCESSES parameter, logon to Oracle using sys as sysdba and ... | null | CC BY-SA 2.5 | null | 2008-09-01T20:00:06.020 | 2008-09-01T20:00:06.020 | null | null | 2,846 | null |
38,345 | 1 | 71,895 | null | 27 | 11,641 | I recently "needed" a zip function in Perl 5 (while I was thinking about [How do I calculate relative time?](https://stackoverflow.com/questions/11/how-do-i-calculate-relative-time)), i.e. a function that takes two lists and "zips" them together to one list, interleaving the elements.
(Pseudo)example:
```
@a=(1, 2, ... | Is there an elegant zip to interleave two lists in Perl 5? | CC BY-SA 2.5 | 0 | 2008-09-01T19:59:37.287 | 2015-02-02T20:29:26.463 | 2017-05-23T12:09:24.100 | -1 | 2,905 | [
"perl",
"zip"
] |
38,348 | 1 | null | null | 3 | 679 | I need to `query` an Exchange server to find all messages having a certain value in `PR_SEARCH_KEY`. Do I have to open every mailbox and iterate through it or is there a faster solution?
This is for a program that needs to prepend something to the subject line of all copies of a message I got through a journal mailbo... | Finding all messages with a given PR_SEARCH_KEY | CC BY-SA 3.0 | null | 2008-09-01T20:01:06.457 | 2016-08-02T13:59:42.153 | 2016-08-02T13:59:42.153 | 4,311,889 | 4,097 | [
"performance",
"email",
"exchange-server",
"mapi"
] |
38,350 | 2 | null | 38,336 | 1 | null | > TrueType Fonts (TTF) will generally work on Windows, Mac, and Linux platforms.
Thanks Jason, but this isn't the answer I'm looking for. Many Linux distributions come with their own fonts that are different to the Mac/Windows versions - presumably because of font licensing issues.
I'd like a response from a Linux u... | null | CC BY-SA 2.5 | null | 2008-09-01T20:01:35.800 | 2008-09-01T20:01:35.800 | null | null | 3,654 | null |
38,343 | 2 | null | 38,336 | 0 | null | TrueType Fonts (TTF) will generally work on Windows, Mac, and Linux platforms.
[http://en.wikipedia.org/wiki/TrueType](http://en.wikipedia.org/wiki/TrueType)
| null | CC BY-SA 2.5 | null | 2008-09-01T19:57:00.287 | 2008-09-01T19:57:00.287 | null | null | 3,920 | null |
38,357 | 1 | 38,497 | null | 17 | 7,768 | If I get an error code result from a Cocoa function, is there any easy way to figure out what it means (other than by grepping through all the .h files in the framework bundles)?
| Error Code Reference for OSX/Cocoa | CC BY-SA 2.5 | 0 | 2008-09-01T20:04:49.973 | 2014-07-18T20:16:51.233 | 2008-11-25T12:32:04.137 | 1,175 | 1,175 | [
"cocoa",
"xcode",
"macos"
] |
38,352 | 1 | 61,103 | null | 3 | 4,974 | I need to store contact information for users. I want to present this data on the page as an [hCard](http://en.wikipedia.org/wiki/Hcard) and downloadable as a [vCard](http://en.wikipedia.org/wiki/VCard). I'd also like to be able to search the database by phone number, email, etc.
What do you think is the best way to ... | Address book DB schema | CC BY-SA 2.5 | 0 | 2008-09-01T20:02:15.127 | 2012-07-03T14:32:30.677 | null | null | 521 | [
"schema",
"microformats",
"vcf-vcard",
"normalizing",
"hcard"
] |
38,331 | 2 | null | 34,183 | 5 | null | I believe I've found the answer. It seems that Microsoft, in all their infinite wisdom, has blocked batch files from being executed by IIS in Windows Server 2003. Brenden Tompkins has a work-around here:
[http://codebetter.com/blogs/brendan.tompkins/archive/2004/05/13/13484.aspx](http://codebetter.com/blogs/brendan.to... | null | CC BY-SA 2.5 | null | 2008-09-01T19:41:24.163 | 2008-09-01T19:41:24.163 | null | null | 2,527 | null |
38,362 | 1 | 38,381 | null | 11 | 3,565 | I have 3 Linux machines, and want some way to keep the dotfiles in their home directories in sync. Some files, like .vimrc, are the same across all 3 machines, and some are unique to each machine.
I've used SVN before, but all the buzz about DVCSs makes me think I should try one - is there a particular one that would ... | Best version control system for managing home directories | CC BY-SA 2.5 | 0 | 2008-09-01T20:12:08.427 | 2013-02-27T20:07:02.200 | 2009-04-08T19:35:49.053 | 2,284 | 2,461 | [
"linux",
"version-control"
] |
38,327 | 2 | null | 12,815 | 6 | null | The primary tool I've also used was FitNesse. I've used it at several companies, with very good results. We did have test cases numbering in the many thousands, and we had to be very disciplined in how we organized and used them.
I've tried some other tools, including writing my own DSL (domain-specific language) and ... | null | CC BY-SA 2.5 | null | 2008-09-01T19:31:22.987 | 2008-09-01T19:31:22.987 | null | null | 4,083 | null |
38,359 | 2 | null | 37,804 | 6 | null | Hmm, protocol handlers look interesting.
As [Mark](https://stackoverflow.com/questions/37804/link-to-samba-shares-in-html#38258) said, in Windows protocol handlers can be dealt with at the OS level
Protocol handlers can also be done at the browser level (which is preferred, as it is cross platform and doesn't involve... | null | CC BY-SA 2.5 | null | 2008-09-01T20:06:51.463 | 2008-09-01T20:23:19.820 | 2017-05-23T11:47:35.330 | -1 | 1,666 | null |
38,367 | 2 | null | 38,362 | 4 | null | Any DVCS would likely work fine. My favorite is [Bazaar](http://bazaar-vcs.org/). It would be easiest to keep your config files in .config, version that, and then symlink as appropriate.
A benefit of DVCS is that you can version the per-machine config files as well, without interfering with versioning global configs.
| null | CC BY-SA 2.5 | null | 2008-09-01T20:15:56.030 | 2008-09-01T20:15:56.030 | null | null | 3,560 | null |
38,365 | 2 | null | 38,345 | 30 | null | The [List::MoreUtils](http://search.cpan.org/perldoc?List::MoreUtils) module has a zip/mesh function that should do the trick:
```
use List::MoreUtils qw(zip);
my @numbers = (1, 2, 3);
my @fruit = ('apple', 'orange', 'grape');
my @zipped = zip @numbers, @fruit;
```
Here is the source of the mesh function:
```
sub... | null | CC BY-SA 3.0 | null | 2008-09-01T20:13:58.903 | 2015-02-02T20:29:26.463 | 2015-02-02T20:29:26.463 | 176,646 | 3,920 | null |
38,373 | 2 | null | 38,305 | 0 | null | This would be an interesting project (has anyone done it already?)
I presume you'd give the tool your jar(s) as a starting point, and the library jar to clean up. It could use reflection to determine which classes your jar(s) reference directly, and which are used indirectly down the call tree (this is not trivial at... | null | CC BY-SA 2.5 | null | 2008-09-01T20:18:57.817 | 2008-09-01T20:18:57.817 | null | null | 838 | null |
38,375 | 2 | null | 38,323 | 2 | null | I like vmware. One nice feature is that it runs on multiple host OS's, so you can move your guest OS onto a linux server or a windows desktop as you like.
| null | CC BY-SA 2.5 | null | 2008-09-01T20:21:14.393 | 2008-09-01T20:21:14.393 | null | null | 116 | null |
38,376 | 2 | null | 38,362 | 0 | null | Version control software isn't really great for home directories. Worse, some software doesn't really like the .svn folders or starts to interpret their contents. You could of course try to fix this with some very complex mirroring setup, but that's hard.
| null | CC BY-SA 2.5 | null | 2008-09-01T20:21:26.733 | 2008-09-01T20:21:26.733 | null | null | 4,100 | null |
38,377 | 2 | null | 18,920 | 14 | null | You , but probably don't want to, set the document root on a per-file basis in the head of your file:
| null | CC BY-SA 2.5 | null | 2008-09-01T20:21:44.423 | 2008-09-01T20:21:44.423 | null | null | 4,056 | null |
38,332 | 2 | null | 38,323 | 17 | null | VMware did recently release a free version of ESXi recently.
VMware has a few advantages:
1. VMware virtual machines are portable across different types of hardware. IIRC, Hyper-V uses the drivers from the Host OS.
2. VMware virtual machines are portable across different VMware products (although you may need to use ... | null | CC BY-SA 2.5 | null | 2008-09-01T19:41:48.467 | 2008-09-01T19:41:48.467 | null | null | 4,081 | null |
38,378 | 1 | 38,415 | null | 1 | 2,574 | What's the best way to clone a control in Silverlight (including it's children)?
UPDATE
Is there a better way in Silverlight 2?
| Clone a control in silverlight | CC BY-SA 2.5 | null | 2008-09-01T20:21:50.307 | 2008-11-21T22:15:57.020 | 2008-11-21T22:15:57.020 | 398 | 398 | [
"silverlight"
] |
38,369 | 2 | null | 23,930 | 7 | null | Oddball examples? What about using the gamma function! Since, `Gamma n = (n-1)!`.
## OCaml: Using Gamma
```
let rec gamma z =
let pi = 4.0 *. atan 1.0 in
if z < 0.5 then
pi /. ((sin (pi*.z)) *. (gamma (1.0 -. z)))
else
let consts = [| 0.99999999999980993; 676.5203681218851; -1259.139216... | null | CC BY-SA 2.5 | null | 2008-09-01T20:17:25.370 | 2008-09-01T21:30:12.763 | 2008-09-01T21:30:12.763 | 157 | 157 | null |
38,366 | 2 | null | 38,336 | 2 | null | Just to clarify: You are looking for names of fonts that will make your website-design look similar to Windows and Mac OS X when viewed under Linux, you are not looking to design new fonts, correct?
(I read your question in the same way that Jason Navarrete did, so at least two people misunderstood your question.)
Th... | null | CC BY-SA 2.5 | null | 2008-09-01T20:14:39.823 | 2008-09-01T20:14:39.823 | null | null | 2,905 | null |
38,380 | 2 | null | 34,809 | 0 | null | Seems odd to me why you'd want to store the same object both server side and client side - especially if you're comparing them on each trip.
I'd guess that deserializing the cookie and comparing it to the server side object would be equivalent in performance to just serializing the object again.
But, if you wanted to... | null | CC BY-SA 2.5 | null | 2008-09-01T20:24:35.790 | 2008-09-01T20:24:35.790 | null | null | 2,199 | null |