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 ⌀ |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
33,853 | 1 | null | null | 4 | 1,665 | i am planning a simple, dual-language website and i'd like to use a .net based cms but i can't find anything suitable. i have experience with dotnetnuke and sharepoint but neither fit the bill - dotnetnuke does not do dynamic site elements multi-lingually & sharepoint is a monster PITA no matter what angle you look at... | .net multilingual cms | CC BY-SA 2.5 | 0 | 2008-08-29T02:30:05.163 | 2014-08-27T20:55:43.357 | null | null | 3,142 | [
".net",
"content-management-system",
"multilingual"
] |
33,856 | 2 | null | 33,853 | 2 | null | Have you looked at [Umbraco](http://www.umbraco.org/)? I have worked with it to try out for clients and it looks really good.
I would look to them as a possible solution.
| null | CC BY-SA 2.5 | null | 2008-08-29T02:32:15.297 | 2008-08-29T02:32:15.297 | null | null | 2,305 | null |
33,854 | 2 | null | 33,837 | 3 | null | Its a bug in the rendering engine. I run into it all the time. One potential way to solve it is to hide and show the div whenever you change the content (that in turn changes the height):
```
var divCol = document.getElementById('column');
divCol.style.display = 'none';
divCol.style.display = 'block';
```
Hopefully ... | null | CC BY-SA 2.5 | null | 2008-08-29T02:30:41.463 | 2008-08-29T02:30:41.463 | null | null | 653 | null |
33,847 | 2 | null | 33,843 | 9 | null | Use a source control system — Subversion, Perforce, Git, Mercurial, Bazaar, etc. — so you're never editing code on a shared server. Instead you should be editing a local work area and committing changes to a repository located on the network.
Also, convince your company to adapt their policy such that company code is... | null | CC BY-SA 2.5 | null | 2008-08-29T02:25:17.280 | 2008-08-29T03:05:15.577 | 2008-08-29T03:05:15.593 | 714 | 714 | null |
33,857 | 2 | null | 33,852 | 5 | null | If you decrement a signed number with a value of 0, it becomes negative and you can easily test for this. If you decrement an unsigned number with a value of 0, it underflows and becomes the maximum value for the type - somewhat more difficult to check for.
| null | CC BY-SA 2.5 | null | 2008-08-29T02:32:37.277 | 2008-08-29T02:32:37.277 | null | null | 811 | null |
33,855 | 2 | null | 33,495 | 6 | null | Ultimately I want my data stored in some reasonable format.
If that data started as XML and I want to retrieve it/them using XQuery, without the XML layer, I have to write a of code to do the XQuery by myself, and perhaps even worse to know my XML well enough to be able to have a reasonable storage system for it.
Co... | null | CC BY-SA 2.5 | null | 2008-08-29T02:30:51.150 | 2008-08-29T02:30:51.150 | null | null | 3,529 | null |
33,852 | 1 | 34,108 | null | 7 | 969 | Most of time we represent concepts which can never be less than 0. For example to declare length, we write:
```
int length;
```
The name expresses its purpose well but you can assign negative values to it. It seems that for some situations, you can represent your intent more clearly by writing it this way instead:
... | Using Unsigned Primitive Types | CC BY-SA 2.5 | null | 2008-08-29T02:28:57.223 | 2015-12-20T22:10:33.217 | 2015-12-20T22:10:33.217 | 3,618,581 | 718 | [
"c#",
"primitive-types"
] |
33,858 | 2 | null | 33,852 | 5 | null | Your second point is the most important. Generally you should just use `int` since that's a pretty good "catch-all" for integer values. I would only use `uint` if you absolutely need the ability to count higher than `int`, but without using the extra memory `long` requires (it's not much more memory, so don't be cheap ... | null | CC BY-SA 2.5 | null | 2008-08-29T02:33:04.030 | 2008-08-29T02:33:04.030 | null | null | 392 | null |
33,859 | 2 | null | 33,822 | 1 | null | Use Powershell! Built in cmdlets for managing processes. [Examples here](http://blogs.msdn.com/powershell/archive/2007/01/16/managing-processes-in-powershell.aspx) (hard way), [here](http://www.computerperformance.co.uk/powershell/powershell_process.htm)(built in) and [here](http://www.computerperformance.co.uk/power... | null | CC BY-SA 2.5 | null | 2008-08-29T02:33:07.743 | 2008-08-29T02:33:07.743 | null | null | 1,635 | null |
33,865 | 2 | null | 33,852 | 2 | null | I think the subtle use of uint vs. int will cause confusing with developers unless it was written into developer guidelines for the company.
If the length, for example, can't be less than zero then it should be expressed clearly in the business logic so future developers can read the code and know the true intent.
Ju... | null | CC BY-SA 2.5 | null | 2008-08-29T02:34:59.253 | 2008-08-29T02:34:59.253 | null | null | 2,305 | null |
33,868 | 2 | null | 33,829 | 0 | null | For the specific example of Runtime.exec there is a method on the SecurityManager class checkExec(String cmd) that will throw an exception that can be caught to determine if the necessary command can be executed. For more information see the javadoc for Runtime.exec and SecurityManager.checkExec.
The more general cas... | null | CC BY-SA 2.5 | null | 2008-08-29T02:37:05.067 | 2008-08-29T02:37:05.067 | null | null | 3,535 | null |
33,874 | 2 | null | 33,836 | 3 | null | What makes you think that it is not possible to remove a revision from Subversion? The solution given to your other question (`svndumpfilter`) does exactly that (see the parameters `--drop-empty-revs` and `--renumber-revs`)! And when the revision is gone, there's obviously no way to get at the revision history, because... | null | CC BY-SA 2.5 | null | 2008-08-29T02:42:13.340 | 2008-08-29T02:42:13.340 | null | null | 2,988 | null |
33,875 | 2 | null | 33,814 | 0 | null | Why don't you read in a line, and set it to a string, then check the string for tag openings and closings, If a tag spans more then one line add the next line to the string and move the part before the opening brace to your processed string. Then just parse through the entire file doing this. Its not beautiful but it s... | null | CC BY-SA 2.5 | null | 2008-08-29T02:42:35.570 | 2008-08-29T02:42:35.570 | null | null | 1,925 | null |
33,862 | 2 | null | 33,836 | 2 | null | With a simple
```
svn log -v [folder]
```
you can browse quickly the adding and deletion.
```
------------------------------------------------------------------------
r14 | kame | 2008-08-29 04:23:43 +0200 (ven., 29 aoû2008) | 1 line
Chemins modifié :
A /a.txt
Readded a
----------------------------------------... | null | CC BY-SA 2.5 | null | 2008-08-29T02:33:39.677 | 2008-08-29T02:43:21.213 | 2008-08-29T02:43:21.213 | 3,069 | 3,069 | null |
33,869 | 2 | null | 33,048 | 15 | null | Disclaimer: I've never actually done this on a production site, but it looks like a reasonable way would be to use mock objects, `should_receive` and friends, and invoke methods on the observer directly
Given the following model and observer:
```
class Person < ActiveRecord::Base
def set_status( new_status )
# ... | null | CC BY-SA 3.0 | null | 2008-08-29T02:39:33.360 | 2013-01-10T00:09:33.830 | 2013-01-10T00:09:33.830 | 234 | 234 | null |
33,870 | 2 | null | 33,761 | 1 | null | Mark has the best implementation of DeriveParameters. As he said, make sure you cache like in [this tutorial](http://davidhayden.com/blog/dave/archive/2006/11/03/CachingStoredProcedureParameters.aspx).
However, I think this is a dangerous way of solving your original problem of database sproc versioning. If you are go... | null | CC BY-SA 2.5 | null | 2008-08-29T02:39:41.737 | 2008-08-29T02:39:41.737 | null | null | 1,690 | null |
33,879 | 2 | null | 33,860 | 3 | null | give your form an `id`.
then
```
document.getElementById('formid').submit();
```
If you are loading Javascript into a `div` via `innerHTML`, it won't run...just FYI.
| null | CC BY-SA 3.0 | null | 2008-08-29T02:43:46.877 | 2016-02-08T14:46:59.707 | 2016-02-08T14:46:59.707 | 92,701 | 1,965 | null |
33,880 | 2 | null | 33,739 | 0 | null | For the second part of your question ("jsp files placed under web-inf won't be directly accessible by user") that is correct. To allow users to access JSP files in the WEB-INF folder servlet and servlet-mapping entries need to be made in the web.xml file for each JSP page.
| null | CC BY-SA 2.5 | null | 2008-08-29T02:44:07.717 | 2008-08-29T02:44:07.717 | null | null | 3,535 | null |
33,881 | 1 | 316,867 | null | 1 | 771 | I always run into the same problem when creating web pages. When I add a font that is larger then about 16-18px it looks terrible. Its jagged, and pixelated. I have tried using different fonts and weights, however I haven't had much luck there.
Note: Its only in windows that it is like this. Mainly in Opera and FF al... | Font rendering for web pages | CC BY-SA 2.5 | null | 2008-08-29T02:44:44.643 | 2015-11-24T08:46:59.407 | 2008-08-31T00:33:02.793 | 305 | 1,925 | [
"fonts",
"typography"
] |
33,885 | 2 | null | 33,881 | 0 | null | Enabling anti-aliasing should solve the display problem.
| null | CC BY-SA 2.5 | null | 2008-08-29T02:46:29.677 | 2008-08-29T02:46:29.677 | null | null | 3,535 | null |
33,886 | 2 | null | 33,881 | 0 | null | Aside from anti-aliasing, try enabling clear type.
| null | CC BY-SA 2.5 | null | 2008-08-29T02:47:10.410 | 2008-08-29T02:47:10.410 | null | null | 1,414 | null |
33,891 | 2 | null | 33,843 | 0 | null | Short answer: you can do no trick. CIFS is really geared towards LAN with a reasonably calm trafic, so you have zero chance to not suffer intermittent lag accessing a share through a VPN. The editor at some point needs to access the file in blocking IO, because it makes no real sense to do otherwise.
You could switch ... | null | CC BY-SA 2.5 | null | 2008-08-29T02:53:09.303 | 2008-08-29T02:53:09.303 | null | null | 3,069 | null |
33,878 | 2 | null | 33,836 | 2 | null | you can
Unfortunately (for you but perhaps not for most folks) , the revision history for a deleted file is still there - it's just a little harder to get at.
Here's an example:
```
$ touch one
$ svn add one
$ svn ci -m "Added file one"
$ date >> one
$ svn ci -m "Updated file one"
$ date >> one
$ svn ci -m "Upda... | null | CC BY-SA 2.5 | null | 2008-08-29T02:43:37.080 | 2008-08-29T02:43:37.080 | null | null | 2,994 | null |
33,890 | 2 | null | 29,802 | 4 | null | I think what you are looking for is something like this: [How to auto-increment assembly version using a custom MSBuild task](http://weblogs.asp.net/bradleyb/archive/2005/12/02/432150.aspx). It's a little old but I think it will work.
| null | CC BY-SA 2.5 | null | 2008-08-29T02:52:51.347 | 2008-08-29T02:52:51.347 | null | null | 1,767 | null |
33,894 | 2 | null | 17,175 | 0 | null | Dropdown boxes and a more simple way to highlight text in a text box!
That's what I would want right now anyway.
| null | CC BY-SA 2.5 | null | 2008-08-29T02:53:54.340 | 2008-08-29T02:53:54.340 | null | null | 3,537 | null |
33,884 | 2 | null | 33,449 | 26 | null | Sure you , but this is a terrible idea.
As web-service calls may take arbitrary amounts of time, and randomly fail, depending on how many games of counterstrike are being played on your network at the time, you can't tell how long this is going to take.
At the bare minimum you're looking at probably half a second b... | null | CC BY-SA 3.0 | null | 2008-08-29T02:46:26.557 | 2012-04-01T20:33:42.360 | 2012-04-01T20:33:42.360 | 1,219,121 | 234 | null |
33,887 | 2 | null | 33,529 | 9 | null | If you want to do it in code, use the [System.Web.HttpCookie.HttpOnly](http://msdn.microsoft.com/en-us/library/system.web.httpcookie.httponly.aspx) property.
This is directly from the MSDN docs:
```
// Create a new HttpCookie.
HttpCookie myHttpCookie = new HttpCookie("LastVisit", DateTime.Now.ToString());
// By defau... | null | CC BY-SA 2.5 | null | 2008-08-29T02:48:00.157 | 2008-08-29T02:48:00.157 | null | null | 1,690 | null |
33,893 | 1 | 33,919 | null | 10 | 845 | In my (PHP) web app, I have a part of my site that keeps a history of recent searches. The most recent queries get shown in a side box. If the query text is too long, I truncate it and show ellipses. Eg: "My very long query is..."
Currently, I truncate after a certain number of characters. Since the font is not monoty... | Determining width of a printed string by a webapp | CC BY-SA 4.0 | 0 | 2008-08-29T02:53:44.717 | 2019-01-18T11:06:58.403 | 2019-01-18T11:06:58.403 | 567,854 | 356 | [
"php",
"javascript",
"css"
] |
33,901 | 1 | 33,916 | null | 64 | 46,500 | I'm looking for a library to handle [iCalendar](http://en.wikipedia.org/wiki/ICalendar) data in Java.
Open source, well-documented implementations with a good object model are preferred. iCal parsing capabilities are less important to me, but still nice to have.
Does anyone have any recommendations?
| Best iCalendar library for Java? | CC BY-SA 2.5 | 0 | 2008-08-29T03:06:08.447 | 2015-11-28T00:36:09.937 | 2008-08-31T03:36:36.830 | 2,783 | 2,783 | [
"java",
"icalendar"
] |
33,910 | 2 | null | 33,813 | 15 | null | Holding down option while dragging allows you to highlight a block of text. If you type while the highlight is active, your keystrokes appear on multiple lines.
| null | CC BY-SA 2.5 | null | 2008-08-29T03:18:05.797 | 2008-08-29T03:18:05.797 | null | null | 3,499 | null |
33,903 | 1 | 33,922 | null | 2 | 3,056 | I currently work with an Oracle database and we use stored procedures for all our SQL queries. The problem I have is that we do not really having a coding standard for our packages. So what happens is that every developer has a different style (or in some cases no sense of style) in how they format there packages. Maki... | Formatting Stored Procedures | CC BY-SA 2.5 | null | 2008-08-29T03:08:32.497 | 2015-12-18T06:34:13.233 | 2015-12-18T06:34:13.233 | 3,989,608 | 3,340 | [
"oracle",
"plsql"
] |
33,899 | 2 | null | 33,893 | 2 | null | > Does CSS have a way?
No
> Does PHP?
No
-
To do that you'd have to get the font metrics for each character, and apply them to all your letters in your string. While you could do this by using a drawing/rendering library like ImageMagick on the server, it wouldn't really work because different browser on different... | null | CC BY-SA 2.5 | null | 2008-08-29T03:05:07.667 | 2008-08-29T03:05:07.667 | null | null | 234 | null |
33,904 | 2 | null | 33,484 | 4 | null | The link you posted uses mjt, a javascript framework designed for Freebase.
The Query they use.
```
mjt.freebase.MqlRead([{
limit: 100,
id:qid,
/* allow fuzzy matches in the value for more results... */
/* 'q:name': {'value~=': qname, value:null, lang: '/lang/'+qlang}, */
'q:name': {value: q... | null | CC BY-SA 2.5 | null | 2008-08-29T03:10:11.773 | 2008-08-29T03:10:11.773 | null | null | 3,415 | null |
33,860 | 1 | 33,941 | null | 7 | 14,810 | In Ruby on Rails, I'm attempting to update the `innerHTML` of a div tag using the `form_remote_tag` helper. This update happens whenever an associated select tag receives an onchange event. The problem is, `<select onchange="this.form.submit();">`; doesn't work. Nor does `document.forms[0].submit()`. The only way t... | Is it possible to call Javascript's onsubmit event programmatically on a form? | CC BY-SA 3.0 | null | 2008-08-29T02:33:21.083 | 2017-10-11T03:13:00.650 | 2017-10-11T03:13:00.650 | 1,033,581 | 3,499 | [
"javascript",
"ruby-on-rails",
"ruby"
] |
33,906 | 2 | null | 27,743 | 5 | null | Look at using monit. You can dynamically restart mongrel based on memory or CPU usage. Here's a line from a config file that I wrote for a client of mine.
```
check process mongrel-8000 with pidfile /var/www/apps/fooapp/current/tmp/pids/mongrel.8000.pid
start program = "/usr/local/bin/mongrel_rails cluster::st... | null | CC BY-SA 2.5 | null | 2008-08-29T03:12:19.820 | 2008-08-29T03:12:19.820 | null | null | 3,499 | null |
33,909 | 1 | 33,913 | null | 6 | 10,970 | Today I was listening to the [Hanselminutes show about .NET 3.5 SP1...What's inside](http://www.hanselminutes.com/default.aspx?showID=145), and they twice mentioned the Office 2007-like Ribbon control that is included in Visual Studio 2008 Service Pack 1.
I am very interested about this, as I was previously looking ... | Ribbon Toolbar and Visual Studio 2008 Service Pack 1 | CC BY-SA 2.5 | 0 | 2008-08-29T03:16:22.553 | 2010-02-01T22:14:56.067 | 2008-11-02T02:15:10.623 | null | 1,300 | [
"wpf",
"visual-studio-2008",
"user-interface",
".net-3.5",
"ribbon"
] |
33,900 | 2 | null | 32,333 | 1 | null | "Educate your co-workers, or get better co-workers" works great for a small software startup, and it works great for the big guns like Google and Amazon. It's ridiculous to think that every lowly developer contracted in for some small medical charts application in a doctor's office in a minor city.
I'm not saying we ... | null | CC BY-SA 2.5 | null | 2008-08-29T03:05:27.557 | 2008-08-29T03:05:27.557 | null | null | 1,190 | null |
33,912 | 2 | null | 33,822 | 5 | null | I'm assuming as a developer, you have some degree of administrative control over your machine. If so, from the command line, run msconfig.exe. You can remove many processes from even starting, thereby eliminating the need to kill them with the above mentioned solutions.
| null | CC BY-SA 2.5 | null | 2008-08-29T03:18:58.897 | 2008-08-29T03:18:58.897 | null | null | 2,470 | null |
33,918 | 2 | null | 33,909 | 4 | null | It was in VS 2008 as part of a C++/MFC update. I'm not sure about C#/WPF.
| null | CC BY-SA 2.5 | null | 2008-08-29T03:35:06.737 | 2008-08-29T03:35:06.737 | null | null | 3,114 | null |
33,917 | 2 | null | 33,853 | 3 | null | There is the [N2 CMS](http://n2cms.com/), which is pretty good. Also have a look at [cuyahoga](http://www.cuyahoga-project.org/)
| null | CC BY-SA 2.5 | null | 2008-08-29T03:34:44.197 | 2008-08-29T03:34:44.197 | null | null | 2,758 | null |
33,916 | 2 | null | 33,901 | 51 | null | I had limited success with [iCal4j](https://github.com/ical4j/ical4j) ([intro](http://ical4j.sourceforge.net/introduction.html)) on a project last year.
It seems to be a fairly popular choice for ical work in the java community.
If I remember correctly the API can be slightly confusing at first glance.
However It's ... | null | CC BY-SA 3.0 | null | 2008-08-29T03:33:26.103 | 2015-11-16T03:11:06.677 | 2015-11-16T03:11:06.677 | 1,363,613 | 3,415 | null |
33,920 | 2 | null | 33,822 | 5 | null | Get [Autoruns](http://technet.microsoft.com/en-us/sysinternals/bb963902.aspx) from Mark Russinovich, the Sysinternals guy that discovered the Sony Rootkit... Best software I've ever used for cleaning up things that get started automatically.
| null | CC BY-SA 2.5 | null | 2008-08-29T03:45:26.057 | 2008-08-29T03:45:26.057 | null | null | 3,114 | null |
33,913 | 2 | null | 33,909 | 4 | null | Yeah I did a double-take when I heard them say that too.
The ribbon control, along with a DatePicker and DataGrid, are being developed out of band [over here](http://www.codeplex.com/wpf) on CodePlex. I'm not sure why Carl and Scott were suggesting that it was part of the SP1 release.
[Vincent Sibal](http://blogs.msd... | null | CC BY-SA 2.5 | null | 2008-08-29T03:19:42.343 | 2008-08-29T03:19:42.343 | null | null | 615 | null |
33,921 | 2 | null | 33,465 | 4 | null | Procmail is how I do it. Here's an example where I actually process the text inside the email to archive it back to a MySQL database.
```
:0:
* ^(From).*test@example.com
{
:0 c
| php /var/www/app/process_email.php
}
```
| null | CC BY-SA 2.5 | null | 2008-08-29T03:46:01.983 | 2008-08-29T03:46:01.983 | null | null | 3,499 | null |
33,922 | 2 | null | 33,903 | 1 | null | - [VIM script](http://www.vim.org/scripts/script.php?script_id=492)- [Aqua Data studio](http://www.aquafold.com/)
| null | CC BY-SA 2.5 | null | 2008-08-29T03:47:47.410 | 2008-08-29T03:47:47.410 | null | null | 1,293 | null |
33,911 | 2 | null | 33,843 | 1 | null | If you are accessing the data from your personal computer, it is in your RAM, so we will assume that you just can't store it on your hard drive, floppy, USB stick, etc.
Your solution is a RAM drive. Copy the files you need to edit there using whatever method you prefer (I would suggest source control) and then you ca... | null | CC BY-SA 3.0 | null | 2008-08-29T03:18:36.077 | 2015-12-15T19:35:16.133 | 2015-12-15T19:35:16.133 | 3,393,505 | 255 | null |
33,927 | 2 | null | 33,853 | 0 | null | [BlogEngine](http://www.dotnetblogengine.net) is pretty good for a blogging platform with good multi-lingual support.
| null | CC BY-SA 2.5 | null | 2008-08-29T03:53:58.377 | 2008-08-29T03:53:58.377 | null | null | 225 | null |
33,924 | 2 | null | 33,923 | 12 | null | I'm not a Lisp programmer, but I think [this](http://en.wikipedia.org/wiki/Tail_recursion) will help.
Basically it's a style of programming such that the recursive call is the last thing you do.
| null | CC BY-SA 2.5 | null | 2008-08-29T03:50:50.943 | 2008-08-29T03:50:50.943 | null | null | 615 | null |
33,923 | 1 | 37,010 | null | 2,008 | 582,201 | Whilst starting to learn lisp, I've come across the term . What does it mean exactly?
| What is tail recursion? | CC BY-SA 3.0 | 0 | 2008-08-29T03:48:03.790 | 2022-03-22T03:35:47.303 | 2016-10-11T02:32:07.927 | 1,432,051 | 2,045 | [
"algorithm",
"language-agnostic",
"functional-programming",
"recursion",
"tail-recursion"
] |
33,928 | 2 | null | 33,923 | 89 | null | Using regular recursion, each recursive call pushes another entry onto the call stack. When the recursion is completed, the app then has to pop each entry off all the way back down.
With tail recursion, depending on language the compiler may be able to collapse the stack down to one entry, so you save stack space...A ... | null | CC BY-SA 4.0 | null | 2008-08-29T03:55:30.120 | 2018-10-25T13:13:58.503 | 2018-10-25T13:13:58.503 | 1,835,758 | 1,965 | null |
33,935 | 2 | null | 33,813 | 11 | null | Being able to write simple commands in any scripting language and bind them to a context-specific hotkey.
| null | CC BY-SA 2.5 | null | 2008-08-29T03:58:14.297 | 2008-08-29T03:58:14.297 | null | null | 1,114 | null |
33,936 | 2 | null | 33,933 | 0 | null | did you try...
`overflow: hidden;`
??
I'm not sure if it should be in the table of the textarea... experiment a bit
| null | CC BY-SA 2.5 | null | 2008-08-29T04:00:03.230 | 2008-08-29T04:00:03.230 | null | null | 2,908 | null |
33,929 | 2 | null | 33,923 | 53 | null | Tail recursion refers to the recursive call being last in the last logic instruction in the recursive algorithm.
Typically in recursion, you have a which is what stops the recursive calls and begins popping the call stack. To use a classic example, though more C-ish than Lisp, the factorial function illustrates tail... | null | CC BY-SA 4.0 | null | 2008-08-29T03:57:05.170 | 2019-05-10T06:17:38.480 | 2019-05-10T06:17:38.480 | 4,725,611 | 1,875 | null |
33,930 | 2 | null | 33,923 | 815 | null | In , the typical model is that you perform your recursive calls first, and then you take the return value of the recursive call and calculate the result. In this manner, you don't get the result of your calculation until you have returned from every recursive call.
In , you perform your calculations first, and then yo... | null | CC BY-SA 4.0 | null | 2008-08-29T03:57:07.590 | 2018-07-30T03:41:50.897 | 2018-07-30T03:41:50.897 | 1,966,418 | null | null |
33,931 | 2 | null | 33,923 | 73 | null | Instead of explaining it with words, here's an example. This is a Scheme version of the factorial function:
```
(define (factorial x)
(if (= x 0) 1
(* x (factorial (- x 1)))))
```
Here is a version of factorial that is tail-recursive:
```
(define factorial
(letrec ((fact (lambda (x accum)
... | null | CC BY-SA 3.0 | null | 2008-08-29T03:57:08.667 | 2013-04-22T22:32:19.440 | 2013-04-22T22:32:19.440 | 12,892 | 658 | null |
33,933 | 1 | null | null | 10 | 21,134 | I have the following `textarea` in a `table`:
```
<table width="300"><tr><td>
<textarea style="width:100%">
longstringlongstringlongstringlongstringlongstringlongstringlongstringlongstringlongstringlongstringlongstringlongstringlongstring
</textarea>
</td></tr></table>
```
With a long string in the textarea, the t... | 100% width textarea ignores parent element's width in IE7 | CC BY-SA 4.0 | 0 | 2008-08-29T03:57:32.580 | 2020-02-26T13:52:36.810 | 2020-02-26T13:52:36.810 | 11,393,381 | 2,749 | [
"html",
"css",
"internet-explorer-7"
] |
33,940 | 2 | null | 27,535 | 2 | null | The RoleProvider sets a cookie to cache role information in a cookie. When the cookie resets during an asynch post back from AJAX, you will get this error. The solution is to either set the cookieTimeout in the roleManager section of your web.config to a very large number of minutes, or set the cacheRolesInCookie=fal... | null | CC BY-SA 2.5 | null | 2008-08-29T04:03:30.443 | 2008-08-29T04:03:30.443 | null | null | 1,865 | null |
33,941 | 2 | null | 33,860 | -3 | null | If you didn't actually want to submit the form, but just invoke whatever code happened to be in the onsubmit, you could possibly do this: (untested)
```
var code = document.getElementById('formId').getAttribute('onsubmit');
eval(code);
```
| null | CC BY-SA 2.5 | null | 2008-08-29T04:03:59.257 | 2008-08-29T04:03:59.257 | null | null | 234 | null |
33,937 | 1 | 33,944 | null | 3 | 3,031 | I have a Crystal Report which is viewed via a CrystalReportViewer control on an .aspx page (using VS2008).
The report has two data-driven FieldObjects (which can contain a variable number of chars) which I would like to display on the same line beside each other.
Problem is when the text in the first FieldObject ... | How to handle variable width FieldObjects in Crystal Reports | CC BY-SA 2.5 | 0 | 2008-08-29T04:00:20.920 | 2009-09-16T02:07:38.157 | null | null | 242 | [
"crystal-reports"
] |
33,943 | 2 | null | 21,725 | 3 | null | I really love the [snippetsEmu](http://www.vim.org/scripts/script.php?script_id=1318) Plugin. It emulates some of the behaviour of Snippets from the OS X editor TextMate, in particular the variable bouncing and replacement behaviour.
| null | CC BY-SA 2.5 | null | 2008-08-29T04:07:16.053 | 2008-08-29T04:07:16.053 | null | null | 720 | null |
33,938 | 2 | null | 33,933 | 0 | null | or, how about:
```
overflow: scroll;
```
Edit:
I actually tested this. I think the behavior is such because the width is on the table, which I believe (I have nothing to back this up) I read long ago that the table width is a width, but can be expanded to accommodate its content. Not sure. I know if you use a `<... | null | CC BY-SA 3.0 | null | 2008-08-29T04:03:11.443 | 2015-12-16T08:47:50.243 | 2015-12-16T08:47:50.243 | 1,016,716 | 1,875 | null |
33,932 | 2 | null | 21,454 | 35 | null | Using the `choices` parameter won't use the ENUM db type; it will just create a VARCHAR or INTEGER, depending on whether you use `choices` with a CharField or IntegerField. Generally, this is just fine. If it's important to you that the ENUM type is used at the database level, you have three options:
1. Use "./mana... | null | CC BY-SA 3.0 | null | 2008-08-29T03:57:14.687 | 2015-09-15T14:49:31.907 | 2015-09-15T14:49:31.907 | 3,207 | 3,207 | null |
33,944 | 2 | null | 33,937 | 5 | null | you can add a text object to the report. And while editing the text of the text object, drag the field you want to show from the object explorer into the text box. Then hit space, then drag the second field in to the same text box. Your two fields will always be one space a part. You could, of course, add more spaces o... | null | CC BY-SA 2.5 | null | 2008-08-29T04:07:39.623 | 2008-08-29T04:07:39.623 | null | null | 777 | null |
33,942 | 2 | null | 33,893 | 2 | null | @Robert
what if you put the ellipses in a div with a low `z-index` so that when it moves to the left (for shorter lines) they get covered up by a background image or something?
it's pretty hacky I know, but hey worth a try right?
Another idea: determine the position of the div containing the ellipses with javascrip... | null | CC BY-SA 3.0 | null | 2008-08-29T04:06:21.327 | 2016-02-08T14:43:02.773 | 2016-02-08T14:43:02.773 | 92,701 | 2,908 | null |
33,947 | 2 | null | 33,933 | 0 | null | IE also supports the [word-break](http://msdn.microsoft.com/en-us/library/ms531184.aspx) CSS 3 property.
| null | CC BY-SA 2.5 | null | 2008-08-29T04:13:32.463 | 2008-08-29T04:13:32.463 | null | null | 1,414 | null |
33,949 | 1 | 33,963 | null | 6 | 17,571 | What is the minimum I need to add to a .NET 2.0 WebSite's web.config to make it .NET 3.5?
Visual Studio adds all the config sections and script handlers, but if you aren't using those are they are really necessary?
Is there a command line tool to "upgrade" a .NET 2.0 web.config to 3.5?
| Convert Web.config from .NET 2.0 to 3.5 | CC BY-SA 2.5 | 0 | 2008-08-29T04:15:24.190 | 2012-07-04T19:42:26.193 | 2008-08-29T04:50:45.760 | 832 | 2,580 | [
".net",
"asp.net",
"configuration",
"migration"
] |
33,951 | 2 | null | 33,933 | 0 | null | Best thing I could find to make it work, a little hacky:
wrap textarea with `<div style="width:300px; overflow:auto;">`
might want to play around with the overflow value
| null | CC BY-SA 3.0 | null | 2008-08-29T04:15:44.580 | 2015-12-22T08:48:49.880 | 2015-12-22T08:48:49.880 | 3,187,989 | 3,354 | null |
33,948 | 2 | null | 33,933 | 5 | null | Apply the width to the `td`, not the `table`.
EDIT: @Emmett - the width could just as easily be applied via CSS.
```
td {
width: 300px;
}
```
produces the desired result. Or, if you're using jQuery, you could add the width through script:
```
$('textarea[width=100%]').parent('td').css('width', '300px');
```
... | null | CC BY-SA 3.0 | null | 2008-08-29T04:15:06.533 | 2013-06-01T02:51:32.233 | 2013-06-01T02:51:32.233 | 2,156,756 | 1,923 | null |
33,955 | 1 | 33,982 | null | 24 | 9,655 | Could someone tell me what the units the `SetTimeout(int)` method in the `ICriteria` interface uses?
Is it milliseconds, seconds, minutes or other?
| NHibernate SetTimeout on ICriteria | CC BY-SA 3.0 | 0 | 2008-08-29T04:25:18.893 | 2015-09-09T09:37:46.117 | 2015-09-09T09:37:46.117 | 1,537,726 | 493 | [
"nhibernate"
] |
33,952 | 2 | null | 1,300 | 2 | null | CC.NET is simply the build server technology, not the build script technology. We use CC.NET at work to very successfully call MSBuild build scripts with no problems.
NAnt is an older and more mature build scripting language, but they are both similar in how they work. There are very few things I could do in NAnt that... | null | CC BY-SA 2.5 | null | 2008-08-29T04:23:19.820 | 2008-08-29T04:23:19.820 | null | null | 1,559 | null |
33,956 | 1 | null | null | 15 | 29,158 | Assume that I have a field called for the documents in Solr and I have that field faceted. I want to get the facets as ranges of values (eg: 0-100, 100-500, 500-1000, etc). How to do it?
I can specify the ranges beforehand, but I also want to know whether it is possible to calculate the ranges (say for 5 values) auto... | How to get facet ranges in solr results? | CC BY-SA 2.5 | 0 | 2008-08-29T04:26:07.007 | 2014-07-07T20:58:03.030 | 2008-08-29T05:09:26.870 | 1,448 | 1,448 | [
"java",
"lucene",
"solr"
] |
33,958 | 2 | null | 33,903 | 1 | null | I like [TOAD for Oracle](http://www.toadsoft.com/toad_oracle.htm). It has a format feature that's decent. I see there's a freeware version, though I have not used it.
| null | CC BY-SA 2.5 | null | 2008-08-29T04:29:29.663 | 2008-08-29T04:29:29.663 | null | null | 947 | null |
33,961 | 2 | null | 33,853 | 0 | null | 1 more vote for Umbraco.
Depends on what you are used to, but is one of the nicest CMS I've used, and have found it pretty easy to add my own user controls to it.
Apparently supports multi languages, but I have never tried that.
| null | CC BY-SA 2.5 | null | 2008-08-29T04:34:03.040 | 2008-08-29T04:34:03.040 | null | null | 3,354 | null |
33,950 | 2 | null | 33,933 | 2 | null | @[Peter Meyer](https://stackoverflow.com/questions/33933/textarea-with-100-width-ignores-parent-elements-width-in-ie7#33938), [Jim Robert](https://stackoverflow.com/questions/33933/textarea-with-100-width-ignores-parent-elements-width-in-ie7#33936)
I tried different overflow values, to no avail.
Experimenting with di... | null | CC BY-SA 2.5 | null | 2008-08-29T04:15:42.507 | 2008-08-29T04:46:53.397 | 2017-05-23T10:32:50.377 | -1 | 2,749 | null |
33,960 | 1 | 33,967 | null | 21 | 5,140 | I would like to retrieve the ethernet address of the network interface that is used to access a particular website.
How can this be done in Java?
Note that the accepted solution of `getHardwareAddress` is only available in Java 6. There does not seem to be a solution for Java 5 aside from executing i(f|p)confing.
| How do you get the ethernet address using Java? | CC BY-SA 2.5 | 0 | 2008-08-29T04:31:24.667 | 2016-07-10T16:48:40.030 | 2014-07-09T06:09:16.160 | 3,302,887 | 338 | [
"java",
"networking",
"ethernet"
] |
33,964 | 2 | null | 33,949 | 0 | null | It depends on which features you want to include. Most of the 3.5 ASP.NET extensions are optional. You will want to include the assembly for System.Core and System.Xml.Linq. You will also to add compiler support for C# 3.0 if you plan to use that in your code behind. If you're deploying to IIS 7 there are HTTP handlers... | null | CC BY-SA 2.5 | null | 2008-08-29T04:41:36.390 | 2008-08-29T04:41:36.390 | null | null | 507 | null |
33,963 | 2 | null | 33,949 | 9 | null | There is a good description of the 3.5 web.config available here:
[https://web.archive.org/web/20211020153237/https://www.4guysfromrolla.com/articles/121207-1.aspx](https://web.archive.org/web/20211020153237/https://www.4guysfromrolla.com/articles/121207-1.aspx)
The assemblies and config sections are important because... | null | CC BY-SA 3.0 | null | 2008-08-29T04:36:43.890 | 2012-07-04T19:42:26.193 | 2012-07-04T19:42:26.193 | 1,001,985 | 3,543 | null |
33,966 | 2 | null | 33,960 | 4 | null | You can get the address that connects to your ServerSocket using [http://java.sun.com/javase/6/docs/api/java/net/NetworkInterface.html#getInetAddresses()](http://java.sun.com/javase/6/docs/api/java/net/NetworkInterface.html#getInetAddresses())
However if your client is connecting via a NAT, then you will get the addre... | null | CC BY-SA 2.5 | null | 2008-08-29T04:48:45.390 | 2008-08-29T04:56:05.497 | 2008-08-29T04:56:05.497 | 3,431,280 | 3,431,280 | null |
33,967 | 2 | null | 33,960 | 18 | null | [java.net.NetworkInterface.getHardwareAddress](http://java.sun.com/javase/6/docs/api/java/net/NetworkInterface.html#getHardwareAddress%28%29) (method added in Java 6)
It has to be called on the machine you are interested in - the MAC is not transferred across network boundaries (i.e. LAN and WAN). If you want to make ... | null | CC BY-SA 2.5 | null | 2008-08-29T04:48:46.717 | 2008-08-29T20:57:39.230 | 2008-08-29T20:57:39.247 | 3,205 | 3,205 | null |
33,957 | 2 | null | 742 | 46 | null | I've created and used my own generic view classes, defining `__call__` so an instance of the class is callable. I really like it; while Django's generic views allow some customization through keyword arguments, OO generic views (if their behavior is split into a number of separate methods) can have much more fine-grai... | null | CC BY-SA 3.0 | null | 2008-08-29T04:29:22.053 | 2011-11-15T20:39:59.817 | 2011-11-15T20:39:59.817 | 444,705 | 3,207 | null |
33,969 | 1 | 1,318,059 | null | 227 | 61,526 | We're experimenting with various ways to throttle user actions in a :
- - -
For the time being, we're using the Cache to simply insert a record of user activity - if that record exists if/when the user does the same activity, we throttle.
Using the Cache automatically gives us stale data cleaning and sliding activi... | Best way to implement request throttling in ASP.NET MVC? | CC BY-SA 2.5 | 0 | 2008-08-29T04:50:50.410 | 2023-01-31T06:48:47.433 | 2009-08-23T08:25:28.323 | 3 | 3 | [
"asp.net-mvc",
"throttling"
] |
33,962 | 2 | null | 17,175 | 1 | null | > SQL Compact Edition running on the Silverlight CLR
I thought the point of silverlight was to provide a small, embedded runtime in the browser.
Adding every kitchen sink (like SQL or any kind of ORM library, or parity with WPF) is just going to cause what happened with .net 3.5. Nobody will develop for it because th... | null | CC BY-SA 2.5 | null | 2008-08-29T04:35:12.023 | 2008-08-29T04:35:12.023 | 2017-05-23T12:08:38.563 | -1 | 234 | null |
33,971 | 1 | 33,983 | null | 3 | 195 | I've switched over to a Mac recently and, although things have been going quite well, the very different text-editing behaviours across applications is driving me insane.
, , , , , , etc. quite often do different things depending on the application.
Is there a way to standardise this behaviour?
| Standardised text editing behaviour across Mac applications | CC BY-SA 3.0 | 0 | 2008-08-29T04:52:38.267 | 2015-09-06T19:08:22.050 | 2015-09-06T18:51:28.233 | 2,002,471 | null | [
"macos",
"keyboard-shortcuts"
] |
33,970 | 2 | null | 1,607 | 8 | null | Scott Ambler produces a great series of articles (and co-authored a [book](http://www.ambysoft.com/books/refactoringDatabases.html)) on database refactoring, with the idea that you should essentially apply TDD principles and practices to maintaining your schema. You set up a series of structure and seed data unit tests... | null | CC BY-SA 2.5 | null | 2008-08-29T04:51:30.517 | 2008-08-29T04:51:30.517 | null | null | 577 | null |
33,972 | 2 | null | 33,955 | 8 | null | I think it's seconds. The NHibernate API closely mirrors Hibernate Core for Java, where the [Criteria.setTimeout(int)](http://www.hibernate.org/hib_docs/v3/api/org/hibernate/Criteria.html#setTimeout(int)) method uses seconds as the units (see also [Statement.setQueryTimeout(int)](http://java.sun.com/j2se/1.3/docs/api/... | null | CC BY-SA 2.5 | null | 2008-08-29T04:54:01.603 | 2008-08-29T04:54:01.603 | null | null | 2,783 | null |
33,975 | 2 | null | 33,973 | 1 | null | If you need random insert and removal, the best way is probably a sorted array. Inserts and removals should be O(log(n)).
| null | CC BY-SA 2.5 | null | 2008-08-29T04:56:14.123 | 2008-08-29T04:56:14.123 | null | null | 658 | null |
33,973 | 1 | 33,984 | null | 4 | 1,266 | In the vein of : suppose there's a collection of objects that can be compared to each other and sorted. What's the most efficient way to keep track of the smallest element in the collection as objects are added and the current smallest occasionally removed?
| How do I efficiently keep track of the smallest element in a collection? | CC BY-SA 2.5 | null | 2008-08-29T04:54:09.247 | 2009-06-29T18:21:17.327 | 2009-06-29T18:21:17.327 | 2,598 | 3,474 | [
"data-structures",
"collections"
] |
33,919 | 2 | null | 33,893 | 9 | null | Here's another take on it and you don't have to live without the ellipsis!
```
<html>
<head>
<style>
div.sidebox {
width: 25%;
}
div.sidebox div.qrytxt {
height: 1em;
line-height: 1em;
overflow: hidden;
}
div.sidebox div.qrytxt span.ellipsis {
float: right;
}
</style>
</head>
<body>
<div cla... | null | CC BY-SA 3.0 | null | 2008-08-29T03:43:14.737 | 2016-02-08T14:42:15.630 | 2016-02-08T14:42:15.630 | 92,701 | 3,534 | null |
33,974 | 2 | null | 16,178 | 0 | null | Without any assembly loading and catching exceptions (which is slow), check for class API changes between 2.0 and 3.5. [Mono Class Status](http://mono.ximian.com/class-status/2.0-vs-3.5/index.html) is very helpful for this. For example you could check for `GC.Collect Method (Int32, GCCollectionMode)` which is in mscorl... | null | CC BY-SA 2.5 | null | 2008-08-29T04:55:47.230 | 2008-08-29T04:55:47.230 | null | null | 3,205 | null |
33,980 | 2 | null | 27,381 | 2 | null | The important thing is never to have a block of text stretch too wide. If a window is expanded, no block of text should indefinitely stretch to match because reading becomes a difficulty.
| null | CC BY-SA 2.5 | null | 2008-08-29T04:59:41.917 | 2008-08-29T04:59:41.917 | null | null | null | null |
33,978 | 1 | 35,645 | null | 291 | 252,025 | How would you go about finding out how much memory is being used by an object? I know it is possible to find out how much is used by a block of code, but not by an instantiated object (anytime during its life), which is what I want.
| Find out how much memory is being used by an object in Python | CC BY-SA 3.0 | 0 | 2008-08-29T04:59:31.200 | 2021-01-22T13:10:36.050 | 2014-03-09T23:17:10.700 | 1,217,270 | 3,119 | [
"python",
"performance",
"memory-profiling"
] |
33,986 | 2 | null | 31,462 | 22 | null | This has worked well for me:
```
URL url = new URL(theURL);
InputStream is = url.openStream();
int ptr = 0;
StringBuffer buffer = new StringBuffer();
while ((ptr = is.read()) != -1) {
buffer.append((char)ptr);
}
```
Not sure at to whether the other solution(s) provided are any more efficient or not.
| null | CC BY-SA 2.5 | null | 2008-08-29T05:11:10.500 | 2008-08-29T05:11:10.500 | null | null | 1,915 | null |
33,988 | 2 | null | 1,607 | 6 | null | K. Scott Allen has a decent article or two on schema versioning, which uses the incremental update scripts/migrations concept referenced in other answers here; see [http://odetocode.com/Blogs/scott/archive/2008/01/31/11710.aspx](http://odetocode.com/Blogs/scott/archive/2008/01/31/11710.aspx).
| null | CC BY-SA 2.5 | null | 2008-08-29T05:11:38.283 | 2008-08-29T05:11:38.283 | null | null | 3,542 | null |
33,984 | 2 | null | 33,973 | 6 | null | Using a min-heap is the best way.
[http://en.wikipedia.org/wiki/Heap_(data_structure)](http://en.wikipedia.org/wiki/Heap_(data_structure))
It is tailor made for this application.
| null | CC BY-SA 2.5 | null | 2008-08-29T05:07:49.027 | 2008-09-05T04:25:47.340 | 2008-09-05T04:25:47.340 | 234 | 2,598 | null |
33,985 | 2 | null | 33,973 | 1 | null | @Harpreet
That is not optimal. When an object is removed, erickson will have to scan entire collection to find the new smallest.
You want to read up on [Binary search tree](http://en.wikipedia.org/wiki/Binary_search_tree)'s. MS has a good [site](http://msdn.microsoft.com/en-us/vcsharp/aa336800.aspx) to start down th... | null | CC BY-SA 2.5 | null | 2008-08-29T05:09:54.200 | 2008-08-29T05:17:25.510 | 2008-08-29T05:17:25.510 | 1,293 | 1,293 | null |
33,982 | 2 | null | 33,955 | 28 | null | A little bit of poking around suggests that it could be seconds:
Assuming that ICriteria is the same as the Criteria interface in Hibernate core, then the JavaDoc for [org.hibernate.Criteria](http://www.hibernate.org/hib_docs/v3/api/org/hibernate/Criteria.html#setTimeout(int)) provides a hint - the "see also" link to ... | null | CC BY-SA 2.5 | null | 2008-08-29T05:01:57.170 | 2008-08-29T05:01:57.170 | null | null | 3,542 | null |
33,976 | 1 | 34,169 | null | 3 | 5,953 | I'm creating an automated installation of Office 2007. To customise your Office 2007 installation the Office Customization Tool (OCT) does most of the work for you. One the OCT's features is the ability to run additional programs during the Office installation. However it is pretty poor at it.
Fortunately by edit... | Microsoft Office 2007 automated installation - editing the config.xml file | CC BY-SA 3.0 | null | 2008-08-29T04:57:32.547 | 2013-04-17T20:50:52.713 | 2013-04-17T20:50:52.713 | 1,454,806 | 3,555 | [
"xml",
"installation",
"packaging",
"office-2007"
] |
33,998 | 2 | null | 33,973 | 0 | null | Harpreet:
> the inserts into that would be linear since you have to move items for an insert.
Doesn't that depend on the implementation of the collection? If it acts like a linked-list, inserts would be O(1), while if it were implemented like an array it would be linear, as you stated.
| null | CC BY-SA 2.5 | null | 2008-08-29T05:18:44.727 | 2008-08-29T05:18:44.727 | null | null | 1,266 | null |
33,983 | 2 | null | 33,971 | 6 | null | There are standards, but they are not based around what you're used to from windows. It drove me mad until I got over myself and decided to learn what the actual standards were. Since then I've been sold.
The ones I use:
- - - -/ - Jump to top/bottom of text field or document- -/ - Jump to start/end of word or previo... | null | CC BY-SA 3.0 | null | 2008-08-29T05:06:09.687 | 2015-09-06T19:08:22.050 | 2015-09-06T19:08:22.050 | 2,002,471 | 234 | null |
33,999 | 2 | null | 33,860 | 2 | null | If you have to use Rail's built-in Javascript generation, I would use Orion's solution, but with one small alteration to compensate for the return code.
```
eval ('(function(){' + code + '})()');
```
However, in my opinion you'd have an easier time in the long run by separating out the Javascript code into an extern... | null | CC BY-SA 2.5 | null | 2008-08-29T05:21:02.117 | 2008-08-29T21:43:39.963 | 2008-08-29T21:43:39.963 | 3,560 | 3,560 | null |