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 ⌀ |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7,714 | 2 | null | 7,662 | 84 | null | I work in a database support team with three DBAs and our considered options are:
1. Any naming standard is better than no standard.
2. There is no "one true" standard, we all have our preferences
3. If there is standard already in place, use it. Don't create another standard or muddy the existing standards.
We us... | null | CC BY-SA 2.5 | null | 2008-08-11T12:24:17.647 | 2010-01-22T22:54:45.527 | 2010-01-22T22:54:45.527 | 993 | 993 | null |
7,720 | 1 | 149,971 | null | 40 | 15,199 | I am writing an application in Java for the desktop using the Eclipse SWT library for GUI rendering. I think SWT helps Java get over the biggest hurdle for acceptance on the desktop: namely providing a Java application with a consistent, responsive interface that looks like that belonging to any other app on your desk... | Packaging Java apps for the Windows/Linux desktop | CC BY-SA 2.5 | 0 | 2008-08-11T12:37:50.503 | 2014-08-25T06:17:01.043 | 2010-04-26T11:02:03.770 | 56,285 | 998 | [
"java",
"windows",
"swt",
"executable",
"software-distribution"
] |
7,695 | 2 | null | 7,525 | 24 | null | These are relatively cheap mechanisms for possibly solving the problem:
1. Keep an eye on my heap corruption question - I'm updating with the answers as they shake out. The first was balancing new[] and delete[], but you're already doing that.
2. Give valgrind more of a go; it's an excellent tool, and I only wish it ... | null | CC BY-SA 3.0 | null | 2008-08-11T11:59:25.777 | 2015-12-21T15:24:24.770 | 2017-05-23T10:29:25.167 | -1 | 257 | null |
7,723 | 2 | null | 7,676 | 4 | null | You can also check out [Sync Services for Sql Server and Compact edition](http://web.archive.org/web/20101217051859/http://keithelder.net/blog/archive/2007/09/23/Sync-Services-for-SQL-Server-Compact-Edition-3.5-in-Visual.aspx). The benefit of Sync Services is that you don't need a replication server or IIS and you can ... | null | CC BY-SA 4.0 | null | 2008-08-11T12:38:43.530 | 2020-06-23T11:21:32.017 | 2020-06-23T11:21:32.017 | 9,780,149 | 493 | null |
7,719 | 1 | 7,840 | null | 1 | 12,499 | Is there any way to capture the MouseDown even from the .NET 2.0 TextBox control?
I know the inherited Control class has the event, but it's not exposed in TextBox.
Is there a way to override the event handler?
I also tried the OpenNETCF TextBox2 control which does have the MouseDown event exposed, but no matter what ... | Capture MouseDown event for .NET TextBox | CC BY-SA 4.0 | null | 2008-08-11T12:36:20.350 | 2019-01-20T13:54:23.570 | 2019-01-20T13:54:23.570 | 567,854 | 194 | [
"c#",
".net",
"events",
"windows-mobile"
] |
7,724 | 2 | null | 7,662 | 376 | null | I recommend checking out Microsoft's SQL Server sample databases:
[https://github.com/Microsoft/sql-server-samples/releases/tag/adventureworks](https://github.com/Microsoft/sql-server-samples/releases/tag/adventureworks)
The AdventureWorks sample uses a very clear and consistent naming convention that uses schema name... | null | CC BY-SA 3.0 | null | 2008-08-11T12:39:37.817 | 2018-04-02T20:05:38.510 | 2018-04-02T20:05:38.510 | 2,306,988 | 373 | null |
7,726 | 1 | null | null | 3 | 951 | I'd like a concise introduction to the different options.
| What are the options for delivering Flash video? | CC BY-SA 2.5 | 0 | 2008-08-11T12:40:01.140 | 2010-01-06T05:51:49.890 | null | null | 137 | [
"flash",
"video"
] |
7,725 | 2 | null | 2,300 | 13 | null | Something like this?
```
dim cars(2),x
cars(0)="Volvo"
cars(1)="Saab"
cars(2)="BMW"
For Each x in cars
response.write(x & "<br />")
Next
```
See [www.w3schools.com](http://web.archive.org/web/20140305020029/http://www.w3schools.com/vbscript/vbscript_looping.asp).
If you want to associate keys and values [use a dict... | null | CC BY-SA 4.0 | null | 2008-08-11T12:39:46.320 | 2020-06-24T09:11:46.003 | 2020-06-24T09:11:46.003 | 9,780,149 | 997 | null |
7,740 | 2 | null | 6,076 | 2 | null | Ends up this resolved my issue:
```
SearchButton.UseSubmitBehavior = False
```
| null | CC BY-SA 2.5 | null | 2008-08-11T12:51:23.970 | 2008-08-11T12:51:23.970 | null | null | 225 | null |
7,745 | 2 | null | 7,737 | 2 | null | You may have to generate you own "glyph cache" in texture memory as you go, potentially with some sort of LRU policy to avoid destroying all of the texture memory. Not nearly as easy as your current method, but may be the only way given the number of unicode chars
| null | CC BY-SA 2.5 | null | 2008-08-11T12:56:41.603 | 2008-08-11T12:56:41.603 | null | null | 287 | null |
7,737 | 1 | 7,950 | null | 6 | 18,257 | Is there a good way for displaying unicode text in opengl under Windows? For example, when you have to deal with different languages. The most common approach like
```
#define FONTLISTRANGE 128
GLuint list;
list = glGenLists(FONTLISTRANGE);
wglUseFontBitmapsW(hDC, 0, FONTLISTRANGE, list);
```
just won't do because y... | How to display unicode text in OpenGL? | CC BY-SA 2.5 | 0 | 2008-08-11T12:50:43.787 | 2019-08-04T08:31:03.300 | null | null | 1,007 | [
"windows",
"opengl",
"unicode"
] |
7,747 | 2 | null | 7,720 | 1 | null | [Install4J](http://www.ej-technologies.com/products/install4j/overview.html). Not free, but worth it. Give the trial a shot
| null | CC BY-SA 2.5 | null | 2008-08-11T12:59:04.550 | 2008-08-11T12:59:04.550 | null | null | 287 | null |
7,741 | 2 | null | 5,194 | 4 | null | As mentioned d will be `IEnumerable<MyProduct>` while f is `List<MyProduct>`
The conversion is done by the C# compiler
```
var d =
from mp in MyProducts
where mp.Price < 50d
select mp;
```
Is converted to (before compilation to IL and with generics expanded):
```
var d =
MyProducts.
Where<MyP... | null | CC BY-SA 2.5 | null | 2008-08-11T12:52:52.080 | 2008-08-11T12:52:52.080 | null | null | 905 | null |
7,752 | 2 | null | 5,916 | 0 | null | Eclipse does some of this in Java (or PHP with plugins) on its own. Allows you to fold functions and such. I tend to like it. If I know what a function does and I am not working on it, I dont need to look at it.
| null | CC BY-SA 2.5 | null | 2008-08-11T13:01:56.337 | 2008-08-11T13:01:56.337 | null | null | 673 | null |
7,729 | 2 | null | 7,726 | 4 | null | From [Wikipedia](http://en.wikipedia.org/wiki/Flash_video)
> > using the Flash authoring tool (supported in Flash Player 6 and later). The entire file must be transferred before playback can begin. Changing the video requires rebuilding the SWF file.[citation needed] (supported in Flash Player 7 and later). This meth... | null | CC BY-SA 2.5 | null | 2008-08-11T12:42:33.413 | 2008-08-22T11:48:24.753 | 2008-08-22T11:48:24.753 | 137 | 137 | null |
7,748 | 2 | null | 3,088 | 0 | null | My favourite "start learning to code" project is the Game or because it allows you to start slow (variables to store the current "worm position", arrays to store the worm positions if the worm is longer than one "piece", loops to make the worm move, if/switch to allow the user to change the worm's direction, ...). It... | null | CC BY-SA 2.5 | null | 2008-08-11T12:59:16.687 | 2008-08-11T12:59:16.687 | null | null | 999 | null |
7,759 | 2 | null | 7,720 | 0 | null | I went through the same and found that all of the free options weren't very good. Looks like you'll be writing your own. I'd be interested to see if someone has a free/cheap option that works
| null | CC BY-SA 2.5 | null | 2008-08-11T13:09:20.330 | 2008-08-11T13:09:20.330 | null | null | 287 | null |
7,753 | 2 | null | 7,642 | 0 | null | I agree with @lomaxx, it's more important to be consistent throughout the team than to have the convention.
Still, here are several good places to get ideas and guidance for coding conventions:
1. Practical Guidelines and Best Practices for Microsoft Visual Basic and Visual C# Developers by Francesco Balena is a gr... | null | CC BY-SA 2.5 | null | 2008-08-11T13:05:11.790 | 2008-08-11T13:05:11.790 | null | null | 373 | null |
7,756 | 2 | null | 6,475 | 1 | null | @[AnotherHowie](https://stackoverflow.com/questions/6475/faster-way-to-find-duplicates-conditioned-by-time#7210), I thought the whole preprocessing could be done with sort and uniq. The problem is that the OP's data seems to be comma delimited and (Solaris 8's) uniq doesn't allow you any way specify the record separat... | null | CC BY-SA 2.5 | null | 2008-08-11T13:07:51.987 | 2008-08-11T13:07:51.987 | 2017-05-23T12:26:29.543 | -1 | 430 | null |
7,770 | 2 | null | 3,881 | -5 | null | If you choose to throw a NPE and you are using the argument in your method, it might be redundant and expensive to explicitly check for a null. I think the VM already does that for you.
| null | CC BY-SA 2.5 | null | 2008-08-11T13:20:39.560 | 2008-08-11T13:20:39.560 | null | null | 1,009 | null |
7,761 | 2 | null | 7,277 | 1 | null | This is probably a bit deceptive example, since address is a bit non-normalized in this case. It is a reasonable trade-off, however since address fields are difficult to normalize.
If you make the line breaks carry important information, you're un-normalizing and making the post office interpret the meaning of the line... | null | CC BY-SA 2.5 | null | 2008-08-11T13:12:35.817 | 2008-08-11T13:12:35.817 | null | null | 972 | null |
7,764 | 2 | null | 7,662 | 25 | null | Take a look at ISO 11179-5: Naming and identification principles
You can get it here: [http://metadata-standards.org/11179/#11179-5](http://metadata-standards.org/11179/#11179-5)
I blogged about it a while back here: [ISO-11179 Naming Conventions](http://sqlservercode.blogspot.com/2006/11/iso-11179-naming-conventions.... | null | CC BY-SA 2.5 | null | 2008-08-11T13:13:58.747 | 2008-08-11T13:13:58.747 | null | null | 740 | null |
7,760 | 2 | null | 7,726 | 2 | null | You can stream FLV videos using a simple player like [JW FLV Media Player](http://www.jeroenwijering.com/?item=JW_FLV_Player). It supports several streaming methods, playlists etc. It's actively developed, and I have found it to be the best solution for streaming flash video.
| null | CC BY-SA 2.5 | null | 2008-08-11T13:11:49.030 | 2008-08-11T13:11:49.030 | null | null | 1,011 | null |
7,767 | 2 | null | 5,916 | 36 | null | 9 out of 10 times, code folding means that you have failed to use the [SoC principle](http://en.wikipedia.org/wiki/Separation_of_concerns) for what its worth.
I more or less feel the same thing about partial classes. If you have a piece of code you think is too big you need to chop it up in manageable (and reusable) pa... | null | CC BY-SA 2.5 | null | 2008-08-11T13:17:40.453 | 2008-08-11T13:17:40.453 | null | null | 960 | null |
7,773 | 1 | 7,777 | null | 34 | 127,534 | I have a ASP.NET page with an asp:button that is not visible. I can't turn it visible with JavaScript because it is not rendered to the page.
What can I do to resolve this?
| Change visibility of ASP.NET label with JavaScript | CC BY-SA 3.0 | 0 | 2008-08-11T13:24:19.037 | 2013-02-10T22:36:52.633 | 2012-01-31T16:04:43.310 | 4,714 | 1,013 | [
"asp.net",
"javascript"
] |
7,758 | 1 | 8,461 | null | 2 | 4,436 | I'm getting all learned up about binding in WPF. I'm having a lot of trouble debugging the parse errors in my xaml, though. Can somebody pretty please tell me what's wrong with this little piece? :
```
<Border Name="TrackBackground"
Margin="0"
CornerRadius="2"
Grid.Row="1"
Grid.C... | What is the value-binding syntax in xaml? | CC BY-SA 3.0 | null | 2008-08-11T13:09:08.693 | 2014-01-10T16:03:59.127 | 2014-01-10T16:03:59.127 | 2,824,961 | 93 | [
".net",
"wpf",
"silverlight",
"xaml",
"binding"
] |
7,771 | 2 | null | 2,048 | 0 | null | I use [RSS Bandit](http://www.rss-bandit.com/) (for Windows) to stay up to date with my RSS feeds/blogs.
There are [lots of other RSS aggregator applications](http://en.wikipedia.org/wiki/List_of_feed_aggregators) though.
If you don't want another "big" application but have Windows Vista, you can also choose to make In... | null | CC BY-SA 4.0 | null | 2008-08-11T13:22:00.913 | 2020-07-16T11:39:21.943 | 2020-07-16T11:39:21.943 | 10,325,630 | 999 | null |
7,778 | 2 | null | 7,773 | 0 | null | If you wait until the page is loaded, and then set the button's display to none, that should work. Then you can make it visible at a later point.
| null | CC BY-SA 2.5 | null | 2008-08-11T13:29:38.700 | 2008-08-11T13:29:38.700 | null | null | 721 | null |
7,776 | 2 | null | 7,758 | 0 | null | First of all its a matter of casing...
Change ```
Part_Track
```
to ```
PART_Track
```
which will fix your binding error..
But I do not think that this is what you are trying to do..
You could use a Grid instead of a canvas, and the Thumb will size automatically. Canvas does not really have a height, for it does n... | null | CC BY-SA 2.5 | null | 2008-08-11T13:26:38.393 | 2008-08-11T13:31:50.567 | 2008-08-11T13:31:50.567 | 900 | 900 | null |
7,780 | 2 | null | 2,913 | 1 | null | Here's my strategy (I use JUnit, but I'm sure there's a way to do the equivalent in PHP):
I have a method that runs before all of the Unit Tests for a specific DAO class. It puts the dev database into a known state (adds all test data, etc.). As I run tests, I keep track of any data added to the known state. This data... | null | CC BY-SA 2.5 | null | 2008-08-11T13:30:32.457 | 2008-08-11T13:30:32.457 | null | null | 765 | null |
7,779 | 1 | 28,154 | null | 11 | 3,718 | I have read through several reviews on Amazon and some books seem outdated. I am currently using MyEclipse 6.5 which is using Eclipse 3.3. I'm interested in hearing from people that have experience learning RCP and what reference material they used to get started.
| I would like a recommendation for a book on Eclipse's Rich Client Platform (RCP) | CC BY-SA 3.0 | 0 | 2008-08-11T13:30:21.850 | 2012-10-14T04:13:48.373 | 2012-10-14T04:13:48.373 | 275,567 | 791 | [
"java",
"eclipse",
"rcp",
"myeclipse"
] |
7,783 | 2 | null | 7,773 | 0 | null | Make sure the Visible property is set to true or the control won't render to the page. Then you can use script to manipulate it.
| null | CC BY-SA 2.5 | null | 2008-08-11T13:32:43.343 | 2008-08-11T13:32:43.343 | null | null | 447 | null |
7,782 | 2 | null | 2,048 | 0 | null | Reading all the answers reminded me that I actually never looked into solving this using a Firefox add-on. I soon found [Update Scanner](https://addons.mozilla.org/en-US/firefox/addon/3362) and I think it look really promising!
| null | CC BY-SA 2.5 | null | 2008-08-11T13:32:26.230 | 2008-08-11T13:32:26.230 | null | null | 298 | null |
7,789 | 2 | null | 7,758 | 0 | null | Is the Border in a Template btw ?
Because there is no need for TemplateBinding if the border is not located in a Template (either ControlTemplate or DataTemplate)
| null | CC BY-SA 2.5 | null | 2008-08-11T13:35:27.550 | 2008-08-11T13:35:27.550 | null | null | 900 | null |
7,777 | 2 | null | 7,773 | 43 | null | If you need to manipulate it on the client side, you can't use the Visible property on the server side. Instead, set its CSS display style to "none". For example:
```
<asp:Label runat="server" id="Label1" style="display: none;" />
```
Then, you could make it visible on the client side with:
```
document.getElemen... | null | CC BY-SA 2.5 | null | 2008-08-11T13:28:55.470 | 2008-08-11T13:32:21.597 | 2008-08-11T13:32:21.597 | 60 | 60 | null |
7,790 | 2 | null | 7,779 | 1 | null | Although I don't have personal experience, a few friends of mine did Eclipse RCP development, and they used the book "[Eclipse Rich Client Platform: Designing, Coding, and Packaging Java(TM) Applications](https://rads.stackoverflow.com/amzn/click/com/0321334612)". They seemed to like it a lot, and I looked it at myself... | null | CC BY-SA 2.5 | null | 2008-08-11T13:37:15.423 | 2008-08-11T13:45:00.087 | 2008-08-11T13:45:00.087 | 572 | 572 | null |
7,792 | 2 | null | 7,779 | 0 | null | I read the [book](https://rads.stackoverflow.com/amzn/click/com/0321334612) suggested by Thomas and it's really worth reading, although not very up-to-date.
| null | CC BY-SA 2.5 | null | 2008-08-11T13:42:12.560 | 2008-08-11T13:42:12.560 | null | null | 198 | null |
7,794 | 2 | null | 5,511 | 58 | null | How about:
```
protected override void OnPreviewTextInput(System.Windows.Input.TextCompositionEventArgs e)
{
e.Handled = !AreAllValidNumericChars(e.Text);
base.OnPreviewTextInput(e);
}
private bool AreAllValidNumericChars(string str)
{
foreach(char c in str)
{
if(!Char.IsNumber(c)) return fals... | null | CC BY-SA 3.0 | null | 2008-08-11T13:47:12.253 | 2016-02-07T17:48:37.223 | 2016-02-07T17:48:37.223 | 2,921,691 | 900 | null |
7,793 | 2 | null | 2,262 | 4 | null | I have used an httpmodule for url rewriting from [www.urlrewriting.net](http://www.urlrewriting.net/) with great success (albeit I believe a much earlier, simpler version)
If you have very few actual rewriting rules then url mappings built in to .NET 2.0 are probably an easier option, there are a few write ups of thes... | null | CC BY-SA 2.5 | null | 2008-08-11T13:44:59.200 | 2008-08-11T13:44:59.200 | null | null | null | null |
7,801 | 2 | null | 7,758 | 1 | null | What I usually do to debug databindings, is add a converter where I can set a breakpoint in VS.NET..
so the Binding would be something like this:
```
{Binding ElementName=PART_Track, Path=Height, Mode=OneWay, Converter={StaticResources DebugConverter}}
```
Then the converter can be an empty implementation of an IVa... | null | CC BY-SA 2.5 | null | 2008-08-11T13:56:55.617 | 2008-08-11T13:56:55.617 | null | null | 900 | null |
7,799 | 2 | null | 7,719 | 0 | null | According to the .Net Framework, the [MouseDown Event Handler on a TextBox](http://www.csharpfriends.com/quickstart/aspplus/samples/classbrowser/cs/classbrowser.aspx?assembly=System.Windows.Forms,%20Version=1.0.5000.0,%20Culture=neutral,%20PublicKeyToken=b77a5c561934e089&namespace=System.Windows.Forms&class=TextBox) is... | null | CC BY-SA 3.0 | null | 2008-08-11T13:54:46.793 | 2011-12-20T16:18:14.287 | 2011-12-20T16:18:14.287 | 396,458 | 383 | null |
7,802 | 2 | null | 7,685 | 6 | null | One interesting way is to maintain a stack, and only merge if the list on the stack has the same number of elements, and otherwise push the list, until you run out of elements in the incoming list, and then merge up the stack.
| null | CC BY-SA 2.5 | null | 2008-08-11T13:57:59.063 | 2008-08-11T13:57:59.063 | null | null | 279 | null |
7,796 | 2 | null | 7,720 | 2 | null | Have you thought about [Java Web Start](http://java.sun.com/javase/technologies/desktop/javawebstart/index.jsp)? [Here](http://www.ibm.com/developerworks/opensource/library/os-jws/) is a tutorial specifically for deploying an SWT application with Java Web Start.
| null | CC BY-SA 2.5 | null | 2008-08-11T13:48:31.593 | 2008-08-11T13:48:31.593 | null | null | 737 | null |
7,715 | 2 | null | 7,662 | 9 | null | Naming conventions allow the development team to design discovereability and maintainability at the heart of the project.
A good naming convention takes time to evolve but once it’s in place it allows the team to move forward with a common language. A good naming convention grows organically with the project. A good ... | null | CC BY-SA 2.5 | null | 2008-08-11T12:27:27.670 | 2008-08-11T12:38:12.860 | 2008-08-11T12:38:12.860 | 605 | 605 | null |
7,800 | 2 | null | 7,773 | 10 | null | Try this.
```
<asp:Button id="myButton" runat="server" style="display:none" Text="Click Me" />
<script type="text/javascript">
function ShowButton() {
var buttonID = '<%= myButton.ClientID %>';
var button = document.getElementById(buttonID);
if(button) { button.style.display = 'inherit'; ... | null | CC BY-SA 2.5 | null | 2008-08-11T13:55:29.630 | 2010-11-07T02:58:52.037 | 2010-11-07T02:58:52.037 | 106 | 106 | null |
7,805 | 2 | null | 7,719 | 0 | null | Fair enough. You probably know more than I do about Windows Mobile. :) I just started programming for it. But in regular WinForms, you can override the OnXxx event handler methods all you want. A quick look in Reflector with the CF shows that Control, TextBoxBase and TextBox don't prevent you from overriding the OnMous... | null | CC BY-SA 2.5 | null | 2008-08-11T14:02:17.387 | 2008-08-11T14:02:17.387 | null | null | 631 | null |
7,824 | 2 | null | 7,652 | 0 | null | LinqBridge looks like a pretty nice place to start since I have VS2008, I just need to compile and deploy to a .net 2.0 server.
I've looked at SubSonic and it's also an interesting alternative, but linqbridge seems to provide a much closer fit so I'm not going to have to go and learn a new ORM / query syntax.
| null | CC BY-SA 2.5 | null | 2008-08-11T14:21:19.843 | 2008-08-11T14:21:19.843 | null | null | 493 | null |
7,833 | 2 | null | 6,778 | 0 | null | The Adobe example "works" in Firefox 3.0.1 in the sense that the background is transparent. However, in Firefox 3.0.1 and Safari 3.1.2 you must click the play button twice to see the animation.
| null | CC BY-SA 2.5 | null | 2008-08-11T14:33:56.527 | 2008-08-11T14:33:56.527 | null | null | 247 | null |
7,840 | 2 | null | 7,719 | 0 | null | Looks like you're right. Bummer. No MouseOver event.
One of the fallbacks that always works with .NET, though, is P/Invoke. Someone already took the time to do this for the .NET CF TextBox. I found this on CodeProject:
[http://www.codeproject.com/KB/cs/TextBox_subclassing.aspx](http://www.codeproject.com/KB/cs/TextBox_... | null | CC BY-SA 2.5 | null | 2008-08-11T14:45:05.957 | 2008-08-11T14:45:05.957 | 2020-06-20T09:12:55.060 | -1 | 631 | null |
7,849 | 2 | null | 7,118 | 1 | null | Visual Studio 2005 has the Script Explorer (under the Debug > Windows menu). It shows a tree of all the scripted stuff that's currently debuggable. Previously I was breaking into the debugger via IE's View > Script Debugger menu, but I'm finding the Script Explorer is a quicker way to get to what I want.
| null | CC BY-SA 2.5 | null | 2008-08-11T15:10:19.697 | 2008-08-26T15:10:30.490 | 2008-08-26T15:10:30.490 | 190 | 190 | null |
7,846 | 1 | 7,853 | null | 8 | 12,418 | I would like to use a language that I am familiar with - Java, C#, Ruby, PHP, C/C++, although examples in any language or pseudocode are more than welcome.
What is the best way of splitting a large XML document into smaller sections that are still valid XML? For my purposes, I need to split them into roughly thirds or... | How can I split an XML document into thirds (or, even better, n pieces)? | CC BY-SA 2.5 | 0 | 2008-08-11T15:04:21.363 | 2011-04-11T15:56:33.320 | null | null | 572 | [
"xml"
] |
7,816 | 2 | null | 7,773 | 4 | null | Continuing with what said:
- -
---
```
<asp:Label runat="server" ID="Label1" Style="display: none;" />
<asp:Button runat="server" ID="Button1" />
```
---
Somewhere in the load section:
```
Label label1 = (Label)FindControl("Label1");
((Label)FindControl("Button1")).OnClientClick = "ToggleVisibility(... | null | CC BY-SA 2.5 | null | 2008-08-11T14:13:11.763 | 2008-08-11T14:13:11.763 | null | null | 810 | null |
7,842 | 2 | null | 826 | 2 | null | You can do this in two lines in python with
```
allSums = set(a+b for a in X for b in X)
allSums = sorted(allSums)
```
The cost of this is `n^2` (maybe an extra log factor for the set?) for the iteration and s * log(s) for the sorting where s is the size of the set.
The size of the set could be as big as `n*(n-1)/2` f... | null | CC BY-SA 4.0 | null | 2008-08-11T14:47:31.227 | 2020-07-27T01:15:48.273 | 2020-07-27T01:15:48.273 | 6,800,539 | null | null |
7,851 | 1 | null | null | 8 | 4,793 | According to the [PHP Safe Mode Docs](http://uk3.php.net/features.safe-mode) on safe_mode_gid:
> By default, Safe Mode does a UID compare check when opening files. If you want to relax this to a GID compare, then turn on safe_mode_gid. Whether to use UID (FALSE) or GID (TRUE) checking upon file access.
To a PHP scrip... | What is PHP Safe Mode GID? | CC BY-SA 4.0 | null | 2008-08-11T15:12:53.903 | 2019-06-04T09:30:35.203 | 2019-06-04T09:30:35.203 | 6,556,397 | 840 | [
"php",
"unix"
] |
7,852 | 2 | null | 2,898 | 4 | null | When I searched for TextMate alternative for Linux, I ended up using [Geany](http://geany.uvena.de/). It's not as powerfull, but still nice to work with. Great replacement for Kate.
| null | CC BY-SA 2.5 | null | 2008-08-11T15:13:12.717 | 2008-08-11T15:13:12.717 | null | null | 1,024 | null |
7,829 | 2 | null | 7,651 | 127 | null | The Perl documentation comes with a nice collection of FAQs. Your question is frequently asked:
```
% perldoc -q duplicate
```
The answer, copy and pasted from the output of the command above, appears below:
---
Found in /usr/local/lib/perl5/5.10.0/pods/perlfaq4.pod
(contributed by brian d foy)
Use a hash. When y... | null | CC BY-SA 4.0 | null | 2008-08-11T14:27:46.150 | 2021-12-03T18:41:19.610 | 2021-12-03T18:41:19.610 | 2,766,176 | 164 | null |
7,844 | 2 | null | 7,758 | 1 | null | Hmm there might be a substantial difference between WPF en Silverlight on this point..
I seem to have no trouble what so even compiling and running this sample in a WPF window:
```
<Slider Width="400" Height="20">
<Slider.Template>
<ControlTemplate>
<Border Name="TrackBackground"
... | null | CC BY-SA 3.0 | null | 2008-08-11T14:58:21.593 | 2014-01-10T16:01:11.977 | 2014-01-10T16:01:11.977 | 2,824,961 | 900 | null |
7,863 | 2 | null | 7,851 | 1 | null | Safe mode UID check is used to prevent users from accessing other peoples files. GID is used to prevent a GROUP of users from accessing other GROUPS files.
| null | CC BY-SA 2.5 | null | 2008-08-11T15:30:23.667 | 2008-08-11T15:30:23.667 | null | null | 1,024 | null |
7,858 | 2 | null | 7,662 | 14 | null | In my opinion:
1. Table names should be plural.
2. Column names should be singular.
3. No.
4. Either CamelCase (my preferred) or underscore_separated for both table names and column names.
However, like it has been mentioned, any convention is better than no convention. No matter how you choose to do it, document ... | null | CC BY-SA 2.5 | null | 2008-08-11T15:23:32.027 | 2008-08-11T15:23:32.027 | null | null | 572 | null |
7,861 | 2 | null | 7,846 | 1 | null | This is more of a comment than an answer, but wouldn't:
```
XmlDocument doc = new XmlDocument();
doc.Load("path");
```
Read the entire file at once? Just thought I should raise the point since from the look of Thomas' question, he is concerned about reading large files and wants to break the process down..
| null | CC BY-SA 2.5 | null | 2008-08-11T15:28:08.990 | 2008-08-11T15:28:08.990 | null | null | 832 | null |
7,853 | 2 | null | 7,846 | 3 | null | Well of course you can always extract the top-level elements (whether this is the granularity you want is up to you). In C#, you'd use the XmlDocument class. For example, if your XML file looked something like this:
```
<Document>
<Piece>
Some text
</Piece>
<Piece>
Some other text
</Piece>
</Document... | null | CC BY-SA 2.5 | null | 2008-08-11T15:13:14.107 | 2008-08-11T15:13:14.107 | null | null | 1,028 | null |
7,869 | 2 | null | 7,846 | 1 | null | It would read the entire file at once. In my experience, though, if you're just reading the file, doing some processing (i.e., breaking it up) and then continuing on with your work, the XmlDocument is going to go through it's create/read/collect cycle so quickly that it likely won't matter.
Of course, that depends on ... | null | CC BY-SA 2.5 | null | 2008-08-11T15:33:56.733 | 2010-01-16T22:04:10.717 | 2010-01-16T22:04:10.717 | 63,550 | 1,028 | null |
7,866 | 2 | null | 7,846 | 3 | null | As DannySmurf touches on here, it is all about the structure of the xml document.
If you only two huge "top level" tags, it will be extremely hard to be able to split it in a way that makes it possible to both merge it back together and read it piece by piece as valid xml.
Given a document with a lot of seperate piec... | null | CC BY-SA 2.5 | null | 2008-08-11T15:31:11.183 | 2008-08-11T15:31:11.183 | null | null | 960 | null |
7,864 | 1 | 8,215 | null | 102 | 20,230 | As I learn more and more about OOP, and start to implement various design patterns, I keep coming back to cases where people are hating on [Active Record](http://en.wikipedia.org/wiki/Active_record_pattern).
Often, people say that it doesn't scale well (citing Twitter as their prime example) -- but nobody actually exp... | Why all the Active Record hate? | CC BY-SA 2.5 | 0 | 2008-08-11T15:30:30.313 | 2011-08-25T09:42:35.590 | 2009-05-21T13:48:25.833 | 751 | 751 | [
"ruby-on-rails",
"design-patterns",
"oop",
"activerecord"
] |
7,873 | 1 | null | null | 1 | 448 | I'm making a webform using a `LoginView`, the problem is that because the control includes a grey bar telling you what type of control it is it throws of correctly formatting the page (it has `LoginView1` at the top).
Is there a way to hide this on the `LoginView` as the `contentPlaceholder` does an excellent job for ... | Remove the bar at the top of Loginview for formatting | CC BY-SA 3.0 | null | 2008-08-11T15:37:30.983 | 2012-04-25T16:45:45.070 | 2012-04-25T16:45:45.070 | 1,332,690 | null | [
"asp.net",
"webforms"
] |
7,876 | 2 | null | 7,540 | 1 | null | There's no "process explorer" kind of tool for Firefox; but there's [https://developer.mozilla.org/en-US/docs/Archive/Mozilla/Venkman](https://developer.mozilla.org/en-US/docs/Archive/Mozilla/Venkman) with profiling mode, which you could use to see the time spent by chrome (meaning non-content, that is not web-page) sc... | null | CC BY-SA 4.0 | null | 2008-08-11T15:42:35.903 | 2021-01-09T17:19:41.030 | 2021-01-09T17:19:41.030 | 10,607,772 | 1,026 | null |
7,879 | 2 | null | 7,873 | 0 | null | I don't know that there is a property to control this (can't find one on MSDN), but I'd think you could just iterate through the Controls property of the LoginView and hide that panel/label/whatever.
| null | CC BY-SA 2.5 | null | 2008-08-11T15:50:05.950 | 2008-08-11T15:50:05.950 | null | null | 1,028 | null |
7,877 | 2 | null | 6,222 | 7 | null | I'm using Eclipse with a 64bit VM. However I have to use Java 1.5, because with Java 1.6, even 1.6.0_10ea, Eclipse crashed when changing the .classpath-file. On Linux I had the same problems and could only get the 64bit Eclipse to work with 64bit Java 1.5.
The problem seems to be with the just in time compilation, sin... | null | CC BY-SA 2.5 | null | 2008-08-11T15:42:36.747 | 2009-01-20T10:38:04.790 | 2009-01-20T10:38:04.790 | 969 | 969 | null |
7,887 | 2 | null | 7,884 | 5 | null | There will be no performance hit, both statements are perfectly equal.
HTH
| null | CC BY-SA 2.5 | null | 2008-08-11T15:58:48.507 | 2008-08-11T15:58:48.507 | null | null | 722 | null |
7,880 | 1 | 7,886 | null | 45 | 180,914 | I want to open a file for reading, the C++ way. I need to be able to do it for:
- text files, which would involve some sort of read line function.- binary files, which would provide a way to read raw data into a `char*` buffer.
| How do you open a file in C++? | CC BY-SA 3.0 | 0 | 2008-08-11T15:50:51.660 | 2021-07-10T10:56:40.290 | 2015-12-14T12:43:57.793 | 3,313,438 | 432 | [
"c++",
"file",
"io"
] |
7,815 | 2 | null | 5,791 | 47 | null | I find that [Patrick Steele](http://weblogs.asp.net/psteele/default.aspx) answered this question best on his blog: [Avoiding IsNothing()](http://weblogs.asp.net/psteele/archive/2005/06/03/410336.aspx)
I did not copy any of his answer here, to ensure Patrick Steele get's credit for his post. But I do think if you're tr... | null | CC BY-SA 4.0 | null | 2008-08-11T14:12:57.020 | 2019-01-28T17:38:06.740 | 2019-01-28T17:38:06.740 | 193,892 | 1,382 | null |
7,885 | 1 | 8,668 | null | 12 | 6,116 | Perl has OOP features, but they are somewhat rarely used. How do you create and use Perl objects with methods and properties?
| How do you create objects in Perl? | CC BY-SA 2.5 | 0 | 2008-08-11T15:57:35.047 | 2010-07-26T22:55:28.850 | 2008-08-31T12:38:26.217 | 797 | 432 | [
"perl",
"oop",
"syntax"
] |
7,875 | 2 | null | 7,477 | 39 | null | Here's another technique for autosizing a textarea.
- - - - [Internet Explorer 6](http://en.wikipedia.org/wiki/Internet_Explorer_6)
(plain vanilla JavaScript)
```
function FitToContent(id, maxHeight)
{
var text = id && id.style ? id : document.getElementById(id);
if (!text)
return;
/* Accounts for r... | null | CC BY-SA 3.0 | null | 2008-08-11T15:41:42.800 | 2016-02-13T00:31:05.333 | 2016-02-13T00:31:05.333 | 63,550 | 811 | null |
7,890 | 2 | null | 7,884 | 30 | null | Note that the != operator is not standard SQL. If you want your code to be portable (that is, if you care), use <> instead.
| null | CC BY-SA 2.5 | null | 2008-08-11T16:01:42.200 | 2008-08-11T16:01:42.200 | null | null | 1,028 | null |
7,886 | 2 | null | 7,880 | 15 | null | There are three ways to do this, depending on your needs. You could use the old-school C way and call `fopen`/`fread`/`fclose`, or you could use the C++ fstream facilities (`ifstream`/`ofstream`), or if you're using MFC, use the `CFile` class, which provides functions to accomplish actual file operations.
All of these ... | null | CC BY-SA 4.0 | null | 2008-08-11T15:58:06.980 | 2021-07-10T10:56:40.290 | 2021-07-10T10:56:40.290 | 937,938 | 1,028 | null |
7,884 | 1 | 7,892 | null | 48 | 22,399 | I've just come across this in a WHERE clause:
```
AND NOT (t.id = @id)
```
How does this compare with:
```
AND t.id != @id
```
Or with:
```
AND t.id <> @id
```
I'd always write the latter myself, but clearly someone else thinks differently. Is one going to perform any better than the other? I know that using `... | Testing for inequality in T-SQL | CC BY-SA 2.5 | 0 | 2008-08-11T15:56:42.973 | 2022-02-07T19:09:57.747 | 2010-09-02T09:55:38.337 | 1,030 | 1,030 | [
"tsql",
"indexing",
"inequality"
] |
7,891 | 2 | null | 5,842 | 0 | null | If it's only two users, then Access should do just fine if you put the .mdb on a shared drive.
Have you tried it first rather than just assume it will be a problem.
I believe the recommended max concurrent users for Access is 5 but on occasion I've pushed it past this and never come unstuck.
On the other hand I did... | null | CC BY-SA 2.5 | null | 2008-08-11T16:01:53.103 | 2008-08-11T16:01:53.103 | null | null | 147 | null |
7,894 | 2 | null | 7,851 | 2 | null | This will just allow you a little more flexibility in your web server setup. Using safe_mode_gid, you should be able to run individual PHP/httpd processes for each user on your system, but give each process the ability to read some shared files as long as they are all run as the same group (GID) and the shared files a... | null | CC BY-SA 2.5 | null | 2008-08-11T16:05:07.310 | 2008-08-11T16:05:07.310 | null | null | 72 | null |
7,892 | 2 | null | 7,884 | 44 | null | These 3 will get the same exact execution plan
```
declare @id varchar(40)
select @id = '172-32-1176'
select * from authors
where au_id <> @id
select * from authors
where au_id != @id
select * from authors
where not (au_id = @id)
```
It will also depend on the selectivity of the index itself of course. I always u... | null | CC BY-SA 2.5 | null | 2008-08-11T16:02:43.710 | 2009-11-10T05:41:54.907 | 2009-11-10T05:41:54.907 | 57,986 | 740 | null |
7,888 | 2 | null | 7,880 | 40 | null | You need to use an [ifstream](http://en.cppreference.com/w/cpp/io/basic_ifstream) if you just want to read (use an `ofstream` to write, or an `fstream` for both).
To open a file in text mode, do the following:
```
ifstream in("filename.ext", ios_base::in); // the in flag is optional
```
To open a file in binary mod... | null | CC BY-SA 3.0 | null | 2008-08-11T15:59:48.303 | 2013-09-16T08:24:39.517 | 2013-09-16T08:24:39.517 | null | 872 | null |
7,918 | 2 | null | 7,676 | 0 | null | Because of budget constraints I think it will have to beta-tester's approch,i tried following the guide and cant seem to get it working. Before I spend time getting it to work, I just confrim, Replicating between SqlServer 2005 and Compact Edition is something that can be done?
| null | CC BY-SA 2.5 | null | 2008-08-11T16:30:34.870 | 2008-08-11T16:30:34.870 | null | null | 230 | null |
7,913 | 1 | 7,924 | null | 52 | 78,217 | I've always found checkin (commit) mails to be very useful for keeping track of what work other people are doing in the codebase / repository. How do I set up SVN to email a distribution list on each commit?
I'm running clients on Windows and the Apache Subversion server on Linux. The answers below for various platfor... | How do I make Subversion (SVN) send email on checkins? | CC BY-SA 3.0 | 0 | 2008-08-11T16:27:55.703 | 2022-12-05T11:16:39.233 | 2016-09-17T15:33:10.143 | 63,550 | 1,031 | [
"svn",
"hook",
"post-commit",
"post-commit-hook"
] |
7,923 | 2 | null | 3,385 | 41 | null | No you cannot get the MAC address in JavaScript, mainly because the MAC address uniquely identifies the running computer so it would be a security vulnerability.
Now if all you need is a unique identifier, I suggest you create one yourself using some cryptographic algorithm and store it in a cookie.
If you really nee... | null | CC BY-SA 2.5 | null | 2008-08-11T16:34:49.840 | 2008-08-11T16:34:49.840 | null | null | 268 | null |
7,908 | 2 | null | 7,864 | 2 | null | The main thing that I've seen with regards to complaints about Active Record is that when you create a model around a table, and you select several instances of the model, you're basically doing a "select * from ...". This is fine for editing a record or displaying a record, but if you want to, say, display a list of t... | null | CC BY-SA 2.5 | null | 2008-08-11T16:22:52.967 | 2008-08-11T16:22:52.967 | null | null | 722 | null |
7,922 | 2 | null | 7,913 | 3 | null | You'll want to familiarize yourself with [repository hooks](http://svnbook.red-bean.com/en/1.7/svn-book.html#svn.ref.reposhooks), particularly the [post-commit hook](http://www.petefreitag.com/item/244.cfm).
| null | CC BY-SA 3.0 | null | 2008-08-11T16:34:31.027 | 2012-08-17T15:42:16.937 | 2012-08-17T15:42:16.937 | 315,052 | 266 | null |
7,917 | 1 | 8,113 | null | 16 | 55,883 | I'm importing some data from a `CSV` file, and numbers that are larger than `1000` get turned into `1,100` etc.
What's a good way to remove both the quotes and the comma from this so I can put it into an `int` field?
The data is actually already in a MySQL table, so I need to be able to this using SQL. Sorry for ... | Remove Quotes and Commas from a String in MySQL | CC BY-SA 3.0 | 0 | 2008-08-11T16:28:57.683 | 2013-01-09T05:50:55.420 | 2012-11-14T15:32:42.810 | 751,527 | 402 | [
"mysql",
"regex",
"string"
] |
7,896 | 2 | null | 7,880 | -2 | null | fstream are great but I will go a little deeper and tell you about [RAII](http://en.wikipedia.org/wiki/Resource_Acquisition_Is_Initialization).
The problem with a classic example is that you are forced to close the file by yourself, meaning that you will have to bend your architecture to this need. RAII makes use of t... | null | CC BY-SA 3.0 | null | 2008-08-11T16:07:31.330 | 2015-10-05T15:43:58.567 | 2015-10-05T15:43:58.567 | 268 | 268 | null |
7,926 | 2 | null | 514 | 1 | null | I would also take a look at [Passenger](http://modrails.com/). It's a lot easier to get going than the traditional solution of Apache/nginx + Mongrel.
| null | CC BY-SA 2.5 | null | 2008-08-11T16:36:06.327 | 2008-08-11T16:36:06.327 | null | null | 994 | null |
7,924 | 2 | null | 7,913 | 31 | null | You use the [post-commit hooks](http://svnbook.red-bean.com/en/1.7/svn.reposadmin.create.html#svn.reposadmin.create.hooks).
Here's a sample Ruby script that sends an email after each commit: [commit-email.rb](http://svn.apache.org/repos/asf/subversion/trunk/tools/hook-scripts/commit-email.rb)
| null | CC BY-SA 4.0 | null | 2008-08-11T16:35:18.887 | 2022-12-05T11:16:39.233 | 2022-12-05T11:16:39.233 | 441,757 | 72 | null |
7,931 | 2 | null | 7,913 | 0 | null | There is a (large) example written in Perl included in the Subversion source (it can be [viewed here](http://svn.collab.net/repos/svn/trunk/contrib/hook-scripts/commit-email.pl.in)).
| null | CC BY-SA 2.5 | null | 2008-08-11T16:39:47.363 | 2008-08-11T16:39:47.363 | null | null | 729 | null |
7,934 | 2 | null | 7,917 | 0 | null | You could use this perl command.
```
Perl -lne 's/[,|"]//; print' file.txt > newfile.txt
```
You may need to play around with it a bit, but it should do the trick.
| null | CC BY-SA 2.5 | null | 2008-08-11T16:44:23.923 | 2008-08-11T16:44:23.923 | null | null | 889 | null |
7,935 | 2 | null | 7,933 | 0 | null | take a look at the syslockinfo and syslocks system tables
you can also run the sp_lock proc
| null | CC BY-SA 2.5 | null | 2008-08-11T16:44:29.493 | 2008-08-11T16:44:29.493 | null | null | 740 | null |
7,928 | 2 | null | 7,913 | 1 | null | What platform?
On Mac OS X I have installed [msmtp](http://msmtp.sourceforge.net/) and created a post-commit script under hooks in the repository. A .msmtprc file needs to be setup for the `svn` (or `www`) user.
```
REPOS="`echo $1 | sed 's/\/{root of repository}//g'` "
REV="$2"
MSG=`/usr/local/bin/svn log -v -r HEAD... | null | CC BY-SA 3.0 | null | 2008-08-11T16:38:34.323 | 2016-09-17T15:35:48.633 | 2016-09-17T15:35:48.633 | 63,550 | 842 | null |
7,933 | 1 | 7,936 | null | 3 | 1,790 | Is there some means of querying the system tables to establish which tables are using what locking schemes? I took a look at the columns in but nothing jumped out.
| interrogating table lock schemes in T-SQL | CC BY-SA 2.5 | null | 2008-08-11T16:41:47.487 | 2008-10-03T04:11:18.773 | 2008-10-03T04:04:59.270 | 1,030 | 1,030 | [
"tsql",
"sysobjects"
] |
7,939 | 2 | null | 7,864 | 0 | null | The problem that I see with Active Records is, that it's always just about table. That's okay, as long as you really work with just that one table, but when you work with data in most cases you'll have some kind of join somewhere.
Yes, usually is worse than when it comes to performance, but is better than by fir... | null | CC BY-SA 2.5 | null | 2008-08-11T16:46:14.917 | 2008-08-11T17:21:06.110 | 2008-08-11T17:21:06.110 | 999 | 999 | null |
7,936 | 2 | null | 7,933 | 1 | null | aargh, just being an idiot:
```
SELECT name, lockscheme(name)
FROM sysobjects
WHERE type="U"
ORDER BY name
```
| null | CC BY-SA 2.5 | null | 2008-08-11T16:44:54.483 | 2008-08-11T16:44:54.483 | null | null | 1,030 | null |
7,938 | 2 | null | 7,209 | 0 | null | It's been a time since I've done any GBA programming, but as I recall, the DS supports most (if not all) of the stuff that GBA supports. [This](http://www.coranac.com/tonc/text/gfx.htm) link has a section on how to do alpha blending for GBA (section 13.2). I don't know if there's a DS-specific way of doing it, but thi... | null | CC BY-SA 2.5 | null | 2008-08-11T16:45:39.677 | 2008-08-11T16:45:39.677 | null | null | null | null |
7,942 | 2 | null | 7,937 | 0 | null | I don't think there is. I've tried to solve this problem at my job. Hiding the select control was the best we could come up with (being a corporate shop with a captive audience, user experience doesn't usually factor into the PM's decisions).
From what I could gather online when looking for a solution, there's just n... | null | CC BY-SA 2.5 | null | 2008-08-11T16:48:03.557 | 2008-08-11T16:48:03.557 | null | null | 1,975,282 | null |
7,937 | 1 | 13,197 | null | 28 | 19,665 | When using IE, you cannot put an absolutely positioned div over a select input element. That's because the select element is considered an ActiveX object and is on top of every HTML element in the page.
I already saw people hiding selects when opening a popup div, that leads to pretty bad user experience having contro... | How to solve the select overlap bug in IE6? | CC BY-SA 4.0 | 0 | 2008-08-11T16:45:10.363 | 2019-02-04T22:55:43.253 | 2019-02-04T22:55:43.253 | 10,757,987 | 268 | [
"html",
"css",
"internet-explorer-6",
"html-select"
] |
7,947 | 2 | null | 7,940 | 0 | null | I think validation is a good litmus test of whether you've done things properly, so if there are only a few minor problems, why not fix them and ensure your site will at least be understood correctly by browsers in the future (even if they do render things differently for other reasons)?
OTOH, for most projects, valid... | null | CC BY-SA 2.5 | null | 2008-08-11T16:52:01.193 | 2008-08-11T16:52:01.193 | null | null | 72 | null |