PostId
int64
4
11.8M
PostCreationDate
stringlengths
19
19
OwnerUserId
int64
1
1.57M
OwnerCreationDate
stringlengths
10
19
ReputationAtPostCreation
int64
-55
461k
OwnerUndeletedAnswerCountAtPostTime
int64
0
21.5k
Title
stringlengths
3
250
BodyMarkdown
stringlengths
5
30k
Tag1
stringlengths
1
25
Tag2
stringlengths
1
25
Tag3
stringlengths
1
25
Tag4
stringlengths
1
25
Tag5
stringlengths
1
25
PostClosedDate
stringlengths
19
19
OpenStatus
stringclasses
5 values
unified_texts
stringlengths
32
30.1k
OpenStatus_id
int64
0
4
19,772
08/21/2008 12:53:46
1,490
08/15/2008 21:35:24
21
12
CMD.exe replacement
Does anyone know of a good Command Prompt replacement? I've tried bash/Cygwin, but that does not really meet my needs at work because it's too heavy. I'd like a function-for-function identical wrapper on cmd.exe, but with highlighting, intellisense, and (critically) a tabbed interface. Powershell is okay, but the interface is still lacking.
command-line
terminal
null
null
null
null
open
CMD.exe replacement === Does anyone know of a good Command Prompt replacement? I've tried bash/Cygwin, but that does not really meet my needs at work because it's too heavy. I'd like a function-for-function identical wrapper on cmd.exe, but with highlighting, intellisense, and (critically) a tabbed interface. Powershell is okay, but the interface is still lacking.
0
19,773
08/21/2008 12:54:18
1,100
08/12/2008 11:58:29
38
4
Huge Web App With Memory Leak in IE 6
I have a huge web app that is having issues with memory leak in IE 6. Fixing a memory leak in a 5 line code sample that demonstrates the problem is easy. But if I have a very huge application, where should a start from?
memory
internet-explorer-6
leak
null
null
null
open
Huge Web App With Memory Leak in IE 6 === I have a huge web app that is having issues with memory leak in IE 6. Fixing a memory leak in a 5 line code sample that demonstrates the problem is easy. But if I have a very huge application, where should a start from?
0
19,786
08/21/2008 12:59:45
1,075
08/12/2008 10:13:30
592
47
Local Currency String conversion VB6
I am maintaining an app for a client that is used in two locations. One in England and one in Poland. The database is stored in England and uses the format £1000.00 for currency, but the information is being gathered locally in Poland where 1000,00 is the format. My question is, in VB6 is there a function that takes a currency string in a local format and converts to another, or will I just have to parse the string and replace , or . ? BTW I have looked at CCur, but not sure if that will do what I want.
vb6
localization
null
null
null
null
open
Local Currency String conversion VB6 === I am maintaining an app for a client that is used in two locations. One in England and one in Poland. The database is stored in England and uses the format £1000.00 for currency, but the information is being gathered locally in Poland where 1000,00 is the format. My question is, in VB6 is there a function that takes a currency string in a local format and converts to another, or will I just have to parse the string and replace , or . ? BTW I have looked at CCur, but not sure if that will do what I want.
0
19,787
08/21/2008 12:59:53
277
08/04/2008 10:55:22
200
7
How Do I Find a File in a Subversion Repository History?
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 file history at each revision would work, as I could just grep the output. I have looked through the manual but could not see a good way to do this. The logs for each commit are descriptive, so I cannot just look through the log messages to see what modifications were done, I presume subversion does have a way of retrieving this?
subversion
repository
administration
null
null
null
open
How Do I Find a File in a Subversion Repository History? === 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 file history at each revision would work, as I could just grep the output. I have looked through the manual but could not see a good way to do this. The logs for each commit are descriptive, so I cannot just look through the log messages to see what modifications were done, I presume subversion does have a way of retrieving this?
0
19,790
08/21/2008 13:00:56
1,721
08/18/2008 09:58:47
13
2
Display rows in multiple columns in Asp.net Gridview
By default each row of a Gridview maps to each row in a datatable or dataset attached to its datasource. But what if I want to display these rows in multiple columns. For example if it has 10 rows, 5 rows each should be displayed in 2 columns side by side. Is that possible?
asp.net
gridview
null
null
null
null
open
Display rows in multiple columns in Asp.net Gridview === By default each row of a Gridview maps to each row in a datatable or dataset attached to its datasource. But what if I want to display these rows in multiple columns. For example if it has 10 rows, 5 rows each should be displayed in 2 columns side by side. Is that possible?
0
19,803
08/21/2008 13:05:21
91
08/01/2008 17:55:22
5,769
277
Profiling/Optimizing (Sharepoint 2007) Web Parts
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 good tools or practices for profiling and optimizing web parts?
asp.net
sharepoint
null
null
null
null
open
Profiling/Optimizing (Sharepoint 2007) Web Parts === 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 good tools or practices for profiling and optimizing web parts?
0
19,843
08/21/2008 13:20:05
2,275
08/21/2008 12:44:52
1
0
Generics in c# & accessing the static members of T
My question concerns c# and how to access Static memebers ... Well I don't really know how to explain it (wich 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 T.TryParse(Parameter1); //my problem is that it does not work ... I get an error. //just to explain: if I declare test<int> (with type Integer) //I want my sample code to call int.TryParse(). If it were String //it should have been String.TryParse() } } So thank you guys for your answers (By the way the question is: how would I solve this problem without getting an error). This probably quite an easy question for you! Thanks, Niklas
c#
generics
static
method
access
null
open
Generics in c# & accessing the static members of T === My question concerns c# and how to access Static memebers ... Well I don't really know how to explain it (wich 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 T.TryParse(Parameter1); //my problem is that it does not work ... I get an error. //just to explain: if I declare test<int> (with type Integer) //I want my sample code to call int.TryParse(). If it were String //it should have been String.TryParse() } } So thank you guys for your answers (By the way the question is: how would I solve this problem without getting an error). This probably quite an easy question for you! Thanks, Niklas
0
19,852
08/21/2008 13:23:09
2,084
08/20/2008 10:39:15
443
18
Maximum length of a MIME Content-Type header field?
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?
email
mime
null
null
null
null
open
Maximum length of a MIME Content-Type header field? === 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?
0
19,876
08/21/2008 13:32:42
1,753
08/18/2008 12:42:26
11
1
e-Learning/Online courses recommendations
Can anyone recommend some good e-learning courses? I have a professional development allotment to spend before the end of the year. Any online access to conferences? My primary job is in ASP.NET and MOSS, but I would be interested in branching out a bit.
training
e-learning
null
null
null
null
open
e-Learning/Online courses recommendations === Can anyone recommend some good e-learning courses? I have a professional development allotment to spend before the end of the year. Any online access to conferences? My primary job is in ASP.NET and MOSS, but I would be interested in branching out a bit.
0
19,883
08/21/2008 13:34:43
287
08/04/2008 12:43:38
130
14
Is there a bug/issue tracking system which integrates with Mercurial?
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.
mercurial
integration
bugtracking
null
null
null
open
Is there a bug/issue tracking system which integrates with Mercurial? === 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.
0
19,893
08/21/2008 13:35:46
1,288
08/14/2008 12:14:17
93
10
How do you embed binary data in XML?
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 this?
java
xml
null
null
null
null
open
How do you embed binary data in XML? === 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 this?
0
19,933
08/21/2008 13:44:48
2,260
08/21/2008 11:39:22
13
1
How to copy a file in C#
I want to copy a file from A to B in C#. How do I do that?
c#
.net
null
null
null
null
open
How to copy a file in C# === I want to copy a file from A to B in C#. How do I do that?
0
19,941
08/21/2008 13:46:58
2,285
08/21/2008 13:36:53
1
1
ASP.NET MVC Catch Exception when non-existant controller is requested
I'm very new to MVC and I want to be able to capture the exception that is thrown when a user requests a non-existant controller and re-direct it to a sweet 404 page. How can I do this? For example, the user requests http://www.nosite.com/paeges/1 (*should be/pages/*) they get re-directed to the 404 rather than the nasty exception screen of death?
asp.net-mvc
null
null
null
null
null
open
ASP.NET MVC Catch Exception when non-existant controller is requested === I'm very new to MVC and I want to be able to capture the exception that is thrown when a user requests a non-existant controller and re-direct it to a sweet 404 page. How can I do this? For example, the user requests http://www.nosite.com/paeges/1 (*should be/pages/*) they get re-directed to the 404 rather than the nasty exception screen of death?
0
19,952
08/21/2008 13:50:35
482
08/06/2008 08:54:09
38
9
RFC calculation in Java need help with algorithm
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 of which we need to calculate RFC. <pre> class J{ a(){} b(){} c(){ e1.e(); e1.f(); e1.g(); } h(){ i.k(); i.j(); } m(){} n(){ i.o(); i.p(); i.p(); i.p(); } } </pre> here M=6 and R=9 (Dont worry about call inside a loop. Its considered as a single call) Calculating M is easy. Load C using classloader and use reflection to get the count of methods. Calculating R is not direct. We need to count the number of method calls from the class. First level only. For calculating R i must use regex. Usually format would be ( calls with out using. are not counted) <pre> [variable_name].[method_name]([zero or more parameters]); </pre> or <pre> [variable_name].[method_name]([zero or more parameters]) </pre> with out semicolon when call return is directly becomes parameter to another method. or <pre> [variable_name].[method_name]([zero or more parameters]).method2(); </pre> this becomes two method calls What other pattern of method call can u think of? Is there any other way other than using RegEx that can be used to calculate R.
java
regex
algorithm
reflection
regularexpression
null
open
RFC calculation in Java need help with algorithm === 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 of which we need to calculate RFC. <pre> class J{ a(){} b(){} c(){ e1.e(); e1.f(); e1.g(); } h(){ i.k(); i.j(); } m(){} n(){ i.o(); i.p(); i.p(); i.p(); } } </pre> here M=6 and R=9 (Dont worry about call inside a loop. Its considered as a single call) Calculating M is easy. Load C using classloader and use reflection to get the count of methods. Calculating R is not direct. We need to count the number of method calls from the class. First level only. For calculating R i must use regex. Usually format would be ( calls with out using. are not counted) <pre> [variable_name].[method_name]([zero or more parameters]); </pre> or <pre> [variable_name].[method_name]([zero or more parameters]) </pre> with out semicolon when call return is directly becomes parameter to another method. or <pre> [variable_name].[method_name]([zero or more parameters]).method2(); </pre> this becomes two method calls What other pattern of method call can u think of? Is there any other way other than using RegEx that can be used to calculate R.
0
19,953
08/21/2008 13:51:33
2,285
08/21/2008 13:36:53
1
1
How do I stop MS Graph component popping up during Interop?
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.
c#
interop
microsoftoffice
null
null
null
open
How do I stop MS Graph component popping up during Interop? === 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.
0
19,956
08/21/2008 13:53:35
436,255
08/18/2008 15:32:28
21
2
What have you used Windows CardSpace for, if anything
I'm doing some funky authentication work (and yes, I know, open id is awesome, but then again myopenid doesn't work right at this moment!). Stumbling across Windows CardSpace I was wondering if anyone has used it in a real production system. If you have, what were the pros and cons for you?
windows
security
authentication
null
null
null
open
What have you used Windows CardSpace for, if anything === I'm doing some funky authentication work (and yes, I know, open id is awesome, but then again myopenid doesn't work right at this moment!). Stumbling across Windows CardSpace I was wondering if anyone has used it in a real production system. If you have, what were the pros and cons for you?
0
19,958
08/21/2008 13:54:30
572
08/06/2008 20:56:54
926
80
What free and/or open source tools are available for project and process management?
I'm currently looking at the following stack: - Apache Tomcat and Apache HTTP Server for web interfaces - [Chandler][1] for time tracking and coordination and [Chandler Server][2] for bringing everything together. - [Trac][3] for bug tracking and user feedback management (eg - dumping user feedback into the wiki, adding bugs, SVN tie ins) - [Subversion][4] for version control - [TortoiseSVN][5] for access to subversion repositories - Documentation on proper use of all of these tools (what gets checked in where, etc) [1]: http://chandlerproject.org/ [2]: http://chandlerproject.org/Developers/DownloadChandlerServer [3]: http://trac.edgewall.org/ [4]: http://subversion.tigris.org/ [5]: http://tortoisesvn.tigris.org/
tools
project-management
process
project
process-management
null
open
What free and/or open source tools are available for project and process management? === I'm currently looking at the following stack: - Apache Tomcat and Apache HTTP Server for web interfaces - [Chandler][1] for time tracking and coordination and [Chandler Server][2] for bringing everything together. - [Trac][3] for bug tracking and user feedback management (eg - dumping user feedback into the wiki, adding bugs, SVN tie ins) - [Subversion][4] for version control - [TortoiseSVN][5] for access to subversion repositories - Documentation on proper use of all of these tools (what gets checked in where, etc) [1]: http://chandlerproject.org/ [2]: http://chandlerproject.org/Developers/DownloadChandlerServer [3]: http://trac.edgewall.org/ [4]: http://subversion.tigris.org/ [5]: http://tortoisesvn.tigris.org/
0
19,963
08/21/2008 13:56:06
1,030
08/11/2008 15:40:52
327
22
What's the best way of "diff'ing" Crystal Reports?
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 Crystal API and simply list all of the properties of every field or something? Please someone tell me that there's an Open Source project somewhere that does this... @:-)
crystal-reports
diff
null
null
null
null
open
What's the best way of "diff'ing" Crystal Reports? === 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 Crystal API and simply list all of the properties of every field or something? Please someone tell me that there's an Open Source project somewhere that does this... @:-)
0
19,970
08/21/2008 13:58:25
2,286
08/21/2008 13:42:59
1
1
Best way to keep an ordered list of windows (from most-recently created to oldest)?
A friend had phoned me the other day asking for the best way to manage a list of windows (keeping them in order) so he can 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 treating [0] index as the top-most window. I'm wondering if there's any potentially more efficient or useful alternative to what we had brainstormed.
javascript
null
null
null
null
null
open
Best way to keep an ordered list of windows (from most-recently created to oldest)? === A friend had phoned me the other day asking for the best way to manage a list of windows (keeping them in order) so he can 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 treating [0] index as the top-most window. I'm wondering if there's any potentially more efficient or useful alternative to what we had brainstormed.
0
19,988
08/21/2008 14:02:56
2,293
08/21/2008 14:02:56
1
0
Being as DRY as possible in a Ruby on Rails App
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. The first is for user avatars in the user class. The second is to allow file attachments (PDFs, etc) in a messaging system. My question is what the best use practice would be in these situations to remain DRY, clear, and consistent. Clearly it would make no sense to define and execute the plugin in both classes, but there's something deeply strange to me (possibly unfounded) about just going ahead and setting it all up in the godly Application class. Is there something in between, or is the parent class the way to go? Thanks!
ruby
ruby-on-rails
mvc
attachment-fu
null
null
open
Being as DRY as possible in a Ruby on Rails App === 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. The first is for user avatars in the user class. The second is to allow file attachments (PDFs, etc) in a messaging system. My question is what the best use practice would be in these situations to remain DRY, clear, and consistent. Clearly it would make no sense to define and execute the plugin in both classes, but there's something deeply strange to me (possibly unfounded) about just going ahead and setting it all up in the godly Application class. Is there something in between, or is the parent class the way to go? Thanks!
0
19,995
08/21/2008 14:04:55
184
08/03/2008 05:34:19
600
7
Is there some way to PUSH data from web server to browser?
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?
internet
browser
server
webserver
null
null
open
Is there some way to PUSH data from web server to browser? === 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?
0
20,003
08/21/2008 14:06:44
686
08/07/2008 19:26:04
1
1
Repository layout for large Maven projects
I have a large application (~50 modules) using a structure similar to the following: * Application * Communication modules * Color communication module * SSN communication module * etc. communication module * Router module * Service modules * Voting service module * Web interface submodule for voting * Vote collector submodule for voting * etc. for voting * Quiz service module * etc. module 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 drawback of this structure is that you need a ton of tweaking/hacks to get the multi-module reporting work well with Maven. Another downside is that in Subversion the standard trunk/tags/branches approach add even more complexity to the repository. The other approach uses a flat structure, where there are only one parent project and all the modules, submodules and parts-of-the-submodules are a direct child of the parent project. This approach works well for reporting and is easier in Subversion, however I feel I lose a bit of the structure this way. Which way would you choose in the long term and why?
java
subversion
maven-2
null
null
null
open
Repository layout for large Maven projects === I have a large application (~50 modules) using a structure similar to the following: * Application * Communication modules * Color communication module * SSN communication module * etc. communication module * Router module * Service modules * Voting service module * Web interface submodule for voting * Vote collector submodule for voting * etc. for voting * Quiz service module * etc. module 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 drawback of this structure is that you need a ton of tweaking/hacks to get the multi-module reporting work well with Maven. Another downside is that in Subversion the standard trunk/tags/branches approach add even more complexity to the repository. The other approach uses a flat structure, where there are only one parent project and all the modules, submodules and parts-of-the-submodules are a direct child of the parent project. This approach works well for reporting and is easier in Subversion, however I feel I lose a bit of the structure this way. Which way would you choose in the long term and why?
0
20,021
08/21/2008 14:10:25
2,077
08/20/2008 07:26:21
41
1
Version, track, automate DB schema changes with django
I'm currently looking at the Python framework Django for future db-based web apps as well as for a port of some apps currently written in PHP. One of the nastier issues during my last years was keeping track of database schema changes and deploying these changes to productive systems. I haven't dared asking for being able to undo them too, but of course for testing and debugging that would be a great feature. From other questions here (such as [this one][1] or [this one][2]), I can see that I'm not alone and that this is not a trivial problem. Also, I found many inspirations in the answers there. Now, as Django seems to be very powerful, does it have any tools to help with the above? Maybe it's even in their docs and I missed it? The "syncdb" command that creates tables from your models seems promising but is it that powerful? [1]: http://stackoverflow.com/questions/1607/mechanisms-for-tracking-db-schema-changes [2]: http://stackoverflow.com/questions/173/how-do-i-version-my-ms-sql-database-in-svn
django
db
subversion
bestpractices
null
null
open
Version, track, automate DB schema changes with django === I'm currently looking at the Python framework Django for future db-based web apps as well as for a port of some apps currently written in PHP. One of the nastier issues during my last years was keeping track of database schema changes and deploying these changes to productive systems. I haven't dared asking for being able to undo them too, but of course for testing and debugging that would be a great feature. From other questions here (such as [this one][1] or [this one][2]), I can see that I'm not alone and that this is not a trivial problem. Also, I found many inspirations in the answers there. Now, as Django seems to be very powerful, does it have any tools to help with the above? Maybe it's even in their docs and I missed it? The "syncdb" command that creates tables from your models seems promising but is it that powerful? [1]: http://stackoverflow.com/questions/1607/mechanisms-for-tracking-db-schema-changes [2]: http://stackoverflow.com/questions/173/how-do-i-version-my-ms-sql-database-in-svn
0
20,034
08/21/2008 14:13:11
1,471
08/15/2008 18:26:14
49
9
Is Project Darkstar Realistic?
[Project Darkstar][1] was the topic of the monthly [JavaSIG][2] 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 that attempts to take care of all of the "hard stuff." The basic idea is that you write your game server logic in such a way that all operations are broken up into tiny tasks. You pass these tasks to the Project Darkstar framework which handles distributing them to a specific node in the cluster, any concurrency issues, and finally persisting the data. Apparently doing this kind of thing is a much different problem for video games than it is for enterprise applications. Jim Waldo, who gave the lecture, claims that MMO games have a DB read/write ration of 50/50, whereas enterprise apps are more like 90% read, 10% write. He also claims that most existing MMOs keep everything in memory exlcusively, and only dump to a DB every 6 hours of so. This means if a server goes down, you would lose all of the work since the last DB dump. Now, the project itself sounds really cool, but I don't think the industry will accept it. First, you have to write your server code in Java. The client code can be written in anything (Jim claims ActionScript 3 is the most popular, follow by C++), but the server stuff has to be Java. Sounds good to me, but I really get the impression that everyone in the games industry hates Java. Second, unlike other industries where developers prefer to use existing frameworks and libraries, the guys in the games industry seem to like to write everything themselves. Not only that, they like to rewrite everything for every new game they produce. Things are starting to change where developers are using Havok for physics, Unreal Engine 3 as their platform, etc., but for the most part it looks like everything is still proprietary. So, are the guys at Project Darkstar just wasting their time? Can a general framework like this really work for complex games with the performance that is required? Even if it does work, are game companies willing to use it? [1]: http://www.projectdarkstar.com/ [2]: http://www.javasig.com/meeting/home.xhtml
java
concurrency
distributed
null
null
null
open
Is Project Darkstar Realistic? === [Project Darkstar][1] was the topic of the monthly [JavaSIG][2] 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 that attempts to take care of all of the "hard stuff." The basic idea is that you write your game server logic in such a way that all operations are broken up into tiny tasks. You pass these tasks to the Project Darkstar framework which handles distributing them to a specific node in the cluster, any concurrency issues, and finally persisting the data. Apparently doing this kind of thing is a much different problem for video games than it is for enterprise applications. Jim Waldo, who gave the lecture, claims that MMO games have a DB read/write ration of 50/50, whereas enterprise apps are more like 90% read, 10% write. He also claims that most existing MMOs keep everything in memory exlcusively, and only dump to a DB every 6 hours of so. This means if a server goes down, you would lose all of the work since the last DB dump. Now, the project itself sounds really cool, but I don't think the industry will accept it. First, you have to write your server code in Java. The client code can be written in anything (Jim claims ActionScript 3 is the most popular, follow by C++), but the server stuff has to be Java. Sounds good to me, but I really get the impression that everyone in the games industry hates Java. Second, unlike other industries where developers prefer to use existing frameworks and libraries, the guys in the games industry seem to like to write everything themselves. Not only that, they like to rewrite everything for every new game they produce. Things are starting to change where developers are using Havok for physics, Unreal Engine 3 as their platform, etc., but for the most part it looks like everything is still proprietary. So, are the guys at Project Darkstar just wasting their time? Can a general framework like this really work for complex games with the performance that is required? Even if it does work, are game companies willing to use it? [1]: http://www.projectdarkstar.com/ [2]: http://www.javasig.com/meeting/home.xhtml
0
20,040
08/21/2008 14:14:53
1,011
08/11/2008 13:05:01
21
2
What are the most important things to learn about .net as a Project Manager?
I'm about to take on a job as Project Manager for a company that mainly uses .net technology for building websites and webservices. 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 so I can rapidly learn and later stay up to date on the technology?
.net
project-management
null
null
null
null
open
What are the most important things to learn about .net as a Project Manager? === I'm about to take on a job as Project Manager for a company that mainly uses .net technology for building websites and webservices. 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 so I can rapidly learn and later stay up to date on the technology?
0
20,047
08/21/2008 14:18:41
1
07/31/2008 14:22:31
4,921
113
Diagnosing Deadlocks in SQL Server 2005
We're seeing some pernicious, but rare, deadlock conditions in the Stack Overflow SQL Server 2005 database. I attached the profiler, set up a trace profile using [this excellent article on troubleshooting deadlocks](http://www.simple-talk.com/sql/learn-sql-server/how-to-track-down-deadlocks-using-sql-server-2005-profiler/), and captured a bunch of examples. The weird thing is that **the deadlocking write is *always* the same**: UPDATE [dbo].[Posts] SET [AnswerCount] = @p1, [LastActivityDate] = @p2, [LastActivityUserId] = @p3 WHERE [Id] = @p0 The other deadlocking statement varies, but it's usually some kind of trivial, simple **read** of the posts table. This one always gets killed in the deadlock. To be perfectly clear, we are not seeing write / write deadlocks, but read / write. We have a mixture of LINQ and parameterized SQL queries at the moment. We have added `with (nolock)` to all the SQL queries. This may have helped some. We also had a single (very) poorly-written badge query that I fixed yesterday, which was taking upwards of 20 seconds to run every time, and was running every minute on top of that. I was hoping this was the source of some of the locking problems! Unfortunately, I got another deadlock error about 2 hours ago. Same exact symptoms, same exact culprit write. The truly strange thing is that the locking write SQL statement you see above is part of a very specific code path. It's *only* executed when a new answer is added to a question -- it updates the parent question with the new answer count and last date/user. This is, obviously, not that common relative to the massive number of reads we are doing! As far as I can tell, we're not doing huge numbers of writes anywhere in the app. I realize that NOLOCK is sort of a giant hammer, but most of the queries we run here don't need to be that accurate. Will you care if your user profile is a few seconds out of date? Using NOLOCK with Linq is a bit more difficult as [Scott Hanselman discusses here](http://www.hanselman.com/blog/GettingLINQToSQLAndLINQToEntitiesToUseNOLOCK.aspx). We are flirting with the idea of using SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED on the base database context so that all our LINQ queries have this set. Without that, we'd have to wrap every LINQ call we make (well, the simple reading ones, which is the vast majority of them) in a 3-4 line transaction code block, which is ugly. I guess I'm a little frustrated that trivial reads in SQL 2005 can deadlock on writes. I could see write/write deadlocks being a huge issue, but *reads?* We're not running a banking site here, we don't need perfect accuracy every time. Ideas? Thoughts?
sql2005
deadlock
mssql
null
null
null
open
Diagnosing Deadlocks in SQL Server 2005 === We're seeing some pernicious, but rare, deadlock conditions in the Stack Overflow SQL Server 2005 database. I attached the profiler, set up a trace profile using [this excellent article on troubleshooting deadlocks](http://www.simple-talk.com/sql/learn-sql-server/how-to-track-down-deadlocks-using-sql-server-2005-profiler/), and captured a bunch of examples. The weird thing is that **the deadlocking write is *always* the same**: UPDATE [dbo].[Posts] SET [AnswerCount] = @p1, [LastActivityDate] = @p2, [LastActivityUserId] = @p3 WHERE [Id] = @p0 The other deadlocking statement varies, but it's usually some kind of trivial, simple **read** of the posts table. This one always gets killed in the deadlock. To be perfectly clear, we are not seeing write / write deadlocks, but read / write. We have a mixture of LINQ and parameterized SQL queries at the moment. We have added `with (nolock)` to all the SQL queries. This may have helped some. We also had a single (very) poorly-written badge query that I fixed yesterday, which was taking upwards of 20 seconds to run every time, and was running every minute on top of that. I was hoping this was the source of some of the locking problems! Unfortunately, I got another deadlock error about 2 hours ago. Same exact symptoms, same exact culprit write. The truly strange thing is that the locking write SQL statement you see above is part of a very specific code path. It's *only* executed when a new answer is added to a question -- it updates the parent question with the new answer count and last date/user. This is, obviously, not that common relative to the massive number of reads we are doing! As far as I can tell, we're not doing huge numbers of writes anywhere in the app. I realize that NOLOCK is sort of a giant hammer, but most of the queries we run here don't need to be that accurate. Will you care if your user profile is a few seconds out of date? Using NOLOCK with Linq is a bit more difficult as [Scott Hanselman discusses here](http://www.hanselman.com/blog/GettingLINQToSQLAndLINQToEntitiesToUseNOLOCK.aspx). We are flirting with the idea of using SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED on the base database context so that all our LINQ queries have this set. Without that, we'd have to wrap every LINQ call we make (well, the simple reading ones, which is the vast majority of them) in a 3-4 line transaction code block, which is ugly. I guess I'm a little frustrated that trivial reads in SQL 2005 can deadlock on writes. I could see write/write deadlocks being a huge issue, but *reads?* We're not running a banking site here, we don't need perfect accuracy every time. Ideas? Thoughts?
0
20,054
08/21/2008 14:21:55
1,190
08/13/2008 12:15:38
506
42
Any tips on getting Rails to run with an Access back-end?
I shudder to ask, but my client might offer no other SQL (or SQL-like) solution. I know Access has some SQL hooks; are they enough for basic ActiveRecord?
ruby
rails
ror
activerecord
microsoftaccess
null
open
Any tips on getting Rails to run with an Access back-end? === I shudder to ask, but my client might offer no other SQL (or SQL-like) solution. I know Access has some SQL hooks; are they enough for basic ActiveRecord?
0
20,059
08/21/2008 14:23:53
269
08/04/2008 10:13:44
962
79
Suggestions on starting a child programming.
What languages and tools do you consider a youngster starting out in programming should use in the modern era? Lot's of us started with proprietary Basics and they didn't do all of us long term harm :) but given the experiences you have had since then and your knowledge of the domain now are there better options? There are related queries to this one such as "[Best ways to teach a beginner to program?][1]" and "[One piece of advice][2]" about starting adults programming both of which I submitted answers to but children might require a different tool. Disclosure: it's bloody hard choosing a 'correct' answer to a question like this so who ever has the best score in a few days will get the 'best answer' mark from me based on the communities choice. [1]: http://stackoverflow.com/questions/3088/best-ways-to-teach-a-beginner-to-program [2]: http://stackoverflow.com/questions/3553/one-piece-of-advice
language-agnostic
language
teaching
children
null
03/04/2011 02:27:51
not constructive
Suggestions on starting a child programming. === What languages and tools do you consider a youngster starting out in programming should use in the modern era? Lot's of us started with proprietary Basics and they didn't do all of us long term harm :) but given the experiences you have had since then and your knowledge of the domain now are there better options? There are related queries to this one such as "[Best ways to teach a beginner to program?][1]" and "[One piece of advice][2]" about starting adults programming both of which I submitted answers to but children might require a different tool. Disclosure: it's bloody hard choosing a 'correct' answer to a question like this so who ever has the best score in a few days will get the 'best answer' mark from me based on the communities choice. [1]: http://stackoverflow.com/questions/3088/best-ways-to-teach-a-beginner-to-program [2]: http://stackoverflow.com/questions/3553/one-piece-of-advice
4
20,061
08/21/2008 14:24:25
271
08/04/2008 10:25:01
294
19
Store data from a C# application
I've recently taken up learning some C# and wrote a Yahtzee clone. My next step (now that the game logic is in place and functioning correctly) is to integrate some method of keeping stats across all the games played. My question is this, how should I go about storing this information? My first thought would be to use a database and I have a feeling that's the answer I'll get... if that's the case, can you point me to a good resource for creating and accessing a database from a C# application?
c#
.net
null
null
null
null
open
Store data from a C# application === I've recently taken up learning some C# and wrote a Yahtzee clone. My next step (now that the game logic is in place and functioning correctly) is to integrate some method of keeping stats across all the games played. My question is this, how should I go about storing this information? My first thought would be to use a database and I have a feeling that's the answer I'll get... if that's the case, can you point me to a good resource for creating and accessing a database from a C# application?
0
20,063
08/21/2008 14:24:41
1,335
08/14/2008 15:04:55
1
0
What's the best way to grab/parse command line arguments passed to a Python script?
The title says it all...what's the **easiest, tersest, and most flexible** method or library for parsing Python command line arguments?
python
null
null
null
null
null
open
What's the best way to grab/parse command line arguments passed to a Python script? === The title says it all...what's the **easiest, tersest, and most flexible** method or library for parsing Python command line arguments?
0
20,081
08/21/2008 14:29:48
726
08/08/2008 12:04:53
255
14
Best way to encapsulate complex Oracle PL/SQL cursor logic as a view?
I've written PL/SQL code to denormalize a table into a much-easer-to-query form. The code uses a temporary table to do some of its work, merging some rows from the original table together. The logic is written as a [pipelined table function][1], following the pattern from the linked article. The table function uses a `PRAGMA AUTONOMOUS_TRANSACTION` declaration to permit the temporary table manipulation, and also accepts a cursor input parameter to restrict the denormalization to certain ID values. I then created a view to query the table function, passing in all possible ID values as a cursor (other uses of the function will be more restrictive). My question: is this all really necessary? Have I completely missed a much more simple way of accomplishing the same thing? Every time I touch PL/SQL I get the impression that I'm typing way too much. [1]: http://www.oreillynet.com/lpt/a/3136
oracle
plsql
null
null
null
null
open
Best way to encapsulate complex Oracle PL/SQL cursor logic as a view? === I've written PL/SQL code to denormalize a table into a much-easer-to-query form. The code uses a temporary table to do some of its work, merging some rows from the original table together. The logic is written as a [pipelined table function][1], following the pattern from the linked article. The table function uses a `PRAGMA AUTONOMOUS_TRANSACTION` declaration to permit the temporary table manipulation, and also accepts a cursor input parameter to restrict the denormalization to certain ID values. I then created a view to query the table function, passing in all possible ID values as a cursor (other uses of the function will be more restrictive). My question: is this all really necessary? Have I completely missed a much more simple way of accomplishing the same thing? Every time I touch PL/SQL I get the impression that I'm typing way too much. [1]: http://www.oreillynet.com/lpt/a/3136
0
20,084
08/21/2008 14:30:53
832
08/09/2008 06:51:40
1,114
93
XML Serialization and Inherited Types
following on from my [previous question](http://stackoverflow.com/questions/19454/enforce-attribute-decoration-of-classesmethods) I have been working on getting my object model to serialize to XML. But I have now run into a problem (quelle surprise!). The problem I have is that I have a collection, which is of a abstract base class type, which is populated by the concrete derived types. I thought it would be fine to just add the XML attributes to all of the classes involved and everything would be peachy. Sadly, thats not the case! So I have done some digging on Google and I now understand _why_ it's not working.. In that **the _XmlSerializer_ is in fact doing some clever reflection in order to serialize objects to/from XML, and since its based on the abstract type, it cannot figure out what the hell it's talking to**. Fine. I did come across [this page](http://www.codeproject.com/KB/XML/xmlserializerforunknown.aspx) on CodeProject, which looks like it may well help a lot (yet to read/consume fully), but I thought I would like to bring this problem to the StackOverflow table too, to see if you have any neat hacks/tricks in order to get this up and running in the quickest/lightest way possible :) There seems to be a lot of "Animal/Mammal", "Car/Bike/Truck" examples but not a lot of fresh ideas! Thanks a lot people :)
serialization
xml
c#
inheritance
null
null
open
XML Serialization and Inherited Types === following on from my [previous question](http://stackoverflow.com/questions/19454/enforce-attribute-decoration-of-classesmethods) I have been working on getting my object model to serialize to XML. But I have now run into a problem (quelle surprise!). The problem I have is that I have a collection, which is of a abstract base class type, which is populated by the concrete derived types. I thought it would be fine to just add the XML attributes to all of the classes involved and everything would be peachy. Sadly, thats not the case! So I have done some digging on Google and I now understand _why_ it's not working.. In that **the _XmlSerializer_ is in fact doing some clever reflection in order to serialize objects to/from XML, and since its based on the abstract type, it cannot figure out what the hell it's talking to**. Fine. I did come across [this page](http://www.codeproject.com/KB/XML/xmlserializerforunknown.aspx) on CodeProject, which looks like it may well help a lot (yet to read/consume fully), but I thought I would like to bring this problem to the StackOverflow table too, to see if you have any neat hacks/tricks in order to get this up and running in the quickest/lightest way possible :) There seems to be a lot of "Animal/Mammal", "Car/Bike/Truck" examples but not a lot of fresh ideas! Thanks a lot people :)
0
20,088
08/21/2008 14:31:50
1,870
08/19/2008 00:42:51
406
20
Is there a way to make Firefox ignore invalid ssl-certificates?
I am maintaining a few web applications. The development and qa environments use invalid/outdated ssl-certificates. Although it is generally a good thing, that Firefox makes me click like a dozen times to accept the certificate, this is pretty annoying. Is there a configuration-parameter to make Firefox (and possibly IE too) accept any ssl-certificate?
firefox
ssl
null
null
null
null
open
Is there a way to make Firefox ignore invalid ssl-certificates? === I am maintaining a few web applications. The development and qa environments use invalid/outdated ssl-certificates. Although it is generally a good thing, that Firefox makes me click like a dozen times to accept the certificate, this is pretty annoying. Is there a configuration-parameter to make Firefox (and possibly IE too) accept any ssl-certificate?
0
20,107
08/21/2008 14:36:41
437
08/05/2008 18:13:45
1,304
38
YUI Reset CSS Makes strong and em not work
This line in YUI's Reset CSS is causing trouble for me: address,caption,cite,code,dfn,em,strong,th,var { font-style:normal; font-weight:normal; } It makes my <code>em</code> not italic and my <code>strong</code> not bold. Which is okay. I know how to override that in my own stylesheet. strong, b { font-weight: bold; } em, i { font-style: italic; } The problem comes in when I have text that's both <code>em</code> and <code>strong</code>. <strong><em>Should be bold and italicized, but it's not bold.</em></strong> My rule for <code>strong</code> makes it bold, but YUI's rule for <code>em</code> makes it normal again. How do I fix that?
css
null
null
null
null
null
open
YUI Reset CSS Makes strong and em not work === This line in YUI's Reset CSS is causing trouble for me: address,caption,cite,code,dfn,em,strong,th,var { font-style:normal; font-weight:normal; } It makes my <code>em</code> not italic and my <code>strong</code> not bold. Which is okay. I know how to override that in my own stylesheet. strong, b { font-weight: bold; } em, i { font-style: italic; } The problem comes in when I have text that's both <code>em</code> and <code>strong</code>. <strong><em>Should be bold and italicized, but it's not bold.</em></strong> My rule for <code>strong</code> makes it bold, but YUI's rule for <code>em</code> makes it normal again. How do I fix that?
0
20,127
08/21/2008 14:41:31
486
08/06/2008 09:19:11
395
41
Virtual Machine Optimization
I am messing around with [a toy interpreter in Java](http://code.google.com/p/zemscript/) and I was considering trying to write a simple compiler that can generate bytecode for the Java Virtual Machine. Which got me thinking, how much optimization needs to be done by compilers that target virtual machines such as JVM and CLI? Do Just In Time (JIT) compilers do constant folding, peephole optimizations etc?
jvm
cil
jit
null
null
null
open
Virtual Machine Optimization === I am messing around with [a toy interpreter in Java](http://code.google.com/p/zemscript/) and I was considering trying to write a simple compiler that can generate bytecode for the Java Virtual Machine. Which got me thinking, how much optimization needs to be done by compilers that target virtual machines such as JVM and CLI? Do Just In Time (JIT) compilers do constant folding, peephole optimizations etc?
0
20,148
08/21/2008 14:50:52
2,013
08/19/2008 19:38:30
11
0
MyISAM versus InnoDB
I'm working on a projects which involves a lot of database writes, I'd say (70% inserts and 30% reads). This ratio would also include updates which I consider to be one read and one write. The reads can be dirty (e.g. I don't need 100% accurate information at the time of read). The task in question will be doing over 1 million database transactions an hour. I've read a bunch of stuff on the web about the differences between MyISAM and InnoDB, and MyISAM seems like the obvious choice to me for the particular database/tables that I'll be using for this task. From what I seem to be reading, InnoDB is good is transactions are needed since row level locking is supported. Does anybody have any experience with this type of load (or higher)? Is MyISAM the way to go?
mysql
myisam
innodb
performance
null
null
open
MyISAM versus InnoDB === I'm working on a projects which involves a lot of database writes, I'd say (70% inserts and 30% reads). This ratio would also include updates which I consider to be one read and one write. The reads can be dirty (e.g. I don't need 100% accurate information at the time of read). The task in question will be doing over 1 million database transactions an hour. I've read a bunch of stuff on the web about the differences between MyISAM and InnoDB, and MyISAM seems like the obvious choice to me for the particular database/tables that I'll be using for this task. From what I seem to be reading, InnoDB is good is transactions are needed since row level locking is supported. Does anybody have any experience with this type of load (or higher)? Is MyISAM the way to go?
0
20,156
08/21/2008 14:55:48
383
08/05/2008 10:46:37
2,022
207
Ordinals in C#
If there a quick way in C# to create [Ordinals][1] for a number, for example: - 1 returns 1st - 2 returns 2nd - 3 returns 3rd - ... Can this be done through String.Format or any there any functions available todo this? [1]: http://is.gd/1NvM
c#
.net
ordinals
null
null
null
open
Ordinals in C# === If there a quick way in C# to create [Ordinals][1] for a number, for example: - 1 returns 1st - 2 returns 2nd - 3 returns 3rd - ... Can this be done through String.Format or any there any functions available todo this? [1]: http://is.gd/1NvM
0
20,168
08/21/2008 14:59:48
271
08/04/2008 10:25:01
358
21
C# application detected as a virus
Regarding the same program as [my question a few minutes ago][1]... I added a setup project and built an MSI for the program (just to see if I could figure it out) and it works great except for one thing. When I tried to install it on my parent's laptop, their antivirus (the free Avast Home Edition) set off an alarm and accused my setup.exe of being a Trojan. Does anyone have any idea why this would be happening and how I can fix it? [1]: http://stackoverflow.com/questions/20061/store-data-from-a-c-application
c#
.net
antivirus
null
null
null
open
C# application detected as a virus === Regarding the same program as [my question a few minutes ago][1]... I added a setup project and built an MSI for the program (just to see if I could figure it out) and it works great except for one thing. When I tried to install it on my parent's laptop, their antivirus (the free Avast Home Edition) set off an alarm and accused my setup.exe of being a Trojan. Does anyone have any idea why this would be happening and how I can fix it? [1]: http://stackoverflow.com/questions/20061/store-data-from-a-c-application
0
20,173
08/21/2008 15:02:53
1,975
08/19/2008 16:30:04
36
10
MSTest and NHibernate
Does anyone have any experience getting MSTest to copy hibernate.cfg.xml properly to the output directory? All my MSTests fail with a cannot find hibernate.cfg.xml error (I have it set to Copy Always), but my MBUnit tests pass.
nhibernate
mbunit
mstest
null
null
null
open
MSTest and NHibernate === Does anyone have any experience getting MSTest to copy hibernate.cfg.xml properly to the output directory? All my MSTests fail with a cannot find hibernate.cfg.xml error (I have it set to Copy Always), but my MBUnit tests pass.
0
20,185
08/21/2008 15:12:48
392
08/05/2008 12:29:07
511
31
Is there a way to make a constructor only visible to a parent class in C#?
I have a collection of classes that inherit from an abstract class I created. I'd like to use the abstract class as a factory for creating instances of concrete implementations of my abstract class. Is there any way to hide a constructor from all code except a parent class. I'd like to do this basically public abstract class AbstractClass { public static AbstractClass MakeAbstractClass(string args) { if (args == "a") return new ConcreteClassA(); if (args == "b") return new ConcreteClassB(); } } public class ConcreteClassA : AbstractClass { } public class ConcreteClassB : AbstractClass { } But I want to prevent anyone from directly instantiating the 2 concrete classes. I want to ensure that only the MakeAbstractClass() method can instantiate the base classes. Is there any way to do this?
c#
inheritance
oop
null
null
null
open
Is there a way to make a constructor only visible to a parent class in C#? === I have a collection of classes that inherit from an abstract class I created. I'd like to use the abstract class as a factory for creating instances of concrete implementations of my abstract class. Is there any way to hide a constructor from all code except a parent class. I'd like to do this basically public abstract class AbstractClass { public static AbstractClass MakeAbstractClass(string args) { if (args == "a") return new ConcreteClassA(); if (args == "b") return new ConcreteClassB(); } } public class ConcreteClassA : AbstractClass { } public class ConcreteClassB : AbstractClass { } But I want to prevent anyone from directly instantiating the 2 concrete classes. I want to ensure that only the MakeAbstractClass() method can instantiate the base classes. Is there any way to do this?
0
20,198
08/21/2008 15:14:44
40
08/01/2008 12:48:12
1,796
159
How do Yellow Screens display code?
I thought .Net code gets compiled into MSIL, so I always wondered how do Yellow Screens produce the faulty code. If it's executing the compiled code, how is the compiler able to produce code from the source files in the error message? Feel free to edit this question/title, I know it doesn't really make sense.
.net
yellow-screen
null
null
null
null
open
How do Yellow Screens display code? === I thought .Net code gets compiled into MSIL, so I always wondered how do Yellow Screens produce the faulty code. If it's executing the compiled code, how is the compiler able to produce code from the source files in the error message? Feel free to edit this question/title, I know it doesn't really make sense.
0
20,201
08/21/2008 15:15:41
1,744
08/18/2008 12:04:57
38
0
Broken chart images in Crystal Reports in web application
I hve a collection of crystal reports that contain charts. The look fine locally and when printed, but when viewing them through a web application using a CrystalReportViewer the charts dispay as broken images. Viewing the properties of the broken image show the url as "...CrystalImageHandler.aspx?dynamicimage=cr_tmp_image_8d12a01f-b336-4b8b-b0c7-83d9571d87e4.png". I have tried adding <httpHandlers> <add verb="GET" path="CrystalImageHandler.aspx" type="CrystalDecisions.Web.CrystalImageHandler,CrystalDecisions.Web, Version=Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/> </httpHandlers> to the web.config as suggested via a google search but that has not resolved my issue.
webapplications
crystal-reports
null
null
null
null
open
Broken chart images in Crystal Reports in web application === I hve a collection of crystal reports that contain charts. The look fine locally and when printed, but when viewing them through a web application using a CrystalReportViewer the charts dispay as broken images. Viewing the properties of the broken image show the url as "...CrystalImageHandler.aspx?dynamicimage=cr_tmp_image_8d12a01f-b336-4b8b-b0c7-83d9571d87e4.png". I have tried adding <httpHandlers> <add verb="GET" path="CrystalImageHandler.aspx" type="CrystalDecisions.Web.CrystalImageHandler,CrystalDecisions.Web, Version=Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/> </httpHandlers> to the web.config as suggested via a google search but that has not resolved my issue.
0
20,206
08/21/2008 15:16:45
1,940
08/19/2008 14:38:08
39
6
Where can I find decent visio templates/diagrams for software architecture?
Anyone have any good urls for templates or diagram examples in Visio 2007 to be used in software architecture?
templates
visio
null
null
null
null
open
Where can I find decent visio templates/diagrams for software architecture? === Anyone have any good urls for templates or diagram examples in Visio 2007 to be used in software architecture?
0
20,207
08/21/2008 15:16:53
206
08/03/2008 13:35:14
364
34
Does the Microsoft Report Viewer Redistributable 2008 really require .NET Framework version 3.5?
I'm packaging up a .NET 2.0 based web app for deployment through a Windows Installer based package. Our app uses Report Viewer 2008 and I'm including the Microsoft Report Viewer Redistributable 2008 installer. When I check the [download page for Report Viewer 2008][1], it lists .NET 3.5 as a requirement. Is having .Net 3.5 installed really needed Report Viewer 2008? We targeted .Net 2.0 for our app, there isn't anything in our code that would use the 3.0 or 3.5 Frameworks. We are in the middle of testing and everything seems to be working with out 3.5, but I don't want to miss an edge condition and cause an error for a customer because he was missing a prerequisite run time package. [1]: http://www.microsoft.com/downloads/details.aspx?FamilyID=cc96c246-61e5-4d9e-bb5f-416d75a1b9ef&DisplayLang=en "Microsoft Report Viewer Redistributable 2008 Download"
reportviewer2008
deployment
webdeploymentproject
.net-3.5
null
null
open
Does the Microsoft Report Viewer Redistributable 2008 really require .NET Framework version 3.5? === I'm packaging up a .NET 2.0 based web app for deployment through a Windows Installer based package. Our app uses Report Viewer 2008 and I'm including the Microsoft Report Viewer Redistributable 2008 installer. When I check the [download page for Report Viewer 2008][1], it lists .NET 3.5 as a requirement. Is having .Net 3.5 installed really needed Report Viewer 2008? We targeted .Net 2.0 for our app, there isn't anything in our code that would use the 3.0 or 3.5 Frameworks. We are in the middle of testing and everything seems to be working with out 3.5, but I don't want to miss an edge condition and cause an error for a customer because he was missing a prerequisite run time package. [1]: http://www.microsoft.com/downloads/details.aspx?FamilyID=cc96c246-61e5-4d9e-bb5f-416d75a1b9ef&DisplayLang=en "Microsoft Report Viewer Redistributable 2008 Download"
0
20,227
08/21/2008 15:25:22
1,486
08/15/2008 20:42:23
11
3
How do I use 3des encryption/decryption in Java?
Every method I write to encode a string in Java using 3DES can't be decrypted back to the original string. Does anyone have a simple code snippet that can just encode and then decode a string?
java
3des
encryption
null
null
null
open
How do I use 3des encryption/decryption in Java? === Every method I write to encode a string in Java using 3DES can't be decrypted back to the original string. Does anyone have a simple code snippet that can just encode and then decode a string?
0
20,232
08/21/2008 15:26:42
2,025
08/19/2008 20:59:50
31
7
What languages should I learn before Uni?
This time next year I'll have my A level results and hopefully a Computer Science place at a university. At the moment I'm fairly competent in PHP but I'd like to use the next year to learn something new that would help me next year. So what languages would benefit me at the moment? At the moment I'm thinking about picking up Java, or perhaps C/C++. Any others I should think about?
computer-science
university
null
null
null
07/28/2012 13:50:52
not constructive
What languages should I learn before Uni? === This time next year I'll have my A level results and hopefully a Computer Science place at a university. At the moment I'm fairly competent in PHP but I'd like to use the next year to learn something new that would help me next year. So what languages would benefit me at the moment? At the moment I'm thinking about picking up Java, or perhaps C/C++. Any others I should think about?
4
20,233
08/21/2008 15:27:23
2,313
08/21/2008 15:27:23
1
0
Audio player on Windows Mobile
I'm trying to develop specialized audio player for windows mobile devices (Professional ones). And I've ran into the problem an once. There no compressed audio APIs on WM or I was unable to found house in documentation. Yes there are WM6 Sound API but it cannot even pause playback or seek to specified position. There are allways Windows Media Player on WM device but I've not found it APIs documentation. So the question is: Is there simple way to play, pause, forward, rewind, getting playback position and getting audio file length on *compressed* audio of several popular formats? Any library? platform APIs? Anything?
windows-mobile
null
null
null
null
null
open
Audio player on Windows Mobile === I'm trying to develop specialized audio player for windows mobile devices (Professional ones). And I've ran into the problem an once. There no compressed audio APIs on WM or I was unable to found house in documentation. Yes there are WM6 Sound API but it cannot even pause playback or seek to specified position. There are allways Windows Media Player on WM device but I've not found it APIs documentation. So the question is: Is there simple way to play, pause, forward, rewind, getting playback position and getting audio file length on *compressed* audio of several popular formats? Any library? platform APIs? Anything?
0
20,245
08/21/2008 15:30:28
1,801
08/18/2008 16:01:48
41
6
Process raw HTTP request content
I am doing an e-commerce solution in ASP.NET which uses [PayPal's Website Payments Standard](https://www.paypal.com/IntegrationCenter/ic_standard_home.html) service. Together with that I use a service they offer ([Payment Data Transfer](https://www.paypal.com/IntegrationCenter/ic_pdt.html)) that sends you back order information after a user has completed a payment. The final thing I need to do is to parse the POST request from them and persist the info in it. The HTTP request's content is in this form : >SUCCESS first_name=Jane+Doe last_name=Smith payment_status=Completed payer_email=janedoesmith%40hotmail.com payment_gross=3.99 mc_currency=USD custom=For+the+purchase+of+the+rare+book+Green+Eggs+%26+Ham Basically I want to parse this information and do something meaningful, like send it through e-mail or save it in DB. My question is what is the right approach to do parsing raw HTTP data in ASP.NET, not how the parsing itself is done.
asp.net
http
e-commerce
null
null
null
open
Process raw HTTP request content === I am doing an e-commerce solution in ASP.NET which uses [PayPal's Website Payments Standard](https://www.paypal.com/IntegrationCenter/ic_standard_home.html) service. Together with that I use a service they offer ([Payment Data Transfer](https://www.paypal.com/IntegrationCenter/ic_pdt.html)) that sends you back order information after a user has completed a payment. The final thing I need to do is to parse the POST request from them and persist the info in it. The HTTP request's content is in this form : >SUCCESS first_name=Jane+Doe last_name=Smith payment_status=Completed payer_email=janedoesmith%40hotmail.com payment_gross=3.99 mc_currency=USD custom=For+the+purchase+of+the+rare+book+Green+Eggs+%26+Ham Basically I want to parse this information and do something meaningful, like send it through e-mail or save it in DB. My question is what is the right approach to do parsing raw HTTP data in ASP.NET, not how the parsing itself is done.
0
20,249
08/21/2008 15:31:45
1,907
08/19/2008 13:23:16
1
0
ILMerge and Web Resources
We're attemtping to merge our DLL's into one for deployment, thus ILMerge. Almost everything seems to work great. We have a couple web controls that use `ClientScript.RegisterClientScriptResource` and these are 404-ing after the merge (These worked before the merge). For example one of our controls would look like namespace Company.WebControls { public class ControlA: CompositeControl, INamingContainer { protected override void OnPreRender(EventArgs e) { base.OnPreRender(e); this.Page.ClientScript.RegisterClientScriptResource(typeof(ControlA), "Company.WebControls.ControlA.js"); } } } It would be located in Project WebControls, assembly Company.WebControls. Underneath would be ControlA.cs and ControlA.js. ControlA.js is marked as an embedded resource. In the AssemblyInfo.cs I include the following: [assembly: System.Web.UI.WebResource("Company.WebControls.ControlA.js", "application/x-javascript")] After this is merged into CompanyA.dll, what is the proper way to reference this web resource? The ILMerge command line is as follows (from the bin directory after the build): `"C:\Program Files\Microsoft\ILMerge\ILMerge.exe" /keyfile:../../CompanySK.snk /wildcards:True /copyattrs:True /out:Company.dll Company.*.dll` Thanks in advance!
c#
asp.net
ilmerge
webresource
null
null
open
ILMerge and Web Resources === We're attemtping to merge our DLL's into one for deployment, thus ILMerge. Almost everything seems to work great. We have a couple web controls that use `ClientScript.RegisterClientScriptResource` and these are 404-ing after the merge (These worked before the merge). For example one of our controls would look like namespace Company.WebControls { public class ControlA: CompositeControl, INamingContainer { protected override void OnPreRender(EventArgs e) { base.OnPreRender(e); this.Page.ClientScript.RegisterClientScriptResource(typeof(ControlA), "Company.WebControls.ControlA.js"); } } } It would be located in Project WebControls, assembly Company.WebControls. Underneath would be ControlA.cs and ControlA.js. ControlA.js is marked as an embedded resource. In the AssemblyInfo.cs I include the following: [assembly: System.Web.UI.WebResource("Company.WebControls.ControlA.js", "application/x-javascript")] After this is merged into CompanyA.dll, what is the proper way to reference this web resource? The ILMerge command line is as follows (from the bin directory after the build): `"C:\Program Files\Microsoft\ILMerge\ILMerge.exe" /keyfile:../../CompanySK.snk /wildcards:True /copyattrs:True /out:Company.dll Company.*.dll` Thanks in advance!
0
20,262
08/21/2008 15:34:46
769
08/08/2008 17:19:27
28
2
Refactoring for Testability on an existing system
I've joined a team that works on a product. This product has been around for ~5 years or so, and uses ASP.NET WebForms. Its original architecture has faded over time, and things have become relatively disorganized throughout the solution. It's by no means terrible, but definitely can use some work; you all know what I mean. I've been performing some refactorings since coming on to the project team about 6 months ago. Some of those refactorings are simple, Extract Method, Pull Method Up, etc. Some of the refactorings are more structural. The latter changes make me nervous as there isn't a comprehensive suite of unit tests to accompany every component. The whole team is on board for the need to make structural changes through refactoring, but our Project Manager has expressed some concerns that we don't have adequate tests to make refactorings with the confidence that we aren't introducing regression bugs into the system. He would like us to write more tests first (against the existing architecture), then perform the refactorings. My argument is that the system's class structure is too tightly coupled to write adequate tests, and that using a more Test Driven approach while we perform our refactorings may be better. What I mean by this is not writing tests against the existing components, but writing tests for specific functional requirements, then refactoring existing code to meet those requirements. This will allow us to write tests that will probably have more longevity in the system, rather than writing a bunch of 'throw away' tests. Does anyone have any experience as to what the best course of action is? I have my own thoughts, but would like to hear some input from the community.
asp.net
refactoring
automated-tests
null
null
null
open
Refactoring for Testability on an existing system === I've joined a team that works on a product. This product has been around for ~5 years or so, and uses ASP.NET WebForms. Its original architecture has faded over time, and things have become relatively disorganized throughout the solution. It's by no means terrible, but definitely can use some work; you all know what I mean. I've been performing some refactorings since coming on to the project team about 6 months ago. Some of those refactorings are simple, Extract Method, Pull Method Up, etc. Some of the refactorings are more structural. The latter changes make me nervous as there isn't a comprehensive suite of unit tests to accompany every component. The whole team is on board for the need to make structural changes through refactoring, but our Project Manager has expressed some concerns that we don't have adequate tests to make refactorings with the confidence that we aren't introducing regression bugs into the system. He would like us to write more tests first (against the existing architecture), then perform the refactorings. My argument is that the system's class structure is too tightly coupled to write adequate tests, and that using a more Test Driven approach while we perform our refactorings may be better. What I mean by this is not writing tests against the existing components, but writing tests for specific functional requirements, then refactoring existing code to meet those requirements. This will allow us to write tests that will probably have more longevity in the system, rather than writing a bunch of 'throw away' tests. Does anyone have any experience as to what the best course of action is? I have my own thoughts, but would like to hear some input from the community.
0
20,263
08/21/2008 15:34:55
1,982
08/19/2008 16:54:34
115
5
Is there a Profiler equivalent for MySql?
"Microsoft SQL Server Profiler is a graphical user interface to SQL Trace for monitoring an instance of the Database Engine or Analysis Services." I find using SQL Server Profiler extremely useful during development, testing and when I am debugging database application problems. Does anybody know if there is an equivalent program for MySql?
database
mysql
mssql
null
null
null
open
Is there a Profiler equivalent for MySql? === "Microsoft SQL Server Profiler is a graphical user interface to SQL Trace for monitoring an instance of the Database Engine or Analysis Services." I find using SQL Server Profiler extremely useful during development, testing and when I am debugging database application problems. Does anybody know if there is an equivalent program for MySql?
0
20,267
08/21/2008 15:36:24
1,436
08/15/2008 15:43:19
328
19
Best way to replace tokens in a large text template
I have a large text template which needs tokenized sections replaced by other text. The tokens look something like this: ##USERNAME##. My first instinct is just to use String.Replace(), but is there a better, more efficient way or is Replace() already optimized for this?
c#
.net
null
null
null
null
open
Best way to replace tokens in a large text template === I have a large text template which needs tokenized sections replaced by other text. The tokens look something like this: ##USERNAME##. My first instinct is just to use String.Replace(), but is there a better, more efficient way or is Replace() already optimized for this?
0
20,272
08/21/2008 15:39:07
1,105
08/12/2008 12:05:29
11
5
Why doesn't 'shell' work in VBscript in VS6?
In a macro for Visual Studio 6, I wanted to run an external program, so I typed: shell("p4 open " + ActiveDocument.FullName) Which gave me a type mismatch runtime error. What I ended up having to type was this: Dim wshShell Set wshShell = CreateObject("WScript.Shell") strResult = wshShell.Run("p4 open " + ActiveDocument.FullName) What's going on here? Is that nonsense really necessary, or have I missed something?
visual-studio
vbscript
null
null
null
null
open
Why doesn't 'shell' work in VBscript in VS6? === In a macro for Visual Studio 6, I wanted to run an external program, so I typed: shell("p4 open " + ActiveDocument.FullName) Which gave me a type mismatch runtime error. What I ended up having to type was this: Dim wshShell Set wshShell = CreateObject("WScript.Shell") strResult = wshShell.Run("p4 open " + ActiveDocument.FullName) What's going on here? Is that nonsense really necessary, or have I missed something?
0
20,281
08/21/2008 15:41:02
1,351
08/14/2008 17:22:50
41
3
Offline forms
Anyone doing any work using "offline" forms? We have an application that requires inputting data from outside our company. I was thinking about sending a form out via email, allowing the form to be filled out then sent back. Obviously a web application would be the best solution, but management doesn't seem ready to build the infrastructure and security to support that. I've read a little about PDF forms is that a good solution or are there other solutions?
forms
offline
null
null
null
null
open
Offline forms === Anyone doing any work using "offline" forms? We have an application that requires inputting data from outside our company. I was thinking about sending a form out via email, allowing the form to be filled out then sent back. Obviously a web application would be the best solution, but management doesn't seem ready to build the infrastructure and security to support that. I've read a little about PDF forms is that a good solution or are there other solutions?
0
20,286
08/21/2008 15:42:20
722
08/08/2008 11:37:05
522
29
Associating source and search keywords with account creation
As a part of the signup process for my online application, I'm thinking of tracking the source and/or search keywords used to get to my site. This would allow me to see what advertising is working and from where with a somewhat finer grain than Google Analytics would. I assume I could set some kind of cookie with this information when people get to my site, but I'm not sure how I would go about getting it. Is it even possible? I'm using Rails, but a language-independent solution (or even just pointers to where to find this information) would be appreciated! Thanks!
ruby-on-rails
cookies
seo
null
null
null
open
Associating source and search keywords with account creation === As a part of the signup process for my online application, I'm thinking of tracking the source and/or search keywords used to get to my site. This would allow me to see what advertising is working and from where with a somewhat finer grain than Google Analytics would. I assume I could set some kind of cookie with this information when people get to my site, but I'm not sure how I would go about getting it. Is it even possible? I'm using Rails, but a language-independent solution (or even just pointers to where to find this information) would be appreciated! Thanks!
0
20,298
08/21/2008 15:45:24
2,260
08/21/2008 11:39:22
35
2
How to stop an animation in C# / WPF?
I have something like this: <pre> barProgress.BeginAnimation(RangeBase.ValueProperty, new DoubleAnimation( barProgress.Value, dNextProgressValue, new Duration(TimeSpan.FromSeconds(dDuration))); </pre> Now, how would you stop that animation (the `DoubleAnimation`)? The reason I want to do this, is because I would like to start new animations (this seems to work, but it's hard to tell) and eventually stop the last animation...
c#
wpf
null
null
null
null
open
How to stop an animation in C# / WPF? === I have something like this: <pre> barProgress.BeginAnimation(RangeBase.ValueProperty, new DoubleAnimation( barProgress.Value, dNextProgressValue, new Duration(TimeSpan.FromSeconds(dDuration))); </pre> Now, how would you stop that animation (the `DoubleAnimation`)? The reason I want to do this, is because I would like to start new animations (this seems to work, but it's hard to tell) and eventually stop the last animation...
0
20,309
08/21/2008 15:48:56
1,874
08/19/2008 02:05:31
21
4
What's the best way to manage a classic asp front-end using Visual Studio 2008?
I support a third party system that uses COM, classic ASP, and SQL Server. Our company has gone to using TFS as our source control provider - which pushes things through Visual Studio. So, what's the best way to get a classic asp front-end into Visual Studio?
visual-studio
classicasp
teamfoundationserver
null
null
null
open
What's the best way to manage a classic asp front-end using Visual Studio 2008? === I support a third party system that uses COM, classic ASP, and SQL Server. Our company has gone to using TFS as our source control provider - which pushes things through Visual Studio. So, what's the best way to get a classic asp front-end into Visual Studio?
0
20,321
08/21/2008 15:53:23
744
08/08/2008 13:43:38
76
1
One database or many?
I am developing a website that will manage data for multiple entities. No data is shared between entities, but they may be owned by the same customer. A customer may want to manage all their entities from a single "dashboard". So should I have one database for everything, or keep the data seperated into individual databases? Is there a best-practice? What are the positives/negatives for having a: - database for the entire site (entity has a "customerID", data has "entityID") - database for each customer (data has "entityID") - database for each entity (relation of database to customer is outside of database) Multiple databases seems like it would have better performance (fewer rows and joins) but may eventually become a maintenance nightmare.
performance
database-design
maintainability
null
null
null
open
One database or many? === I am developing a website that will manage data for multiple entities. No data is shared between entities, but they may be owned by the same customer. A customer may want to manage all their entities from a single "dashboard". So should I have one database for everything, or keep the data seperated into individual databases? Is there a best-practice? What are the positives/negatives for having a: - database for the entire site (entity has a "customerID", data has "entityID") - database for each customer (data has "entityID") - database for each entity (relation of database to customer is outside of database) Multiple databases seems like it would have better performance (fewer rows and joins) but may eventually become a maintenance nightmare.
0
20,322
08/21/2008 15:54:14
1,585
08/16/2008 21:03:55
21
4
How do I log uncaught exceptions in PHP?
I've found out how to convert errors into exceptions, and I display them nicely if they aren't caught, but I don't know how to log them in a useful way. Simply writing them to a file won't be useful, will it? And would you risk accessing a database, when you don't know what caused the exception yet?
php
exception
error-handling
error-logging
null
null
open
How do I log uncaught exceptions in PHP? === I've found out how to convert errors into exceptions, and I display them nicely if they aren't caught, but I don't know how to log them in a useful way. Simply writing them to a file won't be useful, will it? And would you risk accessing a database, when you don't know what caused the exception yet?
0
20,326
08/21/2008 15:55:12
1,782
08/18/2008 14:30:58
290
21
Double postback problem
I have a ASP.NET 1.1 application, and I'm trying to find out why when I change a ComboBox which value is used to fill another one (parent-child relation), two postbacks are produced. I have checked and checked the code, and I can't find the cause. Here are both call stacks which end in a page_load First postback (generated by teh ComboBox's autopostback) ![Postback call stack][1] Second postback (this is what I want to find why it's happening) ![alt text][2] Any suggestion? What can I check? [1]: http://www.juanformoso.com.ar/images/callstack1.jpg [2]: http://www.juanformoso.com.ar/images/callstack2.jpg
asp.net
.net-1.1
null
null
null
null
open
Double postback problem === I have a ASP.NET 1.1 application, and I'm trying to find out why when I change a ComboBox which value is used to fill another one (parent-child relation), two postbacks are produced. I have checked and checked the code, and I can't find the cause. Here are both call stacks which end in a page_load First postback (generated by teh ComboBox's autopostback) ![Postback call stack][1] Second postback (this is what I want to find why it's happening) ![alt text][2] Any suggestion? What can I check? [1]: http://www.juanformoso.com.ar/images/callstack1.jpg [2]: http://www.juanformoso.com.ar/images/callstack2.jpg
0
20,327
08/21/2008 15:55:43
42
08/01/2008 13:00:11
650
25
Code Review vs. Check In often?
Following Jeff's article about [checking in often][1], some commenters couldn't resist spewing "Welcome to obvious land!" kind of comments. That's understandable, in most situation it's obvious that checking in as soon as something is finished before proceeding to the next feature is the way to go. For me, it just reminded me that I was a proponent of that methodology, but that I can no longer do (and it is causing me pain everytime I finish a feature). The reason is simple; we have a politic of no code in the repository without a peer review. However, asking a coworker for a review every 30 minutes is quite a productivity killer. I would be interested on a solution, or at least a possible compromise that would let us do both without crippling team productivity. [1]: http://www.codinghorror.com/blog/archives/001165.html
sourcecontrol
codereview
codinghorror
null
null
null
open
Code Review vs. Check In often? === Following Jeff's article about [checking in often][1], some commenters couldn't resist spewing "Welcome to obvious land!" kind of comments. That's understandable, in most situation it's obvious that checking in as soon as something is finished before proceeding to the next feature is the way to go. For me, it just reminded me that I was a proponent of that methodology, but that I can no longer do (and it is causing me pain everytime I finish a feature). The reason is simple; we have a politic of no code in the repository without a peer review. However, asking a coworker for a review every 30 minutes is quite a productivity killer. I would be interested on a solution, or at least a possible compromise that would let us do both without crippling team productivity. [1]: http://www.codinghorror.com/blog/archives/001165.html
0
20,336
08/21/2008 15:57:36
2,171
08/20/2008 18:04:57
1
1
State of Registers After Bootup
This is a low level question. For a little bit of context, I'm working on a boot loader on an x86 machine. When the BIOS copies the contents of the MBR to 0x7c00 and jumps to that address, is there a standard meaning to the contents of the registers? Do the registers have standard values? I know that the segment registers are typically set to 0, but will sometimes be 0x7c0. What about the other hardware registers? Thanks, Terry
hardware
boot
null
null
null
null
open
State of Registers After Bootup === This is a low level question. For a little bit of context, I'm working on a boot loader on an x86 machine. When the BIOS copies the contents of the MBR to 0x7c00 and jumps to that address, is there a standard meaning to the contents of the registers? Do the registers have standard values? I know that the segment registers are typically set to 0, but will sometimes be 0x7c0. What about the other hardware registers? Thanks, Terry
0
20,346
08/21/2008 15:59:39
1,595
08/17/2008 08:00:50
284
13
C#: What are attributes?
What are they, what are they good for, and how to I create my own?
c#
.net
attributes
null
null
null
open
C#: What are attributes? === What are they, what are they good for, and how to I create my own?
0
20,376
08/21/2008 16:08:34
1,100
08/12/2008 11:58:29
38
4
JavaScript Profiler in IE
Does anyone know a tool for Profiling JavaScript in IE?
javascript
performance
internet-explorer
profiling
null
null
open
JavaScript Profiler in IE === Does anyone know a tool for Profiling JavaScript in IE?
0
20,386
08/21/2008 16:11:34
380
08/05/2008 10:39:18
1,528
142
Memory Leaks in .Net
What are all the possible ways in which we can get memory leaks in .Net. I know of two: 1. Not properly un-registering [Event Handlers/Delegates](http://diditwith.net/PermaLink,guid,fcf59145-3973-468a-ae66-aaa8df9161c7.aspx). 2. Not disposing dynamic child controls in Windows Forms: Example: // Causes Leaks Label label = new Label(); this.Controls.Add(label); this.Controls.Remove(label); // Correct Code Label label = new Label(); this.Controls.Add(label); this.Controls.Remove(label); label.Dispose(); **Update**: The idea is to list common pitfalls which are not too obvious (such as the above). Usually the notion is that memory leaks are not a big problem because of the GC. Not like it used to be in C++.
.net
optimization
memory-leaks
null
null
04/18/2012 18:24:35
not constructive
Memory Leaks in .Net === What are all the possible ways in which we can get memory leaks in .Net. I know of two: 1. Not properly un-registering [Event Handlers/Delegates](http://diditwith.net/PermaLink,guid,fcf59145-3973-468a-ae66-aaa8df9161c7.aspx). 2. Not disposing dynamic child controls in Windows Forms: Example: // Causes Leaks Label label = new Label(); this.Controls.Add(label); this.Controls.Remove(label); // Correct Code Label label = new Label(); this.Controls.Add(label); this.Controls.Remove(label); label.Dispose(); **Update**: The idea is to list common pitfalls which are not too obvious (such as the above). Usually the notion is that memory leaks are not a big problem because of the GC. Not like it used to be in C++.
4
20,389
08/21/2008 16:12:45
1,453
08/15/2008 16:41:37
46
5
Deploying InfoPath forms to different SharePoint servers
How do you manage deploying InfoPath forms to different sharepoint servers? Is there a better way to deal all the data connections being site-specific without opening the forms, editing the data connections and republishing for each environment?
sharepoint
moss
infopath
null
null
null
open
Deploying InfoPath forms to different SharePoint servers === How do you manage deploying InfoPath forms to different sharepoint servers? Is there a better way to deal all the data connections being site-specific without opening the forms, editing the data connections and republishing for each environment?
0
20,391
08/21/2008 16:12:53
1,946
08/19/2008 14:53:06
76
3
Script to backup svn repository to network share
I have a svn repo on my machine. Anyone have a script to back it up to a network share?
svn
administration
null
null
null
null
open
Script to backup svn repository to network share === I have a svn repo on my machine. Anyone have a script to back it up to a network share?
0
20,392
08/21/2008 16:12:58
2,086
08/20/2008 10:43:39
31
4
Is it OK to drop sql statistics?
We've been trying to alter a lot of columns from nullable to not nullable, which involves dropping all the associated objects, making the change, and recreating the associated objects. We've been using SQL Compare to generate the scripts, but I noticed that SQL Compare doesn't script statistic objects. Does this mean its ok to drop them and the database will work as well as it did before without them, or have Red Gate missed a trick?
sql
sql-server
scripting
statistics
null
null
open
Is it OK to drop sql statistics? === We've been trying to alter a lot of columns from nullable to not nullable, which involves dropping all the associated objects, making the change, and recreating the associated objects. We've been using SQL Compare to generate the scripts, but I noticed that SQL Compare doesn't script statistic objects. Does this mean its ok to drop them and the database will work as well as it did before without them, or have Red Gate missed a trick?
0
20,420
08/21/2008 16:18:41
1,120
08/12/2008 13:45:53
221
12
Any ReSharper equivalent for Xcode?
I'm a complete Xcode/Objective-C/Cocoa newbie but I'm learning fast and really starting to enjoy getting to grips with a new language, platform and paradigm. One thing is though, having been using Visual Studio with R# for so long I've kind of been spoiled with the coding tools such as refactorings and completion etc and as far as I can tell Xcode has some fairly limited built in support for this stuff. On that note, does anyone know if any add-ins or whatever are available for the Xcode environment which add coding helpers such as automatically generating implementation skeletons from a class interface definition etc? I suspect there aren't but I suppose it can't help to ask.
mac
osx
objectivec
xcode
null
null
open
Any ReSharper equivalent for Xcode? === I'm a complete Xcode/Objective-C/Cocoa newbie but I'm learning fast and really starting to enjoy getting to grips with a new language, platform and paradigm. One thing is though, having been using Visual Studio with R# for so long I've kind of been spoiled with the coding tools such as refactorings and completion etc and as far as I can tell Xcode has some fairly limited built in support for this stuff. On that note, does anyone know if any add-ins or whatever are available for the Xcode environment which add coding helpers such as automatically generating implementation skeletons from a class interface definition etc? I suspect there aren't but I suppose it can't help to ask.
0
20,426
08/21/2008 16:20:12
1,343
08/14/2008 15:46:01
88
15
How to maintain a recursive invariant in a MySQL database?
I have a tree encoded in a MySQL database as edges: CREATE TABLE items ( num INT, tot INT, PRIMARY KEY (num) ); CREATE TABLE tree ( orig INT, term INT FOREIGN KEY (orig,term) REFERENCES items (num,num) ) For each leaf in the tree, items.tot is set by someone. For interior nodes, items.tot needs to be the sum of it's children. Running the following query repeatedly would generate the desired result. UPDATE items SET tot = ( SELECT SUM(b.tot) FROM tree JOIN items AS b ON tree.term = b.num WHERE tree.orig=items.num) WHERE EXISTS (SELECT * FROM tree WHERE orig=items.num) (note this actually doesn't work but that's beside the point) Assume that the database exists and the invariant are all ready satisfied. The question is: >**What is the most practical way to update the DB while maintaining this requirement? Updates may move nodes around or alter the value of tot on leaf nodes. It can assumed that leaf nodes stay as leaf nodes, interior nodes stay as interior nodes and the whole thing remains a proper tree.** Some thoughts I have had: - Full Invalidation, after any update, recompute everything (Um... No) - Set a trigger on the items table to update the parent of any row that is updated - This would be recursive (updates trigger updates, trigger updates, ...) - Doesn't work, MySQL can't update the table that kicked off the trigger - Set a trigger to schedule an update of the parent of any row that is updated - This would be iterative (get an item from the schedule, processing it schedules more items) - What kicks this off? Trust client code to get it right? - An advantage is that if the updates are ordered correctly fewer sums need to be computer. But that ordering is a complication in and of it's own. An ideal solution would generalize to other "aggregating invariants" FWIW I know this is "a bit overboard", but I'm doing this for fun (Fun: verb, Finding the impossible by doing it. :-)
mysql
algorithm
datastructure
insanity
null
null
open
How to maintain a recursive invariant in a MySQL database? === I have a tree encoded in a MySQL database as edges: CREATE TABLE items ( num INT, tot INT, PRIMARY KEY (num) ); CREATE TABLE tree ( orig INT, term INT FOREIGN KEY (orig,term) REFERENCES items (num,num) ) For each leaf in the tree, items.tot is set by someone. For interior nodes, items.tot needs to be the sum of it's children. Running the following query repeatedly would generate the desired result. UPDATE items SET tot = ( SELECT SUM(b.tot) FROM tree JOIN items AS b ON tree.term = b.num WHERE tree.orig=items.num) WHERE EXISTS (SELECT * FROM tree WHERE orig=items.num) (note this actually doesn't work but that's beside the point) Assume that the database exists and the invariant are all ready satisfied. The question is: >**What is the most practical way to update the DB while maintaining this requirement? Updates may move nodes around or alter the value of tot on leaf nodes. It can assumed that leaf nodes stay as leaf nodes, interior nodes stay as interior nodes and the whole thing remains a proper tree.** Some thoughts I have had: - Full Invalidation, after any update, recompute everything (Um... No) - Set a trigger on the items table to update the parent of any row that is updated - This would be recursive (updates trigger updates, trigger updates, ...) - Doesn't work, MySQL can't update the table that kicked off the trigger - Set a trigger to schedule an update of the parent of any row that is updated - This would be iterative (get an item from the schedule, processing it schedules more items) - What kicks this off? Trust client code to get it right? - An advantage is that if the updates are ordered correctly fewer sums need to be computer. But that ordering is a complication in and of it's own. An ideal solution would generalize to other "aggregating invariants" FWIW I know this is "a bit overboard", but I'm doing this for fun (Fun: verb, Finding the impossible by doing it. :-)
0
20,450
08/21/2008 16:30:49
1,508
08/16/2008 02:29:14
41
5
Cleaning up RTF text
I'd like to take some RTF input and clean it to remove all RTF formatting except \ul \b \i to paste it into Word with minor format information. The command used to paste into Word will be something like: oWord.ActiveDocument.ActiveWindow.Selection.PasteAndFormat(0) (with some RTF text already in the Clipboard) {\rtf1\ansi\deff0{\fonttbl{\f0\fnil\fcharset0 Courier New;}} {\colortbl ;\red255\green255\blue140;} \viewkind4\uc1\pard\highlight1\lang3084\f0\fs18 The company is a global leader in responsible tourism and was \ul the first major hotel chain in North America\ulnone to embrace environmental stewardship within its daily operations\highlight0\par Do you have any idea on how I can clean up the RTF safely with some regular expressions or something? I am using VB.NET to do the processing but any .NET language sample will do.
.net
vb.net
word
rtf
null
null
open
Cleaning up RTF text === I'd like to take some RTF input and clean it to remove all RTF formatting except \ul \b \i to paste it into Word with minor format information. The command used to paste into Word will be something like: oWord.ActiveDocument.ActiveWindow.Selection.PasteAndFormat(0) (with some RTF text already in the Clipboard) {\rtf1\ansi\deff0{\fonttbl{\f0\fnil\fcharset0 Courier New;}} {\colortbl ;\red255\green255\blue140;} \viewkind4\uc1\pard\highlight1\lang3084\f0\fs18 The company is a global leader in responsible tourism and was \ul the first major hotel chain in North America\ulnone to embrace environmental stewardship within its daily operations\highlight0\par Do you have any idea on how I can clean up the RTF safely with some regular expressions or something? I am using VB.NET to do the processing but any .NET language sample will do.
0
20,463
08/21/2008 16:35:20
1,797
08/18/2008 15:46:11
546
32
What is the point of interfaces in PHP?
Interfaces allow you to create code which defines the methods of classes that implement it. You cannot however add any code to those methods. Abstract classes allow you to do the same thing, along with adding code to the method. Now if you can achieve the same goal with abstract classes, why do we even need the concept of interfaces? I've been told that it has to do with OO theory from C++ to Java, which is what PHP's OO stuff is based on. Is the concept useful in Java but not in PHP? Is it just a way to keep from having placeholders littered in the abstract class? Am I missing something?
oop
php
java
c++
theory
null
open
What is the point of interfaces in PHP? === Interfaces allow you to create code which defines the methods of classes that implement it. You cannot however add any code to those methods. Abstract classes allow you to do the same thing, along with adding code to the method. Now if you can achieve the same goal with abstract classes, why do we even need the concept of interfaces? I've been told that it has to do with OO theory from C++ to Java, which is what PHP's OO stuff is based on. Is the concept useful in Java but not in PHP? Is it just a way to keep from having placeholders littered in the abstract class? Am I missing something?
0
20,465
08/21/2008 16:36:12
940
08/10/2008 19:58:38
115
4
.NET - Excel ListObject autosizing on databind
I'm developing an Excel 2007 add-in using Visual Studio Tools for Office (2008). I have one sheet with several ListObjects on it, which are being bound to datatables on startup. When they are bound, they autosize correctly. The problem comes when they are re-bound. I have a custom button on the ribbon bar which goes back out to the database and retrieves different information based on some criteria that the user inputs. This new data comes back and is re-bound to the ListObjects - however, this time they are not resized and I get an exception: > ListObject cannot be bound because it > cannot be resized to fit the data. The > ListObject failed to add new rows. > This can be caused because of > inability to move objects below of the > list object. >>Inner exception: "Insert method of Range class failed" >>Reason: Microsoft.Office.Tools.Excel.FailureReason.CouldNotResizeListObject I was not able to find anything very meaningful on this error on Google or MSDN. I have been trying to figure this out for a while, but to no avail. Basic code structure: //at startup DataTable tbl = //get from database listObj1.SetDataBinding(tbl); DataTable tbl2 = //get from database listObj2.SetDataBinding(tbl2); //in buttonClick event handler DataTable tbl = //get different info from database //have tried with and without unbinding old source listObj1.SetDataBinding(tbl); <-- exception here DataTable tbl2 = //get different info from database listObj2.SetDataBinding(tbl2); Note that this exception occurs even when the ListObject is shrinking, and not only when it grows.
c#
.net
excel
data-binding
vsto
null
open
.NET - Excel ListObject autosizing on databind === I'm developing an Excel 2007 add-in using Visual Studio Tools for Office (2008). I have one sheet with several ListObjects on it, which are being bound to datatables on startup. When they are bound, they autosize correctly. The problem comes when they are re-bound. I have a custom button on the ribbon bar which goes back out to the database and retrieves different information based on some criteria that the user inputs. This new data comes back and is re-bound to the ListObjects - however, this time they are not resized and I get an exception: > ListObject cannot be bound because it > cannot be resized to fit the data. The > ListObject failed to add new rows. > This can be caused because of > inability to move objects below of the > list object. >>Inner exception: "Insert method of Range class failed" >>Reason: Microsoft.Office.Tools.Excel.FailureReason.CouldNotResizeListObject I was not able to find anything very meaningful on this error on Google or MSDN. I have been trying to figure this out for a while, but to no avail. Basic code structure: //at startup DataTable tbl = //get from database listObj1.SetDataBinding(tbl); DataTable tbl2 = //get from database listObj2.SetDataBinding(tbl2); //in buttonClick event handler DataTable tbl = //get different info from database //have tried with and without unbinding old source listObj1.SetDataBinding(tbl); <-- exception here DataTable tbl2 = //get different info from database listObj2.SetDataBinding(tbl2); Note that this exception occurs even when the ListObject is shrinking, and not only when it grows.
0
20,467
08/21/2008 16:38:29
1,490
08/15/2008 21:35:24
64
15
Path Display in Label
Are there any automatic methods for trimming a path string in .NET? For example: C:\Documents and Settings\nick\My Documents\EMG Tests\demo data\demo data.emt becomes C:\Documents...\demo data.emt It would be particularly cool if this were built into the Label class, and I seem to recall it is--can't find it though!
c#
winforms
path
null
null
null
open
Path Display in Label === Are there any automatic methods for trimming a path string in .NET? For example: C:\Documents and Settings\nick\My Documents\EMG Tests\demo data\demo data.emt becomes C:\Documents...\demo data.emt It would be particularly cool if this were built into the Label class, and I seem to recall it is--can't find it though!
0
20,484
08/21/2008 16:45:48
71
08/01/2008 15:05:56
911
91
Use a LIKE clause in part of an INNER JOIN
Can/Should I use a LIKE criteria as part of an INNER JOIN when building a stored procedure/query? I'm not sure I'm asking the right thing, so let me explain. I'm creating a procedure that is going to take a list of keywords to be searched for in a column that contains text. If I was sitting at the console, I'd execute it as such: SELECT Id, Name, Description FROM dbo.Card WHERE Description LIKE '%warrior%' OR Description LIKE '%fiend%' OR Description LIKE '%damage%' But a trick I picked up a little while go to do "strongly typed" list parsing in a stored procedure is to parse the list into a table variable/temporary table, converting it to the proper type and then doing an INNER JOIN against that table in my final result set. This works great when sending say a list of integer IDs to the procedure. I wind up having a final query that looks like this: SELECT Id, Name, Description FROM dbo.Card INNER JOIN @tblExclusiveCard ON dbo.Card.Id = @tblExclusiveCard.CardId I want to use this trick with a list of strings. But since I'm looking for a particular keyword, I am going to use the LIKE clause. So ideally I'm thinking I'd have my final query look like this: SELECT Id, Name, Description FROM dbo.Card INNER JOIN @tblKeyword ON dbo.Card.Description LIKE '%' + @tblKeyword.Value + '%' Is this possible/recommended? Is there a better way to do something like this?
sqlquery
pattern
sql
null
null
null
open
Use a LIKE clause in part of an INNER JOIN === Can/Should I use a LIKE criteria as part of an INNER JOIN when building a stored procedure/query? I'm not sure I'm asking the right thing, so let me explain. I'm creating a procedure that is going to take a list of keywords to be searched for in a column that contains text. If I was sitting at the console, I'd execute it as such: SELECT Id, Name, Description FROM dbo.Card WHERE Description LIKE '%warrior%' OR Description LIKE '%fiend%' OR Description LIKE '%damage%' But a trick I picked up a little while go to do "strongly typed" list parsing in a stored procedure is to parse the list into a table variable/temporary table, converting it to the proper type and then doing an INNER JOIN against that table in my final result set. This works great when sending say a list of integer IDs to the procedure. I wind up having a final query that looks like this: SELECT Id, Name, Description FROM dbo.Card INNER JOIN @tblExclusiveCard ON dbo.Card.Id = @tblExclusiveCard.CardId I want to use this trick with a list of strings. But since I'm looking for a particular keyword, I am going to use the LIKE clause. So ideally I'm thinking I'd have my final query look like this: SELECT Id, Name, Description FROM dbo.Card INNER JOIN @tblKeyword ON dbo.Card.Description LIKE '%' + @tblKeyword.Value + '%' Is this possible/recommended? Is there a better way to do something like this?
0
20,507
08/21/2008 16:54:34
1,143
08/12/2008 18:58:24
178
14
Give me awesome Visual Studio keyboard short cuts!
I know a few that I like. ALT+SHIFT+F10 then ENTER which automatically adds the "using" at the top if i'm referencing an object that I haven't put the namespace in for yet. CTRL + + or CTRL + - Which moves you back and forward to which file and method you are/were looking at which is very handy when used in combination with "Go To Definition" or "Find All References". Are there any other awesome ones I should know about?
visual-studio
null
null
null
null
null
open
Give me awesome Visual Studio keyboard short cuts! === I know a few that I like. ALT+SHIFT+F10 then ENTER which automatically adds the "using" at the top if i'm referencing an object that I haven't put the namespace in for yet. CTRL + + or CTRL + - Which moves you back and forward to which file and method you are/were looking at which is very handy when used in combination with "Go To Definition" or "Find All References". Are there any other awesome ones I should know about?
0
20,510
08/21/2008 16:55:09
1,638
08/17/2008 17:58:57
81
7
Executing JavaScript from Flex: Is this javascript function dangerous?
I have a flex application that needs the ability to generate and execute JavaScript. When I say this, I mean I need to execute raw JavaScript that I create in my Flex application (not just an existing JavaScript method) I am currently doing this by exposing the following JavaScript method: function doScript(js){ eval(js);} I can then do something like this in Flex (note: I am doing something more substantial then an alert box in the real Flex app): ExternalInterface.call("doScript","alert('foo')); My question is does this impose any security risk, I am assuming it's not since the Flex and JasvaScript all run client side... Is there a better way to do this?
javascript
flex
exploit
null
null
null
open
Executing JavaScript from Flex: Is this javascript function dangerous? === I have a flex application that needs the ability to generate and execute JavaScript. When I say this, I mean I need to execute raw JavaScript that I create in my Flex application (not just an existing JavaScript method) I am currently doing this by exposing the following JavaScript method: function doScript(js){ eval(js);} I can then do something like this in Flex (note: I am doing something more substantial then an alert box in the real Flex app): ExternalInterface.call("doScript","alert('foo')); My question is does this impose any security risk, I am assuming it's not since the Flex and JasvaScript all run client side... Is there a better way to do this?
0
20,511
08/21/2008 16:55:17
1,574
08/16/2008 19:31:12
43
6
How do you unit test web apps hosted remotely?
I'm familiar with TDD and use it in both my workplace and my home-brewed web applications. However, every time I have used TDD in a web application, I have had the luxury of having full access to the web server. That means that I can update the server then run my unit tests directly from the server. My question is, if you are using a third party web host, how do you run your unit tests on them? You could argue that if your app is designed well and your build process is sound and automated, that running unit tests on your production server isn't necessary, but personally I like the peace of mind in knowing that everything is still "green" after a major update.
tdd
unit-testing
web-application
null
null
null
open
How do you unit test web apps hosted remotely? === I'm familiar with TDD and use it in both my workplace and my home-brewed web applications. However, every time I have used TDD in a web application, I have had the luxury of having full access to the web server. That means that I can update the server then run my unit tests directly from the server. My question is, if you are using a third party web host, how do you run your unit tests on them? You could argue that if your app is designed well and your build process is sound and automated, that running unit tests on your production server isn't necessary, but personally I like the peace of mind in knowing that everything is still "green" after a major update.
0
20,522
08/21/2008 16:59:15
1,769
08/18/2008 13:35:40
124
7
Error installing iKernel.exe
Has anybody come across this problem during an application install? - OS is Windows Server 2k3 I do have local Admin access and I have installed this application on other machines. Any help much appreciated, Google isn't helping much
windows-server-2003
null
null
null
null
null
open
Error installing iKernel.exe === Has anybody come across this problem during an application install? - OS is Windows Server 2k3 I do have local Admin access and I have installed this application on other machines. Any help much appreciated, Google isn't helping much
0
20,529
08/21/2008 17:01:20
2,329
08/21/2008 16:46:54
1
0
Useful Eclipse features?
I have been using Eclipse as an IDE for a short amount of time (about 3 months of full use) and almost every day I learn about some shortcut or feature that I had absolutely no idea about. For instance, just today I learned that Ctrl+3 was the shortcut for a Quick Access window. I was wondering what your most useful/favorite Eclipse features are. With the IDE being so big, it would be helpful to learn about the more commonly used parts of the program.
eclipse
null
null
null
null
null
open
Useful Eclipse features? === I have been using Eclipse as an IDE for a short amount of time (about 3 months of full use) and almost every day I learn about some shortcut or feature that I had absolutely no idea about. For instance, just today I learned that Ctrl+3 was the shortcut for a Quick Access window. I was wondering what your most useful/favorite Eclipse features are. With the IDE being so big, it would be helpful to learn about the more commonly used parts of the program.
0
20,533
08/21/2008 17:03:25
1,384,652
08/01/2008 12:01:23
1,179
66
Mac text/code editor
I searched for this and found [Maudite's][1] question about [text editors][2] but they were all for Windows. As you have no doubt guessed, I am trying to find out if there are any text/code editors for the Mac besides what I know of. I'll edit my post to include editors listed. **Free** 1. [Textwrangler][4] 2. [XCode][6] <br> **Commercial** 1. [Textmate][3] 2. [BBEdit][5] [1]: http://stackoverflow.com/users/1632/maudite [2]: http://stackoverflow.com/questions/14155/text-editors#14203 [3]: http://macromates.com/ [4]: http://www.barebones.com/products/textwrangler/ [5]: http://www.barebones.com/products/bbedit/ [6]: http://developer.apple.com/tools/xcode/
mac
editor
null
null
null
04/02/2012 19:34:54
not constructive
Mac text/code editor === I searched for this and found [Maudite's][1] question about [text editors][2] but they were all for Windows. As you have no doubt guessed, I am trying to find out if there are any text/code editors for the Mac besides what I know of. I'll edit my post to include editors listed. **Free** 1. [Textwrangler][4] 2. [XCode][6] <br> **Commercial** 1. [Textmate][3] 2. [BBEdit][5] [1]: http://stackoverflow.com/users/1632/maudite [2]: http://stackoverflow.com/questions/14155/text-editors#14203 [3]: http://macromates.com/ [4]: http://www.barebones.com/products/textwrangler/ [5]: http://www.barebones.com/products/bbedit/ [6]: http://developer.apple.com/tools/xcode/
4
20,564
08/21/2008 17:13:40
20
08/01/2008 12:09:11
258
19
What constitutes beautiful code?
For anyone that is passionate about software development, I'm of the opinion that you should always strive to write beautiful code; however, is there a clear definition for what beautiful code really is? On one hand, I see elegant code being something that's very easy to read while simultaneously solving the problem at hand in the most efficient way possible. It seems like readable code often comes at the expense of creating several new, for example, variables in order to represent the data you are working with. Depending on what platform on which you're working (or depending on how picky you are), creating these variables could be considered to be a performance hit. On the other hand, this brings up another perspective that I've often seen which defines beautiful code as code that succinctly and efficiently solves the problem at hand. It can be argued, through, that succinct code may come at the sake of readability and thus ultimately detracts from the attractiveness of the code. I personally want to be able to write expressive, effective, and elegant code, but I often find myself debating if my adding a couple of more variables to improve my ability to read the code three months later really does improve (or pollute) the code.
language-agnostic
null
null
null
null
null
open
What constitutes beautiful code? === For anyone that is passionate about software development, I'm of the opinion that you should always strive to write beautiful code; however, is there a clear definition for what beautiful code really is? On one hand, I see elegant code being something that's very easy to read while simultaneously solving the problem at hand in the most efficient way possible. It seems like readable code often comes at the expense of creating several new, for example, variables in order to represent the data you are working with. Depending on what platform on which you're working (or depending on how picky you are), creating these variables could be considered to be a performance hit. On the other hand, this brings up another perspective that I've often seen which defines beautiful code as code that succinctly and efficiently solves the problem at hand. It can be argued, through, that succinct code may come at the sake of readability and thus ultimately detracts from the attractiveness of the code. I personally want to be able to write expressive, effective, and elegant code, but I often find myself debating if my adding a couple of more variables to improve my ability to read the code three months later really does improve (or pollute) the code.
0
20,575
08/21/2008 17:17:51
2,104
08/20/2008 11:52:59
51
5
Direct link from Yellow Screen to line in code
I've been looking for a while for this, and having been thinking about creating it myself, but hadn't got the feeling I knew the right point to start. I would like to have a link on the Yellow Screen that would directly jump to the correct line in Visual Studio. Anyone seen this or done this? If it needs another error page, is it possible to replace the standard yellow screen for a whole webserver instead of per application? Thanks.
asp.net
yellow-screen
null
null
null
null
open
Direct link from Yellow Screen to line in code === I've been looking for a while for this, and having been thinking about creating it myself, but hadn't got the feeling I knew the right point to start. I would like to have a link on the Yellow Screen that would directly jump to the correct line in Visual Studio. Anyone seen this or done this? If it needs another error page, is it possible to replace the standard yellow screen for a whole webserver instead of per application? Thanks.
0
20,586
08/21/2008 17:21:01
373
08/05/2008 09:37:52
185
20
WPF Image UriSource and Data Binding
I'm trying to bind a list of custom objects to a WPF Image like this: <Image> <Image.Source> <BitmapImage UriSource="{Binding Path=ImagePath}" /> </Image.Source> </Image> But it doesn't work. This is the error I'm getting: *"Property 'UriSource' or property 'StreamSource' must be set."* What am I missing?
.net
wpf
data-binding
xaml
null
null
open
WPF Image UriSource and Data Binding === I'm trying to bind a list of custom objects to a WPF Image like this: <Image> <Image.Source> <BitmapImage UriSource="{Binding Path=ImagePath}" /> </Image.Source> </Image> But it doesn't work. This is the error I'm getting: *"Property 'UriSource' or property 'StreamSource' must be set."* What am I missing?
0
20,587
08/21/2008 17:21:21
1,950
08/19/2008 14:57:18
21
1
Execute stored procedure (SQL 2005) and place results into a CSV file on a FTP location
I want to get the results of a stored procedure and place them into a CSV file onto a FTP location. The catch though is that I cannot create a local/temporary file that I can then FTP over. The approach I was taking was to use an SSIS package to create a temporary file and then have a FTP Task within the pack to FTP the file over, but our DBA's do not allow temporary files to be created on any servers.
sql-server
ftp
ssis
null
null
null
open
Execute stored procedure (SQL 2005) and place results into a CSV file on a FTP location === I want to get the results of a stored procedure and place them into a CSV file onto a FTP location. The catch though is that I cannot create a local/temporary file that I can then FTP over. The approach I was taking was to use an SSIS package to create a temporary file and then have a FTP Task within the pack to FTP the file over, but our DBA's do not allow temporary files to be created on any servers.
0
20,597
08/21/2008 17:26:18
2,025
08/19/2008 20:59:50
81
18
FTP in NetBeans 6.1
Is there an FTP browser hiding away in NetBeans 6.1? The help manual doesn't even suggest FTP exists. All I've been able to find so far is a tree viewer in the Services panel (no edit controls) and the ability to upload projects, folders and specific files from the Projects/Files views. Is there anywhere to delete or rename or will I have to keep switching back to my browser? I can see from the previews that there's a nice FTP controller in 6.5 but I'm not desperate enough to completely convert to a beta (yet).
ftp
netbeans
null
null
null
null
open
FTP in NetBeans 6.1 === Is there an FTP browser hiding away in NetBeans 6.1? The help manual doesn't even suggest FTP exists. All I've been able to find so far is a tree viewer in the Services panel (no edit controls) and the ability to upload projects, folders and specific files from the Projects/Files views. Is there anywhere to delete or rename or will I have to keep switching back to my browser? I can see from the previews that there's a nice FTP controller in 6.5 but I'm not desperate enough to completely convert to a beta (yet).
0
20,598
08/21/2008 17:26:23
572
08/06/2008 20:56:54
993
84
If I have a PHP string in the format YYYY-DD-MM and a timestamp in MySQL, is there a good way to convert between them?
I'm interested in doing comparisons between the date string and the MySQL timestamp. However, I'm not seeing an easy conversion. Am I overlooking something obvious?
php
mysql
date
time
timestamp
null
open
If I have a PHP string in the format YYYY-DD-MM and a timestamp in MySQL, is there a good way to convert between them? === I'm interested in doing comparisons between the date string and the MySQL timestamp. However, I'm not seeing an easy conversion. Am I overlooking something obvious?
0
20,611
08/21/2008 17:31:27
1,965
08/19/2008 15:51:08
465
28
Removing nodes from an XmlDocument
The following code should find the appropriate project tag and remove it from the XmlDocument, however when I test it, it says: **The node to be removed is not a child of this node.** Does anyone know the proper way to do this? public void DeleteProject (string projectName) { string ccConfigPath = ConfigurationManager.AppSettings["ConfigPath"]; XmlDocument configDoc = new XmlDocument(); configDoc.Load(ccConfigPath); XmlNodeList projectNodes = configDoc.GetElementsByTagName("project"); for (int i = 0; i < projectNodes.Count; i++) { if (projectNodes[i].Attributes["name"] != null) { if (projectName == projectNodes[i].Attributes["name"].InnerText) { configDoc.RemoveChild(projectNodes[i]); configDoc.Save(ccConfigPath); } } } }
xml
c#
.net
xmldocument
null
null
open
Removing nodes from an XmlDocument === The following code should find the appropriate project tag and remove it from the XmlDocument, however when I test it, it says: **The node to be removed is not a child of this node.** Does anyone know the proper way to do this? public void DeleteProject (string projectName) { string ccConfigPath = ConfigurationManager.AppSettings["ConfigPath"]; XmlDocument configDoc = new XmlDocument(); configDoc.Load(ccConfigPath); XmlNodeList projectNodes = configDoc.GetElementsByTagName("project"); for (int i = 0; i < projectNodes.Count; i++) { if (projectNodes[i].Attributes["name"] != null) { if (projectName == projectNodes[i].Attributes["name"].InnerText) { configDoc.RemoveChild(projectNodes[i]); configDoc.Save(ccConfigPath); } } } }
0
20,627
08/21/2008 17:39:03
547
08/06/2008 16:09:22
459
35
why are downloads sometimes tagged md5, sha1 and other hash indicators?
I've seen this all over the place: > Download here! SHA1 = > 8e1ed2ce9e7e473d38a9dc7824a384a9ac34d7d0 what does it mean? how does a hash come into play as far as downloads and... what use can I make of it? Is this a legacy item where you used to have to verify some checksum after you downloaded the whole file? Just curious, Cheers, /mp
hash
download
checksum
null
null
null
open
why are downloads sometimes tagged md5, sha1 and other hash indicators? === I've seen this all over the place: > Download here! SHA1 = > 8e1ed2ce9e7e473d38a9dc7824a384a9ac34d7d0 what does it mean? how does a hash come into play as far as downloads and... what use can I make of it? Is this a legacy item where you used to have to verify some checksum after you downloaded the whole file? Just curious, Cheers, /mp
0
20,658
08/21/2008 17:52:09
1,490
08/15/2008 21:35:24
86
17
Determine if my PC supports HW Virtualization
How, in general, does one determine if a PC supports hardware virtualization? I use VirtualPC to set up parallel test environments and I'd enjoy a bit of a speed boost.
virtualization
virtual-pc
null
null
null
null
open
Determine if my PC supports HW Virtualization === How, in general, does one determine if a PC supports hardware virtualization? I use VirtualPC to set up parallel test environments and I'd enjoy a bit of a speed boost.
0
20,663
08/21/2008 17:56:10
1,793
08/18/2008 15:34:34
13
1
Do you use AOP (Aspect Oriented Programming) in production software?
AOP is an interesting programming paradigm in my opinion. However, there haven't been discussions about it yet here on stackoverflow (at least I couldn't find them). What do you think about it in general? Do you use AOP in your projects? Or do you think it's rather a niche technology that won't be around for a long time or won't make it into the mainstream (like OOP did, at least in theory ;))? If you do use AOP then please let us know which tools you use as well. Thanks!
technologies
aop
paradigms
null
null
null
open
Do you use AOP (Aspect Oriented Programming) in production software? === AOP is an interesting programming paradigm in my opinion. However, there haven't been discussions about it yet here on stackoverflow (at least I couldn't find them). What do you think about it in general? Do you use AOP in your projects? Or do you think it's rather a niche technology that won't be around for a long time or won't make it into the mainstream (like OOP did, at least in theory ;))? If you do use AOP then please let us know which tools you use as well. Thanks!
0
20,674
08/21/2008 18:02:04
1,190
08/13/2008 12:15:38
511
42
Is there a way to call a private Class method from an instance in Ruby?
Other than `self.class.send :method, args...`, of course. I'd like to make a rather complex method available at both the class and instance level without duplicating the code.
ruby
scope
visibility
null
null
null
open
Is there a way to call a private Class method from an instance in Ruby? === Other than `self.class.send :method, args...`, of course. I'd like to make a rather complex method available at both the class and instance level without duplicating the code.
0
20,675
08/21/2008 18:02:48
357
08/05/2008 01:29:23
870
56
ASP/VBScript - Int() vs CInt()
What is the difference in ASP/VBScript between Int() & CInt()?
asp
vbscript
null
null
null
null
open
ASP/VBScript - Int() vs CInt() === What is the difference in ASP/VBScript between Int() & CInt()?
0
20,684
08/21/2008 18:07:33
689
08/07/2008 20:33:45
29
2
Linq to SQL - Underlying Column Length
I've been using Linq to SQL for some time now and I find it to be really helpful and easy to use. With other ORM tools I've used in the past, the entity object filled from the database normally has a property indicating the length of the underlying data column in the database. This is helpful in databinding situations where you can set the MaxLength property on a textbox, for example, to limit the length of input entered by the user. I cannot find a way using Linq to SQL to obtain the length of an underlying data column. Does anyone know of a way to do this? Help please.
linq-to-sql
null
null
null
null
null
open
Linq to SQL - Underlying Column Length === I've been using Linq to SQL for some time now and I find it to be really helpful and easy to use. With other ORM tools I've used in the past, the entity object filled from the database normally has a property indicating the length of the underlying data column in the database. This is helpful in databinding situations where you can set the MaxLength property on a textbox, for example, to limit the length of input entered by the user. I cannot find a way using Linq to SQL to obtain the length of an underlying data column. Does anyone know of a way to do this? Help please.
0
20,696
08/21/2008 18:13:01
1,084
08/12/2008 11:01:49
162
24
How do I declare a list of fixed length in specman?
In E (specman) I want to declare variables that are lists, and I want to fix their lengths. It's easy to do for a member of a struct: thread[2] : list of thread_t; while for a "regular" variable in a function the above doesn't work, and I have to do something like: var warned : list of bool; gen warned keeping { it.size() == 5; }; Is there a better way to declare a list of fixed size?
specman
null
null
null
null
null
open
How do I declare a list of fixed length in specman? === In E (specman) I want to declare variables that are lists, and I want to fix their lengths. It's easy to do for a member of a struct: thread[2] : list of thread_t; while for a "regular" variable in a function the above doesn't work, and I have to do something like: var warned : list of bool; gen warned keeping { it.size() == 5; }; Is there a better way to declare a list of fixed size?
0
20,702
08/21/2008 18:16:55
1,988
08/19/2008 17:42:59
21
1
What's your/a good limit for cyclomatic complexity?
Our customers have begun to impose cyclomatic complexity requirements on the software within our products, and our internal process "improvement" group has decided to make cyclomatic complexity part of our coding standards. Both the customer and our internal group have set their (recommendation for an) upper limit at 10. I've argued that if 10 is the recommendation/guideline, then developers will write code that hits 15 or 20. In my opinion, the limit should be set at 5 with the allowance for functions to exceed that when necessary (as determined by review or some other process). So, my question is, what do other people do? What kind of complexity limits are you willing to to tolerate (high or low)? What do you strive for when you write code?
complexity
coding-style
null
null
null
null
open
What's your/a good limit for cyclomatic complexity? === Our customers have begun to impose cyclomatic complexity requirements on the software within our products, and our internal process "improvement" group has decided to make cyclomatic complexity part of our coding standards. Both the customer and our internal group have set their (recommendation for an) upper limit at 10. I've argued that if 10 is the recommendation/guideline, then developers will write code that hits 15 or 20. In my opinion, the limit should be set at 5 with the allowance for functions to exceed that when necessary (as determined by review or some other process). So, my question is, what do other people do? What kind of complexity limits are you willing to to tolerate (high or low)? What do you strive for when you write code?
0
20,709
08/21/2008 18:23:18
1,430
08/15/2008 15:29:36
18
6
Which PHP Framework will get me to a usable UI the fastest?
There are a lot of php mvc frameworks out there now. Which one will get me to a frontend, a backend, a user system with permissions the fastest. I like the look of things like [Symfony][1] or [Codeigniter][2] but there seems to be a lot of re-inventing the wheel involved. Every web application is going to have some users, even if they're just administrators, and is going to have an admin page. Most will have some static content as well as coded modules and active features in a configurable templating system. I'd love to install some package and start with a system that does all that that so that I can focus on the hard parts. I'm looking to build and internal order enttry and tracking system if that has any impact on your answer. [1]: http://www.symfony-project.org/ [2]: http://codeigniter.com/
php
null
null
null
null
null
open
Which PHP Framework will get me to a usable UI the fastest? === There are a lot of php mvc frameworks out there now. Which one will get me to a frontend, a backend, a user system with permissions the fastest. I like the look of things like [Symfony][1] or [Codeigniter][2] but there seems to be a lot of re-inventing the wheel involved. Every web application is going to have some users, even if they're just administrators, and is going to have an admin page. Most will have some static content as well as coded modules and active features in a configurable templating system. I'd love to install some package and start with a system that does all that that so that I can focus on the hard parts. I'm looking to build and internal order enttry and tracking system if that has any impact on your answer. [1]: http://www.symfony-project.org/ [2]: http://codeigniter.com/
0
20,718
08/21/2008 18:29:42
533
08/06/2008 15:17:04
392
24
Testing .NET code in partial trust environments
I want to test the behavior of a certain piece of .NET code in partial trust environments. What's the fastest way to set this up? Feel free to assume that I (and other readers) are total CAS noobs.
.net
cas
null
null
null
null
open
Testing .NET code in partial trust environments === I want to test the behavior of a certain piece of .NET code in partial trust environments. What's the fastest way to set this up? Feel free to assume that I (and other readers) are total CAS noobs.
0
20,722
08/21/2008 18:30:49
375
08/05/2008 09:55:57
104
4
Browser version detection with Silverlight
How can I efficiently and effectively detect the version and, for that matter, any available information, of the version of [Silverlight][1] currently running on the browser? [1]: http://silverlight.net/
silverlight
internet
browser
ria
null
null
open
Browser version detection with Silverlight === How can I efficiently and effectively detect the version and, for that matter, any available information, of the version of [Silverlight][1] currently running on the browser? [1]: http://silverlight.net/
0
20,728
08/21/2008 18:35:04
1,321
08/14/2008 14:09:30
1
0
What's the best way to create ClickOnce deployments
Our team develops distributed winform apps. We use ClickOnce for deployment and are very pleased with it. However, we've found the pain point with ClickOnce is in _creating_ the deployments. We have the standard dev/test/production environments and need to be able to create deployments for each of these that install and update separate from one another. Also, we want control over what assemblies get deployed. Just because an assembly was compiled doesn't mean we want it deployed. The obvious first choice for creating deployments is Visual Studio. However, VS really doesn't address the issues stated. The next in line is the SDK tool, Mage. Mage works OK but creating deployments is rather tedious and we don't want every developer having our code signing certificate and password. What we ended up doing was rolling our own deployment app that uses the command line version of Mage to create the ClickOnce manifest files. I'm satisfied with our current solution but is seems like there would be an industry-wide, accepted approach to this problem. Is there?
winforms
deployment
clickonce
null
null
null
open
What's the best way to create ClickOnce deployments === Our team develops distributed winform apps. We use ClickOnce for deployment and are very pleased with it. However, we've found the pain point with ClickOnce is in _creating_ the deployments. We have the standard dev/test/production environments and need to be able to create deployments for each of these that install and update separate from one another. Also, we want control over what assemblies get deployed. Just because an assembly was compiled doesn't mean we want it deployed. The obvious first choice for creating deployments is Visual Studio. However, VS really doesn't address the issues stated. The next in line is the SDK tool, Mage. Mage works OK but creating deployments is rather tedious and we don't want every developer having our code signing certificate and password. What we ended up doing was rolling our own deployment app that uses the command line version of Mage to create the ClickOnce manifest files. I'm satisfied with our current solution but is seems like there would be an industry-wide, accepted approach to this problem. Is there?
0