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
30,004
1
30,388
null
6
1,941
I'm creating a small database application to teach myself the following concepts 1. C# programming 2. .Net 3.5 framework 3. WPF 4. LINQ ORM I want to use Microsoft Access as the database but I can't seem to find any mention of whether its possible to use SQLMetal to generate the ORM code from a Microsoft Access da...
Can you use LINQ tools such as SQLMetal with an access database?
CC BY-SA 3.0
null
2008-08-27T12:51:57.353
2017-08-04T14:13:03.640
2017-08-04T14:13:03.640
1,836,618
87,645
[ "c#", "linq-to-sql", "ms-access" ]
30,007
2
null
29,988
-2
null
``` MailMessage msg = new MailMessage("someone@foo.com", "someoneelse@bar.com"); msg.Subject = "Check it out!"; msg.Body = "Visit stackoverflow.com!"; SmtpClient client = new SmtpClient("some.smtp.server", 25); client.Send(msg); ```
null
CC BY-SA 2.5
null
2008-08-27T12:53:31.670
2008-08-27T12:53:31.670
null
null
1,196
null
29,987
2
null
29,943
66
null
IMO, this is the cleanest answer: ``` <form action="" method="get"> Name: <input type="text" name="name"/><br/> Pwd: <input type="password" name="password"/><br/> <div class="yourCustomDiv"/> <input type="submit" style="display:none"/> </form> ``` Better yet, if you are using javascript to submit the...
null
CC BY-SA 3.0
null
2008-08-27T12:38:30.893
2016-12-03T18:30:33.503
2017-05-23T10:31:39.507
-1
96
null
30,012
2
null
30,005
215
null
Have you tried: ``` $("#iFrameId").on("load", function () { // do something once the iframe is loaded }); ```
null
CC BY-SA 3.0
null
2008-08-27T12:55:50.667
2014-07-05T16:00:50.010
2014-07-05T16:00:50.010
1,414
1,414
null
30,008
2
null
29,995
3
null
There are some good examples of simple-ish programming questions in Steve Yegge's article [Five Essential Phone Screen Questions](http://steve.yegge.googlepages.com/five-essential-phone-screen-questions) (under Area Number One: Coding). I find these are pretty good for doing on pen and paper. Also, the questions under ...
null
CC BY-SA 2.5
null
2008-08-27T12:53:38.550
2008-08-27T12:53:38.550
null
null
1,912
null
30,016
2
null
30,003
0
null
Maybe you're not getting an exact match because the browser is lower-casing the entity or something. Try using a carat (^) and lower-case "v" just for testing. Edited - My first theory was plain wrong.
null
CC BY-SA 2.5
null
2008-08-27T12:59:46.337
2008-08-27T13:11:58.583
2008-08-27T13:11:58.583
619
619
null
30,003
1
30,020
null
11
7,195
I have the following html code: ``` <h3 id="headerid"><span onclick="expandCollapse('headerid')">&uArr;</span>Header title</h3> ``` I would like to toggle between up arrow and down arrow each time the user clicks the span tag. ``` function expandCollapse(id) { var arrow = $("#"+id+" span").html(); // I hav...
How to compare an html entity with jQuery
CC BY-SA 3.0
0
2008-08-27T12:51:26.073
2015-11-20T11:37:44.667
2015-11-20T11:37:44.667
3,218,692
2,138
[ "javascript", "jquery", "html-entities" ]
30,013
2
null
30,003
1
null
Check out the [.toggle()](http://docs.jquery.com/Effects/toggle) effect. Here is something similar i was playing with earlier. HTML: ``` <div id="inplace"> <div id="myStatic">Hello World!</div> <div id="myEdit" style="display: none"> <input id="myNewTxt" type="text" /> <input id="myOk" type="button" value="OK" /> <i...
null
CC BY-SA 3.0
null
2008-08-27T12:57:15.810
2013-06-08T18:46:19.410
2013-06-08T18:46:19.410
2,287,470
1,293
null
30,017
2
null
30,004
1
null
AFAIK, Linq to SQL is MSSQL server provider specific. To be honest, SQL Express is pretty lightweight on todays machines. BTW don't confuse LINQ with Linq to SQL. Linq is the underlying technology to provide "query" like support to .NET (amongst other things), where as L2S is effectively a Data Access technology built...
null
CC BY-SA 2.5
null
2008-08-27T13:00:22.963
2008-08-27T13:00:22.963
null
null
1,075
null
29,985
2
null
29,869
38
null
If you on using a regex, something like this will work in most cases: ``` # Remove all HTML except "p" tags $html =~ s{<(?>/?)(?:[^pP]|[pP][^\s>/])[^>]*>}{}g; ``` Explanation: ``` s{ < # opening angled bracket (?>/?) # ratchet past optional / (?: [^pP] # non-p tag | ...
null
CC BY-SA 2.5
null
2008-08-27T12:31:35.513
2008-08-27T13:46:34.413
2008-08-27T13:46:34.413
164
164
null
30,021
2
null
30,018
4
null
``` //author[contains(text(), 'Ritchie')] ```
null
CC BY-SA 3.0
null
2008-08-27T13:03:23.253
2012-06-20T14:24:13.123
2012-06-20T14:24:13.123
183,791
96
null
30,019
2
null
30,018
4
null
The XPath for this is: ``` /books/book/authors/author[contains(., 'Ritchie')] ``` In C# the following code would return "Ritchie, Dennis M.": ``` xmlDoc.SelectSingleNode("/books/book/authors/author[contains(., 'Ritchie')]").InnerText; ```
null
CC BY-SA 2.5
null
2008-08-27T13:03:01.757
2008-08-27T14:05:40.450
2008-08-27T14:05:40.450
1,523
1,523
null
30,014
2
null
30,004
1
null
I don't think SQL Express would be overkill if you want to learn real-world skills - quite the opposite in fact! That'd be my choice, and whatever I chose, I'd stay clear of Access. Good luck
null
CC BY-SA 2.5
null
2008-08-27T12:58:34.653
2008-08-27T12:58:34.653
null
null
3,201
null
30,022
2
null
29,700
1
null
Programming WPF by Chris Sells and Ian Griffiths is an excellent way to learn WPF. 5 star rated on Amazon with 50+ reviews. [http://www.amazon.com/Programming-WPF-Chris-Sells/dp/0596510373](https://rads.stackoverflow.com/amzn/click/com/0596510373)
null
CC BY-SA 2.5
null
2008-08-27T13:03:38.900
2008-08-27T13:03:38.900
null
null
3,194
null
30,018
1
30,023
null
16
11,757
How can I use XPath to select an XML-node based on its content? If I e.g. have the following xml and I want to select the <author>-node that contains Ritchie to get the author's full name: ``` <books> <book isbn='0131103628'> <title>The C Programming Language</title> <authors> <author...
How do I select an XML-node based on its content?
CC BY-SA 3.0
0
2008-08-27T13:01:25.770
2012-06-20T14:24:13.123
2011-09-02T08:06:15.887
1,523
1,523
[ "xml", "xpath" ]
30,023
2
null
30,018
23
null
``` /books/book/authors/author[contains(., 'Ritchie')] ``` or ``` //author[contains(., 'Ritchie')] ```
null
CC BY-SA 2.5
null
2008-08-27T13:04:16.217
2008-08-27T13:09:53.317
2008-08-27T13:09:53.317
1,196
1,196
null
30,026
1
30,034
null
10
1,417
I've seen a lot of commonality in regex capabilities of different regex-enabled tools/languages (e.g. perl, sed, java, vim, etc), but I've also many differences. Is there a subset of regex capabilities that all regex-enabled tools/languages will support? How do regex capabilities vary between tools/languages?
Features common to all regex flavors?
CC BY-SA 2.5
0
2008-08-27T13:05:38.600
2009-11-23T02:22:36.737
2009-05-18T23:01:45.637
20,938
2,045
[ "regex", "language-agnostic" ]
30,029
2
null
24,212
4
null
You're doing it wrong if you are generating pixmaps inside any of the delegate methods (paint, draw...). Try to generate the thumbnails only once (on worker thread or maybe not even at runtime, if possible) and have the delegate just display them for the appropriate role. If you do it at runtime display a default pictu...
null
CC BY-SA 2.5
null
2008-08-27T13:06:36.647
2008-08-27T13:06:36.647
null
null
1,065
null
30,031
2
null
29,461
2
null
Include an example of how making Java code more groovy takes away soooo much code. Wait for them to pick their jaws up off of the floor before continuing. Scott Davis has a simple example at the beginning of Groovy Recipes that takes 35 lines of Java or 3 lines of Groovy.
null
CC BY-SA 2.5
null
2008-08-27T13:07:33.180
2008-08-27T13:07:33.180
null
null
3,014
null
30,020
2
null
30,003
17
null
When the HTML is parsed, what JQuery sees in the DOM is a `UPWARDS DOUBLE ARROW` ("⇑"), not the entity reference. Thus, in your Javascript code you should test for `"⇑"` or `"\u21d1"`. Also, you need to change what you're switching to: ``` function expandCollapse(id) { var arrow = $("#"+id+" span").html(); if(...
null
CC BY-SA 2.5
null
2008-08-27T13:03:20.977
2008-08-27T13:19:35.303
2008-08-27T13:19:35.303
2,679
2,679
null
30,028
2
null
4,689
0
null
Consolas all the way.
null
CC BY-SA 2.5
null
2008-08-27T13:06:25.790
2008-08-27T13:06:25.790
null
null
2,437
null
30,032
2
null
30,026
12
null
[http://en.wikipedia.org/wiki/Comparison_of_regular_expression_engines](http://en.wikipedia.org/wiki/Comparison_of_regular_expression_engines) Even more detailed: [http://www.regular-expressions.info/refflavors.html](http://www.regular-expressions.info/refflavors.html)
null
CC BY-SA 2.5
null
2008-08-27T13:07:45.240
2008-08-27T13:07:45.240
null
null
1,065
null
30,025
2
null
29,971
1
null
The approach I favour is the following setup (Actually assuming you are in a .NET project): - - - - - - - On many projects you find that there are different levels of tests and activities which take place when someone does a checkin. Sometimes these can increase in time to the point where it can be a long time after...
null
CC BY-SA 2.5
null
2008-08-27T13:05:02.703
2008-08-27T13:05:02.703
null
null
1,120
null
30,010
2
null
29,993
1
null
What do you want to achieve? Is this a question how video container types are structured? See for example : [http://www.daubnet.com/formats/AVI.html](http://www.daubnet.com/formats/AVI.html) That is a description how avi files are structured. Google may help you in finding other container file formats. When you rec...
null
CC BY-SA 2.5
null
2008-08-27T12:55:43.100
2008-08-27T16:38:09.773
2008-08-27T16:38:09.773
3,186
3,186
null
30,034
2
null
30,026
12
null
Compare Regular Expression Flavors [http://www.regular-expressions.info/refflavors.html](http://www.regular-expressions.info/refflavors.html)
null
CC BY-SA 2.5
null
2008-08-27T13:08:30.010
2008-08-27T13:08:30.010
null
null
1
null
30,036
1
30,197
null
154
165,907
Is there some way to do multi-threading in JavaScript?
JavaScript and Threads
CC BY-SA 2.5
0
2008-08-27T13:09:10.760
2021-10-28T23:01:31.250
2009-06-16T17:23:54.410
16,587
184
[ "javascript", "multithreading" ]
30,044
2
null
29,869
1
null
You also might want to allow for whitespace before the "p" in the p tag. Not sure how often you'll run into this, but < p> is perfectly valid HTML.
null
CC BY-SA 2.5
null
2008-08-27T13:11:04.547
2008-08-27T13:11:04.547
null
null
1,862
null
30,050
2
null
30,036
11
null
There's no true threading in JavaScript. JavaScript being the malleable language that it is, does allow you to emulate some of it. Here is an [example](http://www.neilmix.com/2007/02/07/threading-in-javascript-17/) I came across the other day.
null
CC BY-SA 3.0
null
2008-08-27T13:13:46.987
2014-03-25T07:53:23.193
2014-03-25T07:53:23.193
60,281
2,491
null
30,043
2
null
30,036
3
null
In raw Javascript, the best that you can do is using the few asynchronous calls (xmlhttprequest), but that's not really threading and very limited. [Google Gears](http://gears.google.com/) adds a number of APIs to the browser, some of which can be used for threading support.
null
CC BY-SA 2.5
null
2008-08-27T13:10:51.300
2008-08-27T13:10:51.300
null
null
1,432
null
30,051
2
null
29,995
12
null
I've been working on [http://projecteuler.net/](http://projecteuler.net/)
null
CC BY-SA 2.5
null
2008-08-27T13:13:49.437
2008-08-27T13:13:49.437
null
null
1,490
null
30,039
2
null
30,003
1
null
Use a class to signal the current state of the span. The html could look like this ``` <h3 id="headerId"><span class="upArrow">&uArr;</span>Header title</h3> ``` Then in the javascript you do ``` $( '.upArrow, .downArrow' ).click( function( span ) { if ( span.hasClass( 'upArrow' ) ) span.text( "&dArr;"...
null
CC BY-SA 2.5
null
2008-08-27T13:10:06.747
2008-08-27T13:10:06.747
null
null
550
null
30,047
2
null
29,995
1
null
Quite a few online sites for competitive programming are full of sample questions/challenges, sorted by 'difficulty'. Quite often, the simpler categories in the 'algorithms' questions would suit you I think. For example, check out [TopCoder](http://www.topcoder.com/) (algorithms section)! Apart from that, 2 samples: ...
null
CC BY-SA 2.5
null
2008-08-27T13:12:32.623
2008-08-27T13:12:32.623
null
null
2,638
null
30,055
2
null
29,980
0
null
You can put the Foo instances in a list and compare the objects with what you read: ``` var arrFoos = new Foos[]{...}; // what you expect var expectedFoos = new List<Foo>(arrFoos); // make a list from the hardcoded array of expected Foos var readerResult = ReadEntireList(reader); // read everything from reader and p...
null
CC BY-SA 2.5
null
2008-08-27T13:15:01.353
2008-08-27T13:15:01.353
null
null
1,065
null
30,054
2
null
30,026
1
null
If you took the grep regexp grammar, not the egrep one, or the sed regexp grammar and used that you should be using a safe subset across many platforms and tools. About the only thing that may bite you then is when you go shift between regexp implementations using Finite State Automatons (FSA) and ones using backtrack...
null
CC BY-SA 2.5
null
2008-08-27T13:14:23.897
2009-11-23T02:22:36.737
2009-11-23T02:22:36.737
22,364
2,974
null
30,060
2
null
29,943
0
null
If you are using asp.net you can use the [defaultButton](http://msdn.microsoft.com/en-us/library/system.web.ui.htmlcontrols.htmlform.defaultbutton(VS.80).aspx) attribute on the form.
null
CC BY-SA 2.5
null
2008-08-27T13:16:27.667
2008-08-27T13:16:27.667
null
null
1,736
null
30,061
2
null
29,995
1
null
I also like project euler, but I would like to point out that the questions get really tricky really fast. After the first 20 questions or so, they start to be problems most people won't be able to figure out in 1/2 an hour. Another problem is that a lot of them deal with math with really large numbers, that don't fi...
null
CC BY-SA 2.5
null
2008-08-27T13:16:29.947
2008-08-27T13:16:29.947
null
null
1,862
null
30,064
2
null
30,026
0
null
There's no standard engine. However, the POSIX Extended Regular Expression format is a valid subset of most engines and is probably as close as you'll get to a standardised subset.
null
CC BY-SA 2.5
null
2008-08-27T13:17:22.953
2008-08-27T13:17:22.953
null
null
null
null
30,058
1
30,079
null
70
99,047
The [Apple Developer Documentation](http://developer.apple.com/documentation/AppleApplications/Reference/SafariWebContent/UsingiPhoneApplications/chapter_6_section_4.html) (link is dead now) explains that if you place a link in a web page and then click it whilst using Mobile Safari on the iPhone, the Google Maps appli...
How can I launch the Google Maps iPhone application from within my own native application?
CC BY-SA 3.0
0
2008-08-27T13:15:40.493
2019-04-07T12:07:38.073
2017-09-18T11:18:24.107
1,000,551
2,183
[ "ios", "objective-c", "google-maps" ]
30,062
1
30,072
null
149
212,204
Yesterday I wanted to add a boolean field to an Oracle table. However, there isn't actually a boolean data type in Oracle. Does anyone here know the best way to simulate a boolean? Googling the subject discovered several approaches 1. Use an integer and just don't bother assigning anything other than 0 or 1 to it....
Boolean Field in Oracle
CC BY-SA 2.5
0
2008-08-27T13:16:58.883
2016-10-04T17:07:00.250
2015-12-18T06:30:41.997
3,989,608
1,694
[ "oracle", "boolean", "sqldatatypes" ]
30,065
2
null
1,390
1
null
Server Core won't be very useful (to me at least, and I think many others as well) until they get a version of .Net framework on it. Maybe a specialized subset like they have in the Compact Framework on smart phones.
null
CC BY-SA 2.5
null
2008-08-27T13:17:55.963
2008-08-27T13:17:55.963
null
null
3,043
null
30,069
2
null
30,062
1
null
In our databases we use an enum that ensures we pass it either TRUE or FALSE. If you do it either of the first two ways it is too easy to either start adding new meaning to the integer without going through a proper design, or ending up with that char field having Y, y, N, n, T, t, F, f values and having to remember w...
null
CC BY-SA 2.5
null
2008-08-27T13:22:06.610
2008-08-27T13:22:06.610
null
null
75
null
30,049
1
45,869
null
8
371
I got embroiled in a discussion about DOM implementation quirks yesterday, with gave rise to an interesting question regarding Text.splitText and Element.normalise behaviours, and how they should behave. In [DOM Level 1 Core](http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html), Text.splitText is de...
Should DOM splitText and normalise compose to give the identity?
CC BY-SA 2.5
0
2008-08-27T13:13:34.600
2019-12-27T09:17:56.000
2019-12-27T09:17:56.000
1,200
1,200
[ "xml", "dom" ]
30,066
1
null
null
10
20,519
I'm looking for a way to redirect all the stderr streams in interactive bash (ideally to its calling parent process). I don't want to redirect stderr stream from each individual command, which I could do by appending `2> a_file` to each command. By default, these stderr streams are redirected to the stdout of an inte...
How to redirect all stderr in bash?
CC BY-SA 2.5
null
2008-08-27T13:19:17.100
2013-08-07T02:04:45.327
2009-04-08T19:35:12.253
2,284
1,044
[ "linux", "bash", "shell" ]
30,078
2
null
30,067
4
null
Unless the developers you are working with are familiar with MVC pattern I wouldn't. At a minimum I'd talk with them first before making such a big change.
null
CC BY-SA 2.5
null
2008-08-27T13:24:58.973
2008-08-27T13:24:58.973
null
null
1,433
null
30,077
2
null
29,927
1
null
Have discovered that this only occurs when the script is run on a different drive to the one where the EXE is located. As a work around for this I have simply moved the scripts execution. Apparently the DLL relates to SSL, which isn't relevant to what I'm doing, so this is a suitable workaround. I'm guessing that th...
null
CC BY-SA 2.5
null
2008-08-27T13:24:28.850
2008-08-27T13:24:28.850
null
null
1,755
null
30,057
2
null
30,026
1
null
Most regular expression tools/languages support these [basic capabilities](http://www.regular-expressions.info/reference.html): 1. Character Classes/Sets and their Negation - [] 2. Anchors - ^$ 3. Alternation - | 4. Quantifiers - ?+*{n,m} 5. Metacharacters - \w, \s, \d, ... 6. Backreferences - \1, \2, ... 7. Dot - . ...
null
CC BY-SA 2.5
null
2008-08-27T13:15:30.370
2008-08-27T13:20:56.237
2008-08-27T13:20:56.237
792
792
null
30,080
1
30,109
null
35
17,644
I have two points (a line segment) and a rectangle. I would like to know how to calculate if the line segment intersects the rectangle.
How to know if a line intersects a plane in C#?
CC BY-SA 3.0
0
2008-08-27T13:26:56.113
2018-03-04T19:51:54.463
2018-03-04T13:22:35.773
3,924,118
623
[ "c#", "geometry", "2d", "computational-geometry" ]
30,033
2
null
30,003
3
null
If you do an alert of `arrow` what does it return? Does it return the exact string that you're matching against? If you are getting the actual characters `'⇓'` and `'⇑'` you may have to match it against `"\u21D1"` and `"\u21D3"`. Also, you may want to try `&#8657;` and `&#8659;` since not all browsers support those en...
null
CC BY-SA 3.0
null
2008-08-27T13:07:58.297
2011-12-26T19:40:30.550
2011-12-26T19:40:30.550
1,414
1,414
null
30,074
1
30,090
null
13
5,413
We have several .NET applications that monitor a directory for new files, using FileSystemWatcher. The files are copied from another location, uploaded via FTP, etc. When they come in, the files are processed in one way or another. However, one problem that I have never seen a satisfactory answer for is: for large file...
Monitoring files - how to know when a file is complete
CC BY-SA 2.5
0
2008-08-27T13:23:35.763
2022-03-15T16:39:29.247
null
null
2,144
[ ".net", "filesystems" ]
30,085
2
null
30,066
4
null
You could launch a new bash process redirecting the stderr of that process: ``` $ bash -i 2> stderr.log $ ```
null
CC BY-SA 2.5
null
2008-08-27T13:27:48.217
2008-08-27T13:27:48.217
null
null
2,406
null
30,084
2
null
30,067
1
null
I wouldn't recommend just making the switch on an existing project. Perhaps start a small "demo" project that the team can use to experiment with the technology and (if necessary) learn what they need to and demonstrate to management that it is worthwhile to make the switch. In the end, even the dev team might realize ...
null
CC BY-SA 2.5
null
2008-08-27T13:27:43.413
2008-08-27T13:27:43.413
null
null
572
null
30,083
2
null
29,700
4
null
Sacha Barber has a great series of articles on WPF for Beginners over at Codeproject that you can check out. - [An Introduction to the WPF Layout System](http://www.codeproject.com/KB/WPF/BeginWPF1.aspx)- [An introduction into XAML / code and WPF resources](http://www.codeproject.com/KB/WPF/BeginWPF2.aspx)- [An introd...
null
CC BY-SA 2.5
null
2008-08-27T13:27:27.783
2008-08-27T13:27:27.783
null
null
2,016
null
30,072
2
null
30,062
84
null
I found [this](http://www.techrepublic.com/article/oracle-tip-choosing-an-efficient-design-for-boolean-column-values/) link useful. Here is the paragraph highlighting some of the pros/cons of each approach. > The most commonly seen design is to imitate the many Boolean-like flags that Oracle's data dictionary views...
null
CC BY-SA 3.0
null
2008-08-27T13:23:06.247
2015-08-19T23:35:44.170
2015-08-19T23:35:44.170
811
1,223
null
30,090
2
null
30,074
1
null
Have you tried getting a write lock on the file? If it's being written to, that should fail, and you know to leave it alone for a bit...
null
CC BY-SA 2.5
null
2008-08-27T13:28:47.933
2008-08-27T13:28:47.933
null
null
96
null
30,067
1
52,893
null
52
9,737
I just listened to the StackOverflow team's 17th podcast, and they talked so highly of [ASP.NET MVC](http://www.asp.net/mvc/) that I decided to check it out. But first, I want to be sure it's worth it. I already created a base web application (for other developers to build on) for a project that's starting in a few da...
Should I migrate to ASP.NET MVC?
CC BY-SA 3.0
0
2008-08-27T13:20:15.287
2012-07-13T06:40:24.413
2012-07-13T06:40:24.413
727,208
1,782
[ "asp.net-mvc" ]
30,092
2
null
30,074
2
null
You probably have to go with some out of band signaling: have the producer of "file.ext" write a dummy "file.ext.end".
null
CC BY-SA 2.5
null
2008-08-27T13:29:13.503
2008-08-27T13:29:13.503
null
null
1,065
null
30,091
2
null
30,062
25
null
To use the least amount of space you should use a CHAR field constrained to 'Y' or 'N'. Oracle doesn't support BOOLEAN, BIT, or TINYINT data types, so CHAR's one byte is as small as you can get.
null
CC BY-SA 2.5
null
2008-08-27T13:29:07.233
2008-08-27T13:29:07.233
null
null
1,288
null
30,093
2
null
26,094
3
null
Doing your own BigNum library is complicated, so i'd say like jjnguy. Use whatever your language offers as libraries. In .net, reference the VisualJ dll as they contain the BigInteger and BigDecimal classes. You should however be aware of some limitations of these libraries, like the lack of a square root method, for ...
null
CC BY-SA 2.5
null
2008-08-27T13:29:33.237
2008-08-27T13:29:33.237
null
null
3,204
null
30,097
2
null
30,067
9
null
I would create a test site first, and see what the team thinks, but for me I wouldn't go back to WebForms after using MVC. Some people don't like code mixed with HTML, and I can understand that, but I far prefer the flexibility over things like Page Lifecycle, rendering HTML and biggy for me - no viewstate cruft embed...
null
CC BY-SA 2.5
null
2008-08-27T13:31:01.457
2008-08-27T13:31:01.457
null
null
1,075
null
30,098
2
null
30,080
3
null
Do [http://mathworld.wolfram.com/Line-LineIntersection.html](http://mathworld.wolfram.com/Line-LineIntersection.html) for the line and each side of the rectangle. Or: [http://mathworld.wolfram.com/Line-PlaneIntersection.html](http://mathworld.wolfram.com/Line-PlaneIntersection.html)
null
CC BY-SA 2.5
null
2008-08-27T13:31:07.023
2008-08-27T13:31:07.023
null
null
1,065
null
30,079
2
null
30,058
65
null
For iOS 5.1.1 and lower, use the `openURL` method of `UIApplication`. It will perform the normal iPhone magical URL reinterpretation. so ``` [someUIApplication openURL:[NSURL URLWithString:@"http://maps.google.com/maps?q=London"]] ``` should invoke the Google maps app. From iOS 6, you'll be invoking Apple's own Map...
null
CC BY-SA 3.0
null
2008-08-27T13:26:18.517
2012-09-17T17:12:05.813
2012-09-17T17:12:05.813
1,200
1,200
null
30,089
2
null
29,995
5
null
If you want a pen and paper kind of exercises I'd recommend more designing than coding. Actually coding in paper sucks and it lets you learn almost nothing. Work environment does matter so typing on a computer, compiling, seeing what errors you've made, using refactor here and there, just doesn't compare to what you c...
null
CC BY-SA 4.0
null
2008-08-27T13:28:34.300
2018-07-13T12:13:08.593
2018-07-13T12:13:08.593
9,959,912
2,695
null
30,088
2
null
30,066
10
null
Use the `exec` builtin in bash: `exec 2> /tmp/myfile`
null
CC BY-SA 2.5
null
2008-08-27T13:28:17.687
2008-08-27T13:28:17.687
null
null
2,794
null
30,094
1
null
null
7
2,247
I have a table with many millions of rows. I need to find all the rows with a specific column value. That column is not in an index, so a table scan results. But would it be quicker to add an index with the column at the head (prime key following), do the query, then drop the index? I can't add an index permanently a...
Table Scan vs. Add Index - which is quicker?
CC BY-SA 2.5
null
2008-08-27T13:30:20.957
2013-06-25T20:07:38.877
2013-06-25T20:07:38.877
426,671
1,223
[ "sql", "database", "optimization", "indexing" ]
30,103
2
null
30,074
3
null
The "Changed" event on the FileSystemWatcher should shouldn't fire until the file is closed. See my [answer to a similar question](https://stackoverflow.com/questions/24315/is-it-possible-to-raise-an-event-when-a-file-becomes-accessible). There is a possibility that the FTP download mechanism closes the file multiple...
null
CC BY-SA 2.5
null
2008-08-27T13:31:54.213
2008-08-27T13:31:54.213
2017-05-23T12:08:59.250
-1
1,862
null
30,105
2
null
30,094
2
null
Adding an index requires a table scan, so if you can't add a permanent index it sounds like a single scan will be (slightly) faster.
null
CC BY-SA 2.5
null
2008-08-27T13:32:37.380
2008-08-27T13:32:37.380
null
null
1,288
null
30,099
1
30,186
null
4
934
In my browsings amongst the Internet, I came across [this post](http://www.reddit.com/r/programming/comments/6y6lr/ask_proggit_which_is_more_useful_to_know_c_or_java/), which includes this > "(Well written) C++ goes to great lengths to make stack automatic objects work "just like" primitives, as reflected in Str...
C++ - What does "Stack automatic" mean?
CC BY-SA 2.5
null
2008-08-27T13:31:21.687
2010-12-01T22:45:03.273
null
null
841
[ "c++", "oop" ]
30,101
1
30,114
null
65
67,487
In my work I deal mostly with C# code nowadays, with a sprinkle of java from time to time. What I absolutely love about Eclipse (and I know people using it daily love it even more) is a sophisticated code formatter, able to mould code into any coding standard one might imagine. Is there such a tool for C#? Visual Studi...
Is there an automatic code formatter for C#?
CC BY-SA 2.5
0
2008-08-27T13:31:24.747
2020-06-13T18:51:57.390
2008-09-12T21:14:13.003
-1
3,205
[ "c#", "formatting", "build-automation" ]
30,106
2
null
30,074
5
null
If you are in control on the program that is writing the files into the directory, you can have the program write the files to a temporary directory and then move them into the watched directory. The move should be an atomic operation, so the watcher shouldn't see the file until it is fully in the directory. If you a...
null
CC BY-SA 2.5
null
2008-08-27T13:32:53.573
2008-08-27T13:32:53.573
null
null
75
null
30,111
2
null
30,101
2
null
Not directly, but I use the [Agent Smith](http://www.agentsmithplugin.com/) plugin for R# to do this. Unfortunately, R# isn't free.
null
CC BY-SA 2.5
null
2008-08-27T13:33:51.370
2008-08-27T13:33:51.370
null
null
1,075
null
30,115
2
null
30,094
2
null
It wouldn't be. Creating an index is more complex than simply scanning the column, even if the computational complexity is the same. That said - how many columns do you have? Are you sure you can't just create an index for each of them if the query time for a single find is too long?
null
CC BY-SA 2.5
null
2008-08-27T13:34:54.627
2008-08-27T13:34:54.627
null
null
3,205
null
30,116
2
null
30,067
1
null
I dont´t know ASP.NET MVC, but I am very familiar with MVC pattern. I don´t see another way to build professional applications without MVC. And it has to be MVC model 2, like Spring or Struts. By the way, how you people were building web applications without MVC? When you have a situation that some kind of validation i...
null
CC BY-SA 2.5
null
2008-08-27T13:35:07.513
2008-08-27T13:35:07.513
null
null
3,221
null
30,118
2
null
30,094
8
null
I'm no DBA, but I would guess that building the index would require scanning the table anyway. Unless there are going to be multiple queries on that column, I would recommend not creating the index. Best to check the explain plans/execution times for both ways, though!
null
CC BY-SA 2.5
null
2008-08-27T13:36:07.793
2008-08-27T13:36:07.793
null
null
3
null
30,120
2
null
30,062
4
null
The database I did most of my work on used 'Y' / 'N' as booleans. With that implementation, you can pull off some tricks like: 1. Count rows that are true: SELECT SUM(CASE WHEN BOOLEAN_FLAG = 'Y' THEN 1 ELSE 0) FROM X 2. When grouping rows, enforce "If one row is true, then all are true" logic: SELECT MAX(BOOLEAN_FLA...
null
CC BY-SA 2.5
null
2008-08-27T13:36:23.533
2008-08-27T13:36:23.533
null
null
1,373
null
30,096
2
null
29,044
6
null
In the context of a programming forum, we don't usually think of the programmer also needing the application portion of the database. Normally a wants to use their own development environment for the business logic and front end, and just use the store, query, retrieval, and data processing capabilities of the databa...
null
CC BY-SA 2.5
null
2008-08-27T13:30:43.297
2009-07-09T15:17:30.590
2009-07-09T15:17:30.590
3,043
3,043
null
30,107
2
null
30,094
2
null
No, that would not be quicker. What would be quicker is to just add the index and leave it there! Of course, it may not be practical to index every column, but then again it may. How is data added to the table?
null
CC BY-SA 2.5
null
2008-08-27T13:33:03.230
2008-08-27T13:33:03.230
null
null
3,043
null
30,122
2
null
29,383
-6
null
As long as strings can be viewed directly as a char array it's going to be really hard to convince me that `std::string` represents strings as first class citizens in C++. Besides, combining allocation and boundedness seems to be a bad idea to me anyways.
null
CC BY-SA 3.0
null
2008-08-27T13:37:09.037
2012-07-03T14:56:38.070
2012-07-03T14:56:38.070
142,162
1,799
null
30,125
2
null
30,099
1
null
Variables in C++ can either be declared on the stack or the heap. When you declare a variable in C++, it automatically goes onto the stack, unless you explicitly use the new operator (it goes onto the heap). ``` MyObject x = MyObject(params); // onto the stack MyObject * y = new MyObject(params); // onto the heap ```...
null
CC BY-SA 2.5
null
2008-08-27T13:37:36.307
2008-08-27T13:37:36.307
null
null
12,081
null
30,121
1
30,129
null
10
8,243
After my web form is submitted, a regex will be applied to user input on the server side (via PHP). I'd like to have the identical regex running in real-time on the client side to show the user what the real input will be. This will be pretty much the same as the Preview section on the Ask Question pages on Stack Overf...
Making a JavaScript regex equivalent to a PHP regex
CC BY-SA 4.0
null
2008-08-27T13:36:51.317
2019-01-18T11:14:24.897
2019-01-18T11:14:24.897
567,854
356
[ "php", "javascript", "regex" ]
30,114
2
null
30,101
49
null
For Visual Studio, take a look at [ReSharper](http://www.jetbrains.com/resharper). It's an awesome tool and a definite must-have. Versions after 4.0 have the code formatting and clean-up feature that you are looking for. There's also [plugin integration with StyleCop](http://stylecopforresharper.codeplex.com/), includi...
null
CC BY-SA 4.0
null
2008-08-27T13:34:46.983
2020-06-13T18:17:45.977
2020-06-13T18:17:45.977
63,550
2,374
null
30,135
2
null
30,121
1
null
I've found that different implementations of regular expressions often have subtle differences in what exactly they support. If you want to be entirely sure that the result will be the same in both frontend and backend, the savest choice would be to make an Ajax call to your PHP backend and use the same piece of PHP co...
null
CC BY-SA 2.5
null
2008-08-27T13:41:08.840
2008-08-27T13:41:08.840
null
null
996
null
30,108
2
null
30,074
3
null
Unless the contents of a file can be verified for completion (it has a verifiable format or includes a checksum of the contents) only the sender can verify that a whole file has arrived. I have used a locking method for sending large files via FTP in the past. File is sent with an alternative extension and is renamed...
null
CC BY-SA 2.5
null
2008-08-27T13:33:15.850
2008-08-27T13:33:15.850
null
null
1,755
null
30,136
2
null
30,074
1
null
+1 for using a file.ext.end signaler if possible, where the contents of file.ext.end is a checksum for the larger file. This isn't for security so much — if someone can insert their own file into the large stream they can replace the checksum as well. But it does help make sure nothing was garbled along the way.
null
CC BY-SA 4.0
null
2008-08-27T13:41:37.593
2022-03-15T16:39:29.247
2022-03-15T16:39:29.247
3,043
3,043
null
30,139
2
null
30,099
1
null
Stack automatic are variables which are allocated on the stack of the current method. The idea behind designing a class which can acts as Stack automatic is that it should be possible to fully initialize it with one call and destroy it with another. It is essential that the destructor frees all resources allocated by t...
null
CC BY-SA 2.5
null
2008-08-27T13:42:05.780
2008-08-27T13:42:05.780
null
null
3,219
null
30,109
2
null
30,080
21
null
From my "Geometry" class: ``` public struct Line { public static Line Empty; private PointF p1; private PointF p2; public Line(PointF p1, PointF p2) { this.p1 = p1; this.p2 = p2; } public PointF P1 { get { return p1; } set { p1 = value; } } pu...
null
CC BY-SA 2.5
null
2008-08-27T13:33:19.687
2008-08-27T13:33:19.687
null
null
96
null
30,137
2
null
30,121
3
null
If the regular expressions are simple then there should be no issue, as the basics of regular expressions are common across most implementations. For particulars then it would be best to study both implementations: [http://www.regular-expressions.info/php.html](http://www.regular-expressions.info/php.html) [http://w...
null
CC BY-SA 2.5
null
2008-08-27T13:41:47.577
2008-08-27T13:41:47.577
null
null
1,908
null
30,126
2
null
30,080
1
null
If it is 2d, then all lines are on the only plane. So, this is basic 3-D geometry. You should be able to do this with a straightforward equation. Check out this page: > [http://local.wasp.uwa.edu.au/~pbourke/geometry/planeline/](http://local.wasp.uwa.edu.au/~pbourke/geometry/planeline/). The second solution shoul...
null
CC BY-SA 3.0
null
2008-08-27T13:38:59.330
2018-03-04T19:51:54.463
2018-03-04T19:51:54.463
3,924,118
1,753
null
30,147
2
null
30,067
1
null
No, you shouldn't. Feel free to try it out on a new project, but a lot of people familiar with ASP.NET webforms aren't loving it yet, due to having to muck around with raw HTML + lots of different concepts + pretty slim pickings on documentation/tutorials.
null
CC BY-SA 2.5
null
2008-08-27T13:46:15.553
2008-08-27T13:46:15.553
null
null
2,477
null
30,134
2
null
30,067
4
null
I'm trying to make that same decision about ASP.NET MVC, [Juan Manuel](https://stackoverflow.com/users/1782/juan-manuel). I'm now waiting for the right bite-sized project to come along with which I can experiment. If the experiment goes well--my gut says it will--then I'm going to architect my new large projects arou...
null
CC BY-SA 2.5
null
2008-08-27T13:41:02.710
2008-08-27T14:42:00.740
2017-05-23T10:29:36.727
-1
83
null
30,144
2
null
30,101
5
null
For me, + + maps to Find in Files. When I need to format code, I highlight it and hit + , + . I understand this doesn't really address automated formatting. I just wanted to clarify for those who may not know this feature even exists in Visual Studio.
null
CC BY-SA 4.0
null
2008-08-27T13:43:05.077
2020-06-13T18:19:40.063
2020-06-13T18:19:40.063
63,550
2,773
null
30,145
1
30,223
null
7
2,780
Let's suppose you deploy a network-attached appliances (small form factor PCs) in the field. You want to allow these to call home after being powered on, then be identified and activated by end users. Our current plan involves the user entering the MAC address into an activation page on our web site. Later our softwar...
Ethernet MAC address as activation code for an appliance?
CC BY-SA 2.5
0
2008-08-27T13:43:08.040
2018-01-16T13:31:57.877
2008-08-27T14:15:27.887
758
758
[ "licensing", "ethernet", "drm", "activation" ]
30,129
2
null
30,121
12
null
Hehe this was sort of asked moments ago and Jeff pointed out: [http://www.regular-expressions.info/refflavors.html](http://www.regular-expressions.info/refflavors.html). There is a comparison of regular expression capabilities across tools and languages.
null
CC BY-SA 2.5
null
2008-08-27T13:39:38.987
2008-08-27T13:39:38.987
null
null
792
null
30,157
2
null
30,152
-3
null
A compressed folder doesn't mean that it will be a .ZIP file, only the contents of the folder are compressed and to you it will look like a normal folder
null
CC BY-SA 2.5
null
2008-08-27T13:48:59.290
2008-08-27T13:48:59.290
null
null
740
null
30,152
1
30,204
null
5
7,109
I'm not going to be too surprised if I get shot-down for asking a "non programming" question, but maybe somebody knows ... I was zipping the contents of my subversion sandbox using WinXP's inbuilt "Send to Compressed (zipped) Folder" capability and was surprised to find that the .zip file created did not contain the ....
How does WinXP's "Send to Compressed (zipped) Folder" decide what to include in zip file?
CC BY-SA 3.0
0
2008-08-27T13:47:19.340
2011-12-07T22:35:30.867
2011-12-07T22:35:22.723
507,519
3,229
[ "zip", "windows-xp" ]
30,156
2
null
30,148
2
null
All the VS 2008 wizard does is upgrade the project & solution files to be used with VS 2008 - it still targets the framework you started with. If you want to move your projects to a newer version of the framework, you'll have to edit the project settings on each. Too much of a chance of breaking changes for MSFT to d...
null
CC BY-SA 2.5
null
2008-08-27T13:48:53.317
2008-08-27T13:48:53.317
null
null
35
null
30,148
1
30,169
null
2
1,086
After you've let the VS.NET (2008 in this case) wizard upgrade your solution, do you perform any manual steps to upgrade specific properties of your solution and projects? For instance, you have to go to each project and target a new version of the framework (from 2.0 to 3.5 in this case). Even after targeting a new ve...
Manual steps to upgrade VS.NET solution and target .NET framework?
CC BY-SA 2.5
null
2008-08-27T13:46:18.297
2018-03-29T18:07:27.310
null
null
470
[ ".net", "visual-studio" ]
30,140
2
null
30,101
3
null
I've heard only good things about [ReSharper](http://www.jetbrains.com/resharper). It's on my to-learn list.
null
CC BY-SA 2.5
null
2008-08-27T13:42:17.870
2008-08-27T13:42:17.870
null
null
83
null
30,162
2
null
27,998
0
null
If you're willing to put a vtable in the class you're exporting, you can export a function that returns an interface and implement the class in the .dll, then put that in the .def file. You might have to do some declaration trickery, but it shouldn't be too hard. Just like COM. :)
null
CC BY-SA 3.0
null
2008-08-27T13:50:57.537
2012-07-03T15:02:29.177
2012-07-03T15:02:29.177
142,162
1,799
null
30,160
1
30,402
null
5
1,419
I'm giving a presentation to a Java User's Group on Groovy and I'm going to be doing some coding during the presentation to show some side-by-side Java/Groovy. I really like the GroovyConsole as it's simple and I can resize the text easily. I'm wondering if there is anything similar for Java? I know I could just u...
Is there a Java Console/Editor similar to the GroovyConsole?
CC BY-SA 3.0
null
2008-08-27T13:50:26.090
2012-05-04T00:58:15.777
2012-05-04T00:58:15.777
127,036
3,030
[ "java", "editor" ]
30,167
2
null
28,481
1
null
What kibbee said. For the part of your question about existing on a release build, it depends on what kind of web site you have. If you have a pre-compiled web site, then of code files (.vb, .cs, etc) need to be deployed the server. They are compiled into .dlls (assemblies) and deployed that way along with the .a...
null
CC BY-SA 2.5
null
2008-08-27T13:53:26.643
2008-08-27T13:53:26.643
null
null
3,043
null