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
19,793
2
null
17,434
2
null
With regards to operator<< and operator>> there is no good reason to make these operators friends. It is true that they should not be member functions, but they don't need to be friends, either. The best thing to do is create public print(ostream&) and read(istream&) functions. Then, write the operator<< and operat...
null
CC BY-SA 2.5
null
2008-08-21T13:03:12.460
2008-08-21T13:03:12.460
null
null
null
null
19,794
2
null
19,773
1
null
Does the application use a lot of JavaScript? If it does, then one thing I've found that helps for avoiding memory leaks is to make sure you're using a JavaScript framework such as Prototype or jQuery because they have tried and tested event-handling code that doesn't leak memory. - [circular references to DOM object...
null
CC BY-SA 2.5
null
2008-08-21T13:03:17.640
2008-08-21T13:03:17.640
null
null
1,450
null
19,796
2
null
19,766
11
null
I'd probably be looking to use a rather than a and since the default rendering of a checkbox is rather ugly, I'd probably be looking to drop in a custom , and to represent a boolean value. Of course, I would imagine this has been done a bajillion times already. Sun has [good examples](http://java.sun.com/docs/books...
null
CC BY-SA 2.5
null
2008-08-21T13:04:02.490
2008-08-21T13:04:02.490
null
null
1,030
null
19,803
1
19,874
null
1
382
I just wonder what options there are to properly measure/profile/optimize ASP.net 2.0 Web Parts, especially the ones for Sharepoint 2007? As Web Parts are a layer on another layer of technology, getting resource usage, open handles and stuff only for the web part seems to be a bit difficult. Does anyone know some goo...
Profiling/Optimizing (Sharepoint 2007) Web Parts
CC BY-SA 2.5
null
2008-08-21T13:05:21.863
2011-08-23T05:46:24.473
null
null
91
[ "asp.net", "sharepoint" ]
19,780
2
null
19,772
10
null
I've been using JPSoft's products a long time (starting back with 4OS2 and 4DOS), and currently use Take Command 9. It works with existing batch files, has it's own improvements on top, a tabbed interface, and filename coloring options. Looks like their site is having some problems right now, but you can find them at:...
null
CC BY-SA 2.5
null
2008-08-21T12:58:15.030
2008-08-21T12:58:15.030
null
null
1,441
null
19,804
2
null
19,766
16
null
Create a custom `ListCellRenderer` and asign it to the `JList`. This custom `ListCellRenderer` must return a `JCheckbox` in the implementantion of `getListCellRendererComponent(...)` method. But this `JCheckbox` will not be editable, is a simple paint in the screen is up to you to choose when this `JCheckbox` must be...
null
CC BY-SA 3.0
null
2008-08-21T13:05:26.637
2012-03-12T13:16:19.393
2012-03-12T13:16:19.393
708,434
518
null
19,810
2
null
19,786
0
null
What database are you using? And what data type is the amount stored in? As long as you are always converting from one format to another, you do not need to do any parsing, just replace "." with "," or the other way around. You may need to remove the "£"-sign as well if that is stored in your string.
null
CC BY-SA 2.5
null
2008-08-21T13:07:07.413
2008-08-21T13:13:22.780
2008-08-21T13:13:22.780
2,257
2,257
null
19,805
2
null
19,790
14
null
You can use a [DataList](http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.datalist.aspx) control instead. It has a [RepeatColumns](http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.datalist.repeatcolumns.aspx) property that you can define the number of columns you want to display. In ....
null
CC BY-SA 3.0
null
2008-08-21T13:05:57.243
2012-06-14T15:26:55.937
2012-06-14T15:26:55.937
12,597
31,505
null
19,820
2
null
19,519
0
null
We use VMWare with a virtual windows XP here at work to run some old development tools with very expensive licenses that don't run at all on Vista. So VMWare saved us about $5000 in licenses.
null
CC BY-SA 2.5
null
2008-08-21T13:08:58.717
2008-08-21T13:08:58.717
null
null
2,079
null
19,787
1
19,826
null
26
18,906
Is it possible to look back through the history of a Subversion repository for files of a certain name (even better would be for them to have a wildcard search)? I want to see if a `.bat` file has been committed to the repository at some point in the past but has since been removed in later updates. Even a dump of the...
How Do I Find a File in a Subversion Repository History?
CC BY-SA 3.0
0
2008-08-21T12:59:53.357
2013-04-01T12:39:46.143
2013-04-01T12:39:46.143
21,960
277
[ "svn", "repository" ]
19,826
2
null
19,787
23
null
TortoiseSVN can search the logs very easily, and on my system I can enter ".plg" in the search box and find all adds, modifies, and deletes for those files. Without Tortoise, the only way I can think of doing that would be to grep the full logs or parse the logs and do your own searching for 'A' and 'D' indicators on ...
null
CC BY-SA 2.5
null
2008-08-21T13:11:29.180
2008-08-21T13:11:29.180
null
null
1,441
null
19,827
2
null
19,803
0
null
I have found seperating out all the business logic in to a seperate DLL that is easily unit testable has been the easiest method for me. But to be honest there is really no good way that I have found, besides what I have just mentioned. The same has been true for me with Facebook applications recently. I think this ...
null
CC BY-SA 2.5
null
2008-08-21T13:12:56.557
2008-08-21T13:12:56.557
null
null
17
null
19,838
1
20,154
null
6
1,312
I've been trying to understand how Ruby blocks work, and to do that I've been trying to implement them in C. One easy way to implement closures is to pass a `void*` to the enclosing stack to the closure/function but Ruby blocks also seem to handle returns and break statements from the scope that uses the block. ``` l...
Ruby blocks/Java closures in C
CC BY-SA 3.0
null
2008-08-21T13:17:50.367
2015-05-08T13:27:34.953
2015-05-08T13:27:34.953
1,292,374
2,148
[ "java", "c", "ruby" ]
19,814
2
null
5,507
4
null
Personally I don't really like the Win32 API but there's value in learning it as the API will allow more control and efficiency using the GUI than a language like Visual Basic, and I believe that if you're going to make a living writing software you should know the API even if you don't use it directly. This is for re...
null
CC BY-SA 2.5
null
2008-08-21T13:07:30.423
2008-08-21T13:07:30.423
null
null
2,222
null
19,798
2
null
19,787
3
null
I assume you are using the SVN command line client. Give TortoiseSVN a try. Its "Show Log" dialog allows searching for comments, filenames and authors. [http://tortoisesvn.net/downloads](http://tortoisesvn.net/downloads) PS: Windows only.
null
CC BY-SA 2.5
null
2008-08-21T13:04:07.340
2008-08-21T13:10:10.760
2008-08-21T13:10:10.760
227
227
null
19,837
1
20,427
null
3
491
Currently we have a hybrid ASP/PHP setup connecting to a SQL Server 2005 database. But all the query work is done on the client side, I'd like to move some of this to PHP. What driver and/or connection string is needed to connect to Sql Svr and what is the syntax to use in PHP? --- Update: OK so I was definitely...
PHP with SQL Server 2005+
CC BY-SA 2.5
0
2008-08-21T13:17:44.297
2008-09-22T09:24:35.783
2008-08-22T00:56:34.307
1,915
1,915
[ "php", "sql-server" ]
19,839
2
null
3,021
1
null
You want to use it anytime you have a tree structure. It is very useful in reading XML.
null
CC BY-SA 2.5
null
2008-08-21T13:18:19.180
2008-08-21T13:18:19.180
null
null
17
null
19,778
2
null
19,772
64
null
: I've been using ([http://conemu.github.io/](http://conemu.github.io/)) for quite some time now. This one is a wrapper too, since it is not really possible to replace the Windows console without rewriting the whole command interpreter. Below the line is my original answer for an earlier alternative. --- Not exac...
null
CC BY-SA 3.0
null
2008-08-21T12:56:01.323
2015-03-23T09:12:21.203
2015-03-23T09:12:21.203
227
227
null
19,844
2
null
19,837
0
null
PHP provides an extension for accessing Microsoft SQL Server databases. To use the SQL Server extension, all that is required is to activate the extension in the PHP configuration file. Details on [the MSDN page](http://msdn.microsoft.com/en-us/library/bb264561.aspx)
null
CC BY-SA 2.5
null
2008-08-21T13:20:33.527
2008-08-21T13:20:33.527
null
null
2,257
null
19,782
2
null
16,935
5
null
> It will be nice to know; what can cause or causes a StackOverflowError during compilation of Java code? It is probable that evaluating the long expression in your java file consumes lots of memory and because this is being done in conjunction with the compilation of other classes, the VM just runs out of stack s...
null
CC BY-SA 2.5
null
2008-08-21T12:58:37.930
2008-08-21T12:58:37.930
2017-05-23T10:27:42.823
-1
304
null
19,851
2
null
19,837
2
null
Just use the mssql_connect() function like this: ``` $conn = mssql_connect('localhost', 'sa' , '123456') or die('Can\'t connect.'); mssql_select_db('database', $conn) or die('Can\'t select the database'); ``` Functions relating to SQL Server are defined in the [PHP manual for the MSSQL driver](http://www.php...
null
CC BY-SA 2.5
null
2008-08-21T13:22:25.520
2008-08-21T13:33:18.677
2008-08-21T13:33:18.677
2,148
2,148
null
19,835
2
null
19,553
2
null
I am fairly certain you can't get the effect you want as a return value from a method. C# just can't do some of the things C++ can. However, a somewhat ugly way to get a similar effect is the following: ``` using System; public class Example { public class Toy { private bool inCupboard = false; ...
null
CC BY-SA 2.5
null
2008-08-21T13:17:05.203
2008-08-21T13:17:05.203
null
null
2,283
null
19,843
1
20,139
null
14
8,874
My question concerns c# and how to access Static members ... Well I don't really know how to explain it (which kind of is bad for a question isn't it?) I will just give you some sample code: ``` Class test<T>{ int method1(Obj Parameter1){ //in here I want to do something which I would explain as ...
Generics in c# & accessing the static members of T
CC BY-SA 4.0
0
2008-08-21T13:20:05.710
2020-08-05T01:30:17.723
2020-08-05T01:30:17.723
214,143
2,275
[ "c#", "generics", "static", "methods", "data-access" ]
19,854
2
null
19,786
0
null
There's probably a correct answer dealing with culture objects and such, but the easiest way would be to taken the input from the polish input, and replace the , with a ., and then store it in your database as type "money" or "decimal". If you know they (possibly configurable per user) are always entering numbers in e...
null
CC BY-SA 2.5
null
2008-08-21T13:24:54.857
2008-08-21T13:24:54.857
null
null
1,862
null
19,846
2
null
19,787
2
null
TortoiseSVN is completely sweet. I can't imagine dealing with Subversion without it. Also, as a long shot, if you're using Eclipse I'd recommend the Subclipse plug-in.
null
CC BY-SA 2.5
null
2008-08-21T13:21:01.403
2008-08-21T13:21:01.403
null
null
2,109
null
19,862
2
null
19,843
5
null
The problem is that TryParse isn't defined on an interface or base class anywhere, so you can't make an assumption that the type passed into your class will have that function. Unless you can contrain T in some way, you'll run into this a lot. [Constraints on Type Parameters](http://msdn.microsoft.com/en-us/library/d...
null
CC BY-SA 2.5
null
2008-08-21T13:28:29.513
2008-08-21T13:28:29.513
null
null
35
null
19,859
2
null
15,880
9
null
I have found a 3rd party COM library called [Outlook Redemption](http://www.dimastr.com/redemption/) which is working fine for me at the moment. If you use it via COM-Interop in .NET, don't forget to release every COM object after you are done with it, otherwise your application crashes randomly.
null
CC BY-SA 2.5
null
2008-08-21T13:27:06.583
2008-08-21T13:27:06.583
null
null
39
null
19,824
2
null
19,787
0
null
Personally I'd use ``` svnadmin dump -r1:HEAD /path/to/repo/ ``` Pipe it into less and search or grep with some context.
null
CC BY-SA 2.5
null
2008-08-21T13:10:57.230
2008-08-21T13:10:57.230
null
null
1,087
null
19,856
2
null
19,519
0
null
Since my last machine upgrade I have been running virtualised OS's for a number of tasks. For example I use a different set of Visual Studio plugins for managed and c++ unmanaged development. Some things I found: 1. Run your vmware setup on a machine with plenty of resources. I'll repeat...plenty of resources! A fast...
null
CC BY-SA 2.5
null
2008-08-21T13:25:55.620
2008-08-21T13:25:55.620
null
null
2,281
null
19,865
2
null
19,772
6
null
I use Take Command 9.0. I have used [JPSoft's](http://jpsoft.com/) products for years. It has a tabbed interface. I have Take Command start with Take Command, Powershell, and CMD.exe each in their own tab. It doesn't do syntax highlighting. Take Command is syntactically compatible with CMD.exe and enhances each co...
null
CC BY-SA 2.5
null
2008-08-21T13:29:46.267
2008-08-21T13:29:46.267
null
null
791
null
19,867
2
null
19,843
-1
null
That is not how statics work. You have to think of statics as sort of in a Global class even if they are are spread across a whole bunch of types. My recommendation is to make it a property inside the T instance that can access the necessary static method. Also T is an actual instance of something, and just like any...
null
CC BY-SA 2.5
null
2008-08-21T13:30:18.887
2008-08-21T13:30:18.887
null
null
17
null
19,880
2
null
17,411
0
null
[Enginuity](http://www.gamedev.net/reference/programming/features/enginuity1/) has a slightly different, but interesting approach: the Task Pool.
null
CC BY-SA 2.5
null
2008-08-21T13:33:51.200
2008-08-21T13:33:51.200
null
null
1,536
null
19,883
1
19,896
null
20
12,603
I've used Trac/Subversion before and really like the integration. My current project is using Mercurial for distributed development and it'd be nice to be able to track issues/bugs and have this be integrated with Mercurial. I realized this could be tricky with the nature of DVCS.
Is there a bug/issue tracking system which integrates with Mercurial?
CC BY-SA 2.5
0
2008-08-21T13:34:43.150
2017-06-16T15:26:40.053
2008-08-31T00:19:09.457
305
287
[ "mercurial", "integration", "bug-tracking" ]
19,885
2
null
19,843
3
null
To access a member of a specific class or interface you need to use the Where keyword and specify the interface or base class that has the method. In the above instance TryParse does not come from an interface or base class, so what you are trying to do above is not possible. Best just use Convert.ChangeType and a try...
null
CC BY-SA 3.0
null
2008-08-21T13:34:47.923
2014-06-25T11:42:34.403
2014-06-25T11:42:34.403
1,908
1,908
null
19,887
2
null
19,843
0
null
You may want to read my previous post on [limiting generic types to primitives](https://stackoverflow.com/questions/8941/generic-type-checking). This may give you some pointers in limiting the type that can be passed to the generic (since is obviously only available to a set number of primitives ( obviously being the...
null
CC BY-SA 2.5
null
2008-08-21T13:35:06.003
2008-08-21T13:35:06.003
2017-05-23T12:24:55.150
-1
832
null
19,893
1
19,904
null
114
118,441
I have two applications written in Java that communicate with each other using XML messages over the network. I'm using a SAX parser at the receiving end to get the data back out of the messages. One of the requirements is to embed binary data in an XML message, but SAX doesn't like this. Does anyone know how to do ...
How do you embed binary data in XML?
CC BY-SA 2.5
0
2008-08-21T13:35:46.830
2019-01-13T01:38:58.820
2012-08-21T12:40:45.853
603,019
1,288
[ "java", "xml", "binary", "binary-data" ]
19,896
2
null
19,883
11
null
[TracMercurial](http://trac.edgewall.org/wiki/TracMercurial) integrates Trac with Mercurial. [Assembla](http://www.assembla.com/) provides free Mercurial hosting with Trac integration. The idea is that you have a central repository as your master and upload all the subsidiary changes from local repositories into the m...
null
CC BY-SA 2.5
null
2008-08-21T13:37:10.367
2008-08-21T13:37:10.367
null
null
886
null
19,898
2
null
19,893
4
null
Maybe encode them into a known set - something like base 64 is a popular choice.
null
CC BY-SA 2.5
null
2008-08-21T13:37:19.727
2008-08-21T13:37:19.727
null
null
1,951
null
19,852
1
1,849,792
null
40
19,833
I'm just designing the schema for a database table which will hold details of email attachments - their size in bytes, filename and content-type (i.e. "image/jpg", "audio/mp3", etc). Does anybody know the maximum length that I can expect a content-type to be?
Maximum length of a MIME Content-Type header field?
CC BY-SA 2.5
0
2008-08-21T13:23:09.480
2017-11-04T11:52:36.323
null
null
2,084
[ "email", "mime" ]
19,904
2
null
19,893
227
null
You could encode the binary data using base64 and put it into a Base64 element; the below article is a pretty good one on the subject. [Handling Binary Data in XML Documents](http://www.xml.com/pub/a/98/07/binary/binary.html)
null
CC BY-SA 2.5
null
2008-08-21T13:37:58.600
2008-09-11T14:08:11.397
2008-09-11T14:08:11.397
35
35
null
19,868
2
null
19,786
0
null
@KiwiBastard yes i would think so. Are you storing your amount in an "(n)varchar" field or are you using a currency/decimal type field? If the latter is the case, the currency-symbols and separators are added by your client, and there would be no need to replace anything in the database.
null
CC BY-SA 2.5
null
2008-08-21T13:30:21.553
2008-08-21T13:30:21.553
null
null
2,257
null
19,909
2
null
19,893
6
null
I usually encode the binary data with [MIME Base64](http://en.wikipedia.org/wiki/Base64) or [URL encoding](https://www.rfc-editor.org/rfc/rfc3986).
null
CC BY-SA 2.5
null
2008-08-21T13:38:36.773
2008-08-21T13:38:36.773
2021-10-07T05:54:43.270
-1
1,709
null
19,916
2
null
19,728
2
null
@Jason - I don't see how keeping data in plain old text files will allow you to do long term trending analysis easily on the data. @Jason - I guess my point is that if any sort of ad-hoc analysis (i.e. trending) needs to be done on the data by business people, rolling up or archiving the data to text files really does...
null
CC BY-SA 2.5
null
2008-08-21T13:39:29.300
2008-08-21T14:22:53.907
2008-08-21T14:22:53.907
1,875
1,875
null
19,874
2
null
19,803
0
null
Back when we started with SP2003, we used to worry about not closing connection in apps or web parts. We used the following query to check if the base number of connections (not counting the initial spike) would increase as the app is used on the development server: SELECT hostname, sysdatabases.name , sysprocesses.s...
null
CC BY-SA 2.5
null
2008-08-21T13:32:06.760
2008-08-21T13:32:06.760
null
null
1,533
null
19,918
2
null
3,021
0
null
Actually the better recursive solution for factorial should be: ``` int factorial_accumulate(int n, int accum) { return (n < 2 ? accum : factorial_accumulate(n - 1, n * accum)); } int factorial(int n) { return factorial_accumulate(n, 1); } ``` Because this version is [Tail Recursive](http://en.wikipedia.org...
null
CC BY-SA 3.0
null
2008-08-21T13:39:47.037
2016-02-07T14:20:49.340
2016-02-07T14:20:49.340
2,921,691
486
null
19,929
2
null
19,883
12
null
FogBugz has tight [integration with Mercurial](http://kilnhg.com) through their [Kiln](http://kilnhg.com) product.
null
CC BY-SA 2.5
null
2008-08-21T13:43:20.477
2011-02-11T13:45:48.403
2011-02-11T13:45:48.403
245
1,154
null
19,930
2
null
19,883
3
null
There is also a plugin to integrate Mercurial with [Jira](http://www.atlassian.com/software/jira/). See the [webpage](http://confluence.atlassian.com/display/JIRAEXT/Mercurial+Plugin) for the plugin.
null
CC BY-SA 2.5
null
2008-08-21T13:43:42.270
2008-08-21T13:43:42.270
null
null
1,912
null
19,933
1
19,937
null
13
18,740
I want to copy a file from A to B in C#. How do I do that?
How to copy a file in C#
CC BY-SA 2.5
0
2008-08-21T13:44:48.833
2018-09-27T07:02:05.587
2015-07-21T10:00:04.380
2,040,039
2,260
[ "c#", ".net", "file" ]
19,911
2
null
19,843
1
null
Do you mean to do something like this: ``` Class test<T> { T method1(object Parameter1){ if( Parameter1 is T ) { T value = (T) Parameter1; //do something with value return value; } else { //Parameter1 is not a T ...
null
CC BY-SA 2.5
null
2008-08-21T13:39:02.297
2008-08-21T13:39:02.297
null
null
905
null
19,935
2
null
19,933
1
null
System.IO.File.Copy
null
CC BY-SA 2.5
null
2008-08-21T13:45:42.217
2008-08-21T13:45:42.217
null
null
1,154
null
19,937
2
null
19,933
11
null
The File.Copy method: [MSDN Link](http://msdn.microsoft.com/en-us/library/system.io.file.copy.aspx)
null
CC BY-SA 2.5
null
2008-08-21T13:45:51.470
2008-08-22T10:03:34.990
2008-08-22T10:03:34.990
1,120
1,120
null
19,936
2
null
19,933
2
null
Use the FileInfo class. ``` FileInfo fi = new FileInfo("a.txt"); fi.CopyTo("b.txt"); ```
null
CC BY-SA 2.5
null
2008-08-21T13:45:44.760
2008-08-21T13:45:44.760
null
null
1,219
null
19,920
2
null
19,786
8
null
The data is not actually stored as the string `"£1000.00"`; it's stored in some numeric format. > Usually databases are set up to store money amounts using either the data type (also called in some DBs), or as a floating point number (also called ).The difference is that when it's stored as certain numbers like 0.0...
null
CC BY-SA 4.0
null
2008-08-21T13:40:13.540
2019-12-16T07:19:00.203
2020-06-20T09:12:55.060
-1
4
null
19,908
2
null
19,519
0
null
I've used virtualisation so I could take my development environment around with me while travelling. As long as I could install MS Virtual PC, (and the PC/laptop had generous enough RAM) then I could access all my tools, VPN, Remote desktop links, SQL databases etc... Worked fairly well, just a little slower than I lik...
null
CC BY-SA 2.5
null
2008-08-21T13:38:28.617
2008-08-21T13:38:28.617
null
null
376
null
19,938
2
null
19,933
16
null
Without any error handling code: ``` File.Copy(path, path2); ```
null
CC BY-SA 2.5
null
2008-08-21T13:45:56.773
2008-08-21T13:45:56.773
null
null
1,595
null
19,941
1
19,949
null
18
15,199
I want to be able to capture the exception that is thrown when a user requests a non-existent controller and re-direct it to a 404 page. How can I do this? For example, the user requests `http://www.nosite.com/paeges/1` ( `/pages/`). How do I make it so they get re-directed to the 404 rather than the exception screen?...
How do I redirect a user to a custom 404 page in ASP.NET MVC instead of throwing an exception?
CC BY-SA 2.5
0
2008-08-21T13:46:58.563
2011-02-22T14:34:37.273
2011-02-22T14:34:37.273
16,587
2,285
[ "asp.net-mvc", "exception", "routes" ]
19,944
2
null
19,728
2
null
Depending on constraints like budget, etc, this sound like a perfect candidate for a data warehouse application. This would typically introduce a new server for use as a data warehouse. SQL Server 2005 supports a lot of this activity out of the box, further you might be able to utilize additional SQL Server services ...
null
CC BY-SA 2.5
null
2008-08-21T13:47:48.220
2008-08-21T13:47:48.220
null
null
1,875
null
19,903
2
null
19,893
5
null
Try Base64 encoding/decoding your binary data. Also look into CDATA sections
null
CC BY-SA 2.5
null
2008-08-21T13:37:52.580
2008-08-21T13:37:52.580
null
null
287
null
19,949
2
null
19,941
6
null
Take a look at [this page](http://richarddingwall.name/2008/08/09/three-common-aspnet-mvc-url-routing-issues/) for routing your 404-errors to a specified page.
null
CC BY-SA 2.5
null
2008-08-21T13:50:20.303
2008-08-21T13:50:20.303
null
null
2,257
null
19,943
2
null
19,654
0
null
I love Python and Django, and use both to develop the our core webapps. That said, it's hard to make a business case for switching at this point. Specifically: - - - Moreover, as other posters have mention, if the issue is more with spaghetti code than PHP itself, there are plenty of nice PHP frameworks that could ...
null
CC BY-SA 2.5
null
2008-08-21T13:47:40.170
2008-08-21T13:47:40.170
null
null
2,123
null
19,841
2
null
18,984
1
null
I would not do this for a couple of reasons. Design: A GUI and a CLI are two different interfaces used to access an underlying implementation. They are generally used for different purposes (GUI is for a live user, CLI is usually accessed by scripting) and can often have different requirements. Coupling the two tog...
null
CC BY-SA 2.5
null
2008-08-21T13:19:01.410
2008-08-21T13:19:01.410
null
null
2,284
null
19,950
2
null
11,194
20
null
I ended using an answer similar to Daren's, but with an IQueryable interface: ``` IQueryable<Log> matches = m_Locator.Logs; // Users filter if (usersFilter) matches = matches.Where(l => l.UserName == comboBoxUsers.Text); // Severity filter if (severityFilter) matches = matches.Where(l => l.Severity == com...
null
CC BY-SA 2.5
null
2008-08-21T13:50:32.143
2008-08-21T13:50:32.143
null
null
1,204
null
19,959
2
null
19,941
16
null
Just use a route: ``` // We couldn't find a route to handle the request. Show the 404 page. routes.MapRoute("Error", "{*url}", new { controller = "Error", action = "404" } ); ``` Since this will be a global handler, put it all the way at the bottom under the Default route.
null
CC BY-SA 2.5
null
2008-08-21T13:54:31.353
2008-08-21T13:54:31.353
null
null
1,117
null
19,954
2
null
19,772
3
null
If you want a more feature-rich UI for Powershell, try PowerGUI. [http://powergui.org/index.jspa](http://powergui.org/index.jspa)
null
CC BY-SA 2.5
null
2008-08-21T13:51:54.060
2008-08-21T13:51:54.060
null
null
1,219
null
19,840
2
null
19,766
2
null
Odds are good w/ Java that someone has already implemented the widget or utility you need. Part of the benefits of a large OSS community. No need to reinvent the wheel unless you really want to do it yourself. In this case it would be a good learning exercise in CellRenderers and Editors. My project has had great succ...
null
CC BY-SA 2.5
null
2008-08-21T13:18:40.130
2008-08-21T13:18:40.130
null
null
287
null
19,952
1
19,983
null
4
1,067
The RFC for a Java class is set of all methods that can be invoked in response to a message to an object of the class or by some method in the class. RFC = M + R where M = Number of methods in the class. R = Total number of other methods directly invoked from the M. Thinking C is the .class and J is the .java file o...
Algorithm to perform RFC calculation in Java
CC BY-SA 3.0
null
2008-08-21T13:50:35.997
2017-03-11T14:01:41.800
2017-05-23T12:31:55.937
-1
482
[ "java", "regex", "algorithm", "reflection" ]
19,953
1
null
null
0
338
When using Office Interop in C#, if you insert a chart object into a MS Word document, the Grap application loads up very briefly and then goes away. Is there a way to prevent this from happening? I have tried setting the Visible property of the application instance to false to no effect. EDIT: The Visible property do...
How do I stop MS Graph component popping up during Interop?
CC BY-SA 2.5
null
2008-08-21T13:51:33.623
2008-09-26T18:41:50.110
2008-09-26T18:41:50.110
2,134
2,285
[ "c#", "interop", "ms-office" ]
19,863
2
null
19,843
0
null
You probably cant do it. First of all if it should be possible you would need a tighter bound on T so the typechecker could be sure that all possible substitutions for T actually had a static method called TryParse.
null
CC BY-SA 2.5
null
2008-08-21T13:28:49.683
2008-08-21T13:28:49.683
null
null
86
null
19,956
1
23,022
null
2
388
I'm doing some funky authentication work (and yes, I know, open-id is awesome, but then again my open-id doesn't work right at this moment!). Stumbling across Windows CardSpace I was wondering if anyone has used this in a real product-system. If you have used it, what were the pros and cons for you? And how can i use ...
What to use Windows CardSpace for?
CC BY-SA 3.0
0
2008-08-21T13:53:35.880
2014-05-21T10:06:00.683
2014-05-21T10:06:00.683
3,611,289
436,255
[ "windows", "security", "authentication" ]
19,968
2
null
19,654
1
null
It's really all about schedules. To me the break should be with a specific project. If you decide your direction is Django then start new projects with that. Before you start a new project with a new language/framework, either make sure that you have scheduled time to get up to speed in this new direction, or get up...
null
CC BY-SA 2.5
null
2008-08-21T13:57:41.567
2008-08-21T13:57:41.567
null
null
791
null
19,963
1
1,729,083
null
18
8,005
If you have two versions of the same report (.rpt) and you want to establish what the exact differences are, what is the best way to go about this? I've seen some commercial tools to do this, but I'm not too interested in forking out cash for something that should be relatively straight forward. Can I hook into the Cry...
What's the best way of diffing Crystal Reports?
CC BY-SA 2.5
0
2008-08-21T13:56:06.903
2018-05-29T13:07:08.003
2008-08-21T14:07:38.950
1,030
1,030
[ "crystal-reports", "diff" ]
19,970
1
20,000
null
4
305
What is the best way to manage a list of windows (keeping them in order) to be able to promote the next window to the top-level when the current top-level window is closed. This is for a web application, so we're using jQuery Javascript. We'd talked through a few simplistic solutions, such as using an array and just t...
Best way to keep an ordered list of windows (from most-recently created to oldest)?
CC BY-SA 3.0
null
2008-08-21T13:58:25.697
2014-05-04T21:47:03.933
2014-05-04T21:47:03.933
1,537,726
2,286
[ "javascript" ]
19,966
2
null
19,941
1
null
Found this on the same site - [Strategies for Resource based 404s](http://richarddingwall.name/2008/08/17/strategies-for-resource-based-404-errors-in-aspnet-mvc/)
null
CC BY-SA 2.5
null
2008-08-21T13:56:59.897
2008-08-21T13:56:59.897
null
null
2,285
null
19,972
2
null
19,953
1
null
This is common behaviour for a lot of component hosted in an executable binary. The host application will startup and then do the job. I don't know if there is a surefire way to prevent that since you have no control over the component nor over the process until the application is started and is responding. A hack I t...
null
CC BY-SA 2.5
null
2008-08-21T13:58:47.723
2008-08-21T14:05:06.400
2008-08-21T14:05:06.400
42
42
null
19,974
2
null
19,963
1
null
One helpful technique is to output both versions of the report to plain text, then diff those outputs. You could write something using the crystal report component to describe every property of the report, like you described. Then you could output to text, and diff . I'm not aware of any open source tool that does...
null
CC BY-SA 2.5
null
2008-08-21T13:59:09.300
2008-08-21T15:09:51.283
2008-08-21T15:09:51.283
672
672
null
19,978
2
null
19,970
1
null
I don't really know javascript, but couldn't you create a stack of windows?
null
CC BY-SA 2.5
null
2008-08-21T14:00:33.477
2008-08-21T14:00:33.477
null
null
2,275
null
19,967
2
null
19,952
0
null
You should find your answer in the [Java language specification](http://java.sun.com/docs/books/jls/third_edition/html/j3TOC.html). You have forgot static method call, method call inside parameters...
null
CC BY-SA 2.5
null
2008-08-21T13:57:06.560
2008-08-21T13:57:06.560
null
null
1,730
null
19,995
1
20,004
null
138
76,756
Of course I am aware of Ajax, but the problem with Ajax is that the browser should poll the server frequently to find whether there is new data. This increases server load. Is there any better method (even using Ajax) other than polling the server frequently?
Is there some way to PUSH data from web server to browser?
CC BY-SA 2.5
0
2008-08-21T14:04:55.540
2016-08-06T23:08:01.137
2012-05-09T05:37:25.797
11,343
184
[ "ajax", "webserver", "comet" ]
19,988
1
20,029
null
0
706
I'm currently using the awesome attachment-fu plugin for a Rails app, but as a novice developer, I've never encountered a scenario like the one I've found myself in. Essentially, I'm using the attachment-fu plugin on two levels. 1. Is for user avatars in the user class. 2. Is to allow file attachments (PDFs, etc) in...
Being as DRY as possible in a Ruby on Rails App
CC BY-SA 3.0
0
2008-08-21T14:02:56.467
2017-12-13T18:16:12.133
2017-12-13T18:16:12.133
1,380,867
2,293
[ "ruby-on-rails", "ruby", "model-view-controller", "attachment-fu" ]
20,000
2
null
19,970
1
null
A stack if you want to just close the window on top. A queue if you also need to open windows at the end.
null
CC BY-SA 2.5
null
2008-08-21T14:06:11.747
2008-08-21T14:06:11.747
null
null
1,065
null
20,001
2
null
19,988
2
null
Is "outsourcing" avatar support entirely to [Gravatar](http://en.gravatar.com/) an option? There are some Rails plugins that will display avatars hosted by Gravatar. You might not need to re-invent the wheel there.
null
CC BY-SA 2.5
null
2008-08-21T14:06:14.040
2008-08-21T14:06:14.040
null
null
1,450
null
20,002
2
null
19,185
0
null
Thanks for the responses, I ended up going with the GetLastInputInfo function as it is pretty straight forward to implement in the application I'm working on.
null
CC BY-SA 2.5
null
2008-08-21T14:06:23.743
2008-08-21T14:06:23.743
null
null
1,185
null
19,973
2
null
19,952
0
null
Calling a method using reflection (the name of the method is in a string).
null
CC BY-SA 2.5
null
2008-08-21T13:59:09.283
2008-08-21T13:59:09.283
null
null
1,065
null
20,004
2
null
19,995
71
null
Yes, what you're looking for is COMET [http://en.wikipedia.org/wiki/Comet_(programming)](http://en.wikipedia.org/wiki/Comet_(programming)). Other good Google terms to search for are AJAX-push and reverse-ajax.
null
CC BY-SA 2.5
null
2008-08-21T14:07:00.340
2008-08-22T06:04:17.297
2008-08-22T06:04:17.297
1
35
null
19,998
2
null
19,952
0
null
Does M include calls to its own methods? Or calls to inner classes? For instance: ``` class J { a() { } b() { this.a(); } c() { jj.aa(); } d() { i.k(); } e() { this.f().a(); } f() { return this; } g() { i.m().n(); } class JJ { aa() { a(); } } } ``` What would the M value of this be? There's ...
null
CC BY-SA 2.5
null
2008-08-21T14:05:49.813
2008-08-21T14:05:49.813
null
null
1,409
null
20,003
1
20,682
null
15
4,056
I have a large application (~50 modules) using a structure similar to the following: - - - - - - - - - - - - - I would like to import the application to Maven and Subversion. After some research I found that two practical approaches exists for this. One is using a tree structure just as the previous one. The drawba...
Repository layout for large Maven projects
CC BY-SA 2.5
0
2008-08-21T14:06:44.850
2010-04-08T10:53:22.233
2008-08-23T20:08:27.320
1,190
686
[ "java", "svn", "maven-2" ]
20,014
2
null
19,995
1
null
Once a connection is opened to the server it can be kept open and the server can Push content a long while ago I did with using `multipart/x-mixed-replace` but this didn't work in IE. I think you can do clever stuff with polling that makes it work more like push by not sending content unchanged headers but leaving th...
null
CC BY-SA 2.5
null
2008-08-21T14:09:06.280
2008-08-21T14:09:06.280
null
null
269
null
20,011
2
null
19,995
10
null
Look into Comet (a spoof on the fact that Ajax is a cleaning agent and so is Comet) which is basically "reverse Ajax." Be aware that this requires a long-lived server connection for each user to receive notifications so be aware of the performance implications when writing your app. [http://en.wikipedia.org/wiki/Comet...
null
CC BY-SA 3.0
null
2008-08-21T14:08:12.880
2013-05-22T15:20:25.233
2013-05-22T15:20:25.233
392
392
null
20,010
2
null
19,843
3
null
Short answer, you can't. Long answer, you can cheat: ``` public class Example { internal static class Support { private delegate bool GenericParser<T>(string s, out T o); private static Dictionary<Type, object> parsers = MakeStandardParsers(); private static Dictionary<Type...
null
CC BY-SA 2.5
null
2008-08-21T14:08:12.337
2008-08-21T14:08:12.337
null
null
2,283
null
19,939
2
null
19,893
217
null
XML is so versatile... ``` <DATA> <BINARY> <BIT index="0">0</BIT> <BIT index="1">0</BIT> <BIT index="2">1</BIT> ... <BIT index="n">1</BIT> </BINARY> </DATA> ``` XML is like violence - If it doesn't solve your problem, you're not using enough of it. EDIT: BTW: Base64 + CDATA is probably the ...
null
CC BY-SA 2.5
null
2008-08-21T13:46:32.620
2008-08-21T14:18:17.147
2008-08-21T14:18:17.147
1,870
1,870
null
20,015
2
null
19,995
2
null
There are other methods. Not sure if they are "better" in your situation. You could have a Java applet that connects to the server on page load and waits for stuff to be sent by the server. It would be a quite a bit slower on start-up, but would allow the browser to receive data from the server on an infrequent basi...
null
CC BY-SA 2.5
null
2008-08-21T14:09:08.370
2008-08-21T14:09:08.370
null
null
1,862
null
19,983
2
null
19,952
2
null
You could use the [Byte Code Engineering Library](http://jakarta.apache.org/bcel/index.html) with binaries. You can use a [DescendingVisitor](http://jakarta.apache.org/bcel/apidocs/org/apache/bcel/classfile/DescendingVisitor.html) to visit a class' members and references. I've used it to [find class dependencies](http:...
null
CC BY-SA 2.5
null
2008-08-21T14:01:58.247
2008-08-21T14:01:58.247
null
null
304
null
20,022
2
null
19,995
0
null
You can also look into [Java Pushlets](http://www.pushlets.com/) if you are using jsp pages.
null
CC BY-SA 2.5
null
2008-08-21T14:10:33.220
2008-08-21T14:18:00.940
2008-08-21T14:18:00.940
75
75
null
20,029
2
null
19,988
1
null
I would lean towards using a parent class, with subclassing for the different ways you intend to actually use the attachments in your application. It may not be the DRYest solution available, however, it lends itself to a logical pattern rather well.
null
CC BY-SA 2.5
null
2008-08-21T14:12:05.540
2008-08-21T14:12:05.540
null
null
2,286
null
19,982
2
null
19,843
1
null
The only way to do exactly what you're looking for would be to use reflection to check if the method exists for T. Another option is to ensure that the object you send in is a convertible object by restraining the type to IConvertible (all primitive types implement IConvertible). This would allow you to convert your p...
null
CC BY-SA 2.5
null
2008-08-21T14:01:57.110
2008-08-21T14:01:57.110
null
null
392
null
20,040
1
20,058
null
3
2,662
Thinking about getting into .net technology project management I've had plenty of experience with PHP projects: I'm aware of most of the existing frameworks and libraries, and I've written specs and case studies based on this knowledge. What should I know about .net? Which top resources would you recommend me to know...
What are the most important things to learn about .net as a Project Manager?
CC BY-SA 2.5
0
2008-08-21T14:14:53.287
2009-02-24T13:14:23.063
2009-02-24T13:14:23.063
1,011
1,011
[ ".net", "project-management" ]
20,037
2
null
17,911
0
null
If you could post some more code we might be able to find the issue. Another thing to test (besides tracing `bytesTotal`) is to trace the `data` property of the loader in the `Event.COMPLETE` handler, just to see if the XML data was actually loaded correctly, for example check that there is a `</link>` there.
null
CC BY-SA 2.5
null
2008-08-21T14:13:37.923
2008-08-21T14:13:37.923
null
null
1,109
null
20,052
2
null
20,021
2
null
Last time I checked (version 0.97), syncdb will be able to add tables to sync your DB schema with your models.py file, but it cannot: - - It might be possible though to write a Django script to make the migration by playing with the two different [managers](https://docs.djangoproject.com/en/dev/topics/db/models/), b...
null
CC BY-SA 3.0
null
2008-08-21T14:21:19.293
2013-07-23T15:19:07.270
2013-07-23T15:19:07.270
1,011,749
446,497
null
20,053
2
null
19,843
1
null
Ok guys: Thanks for all the fish. Now with your answers and my research (especially the article on [limiting generic types to primitives](https://stackoverflow.com/questions/8941/generic-type-checking)) I will present you my solution. ``` Class a<T>{ private void checkWetherTypeIsOK() { if (T is int ||...
null
CC BY-SA 2.5
null
2008-08-21T14:21:55.143
2008-08-21T14:21:55.143
2017-05-23T12:33:45.557
-1
2,275
null
20,034
1
485,304
null
26
4,943
[Project Darkstar](http://en.wikipedia.org/wiki/Project_Darkstar) was the topic of the monthly [JavaSIG](http://www.javasig.com/meeting/home.xhtml) meeting down at the Google offices in NYC last night. For those that don't know (probably everyone), Project Darkstar is a framework for massively multiplayer online games...
Is Project Darkstar Realistic?
CC BY-SA 3.0
0
2008-08-21T14:13:11.327
2013-11-26T04:44:10.260
2013-11-26T04:44:10.260
1,102,512
1,471
[ "java", "concurrency", "distributed" ]