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 ⌀ |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
38,554 | 2 | null | 37,822 | 2 | null | The iPhone SDK is documented to require an Intel-based Mac. Even if some people may be able to have gotten it to run on some other hardware doesn't mean that it will run correctly, that Apple will fix bugs you report, or that it is a supported environment.
| null | CC BY-SA 2.5 | null | 2008-09-01T22:39:06.310 | 2008-09-01T22:39:06.310 | null | null | 714 | null |
38,560 | 2 | null | 25,323 | 7 | null | Having worked with both approaches (shared domain objects and DTOs) I'd say the big problem with shared domain objects is when you don't control all clients, but from my past experiences I'd usually use DTOs unless it development speed were of the essence.
If there's any chance that you won't always be in control of t... | null | CC BY-SA 2.5 | null | 2008-09-01T22:44:24.800 | 2008-09-01T22:44:24.800 | null | null | 2,562 | null |
38,566 | 2 | null | 38,561 | 16 | null | `%ld` see [printf reference on cplusplus.com](http://www.cplusplus.com/reference/clibrary/cstdio/printf.html)
| null | CC BY-SA 3.0 | null | 2008-09-01T22:47:59.987 | 2012-10-17T19:57:56.083 | 2012-10-17T19:57:56.083 | 2,621,536 | 3,631 | null |
38,561 | 1 | 38,570 | null | 595 | 1,041,891 | The `printf` function takes an argument type, such as `%d` or `%i` for a `signed int`. However, I don't see anything for a `long` value.
| What is the conversion specifier for printf that formats a long? | CC BY-SA 4.0 | 0 | 2008-09-01T22:45:25.903 | 2022-12-19T01:40:04.027 | 2022-11-04T21:01:45.990 | 15,168 | 572 | [
"c",
"printf",
"long-integer"
] |
38,551 | 2 | null | 38,005 | 0 | null | "the only way I can return this is as an IEnumerable, so I lose my strong typed goodness"
that is incorrect. In fact your query is strongly typed, it is just an anonymous type. I think the query you want is more like:
```
var emps = from e in Employees
join m in Employees
on e.ManagerEmpID equ... | null | CC BY-SA 2.5 | null | 2008-09-01T22:38:40.367 | 2008-09-01T22:38:40.367 | null | null | 2,785 | null |
38,562 | 2 | null | 38,501 | 0 | null | @DrPizza:
> OK, I'm still a bit unclear about how
you wish the priorities to work. If
the pool is currently running a task
of type A with maximal concurrency of
1 and low priority, and it gets given
a new task also of type A (and maximal
concurrency 1), but this time with a
high priority, what should it ... | null | CC BY-SA 2.5 | null | 2008-09-01T22:46:13.500 | 2008-09-01T22:46:13.500 | null | null | 3,146 | null |
38,570 | 2 | null | 38,561 | 766 | null | Put an `l` (lowercased letter L) directly before the specifier.
```
unsigned long n;
long m;
printf("%lu %ld", n, m);
```
| null | CC BY-SA 3.0 | null | 2008-09-01T22:50:23.023 | 2016-01-01T01:20:13.127 | 2016-01-01T01:20:13.127 | 32,453 | 1,892 | null |
38,568 | 2 | null | 38,299 | 7 | null | Here are a few sites on blogspot that may help. They have RSS feeds that will hopefully be easier to consume than paging through PDFs.
- [http://descriptor-tips.blogspot.com/](http://descriptor-tips.blogspot.com/)- [http://descriptors.blogspot.com/](http://descriptors.blogspot.com/)
| null | CC BY-SA 2.5 | null | 2008-09-01T22:49:31.683 | 2008-09-01T22:49:31.683 | null | null | 3,920 | null |
38,572 | 1 | 38,573 | null | 1 | 171 | Is .NET 3.5 SP1 Required on the server to use Dynamic Data?
It looks like it generates a lot of code and therefore wouldn't require anything special on the server side. I ask because I would like to use it but the shared hosting provider my client is using only have 3.5 installed and not 3.5 SP1.
| Is .NET 3.5 SP1 Required on the server to use Dynamic Data? | CC BY-SA 2.5 | null | 2008-09-01T22:51:45.610 | 2008-09-26T19:01:28.957 | 2008-09-26T19:01:28.957 | 2,134 | 3,747 | [
"asp.net",
"deployment",
"dynamic-data"
] |
38,573 | 2 | null | 38,572 | 2 | null | Yes, SP1 is required.
There are several bits of SP1 that Dynamic Data uses, notably the ASP.NET routing extensions and the new data annotation classes in System.ComponentModel.
| null | CC BY-SA 2.5 | null | 2008-09-01T22:52:52.220 | 2008-09-01T22:52:52.220 | null | null | 1,554 | null |
38,571 | 1 | 38,823 | null | 7 | 2,049 | I find myself doing this sort of thing all the time. I've been considering writing a macro/function to make this sort of thing easier, but it occurs to me that I'm probably reinventing the wheel.
Is there an existing function that will let me accomplish this same sort of thing more succinctly?
```
(defun remove-low-... | Common lisp idiom - is there a better way? | CC BY-SA 2.5 | 0 | 2008-09-01T22:50:52.693 | 2014-03-07T10:03:11.657 | 2014-03-07T10:03:11.657 | 3,325,258 | 56,456 | [
"common-lisp"
] |
38,583 | 2 | null | 23,623 | 0 | null | I recommend mixing in a few packages from Debian Unstable feeds. They tend to be pretty stable, despite the name. They're also very up to date.
| null | CC BY-SA 2.5 | null | 2008-09-01T23:07:56.083 | 2008-09-01T23:07:56.083 | null | null | 2,018 | null |
38,577 | 2 | null | 37,822 | 1 | null | > I have a Powerbook G4 running Leopard and would very much like to do dev on it
Not sure what sort of application you are developing, but if you jailbreak your iPhone, you can:
- - `xcodebuild`
You be able to compile iPhone applications from a PPC machine, as you can compile PPC applications from an Intel Mac, an... | null | CC BY-SA 3.0 | null | 2008-09-01T22:58:47.213 | 2011-10-30T22:08:46.010 | 2011-10-30T22:08:46.010 | 345,188 | 745 | null |
38,565 | 2 | null | 38,549 | 102 | null | Inner joins require that a record with a related ID exist in the joined table.
Outer joins will return records for the left side even if nothing exists for the right side.
For instance, you have an Orders and an OrderDetails table. They are related by an "OrderID".
- -
- - - - -
The request
```
SELECT Order... | null | CC BY-SA 4.0 | null | 2008-09-01T22:47:39.020 | 2018-09-10T08:25:51.700 | 2018-09-10T08:25:51.700 | 5,188,804 | 3,747 | null |
38,584 | 2 | null | 38,302 | 0 | null | > What is your static memory manager actually doing? Unless it is doing something unsafe (P/Invoke, unsafe code), the behaviour you are seeing is a bug in your program, and not due to the behaviour of the CLR.
I was in fact speaking about unsafe pointers. What I wanted was something like `Marshal.AllocHGlobal`, though... | null | CC BY-SA 3.0 | null | 2008-09-01T23:08:27.673 | 2016-02-01T13:59:59.770 | 2016-02-01T13:59:59.770 | 899,126 | 4,055 | null |
38,588 | 2 | null | 23,970 | 21 | null | You cannot marshal a Lambda or Proc. This is because both of them are considered closures, which means they close around the memory on which they were defined and can reference it. (In order to marshal them you'd have to Marshal all of the memory they could access at the time they were created.)
As Gaius pointed out t... | null | CC BY-SA 3.0 | null | 2008-09-01T23:10:45.360 | 2015-02-16T20:53:31.730 | 2015-02-16T20:53:31.730 | 823 | 823 | null |
38,587 | 2 | null | 37,991 | 11 | null | onnodb,
The PostgreSQL ODBC driver is [actively developed](http://www.postgresql.org/ftp/odbc/versions/msi/) and an Access front-end combined with PostgreSQL server, in my opinion makes a great option on a LAN for rapid development. I have been involved in a reasonably big system (100+ PostgreSQL tables, 200+ Access f... | null | CC BY-SA 2.5 | null | 2008-09-01T23:09:50.183 | 2008-09-01T23:09:50.183 | null | null | null | null |
38,589 | 1 | null | null | 0 | 124 | Did Installing OneCare cause a "Generating user instances in SQL Server is disabled" error?
The only change that I've made to my computer is uninstalling AVG and installing the trial for Microsoft OneCare. Did OneCare change the SQLServer installation somehow?
This is a very "odd" question but is something I would po... | Did Installing OneCare cause a "Generating user instances in SQL Server is disabled" error? | CC BY-SA 2.5 | null | 2008-09-01T23:11:32.067 | 2008-09-26T18:58:32.317 | 2008-09-26T18:58:32.317 | 2,134 | 3,747 | [
"sql-server"
] |
38,592 | 1 | 38,599 | null | 0 | 848 | I'd like to be able to write a ruby program that can restart without dropping it's socket connections.
| How do I make persistent network sockets on Unix in Ruby? | CC BY-SA 2.5 | null | 2008-09-01T23:19:03.717 | 2021-06-13T15:28:19.453 | 2009-03-24T19:27:21.137 | 823 | 823 | [
"ruby",
"sockets"
] |
38,591 | 2 | null | 38,305 | 8 | null | There is a way.
The JarJar project does this AFAIR. The first goal of the JarJar project is to allow one to embed third party libraries in your own jar, changing the package structure if necessary. Doing so it can strip out the classes that are not needed.
Check it out at [http://code.google.com/p/jarjar/](http://cod... | null | CC BY-SA 2.5 | null | 2008-09-01T23:14:40.343 | 2008-09-01T23:14:40.343 | null | null | 883 | null |
38,575 | 2 | null | 35,541 | 1 | null | Here's a small script I wrote for finding the total numbers of occurrence for different source code elements in ActionScript 3 code (this is written in Python simply because I'm familiar with it, while Perl would probably be better suited for a regex-heavy script like this):
```
#!/usr/bin/python
import sys, os, re
... | null | CC BY-SA 2.5 | null | 2008-09-01T22:53:46.807 | 2008-09-01T22:53:46.807 | null | null | 4,111 | null |
38,597 | 2 | null | 38,592 | 0 | null | You're talking about network sockets, not UNIX sockets I assume?
I'm not sure this suits your needs, but the way I would do it is by seperating the networking and logic part, and only restart the logic part, then reconnect the logic part to the networking part.
| null | CC BY-SA 2.5 | null | 2008-09-01T23:21:06.880 | 2008-09-01T23:21:06.880 | null | null | 2,018 | null |
38,594 | 2 | null | 38,571 | -2 | null | There are a couple ways you can do this. First, and probably most easily, you can do it recursively.
```
(defun remove-low-words (word-list)
(if (good-enough-score-p (car word-list))
(list word (remove-low-words (cdr word-list)))
(remove-low-words (cdr word-list))))
```
You could also do it with `mapc... | null | CC BY-SA 2.5 | null | 2008-09-01T23:19:31.440 | 2008-09-01T23:19:31.440 | null | null | 714 | null |
38,596 | 1 | 38,608 | null | 9 | 7,992 | What is the best way to keep a PHP script running as a daemon, and what's the best way to check if needs restarting.
I have some scripts that need to run 24/7 and for the most part I can run them using [nohup](http://en.wikipedia.org/wiki/Nohup). But if they go down, what's the best way to monitor it so it can be aut... | What's the best way to keep a PHP script running as a daemon? | CC BY-SA 2.5 | 0 | 2008-09-01T23:20:59.033 | 2020-03-02T16:45:02.897 | 2008-09-02T01:05:54.350 | 1 | 4,133 | [
"php",
"daemon"
] |
38,578 | 2 | null | 38,549 | 6,621 | null | Assuming you're joining on columns with no duplicates, which is a very common case:
- An inner join of A and B gives the result of A intersect B, i.e. the inner part of a [Venn diagram](http://en.wikipedia.org/wiki/Venn_diagram) intersection.- An outer join of A and B gives the results of A union B, i.e. the outer part... | null | CC BY-SA 4.0 | null | 2008-09-01T22:59:34.840 | 2021-12-14T01:51:41.120 | 2021-12-14T01:51:41.120 | 116 | 116 | null |
38,519 | 2 | null | 38,463 | 2 | null | I wouldn't consider SOAP legacy at all. REST vs. SOAP is really just the continuation of the debate of COM/CORBA vs. HTTP POST/GET etc. SOAP is nothing more than an updated version of the same principles defined with C and C (contracts, providers, consumers etc.). It's just that has appeared to SOAP succeed (at leas... | null | CC BY-SA 2.5 | null | 2008-09-01T22:05:42.193 | 2008-09-01T22:05:42.193 | null | null | 1,942 | null |
38,598 | 1 | 38,636 | null | 14 | 2,225 | How are people unit testing their business applications? I've seen a lot of examples of unit testing with "simple to test" examples. Ex. a calculator. How are people unit testing data-heavy applications? How are you putting together your sample data? In many cases, data for one test may not work at all for another test... | How do you unit test business applications? | CC BY-SA 2.5 | 0 | 2008-09-01T23:21:33.713 | 2008-09-15T15:18:13.787 | 2008-09-15T15:18:13.787 | 3,656 | 3,656 | [
"unit-testing"
] |
38,599 | 2 | null | 38,592 | 1 | null | This program gets Google's homepage and then when you pass it SIG_INT via - it restarts the program and reads the output of the homepage from the open socket with Google.
```
#!/usr/bin/ruby
#simple_connector.rb
require 'socket'
puts "Started."
if ARGV[0] == "restart"
sock = IO.open(ARGV[1].to_i)
puts sock.read
... | null | CC BY-SA 4.0 | null | 2008-09-01T23:21:48.203 | 2021-06-13T15:28:19.453 | 2021-06-13T15:28:19.453 | 9,454,010 | 823 | null |
38,605 | 2 | null | 38,598 | 0 | null | For lots of different runs over the same logic but with different data you can use CSV, as many columns as you like for the input and the last for the output etc.
| null | CC BY-SA 2.5 | null | 2008-09-01T23:25:33.640 | 2008-09-01T23:25:33.640 | null | null | 1,666 | null |
38,602 | 1 | 38,611 | null | 2 | 3,004 | I am attempting to set an asp.net textbox to a SQL 2005 money data type field, the initial result displayed to the user is 40.0000 instead of 40.00.
In my asp.net textbox control I would like to only display the first 2 numbers after the decimal point e.g. 40.00
What would be the best way to do this?
My code is below:... | Best way to display/format SQL 2005 money data type in ASP.Net | CC BY-SA 3.0 | null | 2008-09-01T23:23:26.047 | 2015-04-21T14:20:43.907 | 2015-04-21T14:20:43.907 | 672,532 | 4,096 | [
"asp.net"
] |
38,608 | 2 | null | 38,596 | 4 | null | If you can't use the (proper) init structure to do this (you're on shared hosting, etc.), use cron to run a script (it can be written in whatever language you like) every few minutes that checks to see if they're running, and restarts them if necessary.
| null | CC BY-SA 2.5 | null | 2008-09-01T23:26:35.400 | 2008-09-01T23:26:35.400 | null | null | 3,694 | null |
38,520 | 2 | null | 38,409 | 3 | null | For a laugh:
```
ary = eval("[[this, is],[a, nested],[array]]".gsub(/(\w+?)/, "'\\1'") )
=> [["this", "is"], ["a", "nested"], ["array"]]
```
Disclaimer: You definitely shouldn't do this as `eval` is a terrible idea, but it is fast and has the useful side effect of throwing an exception if your nested arrays aren't ... | null | CC BY-SA 2.5 | null | 2008-09-01T22:06:44.767 | 2008-09-01T22:06:44.767 | null | null | 234 | null |
38,601 | 1 | 38,916 | null | 183 | 134,673 | How can I use the nifty JavaScript date and time widgets that the default admin uses with my custom view?
I have looked through [the Django forms documentation](https://docs.djangoproject.com/en/dev/topics/forms/), and it briefly mentions django.contrib.admin.widgets, but I don't know how to use it?
Here is my templa... | Using Django time/date widgets in custom form | CC BY-SA 3.0 | 0 | 2008-09-01T23:22:55.207 | 2022-01-29T12:54:29.013 | 2013-07-12T19:24:07.147 | 1,011,749 | 2,592 | [
"python",
"django"
] |
38,611 | 2 | null | 38,602 | 2 | null | ```
this.txtPayment.Text = string.Format("{0:c}", dr[Payment"].ToString());
```
| null | CC BY-SA 3.0 | null | 2008-09-01T23:29:54.910 | 2015-04-21T14:19:54.153 | 2015-04-21T14:19:54.153 | 672,532 | 3,821 | null |
38,617 | 2 | null | 38,352 | 1 | null | Per John, I don't see what the problem with a classic normalised schema would be. You haven't given much information to go on, but you say that there's a one-to-many relationship between users and addresses, so I'd plump for a bog standard solution with a foreign key to the user in the address relation.
| null | CC BY-SA 2.5 | null | 2008-09-01T23:32:44.590 | 2008-09-01T23:32:44.590 | null | null | 3,542 | null |
38,606 | 2 | null | 38,302 | 1 | null | If you want to do this, you can use the GCHandle.Alloc method to specify that a pointer should be pinned without being automatically released at the end of the scope like the fixed statement.
But, as other people have been saying, doing this is putting undue pressure on the garbage collector. What about just creatin... | null | CC BY-SA 2.5 | null | 2008-09-01T23:25:33.670 | 2008-09-01T23:25:33.670 | null | null | 1,948 | null |
38,616 | 2 | null | 38,602 | 2 | null | Does the "c" format string work on ASP.NET the same way as it does in, say, Windows Forms? Because in WinForms I'm fairly certain it obeys the currency settings. So even if the value is stored in US Dollars, if the client PC is set up to display Yen then that's the currency symbol that'll be displayed. That may not be... | null | CC BY-SA 2.5 | null | 2008-09-01T23:32:26.977 | 2008-09-01T23:32:26.977 | null | null | 615 | null |
38,618 | 1 | 38,620 | null | 0 | 1,002 | Am I right in thinking the full name of the LSP is the Liskoff Substitution Principle? I'm having trouble finding an [online] source to cite for any information on this... it seems to be a cornerstone of OOP, and yet I'm having trouble finding definitions.
| LSP in OO programming? | CC BY-SA 2.5 | null | 2008-09-01T23:34:35.490 | 2009-02-18T21:10:19.813 | null | null | 393,028 | [
"oop"
] |
38,612 | 1 | 38,684 | null | 2 | 17,339 | I have a asp.net 2.0 web site with numerous asp:DropDownList controls.
The DropDownList control contains the standard info city, state, county etc... info.
In addition to the standard codes the site also has custom codes that the users can configure themselves.
For example a animal dropdown may contain the values Dog, ... | asp:DropDownList Error: 'DropDownList1' has a SelectedValue which is invalid because it does not exist in the list of items | CC BY-SA 2.5 | 0 | 2008-09-01T23:30:10.930 | 2012-01-27T11:14:22.843 | null | null | 4,096 | [
"asp.net"
] |
38,625 | 2 | null | 38,612 | 4 | null | Your SelectedValue should be a unique id of some sort, that doesn't change. The Text value that gets displayed to the user is something seperate, and can change if necessary without affecting your application, because you associate the id with your Order, not the displayed string value.
| null | CC BY-SA 2.5 | null | 2008-09-01T23:40:13.603 | 2008-09-01T23:40:13.603 | null | null | 637 | null |
38,620 | 2 | null | 38,618 | 4 | null | Yes, you are right. It's spelled Liskov which is probably why you can't find a citation.
Here's the [link.](http://en.wikipedia.org/wiki/Liskov_substitution_principle) One of the better resources regarding this is Robert C. Martin's Agile Software Development Principles Patterns and practices book.
| null | CC BY-SA 2.5 | null | 2008-09-01T23:37:05.797 | 2008-09-01T23:37:05.797 | null | null | 2,995 | null |
38,628 | 2 | null | 38,598 | 2 | null | It depends on what you're testing. If you're testing a business logic component -- then its immaterial where the data is coming from and you'd probably use a mock or a hand rolled stub class that simulates the data access routine the component would have called in the wild. The only time I mess with the data access i... | null | CC BY-SA 2.5 | null | 2008-09-01T23:42:03.507 | 2008-09-01T23:42:03.507 | null | null | 2,995 | null |
38,630 | 2 | null | 38,602 | 0 | null | @Matt Hamilton
It does. "c" works for whatever the CurrentCultureInfo is, the question becomes if all the users of the web application have the same currency as the server, otherwise, they will need to get the cultureinfo clientside and use the currency gleaned from there.
| null | CC BY-SA 2.5 | null | 2008-09-01T23:42:59.650 | 2008-09-01T23:42:59.650 | null | null | 372 | null |
38,619 | 2 | null | 38,352 | 0 | null | If you assume each user has one or more addresses, a telephone number, etc., you could have a 'Users' table, an 'Addresses Table' (containing a primary key and then non-unique reference to Users), the same for phone numbers - allowing multiple rows with the same UserID foreign key, which would make querying 'all addres... | null | CC BY-SA 2.5 | null | 2008-09-01T23:36:53.940 | 2008-09-01T23:36:53.940 | null | null | 393,028 | null |
38,600 | 2 | null | 35,170 | 3 | null | The "automatic" keyword also allows you to write recursive functions (since verilog 2001). I believe they should be synthesisable if they bottom out, but I'm not sure if they have tool support.
I too, do verilog!
| null | CC BY-SA 2.5 | null | 2008-09-01T23:21:55.553 | 2008-09-01T23:21:55.553 | null | null | 4,131 | null |
38,607 | 2 | null | 38,561 | 204 | null | I think you mean:
```
unsigned long n;
printf("%lu", n); // unsigned long
```
or
```
long n;
printf("%ld", n); // signed long
```
| null | CC BY-SA 3.0 | null | 2008-09-01T23:26:02.797 | 2012-10-17T19:56:52.433 | 2012-10-17T19:56:52.433 | 2,621,536 | 369 | null |
38,609 | 2 | null | 38,370 | 0 | null | You could also set a cookie on the user-side and then check for the presence of that cookie directly after redirecting, which if you're bothered about friendly URLs would mean that you don't have to pass around a PHPSESSID in the query string.
| null | CC BY-SA 2.5 | null | 2008-09-01T23:28:53.960 | 2008-09-01T23:28:53.960 | null | null | 393,028 | null |
38,629 | 1 | null | null | 0 | 1,617 | I want to use XML instead of SQLServer for a simple website.
Are their any good tutorials, code examples, and/or tools available to make a (prefer VB.NET) wrapper class to handle the basic list, insert, edit, and delete (CRUD) code?
The closest one I found was on a Telerik Trainer video/code for their Scheduler comp... | ASP.NET XML ObjectDataSource Wrapper Class Examples | CC BY-SA 2.5 | null | 2008-09-01T23:42:26.890 | 2017-07-04T08:44:31.097 | 2008-09-02T12:30:33.300 | 305 | 3,747 | [
"asp.net",
"xml",
"vb.net",
"objectdatasource"
] |
38,632 | 2 | null | 38,598 | 2 | null | Mocking Frameworks enable you to test your business objects.
Data Driven tests often end up becoming more of a intergration test than a unit test, they also carry with them the burden of managing the state of a data store pre and post execution of the test and the time taken in connecting and executing queries.
In ge... | null | CC BY-SA 2.5 | null | 2008-09-01T23:48:52.117 | 2008-09-01T23:48:52.117 | null | null | 4,026 | null |
38,646 | 2 | null | 37,486 | 0 | null | Looking at the amount of sense people are demonstrating in other answers here, I'd say that using a regex probably isn't the best idea for your situation. Go for something tried and tested, and treat my previous answer as a demonstration that regexes need not be scary.
| null | CC BY-SA 2.5 | null | 2008-09-02T00:11:49.880 | 2008-09-02T00:11:49.880 | null | null | 1,157 | null |
38,613 | 2 | null | 38,602 | 0 | null | Use the method with "c" to format it as currency.
```
this.txtPayment.Text = dr["Payment"].ToString("c");
```
[Standard Numeric Format Strings](http://msdn.microsoft.com/en-us/library/dwhawy9k.aspx)
| null | CC BY-SA 2.5 | null | 2008-09-01T23:31:08.587 | 2008-09-01T23:31:08.587 | null | null | 3,920 | null |
38,640 | 2 | null | 37,428 | 2 | null | Another online book that I pick up whenever I need to get back into C++ is "C++ In Action" by Bartosz Milewski. Its [online](http://www.relisoft.com/book/index.htm) at his site.
| null | CC BY-SA 2.5 | null | 2008-09-02T00:01:08.063 | 2008-09-02T00:01:08.063 | null | null | 2,995 | null |
38,631 | 2 | null | 38,598 | 1 | null | It sounds like you might be testing message based systems, or systems with highly parameterised interfaces, where there are large numbers of permutations of input data.
In general all the rules of standard unti testing still hold:
- - - -
Once this is done you will have removed a lot of the complexity from the te... | null | CC BY-SA 2.5 | null | 2008-09-01T23:44:37.743 | 2008-09-01T23:44:37.743 | null | null | 2,660 | null |
38,635 | 1 | 100,350 | null | 174 | 169,107 | What tools are there available for static analysis against C# code? I know about FxCop and StyleCop. Are there others? I've run across NStatic before but it's been in development for what seems like forever - it's looking pretty slick from what little I've seen of it, so it would be nice if it would ever see the light ... | What static analysis tools are available for C#? | CC BY-SA 2.5 | 0 | 2008-09-01T23:54:02.620 | 2022-10-20T21:34:04.337 | 2008-10-15T21:52:12.123 | 3,798 | 3,656 | [
"c#",
"code-analysis",
"static-analysis"
] |
38,647 | 1 | 356,511 | null | 18 | 12,114 |
I'd prefer to use Linq to Entities (mainly because of the strong-type checking), but some of my other team members are citing performance as a reason to use ESQL. I would like to get a full idea of the pro's/con's of using either method.
| Performance of Linq to Entities vs ESQL | CC BY-SA 3.0 | 0 | 2008-09-02T00:14:56.690 | 2017-05-26T18:48:59.117 | 2017-05-26T18:48:59.117 | 15,168 | 708 | [
"entity-framework",
"linq-to-entities",
"entity-sql"
] |
38,651 | 1 | 528,831 | null | 7 | 3,652 | Is there any way to have a binary compiled from an ActionScript 3 project print stuff to when executed?
From what I've gathered, people have been going around this limitation by writing hacks that rely on local socket connections and AIR apps that write to files in the local filesystem, but that's pretty much it -- i... | Any way to have an ActionScript 3 (Flex/AIR) project print to standard output? | CC BY-SA 2.5 | 0 | 2008-09-02T00:27:49.823 | 2012-07-23T17:17:11.063 | null | null | 4,111 | [
"apache-flex",
"flash",
"actionscript-3",
"adobe"
] |
38,645 | 1 | 39,678 | null | 24 | 19,266 | I want to combine two structures with differing fields names.
For example, starting with:
```
A.field1 = 1;
A.field2 = 'a';
B.field3 = 2;
B.field4 = 'b';
```
I would like to have:
```
C.field1 = 1;
C.field2 = 'a';
C.field3 = 2;
C.field4 = 'b';
```
Is there a more efficient way than using "fieldnames" and a for ... | What are some efficient ways to combine two structures in MATLAB? | CC BY-SA 2.5 | 0 | 2008-09-02T00:10:44.843 | 2014-05-20T19:19:07.140 | 2010-09-21T02:58:15.943 | 52,738 | 4,135 | [
"matlab",
"merge",
"structure",
"field"
] |
38,656 | 2 | null | 35,186 | 5 | null | If you are writing a webapp, ensure that you don't have conflicting versions of a jar in your container's global library directory and also in your app. You may not necessarily know which jar is being used by the classloader.
e.g.
- -
| null | CC BY-SA 2.5 | null | 2008-09-02T00:35:48.790 | 2008-09-02T09:57:17.227 | 2008-09-02T09:57:17.227 | 1,820 | 1,820 | null |
38,655 | 2 | null | 38,612 | 6 | null | I solved this exact same problem just two days ago. First, I moved the code that set the SelectedValue to a PreRender handler for the DropDownList. Then, I add logic to first check to see if the value is in the drop down list. If not, I add it.
Here's my code. ddSpecialty is my drop-down list, populated with "specialt... | null | CC BY-SA 2.5 | null | 2008-09-02T00:34:01.230 | 2008-09-02T00:34:01.230 | null | null | 2,527 | null |
38,663 | 2 | null | 3,260 | 4 | null | This method is basically from David Marr's book "Vision"
Gaussian blur your signal with the expected width of your peaks.
this gets rid of noise spikes and your phase data is undamaged.
Then edge detect (LOG will do)
Then your edges were the edges of features (like peaks).
look between edges for peaks, sort peaks ... | null | CC BY-SA 2.5 | null | 2008-09-02T01:00:13.913 | 2008-09-02T01:00:13.913 | null | null | 2,789 | null |
38,654 | 1 | 38,685 | null | 2 | 1,201 | I want to set all the fields and labels on a `VFP7` report to `Float` and `Stretch with overflow`. I tried Using the `.frx` file and doing the following `REPLACE` but it didn't work.
Is there some other field I need to change too?
```
REPLACE float WITH .T. FOR objtype = 8
```
| Automatically floating all fields in a VFP report? | CC BY-SA 4.0 | null | 2008-09-02T00:33:09.517 | 2019-06-28T04:54:40.673 | 2019-06-28T04:54:40.673 | 6,144,643 | 3,715 | [
"report",
"foxpro",
"visual-foxpro"
] |
38,636 | 2 | null | 38,598 | 2 | null | I have to second the comment by @Phil Bennett as I try to approach these integration tests with a rollback solution.
I have a very detailed post about integration testing your data access layer [here](https://stackoverflow.com/questions/12374/has-anyone-had-any-success-in-unit-testing-sql-stored-procedures#25204)
I s... | null | CC BY-SA 2.5 | null | 2008-09-01T23:54:30.933 | 2008-09-02T00:26:28.580 | 2017-05-23T12:33:26.220 | -1 | 2,701 | null |
38,666 | 2 | null | 38,664 | 7 | null | You mean change the text file before it's committed? You can (I'm not sure how), but it's generally not a good idea, as it doesn't tell the client about the change, so the local copies become void on a commit.
What I would do is block the commit (non zero exit), and give an error message as to why you don't want that... | null | CC BY-SA 2.5 | null | 2008-09-02T01:04:55.243 | 2017-07-27T17:01:28.403 | 2017-07-27T17:01:28.403 | 30 | 30 | null |
38,661 | 1 | 39,535 | null | 1 | 3,515 | Is there any way in IIS to map requests to a particular URL with no extension to a given application.
For example, in trying to port something from a Java servlet, you might have a URL like this...
[http://[server]/MyApp/HomePage?some=parameter](http://[server]/MyApp/HomePage?some=parameter)
Ideally I'd like to be a... | Can IIS 6 serve requests for pages with no extensions? | CC BY-SA 2.5 | null | 2008-09-02T00:52:31.840 | 2018-09-24T13:46:51.713 | 2018-09-24T13:46:51.713 | 7,881,947 | 797 | [
"iis",
"iis-6"
] |
38,665 | 2 | null | 38,596 | -1 | null | TBH, PHP probably isn't the best tool for this, really not what it was designed for. I've heard of memory leaks and other bad things happening when you try this. Also bear in mind PHP only has a finite amount of resource ids (for file handles, db connections ect) per execution of a script.
Be better of using something... | null | CC BY-SA 2.5 | null | 2008-09-02T01:03:45.760 | 2008-09-02T01:03:45.760 | null | null | 1,349,865 | null |
38,664 | 1 | 38,666 | null | 3 | 654 | I want to ran the following script on text files that are being committed:
```
# Send the commands H and w to ed
# ed will append newline if the file does not end in one
printf "%s\n" H w | ed -s $1
# Strip trailing whitespace
sed -i 's/[ \t]*$//g' $1
# Convert tabs to 4 spaces
sed -i -r "s/\t/ /g" $1
```
I see... | Can you modify text files when committing to subversion? | CC BY-SA 2.5 | 0 | 2008-09-02T01:01:56.310 | 2017-07-27T17:01:28.403 | 2008-09-02T04:50:38.460 | 305 | 486 | [
"svn",
"hook"
] |
38,659 | 2 | null | 38,645 | 2 | null | In C, a struct can have another struct as one of it's members. While this isn't exactly the same as what you're asking, you could end up either with a situation where one struct contains another, or one struct contains two structs, both of which hold parts of the info that you wanted.
psuedocode: i don't remember the... | null | CC BY-SA 2.5 | null | 2008-09-02T00:43:10.583 | 2008-09-02T00:43:10.583 | null | null | 1,266 | null |
38,669 | 1 | 580,095 | null | 7 | 9,444 | I'm not sure I'm using all the correct terminology here so be forgiving.
I just put up a site with a contact form that sends an email using the PHP mail() function. Simple enough. However the live site doesn't actually send the email, the test site does. So it's not my code.
It's a shared host and we have another si... | Does the PHP mail() function work if I don't own the MX record | CC BY-SA 2.5 | null | 2008-09-02T01:10:54.090 | 2010-05-28T10:00:34.153 | null | null | 910 | [
"php",
"dns"
] |
38,674 | 1 | 39,266 | null | 1 | 5,276 | Which databases does Adobe Flash support, if any?
| Does Adobe Flash support databases? | CC BY-SA 2.5 | null | 2008-09-02T01:15:47.383 | 2010-09-11T05:38:18.250 | 2009-02-16T14:14:12.920 | 2,025 | 184 | [
"database",
"flash",
"adobe"
] |
38,672 | 2 | null | 38,669 | 0 | null | Yes, you could put in what ever you want in the 'from' field and it would still work.
| null | CC BY-SA 2.5 | null | 2008-09-02T01:15:42.360 | 2008-09-02T01:15:42.360 | null | null | 2,976 | null |
38,673 | 2 | null | 23,930 | 2 | null |
# Scheme : Functional - Tail Recursive
```
(define (factorial n)
(define (fac-times n acc)
(if (= n 0)
acc
(fac-times (- n 1) (* acc n))))
(if (< n 0)
(display "Wrong argument!")
(fac-times n 1)))
```
| null | CC BY-SA 2.5 | null | 2008-09-02T01:15:44.157 | 2008-09-02T01:15:44.157 | null | null | 486 | null |
38,677 | 2 | null | 38,674 | 2 | null | Agree with @SCdF, create a service in php or any other language that takes a modified query from flash, executes it and returns the DB response. Make sure that it only takes a connection from its own local IP address or something like that to prevent "unintentional use".
| null | CC BY-SA 2.5 | null | 2008-09-02T01:24:30.610 | 2008-09-02T01:24:30.610 | null | null | 522 | null |
38,678 | 2 | null | 38,669 | 3 | null | Yes. It will work just fine. I have a PHP script using the mail() function with the MX records set to Google Apps.
If the two scripts are on different hosts (it's a bit unclear from your post), then make sure that the host doesn't block some of the custom headers. I had issues with this when creating my script, but re... | null | CC BY-SA 2.5 | null | 2008-09-02T01:24:33.993 | 2008-09-02T01:24:33.993 | null | null | 752 | null |
38,671 | 2 | null | 37,731 | 1 | null | I always find it much easier to work directly with html. Theres one less abstraction layer (html -> actual webpage / php function -> html -> actual webpage) to deal with then you just work in HTML.
I really think the 'just have to change it in one place' thing wont work in this case. This is because they'll be so many... | null | CC BY-SA 3.0 | null | 2008-09-02T01:10:55.773 | 2017-07-04T08:49:46.877 | 2017-07-04T08:49:46.877 | 5,423,108 | 1,349,865 | null |
38,675 | 2 | null | 38,674 | 5 | null | None.
Instead, you would need to create some middleware (say, a webservice) that you talked to that did the database CRUD for you.
| null | CC BY-SA 2.5 | null | 2008-09-02T01:17:57.300 | 2008-09-02T01:17:57.300 | null | null | 1,666 | null |
38,686 | 2 | null | 38,680 | 0 | null | Most web sites I've seen don't solve this problem - they show you a page including some content you've already seen.
You might consider that a feature - when you click "next" and see some content you're seen before, it's a signal that you want to go back to the front again because there's some new content.
| null | CC BY-SA 2.5 | null | 2008-09-02T01:30:00.080 | 2008-09-02T01:30:00.080 | null | null | 3,333 | null |
38,685 | 2 | null | 38,654 | 2 | null | It turns out you have to set `top` to `.F.` for `float` to take effect, this worked:
```
USE report.frx
REPLACE float with .T., stretch with .T., top with .F. for objtype = 8
```
| null | CC BY-SA 2.5 | null | 2008-09-02T01:29:23.653 | 2008-09-02T01:29:23.653 | null | null | 3,715 | null |
38,684 | 2 | null | 38,612 | 2 | null | I'm not sure it's the same issue, but I had a similar sounding issue with trying to bind a DropDownList that I wanted to contain in a GridView. When I looked around I found a lot of people asking similar questions, but no robust solutions. I did read conflicting reports about whether you could intercept databindin... | null | CC BY-SA 2.5 | null | 2008-09-02T01:28:28.447 | 2008-09-02T01:28:28.447 | null | null | 4,141 | null |
38,687 | 2 | null | 38,680 | 0 | null | Tag each question with its time entered into the database, carry the time the frontpage was last loaded as a cookie or part of the URL, and limit the search to items `n` through `n+displaynum` as you go forward.
But I wouldn't bother. This behavior is uniform enough that most users expect it, and it serves as a flag f... | null | CC BY-SA 2.5 | null | 2008-09-02T01:30:59.143 | 2008-09-02T01:30:59.143 | null | null | 2,509 | null |
38,670 | 1 | 38,704 | null | 32 | 55,472 | Ok, so, my visual studio is broken. I say this NOT prematurely, as it was my first response to see where I had messed up in my code. When I add controls to the page I can't reference all of them in the code behind. Some of them I can, it seems that the first few I put on a page work, then it just stops.
I first thoug... | ASP.NET controls cannot be referenced in code-behind in Visual Studio 2008 | CC BY-SA 3.0 | 0 | 2008-09-02T01:10:54.307 | 2017-12-14T10:08:53.623 | 2017-12-14T10:08:53.623 | 3,817,004 | 4,140 | [
"c#",
"asp.net",
"visual-studio"
] |
38,689 | 2 | null | 38,647 | 1 | null | The more code you can cover with compile time checking for me is something that I'd place a higher premium on than performance. Having said that at this stage I'd probably lean towards ESQL not just because of the performance, but it's also (at present) a lot more flexible in what it can do. There's nothing worse than ... | null | CC BY-SA 2.5 | null | 2008-09-02T01:33:45.343 | 2008-09-02T01:33:45.343 | null | null | 493 | null |
38,688 | 2 | null | 38,670 | 12 | null | Is the control that you are trying to reference inside of the repeater?
If so then you need to look them up using the FindControl method.
For example for:
```
<asp:Repeater ID="Repeater1" runat="server">
<ItemTemplate>
<asp:LinkButton ID="LinkButton1" runat="server">stest</asp:LinkButton>
</ItemTempl... | null | CC BY-SA 2.5 | null | 2008-09-02T01:31:22.760 | 2008-09-02T01:31:22.760 | null | null | 4,043 | null |
38,693 | 2 | null | 38,629 | 2 | null | In these days of , I'd say there's really no reason for you not to use a database.
I know this doesn't really answer your question, but I'd hate to see you roll out code that will be a nightmare to maintain and scale.
Maybe you could tell us why you want to use files instead of a proper database.
| null | CC BY-SA 3.0 | null | 2008-09-02T01:46:46.717 | 2017-07-04T08:44:31.097 | 2017-07-04T08:44:31.097 | 5,423,108 | 781 | null |
38,680 | 1 | 153,943 | null | 3 | 316 | Feel free to edit the title if you know how to formulate the question better. (Tagging is a problem as well.) The problem may be too difficult in this general form, so let us consider a concrete example.
You get a screenful of stackoverflow questions by requesting `/questions ?sort=newest` page. Next page link leads t... | How to provide next page of updated content? | CC BY-SA 2.5 | null | 2008-09-02T01:25:18.127 | 2008-09-30T16:48:56.947 | 2008-09-14T10:15:43.693 | 1 | 2,515 | [
"sql",
"paging"
] |
38,697 | 2 | null | 38,691 | 18 | null | Well, sysrqb will let you match anything in the first paragraph assuming there's no other html in the paragraph. You might want something more like this
```
<p>.*?</p>
```
Placing the `?` after your `*` makes it non-greedy, meaning it will only match as little text as necessary before matching the `</p>`.
| null | CC BY-SA 3.0 | null | 2008-09-02T01:48:04.593 | 2013-10-25T13:18:27.383 | 2013-10-25T13:18:27.383 | 1,401,975 | 1,862 | null |
38,703 | 2 | null | 9,033 | 2 | null | PreviousPage property:
"The System.Web.UI.Page representing the page that transferred control to the current page."
It is very useful.
| null | CC BY-SA 2.5 | null | 2008-09-02T02:10:06.660 | 2009-09-12T21:25:17.813 | 2009-09-12T21:25:17.813 | 63,550 | 3,245 | null |
38,698 | 2 | null | 36,701 | 54 | null | To address mutability concerns you can declare x and y as final. For example:
```
class Data {
public final int x;
public final int y;
public Data( int x, int y){
this.x = x;
this.y = y;
}
}
```
Calling code that attempts to write to these fields will get a compile time error of "field x is declared ... | null | CC BY-SA 2.5 | null | 2008-09-02T01:51:58.233 | 2008-10-15T03:58:41.340 | 2008-10-15T03:58:41.340 | 700 | 700 | null |
38,700 | 2 | null | 38,674 | 0 | null | [@SCdF](https://stackoverflow.com/questions/38674/does-adobe-flash-support-databases#38675) is correct. From [the horse's mouth](http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_14482&sliceId=2):
> A Macromedia Flash movie cannot
communicate directly with a database.
However, Macromedia Flash movies ca... | null | CC BY-SA 2.5 | null | 2008-09-02T02:02:24.980 | 2008-09-02T02:29:44.837 | 2017-05-23T12:33:27.093 | -1 | 369 | null |
38,682 | 2 | null | 38,598 | 6 | null | My automated functional tests usually follow one of two patters:
- -
When I have automated tests that are connected to the database, I usually make a single test database template that has enough data for all the tests. When the automated tests are run, a new test database is generated from the template for every... | null | CC BY-SA 2.5 | null | 2008-09-02T01:26:55.253 | 2008-09-02T01:26:55.253 | null | null | 3,547 | null |
38,705 | 2 | null | 38,629 | 0 | null | It would make deployment easier for clients that use go-daddy where the database isn't in the app_data folder. also backing up those websites would be as simple as FTP the entire thing.
I have concerns about possible collisions on saving. especially if I add something as simple as a click counter to say a list of mp3... | null | CC BY-SA 3.0 | null | 2008-09-02T02:17:51.200 | 2017-07-04T08:44:06.113 | 2017-07-04T08:44:06.113 | 5,423,108 | 3,747 | null |
38,704 | 2 | null | 38,670 | 17 | null | try clearing your local VS cache. find your project and delete the folder. the folder is created by VS for what reason I honestly don't understand. but I've had several occasions where clearing it and doing a re-build fixes things... hope this is all that you need as well.
here
```
%Temp%\VWDWebCache
```
and possib... | null | CC BY-SA 3.0 | null | 2008-09-02T02:12:06.830 | 2011-12-30T11:23:03.943 | 2011-12-30T11:23:03.943 | 41,956 | 3,747 | null |
38,696 | 2 | null | 38,691 | 1 | null | It would probably be easier and faster to use [strpos()](http://php.net/strpos) to find the position of the first
```
<p>
```
and first
```
</p>
```
then use [substr()](http://php.net/substr) to extract the paragraph.
```
$paragraph_start = strpos($blog_post, '<p>');
$paragraph_end = strpos($blog_post, '</p>', ... | null | CC BY-SA 2.5 | null | 2008-09-02T01:47:57.930 | 2008-09-02T05:06:32.870 | 2008-09-02T05:06:32.870 | 813 | 813 | null |
38,691 | 1 | 38,697 | null | 7 | 1,282 | Hey so what I want to do is snag the content for the first paragraph. The string `$blog_post` contains a lot of paragraphs in the following format:
```
<p>Paragraph 1</p><p>Paragraph 2</p><p>Paragraph 3</p>
```
The problem I'm running into is that I am writing a regex to grab everything between the first `<p>` tag a... | How to grab the contents of HTML tags? | CC BY-SA 3.0 | null | 2008-09-02T01:41:59.537 | 2017-12-16T22:53:30.190 | 2015-06-05T17:14:04.633 | 4,248,328 | 428,190 | [
"php",
"html",
"regex",
"html-parsing"
] |
38,710 | 2 | null | 29,511 | 5 | null | To summarize:
This behavior will be going away in version 1.9, in which the character itself is returned, but in previous versions, trying to reference a single character of a string by its character position will return its character value (so "ABC"[2] returns 67)
There are a number of methods that return a range o... | null | CC BY-SA 3.0 | null | 2008-09-02T02:26:30.193 | 2015-02-11T21:28:18.157 | 2015-02-11T21:28:18.157 | 82,118 | 4,142 | null |
38,708 | 2 | null | 8,451 | 8 | null | On Unix systems you can use [mlock(2)](http://linux.die.net/man/2/mlock) to lock memory pages into RAM, preventing them being paged.
> mlock() and mlockall() respectively lock part or all of the calling
process’s virtual address space into RAM, preventing that memory from
being paged to the swap area.
There is a ... | null | CC BY-SA 2.5 | null | 2008-09-02T02:25:23.350 | 2008-09-02T02:25:23.350 | null | null | 954 | null |
38,717 | 2 | null | 23,930 | 9 | null | Batch (NT):
```
@echo off
set n=%1
set result=1
for /l %%i in (%n%, -1, 1) do (
set /a result=result * %%i
)
echo %result%
```
Usage:
C:>factorial.bat 15
| null | CC BY-SA 2.5 | null | 2008-09-02T02:31:46.797 | 2008-09-02T02:31:46.797 | null | null | 3,950 | null |
38,712 | 2 | null | 38,596 | 1 | null | I've had success with running a wget and sending the result to /dev/null on a shared server.
| null | CC BY-SA 2.5 | null | 2008-09-02T02:28:05.980 | 2008-09-02T02:28:05.980 | null | null | 416 | null |
38,711 | 2 | null | 16,100 | 238 | null | Note that the performance of `Enum.Parse()` is not ideal, because it is implemented via reflection. (The same is true of `Enum.ToString()`, which goes the other way.)
If you need to convert strings to Enums in performance-sensitive code, your best bet is to create a `Dictionary<String,YourEnum>` at startup and use that... | null | CC BY-SA 4.0 | null | 2008-09-02T02:27:07.447 | 2022-11-19T23:11:54.320 | 2022-11-19T23:11:54.320 | 1,546,145 | 3,776 | null |
38,716 | 2 | null | 38,005 | 1 | null | LINQ to SQL doesn't really have a n-tier story that I've seen, since the objects that it creates are created in the class with the rest of it, you don't really have an assembly that you can nicely reference through something like Web Services, etc.
The only way I'd really consider it is using the datacontext to fetch ... | null | CC BY-SA 2.5 | null | 2008-09-02T02:30:49.857 | 2008-09-02T02:30:49.857 | null | null | 3,717 | null |
38,725 | 2 | null | 37,764 | 2 | null | Last time I checked, you could use the [module builder](http://developers.sugarcrm.com/tutorials/Customizing_Sugar/4/) to extend the interface. From 5.0 (or maybe 4.x) on, Sugar added all those APIs, which should enable you to extend SugarCRM without hacking it in and losing it with the next upgrade.
Hope that helps!
| null | CC BY-SA 2.5 | null | 2008-09-02T02:37:08.907 | 2011-03-15T21:59:57.057 | 2011-03-15T21:59:57.057 | 496,830 | 2,859 | null |