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
58,807
09/12/2008 12:23:33
5,592
09/10/2008 14:28:56
230
8
Can a Programmer Become a Decent Graphic Designer?
As a developer completely void of artistic skills, it's frustrating building applications from scratch. I know there are several open-source template web sites to draw from, but are there any good books/tutorials/web sites that can turn a poor, artistically-challenged developer into a moderately-capable graphic designer?
graphics
development
null
null
null
03/08/2012 02:36:06
not constructive
Can a Programmer Become a Decent Graphic Designer? === As a developer completely void of artistic skills, it's frustrating building applications from scratch. I know there are several open-source template web sites to draw from, but are there any good books/tutorials/web sites that can turn a poor, artistically-challenged developer into a moderately-capable graphic designer?
4
58,809
09/12/2008 12:24:39
4,674
09/05/2008 04:55:59
16
2
Retrieving the associated shared service provider's name?
How do you programmatically retrieve the name of a shared services provider that's associated with a specific Sharepoint web application? I have a custom solution that needs to: 1. Enumerate all web applications that it's deployed to 2. Figure out the Shared Services provider that each of the web applications is associated with 3. Access a Business Data Catalog installed on the SSP to retrieve some data 4. Enumerate through all site collections in those web applications 5. Perform various tasks within the site collections according to the data I got points 1, 3, 4 and 5 figured out, but 2 is somewhat troublesome. I want to avoid hardcoding the SSP name anywhere and not require the farm administrator to manually edit a configuration file. All information I need is in the Sharepoint configuration database, I just need to know how to access it through the object model.
sharepoint
moss
sharedservicesprovider
null
null
null
open
Retrieving the associated shared service provider's name? === How do you programmatically retrieve the name of a shared services provider that's associated with a specific Sharepoint web application? I have a custom solution that needs to: 1. Enumerate all web applications that it's deployed to 2. Figure out the Shared Services provider that each of the web applications is associated with 3. Access a Business Data Catalog installed on the SSP to retrieve some data 4. Enumerate through all site collections in those web applications 5. Perform various tasks within the site collections according to the data I got points 1, 3, 4 and 5 figured out, but 2 is somewhat troublesome. I want to avoid hardcoding the SSP name anywhere and not require the farm administrator to manually edit a configuration file. All information I need is in the Sharepoint configuration database, I just need to know how to access it through the object model.
0
58,825
09/12/2008 12:32:33
1,693
08/18/2008 02:25:37
1,016
41
Javascript syntax highlighting in vim
Has anyone else found VIM's syntax highlighting of Javascript sub-optimal? I'm finding that sometimes I need to scroll around in order to get the syntax highlighting adjusted, as sometimes it mysteriously drops all highlighting. Are there any work-arounds or ways to fix this? I'm using vim 7.1.
javascript
vim
syntax-highlighting
editing
null
null
open
Javascript syntax highlighting in vim === Has anyone else found VIM's syntax highlighting of Javascript sub-optimal? I'm finding that sometimes I need to scroll around in order to get the syntax highlighting adjusted, as sometimes it mysteriously drops all highlighting. Are there any work-arounds or ways to fix this? I'm using vim 7.1.
0
58,827
09/12/2008 12:33:49
832
08/09/2008 06:51:40
3,780
245
ASP.NET Custom Controls and "Dynamic" Event Model
OK, I am not sure if the title it completely accurate, open to suggestions! I am in the process of creating an ASP.NET custom control, this is something that is still relatively new to me, so please bear with me. I am thinking about the event model. Since we are not using Web Controls there are no events being fired from buttons, rather I am manually calling **__doPostBack** with the appropriate arguments. However this can obviously mean that there are a lot of postbacks occuring when say, selecting options (which render differently when selected). In time, I will need to make this more Ajax-y and responsive, so I will need to change the event binding to call local Javascript. So, I was thinking I should be able to toggle the "mode" of the control, it can either use postback and handlle itself, or you can specify the Javascript function names to call instead of the doPostBack. * What are your thoughts on this? * Am I approaching the raising of the events from the control in the wrong way? (totally open to suggestions here!) * How would you approach a similar problem?
asp.net
subjective
events
custom-server-controls
null
null
open
ASP.NET Custom Controls and "Dynamic" Event Model === OK, I am not sure if the title it completely accurate, open to suggestions! I am in the process of creating an ASP.NET custom control, this is something that is still relatively new to me, so please bear with me. I am thinking about the event model. Since we are not using Web Controls there are no events being fired from buttons, rather I am manually calling **__doPostBack** with the appropriate arguments. However this can obviously mean that there are a lot of postbacks occuring when say, selecting options (which render differently when selected). In time, I will need to make this more Ajax-y and responsive, so I will need to change the event binding to call local Javascript. So, I was thinking I should be able to toggle the "mode" of the control, it can either use postback and handlle itself, or you can specify the Javascript function names to call instead of the doPostBack. * What are your thoughts on this? * Am I approaching the raising of the events from the control in the wrong way? (totally open to suggestions here!) * How would you approach a similar problem?
0
58,831
09/12/2008 12:37:34
3,751
08/30/2008 14:46:15
1
1
Ambiguity in Left joins (oracle only?)
My boss found a bug in a query I created, and I don't understand the reasoning behind the bug, although the query results prove he's correct. Here's the query (simplified version) before the fix: select PTNO,PTNM,CATCD from PARTS left join CATEGORIES on (CATEGORIES.CATCD=PARTS.CATCD); and here it is after the fix: select PTNO,PTNM,PARTS.CATCD from PARTS left join CATEGORIES on (CATEGORIES.CATCD=PARTS.CATCD); The bug was, that null values were being shown for column CATCD, i.e. the query results included results from table CATEGORIES instead of PARTS. Here's what I don't understand: if there was ambiguity in the original query, why didn't Oracle throw an error? As far as I understood, in the case of left joins, the "main" table in the query (PARTS) has precedence in ambiguity. Am I wrong, or just not thinking about this problem correctly?
sql
oracle
join
null
null
null
open
Ambiguity in Left joins (oracle only?) === My boss found a bug in a query I created, and I don't understand the reasoning behind the bug, although the query results prove he's correct. Here's the query (simplified version) before the fix: select PTNO,PTNM,CATCD from PARTS left join CATEGORIES on (CATEGORIES.CATCD=PARTS.CATCD); and here it is after the fix: select PTNO,PTNM,PARTS.CATCD from PARTS left join CATEGORIES on (CATEGORIES.CATCD=PARTS.CATCD); The bug was, that null values were being shown for column CATCD, i.e. the query results included results from table CATEGORIES instead of PARTS. Here's what I don't understand: if there was ambiguity in the original query, why didn't Oracle throw an error? As far as I understood, in the case of left joins, the "main" table in the query (PARTS) has precedence in ambiguity. Am I wrong, or just not thinking about this problem correctly?
0
58,841
09/12/2008 12:42:58
5,200
09/08/2008 12:47:59
21
2
Precompiled headers with GCC
Anyone had any success getting precompiled headers working with GCC? I have had no luck in my attempts and I haven't seen many good examples for how to set it up. I've tried on cygwin gcc 3.4.4 and using 4.0 on Ubuntu.
c++
gcc
null
null
null
null
open
Precompiled headers with GCC === Anyone had any success getting precompiled headers working with GCC? I have had no luck in my attempts and I haven't seen many good examples for how to set it up. I've tried on cygwin gcc 3.4.4 and using 4.0 on Ubuntu.
0
58,851
09/12/2008 12:46:28
3,022
08/26/2008 12:28:45
43
5
Can I set a breakpoint on 'memory access' in GDB?
I am running an application through gdb and I want to set a breakpoint for any time a specific variable is accessed / changed. Is there a good method for doing this? I would also be interested in other ways to monitor a variable in C/C++ to see if/when it changes.
gdb
null
null
null
null
null
open
Can I set a breakpoint on 'memory access' in GDB? === I am running an application through gdb and I want to set a breakpoint for any time a specific variable is accessed / changed. Is there a good method for doing this? I would also be interested in other ways to monitor a variable in C/C++ to see if/when it changes.
0
58,864
09/12/2008 12:51:42
797
08/09/2008 02:14:04
2,391
92
Should a software engineer know how to assemble their own computer?
Coming from a Mac background, I've never really spent much time tinkering with / assembling / tweaking my own computer beyond occasional RAM upgrades and swapping out hard disks. I feel like I have a good grasp on how a computer works at a conceptual level, CPU, bus, memory etc, but I haven't really got much practical experience in putting it all together / taking it apart. My question is, is there anything to be gained in terms of software engineering skills by learning to assemble my own computer? If you have spent your whole life putting bits of hardware together, how has it influenced the way you write or think about software?
hardware
software-engineering
null
null
null
null
open
Should a software engineer know how to assemble their own computer? === Coming from a Mac background, I've never really spent much time tinkering with / assembling / tweaking my own computer beyond occasional RAM upgrades and swapping out hard disks. I feel like I have a good grasp on how a computer works at a conceptual level, CPU, bus, memory etc, but I haven't really got much practical experience in putting it all together / taking it apart. My question is, is there anything to be gained in terms of software engineering skills by learning to assemble my own computer? If you have spent your whole life putting bits of hardware together, how has it influenced the way you write or think about software?
0
58,872
09/12/2008 12:53:35
3,785
08/30/2008 19:40:07
38
5
Rectangle functions in emacs
I've read in several places that the rectangle functions in emacs are very useful. I've read a bit about them, and I can't quite figure why. I mean, when you want to kill a paragraph, you mark the first row/column and then the last one, and that's actually a rectangle, right? But you can still use the normal kill... So what kind of transformations would you do with them?
emacs
null
null
null
null
null
open
Rectangle functions in emacs === I've read in several places that the rectangle functions in emacs are very useful. I've read a bit about them, and I can't quite figure why. I mean, when you want to kill a paragraph, you mark the first row/column and then the last one, and that's actually a rectangle, right? But you can still use the normal kill... So what kind of transformations would you do with them?
0
58,874
09/12/2008 12:54:01
730
08/08/2008 12:40:04
224
33
How do I enable line numbers in VS2008?
I can't seem to find that option. Surely it's in there? Thanks.
vs2008
null
null
null
null
null
open
How do I enable line numbers in VS2008? === I can't seem to find that option. Surely it's in there? Thanks.
0
58,886
09/12/2008 12:57:55
3,333
08/28/2008 00:32:00
584
37
Drilling down in VisualVM
I just installed Java 1.6_07 so I could try profiling with VisualVM. It tells me that my app is spending 60% of its time in `sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run` How do I find out what it was doing during that time? How much of the time was it waiting for something to call it, or doing something else? What was calling it and what was it calling? I just can't seem to find any way to drill down to deeper levels like there is in Quantify or the Perl profiler.
java
visualvm
null
null
null
null
open
Drilling down in VisualVM === I just installed Java 1.6_07 so I could try profiling with VisualVM. It tells me that my app is spending 60% of its time in `sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run` How do I find out what it was doing during that time? How much of the time was it waiting for something to call it, or doing something else? What was calling it and what was it calling? I just can't seem to find any way to drill down to deeper levels like there is in Quantify or the Perl profiler.
0
58,910
09/12/2008 13:09:44
5,744
09/11/2008 08:15:22
196
12
Converting SVG to PNG using C#
I've been trying to convert SVG images to PNG using C#, without having to write too much code myself. Can anyone recommend a library or example code for doing this?
c#
.net
svg
png
null
null
open
Converting SVG to PNG using C# === I've been trying to convert SVG images to PNG using C#, without having to write too much code myself. Can anyone recommend a library or example code for doing this?
0
58,916
09/12/2008 13:12:59
1,360
08/14/2008 18:11:31
72
16
Nested SQL Server transaction performing cascade delete
Suppose I have a table called Companies that has a DepartmentID column. There's also a Departaments table that has as EmployeeID column. Of course I have an Employee table as well. The problem is that I want to delete a company, so first i have to delete all the employees for every departament and then all the departaments in the company. Cascade Delete is not an option, therefore i wish to use nested transactions. I'm a complete noob at SQL. I would appreciate your help.
sql
server
transactions
nested
cascade
null
open
Nested SQL Server transaction performing cascade delete === Suppose I have a table called Companies that has a DepartmentID column. There's also a Departaments table that has as EmployeeID column. Of course I have an Employee table as well. The problem is that I want to delete a company, so first i have to delete all the employees for every departament and then all the departaments in the company. Cascade Delete is not an option, therefore i wish to use nested transactions. I'm a complete noob at SQL. I would appreciate your help.
0
58,925
09/12/2008 13:17:46
2,469
08/22/2008 12:41:47
622
44
ASP.NET how to Render a control to HTML?
I have any ASP.NET control. I want the HTML string how to do I get the HTML string of the control?
.net
asp.net
null
null
null
null
open
ASP.NET how to Render a control to HTML? === I have any ASP.NET control. I want the HTML string how to do I get the HTML string of the control?
0
58,933
09/12/2008 13:20:27
1,219
08/13/2008 13:44:47
2,476
149
Is there a keyboard shortcut for "Build Page" in Visual Studio 2005?
"Build Page" is one of the items you can add to your toolbar to compile just the ASPX page or ASCX control you are working on. Is there a keyboard shortcut for it?
visual-studio
null
null
null
null
null
open
Is there a keyboard shortcut for "Build Page" in Visual Studio 2005? === "Build Page" is one of the items you can add to your toolbar to compile just the ASPX page or ASCX control you are working on. Is there a keyboard shortcut for it?
0
58,935
09/12/2008 13:21:50
5,754
09/11/2008 09:06:06
3
0
How to permanently remove a breakpoint in Visual Studio 2005 /2008 (ASP.NET, C#)
Often, when I have a breakpoint on some line in Visual Studio, The program will run and stop there. great. I will then click the red circle (or press F9) to remove it. Obviously I don't want my program to keep stopping there. The problem is that the next time I refresh the page the breakpoint is back! The only way to permanently remove it is to open the breakpoints window and remove it there. Why does this happen and how can I change this behavior? I have noticed that these breakpoints which keep coming back have a little plus next to them in the breakpoints window which when you click on - open up many sub lines of breakpoints. What is the deal with that? Thanks, Adin
visual-studio
null
null
null
null
null
open
How to permanently remove a breakpoint in Visual Studio 2005 /2008 (ASP.NET, C#) === Often, when I have a breakpoint on some line in Visual Studio, The program will run and stop there. great. I will then click the red circle (or press F9) to remove it. Obviously I don't want my program to keep stopping there. The problem is that the next time I refresh the page the breakpoint is back! The only way to permanently remove it is to open the breakpoints window and remove it there. Why does this happen and how can I change this behavior? I have noticed that these breakpoints which keep coming back have a little plus next to them in the breakpoints window which when you click on - open up many sub lines of breakpoints. What is the deal with that? Thanks, Adin
0
58,937
09/12/2008 13:22:03
133
08/02/2008 09:06:05
377
11
How do I toggle Caps Lock in VB.NET?
Using VB.NET, how do I toggle the state of Caps Lock?
.net
windows
vb.net
null
null
null
open
How do I toggle Caps Lock in VB.NET? === Using VB.NET, how do I toggle the state of Caps Lock?
0
58,939
09/12/2008 13:24:16
2,443
08/22/2008 10:53:30
747
40
JComboBox Selection Change Listener?
I'm trying to get an event to fire whenever a choice is made from a JComboBox. The problem I'm having is that there is no obvious addSelectionListener method. I've tried to use actionPerformed but it never fires. Short of overriding the model for the JComboBox I'm out of ideas. **How do I get notified of a selection change on a JComboBox?**
swing
java
null
null
null
null
open
JComboBox Selection Change Listener? === I'm trying to get an event to fire whenever a choice is made from a JComboBox. The problem I'm having is that there is no obvious addSelectionListener method. I've tried to use actionPerformed but it never fires. Short of overriding the model for the JComboBox I'm out of ideas. **How do I get notified of a selection change on a JComboBox?**
0
58,940
09/12/2008 13:24:24
1,836
08/18/2008 19:45:57
43
1
Access to Result sets from within Stored procedures Transact-SQL SQL Server
I'm using SQL Server 2005, and I would like to know how to access different result sets from within transact-sql. The following stored procedure returns two result sets, how do I access them from, for example, another stored procedure? CREATE PROCEDURE foobar () AS BEGIN select foo_column1, foo_column2 from foo select bar_column3 from bar END Thanks in advance.
sql-server
tsql
sql
null
null
null
open
Access to Result sets from within Stored procedures Transact-SQL SQL Server === I'm using SQL Server 2005, and I would like to know how to access different result sets from within transact-sql. The following stored procedure returns two result sets, how do I access them from, for example, another stored procedure? CREATE PROCEDURE foobar () AS BEGIN select foo_column1, foo_column2 from foo select bar_column3 from bar END Thanks in advance.
0
58,968
09/12/2008 13:34:57
572
08/06/2008 20:56:54
3,801
280
What defines "pythonian" or "pythonic"?
I want to begin to learn Python, and I've seen that phrase come up here before, but I don't know exactly what it means. I've read some websites on Python scripting, but I don't recall ever seeing that (but I could have just glanced over it). What exactly makes something "pythonian" or "pythonic"?
terminology
python
null
null
null
null
open
What defines "pythonian" or "pythonic"? === I want to begin to learn Python, and I've seen that phrase come up here before, but I don't know exactly what it means. I've read some websites on Python scripting, but I don't recall ever seeing that (but I could have just glanced over it). What exactly makes something "pythonian" or "pythonic"?
0
58,969
09/12/2008 13:35:08
4,437
09/03/2008 19:31:59
28
0
Best Way to Unit Test a Website With Multiple User Types with PHPUnit
I'm starting to learn how to use PHPUnit to test the website I'm working on. The problem I'm running into is that I have five different user types defined and I need to be able to test every class with the different types. I currently have a user class and I would like to pass this to each function but I can't figure out how to pass this or test the different errors that could come back as being correct or not. Thanks
unit-testing
user
types
phpunit
null
null
open
Best Way to Unit Test a Website With Multiple User Types with PHPUnit === I'm starting to learn how to use PHPUnit to test the website I'm working on. The problem I'm running into is that I have five different user types defined and I need to be able to test every class with the different types. I currently have a user class and I would like to pass this to each function but I can't figure out how to pass this or test the different errors that could come back as being correct or not. Thanks
0
58,976
09/12/2008 13:37:16
133
08/02/2008 09:06:05
384
11
How do I get the current state of Caps Lock in VB.NET?
How do I find out whether or not Caps Lock is activated, using VB.NET? This is a follow-up to my [earlier question](http://stackoverflow.com/questions/58937/how-do-i-toggle-caps-lock-in-vbnet).
.net
windows
vb.net
null
null
null
open
How do I get the current state of Caps Lock in VB.NET? === How do I find out whether or not Caps Lock is activated, using VB.NET? This is a follow-up to my [earlier question](http://stackoverflow.com/questions/58937/how-do-i-toggle-caps-lock-in-vbnet).
0
59,000
09/12/2008 13:42:29
5,160
09/08/2008 09:59:33
11
1
Enforce SSL in code in an ashx handler
I have a site, which contains several ashx handlers, on a couple of the handlers I want to reject non-SSL requests. Is there a way that I can do this in code?
asp.net
ssl
null
null
null
null
open
Enforce SSL in code in an ashx handler === I have a site, which contains several ashx handlers, on a couple of the handlers I want to reject non-SSL requests. Is there a way that I can do this in code?
0
59,007
09/12/2008 13:45:27
5,427
09/09/2008 14:21:27
126
6
How do I use a start commit hook in TortoiseSVN to setup a custom log entry?
I'd like to automate TortoiseSVN as part of a commit process. Specifically I'd like to dynamically create a log entry for the commit dialog. I know that I can launch the commit dialog either from the commandline or by right clicking on a folder and selecting svncommit. I'd like to use the start commit hook to setup a log entry. I thought this worked by passing an entry file name in the MESSAGEFILE variable but when I add a hook script it cannot see this variable (hook launched successfully after right clicking and choosing svncommit). When I try using the commandline I use the /logmsgfile parameter but it seems to have no effect. I'm using tortoisesvn 1.5.3.
tortoisesvn
null
null
null
null
null
open
How do I use a start commit hook in TortoiseSVN to setup a custom log entry? === I'd like to automate TortoiseSVN as part of a commit process. Specifically I'd like to dynamically create a log entry for the commit dialog. I know that I can launch the commit dialog either from the commandline or by right clicking on a folder and selecting svncommit. I'd like to use the start commit hook to setup a log entry. I thought this worked by passing an entry file name in the MESSAGEFILE variable but when I add a hook script it cannot see this variable (hook launched successfully after right clicking and choosing svncommit). When I try using the commandline I use the /logmsgfile parameter but it seems to have no effect. I'm using tortoisesvn 1.5.3.
0
59,013
09/12/2008 13:47:34
5,190
09/08/2008 12:03:43
971
63
How to check which locale is a .NET application running under, without having access to its sourcecode?
Context: I'm in charge of running a service written in .NET. Proprietary application. It uses a SQL Server database. It ran as a user member of the Administrators group in the local machine. It worked alright before I added the machine to a domain. So, I added the machine to a domain (Win 2003) and changed the user to a member of the Power Users group and now, the Problem: Some of the SQL sentences it tries to execute are "magically" in spanish localization (where , separates floating point numbers instead of .), leading to errors. > There are fewer columns in the INSERT > statement than values specified in the > VALUES clause. The number of values in > the VALUES clause must match the > number of columns specified in the > INSERT statement. at > System.Data.SqlClient.SqlConnection.OnError(SqlException > exception, Boolean breakConnection) Operating System and Regional Settings in the machine are in English. I asked the provider of the application and he said: > Looks like you have a combination of > code running under Spanish locale, and > SQL server under English locale. So > the SQL expects '15.28' and not > '15,28' Which looks wrong to me in various levels (how can SQL Server distinguish between commas to separate arguments and commas belonging to a floating point number?). So, the code seems to be grabbing the spanish locale from somewhere, I don't know if it's the user it runs as, or someplace else (global policy, maybe?). But the question is What are the places where localization is defined on a machine/user/domain basis? I don't know all the places I must search for the culprit, so please help me to find it!
.net
windows
mssql
locale
null
null
open
How to check which locale is a .NET application running under, without having access to its sourcecode? === Context: I'm in charge of running a service written in .NET. Proprietary application. It uses a SQL Server database. It ran as a user member of the Administrators group in the local machine. It worked alright before I added the machine to a domain. So, I added the machine to a domain (Win 2003) and changed the user to a member of the Power Users group and now, the Problem: Some of the SQL sentences it tries to execute are "magically" in spanish localization (where , separates floating point numbers instead of .), leading to errors. > There are fewer columns in the INSERT > statement than values specified in the > VALUES clause. The number of values in > the VALUES clause must match the > number of columns specified in the > INSERT statement. at > System.Data.SqlClient.SqlConnection.OnError(SqlException > exception, Boolean breakConnection) Operating System and Regional Settings in the machine are in English. I asked the provider of the application and he said: > Looks like you have a combination of > code running under Spanish locale, and > SQL server under English locale. So > the SQL expects '15.28' and not > '15,28' Which looks wrong to me in various levels (how can SQL Server distinguish between commas to separate arguments and commas belonging to a floating point number?). So, the code seems to be grabbing the spanish locale from somewhere, I don't know if it's the user it runs as, or someplace else (global policy, maybe?). But the question is What are the places where localization is defined on a machine/user/domain basis? I don't know all the places I must search for the culprit, so please help me to find it!
0
59,016
09/12/2008 13:48:42
3,012
08/26/2008 11:55:24
265
10
The Open/Closed Principle
The Open/Closed Principle states that software entities (classes, modules, etc.) should be open for extension, but closed for modification. What does this mean, and why is it an important principle of good object-oriented design?
oop
null
null
null
null
null
open
The Open/Closed Principle === The Open/Closed Principle states that software entities (classes, modules, etc.) should be open for extension, but closed for modification. What does this mean, and why is it an important principle of good object-oriented design?
0
59,022
09/12/2008 13:50:42
5,882
09/11/2008 14:58:41
1
2
Replacing plain text password for app
We are currently storing plain text passwords for a web app that we have. I keep advocating moving to a password hash but another developer said that this would be less secure -- more passwords could match the hash and a dictionary/hash attack would be faster. Is there any truth to this argument?
password
null
null
null
null
null
open
Replacing plain text password for app === We are currently storing plain text passwords for a web app that we have. I keep advocating moving to a password hash but another developer said that this would be less secure -- more passwords could match the hash and a dictionary/hash attack would be faster. Is there any truth to this argument?
0
59,044
09/12/2008 13:56:30
2,908
08/25/2008 21:46:25
183
19
How do I do a simple 'Find and Replace" in MsSQL?
Question is pretty self explanitory. I want to do a simple find and replace, like you would in a text editor on the data in a column of my database (which is MsSQL 2003)
mssql
sql
null
null
null
null
open
How do I do a simple 'Find and Replace" in MsSQL? === Question is pretty self explanitory. I want to do a simple find and replace, like you would in a text editor on the data in a column of my database (which is MsSQL 2003)
0
59,075
09/12/2008 14:04:02
5,790
09/11/2008 11:38:57
171
10
How do I save each sheet in an Excel workbook to seperate CSV files with a macro?
Title says it all. I have an excel with multiple sheets. And I was looking for a macro that will save each sheet to a seperate CSV (comma seperated file). Excel will not allow you to save all sheets to different CSV files.
excel
csv
macro
vb
null
null
open
How do I save each sheet in an Excel workbook to seperate CSV files with a macro? === Title says it all. I have an excel with multiple sheets. And I was looking for a macro that will save each sheet to a seperate CSV (comma seperated file). Excel will not allow you to save all sheets to different CSV files.
0
59,080
09/12/2008 14:05:35
5,633
09/10/2008 15:17:08
1
1
SqlServer Express slow performance
Yesterday, I did a stress test for a .NET web application. I did this for 2 reasons, I wanted to see what performance was like under real world conditions and also to make sure we hadn't missed any problems during testing. We had 30 concurrent users in the application using it as they would during the normal course of their jobs. Most users had multiple windows of the application open. 10 Users: Not bad 20 Users: Slowing down 30 Users: Very, very slow but no timeouts It was loaded on the production server. It is a virtual server with a 2.66G Hz Xeon processor and 2 GB of RAM. We are using Win2K3 SP2. We have .NET 1.1 and 2.0 loaded and are using SQLExpress SP1. We rechecked the indexes on all of the tables afterword and they were all as they should be. We are supposed to launch this at the end of this month, I could sure use some help on improving performance. Thanks Scott and the Dev Team
sql-server-express
slow
performance
asp.net
null
null
open
SqlServer Express slow performance === Yesterday, I did a stress test for a .NET web application. I did this for 2 reasons, I wanted to see what performance was like under real world conditions and also to make sure we hadn't missed any problems during testing. We had 30 concurrent users in the application using it as they would during the normal course of their jobs. Most users had multiple windows of the application open. 10 Users: Not bad 20 Users: Slowing down 30 Users: Very, very slow but no timeouts It was loaded on the production server. It is a virtual server with a 2.66G Hz Xeon processor and 2 GB of RAM. We are using Win2K3 SP2. We have .NET 1.1 and 2.0 loaded and are using SQLExpress SP1. We rechecked the indexes on all of the tables afterword and they were all as they should be. We are supposed to launch this at the end of this month, I could sure use some help on improving performance. Thanks Scott and the Dev Team
0
59,083
09/12/2008 14:06:10
2,915
08/25/2008 23:15:12
3,173
130
What is Adobe Flex? Is it just Flash II?
Alright, I'm confused by all the buzzwords and press release bingo going on. - What is the relationship between flash and flex: - Replace flash (not really compatible) - Enhance flash - The next version of flash but still basically compatible - Separate technology altogether - ??? - If I'm starting out in Flash now, should I just skip to Flex? -Adam
flex
flash
null
null
null
null
open
What is Adobe Flex? Is it just Flash II? === Alright, I'm confused by all the buzzwords and press release bingo going on. - What is the relationship between flash and flex: - Replace flash (not really compatible) - Enhance flash - The next version of flash but still basically compatible - Separate technology altogether - ??? - If I'm starting out in Flash now, should I just skip to Flex? -Adam
0
59,098
09/12/2008 14:16:36
5,536
09/10/2008 10:34:53
11
1
Does Windows Server 2003 SP2 tell the truth about Free System Page Table Entries?
We have some Win32 console applications running on Windows Server 2003 Service Pack 2 that regularly fail with this: > Error 1450 (`ERROR_NO_SYSTEM_RESOURCES`): "Insufficient system resources exist to complete the requested service." All the documentation we've found suggests it is linked to the number of **Free System Page Table Entries** running out. We have 16GB RAM in these machines and use the `/3GB` Operating System switch to squeeze the Windows kernel into 1GB and allow our processes access to 3GB of address space. This drastically reduces the total number of Free System Page Table Entries, so combined with our heavy use of MapViewOfFile() it is perhaps not surprising that the kernel page table entries are running out. However, when using Performance Monitor to view the Free System Page Table Entries counter, the value is around 36,000 on reboot and **doesn't go down when our application starts**. I find it hard to believe that our application, which opens many large memory-mapped files, doesn't have any effect on the kernel page table. If we can't believe the counter, it's much more difficult to test the effect of any system changes we make. There is a promising Knowledge Base article, [The Performance tool does not accurately show the available Free System Page Table entries in Windows Server 2003](http://support.microsoft.com/kb/894067), but it says the problem has been fixed in Service Pack 1, and we are already on Service Pack 2. Has anyone else struggled with or solved this issue?
windows
winapi
microsoft
windows-server-2003
null
null
open
Does Windows Server 2003 SP2 tell the truth about Free System Page Table Entries? === We have some Win32 console applications running on Windows Server 2003 Service Pack 2 that regularly fail with this: > Error 1450 (`ERROR_NO_SYSTEM_RESOURCES`): "Insufficient system resources exist to complete the requested service." All the documentation we've found suggests it is linked to the number of **Free System Page Table Entries** running out. We have 16GB RAM in these machines and use the `/3GB` Operating System switch to squeeze the Windows kernel into 1GB and allow our processes access to 3GB of address space. This drastically reduces the total number of Free System Page Table Entries, so combined with our heavy use of MapViewOfFile() it is perhaps not surprising that the kernel page table entries are running out. However, when using Performance Monitor to view the Free System Page Table Entries counter, the value is around 36,000 on reboot and **doesn't go down when our application starts**. I find it hard to believe that our application, which opens many large memory-mapped files, doesn't have any effect on the kernel page table. If we can't believe the counter, it's much more difficult to test the effect of any system changes we make. There is a promising Knowledge Base article, [The Performance tool does not accurately show the available Free System Page Table entries in Windows Server 2003](http://support.microsoft.com/kb/894067), but it says the problem has been fixed in Service Pack 1, and we are already on Service Pack 2. Has anyone else struggled with or solved this issue?
0
59,099
09/12/2008 14:17:11
1,695
08/18/2008 02:49:06
1,078
77
What is the difference between the WPF TextBlock element and Label control?
Visually both of the following snippets produce the same UI. So why are there 2 controls.. **Snippet1** <TextBlock>Name:</TextBlock> <TextBox Name="nameTextBox" /> **Snippet2** <Label>Name:</Label> <TextBox Name="nameTextBox" /> (*Well I am gonna answer this myself... thought this is a useful tidbit I learnt today from [Programming WPF][1]*) [1]: http://www.amazon.com/Programming-WPF-Chris-Sells/dp/0596510373
wpf
.net-3.5
null
null
null
null
open
What is the difference between the WPF TextBlock element and Label control? === Visually both of the following snippets produce the same UI. So why are there 2 controls.. **Snippet1** <TextBlock>Name:</TextBlock> <TextBox Name="nameTextBox" /> **Snippet2** <Label>Name:</Label> <TextBox Name="nameTextBox" /> (*Well I am gonna answer this myself... thought this is a useful tidbit I learnt today from [Programming WPF][1]*) [1]: http://www.amazon.com/Programming-WPF-Chris-Sells/dp/0596510373
0
59,102
09/12/2008 14:19:29
6,126
09/12/2008 14:09:42
1
0
Best way to write a conversion function
Let's say that I'm writing a function to convert between temperature scales. I want to support at least Celsius, Fahrenheit, and Kelvin. Is it better to pass the source scale and target scale as separate parameters of the function, or some sort of combined parameter? Example 1 - separate parameters: function convertTemperature("celsius", "fahrenheit", 22) Example 2 - combined parameter: function convertTemperature("c-f", 22) The code inside the function is probably where it counts. With two parameters, the logic to determine what formula we're going to use is slightly more complicated, but a single parameter doesn't feel right somehow. Thoughts?
coding-style
null
null
null
null
null
open
Best way to write a conversion function === Let's say that I'm writing a function to convert between temperature scales. I want to support at least Celsius, Fahrenheit, and Kelvin. Is it better to pass the source scale and target scale as separate parameters of the function, or some sort of combined parameter? Example 1 - separate parameters: function convertTemperature("celsius", "fahrenheit", 22) Example 2 - combined parameter: function convertTemperature("c-f", 22) The code inside the function is probably where it counts. With two parameters, the logic to determine what formula we're going to use is slightly more complicated, but a single parameter doesn't feel right somehow. Thoughts?
0
59,105
09/12/2008 14:21:25
5,023
09/07/2008 12:27:27
379
28
Are you fluent in Unicode yet?
Almost 5 years ago Joel Spolsky wrote this article, ["The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets (No Excuses!)"](http://www.joelonsoftware.com/articles/Unicode.html). Like many, I read it carefully, realizing it was high-time I got to grips with this "replacement for ASCII". Unfortunately, 5 years later I feel I have slipped back into a few bad habits in this area. Have you? I don't write many specifically international applications, however I have helped build many ASP.NET internet facing websites, so I guess that's not an excuse. So for my benefit (and I believe many other developers) can I get some input from people on the following: - How to "get over" ASCII once and for all - Fundamental guidance when working with Unicode. - Recommended (recent) books and websites on Unicode (for developers). - Current state of Unicode (5 years after Joels article) - Future directions. I must admit I have a .NET background and so would also be happy for information on Unicode in the .NET framework. Of course this shouldn't stop anyone with a differing background from commenting though.
unicode
ascii
null
null
null
null
open
Are you fluent in Unicode yet? === Almost 5 years ago Joel Spolsky wrote this article, ["The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets (No Excuses!)"](http://www.joelonsoftware.com/articles/Unicode.html). Like many, I read it carefully, realizing it was high-time I got to grips with this "replacement for ASCII". Unfortunately, 5 years later I feel I have slipped back into a few bad habits in this area. Have you? I don't write many specifically international applications, however I have helped build many ASP.NET internet facing websites, so I guess that's not an excuse. So for my benefit (and I believe many other developers) can I get some input from people on the following: - How to "get over" ASCII once and for all - Fundamental guidance when working with Unicode. - Recommended (recent) books and websites on Unicode (for developers). - Current state of Unicode (5 years after Joels article) - Future directions. I must admit I have a .NET background and so would also be happy for information on Unicode in the .NET framework. Of course this shouldn't stop anyone with a differing background from commenting though.
0
59,107
09/12/2008 14:21:39
4,389
09/03/2008 12:25:41
61
4
Can I convert the following code to use generics?
I'm converting an application to use Java 1.5 and have found the following method: /** * Compare two Comparables, treat nulls as -infinity. * @param o1 * @param o2 * @return -1 if o1&lt;o2, 0 if o1==o2, 1 if o1&gt;o2 */ protected static int nullCompare(Comparable o1, Comparable o2) { if (o1 == null) { if (o2 == null) { return 0; } else { return -1; } } else if (o2 == null) { return 1; } else { return o1.compareTo(o2); } } Ideally I would like it to make the method take two Comparables of the same type, is it possible to convert this and how? I thought the following would do the trick: protected static <T extends Comparable> int nullCompare(T o1, T o2) { but it has failed to get rid of a warning in IntelliJ "Unchecked call to 'compareTo(T)' as a member of raw type 'java.lang.Comparable'" on the line: return o1.compareTo(o2);
java
generics
comparison
null
null
null
open
Can I convert the following code to use generics? === I'm converting an application to use Java 1.5 and have found the following method: /** * Compare two Comparables, treat nulls as -infinity. * @param o1 * @param o2 * @return -1 if o1&lt;o2, 0 if o1==o2, 1 if o1&gt;o2 */ protected static int nullCompare(Comparable o1, Comparable o2) { if (o1 == null) { if (o2 == null) { return 0; } else { return -1; } } else if (o2 == null) { return 1; } else { return o1.compareTo(o2); } } Ideally I would like it to make the method take two Comparables of the same type, is it possible to convert this and how? I thought the following would do the trick: protected static <T extends Comparable> int nullCompare(T o1, T o2) { but it has failed to get rid of a warning in IntelliJ "Unchecked call to 'compareTo(T)' as a member of raw type 'java.lang.Comparable'" on the line: return o1.compareTo(o2);
0
59,115
09/12/2008 14:23:39
985
08/11/2008 12:12:42
114
13
A good Ruby book (that resembles Dive into Python)
Anyone came across something like *Dive Into Python* for Ruby? Something that: 1. Gets the language knowledge across by examples of real code that does something useful not just trivial one-liners 1. Is ment for experienced programmers, not newbies (i.e. does not explain obvious stuff like object-orientation and what is a instance vs. class variable) 1. starts with simple stuff and continues onto the really Ruby cutting-edge features like metaprogramming etc. 1. Is fun to read Please do **not** answer ***"pickaxe"***, since this is clearly nothing like Dive...
python
ruby
null
null
null
null
open
A good Ruby book (that resembles Dive into Python) === Anyone came across something like *Dive Into Python* for Ruby? Something that: 1. Gets the language knowledge across by examples of real code that does something useful not just trivial one-liners 1. Is ment for experienced programmers, not newbies (i.e. does not explain obvious stuff like object-orientation and what is a instance vs. class variable) 1. starts with simple stuff and continues onto the really Ruby cutting-edge features like metaprogramming etc. 1. Is fun to read Please do **not** answer ***"pickaxe"***, since this is clearly nothing like Dive...
0
59,120
09/12/2008 14:25:08
5,967
09/11/2008 20:08:47
1
0
VS 2005 Installer Project Version Number
I am getting this error now that I hit version number 1.256.0: Error 4 Invalid product version '1.256.0'. Must be of format '##.##.####' The installer was fine with 1.255.0 but something with 256 (2^8) it doesn't like. I found this stated on msdn.com: The Version property must be formatted as N.N.N, where each N represents at least one and no more than four digits. (http://msdn.microsoft.com/en-us/library/d3ywkte8(VS.80).aspx) Which would make me believe there is nothing wrong 1.256.0 because it meets the rules stated above. Does anyone have any ideas on why this would be failing now?
vs2005
installer
null
null
null
null
open
VS 2005 Installer Project Version Number === I am getting this error now that I hit version number 1.256.0: Error 4 Invalid product version '1.256.0'. Must be of format '##.##.####' The installer was fine with 1.255.0 but something with 256 (2^8) it doesn't like. I found this stated on msdn.com: The Version property must be formatted as N.N.N, where each N represents at least one and no more than four digits. (http://msdn.microsoft.com/en-us/library/d3ywkte8(VS.80).aspx) Which would make me believe there is nothing wrong 1.256.0 because it meets the rules stated above. Does anyone have any ideas on why this would be failing now?
0
59,129
09/12/2008 14:28:14
6,061
09/12/2008 07:04:30
6
2
What platforms JavaFX is/will be supported on?
I have read about JavaFX, and like all new technologies I wanted to get my hands "dirty" with it. However, although it talks of multiplatform support, I can't find specifics on this. What platforms support a JavaFX application? All those with Java SE? ME? Does it depend upon the APIs in JavaFX that I use?
java
javafx
null
null
null
null
open
What platforms JavaFX is/will be supported on? === I have read about JavaFX, and like all new technologies I wanted to get my hands "dirty" with it. However, although it talks of multiplatform support, I can't find specifics on this. What platforms support a JavaFX application? All those with Java SE? ME? Does it depend upon the APIs in JavaFX that I use?
0
59,130
09/12/2008 14:28:18
4,099
09/01/2008 18:59:39
47
3
What do I need to know to globalize an asp.net application?
I'm writing an asp.net application that will need to be localized to several regions other than North America. What do I need to do to prepare for this globalization? What are your top 1 to 2 resources for learning how to write a world ready application.
asp.net
localization
globalization
null
null
null
open
What do I need to know to globalize an asp.net application? === I'm writing an asp.net application that will need to be localized to several regions other than North America. What do I need to do to prepare for this globalization? What are your top 1 to 2 resources for learning how to write a world ready application.
0
59,133
09/12/2008 14:30:09
2,015
08/19/2008 19:42:43
122
5
Bug template in Bugzilla
Is there any way to enforce a template in Bugzilla to guide users fill in bugs descriptions ? Actually, i'd like to put some markup texts in the bug description field and avoid the creation of custom fields. I've installed version 3.2rc1. Thanks in advance
bug-tracking
bugzilla
null
null
null
null
open
Bug template in Bugzilla === Is there any way to enforce a template in Bugzilla to guide users fill in bugs descriptions ? Actually, i'd like to put some markup texts in the bug description field and avoid the creation of custom fields. I've installed version 3.2rc1. Thanks in advance
0
59,148
09/12/2008 14:38:02
3,111
08/26/2008 17:47:14
197
12
Subversion Client-Side application
Which standalone Windows GUI application do you recommend for use for accessing a Subversion repository?
windows
svn
null
null
null
null
open
Subversion Client-Side application === Which standalone Windows GUI application do you recommend for use for accessing a Subversion repository?
0
59,154
09/12/2008 14:39:54
3,834
08/31/2008 06:25:52
58
9
Set Google Chrome as the Debugging Browser in Visual Studio
When I press F5 in Visual Studio 2008, I want Google Chrome launched as the browser that my ASP.NET app runs in. May I know how this can be done?
visual-studio-2008
google-chrome
null
null
null
null
open
Set Google Chrome as the Debugging Browser in Visual Studio === When I press F5 in Visual Studio 2008, I want Google Chrome launched as the browser that my ASP.NET app runs in. May I know how this can be done?
0
59,166
09/12/2008 14:45:45
454,247
09/11/2008 14:39:45
66
1
How do you delcare a Predicate Delegate inline?
I'm using C#. So I have an object which has some fields, doesn't really matter what. I have a generic list of these objects. List<MyObject> myObjects = new List<MyObject>(); myObjects.Add(myObject1); myObjects.Add(myObject2); myObjects.Add(myObject3); So I want to remove objects from my list based on some criteria. For instance, `myObject.X >= 10.` I would like to use the `RemoveAll(Predicate<T> match)` method for to do this. I know I can define a delegate which can be passed into RemoveAll, but I would like to know how to define this inline with an anonymous delegate, instead of creating a bunch of delegate functions which are only used in once place.
c#
delegates
null
null
null
null
open
How do you delcare a Predicate Delegate inline? === I'm using C#. So I have an object which has some fields, doesn't really matter what. I have a generic list of these objects. List<MyObject> myObjects = new List<MyObject>(); myObjects.Add(myObject1); myObjects.Add(myObject2); myObjects.Add(myObject3); So I want to remove objects from my list based on some criteria. For instance, `myObject.X >= 10.` I would like to use the `RemoveAll(Predicate<T> match)` method for to do this. I know I can define a delegate which can be passed into RemoveAll, but I would like to know how to define this inline with an anonymous delegate, instead of creating a bunch of delegate functions which are only used in once place.
0
59,175
09/12/2008 14:49:12
4,575
09/04/2008 18:21:41
126
7
What's the difference between the inner workings of Java's JVM and .NET's CLR?
What's the difference between the inner workings of Java's JVM and .NET's CLR? Perhaps a starting point would be, are they basically the same thing in their respective environments (Java > JVM > Machine code) (C# > CLR > IL).
c#
.net
java
jvm
clr
null
open
What's the difference between the inner workings of Java's JVM and .NET's CLR? === What's the difference between the inner workings of Java's JVM and .NET's CLR? Perhaps a starting point would be, are they basically the same thing in their respective environments (Java > JVM > Machine code) (C# > CLR > IL).
0
59,180
09/12/2008 14:53:04
2,908
08/25/2008 21:46:25
190
20
How do I disable validation in Web Data Administrator?
I'm trying to run some queries to get rid of XSS in our database using Web Data Administrator but I keep running into this Potentially Dangerous Request crap. How do I disable validation of the query in Web Data Administrator?
sql
mssql
null
null
null
null
open
How do I disable validation in Web Data Administrator? === I'm trying to run some queries to get rid of XSS in our database using Web Data Administrator but I keep running into this Potentially Dangerous Request crap. How do I disable validation of the query in Web Data Administrator?
0
59,181
09/12/2008 14:53:19
3,635
08/29/2008 16:13:11
34
6
WCF Service support file jsdebug fails to load
I have a WCF service that gets called from client side JavaScript. The call fails with a Service is null JavaScript error. WebDevelopment helper trace shows that the calls to load the jsdebug support file results in a 404 (file not found) error. Restarting IIS or clearing out the Temp ASP.Net files or setting batch="false" on the compilation tag in web.config does not resolve the problem From the browser http://Myserver/MyApp/Services/MyService.svc displays the service metadata however http://Myserver/MyApp/Services/MyService.svc/jsdebug results in a 404. Any ideas? TIA
asp.net
wcf
jsdebug
null
null
null
open
WCF Service support file jsdebug fails to load === I have a WCF service that gets called from client side JavaScript. The call fails with a Service is null JavaScript error. WebDevelopment helper trace shows that the calls to load the jsdebug support file results in a 404 (file not found) error. Restarting IIS or clearing out the Temp ASP.Net files or setting batch="false" on the compilation tag in web.config does not resolve the problem From the browser http://Myserver/MyApp/Services/MyService.svc displays the service metadata however http://Myserver/MyApp/Services/MyService.svc/jsdebug results in a 404. Any ideas? TIA
0
59,182
09/12/2008 14:53:24
206
08/03/2008 13:35:14
695
49
What is the best way to keep an asp:button from displaying it's URL on the status bar?
What is the best way to keep an asp:button from displaying it's URL on the status bar of the browser? The button is currently defines like this: <asp:button id="btnFind" runat="server" Text="Find Info" onclick="btnFind_Click"> </asp:button>
asp.net
null
null
null
null
null
open
What is the best way to keep an asp:button from displaying it's URL on the status bar? === What is the best way to keep an asp:button from displaying it's URL on the status bar of the browser? The button is currently defines like this: <asp:button id="btnFind" runat="server" Text="Find Info" onclick="btnFind_Click"> </asp:button>
0
59,191
09/12/2008 14:57:00
2,385
08/22/2008 00:18:38
40
8
Do I need to copy the .compiled files to the production server?
I'm using a deploy project to deploy my ASP.net web application. When I build the deploy project, all the .compiled files are re-created. Do I need to FTP them to the production web server? If I do a small change do I need to copy all the web site again?
asp.net
deployment
web-deployment-project
null
null
null
open
Do I need to copy the .compiled files to the production server? === I'm using a deploy project to deploy my ASP.net web application. When I build the deploy project, all the .compiled files are re-created. Do I need to FTP them to the production web server? If I do a small change do I need to copy all the web site again?
0
59,194
09/12/2008 14:58:29
4,778
09/05/2008 15:06:23
40
1
Developing drivers with no info
How does the open-source/free software community develop drivers for products that offer no documentation?
driver
kernel
linux
bsd
null
null
open
Developing drivers with no info === How does the open-source/free software community develop drivers for products that offer no documentation?
0
59,195
09/12/2008 14:59:14
5,551
09/10/2008 13:22:28
39
6
How are Mocks meant to be used?
When I originally was introduced to Mocks I felt the primary purpose was to mock up objects that come from external sources of data. This way I did not have to maintain an automated unit testing test database, I could just fake it. But now I am starting to think of it differently. I am wondering if Mocks are more effective used to completely isolate the tested method from anything outside of itself. The image that keeps coming to mind is the backdrop you use when painting. You want to keep the paint from getting all over everything. I am only testing that method, and I only want to know how it reacts to these faked up external factors? It seems incredibly tedious to do it this way but the advantage I am seeing is when the test fails it is because it is screwed up and not 16 layers down. But now I have to have 16 tests to get the same testing coverage because each piece would be tested in isolation. Plus each test becomes more complicated and more deeply tied to the method it is testing. It feels right to me but it also seems brutal so I kind of want to know what others think.
unit-testing
mocking
best
null
null
null
open
How are Mocks meant to be used? === When I originally was introduced to Mocks I felt the primary purpose was to mock up objects that come from external sources of data. This way I did not have to maintain an automated unit testing test database, I could just fake it. But now I am starting to think of it differently. I am wondering if Mocks are more effective used to completely isolate the tested method from anything outside of itself. The image that keeps coming to mind is the backdrop you use when painting. You want to keep the paint from getting all over everything. I am only testing that method, and I only want to know how it reacts to these faked up external factors? It seems incredibly tedious to do it this way but the advantage I am seeing is when the test fails it is because it is screwed up and not 16 layers down. But now I have to have 16 tests to get the same testing coverage because each piece would be tested in isolation. Plus each test becomes more complicated and more deeply tied to the method it is testing. It feels right to me but it also seems brutal so I kind of want to know what others think.
0
59,196
09/12/2008 14:59:19
1,638
08/17/2008 17:58:57
596
51
How can I tab accross a ButtonBar component in Flex?
I have a button bar inf flex along with several other input controls, I have set the tabIndex property for each control and all goes well until I tab to the ButtonBar. The ButtonBar has 3 buttons but tabbing to it, only the first button gets focus, tab again and the focus goes back to the top control... How can I make tabbing go through ALL buttons in a Flex Button bar? Is there a way to do this or do I need to create individual buttons for this? This seems like a possible bug to me...
flex
actionscript-3
null
null
null
null
open
How can I tab accross a ButtonBar component in Flex? === I have a button bar inf flex along with several other input controls, I have set the tabIndex property for each control and all goes well until I tab to the ButtonBar. The ButtonBar has 3 buttons but tabbing to it, only the first button gets focus, tab again and the focus goes back to the top control... How can I make tabbing go through ALL buttons in a Flex Button bar? Is there a way to do this or do I need to create individual buttons for this? This seems like a possible bug to me...
0
59,204
09/12/2008 15:02:32
1,095
08/12/2008 11:30:32
11
3
Data Encryption
A database that stores a lot of credit card information is an inevitable part of the system we have just completed. What I want though is ultimate security of the card numbers whereby we setup a mechanism to encrypt and decrypt but of ourselves cannot decrypt any given number. What I am after is a way to secure this information even down at the database level so no one can go in and produce a file of card numbers. How have others overcome this issue? What is the 'Standard' approach to this? As for usage of the data well the links are all private and secure and no transmission of the card number is performed except when a record is created and that is encrypted so I am not worried about the front end just the back end.
database
security
encrypt
null
null
null
open
Data Encryption === A database that stores a lot of credit card information is an inevitable part of the system we have just completed. What I want though is ultimate security of the card numbers whereby we setup a mechanism to encrypt and decrypt but of ourselves cannot decrypt any given number. What I am after is a way to secure this information even down at the database level so no one can go in and produce a file of card numbers. How have others overcome this issue? What is the 'Standard' approach to this? As for usage of the data well the links are all private and secure and no transmission of the card number is performed except when a record is created and that is encrypted so I am not worried about the front end just the back end.
0
59,207
09/12/2008 15:03:25
3,764
08/30/2008 16:14:55
45
2
How do you change the displayed order of ActiveScaffold "actions"?
I am using ActiveScaffold in a Ruby on Rails app, and have replaced the default "actions" text in the table (ie. "edit", "delete", "show") with icons using CSS. I have also added a couple of custom actions with action_link.add ("move" and "copy"). For clarity, **I would like to have the icons displayed in a different order** than they are. Specifically, I would like "edit" to be the first icon displayed. I seem to be able to change the order of the action_links by the changing the order of definition in the controller. I have also been able to change the order of the default actions by first config.actions.excluding everything, and then adding them with config.actions.add in a specific order. However, **my custom actions always seem to appear *before* the default actions** in the list. Ideally I would like them to display "edit" "copy" "move" "delete" (ie - built-in, custom, custom, built-in). Can anyone suggest how I might do this? One idea I had was to re-define "edit" as a custom action (with the default functionality), but I don't know how to go about this either.
ruby
ruby-on-rails
activescaffold
null
null
null
open
How do you change the displayed order of ActiveScaffold "actions"? === I am using ActiveScaffold in a Ruby on Rails app, and have replaced the default "actions" text in the table (ie. "edit", "delete", "show") with icons using CSS. I have also added a couple of custom actions with action_link.add ("move" and "copy"). For clarity, **I would like to have the icons displayed in a different order** than they are. Specifically, I would like "edit" to be the first icon displayed. I seem to be able to change the order of the action_links by the changing the order of definition in the controller. I have also been able to change the order of the default actions by first config.actions.excluding everything, and then adding them with config.actions.add in a specific order. However, **my custom actions always seem to appear *before* the default actions** in the list. Ideally I would like them to display "edit" "copy" "move" "delete" (ie - built-in, custom, custom, built-in). Can anyone suggest how I might do this? One idea I had was to re-define "edit" as a custom action (with the default functionality), but I don't know how to go about this either.
0
59,213
09/12/2008 15:05:25
5,662
09/10/2008 17:55:42
51
3
Easiest way to add a Header and Footer to a Printing.PrintDocument (.Net 2.0)?
What's the easiest way to add a header and footer to a .Net PrintDocument object, either pragmatically or at design-time? Specifically I'm trying to print a 3rd party grid control (Infragistics GridEx v4.3), which takes a PrintDocument object and draws itself into it. The resulting page just contains the grid and it's contents - however I would like to add a header or title to identify the printed report, and possibly a footer to show who printed it, when, and ideally a page number and total pages. I'm using VB.Net 2.0. Thanks for your help!
.net
vb.net
printing
printdocument
header
null
open
Easiest way to add a Header and Footer to a Printing.PrintDocument (.Net 2.0)? === What's the easiest way to add a header and footer to a .Net PrintDocument object, either pragmatically or at design-time? Specifically I'm trying to print a 3rd party grid control (Infragistics GridEx v4.3), which takes a PrintDocument object and draws itself into it. The resulting page just contains the grid and it's contents - however I would like to add a header or title to identify the printed report, and possibly a footer to show who printed it, when, and ideally a page number and total pages. I'm using VB.Net 2.0. Thanks for your help!
0
59,217
09/12/2008 15:07:04
3,058
08/26/2008 13:57:33
11
1
Merging two arrays in .Net
Is there a built in function in .Net 2.0 that will take two arrays and merge them into one array? The arrays are both of the same type. I'm getting these arrays from a widely used function within my code base and can't modify the function to return the data in a different format. I'm looking to avoid writing my own function to accomplish this if possible.
c#
.net-2.0
.net
null
null
null
open
Merging two arrays in .Net === Is there a built in function in .Net 2.0 that will take two arrays and merge them into one array? The arrays are both of the same type. I'm getting these arrays from a widely used function within my code base and can't modify the function to return the data in a different format. I'm looking to avoid writing my own function to accomplish this if possible.
0
59,220
09/12/2008 15:07:26
1,124
08/12/2008 15:13:50
480
27
How Do I Load an Assembly and All of its Dependencies at Runtime in C# for Reflection?
I'm writing a utility for myself, partly as an exercise in learning C# Reflection and partly because I actually want the resulting tool for my own use. What I'm after is basically pointing the application at an assembly and choosing a given class from which to select properties that should be included in an exported HTML form as fields. That form will be then used in my ASP.NET MVC app as the beginning of a View. As I'm using Subsonic objects for the applications where I want to use, this should be reasonable and I figured that, by wanting to include things like differing output HTML depending on data type, Reflection was the way to get this done. What I'm looking for, however, seems to be elusive. I'm trying to take the DLL/EXE that's chosen through the OpenFileDialog as the starting point and load it: String FilePath = Path.GetDirectoryName(FileName); System.Reflection.Assembly o = System.Reflection.Assembly.LoadFile(FileName); That works fine, but because Subsonic-generated objects actually are full of object types that are defined in Subsonic.dll, etc., those dependent objects aren't loaded. Enter: AssemblyName[] ReferencedAssemblies = o.GetReferencedAssemblies(); That, too, contains exactly what I would expect it to. However, what I'm trying to figure out is how to load those assemblies so that my digging into my objects will work properly. I understand that if those assemblies were in the GAC or in the directory of the running executable, I could just load them by their name, but that isn't likely to be the case for this use case and it's my primary use case. So, what it boils down to is how do I load a given assembly and all of its arbitrary assemblies starting with a filename and resulting in a completely Reflection-browsable tree of types, properties, methods, etc. I know that tools like Reflector do this, I just can't find the syntax for getting at it.
c#
.net
reflection
subsonic
null
null
open
How Do I Load an Assembly and All of its Dependencies at Runtime in C# for Reflection? === I'm writing a utility for myself, partly as an exercise in learning C# Reflection and partly because I actually want the resulting tool for my own use. What I'm after is basically pointing the application at an assembly and choosing a given class from which to select properties that should be included in an exported HTML form as fields. That form will be then used in my ASP.NET MVC app as the beginning of a View. As I'm using Subsonic objects for the applications where I want to use, this should be reasonable and I figured that, by wanting to include things like differing output HTML depending on data type, Reflection was the way to get this done. What I'm looking for, however, seems to be elusive. I'm trying to take the DLL/EXE that's chosen through the OpenFileDialog as the starting point and load it: String FilePath = Path.GetDirectoryName(FileName); System.Reflection.Assembly o = System.Reflection.Assembly.LoadFile(FileName); That works fine, but because Subsonic-generated objects actually are full of object types that are defined in Subsonic.dll, etc., those dependent objects aren't loaded. Enter: AssemblyName[] ReferencedAssemblies = o.GetReferencedAssemblies(); That, too, contains exactly what I would expect it to. However, what I'm trying to figure out is how to load those assemblies so that my digging into my objects will work properly. I understand that if those assemblies were in the GAC or in the directory of the running executable, I could just load them by their name, but that isn't likely to be the case for this use case and it's my primary use case. So, what it boils down to is how do I load a given assembly and all of its arbitrary assemblies starting with a filename and resulting in a completely Reflection-browsable tree of types, properties, methods, etc. I know that tools like Reflector do this, I just can't find the syntax for getting at it.
0
59,221
09/12/2008 15:07:30
3,764
08/30/2008 16:14:55
45
2
How can I display simple tooltips on icons in html?
I am using ActiveScaffold in a Ruby on Rails app, and to save space in the table I have replaced the default "actions" text in the table (ie. "edit", "delete", "show") with icons using CSS. I have also added a couple of custom actions with action_link.add ("move" and "copy"). For clarity, **I would like to have a tooltip pop up with the related action** (ie. "edit", "copy") when I hover the mouse over the icon. I thought I could do this by adding a simple "alt" definition to the <img> tag, but that doesn't appear to work. Can somebody point me in the right direction?
html
ruby
ruby-on-rails
activescaffold
tooltips
null
open
How can I display simple tooltips on icons in html? === I am using ActiveScaffold in a Ruby on Rails app, and to save space in the table I have replaced the default "actions" text in the table (ie. "edit", "delete", "show") with icons using CSS. I have also added a couple of custom actions with action_link.add ("move" and "copy"). For clarity, **I would like to have a tooltip pop up with the related action** (ie. "edit", "copy") when I hover the mouse over the icon. I thought I could do this by adding a simple "alt" definition to the <img> tag, but that doesn't appear to work. Can somebody point me in the right direction?
0
59,222
09/12/2008 15:07:32
5,882
09/11/2008 14:58:41
21
3
Software Architecture Related Podcasts
It has now been about 9 months since [ARCast with Ron Jacobs][1] stopped releasing new episodes and I miss this podcast. Can you recommend other podcasts in a similar vein? I already listen to HanselMinutes and DotNetRocks but they do not seem to have the same 'Software Architecture' / 'Big Picture' feel to them. [1]: http://channel9.msdn.com/shows/ARCast_with_Ron_Jacobs/ "ARCast with Ron Jacobs"
podcast
software-architecture
null
null
null
09/18/2011 02:59:04
not constructive
Software Architecture Related Podcasts === It has now been about 9 months since [ARCast with Ron Jacobs][1] stopped releasing new episodes and I miss this podcast. Can you recommend other podcasts in a similar vein? I already listen to HanselMinutes and DotNetRocks but they do not seem to have the same 'Software Architecture' / 'Big Picture' feel to them. [1]: http://channel9.msdn.com/shows/ARCast_with_Ron_Jacobs/ "ARCast with Ron Jacobs"
4
59,232
09/12/2008 15:10:27
5,662
09/10/2008 17:55:42
51
3
How do i find duplicate values in a table in Oracle?
What's the simplest SQL statement that will return the duplicate values for a given column and the count of their occurrences in an Oracle database table? For example: I have a `JOBS` table with the column `JOB_NUMBER` - how can I find out if I have any duplicate `JOB_NUMBER`s, and how many times they're duplicated?
sql
oracle
duplicate-data
null
null
null
open
How do i find duplicate values in a table in Oracle? === What's the simplest SQL statement that will return the duplicate values for a given column and the count of their occurrences in an Oracle database table? For example: I have a `JOBS` table with the column `JOB_NUMBER` - how can I find out if I have any duplicate `JOB_NUMBER`s, and how many times they're duplicated?
0
59,267
09/12/2008 15:20:14
3,834
08/31/2008 06:25:52
70
10
HTML.Button in ASP.NET MVC
Starting from ASP.NET MVC Preview 3, HTML.Button ( and other related HTML controls) are no longer supported. The question is, what is the equivalent for them? I've an app that was built using Preview 2, now I have to make it compatible with the latest CTP releases.
html
asp.net-mvc
null
null
null
null
open
HTML.Button in ASP.NET MVC === Starting from ASP.NET MVC Preview 3, HTML.Button ( and other related HTML controls) are no longer supported. The question is, what is the equivalent for them? I've an app that was built using Preview 2, now I have to make it compatible with the latest CTP releases.
0
59,270
09/12/2008 15:21:22
4,231
09/02/2008 13:21:16
153
8
What is the best way to rollout web applications?
I'm trying to create a standard way of rolling out web applications for our company. Currently we do it with zip files, vbscript/javascript, and manual some steps. For thick client installs we generate MSI installers using Wise/Wix. We don't create installers currently for websites as in general they are just xcopy deploy. However we have some config files that need to be changed, verify that certain handlers are registered in IIS... The list goes on. Do most people use MSI installers for web applications as well, or some other tool/scripting language?
deployment
null
null
null
null
null
open
What is the best way to rollout web applications? === I'm trying to create a standard way of rolling out web applications for our company. Currently we do it with zip files, vbscript/javascript, and manual some steps. For thick client installs we generate MSI installers using Wise/Wix. We don't create installers currently for websites as in general they are just xcopy deploy. However we have some config files that need to be changed, verify that certain handlers are registered in IIS... The list goes on. Do most people use MSI installers for web applications as well, or some other tool/scripting language?
0
59,280
09/12/2008 15:25:03
342
08/04/2008 19:59:52
835
83
Programmatically change combobox
I need to update a combobox with a new value so it changes the reflected text in it. The cleanest way to do this is after the combobox has been initialised and with a message. So I am trying to craft a postmessage to the hwnd that contains the combobox. So if I want to send a message to it, changing the currently selected item to the nth item, what would the PostMessage look like? I am guessing that it would involve ON_CBN_SELCHANGE, but I can't get it to work right. Thanks, G.
mfc
ccombobox
postmessage
null
null
null
open
Programmatically change combobox === I need to update a combobox with a new value so it changes the reflected text in it. The cleanest way to do this is after the combobox has been initialised and with a message. So I am trying to craft a postmessage to the hwnd that contains the combobox. So if I want to send a message to it, changing the currently selected item to the nth item, what would the PostMessage look like? I am guessing that it would involve ON_CBN_SELCHANGE, but I can't get it to work right. Thanks, G.
0
59,294
09/12/2008 15:27:17
1,288
08/14/2008 12:14:17
1,232
74
In SQL, what's the difference between count(column) and count(*)?
I have the following query: select column_name, count(column_name) from table group by column_name where count(column_name) > 1; What would be the difference if I replaced all calls to count(column_name) to count(*)? This question was inspired by [a previous one][1]. [1]: http://stackoverflow.com/questions/59232/how-do-i-find-duplicate-values-in-a-table-in-oracle
sql
null
null
null
null
null
open
In SQL, what's the difference between count(column) and count(*)? === I have the following query: select column_name, count(column_name) from table group by column_name where count(column_name) > 1; What would be the difference if I replaced all calls to count(column_name) to count(*)? This question was inspired by [a previous one][1]. [1]: http://stackoverflow.com/questions/59232/how-do-i-find-duplicate-values-in-a-table-in-oracle
0
59,296
09/12/2008 15:27:27
1,463
08/15/2008 17:26:44
484
32
How do you stop IIS SMTP Server from sending bounce emails?
How do you stop the "Default SMTP Virtual Server" from sending bounce messages for email addresses that you don't have? i.e. I'm using IIS' SMTP server to handle my email and if an email is sent unknown at mydomain.com a bounce email with 'address not known' (or something like that) is sent back to the sender. I want it to silently fail.
iis
smtp
pop
null
null
null
open
How do you stop IIS SMTP Server from sending bounce emails? === How do you stop the "Default SMTP Virtual Server" from sending bounce messages for email addresses that you don't have? i.e. I'm using IIS' SMTP server to handle my email and if an email is sent unknown at mydomain.com a bounce email with 'address not known' (or something like that) is sent back to the sender. I want it to silently fail.
0
59,297
09/12/2008 15:27:36
3,043
08/26/2008 13:24:14
2,123
207
When/Why to use Cascading in SQL Server?
When setting up foreign keys in SQL Server, under what circumstances should you have it cascade on delete or update, and what is the reasoning behind it? This probably applies to other databases as well.
sql-server
casdade
foreignkeys
rdbms
database-design
null
open
When/Why to use Cascading in SQL Server? === When setting up foreign keys in SQL Server, under what circumstances should you have it cascade on delete or update, and what is the reasoning behind it? This probably applies to other databases as well.
0
59,299
09/12/2008 15:28:01
5,425
09/09/2008 14:09:58
49
1
maxElementsOnDisk from EHCache to TreeCache
I'm migrating a Hibernate application's cache from EHCache to JBoss TreeCache. I'm trying to find how to configure the equivalent to maxElementsOnDisk to limit the cache size on disk, but I couldn't find anything similar to configure in a FileCacheLoader with passivation activated. Thanks
hibernate
caching
java
null
null
null
open
maxElementsOnDisk from EHCache to TreeCache === I'm migrating a Hibernate application's cache from EHCache to JBoss TreeCache. I'm trying to find how to configure the equivalent to maxElementsOnDisk to limit the cache size on disk, but I couldn't find anything similar to configure in a FileCacheLoader with passivation activated. Thanks
0
59,303
09/12/2008 15:28:28
2,773
08/25/2008 00:43:07
502
24
Wrap an Oracle schema update in a transaction
I've got a program that periodically updates its database schema. Sometimes, one of the DDL statements might fail and if it does, I want to roll back all the changes. I wrap the update in a transaction like so: BEGIN TRAN; CREATE TABLE A (PKey int NOT NULL IDENTITY, NewFieldKey int NULL, CONSTRAINT PK_A PRIMARY KEY (PKey)); CREATE INDEX A_2 ON A (NewFieldKey); CREATE TABLE B (PKey int NOT NULL IDENTITY, CONSTRAINT PK_B PRIMARY KEY (PKey)); ALTER TABLE A ADD CONSTRAINT FK_B_A FOREIGN KEY (NewFieldKey) REFERENCES B (PKey); COMMIT TRAN; As we're executing, if one of the statements fail, I do a ROLLBACK instead of a COMMIT. This works great on SQL Server, but doesn't have the desired effect on Oracle. Oracle seems to do an implicit COMMIT after each DDL statement: - [http://www.orafaq.com/wiki/SQL_FAQ#What_are_the_difference_between_DDL.2C_DML_and_DCL_commands.3F][1] - [http://infolab.stanford.edu/~ullman/fcdb/oracle/or-nonstandard.html#transactions][2] Is there *any* way to turn off this implicit commit? [1]: http://www.orafaq.com/wiki/SQL_FAQ#What_are_the_difference_between_DDL.2C_DML_and_DCL_commands.3F [2]: http://infolab.stanford.edu/~ullman/fcdb/oracle/or-nonstandard.html#transactions
oracle
transactions
null
null
null
null
open
Wrap an Oracle schema update in a transaction === I've got a program that periodically updates its database schema. Sometimes, one of the DDL statements might fail and if it does, I want to roll back all the changes. I wrap the update in a transaction like so: BEGIN TRAN; CREATE TABLE A (PKey int NOT NULL IDENTITY, NewFieldKey int NULL, CONSTRAINT PK_A PRIMARY KEY (PKey)); CREATE INDEX A_2 ON A (NewFieldKey); CREATE TABLE B (PKey int NOT NULL IDENTITY, CONSTRAINT PK_B PRIMARY KEY (PKey)); ALTER TABLE A ADD CONSTRAINT FK_B_A FOREIGN KEY (NewFieldKey) REFERENCES B (PKey); COMMIT TRAN; As we're executing, if one of the statements fail, I do a ROLLBACK instead of a COMMIT. This works great on SQL Server, but doesn't have the desired effect on Oracle. Oracle seems to do an implicit COMMIT after each DDL statement: - [http://www.orafaq.com/wiki/SQL_FAQ#What_are_the_difference_between_DDL.2C_DML_and_DCL_commands.3F][1] - [http://infolab.stanford.edu/~ullman/fcdb/oracle/or-nonstandard.html#transactions][2] Is there *any* way to turn off this implicit commit? [1]: http://www.orafaq.com/wiki/SQL_FAQ#What_are_the_difference_between_DDL.2C_DML_and_DCL_commands.3F [2]: http://infolab.stanford.edu/~ullman/fcdb/oracle/or-nonstandard.html#transactions
0
59,309
09/12/2008 15:29:55
5,651
09/10/2008 16:13:26
81
5
How to vertically center content with variable height within a div?
What is the best way to vertically center the content of a div when the height of the content is variable. In my particular case, the height of the container div is fixed, but it would be great if there were a solution that would work in cases where the container has a variable height as well. Also, I would love a solution with no, or very little use of CSS hacks and/or non-semantic markup. ![alt text][1] [1]: http://content.screencast.com/users/jessegavin/folders/Jing/media/ba5c2688-0aad-4e89-878a-8911946f8612/2008-09-12_1027.png
css
null
null
null
null
null
open
How to vertically center content with variable height within a div? === What is the best way to vertically center the content of a div when the height of the content is variable. In my particular case, the height of the container div is fixed, but it would be great if there were a solution that would work in cases where the container has a variable height as well. Also, I would love a solution with no, or very little use of CSS hacks and/or non-semantic markup. ![alt text][1] [1]: http://content.screencast.com/users/jessegavin/folders/Jing/media/ba5c2688-0aad-4e89-878a-8911946f8612/2008-09-12_1027.png
0
59,313
09/12/2008 15:30:24
4,337
09/02/2008 22:43:39
1,189
109
User Initiated Kernel dump in Windows XP
I remember watching a webcast from Mark Russinovich showing the sequence of keyboard keys for a user initiated kernel dump. Can somebody refresh my memory on the exact order of the keys. Please note this is for XP.
windows-xp
kernel
memory-dump
null
null
null
open
User Initiated Kernel dump in Windows XP === I remember watching a webcast from Mark Russinovich showing the sequence of keyboard keys for a user initiated kernel dump. Can somebody refresh my memory on the exact order of the keys. Please note this is for XP.
0
59,319
09/12/2008 15:33:31
5,469
09/09/2008 21:03:22
412
24
In a Scrum project, should testing and peer reviews be worked into each sprint as individual tasks?
This seems to be a point of contention where I work. Some complain about the lack of verification structure in Scrum projects, while Scrum purists say it's not what Scrum is about. Both sides bring up great points, but I would like to see what people outside my circle say about the subject. What are your thoughts? Why?
testing
code-review
scrum
null
null
null
open
In a Scrum project, should testing and peer reviews be worked into each sprint as individual tasks? === This seems to be a point of contention where I work. Some complain about the lack of verification structure in Scrum projects, while Scrum purists say it's not what Scrum is about. Both sides bring up great points, but I would like to see what people outside my circle say about the subject. What are your thoughts? Why?
0
59,322
09/12/2008 15:34:16
5,662
09/10/2008 17:55:42
63
4
In SQL, what’s the difference between count(*) and count('x')?
I have the following code: SELECT <column>, count(*) FROM <table> GROUP BY <column> HAVING COUNT(*) > 1; Is there any difference to the results or performance if I replace the COUNT(*) with COUNT('x')? (This question is related to a [previous one][1]) [1]: http://stackoverflow.com/questions/59294/in-sql-whats-the-difference-between-countcolumn-and-count
sql
null
null
null
null
null
open
In SQL, what’s the difference between count(*) and count('x')? === I have the following code: SELECT <column>, count(*) FROM <table> GROUP BY <column> HAVING COUNT(*) > 1; Is there any difference to the results or performance if I replace the COUNT(*) with COUNT('x')? (This question is related to a [previous one][1]) [1]: http://stackoverflow.com/questions/59294/in-sql-whats-the-difference-between-countcolumn-and-count
0
59,326
09/12/2008 15:34:44
3,055
08/26/2008 13:54:44
654
61
Best tools for time tracking?
What is the best/most productive tools you use for time tracking? Specifically, I'm looking for time tracking tools that: * Allow you to tag/start/stop time sessions quickly and as automatic as possible. * Has an efficient organizing feature. * Take up the least amount of workspace, preferably desktop-based. The organizing feature is a big point that's missing in most time tracking systems I've tried. Some lets you start a time session quickly but then you'd have plenties of untagged time sessions which are rather useless. Some do have a lot of organizing features but then you'd have to think up of a name and any related tags for your time session every time you start one. I'm looking for one with a good blend of the first 2 points.
productivity
time-management
null
null
null
09/06/2011 15:48:42
off topic
Best tools for time tracking? === What is the best/most productive tools you use for time tracking? Specifically, I'm looking for time tracking tools that: * Allow you to tag/start/stop time sessions quickly and as automatic as possible. * Has an efficient organizing feature. * Take up the least amount of workspace, preferably desktop-based. The organizing feature is a big point that's missing in most time tracking systems I've tried. Some lets you start a time session quickly but then you'd have plenties of untagged time sessions which are rather useless. Some do have a lot of organizing features but then you'd have to think up of a name and any related tags for your time session every time you start one. I'm looking for one with a good blend of the first 2 points.
2
59,327
09/12/2008 15:34:58
5,291
09/08/2008 21:37:17
30
0
What online brokers offer APIs?
So I'm getting really sick of E*TRADE and, being a developer, would love to find an online broker that offers an API. It would be great to be able to write my own trading tools, and maybe even modify existing ones. Based on my research so far, I've only found one option. Interactive Brokers offers a multi-language API (Java/C++/ActiveX/DDE) and has some fairly decent commission rates to boot. I want to make sure there aren't any other options out there I should be considering. Any ideas?
api
stocks
trading
null
null
null
open
What online brokers offer APIs? === So I'm getting really sick of E*TRADE and, being a developer, would love to find an online broker that offers an API. It would be great to be able to write my own trading tools, and maybe even modify existing ones. Based on my research so far, I've only found one option. Interactive Brokers offers a multi-language API (Java/C++/ActiveX/DDE) and has some fairly decent commission rates to boot. I want to make sure there aren't any other options out there I should be considering. Any ideas?
0
59,331
09/12/2008 15:36:14
6,082
09/12/2008 09:38:38
21
1
Visibility of template specialization of C++ function
Suppose I have `fileA.h` which declares a class `classA` with template function `SomeFunc<T>()`. This function is implemented directly in the header file (as is usual for template functions). Now I add a specialized implementation of `SomeFunc()` (like for `SomeFunc<int>()`) in `fileA.C` (ie. not in the header file). If I now call `SomeFunc<int>()` from some other code (maybe also from another library), would it call the generic version, or the specialization? I have this problem right now, where the class and function live in a library which is used by two applications. And one application correctly uses the specialization, while another app uses the generic form (which causes runtime problems later on). Why the difference? Could this be related to linker options etc? This is on Linux, with g++ 4.1.2.
c++
linux
templates
linker
g++
null
open
Visibility of template specialization of C++ function === Suppose I have `fileA.h` which declares a class `classA` with template function `SomeFunc<T>()`. This function is implemented directly in the header file (as is usual for template functions). Now I add a specialized implementation of `SomeFunc()` (like for `SomeFunc<int>()`) in `fileA.C` (ie. not in the header file). If I now call `SomeFunc<int>()` from some other code (maybe also from another library), would it call the generic version, or the specialization? I have this problem right now, where the class and function live in a library which is used by two applications. And one application correctly uses the specialization, while another app uses the generic form (which causes runtime problems later on). Why the difference? Could this be related to linker options etc? This is on Linux, with g++ 4.1.2.
0
59,342
09/12/2008 15:38:25
2,018
08/19/2008 20:14:45
1,094
90
Kenai invites: where to get them?
Recently, Sun launched a new hosting site, like SourceForge and GitHub, but for Mercurial. However, for the time being, it's invite-only. Being a Hg user, I'm very interested in getting an invite, but I have no idea where to find them. Are only Sun-employees given invitations to hand out? What can one do to earn such an invite?
mercurial
sun
project-hosting
null
null
null
open
Kenai invites: where to get them? === Recently, Sun launched a new hosting site, like SourceForge and GitHub, but for Mercurial. However, for the time being, it's invite-only. Being a Hg user, I'm very interested in getting an invite, but I have no idea where to find them. Are only Sun-employees given invitations to hand out? What can one do to earn such an invite?
0
59,357
09/12/2008 15:42:57
5,486
09/09/2008 23:09:59
131
9
Copying relational data from database to database with FOR XML (or alternate method?)
In SQL Server, I can use a SELECT statement with joins and FOR XML to get a nice XML formatted doc of the data in several tables: select * from People inner join PeopleAddresses on People.[Key] = PeopleAddresses.PeopleKey inner join Addresses on PeopleAddresses.AddressesKey = Addresses.[Key] FOR XML AUTO This returns this XML (from a sample table): <People Key="1" FirstName="Bob" LastName="Smith"> <PeopleAddresses PeopleKey="1" AddressesKey="1"> <Addresses Key="1" Street="123 Main" City="St Louis" State="MO" ZIP="12345" /> </PeopleAddresses> </People> <People Key="2" FirstName="Harry" LastName="Jones"> <PeopleAddresses PeopleKey="2" AddressesKey="2"> <Addresses Key="2" Street="555 E 5th St" City="Chicago" State="IL" ZIP="23456" /> </PeopleAddresses> </People> <People Key="3" FirstName="Sally" LastName="Smith"> <PeopleAddresses PeopleKey="3" AddressesKey="1"> <Addresses Key="1" Street="123 Main" City="St Louis" State="MO" ZIP="12345" /> </PeopleAddresses> </People> <People Key="4" FirstName="Sara" LastName="Jones"> <PeopleAddresses PeopleKey="4" AddressesKey="2"> <Addresses Key="2" Street="555 E 5th St" City="Chicago" State="IL" ZIP="23456" /> </PeopleAddresses> </People> Is there a way I can then insert that data into a different database with the same table structure? The primary keys don't need to be the same, but the relational structure has to stay the same. This is probably simple but I don't know the syntax for it. Alternately, what are some other good ways to do this, with pros and cons? (It should be as close to a single step as possible.)
sql-server
xml
sql
sql2005
forxml
null
open
Copying relational data from database to database with FOR XML (or alternate method?) === In SQL Server, I can use a SELECT statement with joins and FOR XML to get a nice XML formatted doc of the data in several tables: select * from People inner join PeopleAddresses on People.[Key] = PeopleAddresses.PeopleKey inner join Addresses on PeopleAddresses.AddressesKey = Addresses.[Key] FOR XML AUTO This returns this XML (from a sample table): <People Key="1" FirstName="Bob" LastName="Smith"> <PeopleAddresses PeopleKey="1" AddressesKey="1"> <Addresses Key="1" Street="123 Main" City="St Louis" State="MO" ZIP="12345" /> </PeopleAddresses> </People> <People Key="2" FirstName="Harry" LastName="Jones"> <PeopleAddresses PeopleKey="2" AddressesKey="2"> <Addresses Key="2" Street="555 E 5th St" City="Chicago" State="IL" ZIP="23456" /> </PeopleAddresses> </People> <People Key="3" FirstName="Sally" LastName="Smith"> <PeopleAddresses PeopleKey="3" AddressesKey="1"> <Addresses Key="1" Street="123 Main" City="St Louis" State="MO" ZIP="12345" /> </PeopleAddresses> </People> <People Key="4" FirstName="Sara" LastName="Jones"> <PeopleAddresses PeopleKey="4" AddressesKey="2"> <Addresses Key="2" Street="555 E 5th St" City="Chicago" State="IL" ZIP="23456" /> </PeopleAddresses> </People> Is there a way I can then insert that data into a different database with the same table structure? The primary keys don't need to be the same, but the relational structure has to stay the same. This is probably simple but I don't know the syntax for it. Alternately, what are some other good ways to do this, with pros and cons? (It should be as close to a single step as possible.)
0
59,377
09/12/2008 15:49:58
730
08/08/2008 12:40:04
228
33
Is there a way to use GflAx to incorporate gradient colours?
Ok, narrow question of the day. I'm using GflAx (from [xnview][1]) to create some graphic tiles. I would like to put some gradients in as well though. Is there a way I can do this within this product? Thanks. [1]: http://www.xnview.com
image-manipulation
gradient
null
null
null
null
open
Is there a way to use GflAx to incorporate gradient colours? === Ok, narrow question of the day. I'm using GflAx (from [xnview][1]) to create some graphic tiles. I would like to put some gradients in as well though. Is there a way I can do this within this product? Thanks. [1]: http://www.xnview.com
0
59,380
09/12/2008 15:50:38
6,140
09/12/2008 15:50:37
1
0
Wildcard Subdomain Exceptions
I have a wildcard subdomain enabled and dynamically parse the URL by passing it as-is to my index.php (ex. somecity.domain.com). Now, I wish to create a few subdomains that are static where I can install different application and not co-mingle with my current one (ex. blog.domain.com). My <code>.htaccess</code> currently reads: <pre> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </pre> Can I manipulate this <code>.htaccess</code> to achieve what I need or is there another way?
php
apache
wildcard-subdomain
.htaccess
null
null
open
Wildcard Subdomain Exceptions === I have a wildcard subdomain enabled and dynamically parse the URL by passing it as-is to my index.php (ex. somecity.domain.com). Now, I wish to create a few subdomains that are static where I can install different application and not co-mingle with my current one (ex. blog.domain.com). My <code>.htaccess</code> currently reads: <pre> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </pre> Can I manipulate this <code>.htaccess</code> to achieve what I need or is there another way?
0
59,390
09/12/2008 15:57:04
437
08/05/2008 18:13:45
2,265
39
ColdFusion: Is it safe to leave out the variables keyword in a CFC?
In a ColdFusion Component (CFC), is it necessary to use fully qualified names for variables-scoped variables? Am I going to get myself into trouble if I change this: <cfcomponent> <cfset variables.foo = "a private instance variable"> <cffunction name = "doSomething"> <cfset var bar = "a local variable"> <cfreturn "I have #variables.foo# and #bar#."> </cffunction> </cfcomponent> to this? <cfcomponent> <cfset foo = "a private instance variable"> <cffunction name = "doSomething"> <cfset var bar = "a local variable"> <cfreturn "I have #foo# and #bar#."> </cffunction> </cfcomponent>
coldfusion
cfc
null
null
null
null
open
ColdFusion: Is it safe to leave out the variables keyword in a CFC? === In a ColdFusion Component (CFC), is it necessary to use fully qualified names for variables-scoped variables? Am I going to get myself into trouble if I change this: <cfcomponent> <cfset variables.foo = "a private instance variable"> <cffunction name = "doSomething"> <cfset var bar = "a local variable"> <cfreturn "I have #variables.foo# and #bar#."> </cffunction> </cfcomponent> to this? <cfcomponent> <cfset foo = "a private instance variable"> <cffunction name = "doSomething"> <cfset var bar = "a local variable"> <cfreturn "I have #foo# and #bar#."> </cffunction> </cfcomponent>
0
59,392
09/12/2008 15:58:19
1,204
08/13/2008 13:02:12
36
1
Best way to migrate from VSS to Subversion?
I'm a single developer looking to get off of Visual Source Safe and move to svn. A quick search brings up several tools, but I don't see a clear winner and I can't afford to spend a lot of time testing different tools. Has anyone done this successfully before and can recommend a method?
svn
visual-sourcesafe
version-control
null
null
null
open
Best way to migrate from VSS to Subversion? === I'm a single developer looking to get off of Visual Source Safe and move to svn. A quick search brings up several tools, but I don't see a clear winner and I can't afford to spend a lot of time testing different tools. Has anyone done this successfully before and can recommend a method?
0
59,396
09/12/2008 16:00:23
5,056
09/07/2008 15:43:17
693
59
Rhino Mocks: How can I mock out a method that transforms its input?
I have a Data Access Object TransactionDao. When you call TransactionDao.Save(transaction) I would like for it to setting a transaction.IsSaved=true flag (this is a simplification the actual thing I'm trying to do is not quite so banal). So when mocking my TransactionDao with RhinoMocks how can I indicate that it should transform its input? Ideally I would like to write something like this: Expect.Call(delegate {dao.Save(transaction);}).Override(x => x.IsSaved=true); Does anyone know how to do this?
c#
.net
rhino-mocks
null
null
null
open
Rhino Mocks: How can I mock out a method that transforms its input? === I have a Data Access Object TransactionDao. When you call TransactionDao.Save(transaction) I would like for it to setting a transaction.IsSaved=true flag (this is a simplification the actual thing I'm trying to do is not quite so banal). So when mocking my TransactionDao with RhinoMocks how can I indicate that it should transform its input? Ideally I would like to write something like this: Expect.Call(delegate {dao.Save(transaction);}).Override(x => x.IsSaved=true); Does anyone know how to do this?
0
59,398
09/12/2008 16:01:02
5,487
09/09/2008 23:17:20
209
6
Pex users: what are your Impressions of Pex and Automated Exploratory Testing in general?
Those of you who have used [Pex][1], what do you think its advantages and disadvantages are of Pex as a tool? Also, what do you think are the advantages and disadvantages of "Automated Exploratory Testing" in general, **in addition to** TDD/Unit Testing? [1]: http://research.microsoft.com/Pex/
testing
automated-tests
parameterized-unit-tests
pex
null
null
open
Pex users: what are your Impressions of Pex and Automated Exploratory Testing in general? === Those of you who have used [Pex][1], what do you think its advantages and disadvantages are of Pex as a tool? Also, what do you think are the advantages and disadvantages of "Automated Exploratory Testing" in general, **in addition to** TDD/Unit Testing? [1]: http://research.microsoft.com/Pex/
0
59,399
09/12/2008 16:01:15
6,143
09/12/2008 16:01:15
1
0
DnGuard Review
I'm thinking about purchasing DnGuard, a .Net Protection tool. Does anybody use it and can recommend it or the opposite? Judging the cracking community it seems to be on of the stronger solutions. Link: [DnGuard][1] Thanks [1]: http://www.dnguard.net/
c#
security
null
null
null
null
open
DnGuard Review === I'm thinking about purchasing DnGuard, a .Net Protection tool. Does anybody use it and can recommend it or the opposite? Judging the cracking community it seems to be on of the stronger solutions. Link: [DnGuard][1] Thanks [1]: http://www.dnguard.net/
0
59,418
09/12/2008 16:15:27
299
08/04/2008 13:31:09
334
29
Clean up Designer.vb file in Visual Studio 2008
I noticed that my Designer.vb file of one of my forms has **a lot** of controls that aren't even used or visible on my form. This is probably from copying controls from my other forms. Is there a way to clean up the Designer.vb file and get rid of all the unused controls?
visual-studio-2008
vb
null
null
null
null
open
Clean up Designer.vb file in Visual Studio 2008 === I noticed that my Designer.vb file of one of my forms has **a lot** of controls that aren't even used or visible on my form. This is probably from copying controls from my other forms. Is there a way to clean up the Designer.vb file and get rid of all the unused controls?
0
59,422
09/12/2008 16:19:28
838
08/09/2008 08:08:30
308
13
Is a bool read/write atomic in C#
Is accessing a **bool** field atomic in C#? In particular, do I need to put a lock around: class Foo { private bool _bar; //... in some function on any thread (or many threads) _bar = true; //... same for a read if (_bar) { ... } }
c#
.net
concurrency
locking
boolean
null
open
Is a bool read/write atomic in C# === Is accessing a **bool** field atomic in C#? In particular, do I need to put a lock around: class Foo { private bool _bar; //... in some function on any thread (or many threads) _bar = true; //... same for a read if (_bar) { ... } }
0
59,423
09/12/2008 16:20:09
1,683
08/18/2008 00:30:32
153
11
I have a link icon next to each link. How do I exclude the link icon from images?
I've got the following in my .css file creating a little image next to each link on my site: div.post .text a[href^="http:"] { background: url(../../pics/remote.gif) right top no-repeat; padding-right: 10px; white-space: nowrap; } How do I modify this snippet (or add something new) to exclude the link icon next to images that are links themselves?
css
null
null
null
null
null
open
I have a link icon next to each link. How do I exclude the link icon from images? === I've got the following in my .css file creating a little image next to each link on my site: div.post .text a[href^="http:"] { background: url(../../pics/remote.gif) right top no-repeat; padding-right: 10px; white-space: nowrap; } How do I modify this snippet (or add something new) to exclude the link icon next to images that are links themselves?
0
59,424
09/12/2008 16:20:24
5
07/31/2008 14:22:31
3,391
110
Creating a mini-site in ASP.NET that works on Blackberry, Windows Mobile, and iPhone
I'm working on an ASP.NET website which targets desktop browsers. We want to enable an optional mobile view (e.g. http://m.sample.com) which will offer a few simple pages which will be mostly text. There will be not need for AJAX or even Javascript, and there's no user input - it's really just tables of text with a few links to navigate between the pages. What's the best way to set this up so it will work on Blackberry, Windows Mobile, and iPhone?
asp.net
windows-mobile
mobile
null
null
null
open
Creating a mini-site in ASP.NET that works on Blackberry, Windows Mobile, and iPhone === I'm working on an ASP.NET website which targets desktop browsers. We want to enable an optional mobile view (e.g. http://m.sample.com) which will offer a few simple pages which will be mostly text. There will be not need for AJAX or even Javascript, and there's no user input - it's really just tables of text with a few links to navigate between the pages. What's the best way to set this up so it will work on Blackberry, Windows Mobile, and iPhone?
0
59,425
09/12/2008 16:21:06
1,288
08/14/2008 12:14:17
1,262
76
How do I find records added to my database table in the past 24 hours?
I'm using MySQL in particular, but I'm hoping for a cross-vendor solution. I'm using the NOW() function to add a timestamp as a column for each record. INSERT INTO messages (typeId, messageTime, stationId, message) VALUES (?, NOW(), ?, ?)
sql
null
null
null
null
null
open
How do I find records added to my database table in the past 24 hours? === I'm using MySQL in particular, but I'm hoping for a cross-vendor solution. I'm using the NOW() function to add a timestamp as a column for each record. INSERT INTO messages (typeId, messageTime, stationId, message) VALUES (?, NOW(), ?, ?)
0
59,428
09/12/2008 16:23:12
64
08/01/2008 14:27:12
255
17
Learning LISP/Scheme - Interpreter
I've been making my way through The Little Schemer and was wondering what environment/ide/interpreter would be best to use in order to test any of the Scheme code I jot down for myself. Thanks
ide
lisp
scheme
null
null
null
open
Learning LISP/Scheme - Interpreter === I've been making my way through The Little Schemer and was wondering what environment/ide/interpreter would be best to use in order to test any of the Scheme code I jot down for myself. Thanks
0
59,444
09/12/2008 16:29:19
4,872
09/06/2008 09:14:55
240
6
How do you check what version of SQL Server for a database using TSQL?
Is there a system stored procedure to get the version #?
sql-server
database
tsql
null
null
null
open
How do you check what version of SQL Server for a database using TSQL? === Is there a system stored procedure to get the version #?
0
59,451
09/12/2008 16:31:06
5,932
09/11/2008 17:43:38
23
3
Creating a Silverlight DataTemplate in code
How do I create a silverlight data template in code? I've seen plenty of examples for WPF, but nothing for Silverlight. Thanks Nick
silverlight
null
null
null
null
null
open
Creating a Silverlight DataTemplate in code === How do I create a silverlight data template in code? I've seen plenty of examples for WPF, but nothing for Silverlight. Thanks Nick
0
59,462
09/12/2008 16:37:00
1,109
08/12/2008 12:16:58
1,101
74
Why does all methods in the Google Analytics tracking code start with an underscore?
Prefixing variable and method names with an underscore is a common convention for marking things as private. Why does all the methods on the page tracker class in the Google Analytics tracking code (`ga.js`) start with an underscore, even the ones that are clearly public, like `_getTracker` and `_trackPageView`?
google-analytics
null
null
null
null
null
open
Why does all methods in the Google Analytics tracking code start with an underscore? === Prefixing variable and method names with an underscore is a common convention for marking things as private. Why does all the methods on the page tracker class in the Google Analytics tracking code (`ga.js`) start with an underscore, even the ones that are clearly public, like `_getTracker` and `_trackPageView`?
0
59,465
09/12/2008 16:37:52
4,872
09/06/2008 09:14:55
245
6
In Emacs, how can I add a website like 'Stackoverflow' to my webjump hotlist?
By default the webjump hotlist has the following which I use quite often: M-x webjump RET Google M-x webjump RET Wikipedia How can I add 'Stackoverflow' to my list?
stackoverflow
emacs
command
null
null
null
open
In Emacs, how can I add a website like 'Stackoverflow' to my webjump hotlist? === By default the webjump hotlist has the following which I use quite often: M-x webjump RET Google M-x webjump RET Wikipedia How can I add 'Stackoverflow' to my list?
0
59,472
09/12/2008 16:41:10
6,143
09/12/2008 16:01:15
6
0
Configure VS to automaticly remove blank line after cut?
Is there a way (or shortcut) to tell VS 2008 that it cuts a line like this: **Before:** Some Text here This gets cut Some Code there **After:** Some Text here Some Code there **What I want:** Some Text here Some Code there PS: I don't want to select the whole line or something like this... only the text I want to cut.
c#
editor
null
null
null
null
open
Configure VS to automaticly remove blank line after cut? === Is there a way (or shortcut) to tell VS 2008 that it cuts a line like this: **Before:** Some Text here This gets cut Some Code there **After:** Some Text here Some Code there **What I want:** Some Text here Some Code there PS: I don't want to select the whole line or something like this... only the text I want to cut.
0
59,479
09/12/2008 16:44:29
299
08/04/2008 13:31:09
336
29
Optimize Windows Form Load Time
I have a Windows Form that takes quite a bit of time to load initially. However, each subsequent request to load the Form doesn't take as long. Is there a way to optimize a Form's load time?
winforms
vb
optimize
loadtime
null
null
open
Optimize Windows Form Load Time === I have a Windows Form that takes quite a bit of time to load initially. However, each subsequent request to load the Form doesn't take as long. Is there a way to optimize a Form's load time?
0
59,482
09/12/2008 16:45:23
4,228
09/02/2008 13:12:45
13
5
What's the better database design: more tables or more columns?
A former coworker insisted that a database with more tables with fewer columns each is better then one with fewer tables with more columns each. For example rather than a customer table with name, address, city, state, zip, etc. columns, you would have a name table, an address table, a city table, etc. He argued this design was more efficient and flexible. I can maybe see it being more flexible, but I have no idea about efficiency. And, even if it is, I think those gains may be outweighed by the added complexity. So, are there any significant benefits to more tables with fewer columns over fewer tables with more columns?
databases
database-design
null
null
null
null
open
What's the better database design: more tables or more columns? === A former coworker insisted that a database with more tables with fewer columns each is better then one with fewer tables with more columns each. For example rather than a customer table with name, address, city, state, zip, etc. columns, you would have a name table, an address table, a city table, etc. He argued this design was more efficient and flexible. I can maybe see it being more flexible, but I have no idea about efficiency. And, even if it is, I think those gains may be outweighed by the added complexity. So, are there any significant benefits to more tables with fewer columns over fewer tables with more columns?
0
59,483
09/12/2008 16:46:41
5,330
09/09/2008 07:44:06
192
7
Confused by gdb...
1167 ptr = (void*)getcwd(cwd, MAX_PATH_LENGTH-1); (gdb) n 1168 if (!ptr) { (gdb) print ptr $1 = 0xbff2d96c "/media/MMC-SD/partition1/aaaaaaaaaaa" (gdb) print &cwd $2 = (char (*)[3500]) 0xbff2d96c (gdb) print strlen(cwd) $3 = 36 (gdb) print "%s",cwd $4 = "/media/MMC-SD/partition1/aaaaaaaaaaa", '\0' <repeats 912 times>, "��O�001\000\000\000\000��027\000\000\000�3����EL鷠3�000��027\000\000\000\000\000\000\000\027\000\000\000\000��/�027\000\000\000�3����N����\230���鷠3�000��027\000\000\000\000\000\000\000��000\000\000\000\001\000\000\000��M鷠3����\000\000\000\000.\231�027��w\005\b\001\000"... (gdb) print "%s", ptr $5 = 0xbff2d96c "/media/MMC-SD/partition1/aaaaaaaaaaa" (gdb) Quit Why is ptr printing the string correctly but cwd not; this also affects the program and it crashes if I try to use the cwd... Help :)
c
null
null
null
null
null
open
Confused by gdb... === 1167 ptr = (void*)getcwd(cwd, MAX_PATH_LENGTH-1); (gdb) n 1168 if (!ptr) { (gdb) print ptr $1 = 0xbff2d96c "/media/MMC-SD/partition1/aaaaaaaaaaa" (gdb) print &cwd $2 = (char (*)[3500]) 0xbff2d96c (gdb) print strlen(cwd) $3 = 36 (gdb) print "%s",cwd $4 = "/media/MMC-SD/partition1/aaaaaaaaaaa", '\0' <repeats 912 times>, "��O�001\000\000\000\000��027\000\000\000�3����EL鷠3�000��027\000\000\000\000\000\000\000\027\000\000\000\000��/�027\000\000\000�3����N����\230���鷠3�000��027\000\000\000\000\000\000\000��000\000\000\000\001\000\000\000��M鷠3����\000\000\000\000.\231�027��w\005\b\001\000"... (gdb) print "%s", ptr $5 = 0xbff2d96c "/media/MMC-SD/partition1/aaaaaaaaaaa" (gdb) Quit Why is ptr printing the string correctly but cwd not; this also affects the program and it crashes if I try to use the cwd... Help :)
0
59,515
09/12/2008 16:58:32
5,056
09/07/2008 15:43:17
693
59
Help convert this delegate to an anonymous method or lambda
I am new to all the anonymous features and need some help. I have gotten the following to work: public void FakeSaveWithMessage(Transaction t) { t.Message = "I drink goats blood"; } public delegate void FakeSave(Transaction t); public void SampleTestFunction() { ... Expect.Call(delegate { _dao.Save(t); }).Do(new FakeSave(FakeSaveWithMessage)); ... } But this is totally ugly and I would like to have the inside of the Do to be an anonymous method or even a lambda if it is possible. I tried: Expect.Call(delegate { _dao.Save(t); }).Do(delegate(Transaction t2) { t2.CheckInInfo.CheckInMessage = "I drink goats blood"; }); and Expect.Call(delegate { _dao.Save(t); }).Do(delegate { t.CheckInInfo.CheckInMessage = "I drink goats blood"; }); but these give me **Cannot convert anonymous method to type 'System.Delegate' because it is not a delegate type** compile errors. What am I doing wrong?
c#
lambda
.net-3.5
null
null
null
open
Help convert this delegate to an anonymous method or lambda === I am new to all the anonymous features and need some help. I have gotten the following to work: public void FakeSaveWithMessage(Transaction t) { t.Message = "I drink goats blood"; } public delegate void FakeSave(Transaction t); public void SampleTestFunction() { ... Expect.Call(delegate { _dao.Save(t); }).Do(new FakeSave(FakeSaveWithMessage)); ... } But this is totally ugly and I would like to have the inside of the Do to be an anonymous method or even a lambda if it is possible. I tried: Expect.Call(delegate { _dao.Save(t); }).Do(delegate(Transaction t2) { t2.CheckInInfo.CheckInMessage = "I drink goats blood"; }); and Expect.Call(delegate { _dao.Save(t); }).Do(delegate { t.CheckInInfo.CheckInMessage = "I drink goats blood"; }); but these give me **Cannot convert anonymous method to type 'System.Delegate' because it is not a delegate type** compile errors. What am I doing wrong?
0
59,521
09/12/2008 17:02:02
1,175
08/13/2008 10:21:54
2,073
140
Sync Algorithms
Are there any good references out there for sync algorithms? I'm interested in algorithms that synchronize the following kinds of data between multiple users: - calendars - documents - lists and outlines I'm not just looking for synchronization of contents of directories _a la_ rsync; I am interested in merging the data within individual files.
algorithm
calendar
sync
null
null
null
open
Sync Algorithms === Are there any good references out there for sync algorithms? I'm interested in algorithms that synchronize the following kinds of data between multiple users: - calendars - documents - lists and outlines I'm not just looking for synchronization of contents of directories _a la_ rsync; I am interested in merging the data within individual files.
0