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
33,992
2
null
33,973
0
null
> If you need random insert and removal, the best way is probably a sorted array. Inserts and removals should be O(log(n)). Yes, but you will need to re-sort on each insert and (maybe) each deletion, which, as you stated, is O(log(n)). With the solution proposed by Harpreet: - - - So, it depends. One of t...
null
CC BY-SA 2.5
null
2008-08-29T05:14:25.283
2008-08-29T05:14:25.283
null
null
1,266
null
33,990
1
34,074
null
4
5,707
I'm working on `mac OS x 10.4`. I have a subversion repository stored on an external drive connected via USB. I created a new python project in `Eclipse` (using the PyDev plugin). When I use right click `Team->Share Project` to set up a new project with subversion, I get the following error: ``` Error while creating m...
Can't create a subversion repository with Eclipse 3.4.0, svn 1.5.1
CC BY-SA 3.0
null
2008-08-29T05:12:07.613
2017-11-07T17:28:57.337
2017-11-07T17:28:57.337
6,761,181
3,486
[ "eclipse", "svn", "macos" ]
34,004
2
null
32,824
17
null
I think you need to use HttpCacheability.ServerAndPrivate That should give you cache-control: private in the headers and let you set an ETag. The documentation on that needs to be a bit better. Markus found that you also have call cache.SetOmitVaryStar(true) otherwise the cache will add the Vary: * header to the ou...
null
CC BY-SA 2.5
null
2008-08-29T05:25:27.503
2008-09-01T22:05:39.293
2008-09-01T22:05:39.293
3,543
3,543
null
34,009
1
34,035
null
0
1,096
I want to query a number of different databases mainly Oracle and Informix. Can anyone suggest me some tool using which I can do this easily?
Tool for querying databases
CC BY-SA 2.5
0
2008-08-29T05:31:38.767
2012-12-12T03:46:44.253
null
null
184
[ "database" ]
34,005
2
null
33,973
0
null
Depends on which operations you need your container to support. A [min-heap](http://en.wikipedia.org/wiki/Heap_(data_structure)) is the best if you might need to remove the min element at any given time, although several operations are nontrivial (amortized log(n) time in some cases). However, if you only need to pus...
null
CC BY-SA 2.5
null
2008-08-29T05:25:35.083
2008-08-29T05:25:35.083
null
null
3,561
null
34,014
2
null
34,009
2
null
I like [SQuirreL SQL Client](http://www.squirrelsql.org/). It's cross platform and database independent, and quite handy.
null
CC BY-SA 2.5
null
2008-08-29T05:36:11.843
2008-08-29T05:36:11.843
null
null
3,474
null
34,016
2
null
17,175
0
null
Let me add another vote for the ability to generate/edit/play wav files (or at least a low-level raw bitstream.)
null
CC BY-SA 2.5
null
2008-08-29T05:40:40.930
2008-08-29T05:40:40.930
null
null
null
null
34,011
2
null
33,978
7
null
I haven't any personal experience with either of the following, but a simple search for a "Python [memory] profiler" yield: - PySizer, "a memory profiler for Python," found at [http://pysizer.8325.org/](http://pysizer.8325.org/). However the page seems to indicate that the project hasn't been updated for a while, and...
null
CC BY-SA 2.5
null
2008-08-29T05:33:49.043
2008-08-29T05:33:49.043
null
null
1,416
null
34,015
1
34,054
null
2
910
How can you allow a PHP script to write to a file with high-security restrictions, such as only allowing a single user to write to it? The difficulty seems to be that a PHP script is running as a low-permissions user (maybe apache, or www, or nobody?), and even if I `chown` apache the_writable_file, the directory it's...
php scripts writing to non-world-writable files
CC BY-SA 4.0
null
2008-08-29T05:36:19.333
2019-01-18T11:06:37.763
2019-01-18T11:06:37.763
567,854
3,561
[ "php", "permissions" ]
34,008
2
null
33,852
2
null
I will point out that in C# you can turn on [/checked](http://msdn.microsoft.com/en-us/library/h25wtyxf.aspx) to check for arithmetic overflow / underflow, which isn't a bad idea anyways. If performance matters in a critical section, you can still use `unchecked` to avoid this. For internal code (ie code that won't b...
null
CC BY-SA 2.5
null
2008-08-29T05:29:32.000
2008-08-29T05:29:32.000
null
null
3,524
null
34,018
2
null
34,015
0
null
Sure, `chgrp apache the_writable_file` and `chmod g+w the_writable_file`. After that, only your secure user and the apache user will be able to write to the file. Since the apache user is typically forbidden from logging in, you only have to worry about web users writing to your secure file using through the http dae...
null
CC BY-SA 2.5
null
2008-08-29T05:42:06.183
2008-08-29T05:42:06.183
null
null
3,499
null
34,017
2
null
33,768
0
null
You may want to explore the command-line compiler found in the Flex SDK, `mxmlc`. As I recall, Flex Builder 3 seems to hide all the compiler details, but perhaps there are arguments you can append that will help you speed up the compilation. For example, you may want to set `optimize=false` which will skip the step of...
null
CC BY-SA 2.5
null
2008-08-29T05:40:50.977
2008-08-29T05:40:50.977
null
null
1,416
null
34,020
1
34,060
null
28
12,525
A reliable coder friend told me that Python's current multi-threading implementation is seriously buggy - enough to avoid using altogether. What can said about this rumor?
Are Python threads buggy?
CC BY-SA 2.5
0
2008-08-29T05:43:16.960
2011-09-09T07:39:39.910
2010-09-10T22:32:11.640
63,550
3,561
[ "python", "multithreading" ]
33,995
2
null
24,542
33
null
Two main reasons. In short, consider carefully; there could be a good reason for it, but if there is be VERY explicit in your comments because it can be brittle and, as you say yourself, people aren't generally used to seeing code like this. ## Bitwise xor != Logical xor (except for 0 and 1) Firstly, if you are o...
null
CC BY-SA 2.5
null
2008-08-29T05:15:20.117
2008-10-06T19:03:59.500
2008-10-06T19:03:59.517
363
363
null
34,024
2
null
34,020
-2
null
I've used it in several applications and have never had nor heard of threading being anything other than 100% reliable, as long as you know its limits. You can't spawn 1000 threads at the same time and expect your program to run properly on Windows, however you can easily write a worker pool and just feed it 1000 oper...
null
CC BY-SA 2.5
null
2008-08-29T05:50:47.817
2008-08-29T05:50:47.817
null
null
1,662
null
34,019
1
34,091
null
4
5,470
I downloaded and installed the Aptana Studio free version. But apparently, to install the Radrails plugin for ruby on rails development you have to connect to the internet. I don't have internet on my machine right now. So is there a way I could download the installer from another machine and copy it over my existing A...
Install the Radrails plugin for Aptana Studio offline
CC BY-SA 2.5
null
2008-08-29T05:43:06.273
2009-11-03T13:28:21.383
2009-11-03T13:28:21.383
1,688,440
1,688,440
[ "ruby-on-rails", "aptana", "radrails" ]
34,030
2
null
22,015
0
null
It's not such a usability problem on stack overflow since all the users are programmers anyway, but i can't think of many other sites that could get away with it. I think openID will improve over time though and once all the sites using it start implementing all the features (like auto-filling the about me stuff) it'l...
null
CC BY-SA 2.5
null
2008-08-29T05:57:27.130
2008-08-29T05:57:27.130
null
null
2,908
null
34,027
2
null
33,956
4
null
There may well be a better Solr-specific answer, but I work with straight Lucene, and since you're not getting much traction I'll take a stab. There, I'd create a populate a `Filter` with a `FilteredQuery` wrapping the original `Query`. Then I'd get a `FieldCache` for the field of interest. Enumerate the hits in the fi...
null
CC BY-SA 2.5
null
2008-08-29T05:53:19.837
2008-08-29T05:53:19.837
null
null
3,474
null
34,023
1
34,052
null
1
904
I am making a simple game in order to learn a new language. I am in the process of collecting some music for the game and would like to use the MIDI format so that I can control the flow of the track (i.e., I would like to have an introduction that only plays once and does not play again when the song loops.) I am ha...
How to embed control change commands inside of a MIDI file
CC BY-SA 3.0
null
2008-08-29T05:49:05.840
2011-09-18T02:49:04.400
2011-09-18T02:49:04.400
395,461
1,053
[ "midi" ]
33,981
2
null
33,484
4
null
The query ``` [{ limit: 100, type: '/location/location', name: [{ value: null, lang: { name: { value: null, lang: '/lang/en', }, } }], }]; ``` returns for every location and every language, the name of that loc...
null
CC BY-SA 2.5
null
2008-08-29T05:01:21.570
2009-01-19T05:30:04.460
2009-01-19T05:30:04.460
3,508
3,508
null
34,035
2
null
34,009
5
null
Try WinSQL lite at [http://www.indus-soft.com/SynametricsWebApp/WinSQL.jsp](http://www.indus-soft.com/SynametricsWebApp/WinSQL.jsp). It is absolutely free and does not expire. It is only one file and does not come with any bulky DLLs. If you don't like it, simply delete the file from your hard drive. An introduction a...
null
CC BY-SA 2.5
null
2008-08-29T06:05:58.980
2008-08-29T06:05:58.980
null
null
2,257
null
34,033
2
null
9,376
46
null
I use ILMerge for almost all of my different applications. I have it integrated right into the release build process so what I end up with is one exe per application with no extra dll's. You can't ILMerge any C++ assemblies that have native code. You also can't ILMerge any assemblies that contain XAML for WPF (at l...
null
CC BY-SA 2.5
null
2008-08-29T06:00:05.953
2010-08-30T13:16:54.473
2010-08-30T13:16:54.473
356
3,566
null
34,036
2
null
33,409
36
null
Actually, you just have to use the LIKE operator. ``` SELECT * FROM mytable WHERE mytextfield LIKE '' ```
null
CC BY-SA 2.5
null
2008-08-29T06:06:25.033
2008-08-29T06:06:25.033
null
null
2,929
null
34,031
2
null
34,020
5
null
As far as I know there are no real bugs, but the performance when threading in cPython is really bad (compared to most other threading implementations, but usually good enough if all most of the threads do is block) due to the [GIL](http://docs.python.org/api/threads.html) (Global Interpreter Lock), so really it is imp...
null
CC BY-SA 2.5
null
2008-08-29T05:58:34.833
2008-08-29T05:58:34.833
null
null
2,010
null
34,042
2
null
34,019
0
null
If you're able to actually install it on the machine with the Internet connection, then you can simply copy over the directory you installed it in. Eclipse installations are completely self-contained in their installation directories.
null
CC BY-SA 2.5
null
2008-08-29T06:12:24.160
2008-08-29T06:12:24.160
null
null
3,382
null
34,044
2
null
176
7
null
Try adding the `php_value error_log '/path/to/php_error_log` to your VirtualHost configuration.
null
CC BY-SA 4.0
null
2008-08-29T06:13:17.963
2021-09-24T21:39:19.047
2021-09-24T21:39:19.047
63,550
3,499
null
34,038
2
null
34,023
3
null
try looking in the [Midi 1.0 spec](http://www.midi.org/about-midi/specinfo.shtml) Here's a table of the [control change messages](http://www.midi.org/about-midi/table3.shtml) though it looks like you're looking for a way to do this in software. yes? you could try just sending it as raw midi data (ie. the messages on ...
null
CC BY-SA 2.5
null
2008-08-29T06:08:55.197
2008-08-29T06:18:11.917
2008-08-29T06:18:11.917
2,908
2,908
null
34,049
2
null
33,852
0
null
Your two points are good. The primary reason to avoid it is casting, though. Casting makes them incredibly annoying to use. I tried using unisigned variables once but I had to sprinkle casts absolutely everywhere because the framework methods all use signed integers. Therefore, whenever you call a framework method, you...
null
CC BY-SA 2.5
null
2008-08-29T06:21:07.947
2008-08-29T06:21:07.947
null
null
2,928
null
34,046
2
null
33,860
-1
null
In theory, something like `eval ('function(){' + code + '}()');` could work (that syntax fails though). Even if that did work, it would still be sort of ghetto to be calling an eval through a select `onchange`. Another solution would be to somehow get Rails to inject the `onsubmit` code into the `onchange` field of t...
null
CC BY-SA 3.0
null
2008-08-29T06:18:14.723
2016-02-08T14:46:25.380
2016-02-08T14:46:25.380
92,701
3,499
null
34,050
2
null
17,228
0
null
I'm another for KDevelop. It has a very diverse set of tools. I'm not real familiar with VS and whether or not it has integrated console access via its interface, but KDevelop can allow you to run a konsole inside the IDE, which I always find very useful. You could always give Netbeans a go now that it has full C/C++ s...
null
CC BY-SA 2.5
null
2008-08-29T06:24:29.060
2008-08-29T06:24:29.060
null
null
2,091
null
34,053
2
null
34,009
0
null
The best alround one is [TOAD](http://www.toadsoft.com/)
null
CC BY-SA 2.5
null
2008-08-29T06:25:58.013
2008-08-29T06:25:58.013
null
null
null
null
34,051
2
null
34,023
4
null
Sounds like what you really want is a [midi editor](http://www.google.com/search?hl=en&safe=off&client=firefox-a&rls=com.ubuntu:en-US:unofficial&hs=ssc&pwst=1&sa=X&oi=spell&resnum=0&ct=result&cd=1&q=midi+editor&spell=1)
null
CC BY-SA 2.5
null
2008-08-29T06:25:12.960
2008-08-29T06:25:12.960
null
null
2,908
null
34,055
2
null
34,009
0
null
@littlegeek: Toad is not available for Informix. Additionally, the OP seems to want a single program that can query several different brands of DBMS, and you have to buy a different version of Toad for every DBMS you want to use it with.
null
CC BY-SA 2.5
null
2008-08-29T06:30:27.643
2008-08-29T06:30:27.643
null
null
1,879
null
34,045
2
null
32,505
1
null
[Xerces](http://xerces.apache.org/xerces2-j/) has a [feature](http://xerces.apache.org/xerces2-j/features.html#continue-after-fatal-error) you can set on to try and continue after a fatal error: > `http://apache.org/xml/features/continue-after-fatal-error` True: Attempt to continue parsing after a fatal error. ...
null
CC BY-SA 2.5
null
2008-08-29T06:13:51.740
2008-08-29T06:13:51.740
null
null
2,679
null
34,052
2
null
34,023
2
null
[DirectMusicProducer](http://www.microsoft.com/downloads/details.aspx?FamilyId=6E938A6E-B383-466B-A3EE-5A655BF5DB8C&displaylang=en) is probably your best free option if you are playing using DirectMusic. I don't believe the MIDI record feature will include control changes, but your engine may support playing segment fi...
null
CC BY-SA 2.5
null
2008-08-29T06:25:28.043
2008-08-29T06:25:28.043
null
null
891
null
34,056
2
null
33,728
12
null
Read the [RESTful Web Services](http://www.crummy.com/writing/RESTful-Web-Services/) book, which give you a good overview of how to use REST in practice, and get to up to speed quickly enough to get started now, with some confidence. This is more useful than just looking at an existing API, because it also discusses de...
null
CC BY-SA 2.5
null
2008-08-29T06:30:49.733
2008-08-29T06:30:49.733
null
null
2,670
null
34,059
1
34,152
null
16
18,936
What is the difference between Build Solution and Batch Build in Visual Studio 2008?
What is the difference between Build Solution and Batch Build in Visual Studio 2008?
CC BY-SA 2.5
0
2008-08-29T06:33:28.930
2019-12-25T01:08:25.727
2009-06-18T14:43:17.750
5,640
45,603
[ "visual-studio", "build" ]
34,061
2
null
34,009
0
null
Informix is not very well supported among third party database tool vendors. Interestingly, Oracle' SQL Developer supports browsing (and converting to oracle) several databases, including SQL Server and MySQL.
null
CC BY-SA 2.5
null
2008-08-29T06:36:45.037
2008-08-29T06:36:45.037
null
null
116
null
34,062
2
null
34,059
-3
null
Building the solution is the same as batch building all projects. Both methods respect the solution's dependencies.
null
CC BY-SA 2.5
null
2008-08-29T06:38:22.537
2008-08-29T06:38:22.537
null
null
3,573
null
34,054
2
null
34,015
2
null
Unfortunately, in shared hosts that use to secure files to your web app and login user. The solution is to . When you do that, UNIX file permissions can correctly lock everyone else out. There are several ways to implement that, including [SuExec](http://httpd.apache.org/docs/2.0/suexec.html), [suPHP](http://www.suph...
null
CC BY-SA 2.5
null
2008-08-29T06:29:43.977
2008-08-29T06:29:43.977
null
null
2,774
null
34,063
2
null
24,580
32
null
With VS2008 you can do this: ``` devenv solution.sln /build configuration ```
null
CC BY-SA 2.5
null
2008-08-29T06:38:23.303
2008-08-29T06:38:23.303
null
null
45,603
null
34,058
2
null
34,015
0
null
All the containing folders need to have execute permissions. For example, if the file's in `/foo/bar/the_writable_file`, the directories "foo" and "bar" both need to have executable permission to access the_writable_file, even if they don't have read/write permission.
null
CC BY-SA 3.0
null
2008-08-29T06:31:41.603
2013-12-15T20:40:30.963
2013-12-15T20:40:30.963
1,783,163
2,908
null
34,060
2
null
34,020
58
null
Python threads are good for . Threads are swapped out of the CPU as soon as they block waiting for input from file, network, etc. This allows other Python threads to use the CPU while others wait. This would allow you to write a multi-threaded web server or web crawler, for example. However, Python threads are seriali...
null
CC BY-SA 2.5
null
2008-08-29T06:33:54.780
2010-09-10T22:34:30.620
2010-09-10T22:34:30.620
63,550
1,476
null
34,064
2
null
30,373
6
null
Two gotchas that I wish I hadn't learned the hard way: (1) A lot of output (such as printf) is buffered by default. If you're debugging crashing code, and you're using buffered debug statements, the last output you see may really be the last print statement encountered in the code. The solution is to flush the buff...
null
CC BY-SA 2.5
null
2008-08-29T06:39:53.970
2008-08-29T06:39:53.970
null
null
3,561
null
34,067
2
null
34,065
4
null
[RegQueryValueEx](http://msdn.microsoft.com/en-us/library/ms724911%28VS.85%29.aspx) This gives the value if it exists, and returns an error code ERROR_FILE_NOT_FOUND if the key doesn't exist. (I can't tell if my link is working or not, but if you just google for "RegQueryValueEx" the first hit is the msdn documentati...
null
CC BY-SA 2.5
null
2008-08-29T06:44:03.490
2009-01-19T17:19:32.547
2009-01-19T17:19:32.547
3,508
3,561
null
34,069
2
null
34,059
0
null
Batch build allows you to build any project that you select, and a Solution build only builds the projects that are part of the active solution. You can customise what projects are part of a solution build by going to menu → .
null
CC BY-SA 4.0
null
2008-08-29T06:47:02.003
2019-12-25T01:07:34.210
2019-12-25T01:07:34.210
63,550
716
null
34,074
2
null
33,990
2
null
Try adding the repository first using the "SVN Repository Exploring" perspective (Window > Open Perspective > Other... > SVN Repository Exploring). Make sure that the URL you are using points to the correct directory, which typically contains these default repository files: ``` conf/ dav/ db/ format hooks/ locks...
null
CC BY-SA 2.5
null
2008-08-29T06:51:48.077
2008-08-29T06:51:48.077
null
null
2,783
null
34,066
2
null
33,485
0
null
Given your background in .NET but limited Asp .net experience... I assume you are more of a service/client guy. Which will mean your javascript is probably just as limited... If this is the case, I'd go with Silverlight. It will ease you into WPF, which you may be likely to use in the future. But more importantly ...
null
CC BY-SA 2.5
null
2008-08-29T06:41:44.137
2008-08-29T06:41:44.137
null
null
580
null
34,065
1
35,717
null
103
174,950
Given the key for some registry value (e.g. HKEY_LOCAL_MACHINE\blah\blah\blah\foo) how can I: 1. Safely determine that such a key exists. 2. Programmatically (i.e. with code) get its value. I have absolutely no intention of writing anything back to the registry (for the duration of my career if I can help it). So ...
How to read a value from the Windows registry
CC BY-SA 2.5
0
2008-08-29T06:40:21.333
2020-03-04T13:56:31.637
2009-06-21T22:05:37.593
811
3,551
[ "c++", "windows", "winapi", "registry" ]
34,072
2
null
34,009
0
null
Try the following: - [Query Express](http://www.albahari.com/queryexpress.html)- [Query ExPlus](http://sourceforge.net/projects/queryexplus/)
null
CC BY-SA 2.5
null
2008-08-29T06:48:50.157
2008-08-29T06:48:50.157
null
null
718
null
34,071
2
null
34,065
6
null
The pair [RegOpenKey](http://msdn.microsoft.com/en-us/library/ms724895%28VS.85%29.aspx) and [RegQueryKeyEx](http://msdn.microsoft.com/en-us/library/ms724911%28VS.85%29.aspx) will do the trick. If you use MFC [CRegKey](http://msdn.microsoft.com/en-us/library/xka57xy4%28VS.80%29.aspx) class is even more easier solution....
null
CC BY-SA 2.5
null
2008-08-29T06:48:42.483
2008-08-29T07:03:51.667
2008-08-29T07:03:51.667
1,007
1,007
null
34,079
1
41,920,303
null
59
102,958
What's the best way to specify a proxy with username and password for an http connection in python?
How to specify an authenticated proxy for a python http connection?
CC BY-SA 2.5
0
2008-08-29T06:55:54.977
2018-04-18T13:28:14.933
2008-09-17T07:54:47.407
2,961
3,573
[ "python", "http", "proxy" ]
34,070
2
null
33,903
1
null
Toad for Oracle - - - [http://www.toadsoft.com](http://www.toadsoft.com) Toad for Oracle, free version - - - - [http://www.toadsoft.com](http://www.toadsoft.com) Oracle SQL Developer (up and coming, free!) - - - - [http://www.oracle.com/technology/products/database/sql_developer](http://www.oracle.com/technology/p...
null
CC BY-SA 2.5
null
2008-08-29T06:47:54.543
2008-08-29T06:47:54.543
null
null
116
null
34,078
2
null
34,020
9
null
The GIL (Global Interpreter Lock) might be a problem, but the API is quite OK. Try out the excellent `processing` module, which implements the Threading API for separate processes. I am using that right now (albeit on OS X, have yet to do some testing on Windows) and am really impressed. The Queue class is really savin...
null
CC BY-SA 3.0
null
2008-08-29T06:55:14.103
2011-09-09T07:39:39.910
2011-09-09T07:39:39.910
2,260
2,260
null
34,081
1
null
null
18
5,383
I've been given a job of 'translating' one language into another. The source is too flexible (complex) for a simple line by line approach with regex. Where can I go to learn more about lexical analysis and parsers?
Parsing, where can I learn about it
CC BY-SA 2.5
0
2008-08-29T06:57:20.060
2013-05-06T14:31:00.727
2008-09-26T00:59:05.620
2,064
3,577
[ "parsing", "lex" ]
34,076
1
34,096
null
6
355
Is there a built-in function/method that can check if a given string is a valid URI or not in the [Mozilla XUL](https://developer.mozilla.org/en-US/docs/Archive/Mozilla/XUL) toolkit? I have looked for one but found none, but since this is my first time using XUL and its documentation it could be that I just overlooked ...
Checking if userinput is a valid URI in XUL
CC BY-SA 4.0
null
2008-08-29T06:54:07.913
2021-01-09T17:29:09.870
2021-01-09T17:29:09.870
10,607,772
2,989
[ "javascript", "validation", "firefox", "xul" ]
34,085
2
null
34,081
2
null
I've recently been working with [PLY](http://www.dabeaz.com/ply/) which is an implementation of lex and yacc in Python. It's quite easy to get started with it and there are some simple examples in the documentation. Parsing can quickly become a very technical topic and you'll find that you probably won't need to know ...
null
CC BY-SA 2.5
null
2008-08-29T06:59:46.853
2008-08-29T06:59:46.853
null
null
893
null
34,082
2
null
34,065
10
null
``` const CString REG_SW_GROUP_I_WANT = _T("SOFTWARE\\My Corporation\\My Package\\Group I want"); const CString REG_KEY_I_WANT= _T("Key Name"); CRegKey regKey; DWORD dwValue = 0; if(ERROR_SUCCESS != regKey.Open(HKEY_LOCAL_MACHINE, REG_SW_GROUP_I_WANT)) { m_pobLogger->LogError(_T("CRegKey::Open failed in Method"))...
null
CC BY-SA 3.0
null
2008-08-29T06:57:53.380
2014-11-03T04:26:52.023
2014-11-03T04:26:52.023
17,712
1,695
null
34,086
2
null
34,081
8
null
Try [ANLTR](http://www.antlr.org/): > ANTLR, ANother Tool for Language Recognition, is a language tool that provides a framework for constructing recognizers, interpreters, compilers, and translators from grammatical descriptions containing actions in a variety of target languages. There's a [book](http:/...
null
CC BY-SA 3.0
null
2008-08-29T07:01:55.117
2012-04-01T20:43:57.747
2012-04-01T20:43:57.747
1,219,121
718
null
34,088
2
null
33,853
1
null
You can check out [Sitefinity](http://www.sitefinity.com). It is proprietary, but supports multilingual sites and is very, very extensible. .NET-based so you can basically fine-tune it for your needs, or write anything custom that is not coming out of the box.
null
CC BY-SA 2.5
null
2008-08-29T07:04:56.687
2008-08-29T07:04:56.687
null
null
1,801
null
34,089
2
null
34,081
1
null
If you prefer Java based tools, the Java Compiler Compiler, JavaCC, is a nice parser/scanner. It's config file driven, and will generate java code that you can include in your program. I haven't used it a couple years though, so I'm not sure how the current version is. You can find out more here: [https://javacc.dev...
null
CC BY-SA 2.5
null
2008-08-29T07:04:58.370
2008-08-29T07:04:58.370
null
null
3,575
null
34,080
2
null
33,485
33
null
> It is mainly going to be an iternal product so browsers are not an issue. You still have not written a description about the nature of your application. It is difficult to assess which technology is a good fit without first knowing well enough the domain the application is being applied to, and the problems it is...
null
CC BY-SA 2.5
null
2008-08-29T06:56:58.233
2008-08-29T06:56:58.233
null
null
2,663
null
34,093
1
34,095
null
201
145,091
I want to apply an XSLT Stylesheet to an XML Document using C# and write the output to a File.
How to apply an XSLT Stylesheet in C#
CC BY-SA 3.0
0
2008-08-29T07:10:31.260
2022-07-08T00:50:39.430
2012-01-18T20:41:31.433
592,746
2,260
[ "c#", "xml", "xslt" ]
34,087
1
34,114
null
4
2,792
``` <xsl:for-each select="./node [position() &lt;= (count(*) div 2)]"> <li>foo</li> </xsl:for-each> <xsl:for-each select="./node [count(*) div 2 &lt; position()]"> <li>bar</li> </xsl:for-each> ``` My list has 12 nodes, but the second list is always 8 and the first is always 4. What's wrong with my selects?
Dividing a list of nodes in half
CC BY-SA 3.0
null
2008-08-29T07:03:42.820
2014-03-21T16:07:28.737
2014-03-21T16:07:28.737
1,987,598
1,786
[ "xml", "xslt" ]
34,091
2
null
34,019
3
null
I wrote down [my duel with Aptana Rails](http://madcoderspeak.blogspot.com/2008/02/showmethemoney-15-aptana-radrails-hell.html) - See if this helps you. There is a link on manual installation that may be what you're looking for.
null
CC BY-SA 2.5
null
2008-08-29T07:09:27.317
2008-08-29T07:09:27.317
null
null
1,695
null
34,090
2
null
622
9
null
Using GMP, one could write the following: ``` #include <stdio.h> #include <gmp.h> int main() { mpz_t prime; mpz_init(prime); mpz_set_ui(prime, 1); int i; char* num = malloc(4000); for(i=0; i<10000; i++) { mpz_nextprime(prime, prime); printf("%s, ", mpz_get_str(NULL,10,prime)); } } ``` On my 2....
null
CC BY-SA 2.5
null
2008-08-29T07:06:43.937
2008-08-29T07:06:43.937
null
null
3,499
null
34,098
2
null
34,009
4
null
I use and love [DbVisualizer](http://www.minq.se/products/dbvis/).
null
CC BY-SA 2.5
null
2008-08-29T07:12:33.627
2008-08-29T07:12:33.627
null
null
2,168
null
34,097
2
null
32,376
8
null
The author of the [SQLite implementation](http://www.sqlite.org/cvstrac/fileview?f=sqlite/src/btree.c&v=1.504) has disclaimed copyright. If LGPL is okay, then maybe you could use [GNUpdate's implementation](http://gnupdate.cvs.sourceforge.net/gnupdate/libpackman/modules/database/gnupdate/db/btree.c?revision=1.12&view=...
null
CC BY-SA 2.5
null
2008-08-29T07:11:24.707
2008-08-29T07:11:24.707
null
null
3,508
null
34,104
2
null
34,081
1
null
flex and bison are the new lex and yacc though. The syntax for BNF is often derided for being a bit obtuse. Some have moved to ANTLR and Ragel for this reason. If you're not doing much translation, you may one to pull a one-off using multiline regexes with Perl or Ruby. Writing a compatible BNF grammar for an exist...
null
CC BY-SA 3.0
null
2008-08-29T07:18:02.943
2013-05-06T14:31:00.727
2013-05-06T14:31:00.727
360,899
3,499
null
34,101
2
null
34,081
13
null
If you want to get "emotional" about the subject, pick up a copy of "[The Dragon Book](http://en.wikipedia.org/wiki/Compilers:_Principles,_Techniques,_and_Tools)." It is the text in a compiler design course. It will definitely meet your need "learn more about lexical analysis and parsers" as well as a bunch of other...
null
CC BY-SA 2.5
null
2008-08-29T07:15:17.830
2008-08-29T07:15:17.830
null
null
828
null
34,095
2
null
34,093
185
null
I found a possible answer here: [http://web.archive.org/web/20130329123237/http://www.csharpfriends.com/Articles/getArticle.aspx?articleID=63](http://web.archive.org/web/20130329123237/http://www.csharpfriends.com/Articles/getArticle.aspx?articleID=63) From the article: ``` XPathDocument myXPathDoc = new XPathDocumen...
null
CC BY-SA 3.0
null
2008-08-29T07:10:36.953
2014-06-02T12:38:28.813
2014-06-02T12:38:28.813
2,525,067
2,260
null
34,096
2
null
34,076
4
null
The [nsIIOService.newURI(...)](http://developer.mozilla.org/index.php?title=En/NsIIOService&highlight=newURI#newURI.28.29) method is what you're looking for. It throws if the URI string is invalid. Example: ``` try { var ioServ = Components.classes["@mozilla.org/network/io-service;1"] .get...
null
CC BY-SA 2.5
null
2008-08-29T07:10:49.590
2008-08-29T07:10:49.590
null
null
2,783
null
34,105
2
null
33,923
82
null
The jargon file has this to say about the definition of tail recursion: /n./ If you aren't sick of it already, see tail recursion.
null
CC BY-SA 2.5
null
2008-08-29T07:21:31.390
2010-02-16T17:34:13.413
2010-02-16T17:34:13.413
238
238
null
34,112
1
34,146
null
2
596
How do I execute the "Copy Web Site" command for an ASP.NET project in VS2008 from the command line? If I need to script this, let me have some pointers on where I can learn that.
VS2008: Copy Web Site from command line
CC BY-SA 2.5
null
2008-08-29T07:28:08.097
2008-11-02T02:14:41.387
2008-11-02T02:14:41.387
null
45,603
[ "asp.net", "visual-studio-2008", "command-line" ]
34,109
1
502,997
null
6
1,366
MS CRM Dynamics 4.0 incorporates the MS WF engine. The built in designer allows the creation of sequential workflows whos activities have native access to CRM entities. Is it possible to: - -
MS WF state machine workflows and MS CRM Dynamics 4.0
CC BY-SA 2.5
null
2008-08-29T07:22:46.970
2010-05-04T17:33:21.847
2010-04-27T14:15:52.030
1,960
3,580
[ "workflow", "workflow-foundation", "dynamics-crm", "crm" ]
34,108
2
null
33,852
5
null
“When in Rome, do as the Romans do.” While there is theoretically an advantage in using unsigned values where applicable because it makes the code more expressive, this is simply not done in C#. I'm not sure why the developers initially didn't design the interfaces to handle `uints` and make the type CLS compliant but...
null
CC BY-SA 2.5
null
2008-08-29T07:22:37.987
2008-08-29T07:22:37.987
null
null
1,968
null
34,116
2
null
34,079
58
null
This works for me: ``` import urllib2 proxy = urllib2.ProxyHandler({'http': 'http:// username:password@proxyurl:proxyport'}) auth = urllib2.HTTPBasicAuthHandler() opener = urllib2.build_opener(proxy, auth, urllib2.HTTPHandler) urllib2.install_opener(opener) conn = urllib2.urlopen('http://python.org') return_str = ...
null
CC BY-SA 3.0
null
2008-08-29T07:30:35.720
2013-09-20T07:58:38.883
2013-09-20T07:58:38.883
270,222
3,056
null
34,111
2
null
34,087
0
null
I'm not at all sure, but it seems to me that `count(*)` is not doing what you think it is. That counts the number of children of the current node, not the size of the current node list. Could you print it out to check that it's 8 or 9 instead of 12? Use `last()` to get the context size.
null
CC BY-SA 2.5
null
2008-08-29T07:27:18.973
2008-08-29T07:27:18.973
null
null
3,508
null
34,118
2
null
34,081
1
null
Lexing/Parsing + typecheck + code generation is a great CS exercise I would recommend it to anyone wanting a solid basis, so I'm all for the Dragon Book
null
CC BY-SA 2.5
null
2008-08-29T07:31:39.540
2008-08-29T08:13:56.020
2008-08-29T08:13:56.020
86
86
null
34,114
2
null
34,087
7
null
When you do `count(*)`, the current node is the `node` element being processed. You want either `count(current()/node)` or `last()` (preferable), or just calculate the midpoint to a variable for better performance and clearer code: ``` <xsl:variable name="nodes" select="node"/> <xsl:variable name="mid" select="count($...
null
CC BY-SA 2.5
null
2008-08-29T07:28:45.817
2008-08-29T09:06:19.687
2008-08-29T09:06:19.687
2,679
2,679
null
34,120
1
34,145
null
39
45,578
I've been doing some HTML scraping in PHP using regular expressions. This works, but the result is finicky and fragile. Has anyone used any packages that provide a more robust solution? A config driven solution would be ideal, but I'm not picky.
HTML Scraping in Php
CC BY-SA 4.0
0
2008-08-29T07:32:15.217
2019-01-18T11:06:12.957
2019-01-18T11:06:12.957
567,854
3,575
[ "php", "html", "screen-scraping" ]
34,115
2
null
22,015
4
null
There is one tiny problem with OpenID. Seamlessly logging in with OpenID requires automatic (unverified) redirection between domains. That makes the OpenID server a 3rd party. This can cause cookies for the OpenID server to be rejected if you turn off 3rd party cookies and your browser strictly follows the Unverifiab...
null
CC BY-SA 2.5
null
2008-08-29T07:30:09.543
2008-08-29T07:30:09.543
null
null
1,697
null
34,132
2
null
34,128
0
null
You can simply pass a variable-length array as a parameter.
null
CC BY-SA 2.5
null
2008-08-29T07:41:54.693
2008-08-29T07:41:54.693
null
null
1,968
null
34,094
2
null
32,899
245
null
[unittest](https://docs.python.org/3/library/unittest.html) Since Python 3.4, the standard library `unittest` package has the `subTest` context manager. See the documentation: - [26.4.7. Distinguishing test iterations using subtests](https://docs.python.org/3/library/unittest.html#distinguishing-test-iterations-using-s...
null
CC BY-SA 4.0
null
2008-08-29T07:10:31.867
2021-02-05T16:27:49.363
2021-02-05T16:27:49.363
63,550
3,571
null
34,130
2
null
34,126
0
null
Libraries like YUI and jQuery provide methods to add events only once the DOM is ready, which can be before window.onload. They also ensure that you can add multiple event handlers so that you can use scripts from different sources without the different event handlers overwriting each other. So your practical choices ...
null
CC BY-SA 3.0
null
2008-08-29T07:41:45.473
2016-02-08T14:38:20.763
2016-02-08T14:38:20.763
92,701
137
null
34,128
1
34,150
null
4
1,891
We are trying to create a web-service that we plan to pass a variable amount of variables to it. Can this be done? Basically instead of pass all possible parameters we wish to pass only the set values and use the defaults set in the web-service. Here is an example of the XML we are looking to send, we would sent an ...
How to you pass a variable amount of parmeters to web-service
CC BY-SA 3.0
null
2008-08-29T07:38:40.507
2017-08-04T14:32:10.297
2017-08-04T14:32:10.297
1,836,618
3,582
[ "c#", "web-services", "soap" ]
34,133
2
null
34,087
0
null
Try count(../node). The following will gives the correct result on my test XML file (a simple nodes root with node elements), using the xsltproc XSLT processor. ``` <xsl:for-each select="node[position() &lt;= (count(../node) div 2)]"> ... </xsl:for-each> <xsl:for-each select="node[(count(../node) div 2) &lt; posit...
null
CC BY-SA 2.5
null
2008-08-29T07:42:05.897
2008-08-29T07:42:05.897
null
null
3,571
null
34,134
2
null
33,853
-1
null
For .NET, assuming you're comfortable with XSLT, Umbraco - [www.umbraco.org](http://www.umbraco.org) The XSLT qualification is important because that's the basis of the template (for content) system so whilst the end users have no requirement to use XSLT those defining the templates will. --- Edit: As we roll to...
null
CC BY-SA 3.0
null
2008-08-29T07:42:32.010
2011-09-01T20:45:53.210
2011-09-01T20:45:53.210
1,070
1,070
null
34,138
2
null
34,128
0
null
If you dont like the idea of an Array (this is not slating Konrad's answer - you may have differing param types) you can pass complex objects (i.e. objects that you made yourself).. The downside is that you cannot then test using the ASMX page, but would need to do it all in code (which isn't really a bad thing, especi...
null
CC BY-SA 2.5
null
2008-08-29T07:46:13.857
2008-08-29T07:52:32.673
2008-08-29T07:52:32.673
832
832
null
34,126
1
34,163
null
9
10,401
I see 2 main ways to set events in JavaScript: 1. Add an event directly inside the tag like this: <a href="" onclick="doFoo()">do foo</a> 2. Set them by JavaScript like this: <a id="bar" href="">do bar</a> and add an event in a `<script>` section inside the `<head>` section or in an external JavaScript file, like ...
What is the best way to add an event in JavaScript?
CC BY-SA 3.0
0
2008-08-29T07:35:56.783
2016-02-08T14:38:20.763
2013-06-01T19:08:54.977
2,071,395
3,122
[ "javascript", "html", "events", "event-binding" ]
34,125
1
34,129
null
167
50,944
It seems to me that it would work perfectly well to do tail-recursion optimization in both C and C++, yet while debugging I never seem to see a frame stack that indicates this optimization. That is kind of good, because the stack tells me how deep the recursion is. However, the optimization would be kind of nice as wel...
Which, if any, C++ compilers do tail-recursion optimization?
CC BY-SA 4.0
0
2008-08-29T07:35:47.517
2018-07-05T21:06:42.077
2018-07-05T21:06:42.077
2,971
2,971
[ "c++", "optimization", "tail-recursion" ]
34,139
2
null
34,125
12
null
Most compilers don't do any kind of optimisation in a debug build. If using VC, try a release build with PDB info turned on - this will let you trace through the optimised app and you should hopefully see what you want then. Note, however, that debugging and tracing an optimised build will jump you around all over the...
null
CC BY-SA 2.5
null
2008-08-29T07:48:26.940
2008-08-29T07:48:26.940
null
null
2,102
null
34,129
2
null
34,125
145
null
fairly well (and have done for more than a decade), [even for mutually recursive calls](https://godbolt.org/g/TjqTHV) such as: ``` int bar(int, int); int foo(int n, int acc) { return (n == 0) ? acc : bar(n - 1, acc + 2); } int bar(int n, int acc) { return (n == 0) ? acc : foo(n - 1, acc + 1); } ``` Lettin...
null
CC BY-SA 4.0
null
2008-08-29T07:40:32.280
2018-07-04T10:53:57.717
2018-07-04T10:53:57.717
1,968
1,968
null
34,145
2
null
34,120
28
null
I would recomend [PHP Simple HTML DOM Parser](https://sourceforge.net/projects/simplehtmldom/) after you have scraped the HTML from the page. It supports invalid HTML, and provides a very easy way to handle HTML elements.
null
CC BY-SA 2.5
null
2008-08-29T07:55:42.710
2008-08-29T07:55:42.710
null
null
2,257
null
34,140
2
null
31,701
2
null
I think the easiest way is to iterate through the shapes in your VEShapeLayer and use the [VEShape.SetZIndex method](http://msdn.microsoft.com/en-us/library/bb877869.aspx).
null
CC BY-SA 2.5
null
2008-08-29T07:49:01.260
2008-08-29T07:49:01.260
null
null
3,508
null
34,146
2
null
34,112
4
null
Would this help you get started? [Walkthrough: Deploying an ASP.NET Web Application Using XCOPY](http://msdn.microsoft.com/en-us/library/f735abw9.aspx)
null
CC BY-SA 2.5
null
2008-08-29T07:57:43.457
2008-08-29T07:57:43.457
null
null
2,257
null
34,148
2
null
34,081
5
null
Niklaus Wirth's book "Compiler Construction" (available as a free PDF) [http://www.google.com/search?q=wirth+compiler+construction](http://www.google.com/search?q=wirth+compiler+construction)
null
CC BY-SA 2.5
null
2008-08-29T07:59:12.983
2008-08-29T07:59:12.983
null
null
3,588
null
34,144
1
34,167
null
122
57,615
I would like to know which dependency described in my pom.xml brings a transitive dependency in my target directory. To be more precise, I have the library "poi-2.5.1-final-20040804.jar" in my WEB-INF/lib directory and I would like to know which dependency in my pom.xml brings that.
In Maven 2, how do I know from which dependency comes a transitive dependency?
CC BY-SA 2.5
0
2008-08-29T07:55:12.883
2019-12-28T20:37:35.747
2009-07-30T21:05:10.767
123,582
3,122
[ "java", "maven-2", "build-process" ]
34,152
2
null
34,059
23
null
The key point which seems to be missed in both the existing answers is that batch build allows you to build of each project (e.g. you can build debug release configurations with a single operation). With a normal build, you have to use the configuration manager to select just one configuration for each project.
null
CC BY-SA 4.0
null
2008-08-29T08:02:08.937
2019-12-25T01:06:15.927
2019-12-25T01:06:15.927
63,550
987
null
34,147
2
null
32,790
2
null
I think throwing an exception is what you should do when something goes wrong. This way, if your application is not running as a stand-alone app the caller can react to it and has some information about what went wrong. It is also easier for debugging purposes because you as well get a better idea about what went wrong...
null
CC BY-SA 2.5
null
2008-08-29T07:57:58.667
2008-08-29T07:57:58.667
null
null
3,587
null