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
39,877
2
null
39,867
0
null
make sure the user that is running the cron job has the permissions needed to encrypt the file.
null
CC BY-SA 2.5
null
2008-09-02T16:02:43.790
2008-09-02T16:02:43.790
null
null
17
null
39,878
2
null
39,847
1
null
Also, you could use autoconf and distribute your application in source form only. :)
null
CC BY-SA 2.5
null
2008-09-02T16:03:04.117
2008-09-02T16:03:04.117
null
null
3,886
null
39,873
2
null
36,014
2
null
Personally I'm not convinced by the threading theory at all. The one time I've seen this before, I was working with a library which also defined Exception and the usings I had meant that the actual Catch was referring to a different "Exception" type (if it had been fully qualified it was Company.Lib.Exception but it w...
null
CC BY-SA 2.5
null
2008-09-02T16:00:45.823
2008-09-02T20:33:41.050
2008-09-02T20:33:41.063
1,120
1,120
null
39,879
1
39,961
null
326
194,117
Is it a deliberate design decision or a problem with our current day browsers which will be rectified in the coming versions?
Why doesn't JavaScript support multithreading?
CC BY-SA 2.5
0
2008-09-02T16:03:23.773
2021-10-31T06:09:09.017
2008-09-05T00:17:55.690
184
184
[ "javascript", "multithreading", "browser" ]
39,883
2
null
39,874
-4
null
An array would probably be fine. If you wanted more convenient means of "traversing" the board, you could easily build methods to abstract away the details of the data structure implementation.
null
CC BY-SA 2.5
null
2008-09-02T16:05:14.330
2008-09-02T16:05:14.330
null
null
337
null
39,884
2
null
39,107
0
null
[Fiddler](http://www.fiddler2.com/fiddler2/) is a(nother) web proxy that can be used to degrade your connection.
null
CC BY-SA 2.5
null
2008-09-02T16:05:17.077
2008-09-02T16:05:17.077
null
null
3,920
null
39,887
2
null
39,879
0
null
As far as I have heared Google Chrome will have multithreaded javascript, so it is a "current implementations" problem.
null
CC BY-SA 2.5
null
2008-09-02T16:05:38.557
2008-09-02T16:05:38.557
null
null
999
null
39,872
2
null
32,597
2
null
One critical thing you has to keep in mind about TFS, is that it likes to have the machine all to it self. So if you have to create a separate instance on Hyper-V do it using the proven Windows Server 2003 platform with SQL Server 2005. I am sure Microsoft has done a great job getting it to work under Windows Serve...
null
CC BY-SA 2.5
null
2008-09-02T16:00:41.593
2008-09-02T16:00:41.593
null
null
17
null
39,891
2
null
39,746
2
null
In order to be able to use an extension in Explorer, the "bitness" of the extension needs to match the bitness of the operating system. This is because (at least under Windows) you can't load a 32-bit DLL into a 64-bit process -- or vice versa. If there's no 64-bit version of HgTortoise, then you can't use it with Ex...
null
CC BY-SA 2.5
null
2008-09-02T16:07:51.843
2008-09-02T16:07:51.843
null
null
533
null
39,881
2
null
39,874
9
null
The simple approach is to use an 8x8 integer array. Use 0 for empty squares and assign values for the pieces: ``` 1 white pawns 2 white knights 3 white bishops 4 white rooks 5 white queens 6 white king Black pieces use negative values -1 black pawn -2 black knight etc 8| -4 -2 -3 -5 -6 -3 -2 -4 7| -1 -1 -1 -1 -1 -1 ...
null
CC BY-SA 2.5
null
2008-09-02T16:04:17.780
2008-09-02T16:04:17.780
null
null
4,262
null
39,885
2
null
39,874
0
null
``` int[8][8] 0=no piece 1=king 2=queen 3=rook 4=knight 5=bishop 6=pawn ``` use positive ints for white and negative ints for black
null
CC BY-SA 2.5
null
2008-09-02T16:05:21.600
2008-09-02T16:12:54.077
2008-09-02T16:12:54.077
2,554
2,554
null
39,900
2
null
39,879
12
null
Do you mean why doesn't the language support multithreading or why don't JavaScript engines in browsers support multithreading? The answer to the first question is that JavaScript in the browser is meant to be run in a sandbox and in a machine/OS-independent way, to add multithreading support would complicate the lang...
null
CC BY-SA 2.5
null
2008-09-02T16:09:40.293
2008-09-02T16:09:40.293
null
null
4,249
null
39,889
2
null
35,463
0
null
I don't think (at least can't find a way to make) [Chris' answer](https://stackoverflow.com/questions/35463/how-to-divide-two-64-bit-numbers-in-linux-kernel#35472) work in this case because actually changes the dividend in-place. Getting the absolute value implies a temporary variable whose value will change the way I...
null
CC BY-SA 2.5
null
2008-09-02T16:06:26.620
2008-09-02T16:06:26.620
2017-05-23T11:48:37.237
-1
null
null
39,892
1
40,036
null
21
19,638
The IE Developer Toolbar is a plugin that can dock or separate from the browser. I understand its much more difficult to do this in IE than in Firefox. - - -
How To Write a Plug-In for IE
CC BY-SA 2.5
0
2008-09-02T16:07:53.310
2014-12-18T06:11:47.213
2012-08-14T09:57:21.653
735,446
4,239
[ "internet-explorer", "plugins", "ieaddon" ]
39,899
2
null
39,874
1
null
I would use a multidimensional array so that each element in an array is a grid reference to a square on the board. Thus ``` board = arrary(A = array (1,2,3,4,5,5,6,7,8), B = array (12,3,.... etc... etc... ) ``` Then is then the board square A1. In reality yo...
null
CC BY-SA 2.5
null
2008-09-02T16:09:31.340
2008-09-02T16:09:31.340
null
null
319
null
39,898
2
null
39,867
0
null
I've came across this problem once. I can't really tell you why, but I dont think cron executes with the same environment variable as the user do. I actually had to export the good path for my programs to execute well. Is gpg at least trying to execute? Or are the files you are trying to encypt actually in the curre...
null
CC BY-SA 2.5
null
2008-09-02T16:09:05.117
2008-09-02T16:09:05.117
null
null
2,907
null
39,906
2
null
39,903
-1
null
C++, upon which C# is derived, specified that the default class access level is private. C# carries this forward for better or worse.
null
CC BY-SA 2.5
null
2008-09-02T16:13:32.687
2008-09-02T16:13:32.687
null
null
2,894
null
39,888
2
null
39,855
3
null
I don't know of a way to embed PowerPoint slides directly into HTML. However, there are a number of solutions online for converting a PPT file into a [SWF](http://en.wikipedia.org/wiki/SWF), which can be embedded into HTML just like any other Flash movie. [Googling for 'ppt to swf'](http://www.google.com/search?source...
null
CC BY-SA 3.0
null
2008-09-02T16:05:53.487
2011-10-19T09:11:41.280
2011-10-19T09:11:41.280
63,550
1,409
null
39,907
2
null
39,691
1
null
You can pick up a lot from [Pro JavaScript Techniques](https://rads.stackoverflow.com/amzn/click/com/1590597273), and I'm looking forward to Resig's forthcoming [Secrets of the JavaScript Ninja](http://jsninja.com/).
null
CC BY-SA 2.5
null
2008-09-02T16:13:33.983
2008-09-02T16:13:33.983
null
null
4,203
null
39,903
1
39,955
null
6
439
Why does Visual Studio declare new classes as private in C#? I almost always switch them over to public, am I the crazy one?
VS.NET defaults to private class
CC BY-SA 2.5
null
2008-09-02T16:10:31.837
2016-08-05T13:51:14.637
null
null
632
[ "c#", "visual-studio" ]
39,896
2
null
39,874
13
null
Initially, use an to represent the chess board. You can start programing using this notation. Give point values for the pieces. For example: ``` **White** 9 = white queen 5 = white rook 3 = bishop 3 = knight 1 = pawn **black** -9 = white queen -5 = white rook -3 = bishop -3 = knight -1 = pawn White King: very larg...
null
CC BY-SA 2.5
null
2008-09-02T16:08:42.887
2008-09-02T16:14:06.507
2008-09-02T16:14:06.507
184
184
null
39,910
1
40,929
null
1
5,513
I want to use the MultipleLookupField control in a web page that will run in the context of SharePoint. I was wondering if anyone would help me with an example, which shows step by step how to use the control two display two SPField Collections.
How to use the SharePoint MultipleLookupField control?
CC BY-SA 2.5
null
2008-09-02T16:14:06.773
2011-12-07T15:36:12.113
2011-12-07T15:36:12.113
3,043
1,360
[ "sharepoint" ]
39,912
1
39,944
null
158
221,822
I was looking at the API documentation for stl vector, and noticed there was no method on the vector class that allowed the removal of an element with a certain value. This seems like a common operation, and it seems odd that there's no built in way to do this.
How do I remove an item from a stl vector with a certain value?
CC BY-SA 2.5
0
2008-09-02T16:14:13.170
2022-06-17T15:04:19.587
null
null
1,546
[ "c++", "stl" ]
39,914
1
41,224
null
0
417
Windows has a feature that allows an administrator to perform auto-logon whenever it is started. How can this feature be activated?
How do I set windows to perform auto login?
CC BY-SA 2.5
null
2008-09-02T16:15:10.000
2010-10-11T13:32:38.637
2008-09-03T05:48:02.213
1,596
1,596
[ "windows" ]
39,913
2
null
39,879
1
null
It's the implementations that doesn't support multi-threading. Currently Google Gears is providing a way to use some form of concurrency by executing external processes but that's about it. The new browser Google is supposed to release today (Google Chrome) executes some code in parallel by separating it in process. ...
null
CC BY-SA 2.5
null
2008-09-02T16:14:48.083
2008-09-02T16:14:48.083
null
null
4,269
null
39,916
1
39,963
null
22
21,208
Is there a programmatic way to build files, without depending on OS specific functions (i.e. `exec()`, `passthru()`)?
Programmatically building htpasswd
CC BY-SA 3.0
0
2008-09-02T16:15:23.197
2017-12-08T13:41:55.063
2017-12-08T13:41:55.063
1,033,581
115
[ "php", "automation", ".htpasswd" ]
39,919
2
null
39,903
-2
null
For security reasons. You want to expose certain methods and not your whole class.
null
CC BY-SA 3.0
null
2008-09-02T16:15:54.117
2014-12-31T13:45:56.507
2014-12-31T13:45:56.507
3,702,088
740
null
39,917
2
null
39,867
1
null
You should make sure that GPG is in your path when the cronjob is running. Your best guess would be do get the full path of GPG (by doing `which gpg`) and running it using the full path (for example `/usr/bin/gpp...`). Some other debugging tips: - `$?`- `/usr/bin/gpg ... 2>&1 >> gpg.log`
null
CC BY-SA 2.5
null
2008-09-02T16:15:26.927
2008-09-02T16:15:26.927
null
null
1,265
null
39,915
1
39,997
null
1
273
There are several types of objects in a system, and each has it's own table in the database. A user should be able to comment on any of them. How would you design the comments table(s)? I can think of a few options: 1. One comments table, with a FK column for each object type (ObjectAID, ObjectBID, etc) 2. Several co...
Extra tables or non-specific foreign keys?
CC BY-SA 2.5
0
2008-09-02T16:15:15.443
2008-11-03T20:55:23.090
2008-11-03T20:55:23.090
23,855
521
[ "database-design", "foreign-keys", "normalization" ]
39,920
2
null
3,748
0
null
I prefer to store image paths in the DB and images on the filesystem (with rsync between servers to keep everything reasonably current). However, some of the content-management-system stuff I do needs the images in the CMS for several reasons- visibility control (so the asset is held back until the press release goes ...
null
CC BY-SA 2.5
null
2008-09-02T16:15:56.783
2008-09-02T16:15:56.783
null
null
4,276
null
39,908
2
null
39,903
0
null
No I always have to slap that "public" keyword on the front of the class, so you are not alone. I guess the template designers thought it was a good idea to start with the very basics. You can edit these templates though in your Visual Studio install, if it really annoys you that much, but I haven't gotten to that po...
null
CC BY-SA 2.5
null
2008-09-02T16:13:57.740
2008-09-02T16:13:57.740
null
null
17
null
39,911
2
null
39,903
16
null
I am not sure WHY it does that, but here's what you do in order to get Visual Studio to create the class as Public by default: Go over to “Program Files\Microsoft Visual Studio 9.0\Common7\IDE\ItemTemplates\CSharp\Code\1033″, you will find a file called Class.zip, inside the .zip file open the file called Class.cs, th...
null
CC BY-SA 2.5
null
2008-09-02T16:14:09.143
2008-09-02T17:19:23.513
2008-09-02T17:19:23.513
2,257
2,257
null
39,924
2
null
39,771
6
null
If your system clock is set properly and hasn't wrapped around, and if your NIC has its own MAC (i.e. you haven't set a custom MAC) and your NIC vendor has not been recycling MACs (which they are not supposed to do but which has been known to occur), and if your system's GUID generation function is properly implemented...
null
CC BY-SA 2.5
null
2008-09-02T16:16:20.590
2008-09-02T16:16:20.590
null
null
2,131
null
39,922
2
null
39,879
13
null
I don't know the rationale for this decision, but I know that you can simulate some of the benefits of multi-threaded programming using setTimeout. You can give the illusion of multiple processes doing things at the same time, though in reality, everything happens in one thread. Just have your function do a little bi...
null
CC BY-SA 2.5
null
2008-09-02T16:16:13.367
2008-09-02T16:16:13.367
null
null
4,257
null
39,927
2
null
39,475
8
null
It's not a simple answer, sadly. But this might help: [Recovering from repository corruption](http://schacon.github.com/git/user-manual.html#recovering-from-repository-corruption) (from the Git's user manual).
null
CC BY-SA 3.0
null
2008-09-02T16:17:20.587
2012-01-03T13:06:09.393
2012-01-03T13:06:09.393
612,704
4,272
null
39,923
2
null
39,912
16
null
Use the global method std::remove with the begin and end iterator, and then use std::vector.erase to actually remove the elements. Documentation links std::remove [http://www.cppreference.com/cppalgorithm/remove.html](http://www.cppreference.com/cppalgorithm/remove.html) std::vector.erase [http://www.cppreference.com/...
null
CC BY-SA 2.5
null
2008-09-02T16:16:19.200
2008-09-02T17:33:35.600
2008-09-02T17:33:35.600
1,546
1,546
null
39,928
1
40,105
null
5
28,370
I'm getting a `Connection Busy With Results From Another Command` error from a SQLServer Native Client driver when a SSIS package is running. Only when talking to SQLServer 2000. A different part that talks to SQLServer 2005 seems to always run fine. Any thoughts?
How to fix native client error 'Connection is busy with results for another command'?
CC BY-SA 3.0
null
2008-09-02T16:18:36.700
2017-09-06T21:09:00.107
2011-07-29T16:18:56.357
null
2,978
[ "sql-server", "ssis", "connection" ]
39,926
2
null
39,874
4
null
There are of course a number of different ways to represent a chessboard, and the best way will depend on what is most important to you. Your two main choices are between speed and code clarity. If speed is your priority then you must use a 64 bit data type for each set of pieces on the board (e.g. white pawns, black...
null
CC BY-SA 3.0
null
2008-09-02T16:16:46.923
2013-02-20T12:48:01.680
2013-02-20T12:48:01.680
4,200
4,200
null
39,938
2
null
39,915
1
null
Is it feasible to design the schema so that the commentable (for lack of a better word) tables follow one of the standard inheritance-modeling patterns? If so, you can have the comment table's FK point to the common parent table.
null
CC BY-SA 2.5
null
2008-09-02T16:21:37.770
2008-09-02T16:21:37.770
null
null
4,203
null
39,918
2
null
37,628
127
null
One of my favorite uses of reflection is the below Java dump method. It takes any object as a parameter and uses the Java reflection API to print out every field name and value. ``` import java.lang.reflect.Array; import java.lang.reflect.Field; public static String dump(Object o, int callCount) { callCount++; ...
null
CC BY-SA 4.0
null
2008-09-02T16:15:28.813
2019-01-29T00:08:22.867
2019-01-29T00:08:22.867
745,750
2,453
null
39,929
1
40,069
null
7
2,193
What is the easiest way to create and verify PGP/GPG signatures from within a Python application? I can call pgp or gpg using subprocess and parse the output, but I was looking for a way that didn't require an external program to be installed (my application is cross-platform mac/windows/unix).
PGP signatures from Python?
CC BY-SA 2.5
0
2008-09-02T16:19:11.533
2011-01-31T10:37:45.287
null
null
3,002
[ "python", "security", "cross-platform", "gnupg" ]
39,945
2
null
39,879
6
null
Just as matt b said, the question is not very clear. Assuming that you are asking about multithreading support in the language: because it isn't needed for 99.999% of the applications running in the browser currently. If you really need it, there are workarounds (like using window.setTimeout). In general multithreadin...
null
CC BY-SA 2.5
null
2008-09-02T16:24:01.710
2008-09-02T16:24:01.710
null
null
1,265
null
39,948
2
null
31,584
0
null
I ended up doing this a lot when working with the Apache POI excel library; I ended up writing helper methods that chained so I could apply formatting, data types, internal cell data, formulas, and cell positioning. For stuff with lots of little tiny flyweight elements that need to have finicky little tweaks applied i...
null
CC BY-SA 2.5
null
2008-09-02T16:25:59.803
2008-09-02T16:25:59.803
null
null
4,276
null
39,946
1
39,988
null
76
46,099
I'm trying to boil down the concepts of coupling and cohesion to a concise definition. Can someone give me a short and understandable explanation (shorter than the definitions on Wikipedia [here](http://en.wikipedia.org/wiki/Coupling_%28computer_science%29) and [here](http://en.wikipedia.org/wiki/Cohesion_%28computer_s...
Coupling and cohesion
CC BY-SA 2.5
0
2008-09-02T16:24:57.107
2021-10-01T07:23:14.497
2021-10-01T07:23:14.497
6,638,882
1,772
[ "oop", "architecture", "theory", "software-design", "ooad" ]
39,935
2
null
39,916
-2
null
[Trac](http://trac.edgewall.org) ships with a Python replacement for htpasswd, which I'm sure you could port to your language of choice: [htpasswd.py](http://trac.edgewall.org/browser/trunk/contrib/htpasswd.py).
null
CC BY-SA 2.5
null
2008-09-02T16:20:51.717
2008-09-02T16:20:51.717
null
null
4,272
null
39,931
2
null
39,879
25
null
Traditionally, JS was intended for short, quick-running pieces of code. If you had major calculations going on, you did it on a server - the idea of a JS+HTML that ran in your browser for long periods of time doing non-trivial things was absurd. Of course, now we have that. But, it'll take a bit for browsers to catch...
null
CC BY-SA 2.5
null
2008-09-02T16:19:46.603
2008-09-04T21:12:52.357
2017-05-23T12:26:26.863
-1
811
null
39,950
2
null
37,586
-2
null
Check out this [older post](https://stackoverflow.com/questions/33449/can-you-call-a-webservice-from-tsql-code). I have to agree with that post's #1 answer; it's hard to imagine a scenario where this could be a good design. Can't you write a service, or standalone application, which would talk to a table in your data...
null
CC BY-SA 2.5
null
2008-09-02T16:26:37.103
2008-09-02T16:26:37.103
2017-05-23T12:33:26.220
-1
672
null
39,947
2
null
39,742
14
null
Quoting from the [Git FAQ](https://git.wiki.kernel.org/index.php/GitFaq#Does_git_have_keyword_expansion.3F): > Does git have keyword expansion?Not recommended. Keyword expansion causes all sorts of strange problems and isn't really useful anyway, especially within the context of an SCM. Outside git you may perform keyw...
null
CC BY-SA 3.0
null
2008-09-02T16:25:27.917
2013-02-25T11:49:22.833
2020-06-20T09:12:55.060
-1
4,272
null
39,941
2
null
39,912
4
null
See also [std::remove_if](https://en.cppreference.com/w/cpp/algorithm/remove) to be able to use a predicate... Here's the example from the link above: ``` vector<int> V; V.push_back(1); V.push_back(4); V.push_back(2); V.push_back(8); V.push_back(5); V.push_back(7); copy(V.begin(), V.end(), ostream_iterator<int>(cout...
null
CC BY-SA 4.0
null
2008-09-02T16:22:24.507
2020-05-18T17:41:23.540
2020-05-18T17:41:23.540
9,810,780
4,177
null
39,953
2
null
39,946
71
null
Coupling - A measure of how much a module (package, class, method) relies on other modules. It is desirable to reduce coupling, or reduce the amount that a given module relies on the other modules of a system. Cohesion - A measure of how closely related the members (classes, methods, functionality within a method) of ...
null
CC BY-SA 2.5
null
2008-09-02T16:27:02.093
2008-09-02T16:27:02.093
null
null
572
null
39,958
2
null
39,903
0
null
Even if you mark a class as public, members are still private by default. In other words, the class is pretty much useless outside the same namespace. I think making it public by default instead may go too far, though. Try using 'internal' some. It should provide enough access for purposes.
null
CC BY-SA 2.5
null
2008-09-02T16:29:19.373
2008-09-02T16:39:16.243
2008-09-02T16:39:16.243
3,043
3,043
null
39,952
2
null
22,708
0
null
Here's Gary Waters solution ``` Function ConvertNumberToColumnLetter2(ByVal colNum As Long) As String Dim i As Long, x As Long For i = 6 To 0 Step -1 x = (1 - 26 ^ (i + 1)) / (-25) - 1 ‘ Geometric Series formula If colNum > x Then ConvertNumberToColumnLetter2 = ConvertNumberToColumn...
null
CC BY-SA 2.5
null
2008-09-02T16:26:56.603
2008-09-02T16:26:56.603
null
null
4,280
null
39,964
2
null
39,874
4
null
Well, not sure if this helps, but Deep Blue used a single 6-bit number to represent a specific position on the board. This helped it save footprint on-chip in comparison to it's competitor, which used a 64-bit bitboard. This might not be relevant, since chances are, you might have 64 bit registers on your target hard...
null
CC BY-SA 2.5
null
2008-09-02T16:29:58.687
2008-09-02T16:29:58.687
null
null
4,224
null
39,966
2
null
39,734
3
null
I believe anything non-trival you'll have to create a [Context Menu Handler](http://msdn.microsoft.com/en-us/library/bb776881.aspx). You'll have to create a COM object that will create the menus and carry out the commands as they're clicked. I've only done this using C++ and COM. I'm not sure if there are easier ways ...
null
CC BY-SA 2.5
null
2008-09-02T16:30:22.820
2008-09-02T17:12:51.780
2008-09-02T17:12:51.780
3,655
3,655
null
39,960
1
40,173
null
26
15,100
In Python one can get a dictionary of all local and global variables in the current scope with the built-in functions `locals()` and `globals()`. Is there some equivalent way of doing this in Javascript? For instance, I would like to do something like the following: ``` var foo = function(){ alert('foo'); }; var bar...
Javascript equivalent of Python's locals()?
CC BY-SA 3.0
0
2008-09-02T16:29:30.997
2016-12-25T12:30:26.780
2016-12-25T12:30:26.780
2,314,737
208
[ "javascript", "python" ]
39,968
2
null
39,946
2
null
"Coupling is a measure of interdependencies between modules, which should be minimized" "cohesion, a quality to be maximized, focuses on the relationships between the activities performed by each module." quoted from this paper: [http://steve.vinoski.net/pdf/IEEE-Old_Measures_for_New_Services.pdf](http://steve.vinoski...
null
CC BY-SA 2.5
null
2008-09-02T16:31:10.337
2008-09-02T16:31:10.337
null
null
3,245
null
39,976
2
null
39,946
4
null
A quick-and-dirty way to measure coupling is to measure your `import` (or similar) statements.
null
CC BY-SA 2.5
null
2008-09-02T16:34:32.810
2008-09-02T16:34:32.810
null
null
4,203
null
39,944
2
null
39,912
183
null
`std::remove` does not actually erase elements from the container: it moves the elements to be removed to the end of the container, and returns the new end iterator which can be passed to `container_type::erase` to do the actual removal of the extra elements that are now at the end of the container: ``` std::vector<int...
null
CC BY-SA 4.0
null
2008-09-02T16:23:15.520
2022-06-17T15:04:19.587
2022-06-17T15:04:19.587
2,436,175
2,666
null
39,974
2
null
39,915
0
null
@Hank Gay So something like: 1. ObjectA ObjectAID ParentID 2. ObjectB ObjectBID ParentID 3. Comments CommentID ParentID 4. Parents ParentID
null
CC BY-SA 2.5
null
2008-09-02T16:34:19.080
2008-09-02T16:34:19.080
null
null
521
null
39,955
2
null
39,903
8
null
Private access by default seems like a reasonable design choice on the part of the C# language specifiers. A good general design principle is to make all access levels as restrictive as possible, to minimize dependencies. You are less likely to end up with the wrong access level if you start as restrictive as possible...
null
CC BY-SA 2.5
null
2008-09-02T16:28:29.767
2008-09-02T16:28:29.767
null
null
3,776
null
39,970
2
null
39,691
36
null
Seconding [Javascript: The Good Parts](http://oreilly.com/catalog/9780596517748/) and Resig's book [Secrets of the Javascript Ninja](http://jsninja.com/). Here are some tips for Javascript: - - [YUI](http://developer.yahoo.com/yui/)- [http://yuiblog.com/blog/2007/06/12/module-pattern/](http://yuiblog.com/blog/2007/06...
null
CC BY-SA 2.5
null
2008-09-02T16:31:14.143
2008-09-02T16:31:14.143
null
null
956
null
39,981
2
null
39,742
4
null
Git does have pre-commit and post-commit hooks, they are located inside each .git/hooks directory. Just modify the files and chmod them to make them executable.
null
CC BY-SA 2.5
null
2008-09-02T16:36:09.933
2008-09-02T16:36:09.933
null
null
3,748
null
39,978
2
null
39,758
14
null
This is long-term positioning for Google; they are clearly trying to build a more stable application platform for web-based development. All of their changes (security, sandboxing, process isolation) are clearly intended to make the browser a better application for hosting complex apps. This is what Microsoft was worr...
null
CC BY-SA 2.5
null
2008-09-02T16:35:21.823
2008-09-02T16:35:21.823
null
null
4,276
null
39,984
2
null
39,977
1
null
A tag is a reference to the set of revision numbers at the time the tag was taken- it's the same thing as a branch or a copy, internally.
null
CC BY-SA 2.5
null
2008-09-02T16:36:46.610
2008-09-02T16:36:46.610
null
null
4,276
null
39,961
2
null
39,879
226
null
JavaScript does not support multi-threading because the JavaScript interpreter in the browser is a single thread (AFAIK). Even Google Chrome will not let a single web page’s JavaScript run concurrently because this would cause massive concurrency issues in existing web pages. All Chrome does is separate multiple compon...
null
CC BY-SA 4.0
null
2008-09-02T16:29:36.627
2018-08-01T22:46:48.083
2018-08-01T22:46:48.083
4,437,749
4,174
null
39,983
1
322,727
null
3
728
Reading through [this question](https://stackoverflow.com/questions/39879/why-doesnt-javascript-support-multithreading) on multi-threaded javascript, I was wondering if there would be any security implications in allowing javascript to spawn mutliple threads. For example, would there be a risk of a malicious script re...
Security implications of multi-threaded javascript
CC BY-SA 2.5
0
2008-09-02T16:36:29.747
2008-11-27T01:41:46.570
2017-05-23T12:13:33.373
-1
3,043
[ "javascript", "multithreading" ]
39,982
2
null
39,960
4
null
Well, I don't think that there is something like that in js. You can always use eval instead of locals(). Like this: ``` eval(s+"()"); ``` You just have to know that actually function exists. Don't use eval:) Use: ``` var functionName="myFunctionName"; window[functionName](); ```
null
CC BY-SA 2.5
null
2008-09-02T16:36:28.653
2008-09-02T16:41:47.610
2008-09-02T16:41:47.610
3,666
3,666
null
39,985
2
null
39,912
5
null
If you have an unsorted vector, then you can simply swap with the last vector element then `resize()`. With an ordered container, you'll be best off with ‍`std::vector::erase()`. Note that there is a `std::remove()` defined in `<algorithm>`, but that doesn't actually do the erasing. (Read the documentation carefully...
null
CC BY-SA 3.0
null
2008-09-02T16:37:03.270
2017-01-01T16:01:34.433
2017-01-01T16:01:34.433
1,841,194
1,244
null
39,986
2
null
32,621
2
null
From the VEMap.GetCenter Method documentation: > This method returns null when the map style is set to VEMapStyle.Birdseye or VEMapStyle.BirdseyeHybrid. Here is what I've found, though: ``` var northWestLL = (new _xy1).Decode(map.GetMapView().TopLeftLatLong); var southEastLL = (new _xy1).Decode(map.GetMapView()....
null
CC BY-SA 2.5
null
2008-09-02T16:37:07.390
2008-09-02T16:37:07.390
null
null
3,420
null
39,963
2
null
39,916
38
null
.httpasswd files are just text files with a specific format depending on the hash function specified. If you are using MD5 they look like this: ``` foo:$apr1$y1cXxW5l$3vapv2yyCXaYz8zGoXj241 ``` That's the login, a colon, ,$apr1$, the salt and 1000 times md5 encoded as base64. If you select SHA1 they look like this: ...
null
CC BY-SA 3.0
null
2008-09-02T16:29:51.587
2013-09-11T03:08:07.793
2013-09-11T03:08:07.793
2,612,112
4,269
null
39,989
2
null
37,692
1
null
You should take a look at [ICProject](http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse.cdt.doc.isv/reference/api/org/eclipse/cdt/core/model/ICProject.html), especially the getOutputEntries and getAllSourceRoots operations. [This tutorial](http://dev.eclipse.org/viewcvs/index.cgi/cdt-core-home/docs/qnx/cpathe...
null
CC BY-SA 2.5
null
2008-09-02T16:38:17.777
2008-09-02T16:38:17.777
null
null
4,213
null
39,988
2
null
39,946
231
null
- Loose: You and the guy at the convenience store. You communicate through a well-defined protocol to achieve your respective goals - you pay money, he lets you walk out with the bag of Cheetos. Either one of you can be replaced without disrupting the system.- Tight: You and your wife. - Low: The convenience store...
null
CC BY-SA 2.5
null
2008-09-02T16:37:49.307
2008-09-02T16:37:49.307
null
null
811
null
39,980
2
null
39,977
3
null
Right, a tag is just a copy: ``` svn copy trunk tags/BLAH ``` When people say SVN doesn't really copy anything, they mean that the repository doesn't need to duplicate the data. It uses something akin to symbolic links to keep track of the copies.
null
CC BY-SA 2.5
null
2008-09-02T16:36:02.430
2008-09-02T16:36:02.430
null
null
1,412
null
39,992
2
null
39,960
-1
null
AFAIK, no. If you just want to check the existence of a given variable, you can do it by testing for it, something like this: ``` if (foo) foo(); ```
null
CC BY-SA 2.5
null
2008-09-02T16:41:56.347
2008-09-02T16:41:56.347
null
null
1,265
null
39,977
1
40,003
null
14
11,031
I know how to use tags in subversion. I create a tag every time I get to a release milestone. What I don't quite understand is how they work. Is a tag just a copy, made from what ever revision I specify? Or is a tag more like a reference, where internally subversion just says `GO TO /trunk/project/ Revision 5` or wh...
How are tags made in Subversion?
CC BY-SA 2.5
0
2008-09-02T16:35:09.610
2014-01-23T17:34:14.990
null
null
30
[ "svn" ]
39,994
2
null
39,196
1
null
I was missing an index in the field. That solve the problem.
null
CC BY-SA 2.5
null
2008-09-02T16:42:27.470
2008-09-02T16:42:27.470
null
null
2,138
null
39,993
2
null
23,250
-2
null
You should not use "this" unless you absolutely must. There IS a penalty associated with unnecessary verbosity. You should strive for code that is exactly as long as it needs to be, and no longer.
null
CC BY-SA 2.5
null
2008-09-02T16:42:19.263
2008-09-02T16:42:19.263
null
null
3,886
null
39,990
2
null
39,977
4
null
The Subversion book is online in a complete and free form: [http://svnbook.red-bean.com/en/1.4/svn-book.html#svn.branchmerge.tags](http://svnbook.red-bean.com/en/1.4/svn-book.html#svn.branchmerge.tags) And yes, you basically do an svn copy. Subversion is smart enough to do a copy-on-write style mechanism to save sp...
null
CC BY-SA 2.5
null
2008-09-02T16:39:13.797
2008-09-02T16:39:13.797
null
null
1,244
null
40,002
2
null
25,192
23
null
Have you looked at [WIFE](http://wife.sourceforge.net/)? We use that in our application which translates SWIFT messages to an internal XML format and back again. We haven't had any problems with it. Also, it's licensed under the LGPL, so you can hack it up if you need to. Check it out.
null
CC BY-SA 2.5
null
2008-09-02T16:44:50.863
2008-09-02T16:44:50.863
null
null
4,223
null
40,000
2
null
38,014
1
null
To expand on what stjohnroe has said it looks like the reason you are getting different results is because two different tables with the same name exist on different schemas. By adding the myDB username to the front of the query you now access the table with the data you are expecting. (Since you say the data doesn't b...
null
CC BY-SA 2.5
null
2008-09-02T16:43:26.033
2008-09-02T16:43:26.033
null
null
3,590
null
39,996
1
41,087
null
4
9,411
I am working with a PC based automation software package called Think'n'Do created by [Phoenix Contact](http://www.phoenixcontact.com) It does real time processing, read inputs/ control logic / write outputs all done in a maximum of 50ms. We have an OPC server that is reading/writing tags from a PLC every 10ms. There i...
Improving performance with OPC tags
CC BY-SA 2.5
0
2008-09-02T16:42:46.843
2015-05-26T06:39:36.560
2009-09-22T08:16:18.393
7,735
4,275
[ "performance", "automation", "opc" ]
40,003
2
null
39,977
12
null
Yes, a svn copy (whether you are thinking of it as a tag, a branch, or copying a file in trunk) is all the same. SVN will internally create a pointer to the source location at that revision. If you then make changes to the copy (which you are likely to do if it is a branch or a copied file in trunk, but shouldn't do ...
null
CC BY-SA 2.5
null
2008-09-02T16:45:50.567
2008-09-02T16:45:50.567
null
null
4,257
null
40,008
2
null
39,912
5
null
The other answers cover how to do this well, but I thought I'd also point out that it's not really odd that this isn't in the vector API: it's inefficient, linear search through the vector for the value, followed by a bunch of copying to remove it. If you're doing this operation intensively, it can be worth considerin...
null
CC BY-SA 2.5
null
2008-09-02T16:49:36.657
2008-09-02T16:49:36.657
null
null
3,974
null
40,010
2
null
39,983
0
null
Well I think that the only major example of multi-threaded javascript is Google's chrome (WOULD THEY RELEASE IT ALREADY JEEZ) and if I understand it the javascript will only one process per tab, so unless it started spawning tabs (popups) I would assume this would be a null issue, but I think that Google has that under...
null
CC BY-SA 2.5
null
2008-09-02T16:50:03.800
2008-09-02T16:50:03.800
null
null
115
null
40,005
2
null
39,758
-1
null
@bpapa > It's just another web browser that very few people are going to use because there are already 4 major browsers out there that work just fine for most people. It doesn't have the extensions like Firefox, Actually, it is pretty clear that it has a plugin architecture > it doesn't have browser sync...
null
CC BY-SA 2.5
null
2008-09-02T16:48:33.960
2008-09-02T16:48:33.960
null
null
96
null
40,012
2
null
39,960
3
null
I seem to remember Brendan Eich commented on this in a recent podcast; if i recall correctly, it's not being considered, as it adds unreasonable restrictions to optimization. He compared it to the `arguments` local in that, while useful for varargs, its very existence removes the ability to guess at what a function wil...
null
CC BY-SA 2.5
null
2008-09-02T16:50:34.750
2008-09-02T16:50:34.750
null
null
811
null
40,004
2
null
39,946
27
null
One of the best comprehensive discussions of software design concepts related to OO (including these ones) is Bertrand Meyer's [Object Oriented Software Construction](https://rads.stackoverflow.com/amzn/click/com/0136291554). Regarding 'coupling', he gives his Weak Coupling / Small Interfaces rule as follows: > > M...
null
CC BY-SA 2.5
null
2008-09-02T16:46:29.003
2008-09-02T16:46:29.003
null
null
3,776
null
40,014
2
null
39,983
0
null
Again, we need to make a distinction between 1) multithreaded support in the language (which I don't think is seriously being discussed as something that will happen) and 2) usage of multiple threads in the JavaScript engine/interpreter in the browser. For #2, I can't see how this can really add any possible security ...
null
CC BY-SA 2.5
null
2008-09-02T16:51:01.210
2008-09-02T16:51:01.210
null
null
4,249
null
40,016
2
null
39,915
0
null
Be careful with generic foreign keys that don't point to exactly one table. Query performance suffers dramatically if you have to split the where condition on a type and point to several different tables. If you only have a few types, and the number of types will not grow, it's Ok to have separate nullable foreign ke...
null
CC BY-SA 2.5
null
2008-09-02T16:51:07.823
2008-09-02T16:51:07.823
null
null
1,219
null
40,020
2
null
15,139
1
null
I'm with ScottKoon here, Adobe AIR is great. I've really only made one really nice (imho) widget thus far, but I did so using jQuery and Prototype.js, which floored in such wonderful ways because I didn't have to learn a whole new event model. Adobe AIR is really sweet, the memory foot print isn't too bad, upgrading ...
null
CC BY-SA 2.5
null
2008-09-02T16:53:44.587
2008-09-02T16:53:44.587
null
null
4,252
null
40,021
1
42,011
null
1
855
How do I create a new webpage in the Documentum front end Webtop?
Create new page in Webtop
CC BY-SA 2.5
null
2008-09-02T16:54:04.960
2008-10-04T18:26:02.713
null
null
4,282
[ "documentum", "webtop" ]
40,009
2
null
39,503
4
null
Modifying the bootloader is bad, bad idea. Here are just a few of the possible gotcha's: - - - - - Alternatives (like modifying the hardware register during the Windows bootup via a driver which is set to load at boot time or after Windows has booted) should really be considered. If the modification is as simple as ...
null
CC BY-SA 2.5
null
2008-09-02T16:49:40.680
2008-09-02T16:49:40.680
null
null
1,265
null
40,015
2
null
38,922
1
null
To answer part of your question, here's how you'd run a rake task from inside Rails code: ``` require 'rake' load 'path/to/task.rake' Rake::Task['foo:bar:baz'].invoke ``` Mind you, I have no idea how (or why) you could have one database per user.
null
CC BY-SA 2.5
null
2008-09-02T16:51:01.660
2008-09-02T16:51:01.660
null
null
4,272
null
40,022
1
40,029
null
76
36,818
I'm using LINQ to SQL classes in a project where the database design is still in a bit of flux. Is there an easy way of synchronising the classes with the schema, or do I need to manually update the classes if a table design changes?
Best way to update LINQ to SQL classes after database schema change
CC BY-SA 2.5
0
2008-09-02T16:54:55.693
2017-06-26T22:32:47.897
null
null
4,048
[ "c#", ".net", "linq-to-sql" ]
40,027
2
null
40,022
4
null
I think Jeff complained about this recently. One common technique is to drag all the objects into the designer again... I hope someone else chimes in with a better approach!
null
CC BY-SA 2.5
null
2008-09-02T16:56:58.403
2008-09-02T16:56:58.403
null
null
29
null
40,026
1
40,086
null
4
3,921
As the title says, is there a way to run the same Adobe AIR app more than once? I have a little widget I wrote that shows thumbnails from a couple of photo streams, and I'd like to fix it so I can look at more than one stream at a time. Thanks!
Can the same Adobe AIR app run more than once?
CC BY-SA 2.5
null
2008-09-02T16:56:30.713
2016-01-27T11:00:50.537
null
null
4,252
[ "javascript", "air", "adobe" ]
40,029
2
null
40,022
65
null
You can use SQLMetal.exe to generate your dbml and or cs/vb file. Use a pre-build script to start it and target the directory where your datacontext project belongs. ``` C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\x64\sqlmetal.exe /server:<SERVER> /database:<database> /code:"path\Solution\DataContextP...
null
CC BY-SA 2.5
null
2008-09-02T16:58:28.633
2008-09-02T17:03:37.590
2008-09-02T17:03:37.590
224
224
null
40,035
2
null
39,960
0
null
@e-bartek, I think that window[functionName] won't work if you in some closure, and the function name is local to that closure. For example: ``` function foo() { var bar = function () { alert('hello world'); }; var s = 'bar'; window[s](); // this won't work } ``` In this case, s is 'bar', bu...
null
CC BY-SA 2.5
null
2008-09-02T17:00:12.077
2008-09-02T17:00:12.077
null
null
4,257
null
40,024
2
null
39,983
1
null
Well, you can already lock up a browser and slow down a system with badly-behaved JS. Enlightened browsers have implemented checks for this sort of thing, and will stop it before it gets out of hand. I would tend to assume that threads would be dealt with in a similar manner. --- Perhaps you could explain what...
null
CC BY-SA 2.5
null
2008-09-02T16:55:14.023
2008-09-02T17:41:03.523
2008-09-02T17:41:03.523
811
811
null
40,034
2
null
40,022
17
null
I haven't tried it myself, but [Huagati DBML/EDMX Tools](http://www.huagati.com/dbmltools/) is recommended by other people. > Huagati DBML/EDMX Tools is an add-in for Visual Studio that adds functionality to the Linq2SQL/DBML diagram designer in Visual Studio 2008, and to the ADO.NET Entity Framework designe...
null
CC BY-SA 3.0
null
2008-09-02T16:59:41.873
2012-04-02T07:46:19.747
2012-04-02T07:46:19.747
1,219,121
2,257
null