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
25,998
2
null
25,977
3
null
You might look at the code for the open source tool [findimagedupes](http://www.kudla.org/raindog/perl/), though it appears to have been written in perl, so I can't say how easy it will be to parse... Reading the findimagedupes page that I liked, I see that there is a [C++ implementation of the same algorithm](http://...
null
CC BY-SA 3.0
null
2008-08-25T13:09:06.517
2017-05-06T00:52:55.200
2017-05-06T00:52:55.200
2,509
2,509
null
26,008
2
null
25,999
6
null
I honestly don't think it's possible. I've done it before using pretty simple key encryption with a compressed binary which worked well enough for the security I required but I honestly think if somebody considers cracking your online high score table a hack it will be done. There are some pretty sad people out the...
null
CC BY-SA 2.5
null
2008-08-25T13:17:44.717
2008-08-25T13:17:44.717
null
null
269
null
26,005
2
null
26,002
21
null
Oracle has an express edition as well. I believe it is more limited though (IIRC, you can only have one database on an instance) [Oracle XE](http://www.oracle.com/technetwork/database/database-technologies/express-edition/downloads/index.html)
null
CC BY-SA 3.0
null
2008-08-25T13:16:42.863
2013-12-23T16:23:53.497
2013-12-23T16:23:53.497
434,337
794
null
25,996
2
null
23,439
2
null
I've never really liked the components, they're a bit dodgy. This particular problem seems to be common, and the somewhat annoying solution is, as you're suggesting, to only have one FLVPlayback and reuse that. [Here's a blog post about it](http://www.sakri.net/blog/2008/07/10/flvplayback-doesnt-unload-flvs-becomes-m...
null
CC BY-SA 2.5
null
2008-08-25T13:08:52.727
2008-08-25T13:08:52.727
null
null
914
null
26,012
2
null
25,977
-1
null
Well a really base-level method to use could go through every pixel colour and compare it with the corresponding pixel colour on the second image - but that's a probably a very slow solution.
null
CC BY-SA 2.5
null
2008-08-25T13:19:39.317
2008-08-25T13:19:39.317
null
null
2,025
null
26,007
1
26,018
null
21
58,209
Is there an easy way to iterate over an associative array of this structure in PHP: The array `$searches` has a numbered index, with between 4 and 5 associative parts. So I not only need to iterate over `$searches[0]` through `$searches[n]`, but also `$searches[0]["part0"]` through `$searches[n]["partn"]`. The hard pa...
Iterating over a complex Associative Array in PHP
CC BY-SA 3.0
0
2008-08-25T13:17:17.590
2017-08-05T14:38:57.120
2011-11-01T17:47:38.160
496,830
572
[ "php", "arrays", "associative-array" ]
26,009
2
null
26,002
4
null
Oracle allows developers to download and use Oracle for free for the purpose of developing software (at least for the initial prototype, best to read the license terms). Downloads [here](http://www.oracle.com/technology/software/products/database/index.html).
null
CC BY-SA 2.5
null
2008-08-25T13:18:44.903
2008-08-25T13:18:44.903
null
null
2,123
null
26,014
2
null
26,007
0
null
Can you just loop over all of the "part[n]" items and use isset to see if they actually exist or not?
null
CC BY-SA 2.5
null
2008-08-25T13:21:51.137
2008-08-25T13:21:51.137
null
null
305
null
26,004
2
null
25,977
2
null
to expand on Vaibhav's note, [hugin](http://hugin.sourceforge.net/) is an open-source 'autostitcher' which should have some insight on the problem.
null
CC BY-SA 2.5
null
2008-08-25T13:16:33.817
2008-08-25T13:16:33.817
null
null
2,009
null
26,015
2
null
25,999
5
null
I've been doing some of this with my Flash games, and it's a losing battle really. Especially for ActionScript that can be decompiled into somewhat readable code without too much effort. The way I've been doing it is a rather conventional approach of sending the score and player name in plain text and then a hash of t...
null
CC BY-SA 2.5
null
2008-08-25T13:22:09.653
2011-03-15T21:46:29.157
2011-03-15T21:46:29.157
496,830
914
null
26,018
2
null
26,007
43
null
Nest two [foreach loops](http://php.net/foreach): ``` foreach ($array as $i => $values) { print "$i {\n"; foreach ($values as $key => $value) { print " $key => $value\n"; } print "}\n"; } ```
null
CC BY-SA 3.0
null
2008-08-25T13:24:28.990
2016-10-24T17:03:02.960
2016-10-24T17:03:02.960
1,968
1,968
null
26,016
2
null
26,002
0
null
I don't recommend Oracle XE. My co-workers and I have been doing a project in Oracle and got severely tripped up after trying to use XE for our local development instances. The database worked fine until we started running local stress tests, at which point it started dropping connections. I don't know whether this ...
null
CC BY-SA 2.5
null
2008-08-25T13:22:31.540
2008-09-08T01:33:59.503
2008-09-08T01:33:59.503
1,694
1,694
null
26,020
1
26,035
null
53
124,095
I've done this before in C++ by including sqlite.h but is there a similarly easy way in C#?
What is the best way to connect and use a sqlite database from C#
CC BY-SA 2.5
0
2008-08-25T13:25:44.230
2021-05-26T12:58:19.653
2008-08-26T12:06:29.577
2,674
2,674
[ "c#", "sqlite" ]
26,023
2
null
26,007
0
null
I'm really not sure what you mean here - surely a pair of foreach loops does what you need? ``` foreach($array as $id => $assoc) { foreach($assoc as $part => $data) { // code } } ``` Or do you need something recursive? I'd be able to help more with example data and a context in how you want the d...
null
CC BY-SA 2.5
null
2008-08-25T13:26:53.713
2008-08-25T13:26:53.713
null
null
2,025
null
26,002
1
26,005
null
27
14,586
I want our team to develop against local instances of an Oracle database. With MS SQL, I can use SQL Express Edition. What are my options?
Develop on local Oracle instance
CC BY-SA 2.5
0
2008-08-25T13:14:00.687
2013-12-23T16:23:53.497
null
null
2,676
[ "oracle" ]
26,000
2
null
25,952
12
null
If you want to step away from your keyboard, Wizards of the Coast relased a game called RoboRally that is a combative programming board game. [http://www.wizards.com/roborally/](http://www.wizards.com/roborally/)
null
CC BY-SA 2.5
null
2008-08-25T13:11:35.513
2008-08-25T13:11:35.513
null
null
2,470
null
26,021
1
26,046
null
3
363
For our application, we keep large amounts of data indexed by three integer columns (source, type and time). Loading significant chunks of that data can take some time and we have implemented various measures to reduce the amount of data that has to be searched and loaded for larger queries, such as storing larger gran...
How is data compression more effective than indexing for search performance?
CC BY-SA 2.5
0
2008-08-25T13:26:15.947
2008-09-24T16:08:42.923
2008-09-24T16:08:42.940
12,870
2,077
[ "database", "performance" ]
26,027
2
null
26,020
6
null
There is a list of Sqlite wrappers for .Net at [http://www.sqlite.org/cvstrac/wiki?p=SqliteWrappers](http://www.sqlite.org/cvstrac/wiki?p=SqliteWrappers). From what I've heard [http://sqlite.phxsoftware.com/](http://sqlite.phxsoftware.com/) is quite good. This particular one lets you access Sqlite through ADO.Net just ...
null
CC BY-SA 2.5
null
2008-08-25T13:29:44.347
2008-08-25T13:29:44.347
null
null
1,912
null
26,017
2
null
2,046
16
null
As [Mike Stone said](https://stackoverflow.com/questions/2046/how-do-i-unit-test-persistence#7641), DbUnit is great for getting the database into a known state before running your tests. When your tests are finished, DbUnit can put the database back into the state it was in before you ran the tests. [DbUnit (Java)](h...
null
CC BY-SA 2.5
null
2008-08-25T13:22:46.733
2008-08-25T13:22:46.733
2017-05-23T12:17:44.127
-1
2,030
null
26,026
2
null
1,053
4
null
@Ryan Fox > Native complex data types are far from unknown. Fortran had it by the mid-sixties, and the OP exhibits a variety of other languages that support them in hist followup. And complex numbers can be added to other languages as libraries (with operator overloading they even look just like native types in the...
null
CC BY-SA 2.5
null
2008-08-25T13:29:01.803
2008-08-25T13:40:18.127
2008-08-25T13:40:18.127
2,509
2,509
null
26,028
1
27,325
null
1
734
We're trying to get rid of all of our SQL Server 2000 databases to re purpose our old DB server... Sharepoint 3.0 is being a showstopper. I've looked at a lot of guides from Microsoft and tried the instructions in those. I've also just tried the good ol' exec sp_detach_db / sp_attach_db with no luck. Has anyone actua...
Upgrading Sharepoint 3.0 to SQL 2005 Backend?
CC BY-SA 2.5
0
2008-08-25T13:29:54.953
2008-10-14T05:30:03.900
2008-10-14T05:30:03.900
8,454
2,764
[ "sql-server-2005", "sharepoint", "sql-server-2000" ]
26,025
1
29,748
null
47
24,203
I'm about to deploy a mediumsized site powered by Django. I have a dedicated Ubuntu Server. I'm really confused over which serversoftware to use. So i thought to myself: why not ask stackoverflow. What i'm looking for is: - - - - - I have heard of mod_wsgi and mod_python on Apache, nginx and lighty. Which are the...
Cleanest & Fastest server setup for Django
CC BY-SA 2.5
0
2008-08-25T13:28:41.150
2014-12-05T20:41:17.660
2008-09-14T15:14:32.930
-1
2,639
[ "python", "django", "apache", "hosting" ]
26,013
2
null
26,007
5
null
You should be able to use a nested foreach statment from the [php manual](http://uk3.php.net/foreach) ``` /* foreach example 4: multi-dimensional arrays */ $a = array(); $a[0][0] = "a"; $a[0][1] = "b"; $a[1][0] = "y"; $a[1][1] = "z"; foreach ($a as $v1) { foreach ($v1 as $v2) { echo "$v2\n"; } } ``` ...
null
CC BY-SA 2.5
null
2008-08-25T13:21:48.717
2008-08-25T13:21:48.717
null
null
2,098
null
26,031
2
null
752
17
null
If this is for something that will be called a lot in an application instance, it's a lot faster to compile and cache dynamic code instead of using the activator or `ConstructorInfo.Invoke()`. Two easy options for dynamic compilation are compiled [Linq Expressions](http://rogeralsing.com/2008/02/28/linq-expressions-cr...
null
CC BY-SA 3.0
null
2008-08-25T13:31:35.433
2017-06-14T06:14:00.137
2017-06-14T06:14:00.137
70,345
2,314
null
26,024
2
null
25,999
23
null
No solution is ever going to be perfect while the game is running on a system under the user's control, but there are a few steps you could take to make hacking the system more trouble. In the end, the goal can only be to make hacking the system more trouble than it's worth. - - - All in all though, getting the game...
null
CC BY-SA 2.5
null
2008-08-25T13:28:20.603
2008-08-25T13:28:20.603
null
null
797
null
26,036
2
null
25,999
2
null
As the other answer says, you are forced to trust a potentially malicious client, and a simple deterant plus a little human monitoring is going to be enough for a small game. If you want to get fancy, you then have to look for fraud patterns in the score data, simmular to a credit card company looking at charge data. ...
null
CC BY-SA 2.5
null
2008-08-25T13:36:01.537
2008-08-25T13:36:01.537
null
null
2,564
null
26,040
2
null
6,778
1
null
You know you can set the background color when you're embedding? > The following attributes are optional when defining the object and/or embed tags. For object , all attributes are defined in param tags unless otherwise specified: - [ hexadecimal RGB value] in the format #RRGGBB . Specifies the background color of the ...
null
CC BY-SA 2.5
null
2008-08-25T13:38:11.063
2008-08-25T13:38:11.063
2020-06-20T09:12:55.060
-1
914
null
26,045
2
null
26,041
2
null
I would reccomend sticking to what you know - PHP is more than capable. I used to play a game called [Hyperiums](http://www.hyperiums.com/) - a text based browser game like yours - which is created using Java (it's web-based quivalent is JSP?) and servlets. It works fairly well (it has had downtime issues but those we...
null
CC BY-SA 2.5
null
2008-08-25T13:43:34.517
2008-08-25T13:43:34.517
null
null
2,025
null
26,033
2
null
752
186
null
The answer was already given: > ``` ObjectType instance = (ObjectType)Activator.CreateInstance(objectType); ``` However, the `Activator` class has a [generic variant for the parameterless constructor](https://learn.microsoft.com/en-us/dotnet/api/system.activator.createinstance?view=net-7.0#system-activator-createinsta...
null
CC BY-SA 4.0
null
2008-08-25T13:33:25.257
2022-11-16T07:35:48.033
2022-11-16T07:35:48.033
1,968
1,968
null
26,051
2
null
26,041
2
null
Check out [django-mmo](http://code.google.com/p/django-mmo/)!
null
CC BY-SA 2.5
null
2008-08-25T13:46:47.363
2008-08-25T13:46:47.363
null
null
2,639
null
26,041
1
26,059
null
14
8,759
I'm starting to develop a browser-based game (and by this I mean text-based, no Flash or similar stuff on it) and I'm struggling to decide on which development framework to use. As far as requirements are concerned, the most important thing that I can think of right now is the ability to translate it to several langua...
Browser-based game - Which framework to choose?
CC BY-SA 3.0
0
2008-08-25T13:38:48.410
2015-11-20T11:39:18.860
2015-11-20T11:39:18.860
3,218,692
2,841
[ "language-agnostic", "frameworks" ]
26,038
2
null
1,053
5
null
Your question seems a little odd to me, as you seem to be suggesting that the Floating Point math is implemented by the language. That's generally not true, as the FP math is done using a floating point processor in hardware. But software or hardware, floating point will always be inaccurate. That's just how floats ...
null
CC BY-SA 2.5
null
2008-08-25T13:37:28.430
2008-08-25T13:37:28.430
null
null
1,409
null
26,046
2
null
26,021
4
null
> This made me wonder if the performance impact of disk I/O is actually much heavier than I thought. Definitely. If you have to go to disk, the performance hit is many orders of magnitude greater than memory. This reminds me of the classic Jim Gray paper, [Distributed Computing Economics](http://research.microsoft.com...
null
CC BY-SA 2.5
null
2008-08-25T13:43:41.643
2008-08-25T13:43:41.643
null
null
1
null
26,061
2
null
25,977
77
null
This depends entirely on how smart you want the algorithm to be. For instance, here are some issues: - - - The easiest and simplest I've seen for this is just to do the following steps to each image: 1. scale to something small, like 64x64 or 32x32, disregard aspect ratio, use a combining scaling algorithm inste...
null
CC BY-SA 2.5
null
2008-08-25T13:53:36.627
2008-10-15T14:58:00.663
2008-10-15T14:58:00.663
267
267
null
26,035
2
null
26,020
47
null
[Microsoft.Data.Sqlite](https://www.nuget.org/packages/Microsoft.Data.Sqlite) by Microsoft has over 9000 downloads every day, so I think you are safe using that one. Example usage from [the documentation](https://learn.microsoft.com/dotnet/standard/data/sqlite/): ``` using (var connection = new SqliteConnection("Data S...
null
CC BY-SA 4.0
null
2008-08-25T13:34:49.043
2021-05-26T12:58:19.653
2021-05-26T12:58:19.653
2,257
2,257
null
26,047
2
null
25,999
3
null
That's a really hard question. I've never implemented such thing but here's a simple aproximmation. Your main concern is due to hackers guessing what is it your application is doing and then sending their own results. Well, first of all, unless your application has a great success I wouldn't be worried. Doing such t...
null
CC BY-SA 2.5
null
2008-08-25T13:45:01.500
2008-08-25T14:01:15.347
2008-08-25T14:01:15.347
2,695
2,695
null
26,060
2
null
15,857
0
null
I can't see a way to add delay outside of JavaScript - but if you're going to use JavaScript you may as well use a JavaScript controlled menu. If you follow a semantically-correct nav pattern and set it up so it display's normally (e.g. static) when JavaScript is not present you should be fine with whatever you use....
null
CC BY-SA 2.5
null
2008-08-25T13:52:01.373
2008-08-25T13:52:01.373
null
null
2,025
null
26,055
2
null
1,053
3
null
> In fact, how does one represent i (or j for the engineers) in a conventional programming language? In a language that doesn't have a native representation, it is usually added using OOP to create a `Complex` class to represent `i` and `j`, with operator overloading to properly deal with operations involving other `C...
null
CC BY-SA 2.5
null
2008-08-25T13:48:46.517
2008-08-25T13:48:46.517
null
null
2,134
null
26,064
2
null
15,857
1
null
I am using the solution implemented on Steve Gibson's site [grc.com](http://www.grc.com/menudemo.htm). It does everything I need, and uses . The delay thing you are looking for isn't there however, so you will probably need to add some Javascript for that.
null
CC BY-SA 2.5
null
2008-08-25T13:56:13.550
2008-08-25T13:56:13.550
null
null
1,821
null
26,057
2
null
26,025
5
null
The officially recommended way to deploy a django project is to use mod_python with apache. This is described in [the documentation.](https://docs.djangoproject.com/en/1.2/howto/deployment/modpython/) The main pro with this is that it is the best documented, most supported, and most common way to deploy. The con is ...
null
CC BY-SA 3.0
null
2008-08-25T13:49:24.970
2013-07-12T21:51:43.623
2013-07-12T21:51:43.623
1,011,749
845
null
26,067
2
null
15,857
0
null
As Lee Theobald said, drop/down need Javascript, and Jquery is a great choice. But in the side of accesibility, take a look at "[Listamatic](http://css.maxdesign.com.au/listamatic/index.htm)" a great list of menus and special [this nested](http://www.karlnelson.net/nestedlists/).
null
CC BY-SA 2.5
null
2008-08-25T13:58:56.287
2008-08-25T13:58:56.287
null
null
1,713
null
26,070
2
null
26,062
1
null
Microsoft Access has a system table called MSysObjects that contains a list of all database objects, including tables. Table objects have Type 1, 4 and 6. It is important to reference the type: ... Where Name='TableName' And Type In (1,4,6) Otherwise, what is returned could be a some object other than a table.
null
CC BY-SA 2.5
null
2008-08-25T14:03:17.400
2008-08-25T14:08:56.373
2008-08-25T14:08:56.373
2,548
2,548
null
26,062
1
163,041
null
0
670
I have an Access database in which I drop the table and then create the table afresh. However, I need to be able to test for the table in case the table gets dropped but not created (i.e. when someone stops the DTS package just after it starts -roll-eyes- ). If I were doing this in the SQL database I would just do: ...
Can DTS Test for Presence of MS-Access Table
CC BY-SA 2.5
null
2008-08-25T13:54:05.583
2008-10-02T15:34:39.357
2008-08-25T15:18:06.627
730
730
[ "sql-server", "ms-access", "dts" ]
26,071
2
null
24,596
17
null
I've recently started using the [Stripes Framework](http://www.stripesframework.org/). If you're looking for a request based framework that's really easy to use, but doesn't impose any limits on what you are doing I'd highly recommend it. It's similar to struts, but it goes way beyond it. There are even some plugin pr...
null
CC BY-SA 2.5
null
2008-08-25T14:04:20.440
2008-08-25T14:04:20.440
null
null
1,310
null
26,059
2
null
26,041
8
null
> I would reccomend sticking to what you know - PHP is more than capable. That's true of course, but: > I don't mind, and I would even like to use this as an excuse, learning some new thing like Python or Ruby. Then writing a browser game is an excellent opportunity to do this. Learning something new is never wrong ...
null
CC BY-SA 2.5
null
2008-08-25T13:50:17.853
2008-08-25T13:50:17.853
null
null
1,968
null
26,065
1
null
null
13
2,330
What strategies have you used with Model Based Testing? - - - - - What difference do you make in your functional base test libraries to better support MBTs? ­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­
Model Based Testing Strategies
CC BY-SA 3.0
0
2008-08-25T13:57:42.047
2017-07-19T17:17:54.103
2017-07-19T17:17:54.103
7,750,640
2,564
[ "testing", "integration-testing", "mbt" ]
26,072
1
null
null
-1
249
Say I have an application that wants a persistent connection to a server. How do I implement connection/re-connection logic so that I'm not wasting resources (power/bandwidth) and I have fast reconnect time when connectivity appears/improves? If I only use connectivity notifications, I can get stuck on problems not rel...
Reconnect logic with connectivity notifications
CC BY-SA 3.0
null
2008-08-25T14:04:49.783
2017-07-19T17:13:46.457
2017-07-19T17:13:46.457
7,750,640
2,564
[ "sockets", "networking", "offline" ]
26,069
2
null
16,828
118
null
You can also set the environment variable `LESS` I use `LESS=-Ri`, so that I can pump colorized output from `grep` into it, and maintain the ANSI colour sequences. Another little used feature of less that I found is starting it with `+F` as an argument (or hitting + while in less). This causes it to follow the file y...
null
CC BY-SA 3.0
null
2008-08-25T14:01:08.590
2013-08-29T15:45:45.373
2013-08-29T15:45:45.373
24
24
null
26,073
2
null
26,062
1
null
Try the same T-SQL, but in MS ACCESS the sys objects table is called: MSysObjects. Try this: ``` SELECT * FROM MSysObjects WHERE Name = 'your_table'; ``` and see if it works from there. You can take a look at these tables if you go to Tools -> Options -> View (a tab) -> and check Hidden Objects, System Objects. S...
null
CC BY-SA 2.5
null
2008-08-25T14:05:30.687
2008-08-25T14:05:30.687
null
null
2,684
null
26,074
1
27,403
null
8
4,118
I'm trying to programmatically restrict the memory consumption of plugins running in a .Net AppDomain, but I can't find any setup parameters for this, nor can I find a way to query an AppDomain to figure out how much memory it is consuming. Any ideas?
How can I figure out how much memory a .Net Appdomain is consuming?
CC BY-SA 2.5
null
2008-08-25T14:06:38.640
2015-04-03T07:19:21.500
null
null
2,483
[ ".net", "clr" ]
26,077
2
null
25,765
6
null
[Commons Configuration](http://commons.apache.org/configuration/) We're using this. Properties files alone are much easier to handle, but if you need to represent more complex data commons configuration can do this and read your properties files as well. If you aren't doing anything complicated I'd stick to properite...
null
CC BY-SA 2.5
null
2008-08-25T14:09:17.323
2008-08-25T14:09:17.323
null
null
1,310
null
26,081
2
null
26,021
0
null
I made a similar discovery when working within Python on a database: the cost of accessing a disk is very, very high. It turned out to be much faster (ie nearly two orders of magnitude) to request a whole chunk of data and iterate through it in python than it was to create seven queries that were narrower. (One per d...
null
CC BY-SA 2.5
null
2008-08-25T14:12:29.657
2008-08-25T14:12:29.657
null
null
188
null
26,078
2
null
25,449
18
null
Look into [OSGi](http://www.osgi.org). On one hand, OSGi provides all sorts of infrastructure for managing, starting, and doing lots of other things with modular software components. On the other hand, it could be too heavy-weight for your needs. Incidentally, Eclipse uses OSGi to manage its plugins.
null
CC BY-SA 4.0
null
2008-08-25T14:09:53.860
2020-03-06T08:21:05.650
2020-03-06T08:21:05.650
897,373
2,197
null
26,083
2
null
21,725
19
null
I really like the [SuperTab](http://www.vim.org/scripts/script.php?script_id=1643) plugin, it allows you to use the tab key to do all your insert completions.
null
CC BY-SA 2.5
null
2008-08-25T14:13:23.663
2008-08-25T15:06:18.387
2008-08-25T15:06:18.387
2,844
2,844
null
26,080
2
null
25,969
1,191
null
[Claude Houle's answer](https://stackoverflow.com/a/25971/282110): should work fine, and you can also have multiple columns and other data as well: ``` INSERT INTO table1 ( column1, column2, someInt, someVarChar ) SELECT table2.column1, table2.column2, 8, 'some string etc.' FROM table2 WHERE table2.ID = 7; ``` ...
null
CC BY-SA 4.0
null
2008-08-25T14:11:15.353
2020-02-18T20:32:36.643
2020-02-18T20:32:36.643
102,937
1,414
null
26,079
1
26,097
null
40
26,547
Let's say I'm writing a PHP (>= 5.0) class that's meant to be a singleton. All of the docs I've read say to make the class constructor private so the class can't be directly instantiated. So if I have something like this: ``` class SillyDB { private function __construct() { } public static function getConn...
In a PHP5 class, when does a private constructor get called?
CC BY-SA 2.5
0
2008-08-25T14:11:10.160
2018-09-26T05:36:19.867
2008-08-25T14:19:27.220
305
305
[ "php", "oop", "constructor" ]
26,068
2
null
26,025
6
null
As @Barry said, the documentation uses [mod_python](http://modpython.org). I haven't used Ubuntu as a server, but had a good experience with mod_wsgi on Solaris. You can find documentation for [mod_wsgi and Django](http://code.google.com/p/modwsgi/wiki/ConfigurationGuidelines) on the [mod_wsgi](http://code.google.com/p...
null
CC BY-SA 3.0
null
2008-08-25T14:00:27.687
2014-05-28T05:45:21.163
2014-05-28T05:45:21.163
2,016,800
636
null
26,084
2
null
22,493
0
null
Have you tried running SSMS in elevated mode, and do you have the latest SP installed on the client?
null
CC BY-SA 2.5
null
2008-08-25T14:16:34.060
2008-08-25T14:16:34.060
null
null
35
null
26,094
1
2,673,361
null
6
2,445
When doing calculations on very large numbers where integral data types such as double or int64 falls short, a separate class to handle such large numbers may be needed. Does anyone care to offer an efficient algorithm on how best to do this?
Most efficient implementation of a large number class
CC BY-SA 2.5
0
2008-08-25T14:20:34.503
2010-04-20T07:34:24.327
2008-11-08T20:22:01.300
18,382
224
[ "language-agnostic", "bignum" ]
26,075
1
26,700
null
0
859
I loaded a custom `DataTable` into an `UltraChart` of type `GanttChart`. The data loads successfully. Do you know if it possible to add support for mouse resize(drag) to the tasks that show up into the chart? I have not been able to figure out if this is supported by the `Infragistics` control. ­­­­­­­­­­­­­­­­­­­­­­­...
Resize Infragistics GanttChart task with the mouse
CC BY-SA 3.0
null
2008-08-25T14:07:31.213
2017-07-19T17:07:32.750
2017-07-19T17:07:32.750
7,750,640
2,437
[ "winforms", "charts", "infragistics", "gantt-chart" ]
26,096
2
null
9,033
5
null
@lainMH, Nullable booleans are useful when retrieving values from a database that are nullable and when putting values back in. Sometimes you want to know the field has not been set.
null
CC BY-SA 2.5
null
2008-08-25T14:21:57.183
2009-09-12T20:55:05.870
2009-09-12T20:55:05.870
63,550
2,847
null
26,092
2
null
21,725
13
null
Not a plugin, but I advise any Mac user to switch to the [MacVim](http://code.google.com/p/macvim/) distribution which is vastly superior to the official port. As for plugins, I used [VIM-LaTeX](http://vim-latex.sourceforge.net/) for my thesis and was very satisfied with the usability boost. I also like the [Taglist](...
null
CC BY-SA 2.5
null
2008-08-25T14:19:49.763
2008-08-25T14:19:49.763
null
null
1,968
null
26,097
2
null
26,079
65
null
`__construct()` would only be called if you called it from within a method for the class containing the private constructor. So for your Singleton, you might have a method like so: ``` class DBConnection { private static $Connection = null; public static function getConnection() { if(!isset(self::$Conn...
null
CC BY-SA 4.0
null
2008-08-25T14:22:09.227
2018-09-26T05:36:19.867
2018-09-26T05:36:19.867
3,055,725
1,344
null
26,105
2
null
19,445
1
null
1) CMS: [Oracle's BEA Aqualogic](http://www.bea.com/framework.jsp?CNT=index.htm&FP=/content/products/aqualogic/) 2) Size: 10,000+ 3) Experience: As an end user with full community and content admin privileges, I find the tool to be outdated and stifling in terms of knowledge sharing and trying to get the benefits that ...
null
CC BY-SA 2.5
null
2008-08-25T14:25:58.500
2008-08-25T14:25:58.500
null
null
null
null
26,113
1
27,096
null
8
236
I'm not talking about tools that let one view a page in combinations of operating systems and browsers like crossbrowsertesting.com but in creating or figuring out the actual CSS.
What is your best tool or techniques for getting the same display on IE6/7 and Firefox?
CC BY-SA 2.5
0
2008-08-25T14:28:47.980
2014-04-02T23:22:02.773
2014-04-02T23:22:02.773
193,717
2,702
[ "css", "internet-explorer", "firefox", "cross-browser" ]
26,119
2
null
26,111
0
null
Do you get a different error without the ISAPI filter in place?
null
CC BY-SA 2.5
null
2008-08-25T14:30:53.340
2008-08-25T15:26:49.040
2008-08-25T15:26:49.040
35
35
null
26,098
1
26,121
null
11
14,172
I'm writing a C/C++ DLL and want to export certain functions which I've done before using a .def file like this ``` LIBRARY "MyLib" EXPORTS Foo Bar ``` with the code defined as this, for example: ``` int Foo(int a); void Bar(int foo); ``` However, what if I want to declare an overloaded method of Foo() like: ...
Overloaded functions in C++ DLL def file
CC BY-SA 2.5
0
2008-08-25T14:22:21.257
2013-03-21T06:15:10.647
2008-08-25T14:56:32.123
194
194
[ "c++", "c", "dll" ]
26,101
2
null
22,696
0
null
Is there a field FLDC that would be different for identifying duplicates? I presume there must be, as otherwise having (FLDA,FLDB) as a unique or primary key would solve your problem immediately. Assuming there is such a field, you could try something like this: ``` SELECT T1.FLDA, T1.FLDB, T1.FLDC FROM Table1 T1, Ta...
null
CC BY-SA 2.5
null
2008-08-25T14:23:49.020
2008-08-25T14:23:49.020
null
null
277
null
26,120
2
null
26,113
0
null
I write to the standards and both Firefox and IE7 follow a pretty good set in common. IE6 is dead as far as I am concerned but if I get back into professional web dev I'll probably have to revise that ;)
null
CC BY-SA 2.5
null
2008-08-25T14:31:17.910
2008-08-25T14:31:17.910
null
null
269
null
26,091
2
null
25,794
137
null
You can duplicate a table without data by running: ``` CREATE TABLE x LIKE y; ``` (See the [MySQL CREATE TABLE](http://dev.mysql.com/doc/refman/5.0/en/create-table.html) Docs) You could write a script that takes the output from `SHOW TABLES` from one database and copies the schema to another. You should be able to ...
null
CC BY-SA 2.5
null
2008-08-25T14:19:24.960
2008-08-25T14:19:24.960
null
null
2,506
null
26,116
2
null
26,094
4
null
Using the built-in features of a language work for me. Java has `BigInteger` and `BigDecimal`, and Python automagicaly switches to an object similar to Java's if a number gets out of the range of an `integer` or whatnot. As for other languages though, I have no idea. I hate re-inventing the wheel.
null
CC BY-SA 2.5
null
2008-08-25T14:30:03.780
2009-07-29T12:59:48.023
2009-07-29T12:59:48.023
2,598
2,598
null
26,111
1
1,474,502
null
1
7,661
Get the following error periodically in an IIS application: > Failed to load resources from resource file. The full error message in the Application Event Log is: > Event Type: Error Event Source: .NET Runtime Event Category: None Event ID: 0 Date: 8/8/2008 Time: 8:8:8 AM User: N/A...
Failed to load resources from resource file
CC BY-SA 2.5
null
2008-08-25T14:28:03.940
2009-09-24T22:23:23.223
2008-08-25T20:05:22.240
2,850
2,850
[ ".net", "iis" ]
26,103
2
null
22,181
1
null
Although connection.GetSchema("Tables") does return meta data about the tables in your database, it won't return everything in your sproc if you define any custom columns. For example, if you throw in some random ad-hoc column like *SELECT ProductName,'Testing' As ProductTestName FROM dbo.Products" you won't see 'Pr...
null
CC BY-SA 2.5
null
2008-08-25T14:25:40.497
2008-08-28T17:34:19.240
2008-08-28T17:34:19.240
2,701
2,701
null
26,123
1
26,135
null
14
7,091
I want to use Powershell to write some utilities, leveraging our own .NET components to handle the actual work. This is in place of writing a small console app to tie the calls together. My question is where I would find a good source of documentation or tutorial material to help me fast track this?
Accessing .NET components from Powershell
CC BY-SA 2.5
0
2008-08-25T14:33:18.327
2016-11-15T13:51:52.273
2008-09-10T18:13:57.133
-1
1,535
[ "powershell", "components" ]
26,127
2
null
26,113
0
null
Padding. IE6 can get a little hinky when using margin to place elements horizontally on a page. If you size your elements and space the content within using padding, you can make many layouts work great in IE6/7, FF, Safari, and Opera without any hacks. IE5.5 makes things a little stickier because of the broken box mo...
null
CC BY-SA 2.5
null
2008-08-25T14:34:18.667
2008-08-25T14:34:18.667
null
null
1,344
null
26,134
2
null
26,113
4
null
Use a css reset to level the field across browsers. YUI and Eric Meyer have good ones.
null
CC BY-SA 2.5
null
2008-08-25T14:37:20.097
2008-08-25T14:37:20.097
null
null
1,786
null
26,126
2
null
26,113
0
null
I try to make a standards-compliant page and do all my testing in Firefox (since it has some excellent development extensions such as Web Developer and Firebug). Then when I'm finished I test the site in IE, then make whatever small changes are necessary. I find that I need to make very few changes, since I don't do ...
null
CC BY-SA 2.5
null
2008-08-25T14:34:10.010
2008-08-25T14:34:10.010
null
null
1,694
null
26,124
2
null
25,952
2
null
[http://en.wikipedia.org/wiki/Hacker_(computer_game)](http://en.wikipedia.org/wiki/Hacker_(computer_game)) [http://en.wikipedia.org/wiki/Hacker_2](http://en.wikipedia.org/wiki/Hacker_2) There is also a great hacking game the name of which I simply cannot remember. Hrm.
null
CC BY-SA 2.5
null
2008-08-25T14:33:34.957
2008-08-25T14:33:34.957
null
null
106
null
26,131
2
null
26,113
0
null
> I try to make a standards-compliant page and do all my testing in Firefox (since it has some excellent development extensions such as Web Developer and Firebug). Then when I'm finished I test the site in IE, then make whatever small changes are necessary. I find that I need to make very few changes, since I don't do ...
null
CC BY-SA 2.5
null
2008-08-25T14:36:28.287
2008-08-25T14:36:28.287
null
null
2,025
null
26,135
2
null
26,123
16
null
If you want to load an assembly into your PowerShell session, you can use reflection and load the assembly. ``` [void][System.Reflection.Assembly]::LoadFrom(PathToYourAssembly) ``` After you load your assembly, you can call static methods and create new instances of a class. A good tutorial can be found [here](ht...
null
CC BY-SA 3.0
null
2008-08-25T14:38:13.963
2015-09-25T17:33:00.470
2015-09-25T17:33:00.470
1,233
1,233
null
26,133
2
null
26,094
12
null
There are 2 solutions to your problem: - Use an external library such as '[The GNU MP Bignum Library](http://gmplib.org/) and forget about implementation details.- Design your own class/structure containing multiple higher order datatypes like double or int64 variables and define basic math operations for them using...
null
CC BY-SA 2.5
null
2008-08-25T14:37:16.727
2008-08-25T14:37:16.727
null
null
1,311
null
26,140
2
null
26,113
0
null
I'm with Eli. Writing against firefox (with firebug installed) makes you have to write "more compatible" code to begin with and then its less of a job later down the line when you come to make it compatible with IE. Use the site [QuirksMode](http://www.quirksmode.org/) to help you find answers to compatbility informa...
null
CC BY-SA 2.5
null
2008-08-25T14:41:45.327
2008-08-25T14:41:45.327
null
null
2,839
null
26,121
2
null
26,098
10
null
In the code itself, mark the functions you want to export using __declspec(dllexport). For example: ``` #define DllExport __declspec(dllexport) int DllExport Foo( int a ) { // implementation } int DllExport Foo( int a, int b ) { // implementation } ``` If you do this, you do not need to list the functions in t...
null
CC BY-SA 2.5
null
2008-08-25T14:32:33.180
2008-08-25T16:53:38.973
2008-08-25T16:53:38.973
1,821
1,821
null
26,144
2
null
25,938
0
null
I do not understand your question all the way. If you need an overall summary that is repeated, you would need a sub-report that have shown in the report multiple times.
null
CC BY-SA 2.5
null
2008-08-25T14:44:33.213
2008-08-25T14:44:33.213
null
null
1,215
null
26,138
2
null
26,072
1
null
This is a very "huge" question. I can say that we use an O/R Mapper and each "query" to the database needs an object called PersistenceBroker. This class is in charge of all the DB Stuff related to connecting, authenticating etc. We've written a PersistenceBrokerFactory.GetCurrentBroker() which returns the "working" ...
null
CC BY-SA 2.5
null
2008-08-25T14:39:11.480
2008-08-25T14:39:11.480
null
null
2,684
null
26,137
1
26,181
null
9
6,154
I have a couple of questions regarding VBScript and ASP Classic: 1. What is the preferred way to access an MS SQL Server database in VBScript/ASP? 2. What are best practices in regards to separating model from view from controller? 3. Any other things I should know about either VBScript or ASP? If you haven't noti...
VBScript/ASP Classic
CC BY-SA 3.0
0
2008-08-25T14:38:38.580
2012-06-17T10:17:11.023
2012-06-17T10:17:11.023
727,208
2,147
[ "sql-server", "model-view-controller", "asp-classic", "vbscript" ]
26,142
2
null
26,098
11
null
Function overloading is a C++ feature that relies on name mangling (the cryptic function names in the linker error messages). By writing the mangled names into the def file, I can get my test project to link and run: ``` LIBRARY "TestDLL" EXPORTS ?Foo@@YAXH@Z ?Foo@@YAXHH@Z ``` seems to work for ``` void Fo...
null
CC BY-SA 2.5
null
2008-08-25T14:42:03.720
2008-08-25T14:42:03.720
null
null
1,810
null
26,151
1
26,162
null
73
40,931
C++ 0x has template aliases (sometimes referred to as template typedefs). See [here](http://en.wikipedia.org/wiki/C%2B%2B0x#Alias_templates). Current spec of C++ does not. What do you like to use as work around ? Container objects or Macros ? Do you feel its worth it ?
Template typedefs - What's your work around?
CC BY-SA 3.0
0
2008-08-25T14:47:00.853
2015-09-02T04:27:29.357
2012-08-07T15:11:09.103
536,086
2,759
[ "c++", "templates", "type-safety" ]
26,150
2
null
2,658
-1
null
Short answer: Subversion if you're the only one coding it or you're on site with everyone you work with. GIT if you're working with people in different sites and your code base is huge. Subversion is really, really easy to setup and get using. It is also nice because you can do relatively complicated things with it to...
null
CC BY-SA 2.5
null
2008-08-25T14:46:53.037
2008-08-25T14:46:53.037
null
null
2,836
null
26,156
2
null
26,147
10
null
It certainly is possible. All you need to do is register the Mozilla ActiveX control (mozctlx.dll I believe), and you can drag it onto your form as any ActiveX control. The programming interface is similar (though not identical) to the IE one, and you can even use the Microsoft.MSHTML.dll managed library for control in...
null
CC BY-SA 2.5
null
2008-08-25T14:49:00.940
2008-08-25T14:49:00.940
null
null
1,975,282
null
26,158
1
27,132
null
129
126,689
How does a stack overflow occur and what are the ways to make sure it doesn't happen, or ways to prevent one?
How does a "stack overflow" occur and how do you prevent it?
CC BY-SA 4.0
0
2008-08-25T14:49:29.847
2023-02-15T16:19:28.143
2023-02-15T12:24:22.077
4,267,244
1,935
[ "memory", "stack-overflow" ]
26,145
1
40,209
null
3
2,249
I'm making a simple extra java app launcher for Eclipse 3.2 (JBuilder 2007-8) for internal use. So I looked up all the documentations related, including this one [The Launching Framework from eclipse.org](http://www.eclipse.org/articles/Article-Launch-Framework/launch.html) and have managed to make everything else wor...
Cannot add a launch shortcut (Eclipse Plug-in)
CC BY-SA 3.0
null
2008-08-25T14:45:15.910
2015-11-20T11:38:15.483
2015-11-20T11:38:15.483
3,218,692
2,710
[ "eclipse", "plugins" ]
26,168
2
null
26,158
14
null
A stack overflow in real code occurs very rarely. Most situations in which it occurs are recursions where the termination has been forgotten. It might however rarely occur in highly nested structures, e.g. particularly large XML documents. The only real help here is to refactor the code to use an explicit stack object ...
null
CC BY-SA 2.5
null
2008-08-25T14:55:01.443
2008-08-25T14:55:01.443
null
null
1,968
null
26,166
2
null
25,914
-1
null
Not a direct answer to your question, but you might want to check out Hudson. It has the benefit of being much easier to configure than CruiseControl. There's a bit about using it for NAnt [here](http://hudson.gotdns.com/wiki/display/HUDSON/NAnt+Plugin).
null
CC BY-SA 2.5
null
2008-08-25T14:54:50.833
2008-08-25T14:54:50.833
null
null
2,836
null
26,157
2
null
26,123
4
null
The link that Steven posted is a good example. I don't know of any extensive tutorial. Both the [Windows Powershell Cookbook](http://oreilly.com/catalog/9780596528492/) and [Windows Powershell In Action](http://www.manning.com/payette/) have good chapters on the subject. Also, look at the ::LoadFromFile method of the S...
null
CC BY-SA 2.5
null
2008-08-25T14:49:16.167
2008-08-25T14:49:16.167
null
null
1,358
null
26,169
2
null
26,158
6
null
Infinite recursion is a common way to get a stack overflow error. To prevent - always make sure there's an exit path that be hit. :-) Another way to get a stack overflow (in C/C++, at least) is to declare some enormous variable on the stack. ``` char hugeArray[100000000]; ``` That'll do it.
null
CC BY-SA 2.5
null
2008-08-25T14:55:10.303
2008-08-25T14:55:10.303
null
null
863
null
26,162
2
null
26,151
106
null
> What do you like to use as work around ? Container objects or Macros ? Do you feel its worth it ? The canonical way is to use a metafunction like thus: ``` template <typename T> struct my_string_map { typedef std::map<std::string, T> type; }; // Invoke: my_string_map<int>::type my_str_int_map; ``` This is a...
null
CC BY-SA 2.5
null
2008-08-25T14:51:01.920
2008-11-30T12:59:54.113
2008-11-30T12:59:54.113
1,968
1,968
null
26,180
2
null
23,209
-2
null
After trying to get this stuff to compile under VS 2008, I tried earlier versions of VS - 2005 worked with warnings, and 2003 just worked. I double checked the linkages and couldn't find any problems, so either I just couldn't find it, or that wasn't the problem. So to reiterate, downgrading to VS 2003 fixed it.
null
CC BY-SA 2.5
null
2008-08-25T15:02:24.777
2008-08-25T15:02:24.777
null
null
1,322
null
26,164
2
null
2,658
1
null
Coding Horror has a great post about [how to set up Subversion on Windows](https://blog.codinghorror.com/setting-up-subversion-on-windows/). Following the tutorial, I was able to get Subervsion and TortoiseSVN running locally, and I got the education I needed out of it. As far as Git goes, it's probably a good idea t...
null
CC BY-SA 3.0
null
2008-08-25T14:52:48.733
2018-04-11T16:59:29.907
2018-04-11T16:59:29.907
2,093,371
null
null
26,177
2
null
26,158
11
null
Most people will tell you that a stack overflow occurs with recursion without an exit path - while mostly true, if you work with big enough data structures, even a proper recursion exit path won't help you. Some options in this case: - [Breadth-first search](http://en.wikipedia.org/wiki/Breadth-first_search)- [Tail r...
null
CC BY-SA 2.5
null
2008-08-25T15:00:35.780
2008-08-25T15:00:35.780
null
null
35
null