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 ⌀ |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6,129 | 2 | null | 6,110 | 0 | null | Ideally, you'd probably want a separate table named Company and then a company_id column in this "Location" table that is a foreign key to the Company table's primary key, likely called id. That would avoid a fair bit of text duplication in this table (over 18,000 rows, an integer foreign key would save quite a bit of ... | null | CC BY-SA 2.5 | null | 2008-08-08T16:47:35.853 | 2008-08-08T16:47:35.853 | null | null | 726 | null |
6,133 | 2 | null | 6,126 | 3 | null | I've seen a lot of people and editors either indenting each condition in your if statement with one tab, or matching it up with the open paren:
```
if (var1 == true
&& var2 == true
&& var3 == true
) {
/* do something.. */
}
```
I usually put the close paren on the same line as the last condition:
```... | null | CC BY-SA 2.5 | null | 2008-08-08T16:50:23.570 | 2008-08-08T16:50:23.570 | null | null | 72 | null |
6,135 | 2 | null | 6,126 | 6 | null | I'll often split these up into component boolean variables:
```
bool orderValid = orderDate < DateTime.Now && orderStatus != Status.Canceled;
bool custValid = customerBalance == 0 && customerName != "Mike";
if (orderValid && custValid)
{
...
```
| null | CC BY-SA 2.5 | null | 2008-08-08T16:50:57.093 | 2008-08-08T16:50:57.093 | null | null | 205 | null |
6,139 | 2 | null | 5,507 | 4 | null | For most needs on the desktop you wont need to know the Win32, however there is a LOT of Win32 not in .NET, but it is in the outlaying stuff that may end up being less than 1% of your application.
USB support, HID support, Windows Media Foundation just off the top of my head. There are many cool Vista API's only avail... | null | CC BY-SA 2.5 | null | 2008-08-08T16:53:50.550 | 2008-08-08T16:53:50.550 | null | null | 580 | null |
6,141 | 2 | null | 6,134 | 0 | null | Using ps is the right way. I've already done something similar before but don't have the source handy.
Generally - ps has an option to tell it which fields to show and by which to sort. You can sort the output by running time, grep the process you want and then kill it.
HTH
| null | CC BY-SA 2.5 | null | 2008-08-08T16:54:49.643 | 2008-08-08T16:54:49.643 | null | null | 573 | null |
6,148 | 2 | null | 6,126 | 0 | null | I like to break them down by level, so I'd format you example like this:
```
if (var1 = true
&& var2 = true
&& var2 = true
&& var3 = true
&& var4 = true
&& var5 = true
&& var6 = true){
```
It's handy when you have more nesting, like this (obviously the real conditions would be more interesting than "= true" fo... | null | CC BY-SA 2.5 | null | 2008-08-08T16:59:56.747 | 2008-08-08T16:59:56.747 | null | null | 765 | null |
6,130 | 1 | 6,144 | null | 67 | 82,182 | I'm using subclipse in Flex Builder 3, and recently received this error when trying to commit:
`svn: Checksum mismatch for '/Users/redacted/Documents/Flex Builder 3/path/to/my/file.mxml'; expected: 'f8cb275de72776657406154dd3c10348', actual: 'null'`
I worked around it by:
1. Committing all the other changed files, ... | Repair SVN Checksum | CC BY-SA 2.5 | 0 | 2008-08-08T16:49:17.377 | 2018-09-05T10:46:40.597 | 2008-08-18T18:35:56.863 | 1,220 | 763 | [
"svn",
"subclipse"
] |
6,150 | 2 | null | 6,134 | 36 | null | Found an answer that works for me:
```
ps -eo uid,pid,etime | egrep '^ *user-id' | egrep ' ([0-9]+-)?([0-9]{2}:?){3}' | awk '{print $2}' | xargs -I{} kill {}
```
(Where is a specific user's ID with long-running processes.)
The second regular expression matches the a time that has an optional days figure, followe... | null | CC BY-SA 3.0 | null | 2008-08-08T17:03:56.850 | 2013-05-12T00:54:23.463 | 2013-05-12T00:54:23.463 | 1,658,527 | 726 | null |
6,151 | 1 | 6,200 | null | 7 | 1,166 | I'm trying to customize some TFS work items via the VS2008 xml editor, but every time I open a work item xml file it jumps to the graphical designer. All that gives me is a "View XML" button that doesn't let you edit the xml directly.
| How do I edit work items in the Visual Studio 2008 xml editor? | CC BY-SA 2.5 | null | 2008-08-08T17:04:25.973 | 2008-09-18T12:02:57.303 | null | null | 327 | [
"windows",
"visual-studio",
"tfs"
] |
6,144 | 2 | null | 6,130 | 38 | null | The file in the .svn directory that keeps track of what you have checked out, when, what revision, and from where, has gotten corrupted somehow, for that particular file.
This is no more dangerous or critical than the normal odd file problem, and can be because of various problems, like a subversion program dying mid-... | null | CC BY-SA 2.5 | null | 2008-08-08T16:56:13.027 | 2008-08-08T16:56:13.027 | null | null | 267 | null |
6,140 | 2 | null | 6,126 | 62 | null | Separate the condition in several booleans and then use a master boolean as the condition.
```
bool isOpaque = object.Alpha == 1.0f;
bool isDrawable = object.CanDraw && object.Layer == currentLayer;
bool isHidden = hideList.Find(object);
bool isVisible = isOpaque && isDrawable && ! isHidden;
if(isVisible)
{
// .... | null | CC BY-SA 2.5 | null | 2008-08-08T16:54:30.143 | 2008-08-08T16:58:43.943 | 2008-08-08T16:58:43.943 | 42 | 42 | null |
6,142 | 2 | null | 6,126 | 2 | null | Well, first off, why not:
> if (var1 && var2 && var2 && var3 && var4 && var5 && var6) {
...
Also, it's very hard to refactor abstract code examples. If you showed a specific example it would be easier to identify a better pattern to fit the problem.
It's no better, but what I've done in the past:
(The following... | null | CC BY-SA 2.5 | null | 2008-08-08T16:55:23.090 | 2010-05-13T10:45:25.590 | 2010-05-13T10:45:25.590 | 758 | 758 | null |
6,145 | 2 | null | 6,134 | 22 | null | For anything older than one day,
```
ps aux
```
will give you the answer, but it drops down to day-precision which might not be as useful.
```
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.0 0.0 7200 308 ? Ss Jun22 0:02 init [5]
root 2 0.0 0.0 ... | null | CC BY-SA 2.5 | null | 2008-08-08T16:56:56.880 | 2008-08-09T00:27:05.690 | 2008-08-09T00:27:05.690 | 116 | 116 | null |
6,155 | 1 | null | null | 42 | 30,682 | What kinds of hook scripts are people using for Subversion? Just general ideas but code would be great too!
| Common Types of Subversion Hooks | CC BY-SA 2.5 | 0 | 2008-08-08T17:08:51.957 | 2020-01-29T13:54:58.347 | 2012-10-18T11:56:15.927 | 761,095 | 204 | [
"svn",
"version-control",
"scripting",
"svn-hooks"
] |
6,153 | 2 | null | 6,151 | 1 | null | Ah, looks like you have to go to File->Open and click the down arrow next to the Open button to "Open With" the xml editor. If someone wants to copy and paste this, free accepted answer :P
| null | CC BY-SA 2.5 | null | 2008-08-08T17:06:14.910 | 2008-08-08T17:06:14.910 | null | null | 327 | null |
6,157 | 2 | null | 6,126 | 12 | null | I'm surprised no one got this one yet. There's a refactoring specifically for this type of problem:
[http://www.refactoring.com/catalog/decomposeConditional.html](http://www.refactoring.com/catalog/decomposeConditional.html)
| null | CC BY-SA 2.5 | null | 2008-08-08T17:09:38.477 | 2010-05-13T18:16:20.573 | 2010-05-13T18:16:20.573 | 82,118 | 34 | null |
6,162 | 2 | null | 6,113 | 1 | null | I hate to say this but as soon as you put something on a client machine, security for that data goes out the window.
If your program is going to decrypt that string, you need to assume that an attacker can do the same. Attaching a debugger to your program would be one way.
Storing the connection string on a server, a... | null | CC BY-SA 2.5 | null | 2008-08-08T17:12:58.750 | 2008-08-08T17:12:58.750 | null | null | 267 | null |
6,152 | 2 | null | 6,126 | 4 | null | Check out [Implementation Patterns](https://rads.stackoverflow.com/amzn/click/com/0321413091) by Kent Beck. There is a particular pattern I am thinking of that may help in this situation... it is called "Guards". Rather than having tons of conditions, you can break them out into a guard, which makes it clear which ar... | null | CC BY-SA 2.5 | null | 2008-08-08T17:04:33.197 | 2008-08-08T17:04:33.197 | null | null | 122 | null |
6,159 | 2 | null | 6,126 | 0 | null | If you happen to be programming in Python, it's a cinch with the built-in `all()` function applied over the list of your variables (I'll just use Boolean literals here):
```
>>> L = [True, True, True, False, True]
>>> all(L) # True, only if all elements of L are True.
False
>>> any(L) # True, if any elements of L are ... | null | CC BY-SA 2.5 | null | 2008-08-08T17:11:23.060 | 2008-08-08T17:11:23.060 | null | null | 726 | null |
6,161 | 2 | null | 1,734 | 11 | null | Protocol buffers are intended to optimize communications between machines. They are really not intended for human interaction. Also, the format is binary, so it could not replace XML in that use case.
I would also recommend [JSON](http://en.wikipedia.org/wiki/JSON) as being the most compact text-based format.
| null | CC BY-SA 2.5 | null | 2008-08-08T17:12:24.290 | 2008-08-08T17:12:24.290 | null | null | 758 | null |
6,163 | 2 | null | 6,126 | -2 | null | If you do this:
```
if (var1 == true) {
if (var2 == true) {
if (var3 == true) {
...
}
}
}
```
Then you can also respond to cases where something isn't true. For example, if you're validating input, you could give the user a tip for how to properly format it, or whatever.
| null | CC BY-SA 2.5 | null | 2008-08-08T17:13:49.730 | 2008-08-08T17:13:49.730 | null | null | 55 | null |
6,174 | 2 | null | 5,511 | 1 | null | Call me crazy, but why not put plus and minus buttons at either side of the TextBox control and simply prevent the TextBox from receiving cursor focus, thereby creating your own cheap NumericUpDown control?
| null | CC BY-SA 2.5 | null | 2008-08-08T17:27:04.073 | 2008-08-08T17:27:04.073 | null | null | 192 | null |
6,165 | 2 | null | 6,155 | 0 | null | The most common one I think is to allow people to change revision comments after comitting.
You need to enable the 'pre-revprop-change' hook script to allow that. The example provided, if enabled allows editing only the comment property and only be the original comitter. Great for correcting typos.
| null | CC BY-SA 2.5 | null | 2008-08-08T17:15:26.903 | 2008-08-08T17:15:26.903 | null | null | 758 | null |
6,173 | 1 | 6,183 | null | 17 | 11,940 | I'm looking for a .NET regular expression extract all the URLs from a webpage but haven't found one to be comprehensive enough to cover all the different ways you can specify a link.
And a side question:
Is there ? Or am I better off using a series of less complicated regular expressions and just using mutliple pass... | Regular expression for parsing links from a webpage? | CC BY-SA 3.0 | 0 | 2008-08-08T17:24:19.100 | 2019-04-10T16:22:20.287 | 2017-12-16T22:04:58.370 | 858,913 | 322 | [
".net",
"html",
"regex"
] |
6,167 | 2 | null | 6,134 | 9 | null | In this way you can obtain the list of the ten oldest processes:
| null | CC BY-SA 2.5 | null | 2008-08-08T17:20:01.917 | 2008-08-08T17:20:01.917 | null | null | 527 | null |
6,176 | 2 | null | 6,113 | 0 | null | There are some other idea's also. You can always use impersonation. Also, you can use the Enterprise Library's (Common Library).
```
<section name="enterpriseLibrary.ConfigurationSource" type="Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ConfigurationSourceSection, Microsoft.Practices.EnterpriseLibrary.C... | null | CC BY-SA 2.5 | null | 2008-08-08T17:28:06.130 | 2008-08-08T17:28:06.130 | null | null | 721 | null |
6,180 | 2 | null | 6,113 | 0 | null | .NET supports encryption on config values like this. You could leave it in a config file, but encrypted.
| null | CC BY-SA 2.5 | null | 2008-08-08T17:30:27.623 | 2008-08-08T17:30:27.623 | null | null | 106 | null |
6,179 | 2 | null | 6,173 | 0 | null | URL's? As in images/scripts/css/etc.?
> `%href="(.["]*)"%`
| null | CC BY-SA 2.5 | null | 2008-08-08T17:29:57.560 | 2008-12-25T01:33:48.570 | 2008-08-17T03:00:45.613 | 1 | 40 | null |
6,178 | 2 | null | 6,126 | 0 | null | McDowell,
You are correct that when using the single '&' operator that both sides of the expression evaluate. However, when using the '&&' operator (at least in C#) then the first expression to return false is the last expression evaluated. This makes putting the evaulation before the FOR statement just as good as a... | null | CC BY-SA 2.5 | null | 2008-08-08T17:29:52.680 | 2008-08-08T17:29:52.680 | null | null | 32 | null |
6,181 | 2 | null | 6,173 | 0 | null | This will capture the URLs from all a tags as long as the author of the HTML used quotes:
```
<a[^>]+href="([^"]+)"[^>]*>
```
I made an example [here](http://www.rubular.com/regexes/840).
| null | CC BY-SA 2.5 | null | 2008-08-08T17:31:35.157 | 2008-08-08T17:39:48.353 | 2008-08-08T17:39:48.353 | 619 | 619 | null |
6,187 | 2 | null | 6,126 | 1 | null | As others have mentioned, I would analyze your conditionals to see if there's a way you can outsource it to other methods to increase readability.
| null | CC BY-SA 2.5 | null | 2008-08-08T17:33:46.477 | 2008-12-25T01:38:51.540 | null | null | 40 | null |
6,184 | 1 | 6,211 | null | 39 | 33,438 | When you subscribe to an event on an object from within a form, you are essentially handing over control of your callback method to the event source. You have no idea whether that event source will choose to trigger the event on a different thread.
The problem is that when the callback is invoked, you cannot assume th... | How do I make event callbacks into my win forms thread safe? | CC BY-SA 4.0 | 0 | 2008-08-08T17:32:41.783 | 2019-01-20T13:58:49.230 | 2019-01-20T13:58:49.230 | 567,854 | 756 | [
"c#",
".net",
"winforms",
"multithreading",
"events"
] |
6,183 | 2 | null | 6,173 | 12 | null | ```
((mailto\:|(news|(ht|f)tp(s?))\://){1}\S+)
```
I took this from [regexlib.com](http://regexlib.com/Search.aspx?k=URL)
[editor's note: the {1} has no real function in this regex; [see this post](https://stackoverflow.com/questions/13470/question-about-specific-regular-expression)]
| null | CC BY-SA 3.0 | null | 2008-08-08T17:32:12.253 | 2018-03-01T01:18:18.910 | 2018-03-01T01:18:18.910 | 4,539,709 | 350 | null |
6,158 | 2 | null | 6,126 | 7 | null | There are two issues to address here: readability and understandability
The "readability" solution is a style issue and as such is open to interpretation. My preference is this:
```
if (var1 == true && // Explanation of the check
var2 == true && // Explanation of the check
var3 == true && // Explanation of th... | null | CC BY-SA 2.5 | null | 2008-08-08T17:10:27.897 | 2008-08-08T17:13:40.137 | 2008-08-08T17:13:40.137 | 756 | 756 | null |
6,177 | 2 | null | 6,173 | 1 | null | Look at the URI specification. That could help you a lot. And as far as performance goes, you can pretty much extract all the HTTP links in a modest web page. When I say modest I definitely do not mean one page all encompassing HTML manuals like that of ELisp manual. Also performance is a touchy topic. My advice would ... | null | CC BY-SA 2.5 | null | 2008-08-08T17:29:50.183 | 2008-08-08T17:29:50.183 | 2020-06-20T09:12:55.060 | -1 | 617 | null |
6,182 | 2 | null | 6,173 | 1 | null | I don't have time to try and think of a regex that probably won't work, but I wanted to comment that you should most definitely break up your regex, at least if it gets to [this level of ugliness](http://www.codinghorror.com/blog/archives/000214.html):
```
(?:(?:\r\n)?[ \t])*(?:(?:(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(... | null | CC BY-SA 2.5 | null | 2008-08-08T17:32:01.893 | 2008-08-08T17:35:16.537 | 2008-08-08T17:35:16.553 | 122 | 122 | null |
6,196 | 2 | null | 6,113 | 0 | null | You want to be able to distribute the DLL with all of the setup information being in a configurable place, but the fact is you can't have one of the handy-dandy .NET config files for a DLL unless you do something custom.
Maybe you need to rethink what responsibility your DLL should have. Would it be possible, or make ... | null | CC BY-SA 2.5 | null | 2008-08-08T17:40:28.227 | 2008-08-08T17:40:28.227 | null | null | 12,081 | null |
6,188 | 2 | null | 5,874 | 1 | null | Our current project makes heavy use of drag+drop, using [GWT](http://code.google.com/webtoolkit/) and [gwt-dnd](http://code.google.com/p/gwt-dnd/) you can do some very cool stuff. Standards based, and works in IE6, Safari, Firefox, Opera, etc..
The issue of how to transmit a file is a separate one I believe.
As for FTP... | null | CC BY-SA 4.0 | null | 2008-08-08T17:35:20.407 | 2021-10-25T12:31:41.203 | 2021-10-25T12:31:41.203 | 17,169,050 | 758 | null |
6,197 | 2 | null | 6,184 | 0 | null | In many simple cases, you can use the MethodInvoker delegate and avoid the need to create your own delegate type.
| null | CC BY-SA 2.5 | null | 2008-08-08T17:41:18.333 | 2008-08-08T17:41:18.333 | null | null | 404 | null |
6,200 | 2 | null | 6,151 | 1 | null | I don't have TFS but I know in regular VS there is an Open With... option in most items' contextual menu that even let you change the default editor. Very useful when you are tired of the Designer opening instead of the Code file on Windows forms.
| null | CC BY-SA 2.5 | null | 2008-08-08T17:52:07.783 | 2008-08-08T17:52:07.783 | null | null | 42 | null |
6,206 | 2 | null | 769 | 7 | null | For a 3x3 system of linear equations I guess it would be okay to roll out your own algorithms.
However, you might have to worry about accuracy, division by zero or really small numbers and what to do about infinitely many solutions. My suggestion is to go with a standard numerical linear algebra package such as [LAPA... | null | CC BY-SA 3.0 | null | 2008-08-08T17:59:27.907 | 2016-12-20T05:58:05.240 | 2016-12-20T05:58:05.240 | 1,997,093 | null | null |
6,193 | 2 | null | 6,126 | 0 | null | @tweakt
> It's no better, but what I've done in the past:boolean ok = cond1;
ok &= cond2;
ok &= cond3;
ok &= cond4;
ok &= cond5;
ok &= cond6;Which is the same as:ok = (cond1 && cond2 && cond3 && cond4 && cond5 && cond6);
Actually, these two things are not the same in most languages. The seco... | null | CC BY-SA 2.5 | null | 2008-08-08T17:37:12.943 | 2008-08-08T17:37:12.943 | null | null | 328 | null |
6,202 | 2 | null | 6,173 | 2 | null | All HTTP's and MAILTO's
```
(["'])(mailto:|http:).*?\1
```
All links, including relative ones, that are called by href or src.
```
#Matches things in single or double quotes, but not the quotes themselves
(?<=(["']))((?<=href=['"])|(?<=src=['"])).*?(?=\1)
#Maches thing in either double or single quotes, including ... | null | CC BY-SA 2.5 | null | 2008-08-08T17:52:29.497 | 2008-08-08T20:36:16.843 | 2008-08-08T20:36:16.843 | 30 | 30 | null |
6,207 | 1 | 281,143 | null | 16 | 4,542 | Has anyone had any experience in building a 'real world' application with the [Smart Client Software Factory](http://www.codeplex.com/smartclient), from Microsofts Patterns and Practices group? I'm looking for advice on how difficult it was to master, whether it decreased your time to market and any other general pitf... | Experiences of the Smart Client Software Factory | CC BY-SA 2.5 | 0 | 2008-08-08T17:59:41.230 | 2017-09-11T14:46:35.740 | 2017-09-11T14:46:35.740 | 1,000,551 | 770 | [
".net",
"scsf"
] |
6,192 | 2 | null | 5,349 | 4 | null | This question used to be in the [official FAQ](http://code.google.com/p/memcached/wiki/FAQ)
[What are some limits in memcached I might hit? (Wayback Machine)](http://web.archive.org/web/20080927061146/http://code.google.com/p/memcached/wiki/FAQ)
To quote:
> The simple limits you will probably see with memcache are t... | null | CC BY-SA 3.0 | null | 2008-08-08T17:37:02.743 | 2011-09-26T12:58:24.153 | 2011-09-26T12:58:24.153 | 419 | 419 | null |
6,199 | 2 | null | 5,872 | 1 | null | Ok, so my final solution is this:
Use the export command to export to a folder called "export" in the same directory as a file called "deploy.bat", then I run the deploy script (v1 stands for version 1, which is what version I am currently on in this project) This script utilizes 7-Zip, which I have placed on my syste... | null | CC BY-SA 2.5 | null | 2008-08-08T17:46:03.800 | 2008-08-08T17:46:03.800 | null | null | 58 | null |
6,210 | 1 | 6,213 | null | 4 | 910 | In a .net system I'm building, there is a need for automated e-mail notifications. These should be editable by an admin. What's the easiest way to do this? SQL table and WYSIWIG for editing?
---
The queue is a great idea. I've been throwing around that type of process for awhile with my old company.
| E-mail Notifications | CC BY-SA 3.0 | null | 2008-08-08T18:04:24.950 | 2016-11-20T00:25:16.067 | 2011-11-25T01:24:21.307 | 1,288 | 721 | [
".net",
"email"
] |
6,209 | 1 | 6,223 | null | 22 | 10,149 | Given a string like this:
> a,"string, with",various,"values, and some",quoted
What is a good algorithm to split this based on commas while ignoring the commas inside the quoted sections?
The output should be an array:
> [ "a", "string, with", "various", "values, and some", "quoted" ]
| Split a string ignoring quoted sections | CC BY-SA 2.5 | 0 | 2008-08-08T18:04:03.653 | 2018-10-15T02:37:26.900 | 2008-08-24T15:22:08.140 | 1,026 | null | [
"language-agnostic",
"parsing",
"csv"
] |
6,211 | 2 | null | 6,184 | 35 | null | To simplify Simon's code a bit, you could use the built in generic Action delegate. It saves peppering your code with a bunch of delegate types you don't really need. Also, in .NET 3.5 they added a params parameter to the Invoke method so you don't have to define a temporary array.
```
void SomethingHappened(object ... | null | CC BY-SA 2.5 | null | 2008-08-08T18:05:24.493 | 2008-08-12T15:59:51.797 | 2008-08-12T15:59:51.797 | 632 | 632 | null |
6,213 | 2 | null | 6,210 | 3 | null | From a high level, yes. :D The main thing is some place to store the templates. A database is a great option unless you're not already using one, then file systems work fine.
WSIWIG editors (such as fckeditor) work well and give you some good options regarding the features that you allow.
Some sort of token replac... | null | CC BY-SA 2.5 | null | 2008-08-08T18:09:55.017 | 2008-08-08T18:09:55.017 | null | null | 312 | null |
6,208 | 1 | 6,258 | null | 14 | 996 | I've got a website that I've just uploaded onto the interwebs, and it's displaying differently using Firefox 3.0.1 on Ubuntu and WinXP.
Two things I've noticed on Ubuntu:
1. The favicon is missing
2. The background color isn't displaying (it's set in the stylesheet)
What have I done wrong? The CSS file is being ... | FF3 WinXP != FF3 Ubuntu - why? | CC BY-SA 2.5 | 0 | 2008-08-08T18:03:26.230 | 2009-08-21T23:52:30.220 | 2008-08-09T13:23:17.230 | 257 | 257 | [
"css",
"firefox",
"ubuntu"
] |
6,221 | 2 | null | 4,949 | 3 | null | [Beanstalk](http://beanstalkapp.com) has built-in post-commit hooks for deploying to development, staging, and production servers.
| null | CC BY-SA 2.5 | null | 2008-08-08T18:17:23.550 | 2008-08-08T18:17:23.550 | null | null | 574 | null |
6,217 | 2 | null | 6,209 | 1 | null | The author here dropped in a blob of C# code that handles the scenario you're having a problem with:
[CSV File Imports in .Net](https://stackoverflow.com/questions/1898/csv-file-imports-in-net#6111)
Shouldn't be too difficult to translate.
| null | CC BY-SA 2.5 | null | 2008-08-08T18:13:11.623 | 2008-08-08T18:13:11.623 | 2017-05-23T12:17:19.817 | -1 | 419 | null |
6,212 | 2 | null | 6,210 | 0 | null | Are you just talking about the interface and storage, or the implementation of sending the emails as well?
Yes, a SQL table with FROM, TO, Subject, Body should work for storage and, heck, a textbox or even maybe a RichText box should work for editing.
Or is this a web interface?
For actually sending it, check out th... | null | CC BY-SA 2.5 | null | 2008-08-08T18:07:03.727 | 2008-08-08T18:07:03.727 | null | null | 194 | null |
6,215 | 2 | null | 6,209 | 2 | null | Of course using a CSV parser is better but just for the fun of it you could:
```
Loop on the string letter by letter.
If current_letter == quote :
toggle inside_quote variable.
Else if (current_letter ==comma and not inside_quote) :
push current_word into array and clear current_word.
Els... | null | CC BY-SA 2.5 | null | 2008-08-08T18:12:49.283 | 2009-04-08T12:35:54.087 | 2009-04-08T12:35:54.087 | 238 | 238 | null |
6,222 | 1 | 7,877 | null | 16 | 4,415 | Is anyone successfully using the latest 64-bit Ganymede release of Eclipse on Windows XP or Vista 64-bit?
Currently I run the normal Eclipse 3.4 distribution on a 32bit JDK and launch & compile my apps with a 64bit JDK. Our previous experience has been that the 64bit Eclipse distro is unstable for us, so I'm curious i... | Eclipse on win64 | CC BY-SA 2.5 | null | 2008-08-08T18:17:50.460 | 2015-11-30T00:48:34.950 | 2008-10-11T14:41:37.377 | 15,352 | 235 | [
"java",
"eclipse",
"eclipse-3.4",
"ganymede"
] |
6,230 | 2 | null | 164 | 19 | null | May I suggest the [jQuery Media Plugin](http://malsup.com/jquery/media/)? Provides embed code for all kinds of video, not just WMV and does browser detection, keeping all that messy switch/case statements out of your templates.
| null | CC BY-SA 2.5 | null | 2008-08-08T18:29:13.057 | 2008-08-08T18:29:13.057 | null | null | 302 | null |
6,228 | 2 | null | 6,210 | 1 | null | I am thinking that if these are automated notifications, then this means they are probably going out as a result of some type of event in your software. If this is a web based app, and you are going to have a number of these being sent out, then consider implementing an email queue rather than sending out an email on e... | null | CC BY-SA 2.5 | null | 2008-08-08T18:25:17.810 | 2008-08-08T18:25:17.810 | null | null | 380 | null |
6,229 | 2 | null | 5,831 | 1 | null | If this is for installation or distribution, have you considered using the Windows Installer SDK? It has the ability to patch binary files.
[http://msdn.microsoft.com/en-us/library/aa370578(VS.85).aspx](http://msdn.microsoft.com/en-us/library/aa370578(VS.85).aspx)
| null | CC BY-SA 2.5 | null | 2008-08-08T18:26:45.793 | 2008-08-08T18:26:45.793 | null | null | 32 | null |
6,223 | 2 | null | 6,209 | 2 | null | If my language of choice didn't offer a way to do this without thinking then I would initially consider two options as the easy way out:
1. Pre-parse and replace the commas within the string with another control character then split them, followed by a post-parse on the array to replace the control character used pre... | null | CC BY-SA 3.0 | null | 2008-08-08T18:18:34.577 | 2016-12-20T09:31:59.700 | 2016-12-20T09:31:59.700 | 7,040,547 | 770 | null |
6,227 | 2 | null | 5,949 | 4 | null | Rather than URLs like this:
```
http://example.com/user/783
```
Why not have:
```
http://example.com/user/yukondude
```
Which is friendlier to humans and doesn't leak that tiny bit of information?
| null | CC BY-SA 2.5 | null | 2008-08-08T18:24:15.797 | 2008-08-08T18:24:15.797 | null | null | 257 | null |
6,226 | 2 | null | 1,607 | 5 | null | We use a very simple but yet effective solution.
For new installs, we have a metadata.sql file in the repository which holds all the DB schema, then in the build process we use this file to generate the database.
For updates, we add the updates in the software hardcoded. We keep it hardcoded because we don't like sol... | null | CC BY-SA 3.0 | null | 2008-08-08T18:21:33.993 | 2014-01-21T06:33:42.887 | 2014-01-21T06:33:42.887 | 1,931,841 | 727 | null |
6,255 | 2 | null | 6,209 | 0 | null | This is a standard CSV-style parse. A lot of people try to do this with regular expressions. You can get to about 90% with regexes, but you really need a real CSV parser to do it properly. I found a [fast, excellent C# CSV parser on CodeProject](http://www.codeproject.com/KB/database/CsvReader.aspx) a few months ago th... | null | CC BY-SA 2.5 | null | 2008-08-08T18:52:50.030 | 2008-08-08T18:52:50.030 | null | null | 756 | null |
6,237 | 2 | null | 6,209 | 0 | null | I use this to parse strings, not sure if it helps here; but with some minor modifications perhaps?
```
function getstringbetween($string, $start, $end){
$string = " ".$string;
$ini = strpos($string,$start);
if ($ini == 0) return "";
$ini += strlen($start);
$len = strpos($string,$end,$ini) - $ini... | null | CC BY-SA 2.5 | null | 2008-08-08T18:36:07.460 | 2008-08-08T18:36:07.460 | null | null | 547 | null |
6,256 | 2 | null | 6,207 | 5 | null | I don't have personal experience, so favor the advice of someone that does over mine. I know two coworkers that have used this factory and both had the same take-way:
1. It hurt to set up and learn
2. It was worth it in the end
So if you have up-front time to spare, I'd go for it.
| null | CC BY-SA 2.5 | null | 2008-08-08T18:54:00.823 | 2008-08-08T18:54:00.823 | null | null | 308 | null |
6,258 | 2 | null | 6,208 | 10 | null | I would first suggesting getting you html and css code validated. If there are any errors in your markup, these can cause errors in the rendering.
- [CSS Validator](http://jigsaw.w3.org/css-validator/)- [HTML Validator](http://validator.w3.org/)
| null | CC BY-SA 2.5 | null | 2008-08-08T18:54:41.010 | 2008-08-09T11:34:35.593 | 2008-08-09T11:34:35.593 | 383 | 383 | null |
6,280 | 2 | null | 5,223 | 25 | null | Here's how and don't forget to check that the property is not on the prototype chain:
```
var element_count = 0;
for(var e in myArray)
if(myArray.hasOwnProperty(e))
element_count++;
```
| null | CC BY-SA 3.0 | null | 2008-08-08T19:18:45.143 | 2012-05-23T23:28:42.620 | 2012-05-23T23:28:42.620 | 419 | 56 | null |
6,232 | 2 | null | 1,607 | 5 | null | I've used the following database project structure in Visual Studio for several projects and it's worked pretty well:
Database
> Change Scripts> 0.PreDeploy.sql1.SchemaChanges.sql2.DataChanges.sql3.Permissions.sqlCreate Scripts> SprocsFunctionsViews
Our build system then updates the database from one version to the ... | null | CC BY-SA 2.5 | null | 2008-08-08T18:31:25.597 | 2008-08-08T18:31:25.597 | null | null | 637 | null |
6,285 | 2 | null | 4,923 | 18 | null | If Safari and Firefox support is good enough for you, there is a CSS solution:
```
ul {
-webkit-column-count: 3;
-moz-column-count: 3;
column-count: 3;
-webkit-column-gap: 2em;
-moz-column-gap: 2em;
column-gap: 2em;
}
```
I'm not sure about Opera.
| null | CC BY-SA 3.0 | null | 2008-08-08T19:25:00.183 | 2016-11-30T09:39:35.017 | 2016-11-30T09:39:35.017 | 2,571,493 | 56 | null |
6,284 | 1 | 7,167 | null | 8 | 852 | I've only been using VS 2008 Team Foundation for a few weeks. Over the last few days, I've noticed that sometimes one of my objects/controls on my page just disappears from intellisense. The project builds perfectly and the objects are still in the HTML, but I still can't find the object.
Any one else notice this?
... | VS 2008 - Objects disappearing? | CC BY-SA 3.0 | null | 2008-08-08T19:24:43.710 | 2013-12-02T12:53:56.637 | 2013-12-02T12:53:56.637 | 2,432,317 | 721 | [
".net",
"visual-studio",
"tfs"
] |
6,295 | 2 | null | 5,916 | 0 | null | I really don't have a problem with using #region to organize code. Personally, I'll usually setup different regions for things like properties, event handlers, and public/private methods.
| null | CC BY-SA 2.5 | null | 2008-08-08T19:30:57.147 | 2008-08-08T19:30:57.147 | null | null | 423 | null |
6,289 | 2 | null | 6,208 | 1 | null | I've also run into differences between FF3 on WinXP and FF3 on OS X (mostly with CSS positioning). The CSS and HTML both validated properly, but I was never able to figure out why there was this difference. I would think that the rendering engine would be the same, but apparently there are at least a few subtle diffe... | null | CC BY-SA 2.5 | null | 2008-08-08T19:27:15.907 | 2008-08-08T19:27:15.907 | null | null | 423 | null |
6,278 | 2 | null | 6,209 | 0 | null |
# Here's one in pseudocode (a.k.a. Python) in one pass :-P
```
def parsecsv(instr):
i = 0
j = 0
outstrs = []
# i is fixed until a match occurs, then it advances
# up to j. j inches forward each time through:
while i < len(instr):
if j < len(instr) and instr[j] == '"':
... | null | CC BY-SA 2.5 | null | 2008-08-08T19:15:34.463 | 2008-08-08T19:15:34.463 | null | null | 229 | null |
6,296 | 2 | null | 6,155 | 3 | null | In my work place we've set up a post-commit hook that generates RSS feeds that are displayed in various dash boards and are used for code reviewers to know when it is time to review and for us to see that new employees are committing enough.
| null | CC BY-SA 2.5 | null | 2008-08-08T19:30:58.067 | 2008-08-08T19:30:58.067 | null | null | 573 | null |
6,243 | 2 | null | 6,209 | 0 | null | Here's a simple algorithm:
1. Determine if the string begins with a '"' character
2. Split the string into an array delimited by the '"' character.
3. Mark the quoted commas with a placeholder #COMMA# If the input starts with a '"', mark those items in the array where the index % 2 == 0 Otherwise mark those items in ... | null | CC BY-SA 2.5 | null | 2008-08-08T18:40:40.617 | 2008-08-08T19:36:36.760 | 2008-08-08T19:36:36.760 | 92 | 92 | null |
6,309 | 2 | null | 6,301 | -2 | null | Typically, integer values are signed, unless you explicitly need an unsigned value. It's just the way they are used. I may not agree with that choice, but that's just the way it is.
For the time being, with todays typical memory constraints, if your array or similar data structure needs an UInt32 length, you should co... | null | CC BY-SA 2.5 | null | 2008-08-08T19:40:31.587 | 2008-08-08T19:40:31.587 | null | null | 267 | null |
6,301 | 1 | 6,320 | null | 106 | 17,087 | Why is `Array.Length` an int, and not a `uint`. This bothers me (just a bit) because a length value can never be negative.
This also forced me to use an int for a length-property on my own class, because when you
specify an int-value, this needs to be cast explicitly...
So the ultimate question is: is there any use... | Why is Array.Length an int, and not an uint | CC BY-SA 4.0 | 0 | 2008-08-08T19:34:13.503 | 2019-01-20T13:58:39.503 | 2019-01-20T13:58:39.503 | 567,854 | 56 | [
"c#",
".net",
"int",
"uint"
] |
6,287 | 2 | null | 5,916 | 3 | null | @[Tom](https://stackoverflow.com/questions/5916/how-do-you-feel-about-code-folding#5971)
Partial classes are provided so that you can separate tool auto-generated code from any customisations you may need to make after the code gen has done its bit. This means your code stays intact after you re-run the codegen and do... | null | CC BY-SA 2.5 | null | 2008-08-08T19:26:51.740 | 2008-08-08T19:26:51.740 | 2017-05-23T12:07:11.813 | -1 | 419 | null |
6,305 | 2 | null | 6,209 | 21 | null | Looks like you've got some good answers here.
For those of you looking to handle your own CSV file parsing, heed the advice from the experts and [Don't roll your own CSV parser](http://secretgeek.net/csv_trouble.asp).
Your first thought is,
Your next thought will be,
It's a road to madness. Don't write your own. ... | null | CC BY-SA 2.5 | null | 2008-08-08T19:36:34.093 | 2008-08-08T19:36:34.093 | null | null | 536 | null |
6,320 | 2 | null | 6,301 | 68 | null | Unsigned int isn't CLS compliant and would therefore restrict usage of the property to those languages that do implement a `UInt`.
See here:
Framework 1.1
> [Introduction to the .NET Framework Class Library](http://msdn.microsoft.com/en-us/library/hfa3fa08(VS.71).aspx)
Framework 2.0
> [.NET Framework Class Librar... | null | CC BY-SA 3.0 | null | 2008-08-08T19:50:14.987 | 2015-05-10T14:05:11.000 | 2015-05-10T14:05:11.000 | 419 | 419 | null |
6,322 | 2 | null | 6,209 | 0 | null | I just couldn't resist to see if I could make it work in a Python one-liner:
```
arr = [i.replace("|", ",") for i in re.sub('"([^"]*)\,([^"]*)"',"\g<1>|\g<2>", str_to_test).split(",")]
```
Returns ['a', 'string, with', 'various', 'values, and some', 'quoted']
It works by first replacing the ',' inside quotes to anot... | null | CC BY-SA 2.5 | null | 2008-08-08T19:51:25.200 | 2008-08-08T19:59:01.410 | 2008-08-08T19:59:01.410 | 394 | 394 | null |
6,326 | 1 | 6,355 | null | 20 | 6,999 | I have the following html.erb code that I'm looking to move to Haml:
```
<span class="<%= item.dashboardstatus.cssclass %>" ><%= item.dashboardstatus.status %></span>
```
What it does is associate the CSS class of the currently assigned status to the span.
How is this done in Haml? I'm sure I'm missing something re... | Haml: how do I set a dynamic class value? | CC BY-SA 3.0 | null | 2008-08-08T19:56:42.787 | 2019-12-14T09:40:32.110 | 2017-12-29T14:21:44.040 | 1,873,567 | 722 | [
"css",
"ruby-on-rails",
"haml"
] |
6,325 | 1 | 6,333 | null | 122 | 21,112 | Why are unsigned integers not CLS compliant?
I am starting to think the type specification is just for performance and not for correctness.
| Why are unsigned int's not CLS compliant? | CC BY-SA 3.0 | 0 | 2008-08-08T19:55:39.920 | 2016-01-05T21:24:50.133 | 2013-10-10T15:15:32.633 | 63,550 | 56 | [
"c#",
".net",
"unsigned-integer",
"cls-compliant"
] |
6,337 | 2 | null | 6,325 | 9 | null | Unsigned integers are not CLS compliant because they're not interoperable between certain languages.
| null | CC BY-SA 2.5 | null | 2008-08-08T20:04:59.090 | 2008-08-08T20:04:59.090 | null | null | 299 | null |
6,338 | 2 | null | 6,301 | 1 | null | I think it also might have to do with simplifying things on a lower level, since Array.Length will of course be added to a negative number at some point, if Array.Length were unsigned, and added to a negative int (two's complement), there could be messy results.
| null | CC BY-SA 2.5 | null | 2008-08-08T20:05:07.467 | 2008-08-08T20:05:07.467 | null | null | null | null |
6,333 | 2 | null | 6,325 | 97 | null | Not all languages have the concept of unsigned ints. For example VB 6 had no concept of unsigned ints which I suspect drove the decision of the designers of VB7/7.1 not to implement as well (it's implemented now in VB8).
To quote:
> [http://msdn.microsoft.com/en-us/library/12a7a7h3.aspx](http://msdn.microsoft.com/en-us... | null | CC BY-SA 3.0 | null | 2008-08-08T20:01:53.497 | 2012-04-20T21:53:35.947 | 2020-06-20T09:12:55.060 | -1 | 419 | null |
6,350 | 2 | null | 6,340 | 0 | null | I ran the code here, and the error message showed (and it is right!) that you are setting field twice as primary key.
| null | CC BY-SA 2.5 | null | 2008-08-08T20:18:58.173 | 2008-08-08T20:18:58.173 | null | null | 431 | null |
6,355 | 2 | null | 6,326 | 21 | null | Not sure. Maybe:
```
%span{:class => item.dashboardstatus.cssclass }= item.dashboardstatus.status
```
| null | CC BY-SA 3.0 | null | 2008-08-08T20:28:18.387 | 2014-04-30T07:38:41.727 | 2014-04-30T07:38:41.727 | 648,078 | 341 | null |
6,356 | 2 | null | 6,222 | 1 | null | I've been successfully using it on Vista x64 for some light Java work. Nothing too involved and no extra plugins, but basic Java coding has been working without any issues. I'm using the 3.4M7 build but it looks like the [3.4 stable build](http://download.eclipse.org/eclipse/downloads/drops/R-3.4-200806172000/index.p... | null | CC BY-SA 2.5 | null | 2008-08-08T20:28:49.917 | 2008-08-08T20:28:49.917 | null | null | 729 | null |
6,349 | 2 | null | 6,340 | 13 | null | You defined the primary key twice. Try:
```
CREATE TABLE SHIPPING_GRID(
id INT NOT NULL AUTO_INCREMENT PRIMARY KEY COMMENT 'Unique ID for each row',
shipping_vendor_no INT(6) NOT NULL COMMENT 'Foreign key to VENDOR.no for the shipping vendor (vendors_type must be 3)',
start_vendor_no INT(6) NOT NULL ... | null | CC BY-SA 2.5 | null | 2008-08-08T20:18:25.553 | 2010-05-20T13:31:49.953 | 2010-05-20T13:31:49.953 | 104,117 | 341 | null |
6,344 | 2 | null | 5,611 | 4 | null | I would be wary of the impression of randomness: there have been many experiments where people would choose the less random distribution. It seems the mind is not very good at producing or estimating randomness.
There are good articles on randomness at [Fourmilab](http://www.fourmilab.ch/hotbits/), including another [... | null | CC BY-SA 2.5 | null | 2008-08-08T20:09:42.217 | 2008-08-08T20:09:42.217 | null | null | 341 | null |
6,364 | 2 | null | 6,340 | 1 | null | > Can you provide the definition of the
VENDOR table
I figured it out. The VENDOR table was MyISAM... (edited your answer to tell me to make them both INNODB ;) )
(any reason to just switch the VENDOR type over to INNODB?)
| null | CC BY-SA 3.0 | null | 2008-08-08T20:44:23.597 | 2016-01-11T08:24:24.973 | 2016-01-11T08:24:24.973 | 908,939 | 58 | null |
6,358 | 2 | null | 3,881 | 74 | null | I tend to follow the design of JDK libraries, especially Collections and Concurrency (Joshua Bloch, Doug Lea, those guys know how to design solid APIs). Anyway, many APIs in the JDK pro-actively throws `NullPointerException`.
For example, the Javadoc for `Map.containsKey` states:
> @throws NullPointerException if th... | null | CC BY-SA 3.0 | null | 2008-08-08T20:35:04.007 | 2015-11-03T21:39:35.567 | 2015-11-03T21:39:35.567 | 627,727 | 758 | null |
6,362 | 2 | null | 5,134 | 1 | null | I've written hooks in [Python](http://python.org) on Windows since there are a lot of examples on the net (usually for Linux but the differences are small). We also use [Trac](http://trac.edgewall.org) integrated with SVN and there is a Trac API accessible via Python which lets us automatically create/modify Trac tick... | null | CC BY-SA 2.5 | null | 2008-08-08T20:41:59.577 | 2008-08-08T20:41:59.577 | null | null | 729 | null |
6,340 | 1 | 6,349 | null | 18 | 95,292 | I've got a table that is supposed to track days and costs for shipping product from one vendor to another. We (brilliantly :p) stored both the shipping vendors (FedEx, UPS) with the product handling vendors (Think... Dunder Mifflin) in a "VENDOR" table. So, I have three columns in my SHIPPING_DETAILS table that all ref... | Multiple foreign keys? | CC BY-SA 3.0 | 0 | 2008-08-08T20:07:43.390 | 2016-01-11T08:24:24.973 | 2013-11-03T05:06:52.803 | 2,040,040 | 58 | [
"sql",
"mysql",
"foreign-keys"
] |
6,359 | 2 | null | 6,155 | 1 | null | I'm using post-commit hooks ([I think it's this one](http://lincolnloop.com/blog/2007/may/04/basecamp-svn-integration/)) to post a message to a forum on Basecamp for each commit. Two advantages:
1. As the lead developer, I get a roll-up of commits every morning (via the RSS feed from that basecamp forum) and can see ... | null | CC BY-SA 2.5 | null | 2008-08-08T20:38:12.313 | 2008-08-13T04:37:35.370 | 2008-08-13T04:37:35.370 | 763 | 763 | null |
6,189 | 2 | null | 6,184 | 18 | null | Here are the salient points:
1. You can't make UI control calls from a different thread than the one they were created on (the form's thread).
2. Delegate invocations (ie, event hooks) are triggered on the same thread as the object that is firing the event.
So, if you have a separate "engine" thread doing some wor... | null | CC BY-SA 2.5 | null | 2008-08-08T17:35:40.937 | 2008-08-08T17:35:40.937 | null | null | 756 | null |
6,369 | 1 | 10,838 | null | 19 | 50,465 | So I have a Sybase stored proc that takes 1 parameter that's a comma separated list of strings and runs a query with in in an IN() clause:
```
CREATE PROCEDURE getSomething @keyList varchar(4096)
AS
SELECT * FROM mytbl WHERE name IN (@keyList)
```
How do I call my stored proc with more than 1 value in the list?
So f... | How to pass a comma separated list to a stored procedure? | CC BY-SA 3.0 | 0 | 2008-08-08T20:48:29.377 | 2019-05-29T16:05:33.550 | 2013-03-14T04:51:41.350 | 1,563,422 | 779 | [
"sql",
"sap-ase"
] |
6,382 | 2 | null | 6,371 | 29 | null | Your developers need to write change scripts (schema and data change) for each bug/feature they work on, not just simply dump the entire database into source control. These scripts will upgrade the current production database to the new version in development.
Your build process can restore a copy of the production... | null | CC BY-SA 2.5 | null | 2008-08-08T21:03:32.933 | 2008-08-08T21:03:32.933 | null | null | 637 | null |
6,373 | 1 | 6,424 | null | 23 | 1,753 | There are two popular closure styles in javascript. The first I call :
```
new function() {
var code...
}
```
and the :
```
(function() {
var code...
})();
```
are there differences in behaviour between those two? Is one "better" over the other?
| What's the difference in closure style | CC BY-SA 2.5 | 0 | 2008-08-08T20:53:21.393 | 2011-11-13T15:16:01.120 | null | null | 56 | [
"javascript"
] |