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
35,961
2
null
35,943
5
null
You will almost certainly want to use a database for flexible, record based access and to take advantage of the database's ability to handle concurrent data access. If you need to track information that may need to be undone, having it in a structured format is a benefit, as is having the ability to update a row indica...
null
CC BY-SA 2.5
null
2008-08-30T13:49:27.973
2008-08-30T13:49:27.973
null
null
null
null
35,960
2
null
34,623
7
null
I can think of a couple of reasons: - - - - - - I don't know that any of these are a slam-dunk reason to choose POST - unless the amount of data being sent exceeds the querystring length for some major browser.
null
CC BY-SA 2.5
null
2008-08-30T13:47:51.220
2008-08-30T13:47:51.220
null
null
2,199
null
35,935
2
null
35,922
14
null
Have you looked at [Qt](http://qt.io)/[PyQt](http://www.riverbankcomputing.co.uk/software/pyqt/intro)? Although PyQt a direct port from the C++ library, I find it much more pythonic and nice to program with compared to the others you listed. It also has very good documentation. [Dabo](http://dabodev.com/) has a nice ...
null
CC BY-SA 3.0
null
2008-08-30T12:34:19.807
2016-03-30T14:12:16.597
2016-03-30T14:12:16.597
null
3,002
null
35,966
2
null
35,950
0
null
You sure that std::hash_map exists in STL implementations? SGI STL implements it, however GNU g++ doesn't have it (it's located in the __gnu_cxx namespace) as of 4.3.1 anyway. As far as I know, hash_map has always been non-standard, and now tr1 is fixing that.
null
CC BY-SA 2.5
null
2008-08-30T13:57:23.943
2008-08-30T13:57:23.943
null
null
3,738
null
35,958
2
null
35,950
-3
null
@wesc: STL has std::map... so what's the difference with unordered_map? I don't think STL would implement twice the same thing and call it differently.
null
CC BY-SA 2.5
null
2008-08-30T13:41:01.470
2008-08-30T13:41:01.470
null
null
3,373
null
35,968
2
null
27,784
0
null
If you're serving files over the Internet, you might also consider [Amazon's S3 service](http://www.amazon.com/gp/browse.html?node=16427261). I've found the rates and reliability to be better than anything I could do (or find) on my own.
null
CC BY-SA 2.5
null
2008-08-30T14:02:18.830
2008-08-30T14:02:18.830
null
null
658
null
35,967
2
null
27,784
1
null
It all depends on your skill level and how much load you are getting on your servers. If you have spare (physical) resources and have the technical skills and experience to maintain production machines running different operating systems, I'd recommend going running lighttpd on either Linux or FreeBSD. A light OS inst...
null
CC BY-SA 2.5
null
2008-08-30T13:57:37.530
2008-08-30T13:57:37.530
null
null
3,736
null
35,965
2
null
35,950
4
null
[Boost documentation of unordered containers](http://www.boost.org/doc/libs/1_36_0/doc/html/unordered.html) The difference is in the method of how you generate the look up. In the map/set containers the `operator<` is used to generate an ordered tree. In the unordered containers, an `operator( key ) => index` is use...
null
CC BY-SA 2.5
null
2008-08-30T13:53:56.120
2008-08-30T13:53:56.120
null
null
3,186
null
35,969
2
null
34,518
2
null
In C++ I use this [example code](http://web.archive.org/web/20071217040157/http://www.boostcookbook.com/Recipe:/1235053) to do natural sorting. The code requires the boost library.
null
CC BY-SA 3.0
null
2008-08-30T14:02:52.073
2013-11-17T16:36:49.440
2013-11-17T16:36:49.440
null
3,657
null
35,971
2
null
35,943
1
null
I will second both of the above suggestions and add that file locking on a flat file log may cause issues when there are a lot of users.
null
CC BY-SA 2.5
null
2008-08-30T14:08:39.940
2008-08-30T14:08:39.940
null
null
115
null
35,970
2
null
35,954
1
null
NOTE: This isn't really an answer, just an attempt to clarify what might actually be causing the performance problem(s). 90,000 records is really a fairly small data set and the query is relatively simple with just two join. Do you have indexes on CustomerAddress.CustomerId and CustomerAccount.CustomerId? That seems m...
null
CC BY-SA 2.5
null
2008-08-30T14:04:22.150
2008-08-30T14:04:22.150
null
null
null
null
35,972
2
null
35,047
2
null
I use [SQLyog](http://www.webyog.com) to copy the structure, and I ALWAYS, let me repeat ALWAYS make a backup first.
null
CC BY-SA 3.0
null
2008-08-30T14:10:43.273
2012-12-27T09:37:17.570
2012-12-27T09:37:17.570
null
115
null
35,973
1
36,075
null
5
2,077
What is the best approach to define additional data for typedef enums in C? Example: ``` typedef enum { kVizsla = 0, kTerrier = 3, kYellowLab = 10 } DogType; ``` Now I would like to define names for each, for example `kVizsla` should be "vizsla". I currently use a function that returns a string using a large ...
Add predefined data for typedef enums in C
CC BY-SA 3.0
null
2008-08-30T14:13:17.557
2013-09-30T21:10:00.827
2013-09-30T21:10:00.827
2,633,423
3,740
[ "c", "enums", "typedef" ]
35,974
1
166,446
null
5
13,385
I'm working on an email solution in SQL Server ONLY that will use Database Mail to send out HTML formatted emails. The catch is that the images in the HTML need to be embedded in the outgoing email. This wouldn't be a problem if I were using a .net app to generate & send the emails but, unfortunately, all I have is SQ...
Embed Images in emails created using SQL Server Database Mail
CC BY-SA 2.5
0
2008-08-30T14:14:44.043
2011-12-07T12:08:09.867
2008-09-15T07:44:54.000
4,872
3,742
[ "sql-server", "database", "email" ]
35,963
2
null
3,150
57
null
[This page](http://gamesfromwithin.com/exploring-the-c-unit-testing-framework-jungle) may help, it reviews quite a few C++ unit test frameworks: - - - - - - Check out [CPPUnitLite](http://www.objectmentor.com/resources/downloads.html) or [CPPUnitLite2](http://gamesfromwithin.com/?p=48). was created by Michael Fea...
null
CC BY-SA 3.0
null
2008-08-30T13:51:31.510
2016-10-17T18:24:53.410
2016-10-17T18:24:53.410
3,655
3,655
null
35,982
2
null
35,950
2
null
Sorry, read your last comment wrong. Yes, hash_map is not in STL, map is. But unordered_map and hash_map are the same from what I've been reading. map -> log (n) insertion, retrieval, iteration is efficient (and ordered by key comparison) hash_map/unordered_map -> constant time insertion and retrieval, iteration time...
null
CC BY-SA 2.5
null
2008-08-30T14:21:51.483
2008-08-30T14:21:51.483
null
null
3,738
null
35,984
2
null
28,637
11
null
Ditto Stopwatch, it is way better. Regarding performance measuring you should also check whether your "// Some Execution Process" is a very short process. Also bear in mind that the first run of your "// Some Execution Process" might be way slower than subsequent runs. I typically test a method by running it 1000 ti...
null
CC BY-SA 2.5
null
2008-08-30T14:24:33.147
2008-08-30T14:24:33.147
null
null
1,796
null
35,983
1
36,063
null
83
104,198
Let's say I have committed some bad changes to Subversion repository. Then I commit good changes, that I want to keep. What would be easiest way to roll back those bad changes in Eclipse, and keep the good changes? Assuming that files relating to bad changes are not same as those relating to the good changes. How thin...
Rolling back bad changes with svn in Eclipse
CC BY-SA 2.5
0
2008-08-30T14:22:55.083
2016-10-24T16:49:14.180
2008-08-31T15:43:56.160
1,820
1,431
[ "eclipse", "svn", "subclipse", "subversive" ]
35,954
1
36,055
null
0
1,400
I have a query that originally looks like this: ``` select c.Id, c.Name, c.CountryCode, c.CustomerNumber, cacc.AccountNumber, ca.Line1, ca.CityName, ca.PostalCode from dbo.Customer as c left join dbo.CustomerAddress as ca on ca.CustomerId = c.Id left join dbo.CustomerAccount as cacc on cacc.CustomerId = c.Id where c....
How do you full-text search multiple criteria on left-joined tables in SQL Server?
CC BY-SA 3.0
null
2008-08-30T13:31:17.423
2013-05-27T20:07:34.623
2013-05-27T20:07:34.623
null
372
[ "sql-server", "full-text-search" ]
35,988
1
null
null
642
808,714
Is there a way to conveniently define a C-like structure in Python? I'm tired of writing stuff like: ``` class MyStruct(): def __init__(self, field1, field2, field3): self.field1 = field1 self.field2 = field2 self.field3 = field3 ```
C-like structures in Python
CC BY-SA 3.0
0
2008-08-30T14:33:25.963
2023-02-15T10:20:33.560
2014-09-20T13:45:51.300
1,424,361
3,738
[ "python", "struct" ]
35,990
2
null
35,988
72
null
How about a dictionary? Something like this: ``` myStruct = {'field1': 'some val', 'field2': 'some val'} ``` Then you can use this to manipulate values: ``` print myStruct['field1'] myStruct['field2'] = 'some other values' ``` And the values don't have to be strings. They can be pretty much any other object.
null
CC BY-SA 2.5
null
2008-08-30T14:35:29.423
2008-08-30T14:35:29.423
null
null
305
null
35,978
2
null
35,948
10
null
I'm assuming that the part the doesn't work is `{{ user.item }}`. Django will be trying a dictionary lookup, but using the string `"item"` and not the value of the `item` loop variable. Django did the same thing when it resolved `{{ user.name }}` to the `name` attribute of the `user` object, rather than looking for a...
null
CC BY-SA 2.5
null
2008-08-30T14:16:54.223
2008-08-30T14:22:52.447
2008-08-30T14:22:52.447
3,171
3,171
null
35,994
2
null
35,973
0
null
That's kind of an open ended question, but one suggestion would be to use a map with the enum as the key type and the extra information in the value. (If your indices are continuous, unlike the example, you can use a sequence container instead of a map).
null
CC BY-SA 2.5
null
2008-08-30T14:38:57.730
2008-08-30T14:38:57.730
null
null
2,150
null
35,985
2
null
35,870
0
null
How large an area are these coordinates spread out over? What latitude are they at? How much accuracy do you require? If they're fairly close together, you can probably ignore the fact that the earth is round and just treat this as a Cartesian plane rather than messing about with spherical geometry and great circle ...
null
CC BY-SA 2.5
null
2008-08-30T14:24:51.663
2008-08-30T14:24:51.663
null
null
2,600
null
35,995
2
null
35,943
9
null
There is at least one definite reason to go for storing in the database. You can use INSERT DELAYED in MySQL (or similar constructs in other databases), which returns immediately. You won't get any return data from the database with these kinds of queries, and they are not guaranteed to be applied. By using INSERT DEL...
null
CC BY-SA 2.5
null
2008-08-30T14:39:30.363
2008-08-30T14:39:30.363
null
null
1,606
null
36,000
2
null
35,950
7
null
You need to index an associative container two ways: - - Try [Boost.MultiIndex](http://www.boost.org/doc/libs/1_36_0/libs/multi_index/doc/index.html) or [Boost.Intrusive](http://www.boost.org/doc/libs/1_50_0/doc/html/intrusive.html). I haven't used it this way but I think it's possible.
null
CC BY-SA 3.0
null
2008-08-30T14:47:15.383
2012-08-02T02:07:12.460
2012-08-02T02:07:12.460
2,574
2,574
null
35,993
2
null
35,988
105
null
You can use a tuple for a lot of things where you would use a struct in C (something like x,y coordinates or RGB colors for example). For everything else you can use dictionary, or a utility class like [this one](http://code.activestate.com/recipes/52308/): ``` >>> class Bunch: ... def __init__(self, **kwds): ......
null
CC BY-SA 2.5
null
2008-08-30T14:38:38.447
2010-09-06T02:24:31.447
2010-09-06T02:24:31.447
4,279
3,002
null
35,975
2
null
14,138
3
null
If you're using `configure` to build wxWidgets you just need to add `--with-opengl` to your command line.
null
CC BY-SA 2.5
null
2008-08-30T14:14:58.177
2008-08-30T14:14:58.177
null
null
3,736
null
36,003
2
null
35,999
80
null
./a.exe at the prompt
null
CC BY-SA 2.5
null
2008-08-30T14:50:46.420
2008-08-30T14:50:46.420
null
null
2,443
null
36,004
2
null
35,999
10
null
you should just be able to call it by typing in the file name. You may have to call ./a.exe as the current directory is usually not on the path for security reasons.
null
CC BY-SA 2.5
null
2008-08-30T14:51:14.860
2008-08-30T14:51:14.860
null
null
1,862
null
36,002
2
null
36,001
2
null
You're going to have to use triggers for that.
null
CC BY-SA 2.5
null
2008-08-30T14:50:08.123
2008-08-30T14:50:08.123
null
null
1,862
null
35,991
1
186,996
null
62
32,209
I'm considering using Django for a project I'm starting (fyi, a browser-based game) and one of the features I'm liking the most is using `syncdb` to automatically create the database tables based on the Django models I define (a feature that I can't seem to find in any other framework). I was already thinking this was ...
Altering database tables in Django
CC BY-SA 3.0
0
2008-08-30T14:36:39.030
2021-02-18T20:20:11.067
2020-06-20T09:12:55.060
-1
2,841
[ "database", "django" ]
36,006
2
null
35,999
-2
null
Just call it ``` > a ``` Make sure it will be found (path).
null
CC BY-SA 2.5
null
2008-08-30T14:51:59.350
2008-08-30T14:51:59.350
null
null
3,714
null
36,001
1
36,011
null
13
20,730
I have a table defined (see code snippet below). How can I add a constraint or whatever so that the LastUpdate column is automatically updated anytime the row is changed? ``` CREATE TABLE dbo.Profiles ( UserName varchar(100) NOT NULL, LastUpdate ...
SQL Server 2005 Auto Updated DateTime Column - LastUpdated
CC BY-SA 2.5
0
2008-08-30T14:48:38.767
2018-08-16T19:19:52.510
2012-05-01T13:14:06.897
1,209,430
3,747
[ "sql-server", "database", "timestamp", "sql-update" ]
36,011
2
null
36,001
4
null
A default constraint only works on inserts; for an update use a trigger.
null
CC BY-SA 4.0
null
2008-08-30T14:55:17.923
2018-08-16T19:19:52.510
2018-08-16T19:19:52.510
806,975
740
null
35,998
2
null
35,973
1
null
If your enumerated values are dense enough, you can define an array to hold the strings and just look them up (use NULL for any skipped value and add a special case handler on your lookup routine). ``` char *DogList[] = { "vizsla", /* element 0 */ NULL, NULL, NULL, "terrier", /* element 3 */ ... }; ``` ...
null
CC BY-SA 2.5
null
2008-08-30T14:45:29.880
2008-08-31T02:38:44.957
2008-08-31T02:38:44.957
2,509
2,509
null
36,018
2
null
36,001
-1
null
My suggestion would be to create a stored procedure which defaults the lastUpdate to getdate(). I've tried to avoid triggers in the past because pre-SQL2005 locating and editing them was a pain in the rump. Especially for developers who are new to your project. Also add that as the default value for your column def...
null
CC BY-SA 2.5
null
2008-08-30T14:58:38.930
2008-08-30T14:58:38.930
null
null
149
null
36,016
2
null
35,999
2
null
To execute a file in the current directory, the syntax to use is: `./foo` As mentioned by allain, `./a.exe` is the correct way to execute a.exe in the working directory using Cygwin. Note: You may wish to use the `-o` parameter to `cc` to specify your own output filename. An example of this would be: `cc helloworld.c...
null
CC BY-SA 2.5
null
2008-08-30T14:58:19.430
2008-08-30T14:58:19.430
null
null
3,736
null
36,010
2
null
14,247
2
null
One way to separate the MXML and ActionScript for a component into separate files is by doing something similar to the ASP.Net 1.x code behind model. In this model the declarative part (the MXML in this case) is a subclass of the imperative part (the ActionScript). So I might declare the code behind for a class like th...
null
CC BY-SA 2.5
null
2008-08-30T14:54:16.723
2008-08-30T14:54:16.723
null
null
3,187
null
36,013
2
null
35,991
61
null
Manually doing the SQL changes and dump/reload are both options, but you may also want to check out some of the schema-evolution packages for Django. The most mature options are [django-evolution](http://code.google.com/p/django-evolution/) and [South](http://south.aeracode.org/). : And hey, here comes [dmigrations](...
null
CC BY-SA 3.0
null
2008-08-30T14:56:49.777
2015-07-31T13:11:25.660
2015-07-31T13:11:25.660
3,207
3,207
null
36,020
2
null
35,999
2
null
Thomas wrote: > Apparently, gcc doesn't behave like the one described in The C Programming language It does in general. For your program to run on Windows it needs to end in .exe, "the C Programming language" was not written with Windows programmers in mind. As you've seen, cygwin emulates many, but not all, featur...
null
CC BY-SA 2.5
null
2008-08-30T15:02:42.133
2008-08-30T15:02:42.133
null
null
2,574
null
36,015
2
null
35,991
9
null
One good way to do this is via fixtures, particularly the `initial_data` fixtures. A fixture is a collection of files that contain the serialized contents of the database. So it's like having a backup of the database but as it's something Django is aware of it's easier to use and will have additional benefits when yo...
null
CC BY-SA 2.5
null
2008-08-30T14:57:32.550
2008-08-30T19:28:44.910
2008-08-30T19:28:44.910
3,171
3,171
null
36,019
1
48,247
null
2
2,377
I have a secondary Exchange mailbox configured on my iPhone using IMAP. This all appears to work fine except when a message is deleted on the phone, it still shows normally in Outlook. It does not seem to matter what I set the "remove deleted messages" setting to on the phone. I understand this is due to a combination...
Deleting messages from Exchange IMAP mailbox on iPhone
CC BY-SA 2.5
null
2008-08-30T15:00:37.270
2017-09-05T11:23:53.023
2017-09-05T11:23:53.023
1,000,551
3,736
[ "ios", "exchange-server", "imap" ]
36,021
2
null
35,950
17
null
You've asked for the canonical reason why Boost::MultiIndex was made: list insertion order with fast lookup by key. [Boost MultiIndex tutorial: list fast lookup](http://www.boost.org/doc/libs/1_36_0/libs/multi_index/doc/tutorial/basics.html#list_fast_lookup)
null
CC BY-SA 2.5
null
2008-08-30T15:04:13.377
2008-08-30T15:04:13.377
null
null
3,755
null
36,029
2
null
36,014
3
null
Is it possible that the exception is being thrown in another thread? Obviously your calling code is single threaded, but maybe the library you are consuming is doing some multithreaded operations under the covers.
null
CC BY-SA 2.5
null
2008-08-30T15:10:36.170
2008-08-30T15:36:03.020
2008-08-30T15:36:03.020
1,644
1,644
null
36,027
2
null
35,999
1
null
> Apparently, gcc doesn't behave like the one described in The C Programming language, where it says that the command cc helloworld.c produces a file called a.out which can be run by typing a.out on the prompt. A Unix hasn't behaved in that way by default (so you can just write the executable name without ./ at the fr...
null
CC BY-SA 2.5
null
2008-08-30T15:08:31.073
2008-08-30T15:08:31.073
null
null
61
null
36,005
2
null
35,999
6
null
just type ./a in the shell
null
CC BY-SA 2.5
null
2008-08-30T14:51:52.957
2008-08-30T14:51:52.957
null
null
1,348
null
36,014
1
41,208
null
55
71,222
I'm working on a project using the [ANTLR](http://antlr.org) parser library for C#. I've built a grammar to parse some text and it works well. However, when the parser comes across an illegal or unexpected token, it throws one of many exceptions. The problem is that in some cases (not all) that my try/catch block wo...
Why is .NET exception not caught by try/catch block?
CC BY-SA 3.0
0
2008-08-30T14:57:13.050
2021-11-18T09:45:44.550
2012-03-24T08:46:10.860
249,431
3,347
[ "c#", ".net", "exception", "antlr" ]
36,026
2
null
34,411
9
null
If your goal is to have user-friendly URLs throughout your application, use the following approach: 1) Create a routing rule for your module/action in the application's routing.yml file. The following example is a routing rule for an action that shows the most recent questions in an application, defaulting to page 1 ...
null
CC BY-SA 2.5
null
2008-08-30T15:08:25.020
2008-08-30T15:08:25.020
null
null
3,734
null
36,034
2
null
35,988
28
null
> dF: that's pretty cool... I didn't know that I could access the fields in a class using dict.Mark: the situations that I wish I had this are precisely when I want a tuple but nothing as "heavy" as a dictionary. You can access the fields of a class using a dictionary because the fields of a class, its metho...
null
CC BY-SA 3.0
null
2008-08-30T15:20:15.150
2015-09-08T02:12:15.213
2015-09-08T02:12:15.213
901,641
4,381
null
36,042
2
null
36,039
5
null
Across how many files? If you just want to separate class definitions from implementation then try [this article](https://isocpp.org/wiki/faq/templates#templates-defn-vs-decl) in the C++ faqs. That's about the only way I know of that works at the moment, but some IDEs (Eclipse CDT for example) won't link this method ...
null
CC BY-SA 4.0
null
2008-08-30T15:31:41.457
2021-07-07T13:56:05.293
2021-07-07T13:56:05.293
15,869,059
2,594
null
36,030
1
36,059
null
1
293
I'm developing a web app on Yaws 1.65 (installed through apt) running on Debian etch on a VPS with UML. Whenever I do `/etc/init.d/yaws restart` or a `stop/start`, it initializes according to an old version of the config file (/etc/yaws/yaws.conf). I know this because I changed the docroot from the default to another...
Yaws uses old config file
CC BY-SA 3.0
null
2008-08-30T15:15:01.090
2017-08-04T14:15:16.483
2017-08-04T14:15:16.483
1,836,618
3,750
[ "yaws" ]
36,033
2
null
35,988
383
null
Use a [named tuple](https://docs.python.org/2/library/collections.html#collections.namedtuple), which was added to the [collections module](http://docs.python.org/library/collections.html) in the standard library in Python 2.6. It's also possible to use Raymond Hettinger's [named tuple](http://code.activestate.com/reci...
null
CC BY-SA 3.0
null
2008-08-30T15:18:59.613
2017-04-26T19:34:05.480
2017-04-26T19:34:05.480
3,665
3,665
null
36,048
2
null
36,014
2
null
You can set up VS.Net to break as soon as any exception occurs. Just run your project in debug mode, and it will stop as soon as the exception is thrown. Then you should have a better idea of why it isn't being caught. Also, you can put some code in to catch all unhandled exceptions. ``` Application.ThreadException +=...
null
CC BY-SA 4.0
null
2008-08-30T15:36:05.063
2021-11-18T09:45:44.550
2021-11-18T09:45:44.550
6,296,561
1,862
null
36,051
2
null
36,014
1
null
Oh and in reference to what Kibbee said; if you select Debug|Exceptions in VS and just click all the boxes in the 'thrown' column it should pick up AFAIK as a 'first chance exception', i.e. VS will indicate when the exception is to be processed by everything else and break on the relevant code. This should help with ...
null
CC BY-SA 2.5
null
2008-08-30T15:42:48.997
2008-08-30T15:42:48.997
null
null
3,394
null
36,047
2
null
36,014
9
null
Regardless of whether the assembly has been compiled as a release build the exception should certainly 'bubble' up to the caller, there's no reason an assembly not being compiled in debug mode should have any affect on that. I'd agree with Daniel is suggesting that perhaps the exception is occurring on a separate thre...
null
CC BY-SA 2.5
null
2008-08-30T15:34:44.723
2008-08-30T15:34:44.723
null
null
3,394
null
36,045
2
null
35,954
1
null
I would echo David's suggestion. You'd probably want to examine how the RDBMS is executing your query (e.g., via table scans or using indexes). One quick check would be to time just the part of the query involving the text search. Something like this: ``` SELECT ca.Line1, ca.CityName, ca.PostalCode FROM CustomerA...
null
CC BY-SA 2.5
null
2008-08-30T15:33:10.377
2008-08-30T15:33:10.377
null
null
726
null
36,028
1
36,234
null
1
3,601
How do I assign a method's output to a textbox value without code behind? ``` <%@ Page Language="VB" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <script runat="server"> Public TextFromString As String = "test text test text" Publi...
How to assign a method's output to a textbox value without code behind
CC BY-SA 2.5
0
2008-08-30T15:09:06.610
2016-10-07T06:43:40.573
2008-08-30T16:36:57.617
3,747
3,747
[ "asp.net", "vb.net" ]
36,055
2
null
35,954
1
null
Run it through the query analyzer and see what the query plan is. My guess would be that the double root (ie. %ae%) searches are causing it do do a table scan when looking for the matching rows. Double root searches are inherently slow, as you can't use any kind of index to match them usually.
null
CC BY-SA 2.5
null
2008-08-30T15:47:34.040
2008-08-30T15:47:34.040
null
null
1,862
null
36,054
1
78,591
null
3
4,200
Has anyone used the [Sphinx](http://cmusphinx.sourceforge.net/html/cmusphinx.php) speech recognition stack to build IVR applications? I am looking for open source alternatives to the expensive and somewhat limiting choices from MSFT and others. I have not been able to find a comprehensive package that ties open sourc...
Anyone have experience with Sphinx speech recognition?
CC BY-SA 2.5
0
2008-08-30T15:46:09.703
2011-08-08T19:14:49.243
2011-08-08T19:14:49.243
407,651
1,219
[ "speech-recognition", "ivr", "cmusphinx" ]
36,056
1
null
null
13
7,092
I am trying to find out if it's possible to build a complete IVR application by cobbling together parts from open source projects. Is anyone using a non-commercial VoiceXML implementation to build speech-enabled systems?
What's a good open source VoiceXML implementation?
CC BY-SA 2.5
0
2008-08-30T15:49:05.877
2017-07-30T09:53:15.910
2009-08-04T02:27:13.857
45,935
1,219
[ "speech-recognition", "voip", "ivr", "voicexml" ]
36,064
1
36,209
null
5
974
I am attempting to update a project from ASP.NET MVC Preview 3 to Preview 5 and it seems that Controller.ReadFromRequest(string key) has been removed from the Controller class. Does anyone know of any alternatives to retrieving information based on an identifier from a form?
What is the replacement of Controller.ReadFromRequest in ASP.NET MVC?
CC BY-SA 2.5
null
2008-08-30T15:55:19.683
2019-03-19T10:20:13.293
2019-03-19T10:20:13.293
9,020,340
3,412
[ "c#", "asp.net-mvc", ".net-3.5", "entity-framework-ctp5" ]
36,061
2
null
35,988
19
null
You can also pass the init parameters to the instance variables by position ``` # Abstract struct class class Struct: def __init__ (self, *argv, **argd): if len(argd): # Update by dictionary self.__dict__.update (argd) else: # Update by position ...
null
CC BY-SA 2.5
null
2008-08-30T15:53:10.437
2008-08-30T15:53:10.437
null
null
394
null
36,063
2
null
35,983
30
null
You have two choices to do this. The Quick and Dirty is selecting your files (using ) in Project Explorer view, right-click them, choose `Replace with...` and then you choose the best option for you, from `Latest from Repository`, or some `Branch` version. After getting those files you modify them (with a space, or fi...
null
CC BY-SA 3.0
null
2008-08-30T15:54:19.717
2013-02-06T06:49:16.423
2013-02-06T06:49:16.423
938,024
2,274
null
36,059
2
null
36,030
1
null
I'm completely inexperienced with yaws, but I have a troubleshooting suggestion: What happens if you remove the config file completely? If it still starts yaws without a config file, that could be a clear sign that something is being cached. For what it's worth, with a quick 5 minutes of googling, I found no mention o...
null
CC BY-SA 2.5
null
2008-08-30T15:50:55.030
2008-08-30T15:50:55.030
null
null
3,757
null
35,999
1
36,003
null
49
127,334
How can I execute `a.exe` using the Cygwin shell? I created a C file in Eclipse on Windows and then used Cygwin to navigate to the directory. I called gcc on the C source file and `a.exe` was produced. I would like to run `a.exe`.
How do I execute a file in Cygwin?
CC BY-SA 3.0
0
2008-08-30T14:45:47.167
2015-06-01T20:41:58.470
2015-06-01T20:41:58.470
299,327
572
[ "c", "gcc", "cygwin" ]
36,065
2
null
36,058
0
null
How is [this](http://railsforum.com/viewtopic.php?id=17785) for starters? ``` # The submit button in your child window's view: <%= button_to_function 'Save', "$('my_form').submit(); window.opener.location.reload(); window.close();" %> ```
null
CC BY-SA 3.0
null
2008-08-30T15:55:54.737
2011-11-14T15:13:13.087
2011-11-14T15:13:13.087
496,830
1,611
null
36,050
2
null
35,896
8
null
I finally revisited this topic, and, using help from [BrokenGlass on writing WAVE header](https://stackoverflow.com/a/7152153/3205), updated csvorbis. I've added an [OggDecodeStream](https://github.com/mono/csvorbis/blob/master/OggDecoder/OggDecodeStream.cs) that can be passed to `System.Media.SoundPlayer` to simply pl...
null
CC BY-SA 3.0
null
2008-08-30T15:41:12.307
2012-03-05T16:45:42.913
2017-05-23T12:00:17.880
-1
3,205
null
36,058
1
null
null
2
2,435
I have a popup window containing a form which gathers data for a report. When I click submit in that window, I want it to close the popup, and open the report in the original window that called the popup. I think I can open the report in the correct window by using ``` { :target => <name of window> } ``` in the `fo...
How do I close a popup window, and open the next page in the main window in ROR?
CC BY-SA 3.0
null
2008-08-30T15:49:29.947
2014-11-25T09:05:46.590
2011-11-14T15:13:49.373
496,830
null
[ "html", "ruby-on-rails", "ruby" ]
36,071
2
null
36,056
6
null
I've tried JVoiceXML in the past and had some luck with it. [http://jvoicexml.sourceforge.net/](http://jvoicexml.sourceforge.net/) It's java of course, but that wasn't a problem for my situation.
null
CC BY-SA 2.5
null
2008-08-30T16:06:53.413
2008-08-30T16:06:53.413
null
null
2,443
null
36,078
2
null
12,290
0
null
I tried it and it looked promising at first but quickly had issues actually deploying it to a Medium Trust host.
null
CC BY-SA 2.5
null
2008-08-30T16:16:37.917
2008-08-30T16:16:37.917
null
null
3,747
null
36,072
2
null
36,014
5
null
Are you using .Net 1.0 or 1.1? If so then catch(Exception ex) won't catch exceptions from unmanaged code. You'll need to use catch {} instead. See this article for further details: [http://www.netfxharmonics.com/2005/10/net-20-trycatch-and-trycatchexception/](http://www.netfxharmonics.com/2005/10/net-20-trycatch-an...
null
CC BY-SA 2.5
null
2008-08-30T16:07:42.960
2008-08-30T16:07:42.960
null
null
637
null
36,039
1
36,080
null
23
13,607
C++ seems to be rather grouchy when declaring templates across multiple files. More specifically, when working with templated classes, the linker expect all method definitions for the class in a single compiler object file. When you take into account headers, other declarations, inheritance, etc., things get really mes...
Templates spread across multiple files
CC BY-SA 2.5
0
2008-08-30T15:27:34.960
2021-07-07T13:56:05.293
null
null
4,381
[ "c++", "templates" ]
36,079
1
36,279
null
11
26,598
In my PHP web app, I want to be notified via email whenever certain errors occur. I'd like to use my Gmail account for sending these. How could this be done?
PHP mail using Gmail
CC BY-SA 4.0
0
2008-08-30T16:18:35.260
2019-01-18T11:01:56.843
2019-01-18T11:01:56.843
567,854
356
[ "php", "email", "gmail" ]
36,074
2
null
36,014
0
null
I don't get it...your catch block just throws a new exception (with the same message). Meaning that your statement of: > The problem is that in some cases (not all) that my try/catch block won't catch it and instead stops execution as an unhandled exception. is exactly what is to happen.
null
CC BY-SA 2.5
null
2008-08-30T16:10:28.133
2008-08-30T16:10:28.133
null
null
2,199
null
36,075
2
null
35,973
2
null
@dmckee: I think the suggested solution is good, but for simple data (e.g. if only the name is needed) it could be augmented with auto-generated code. While there are lots of ways to auto-generate code, for something as simple as this I believe you could write a simple XSLT that takes in an XML representation of the en...
null
CC BY-SA 2.5
null
2008-08-30T16:12:23.120
2008-08-30T16:12:23.120
null
null
1,596
null
36,083
2
null
36,014
0
null
I agree with [Daniel Auger](https://stackoverflow.com/users/1644/daniel-auger) and [kronoz](https://stackoverflow.com/users/3394/kronoz) that this smells like an exception that has something to do with threads. Beyond that, here are my other questions: 1. What does the complete error message say? What kind of excepti...
null
CC BY-SA 2.5
null
2008-08-30T16:19:55.240
2008-08-30T16:19:55.240
2017-05-23T11:46:11.673
-1
470
null
36,081
1
36,097
null
4
3,925
I'm trying to leverage the using block more and more these days when I have an object that implements IDisposable but one thing I have not figured out is how to catch an exception as I would in a normal try/catch/finally ... any code samples to point me in the right direction? Edit: The question was modified after rea...
How to Catch an exception in a using block with .NET 2.0?
CC BY-SA 3.0
null
2008-08-30T16:19:22.387
2011-11-19T01:23:45.470
2011-11-19T01:23:45.470
419
2,701
[ "exception", "ado.net", ".net-2.0", "error-handling" ]
36,087
2
null
36,077
0
null
Other languages? Well, in Java you call e.printStackTrace(); It doesn't get much simpler than that.
null
CC BY-SA 2.5
null
2008-08-30T16:22:23.627
2008-08-30T16:22:23.627
null
null
3,333
null
36,080
2
null
36,039
27
null
> Are there any general advice or workarounds for organizing or redistributing templated member definitions across multiple files? Yes; don't. The C++ spec permits a compiler to be able to "see" the entire template (declaration definition) at the point of instantiation, and (due to the complexities of any implementa...
null
CC BY-SA 2.5
null
2008-08-30T16:19:04.570
2008-08-30T16:19:04.570
null
null
2,131
null
36,077
1
60,140
null
12
6,269
I'm looking for an answer in MS VC++. When debugging a large C++ application, which unfortunately has a very extensive usage of C++ exceptions. Sometimes I catch an exception a little later than I actually want. Example in pseudo code: ``` FunctionB() { ... throw e; ... } FunctionA() { ... Funct...
Finding out the source of an exception in C++ after it is caught?
CC BY-SA 3.0
0
2008-08-30T16:16:32.207
2019-12-24T15:39:36.487
2016-05-26T17:44:03.993
264,325
3,153
[ "c++", "visual-studio", "winapi", "exception", "visual-c++" ]
36,088
2
null
34,896
15
null
It depends on what kind of sanitizing you are doing. For protecting against SQL injection, don't do anything to the data itself. Just use prepared statements, and that way, you don't have to worry about messing with the data that the user entered, and having it negatively affect your logic. You have to sanitize a ...
null
CC BY-SA 2.5
null
2008-08-30T16:22:52.177
2008-08-30T16:22:52.177
null
null
1,862
null
36,068
2
null
36,001
24
null
I agree with the others -- set a default value of GetDate() on the LastUpdate column and then use a trigger to handle any updates. Just something simple like this: ``` CREATE TRIGGER KeepUpdated on Profiles FOR UPDATE, INSERT AS UPDATE dbo.Profiles SET LastUpdate = GetDate() WHERE Username IN (SELECT Username FROM ...
null
CC BY-SA 2.5
null
2008-08-30T16:02:47.387
2008-08-30T16:02:47.387
null
null
3,743
null
36,069
2
null
36,014
0
null
> "Also, you can put some code in to catch all unhandled exceptions. Read the link for more info, but the basics are these two lines." This is false. This used to catch all unhandled exceptions in .NET 1.0/1.1 but it was a bug and it wasn't supposed to and it was fixed in .NET 2.0. ``` AppDomain.CurrentDomain....
null
CC BY-SA 2.5
null
2008-08-30T16:04:42.657
2008-08-30T16:10:27.713
2008-08-30T16:10:27.713
1,143
1,143
null
36,091
2
null
36,077
1
null
There's no standard way to do this. Further, the call stack must typically be recorded at the time of the exception being ; once it has been the stack has unrolled, so you no longer know what was going on at the point of being thrown. In VC++ on Win32/Win64, you get usable-enough results by recording the value from...
null
CC BY-SA 2.5
null
2008-08-30T16:25:36.177
2008-08-30T16:25:36.177
null
null
2,131
null
36,086
2
null
36,079
4
null
You could use PEAR's mail function with Gmail's SMTP Server Note that when sending e-mail using Gmail's SMTP server, it will look like it came from your Gmail address, despite what you value is for $from. (following code taken from [About.com Programming Tips](http://email.about.com/od/emailprogrammingtips/qt/et07300...
null
CC BY-SA 2.5
null
2008-08-30T16:21:44.907
2008-08-30T16:21:44.907
null
null
1,477
null
36,094
2
null
36,081
4
null
Yeah there is nothing different about throwing exceptions in using blocks. Remember that the using block basically translates to: ``` IDisposable disposable = null; try { disposable = new WhateverYouWantedToMake(); } finally { disposable.Dispose() } ``` So you will have to roll your own catching if you want ...
null
CC BY-SA 2.5
null
2008-08-30T16:27:31.353
2008-08-30T16:27:31.353
null
null
1,143
null
36,095
2
null
2,658
0
null
One major tip to ease the setup of an SVN server right now is to use a Virtual Appliance. That is, a virtual machine that has subversion pre-installed and (mostly) pre-configured on it - pretty much a plug & play thing. You can try [here](http://www.vmware.com/appliances/directory/519), [here](http://www.ytechie.com/sv...
null
CC BY-SA 2.5
null
2008-08-30T16:30:14.933
2008-08-30T16:30:14.933
null
null
1,596
null
36,103
2
null
35,848
5
null
Your classic VB units are in what are called "twips". You will most likely be able to divide those numbers by 12 or 15 (depending on if you are using large or small fonts) and you will get a certain number of pixels.
null
CC BY-SA 2.5
null
2008-08-30T16:38:09.597
2008-08-30T16:38:09.597
null
null
232
null
36,101
1
36,131
null
4
324
How do I "name" a browser window in ROR, such that I can open a page in it later, from another (popup) window (using the target="name" html parameter)
How do I set the name of a window in ROR?
CC BY-SA 2.5
0
2008-08-30T16:37:31.330
2015-06-05T12:01:00.793
2008-08-30T16:56:17.213
1,450
3,764
[ "javascript", "html", "ruby-on-rails", "ruby" ]
36,113
2
null
36,109
0
null
You can try preceeding the spaces with \ like so: ``` /home/chris/.wine/drive_c/Program Files/Microsoft\ Research/Z3-1.3.6/bin/z3.exe ``` You can also do the same with your \t problem - replace it with \\t.
null
CC BY-SA 2.5
null
2008-08-30T16:42:34.670
2008-08-30T17:38:56.640
2008-08-30T17:38:56.640
658
658
null
36,097
2
null
36,081
7
null
I don't really understand the question - you throw an exception as you normally would. If `MyThing` implements `IDisposable`, then: ``` using ( MyThing thing = new MyThing() ) { ... throw new ApplicationException("oops"); } ``` And `thing.Dispose` will be called as you leave the block, as the exception's thr...
null
CC BY-SA 2.5
null
2008-08-30T16:32:01.327
2008-08-30T16:54:05.673
2008-08-30T16:54:05.673
1,199
1,199
null
36,102
2
null
36,077
4
null
There is no way to find out the source of an exception it's caught, unless you include that information when it is thrown. By the time you catch the exception, the stack is already unwound, and there's no way to reconstruct the stack's previous state. Your suggestion to include the stack trace in the constructor is y...
null
CC BY-SA 3.0
null
2008-08-30T16:37:53.433
2016-05-26T17:47:19.620
2016-05-26T17:47:19.620
264,325
872
null
36,093
1
36,171
null
5
5,861
This might seem like a stupid question I admit. But I'm in a small shop me plus two designers. Our backups are getting out of hand because they just copy/paste files if they need to make a change (version). I was all set to try Subversion to handle all of our files my text (code) files and their photoshop/illustrator...
Subversion or Adobe Version CUE 3 for Photoshop/Illustrator Files
CC BY-SA 2.5
null
2008-08-30T16:27:14.333
2011-03-28T05:50:01.333
2017-05-23T11:48:36.327
-1
3,747
[ "svn", "versioning", "photoshop" ]
36,110
2
null
35,848
1
null
I done some Googling on this, and came across [this](http://www.devnewsgroups.net/group/microsoft.public.dotnet.framework.windowsforms/topic17193.aspx).. > Yes, this size of the form is limited to the size of the desktop (more specifcally SystemInformation.MaxWindowTrackSize). This is done in the Form.SetBound...
null
CC BY-SA 2.5
null
2008-08-30T16:39:56.660
2008-08-30T16:39:56.660
null
null
832
null
36,117
2
null
7,287
0
null
I have read Working Effectively With Legacy Code, and I agree it is very useful for dealing with "untestable" code. Some techniques only apply to compiled languages (I'm working on "old" PHP apps), but I would say most of the book is applicable to any language. Refactoring books sometimes assume the code is in semi-i...
null
CC BY-SA 2.5
null
2008-08-30T16:44:52.060
2008-08-30T16:44:52.060
null
null
3,744
null
36,119
2
null
36,093
1
null
Subversion is not an ideal solution for binary files, regardless of how little has changed it will save a new copy each time you check it in. Moreover, although Subversion has some locking capabilities, it doesn't lock by default, which means that if two persons modify the same binary file the one that checks in the la...
null
CC BY-SA 2.5
null
2008-08-30T16:45:16.007
2008-08-30T16:45:16.007
null
null
1,109
null
36,108
1
36,741
null
348
318,828
Some WPF controls (like the `Button`) seem to happily consume all the available space in its' container if you don't specify the height it is to have. And some, like the ones I need to use right now, the (multiline) `TextBox` and the `ListBox` seem more worried about just taking the space necessary to fit their conten...
How to get controls in WPF to fill available space?
CC BY-SA 4.0
0
2008-08-30T16:39:28.423
2022-12-30T13:42:02.770
2020-02-19T23:25:02.387
1,454,514
2,122
[ "wpf", "user-interface", "layout" ]
36,114
1
36,246
null
0
313
I know I must be missing something, but in a `while` statement how does the variable hold the data, when it finishes the first pass and goes into the second pass? --- { ``` int num1 = 0 ; int num2 = 0; int num3 = 0; while (num1 < 10) {cout << "enter your first number: "; cin >> num1; cout << "Enter your se...
Variable Holding data in a while statement
CC BY-SA 3.0
null
2008-08-30T16:43:28.943
2013-12-20T22:52:08.797
2013-12-20T22:52:08.797
1,288
335,696
[ "c++" ]
36,106
1
36,311
null
8
3,382
I have an information retrieval application that creates bit arrays on the order of 10s of million bits. The number of "set" bits in the array varies widely, from all clear to all set. Currently, I'm using a straight-forward bit array (`java.util.BitSet`), so each of my bit arrays takes several megabytes. My plan is t...
What are some alternatives to a bit array?
CC BY-SA 2.5
0
2008-08-30T16:39:01.137
2014-10-02T23:06:39.917
2008-08-30T18:35:11.187
3,474
3,474
[ "data-structures", "information-retrieval" ]