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
26,604
2
null
26,559
3
null
If you're worried about apache's performance, one thing to consider if you have a lot of rewrite rules is to use the "skip" flag. It is a way to skip matching on rules. So, whatever overhead would have been spent on matching is saved. Be careful though, I was on a project which utilized the "skip" flag a lot, and it m...
null
CC BY-SA 2.5
null
2008-08-25T18:32:42.027
2008-08-25T18:32:42.027
null
null
543
null
26,597
2
null
26,559
41
null
I've used mod_rewrite on sites that get millions/hits/month without any significant performance issues. You do have to know which rewrites get applied first depending on your rules. Using mod_rewrite is most likely faster than parsing the URL with your current language. If you are really worried about performance, d...
null
CC BY-SA 3.0
null
2008-08-25T18:28:35.470
2015-10-08T01:09:22.357
2015-10-08T01:09:22.357
67,579
956
null
26,616
2
null
11,043
2
null
Aliases are great if you consider that my organization has table names like: SchemaName.DataPointName_SubPoint_Sub-SubPoint_Sub-Sub-SubPoint... My team uses a pretty standard set of abbreviations, so the guesswork is minimized. We'll have say ProgramInformationDataPoint shortened to pidp, and submissions to just sub. ...
null
CC BY-SA 2.5
null
2008-08-25T18:40:45.393
2008-08-25T18:40:45.393
null
null
2,156
null
26,614
2
null
21,651
0
null
I think this is possible if you use an iframe and sandbox bridge. You should be able to run eval() on downloaded code in the sandboxed iframe, Excerpt from [Adobe AIR 1.1 Doc's](http://help.adobe.com/en_US/AIR/1.1/devappshtml/WS5b3ccc516d4fbf351e63e3d118666ade46-7f11.html#WS5b3ccc516d4fbf351e63e3d118666ade46-7e40) "....
null
CC BY-SA 2.5
null
2008-08-25T18:39:22.977
2008-08-25T18:39:22.977
null
null
2,882
null
26,621
2
null
20,047
3
null
You definitely want READ_COMMITTED_SNAPSHOT set to on, which it is not by default. That gives you MVCC semantics. It's the same thing Oracle uses by default. Having an MVCC database is so incredibly useful, NOT using one is insane. This allows you to run the following inside a transaction: Update USERS Set FirstName =...
null
CC BY-SA 2.5
null
2008-08-25T18:45:37.473
2008-08-25T18:45:37.473
null
null
82,208
null
26,612
2
null
26,594
1
null
I haven't tried this in a while, but a quick google search shows some possibilities: - [Java Sketchbook: The HTML Renderer Shootout, Part 1](http://today.java.net/pub/a/today/2004/05/24/html-pt1.html)- [Cobra: Java HTML Renderer & Parser](http://lobobrowser.org/cobra.jsp) Are you trying to do this in an applet, or an...
null
CC BY-SA 2.5
null
2008-08-25T18:38:17.753
2008-08-25T18:38:17.753
null
null
1,409
null
26,629
2
null
22,873
0
null
MSDN [http://msdn.microsoft.com/en-us/library/ms229335.aspx](http://msdn.microsoft.com/en-us/library/ms229335.aspx)
null
CC BY-SA 2.5
null
2008-08-25T18:49:39.817
2008-08-25T18:49:39.817
null
null
1,293
null
26,626
2
null
26,595
50
null
You may want to read this [object identity and equivalence](http://mail.python.org/pipermail/python-list/2001-November/094920.html). The statement 'is' is used for object identity, it checks if objects refer to the same instance (same address in memory). And the '==' statement refers to equality (same value).
null
CC BY-SA 3.0
null
2008-08-25T18:48:20.163
2012-10-31T03:35:06.953
2012-10-31T03:35:06.953
249,226
2,772
null
26,620
1
26,681
null
45
126,978
In my web app, I submit some form fields with jQuery's `$.getJSON()` method. I am having some problems with the encoding. The character-set of my app is `charset=ISO-8859-1`, but I think these fields are submitted with `UTF-8`. How I can set encoding used in `$.getJSON` calls?
How to set encoding in .getJSON jQuery
CC BY-SA 4.0
0
2008-08-25T18:45:27.660
2019-12-17T16:59:22.527
2019-03-22T15:08:04.843
7,079,025
2,138
[ "jquery", "ajax", "json", "character-encoding" ]
26,611
2
null
26,595
267
null
`is` always returns `True` if it compares the same object instance Whereas `==` is ultimately determined by the `__eq__()` method i.e. ``` >>> class Foo(object): def __eq__(self, other): return True >>> f = Foo() >>> f == None True >>> f is None False ```
null
CC BY-SA 3.0
null
2008-08-25T18:38:10.267
2017-03-03T14:56:09.797
2017-03-03T14:56:09.797
199
199
null
26,638
1
26,680
null
13
3,870
I want to parse some HTML in order to find the values of some attributes/tags etc. What HTML parsers do you recommend? Any pros and cons?
What HTML parsing libraries do you recommend in Java
CC BY-SA 2.5
0
2008-08-25T18:54:27.107
2010-01-03T08:29:54.477
2010-01-03T08:29:54.477
222,815
2,644
[ "java", "html", "parsing", "html-content-extraction" ]
26,637
2
null
769
3
null
[Template Numerical Toolkit](http://math.nist.gov/tnt/download.html) from NIST has tools for doing that. One of the more reliable ways is to use a [QR Decomposition](http://en.wikipedia.org/wiki/QR_decomposition). Here's an example of a wrapper so that I can call "GetInverse(A, InvA)" in my code and it will put the...
null
CC BY-SA 2.5
null
2008-08-25T18:53:32.837
2008-08-25T18:53:32.837
null
null
1,179
null
26,642
2
null
26,638
7
null
I have tried [HTML Parser](http://htmlparser.sourceforge.net/) which is dead simple.
null
CC BY-SA 2.5
null
2008-08-25T18:55:11.427
2008-08-25T18:55:11.427
null
null
2,644
null
26,647
2
null
26,512
0
null
Where are you adding the listener compared to the loading of the data? Is it possible the data is being loaded, and the event fired, before you've added your listener?
null
CC BY-SA 2.5
null
2008-08-25T18:59:42.430
2008-08-25T18:59:42.430
null
null
1,409
null
26,649
2
null
26,195
0
null
You could change the call to `cvs` to take branches into account. That shouldn't be to hard. It bit harder would to change the whole function and make the branch your working a variable (argument, session, global or otherwise).
null
CC BY-SA 2.5
null
2008-08-25T19:01:17.637
2008-08-25T19:01:17.637
null
null
1,633
null
26,602
2
null
7,031
1
null
Everything that Christian Lescuyer wrote is correct. Notice, however, that he said "I would" and not "you should". The choice is not that easy. First of all, security is not an issue in the choice. You should have security check on server when you execute an action. Which code decides to show/hide the button that lead...
null
CC BY-SA 3.0
null
2008-08-25T18:32:29.000
2016-02-07T18:13:16.193
2016-02-07T18:13:16.193
2,921,691
2,515
null
26,652
1
26,656
null
100
99,818
Is there a way to make a TSQL variable constant?
Is there a way to make a TSQL variable constant?
CC BY-SA 2.5
0
2008-08-25T19:03:30.160
2022-11-08T12:07:02.853
null
null
1,874
[ "sql-server", "tsql" ]
26,654
2
null
26,595
5
null
For None there shouldn't be a difference between equality (==) and identity (is). The NoneType probably returns identity for equality. Since None is the only instance you can make of NoneType (I think this is true), the two operations are the same. In the case of other types this is not always the case. For example: `...
null
CC BY-SA 2.5
null
2008-08-25T19:04:59.547
2008-08-25T19:04:59.547
null
null
360
null
26,634
2
null
26,547
1
null
To determine other patterns to look for in determining the blogging engine (for those that don't have a generator meta tag), you'd basically just look through the source to determine something specific to that blog type. You'd also need to compare this across multiple blogs of that type as you want to make sure that it...
null
CC BY-SA 2.5
null
2008-08-25T18:51:21.233
2008-08-25T18:51:21.233
null
null
1,627
null
26,668
2
null
26,663
3
null
There are different requirements for profiling. Is instrumented code ok, or do you need to profile optimized code (or even already compiled code)? Do you need line-by-line profile information? Which OS are you running? Do you need to profile shared libraries as well? What about trace into system calls? Personally, I u...
null
CC BY-SA 2.5
null
2008-08-25T19:12:02.183
2008-08-25T19:12:02.183
null
null
2,089,740
null
26,656
2
null
26,652
64
null
No, but you can create a function and hardcode it in there and use that. Here is an example: ``` CREATE FUNCTION fnConstant() RETURNS INT AS BEGIN RETURN 2 END GO SELECT dbo.fnConstant() ```
null
CC BY-SA 3.0
null
2008-08-25T19:05:30.060
2015-01-07T15:29:36.397
2015-01-07T15:29:36.397
2,083,613
740
null
26,655
2
null
26,652
0
null
There are no such thing as "creating a constant" in database literature. Constants exist as they are and often called values. One can declare a variable and assign a value (constant) to it. From a scholastic view: ``` DECLARE @two INT SET @two = 2 ``` Here @two is a variable and 2 is a value/constant.
null
CC BY-SA 2.5
null
2008-08-25T19:05:04.883
2008-08-25T19:11:23.853
2008-08-25T19:11:23.853
35
35
null
26,663
1
null
null
91
81,152
So far, I've only used Rational Quantify. I've heard great things about Intel's VTune, but have never tried it! Edit: I'm mostly looking for software that will instrument the code, as I guess that's about the only way to get very fine results. --- ### See also: [What are some good profilers for native C++ on Wind...
What's your favorite profiling tool (for C++)
CC BY-SA 2.5
0
2008-08-25T19:09:08.977
2016-10-08T08:20:08.517
2020-06-20T09:12:55.060
-1
2,638
[ "c++", "performance", "profiling" ]
26,672
2
null
26,594
1
null
Swing has a built-in compontent called [BasicHTML](http://java.sun.com/javase/6/docs/api/javax/swing/plaf/basic/BasicHTML.html). I've never used it, but I think it should be sufficient for the basic stuff.
null
CC BY-SA 2.5
null
2008-08-25T19:14:20.913
2008-08-25T19:14:20.913
null
null
198
null
26,645
2
null
26,638
1
null
Do you need to do a full parse of the HTML? If you're just looking for specific values within the contents (a specific tag/param), then a simple regular expression might be enough, and could very well be faster.
null
CC BY-SA 2.5
null
2008-08-25T18:56:36.540
2008-08-25T18:56:36.540
null
null
1,409
null
26,584
2
null
26,301
10
null
This one might sound trivial but it was a revelation for me at the time. I was in my very first programming class(VB6) and the Prof had just taught us about random numbers and he gave the following instructions: "Create a virtual lottery machine. Imagine a glass ball full of 100 ping pong balls marked 0 to 99. Pick the...
null
CC BY-SA 2.5
null
2008-08-25T18:23:57.587
2008-08-25T18:23:57.587
null
null
2,051
null
26,675
2
null
26,652
3
null
Okay, lets see Constants are immutable values which are known at compile time and do not change for the life of the program that means you can never have a constant in SQL Server ``` declare @myvalue as int set @myvalue = 5 set @myvalue = 10--oops we just changed it ``` the value just changed
null
CC BY-SA 2.5
null
2008-08-25T19:16:16.820
2008-08-25T19:16:16.820
null
null
740
null
26,674
2
null
21,725
2
null
I use the following two plugins all the time: - -
null
CC BY-SA 2.5
null
2008-08-25T19:16:11.783
2008-08-25T19:16:11.783
null
null
1,633
null
26,673
2
null
26,652
10
null
No, but good old naming conventions should be used. ``` declare @MY_VALUE as int ```
null
CC BY-SA 2.5
null
2008-08-25T19:15:26.450
2008-08-25T19:15:26.450
null
null
1,293
null
26,680
2
null
26,638
12
null
[NekoHTML](http://sourceforge.net/projects/nekohtml/), [TagSoup](http://home.ccil.org/~cowan/XML/tagsoup/), and [JTidy](http://sourceforge.net/projects/jtidy/) will allow you to parse HTML and then process with XML tools, like XPath.
null
CC BY-SA 2.5
null
2008-08-25T19:22:20.160
2008-08-25T19:22:20.160
null
null
2,679
null
26,676
2
null
26,652
8
null
There is no built-in support for constants in T-SQL. You could use SQLMenace's approach to simulate it (though you can never be sure whether someone else has overwritten the function to return something else…), or possibly write a table containing constants, [as suggested over here](http://www.sqlteam.com/article/simul...
null
CC BY-SA 3.0
null
2008-08-25T19:16:37.523
2012-02-27T15:46:57.403
2012-02-27T15:46:57.403
31,662
1,600
null
26,677
2
null
25,977
33
null
The 'classic' way of measuring this is to break the image up into some canonical number of sections (say a 10x10 grid) and then computing a histogram of RGB values inside of each cell and compare corresponding histograms. This type of algorithm is preferred because of both its simplicity and it's invariance to scaling ...
null
CC BY-SA 2.5
null
2008-08-25T19:18:41.980
2008-08-25T19:18:41.980
null
null
2,089,740
null
26,683
2
null
21,725
18
null
I have recently started using a plugin that highlights differences in your buffer from a previous version in your RCS system (Subversion, git, whatever). You just need to press a key to toggle the diff display on/off. You can find it here: [http://github.com/ghewgill/vim-scmdiff](http://github.com/ghewgill/vim-scmdiff)...
null
CC BY-SA 2.5
null
2008-08-25T19:23:48.237
2008-08-25T19:23:48.237
null
null
893
null
26,682
2
null
26,663
7
null
My only experience profiling C++ code is with [AQTime](http://www.automatedqa.com/products/aqtime/) by AutomatedQA (now SmartBear Software). It has several types of profilers built in (performance, memory, Windows handles, exception tracing, static analysis, etc.), and instruments the code to get the results. I enjoy...
null
CC BY-SA 3.0
null
2008-08-25T19:23:13.730
2011-04-18T18:17:17.260
2011-04-18T18:17:17.260
863
863
null
26,679
2
null
26,536
4
null
Yes! You can throw events in C++/ActiveX land which makes the JavaScript code run an event handler function. I was even able to make an entire invisible ActiveX control (same color as page background) with no buttons or visual feedback that did all of its GUI work through JavaScript and CSS. edit: Frank's advice is ri...
null
CC BY-SA 3.0
null
2008-08-25T19:22:03.297
2017-02-15T21:50:21.847
2017-02-15T21:50:21.847
111,794
2,543
null
26,684
2
null
26,536
7
null
just use an existing ActiveX control. Like Flash or Silverlight. Flash has built-in webcam support and is controllable via JavaScript. Silverlight doesn't have built-in camera support, but it's JavaScript integration is fantastic. If you must write your own then fret not, it is trivial to get it to interact with Java...
null
CC BY-SA 2.5
null
2008-08-25T19:25:24.740
2008-08-25T19:25:24.740
null
null
338
null
26,686
2
null
26,663
5
null
I've used [Glowcode](http://www.glowcode.com/summary1_gc.htm) extensively in the past and have had nothing but positive experiences with it. Its Visual Studio integration is really nice, and it is the most efficient/intuitive profiler that I've ever used (even compared to profilers for managed code). Obviously, tha...
null
CC BY-SA 2.5
null
2008-08-25T19:27:10.977
2008-08-25T19:27:10.977
null
null
1,432
null
26,581
2
null
26,570
12
null
You need [Marshal.SizeOf](http://msdn.microsoft.com/en-us/library/system.runtime.interopservices.marshal.sizeof.aspx) This for unsafe code, but then, so is sizeof().
null
CC BY-SA 2.5
null
2008-08-25T18:23:34.157
2008-08-25T18:23:34.157
null
null
35
null
26,694
2
null
26,685
7
null
Jeff has a [post](http://www.codinghorror.com/blog/archives/001112.html) about it, otherwise I found some useful documents on Apple's website, in Cocoa tutorials ([this one](http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaFundamentals/CocoaDesignPatterns/chapter_5_section_4.html) for example).
null
CC BY-SA 2.5
null
2008-08-25T19:31:58.873
2008-08-25T19:31:58.873
null
null
2,638
null
26,670
1
30,688
null
1
1,101
I'm creating PDFs on-demand with ColdFusion's [CFDocument](http://cfquickdocs.com/cf8/?getDoc=cfdocument) tag, like so: ``` <cfdocument format="PDF" filename="#attributes.fileName#" overwrite="true"> <cfdocumentitem type="footer"> <table border="0" cellpadding="0" cellspacing="0" width="100%"> ...
Why is my PDF footer text invisible?
CC BY-SA 3.0
null
2008-08-25T19:14:07.280
2012-04-01T09:21:43.570
2012-04-01T09:21:43.570
1,219,121
751
[ "pdf", "coldfusion" ]
26,685
1
26,693
null
47
108,754
I found [What are mvp and mvc and what is the difference](https://stackoverflow.com/questions/2056/what-are-mvp-and-mvc-and-what-is-the-difference) but it didn't really answer this question. I've recently started using MVC because it's part of the framework that myself and my work-partner are going to use. We chose it...
What is MVC and what are the advantages of it?
CC BY-SA 2.5
0
2008-08-25T19:26:39.823
2016-01-27T00:40:18.710
2017-05-23T10:31:20.830
-1
1,384,652
[ "model-view-controller", "design-patterns" ]
26,691
2
null
20,465
5
null
If anyone else is having this problem, I have found the cause of this exception. ListObjects will automatically re-size on binding, as long as they do not affect any other objects on the sheet. Keep in mind that ListObjects can only affect the Ranges which they wrap around. In my case, the list object which was abov...
null
CC BY-SA 2.5
null
2008-08-25T19:30:44.243
2008-08-25T19:30:44.243
null
null
940
null
26,688
1
null
null
7
6,274
Are there any good PL/SQL libraries for JSON that you've worked with and found useful? In [PL/SQL](http://www.oracle.com/technology/tech/pl_sql/index.html), I'm having to tediously hand code the return of [JSON](http://www.json.org/) values to JavaScript functions. I found [one PL/SQL library](http://www.erasme.org/pl-...
What PL/SQL Libraries For Auto-Generating JSON Do You Recommend?
CC BY-SA 4.0
0
2008-08-25T19:28:54.810
2019-01-18T10:30:48.090
2020-06-20T09:12:55.060
-1
null
[ "json", "plsql" ]
26,696
2
null
26,663
38
null
For linux development (although some of these tools might work on other platforms). These are the two big names I know of, there's plenty of other smaller ones that haven't seen active development in a while. - [Valgrind](http://valgrind.org/)- [TAU - Tuning and Analysis Utilities](http://www.cs.uoregon.edu/research/t...
null
CC BY-SA 2.5
null
2008-08-25T19:32:57.327
2008-08-25T19:32:57.327
null
null
2,881
null
26,699
2
null
26,137
1
null
way way back in the day when VBScript/ASP were still ok I worked in a utility company with a very mixed DB envrionment, I used to swear by this website: [http://www.connectionstrings.com/](http://www.connectionstrings.com/) @michealpryor got it right
null
CC BY-SA 2.5
null
2008-08-25T19:37:08.753
2008-08-25T19:37:08.753
null
null
2,759
null
26,700
2
null
26,075
1
null
[In this forum post](http://forums.infragistics.com/forums/t/3577.aspx), an Infragistics employee states that this is not implemented (as of Feb '08), but may be doable handling `FillSceneGraph`.
null
CC BY-SA 2.5
null
2008-08-25T19:39:16.047
2008-08-25T19:39:16.047
null
null
1,600
null
26,681
2
null
26,620
36
null
I think that you'll probably have to use [$.ajax()](http://docs.jquery.com/Ajax/jQuery.ajax#options) if you want to change the encoding, see the `contentType` param below (the `success` and `error` callbacks assume you have `<div id="success"></div>` and `<div id="error"></div>` in the html): ``` $.ajax({ type: "P...
null
CC BY-SA 3.0
null
2008-08-25T19:23:06.447
2011-04-20T22:44:29.063
2011-04-20T22:44:29.063
1,414
1,414
null
26,693
2
null
26,685
46
null
MVC is the separation of odel, iew and ontroller — nothing more, nothing less. It's simply a paradigm; an ideal that you should have in the back of your mind when designing classes. Avoid mixing code from the three categories into one class. For example, while a table grid should obviously present data once shown, it...
null
CC BY-SA 3.0
null
2008-08-25T19:31:57.250
2013-09-10T11:52:03.283
2013-09-10T11:52:03.283
null
1,600
null
26,706
1
26,707
null
6
595
I'm a bit perplexed by drag and drop in wxPython (but perhaps this questions pertains to drag and drop in other GUI frameworks as well). The frameworks provides a couple of callbacks (OnEnter and OnDragOver) that purportedly allow me to inform the system whether the current mouse position is a valid place to drop whate...
wxpython: How do I examine dragged data in OnDragOver?
CC BY-SA 2.5
0
2008-08-25T19:43:15.960
2008-10-08T17:23:30.857
2008-10-08T17:23:30.857
21,632
1,785
[ "python", "user-interface", "drag-and-drop", "wxpython", "wxwidgets" ]
26,707
2
null
26,706
1
null
One solution, which is a hack of limited usefulness, is when a drag is initiated, store the dragged data in a global or static reference somewhere. This way, in the OnEnter and OnDragOver handlers, it is possible to get a reference to the data being dragged. This is of course only useful for drags within the same appli...
null
CC BY-SA 2.5
null
2008-08-25T19:45:40.977
2008-08-25T19:45:40.977
null
null
1,785
null
26,702
2
null
26,551
1,229
null
Another useful tip is to use `%*` to mean "all". For example: ``` echo off set arg1=%1 set arg2=%2 shift shift fake-command /u %arg1% /p %arg2% %* ``` When you run: ``` test-command admin password foo bar ``` The above batch file will run: ``` fake-command /u admin /p password admin password foo bar ``` I may have t...
null
CC BY-SA 4.0
null
2008-08-25T19:41:55.107
2022-07-28T22:53:26.763
2022-07-28T22:53:26.763
3,739,391
893
null
26,715
1
26,741
null
12
11,491
How does the new Microsoft asp.net mvc implementation handle partitioning your application - for example: ``` --index.aspx --about.aspx --contact.aspx --/feature1 --/feature1/subfeature/action --/feature2/subfeature/action ``` I guess what I am trying to say is that it seems everything has to go into the root of the...
asp.net mvc - subfolders
CC BY-SA 3.0
0
2008-08-25T19:50:21.827
2012-07-13T06:39:55.567
2012-07-13T06:39:55.567
727,208
2,041
[ "asp.net-mvc", "directory-structure" ]
26,708
2
null
26,195
3
null
I've been working on a similar script here: [http://github.com/ghewgill/vim-scmdiff](http://github.com/ghewgill/vim-scmdiff) (in fact, they may have the same ancestry). I haven't used scmdiff with cvs, but it should do a diff against the branch you have checked out. You can also specify that you want to diff against a ...
null
CC BY-SA 3.0
null
2008-08-25T19:45:43.333
2013-03-07T15:59:12.013
2013-03-07T15:59:12.013
225,647
893
null
26,718
2
null
26,688
0
null
I wonder why you don't want to bring the data from Oracle into some application code and make JSON there?
null
CC BY-SA 2.5
null
2008-08-25T19:51:12.073
2008-08-25T19:51:12.073
null
null
1,097
null
26,703
2
null
8,472
4
null
What if you used a combination of the captcha ideas you had (choose any of them - or select one of them randomly): - - - with the addition of placing the exact same captcha in a css hidden section of the page - the honeypot idea. That way, you'd have one place where you'd expect the correct answer and another where...
null
CC BY-SA 2.5
null
2008-08-25T19:42:20.457
2008-08-25T19:42:20.457
null
null
1,874
null
26,711
1
26,720
null
3
3,521
I'm trying to re-install a DLL in the GAC, everything seems to work fine but the web application accessing it still seems to be using the old one. The old DLL is the same version as the new one with only a minor edit, it will be used by 50 different sites so changing the version then changing the reference in the web....
Asp.net Reinstalling a DLL into the GAC
CC BY-SA 3.0
0
2008-08-25T19:47:42.830
2015-04-17T18:12:03.960
2015-04-17T18:12:03.960
1,215,724
2,847
[ "iis", "dll", "gac" ]
26,720
2
null
26,711
3
null
AFAIK, you need to restart IIS for it to get a fresh reference to the updated DLL. Your best bet is to perform the reset at a low traffic time. If you are running multiple servers with load balancing, you can prevent new connections from hitting one server until all connections have been closed. Afterwards, update t...
null
CC BY-SA 2.5
null
2008-08-25T19:51:47.033
2008-08-25T19:51:47.033
null
null
2,470
null
26,719
1
28,915
null
1
1,331
I have a set of multiple assemblies (one assembly is to be used as an API and it depends on other assemblies). I would like to merge all assemblies into one single assembly but prevent all assemblies except the API one to be visible from the outside. I will then obfuscate this assembly with Xenocode. From what I have ...
Internalize Class and Methods in .NET Assembly
CC BY-SA 2.5
0
2008-08-25T19:51:31.260
2012-06-09T16:43:57.667
2009-04-25T11:25:06.007
49,246
1,508
[ "c#", ".net", "vb.net", "assemblies" ]
26,726
2
null
1,069
2
null
The apparent randomness of the memory corruption sounds very much like a thread synchronization issue - a bug is reproduced depending on machine speed. If objects (chuncks of memory) are shared among threads and synchronization (critical section, mutex, semaphore, other) primitives are not on per-class (per-object, per...
null
CC BY-SA 2.5
null
2008-08-25T19:55:09.893
2008-08-25T19:55:09.893
null
null
2,877
null
26,731
2
null
26,688
1
null
@Geoff- The system, which has been in production for 8+ years, was architected to use PL/SQL for the CRUDs and of the business logic. The PL/SQL also generates 90% of the presentation layer (HTML/JavaScript), using [mod PL/SQL](http://www.orafaq.com/wiki/Mod_plsql_FAQ). The other 10% is report data done via Oracle...
null
CC BY-SA 2.5
null
2008-08-25T19:56:32.560
2008-08-25T19:56:32.560
null
null
null
null
26,721
1
27,032
null
2
3,150
When creating scrollable user controls with .NET and WinForms I have repeatedly encountered situations where, for example, a vertical scrollbar pops up, overlapping the control's content, causing a horizontal scrollbar to also be needed. Ideally the content would shrink just a bit to make room for the vertical scrollb...
How can I make sure scrollbars don't overlap content?
CC BY-SA 3.0
null
2008-08-25T19:52:07.173
2015-04-17T18:10:57.863
2015-04-17T18:10:57.863
1,215,724
2,729
[ ".net", "winforms" ]
26,722
2
null
8,472
211
null
My [favourite CAPTCHA ever](http://flickr.com/photos/ceejayoz/2674227920/): ![Captcha](https://i.stack.imgur.com/q3EId.jpg)
null
CC BY-SA 3.0
null
2008-08-25T19:52:35.267
2012-03-29T18:03:46.863
2012-03-29T18:03:46.863
1,219,121
1,902,010
null
26,728
2
null
26,711
1
null
Since you don't make a reference to application pools, I'm going to assume you are on the old version of IIS. In that case, what you'll need to do is to "touch" all the DLLs in each site that references the DLL. The problem is that the code is already loaded and you need to find a non-intrusive way to re-load the...
null
CC BY-SA 2.5
null
2008-08-25T19:55:22.000
2008-08-25T19:55:22.000
null
null
2,170
null
26,732
1
26,744
null
44
88,884
``` <servlet> <servlet-name>myservlet</servlet-name> <servlet-class>workflow.WDispatcher</servlet-class> <load-on-startup>2</load-on-startup> </servlet> <servlet-mapping> <servlet-name>myservlet</servlet-name> <url-pattern>*NEXTEVENT*</url-pattern> </servlet-mapping> ``` Above is the snippet from...
java.lang.IllegalArgumentException: Invalid <url-pattern> in servlet mapping
CC BY-SA 3.0
0
2008-08-25T19:56:38.470
2017-07-19T16:40:16.693
2017-07-19T16:40:16.693
7,750,640
null
[ "tomcat", "servlets", "web.xml", "illegalargumentexception", "servlet-mapping" ]
26,724
2
null
8,472
2
null
If you're leaning towards the question/answer solution in the past I've presented users with a dropdown of 3-5 random questions that they could choose from and then answer to prove they were human. The list was sorted differently on each page load.
null
CC BY-SA 2.5
null
2008-08-25T19:53:13.893
2008-08-25T19:53:13.893
null
null
null
null
26,695
2
null
26,512
0
null
@Herms The listener is definitely added before the web service call, here is an example of what my code look like (I simplified lots of things...): I have this flex component: ``` public class FooComboBox extends ComboBox { private var service:HTTPService = null; public function ProjectAutoComplete() { ...
null
CC BY-SA 2.5
null
2008-08-25T19:32:43.880
2008-08-25T19:32:43.880
null
null
1,638
null
26,733
1
26,750
null
649
360,055
Using reflection, how can I get all types that implement an interface with C# 3.0/.NET 3.5 with the least code, and minimizing iterations? This is what I want to re-write: ``` foreach (Type t in this.GetType().Assembly.GetTypes()) if (t is IMyInterface) ; //do stuff ```
Getting all types that implement an interface
CC BY-SA 3.0
0
2008-08-25T19:57:21.903
2022-04-27T01:41:27.147
2014-09-30T12:20:32.847
809,009
1,782
[ "c#", "optimization", "reflection", "lambda", "c#-3.0" ]
26,741
2
null
26,715
11
null
There isn't any issues with organizing your controllers. You just need to setup the routes to take the organization into consideration. The problem you will run into is finding the view for the controller, since you changed the convention. There isn't any built in functionality for it yet, but it is easy to create a...
null
CC BY-SA 2.5
null
2008-08-25T20:02:29.113
2008-08-25T20:09:18.567
2017-05-23T10:32:50.733
-1
1,117
null
26,737
2
null
8,472
5
null
Actually it could be an idea to have a programming related captcha set. For example: ![Captcha](https://i.stack.imgur.com/1gDvB.jpg) There is the possibility of someone building a syntax checker to bypass this but it's a lot more work to bypass a captcha. You get the idea of having a related captcha though.
null
CC BY-SA 3.0
null
2008-08-25T19:59:59.133
2012-03-29T18:05:51.183
2012-03-29T18:05:51.183
1,219,121
2,025
null
26,725
2
null
25,672
21
null
There are several scopes that are available to any portion of your code: Session, Client, Cookie, Application, and Request. Some are inadvisable to use in certain ways (i.e. using Request or Application scope inside your Custom Tags or CFC's; this is [coupling](http://en.wikipedia.org/wiki/Coupling_%28computer_science%...
null
CC BY-SA 3.0
null
2008-08-25T19:54:19.210
2015-11-11T12:19:21.000
2015-11-11T12:19:21.000
884,842
751
null
26,745
2
null
26,733
18
null
loop through all loaded assemblies, loop through all their types, and check if they implement the interface. something like: ``` Type ti = typeof(IYourInterface); foreach (Assembly asm in AppDomain.CurrentDomain.GetAssemblies()) { foreach (Type t in asm.GetTypes()) { if (ti.IsAssignableFrom(t)) { ...
null
CC BY-SA 3.0
null
2008-08-25T20:05:21.400
2017-04-28T12:40:06.163
2017-04-28T12:40:06.163
3,641,067
267
null
26,742
2
null
26,551
172
null
If you want to intelligently handle missing parameters you can do something like: ``` IF %1.==. GOTO No1 IF %2.==. GOTO No2 ... do stuff... GOTO End1 :No1 ECHO No param 1 GOTO End1 :No2 ECHO No param 2 GOTO End1 :End1 ```
null
CC BY-SA 2.5
null
2008-08-25T20:03:34.587
2008-08-25T20:03:34.587
null
null
163
null
26,752
2
null
26,733
4
null
Edit: I've just seen the edit to clarify that the original question was for the reduction of iterations / code and that's all well and good as an exercise, but in real-world situations you're going to want the fastest implementation, regardless of how cool the underlying LINQ looks. Here's my Utils method for iteratin...
null
CC BY-SA 3.0
null
2008-08-25T20:12:45.967
2017-04-28T12:40:53.647
2017-04-28T12:40:53.647
3,641,067
192
null
26,753
2
null
25,375
11
null
Microsoft.FSharp.Math.Types.BigInt It can represent any integer.
null
CC BY-SA 2.5
null
2008-08-25T20:12:56.903
2008-08-25T20:12:56.903
null
null
580
null
26,736
2
null
26,512
0
null
Maybe the event doesn't trigger when the data provider is first set? Try setting the data provider to an empty array in the constructor, so that it's definitely instead of just being initially assigned later in your resultReturned() method. I've no clue if that will help, but it's worth a shot. Also, you're setting...
null
CC BY-SA 2.5
null
2008-08-25T19:59:52.723
2008-08-25T19:59:52.723
null
null
1,409
null
26,750
2
null
26,733
928
null
Mine would be this in c# 3.0 :) ``` var type = typeof(IMyInterface); var types = AppDomain.CurrentDomain.GetAssemblies() .SelectMany(s => s.GetTypes()) .Where(p => type.IsAssignableFrom(p)); ``` Basically, the least amount of iterations will always be: ``` loop assemblies loop types see if implemente...
null
CC BY-SA 3.0
null
2008-08-25T20:11:21.243
2013-09-06T18:41:47.837
2013-09-06T18:41:47.837
77
77
null
26,756
2
null
19,448
0
null
I agree with the accepted answer. Your job may be made a bit easier by using the "squish" library to decompress the blocks for you. [http://www.sjbrown.co.uk/?code=squish](http://www.sjbrown.co.uk/?code=squish)
null
CC BY-SA 2.5
null
2008-08-25T20:13:55.887
2008-08-25T20:13:55.887
null
null
1,329,401
null
26,746
1
null
null
2
10,697
I have a Windows 2008 Server (x64) running Microsoft SQL 2008 (x64) and I'm creating a Linked Server connection to an Oracle server. I'm able to make the connection, but I cannot see any information regarding which schema a table belongs to. In SQL 2005, my linked servers show the schema information as I would expect...
MS SQL Server 2008 "linked server" to Oracle : schema not showing
CC BY-SA 2.5
null
2008-08-25T20:06:37.043
2011-06-20T18:26:15.793
2008-10-08T22:30:21.343
15,401
519
[ "sql", "sql-server", "oracle" ]
26,759
2
null
26,688
0
null
Ouch - generating your interface in PL/SQL. You have my sympathy. I've never done anything like this, but Googling found [this page](http://www.erasme.org/pl-sql-library-for-JSON) (which is also referenced from the json.org page).
null
CC BY-SA 2.5
null
2008-08-25T20:15:18.350
2008-08-25T20:15:18.350
null
null
619
null
26,754
2
null
26,733
3
null
There's no easy way (in terms of performance) to do what you want to do. Reflection works with assemblys and types mainly so you'll have to get all the types of the assembly and query them for the right interface. Here's an example: ``` Assembly asm = Assembly.Load("MyAssembly"); Type[] types = asm.GetTypes(); Type[]...
null
CC BY-SA 2.5
null
2008-08-25T20:13:17.090
2008-08-25T20:13:17.090
null
null
2,695
null
26,767
2
null
24,270
9
null
Maybe a bonnet, lap or a tree is not a chair but they all are ISittable.
null
CC BY-SA 2.5
null
2008-08-25T20:19:07.170
2008-08-25T20:19:07.170
null
null
1,116
null
26,760
1
26,769
null
30
59,516
I have some strings of xxh:yym format where xx is hours and yy is minutes like "05h:30m". What is an elegant way to convert a string of this type to TimeSpan?
Parse string to TimeSpan
CC BY-SA 2.5
0
2008-08-25T20:16:26.990
2016-08-16T07:23:32.857
null
null
31,505
[ "c#", "timespan" ]
26,710
2
null
26,594
1
null
Many of the Swing controls (like JLabel) can render basic HTML content. [JEditorPane](http://java.sun.com/javase/6/docs/api/javax/swing/JEditorPane.html) can be used to display HTML pages. However, these controls are limited to [HTML 3.2](http://www.w3.org/TR/REC-html32) support. For a richer experience, I would use t...
null
CC BY-SA 3.0
null
2008-08-25T19:47:13.237
2013-11-26T05:39:03.687
2013-11-26T05:39:03.687
1,102,512
304
null
26,769
2
null
26,760
27
null
This seems to work, though it is a bit hackish: ``` TimeSpan span; if (TimeSpan.TryParse("05h:30m".Replace("m","").Replace("h",""), out span)) MessageBox.Show(span.ToString()); ```
null
CC BY-SA 2.5
null
2008-08-25T20:20:22.953
2008-08-25T20:20:22.953
null
null
960
null
26,775
2
null
26,760
1
null
Are [TimeSpan.Parse](http://msdn.microsoft.com/en-us/library/system.timespan.parse.aspx) and [TimeSpan.TryParse](http://msdn.microsoft.com/en-us/library/system.timespan.tryparse.aspx) not options? If you aren't using an "approved" format, you'll need to do the parsing manually. I'd probably capture your two integer v...
null
CC BY-SA 2.5
null
2008-08-25T20:22:29.253
2008-08-25T20:22:29.253
null
null
2,688
null
26,743
1
null
null
16
8,529
I use .NET XML technologies quite extensively on my work. One of the things the I like very much is the XSLT engine, more precisely the extensibility of it. However there one little piece which keeps being a source of annoyance. Nothing major or something we can't live with but it is preventing us from producing the be...
Proper name space management in .NET XmlWriter
CC BY-SA 4.0
0
2008-08-25T20:03:51.323
2019-01-30T03:10:44.093
2019-01-30T03:10:44.093
1,033,581
2,892
[ "c#", ".net", "xml", "xmlwriter" ]
26,744
2
null
26,732
102
null
``` <url-pattern>*NEXTEVENT*</url-pattern> ``` The URL pattern is not valid. It can either end in an asterisk or start with one (to denote a file extension mapping). The url-pattern specification: > - - - - See section 12.2 of the [Java Servlet Specification](https://jcp.org/aboutJava/communityprocess/final/jsr34...
null
CC BY-SA 3.0
null
2008-08-25T20:04:47.157
2017-03-16T00:31:08.253
2017-03-16T00:31:08.253
6,716,597
304
null
26,777
2
null
26,762
0
null
I have experience using a Perforce derivative. It seemed hard to manage from the admin's perspective, but it was fine to use from a programmer's perspective. Then again, I'm big on command line version control so can't speak for VS integration.
null
CC BY-SA 2.5
null
2008-08-25T20:22:51.483
2008-08-25T20:22:51.483
null
null
338
null
26,770
2
null
26,559
7
null
To echo what Ryan says above, rules in a `.htaccess` can really hurt your load times on a busy site in comparison to having the rules in your config file. We initially tried this (~60million pages/month) but didn't last very long until our servers started smoking :) The obvious downside to having the rules in your con...
null
CC BY-SA 3.0
null
2008-08-25T20:20:51.657
2015-10-08T01:09:42.233
2015-10-08T01:09:42.233
67,579
2,287
null
26,782
2
null
26,721
0
null
If your controls are inside a panel, try setting the AutoScroll property of the Panel to False. This will hide the scrollbars. I hope this points you in the right direction. ``` myPanel.AutoScroll = False ```
null
CC BY-SA 2.5
null
2008-08-25T20:25:20.417
2008-08-25T20:25:20.417
null
null
299
null
26,766
2
null
26,733
-4
null
You could use some LINQ to get the list: ``` var types = from type in this.GetType().Assembly.GetTypes() where type is ISomeInterface select type; ``` But really, is that more readable?
null
CC BY-SA 2.5
null
2008-08-25T20:18:59.667
2008-08-25T20:18:59.667
null
null
2,278
null
26,780
2
null
26,760
2
null
Here'e one possibility: ``` TimeSpan.Parse(s.Remove(2, 1).Remove(5, 1)); ``` And if you want to make it more elegant in your code, use an extension method: ``` public static TimeSpan ToTimeSpan(this string s) { TimeSpan t = TimeSpan.Parse(s.Remove(2, 1).Remove(5, 1)); return t; } ``` Then you can do ``` "05...
null
CC BY-SA 2.5
null
2008-08-25T20:24:25.177
2008-08-25T20:24:25.177
null
null
380
null
26,762
1
26,785
null
6
1,593
Our dev shop currently uses Visual SourceSafe. We all know how that could end up (badly), so we're investigating other systems. First up is Perforce. Does anyone have experience with using it and its integration into Visual Studio (2003/2005/2008)? Is it as good as any other, or is it pretty solid with good features, c...
Perforce in a Microsoft Shop
CC BY-SA 2.5
0
2008-08-25T20:17:10.293
2009-07-28T03:29:17.933
2008-08-26T03:22:38.430
2,134
1,212
[ "version-control", "visual-sourcesafe", "perforce" ]
26,768
2
null
26,733
66
null
To find all types in an assembly that implement IFoo interface: ``` var results = from type in someAssembly.GetTypes() where typeof(IFoo).IsAssignableFrom(type) select type; ``` Note that Ryan Rinaldi's suggestion was incorrect. It will return 0 types. You cannot write ``` where type is ...
null
CC BY-SA 2.5
null
2008-08-25T20:20:17.853
2008-08-25T20:44:18.857
2008-08-25T20:44:18.857
536
536
null
26,794
2
null
26,762
-1
null
I haven't used Perforce, but I have found moving to Team Foundation Server as one of the best options while working with Visual Studio.
null
CC BY-SA 2.5
null
2008-08-25T20:30:31.963
2008-08-25T20:30:31.963
null
null
380
null
26,792
2
null
15,674
0
null
I'm not sure the SVN docs actually recommend one project per repository. Mostly they talk about the upsides and downsides of each path. I happen to use three different repositories, one for 7 or 8 projects that are all related, making it very nice to be able to send out compatible copies of all the projects just by b...
null
CC BY-SA 2.5
null
2008-08-25T20:29:40.280
2008-08-25T20:29:40.280
null
null
null
null
26,771
1
26,852
null
9
4,828
Courses for people who are being introduced to programming very often include a code project, which I think is a nice way to learn. However, such projects often feel too artificial, and are thus not very rewarding to work on. What are your ideas of rewarding code projects? (Preferably easy to begin, and extendable at ...
Rewarding code projects for *complete* beginners
CC BY-SA 2.5
0
2008-08-25T20:21:18.257
2013-08-23T15:18:31.807
2013-08-23T15:18:31.807
null
2,638
[ "language-agnostic" ]
26,786
2
null
26,771
0
null
It really depends on what you're trying to teach the beginner. If you're trying to teach syntax, then simple "Hello World" programs and ones that spit out every odd number between 1 and 100 are fine to get them started. If you're trying to teach data structures, then maybe something like a 20 questions game or some s...
null
CC BY-SA 2.5
null
2008-08-25T20:26:44.500
2008-08-25T20:26:44.500
null
null
1,574
null
26,799
1
26,858
null
40
6,850
How do you back up your development machine so that in the event of a catastrophic hardware malfunction, you are up and running in the least amount of time possible?
How do you back up your development machine?
CC BY-SA 2.5
0
2008-08-25T20:32:33.767
2014-03-28T23:59:14.613
2008-08-26T00:57:26.547
1,574
1,574
[ "backup", "hardware", "installation" ]
26,778
2
null
26,760
7
null
`DateTime.ParseExact` or `DateTime.TryParseExact` lets you specify the exact format of the input. After you get the `DateTime`, you can grab the `DateTime.TimeOfDay` which is a `TimeSpan`. In the absence of `TimeSpan.TryParseExact`, I think an 'elegant' solution is out of the mix. @buyutec As you suspected, this meth...
null
CC BY-SA 3.0
null
2008-08-25T20:23:51.090
2013-06-13T13:55:07.653
2013-06-13T13:55:07.653
30,512
1,786
null