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 ⌀ |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5,223 | 1 | 6,700 | null | 2,950 | 2,770,314 | I have a JavaScript object. Is there a built-in or accepted best practice way to get the length of this object?
```
const myObject = new Object();
myObject["firstname"] = "Gareth";
myObject["lastname"] = "Simpson";
myObject["age"] = 21;
```
| Length of a JavaScript object | CC BY-SA 4.0 | 0 | 2008-08-07T19:42:21.060 | 2022-04-21T16:10:49.077 | 2020-07-10T18:31:21.540 | 63,550 | 147 | [
"javascript",
"javascript-objects"
] |
5,226 | 1 | 5,293 | null | 16 | 2,318 | I am currently in the process of creating my own blog and I have got to marking up the comments, but what is the best way to mark it up?
The information I need to present is:
1. Persons Name
2. Gravatar Icon
3. Comment Date
4. The Comment
| HTML Comments Markup | CC BY-SA 4.0 | 0 | 2008-08-07T19:46:47.417 | 2022-03-15T16:42:13.613 | 2022-03-15T13:59:33.140 | 63,550 | 383 | [
"html",
"semantic-markup"
] |
5,227 | 2 | null | 5,222 | 26 | null | POST variables should be accessible via the request object: [HttpRequest.getParameterMap()](http://java.sun.com/products/servlet/2.3/javadoc/javax/servlet/ServletRequest.html#getParameterMap()). The exception is if the form is sending multipart MIME data (the FORM has ). In that case, you need to parse the byte stream ... | null | CC BY-SA 2.5 | null | 2008-08-07T19:47:30.490 | 2008-08-07T19:47:30.490 | null | null | 304 | null |
5,188 | 1 | 5,192 | null | 8 | 2,859 | I have a web reference for our report server embedded in our application. The server that the reports live on could change though, and I'd like to be able to change it "on the fly" if necessary.
I know I've done this before, but can't seem to remember how. Thanks for your help.
I've manually driven around this for th... | How do you pull the URL for an ASP.NET web reference from a configuration file in Visual Studio 2008? | CC BY-SA 3.0 | null | 2008-08-07T19:20:27.097 | 2016-12-19T23:32:16.960 | 2016-12-19T23:32:16.960 | 563,532 | 326 | [
"asmx"
] |
5,232 | 2 | null | 5,223 | 44 | null | I'm not a JavaScript expert, but it looks like you would have to loop through the elements and count them since Object doesn't have a length method:
```
var element_count = 0;
for (e in myArray) { if (myArray.hasOwnProperty(e)) element_count++; }
```
@palmsey: In fairness to the OP, the JavaScript documentation act... | null | CC BY-SA 3.0 | null | 2008-08-07T19:52:19.840 | 2016-09-17T18:27:26.900 | 2016-09-17T18:27:26.900 | 63,550 | 430 | null |
5,242 | 1 | 5,246 | null | 10 | 1,376 | Although I'm specifically interested in web application information, I would also be somewhat curious about desktop application development as well. This question is driven by my work on my personal website as well as my job, where I have developed a few features, but left it to others to integrate into the look and fe... | User Interfaces - Colors and Layout | CC BY-SA 2.5 | null | 2008-08-07T20:01:13.520 | 2020-06-21T08:59:08.593 | 2008-10-03T23:43:49.170 | 572 | 572 | [
"user-interface",
"usability"
] |
5,245 | 2 | null | 3,666 | 1 | null | Are you trying to determine if the user is an administrator or not?
If so you could grad the username by with "File.userDirectory.name".
And I think to figure out if the user is an administrator you could probably try to access a file that requires administrator privileges (maybe try writing a file to Windows/System3... | null | CC BY-SA 2.5 | null | 2008-08-07T20:02:21.473 | 2008-08-07T20:02:21.473 | null | null | 22 | null |
5,194 | 1 | 5,199 | null | 16 | 3,930 | I am prototyping some C# 3 collection filters and came across this.
I have a collection of products:
```
public class MyProduct
{
public string Name { get; set; }
public Double Price { get; set; }
public string Description { get; set; }
}
var MyProducts = new List<MyProduct>
{
new MyProd... | When to use an extension method with lambda over LINQtoObjects to filter a collection? | CC BY-SA 3.0 | 0 | 2008-08-07T19:23:13.127 | 2014-06-17T17:21:54.600 | 2014-06-17T17:21:54.600 | 2,246,344 | 439 | [
"c#",
"linq",
".net-3.5",
"lambda"
] |
5,219 | 2 | null | 5,179 | 15 | null | Here's how I solved this problem today. I started from [this article](http://www.c-sharpcorner.com/UploadFile/desaijm/ASP.NetPostURL11282005005516AM/ASP.NetPostURL.aspx) on C# Corner, but found the example - while technically sound - a little incomplete. Everything he said was right, but I needed to hit a few externa... | null | CC BY-SA 4.0 | null | 2008-08-07T19:36:56.580 | 2019-06-12T14:02:02.987 | 2019-06-12T14:02:02.987 | 1,011,722 | 111 | null |
5,250 | 2 | null | 5,242 | 3 | null | One tip to check if your colors have good contrast is taking a snapshot of it and converting to grayscale. If you can't read something, colors were surely bad choosen.
Plus, although it's not about user interfaces, [Before & After Magazine](http://web.archive.org/web/20191226210247/https://www.bamagazine.com/) can giv... | null | CC BY-SA 4.0 | null | 2008-08-07T20:10:55.573 | 2020-06-21T08:59:08.593 | 2020-06-21T08:59:08.593 | 9,780,149 | 431 | null |
5,246 | 2 | null | 5,242 | 5 | null | Usually, each operating System has user Interface Guidelines. For Windows, have a [look here](http://blogs.msdn.com/acoat/archive/2006/09/27/773148.aspx). (Edit: The links in that post are broken. But a Search for "[User Interface Guidelines](http://search.msdn.microsoft.com/Default.aspx?query=User+Interface+Guidelines... | null | CC BY-SA 4.0 | null | 2008-08-07T20:04:55.197 | 2020-06-21T05:21:21.820 | 2020-06-21T05:21:21.820 | null | 91 | null |
5,257 | 2 | null | 3,666 | 0 | null | Be very careful if you decide to create a socket server that listens for registry commands. You are potentially creating a security hole and users' personal firewalls may get in the way in terms of usability.
| null | CC BY-SA 2.5 | null | 2008-08-07T20:19:24.497 | 2008-08-07T20:19:24.497 | null | null | 636 | null |
5,253 | 2 | null | 5,242 | 2 | null | The book [Designing Interfaces](http://designinginterfaces.com/), by Jenifer Tidwell has a entire chapter on the subject (Chapter 9, excerpts accesible online).
The entire book is worth recommending.
| null | CC BY-SA 2.5 | null | 2008-08-07T20:15:06.173 | 2008-08-07T20:15:06.173 | null | null | 394 | null |
5,251 | 1 | null | null | 22 | 19,362 | I've been trying to get pretty charts to work in GWT on our internal network.
Playing around with [GWT-Ext](http://gwt-ext.com)'s charts is nice, but it requires flash and is really messy to control (it seems buggy, in general).
I'd like to hear about something that works with the least amount of dependencies and i... | Stand-alone charts in GWT | CC BY-SA 3.0 | 0 | 2008-08-07T20:12:16.650 | 2013-09-11T19:21:12.757 | 2013-04-30T13:47:33.530 | 21,960 | 573 | [
"gwt",
"charts"
] |
5,262 | 2 | null | 5,071 | 11 | null | Ah, spaces. This will work with spaces:
```
find . -type f -print0| xargs -0 cvs add
```
| null | CC BY-SA 2.5 | null | 2008-08-07T20:22:32.807 | 2008-08-07T20:22:32.807 | null | null | 116 | null |
5,256 | 2 | null | 5,226 | 2 | null | I was perhaps thinking of something like this:
```
<ol class="comments">
<li>
<a href="">
<img src="" alt="" />
</a>
<cite>Name<br />Date</cite>
<blockquote>Comment</blockquote>
</li>
</ol>
```
It's very semantic without using div's and only one class. The list shows... | null | CC BY-SA 4.0 | null | 2008-08-07T20:16:44.423 | 2022-03-15T16:41:41.650 | 2022-03-15T16:41:41.650 | 63,550 | 383 | null |
5,235 | 2 | null | 5,226 | 2 | null | Here's one way you could do it with the following CSS to float the picture to the left of the contents:
```
.comment {
width: 400px;
}
.comment_img {
float: left;
}
.comment_text,
.comment_meta {
margin-left: 40px;
}
.comment_meta {
clear: both;
}
```
```
<div class='comment' id='comment_(com... | null | CC BY-SA 3.0 | null | 2008-08-07T19:56:36.697 | 2016-11-30T10:50:19.533 | 2016-11-30T10:50:19.533 | 2,571,493 | 283 | null |
5,264 | 1 | 5,273 | null | 17 | 11,669 | Out of the box, in MS Reporting Services, the image element does not allow for the centering of the image itself, when the dimensions are unknown at design time. In other words, the image (if smaller than the dimensions allotted on the design surface) will be anchored to the top left corner, not in the center.
My repo... | How can I dynamically center an image in a MS Reporting Services report? | CC BY-SA 2.5 | 0 | 2008-08-07T20:24:34.003 | 2021-02-05T20:39:02.833 | null | null | 326 | [
"reporting-services"
] |
5,266 | 2 | null | 5,017 | 3 | null | Only way I could figure out how to do it without just moving the file and telling the user was to pass it off to the browser.
```
navigateToURL(new URLRequest(File.applicationStorageDirectory.nativePath + "/courses/" + fileName));
```
| null | CC BY-SA 2.5 | null | 2008-08-07T20:25:47.293 | 2008-08-19T21:21:02.317 | 2008-08-19T21:21:02.317 | 26 | 26 | null |
5,272 | 2 | null | 5,269 | 2 | null | The left one, then stops if it is null.
Edit: In vb.net it will evaluate both and possibly throw an error, unless you use AndAlso
| null | CC BY-SA 2.5 | null | 2008-08-07T20:31:32.973 | 2008-08-07T20:31:32.973 | null | null | 26 | null |
5,270 | 2 | null | 5,170 | 51 | null | I've started using [LinqPad](http://www.linqpad.net/). In addition to being more lightweight than SSMS, you can also practice writing LINQ queries- way more fun than boring old TSQL!
| null | CC BY-SA 2.5 | null | 2008-08-07T20:31:12.413 | 2008-08-07T20:36:37.020 | 2008-08-07T20:36:37.020 | 383 | 667 | null |
5,276 | 2 | null | 5,269 | 16 | null | C# : Left to right, and processing stops if a non-match (evaluates to false) is found.
| null | CC BY-SA 2.5 | null | 2008-08-07T20:33:22.847 | 2010-04-14T16:41:33.237 | 2010-04-14T16:41:33.237 | 377 | 377 | null |
5,248 | 2 | null | 5,226 | 1 | null | I don't know that there's markup that would necessarily represent the comment structure well without using or classes as well, but you could use definition lists. You can use multiple and tags in the context of a definition list - see [10.3 Definition lists: the DL, DT, and DD elements](http://www.w3.org/TR/html401/... | null | CC BY-SA 4.0 | null | 2008-08-07T20:08:13.787 | 2022-03-15T16:40:02.737 | 2022-03-15T16:40:02.737 | 63,550 | 283 | null |
5,263 | 1 | 24,472 | null | 8 | 1,556 | I have a self-referential Role table that represents a tree structure
```
ID [INT] AUTO INCREMENT
Name [VARCHAR]
ParentID [INT]
```
I am using an ADO.NET DataTable and DataAdapter to load and save values to this table. This works if I only create children of existing rows. If I make a child row, then make a child o... | How do you persist a tree structure to a database table with auto incrementing IDs using an ADO.NET DataSet and a DataAdapter | CC BY-SA 2.5 | null | 2008-08-07T20:23:51.057 | 2008-10-01T11:29:58.593 | null | null | 173 | [
".net",
"database",
"ado.net"
] |
5,277 | 2 | null | 5,269 | 0 | null | I have heard somewhere that compilers work backwards, but I am unsure how true this is.
| null | CC BY-SA 2.5 | null | 2008-08-07T20:34:11.800 | 2008-08-07T20:34:11.800 | null | null | 383 | null |
5,260 | 1 | null | null | 7 | 1,694 | I have a situation where I want to add hours to a date and have the new date wrap around the work-day. I cobbled up a function to determine this new date, but want to make sure that I'm not forgetting anything.
The hours to be added is called "delay". It could easily be a parameter to the function instead.
Please pos... | What is the best way to wrap time around the work day? | CC BY-SA 2.5 | null | 2008-08-07T20:21:52.433 | 2012-01-31T14:35:20.390 | 2012-01-31T14:35:20.390 | 21,234 | 106 | [
"vb.net",
"date"
] |
5,284 | 2 | null | 4,849 | 3 | null | Take a look at the [BrowserPlus](http://browserplus.yahoo.com/) project at Yahoo.
It looks like they have built a toolkit so that you don't have to do the gritty work of writing the browser plugin yourself.
| null | CC BY-SA 3.0 | null | 2008-08-07T20:39:07.797 | 2011-09-09T09:51:26.837 | 2011-09-09T09:51:26.837 | 213,550 | 173 | null |
5,279 | 2 | null | 5,269 | 2 | null | The concept modesty is referring to is operator overloading. in the statement:
```
if( A && B){
// do something
}
```
A is evaluated first, if it evaluates to false, B is never evaluated. The same applies to
```
if(A || B){
//do something
}
```
A is evaluated first, if it evaluates to true, B is never e... | null | CC BY-SA 2.5 | null | 2008-08-07T20:35:32.437 | 2008-08-07T20:35:32.437 | null | null | 292 | null |
5,292 | 2 | null | 5,269 | 4 | null | ZombieSheep is dead-on. The only "gotcha" that might be waiting is that this is only true if you are using the && operator. When using the & operator, both expressions will be evaluated every time, regardless if one or both evaluate to false.
```
if (amHungry & whiteCastleIsNearby)
{
// The code will check if Whi... | null | CC BY-SA 2.5 | null | 2008-08-07T20:45:43.273 | 2008-08-07T20:45:43.273 | null | null | 308 | null |
5,293 | 2 | null | 5,226 | 7 | null | I think that your version with the cite, blockquote, etc. would definitely work, but if semantics is your main concern then I personally wouldn't use cite and blockquote as they have specific things that they are supposed to represent.
The blockquote tag is meant to represent a quotation taken from another source and t... | null | CC BY-SA 4.0 | null | 2008-08-07T20:46:19.840 | 2022-03-15T16:42:13.613 | 2022-03-15T16:42:13.613 | 63,550 | 283 | null |
5,269 | 1 | 5,276 | null | 18 | 4,002 | In C#, (and feel free to answer for other languages), what order does the runtime evaluate a logic statement?
Example:
```
DataTable myDt = new DataTable();
if (myDt != null && myDt.Rows.Count > 0)
{
//do some stuff with myDt
}
```
Which statement does the runtime evaluate first -
```
myDt != null
```
or:
... | C# logic order and compiler behavior | CC BY-SA 3.0 | null | 2008-08-07T20:30:00.683 | 2022-10-15T18:04:16.743 | 2012-05-24T12:30:53.223 | 1,288 | 357 | [
"c#",
"language-agnostic",
"compiler-construction",
"logic"
] |
5,273 | 2 | null | 5,264 | 8 | null | Here is how I was able to accomplish this. With help from [Chris Hays](https://learn.microsoft.com/en-us/archive/blogs/chrishays/centered-images)
Size the image to be as big as you would want it on the report, change "Sizing" property to .
Dynamically set the image's left padding using an expression:
```
=CStr(Round((4... | null | CC BY-SA 4.0 | null | 2008-08-07T20:31:41.010 | 2021-02-05T20:39:02.833 | 2021-02-05T20:39:02.833 | 326 | 326 | null |
5,303 | 2 | null | 5,260 | 2 | null | You should probably write some automated tests for each condition you can think of, and then just start brainstorming more, writing the tests as you think of them. This way, you can see for sure it will work, and will continue to work if you make further changes. Look up Test Driven Development if you like the result... | null | CC BY-SA 2.5 | null | 2008-08-07T20:57:40.723 | 2008-08-07T20:57:40.723 | null | null | 122 | null |
5,302 | 2 | null | 5,136 | 4 | null | I remember that I was able to wrap a MATLAB simulation into a [DLL file](https://en.wikipedia.org/wiki/Dynamic-link_library) and then call it from a [Delphi](https://en.wikipedia.org/wiki/Embarcadero_Delphi) application. It worked really well.
| null | CC BY-SA 4.0 | null | 2008-08-07T20:57:20.303 | 2022-06-27T20:22:12.173 | 2022-06-27T20:22:12.173 | 63,550 | 501 | null |
5,278 | 2 | null | 5,269 | 6 | null |
```
if( x isNot Nothing AndAlso x.go()) then
```
1. Evaluation is done left to right
2. AndAlso operator makes sure that only if the left side was TRUE, the right side will be evaluated (very important, since ifx is nothing x.go will crash)
You may use instead ofAndAlso in vb. in which case the left side gets ... | null | CC BY-SA 2.5 | null | 2008-08-07T20:35:11.657 | 2008-08-07T23:32:40.707 | 2008-08-07T23:32:40.707 | 350 | 350 | null |
5,307 | 1 | 5,317 | null | 12 | 1,693 | All the articles I've found via google are either obsolete or contradict one another.
What's the easiest way to print a form or, say, a richtextbox in c#? I think it's using the `PrintDiaglog` class by setting the `Document`, but how does this get converted?
| Print a Winform/visual element | CC BY-SA 3.0 | 0 | 2008-08-07T20:58:14.060 | 2012-04-25T15:12:44.533 | 2012-04-25T15:12:44.533 | 1,332,690 | 398 | [
"c#",
"winforms"
] |
5,308 | 2 | null | 5,269 | 1 | null | Nopes, at least the C# compiler doesn't work backwards (in either && or ||). It's left to right.
| null | CC BY-SA 2.5 | null | 2008-08-07T21:00:27.473 | 2008-08-07T21:00:27.473 | null | null | 380 | null |
5,309 | 2 | null | 5,242 | 1 | null | I'm horrible at finding colors that look good together, so I cheat and use pictures from nature that are mostly the color I want (say, green) and then I use [this website](http://www.degraeve.com/color-palette/) to pull out the main color scheme. Generally nature does a pretty good job of setting its own nice color sch... | null | CC BY-SA 2.5 | null | 2008-08-07T21:02:24.660 | 2008-08-07T21:02:24.660 | null | null | 204 | null |
5,295 | 2 | null | 5,269 | 4 | null | Note that there is a difference between && and & regarding how much of your expression is evaluated.
&& is known as a short-circuited boolean AND, and will, as noted by others here, stop early if the result can be determined before all the sub-expressions are evaluated.
& is known as a logical bitwise operator and wi... | null | CC BY-SA 2.5 | null | 2008-08-07T20:52:27.440 | 2008-08-07T20:52:27.440 | null | null | 267 | null |
5,301 | 2 | null | 5,269 | 4 | null | Some languages have interesting situations where expressions are executed in a different order. I am specifically thinking of Ruby, but I'm sure they borrowed it from elsewhere (probably Perl).
The expressions in the logic will stay left to right, but for example:
```
puts message unless message.nil?
```
The above... | null | CC BY-SA 2.5 | null | 2008-08-07T20:54:51.897 | 2008-08-07T21:27:11.193 | 2008-08-07T21:27:11.193 | 122 | 122 | null |
5,322 | 2 | null | 173 | 16 | null | We use [DBGhost](http://www.innovartis.co.uk/) to manage our SQL database. Then you put your scripts to build a new database in your version control, and it'll either build a new database, or upgrade any existing database to the schema in version control. That way you don't have to worry about creating change scripts (... | null | CC BY-SA 2.5 | null | 2008-08-07T21:12:01.990 | 2008-08-07T21:12:01.990 | null | null | 233 | null |
5,316 | 2 | null | 5,078 | 1 | null | If you do run a Linux server from home, install [ossec](http://www.ossec.net/) on it for a nice lightweight IDS that works really well.
[EDIT]
As a side note, make sure that you do not run afoul of your ISP's Acceptable Use Policy that they allow incoming connections on standard ports. The ISP I used to work for had... | null | CC BY-SA 2.5 | null | 2008-08-07T21:08:39.607 | 2008-08-12T20:21:47.837 | 2008-08-12T20:21:47.837 | 204 | 204 | null |
5,317 | 2 | null | 5,307 | 6 | null | At least in VS 2008, its very easy. It took me about a couple of minutes to code the answer after reading your question. Here's where I borrowed it from:
[http://msdn.microsoft.com/en-us/library/6he9hz8c.aspx](http://msdn.microsoft.com/en-us/library/6he9hz8c.aspx)
I tested this, and it works.
| null | CC BY-SA 2.5 | null | 2008-08-07T21:09:17.423 | 2008-08-07T21:09:17.423 | null | null | 380 | null |
5,321 | 2 | null | 3,230 | 10 | null | You need to set the run-time library (Under C/C++ -> Code Generation) for ALL projects to static linkage, which correlates to the following default building configurations:
- -
As opposed to the "DLL" versions of those libraries.
Even if you do that, depending on the libraries you're using, you might have to instal... | null | CC BY-SA 2.5 | null | 2008-08-07T21:11:52.817 | 2008-08-07T21:11:52.817 | null | null | null | null |
5,325 | 2 | null | 4,949 | 5 | null | Here is what we do:
- - - -
At the beginning of a project, the user makes a branch and checks it out on their personal VM as well as grabs a clean copy of the database. They do their work, committing as they go.
Once they have finished everything in their own personal space they log into the integration server and ... | null | CC BY-SA 2.5 | null | 2008-08-07T21:15:48.067 | 2008-08-07T21:15:48.067 | null | null | 204 | null |
5,310 | 2 | null | 1,949 | 28 | null | I disagree with John's answer. The DataContext (or Linq to Entities ObjectContext) is more of a "unit of work" than a connection. It manages change tracking, etc. See this blog post for a description:
[Lifetime of a LINQ to SQL DataContext](http://blogs.msdn.com/dinesh.kulkarni/archive/2008/04/27/lifetime-of-a-linq-to... | null | CC BY-SA 2.5 | null | 2008-08-07T21:02:30.057 | 2009-08-04T23:01:32.073 | 2009-08-04T23:01:32.073 | 667 | 667 | null |
5,330 | 2 | null | 5,071 | 0 | null | [Mark's solution](https://stackoverflow.com/a/5262/1287812) resolves the spaces issue, but produces this issue:
> cvs add: cannot open CVS/Entries for
reading: No such file or directory cvs
[add aborted]: no repository
To fix it, the actual command to use is:
```
find . -type f -exec cvs add {} \;
```
| null | CC BY-SA 3.0 | null | 2008-08-07T21:18:18.933 | 2014-05-08T05:46:31.283 | 2017-05-23T10:29:54.633 | -1 | 422 | null |
5,329 | 1 | 5,403 | null | 11 | 16,520 | I'm currently evaluating the `MSF for CMMI` process template under for use on my development team, and I'm having trouble understanding the need for separate bug and change request work item types.
I understand that it is beneficial to be able to differentiate between bugs (errors) and change requests (changing requi... | What is the difference between a bug and a change request in MSF for CMMI? | CC BY-SA 3.0 | 0 | 2008-08-07T21:17:58.170 | 2021-06-29T10:12:10.360 | 2021-06-29T10:12:10.360 | 10,248,678 | 327 | [
"tfs",
"workflow",
"lifecycle",
"cmmi",
"ms-solution-framework"
] |
5,337 | 2 | null | 5,329 | 1 | null | A bug is something that is broken in a requirement which has already been approved for implementation.
A change request needs to go through a cycle in which the impact and effort has to be estimated for that change, and then it has to be approved for implementation before work on it can begin.
The two are fundamental... | null | CC BY-SA 2.5 | null | 2008-08-07T21:21:11.097 | 2008-08-07T21:21:11.097 | null | null | 380 | null |
5,323 | 1 | null | null | 30 | 4,712 | It seems like every time I try to create a pure CSS layout it takes me much longer than if I'd use a table or two. Getting three columns to be equal lengths with different amounts of data seems to require particular fancy hacks, especially when dealing with cross-browser issues.
My Question:
Who are these few tables ... | Is there a business reason for striving for pure CSS layout? | CC BY-SA 4.0 | 0 | 2008-08-07T21:14:25.510 | 2020-02-26T13:48:24.710 | 2020-02-26T13:48:24.710 | 11,393,381 | 556 | [
"css"
] |
5,336 | 2 | null | 173 | 8 | null | If you have a small database and you want to version the entire thing, [this batch script](http://weblogs.asp.net/jgalloway/archive/2006/10/28/Batch-files-to-check-SQL-2005-_2800_MDF_2900_-files-in-and-out-of-Subversion-source-control.aspx) might help. It detaches, compresses, and checks a MSSQL database MDF file in to... | null | CC BY-SA 4.0 | null | 2008-08-07T21:21:01.050 | 2020-06-20T23:15:15.643 | 2020-06-20T23:15:15.643 | 9,780,149 | 5 | null |
5,332 | 2 | null | 5,323 | 18 | null | Like a lot of things, it's a good idea that often gets carried too far. I like a div+css driven layout because it's usually quite easy to change the appearance, even drastically, just through the stylesheet. It's also nice to be friendly to lower-level browsers, screen readers, etc. But like most decisions in programmi... | null | CC BY-SA 2.5 | null | 2008-08-07T21:20:11.270 | 2008-08-07T21:20:11.270 | null | null | 521 | null |
5,338 | 2 | null | 5,323 | 1 | null | Business reason for CSS layout: You can blow away the customers by saying "our portal is totally customizable/skinnable without writing code!"
Then again, I don't see any evil in designing block elements with tables. By block elements I mean where it doesn't make any sense to break apart the said element in different ... | null | CC BY-SA 2.5 | null | 2008-08-07T21:22:25.307 | 2008-08-07T21:22:25.307 | null | null | 227 | null |
5,334 | 2 | null | 5,260 | 3 | null | Okay, how about these? The difference between the approaches should speak for themselves.
Also, this is tested about as far as I can throw it. The warranty lasts until... now.
Hope it helps!
```
Module Module1
Public Function IsInBusinessHours(ByVal d As Date) As Boolean
Return Not (d.Hour < 8 OrElse d.... | null | CC BY-SA 2.5 | null | 2008-08-07T21:20:33.563 | 2008-08-07T21:20:33.563 | null | null | 414 | null |
5,339 | 2 | null | 5,323 | 4 | null | The is that Designers can Design and Web Developers can implement. This is especially the case in dynamic web applications where you do not want your Designers to mess around in your Source Code.
Now, while there are templating engines, Designers apparantly just love to go crazy and CSS allows to pull a lot more stun... | null | CC BY-SA 2.5 | null | 2008-08-07T21:23:55.663 | 2008-08-07T21:23:55.663 | null | null | 91 | null |
5,328 | 1 | 5,351 | null | 47 | 11,712 | So, in Java, the first line of your constructor HAS to be a call to super... be it implicitly calling super(), or explicitly calling another constructor. What I want to know is, why can't I put a try block around that?
My specific case is that I have a mock class for a test. There is no default constructor, but I wa... | Why can't I use a try block around my super() call? | CC BY-SA 3.0 | 0 | 2008-08-07T21:17:56.813 | 2019-06-27T15:18:32.357 | 2014-11-06T01:45:28.287 | 1,345,224 | 122 | [
"java",
"exception",
"mocking",
"try-catch"
] |
5,331 | 2 | null | 5,323 | 8 | null | I'm of the thought that CSS layout with as few tables as possible is cleaner and better, but I agree that sometimes you just gotta use a table.
Business-wise, it's generally "what's going to get it done the fastest and most reliable way." In my experience, using a few tables generally falls into that category.
I have... | null | CC BY-SA 2.5 | null | 2008-08-07T21:18:49.977 | 2008-08-07T21:32:15.363 | 2008-08-07T21:32:15.363 | 357 | 357 | null |
5,341 | 2 | null | 5,323 | 6 | null | Keep your layout and your content separate allows you to redesign or make tweaks and changes to your site easily. It may take a bit longer up front, but . A css friendly site with clear separation between content and design is best over the course of maintenance.
| null | CC BY-SA 2.5 | null | 2008-08-07T21:25:07.860 | 2008-08-07T21:25:07.860 | null | null | 92 | null |
5,347 | 2 | null | 5,329 | 0 | null | Is my assumption incorrect then that change requests should be generated from bugs? I'm confused because I don't think all bugs should be automatically approved for implementation -- they may be trivial and at least in our case will go through the same review process as a change request before being assigned to a deve... | null | CC BY-SA 2.5 | null | 2008-08-07T21:26:59.477 | 2008-08-07T21:26:59.477 | null | null | 327 | null |
5,345 | 2 | null | 5,323 | 8 | null | Using semantic HTML design is one of those things where you don't know what you're missing unless you make a practice of it. I've worked on several sites where the site was restyled after the fact with little or no impact to the server-side code.
Restyling sites is a very common request, something that I've noticed mo... | null | CC BY-SA 2.5 | null | 2008-08-07T21:26:41.553 | 2008-08-07T21:26:41.553 | null | null | 5 | null |
5,352 | 2 | null | 3,667 | 3 | null | Three branches just sounds like extra work.
Environmental differences can be handled by having different versions of the relevant files in the trunk. i.e. database.yml & database.yml.prod. The deployment process should be environmentally aware and simply copy the per-environment files over the default ones.
| null | CC BY-SA 3.0 | null | 2008-08-07T21:35:29.117 | 2017-10-10T23:21:30.080 | 2017-10-10T23:21:30.080 | 59,087 | 608 | null |
5,355 | 2 | null | 5,323 | 0 | null | :: nods at palmsey and Jon Galloway ::
I agree with the maintainability factor. It does take me a bit longer to get my initial layouts done (since I'm still a jedi apprentice in the CSS arts) but doing a complete revamp of a 15 page web site just by updating 1 file is heaven.
| null | CC BY-SA 2.5 | null | 2008-08-07T21:39:06.740 | 2008-08-07T21:39:06.740 | null | null | 71 | null |
5,356 | 2 | null | 5,242 | 1 | null | Use high contrast color combos; Black text on white background is the best example of a high contrast combo.
A bad combo is green text on red background. It's horrible for color blind people (like myself).
See what your site looks like to a color blind person: [colorfilter.wickline.org](http://colorfilter.wickline.or... | null | CC BY-SA 2.5 | null | 2008-08-07T21:41:03.770 | 2008-08-07T21:41:03.770 | null | null | 357 | null |
5,368 | 2 | null | 5,242 | 0 | null | As for desktop applications: Whatever you do, do not use hand-picked colors. Stick with the named system colors such as "Window Background", "Menu Text", etc. Otherwise, people relying on OS accessibility features will be locked with your color choices (unable to choose a high-contrast theme, for instance) and to peopl... | null | CC BY-SA 2.5 | null | 2008-08-07T21:49:13.020 | 2008-08-07T21:49:13.020 | null | null | 227 | null |
5,351 | 2 | null | 5,328 | 18 | null | Unfortunately, compilers can't work on theoretical principles, and even though you may know that it is safe in your case, if they allowed it, it would have to be safe for all cases.
In other words, the compiler isn't stopping just you, it's stopping everyone, including all those that don't know that it is unsafe and n... | null | CC BY-SA 2.5 | null | 2008-08-07T21:32:34.367 | 2008-08-07T21:32:34.367 | null | null | 267 | null |
5,354 | 2 | null | 5,242 | 2 | null | For web UI, I'm going to go out on a limb here and say that the most important color in web design is white, or "light". This is the color on top of which you place dense tracts of content.
Dark text, light background, always, when it comes to your primary content areas.
And the most important rule in layouting is wh... | null | CC BY-SA 2.5 | null | 2008-08-07T21:37:50.813 | 2008-08-07T21:37:50.813 | null | null | null | null |
5,349 | 1 | 6,192 | null | 8 | 2,803 | Why is there a hardcoded chunk limit (.5 meg after compression) in [memcached](http://memcached.org/)? Has anyone recompiled theirs to up it? I know I should not be sending big chunks like that around, but these extra heavy chunks happen for me from time to time and wreak havoc.
| Memcached chunk limit | CC BY-SA 3.0 | 0 | 2008-08-07T21:31:59.187 | 2012-04-25T16:37:11.850 | 2012-04-25T16:37:11.850 | 1,332,690 | 556 | [
"membership"
] |
5,357 | 2 | null | 5,328 | 1 | null | I don't know how Java is implemented internally, but if the constructor of the superclass throws an exception, then there isn't a instance of the class you extend. It would be impossible to call the `toString()` or `equals()` methods, for example, since they are inherited in most cases.
Java may allow a try/catch aro... | null | CC BY-SA 3.0 | null | 2008-08-07T21:41:59.917 | 2011-11-08T19:14:00.590 | 2011-11-08T19:14:00.590 | 44,390 | 518 | null |
5,372 | 2 | null | 5,269 | 1 | null | > What is a good example of when to use the bitwise operator instead of the "short-circuited boolean"?
Suppose you have flags, say for file attributes. Suppose you've defined READ as 4, WRITE as 2, and EXEC as 1. In binary, that's:
```
READ 0100
WRITE 0010
EXEC 0001
```
Each flag has one bit set, and each one... | null | CC BY-SA 2.5 | null | 2008-08-07T21:51:00.757 | 2008-08-08T14:05:12.717 | 2008-08-08T14:05:12.717 | 311 | 311 | null |
5,382 | 2 | null | 5,269 | 0 | null | You use & when you specifically want to evaluate all the sub-expressions, most likely because they have side-effects you want, even though the final result will be and thus not execute your part of your -statement.
Note that & and | operates for both bitwise masks and boolean values and is not just for bitwise opera... | null | CC BY-SA 2.5 | null | 2008-08-07T22:01:24.493 | 2008-08-07T22:01:24.493 | null | null | 267 | null |
5,395 | 2 | null | 5,323 | 0 | null | Some additional reasons why this is good practice:
- -
| null | CC BY-SA 2.5 | null | 2008-08-07T22:09:54.400 | 2008-08-07T22:09:54.400 | null | null | 636 | null |
5,360 | 2 | null | 5,328 | 1 | null | I can't presume to have a deep understanding of Java internals, but it is my understanding that, when a compiler needs to instantiate a derived class, it has to first create the base (and its base before that(...)) and then slap on the extensions made in the subclass.
So it is not even the danger of uninited variable... | null | CC BY-SA 2.5 | null | 2008-08-07T21:43:37.463 | 2008-08-07T21:52:45.557 | 2008-08-07T21:52:45.557 | 227 | 227 | null |
5,392 | 2 | null | 5,226 | 1 | null | I see your point. OK, after reading through that article, why don't you try something like this?
```
<blockquote
cite="http://yoursite/comments/feederscript.php?id=commentid"
title="<?php echo Name . " - " . Date ?>" >
<?php echo Comment ?>
</blockquote>
```
with some snazzy CSS to make it look nice.
... | null | CC BY-SA 2.5 | null | 2008-08-07T22:07:16.400 | 2008-08-07T22:07:16.400 | null | null | 50 | null |
5,376 | 2 | null | 5,329 | 2 | null | Generally, though I can't speak for CMM, change requests and bugs are handled and considered differently because they typically refer to different pieces of your application lifecycle.
A bug is a defect in your program implementation. For instance, if you design your program to be able to add two numbers and give the ... | null | CC BY-SA 2.5 | null | 2008-08-07T21:54:48.470 | 2008-08-07T21:54:48.470 | null | null | 267 | null |
5,374 | 1 | 5,469 | null | 16 | 20,086 | I would have thought this would be an easy one to Google, but I've been unsucessful.
I want to assign a variable the value out of an attribute (easy so far) then use that variable to select another node based on the value of that attribute.
Example:
```
<xsl:variable name="myId" select="@id" />
<xsl value-of select=... | How do you use a variable in xsl when trying to select a node? | CC BY-SA 3.0 | 0 | 2008-08-07T21:53:58.440 | 2013-08-14T23:28:46.837 | 2013-07-04T12:24:18.877 | 1,584,286 | 312 | [
"xslt"
] |
5,384 | 2 | null | 5,269 | 1 | null | When things are all in-line, they're executed left-to-right.
When things are nested, they're executed inner-to-outer. This may seem confusing as usually what's "innermost" is on the right-hand side of the line, so it seems like it's going backwards...
For example
```
a = Foo( 5, GetSummary( "Orion", GetAddress("Orio... | null | CC BY-SA 2.5 | null | 2008-08-07T22:02:36.583 | 2008-08-07T22:02:36.583 | null | null | 234 | null |
5,378 | 2 | null | 5,269 | 5 | null | @shsteimer
> The concept modesty is referring to is operator overloading. in the statement:
...
A is evaluated first, if it evaluates to false, B is never evaluated. The same applies to
That's not operator overloading. Operator overloading is the term given for letting you define custom behaviour for operators, ... | null | CC BY-SA 2.5 | null | 2008-08-07T21:58:21.723 | 2008-08-07T21:58:21.723 | null | null | 234 | null |
5,415 | 1 | 73,281 | null | 89 | 138,374 | I have a binary file that I have to parse and I'm using Python. Is there a way to take 4 bytes and convert it to a single precision floating point number?
| Convert Bytes to Floating Point Numbers? | CC BY-SA 4.0 | 0 | 2008-08-07T22:24:27.740 | 2022-08-19T17:49:45.100 | 2020-06-27T15:49:23.990 | 355,230 | 680 | [
"python",
"floating-point"
] |
5,400 | 2 | null | 3,088 | 1 | null | I think that once he has the basics (variables, loops, etc) down you should try to help him find something specific that he is interested in and help him learn the necessities to make it happen. I know that I am much more inclined and motivated to do something if it's of interest to me. Also, make sure to let him str... | null | CC BY-SA 2.5 | null | 2008-08-07T22:12:54.220 | 2008-08-07T22:12:54.220 | null | null | 622 | null |
5,402 | 2 | null | 5,323 | 6 | null | In my experience, the only time this really adds business value is when there is a need for 100% support for accessibility. When you have users who are visually impaired and/or use screenreaders to view your site, you need to make sure that your site is compliant to accessibility standards.
A menu should be a list ... | null | CC BY-SA 2.5 | null | 2008-08-07T22:16:25.337 | 2008-12-04T08:42:07.813 | 2008-12-04T08:42:07.813 | 137 | 611 | null |
5,412 | 2 | null | 5,269 | 8 | null | I realise this question has already been answered, but I'd like to throw in another bit of information which is related to the topic.
In languages, like C++, where you can actually overload the behaviour of the && and || operators, it is highly recommended that you . This is because when you overload this behaviour, y... | null | CC BY-SA 2.5 | null | 2008-08-07T22:23:56.057 | 2008-08-07T22:23:56.057 | null | null | 611 | null |
5,396 | 1 | 5,481 | null | 8 | 1,410 | I've been developing a site using ASP.NET MVC, and have decided to use the new SQL Server 2008 `FILESTREAM` facility to store files 'within' the database rather than as separate entities. While initially working within VS2008 (using a trusted connection to the database), everything was fine and dandy. Issues arose, h... | SQL Server 2008 FileStream on a Web Server | CC BY-SA 3.0 | null | 2008-08-07T22:10:05.663 | 2014-11-25T16:52:46.813 | 2014-11-25T16:52:46.813 | 2,641,576 | 691 | [
"sql-server",
"sql-server-2008",
"iis"
] |
5,413 | 2 | null | 2,750 | 1 | null | I like to implement [IDataErrorInfo](http://msdn.microsoft.com/en-us/library/system.componentmodel.idataerrorinfo.aspx) and put my validation logic in its Error and this[columnName] properties. That way if you want to check programmatically whether there's an error you can simply test either of those properties in code... | null | CC BY-SA 2.5 | null | 2008-08-07T22:24:01.610 | 2008-08-07T22:24:01.610 | null | null | 615 | null |
5,423 | 2 | null | 5,323 | 6 | null | One other thing I just remembered, you can assign a different stylesheet to a page for printing vs. display.
In addition to your normal stylesheet definition, you can add the following tag
```
<link rel="stylesheet" type="text/css" media="print" href="PrintStyle.css" />
```
Which will render the document according ... | null | CC BY-SA 2.5 | null | 2008-08-07T22:29:08.480 | 2008-08-07T22:29:08.480 | null | null | 71 | null |
5,419 | 1 | 5,430 | null | 170 | 127,824 | When I try to print a Unicode string in a Windows console, I get an error .
`UnicodeEncodeError: 'charmap' codec can't encode character ....`
I assume this is because the Windows console does not accept Unicode-only characters. What's the best way around this?
Is there any way I can make Python automatically print a `?... | Python, Unicode, and the Windows console | CC BY-SA 4.0 | 0 | 2008-08-07T22:26:58.063 | 2022-11-30T08:50:47.240 | 2021-02-09T12:22:55.243 | 14,537,225 | 207 | [
"python",
"unicode"
] |
5,421 | 2 | null | 5,323 | 0 | null | > > When a screenreader reads a page and sees a table, it'll tell the user it's a table. Hence, if you use a table for layout, it gets very confusing because the user doesn't know that the content of the table is actually the article instead of some other tabular data
This is actually not true; screen readers like JAW... | null | CC BY-SA 2.5 | null | 2008-08-07T22:28:52.363 | 2008-08-07T22:28:52.363 | null | null | 137 | null |
5,428 | 1 | 5,439 | null | 34 | 12,314 | Is it worth learning the convention or is it a bane to readability and maintainability?
| Do people use the Hungarian Naming Conventions in the real world? | CC BY-SA 2.5 | 0 | 2008-08-07T22:31:13.653 | 2014-04-30T08:07:02.923 | 2009-09-03T01:59:24.277 | 90,002 | 659 | [
"conventions",
"hungarian-notation",
"self-documenting-code"
] |
5,429 | 2 | null | 5,323 | 6 | null | > > doing a complete revamp of a 15 page web site just by updating 1 file is heaven.
This is true. Unfortunately, having one CSS file used by 15,000 complex and widely differing pages is your worst nightmare come true. Change something - did it break a thousand pages? Who knows?
CSS is a double-edged sword on big sit... | null | CC BY-SA 2.5 | null | 2008-08-07T22:31:17.337 | 2008-08-07T22:31:17.337 | null | null | 137 | null |
5,425 | 1 | 5,441 | null | 24 | 1,078 | I have a page that is generated which inserts an HTML comment near the top of the page. Inside the comment is a *nix-style command.
```
<!-- command --option value --option2 value2 --option3 -->
```
This comment breaks the page completely. What is wrong with the comment to cause this to happen, and why is this the... | HTML comments break down | CC BY-SA 2.5 | null | 2008-08-07T22:30:25.357 | 2021-04-26T05:03:30.320 | 2008-09-09T21:13:45.073 | -1 | 219 | [
"html",
"xml",
"comments",
"sgml"
] |
5,440 | 2 | null | 5,428 | 0 | null | I've been working for IBM for the past 6 months and I haven't seen it anywhere (thank god because I hate it.) I see either camelCase or c_style.
```
thisMethodIsPrettyCool()
this_method_is_pretty_cool()
```
| null | CC BY-SA 2.5 | null | 2008-08-07T22:39:04.137 | 2008-08-07T22:39:04.137 | null | null | 402 | null |
5,443 | 2 | null | 5,428 | 0 | null | It depends on your language and environment. As a rule I wouldn't use it, unless the development environment you're in makes it hard to find the type of the variable.
There's also two different types of Hungarian notation. See Joel's article. I can't find it (his names don't exactly make them easy to find), anyone hav... | null | CC BY-SA 2.5 | null | 2008-08-07T22:43:19.963 | 2008-08-07T23:19:32.793 | 2008-08-07T23:19:32.793 | 233 | 233 | null |
5,441 | 2 | null | 5,425 | 27 | null | Comments in the [XML Spec from the w3.org](http://www.w3.org/TR/REC-xml/#sec-comments) :
> For compatibility, the string "--"
(double-hyphen) MUST NOT occur within
comments.
| null | CC BY-SA 3.0 | null | 2008-08-07T22:39:12.983 | 2012-09-06T11:27:22.647 | 2012-09-06T11:27:22.647 | 1,135,954 | 304 | null |
5,432 | 2 | null | 5,269 | 1 | null | I like Orion's responses. I'll add two things:
1. The left-to-right still applies first
2. The inner-to-outer to ensure that all arguments are resolved before calling the function
Say we have the following example:
```
a = Foo(5, GetSummary("Orion", GetAddress("Orion")),
GetSummary("Chris", GetAddress(... | null | CC BY-SA 2.5 | null | 2008-08-07T22:33:16.833 | 2008-08-07T22:33:16.833 | null | null | 13 | null |
5,453 | 2 | null | 4,677 | 10 | null | Actually, the above answer was not completely correct.
```
require 'singleton'
class Example
include Singleton
end
```
You also need to include the require 'singleton' statement.
| null | CC BY-SA 2.5 | null | 2008-08-07T22:52:25.653 | 2008-08-07T22:52:25.653 | null | null | 25 | null |
5,451 | 2 | null | 5,428 | 11 | null | I think hungarian notation is an interesting footnote along the 'path' to more readable code, and if done properly, is preferable to not-doing it.
In saying that though, I'd rather do away with it, and instead of this:
```
int vBox = aBottom * lVerticalSide;
```
write this:
```
int boxVolume = bottomArea * vertica... | null | CC BY-SA 2.5 | null | 2008-08-07T22:52:06.873 | 2008-08-07T22:52:06.873 | null | null | 234 | null |
5,430 | 2 | null | 5,419 | 39 | null | This answer is sort of outdated (from 2008). Please use the solution below with care!!
---
Here is a page that details the problem and a solution (search the page for the text ):
[PrintFails - Python Wiki](http://wiki.python.org/moin/PrintFails)
Here's a code excerpt from that page:
```
$ python -c 'import sys... | null | CC BY-SA 3.0 | null | 2008-08-07T22:32:23.510 | 2016-01-04T17:18:53.903 | 2016-01-04T17:18:53.903 | 610,569 | 267 | null |
5,417 | 2 | null | 5,323 | 9 | null | In the real world, your chances of taking one design and totally reskinning it without touching the markup are pretty remote. It's fine for blogs and concocted demos like the csszengarden, but it's a bogus benefit on any site with a moderately complex design, really. Using a CMS is far more important.
DIVs plus CSS !=... | null | CC BY-SA 2.5 | null | 2008-08-07T22:25:25.443 | 2008-08-07T22:25:25.443 | null | null | 137 | null |
5,445 | 2 | null | 5,428 | 9 | null | It is pointless (and distracting) but is in relatively heavy use at my company, at least for types like ints, strings, booleans, and doubles.
Things like `sValue`, `iCount`, `dAmount` or `fAmount`, and `bFlag` are everywhere.
Once upon a time there was a good reason for this convention. Now, it is a cancer.
| null | CC BY-SA 2.5 | null | 2008-08-07T22:45:18.227 | 2008-08-07T22:45:18.227 | null | null | 92 | null |
5,403 | 2 | null | 5,329 | 13 | null | @Luke
I don't disagree with you, but this difference is typically the explanation given for why there is two different processes available for handling the two types of issues.
I'd say that if the color of the home page was originally designed to be red, and for some reason it is blue, that's easily a quick fix and d... | null | CC BY-SA 2.5 | null | 2008-08-07T22:17:29.877 | 2008-08-07T22:17:29.877 | null | null | 267 | null |
5,439 | 2 | null | 5,428 | 59 | null | Considering that most people that use is following the misunderstood version of it, I'd say it's pretty pointless.
If you want to use the original definition of it, it might make more sense, but other than that it is mostly syntactic sugar.
If you read the [Wikipedia article](http://en.wikipedia.org/wiki/Hungarian_n... | null | CC BY-SA 3.0 | null | 2008-08-07T22:39:00.533 | 2014-04-30T08:07:02.923 | 2014-04-30T08:07:02.923 | 267 | 267 | null |