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
2,138
1
2,147
null
61
56,851
Can a LINQ enabled app run on a machine that only has the .NET 2.0 runtime installed? In theory, LINQ is nothing more than syntactic sugar, and the resulting IL code should look the same as it would have in .NET 2.0. How can I write LINQ without using the .NET 3.5 libraries? Will it run on .NET 2.0?
LINQ on the .NET 2.0 Runtime
CC BY-SA 2.5
0
2008-08-05T12:03:10.927
2020-05-28T13:22:17.660
2008-08-16T13:40:40.687
905
373
[ ".net", "linq", ".net-3.5", ".net-2.0", "clr" ]
2,134
1
2,183
null
164
37,566
I have come across a lot of optimization tips which say that you should mark your classes as sealed to get extra performance benefits. I ran some tests to check the performance differential and found none. Am I doing something wrong? Am I missing the case where sealed classes will give better results? Has anyone run ...
Do sealed classes really offer performance Benefits?
CC BY-SA 2.5
0
2008-08-05T12:00:28.733
2021-11-22T11:38:46.357
2008-10-14T19:53:41.007
13,295
380
[ ".net", "optimization", "frameworks", "performance" ]
2,126
2
null
1,329
12
null
I would definitely prefer: 1) [Teracopy](http://www.codesector.com/teracopy.asp) - GUI based, replaces the default Windows copy/move UI and adds itself to context menu. Basic version is free (for home use I guess). 2) [Robocopy](http://en.wikipedia.org/wiki/Robocopy) - CLI based, useful when scripting. Free tool ...
null
CC BY-SA 2.5
null
2008-08-05T11:54:16.453
2008-08-05T11:54:16.453
null
null
120
null
2,146
2
null
2,138
3
null
No, because while you thought LINQ is really just syntactic sugar, it actually heavily used expression trees -- a feature absent in .NET 2.0. That being said .NET 3.5 only builds up on top of .NET 2.0, and that's the reason why the IL doesn't look "different" or "special". I do not see a reason why you shouldn't just...
null
CC BY-SA 2.5
null
2008-08-05T12:07:39.000
2008-08-05T12:07:39.000
null
null
372
null
2,028
2
null
2,027
31
null
Here is my own contribution for the [Java programming language](http://en.wikipedia.org/wiki/Java_(programming_language)). first some code: ``` public void swap(int x, int y) { int tmp = x; x = y; y = tmp; } ``` calling this method will result in this: ``` int pi = 3; int everything = 42; swap(pi, everythin...
null
CC BY-SA 4.0
null
2008-08-05T08:56:35.530
2019-02-16T10:00:58.500
2019-02-16T10:00:58.500
4,751,173
46
null
2,133
2
null
2,123
55
null
If you correctly markup your HTML code, there is no need for javascript. The following code will allow the user to click on the label text to tick the checkbox. ``` <label for="surname">Surname</label> <input type="checkbox" name="surname" id="surname" /> ``` The attribute on the label element links to the attribu...
null
CC BY-SA 2.5
null
2008-08-05T12:00:03.367
2008-08-05T12:09:18.543
2008-08-05T12:09:18.543
383
383
null
2,142
2
null
145
27
null
The .Net 2.0 framework namespace `System.IO.Compression` supports GZip and Deflate algorithms. Here are two methods that compress and decompress a byte stream which you can get from your file object. You can substitute `GZipStream` for `DefaultStream` in the methods below to use that algorithm. This still leaves the pr...
null
CC BY-SA 4.0
null
2008-08-05T12:04:41.127
2020-03-18T11:24:20.170
2020-03-18T11:24:20.170
1,442,180
371
null
2,148
2
null
2,138
11
null
In theory yes, provided you distribute the LINQ specific assemblies and any dependencies. However that is in violation of Microsoft's licensing. Scott Hanselman wrote a blog post about [Deploying ASP.NET MVC on ASP.NET 2.0](http://www.hanselman.com/blog/DeployingASPNETMVCOnASPNET20.aspx) which is similar to what you ar...
null
CC BY-SA 2.5
null
2008-08-05T12:07:46.190
2008-08-05T12:07:46.190
null
null
200
null
2,154
1
2,335
null
31
6,299
Instead of writing my ASP.NET C# applications in Visual Studio, I used my favorite text editor UltraEdit32. Is there any way I can implement MVC without the use of VS?
Developing for ASP.NET-MVC without Visual Studio
CC BY-SA 4.0
0
2008-08-05T12:13:40.483
2020-02-24T11:10:09.607
2020-02-24T11:10:09.607
7,014,431
383
[ "c#", "asp.net-mvc", "visual-studio" ]
2,156
2
null
2,138
2
null
As far as I know the LINQ library is only available since the framework 3.0. If you want to use something similar in the framework 2.0, you would need to rewritte it yourself :) or find a similar third-party library. I only found a bit of information [here](http://weblogs.asp.net/fmarguerie/archive/2007/09/05/linq-supp...
null
CC BY-SA 2.5
null
2008-08-05T12:14:33.197
2008-08-05T12:14:33.197
null
null
296
null
2,155
1
2,928
null
71
43,971
The web applications I develop often require co-dependent configuration settings and there are also settings that have to change as we move between each of our environments. All our settings are currently simple key-value pairs but it would be useful to create custom config sections so that it is obvious when two value...
How do I define custom web.config sections with potential child elements and attributes for the properties?
CC BY-SA 4.0
0
2008-08-05T12:13:40.640
2021-04-01T14:11:04.080
2021-04-01T14:11:04.080
133
371
[ "asp.net" ]
2,158
1
2,245
null
103
111,607
Is there a way to create a `JButton` with your own button graphic and not just with an image inside the button? If not, is there another way to create a custom `JButton` in java?
Creating a custom JButton in Java
CC BY-SA 3.0
0
2008-08-05T12:15:08.283
2018-08-09T09:56:03.203
2017-11-07T00:39:07.857
819,340
340
[ "java", "swing", "jbutton" ]
2,179
2
null
2,154
6
null
Assuming you have the correct assemblies and a C# compiler you in theory can use whatever you want to edit the code and then just run the compiler by hand or using a build script. That being said it is a real pain doing .NET development without Visual Studio/SharpEdit/Monodevelop in my opinion.
null
CC BY-SA 2.5
null
2008-08-05T12:27:35.230
2008-08-05T12:27:35.230
null
null
200
null
2,178
2
null
2,155
3
null
You can accomplish this with Section Handlers. There is a basic overview of how to write one at [http://www.codeproject.com/KB/aspnet/ConfigSections.aspx](http://www.codeproject.com/KB/aspnet/ConfigSections.aspx) however it refers to app.config which would be pretty much the same as writing one for use in web.config. T...
null
CC BY-SA 2.5
null
2008-08-05T12:25:20.850
2008-08-05T12:25:20.850
null
null
200
null
2,177
2
null
2,123
2
null
You can wrap your checkbox in the label: ``` <label style="display: block; padding: 50px 0 0 50px; background-color: pink; width: 80px; height: 80px"> <input type="checkbox" name="surname"> </label> ```
null
CC BY-SA 2.5
null
2008-08-05T12:25:16.607
2008-08-05T12:25:16.607
null
null
136
null
2,147
2
null
2,138
34
null
There are some "Hacks" that involve using a System.Core.dll from the 3.5 Framework to make it run with .net 2.0, but personally I would not want use such a somewhat shaky foundation. See here: [LINQ support on .NET 2.0](http://weblogs.asp.net/fmarguerie/archive/2007/09/05/linq-support-on-net-2-0.aspx) > 1. Create a ...
null
CC BY-SA 3.0
null
2008-08-05T12:07:41.603
2013-01-28T04:42:23.853
2013-01-28T04:42:23.853
null
91
null
2,120
1
2,382
null
137
156,198
I want to get the MD5 Hash of a string value in SQL Server 2005. I do this with the following command: ``` SELECT HashBytes('MD5', 'HelloWorld') ``` However, this returns a VarBinary instead of a VarChar value. If I attempt to convert `0x68E109F0F40CA72A15E05CC22786F8E6` into a VarChar I get `há ðô§*à\Â'†øæ` instead...
Convert HashBytes to VarChar
CC BY-SA 3.0
0
2008-08-05T11:49:11.360
2017-01-17T21:48:44.377
2017-05-23T11:55:03.917
-1
383
[ "sql", "sql-server" ]
2,180
2
null
2,123
4
null
Ronnie, If you wanted to enclose the label text and checkbox inside a wrapper element, you could do the following: ``` <label for="surname"> Surname <input type="checkbox" name="surname" id="surname" /> </label> ```
null
CC BY-SA 2.5
null
2008-08-05T12:28:32.623
2008-08-05T12:28:32.623
null
null
383
null
2,181
2
null
2,158
8
null
I haven't done SWING development since my early CS classes but if it wasn't built in you could just inherit `javax.swing.AbstractButton` and create your own. Should be pretty simple to wire something together with their existing framework.
null
CC BY-SA 4.0
null
2008-08-05T12:30:34.757
2018-08-09T09:56:03.203
2018-08-09T09:56:03.203
5,729,579
200
null
2,184
2
null
2,123
-2
null
Wrapping with the label still doesn't allow clicking 'anywhere in the box' - still just on the text! This does the job for me: ``` <div onclick="dob.checked=!dob.checked" class="checkbox"><input onclick="checked=!checked" id="dob" type="checkbox"/>Date of birth entry must be completed</div> ``` but unfortunately has...
null
CC BY-SA 2.5
null
2008-08-05T12:34:27.947
2008-08-05T12:34:27.947
null
null
193
null
2,197
2
null
2,041
15
null
Normally you'd copy it to svn+ssh://host.example.com/repos/project/branches/mybranch so that you can keep several branches in the repository, but your syntax is valid. Here's some advice on [how to set up your repository layout](http://svnbook.red-bean.com/en/1.1/ch04s07.html).
null
CC BY-SA 2.5
null
2008-08-05T12:40:31.337
2008-08-05T12:40:31.337
null
null
72
null
2,189
2
null
2,134
3
null
Sealed classes provide a performance improvement. Since a sealed class cannot be derived, any virtual members can be turned into non-virtual members. Of course, we're talking really small gains. I wouldn't mark a class as sealed just to get a performance improvement unless profiling revealed it to be a problem.
null
CC BY-SA 2.5
null
2008-08-05T12:37:07.067
2008-08-05T12:37:07.067
null
null
34
null
2,207
2
null
2,041
12
null
If you even plan on merging your branch, I highly suggest you look at this: [Svnmerge.py](http://www.orcaware.com/svn/wiki/Svnmerge.py) I hear Subversion 1.5 builds more of the merge tracking in, I have no experience with that. My project is on 1.4.x and svnmerge.py is a life saver!
null
CC BY-SA 3.0
null
2008-08-05T12:46:40.637
2013-01-28T04:33:56.757
2013-01-28T04:33:56.757
null
287
null
2,183
2
null
2,134
63
null
The JITter will sometimes use non-virtual calls to methods in sealed classes since there is no way they can be extended further. There are complex rules regarding calling type, virtual/nonvirtual, and I don't know them all so I can't really outline them for you, but if you google for sealed classes and virtual methods...
null
CC BY-SA 2.5
null
2008-08-05T12:32:40.510
2008-08-05T12:37:05.757
2008-08-05T12:37:05.757
267
267
null
2,212
2
null
2,209
0
null
I believe you are talking about a content management system. The way I have delt with this situation in the past is to either: 1. Allow a page/content to define an extra custom stylesheet or 2. Allow a page/content to define inline style tags
null
CC BY-SA 2.5
null
2008-08-05T12:49:29.117
2008-08-05T12:49:29.117
null
null
383
null
2,196
1
2,373
null
20
1,000
I've got a web application that I'm trying to optimize. Some of the controls are hidden in dialog-style `DIVs`. So, I'd like to have them load in via AJAX only when the user wants to see them. This is fine for controls that are mostly literal-based (various menus and widgets), but when I have what I call "dirty" contr...
Easy way to AJAX WebControls
CC BY-SA 4.0
null
2008-08-05T12:40:30.680
2020-02-24T11:09:18.243
2020-02-24T11:09:18.243
7,014,431
192
[ "asp.net", "ajax", "web-controls" ]
2,220
2
null
2,214
2
null
NUnit is always a favorite of mine. However if you are using TFS as your source control I suggest you stick with the Microsoft Stack.
null
CC BY-SA 2.5
null
2008-08-05T12:51:47.990
2008-08-05T12:51:47.990
null
null
17
null
2,209
1
2,233
null
25
13,698
I specifically want to add the style of `background-color` to the `<body>` tag of a master page, from the code behind (C#) of a content page that uses that master page. I have different content pages that need to make the master page has different colors depending on which content page is loaded, so that the master ...
How can I change the background of a masterpage from the code behind of a content page?
CC BY-SA 3.0
0
2008-08-05T12:46:45.003
2015-11-24T06:36:46.773
2014-05-14T17:56:39.150
247,702
396
[ "c#", "asp.net", ".net", "master-pages" ]
2,213
2
null
1,453
1
null
This will allow you to pass a weight of 0 and still work properly. Notice the === operator, this checks to see if weight matches "null" in both value and type (as opposed to ==, which is just value, so 0 == null == false). PHP: ``` public function createShipment($startZip, $endZip, $weight=null){ if ($weight ===...
null
CC BY-SA 2.5
null
2008-08-05T12:49:44.517
2008-08-05T12:49:44.517
null
null
72
null
2,216
2
null
2,092
4
null
Thxm, Mc! [http://asm.objectweb.org](http://asm.objectweb.org)/ is another one. documentation on byte code instrumentation, but nothing "directly" aimed at writing a coverage tool - just some hints or ideas.
null
CC BY-SA 3.0
null
2008-08-05T12:50:59.020
2016-10-13T12:50:44.040
2016-10-13T12:50:44.040
1,571,180
null
null
2,214
1
3,443
null
26
3,165
I'm looking to add a testing suite to my application, however I can't move to the newer testing frameworks for .NET 3.5. Does anyone have a suggestion about good testing frameworks to use?
What's the best way to implement BDD/TDD in .NET 2.0?
CC BY-SA 3.0
0
2008-08-05T12:50:15.543
2020-07-07T13:16:23.057
2015-04-30T10:29:47.187
1,468,295
395
[ "c#", ".net", "testing", "tdd", "bdd" ]
2,228
2
null
2,214
4
null
For a Mock Object library, I've found the BSD-licensed [Rhino.Mocks](http://ayende.com/projects/rhino-mocks.aspx) to be rather pleasing.
null
CC BY-SA 2.5
null
2008-08-05T12:54:20.620
2008-08-05T12:54:20.620
null
null
266
null
2,222
1
8,753
null
18
2,699
I'm currently working on an application with a frontend written in Adobe Flex 3. I'm aware of [FlexUnit](http://code.google.com/p/as3flexunitlib/) but what I'd really like is a unit test runner for Ant/NAnt and a runner that integrates with the Flex Builder IDE (AKA Eclipse). Does one exist? Also, are there any other...
How can I unit test Flex applications from within the IDE or a build script?
CC BY-SA 3.0
0
2008-08-05T12:52:42.573
2014-08-08T13:51:24.583
2014-08-08T13:51:24.583
2,159,583
266
[ "apache-flex", "eclipse", "unit-testing", "build-automation", "cairngorm" ]
2,232
1
2,400
null
1,245
627,315
How do I call shell commands from inside of a Ruby program? How do I then get output from these commands back into Ruby?
How to call shell commands from Ruby
CC BY-SA 4.0
0
2008-08-05T12:56:52.770
2022-01-05T16:44:57.903
2020-01-10T01:45:16.183
128,421
25
[ "ruby", "shell", "interop" ]
2,210
2
null
2,158
15
null
You could always try the Synth look & feel. You provide an xml file that acts as a sort of stylesheet, along with any images you want to use. The code might look like this: ``` try { SynthLookAndFeel synth = new SynthLookAndFeel(); Class aClass = MainFrame.class; InputStream stream = aClass.getResourceAsSt...
null
CC BY-SA 3.0
null
2008-08-05T12:47:17.967
2014-09-22T17:28:03.387
2014-09-22T17:28:03.387
1,795,426
246
null
2,246
2
null
2,214
3
null
is available at [http://www.nunit.org](http://www.nunit.org) I would suggest this even when working on the MS stack - the support for non-MS frameworks is happening in the MVC previews which shows a definite movement in the right direction to allow us all to customise our stacks to fit.
null
CC BY-SA 3.0
null
2008-08-05T13:03:45.080
2015-01-08T15:32:04.870
2015-01-08T15:32:04.870
3,939,046
193
null
2,233
2
null
2,209
10
null
What I would do for the particular case is: i. Define the body as a server side control ``` <body runat="server" id="masterpageBody"> ``` ii. In your content aspx page, register the MasterPage with the register: ``` <% MasterPageFile="..." %> ``` iii. In the Content Page, you can now simply use ``` Master.Find...
null
CC BY-SA 2.5
null
2008-08-05T12:56:54.220
2008-08-06T05:48:09.140
2008-08-06T05:48:09.140
384
384
null
2,223
2
null
2,123
26
null
Set the CSS `display` property for the label to be a block element and use that instead of your div - it keeps the semantic meaning of a label while allowing whatever styling you like. For example: ``` label { width: 100px; height: 100px; display: block; background-color: #e0e0ff; } ``` ``` <label for="t...
null
CC BY-SA 4.0
null
2008-08-05T12:52:50.047
2018-05-04T09:11:50.620
2018-05-04T09:11:50.620
48
48
null
2,254
2
null
2,250
9
null
in 1.x there used to be things DataTables couldn't do which DataSets could (don't remember exactly what). All that was changed in 2.x. My guess is that's why a lot of examples still use DataSets. DataTables should be quicker as they are more lightweight. If you're only pulling a single resultset, its your best choice...
null
CC BY-SA 2.5
null
2008-08-05T13:10:26.487
2008-08-05T13:10:26.487
null
null
34
null
2,250
1
2,258
null
142
129,246
I currently use a DataTable to get results from a database which I can use in my code. However, many example on the web show using a DataSet instead and accessing the table(s) through the collections method. Is there any advantage, performance wise or otherwise, of using DataSets or DataTables as a storage method for...
Datatable vs Dataset
CC BY-SA 3.0
0
2008-08-05T13:07:40.563
2021-01-01T13:17:08.647
2015-04-30T10:30:50.770
1,468,295
383
[ "c#", "dataset", "datatable" ]
2,219
2
null
2,155
13
null
Quick'n Dirty: First create your and classes: ``` public class MyStuffSection : ConfigurationSection { ConfigurationProperty _MyStuffElement; public MyStuffSection() { _MyStuffElement = new ConfigurationProperty("MyStuff", typeof(MyStuffElement), null); this.Properties.Add(_MyStuffElem...
null
CC BY-SA 2.5
null
2008-08-05T12:51:16.430
2008-08-05T12:51:16.430
null
null
227
null
2,264
2
null
2,250
6
null
One feature of the DataSet is that if you can call multiple select statements in your stored procedures, the DataSet will have one DataTable for each.
null
CC BY-SA 2.5
null
2008-08-05T13:15:53.713
2008-08-05T13:15:53.713
null
null
26
null
2,258
2
null
2,250
102
null
It really depends on the sort of data you're bringing back. Since a DataSet is (in effect) just a collection of DataTable objects, you can return multiple distinct sets of data into a single, and therefore more manageable, object. Performance-wise, you're more likely to get inefficiency from unoptimized queries tha...
null
CC BY-SA 3.0
null
2008-08-05T13:12:15.873
2015-04-30T10:31:05.997
2015-04-30T10:31:05.997
1,468,295
377
null
2,256
1
2,490
null
29
8,223
Is there a way of mapping data collected on a stream or array to a data structure or vice-versa? In C++ this would simply be a matter of casting a pointer to the stream as a data type I want to use (or vice-versa for the reverse) eg: in C++ ``` Mystruct * pMyStrct = (Mystruct*)&SomeDataStream; pMyStrct->Item1 = 25; i...
Mapping Stream data to data structures in C#
CC BY-SA 3.0
0
2008-08-05T13:11:14.223
2015-02-16T10:13:58.103
2014-08-08T13:52:54.077
2,159,583
379
[ "c#", "c++", "data-structures" ]
2,262
1
2,268
null
36
10,592
How do I rewrite a URL in ASP.NET? I would like users to be able to go to ``` http://www.website.com/users/smith ``` instead of ``` http://www.website.com/?user=smith ```
ASP.NET URL Rewriting
CC BY-SA 4.0
0
2008-08-05T13:14:48.350
2021-01-01T12:45:26.663
2021-01-01T12:45:26.663
11,573,842
383
[ "asp.net", "url", "url-rewriting", "url-routing" ]
2,225
2
null
2,158
35
null
Yes, this is possible. One of the main pros for using Swing is the ease with which the abstract controls can be created and manipulates. Here is a quick and dirty way to extend the existing JButton class to draw a circle to the right of the text. ``` package test; import java.awt.Color; import java.awt.Container; im...
null
CC BY-SA 3.0
null
2008-08-05T12:53:35.990
2014-09-22T17:33:24.200
2014-09-22T17:33:24.200
1,795,426
304
null
2,267
1
null
null
15
2,863
I am building a web page to show a customer what software they purchased and to give them a link to download said software. Unfortunately, the data on what was purchased and the download information are in separate databases so I can't just take care of it with joins in an SQL query. The common item is SKU. I'll be p...
How to filter and combine 2 datasets in C#
CC BY-SA 3.0
null
2008-08-05T13:17:46.830
2017-12-21T15:00:28.703
2017-12-21T15:00:28.703
1,695,458
111
[ "c#", ".net" ]
2,268
2
null
2,262
25
null
Try the Managed Fusion Url Rewriter and Reverse Proxy: [http://urlrewriter.codeplex.com](http://urlrewriter.codeplex.com) The rule for rewriting this would be: ``` # clean up old rules and forward to new URL RewriteRule ^/?user=(.*) /users/$1 [NC,R=301] # rewrite the rule internally RewriteRule ^/users/(.*) /?use...
null
CC BY-SA 2.5
null
2008-08-05T13:18:39.340
2010-04-27T02:19:27.930
2010-04-27T02:19:27.930
17
17
null
2,277
2
null
1,983
36
null
From the [Python FAQ](http://www.python.org/doc/faq/general/#why-are-there-separate-tuple-and-list-data-types): > Lists and tuples, while similar in many respects, are generally used in fundamentally different ways. Tuples can be thought of as being similar to Pascal records or C structs; they're small collections of r...
null
CC BY-SA 2.5
null
2008-08-05T13:22:43.030
2008-08-05T13:22:43.030
2020-06-20T09:12:55.060
-1
156
null
2,283
2
null
2,267
0
null
I am thinking off the top of my head here. If you load both as Data Tables in the same Data Sets, and define a relation between the two over SKU, and then run a query on the Data Set which produces the desired result.
null
CC BY-SA 2.5
null
2008-08-05T13:24:43.023
2008-08-05T13:24:43.023
null
null
380
null
2,279
1
2,314
null
19
1,793
How can I add rules to Visual Studio (2005 and up) for validating property markup (HTML) for a vendor's proprietary controls? My client uses a control which requires several properties to be set as tags in the aspx file which generates something like 215 validation errors on each build. It's not preventing me from bui...
Add Custom Tag to Visual Studio Validation
CC BY-SA 2.5
0
2008-08-05T13:24:11.763
2012-07-16T22:48:51.060
null
null
149
[ "visual-studio" ]
2,294
2
null
2,256
3
null
if its .net on both sides: think you should use binary serialization and send the byte[] result. trusting your struct to be fully blittable can be trouble. you will pay in some overhead (both cpu and network) but will be safe.
null
CC BY-SA 2.5
null
2008-08-05T13:29:07.617
2008-08-05T13:29:07.617
null
null
195
null
2,291
2
null
2,209
1
null
This is what I came up with: In the page load function: ``` HtmlGenericControl body = (HtmlGenericControl)Master.FindControl("default_body"); body.Style.Add(HtmlTextWriterStyle.BackgroundColor, "#2E6095"); ``` Where > default_body = the id of the body tag.
null
CC BY-SA 3.0
null
2008-08-05T13:28:01.613
2013-01-08T12:43:33.913
2013-01-08T12:43:33.913
1,471,203
396
null
2,280
2
null
2,232
29
null
I'm definitely not a Ruby expert, but I'll give it a shot: ``` $ irb system "echo Hi" Hi => true ``` You should also be able to do things like: ``` cmd = 'ls' system(cmd) ```
null
CC BY-SA 3.0
null
2008-08-05T13:24:16.160
2013-10-11T01:12:02.793
2013-10-11T01:12:02.793
128,421
402
null
2,300
1
2,312
null
16
11,309
I want to be able to do: ``` For Each thing In things End For ``` CLASSIC ASP - NOT .NET!
How do I traverse a collection in classic ASP?
CC BY-SA 3.0
null
2008-08-05T13:30:46.290
2021-10-25T12:06:58.470
2014-12-16T00:22:25.777
4,196,578
193
[ "asp-classic", "vbscript" ]
2,245
2
null
2,158
98
null
When I was first learning Java we had to make Yahtzee and I thought it would be cool to create custom Swing components and containers instead of just drawing everything on one `JPanel`. The benefit of extending `Swing` components, of course, is to have the ability to add support for keyboard shortcuts and other access...
null
CC BY-SA 3.0
null
2008-08-05T13:03:43.707
2016-10-27T07:19:59.620
2016-10-27T07:19:59.620
1,672,920
40
null
2,308
1
2,320
null
18
2,911
I see in the Stack Overflow footer that the SVN Revision number is displayed. Is this automated and if so, how does one implement it in ASP.NET?
ASP.NET Display SVN Revision Number
CC BY-SA 2.5
0
2008-08-05T13:38:42.310
2019-06-05T05:55:39.207
null
null
383
[ "asp.net", "svn" ]
2,316
2
null
2,311
17
null
Do you need to open the locfile in binary using `rb`? ``` f = open (locfile, "rb") ```
null
CC BY-SA 3.0
null
2008-08-05T13:45:38.413
2016-05-24T18:40:07.663
2016-05-24T18:40:07.663
2,370,483
259
null
2,312
2
null
2,300
4
null
Whatever your [things] are need to be written outside of VBScript. In VB6, [you can write a Custom Collection class](http://www.vb-helper.com/howto_custom_collection_with_for_each.html), then you'll need to compile to an ActiveX DLL and register it on your webserver to access it.
null
CC BY-SA 2.5
null
2008-08-05T13:42:15.593
2008-08-05T13:42:15.593
null
null
307
null
2,317
2
null
2,311
3
null
Well if you go under the properties of your file in Windows or a *nix environment, you will notice two sizes. One is the sector size, and one is the actual size. The sector size is the number of sectors in bytes that are used up on your hard disk. That is because two files cannot be in the same sector with most mode...
null
CC BY-SA 2.5
null
2008-08-05T13:45:47.867
2008-08-05T13:45:47.867
null
null
17
null
2,320
2
null
2,308
6
null
Make sure that the file has s`vn:keywords "Rev Id"` and then put `$Rev$` somewhere in there. See [this question and the answers to it](https://stackoverflow.com/q/163/10221765).
null
CC BY-SA 4.0
null
2008-08-05T13:47:00.077
2019-06-05T05:53:03.070
2019-06-05T05:53:03.070
10,221,765
91
null
2,314
2
null
2,279
5
null
Right-click on the Source view of an HTML / ASP page and select "Formatting and Validation". 1. Click "Tag Specific Options". 2. Expand "Client HTML Tags" and select the heading. 3. Click "New Tag...". 4. And just fill it in! I wish that I could add custom CSS values as well.
null
CC BY-SA 3.0
null
2008-08-05T13:43:27.387
2012-07-16T22:48:51.060
2012-07-16T22:48:51.060
427,763
106
null
2,311
1
2,316
null
46
5,243
I have created a PHP-script to update a web server that is live inside a local directory. I'm migrating the script into Python. It works fine for the most part, but after a PUT command, the size of the file appears to change. Thus, the size of the file is different from that of the file on the server. Once I download...
File size differences after copying a file to a server vía FTP
CC BY-SA 4.0
0
2008-08-05T13:40:47.470
2020-07-11T07:06:47.050
2019-06-04T09:28:15.763
6,556,397
394
[ "php", "python", "ftp", "webserver", "ftplib" ]
2,310
2
null
2,041
373
null
Branching in Subversion is facilitated by a very very light and efficient copying facility. Branching and tagging are effectively the same. Just copy a whole folder in the repository to somewhere else in the repository using the `svn copy` command. Basically this means that it is by convention what copying a folder m...
null
CC BY-SA 4.0
null
2008-08-05T13:40:20.777
2018-07-02T18:44:15.760
2018-07-02T18:44:15.760
3,345,644
193
null
2,332
1
2,333
null
23
4,724
I am fed up having to turn them on every time I open the application.
How do I turn on line numbers by default in TextWrangler on the Mac?
CC BY-SA 2.5
null
2008-08-05T13:57:05.033
2010-11-05T14:05:27.803
null
null
137
[ "macos", "textwrangler" ]
2,324
2
null
2,267
3
null
As long as the two databases are on the same physical server (assuming MSSQL) and the username/password being used in the connection string has rights to both DBs, then you should be able to perform a join across the two databases. Example: ``` select p.Date, p.Amount, d.SoftwareName, d.DownloadL...
null
CC BY-SA 2.5
null
2008-08-05T13:48:19.950
2008-08-05T13:48:19.950
null
null
51
null
2,333
2
null
2,332
28
null
Go to TextWrangler > Preferences. Choose Text Status Display in the category pane, then check the option "Show line numbers" and close the preferences. This should now be on by default when you open existing documents.
null
CC BY-SA 2.5
null
2008-08-05T13:57:10.027
2008-08-05T13:57:10.027
null
null
137
null
2,334
2
null
2,232
13
null
You can also use the backtick operators (`), similar to Perl: ``` directoryListing = `ls /` puts directoryListing # prints the contents of the root directory ``` Handy if you need something simple. Which method you want to use depends on exactly what you're trying to accomplish; check the docs for more details abou...
null
CC BY-SA 2.5
null
2008-08-05T13:57:47.233
2008-08-05T13:57:47.233
null
null
140
null
2,335
2
null
2,154
12
null
There is nothing VS specific with the MVC framework - it is just a bunch of DLLs that you can use. The wizards in VS just build you a quick-start framework. ASP.NET MVC is "bin-deployable" - there is nothing too clever to set up on the server either - just point the wildcard ISAPI filter to ASP.NET
null
CC BY-SA 2.5
null
2008-08-05T13:58:52.473
2008-08-05T13:58:52.473
null
null
193
null
2,360
2
null
2,349
28
null
Go to System Preferences > Keyboard and Mouse, then choose Keyboard Shortcuts. At the bottom, ensure Full Keyboard Access is set to "All controls". It's a long time since I turned it on but I think that's all you need to do
null
CC BY-SA 2.5
null
2008-08-05T14:13:12.740
2008-08-05T14:13:12.740
null
null
137
null
2,349
1
2,360
null
22
5,611
In Windows, in any windows form or web browser, you can use the tab button to switch focus through all of the form fields. It will stop on textboxes, radiobuttons, checkboxes, dropdown menus, etc. However, in Mac OSX, tab skips dropdown menus. Is there anyway to change this behavior, or access the above items menti...
How to tab focus onto a dropdown field in Mac OSX
CC BY-SA 3.0
0
2008-08-05T14:07:58.930
2013-10-17T07:28:58.653
2013-10-17T07:28:58.653
2,604,405
26
[ "macos", "mouse", "keyboard-shortcuts" ]
2,348
1
2,393
null
42
80,589
In the code below ``` For i = LBound(arr) To UBound(arr) ``` What is the point in asking using `LBound`? Surely that is always 0.
What is the best way to iterate through an array in Classic Asp VBScript?
CC BY-SA 3.0
0
2008-08-05T14:07:58.913
2020-07-11T14:00:48.867
2015-12-16T08:12:30.650
1,123,226
193
[ "arrays", "asp-classic", "vbscript" ]
2,346
2
null
2,267
2
null
Why not create a Domain object based approach to this problem: ``` public class CustomerDownloadInfo { private string sku; private readonly ICustomer customer; public CustomerDownloadInfo(ICustomer Customer){ customer = Customer; } public void AttachSku(string Sku){ sku = Sku; ...
null
CC BY-SA 2.5
null
2008-08-05T14:06:44.483
2008-08-05T14:06:44.483
null
null
307
null
2,322
2
null
2,256
3
null
If you need to populate each member variable by hand you can generalize it a bit as far as the primitives are concerned by using FormatterServices to retrieve in order the list of variable types associated with an object. I've had to do this in a project where I had a lot of different message types coming off the strea...
null
CC BY-SA 2.5
null
2008-08-05T13:47:23.790
2008-08-05T13:47:23.790
null
null
390
null
2,350
2
null
2,232
167
null
The way I like to do this is using the `%x` literal, which makes it easy (and readable!) to use quotes in a command, like so: ``` directorylist = %x[find . -name '*test.rb' | sort] ``` Which, in this case, will populate file list with all test files under the current directory, which you can process as expected: ``...
null
CC BY-SA 3.0
null
2008-08-05T14:08:13.360
2013-01-10T05:42:55.517
2013-01-10T05:42:55.517
211,563
410
null
2,361
2
null
2,349
4
null
Apple Menu > System Preferences > Keyboard & Mouse > Keyboard Shortcuts: Change the radio button at the bottom from "Text boxes and lists only" to "All controls." Edit: Dammit. We're a fast group around here aren't we? :-)
null
CC BY-SA 2.5
null
2008-08-05T14:13:58.153
2008-08-05T14:13:58.153
null
null
140
null
2,328
1
4,910
null
13
3,182
I have a problem with maintaining state in an ASP.NET AJAX page. Short version: I need some way to update the page ViewState after an async callback has been made, to reflect any state changes the server made during the async call. This seems to be a common problem, but I will describe my scenario to help explain: I...
Tracking state using ASP.NET AJAX / ICallbackEventHandler
CC BY-SA 2.5
null
2008-08-05T13:52:12.720
2021-10-25T12:06:09.353
2008-09-19T22:38:25.603
811
67
[ "asp.net", "ajax", "asp.net-ajax", "viewstate" ]
2,369
2
null
930
7
null
This is an alternative way (DataReader is faster than this one): ``` string s = ""; SqlConnection conn = new SqlConnection("Server=192.168.1.1;Database=master;Connect Timeout=30;User ID=foobar;Password=raboof;"); SqlDataAdapter da = new SqlDataAdapter("SELECT TOP 5 name, dbid FROM sysdatabases", conn); DataTable dt = ...
null
CC BY-SA 2.5
null
2008-08-05T14:17:22.530
2008-08-05T14:17:22.530
null
null
95
null
2,366
1
null
null
79
11,423
> [What is a monad?](https://stackoverflow.com/questions/44965/what-is-a-monad) I think I understand what 'Maybe Monads' are, but I'm not sure about the other types.
Can anyone explain Monads?
CC BY-SA 2.5
0
2008-08-05T14:16:02.720
2011-11-07T15:57:21.780
2017-05-23T12:22:25.010
-1
402
[ "haskell", "functional-programming", "monads", "glossary" ]
2,377
2
null
1,644
0
null
Suggest someone with the reputation to do it revise this question to say, "What good technology podcasts are out there?" I've got all kinds of audio fiction I could recommend, but then this question really runs off into the weeds.
null
CC BY-SA 2.5
null
2008-08-05T14:23:59.113
2008-08-05T14:23:59.113
null
null
409
null
2,372
2
null
2,196
1
null
Step one is to make your "dirty" pieces self contained user controls Step two is to embed those controls on your consuming page Step three is to wrap each user control tag in their own Asp:UpdatePanel Step four is to ensure your control gets the data it needs by having it read from properties which check against the...
null
CC BY-SA 2.5
null
2008-08-05T14:19:01.700
2008-08-05T14:19:01.700
null
null
149
null
2,373
2
null
2,196
5
null
Check out the [RadAjax](http://www.telerik.com/products/aspnet-ajax/controls/ajax/overview.aspx) control from Telerik - it allows you to avoid using UpdatePanels, and limit the amount of info passed back and forth between server and client by declaring direct relationships between calling controls, and controls that sh...
null
CC BY-SA 2.5
null
2008-08-05T14:19:26.860
2008-08-05T14:19:26.860
null
null
51
null
2,376
2
null
2,349
-2
null
It's in the System Preferences - [this blog post](http://www.howtogeek.com/howto/apple/why-doesnt-tab-work-for-drop-down-controls-in-firefox-on-os-x/) shows where the setting is.
null
CC BY-SA 2.5
null
2008-08-05T14:23:14.170
2008-08-05T14:23:14.170
null
null
35
null
2,382
2
null
2,120
161
null
I have found the solution else where: ``` SELECT SUBSTRING(master.dbo.fn_varbintohexstr(HashBytes('MD5', 'HelloWorld')), 3, 32) ```
null
CC BY-SA 2.5
null
2008-08-05T14:26:41.870
2008-08-05T14:26:41.870
null
null
383
null
2,379
2
null
2,328
1
null
Check out this blog post: [Tweaking the ICallbackEventHandler and Viewstate](http://www.reimers.dk/blogs/jacob_reimers_weblog/archive/2007/03/23/tweaking-the-icallbackeventhandler-and-viewstate.aspx). The author seems to be addressing the very situation that you are experiencing: > So when using ICallbackEventHandler...
null
CC BY-SA 2.5
null
2008-08-05T14:25:19.750
2008-08-05T14:25:19.750
null
null
51
null
2,378
2
null
2,348
2
null
Probably it comes from VB6. Because with [Option Base](http://msdn.microsoft.com/en-us/library/aa266179(VS.60).aspx) statement in VB6, you can alter the lower bound of arrays like this: ``` Option Base 1 ``` Also in VB6, you can alter the lower bound of a specific array like this: ``` Dim myArray(4 To 42) As String...
null
CC BY-SA 2.5
null
2008-08-05T14:24:13.653
2008-08-05T14:27:57.907
2008-08-05T14:27:57.907
39
39
null
2,385
2
null
1,644
0
null
All of the tech podcasts I listen to have been mentioned, but as long as we're discussing video I'd like to mention [Hak.5](http://www.hak5.org/). It is more focused on using existing programs rather than coding, but it has some good hardware segments, and it can often be an excellent source of inspiration.
null
CC BY-SA 2.5
null
2008-08-05T14:29:33.597
2008-08-05T14:29:33.597
null
null
121
null
2,409
2
null
2,405
1
null
I'm not sure if there's a general information source for this kind of information. I always just search on google or wikipedia for that particular file type. The binary file layout structure information should be included. For example, http://en.wikipedia.org/wiki/MP3#File_structure">MP3 file layout structure
null
CC BY-SA 2.5
null
2008-08-05T14:47:18.227
2008-08-05T14:56:01.610
2008-08-05T14:56:01.610
25
25
null
2,393
2
null
2,348
63
null
Why not use `For Each`? That way you don't need to care what the `LBound` and `UBound` are. ``` Dim x, y, z x = Array(1, 2, 3) For Each y In x z = DoSomethingWith(y) Next ```
null
CC BY-SA 3.0
null
2008-08-05T14:36:12.693
2011-08-15T17:16:53.640
2011-08-15T17:16:53.640
463,139
404
null
2,405
1
null
null
11
1,068
Where are some good sources of information on binary file layout structures? If I wanted to pull in a `BTrieve` index file, parse `MP3` headers, etc. Where does one get reliable information?
Binary file layout reference
CC BY-SA 3.0
0
2008-08-05T14:45:17.463
2016-03-22T00:35:43.263
2016-03-22T00:35:43.263
5,971,390
307
[ "language-agnostic", "data-structures", "file", "binary" ]
2,434
2
null
2,328
0
null
I actually found both of those links you provided, but as noted they are simply describing the problem, not solving it. The author of the blog post suggests a workaround by using a different ViewState provider, but unfortunately that isn't a possibility in this case...I really need to leave the particulars of the ViewS...
null
CC BY-SA 2.5
null
2008-08-05T14:54:23.670
2008-08-05T14:54:23.670
null
null
67
null
2,436
2
null
2,384
0
null
Try this: ``` using (FileStream stream = new FileStream(fileName, FileMode.Open)) { BinaryFormatter formatter = new BinaryFormatter(); StructType aStruct = (StructType)formatter.Deserialize(filestream); } ```
null
CC BY-SA 2.5
null
2008-08-05T14:56:10.937
2008-08-05T14:56:10.937
null
null
373
null
2,384
1
null
null
61
73,537
I'm trying to read binary data using C#. I have all the information about the layout of the data in the files I want to read. I'm able to read the data "chunk by chunk", i.e. getting the first 40 bytes of data converting it to a string, get the next 40 bytes. Since there are at least three slightly different version o...
Read binary file into a struct
CC BY-SA 3.0
0
2008-08-05T14:28:57.607
2022-03-13T12:38:32.413
2017-12-21T14:57:51.933
1,695,458
143
[ "c#", "struct", "io", "binaryfiles" ]
2,426
2
null
1,584
0
null
You should make your choice of server platform based on the environment as a whole, and that includes the admin/management interfaces supplied. I'm afraid that if you don't like the way Windows implements management of IIS, then that's too bad. Having said that, a bit of delving around in the WMI interfaces will gene...
null
CC BY-SA 2.5
null
2008-08-05T14:51:56.470
2008-11-03T18:15:19.357
null
null
377
null
2,442
2
null
2,432
0
null
I'd like to see that query, but I imagine it's some problem with some sort of iterator, and while I can't think of any situations where its possible, I bet it's from a bad while/case/cursor or a ton of poorly implemented views.
null
CC BY-SA 2.5
null
2008-08-05T14:58:55.270
2008-08-05T14:58:55.270
null
null
26
null
2,440
2
null
2,432
1
null
I have never come across this kind of situation, and to be honest the idea of referencing > 256 tables in a query fills me with a mortal dread. Your first question should probably by "Why so many?", closely followed by "what bits of information do I need?" I'd be worried that the amount of data being returned from su...
null
CC BY-SA 4.0
null
2008-08-05T14:57:40.763
2021-10-25T12:03:18.913
2021-10-25T12:03:18.913
17,169,050
377
null
2,447
1
null
null
11
708
Regarding Agile development, what are the best practices for testing security per release? If it is a monthly release, are there shops doing pen-tests every month?
Are there best practices for testing security in an Agile development shop?
CC BY-SA 3.0
0
2008-08-05T15:05:00.170
2017-01-25T13:54:16.393
2017-01-25T13:54:16.393
1,205,871
null
[ "security", "agile" ]
2,421
2
null
1,644
35
null
Am I going to be downmodded for suggesting that the Stack Overflow podcast is hilariously bad as a podcast? Anywho, you can find it, and a number of not-bad podcasts at [itconversations.com](http://itconversations.com). As this question asked for a "good" rather than "exhaustive" list, then this is obviously just my ...
null
CC BY-SA 2.5
null
2008-08-05T14:51:08.623
2009-09-14T09:16:39.127
2009-09-14T09:16:39.127
63,550
409
null
2,432
1
2,462
null
20
10,380
Have you ever seen any of there error messages? > -- SQL Server 2000Could not allocate ancillary table for view or function resolution. The maximum number of tables in a query (256) was exceeded.-- SQL Server 2005Too many table names in the query. The maximum allowable is 256. If yes, what have you done? Given up? Conv...
Have you ever encountered a query that SQL Server could not execute because it referenced too many tables?
CC BY-SA 2.5
0
2008-08-05T14:54:03.470
2021-10-25T12:03:18.913
2020-06-20T09:12:55.060
-1
95
[ "sql-server", "database", "sql-server-2005", "sql-server-2000" ]
2,468
2
null
2,432
0
null
Post the query :D Also I feel like one of the possible problems could be having a ton (read 200+) of name/value tables which could condensed into a single lookup table.
null
CC BY-SA 2.5
null
2008-08-05T15:26:55.027
2008-08-05T15:26:55.027
null
null
26
null