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
7,190
08/10/2008 13:09:13
371
08/05/2008 09:14:27
73
3
Setting up Continuous Integration with SVN
What tools would you recommend for setting up CI for build and deployment of multiple websites built on DotNetNuke using SVN for source control? We are currently looking at configuring Cruise Control to work with NAnt, NUnit, NCover and Trac as a test case. What other combinations would worth investigating? We have full control of our development environment so using some form of CI is certain here but I would also like to convince our production services team that they can reliably deploy to the system test, uat and even production environments using these tools.
continuous-integration
null
null
null
null
null
open
Setting up Continuous Integration with SVN === What tools would you recommend for setting up CI for build and deployment of multiple websites built on DotNetNuke using SVN for source control? We are currently looking at configuring Cruise Control to work with NAnt, NUnit, NCover and Trac as a test case. What other combinations would worth investigating? We have full control of our development environment so using some form of CI is certain here but I would also like to convince our production services team that they can reliably deploy to the system test, uat and even production environments using these tools.
0
7,209
08/10/2008 14:49:10
209
08/03/2008 13:54:19
11
2
Alpha blending sprites in Nintendo DS Homebrew
I'm trying to alpha blend sprites and backgrounds with [devkitPro][1] (including libnds, libarm, etc). Does anyone know how to do this? [1]: http://www.devkitpro.org/
c++
c
homebrew
nds
nintendods
null
open
Alpha blending sprites in Nintendo DS Homebrew === I'm trying to alpha blend sprites and backgrounds with [devkitPro][1] (including libnds, libarm, etc). Does anyone know how to do this? [1]: http://www.devkitpro.org/
0
7,211
08/10/2008 15:03:20
916
08/10/2008 11:21:51
6
2
What's the best way of converting a mysql database to a sqlite one?
I currently have a relatively small (4 or 5 tables, 5000 rows) MySQL database that I would like to convert to an sqlite database. As I'd potentially have to do this more than once, I'd be grateful if anyone could recommend any useful tools, or at least any easily-replicated method. (I have complete admin access to the database/machines involved.)
database
sql
mysql
databases
sqlite
null
open
What's the best way of converting a mysql database to a sqlite one? === I currently have a relatively small (4 or 5 tables, 5000 rows) MySQL database that I would like to convert to an sqlite database. As I'd potentially have to do this more than once, I'd be grateful if anyone could recommend any useful tools, or at least any easily-replicated method. (I have complete admin access to the database/machines involved.)
0
7,212
08/10/2008 15:05:33
266
08/04/2008 10:02:44
411
19
Is it possible to add behavior to a non-dynamic ActionScript 3 class without inheriting the class?
What I'd like to do is something like the following: FooClass.prototype.method = function():String { return "Something"; } var foo:FooClass = new FooClass(); foo.method(); Which is to say, I'd like to extend a generated class with a single method, not via inheritance but via the prototype. The class is generated from a WSDL, it's not a dynamic class, and I don't want to touch the generated code because it will be overwritten anyway. Long story short, I'd like to have the moral equivalent of C# 3:s Extension Methods for AS3.
flex
extension-methods
actionscript
null
null
null
open
Is it possible to add behavior to a non-dynamic ActionScript 3 class without inheriting the class? === What I'd like to do is something like the following: FooClass.prototype.method = function():String { return "Something"; } var foo:FooClass = new FooClass(); foo.method(); Which is to say, I'd like to extend a generated class with a single method, not via inheritance but via the prototype. The class is generated from a WSDL, it's not a dynamic class, and I don't want to touch the generated code because it will be overwritten anyway. Long story short, I'd like to have the moral equivalent of C# 3:s Extension Methods for AS3.
0
7,214
08/10/2008 15:10:41
916
08/10/2008 11:21:51
6
2
User authentication on Resin webserver
I'm currently tasked with replacing an Apache + Resin Java web server with a Resin-only configuration. Currently in our apache setup, we use .htaccess and a small user database to provide passwording at a directory level. Does anyone know the equivalent setup when using just Resin as the web server?
apache
configuration
webserver
resin
caucho
null
open
User authentication on Resin webserver === I'm currently tasked with replacing an Apache + Resin Java web server with a Resin-only configuration. Currently in our apache setup, we use .htaccess and a small user database to provide passwording at a directory level. Does anyone know the equivalent setup when using just Resin as the web server?
0
7,231
08/10/2008 16:16:15
925
08/10/2008 16:16:15
1
0
Automatically check bounced emails via POP3 ?
Can anyone recommend software or even a .net library to develop software, that will check for bounced emails and the reason for the bounce? I get bounced emails into a pop3 account that I can read then... I need it to keep my user database clean from invalid email addresses and want to automate this (mark user as invalid email). Thanks
.net
software
pop3
check
bouncedemail
null
open
Automatically check bounced emails via POP3 ? === Can anyone recommend software or even a .net library to develop software, that will check for bounced emails and the reason for the bounce? I get bounced emails into a pop3 account that I can read then... I need it to keep my user database clean from invalid email addresses and want to automate this (mark user as invalid email). Thanks
0
7,237
08/10/2008 16:46:12
799
08/09/2008 02:28:22
33
1
Does running a SQL Server 2005 database in compatibility level 80 have a negative impact on performance?
Our software must be able to run on SQL Server 2000 and 2005. To simplify development, we're running our SQL Server 2005 databases in compatibility level 80. However, database performance seems slower on SQL 2005 than on SQL 2000 in some cases (we have not confirmed this using benchmarks yet). Would upgrading the compatibility level to 90 improve performance on the SQL 2005 servers?
mssql
databases
null
null
null
null
open
Does running a SQL Server 2005 database in compatibility level 80 have a negative impact on performance? === Our software must be able to run on SQL Server 2000 and 2005. To simplify development, we're running our SQL Server 2005 databases in compatibility level 80. However, database performance seems slower on SQL 2005 than on SQL 2000 in some cases (we have not confirmed this using benchmarks yet). Would upgrading the compatibility level to 90 improve performance on the SQL 2005 servers?
0
7,244
08/10/2008 17:14:10
905
08/10/2008 09:37:14
1
4
Anyone know a good workaround for the lack of an enum generic constraint?
What I want to do is something like this: I have enums with combined flagged values. public static class EnumExtension { public static bool IsSet<T>( this T input, T matchTo ) where T:enum { return (input & matchTo) != 0; } } So then I could do: MyEnum tester = MyEnum.FlagA | MyEnum.FlagB if( tester.IsSet( MyEnum.FlagA ) ) 'act on flag a Unfortunately C#'s generic where constraints have no enum restriction, only class and struct. C# doesn't see enums as structs (even though they are value types) so I can't add extension types like this. Anyone know a workaround?
c#
enums
flags
null
null
null
open
Anyone know a good workaround for the lack of an enum generic constraint? === What I want to do is something like this: I have enums with combined flagged values. public static class EnumExtension { public static bool IsSet<T>( this T input, T matchTo ) where T:enum { return (input & matchTo) != 0; } } So then I could do: MyEnum tester = MyEnum.FlagA | MyEnum.FlagB if( tester.IsSet( MyEnum.FlagA ) ) 'act on flag a Unfortunately C#'s generic where constraints have no enum restriction, only class and struct. C# doesn't see enums as structs (even though they are value types) so I can't add extension types like this. Anyone know a workaround?
0
7,245
08/10/2008 17:16:55
758
08/08/2008 15:40:58
21
14
Puzzle: Find largest rectangle
What's the most efficient algorithm to find the rectangle with the largest area which will fit in the empty space? Let's say the screen looks like this ('#' represents filled area): .................... ..............###### ##.................. .................### .................### #####............... #####............... #####............... A probable solution is: .................... ..............###### ##...++++++++++++... .....++++++++++++### .....++++++++++++### #####++++++++++++... #####++++++++++++... #####++++++++++++... Normally I'd enjoy figuring out a solution. Although this time I'd like to avoid wasting time fumbling around on my own since this has a practical use for a project I'm working on. Is there a well-known solution?
algorithm
geometry
math
null
null
null
open
Puzzle: Find largest rectangle === What's the most efficient algorithm to find the rectangle with the largest area which will fit in the empty space? Let's say the screen looks like this ('#' represents filled area): .................... ..............###### ##.................. .................### .................### #####............... #####............... #####............... A probable solution is: .................... ..............###### ##...++++++++++++... .....++++++++++++### .....++++++++++++### #####++++++++++++... #####++++++++++++... #####++++++++++++... Normally I'd enjoy figuring out a solution. Although this time I'd like to avoid wasting time fumbling around on my own since this has a practical use for a project I'm working on. Is there a well-known solution?
0
7,252
08/10/2008 17:34:46
573
08/06/2008 21:00:42
129
14
How to make junior programmers write tests?
We have a junior programmer that simply doesn't write enough tests. I have to nag him every two hours, "have you written tests?". We've tried: - Showing that the design becomes simpler - Showing it prevents defects - Making it an ego thing saying only bad programmers don't - This weekend 2 team members had to come to work because his code had a NULL reference and he didn't test it My work requires top quality stable code, and usually everyone 'get it' and there's no need to push tests through. We know we can make him write tests, but we all know the useful tests are those written when you're into it. Do you know of more motivations?
testing
bestpractices
unittesting
null
null
null
open
How to make junior programmers write tests? === We have a junior programmer that simply doesn't write enough tests. I have to nag him every two hours, "have you written tests?". We've tried: - Showing that the design becomes simpler - Showing it prevents defects - Making it an ego thing saying only bad programmers don't - This weekend 2 team members had to come to work because his code had a NULL reference and he didn't test it My work requires top quality stable code, and usually everyone 'get it' and there's no need to push tests through. We know we can make him write tests, but we all know the useful tests are those written when you're into it. Do you know of more motivations?
0
7,260
08/10/2008 17:50:11
889
08/10/2008 08:04:03
35
0
How do I setup Public-Key Authentication?
How do I setup Public-Key Authentication for SSH?
linux
ssh
null
null
null
null
open
How do I setup Public-Key Authentication? === How do I setup Public-Key Authentication for SSH?
0
7,269
08/10/2008 18:06:04
931
08/10/2008 18:42:39
1
2
How can I identify in which Java Applet context I'm running without passing an ID?
I'm part of a team that develops a pretty big Swing Java Applet. Most of our code is legacy and there are tons of singleton references. We've bunched all of them to a single "application context" singleton. What we now need is to create some way to separate the shared context (shared across all applets currently showing) and non-shared context (specific to each applet currently showing). However, we don't have an ID at each of the locations that call to the singleton, nor do we want to propagate the ID to all locations. What's the easiest way to identify in which applet context we're running? (I've tried messing with classloaders, thread groups, thread ids... so far I could find nothing that will enabled me to ID the origin of the call).
java
swing
applet
null
null
null
open
How can I identify in which Java Applet context I'm running without passing an ID? === I'm part of a team that develops a pretty big Swing Java Applet. Most of our code is legacy and there are tons of singleton references. We've bunched all of them to a single "application context" singleton. What we now need is to create some way to separate the shared context (shared across all applets currently showing) and non-shared context (specific to each applet currently showing). However, we don't have an ID at each of the locations that call to the singleton, nor do we want to propagate the ID to all locations. What's the easiest way to identify in which applet context we're running? (I've tried messing with classloaders, thread groups, thread ids... so far I could find nothing that will enabled me to ID the origin of the call).
0
7,272
08/10/2008 18:11:08
145
08/02/2008 14:40:17
197
10
Of Ways to Count the Limitless Primes
Recently I've been cobbling together a little library of prime checks. **"Why?"** you ask? **"Well, just because."** I respond. I've implemented a couple and have seen the post on the [the most efficient way to find the first 10000](http://stackoverflow.com/questions/622/most-efficient-code-for-the-first-10000-prime-numbers), but what I'm wanting to know is: - **How many unique ways are there of finding primes and what are they?** And by _unique_ I mean bearing enough difference as to make it useful for them to be different functions within the same library....
prime
primes
language-agnostic
null
null
null
open
Of Ways to Count the Limitless Primes === Recently I've been cobbling together a little library of prime checks. **"Why?"** you ask? **"Well, just because."** I respond. I've implemented a couple and have seen the post on the [the most efficient way to find the first 10000](http://stackoverflow.com/questions/622/most-efficient-code-for-the-first-10000-prime-numbers), but what I'm wanting to know is: - **How many unique ways are there of finding primes and what are they?** And by _unique_ I mean bearing enough difference as to make it useful for them to be different functions within the same library....
0
7,277
08/10/2008 18:20:38
755
08/08/2008 15:28:16
55
5
Is it "bad practice" to be sensitive to linebreaks in XML documents?
I'm generating some XML documents and when it comes to the address part I have fragments that look like this: <Address>15 Sample St Example Bay Some Country</Address> The XSLT that I have for converting this to XHTML has some funky recursive template to convert newline characters within strings to &lt;br/&gt; tags. This is all working fine; but is it considered "bad practice" to rely on linebreaks within XML documents? If so, is it recommended that I do this instead? <Address><Line>15 Sample St</Line> <Line>Example Bay</Line> <Line>Some Country</Line></Address> Seems like it'd be really awkward to wrap every place where my text may be multiple lines with tags like that..
xml
xslt
xhtml
linebreaks
whitespace
null
open
Is it "bad practice" to be sensitive to linebreaks in XML documents? === I'm generating some XML documents and when it comes to the address part I have fragments that look like this: <Address>15 Sample St Example Bay Some Country</Address> The XSLT that I have for converting this to XHTML has some funky recursive template to convert newline characters within strings to &lt;br/&gt; tags. This is all working fine; but is it considered "bad practice" to rely on linebreaks within XML documents? If so, is it recommended that I do this instead? <Address><Line>15 Sample St</Line> <Line>Example Bay</Line> <Line>Some Country</Line></Address> Seems like it'd be really awkward to wrap every place where my text may be multiple lines with tags like that..
0
7,284
08/10/2008 18:41:02
198
08/03/2008 12:18:28
185
23
What is Turing Complete?
What does the expression Turing Complete means? Can you give a simple explanation, without going into too much theoretical details?
language
theory
null
null
null
null
open
What is Turing Complete? === What does the expression Turing Complete means? Can you give a simple explanation, without going into too much theoretical details?
0
7,287
08/10/2008 18:49:53
573
08/06/2008 21:00:42
144
15
How do you test/change untested and untestable code?
Lately I had to change some code on older systems where not all of the code has unit tests. Before making the changes I want to write tests, but each class created a lot of dependencies and other anti-patterns which made testing quite hard. Obviously, I wanted to refactor the code to make it easier to test, write the tests and then change it. Is this the way you'd do it? Or would you spend a lot of time writing the hard-to-write tests that would be mostly removed after the refactoring will be completed? Any insights are welcome!
unittesting
refactoring
legacy
null
null
null
open
How do you test/change untested and untestable code? === Lately I had to change some code on older systems where not all of the code has unit tests. Before making the changes I want to write tests, but each class created a lot of dependencies and other anti-patterns which made testing quite hard. Obviously, I wanted to refactor the code to make it easier to test, write the tests and then change it. Is this the way you'd do it? Or would you spend a lot of time writing the hard-to-write tests that would be mostly removed after the refactoring will be completed? Any insights are welcome!
0
7,291
08/10/2008 19:00:02
573
08/06/2008 21:00:42
144
15
Any good java source code analyzing and modifying libraries?
I'm working on an app that converts source code from using one framework to another. I really wanted to make the agonizing monotonous job automatic. After looking a lot for something that code help me treat source code in an object-oriented way and modify it the closest thing I've found was [JaxMeJS][1] and that's short of what I need too. I've been working at creating my own parser using [antlr][2], but would love not having to do it by myself. Any recommendations? Of course I'd rather a Java solution, but I have an open mind. Thanks! [1]: http://ws.apache.org/jaxme/js/index.html [2]: http://antlr.org/
java
sourcecode
staticcodeanalyzing
null
null
null
open
Any good java source code analyzing and modifying libraries? === I'm working on an app that converts source code from using one framework to another. I really wanted to make the agonizing monotonous job automatic. After looking a lot for something that code help me treat source code in an object-oriented way and modify it the closest thing I've found was [JaxMeJS][1] and that's short of what I need too. I've been working at creating my own parser using [antlr][2], but would love not having to do it by myself. Any recommendations? Of course I'd rather a Java solution, but I have an open mind. Thanks! [1]: http://ws.apache.org/jaxme/js/index.html [2]: http://antlr.org/
0
7,348
08/10/2008 21:00:14
636
08/07/2008 12:32:33
69
12
Zip library options for the Compact Framework?
My requirements: * Support .NET Compact Framework 2.0 and Windows Mobile 6.0 devices. * Only need to unzip the contents to a directory on a storage card. Creation of zip files is not required. * Must be able to use in corporate/commercial software. * Can be open source, but not have GPL or other viral license. I've seen the [Xceed Zip for CF][1] library. What other options are there? [1]: http://xceed.com/Zip_NET_CF_Intro.html
windows-mobile
compactframework
zip
component
null
null
open
Zip library options for the Compact Framework? === My requirements: * Support .NET Compact Framework 2.0 and Windows Mobile 6.0 devices. * Only need to unzip the contents to a directory on a storage card. Creation of zip files is not required. * Must be able to use in corporate/commercial software. * Can be open source, but not have GPL or other viral license. I've seen the [Xceed Zip for CF][1] library. What other options are there? [1]: http://xceed.com/Zip_NET_CF_Intro.html
0
7,364
08/10/2008 21:58:24
277
08/04/2008 10:55:22
68
2
PDF Editing in PHP?
Does anyone know of a good method for editing PDFs in PHP? Preferably open-source/zero-license cost methods. :) I am thinking along the lines of opening a PDF file, replacing text in the PDF and then writing out the modified version of the PDF? I have programmatically created PDF files in the past using FPDF, but found it a little unwieldy at times.
php
pdf
null
null
null
null
open
PDF Editing in PHP? === Does anyone know of a good method for editing PDFs in PHP? Preferably open-source/zero-license cost methods. :) I am thinking along the lines of opening a PDF file, replacing text in the PDF and then writing out the modified version of the PDF? I have programmatically created PDF files in the past using FPDF, but found it a little unwieldy at times.
0
7,366
08/10/2008 22:06:11
277
08/04/2008 10:55:22
68
2
PDF Creation Tutorials?
Are there any good tutorials or guides on the web for creating PDF files programmatically? I am especially thinking of discussing best practices in a language-agnostic way, though something tied to a language could also be useful. Do PDF libraries tend to have multiple APIs for different languages or are they usually tied to one particular technology? I have used FPDF in the past and it served its purpose, but I would certain like to know if people have had success with other libraries and techniques.
bestpractices
pdf
null
null
null
null
open
PDF Creation Tutorials? === Are there any good tutorials or guides on the web for creating PDF files programmatically? I am especially thinking of discussing best practices in a language-agnostic way, though something tied to a language could also be useful. Do PDF libraries tend to have multiple APIs for different languages or are they usually tied to one particular technology? I have used FPDF in the past and it served its purpose, but I would certain like to know if people have had success with other libraries and techniques.
0
7,367
08/10/2008 22:06:49
945
08/10/2008 22:06:49
1
0
Visual Studio - new "default" property values for inherited controls
I'm looking for help setting a new default property value for an inherited control in Visual Studio: class NewCombo : System.Windows.Forms.ComboBox { public NewCombo() { DropDownItems = 50; } } The problem is that the base class property "DropDownItems" has a 'default' attribute set on it that is a different value (not 50). As a result, when I drag the control onto a form, the designer file gets an explicit 'mycontrol.DropDownItems = 50;' line. At first this doesn't matter. But if later I change my inherited class to 'DropDownItems = 45;' in the constructor this does not affect any of the controls on any form since all those designer files still have the value 50 hardcoded in them. And the whole point was to have the value set in one place so I can deal with the customer changing his mind. Obviously, if I were creating my own custom property in the subclass, I could give it its own designer default attribute of whatever I wanted. But here I'm wanting to change the default values of properties in the base. Is there any way to apply Visual Studio attributes to a base class member? Or is there some other workaround to get the result I want? Thanks for any help
c#
.net
visual-studio
vb.net
null
null
open
Visual Studio - new "default" property values for inherited controls === I'm looking for help setting a new default property value for an inherited control in Visual Studio: class NewCombo : System.Windows.Forms.ComboBox { public NewCombo() { DropDownItems = 50; } } The problem is that the base class property "DropDownItems" has a 'default' attribute set on it that is a different value (not 50). As a result, when I drag the control onto a form, the designer file gets an explicit 'mycontrol.DropDownItems = 50;' line. At first this doesn't matter. But if later I change my inherited class to 'DropDownItems = 45;' in the constructor this does not affect any of the controls on any form since all those designer files still have the value 50 hardcoded in them. And the whole point was to have the value set in one place so I can deal with the customer changing his mind. Obviously, if I were creating my own custom property in the subclass, I could give it its own designer default attribute of whatever I wanted. But here I'm wanting to change the default values of properties in the base. Is there any way to apply Visual Studio attributes to a base class member? Or is there some other workaround to get the result I want? Thanks for any help
0
7,388
08/10/2008 22:57:00
292
08/04/2008 13:14:31
234
13
best IDE's
I'm looking to learn python and wasn't sure what IDE's are available, what is the best one, etc. As a way of making the question more general, lets try to establish a definitive list of the best IDE for all languages. Obviously for the .NET Languages its VS and for Java its Eclipse. what about Python? Ruby? x86 assembly(are there even any ide's for this?)?
ide
language-agnostic
null
null
null
08/20/2011 14:09:15
not constructive
best IDE's === I'm looking to learn python and wasn't sure what IDE's are available, what is the best one, etc. As a way of making the question more general, lets try to establish a definitive list of the best IDE for all languages. Obviously for the .NET Languages its VS and for Java its Eclipse. what about Python? Ruby? x86 assembly(are there even any ide's for this?)?
4
7,398
08/10/2008 23:10:53
737
08/08/2008 13:06:33
36
1
How to avoid redefining VERSION, PACKAGE, etc.
I haven't seen any questions relating to GNU autoconf/automake builds, but I'm hoping at least some of you out there are familiar with it. Here goes: I have a project (I'll call it myproject) that includes another project (vendor). The vendor project is a standalone project maintained by someone else. Including a project like this is fairly [straightforward][1], but in this case there is a tiny snag: each project generates its own config.h file, each of which defines standard macros such as PACKAGE, VERSION, etc. This means that, during the build, when vendor is being built, I get lots of errors like this: ... warning: "VERSION" redefined ... warning: this is the location of the previous definition ... warning: "PACKAGE" redefined ... warning: this is the location of the previous definition These are just warnings, for the time being at least, but I would like to get rid of them. The only relevant information I've been able to turn up with a google search is [this][2] thread on the automake mailing list, which isn't a whole lot of help. Does anybody else have any better ideas? [1]: http://www.gnu.org/software/autoconf/manual/autoconf.html#Subdirectories [2]: http://sourceware.org/ml/automake/2004-03/msg00130.html
c
linux
unix
automake
autoconf
null
open
How to avoid redefining VERSION, PACKAGE, etc. === I haven't seen any questions relating to GNU autoconf/automake builds, but I'm hoping at least some of you out there are familiar with it. Here goes: I have a project (I'll call it myproject) that includes another project (vendor). The vendor project is a standalone project maintained by someone else. Including a project like this is fairly [straightforward][1], but in this case there is a tiny snag: each project generates its own config.h file, each of which defines standard macros such as PACKAGE, VERSION, etc. This means that, during the build, when vendor is being built, I get lots of errors like this: ... warning: "VERSION" redefined ... warning: this is the location of the previous definition ... warning: "PACKAGE" redefined ... warning: this is the location of the previous definition These are just warnings, for the time being at least, but I would like to get rid of them. The only relevant information I've been able to turn up with a google search is [this][2] thread on the automake mailing list, which isn't a whole lot of help. Does anybody else have any better ideas? [1]: http://www.gnu.org/software/autoconf/manual/autoconf.html#Subdirectories [2]: http://sourceware.org/ml/automake/2004-03/msg00130.html
0
7,440
08/11/2008 00:05:36
889
08/10/2008 08:04:03
35
1
What do you use to Unit-Test your Web UI?
The company I'm currently working for is using [Selenium][1] for Uniting-Testing our User Interface. What do you use to Unit-Test your Web UI and how effective do you find it? [1]: http://selenium.openqa.org/
unit-testing
ui
selenium
null
null
null
open
What do you use to Unit-Test your Web UI? === The company I'm currently working for is using [Selenium][1] for Uniting-Testing our User Interface. What do you use to Unit-Test your Web UI and how effective do you find it? [1]: http://selenium.openqa.org/
0
7,470
08/11/2008 01:32:16
150
08/02/2008 16:09:34
128
3
RSS feeds from Gallery2
After a couple hours fighting with the [Gallery2](http://gallery.menalto.com/) [RSS module](http://codex.gallery2.org/Gallery2:Modules:rss) and getting only the message, "no feeds have yet been defined", I gave up. Based on [a Google search for "no feeds have yet been defined"](http://www.google.com/search?q=%22no+feeds+have+yet+been+defined%22), this is a pretty common problem. Do you have any tips and/or tricks for getting the Gallery2 RSS module to work? Or any tips for a relatively-PHP-ignorant developer trying to debug problems with a PHP application?
php
webapp
webapplications
null
null
null
open
RSS feeds from Gallery2 === After a couple hours fighting with the [Gallery2](http://gallery.menalto.com/) [RSS module](http://codex.gallery2.org/Gallery2:Modules:rss) and getting only the message, "no feeds have yet been defined", I gave up. Based on [a Google search for "no feeds have yet been defined"](http://www.google.com/search?q=%22no+feeds+have+yet+been+defined%22), this is a pretty common problem. Do you have any tips and/or tricks for getting the Gallery2 RSS module to work? Or any tips for a relatively-PHP-ignorant developer trying to debug problems with a PHP application?
0
7,472
08/11/2008 01:34:34
856
08/09/2008 17:19:32
1
1
WPF Databinding
Can anyone point me to a good resource (or throw me a clue) to show me how to do databinding to controls (combobox, listbox, etc.) in WPF? I'm at a bit of a loss when all my WinForms niceities are taken away from me, and I'm not all that bright to start with... Many Thanks, my fellow Stackies.
wpf
null
null
null
null
null
open
WPF Databinding === Can anyone point me to a good resource (or throw me a clue) to show me how to do databinding to controls (combobox, listbox, etc.) in WPF? I'm at a bit of a loss when all my WinForms niceities are taken away from me, and I'm not all that bright to start with... Many Thanks, my fellow Stackies.
0
7,477
08/11/2008 01:43:13
841
08/09/2008 09:37:17
1
0
Autosizing Textarea
I'm currently working on an internal sales application for the company I work for, and I've got a form that allows the user to change the delivery address. Now I think it would look much nicer, if the textarea I'm using for the main address details would just take up the area of the text in it, and automatically resize if the text was changed. Any ideas?
css
html
javascript
null
null
null
open
Autosizing Textarea === I'm currently working on an internal sales application for the company I work for, and I've got a form that allows the user to change the delivery address. Now I think it would look much nicer, if the textarea I'm using for the main address details would just take up the area of the text in it, and automatically resize if the text was changed. Any ideas?
0
7,489
08/11/2008 02:50:09
813
08/09/2008 03:58:13
51
8
How do I make a GUI?
I've made many different seperate parts of a GUI system for the Nintendo DS, like buttons and textboxes and select boxes, but I need a way of containing these classes in one Gui class, so that I can draw everything to the screen all at once, and check all the buttons at once to check if any are being pressed. My question is what is the best way organize all the classes (such as buttons and textboxes) into one GUI class? Here's one way I thought of but it doesn't seem right: **Edit:** I'm using C++. class Gui { public: void update_all(); void draw_all() const; int add_button(Button *button); // Returns button id void remove_button(int button_id); private: Button *buttons[10]; int num_buttons; } This code has a few problems, but I just wanted to give you an idea of what I want.
c++
nintendods
gui
null
null
null
open
How do I make a GUI? === I've made many different seperate parts of a GUI system for the Nintendo DS, like buttons and textboxes and select boxes, but I need a way of containing these classes in one Gui class, so that I can draw everything to the screen all at once, and check all the buttons at once to check if any are being pressed. My question is what is the best way organize all the classes (such as buttons and textboxes) into one GUI class? Here's one way I thought of but it doesn't seem right: **Edit:** I'm using C++. class Gui { public: void update_all(); void draw_all() const; int add_button(Button *button); // Returns button id void remove_button(int button_id); private: Button *buttons[10]; int num_buttons; } This code has a few problems, but I just wanted to give you an idea of what I want.
0
7,492
08/11/2008 03:00:26
556
08/06/2008 16:48:23
248
11
How do you stress test a web application?
Stress testing is something that gets very little love in most death mar.., er I mean web projects. It's usually done at the last minute (or not at all), next to no time gets allocated to it, etc. In the past I've picked a tool, installed it on my machine first, hit the home page, upping the concurrency settings. Then I'd write a simple login script, a simple site walkthrough (in an ecommerce site adding a few items to a cart and checkout). Then I'd rope in as many developers as I could, install the stress test tool on their machines and do a massive attack. If nothing broke I'd give up and wait for the actual traffic to kill the site for real. Just hitting the homepage hard almost always would locate a major problem. More scalability problems would surface at the second stage, and even more - after the launch. The tools I used were Microsoft Homer (aka <a href="http://www.microsoft.com/downloads/details.aspx?familyid=e2c0585a-062a-439e-a67d-75a89aa36495&displaylang=en">Microsoft Web Application Stress Tool</a>) and <a href="http://www.pylot.org/">Pylot</a>. The reports that these tools generated never made much sense to me, and I spent many hours trying to figure out what kind of concurrent load the site would be able to support. It was always worth it because the stupidest bugs and bottlenecks would always come up (like web server misconfigurations, for instance). What have you done, what tools have you used, and what success have you had with your approach?
stresstesting
null
null
null
null
null
open
How do you stress test a web application? === Stress testing is something that gets very little love in most death mar.., er I mean web projects. It's usually done at the last minute (or not at all), next to no time gets allocated to it, etc. In the past I've picked a tool, installed it on my machine first, hit the home page, upping the concurrency settings. Then I'd write a simple login script, a simple site walkthrough (in an ecommerce site adding a few items to a cart and checkout). Then I'd rope in as many developers as I could, install the stress test tool on their machines and do a massive attack. If nothing broke I'd give up and wait for the actual traffic to kill the site for real. Just hitting the homepage hard almost always would locate a major problem. More scalability problems would surface at the second stage, and even more - after the launch. The tools I used were Microsoft Homer (aka <a href="http://www.microsoft.com/downloads/details.aspx?familyid=e2c0585a-062a-439e-a67d-75a89aa36495&displaylang=en">Microsoft Web Application Stress Tool</a>) and <a href="http://www.pylot.org/">Pylot</a>. The reports that these tools generated never made much sense to me, and I spent many hours trying to figure out what kind of concurrent load the site would be able to support. It was always worth it because the stupidest bugs and bottlenecks would always come up (like web server misconfigurations, for instance). What have you done, what tools have you used, and what success have you had with your approach?
0
7,503
08/11/2008 03:54:43
234
08/03/2008 20:25:38
488
50
Linq to objects - select first object
I know almost nothing about linq. I'm doing this: var apps = from app in Process.GetProcesses() where app.ProcessName.Contains( "MyAppName" ) && app.MainWindowHandle != IntPtr.Zero select app; Which gets me all the running processes which match that criteria. But I don't know how to get the first one. The examples I can find on the net seem to imply I have to do this var matchedApp = (from app in Process.GetProcesses() where app.ProcessName.Contains( "MyAppName" ) && app.MainWindowHandle != IntPtr.Zero select app).First(); which strikes me as somewhat ugly, and also throws an exception if there are no matching processes. Is there a better way?
c#
linq
linq-to-objects
null
null
null
open
Linq to objects - select first object === I know almost nothing about linq. I'm doing this: var apps = from app in Process.GetProcesses() where app.ProcessName.Contains( "MyAppName" ) && app.MainWindowHandle != IntPtr.Zero select app; Which gets me all the running processes which match that criteria. But I don't know how to get the first one. The examples I can find on the net seem to imply I have to do this var matchedApp = (from app in Process.GetProcesses() where app.ProcessName.Contains( "MyAppName" ) && app.MainWindowHandle != IntPtr.Zero select app).First(); which strikes me as somewhat ugly, and also throws an exception if there are no matching processes. Is there a better way?
0
7,517
08/11/2008 04:32:01
797
08/09/2008 02:14:04
140
5
Dropping a group of tables in SQL Server
Is there a simple way to drop a group of interrelated tables in SQL Server? Ideally I'd like to avoid having to worry about what order they're being dropped in since I know the entire group will be gone by the end of the process.
sql
mssql
db
null
null
null
open
Dropping a group of tables in SQL Server === Is there a simple way to drop a group of interrelated tables in SQL Server? Ideally I'd like to avoid having to worry about what order they're being dropped in since I know the entire group will be gone by the end of the process.
0
7,525
08/11/2008 04:52:50
61
08/01/2008 14:21:00
410
34
Of Memory Management, Heap Corruption, and C++
So, I need some help. I am working on a project in C++. However, I think I have somehow managed to corrupt my heap. This is based off the fact that I added a `std::string` to a class and assigning it a value from another `std::string`: std::string hello = "Hello, world.\n"; /* exampleString = "Hello, world.\n" would work fine. */ exampleString = hello; crashes on my system with a stack dump. So basically I need to **stop** and go through all my code and memory management stuff and find out where I've screwed up. The codebase is still small (about 1000 lines), so this is easily do-able. Still, I'm over my head with this kind of stuff, so I thought I'd throw it out there. I'm on a Linux system, and have poked around with `valgrind`, and while not knowing completely what I'm doing, it did report that the `std::string`'s destructor was an invalid free. I have to admit to getting the term 'Heap Corruption' from a Google search; any general purpose articles on this sort of stuff would be appreciated as well. (In before `rm -rf ProjectDir`, do again in C# :D)
c++
memory
heap
stack
null
null
open
Of Memory Management, Heap Corruption, and C++ === So, I need some help. I am working on a project in C++. However, I think I have somehow managed to corrupt my heap. This is based off the fact that I added a `std::string` to a class and assigning it a value from another `std::string`: std::string hello = "Hello, world.\n"; /* exampleString = "Hello, world.\n" would work fine. */ exampleString = hello; crashes on my system with a stack dump. So basically I need to **stop** and go through all my code and memory management stuff and find out where I've screwed up. The codebase is still small (about 1000 lines), so this is easily do-able. Still, I'm over my head with this kind of stuff, so I thought I'd throw it out there. I'm on a Linux system, and have poked around with `valgrind`, and while not knowing completely what I'm doing, it did report that the `std::string`'s destructor was an invalid free. I have to admit to getting the term 'Heap Corruption' from a Google search; any general purpose articles on this sort of stuff would be appreciated as well. (In before `rm -rf ProjectDir`, do again in C# :D)
0
7,526
08/11/2008 04:54:58
718
08/08/2008 07:07:38
28
1
If you knew then what you know now, what language(s) will you start learning first?
I will probably start with C and then Lisp. Although I started programming in C, I did not program in it as much as I want. It's fun working with the low level stuff. Learning C helped me a lot when I started working. I've only started learning Lisp now and it amazes that the concepts it supported from the very start are still very relevant today. Well I think it's better late than never.
lisp
language
null
null
null
null
open
If you knew then what you know now, what language(s) will you start learning first? === I will probably start with C and then Lisp. Although I started programming in C, I did not program in it as much as I want. It's fun working with the low level stuff. Learning C helped me a lot when I started working. I've only started learning Lisp now and it amazes that the concepts it supported from the very start are still very relevant today. Well I think it's better late than never.
0
7,535
08/11/2008 05:16:13
708
08/08/2008 06:10:02
13
0
SQL Server 2008 compatability with SQL Server 2005
What is the best way to use SQL Server 2008 as a development database, but ensure that the database is compatible with SQL Server 2005?
mssql
null
null
null
null
null
open
SQL Server 2008 compatability with SQL Server 2005 === What is the best way to use SQL Server 2008 as a development database, but ensure that the database is compatible with SQL Server 2005?
0
7,539
08/11/2008 05:23:02
959
08/11/2008 05:23:02
1
0
Pleae explain the use of java.math.MathContext
Recently I tried understanding the use of **java.math.MathContext** but failed to understand properly. Is it used for rounding in java.math.BigDecimal, if yes why does not it round the decimal digits but even mentissa part. From API docs, I came to know that it follows the standard specified in ANSI X3.274-1996 and ANSI X3.274-1996/AM 1-2000 specifications but I did not get them to read online. Please let me know if you have any idea on this. Thanks in advance. ~Jatan
java
null
null
null
null
null
open
Pleae explain the use of java.math.MathContext === Recently I tried understanding the use of **java.math.MathContext** but failed to understand properly. Is it used for rounding in java.math.BigDecimal, if yes why does not it round the decimal digits but even mentissa part. From API docs, I came to know that it follows the standard specified in ANSI X3.274-1996 and ANSI X3.274-1996/AM 1-2000 specifications but I did not get them to read online. Please let me know if you have any idea on this. Thanks in advance. ~Jatan
0
7,540
08/11/2008 05:24:33
122
08/02/2008 07:56:07
1,757
94
Some kind of task manager for JavaScript in Firefox 3?
Recently I have been having issues with Firefox 3 on Ubuntu Hardy Heron. I will click on a link and it will hang for a while. I don't know if its a bug in Firefox 3 or whatever, but I would like to try and debug it a bit. So, my question is, is there a way to have some kind of process explorer, or task manager sort of thing for Firefox 3? I would like to be able to see what tabs are using what percent of my processor via the JavaScript on that page (or anything in the page that is causing CPU/memory usage). Does anybody know of a plugin that does this, or something similar? Has anyone else done this kind of inspection another way? I know about FireBug, but I can't imagine how I would use it to finger which tab is using a lot of resources. Any suggestions or insights?
firefox
javascript
memory
cpu
null
null
open
Some kind of task manager for JavaScript in Firefox 3? === Recently I have been having issues with Firefox 3 on Ubuntu Hardy Heron. I will click on a link and it will hang for a while. I don't know if its a bug in Firefox 3 or whatever, but I would like to try and debug it a bit. So, my question is, is there a way to have some kind of process explorer, or task manager sort of thing for Firefox 3? I would like to be able to see what tabs are using what percent of my processor via the JavaScript on that page (or anything in the page that is causing CPU/memory usage). Does anybody know of a plugin that does this, or something similar? Has anyone else done this kind of inspection another way? I know about FireBug, but I can't imagine how I would use it to finger which tab is using a lot of resources. Any suggestions or insights?
0
7,551
08/11/2008 05:44:42
541
08/06/2008 15:38:13
196
10
Best Practices for securing a REST API / web service
When designing a REST API or service are there any established best practices for dealing with security (Authentication, Authorization, Identity Management) ? When building a SOAP API you have WS-Security as a guide and much literature exists on the topic. I have found less information about securing REST endpoints. While I understand REST intentionally does not have specifications analogous to WS-* I am hoping best practices or recommended patterns have emerged. Any discussion or links to relevant documents would be very much appreciated. If it matters, we would be using WCF with POX/JSON serialized messages for our REST API's/Services built using v3.5 of the .NET Framework.
security
wcf
rest
null
null
null
open
Best Practices for securing a REST API / web service === When designing a REST API or service are there any established best practices for dealing with security (Authentication, Authorization, Identity Management) ? When building a SOAP API you have WS-Security as a guide and much literature exists on the topic. I have found less information about securing REST endpoints. While I understand REST intentionally does not have specifications analogous to WS-* I am hoping best practices or recommended patterns have emerged. Any discussion or links to relevant documents would be very much appreciated. If it matters, we would be using WCF with POX/JSON serialized messages for our REST API's/Services built using v3.5 of the .NET Framework.
0
7,571
08/11/2008 06:39:54
873
08/10/2008 00:07:59
11
3
Cocoa and Objective-C resources?
What are the recommended online or offline resources someone can offer for Objective-C and Cocoa programming? My online resources: - [Orielly][1], Some useful articles and examples - [Learning Objective C][2], This seems like a good resource so far - [Late Night Cocoa Podcast][3], I recently discovered this one, starting on episode 1 My offline resources: - None, I have no books on my shelf I need some help finding a good book, any suggestions? [1]: http://oreilly.com/pub/ct/37 [2]: http://cocoadevcentral.com/d/learn_objectivec/ [3]: http://www.mac-developer-network.com/podcasts/latenightcocoa/index.html
objectivec
cocoa
resources
osx
null
null
open
Cocoa and Objective-C resources? === What are the recommended online or offline resources someone can offer for Objective-C and Cocoa programming? My online resources: - [Orielly][1], Some useful articles and examples - [Learning Objective C][2], This seems like a good resource so far - [Late Night Cocoa Podcast][3], I recently discovered this one, starting on episode 1 My offline resources: - None, I have no books on my shelf I need some help finding a good book, any suggestions? [1]: http://oreilly.com/pub/ct/37 [2]: http://cocoadevcentral.com/d/learn_objectivec/ [3]: http://www.mac-developer-network.com/podcasts/latenightcocoa/index.html
0
7,579
08/11/2008 07:02:46
961
08/11/2008 07:02:46
1
0
Reorganise index vs Rebuild Index in Sql Server Maintenance plan
In the SSW rules to better SQL Server Database there is an example of a full database maintenance plan: [SSW][1]. In the example they run both a Reorganize Index and then a Rebuild Index and then Update Statistics. Is there any point to this? I thought Reorganize Index was a fast but less effective version of Rebuild Index? and that an index rebuild would also update the statistics automatically (on the clustered index at least). [1]: http://www.ssw.com.au/ssw/Standards/Rules/RulesToBetterSQLServerDatabases.aspx#MaintenancePlan
sql
server
maintenance
plan
rebuild
null
open
Reorganise index vs Rebuild Index in Sql Server Maintenance plan === In the SSW rules to better SQL Server Database there is an example of a full database maintenance plan: [SSW][1]. In the example they run both a Reorganize Index and then a Rebuild Index and then Update Statistics. Is there any point to this? I thought Reorganize Index was a fast but less effective version of Rebuild Index? and that an index rebuild would also update the statistics automatically (on the clustered index at least). [1]: http://www.ssw.com.au/ssw/Standards/Rules/RulesToBetterSQLServerDatabases.aspx#MaintenancePlan
0
7,592
08/11/2008 07:39:51
518
08/06/2008 14:07:17
28
6
can i use javascript to create a client side e-mail
i want to create a client side mail creator web page. i know the problems of using the mailto action in an html form (not standard, no default mail appication setted in the client...). but the web page isn't very important, and they don't care me very much. The mail created by the mailto action has the sintax: subject:undifined subject body: param1=value1 param2=value2 . . . paramn=valuen ¿Can i use javascript to format the mail like this? Subject:XXXXX Body: Value1;Value2;Value3...ValueN Thanks PD: sry for my bad english
javascript
email
null
null
null
null
open
can i use javascript to create a client side e-mail === i want to create a client side mail creator web page. i know the problems of using the mailto action in an html form (not standard, no default mail appication setted in the client...). but the web page isn't very important, and they don't care me very much. The mail created by the mailto action has the sintax: subject:undifined subject body: param1=value1 param2=value2 . . . paramn=valuen ¿Can i use javascript to format the mail like this? Subject:XXXXX Body: Value1;Value2;Value3...ValueN Thanks PD: sry for my bad english
0
7,596
08/11/2008 07:45:20
917
08/10/2008 12:11:24
1
2
How to structure a java application, in other words: where do I put my classes?
First of all, I know how to build a java application. But I was always puzzled where to put my classes. There are proponents for organizing the packages strictly domain oriented, others separate by tier. I for myself have always problems a) with naming, b) with placing Where do you put your domain specific constants (and what is the best name for such a class)? Where do you put classes for stuff which is both infrastructural and domain specific (for instance I have a FileStorageStrategy class, which stores the files either in the database, or alternatively in database)? Where to put Exceptions? Are there any standards to which I can refer?
java
architecture
null
null
null
null
open
How to structure a java application, in other words: where do I put my classes? === First of all, I know how to build a java application. But I was always puzzled where to put my classes. There are proponents for organizing the packages strictly domain oriented, others separate by tier. I for myself have always problems a) with naming, b) with placing Where do you put your domain specific constants (and what is the best name for such a class)? Where do you put classes for stuff which is both infrastructural and domain specific (for instance I have a FileStorageStrategy class, which stores the files either in the database, or alternatively in database)? Where to put Exceptions? Are there any standards to which I can refer?
0
7,603
08/11/2008 08:10:27
886
08/10/2008 07:46:39
21
2
Where can I find some good WS-Security introductions and tutorials?
Can anyone point me to some decent introductions to WS-Security? I'm looking for tutorials or something that provide a fairly gentle introduction to the subject, though I don't mind if it assumes basic knowledge of web services and SOAP. Most of the stuff I've seen so far is very technical and you need a lot of complex, detailed background knowledge to understand it properly. We have to implement a web service in PHP and one or more clients in .NET, so resources covering both would be much appreciated.
webservices
ws-security
null
null
null
null
open
Where can I find some good WS-Security introductions and tutorials? === Can anyone point me to some decent introductions to WS-Security? I'm looking for tutorials or something that provide a fairly gentle introduction to the subject, though I don't mind if it assumes basic knowledge of web services and SOAP. Most of the stuff I've seen so far is very technical and you need a lot of complex, detailed background knowledge to understand it properly. We have to implement a web service in PHP and one or more clients in .NET, so resources covering both would be much appreciated.
0
7,614
08/11/2008 08:36:39
342
08/04/2008 19:59:52
220
40
Testing a function that throws on failure
What is the best way of testing a function that throws on failure? Or testing a function that is fairly immune to failure? For instance; I have a I/O Completion Port class that throws in the constructor if it can't initialise the port correctly. This uses the Win32 function of CreateIoCompletionPort in the initialiser list. If the handle isn't set correctly - a non-null value - then the constructor will throw an exception. I have never seen this function fail. I am pretty certain that this (and other functions like it in my code) if they fail will behave correctly, the code is 50 lines long including white-space, so my questions are a) is it worth testing that it will throw, b) and if it is worth testing, how to? For b) I thought about overriding CreateIoCompletionPort and passing the values through. In the unit test override it and cause it to return 0 when a certain value is passed in. However since this is used in the constructor then this needs to be static. Does this seem valid or not? Thanks, G.
unittesting
bestpractices
null
null
null
null
open
Testing a function that throws on failure === What is the best way of testing a function that throws on failure? Or testing a function that is fairly immune to failure? For instance; I have a I/O Completion Port class that throws in the constructor if it can't initialise the port correctly. This uses the Win32 function of CreateIoCompletionPort in the initialiser list. If the handle isn't set correctly - a non-null value - then the constructor will throw an exception. I have never seen this function fail. I am pretty certain that this (and other functions like it in my code) if they fail will behave correctly, the code is 50 lines long including white-space, so my questions are a) is it worth testing that it will throw, b) and if it is worth testing, how to? For b) I thought about overriding CreateIoCompletionPort and passing the values through. In the unit test override it and cause it to return 0 when a certain value is passed in. However since this is used in the constructor then this needs to be static. Does this seem valid or not? Thanks, G.
0
7,622
08/11/2008 08:55:13
973
08/11/2008 08:55:13
1
0
Shift operator in C
Is the shift operator (<<, >>) in C arithmetic shift or logical shift?
c
null
null
null
null
null
open
Shift operator in C === Is the shift operator (<<, >>) in C arithmetic shift or logical shift?
0
7,630
08/11/2008 09:13:32
755
08/08/2008 15:28:16
62
5
How do I convince my boss to buy nice big monitors for the developers?
What's the best way to convince management that buying nice big monitors for developer workstations is worthwhile? (Whether big monitors actually are worthwhile is totally irrelevant, I'd like to convince my boss anyway.)
hardware
workstations
null
null
null
null
open
How do I convince my boss to buy nice big monitors for the developers? === What's the best way to convince management that buying nice big monitors for developer workstations is worthwhile? (Whether big monitors actually are worthwhile is totally irrelevant, I'd like to convince my boss anyway.)
0
7,642
08/11/2008 09:41:11
133
08/02/2008 09:06:05
107
4
Naming convention for VB.NET private fields
Is there an official convention for naming private fields in VB.NET? For example, if I have a property called 'Foo', I normally call the private field '_Foo'. This seems to be frowned upon in the [Offical Guidelines](http://msdn.microsoft.com/en-us/library/ms229012.aspx): "Do not use a prefix for field names. For example, do not use g_ or s_ to distinguish static versus non-static fields." In C#, you could call the private field 'foo', the property 'Foo', and refer to the private field as 'this.foo' in the constructor. As VB.NET is case insensitive you can't do this - any suggestions?
vb.net
convention
null
null
null
null
open
Naming convention for VB.NET private fields === Is there an official convention for naming private fields in VB.NET? For example, if I have a property called 'Foo', I normally call the private field '_Foo'. This seems to be frowned upon in the [Offical Guidelines](http://msdn.microsoft.com/en-us/library/ms229012.aspx): "Do not use a prefix for field names. For example, do not use g_ or s_ to distinguish static versus non-static fields." In C#, you could call the private field 'foo', the property 'Foo', and refer to the private field as 'this.foo' in the constructor. As VB.NET is case insensitive you can't do this - any suggestions?
0
7,651
08/11/2008 10:04:32
381
08/05/2008 10:39:26
504
10
Perl - how do I remove duplicate items from an array ?
I have an array in Perl: @my_array = ("one","two","three","two","three") How do I remove the duplicates from the array ?
perl
beginner
null
null
null
null
open
Perl - how do I remove duplicate items from an array ? === I have an array in Perl: @my_array = ("one","two","three","two","three") How do I remove the duplicates from the array ?
0
7,652
08/11/2008 10:04:50
493
08/06/2008 10:25:05
659
57
Querying like Linq when you don't have Linq.
I have a project that I'm currently working on but it currently only supports the .net framework 2.0. I love linq, but because of the framework version I can't use it. What I want isn't so much the ORM side of things, but the "queryability" (is that even a word?) of Linq. So far the closest is [llblgen][1] but if there was something even lighter weight that could just do the querying for me that would be even better. I've also looked at [NHibernate][2] which looks like it could go close to doing what I want, but it has a pretty steep learning curve and the mapping files don't get me overly excited. If anyone is aware of something that will give me a similar query interface to Linq (or even better, how to get Linq to work on the .net 2.0 framework) I'd really like to hear about it. [1]: http://www.llblgen.com/defaultgeneric.aspx [2]: http://www.hibernate.org/343.html
database
linq
orm
null
null
null
open
Querying like Linq when you don't have Linq. === I have a project that I'm currently working on but it currently only supports the .net framework 2.0. I love linq, but because of the framework version I can't use it. What I want isn't so much the ORM side of things, but the "queryability" (is that even a word?) of Linq. So far the closest is [llblgen][1] but if there was something even lighter weight that could just do the querying for me that would be even better. I've also looked at [NHibernate][2] which looks like it could go close to doing what I want, but it has a pretty steep learning curve and the mapping files don't get me overly excited. If anyone is aware of something that will give me a similar query interface to Linq (or even better, how to get Linq to work on the .net 2.0 framework) I'd really like to hear about it. [1]: http://www.llblgen.com/defaultgeneric.aspx [2]: http://www.hibernate.org/343.html
0
7,661
08/11/2008 10:23:48
706
08/08/2008 06:06:11
1
1
Java code for WGS84 to Google map position and back
Searching for some sample code for converting a point in WGS84 coordinate system to a map position in Google Maps (pixel position), also supporting zoom levels. If the codes is well commented, then it can also be in some other language. You can also point me to a open source Java project :) BR, Jaanus
java
google
mapping
wgs84
null
null
open
Java code for WGS84 to Google map position and back === Searching for some sample code for converting a point in WGS84 coordinate system to a map position in Google Maps (pixel position), also supporting zoom levels. If the codes is well commented, then it can also be in some other language. You can also point me to a open source Java project :) BR, Jaanus
0
7,662
08/11/2008 10:27:22
383
08/05/2008 10:46:37
1,367
159
Database, Table and Column Naming Conventions?
When ever I design a database, I always wonder if there is a best way of naming an item in my database. Quite often I ask myself the following questions: 1. Should table names be plural? 2. Should column names be singular? 3. Should I prefix tables or columns? 4. Should I use any case in naming items? Are there any recommend guidelines out there for naming items in a database?
database
language-agnostic
null
null
null
null
open
Database, Table and Column Naming Conventions? === When ever I design a database, I always wonder if there is a best way of naming an item in my database. Quite often I ask myself the following questions: 1. Should table names be plural? 2. Should column names be singular? 3. Should I prefix tables or columns? 4. Should I use any case in naming items? Are there any recommend guidelines out there for naming items in a database?
0
7,664
08/11/2008 10:38:51
912
08/10/2008 10:09:35
1
0
Windows C++: How can I redirect stderr for calls to fprintf?
I am wrapping existing C++ code from a BSD project in our own custom wrapper and I want to integrate it to our code with as few changes as possible. This code uses fprintf to print to stderr in order to log / report errors. I want to redirect this to an alternative place within the same process. On unix I have done this with a socketpair and a thread: one end of the socket is where I send stderr (via a call to dup2) and the other end is monitored in a thread, where I can then process the output. This does not work on windows though because a socket is not the same as a thread. All documents I have found on the web show how to redirect output from a child process, which is not what I want. How can I redirect stderr within the same process getting a callback of some sort when output is written? (and before you say so, I've tried SetStdHandle but cannot find any way to make this work)... Thanks!
c++
windows
redirect
null
null
null
open
Windows C++: How can I redirect stderr for calls to fprintf? === I am wrapping existing C++ code from a BSD project in our own custom wrapper and I want to integrate it to our code with as few changes as possible. This code uses fprintf to print to stderr in order to log / report errors. I want to redirect this to an alternative place within the same process. On unix I have done this with a socketpair and a thread: one end of the socket is where I send stderr (via a call to dup2) and the other end is monitored in a thread, where I can then process the output. This does not work on windows though because a socket is not the same as a thread. All documents I have found on the web show how to redirect output from a child process, which is not what I want. How can I redirect stderr within the same process getting a callback of some sort when output is written? (and before you say so, I've tried SetStdHandle but cannot find any way to make this work)... Thanks!
0
7,665
08/11/2008 10:40:41
893
08/10/2008 08:27:00
36
5
How to resolve symlinks in a shell script
Given an absolute or relative path (in a Unix-like system), I would like to determine the full path of the target after resolving any intermediate symlinks. Bonus points for also resolving ~username notation at the same time. If the target is a directory, it might be possible to chdir() into the directory and then call getcwd(), but I really want to do this from a shell script rather than writing a C helper. Unfortunately, shells have a tendency to try to hide the existence of symlinks from the user (this is bash on OS X): $ ls -ld foo bar drwxr-xr-x 2 greg greg 68 Aug 11 22:36 bar lrwxr-xr-x 1 greg greg 3 Aug 11 22:36 foo -> bar $ cd foo $ pwd /Users/greg/tmp/foo $ What I want is a function resolve() such that when executed from the tmp directory in the above example, resolve("foo") == "/Users/greg/tmp/bar".
shell
script
symlink
null
null
null
open
How to resolve symlinks in a shell script === Given an absolute or relative path (in a Unix-like system), I would like to determine the full path of the target after resolving any intermediate symlinks. Bonus points for also resolving ~username notation at the same time. If the target is a directory, it might be possible to chdir() into the directory and then call getcwd(), but I really want to do this from a shell script rather than writing a C helper. Unfortunately, shells have a tendency to try to hide the existence of symlinks from the user (this is bash on OS X): $ ls -ld foo bar drwxr-xr-x 2 greg greg 68 Aug 11 22:36 bar lrwxr-xr-x 1 greg greg 3 Aug 11 22:36 foo -> bar $ cd foo $ pwd /Users/greg/tmp/foo $ What I want is a function resolve() such that when executed from the tmp directory in the above example, resolve("foo") == "/Users/greg/tmp/bar".
0
7,674
08/11/2008 11:17:36
137
08/02/2008 10:46:12
839
72
Best practices for building Flash video player
We have a custom-built Flash-based video player that I maintain, and it needs to support preroll ads and ideally both progressive video playback and streaming depending on a server switch. I've been working with the flvPlayback component but am finding myself a little out of my depth. Are there any good tutorials or resources for understanding the difference between netstream and flvPlayback? Or is one part of the other? Have googled without success. For the preroll ads we'll probably use DART In-Stream, which is part of the reason I feel I'm losing a grip on the best way to structure this thing. Any help with best practices or links most appreciated - ta!
flash
video
null
null
null
null
open
Best practices for building Flash video player === We have a custom-built Flash-based video player that I maintain, and it needs to support preroll ads and ideally both progressive video playback and streaming depending on a server switch. I've been working with the flvPlayback component but am finding myself a little out of my depth. Are there any good tutorials or resources for understanding the difference between netstream and flvPlayback? Or is one part of the other? Have googled without success. For the preroll ads we'll probably use DART In-Stream, which is part of the reason I feel I'm losing a grip on the best way to structure this thing. Any help with best practices or links most appreciated - ta!
0
7,676
08/11/2008 11:23:05
230
08/03/2008 19:32:46
320
19
Replicating between SqlServer 2005 and Compact Edition
Can it be done and how?
sql-server
replication
sqlserverce
null
null
null
open
Replicating between SqlServer 2005 and Compact Edition === Can it be done and how?
0
7,681
08/11/2008 11:33:01
972
08/11/2008 08:49:11
1
1
Test serialization encoding
What is the best way to verify/test that a text string is serialized to a byte array with a certain encoding? In my case, I want to verify that an XML structure is serialized to a byte array with the UTF-8 encoding which is of variable character length. As an example, my current ugly procedure is to inject a character known to require two bytes into the structure before serializing, then replacing the two-byte character with an ASCII character and comparing the serialized array lengths. This should yield two serialized arrays where the array containing the two-byte characters should have length +1. Plus if the solution is elegant for Java. I can't think of any elegant way to seek for a byte sequence in a byte array. (Could be used to seek for a known byte sequence representing the desired character representation in UTF-8.)
java
xml
string
serialization
encoding
null
open
Test serialization encoding === What is the best way to verify/test that a text string is serialized to a byte array with a certain encoding? In my case, I want to verify that an XML structure is serialized to a byte array with the UTF-8 encoding which is of variable character length. As an example, my current ugly procedure is to inject a character known to require two bytes into the structure before serializing, then replacing the two-byte character with an ASCII character and comparing the serialized array lengths. This should yield two serialized arrays where the array containing the two-byte characters should have length +1. Plus if the solution is elegant for Java. I can't think of any elegant way to seek for a byte sequence in a byte array. (Could be used to seek for a known byte sequence representing the desired character representation in UTF-8.)
0
7,685
08/11/2008 11:43:27
608
08/07/2008 10:23:46
81
13
Merge Sort a Linked List
I was recently brushing up on some fundamentals and found merge sorting a linked list to be a pretty good challenge. If you have a good implementation then show it off here.
algorithms
sorting
mergesort
null
null
null
open
Merge Sort a Linked List === I was recently brushing up on some fundamentals and found merge sorting a linked list to be a pretty good challenge. If you have a good implementation then show it off here.
0
7,694
08/11/2008 11:57:17
230
08/03/2008 19:32:46
320
19
How do i enable MSTDC on sqlserver?
Is that even a valid question? I have a .Net windows app that is using MSTDC and it throwing an exception: > System.Transactions.TransactionManagerCommunicationException: > Network access for Distributed > Transaction Manager (MSDTC) has been > disabled. Please enable DTC for > network access in the security > configuration for MSDTC using the > Component Services Administrative tool ---> System.Runtime.InteropServices.COMException (0x8004D024): The transaction manager has disabled its support for remote/network transactions. (Exception from HRESULT: 0x8004D024) at System.Transactions.Oletx.IDtcProxyShimFactory.ReceiveTransaction(UInt32 propgationTokenSize, Byte[] propgationToken, IntPtr managedIdentifier, Guid& transactionIdentifier, OletxTransactionIsolationLevel& isolationLevel, ITransactionShim& transactionShim).... I follow the guide [here][1] to able MSTDC on the pc, on which the app is installed. But the error still occurs. I was wondering if this was a DB issue? And if so how can i resolve it? [1]: http://kbalertz.com/883960/enable-MSDTC-communications-Commerce-Server-Developer-Edition-Windows-Service.aspx
msdtc
null
null
null
null
null
open
How do i enable MSTDC on sqlserver? === Is that even a valid question? I have a .Net windows app that is using MSTDC and it throwing an exception: > System.Transactions.TransactionManagerCommunicationException: > Network access for Distributed > Transaction Manager (MSDTC) has been > disabled. Please enable DTC for > network access in the security > configuration for MSDTC using the > Component Services Administrative tool ---> System.Runtime.InteropServices.COMException (0x8004D024): The transaction manager has disabled its support for remote/network transactions. (Exception from HRESULT: 0x8004D024) at System.Transactions.Oletx.IDtcProxyShimFactory.ReceiveTransaction(UInt32 propgationTokenSize, Byte[] propgationToken, IntPtr managedIdentifier, Guid& transactionIdentifier, OletxTransactionIsolationLevel& isolationLevel, ITransactionShim& transactionShim).... I follow the guide [here][1] to able MSTDC on the pc, on which the app is installed. But the error still occurs. I was wondering if this was a DB issue? And if so how can i resolve it? [1]: http://kbalertz.com/883960/enable-MSDTC-communications-Commerce-Server-Developer-Edition-Windows-Service.aspx
0
7,707
08/11/2008 12:18:02
979
08/11/2008 12:06:42
1
0
IE8 overflow:auto with max-height
First of all, I know IE8 is still testing. But I'd *like* to have my site look the same even in testing version... so: I have an element which may contain very big amounts of data, but I don't want it to ruin the page layout, so I set `max-height: 100px` and `overflow:auto`, hoping for scrollbars to appear when the content does not fit. It all works fine in Firefox and IE7, but IE8 behaves as if `overflow:hidden` was present instead of `overflow:auto`. I tried `overflow:scroll`, still does not help, IE8 simply truncates the content without showing scrollbars. Does anyone know of a workaround? For now I resorted to using `height` instead of `max-height`, but it leaves plenty of empty space in case there isn't much data. Before you tell me to do that, yes, I've reported the bug to IE developers :)
internet-explorer-8
beta
css
null
null
null
open
IE8 overflow:auto with max-height === First of all, I know IE8 is still testing. But I'd *like* to have my site look the same even in testing version... so: I have an element which may contain very big amounts of data, but I don't want it to ruin the page layout, so I set `max-height: 100px` and `overflow:auto`, hoping for scrollbars to appear when the content does not fit. It all works fine in Firefox and IE7, but IE8 behaves as if `overflow:hidden` was present instead of `overflow:auto`. I tried `overflow:scroll`, still does not help, IE8 simply truncates the content without showing scrollbars. Does anyone know of a workaround? For now I resorted to using `height` instead of `max-height`, but it leaves plenty of empty space in case there isn't much data. Before you tell me to do that, yes, I've reported the bug to IE developers :)
0
7,719
08/11/2008 12:36:20
194
08/03/2008 10:56:49
403
29
Capture MouseDown event for .NET TextBox
Is there any way to capture the MouseDown even from the .NET 2.0 TextBox control? I know the inherited Control class has the event, but it's not exposed in TextBox. Is there a way to override the event handler? I also tried the OpenNETCF TextBox2 control which does have the MouseDown event exposed, but no matter what I do, it doesn't fire the handler. Any suggestions?
c#
.net
events
windows-mobile
null
null
open
Capture MouseDown event for .NET TextBox === Is there any way to capture the MouseDown even from the .NET 2.0 TextBox control? I know the inherited Control class has the event, but it's not exposed in TextBox. Is there a way to override the event handler? I also tried the OpenNETCF TextBox2 control which does have the MouseDown event exposed, but no matter what I do, it doesn't fire the handler. Any suggestions?
0
7,720
08/11/2008 12:37:50
998
08/11/2008 12:30:22
1
0
Packaging Java apps for the Windows/Linux desktop.
I am writing an application in Java for the desktop using the Eclipse SWT library for GUI rendering. I think SWT helps Java get over the biggest hurdle for acceptance on the desktop: namely providing a Java application with a consistent, responsive interface that looks like that belonging to any other app on your desktop. However, I feel that packaging an application is still an issue. OS X natively provides an easy mechanism for wrapping Java apps in native application bundles, but producing an app for Windows/Linux that doesn't require the user to run an ugly batch file or click on a .jar is still a hassle. Possibly that's not such an issue on Linux, where the user is likely to be a little more tech-savvy, but on Windows I'd like to have a regular .exe for him/her to run. Has anyone had any experience with any of the .exe generation tools for Java that are out there? I've tried JSmooth but had various issues with it. Is there a better solution before I crack out Visual Studio and roll my own?
java
windows
executable
swt
null
null
open
Packaging Java apps for the Windows/Linux desktop. === I am writing an application in Java for the desktop using the Eclipse SWT library for GUI rendering. I think SWT helps Java get over the biggest hurdle for acceptance on the desktop: namely providing a Java application with a consistent, responsive interface that looks like that belonging to any other app on your desktop. However, I feel that packaging an application is still an issue. OS X natively provides an easy mechanism for wrapping Java apps in native application bundles, but producing an app for Windows/Linux that doesn't require the user to run an ugly batch file or click on a .jar is still a hassle. Possibly that's not such an issue on Linux, where the user is likely to be a little more tech-savvy, but on Windows I'd like to have a regular .exe for him/her to run. Has anyone had any experience with any of the .exe generation tools for Java that are out there? I've tried JSmooth but had various issues with it. Is there a better solution before I crack out Visual Studio and roll my own?
0
7,726
08/11/2008 12:40:01
137
08/02/2008 10:46:12
839
73
What are the options for delivering Flash video?
I'd like a concise introduction to the different options.
flash
video
null
null
null
null
open
What are the options for delivering Flash video? === I'd like a concise introduction to the different options.
0
7,737
08/11/2008 12:50:43
1,007
08/11/2008 12:50:43
1
0
How to display unicode text in OpenGL?
Is there a good way for displaying unicode text in opengl under Windows? For example, when you have to deal with different languages. The most common approach like #define FONTLISTRANGE 128 GLuint list; list = glGenLists(FONTLISTRANGE); wglUseFontBitmapsW(hDC, 0, FONTLISTRANGE, list); just won't do because you can't create enough lists for all unicode characters.
windows
unicode
opengl
null
null
null
open
How to display unicode text in OpenGL? === Is there a good way for displaying unicode text in opengl under Windows? For example, when you have to deal with different languages. The most common approach like #define FONTLISTRANGE 128 GLuint list; list = glGenLists(FONTLISTRANGE); wglUseFontBitmapsW(hDC, 0, FONTLISTRANGE, list); just won't do because you can't create enough lists for all unicode characters.
0
7,758
08/11/2008 13:09:08
93
08/01/2008 18:23:58
223
5
What is the value-binding syntax in xaml?
I'm getting all learned up about binding in WPF. I'm having a lot of trouble debugging the parse errors in my xaml, though. Can somebody pretty please tell me what's wrong with this little piece? : <Border Name="TrackBackground" Margin="0" CornerRadius="2" Grid.Row="1" Grid.Column="1" Background="BlanchedAlmond" BorderThickness="1" Height="{TemplateBinding Height}"> <Canvas Name="PART_Track" Background="DarkSalmon" Grid.Row="1" Grid.Column="1"> <Thumb Name="ThumbKnob" Height="{Binding ElementName=Part_Track, Path=Height, Mode=OneWay}" /> </Canvas> </Border> It's the databinding that breaks. I get an `InvalidAttributeValue` exception for ThumbKnob.Height when I try to run this. I know I must be missing something fundamental. So fill me in, stackers, and my gratitude will be boundless.
wpf
xaml
binding
.net
null
null
open
What is the value-binding syntax in xaml? === I'm getting all learned up about binding in WPF. I'm having a lot of trouble debugging the parse errors in my xaml, though. Can somebody pretty please tell me what's wrong with this little piece? : <Border Name="TrackBackground" Margin="0" CornerRadius="2" Grid.Row="1" Grid.Column="1" Background="BlanchedAlmond" BorderThickness="1" Height="{TemplateBinding Height}"> <Canvas Name="PART_Track" Background="DarkSalmon" Grid.Row="1" Grid.Column="1"> <Thumb Name="ThumbKnob" Height="{Binding ElementName=Part_Track, Path=Height, Mode=OneWay}" /> </Canvas> </Border> It's the databinding that breaks. I get an `InvalidAttributeValue` exception for ThumbKnob.Height when I try to run this. I know I must be missing something fundamental. So fill me in, stackers, and my gratitude will be boundless.
0
7,773
08/11/2008 13:24:19
1,013
08/11/2008 13:24:18
1
0
change visibility of asp.net label with javascript
I have an asp.net page with an asp:button that is not visible. I cant turn it visible with javascript because its not rendered to the page. What are my alternatives to solve this? Thanks in advance, Artur
asp.net
javascript
null
null
null
null
open
change visibility of asp.net label with javascript === I have an asp.net page with an asp:button that is not visible. I cant turn it visible with javascript because its not rendered to the page. What are my alternatives to solve this? Thanks in advance, Artur
0
7,779
08/11/2008 13:30:21
791
08/09/2008 00:37:47
11
10
I would like a recommendation for a book on Eclipse's Rich Client Platform (RCP).
I have read through several reviews on Amazon and some books seem outdated. I am currently using MyEclipse 6.5 which is using Eclipse 3.3. I'm interested in hearing from people that have experience learning RCP and what reference material they used to get started. Thanks in advance. Bruce
java
eclipse
rcp
myeclipse
null
null
open
I would like a recommendation for a book on Eclipse's Rich Client Platform (RCP). === I have read through several reviews on Amazon and some books seem outdated. I am currently using MyEclipse 6.5 which is using Eclipse 3.3. I'm interested in hearing from people that have experience learning RCP and what reference material they used to get started. Thanks in advance. Bruce
0
7,820
08/11/2008 14:16:56
277
08/04/2008 10:55:22
73
2
PostGRESQL Programming Tutorial
Can anyone suggest a good guide/tutorial for programming PostGRESQL? The manual is good, but I found it lacking as a learning aid (it is more of a reference, as manuals should be)? I have used the forums in the past <http://www.postgresqlforums.com/forums/> but I think a proper guide or tutorial would be better.
postgresql
tutorial
null
null
null
null
open
PostGRESQL Programming Tutorial === Can anyone suggest a good guide/tutorial for programming PostGRESQL? The manual is good, but I found it lacking as a learning aid (it is more of a reference, as manuals should be)? I have used the forums in the past <http://www.postgresqlforums.com/forums/> but I think a proper guide or tutorial would be better.
0
7,837
08/11/2008 14:42:51
1,013
08/11/2008 13:24:18
28
1
What real world WPF applications are out there?
Im currently working with WPF and Ive seen a couple of examples on [dnrtv][1] and some other places. I'd like to see more *real* stuff. Anybody knows of good examples? Thanks [1]: http://www.dnrtv.com/
wpf
null
null
null
null
null
open
What real world WPF applications are out there? === Im currently working with WPF and Ive seen a couple of examples on [dnrtv][1] and some other places. I'd like to see more *real* stuff. Anybody knows of good examples? Thanks [1]: http://www.dnrtv.com/
0
7,846
08/11/2008 15:04:21
572
08/06/2008 20:56:54
111
8
How can I split an XML document into thirds (or, even better, n pieces)?
I would like to use a language that I am familiar with - Java, C#, Ruby, PHP, C/C++, although examples in any language or pseudocode are more than welcome. What is the best way of splitting a large XML document into smaller sections that are still valid XML? For my purposes, I need to split them into roughly thirds or fourths, but for the sake of providing examples, splitting them into n components would be good.
xml
null
null
null
null
null
open
How can I split an XML document into thirds (or, even better, n pieces)? === I would like to use a language that I am familiar with - Java, C#, Ruby, PHP, C/C++, although examples in any language or pseudocode are more than welcome. What is the best way of splitting a large XML document into smaller sections that are still valid XML? For my purposes, I need to split them into roughly thirds or fourths, but for the sake of providing examples, splitting them into n components would be good.
0
7,864
08/11/2008 15:30:30
751
08/08/2008 14:26:58
31
1
Why all the Active Record hate?
As I learn more and more about OOP, and start to implement various design patterns, I keep coming back to cases where people are hating on [Active Record][1]. Often, people say that it doesn't scale well (citing Twitter as their prime example) -- but nobody actually explains ***why*** it doesn't scale well; and / or how to achieve the pros of AR without the cons (via a similar but different pattern?) Hopefully this won't turn into a holy war about design patterns -- all I want to know is ****specifically**** what's wrong with Active Record. If it doesn't scale well, why not? What other problems does it have? [1]: http://en.wikipedia.org/wiki/Active_record_pattern
designpatterns
oop
activerecord
null
null
12/17/2011 01:17:11
not constructive
Why all the Active Record hate? === As I learn more and more about OOP, and start to implement various design patterns, I keep coming back to cases where people are hating on [Active Record][1]. Often, people say that it doesn't scale well (citing Twitter as their prime example) -- but nobody actually explains ***why*** it doesn't scale well; and / or how to achieve the pros of AR without the cons (via a similar but different pattern?) Hopefully this won't turn into a holy war about design patterns -- all I want to know is ****specifically**** what's wrong with Active Record. If it doesn't scale well, why not? What other problems does it have? [1]: http://en.wikipedia.org/wiki/Active_record_pattern
4
7,868
08/11/2008 15:32:37
750
08/08/2008 14:24:17
114
3
MVC pattern question: Who has what? who calls what?
I am refactoring a project and I want to make it conform to the MVC pattern (model view control). There are three objects: 1. a **ServerList** (maintains a list of servers that are active) - this guy will be the controller 2. a **Form** - this is your standard .NET GUI 3. a **DatabaseThingy** - wrapper class that reads/writes to database. (don't ask me what it does, I can't touch or change this class) my question is: to follow proper MVC design, it seems that the **ServerList** should hold references to **Form** and **DatabaseThingy**. But when creating a .NET app, it seems that we are forced to make the Form (the view of MVC) the owner of **ServerList** and **DatabaseThingy**. How would I properly break this down into an MVC design and who should "own" what?
.net
design
mvc
patterns
null
null
open
MVC pattern question: Who has what? who calls what? === I am refactoring a project and I want to make it conform to the MVC pattern (model view control). There are three objects: 1. a **ServerList** (maintains a list of servers that are active) - this guy will be the controller 2. a **Form** - this is your standard .NET GUI 3. a **DatabaseThingy** - wrapper class that reads/writes to database. (don't ask me what it does, I can't touch or change this class) my question is: to follow proper MVC design, it seems that the **ServerList** should hold references to **Form** and **DatabaseThingy**. But when creating a .NET app, it seems that we are forced to make the Form (the view of MVC) the owner of **ServerList** and **DatabaseThingy**. How would I properly break this down into an MVC design and who should "own" what?
0
7,880
08/11/2008 15:50:51
432
08/05/2008 17:18:46
519
27
How do you open a file in C++?
I want to open a file for reading, the C++ way. I need to be able to do it for text files, which would involve some sort of read line function, and a way to do it for binary files, which would provide a way to read raw data into a char* buffer.
c++
file
io
null
null
null
open
How do you open a file in C++? === I want to open a file for reading, the C++ way. I need to be able to do it for text files, which would involve some sort of read line function, and a way to do it for binary files, which would provide a way to read raw data into a char* buffer.
0
7,884
08/11/2008 15:56:42
1,030
08/11/2008 15:40:52
1
0
Testing for inequality in T-SQL
I've just come across this in a WHERE clause: AND NOT (t.id = @id) How does this compare with: AND t.id != @id I'd always write the latter myself, but clearly someone else thinks differently. Is one going to perform any better than the other? I know that using != in the former is going to bust any hopes for using an index that I might have had, but *surely* the latter will suffer the same problem?
indexing
t-sql
inequality
null
null
null
open
Testing for inequality in T-SQL === I've just come across this in a WHERE clause: AND NOT (t.id = @id) How does this compare with: AND t.id != @id I'd always write the latter myself, but clearly someone else thinks differently. Is one going to perform any better than the other? I know that using != in the former is going to bust any hopes for using an index that I might have had, but *surely* the latter will suffer the same problem?
0
7,885
08/11/2008 15:57:35
432
08/05/2008 17:18:46
519
27
How do you create objects in Perl?
Perl has OOP features, but they are somewhat rarely used. How do you create and use Perl objects with methods and properties?
oop
perl
syntax
null
null
null
open
How do you create objects in Perl? === Perl has OOP features, but they are somewhat rarely used. How do you create and use Perl objects with methods and properties?
0
7,913
08/11/2008 16:27:55
1,031
08/11/2008 15:59:07
1
0
How do I make Subversion (SVN) send email on checkins?
I've always found checkin mails to be very useful for keeping track of what work other people are doing in the codebase. How do I set up SVN to email a distribution list on each checkin?
svn
null
null
null
null
null
open
How do I make Subversion (SVN) send email on checkins? === I've always found checkin mails to be very useful for keeping track of what work other people are doing in the codebase. How do I set up SVN to email a distribution list on each checkin?
0
7,917
08/11/2008 16:28:57
402
08/05/2008 13:24:03
188
16
Remove Quotes and Commas from a String in MySQL
I'm importing some data from CSV file, and numbers that are larger get turned into "1,100". What's a good way to remove both the quotes and the comma from this so I can put it into an int field?
msyql
remove
regex
string
null
null
open
Remove Quotes and Commas from a String in MySQL === I'm importing some data from CSV file, and numbers that are larger get turned into "1,100". What's a good way to remove both the quotes and the comma from this so I can put it into an int field?
0
7,933
08/11/2008 16:41:47
1,030
08/11/2008 15:40:52
21
0
interrogating table lock schemes in T-SQL
Is there some means of querying the system tables to establish which tables are using what locking schemes? I took a look at the columns in **sysobjects** but nothing jumped out.
t-sql
lockingscheme
sysobjects
null
null
null
open
interrogating table lock schemes in T-SQL === Is there some means of querying the system tables to establish which tables are using what locking schemes? I took a look at the columns in **sysobjects** but nothing jumped out.
0
7,937
08/11/2008 16:45:10
268
08/04/2008 10:11:11
221
15
Solve the IE select overlap bug
When using IE, you cannot put an absolutely positioned div over a select input element. That's because the select element is considered an ActiveX object and is on top of every HTML element in the page. I already saw people hiding selects when opening a popup div, that leads to pretty bad user experience having controls disappearing. FogBugz actually had a pretty smart solution (before v6) of turning every select into text boxes when a popup was displayed. This solved the bug and tricked the user eye but the behavior was not perfect. Another solution is in FogBugz 6 where they no more use the select element and recoded it everywhere. Last solution I currently use is messing up the IE rendering engine and force it to render the absolutely positioned div as an ActiveX element too, ensuring it can live over a select element. This is achieved by placing an invisible iframe inside the div and styling it with: #MyDiv iframe { position: absolute; z-index: -1; filter: mask(); border: 0; margin: 0; padding: 0; top: 0; left: 0; width: 9999px; height: 9999px; overflow: hidden; } Anyone has a even better solution than this one ?
web
css
ie
select
overlap
null
open
Solve the IE select overlap bug === When using IE, you cannot put an absolutely positioned div over a select input element. That's because the select element is considered an ActiveX object and is on top of every HTML element in the page. I already saw people hiding selects when opening a popup div, that leads to pretty bad user experience having controls disappearing. FogBugz actually had a pretty smart solution (before v6) of turning every select into text boxes when a popup was displayed. This solved the bug and tricked the user eye but the behavior was not perfect. Another solution is in FogBugz 6 where they no more use the select element and recoded it everywhere. Last solution I currently use is messing up the IE rendering engine and force it to render the absolutely positioned div as an ActiveX element too, ensuring it can live over a select element. This is achieved by placing an invisible iframe inside the div and styling it with: #MyDiv iframe { position: absolute; z-index: -1; filter: mask(); border: 0; margin: 0; padding: 0; top: 0; left: 0; width: 9999px; height: 9999px; overflow: hidden; } Anyone has a even better solution than this one ?
0
7,940
08/11/2008 16:46:28
428,190
08/09/2008 23:23:13
1
2
How important is W3C XHTML/CSS validation when finalizing work?
Even though I always strive for complete validation these days, I often wonder if it's a waste of time. If the code runs and it looks the same in all browsers (I use browsershots.org to verify) then do I need to take it any further or am I just being overly anal? What level do you hold your code to when you create it for: a) yourself b) your clients P.S. Jeff and company, why doesn't stack overflow validate? :)
xhtml
css
w3c
validation
validate
null
open
How important is W3C XHTML/CSS validation when finalizing work? === Even though I always strive for complete validation these days, I often wonder if it's a waste of time. If the code runs and it looks the same in all browsers (I use browsershots.org to verify) then do I need to take it any further or am I just being overly anal? What level do you hold your code to when you create it for: a) yourself b) your clients P.S. Jeff and company, why doesn't stack overflow validate? :)
0
7,954
08/11/2008 16:59:35
383
08/05/2008 10:46:37
1,400
160
SQL Server Recpvery States
When restoring a SQL Server Database, I notice that there are 3 different Recovery States to choose from: - Restore with Recovery - Restore with No Recovery - Restore with Standby I've always left it at it's default value, but what do they all mean? (Preferably in layman's terms)
sql
backup
null
null
null
null
open
SQL Server Recpvery States === When restoring a SQL Server Database, I notice that there are 3 different Recovery States to choose from: - Restore with Recovery - Restore with No Recovery - Restore with Standby I've always left it at it's default value, but what do they all mean? (Preferably in layman's terms)
0
7,973
08/11/2008 17:24:54
673
08/07/2008 16:33:05
81
15
User Interface Design
Where do you turn when creating user interface? I am a programmer, not a designer. Any ideas? My "UI" is usually terrible, as I just want to make it work, what do you do?
webapplications
user-interface
null
null
null
null
open
User Interface Design === Where do you turn when creating user interface? I am a programmer, not a designer. Any ideas? My "UI" is usually terrible, as I just want to make it work, what do you do?
0
7,981
08/11/2008 17:28:56
25
08/01/2008 12:15:23
314
35
Decoding printf statements in C (Printf Primer)
I'm working on bringing some old code from 1998 up to the 21st century. One of the first steps in the process is converting the printf statements to a <a href = "http://doc.trolltech.com/4.4/qstring.html">QString</a> variables. No matter how many times I look back at printf though, I always end up forgetting one thing or the other. So, for fun, let's decode it together, for ole' times sake and in the process create the first little **'printf primer'** for Stackoverflow. In the code, I came across this little gem, printf("%4u\t%016.1f\t%04X\t%02X\t%1c\t%1c\t%4s", a, b, c, d, e, f, g); How will the variables a, b, c, d, e, f, g be formatted?
printf
c
qstring
qt
null
null
open
Decoding printf statements in C (Printf Primer) === I'm working on bringing some old code from 1998 up to the 21st century. One of the first steps in the process is converting the printf statements to a <a href = "http://doc.trolltech.com/4.4/qstring.html">QString</a> variables. No matter how many times I look back at printf though, I always end up forgetting one thing or the other. So, for fun, let's decode it together, for ole' times sake and in the process create the first little **'printf primer'** for Stackoverflow. In the code, I came across this little gem, printf("%4u\t%016.1f\t%04X\t%02X\t%1c\t%1c\t%4s", a, b, c, d, e, f, g); How will the variables a, b, c, d, e, f, g be formatted?
0
7,990
08/11/2008 17:37:27
96
08/01/2008 18:33:48
146
11
Printing from a .NET Service
I am working on a project right now that involves receiving a message from another application, formatting the contents of that message, and sending it to a printer. Technology of choice is C# windows service. The output could be called a report, I suppose, but a reporting engine is not necessary. A simple templating engine, like StringTemplate, or even XSLT outputting HTML would be fine. The problem I'm having is finding a free way to print this kind of output from a service. Since it *seems* that it will work, I'm working on a prototype using Microsoft's RDLC, populating a local report and then rendering it as an image to a memory stream, which I will then print. Issues with that are: - Multi-page printing will be a big headache. - Still have to use PrintDocument to print the memory stream, which is unsupported in a Windows Service (though it may work - haven't gotten that far with the prototype yet) - If the data coming across changes, I have to change the dataset, and the class that the data is being deserialized into. bad bad bad. Has anyone had to do anything remotely like this? Any advice? I already posed a question about printing HTML without user input, and after wasting about 3 days on that, I have come to the conclusion that it cannot be done, at least not with any freely available tool. All help is appreciated.
.net
c#
windows
service
printing
null
open
Printing from a .NET Service === I am working on a project right now that involves receiving a message from another application, formatting the contents of that message, and sending it to a printer. Technology of choice is C# windows service. The output could be called a report, I suppose, but a reporting engine is not necessary. A simple templating engine, like StringTemplate, or even XSLT outputting HTML would be fine. The problem I'm having is finding a free way to print this kind of output from a service. Since it *seems* that it will work, I'm working on a prototype using Microsoft's RDLC, populating a local report and then rendering it as an image to a memory stream, which I will then print. Issues with that are: - Multi-page printing will be a big headache. - Still have to use PrintDocument to print the memory stream, which is unsupported in a Windows Service (though it may work - haven't gotten that far with the prototype yet) - If the data coming across changes, I have to change the dataset, and the class that the data is being deserialized into. bad bad bad. Has anyone had to do anything remotely like this? Any advice? I already posed a question about printing HTML without user input, and after wasting about 3 days on that, I have come to the conclusion that it cannot be done, at least not with any freely available tool. All help is appreciated.
0
7,991
08/11/2008 17:37:57
194
08/03/2008 10:56:49
422
33
Center text output from Graphics.DrawString()
I'm using the .NET Graphics class and the DrawString() method to render a single character to the screen. The problem is that I can't seem to get it centered properly. No matter what I set for the Y coordinate of the location of the string render, it always comes out lower than that and the larger the text size the greater the Y offset. For example, at text size 12, the offset is about 4, but at 32 the offset is about 10. I want the character to vertically take up most of the rectangle it's being drawn in and be centered horizontally. Here's my basic code. "this" is referencing the user control it's being drawn in. Graphics g = this.CreateGraphics(); float padx = ((float)this.Size.Width) * (0.05F); float pady = ((float)this.Size.Height) * (0.05F); float width = ((float)this.Size.Width) - 2 * padx; float height = ((float)this.Size.Height) - 2 * pady; float emSize = height; g.DrawString(letter, new Font(FontFamily.GenericSansSerif, emSize, FontStyle.Regular), new SolidBrush(Color.Black), padx, pady); Yes, I know there is the label control that I could use instead and set the centering with that, but I actually do need to do this manually with the Graphics class.
c#
graphics
null
null
null
null
open
Center text output from Graphics.DrawString() === I'm using the .NET Graphics class and the DrawString() method to render a single character to the screen. The problem is that I can't seem to get it centered properly. No matter what I set for the Y coordinate of the location of the string render, it always comes out lower than that and the larger the text size the greater the Y offset. For example, at text size 12, the offset is about 4, but at 32 the offset is about 10. I want the character to vertically take up most of the rectangle it's being drawn in and be centered horizontally. Here's my basic code. "this" is referencing the user control it's being drawn in. Graphics g = this.CreateGraphics(); float padx = ((float)this.Size.Width) * (0.05F); float pady = ((float)this.Size.Height) * (0.05F); float width = ((float)this.Size.Width) - 2 * padx; float height = ((float)this.Size.Height) - 2 * pady; float emSize = height; g.DrawString(letter, new Font(FontFamily.GenericSansSerif, emSize, FontStyle.Regular), new SolidBrush(Color.Black), padx, pady); Yes, I know there is the label control that I could use instead and set the centering with that, but I actually do need to do this manually with the Graphics class.
0
8,004
08/11/2008 17:43:50
1,027
08/11/2008 15:09:38
1
0
Best way to wrap rsync progress in a gui?
I use [rsync][1] to synchronize files to Windows clients in a server agnostic way. What methods are available to send the progress of rsync to the parent process for display in a gui progress bar? I imagine two or three choices exist. (1) Watch STDOUT (2) Watch rsync.exe log file, similar to unix `tail` (3) Watch rsync console output in memory. Which one is best/preferred? [1]: http://rsync.samba.org/
windows
gui
memory
console
logs
null
open
Best way to wrap rsync progress in a gui? === I use [rsync][1] to synchronize files to Windows clients in a server agnostic way. What methods are available to send the progress of rsync to the parent process for display in a gui progress bar? I imagine two or three choices exist. (1) Watch STDOUT (2) Watch rsync.exe log file, similar to unix `tail` (3) Watch rsync console output in memory. Which one is best/preferred? [1]: http://rsync.samba.org/
0
8,021
08/11/2008 17:59:01
742
08/08/2008 13:33:41
1
0
Allow user to set up an SSH tunnel, but nothing else
I'd like to allow a user to set up an SSH tunnel to a particular machine on a particular port (say, 5000), but I don't want to restrict this user as much as possible. (Authentication will be with public/private keypair). I know I need to edit the relevant ~/.ssh/authorized_keys file, but I'm not sure exactly what content to put in there. Lorin
ssh
unix
null
null
null
null
open
Allow user to set up an SSH tunnel, but nothing else === I'd like to allow a user to set up an SSH tunnel to a particular machine on a particular port (say, 5000), but I don't want to restrict this user as much as possible. (Authentication will be with public/private keypair). I know I need to edit the relevant ~/.ssh/authorized_keys file, but I'm not sure exactly what content to put in there. Lorin
0
8,033
08/11/2008 18:09:35
571
08/06/2008 20:19:59
292
28
Migration library for .NET
There are a number of migration libraries for .NET. Which one do you prefer and why?
.net
migration
null
null
null
null
open
Migration library for .NET === There are a number of migration libraries for .NET. Which one do you prefer and why?
0
8,042
08/11/2008 18:13:44
905
08/10/2008 09:37:14
23
13
Extension interface patterns
The new extensions in .Net 3.5 allow functionality to be split out from interfaces. For instance in .Net 2.0 public interface IHaveChildren { string ParentType { get; } int ParentId { get; } List<IChild> GetChildren() } Can (in 3.5) become: public interface IHaveChildren { string ParentType { get; } int ParentId { get; } } public static HaveChildrenExtension { public static List<IChild> GetChildren( this IHaveChildren ) { //logic to get children by parent type and id //shared for all classes implementing IHaveChildren } } This seems to me to be a better mechanism for many interfaces. They no longer need an abstract base to share this code, and functionally the code works the same. This could make code more maintainable and easier to test. The only disadvantage being that an abstract bases implementation can be virtual, but can that be worked around (would an instance method hide an extension method with the same name? would it be confusing code to do so?) Any other reasons not to regularly use this pattern?
c#
.net-3.5
extension-methods
null
null
null
open
Extension interface patterns === The new extensions in .Net 3.5 allow functionality to be split out from interfaces. For instance in .Net 2.0 public interface IHaveChildren { string ParentType { get; } int ParentId { get; } List<IChild> GetChildren() } Can (in 3.5) become: public interface IHaveChildren { string ParentType { get; } int ParentId { get; } } public static HaveChildrenExtension { public static List<IChild> GetChildren( this IHaveChildren ) { //logic to get children by parent type and id //shared for all classes implementing IHaveChildren } } This seems to me to be a better mechanism for many interfaces. They no longer need an abstract base to share this code, and functionally the code works the same. This could make code more maintainable and easier to test. The only disadvantage being that an abstract bases implementation can be virtual, but can that be worked around (would an instance method hide an extension method with the same name? would it be confusing code to do so?) Any other reasons not to regularly use this pattern?
0
8,050
08/11/2008 18:19:48
383
08/05/2008 10:46:37
1,422
162
Beginners Guide to LINQ
During the beta of Stack Overflow, I have seen quite a few questions about LINQ SQL but know nothing about it... it sounds very interesting. **What is LINQ and how do I get started?** Links guides or documentation a bonus :) *PS: I am a long time C# developer who daily uses Datatables and Parameterized SQL*
linq
guide
null
null
null
null
open
Beginners Guide to LINQ === During the beta of Stack Overflow, I have seen quite a few questions about LINQ SQL but know nothing about it... it sounds very interesting. **What is LINQ and how do I get started?** Links guides or documentation a bonus :) *PS: I am a long time C# developer who daily uses Datatables and Parameterized SQL*
0
8,066
08/11/2008 18:30:44
721
08/08/2008 11:28:03
44
14
.NET Interfaces
Over the past few years I've changed from having a long flowing page of controls that I hid/showed to using a lot of user controls. I've always had a bit of a discussion between co-workers on best practices. Should you have properties that you populate, or use paramterized sub's to load the information in your controls? Part of my fear of using paramteter's is the fact that I cannot make sure that everything will be populated. What is the basic rule's for using interfaces? I've never created one. And should I try this, or stay with a "sub load"?
.net
usercontrols
interface
null
null
null
open
.NET Interfaces === Over the past few years I've changed from having a long flowing page of controls that I hid/showed to using a lot of user controls. I've always had a bit of a discussion between co-workers on best practices. Should you have properties that you populate, or use paramterized sub's to load the information in your controls? Part of my fear of using paramteter's is the fact that I cannot make sure that everything will be populated. What is the basic rule's for using interfaces? I've never created one. And should I try this, or stay with a "sub load"?
0
8,087
08/11/2008 18:51:43
1,035
08/11/2008 16:46:55
31
2
What's your favourite way of interacting with DBs from your programming language?
There are numerous ways to connect and interact with the DB layer. In Java, for example, common usages are JDBC calls of raw SQL, object relational mappers, JDBCTemplate (Spring), stored procedures, etc. In your language, which option is your preference and why? When would you consider the others?
database
databases
designpatterns
null
null
null
open
What's your favourite way of interacting with DBs from your programming language? === There are numerous ways to connect and interact with the DB layer. In Java, for example, common usages are JDBC calls of raw SQL, object relational mappers, JDBCTemplate (Spring), stored procedures, etc. In your language, which option is your preference and why? When would you consider the others?
0
8,106
08/11/2008 19:11:49
380
08/05/2008 10:39:18
345
45
Has anyone run performance benchmarks comparing LINQ
to yesteryear's standards such as nHibernate, good old custom ORM, or something like LLBGenPro? Also, having run the benchmarks, what are your suggestions?
.net
performance
linq
dotnet
benchmarking
null
open
Has anyone run performance benchmarks comparing LINQ === to yesteryear's standards such as nHibernate, good old custom ORM, or something like LLBGenPro? Also, having run the benchmarks, what are your suggestions?
0
8,107
08/11/2008 19:12:33
999
08/11/2008 12:32:21
59
12
MySQL replication for fallback scenario
When I have two mysql servers that have different jobs (holding different databases) but want to be able to use one of them to slip in when the other one fails, what would you suggest how I keep the data on both of them equal "close to realtime"? Obviously it's not possible to make a full database dump every x minutes. I've read about the [Binary Log][1], is that the way that I need to go? Will that not slow down the fallback server a lot? Is there a way to not include some tables in the binary log - where it doesn't matter that the data has changed? [1]: http://dev.mysql.com/doc/refman/5.0/en/binary-log.html
mysql
replication
binary-log
fallback
null
null
open
MySQL replication for fallback scenario === When I have two mysql servers that have different jobs (holding different databases) but want to be able to use one of them to slip in when the other one fails, what would you suggest how I keep the data on both of them equal "close to realtime"? Obviously it's not possible to make a full database dump every x minutes. I've read about the [Binary Log][1], is that the way that I need to go? Will that not slow down the fallback server a lot? Is there a way to not include some tables in the binary log - where it doesn't matter that the data has changed? [1]: http://dev.mysql.com/doc/refman/5.0/en/binary-log.html
0
9,644,672
03/10/2012 07:18:57
1,257,817
03/08/2012 19:11:21
16
0
basic codeigniter active record and native query
i'm confuse about simple problem - what the different active record and native query? - if i have a trouble when coding CI, what should i do? are there trouble shoot? what fitur should i use? - and last, what the different between CI session and php session thaks for your answer here's i found about the different, but still not make me statisfied i found this: > The Session class permits you maintain a user's "state" and track their activity while they browse your site. The Session class stores session information for each user as serialized (and optionally encrypted) data in a cookie. It can also store the session data in a database table for added security, as this permits the session ID in the user's cookie to be matched against the stored session ID. By default only the cookie is saved. If you choose to use the database option you'll need to create the session table as indicated below.
php
codeigniter-2
null
null
null
null
open
basic codeigniter active record and native query === i'm confuse about simple problem - what the different active record and native query? - if i have a trouble when coding CI, what should i do? are there trouble shoot? what fitur should i use? - and last, what the different between CI session and php session thaks for your answer here's i found about the different, but still not make me statisfied i found this: > The Session class permits you maintain a user's "state" and track their activity while they browse your site. The Session class stores session information for each user as serialized (and optionally encrypted) data in a cookie. It can also store the session data in a database table for added security, as this permits the session ID in the user's cookie to be matched against the stored session ID. By default only the cookie is saved. If you choose to use the database option you'll need to create the session table as indicated below.
0
9,651,658
03/11/2012 01:27:16
492,348
10/30/2010 19:20:31
64
7
Eclipse PDT Debugging Setup (XDebug/Zend)
I've been having a hell of a time getting Eclipse to debug my CakePHP application. I've tried reading through several tutorials (none of which were that great). I've tried using both Zend and XDebug. I'm not even sure on exactly how I'm supposed to be using this thing once it's set up properly. I tried setting a break point in my PHP code, right-clicking the PHP file in the text editor, and selecting 'debug php web application', but it never hits the break point. It opens up a browser within eclipse with some GET parameters attached to my normal URL: > ?debug_host=192.168.1.2%2C127.0.0.1&start_debug=1&debug_port=10000&original_url=http%3A%2F%2Flocalhost%2Fparticipants&send_sess_end=1&debug_stop=1&debug_start_session=1&debug_no_cache=1331422177353&debug_session_id=1000 One thing I wasn't sure about in my project php debugging properties was the PHP executable field. It was automatically set to 'none', so I had to create an entry that pointed to '/usr/bin/php'. Maybe this isn't correct? I went as far as creating a simple application with one php file that just had a few echo statements. I can't get the debugger to hit a breakpoint in that either. Here's my phpinfo(): https://sites.google.com/site/kylephpinfo/phpinfo.html?attredirects=0&d=1 I've never had so much trouble getting a debugger to work in my life..
eclipse
zend-framework
aptana
xdebug
pdt
null
open
Eclipse PDT Debugging Setup (XDebug/Zend) === I've been having a hell of a time getting Eclipse to debug my CakePHP application. I've tried reading through several tutorials (none of which were that great). I've tried using both Zend and XDebug. I'm not even sure on exactly how I'm supposed to be using this thing once it's set up properly. I tried setting a break point in my PHP code, right-clicking the PHP file in the text editor, and selecting 'debug php web application', but it never hits the break point. It opens up a browser within eclipse with some GET parameters attached to my normal URL: > ?debug_host=192.168.1.2%2C127.0.0.1&start_debug=1&debug_port=10000&original_url=http%3A%2F%2Flocalhost%2Fparticipants&send_sess_end=1&debug_stop=1&debug_start_session=1&debug_no_cache=1331422177353&debug_session_id=1000 One thing I wasn't sure about in my project php debugging properties was the PHP executable field. It was automatically set to 'none', so I had to create an entry that pointed to '/usr/bin/php'. Maybe this isn't correct? I went as far as creating a simple application with one php file that just had a few echo statements. I can't get the debugger to hit a breakpoint in that either. Here's my phpinfo(): https://sites.google.com/site/kylephpinfo/phpinfo.html?attredirects=0&d=1 I've never had so much trouble getting a debugger to work in my life..
0
9,651,665
03/11/2012 01:28:18
855,473
07/21/2011 08:18:10
105
8
Is there any thing just like Bundle in C#?
I'm working on a project with c# and I need something like bundle that we have on android. any suggestion?
c#
android
bundle
null
null
null
open
Is there any thing just like Bundle in C#? === I'm working on a project with c# and I need something like bundle that we have on android. any suggestion?
0
9,645,167
03/10/2012 08:59:34
1,206,365
02/13/2012 08:36:19
1
0
Autosize UITableView
I'm using cells to display information from a plist.The problem is that there is a string that has a lot of content. TableView for rows is shown like this: - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{ return 65.0; I know, with this that all rows will have a fixed 65 size, but how can fix according to the content? The other thing is that it only shows one row of content (sentence finish with 3 dots and it doesn't show the rest of the text), but I guess it has to do with this.
uitableview
null
null
null
null
null
open
Autosize UITableView === I'm using cells to display information from a plist.The problem is that there is a string that has a lot of content. TableView for rows is shown like this: - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{ return 65.0; I know, with this that all rows will have a fixed 65 size, but how can fix according to the content? The other thing is that it only shows one row of content (sentence finish with 3 dots and it doesn't show the rest of the text), but I guess it has to do with this.
0
9,645,169
03/10/2012 09:00:04
836,366
07/09/2011 03:32:46
338
17
Sound string declaration hangs arduino compiler
I have a string of chars from an 8 but wav file that I'm trying to import into my arduino project. I declare it like this const unsigned char sounddata_data[] PROGMEM = "€€[fill these brackets in with 6500 other chars]"; When I try to run this code the compiler doesn't give me any errors, it just hangs and never finishes compiling. I know that it's this line because if I declare this with a shorter string, or with other types of declaration (like putting commas between each char), it works. Is there a line length limit in the arduino code that's stopping me? If I have to just accept this and put commas between every char is there a good method? I could always write a simple program to do it but I have a number of sound files to convert and I want to make it easy and simple to read the code. Thanks in advance!
c
string
audio
arduino
wav
null
open
Sound string declaration hangs arduino compiler === I have a string of chars from an 8 but wav file that I'm trying to import into my arduino project. I declare it like this const unsigned char sounddata_data[] PROGMEM = "€€[fill these brackets in with 6500 other chars]"; When I try to run this code the compiler doesn't give me any errors, it just hangs and never finishes compiling. I know that it's this line because if I declare this with a shorter string, or with other types of declaration (like putting commas between each char), it works. Is there a line length limit in the arduino code that's stopping me? If I have to just accept this and put commas between every char is there a good method? I could always write a simple program to do it but I have a number of sound files to convert and I want to make it easy and simple to read the code. Thanks in advance!
0
8,127
08/11/2008 19:36:47
982
08/11/2008 12:08:33
1
0
Pre-build task - deleting the working copy in CruiseControl.NET
I'm currently in the process of setting up a continuous integration environment at work. We are using VisualSVN Server and CrusieControl.NET. Occasionally a build will fail and a sympton is that there are conflicts in the CruiseControl.NET working copy. I believe this is due to the way I've setup the Visual Studio solutions. Hopefully the more projects we run in this environment the better our understanding of how to set them up will be so I'm not questioning why the conflicts happen at this stage. To fix the builds I delete the working copy and force a new build - this works every time (currently). So my questions are: is deleting the working copy a valid part of a continuous integration build process, and how do I go about it? I've tried solutions involcing MSTask and calling delete from the command line but I'm not having any luck. Sorry for being so wordy - good job this is a beta :)
continuous-integration
cruisecontrol.net
visualsvnserver
visual-studio
null
null
open
Pre-build task - deleting the working copy in CruiseControl.NET === I'm currently in the process of setting up a continuous integration environment at work. We are using VisualSVN Server and CrusieControl.NET. Occasionally a build will fail and a sympton is that there are conflicts in the CruiseControl.NET working copy. I believe this is due to the way I've setup the Visual Studio solutions. Hopefully the more projects we run in this environment the better our understanding of how to set them up will be so I'm not questioning why the conflicts happen at this stage. To fix the builds I delete the working copy and force a new build - this works every time (currently). So my questions are: is deleting the working copy a valid part of a continuous integration build process, and how do I go about it? I've tried solutions involcing MSTask and calling delete from the command line but I'm not having any luck. Sorry for being so wordy - good job this is a beta :)
0
8,128
08/11/2008 19:41:20
17
08/01/2008 12:02:21
556
44
How do I calculate CRC32 of a string
How do I calculate the CRC32 (Cyclic Redundancy Checksum) of a string in .NET?
.net
crc32
null
null
null
null
open
How do I calculate CRC32 of a string === How do I calculate the CRC32 (Cyclic Redundancy Checksum) of a string in .NET?
0
8,140
08/11/2008 19:48:52
277
08/04/2008 10:55:22
73
2
Plugin Capability
Is there a general procedure for programming extensibility capability into your code? I am wondering what the general procedure is for adding extension-type capability to a system you are writing so that functionality can be extended through some kind of plugin API rather than having to modify the core code of a system. Do such things tend to be dependent on the language the system was written in, or is there a general method for allowing for this?
plugins
extensibility
null
null
null
null
open
Plugin Capability === Is there a general procedure for programming extensibility capability into your code? I am wondering what the general procedure is for adding extension-type capability to a system you are writing so that functionality can be extended through some kind of plugin API rather than having to modify the core code of a system. Do such things tend to be dependent on the language the system was written in, or is there a general method for allowing for this?
0