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
11,783
08/14/2008 23:33:35
34
08/01/2008 12:39:52
2,210
108
In .NET, will empty method calls be optimized out?
Title says it all, given an empty method body, will the JIT optimize out the call (I know the C# compiler won't). How would I go about finding out? What tools should I be using and where should I be looking? Since I'm sure it'll be asked, the reason for the empty method is a preprocessor directive.
.net
performance
null
null
null
null
open
In .NET, will empty method calls be optimized out? === Title says it all, given an empty method body, will the JIT optimize out the call (I know the C# compiler won't). How would I go about finding out? What tools should I be using and where should I be looking? Since I'm sure it'll be asked, the reason for the empty method is a preprocessor directive.
0
11,801
08/15/2008 00:05:13
748
08/08/2008 14:19:10
41
5
Is Removing Windows 2000 as a supported OS ok?
What's the general consensus on supporting Windows 2000 for software distribution? Are people supporting Windows XP SP2+ for new software development or is this too restrictive still?
windows
deployment
compatibility
null
null
null
open
Is Removing Windows 2000 as a supported OS ok? === What's the general consensus on supporting Windows 2000 for software distribution? Are people supporting Windows XP SP2+ for new software development or is this too restrictive still?
0
11,804
08/15/2008 00:08:15
493
08/06/2008 10:25:05
1,423
115
Returning Large Results Via a Webservice
I'm working on a web service at the moment and there is the potential that the returned results could be quite large ( > 5mb). It's perfectly valid for this set of data to be this large and the web service can be called either sync or async, but I'm wondering what people's thoughts are on the following: 1. If the connection is lost, the entire resultset will have to be regenerated and sent again. Is there any way I can do any sort of "resume" if the connection is lost or reset? 2. Is sending a result set this large even appropriate? Would it be better to implement some sort of "paging" where the resultset is generated and stored on the server and the client can then download chunks of the resultset in smaller amounts and re-assemble the set at their end?
c#
.net
webservices
null
null
null
open
Returning Large Results Via a Webservice === I'm working on a web service at the moment and there is the potential that the returned results could be quite large ( > 5mb). It's perfectly valid for this set of data to be this large and the web service can be called either sync or async, but I'm wondering what people's thoughts are on the following: 1. If the connection is lost, the entire resultset will have to be regenerated and sent again. Is there any way I can do any sort of "resume" if the connection is lost or reset? 2. Is sending a result set this large even appropriate? Would it be better to implement some sort of "paging" where the resultset is generated and stored on the server and the client can then download chunks of the resultset in smaller amounts and re-assemble the set at their end?
0
11,806
08/15/2008 00:09:16
889
08/10/2008 08:04:03
101
8
How do you impersonate an Active Directory user in Powershell?
I'm trying to run powershell commands through a web interface (ASP.NET/C#) in order to create mailboxes/etc on Exchange 2007. When I run the page using Visual Studio (Cassini), the page loads up correctly. However, when I run it on IIS (v5.1), I get the error "unknown user name or bad password". The biggest problem that I noticed was that Powershell was logged in as ASPNET instead of my Active Directory Account. How do I force my Powershell session to be authenticated with another Active Directory Account? Basically, the script that I have so far looks something like this: RunspaceConfiguration rc = RunspaceConfiguration.Create(); PSSnapInException snapEx = null; rc.AddPSSnapIn("Microsoft.Exchange.Management.PowerShell.Admin", out snapEx); Runspace runspace = RunspaceFactory.CreateRunspace(rc); runspace.Open(); Pipeline pipeline = runspace.CreatePipeline(); using (pipeline) { pipeline.Commands.AddScript("Get-Mailbox -identity 'user.name'"); pipeline.Commands.Add("Out-String"); Collection<PSObject> results = pipeline.Invoke(); if (pipeline.Error != null && pipeline.Error.Count > 0) { foreach (object item in pipeline.Error.ReadToEnd()) resultString += "Error: " + item.ToString() + "\n"; } runspace.Close(); foreach (PSObject obj in results) resultString += obj.ToString(); } return resultString;
c#
asp.net
powershell
activedirectory
null
null
open
How do you impersonate an Active Directory user in Powershell? === I'm trying to run powershell commands through a web interface (ASP.NET/C#) in order to create mailboxes/etc on Exchange 2007. When I run the page using Visual Studio (Cassini), the page loads up correctly. However, when I run it on IIS (v5.1), I get the error "unknown user name or bad password". The biggest problem that I noticed was that Powershell was logged in as ASPNET instead of my Active Directory Account. How do I force my Powershell session to be authenticated with another Active Directory Account? Basically, the script that I have so far looks something like this: RunspaceConfiguration rc = RunspaceConfiguration.Create(); PSSnapInException snapEx = null; rc.AddPSSnapIn("Microsoft.Exchange.Management.PowerShell.Admin", out snapEx); Runspace runspace = RunspaceFactory.CreateRunspace(rc); runspace.Open(); Pipeline pipeline = runspace.CreatePipeline(); using (pipeline) { pipeline.Commands.AddScript("Get-Mailbox -identity 'user.name'"); pipeline.Commands.Add("Out-String"); Collection<PSObject> results = pipeline.Invoke(); if (pipeline.Error != null && pipeline.Error.Count > 0) { foreach (object item in pipeline.Error.ReadToEnd()) resultString += "Error: " + item.ToString() + "\n"; } runspace.Close(); foreach (PSObject obj in results) resultString += obj.ToString(); } return resultString;
0
11,809
08/15/2008 00:12:20
362
08/05/2008 04:38:30
42
1
How to create an all browser-compatible hanging indent style in CSS in a span
The only thing I've found has been; .hang { text-indent: -3em; margin-left: 3em; } The only way for this to work is putting text in a paragraph, which causes those horribly unsightly extra lines. I'd much rather just have them in a `<span class="hang"></span>` type of thing.
css
indent
hanging
span
null
null
open
How to create an all browser-compatible hanging indent style in CSS in a span === The only thing I've found has been; .hang { text-indent: -3em; margin-left: 3em; } The only way for this to work is putting text in a paragraph, which causes those horribly unsightly extra lines. I'd much rather just have them in a `<span class="hang"></span>` type of thing.
0
11,820
08/15/2008 00:29:57
26
08/01/2008 12:18:14
511
78
How much extra overhead is generated when sending a file over a web service as a byte array?
This [question and answer][1] shows how to send a file as a byte array through an XML web service. How much overhead is generated by using this method for file transfer? I assume the data looks something like this: <?xml version="1.0" encoding="UTF-8" ?> <bytes> <byte>16</byte> <byte>28</byte> <byte>127</byte> ... </bytes> If this format is correct, the bytes must first be converted to UTF-8 characters. Each of these characters allocates 8 bytes. Are the bytes stored in base 10, hex, or binary characters? How much larger does the file appear as it is being sent due to the XML data and character encoding? Is there any compression built into web services? If you found this question interesting, please mod me up :p [1]: http://stackoverflow.com/questions/11782/file-uploads-via-web-services
webservice
xml
null
null
null
null
open
How much extra overhead is generated when sending a file over a web service as a byte array? === This [question and answer][1] shows how to send a file as a byte array through an XML web service. How much overhead is generated by using this method for file transfer? I assume the data looks something like this: <?xml version="1.0" encoding="UTF-8" ?> <bytes> <byte>16</byte> <byte>28</byte> <byte>127</byte> ... </bytes> If this format is correct, the bytes must first be converted to UTF-8 characters. Each of these characters allocates 8 bytes. Are the bytes stored in base 10, hex, or binary characters? How much larger does the file appear as it is being sent due to the XML data and character encoding? Is there any compression built into web services? If you found this question interesting, please mod me up :p [1]: http://stackoverflow.com/questions/11782/file-uploads-via-web-services
0
11,831
08/15/2008 00:39:01
1,366
08/14/2008 18:30:52
30
2
Singletons: good design or a crutch?
Singletons are a hotly debated design pattern, so I am interested in what the Stackoverflow community thought about them. Please provide reasons for your opinions, not just "Singletons are for lazy programmers!" Here is a fairly good article on the issue, all though it is against the use of Singletons: [scientificninja.com: performant-singletons][1] Does anyone have any other good articles on them? Maybe in support of Singletons? [1]: http://scientificninja.com/advice/performant-singletons
language-agnostic
designpatterns
singleton
null
null
null
open
Singletons: good design or a crutch? === Singletons are a hotly debated design pattern, so I am interested in what the Stackoverflow community thought about them. Please provide reasons for your opinions, not just "Singletons are for lazy programmers!" Here is a fairly good article on the issue, all though it is against the use of Singletons: [scientificninja.com: performant-singletons][1] Does anyone have any other good articles on them? Maybe in support of Singletons? [1]: http://scientificninja.com/advice/performant-singletons
0
11,854
08/15/2008 01:00:47
1,256
08/13/2008 23:17:37
16
5
Inheritance and Polymorphism - Ease of use vs Purity
In a project our team is using object lists to perform mass operations on sets of data that should all be processed in a similar way. In particular, different objects would ideally act the same, which would be very easily achieved with polymorphism. The problem I have with it is that inheritance implies the _is a_ relationship, rather than the _has a_ relationship. For example, several objects _have a_ damage counter, but to make this easy to use in an object list, polymorphism could be used - except that would imply an _is a_ relationship which wouldn't be true. (A person _is not_ a damage counter.) The only solution I can think of is to have a member of the class return the proper object type when implicitly casted instead of relying on inheritance. **Would it be better to forgo the _is a_ / _has a_ ideal in exchange for ease of programming?**
inheritance
polymorphism
oop
null
null
null
open
Inheritance and Polymorphism - Ease of use vs Purity === In a project our team is using object lists to perform mass operations on sets of data that should all be processed in a similar way. In particular, different objects would ideally act the same, which would be very easily achieved with polymorphism. The problem I have with it is that inheritance implies the _is a_ relationship, rather than the _has a_ relationship. For example, several objects _have a_ damage counter, but to make this easy to use in an object list, polymorphism could be used - except that would imply an _is a_ relationship which wouldn't be true. (A person _is not_ a damage counter.) The only solution I can think of is to have a member of the class return the proper object type when implicitly casted instead of relying on inheritance. **Would it be better to forgo the _is a_ / _has a_ ideal in exchange for ease of programming?**
0
11,857
08/15/2008 01:05:30
1,117
08/12/2008 13:27:15
51
9
What do you use as a good alternative to Team System?
I would like to gauge what solutions other people put in place to get Team System functionality. We all know that Team System can be pricey for some of us. I know they offer a small team edition with five licenses with a MSDN subscription, but what if your team is bigger than five or you don't want to use Team System? Here is the solution that I use and it works great: - [Subversion][1] for source control - [Warehouse][2] for my Subversion web browser - [FogBugz][3] for feature and bug tracking with it integrated with Subversion and Warehouse - [CruiseControl.Net][4] with [nAnt][5] for my automated build system for .Net projects - [CruiseControl.rb][6] with [Capistrano][7] for my automated build system for Ruby on Rails projects [1]: http://subversion.tigris.org/ [2]: http://warehouseapp.com/ [3]: http://www.fogcreek.com/fogbugz/ [4]: http://confluence.public.thoughtworks.org/display/CCNET/Welcome+to+CruiseControl.NET [5]: http://nant.sourceforge.net/ [6]: http://cruisecontrolrb.thoughtworks.com/ [7]: http://www.capify.org/
visual-studio-team-system
svn
fogbugz
warehouse
cruisecontrol.net
null
open
What do you use as a good alternative to Team System? === I would like to gauge what solutions other people put in place to get Team System functionality. We all know that Team System can be pricey for some of us. I know they offer a small team edition with five licenses with a MSDN subscription, but what if your team is bigger than five or you don't want to use Team System? Here is the solution that I use and it works great: - [Subversion][1] for source control - [Warehouse][2] for my Subversion web browser - [FogBugz][3] for feature and bug tracking with it integrated with Subversion and Warehouse - [CruiseControl.Net][4] with [nAnt][5] for my automated build system for .Net projects - [CruiseControl.rb][6] with [Capistrano][7] for my automated build system for Ruby on Rails projects [1]: http://subversion.tigris.org/ [2]: http://warehouseapp.com/ [3]: http://www.fogcreek.com/fogbugz/ [4]: http://confluence.public.thoughtworks.org/display/CCNET/Welcome+to+CruiseControl.NET [5]: http://nant.sourceforge.net/ [6]: http://cruisecontrolrb.thoughtworks.com/ [7]: http://www.capify.org/
0
11,878
08/15/2008 01:50:02
285
08/04/2008 12:34:49
143
16
Best .NET Solution for Frequently Changed Database
I am currently architecting a small CRUD applicaton. Their database is a huge mess and will be changing frequently over the course of the next 6 months to a year. What would you recommend for my data layer: 1) ORM (if so, which one?) 2) Linq2Sql 3) Stored Procedures 4) Parametrized Queries I really need a solution that will be dynamic enough (both fast and easy) where I can replace tables and add/delete columns frequently. Note: I do not have much experience with ORM (only a little SubSonic) and generally tend to use stored procedures so maybe that would be the way to go. I would love to learn Ling2Sql or NHibernate if either would allow for the situation I've described above.
asp.net
.net
c#
orm
linq-to-sql
null
open
Best .NET Solution for Frequently Changed Database === I am currently architecting a small CRUD applicaton. Their database is a huge mess and will be changing frequently over the course of the next 6 months to a year. What would you recommend for my data layer: 1) ORM (if so, which one?) 2) Linq2Sql 3) Stored Procedures 4) Parametrized Queries I really need a solution that will be dynamic enough (both fast and easy) where I can replace tables and add/delete columns frequently. Note: I do not have much experience with ORM (only a little SubSonic) and generally tend to use stored procedures so maybe that would be the way to go. I would love to learn Ling2Sql or NHibernate if either would allow for the situation I've described above.
0
11,879
08/15/2008 01:51:48
391
08/05/2008 12:27:15
36
1
Is it possible to return objects from a WebService?
Instead of returning a common string, is there a way to return classic objects? If not: what are the best practices? Do you transpose your object to xml and rebuild the object on the other side? What are the other possibilities?
webservices
null
null
null
null
null
open
Is it possible to return objects from a WebService? === Instead of returning a common string, is there a way to return classic objects? If not: what are the best practices? Do you transpose your object to xml and rebuild the object on the other side? What are the other possibilities?
0
11,903
08/15/2008 02:29:50
257
08/04/2008 07:30:01
313
30
OpenID Attribute Exchange - should I use it?
My website will be using only OpenID for authentication. I'd like to pull user details down via attribute exchange, but attribute exchange seems to have caused a lot of grief for StackOverflow. What is the current state of play in the industry? Does any OpenID provider do a decent job of attribute exchange? Should I just steer away from OpenID attribute exchange altogether? How can I deal with inconsistent support for functionality?
openid
null
null
null
null
null
open
OpenID Attribute Exchange - should I use it? === My website will be using only OpenID for authentication. I'd like to pull user details down via attribute exchange, but attribute exchange seems to have caused a lot of grief for StackOverflow. What is the current state of play in the industry? Does any OpenID provider do a decent job of attribute exchange? Should I just steer away from OpenID attribute exchange altogether? How can I deal with inconsistent support for functionality?
0
11,915
08/15/2008 02:56:41
571
08/06/2008 20:19:59
773
60
RSS Feeds in ASP.NET MVC
How would you reccommend handling RSS Feeds in ASP.NET MVC? Using a third party library? Using the RSS stuff in the BCL? Just making an RSS view that render the XML? Or something completely different?
asp.net
mvc
rss
null
null
null
open
RSS Feeds in ASP.NET MVC === How would you reccommend handling RSS Feeds in ASP.NET MVC? Using a third party library? Using the RSS stuff in the BCL? Just making an RSS view that render the XML? Or something completely different?
0
11,919
08/15/2008 03:05:13
1,392
08/15/2008 03:01:55
1
0
How do I get PHP and MySQL working on IIS 7.0 ?
Okay, I've looked all over the internet for a good solution to get PHP and MySQL working on IIS7.0. It's nearly impossible, I've tried it so many times and given up in vain. Please please help by linking some great step-by-step tutorial to adding PHP and MySQL on IIS7.0 from scratch. PHP and MySQL are essential for installing any CMS... Please help.. Cheers..
php
mysql
iis7
null
null
null
open
How do I get PHP and MySQL working on IIS 7.0 ? === Okay, I've looked all over the internet for a good solution to get PHP and MySQL working on IIS7.0. It's nearly impossible, I've tried it so many times and given up in vain. Please please help by linking some great step-by-step tutorial to adding PHP and MySQL on IIS7.0 from scratch. PHP and MySQL are essential for installing any CMS... Please help.. Cheers..
0
11,926
08/15/2008 03:25:31
105
08/01/2008 23:29:32
23
2
ASP.Net MVC route mapping
I'm new to MVC (and ASP.Net routing). I'm trying to map *.aspx to a controller called "PageController". routes.MapRoute( "Page", "{name}.aspx", new { controller = "Page", action = "Index", id = "" } ); Wouldn't the code above map *.aspx to "PageController"? When I run this and type in any .aspx page I get the following error: > The controller for path '/Page.aspx' could not be found or it does not implement the IController interface. Parameter name: controllerType Is there something I'm not doing here?
asp.net-mvc
null
null
null
null
null
open
ASP.Net MVC route mapping === I'm new to MVC (and ASP.Net routing). I'm trying to map *.aspx to a controller called "PageController". routes.MapRoute( "Page", "{name}.aspx", new { controller = "Page", action = "Index", id = "" } ); Wouldn't the code above map *.aspx to "PageController"? When I run this and type in any .aspx page I get the following error: > The controller for path '/Page.aspx' could not be found or it does not implement the IController interface. Parameter name: controllerType Is there something I'm not doing here?
0
11,930
08/15/2008 03:32:28
338
08/04/2008 18:34:44
1
0
How can I determine the IP of my router/gateway in Java?
How can I determine the IP of my router/gateway in Java? I can get my IP easily enough. I can get my internet IP using a service on a website. But how can I determine my gateway's IP? This is somewhat easy in .NET if you know your way around. But how do you do it in Java?
java
sockets
internet
ip
router
null
open
How can I determine the IP of my router/gateway in Java? === How can I determine the IP of my router/gateway in Java? I can get my IP easily enough. I can get my internet IP using a service on a website. But how can I determine my gateway's IP? This is somewhat easy in .NET if you know your way around. But how do you do it in Java?
0
11,941
08/15/2008 03:47:18
1,394
08/15/2008 03:38:25
1
0
Getting started with Agile and TDD..
How do I get started in Agile and TDD. I have learnt a bit about Agile, but finding it difficult to get started. How do I get started.
agile
null
null
null
null
null
open
Getting started with Agile and TDD.. === How do I get started in Agile and TDD. I have learnt a bit about Agile, but finding it difficult to get started. How do I get started.
0
11,950
08/15/2008 04:05:10
1,130
08/12/2008 16:39:54
1
1
How do you log errors (Exceptions) in your Asp.Net apps ?
I'm looking for the best way to log errors in an Asp.Net application. I want to be able to receive Emails when errors occurs in my application, with detailed information about the Exception and the current Request. In my company we used to have our own ErrorMailer, catching everything in the Global.asax Application_Error. It was "Ok" but not very flexible nor configurable. We swithed recently to NLog. It's much more configurable, we can define different targets for the errors, filter them, buffer them (not tried yet). It's a very good improvement. But I dicovered lately that theirs a whole Namespace in the .Net framework for this purpose : [System.Web.Management][1] and it can be configured in the [healthMonitoring][2] section of web.Config. Have you ever worked with .Net health monitoring ? What is your solution for error logging ? Thanks, Vincent [1]: http://msdn.microsoft.com/en-us/library/system.web.management.aspx [2]: http://msdn.microsoft.com/en-us/library/2fwh2ss9(VS.80).aspx
error-handling
asp.net
null
null
null
null
open
How do you log errors (Exceptions) in your Asp.Net apps ? === I'm looking for the best way to log errors in an Asp.Net application. I want to be able to receive Emails when errors occurs in my application, with detailed information about the Exception and the current Request. In my company we used to have our own ErrorMailer, catching everything in the Global.asax Application_Error. It was "Ok" but not very flexible nor configurable. We swithed recently to NLog. It's much more configurable, we can define different targets for the errors, filter them, buffer them (not tried yet). It's a very good improvement. But I dicovered lately that theirs a whole Namespace in the .Net framework for this purpose : [System.Web.Management][1] and it can be configured in the [healthMonitoring][2] section of web.Config. Have you ever worked with .Net health monitoring ? What is your solution for error logging ? Thanks, Vincent [1]: http://msdn.microsoft.com/en-us/library/system.web.management.aspx [2]: http://msdn.microsoft.com/en-us/library/2fwh2ss9(VS.80).aspx
0
11,964
08/15/2008 04:32:29
1,220
08/13/2008 13:44:48
542
39
Pay for vmware or use Open Source?
What should I use to virtualize my desktop, vmx, xen, or vmware? **Needs to work on a linux or windows host, sorry virtual pc.**
virtualization
null
null
null
null
null
open
Pay for vmware or use Open Source? === What should I use to virtualize my desktop, vmx, xen, or vmware? **Needs to work on a linux or windows host, sorry virtual pc.**
0
11,974
08/15/2008 04:54:05
1,396
08/15/2008 04:14:04
11
2
What is the best way to upload a file via an HTTP POST with a web form?
Basically, something better than this: > [input type="file" name="myfile" size="50"] First of all, the "browse" button looks different on every browser. Unlike the "submit" button on a form, you have to come up with some [hack-y](http://www.quirksmode.org/dom/inputfile.html) way to style it. Secondly, there's no progress indicator showing you how much of the file has uploaded. You usually have to implement some kind of client-side way to disable multiple submits (e.g. change the submit button to a disabled button showing "Form submitting... please wait.") or flash a giant warning "DO NOT SUBMIT TWICE.' Are there any good non-Flash or silly Java applet solutions to this?
forms
html
http
post
null
null
open
What is the best way to upload a file via an HTTP POST with a web form? === Basically, something better than this: > [input type="file" name="myfile" size="50"] First of all, the "browse" button looks different on every browser. Unlike the "submit" button on a form, you have to come up with some [hack-y](http://www.quirksmode.org/dom/inputfile.html) way to style it. Secondly, there's no progress indicator showing you how much of the file has uploaded. You usually have to implement some kind of client-side way to disable multiple submits (e.g. change the submit button to a disabled button showing "Form submitting... please wait.") or flash a giant warning "DO NOT SUBMIT TWICE.' Are there any good non-Flash or silly Java applet solutions to this?
0
11,975
08/15/2008 04:54:59
1,220
08/13/2008 13:44:48
540
39
Handling timezones in storage?
Store everything in GMT? Store everything the way it was entered with an embedded offset? Do the math everytime you render? Display relative Times "1 minutes ago"?
globalization
localization
null
null
null
null
open
Handling timezones in storage? === Store everything in GMT? Store everything the way it was entered with an embedded offset? Do the math everytime you render? Display relative Times "1 minutes ago"?
0
11,986
08/15/2008 05:23:02
1,396
08/15/2008 04:14:04
11
2
Why does sqlite3-ruby-1.2.2 not work on OS X?
I am running OS X 10.5, Ruby 1.8.6, Rails 2.1, and sqlite3-ruby 1.2.2 and I get the following error when trying to rake db:migrate on an app that works find connected to MySQL. > rake aborted! no such file to load -- sqlite3/database
ruby
ruby-on-rails
sqlite
rubyonrails
null
null
open
Why does sqlite3-ruby-1.2.2 not work on OS X? === I am running OS X 10.5, Ruby 1.8.6, Rails 2.1, and sqlite3-ruby 1.2.2 and I get the following error when trying to rake db:migrate on an app that works find connected to MySQL. > rake aborted! no such file to load -- sqlite3/database
0
12,008
08/15/2008 06:06:13
298
08/04/2008 13:29:28
17
4
How do you do system integration?
I curious to how different people solve integration of systems. I have a feeling that the last years more and more work has gone into integrating systems and that this kind of work need will increase as well. I wondering if you solve it developing your own small services that are then connected or if you use some sort of product (WebSphere, BizTalk, [Mule][1] etc). I'd also think it'd be interesting to know how these kind of solutions are managed and maintained (how do you solve security, instrumentation etc, etc), what kind of problems have you experienced with your solution and so on. [1]: http://mule.mulesource.org/display/MULE/Home
architecture
system-integration
null
null
null
null
open
How do you do system integration? === I curious to how different people solve integration of systems. I have a feeling that the last years more and more work has gone into integrating systems and that this kind of work need will increase as well. I wondering if you solve it developing your own small services that are then connected or if you use some sort of product (WebSphere, BizTalk, [Mule][1] etc). I'd also think it'd be interesting to know how these kind of solutions are managed and maintained (how do you solve security, instrumentation etc, etc), what kind of problems have you experienced with your solution and so on. [1]: http://mule.mulesource.org/display/MULE/Home
0
12,009
08/15/2008 06:08:55
115
08/02/2008 05:44:40
155
27
STDIN usage
I regularly setup new Debian boxes and I am trying to automate the process more, I want to setup samba with my necessary settings, I have already setup the config, now I need to set the password. The man page says: -s This option causes smbpasswd to be silent (i.e. not issue prompts) and to read its old and new passwords from standard input, rather than from /dev/tty (like the passwd(1) program does). This option is to aid people writing scripts to drive smbpasswd So how do I send the password via STDIN?
debian
stdin
automation
samba
smbpasswd
null
open
STDIN usage === I regularly setup new Debian boxes and I am trying to automate the process more, I want to setup samba with my necessary settings, I have already setup the config, now I need to set the password. The man page says: -s This option causes smbpasswd to be silent (i.e. not issue prompts) and to read its old and new passwords from standard input, rather than from /dev/tty (like the passwd(1) program does). This option is to aid people writing scripts to drive smbpasswd So how do I send the password via STDIN?
0
12,010
08/15/2008 06:11:07
115
08/02/2008 05:44:40
155
27
Shopping Cart
What should I take into consideration while building a Shopping Cart, for a eCommerce site (no metal work here =))?
e-commerce
shopping-cart
website
null
null
null
open
Shopping Cart === What should I take into consideration while building a Shopping Cart, for a eCommerce site (no metal work here =))?
0
12,023
08/15/2008 06:28:20
322
08/04/2008 16:38:52
267
16
How do I attract developers to an Open Source project?
How do I attract developers to an open source project? Obviously if the project were cool or valuable it would be easier to find people. (In fact, they would probably come to me.) But what do I do for the mundane or unexciting? Advertise the project? Spam forums? Or just keep on plugging away hoping that some other folks notice? Is it a matter of time, project awesomeness, or luck?
opensource
null
null
null
null
null
open
How do I attract developers to an Open Source project? === How do I attract developers to an open source project? Obviously if the project were cool or valuable it would be easier to find people. (In fact, they would probably come to me.) But what do I do for the mundane or unexciting? Advertise the project? Spam forums? Or just keep on plugging away hoping that some other folks notice? Is it a matter of time, project awesomeness, or luck?
0
12,045
08/15/2008 07:02:45
276
08/04/2008 10:44:14
1
1
Unit testing a timer based application?
I am currently writing a simple, timer based mini app in C# that performs an action n times every k seconds. I am trying to adopt a test driven development style, so my goal is to unit test all parts of the app. So, my question is: Is there a good way to unit test a timer based class? The problem, as I see it, is that there is a big risk that the tests will take uncomfortably long to execute, since they must wait so and so long for the desired actions to happen. Especially if one want realistic data (seconds), and not use the minimal time resolution allowed by the framework (1 ms?). I am using a mock object for the action, to register the number of times the action was called, and so that the action takes practically no time. Thanks /Erik
unittesting
c#
.net
timer
null
null
open
Unit testing a timer based application? === I am currently writing a simple, timer based mini app in C# that performs an action n times every k seconds. I am trying to adopt a test driven development style, so my goal is to unit test all parts of the app. So, my question is: Is there a good way to unit test a timer based class? The problem, as I see it, is that there is a big risk that the tests will take uncomfortably long to execute, since they must wait so and so long for the desired actions to happen. Especially if one want realistic data (seconds), and not use the minimal time resolution allowed by the framework (1 ms?). I am using a mock object for the action, to register the number of times the action was called, and so that the action takes practically no time. Thanks /Erik
0
12,051
08/15/2008 07:39:23
493
08/06/2008 10:25:05
1,575
129
Calling base constructor in c#
If I inherit from a base class and want to pass something from the constructor of the inherited class to the constructor of the base class, how do I do that? For example, If I inherit from the Exception class I want to do something like this: class MyExceptionClass : Exception { public MyExceptionClass(string message, string extraInfo) { //This is where it's all falling apart?? base(message); } } Basically what I want is to be able to pass the string message to the base Exception class
c#
constructor
null
null
null
null
open
Calling base constructor in c# === If I inherit from a base class and want to pass something from the constructor of the inherited class to the constructor of the base class, how do I do that? For example, If I inherit from the Exception class I want to do something like this: class MyExceptionClass : Exception { public MyExceptionClass(string message, string extraInfo) { //This is where it's all falling apart?? base(message); } } Basically what I want is to be able to pass the string message to the base Exception class
0
12,073
08/15/2008 08:30:55
988
08/11/2008 12:14:35
1
1
What is the best XML editor?
Is there a good XML / XSD editor out there? I've been using the editor in Visual Studio 2005 a little but find it lacking in features. Which editors do you use?
xml
xsd
developmentenvironment
null
null
08/23/2011 13:29:39
not constructive
What is the best XML editor? === Is there a good XML / XSD editor out there? I've been using the editor in Visual Studio 2005 a little but find it lacking in features. Which editors do you use?
4
12,075
08/15/2008 08:36:19
1,078
08/12/2008 10:39:00
106
6
Should I be worried about obfusicating my .NET code?
I'm sure may readers on SO have used Lutz Roeder's .NET reflector to decompile their .NET code. I was amazed just accurately our source code could be recontructed from our compiled assemblies. I'd be interested in hearing how many of you use obfusication, and for what sort of products? I'm sure that this is a much more important issue for, say, a .NET application that you offer for download over the internet as opposed to something that is build bespoke for a particular client.
.net
obfuscation
null
null
null
null
open
Should I be worried about obfusicating my .NET code? === I'm sure may readers on SO have used Lutz Roeder's .NET reflector to decompile their .NET code. I was amazed just accurately our source code could be recontructed from our compiled assemblies. I'd be interested in hearing how many of you use obfusication, and for what sort of products? I'm sure that this is a much more important issue for, say, a .NET application that you offer for download over the internet as opposed to something that is build bespoke for a particular client.
0
12,088
08/15/2008 08:55:28
834
08/09/2008 07:29:24
57
6
Do you obfuscate your commercial Java code?
I wonder if anyone uses commercial/free java obfuscators on his own commercial product. I know only about one project that actually had an obfuscating step in the ant build step for releases. Do you obfuscate? And if so, why do you obfuscate? Is it really a way to protect the code or is it just a better feeling for the developers/managers?
java
obfuscation
null
null
null
null
open
Do you obfuscate your commercial Java code? === I wonder if anyone uses commercial/free java obfuscators on his own commercial product. I know only about one project that actually had an obfuscating step in the ant build step for releases. Do you obfuscate? And if so, why do you obfuscate? Is it really a way to protect the code or is it just a better feeling for the developers/managers?
0
12,095
08/15/2008 09:19:04
1,166
08/13/2008 09:06:10
1
0
Windows Forms Threading and Events - ListBox updates promptly but progressbar experiences huge delay
Our team is creating a new recruitment workflow system to replace an old one. I have been tasked with migrating the old data into the new schema. I have decided to do this by creating a small Windows Forms project as the schema are radically different and straight TSQL scripts are not an adequate solution. The main sealed class 'ImportController' that does the work declares the following delegate event: public delegate void ImportProgressEventHandler(object sender, ImportProgressEventArgs e); public static event ImportProgressEventHandler importProgressEvent; The main window starts a static method in that class using a new thread: Thread dataProcessingThread = new Thread(new ParameterizedThreadStart(ImportController.ImportData)); dataProcessingThread.Name = "Data Importer: Data Processing Thread"; dataProcessingThread.Start(settings); the ImportProgressEvent args carries a string message, a max int value for the progress bar and an current progress int value. The Windows form subcribes to the event: ImportController.importProgressEvent += new ImportController.ImportProgressEventHandler(ImportController_importProgressEvent); And responds to the event in this manner using it's own delegate: private delegate void TaskCompletedUIDelegate(string completedTask, int currentProgress, int progressMax); private void ImportController_importProgressEvent(object sender, ImportProgressEventArgs e) { this.Invoke(new TaskCompletedUIDelegate(this.DisplayCompletedTask), e.CompletedTask, e.CurrentProgress, e.ProgressMax); } Finally the progress bar and listbox are updated: private void DisplayCompletedTask(string completedTask, int currentProgress, int progressMax) { string[] items = completedTask.Split(new string[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries); foreach (string item in items) { this.lstTasks.Items.Add(item); } if (currentProgress >= 0 && progressMax > 0 && currentProgress <= progressMax) { this.ImportProgressBar.Maximum = progressMax; this.ImportProgressBar.Value = currentProgress; } } The thing is the ListBox seems to update very quickly, but the progress bar never moves until the batch is almost complete anyway ??? what gives ?
windows
events
multithreading
forms
delegates
null
open
Windows Forms Threading and Events - ListBox updates promptly but progressbar experiences huge delay === Our team is creating a new recruitment workflow system to replace an old one. I have been tasked with migrating the old data into the new schema. I have decided to do this by creating a small Windows Forms project as the schema are radically different and straight TSQL scripts are not an adequate solution. The main sealed class 'ImportController' that does the work declares the following delegate event: public delegate void ImportProgressEventHandler(object sender, ImportProgressEventArgs e); public static event ImportProgressEventHandler importProgressEvent; The main window starts a static method in that class using a new thread: Thread dataProcessingThread = new Thread(new ParameterizedThreadStart(ImportController.ImportData)); dataProcessingThread.Name = "Data Importer: Data Processing Thread"; dataProcessingThread.Start(settings); the ImportProgressEvent args carries a string message, a max int value for the progress bar and an current progress int value. The Windows form subcribes to the event: ImportController.importProgressEvent += new ImportController.ImportProgressEventHandler(ImportController_importProgressEvent); And responds to the event in this manner using it's own delegate: private delegate void TaskCompletedUIDelegate(string completedTask, int currentProgress, int progressMax); private void ImportController_importProgressEvent(object sender, ImportProgressEventArgs e) { this.Invoke(new TaskCompletedUIDelegate(this.DisplayCompletedTask), e.CompletedTask, e.CurrentProgress, e.ProgressMax); } Finally the progress bar and listbox are updated: private void DisplayCompletedTask(string completedTask, int currentProgress, int progressMax) { string[] items = completedTask.Split(new string[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries); foreach (string item in items) { this.lstTasks.Items.Add(item); } if (currentProgress >= 0 && progressMax > 0 && currentProgress <= progressMax) { this.ImportProgressBar.Maximum = progressMax; this.ImportProgressBar.Value = currentProgress; } } The thing is the ListBox seems to update very quickly, but the progress bar never moves until the batch is almost complete anyway ??? what gives ?
0
12,103
08/15/2008 09:38:31
274
08/04/2008 10:43:23
110
13
Perl and map not working... I don't understand
When I am running the following statement: @filtered = map {s/&nbsp;//g} @outdata; it is returning an empty list instead of the filtered list that I expected. What I am trying to do is remove every occurance of `&nbsp;` from an array of string (which is an XML file). Obviously, I am not understanding something. Can anyone tell me the correct way to do this, and why this isn't working for me
perl
map
null
null
null
null
open
Perl and map not working... I don't understand === When I am running the following statement: @filtered = map {s/&nbsp;//g} @outdata; it is returning an empty list instead of the filtered list that I expected. What I am trying to do is remove every occurance of `&nbsp;` from an array of string (which is an XML file). Obviously, I am not understanding something. Can anyone tell me the correct way to do this, and why this isn't working for me
0
12,107
08/15/2008 09:47:38
982
08/11/2008 12:08:33
17
8
Configuring VisualSVN Server to use _svn instead of .svn
We were having a problem with our build server not checking out modifications from source control despite recognizing that there had been changes. It was traced to the control folder (not sure what it's real name is), the existing working builds were using _svn. Clearing the working folder forced a new complete checkout and I noticed that now the control folder is .svn. It looks like originally our integration routines were checking out code using _svn but now it is using .svn. *The svn.exe being used during integration is from VisualSVN Server can I set this up to use _svn again?* How the original working copies were using _svn I don't know! - we only ever ever used VisualSVN Server and haven't changed this. We had setup TortoiseSVN to use _svn following the recommendation that this works better for Visual Studio and have also installed TortoiseSVN on the build server in case it is ever needed. Could this be the cause? *Also is this really necessary? As MSBuild is Microsoft's is it recommended as it is for Visual Studio?*
continuous-integration
tortoisesvn
sourcecontrol
visualsvnserver
null
null
open
Configuring VisualSVN Server to use _svn instead of .svn === We were having a problem with our build server not checking out modifications from source control despite recognizing that there had been changes. It was traced to the control folder (not sure what it's real name is), the existing working builds were using _svn. Clearing the working folder forced a new complete checkout and I noticed that now the control folder is .svn. It looks like originally our integration routines were checking out code using _svn but now it is using .svn. *The svn.exe being used during integration is from VisualSVN Server can I set this up to use _svn again?* How the original working copies were using _svn I don't know! - we only ever ever used VisualSVN Server and haven't changed this. We had setup TortoiseSVN to use _svn following the recommendation that this works better for Visual Studio and have also installed TortoiseSVN on the build server in case it is ever needed. Could this be the cause? *Also is this really necessary? As MSBuild is Microsoft's is it recommended as it is for Visual Studio?*
0
12,135
08/15/2008 11:03:30
905
08/10/2008 09:37:14
911
75
FileNotFoundException for mscorlib.XmlSerializers.DLL, which doesn't exist
I'm using an XmlSerializer to deserialize a particular type in mscorelib.dll XmlSerializer ser = new XmlSerializer( typeof( [.Net type in System] ) ); return ser.Deserialize( new StringReader( xmlValue ) ) as [.Net type in System]; This throws a caught `FileNotFoundException` when the assembly is loaded: > "Could not load file or assembly > 'mscorlib.XmlSerializers, > Version=2.0.0.0, Culture=neutral, > PublicKeyToken=b77a5c561934e089' or > one of its dependencies. The system > cannot find the file specified." FusionLog: === Pre-bind state information === LOG: User = ### LOG: DisplayName = mscorlib.XmlSerializers, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=x86 (Fully-specified) LOG: Appbase = file:///C:/localdir LOG: Initial PrivatePath = NULL Calling assembly : System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089. === LOG: This bind starts in default load context. LOG: Using application configuration file: C:\localdir\bin\Debug\appname.vshost.exe.Config LOG: Using machine configuration file from c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\config\machine.config. LOG: Post-policy reference: mscorlib.XmlSerializers, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=x86 LOG: Attempting download of new URL file:///C:/localdir/bin/Debug/mscorlib.XmlSerializers.DLL. LOG: Attempting download of new URL file:///C:/localdir/bin/Debug/mscorlib.XmlSerializers/mscorlib.XmlSerializers.DLL. LOG: Attempting download of new URL file:///C:/localdir/bin/Debug/mscorlib.XmlSerializers.EXE. LOG: Attempting download of new URL file:///C:/localdir/bin/Debug/mscorlib.XmlSerializers/mscorlib.XmlSerializers.EXE. As far as I know there is no mscorlib.XmlSerializers.DLL, I think the DLL name has bee auto generated by .Net looking for the serializer. You have the option of creating a myApplication.XmlSerializers.DLL when compiling to optimise serializations, so I assume this is part of the framework's checking for it. The problem is that this appears to be causing a delay in loading the application - it seems to hang for a few seconds at this point. Any ideas how to avoid this or speed it up?
c#
.net
assembly
serialization
null
null
open
FileNotFoundException for mscorlib.XmlSerializers.DLL, which doesn't exist === I'm using an XmlSerializer to deserialize a particular type in mscorelib.dll XmlSerializer ser = new XmlSerializer( typeof( [.Net type in System] ) ); return ser.Deserialize( new StringReader( xmlValue ) ) as [.Net type in System]; This throws a caught `FileNotFoundException` when the assembly is loaded: > "Could not load file or assembly > 'mscorlib.XmlSerializers, > Version=2.0.0.0, Culture=neutral, > PublicKeyToken=b77a5c561934e089' or > one of its dependencies. The system > cannot find the file specified." FusionLog: === Pre-bind state information === LOG: User = ### LOG: DisplayName = mscorlib.XmlSerializers, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=x86 (Fully-specified) LOG: Appbase = file:///C:/localdir LOG: Initial PrivatePath = NULL Calling assembly : System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089. === LOG: This bind starts in default load context. LOG: Using application configuration file: C:\localdir\bin\Debug\appname.vshost.exe.Config LOG: Using machine configuration file from c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\config\machine.config. LOG: Post-policy reference: mscorlib.XmlSerializers, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=x86 LOG: Attempting download of new URL file:///C:/localdir/bin/Debug/mscorlib.XmlSerializers.DLL. LOG: Attempting download of new URL file:///C:/localdir/bin/Debug/mscorlib.XmlSerializers/mscorlib.XmlSerializers.DLL. LOG: Attempting download of new URL file:///C:/localdir/bin/Debug/mscorlib.XmlSerializers.EXE. LOG: Attempting download of new URL file:///C:/localdir/bin/Debug/mscorlib.XmlSerializers/mscorlib.XmlSerializers.EXE. As far as I know there is no mscorlib.XmlSerializers.DLL, I think the DLL name has bee auto generated by .Net looking for the serializer. You have the option of creating a myApplication.XmlSerializers.DLL when compiling to optimise serializations, so I assume this is part of the framework's checking for it. The problem is that this appears to be causing a delay in loading the application - it seems to hang for a few seconds at this point. Any ideas how to avoid this or speed it up?
0
12,140
08/15/2008 11:12:35
1,037
08/11/2008 17:42:51
36
7
Access to global application settings
A database application that I'm currently working on, stores all sorts of settings in the database. Most of those settings are there to customize certain business rules, but there's also some other stuff in there. The app contains objects that specifically do a certain task, e.g., a certain complicated calculation. Those non-UI objects are unit-tested, but also need access to lots of those global settings. The way we've implemented this right now, is by giving the objects properties that are filled by the Application Controller at runtime. When testing, we create the objects in the test and fill in values for testing (not from the database). This works better, in any case much better than having all those objects need some global _Settings_ object --- that of course effectively makes unit testing impossible :) Disadvantage can be that you sometimes need to set a dozen of properties, or that you need to let those properties 'percolate' into sub-objects. **So the general question is**: how do you provide access to global application settings in your projects, without the need for global variables, while still being able to unit test your code? This must be a problem that's been solved 100's of times... (Note: I'm not too much of an experienced programmer, as you'll have noticed; but I love to learn! And of course, I've already done research into this topic, but I'm really looking for some first-hand experiences)
language-agnostic
oop
null
null
null
null
open
Access to global application settings === A database application that I'm currently working on, stores all sorts of settings in the database. Most of those settings are there to customize certain business rules, but there's also some other stuff in there. The app contains objects that specifically do a certain task, e.g., a certain complicated calculation. Those non-UI objects are unit-tested, but also need access to lots of those global settings. The way we've implemented this right now, is by giving the objects properties that are filled by the Application Controller at runtime. When testing, we create the objects in the test and fill in values for testing (not from the database). This works better, in any case much better than having all those objects need some global _Settings_ object --- that of course effectively makes unit testing impossible :) Disadvantage can be that you sometimes need to set a dozen of properties, or that you need to let those properties 'percolate' into sub-objects. **So the general question is**: how do you provide access to global application settings in your projects, without the need for global variables, while still being able to unit test your code? This must be a problem that's been solved 100's of times... (Note: I'm not too much of an experienced programmer, as you'll have noticed; but I love to learn! And of course, I've already done research into this topic, but I'm really looking for some first-hand experiences)
0
12,141
08/15/2008 11:13:53
990
08/11/2008 12:18:08
11
1
What's your worst database accident happened in production?
For example: Updating all rows of the customer table because you forgot to add the where clause. What was it like, realizing it and reporting it to your coworkers or customers? And, what's your lessons learned?
database
production
easeatwork
null
null
null
open
What's your worst database accident happened in production? === For example: Updating all rows of the customer table because you forgot to add the where clause. What was it like, realizing it and reporting it to your coworkers or customers? And, what's your lessons learned?
0
12,142
08/15/2008 11:15:05
968
08/11/2008 07:44:54
141
19
Update database schema in Entity Framework
I installed VS SP1 and played around with Entity Framework. I created a schema from an existing database and tried some basic operations. Most of it went well, except the database schema update. I changed the database in every basic way: - added a new table - deleted a table - added a new column to an existing table - deleted a column from an existing table - changed the type of an existing column The first three went well, but the type change and the column deletion did not followed the database changes. Is there any way to make is work from the designer? Or is it not supported at the moment? I didn't find any related material yet, but still searching.
.net
entityframework
schema
null
null
null
open
Update database schema in Entity Framework === I installed VS SP1 and played around with Entity Framework. I created a schema from an existing database and tried some basic operations. Most of it went well, except the database schema update. I changed the database in every basic way: - added a new table - deleted a table - added a new column to an existing table - deleted a column from an existing table - changed the type of an existing column The first three went well, but the type change and the column deletion did not followed the database changes. Is there any way to make is work from the designer? Or is it not supported at the moment? I didn't find any related material yet, but still searching.
0
12,144
08/15/2008 11:19:51
1,030
08/11/2008 15:40:52
181
14
Application configuration files
OK, so I don't want to start a holy-war here, but we're in the process of trying to consolidate the way we handle our application configuration files and we're struggling to make a descision on the best approach to take. At the moment, every application we distribute is using it's own ad-hoc configuration files, whether it's property files (ini style), XML or JSON (internal use only at the moment!). Most of our code is Java at the moment, so we've been looking at [Apache Commons Config][1], but we've found it to be quite verbose. We've also looked at [XMLBeans][2], but it seems like a lot of faffing around. I also feel as though I'm being pushed towards XML as a format, but my clients and colleagues are apprehensive about trying something else. I can understand it from the client's perspective, everybody's heard of XML, but at the end of the day, shouldn't be using the right tool for the job? What formats and libraries are people using in production systems these days, is anyone else trying to avoid the [angle bracket tax][3]? [1]: http://commons.apache.org/configuration/ [2]: http://xmlbeans.apache.org/ [3]: http://www.codinghorror.com/blog/archives/001114.html
java
json
xml
configurationfiles
null
null
open
Application configuration files === OK, so I don't want to start a holy-war here, but we're in the process of trying to consolidate the way we handle our application configuration files and we're struggling to make a descision on the best approach to take. At the moment, every application we distribute is using it's own ad-hoc configuration files, whether it's property files (ini style), XML or JSON (internal use only at the moment!). Most of our code is Java at the moment, so we've been looking at [Apache Commons Config][1], but we've found it to be quite verbose. We've also looked at [XMLBeans][2], but it seems like a lot of faffing around. I also feel as though I'm being pushed towards XML as a format, but my clients and colleagues are apprehensive about trying something else. I can understand it from the client's perspective, everybody's heard of XML, but at the end of the day, shouldn't be using the right tool for the job? What formats and libraries are people using in production systems these days, is anyone else trying to avoid the [angle bracket tax][3]? [1]: http://commons.apache.org/configuration/ [2]: http://xmlbeans.apache.org/ [3]: http://www.codinghorror.com/blog/archives/001114.html
0
12,159
08/15/2008 11:44:33
912
08/10/2008 10:09:35
10
8
How should I unit test threaded code?
Hot-on-the-heels of of my previous unit testing related question, here's another toughie: I have thus far avoided the nightmare that is testing multi-threaded code since it just seems like too much of a minefield. I'd like to ask how people have gone about testing code that relies on threads for successful execution, or just how people have gone about testing those kinds of issues that only show up when two threads interact in a given manner? This seems like a really key problem for programmers today, it would be useful to pool our knowledge on this one imho.
unittesting
multithreading
methodology
null
null
null
open
How should I unit test threaded code? === Hot-on-the-heels of of my previous unit testing related question, here's another toughie: I have thus far avoided the nightmare that is testing multi-threaded code since it just seems like too much of a minefield. I'd like to ask how people have gone about testing code that relies on threads for successful execution, or just how people have gone about testing those kinds of issues that only show up when two threads interact in a given manner? This seems like a really key problem for programmers today, it would be useful to pool our knowledge on this one imho.
0
12,176
08/15/2008 12:15:31
194
08/03/2008 10:56:49
664
51
SVN Revision Version in .NET Assembly w/ out CC.NET
Is there any way to include the SVN repository revision number in the version string of a .NET assembly? Something like Major.Minor.SVNRev I've seen mention of doing this with something like CC.NET (although on ASP.NET actually), but is there any way to do it without any extra software? I've done similar things in C/C++ before using build batch scripts, but in was accomplished by reading the version number, then having the script write out a file called "ver.h" everytime with something to the effect of: #define MAJORVER 4 #define MINORVER 23 #define SOURCEVER 965 We would then use these defines to generate the version string. Is something like this possible for .NET?
.net
svn
subversion
versioning
null
null
open
SVN Revision Version in .NET Assembly w/ out CC.NET === Is there any way to include the SVN repository revision number in the version string of a .NET assembly? Something like Major.Minor.SVNRev I've seen mention of doing this with something like CC.NET (although on ASP.NET actually), but is there any way to do it without any extra software? I've done similar things in C/C++ before using build batch scripts, but in was accomplished by reading the version number, then having the script write out a file called "ver.h" everytime with something to the effect of: #define MAJORVER 4 #define MINORVER 23 #define SOURCEVER 965 We would then use these defines to generate the version string. Is something like this possible for .NET?
0
12,225
08/15/2008 13:16:25
730
08/08/2008 12:40:04
46
11
MaskedEditExtender
I have a database that contains a date and we are using the MaskedEditExtender (MEE) and MaskedEditValidator to make sure the dates are appropriate. However, we want the Admins to be able to go in and change the data (specifically the date) if necessary. How can I have the MEE field pre-populate with the database value when the data is shown on the page? I've tried to use 'bind' in the 'InitialValue' property but it doesn't populate the textbox. Thanks.
ajax
maskededitextender
maskededitvalidator
null
null
null
open
MaskedEditExtender === I have a database that contains a date and we are using the MaskedEditExtender (MEE) and MaskedEditValidator to make sure the dates are appropriate. However, we want the Admins to be able to go in and change the data (specifically the date) if necessary. How can I have the MEE field pre-populate with the database value when the data is shown on the page? I've tried to use 'bind' in the 'InitialValue' property but it doesn't populate the textbox. Thanks.
0
12,243
08/15/2008 13:30:42
1,212
08/13/2008 13:17:40
6
0
Namespace/solution structure
I apologize for asking such a generalized question, but it's something that can prove challenging for me. My team is about to embark on a large project that will hopefully drag together all of the random one-off codebases that have evolved through the years. Given that this project will cover standardizing logical entities across the company ("Customer", "Employee"), small tasks, large tasks that control the small tasks, and utility services, I'm struggling to figure out the best way to structure the namespaces and code structure. Though I guess I'm not giving you enough specifics to go on, **do you have any resources or advice on how to approach splitting your domains up logically**? In case it helps, most of this functionality will be revealed via web services, and we're a Microsoft shop with all the latest gizmos and gadgets. I'm debating one massive solution with subprojects to make references easier, but will that make it too unwieldy? Should I wrap up legacy application functionality, or leave that completely agnostic in the namespace (making an "OurCRMProduct.Customer" class versus a generic "Customer" class, for instance)? Should each service/project have its own BAL and DAL, or should that be an entirely separate assembly that everything references? I don't have experience with organizing such far-reaching projects, only one-offs, so I'm looking for any guidance I can get.
namespace
null
null
null
null
null
open
Namespace/solution structure === I apologize for asking such a generalized question, but it's something that can prove challenging for me. My team is about to embark on a large project that will hopefully drag together all of the random one-off codebases that have evolved through the years. Given that this project will cover standardizing logical entities across the company ("Customer", "Employee"), small tasks, large tasks that control the small tasks, and utility services, I'm struggling to figure out the best way to structure the namespaces and code structure. Though I guess I'm not giving you enough specifics to go on, **do you have any resources or advice on how to approach splitting your domains up logically**? In case it helps, most of this functionality will be revealed via web services, and we're a Microsoft shop with all the latest gizmos and gadgets. I'm debating one massive solution with subprojects to make references easier, but will that make it too unwieldy? Should I wrap up legacy application functionality, or leave that completely agnostic in the namespace (making an "OurCRMProduct.Customer" class versus a generic "Customer" class, for instance)? Should each service/project have its own BAL and DAL, or should that be an entirely separate assembly that everything references? I don't have experience with organizing such far-reaching projects, only one-offs, so I'm looking for any guidance I can get.
0
12,268
08/15/2008 14:01:15
1,228
08/13/2008 13:58:55
233
27
Have you ever reflected Reflector?
Lutz Roeder's Reflector, that is. Its obfuscated. ![alt text][1] I still don't understand this. Can somebody please explain? [1]: http://i37.tinypic.com/2lsd4dk.jpg
reflector
lutz
roeder
null
null
01/03/2012 20:19:35
not constructive
Have you ever reflected Reflector? === Lutz Roeder's Reflector, that is. Its obfuscated. ![alt text][1] I still don't understand this. Can somebody please explain? [1]: http://i37.tinypic.com/2lsd4dk.jpg
4
12,271
08/15/2008 14:04:01
214
08/03/2008 15:12:30
101
15
Creating Visual Studio templates under the "Windows" catagory.
I have created a template for Visual Studio 2008 and it currently shows up under File->New Project->Visual C#. However, it is only really specific to Visual C#/Windows but I can't work out how to get it to show up under the "Windows" category and not the more general "Visual C#".
visual-studio
templates
null
null
null
null
open
Creating Visual Studio templates under the "Windows" catagory. === I have created a template for Visual Studio 2008 and it currently shows up under File->New Project->Visual C#. However, it is only really specific to Visual C#/Windows but I can't work out how to get it to show up under the "Windows" category and not the more general "Visual C#".
0
12,290
08/15/2008 14:29:20
1,410
08/15/2008 14:29:20
1
0
N2 CMS
Hy, does anyone worked with N2 Content Management System(http://www.codeplex.com/n2). If yes, how does it perform, performance wise(under heavy load)? It seems pretty simple and easy to use. Adrian
asp.net
.net-3.5
content-management-system
null
null
null
open
N2 CMS === Hy, does anyone worked with N2 Content Management System(http://www.codeplex.com/n2). If yes, how does it perform, performance wise(under heavy load)? It seems pretty simple and easy to use. Adrian
0
12,294
08/15/2008 14:32:52
1,311
08/14/2008 13:43:09
35
13
Any good tools for creating timelines?
I need to create a historical timeline starting from 1600's to the present day. I also need to have some way of showing events on the timeline so that they do not appear cluttered when many events are close together. I have tried using Visio 2007 as well as Excel 2007 Radar Charts, but I could not get the results I wanted. the timeline templates in Visio are not great and using Radar charts in Excel leads to cluttered data. Are there any other tools or techniques I could use to create these?
timeline
charts
null
null
null
null
open
Any good tools for creating timelines? === I need to create a historical timeline starting from 1600's to the present day. I also need to have some way of showing events on the timeline so that they do not appear cluttered when many events are close together. I have tried using Visio 2007 as well as Excel 2007 Radar Charts, but I could not get the results I wanted. the timeline templates in Visio are not great and using Radar charts in Excel leads to cluttered data. Are there any other tools or techniques I could use to create these?
0
12,297
08/15/2008 14:38:18
83
08/01/2008 16:31:56
604
52
How can I remove nodes from a SiteMapNodeCollection?
I've got a Repeater that lists all the web.sitemap child pages on an ASP.NET page. Its DataSource is a SiteMapNodeCollection. But, I don't want my registration form page to show up there. Dim Children As SiteMapNodeCollection = SiteMap.CurrentNode.ChildNodes 'remove registration page from collection For Each n As SiteMapNode In SiteMap.CurrentNode.ChildNodes If n.Url = "/Registration.aspx" Then Children.Remove(n) End If Next RepeaterSubordinatePages.DataSource = Children The SiteMapNodeCollection.Remove() method throws a NotSupportedException: "Collection is read-only". How can I remove the node from the collection before DataBinding the Repeater?
asp.net
aspnet
sitemap
visualbasic
null
null
open
How can I remove nodes from a SiteMapNodeCollection? === I've got a Repeater that lists all the web.sitemap child pages on an ASP.NET page. Its DataSource is a SiteMapNodeCollection. But, I don't want my registration form page to show up there. Dim Children As SiteMapNodeCollection = SiteMap.CurrentNode.ChildNodes 'remove registration page from collection For Each n As SiteMapNode In SiteMap.CurrentNode.ChildNodes If n.Url = "/Registration.aspx" Then Children.Remove(n) End If Next RepeaterSubordinatePages.DataSource = Children The SiteMapNodeCollection.Remove() method throws a NotSupportedException: "Collection is read-only". How can I remove the node from the collection before DataBinding the Repeater?
0
12,304
08/15/2008 14:45:33
1,219
08/13/2008 13:44:47
186
24
Why do Sql Server 2005 maintenance plans use the wrong database for dbcc checkdb?
This is a problem I have seen other people besides myself having, and I haven't found a good explanation. Let's say you have a maintenance plan with a task to check the database, something like this: USE [MyDb] GO DBCC CHECKDB with no_infomsgs, all_errormsgs If you go look in your logs after the task executes, you might see something like this: 08/15/2008 06:00:22,spid55,Unknown,DBCC CHECKDB (mssqlsystemresource) executed by NT AUTHORITY\SYSTEM found 0 errors and repaired 0 errors. Elapsed time: 0 hours 0 minutes 0 seconds. 08/15/2008 06:00:21,spid55,Unknown,DBCC CHECKDB (master) executed by NT AUTHORITY\SYSTEM found 0 errors and repaired 0 errors. Elapsed time: 0 hours 0 minutes 0 seconds. Instead of checking MyDb, it checked master and msssqlsystemresource. Why? My workaround is to create a Sql Server Agent Job with this: dbcc checkdb ('MyDb') with no_infomsgs, all_errormsgs; That always works fine. 08/15/2008 04:26:04,spid54,Unknown,DBCC CHECKDB (MyDb) WITH all_errormsgs<c/> no_infomsgs executed by NT AUTHORITY\SYSTEM found 0 errors and repaired 0 errors. Elapsed time: 0 hours 26 minutes 3 seconds.
mssql
null
null
null
null
null
open
Why do Sql Server 2005 maintenance plans use the wrong database for dbcc checkdb? === This is a problem I have seen other people besides myself having, and I haven't found a good explanation. Let's say you have a maintenance plan with a task to check the database, something like this: USE [MyDb] GO DBCC CHECKDB with no_infomsgs, all_errormsgs If you go look in your logs after the task executes, you might see something like this: 08/15/2008 06:00:22,spid55,Unknown,DBCC CHECKDB (mssqlsystemresource) executed by NT AUTHORITY\SYSTEM found 0 errors and repaired 0 errors. Elapsed time: 0 hours 0 minutes 0 seconds. 08/15/2008 06:00:21,spid55,Unknown,DBCC CHECKDB (master) executed by NT AUTHORITY\SYSTEM found 0 errors and repaired 0 errors. Elapsed time: 0 hours 0 minutes 0 seconds. Instead of checking MyDb, it checked master and msssqlsystemresource. Why? My workaround is to create a Sql Server Agent Job with this: dbcc checkdb ('MyDb') with no_infomsgs, all_errormsgs; That always works fine. 08/15/2008 04:26:04,spid54,Unknown,DBCC CHECKDB (MyDb) WITH all_errormsgs<c/> no_infomsgs executed by NT AUTHORITY\SYSTEM found 0 errors and repaired 0 errors. Elapsed time: 0 hours 26 minutes 3 seconds.
0
12,306
08/15/2008 14:46:07
767
08/08/2008 17:04:18
11
2
Can I serialize a C# Type object?
I'm trying to serialize a Type object in the following way: Type myType = typeof (StringBuilder); var serializer = new XmlSerializer(typeof(Type)); TextWriter writer = new StringWriter(); serializer.Serialize(writer, myType); When I do this, the call to Serialize throws the following exception: "The type System.Text.StringBuilder was not expected. Use the XmlInclude or SoapInclude attribute to specify types that are not known statically." Is there a way for me to serialize the Type object? Note that I am not trying to serialize the StringBuilder itself, but the Type object containing the metadata about the StringBuilder class.
c#
serialization
null
null
null
null
open
Can I serialize a C# Type object? === I'm trying to serialize a Type object in the following way: Type myType = typeof (StringBuilder); var serializer = new XmlSerializer(typeof(Type)); TextWriter writer = new StringWriter(); serializer.Serialize(writer, myType); When I do this, the call to Serialize throws the following exception: "The type System.Text.StringBuilder was not expected. Use the XmlInclude or SoapInclude attribute to specify types that are not known statically." Is there a way for me to serialize the Type object? Note that I am not trying to serialize the StringBuilder itself, but the Type object containing the metadata about the StringBuilder class.
0
12,319
08/15/2008 14:59:11
268
08/04/2008 10:11:11
388
21
_wfopen equivalent under Mac OS X
I'm looking to the equivalent of Windows [`_wfopen()`](http://msdn.microsoft.com/fr-fr/library/yeby3zcb.aspx) under Mac OS X. Any idea?
osx
winapi
porting
fopen
null
null
open
_wfopen equivalent under Mac OS X === I'm looking to the equivalent of Windows [`_wfopen()`](http://msdn.microsoft.com/fr-fr/library/yeby3zcb.aspx) under Mac OS X. Any idea?
0
12,348
08/15/2008 15:17:30
1,418
08/15/2008 15:13:51
1
0
PHP / cURL on Windows install: "The specified module could not be found."
I'm running PHP 5.2.3 on Windows 2000 Server with IIS 5. I'm trying to get cURL working, so in my php.ini file, I have this line: extension_dir ="F:\PHP\ext" And later, I have: extension=php_curl.dll The file F:\PHP\ext\php_curl.dll exists, but when I try to run any PHP script, I get this in the error log: PHP Warning: PHP Startup: Unable to load dynamic library 'F:\PHP\ext \php_curl.dll' - The specified module could not be found. in Unknown on line 0
php
windows
curl
null
null
null
open
PHP / cURL on Windows install: "The specified module could not be found." === I'm running PHP 5.2.3 on Windows 2000 Server with IIS 5. I'm trying to get cURL working, so in my php.ini file, I have this line: extension_dir ="F:\PHP\ext" And later, I have: extension=php_curl.dll The file F:\PHP\ext\php_curl.dll exists, but when I try to run any PHP script, I get this in the error log: PHP Warning: PHP Startup: Unable to load dynamic library 'F:\PHP\ext \php_curl.dll' - The specified module could not be found. in Unknown on line 0
0
12,368
08/15/2008 15:26:41
1,271
08/14/2008 09:09:52
8
1
How to dispose a class in .net?
The .net garbage collector will eventually free up memory, but what if you want that memory back immediately? What code do you need to use in a class <b>myclass</b> to call myclass.dispose and free up all the used space by variables and objects in <b>myclass</b>?
.net
class
dispose
null
null
null
open
How to dispose a class in .net? === The .net garbage collector will eventually free up memory, but what if you want that memory back immediately? What code do you need to use in a class <b>myclass</b> to call myclass.dispose and free up all the used space by variables and objects in <b>myclass</b>?
0
12,374
08/15/2008 15:29:14
1,078
08/12/2008 10:39:00
136
8
Has anyone had any success in unit testing SQL stored procedures?
We’ve found that the unit tests we’ve written for our C#/C++ code have really paid off. But we still have thousands of lines of business logic in stored procedures, which only really get tested in anger when our product is rolled out to a large number of users. What makes this worse is that some of these stored procedures end up being very long, because of the performance hit when passing temporary tables between SPs. This has prevented us from refactoring to make the code simpler. We have made several attempts at building unit tests around some of our key stored procedures (primarily testing the performance), but have found that setting up the test data for these tests is really hard. For example, we end up copying around test databases. In addition to this, the tests end up being really sensitive to change, and even the smallest change to a stored proc. or table requires a large amount of changes to the tests. So after many builds breaking due to these database tests failing intermittently, we’ve just had to pull them out of the build process. So, the main part of my questions is: has anyone ever successfully written unit tests for their stored procedures? The second part of my questions is whether unit testing would be/is easier with linq? I was thinking that rather than having to set up tables of test data, you could simply create a collection of test objects, and test your linq code in a “linq to objects” situation? (I am a totally new to linq so don’t know if this would even work at all)
sql
linq-to-sql
unit-testing
null
null
null
open
Has anyone had any success in unit testing SQL stored procedures? === We’ve found that the unit tests we’ve written for our C#/C++ code have really paid off. But we still have thousands of lines of business logic in stored procedures, which only really get tested in anger when our product is rolled out to a large number of users. What makes this worse is that some of these stored procedures end up being very long, because of the performance hit when passing temporary tables between SPs. This has prevented us from refactoring to make the code simpler. We have made several attempts at building unit tests around some of our key stored procedures (primarily testing the performance), but have found that setting up the test data for these tests is really hard. For example, we end up copying around test databases. In addition to this, the tests end up being really sensitive to change, and even the smallest change to a stored proc. or table requires a large amount of changes to the tests. So after many builds breaking due to these database tests failing intermittently, we’ve just had to pull them out of the build process. So, the main part of my questions is: has anyone ever successfully written unit tests for their stored procedures? The second part of my questions is whether unit testing would be/is easier with linq? I was thinking that rather than having to set up tables of test data, you could simply create a collection of test objects, and test your linq code in a “linq to objects” situation? (I am a totally new to linq so don’t know if this would even work at all)
0
12,385
08/15/2008 15:34:20
93
08/01/2008 18:23:58
233
9
In silverlight, how to you attach a changeEvent handler to an inherited dependency property?
How would you attach a propertychanged callback to a property that is inherited? Like such: class A { DependencyProperty prop; } class B : A { //... prop.AddListener(PropertyChangeCallback); }
.net
silverlight
dependencyproperties
null
null
null
open
In silverlight, how to you attach a changeEvent handler to an inherited dependency property? === How would you attach a propertychanged callback to a property that is inherited? Like such: class A { DependencyProperty prop; } class B : A { //... prop.AddListener(PropertyChangeCallback); }
0
12,397
08/15/2008 15:41:53
475
08/06/2008 07:16:20
237
17
.NET VirtualPathProviders and Pre-Compilation
We've been working on an application that quite heavily relies on VirtualPathProviders in our ASP.NET application. We've just come to put the thing on a live server to demonstrate it and it appears that the VirtualPathProviders simply *don't work* when the site is pre-compiled!! I've been looking at the workaround which has been posted here: [http://sunali.com/2008/01/09/virtualpathprovider-in-precompiled-web-sites/][1], but so far I haven't been able to get that to work, either! (Well - it works fine in visual studio's web development server - just not on our IIS box - again!). Does anybody here have any more information on the problem? Is it fixed in .NET v3.5 (we're currently building for v2.0)? Your help would be very much appreciated! [1]: http://sunali.com/2008/01/09/virtualpathprovider-in-precompiled-web-sites/
asp.net
virtualpathprovider
null
null
null
null
open
.NET VirtualPathProviders and Pre-Compilation === We've been working on an application that quite heavily relies on VirtualPathProviders in our ASP.NET application. We've just come to put the thing on a live server to demonstrate it and it appears that the VirtualPathProviders simply *don't work* when the site is pre-compiled!! I've been looking at the workaround which has been posted here: [http://sunali.com/2008/01/09/virtualpathprovider-in-precompiled-web-sites/][1], but so far I haven't been able to get that to work, either! (Well - it works fine in visual studio's web development server - just not on our IIS box - again!). Does anybody here have any more information on the problem? Is it fixed in .NET v3.5 (we're currently building for v2.0)? Your help would be very much appreciated! [1]: http://sunali.com/2008/01/09/virtualpathprovider-in-precompiled-web-sites/
0
12,401
08/15/2008 15:45:21
1,432
08/15/2008 15:33:54
1
0
FOSS ASP.Net Session Replication Solution?
I've been searching (with little success) for a free/opensource session clustering and replication solution for asp.net. I've run across the usual suspects (indexus sharedcache, memcached), however, each has some limitations. - **Indexus** - Very immature, stubbed session interface implementation. Its otherwise a great caching solution, though. - **Memcached** - Little replication/failover support without going to a db backend. Several SF.Net projects - All aborted in the early stages... nothing that appears to have any traction, and one which seems to have gone all commercial. - **Microsoft Velocity** - Not OSS, but seems nice. Unfortunately, I didn't see where CTP1 supported failover, and there is no clear roadmap for this one. I fear that this one could fall off into the ether like many other MS dev projects. I am fairly used to the Java world where it is kind of taken for granted that many solutions to problems such as this will be available from the FOSS world. Are there any suitable alternatives available on the .Net world?
asp.net
clustering
failover
sessionreplication
null
null
open
FOSS ASP.Net Session Replication Solution? === I've been searching (with little success) for a free/opensource session clustering and replication solution for asp.net. I've run across the usual suspects (indexus sharedcache, memcached), however, each has some limitations. - **Indexus** - Very immature, stubbed session interface implementation. Its otherwise a great caching solution, though. - **Memcached** - Little replication/failover support without going to a db backend. Several SF.Net projects - All aborted in the early stages... nothing that appears to have any traction, and one which seems to have gone all commercial. - **Microsoft Velocity** - Not OSS, but seems nice. Unfortunately, I didn't see where CTP1 supported failover, and there is no clear roadmap for this one. I fear that this one could fall off into the ether like many other MS dev projects. I am fairly used to the Java world where it is kind of taken for granted that many solutions to problems such as this will be available from the FOSS world. Are there any suitable alternatives available on the .Net world?
0
12,406
08/15/2008 15:48:58
5
07/31/2008 14:22:31
646
38
Is it possible to slipstream the Visual Studio 2008 / .NET 3.5 SP1 install?
From what I've read, [VS 2008 SP1 and Team Foundation Server SP1 packages are traditional service packs that require you to first install the original versions before you will be able to install the SP][1]. Is there a way, supported or not, to slipstream the install? [1]: http://blogs.msdn.com/astebner/archive/2008/08/11/8849574.aspx
visualstudio
sp1
null
null
null
null
open
Is it possible to slipstream the Visual Studio 2008 / .NET 3.5 SP1 install? === From what I've read, [VS 2008 SP1 and Team Foundation Server SP1 packages are traditional service packs that require you to first install the original versions before you will be able to install the SP][1]. Is there a way, supported or not, to slipstream the install? [1]: http://blogs.msdn.com/astebner/archive/2008/08/11/8849574.aspx
0
12,428
08/15/2008 16:09:37
849
08/09/2008 14:55:36
22
2
Automate adding entries to a wiki
This is a follow up to my previous question about [renaming a bunch of files][1] Once I have my renamed files I need to add them to my project wiki page. This is a fairly repetitive manual task, so I guess I could script it but I don't know where to start. The process is: Got to appropriate page on the wiki for each team member (DeveloperA, DeveloperB, DeveloperC) { for each of two files ('*_current.jpg', '*_lastweek.jpg') { Select 'Attach' link on page Select the 'manage' link next to the file to be updated Click 'Browse' button Browse to the relevant file (which has the same name as the previous version) Click 'Upload file' button } } Not necessarily looking for the full solution as I'd like to give it a go myself. Where to begin...? What language could I use to do this and how difficult would it be? [1]: http://stackoverflow.com/questions/7137/replacing-one-string-in-a-bunch-of-file-names-with-another
productivity
scripting
null
null
null
null
open
Automate adding entries to a wiki === This is a follow up to my previous question about [renaming a bunch of files][1] Once I have my renamed files I need to add them to my project wiki page. This is a fairly repetitive manual task, so I guess I could script it but I don't know where to start. The process is: Got to appropriate page on the wiki for each team member (DeveloperA, DeveloperB, DeveloperC) { for each of two files ('*_current.jpg', '*_lastweek.jpg') { Select 'Attach' link on page Select the 'manage' link next to the file to be updated Click 'Browse' button Browse to the relevant file (which has the same name as the previous version) Click 'Upload file' button } } Not necessarily looking for the full solution as I'd like to give it a go myself. Where to begin...? What language could I use to do this and how difficult would it be? [1]: http://stackoverflow.com/questions/7137/replacing-one-string-in-a-bunch-of-file-names-with-another
0
12,476
08/15/2008 17:02:44
1,220
08/13/2008 13:44:48
607
42
Why is my asp.net application throwing ThreadAbortException?
self explanatory question. Why does this thing bubble into my try catch's even when nothing is wrong? Why is it showing up in my log, hundreds of times? **I know its a newb question, but if this site is gonna get search ranking and draw in newbs we have to ask them**
multithreading
asp.net
null
null
null
null
open
Why is my asp.net application throwing ThreadAbortException? === self explanatory question. Why does this thing bubble into my try catch's even when nothing is wrong? Why is it showing up in my log, hundreds of times? **I know its a newb question, but if this site is gonna get search ranking and draw in newbs we have to ask them**
0
12,482
08/15/2008 17:08:19
702
08/08/2008 01:31:17
3
2
How can you publish a ClickOnce application through CruiseControl.NET?
I have CruiseControl.NET Version 1.4 set up on my development server. Whenever a developer checks in code, in makes a compile. Now we're at a place where we can start giving our application to the testers. We'd like to use ClickOnce to distribute the application, with the idea being that when a tester goes to test the application, they have the latest build. I can't find a way to make that happen with CruiseControl.NET. We're using MSBUILD to perform the builds.
msbuild
cruisecontrol.net
clickonce
publish
null
null
open
How can you publish a ClickOnce application through CruiseControl.NET? === I have CruiseControl.NET Version 1.4 set up on my development server. Whenever a developer checks in code, in makes a compile. Now we're at a place where we can start giving our application to the testers. We'd like to use ClickOnce to distribute the application, with the idea being that when a tester goes to test the application, they have the latest build. I can't find a way to make that happen with CruiseControl.NET. We're using MSBUILD to perform the builds.
0
12,488
08/15/2008 17:14:52
31,505
2008-09-01
198
10
do you or your company hire testers?
are you hiring employees just for testing or is it done by your developers? if you hire them, what are your experiences? what is the ratio of them to your developers? what kind of testers do you hire? do you use college grads or do your testers are masters and as good as your developers? do they make a huge difference for you and in what way?
testers
test
hiring
null
null
null
open
do you or your company hire testers? === are you hiring employees just for testing or is it done by your developers? if you hire them, what are your experiences? what is the ratio of them to your developers? what kind of testers do you hire? do you use college grads or do your testers are masters and as good as your developers? do they make a huge difference for you and in what way?
0
12,489
08/15/2008 17:15:04
432
08/05/2008 17:18:46
646
37
How do you get a directory listing in C?
How do you scan a directory for folders and files in C? It needs to be cross-platform.
c
file
folders
common-tasks
null
null
open
How do you get a directory listing in C? === How do you scan a directory for folders and files in C? It needs to be cross-platform.
0
12,492
08/15/2008 17:17:14
1,448
08/15/2008 16:16:35
1
1
Pretty printing XML files on Emacs
I use emacs to edit my xml files (nxml-mode) and the files were generated by machine don't have any pretty formatting of the tags. I have searched for pretty printing the entire file with indentation and saving it, but wasn't able to find an automatic way. Is there a way? Or atleast some editor on linux which can do it.
xml
editor
emacs
null
null
null
open
Pretty printing XML files on Emacs === I use emacs to edit my xml files (nxml-mode) and the files were generated by machine don't have any pretty formatting of the tags. I have searched for pretty printing the entire file with indentation and saving it, but wasn't able to find an automatic way. Is there a way? Or atleast some editor on linux which can do it.
0
12,495
08/15/2008 17:20:46
479
08/06/2008 08:37:10
62
6
Who writes the documentation?
In your team, how is documentation written? Is there someone assigned to the task? Is there a technical documentation writer? Please elaborate for: - User documentation - System Administration docs - Development docs
documentation
null
null
null
null
08/31/2011 02:52:31
off topic
Who writes the documentation? === In your team, how is documentation written? Is there someone assigned to the task? Is there a technical documentation writer? Please elaborate for: - User documentation - System Administration docs - Development docs
2
12,501
08/15/2008 17:26:44
1,463
08/15/2008 17:26:44
1
0
Powershell's Invoke-Expression missing param
I thought that I had the latest CTP of Powershell 2 but when I try the command: invoke-expression –computername Server01 –command 'get-process powershell' I get an error message: A parameter cannot be found that matches parameter name 'computername'. So the question is: How can I tell which version of PowerShell I have installed? And what the latest version is?
powershell
null
null
null
null
null
open
Powershell's Invoke-Expression missing param === I thought that I had the latest CTP of Powershell 2 but when I try the command: invoke-expression –computername Server01 –command 'get-process powershell' I get an error message: A parameter cannot be found that matches parameter name 'computername'. So the question is: How can I tell which version of PowerShell I have installed? And what the latest version is?
0
12,509
08/15/2008 17:27:52
1,450
08/15/2008 16:26:21
1
0
Why Are People Still Creating RSS Feeds?
...instead of using the Atom syndication format? Atom is a [well-defined][1], general-purpose XML syndication format. RSS is fractured into four different versions. All the major feed readers have supported Atom for as long as I can remember, so why isn't its use more prevalent? Worst of all are sites that provide feeds in both formats - what's the point?! [1]: http://www.atomenabled.org/developers/syndication/
xml
rss
atom
null
null
null
open
Why Are People Still Creating RSS Feeds? === ...instead of using the Atom syndication format? Atom is a [well-defined][1], general-purpose XML syndication format. RSS is fractured into four different versions. All the major feed readers have supported Atom for as long as I can remember, so why isn't its use more prevalent? Worst of all are sites that provide feeds in both formats - what's the point?! [1]: http://www.atomenabled.org/developers/syndication/
0
12,516
08/15/2008 17:31:39
25
08/01/2008 12:15:23
556
43
"How do you go from an arithmetic expression (e.g. in a string) such as "2 + (2)" to an expression tree using polymorphism?" (Amazon Interview Question ala Steve Yegge)
This morning, I was reading [Steve Yegge's: When Polymorphism Fails][1], when I came across a question that a co-worker of his used to ask potential employees when they came for their interview at Amazon. > As an example of polymorphism in > action, let's look at the classic > "eval" interview question, which (as > far as I know) was brought to Amazon > by Ron Braunstein. The question is > quite a rich one, as it manages to > probe a wide variety of important > skills: OOP design, recursion, binary > trees, polymorphism and runtime > typing, general coding skills, and (if > you want to make it extra hard) > parsing theory. > > At some point, the candidate hopefully > realizes that you can represent an > arithmetic expression as a binary > tree, assuming you're only using > binary operators such as "+", "-", > "*", "/". The leaf nodes are all > numbers, and the internal nodes are > all operators. Evaluating the > expression means walking the tree. If > the candidate doesn't realize this, > you can gently lead them to it, or if > necessary, just tell them. > > Even if you tell them, it's still an > interesting problem. > > The first half of the question, which > some people (whose names I will > protect to my dying breath, but their > initials are Willie Lewis) feel is a > Job Requirement If You Want To Call > Yourself A Developer And Work At > Amazon, is actually kinda hard. The > question is: how do you go from an > arithmetic expression (e.g. in a > string) such as "2 + (2)" to an > expression tree. We may have an ADJ > challenge on this question at some > point. > > The second half is: let's say this is > a 2-person project, and your partner, > who we'll call "Willie", is > responsible for transforming the > string expression into a tree. You get > the easy part: you need to decide what > classes Willie is to construct the > tree with. You can do it in any > language, but make sure you pick one, > or Willie will hand you assembly > language. If he's feeling ornery, it > will be for a processor that is no > longer manufactured in production. > > You'd be amazed at how many candidates > boff this one. > > I won't give away the answer, but a > Standard Bad Solution involves the use > of a switch or case statment (or just > good old-fashioned cascaded-ifs). A > Slightly Better Solution involves > using a table of function pointers, > and the Probably Best Solution > involves using polymorphism. I > encourage you to work through it > sometime. Fun stuff! So, let's try to tackle the problem all three ways. How do you go from an arithmetic expression (e.g. in a string) such as "2 + (2)" to an expression tree using cascaded-if's, a table of function pointers, and/or polymorphism? Feel free to tackle one, two, or all three. [1]: whttp://steve.yegge.googlepages.com/when-polymorphism-fails
interview-questions
polymorphism
oop
binary-tree
recursion
null
open
"How do you go from an arithmetic expression (e.g. in a string) such as "2 + (2)" to an expression tree using polymorphism?" (Amazon Interview Question ala Steve Yegge) === This morning, I was reading [Steve Yegge's: When Polymorphism Fails][1], when I came across a question that a co-worker of his used to ask potential employees when they came for their interview at Amazon. > As an example of polymorphism in > action, let's look at the classic > "eval" interview question, which (as > far as I know) was brought to Amazon > by Ron Braunstein. The question is > quite a rich one, as it manages to > probe a wide variety of important > skills: OOP design, recursion, binary > trees, polymorphism and runtime > typing, general coding skills, and (if > you want to make it extra hard) > parsing theory. > > At some point, the candidate hopefully > realizes that you can represent an > arithmetic expression as a binary > tree, assuming you're only using > binary operators such as "+", "-", > "*", "/". The leaf nodes are all > numbers, and the internal nodes are > all operators. Evaluating the > expression means walking the tree. If > the candidate doesn't realize this, > you can gently lead them to it, or if > necessary, just tell them. > > Even if you tell them, it's still an > interesting problem. > > The first half of the question, which > some people (whose names I will > protect to my dying breath, but their > initials are Willie Lewis) feel is a > Job Requirement If You Want To Call > Yourself A Developer And Work At > Amazon, is actually kinda hard. The > question is: how do you go from an > arithmetic expression (e.g. in a > string) such as "2 + (2)" to an > expression tree. We may have an ADJ > challenge on this question at some > point. > > The second half is: let's say this is > a 2-person project, and your partner, > who we'll call "Willie", is > responsible for transforming the > string expression into a tree. You get > the easy part: you need to decide what > classes Willie is to construct the > tree with. You can do it in any > language, but make sure you pick one, > or Willie will hand you assembly > language. If he's feeling ornery, it > will be for a processor that is no > longer manufactured in production. > > You'd be amazed at how many candidates > boff this one. > > I won't give away the answer, but a > Standard Bad Solution involves the use > of a switch or case statment (or just > good old-fashioned cascaded-ifs). A > Slightly Better Solution involves > using a table of function pointers, > and the Probably Best Solution > involves using polymorphism. I > encourage you to work through it > sometime. Fun stuff! So, let's try to tackle the problem all three ways. How do you go from an arithmetic expression (e.g. in a string) such as "2 + (2)" to an expression tree using cascaded-if's, a table of function pointers, and/or polymorphism? Feel free to tackle one, two, or all three. [1]: whttp://steve.yegge.googlepages.com/when-polymorphism-fails
0
12,523
08/15/2008 17:37:06
1,455
08/15/2008 17:03:04
1
0
Tools for automating mouse and keyboard events sent to a windows application.
What tools are useful for automating clicking through a windows form application? Is this even useful? I see the testers at my company doing this a great deal and it seems like a waste of time.
testing
automation
null
null
null
null
open
Tools for automating mouse and keyboard events sent to a windows application. === What tools are useful for automating clicking through a windows form application? Is this even useful? I see the testers at my company doing this a great deal and it seems like a waste of time.
0
12,533
08/15/2008 17:47:28
1,219
08/13/2008 13:44:47
261
27
How do you convert the number you get from datepart to the name of the day?
Is there a quick one-liner to call datepart in Sql Server and get back the name of the day instead of just the number? select datepart(dw, getdate()); This will return 1-7, with Sunday being 1. I would like 'Sunday' instead of 1.
mssql
null
null
null
null
null
open
How do you convert the number you get from datepart to the name of the day? === Is there a quick one-liner to call datepart in Sql Server and get back the name of the day instead of just the number? select datepart(dw, getdate()); This will return 1-7, with Sunday being 1. I would like 'Sunday' instead of 1.
0
12,537
08/15/2008 17:49:20
479
08/06/2008 08:37:10
77
6
What tools are used to write documentation?
What tools are used to write documentation? Specifically for - User docs - System administration - Development I'm looking for software such MS Word, wiki, TeX (LaTeX, LyX) and for automated tools.
documentation
null
null
null
null
null
open
What tools are used to write documentation? === What tools are used to write documentation? Specifically for - User docs - System administration - Development I'm looking for software such MS Word, wiki, TeX (LaTeX, LyX) and for automated tools.
0
12,551
08/15/2008 17:56:24
863
08/09/2008 19:07:26
129
8
Any recommendations for in-depth Flex training?
I have several months experience creating Flex applications, but I'm interested in diving in a little deeper. My projects so far have involved web services and graphing work to create [RIAs][1]. In particular, I'm probably most interested in training related to: - BlazeDS & LiveCycle Data Services - Custom (visual) components / graphing I'm wondering if anyone has any **personal experience** with any sort of Flex training. I'm aware of several "boilerplate" classes that are offered by Adobe's partners, and I'm wondering how valuable any of those have turned out to be. I'm open to other possibilities, too. [1]: http://en.wikipedia.org/wiki/Rich_internet_application
flex
training
adobe
null
null
null
open
Any recommendations for in-depth Flex training? === I have several months experience creating Flex applications, but I'm interested in diving in a little deeper. My projects so far have involved web services and graphing work to create [RIAs][1]. In particular, I'm probably most interested in training related to: - BlazeDS & LiveCycle Data Services - Custom (visual) components / graphing I'm wondering if anyone has any **personal experience** with any sort of Flex training. I'm aware of several "boilerplate" classes that are offered by Adobe's partners, and I'm wondering how valuable any of those have turned out to be. I'm open to other possibilities, too. [1]: http://en.wikipedia.org/wiki/Rich_internet_application
0
12,555
08/15/2008 17:58:54
572
08/06/2008 20:56:54
493
46
Is there an API that allows you to find out how many sites link to yours?
I know google has things like linkto:yourdomain.com and Alexa is around, but there's nothing that I can query and get the number of sites that link to me. Anyone know of such a thing, other than using Google or another search engine and scraping the HTML results?
api
metrics
analytics
counter
hit
null
open
Is there an API that allows you to find out how many sites link to yours? === I know google has things like linkto:yourdomain.com and Alexa is around, but there's nothing that I can query and get the number of sites that link to me. Anyone know of such a thing, other than using Google or another search engine and scraping the HTML results?
0
12,556
08/15/2008 18:00:04
1,341
08/14/2008 15:30:17
95
7
What is your experience using the TIBCO General Interface?
It looks interesting and I've played around with it some --- but the development IDE in a web browser seems to be nightmare eventually. Does anyone have experience using it and what are your thoughts?
crossbrowser
tibco
null
null
null
null
open
What is your experience using the TIBCO General Interface? === It looks interesting and I've played around with it some --- but the development IDE in a web browser seems to be nightmare eventually. Does anyone have experience using it and what are your thoughts?
0
12,565
08/15/2008 18:09:52
1,470
08/15/2008 18:09:52
1
0
What do the different brackets in Ruby Mean?
In Ruby, whats the difference between {} and []? {} seems to be used for both code blocks and hashes. are [] only for arrays? The documention isn't very clear.
ruby
syntax
null
null
null
null
open
What do the different brackets in Ruby Mean? === In Ruby, whats the difference between {} and []? {} seems to be used for both code blocks and hashes. are [] only for arrays? The documention isn't very clear.
0
12,569
08/15/2008 18:14:28
12,081
08/08/2008 17:40:28
127
11
Rigor in capturing test cases for unit testing
Let's say we have a simple function defined in a pseudo language. List<Numbers> SortNumbers(List<Numbers> unsorted, bool ascending); We pass in an unsorted list of numbers and a boolean specifying ascending or descending sort order. In return, we get a sorted list of numbers. In my experience, some people are better at capturing boundary conditions than others. The question is, "How do you know when you are 'done' capturing test cases"? We can start listing cases now and some clever person will undoubtedly think of 'one more' case that isn't covered by any of the previous.
unittesting
testing
sorting
null
null
null
open
Rigor in capturing test cases for unit testing === Let's say we have a simple function defined in a pseudo language. List<Numbers> SortNumbers(List<Numbers> unsorted, bool ascending); We pass in an unsorted list of numbers and a boolean specifying ascending or descending sort order. In return, we get a sorted list of numbers. In my experience, some people are better at capturing boundary conditions than others. The question is, "How do you know when you are 'done' capturing test cases"? We can start listing cases now and some clever person will undoubtedly think of 'one more' case that isn't covered by any of the previous.
0
12,576
08/15/2008 18:25:25
115
08/02/2008 05:44:40
179
31
PHP performance
What can I do to increase the performance/speed of my PHP scripts without installing software on my servers?
php
performance
null
null
null
null
open
PHP performance === What can I do to increase the performance/speed of my PHP scripts without installing software on my servers?
0
12,578
08/15/2008 18:28:45
501
08/06/2008 12:11:33
126
10
No trace info during processing of a cube in SSAS
When I process a cube in Visual Studio 2005 I get following message: > Process succeeded. Trace information > is still being transferred. If you do > not want to wait for all of the > information to arrive press Stop. and no trace info is displayed. Cube is processed OK by it is a little bit annoying. ANy ideas? I access cubes via web server.
mssql
2005
olap
ssas
null
null
open
No trace info during processing of a cube in SSAS === When I process a cube in Visual Studio 2005 I get following message: > Process succeeded. Trace information > is still being transferred. If you do > not want to wait for all of the > information to arrive press Stop. and no trace info is displayed. Cube is processed OK by it is a little bit annoying. ANy ideas? I access cubes via web server.
0
12,591
08/15/2008 18:42:20
207
08/03/2008 13:51:13
170
7
Using an XML catalog with Python's lxml?
Is there a way, when I parse an XML document using lxml, to validate that document against its DTD using an external catalog file? I need to be able to work the fixed attributes defined in a document’s DTD.
python
xml
lxml
null
null
null
open
Using an XML catalog with Python's lxml? === Is there a way, when I parse an XML document using lxml, to validate that document against its DTD using an external catalog file? I need to be able to work the fixed attributes defined in a document’s DTD.
0
12,592
08/15/2008 18:43:17
742
08/08/2008 13:33:41
30
1
Can you check that an exception is thrown with doctest in Python?
Is it possible to write a doctest unit test that will check that an exception is raised? For example, if I have a function `foo(x)` that is supposed to raise an exception if `x<0`, how would I write the doctest for that?
python
doctest
null
null
null
null
open
Can you check that an exception is thrown with doctest in Python? === Is it possible to write a doctest unit test that will check that an exception is raised? For example, if I have a function `foo(x)` that is supposed to raise an exception if `x<0`, how would I write the doctest for that?
0
12,593
08/15/2008 18:45:07
1,254
08/13/2008 22:34:57
53
9
Does System.Xml use MSXML?
I'm developing a C# application that uses a handful of XML files and some classes in System.Xml. A coworker insists on adding the MSXML6 redistributable to our install, along with the .NET framework but I don't think the .NET framework uses or needs MSXML in anyway. I am well aware that using MSXML from .NET is not supported but I suppose its theoretically possible for System.Xml itself to wrap MSXML at a low level. I haven't found anything definitive that .NET has its own implementation but neither can I find anything to suggest it needs MSXML. Help me settle the debate. Does System.Xml use MSXML?
.net
xml
msxml
null
null
null
open
Does System.Xml use MSXML? === I'm developing a C# application that uses a handful of XML files and some classes in System.Xml. A coworker insists on adding the MSXML6 redistributable to our install, along with the .NET framework but I don't think the .NET framework uses or needs MSXML in anyway. I am well aware that using MSXML from .NET is not supported but I suppose its theoretically possible for System.Xml itself to wrap MSXML at a low level. I haven't found anything definitive that .NET has its own implementation but neither can I find anything to suggest it needs MSXML. Help me settle the debate. Does System.Xml use MSXML?
0
12,594
08/15/2008 18:45:36
179
08/03/2008 02:38:27
33
4
Windows/C++: How do I determine the share name associated with a shared drive?
Let's say I have a drive such as "C:\", and I want to find out if it's shared and what it's share name (e.g. "C$") is. To find out if it's shared, I can use [NetShareCheck][1]. How do I then map the drive to its share name? I thought that [NetShareGetInfo][2] would do it, but it looks like that takes the share name, not the local drive name, as an input. [1]: http://msdn.microsoft.com/en-us/library/bb525385(VS.85).aspx [2]: http://msdn.microsoft.com/en-us/library/bb525388(VS.85).aspx
c++
windows
networking
share
null
null
open
Windows/C++: How do I determine the share name associated with a shared drive? === Let's say I have a drive such as "C:\", and I want to find out if it's shared and what it's share name (e.g. "C$") is. To find out if it's shared, I can use [NetShareCheck][1]. How do I then map the drive to its share name? I thought that [NetShareGetInfo][2] would do it, but it looks like that takes the share name, not the local drive name, as an input. [1]: http://msdn.microsoft.com/en-us/library/bb525385(VS.85).aspx [2]: http://msdn.microsoft.com/en-us/library/bb525388(VS.85).aspx
0
12,603
08/15/2008 18:58:54
1,463
08/15/2008 17:26:44
1
2
Why was the Profile provider not built into Web Apps?
If you create an ASP.NET web file project you have direct access to the Profile information in the web.config file. If you convert that to a Web App and have been using ProfileCommon etc. then you have to jump through a whole bunch of hoops to get your web app to work. Why wasn't the Profile provider built into the ASP.NET web app projects like it was with the web file projects?
asp.net
null
null
null
null
null
open
Why was the Profile provider not built into Web Apps? === If you create an ASP.NET web file project you have direct access to the Profile information in the web.config file. If you convert that to a Web App and have been using ProfileCommon etc. then you have to jump through a whole bunch of hoops to get your web app to work. Why wasn't the Profile provider built into the ASP.NET web app projects like it was with the web file projects?
0
12,611
08/15/2008 19:10:15
1,368
08/14/2008 18:57:47
1
0
Designing a Calender system like Google Calender
I have to create something similiar to Google calender, so I created an events table that contains all the events for a user. The hard part is handling re-occurring events, the row in the events table has an event_type field that tells you what kind of event it is, since an event can be for a single date only, OR a re-occuring event every x days. When a user views the calender, using the month's view, how can I display all the events for the given month? The query is going to be tricky, so I thought it would be easier to create another table and create a row for each and every event, including the re-occuring events. What do you guys think?
design
algorithm
null
null
null
null
open
Designing a Calender system like Google Calender === I have to create something similiar to Google calender, so I created an events table that contains all the events for a user. The hard part is handling re-occurring events, the row in the events table has an event_type field that tells you what kind of event it is, since an event can be for a single date only, OR a re-occuring event every x days. When a user views the calender, using the month's view, how can I display all the events for the given month? The query is going to be tricky, so I thought it would be easier to create another table and create a row for each and every event, including the re-occuring events. What do you guys think?
0
12,612
08/15/2008 19:11:31
1,470
08/15/2008 18:09:52
16
1
Access Control Lists & Access Control Objects, good tutorial?
we're developing a web app to cover all aspects of a printing company from finances, to payroll, to job costing. Its important to be able to control who can access what parts of these applications. Don't want a line employee giving himself a raise, etc... I've heard of the concept of ACL & ACO, but haven't found a good example that we could adapt to our project. Anyone know where I can find good information to work from?
permissions
acl
null
null
null
null
open
Access Control Lists & Access Control Objects, good tutorial? === we're developing a web app to cover all aspects of a printing company from finances, to payroll, to job costing. Its important to be able to control who can access what parts of these applications. Don't want a line employee giving himself a raise, etc... I've heard of the concept of ACL & ACO, but haven't found a good example that we could adapt to our project. Anyone know where I can find good information to work from?
0
12,613
08/15/2008 19:12:24
680
08/07/2008 17:29:04
194
8
Specify a Port Number in Emacs sql-mysql
I've been using Emacs's sql interactive mode to talk to the MySQL db server and gotten to enjoy it. A developer has set up another db on a new non-default port number but I don't know how to access it using sql-mysql. How do I specify a port number when I'm trying to connect to a database?
emacs
mysql
sql
null
null
null
open
Specify a Port Number in Emacs sql-mysql === I've been using Emacs's sql interactive mode to talk to the MySQL db server and gotten to enjoy it. A developer has set up another db on a new non-default port number but I don't know how to access it using sql-mysql. How do I specify a port number when I'm trying to connect to a database?
0
12,633
08/15/2008 19:31:01
1,467
08/15/2008 17:35:39
1
2
What is the easiest way to parse an INI File in C++?
I'm trying to parse an INI file using C++. Any tips on what is the best way to achieve this? Should I use the Windows API tools for INI file processing (with which I am totally unfamiliar), an open-source solution or attempt to parse it manually?
c++
winapi
fileparse
ini
null
null
open
What is the easiest way to parse an INI File in C++? === I'm trying to parse an INI file using C++. Any tips on what is the best way to achieve this? Should I use the Windows API tools for INI file processing (with which I am totally unfamiliar), an open-source solution or attempt to parse it manually?
0
12,638
08/15/2008 19:35:13
428,190
08/09/2008 23:23:13
74
16
Building an auditing system; MS Access frontend on SQL Server backend.
So basically I'm building an app for my company and it NEEDS to be built using MS Access and it needs to be built on SQL Server. I've drawn up most of the plans but am having a hard time figuring out a way to handle the auditing system. Since it is being used internally only and you won't even be able to touch the db from outside the building we are not using a login system as the program will only be used once a user has already logged in to our internal network via Active Directory. Knowing this, we're using [a system to detect automatically the name of the Active Directory user][1] and with their permissions in one of the DB tables, deciding what they can or cannot do. So the actual audit table will have 3 columns (this design may change but for this question it doesn't matter); who (Active Directory User), when (time of addition/deletion/edit), what (what was changed) My question is how should I be handling this. Ideally I know I should be using a trigger so that it is impossible for the database to be updated without an audit being logged, however I don't know how I could grab the Active Directory User that way. An alternate would be to code it directly into the Access source so that whenever something changes I run an INSERT statement. Obviously that is flawed because if something happens to Access or the database is touched by something else then it will not log the audit. Any advice, examples or articles that may help me would be greatly appreciated! [1]: http://stackoverflow.com/questions/9052/is-there-a-way-for-ms-access-to-grab-the-current-active-directory-user
sql
sql-server
access
trigger
microsoft-access
null
open
Building an auditing system; MS Access frontend on SQL Server backend. === So basically I'm building an app for my company and it NEEDS to be built using MS Access and it needs to be built on SQL Server. I've drawn up most of the plans but am having a hard time figuring out a way to handle the auditing system. Since it is being used internally only and you won't even be able to touch the db from outside the building we are not using a login system as the program will only be used once a user has already logged in to our internal network via Active Directory. Knowing this, we're using [a system to detect automatically the name of the Active Directory user][1] and with their permissions in one of the DB tables, deciding what they can or cannot do. So the actual audit table will have 3 columns (this design may change but for this question it doesn't matter); who (Active Directory User), when (time of addition/deletion/edit), what (what was changed) My question is how should I be handling this. Ideally I know I should be using a trigger so that it is impossible for the database to be updated without an audit being logged, however I don't know how I could grab the Active Directory User that way. An alternate would be to code it directly into the Access source so that whenever something changes I run an INSERT statement. Obviously that is flawed because if something happens to Access or the database is touched by something else then it will not log the audit. Any advice, examples or articles that may help me would be greatly appreciated! [1]: http://stackoverflow.com/questions/9052/is-there-a-way-for-ms-access-to-grab-the-current-active-directory-user
0
12,642
08/15/2008 19:37:57
1,478
08/15/2008 19:37:57
1
0
Upload binary data with Silverlight 2b2
I am trying to upload a file or stream of data to our web server and I cant find a decent way of doing this. I have tried both WebClient and WebRequest both have their problems. **WebClient** Nice and easy but you do not get any notification that the asynchronous upload has completed, and the **UploadProgressChanged** event doesnt get called back with anything useful. The alternative is to convert your binary data to a string and use **UploadStringASync** because then at least you get a **UploadStringCompleted**, problem is you need a lot of ram for big files as its encoding all the data and uploading it in one go. **HttpWebRequest** Bit more complicated but still does what is needed, problem I am getting is that even though it is called on a background thread (supposedly), it still seems to be blocking my UI and the whole browser until the upload has completed which doesnt seem quite right. Normal .net does have some appropriate WebClient methods for [OnUploadDataCompleted][1] and progress but these arent available in Silverlight .net ... big omission I think! Does anyone have any solutions, I need to upload multiple binary files preferrably with a progress but I need to perform some actions when the files have completed their upload. Look forward to some help with this. [1]: http://msdn.microsoft.com/en-us/library/system.net.webclient.onuploaddatacompleted.aspx
silverlight
.net
silverlight2beta2
webclient
webrequest
null
open
Upload binary data with Silverlight 2b2 === I am trying to upload a file or stream of data to our web server and I cant find a decent way of doing this. I have tried both WebClient and WebRequest both have their problems. **WebClient** Nice and easy but you do not get any notification that the asynchronous upload has completed, and the **UploadProgressChanged** event doesnt get called back with anything useful. The alternative is to convert your binary data to a string and use **UploadStringASync** because then at least you get a **UploadStringCompleted**, problem is you need a lot of ram for big files as its encoding all the data and uploading it in one go. **HttpWebRequest** Bit more complicated but still does what is needed, problem I am getting is that even though it is called on a background thread (supposedly), it still seems to be blocking my UI and the whole browser until the upload has completed which doesnt seem quite right. Normal .net does have some appropriate WebClient methods for [OnUploadDataCompleted][1] and progress but these arent available in Silverlight .net ... big omission I think! Does anyone have any solutions, I need to upload multiple binary files preferrably with a progress but I need to perform some actions when the files have completed their upload. Look forward to some help with this. [1]: http://msdn.microsoft.com/en-us/library/system.net.webclient.onuploaddatacompleted.aspx
0
12,647
08/15/2008 19:43:15
872
08/09/2008 23:52:40
2,361
178
Testing a variable to determine if it's numeric in Perl
Is there a simple way in Perl that will allow me to determine if a given variable is numeric? Something along the lines of: if (is_number($x)) { ... } would be ideal. A technique that won't throw warnings when the `-w` switch is being used is certainly preferred.
perl
number
null
null
null
null
open
Testing a variable to determine if it's numeric in Perl === Is there a simple way in Perl that will allow me to determine if a given variable is numeric? Something along the lines of: if (is_number($x)) { ... } would be ideal. A technique that won't throw warnings when the `-w` switch is being used is certainly preferred.
0
12,656
08/15/2008 19:50:52
1,344
08/14/2008 16:03:00
248
18
PHP + MYSQLI: Variable parameter/result binding with prepared statements.
In a project that I'm about to wrap up, I've written and implemented an object-relational mapping solution for PHP. Before the doubters and dreamers cry out "how on earth?", relax--I haven't found a way to make late static binding work--I'm just working around it in the best way that I possibly can. Anyway, I'm not currently using prepared statements for querying, because I couldn't come up with a way to pass a variable number of arguments to the bind_params() or bind_result() methods. Why do I need to support a variable number of arguments, you ask? Because the superclass of my models (think of my solution as a hacked-up PHP ActiveRecord wannabe) is where the querying is defined, and so the find() method, for example, doesn't know how many parameters it would need to bind. Now, I've already thought of building an argument list and passing a string to eval(), but I don't like that solution very much--I'd rather just implement my own security checks and pass on statements. Does anyone have any suggestions (or success stories) about how to get this done? If you can help me solve this first problem, perhaps we can tackle binding the result set (something I suspect will be more difficult, or at least more resource-intensive if it involves an initial query to determine table structure).
php
mysql
mysqli
objectrelationalmapping
null
null
open
PHP + MYSQLI: Variable parameter/result binding with prepared statements. === In a project that I'm about to wrap up, I've written and implemented an object-relational mapping solution for PHP. Before the doubters and dreamers cry out "how on earth?", relax--I haven't found a way to make late static binding work--I'm just working around it in the best way that I possibly can. Anyway, I'm not currently using prepared statements for querying, because I couldn't come up with a way to pass a variable number of arguments to the bind_params() or bind_result() methods. Why do I need to support a variable number of arguments, you ask? Because the superclass of my models (think of my solution as a hacked-up PHP ActiveRecord wannabe) is where the querying is defined, and so the find() method, for example, doesn't know how many parameters it would need to bind. Now, I've already thought of building an argument list and passing a string to eval(), but I don't like that solution very much--I'd rather just implement my own security checks and pass on statements. Does anyone have any suggestions (or success stories) about how to get this done? If you can help me solve this first problem, perhaps we can tackle binding the result set (something I suspect will be more difficult, or at least more resource-intensive if it involves an initial query to determine table structure).
0
12,657
08/15/2008 19:51:05
1,249
08/13/2008 19:56:10
1
3
Can I create a ListView with dynamic GroupItemCount?
I'm using the new ASP.Net ListView control to list database items that will be grouped together in sections based on one of their columns like so: region1 store1 store2 store3 region2 store4 region3 store5 store6 Is this possible to do with the ListView's GroupItemTemplate? Every example I have seen uses a static number of items per group, which won't work for me. Am I misunderstanding the purpose of the GroupItem?
asp.net
.net-3.5
listview
null
null
null
open
Can I create a ListView with dynamic GroupItemCount? === I'm using the new ASP.Net ListView control to list database items that will be grouped together in sections based on one of their columns like so: region1 store1 store2 store3 region2 store4 region3 store5 store6 Is this possible to do with the ListView's GroupItemTemplate? Every example I have seen uses a static number of items per group, which won't work for me. Am I misunderstanding the purpose of the GroupItem?
0
12,661
08/15/2008 19:55:17
1,477
08/15/2008 19:28:36
1
0
Efficient JPEG Image Resizing in PHP
Whats the most efficient way to resize large images in PHP? I'm currently using the GD function imagecopyresampled to take hi-res images, and cleanly resize them down to a size for web viewing (roughly 700 pixels wide by 700 pixels tall). This works great on small (under 2MB photos) and the entire resize operation takes less than a second on the server. However, the site will eventually service photographers who may be uploading images up to 10MB in size (or images up to 5000x4000 pixels in size). Doing this kind of resize operation with large images tends to increase the memory usage by a very large margin (larger images can spike the memory usage for the script past 80mb). Is there any way to make this resize operation more efficient? Should I be using an alternate image library such as ImageMagik? Right now, the resize code looks something like this function makeThumbnail($sourcefile, $endfile, $thumbwidth, $thumbheight, $quality){ //takes the sourcefile (path/to/image.jpg) and makes a thumbnail from it // and places it at endfile (path/to/thumb.jpg) // load image and get image size $img = imagecreatefromjpeg($sourcefile); $width = imagesx( $img ); $height = imagesy( $img ); if ($width > $height) { $newwidth = $thumbwidth; $divisor = $width / $thumbwidth; $newheight = floor( $height / $divisor); } else{ $newheight = $thumbheight; $divisor = $height / $thumbheight; $newwidth = floor( $width / $divisor ); } // create a new temporary image $tmpimg = imagecreatetruecolor( $newwidth, $newheight ); // copy and resize old image into new image imagecopyresampled( $tmpimg, $img, 0, 0, 0, 0, $newwidth, $newheight, $width, $height ); // save thumbnail into a file imagejpeg( $tmpimg, $endfile, $quality); // release the memory imagedestroy($tmpimg); imagedestroy($img);
php
image
gd
jpeg
null
null
open
Efficient JPEG Image Resizing in PHP === Whats the most efficient way to resize large images in PHP? I'm currently using the GD function imagecopyresampled to take hi-res images, and cleanly resize them down to a size for web viewing (roughly 700 pixels wide by 700 pixels tall). This works great on small (under 2MB photos) and the entire resize operation takes less than a second on the server. However, the site will eventually service photographers who may be uploading images up to 10MB in size (or images up to 5000x4000 pixels in size). Doing this kind of resize operation with large images tends to increase the memory usage by a very large margin (larger images can spike the memory usage for the script past 80mb). Is there any way to make this resize operation more efficient? Should I be using an alternate image library such as ImageMagik? Right now, the resize code looks something like this function makeThumbnail($sourcefile, $endfile, $thumbwidth, $thumbheight, $quality){ //takes the sourcefile (path/to/image.jpg) and makes a thumbnail from it // and places it at endfile (path/to/thumb.jpg) // load image and get image size $img = imagecreatefromjpeg($sourcefile); $width = imagesx( $img ); $height = imagesy( $img ); if ($width > $height) { $newwidth = $thumbwidth; $divisor = $width / $thumbwidth; $newheight = floor( $height / $divisor); } else{ $newheight = $thumbheight; $divisor = $height / $thumbheight; $newwidth = floor( $width / $divisor ); } // create a new temporary image $tmpimg = imagecreatetruecolor( $newwidth, $newheight ); // copy and resize old image into new image imagecopyresampled( $tmpimg, $img, 0, 0, 0, 0, $newwidth, $newheight, $width, $height ); // save thumbnail into a file imagejpeg( $tmpimg, $endfile, $quality); // release the memory imagedestroy($tmpimg); imagedestroy($img);
0
12,669
08/15/2008 20:00:28
322
08/04/2008 16:38:52
304
16
Resources for getting started with web development?
Let's say I woke up today and wanted to create a clone of StackOverflow.com, and reap the financial windfall of millions $0.02 ad clicks. Where do I start? My understanding of web technologies are: - HTML is what is ultimately displayed - CSS is a mechanism for making HTML look pleasing - ASP.NET lets you add functionality using .NET(?) - JavaScript does stuff - AJAX does asyncronous stuff - ... and the list goes on! To write a good website to I just need to buy seven books and read them all? Are Web 2.0 sites really the synergy of all these technologies? Where does someone go to get started down the path to creating professional-looking web sites, and what steps are there along the way.
language-agnostic
intro
null
null
null
null
open
Resources for getting started with web development? === Let's say I woke up today and wanted to create a clone of StackOverflow.com, and reap the financial windfall of millions $0.02 ad clicks. Where do I start? My understanding of web technologies are: - HTML is what is ultimately displayed - CSS is a mechanism for making HTML look pleasing - ASP.NET lets you add functionality using .NET(?) - JavaScript does stuff - AJAX does asyncronous stuff - ... and the list goes on! To write a good website to I just need to buy seven books and read them all? Are Web 2.0 sites really the synergy of all these technologies? Where does someone go to get started down the path to creating professional-looking web sites, and what steps are there along the way.
0
12,671
08/15/2008 20:01:23
1,373
08/14/2008 21:13:46
41
3
How can I pass data from an aspx page to an ascx modal popup?
I'm fairly new to ASP.NET and trying to learn how things are done. I come from a C# background so the code-behind portion is easy, but thinking like a web developer is unfamiliar. I have an aspx page that contains a grid of checkboxes. I have a button that is coded via a Button_Click event to collect a list of which rows are checked and create a session variable out of that list. The same button is referenced (via TargetControlID) by my ascx page's ModalPopupExtender which controls the panel on the ascx page. When the button is clicked, the modal popup opens but the Button_Click event is never fired, so the modal doesn't get its session data. Since the two pages are separate, I can't call the ModalPopupExtender from the aspx.cs code, I can't reach the list of checkboxes from the ascx.cs code, and I don't see a way to populate my session variable and then programmatically activate some other hidden button or control which will then open my modal popup. Any thoughts?
c#
asp.net
ajax
null
null
null
open
How can I pass data from an aspx page to an ascx modal popup? === I'm fairly new to ASP.NET and trying to learn how things are done. I come from a C# background so the code-behind portion is easy, but thinking like a web developer is unfamiliar. I have an aspx page that contains a grid of checkboxes. I have a button that is coded via a Button_Click event to collect a list of which rows are checked and create a session variable out of that list. The same button is referenced (via TargetControlID) by my ascx page's ModalPopupExtender which controls the panel on the ascx page. When the button is clicked, the modal popup opens but the Button_Click event is never fired, so the modal doesn't get its session data. Since the two pages are separate, I can't call the ModalPopupExtender from the aspx.cs code, I can't reach the list of checkboxes from the ascx.cs code, and I don't see a way to populate my session variable and then programmatically activate some other hidden button or control which will then open my modal popup. Any thoughts?
0
12,692
08/15/2008 20:17:49
1,050
08/11/2008 21:06:09
11
3
IronPython and ASP.NET
Has anyone built a website with IronPython and ASP.NET. What were your experiences and is the combination ready for prime-time?
asp.net
ironpython
null
null
null
null
open
IronPython and ASP.NET === Has anyone built a website with IronPython and ASP.NET. What were your experiences and is the combination ready for prime-time?
0
12,702
08/15/2008 20:26:01
940
08/10/2008 19:58:38
75
4
.Net - Returning DataTables in WCF
I have a WCF service from which I want to return a DataTable. I know that this is often a highly debated topic, as far as whether or not returning DataTables is a good practice. Let's put that aside for a moment. When I create a DataTable from scratch, as below, there are no problems whatsoever. The table is created, populated, and returned to the client, and all is well: [DataContract] public DataTable GetTbl() { DataTable tbl = new DataTable("testTbl"); for(int i=0;i<100;i++) { tbl.Columns.Add(i); tbl.Rows.Add(new string[]{"testValue"}); } return tbl; } However, as soon as I go out and hit the database to create the table, as below, I get a CommunicationException "The underlying connection was closed: The connection was closed unexpectedly." [DataContract] public DataTable GetTbl() { DataTable tbl = new DataTable("testTbl"); //populate table with sql query return tbl; } The table is being populated correctly on the server side. It is significantly smaller than the test table that I looped through and returned, and the query is small and fast - there is no issue here with timeouts or large data transfer. The same exact functions and DataContracts/ServiceContracts/BehaviorContracts are being used. Why would the way that the table is being populated have any bearing on the table returning successfully??
.net
webservices
wcf
datatable
null
null
open
.Net - Returning DataTables in WCF === I have a WCF service from which I want to return a DataTable. I know that this is often a highly debated topic, as far as whether or not returning DataTables is a good practice. Let's put that aside for a moment. When I create a DataTable from scratch, as below, there are no problems whatsoever. The table is created, populated, and returned to the client, and all is well: [DataContract] public DataTable GetTbl() { DataTable tbl = new DataTable("testTbl"); for(int i=0;i<100;i++) { tbl.Columns.Add(i); tbl.Rows.Add(new string[]{"testValue"}); } return tbl; } However, as soon as I go out and hit the database to create the table, as below, I get a CommunicationException "The underlying connection was closed: The connection was closed unexpectedly." [DataContract] public DataTable GetTbl() { DataTable tbl = new DataTable("testTbl"); //populate table with sql query return tbl; } The table is being populated correctly on the server side. It is significantly smaller than the test table that I looped through and returned, and the query is small and fast - there is no issue here with timeouts or large data transfer. The same exact functions and DataContracts/ServiceContracts/BehaviorContracts are being used. Why would the way that the table is being populated have any bearing on the table returning successfully??
0
12,706
08/15/2008 20:30:37
109
08/02/2008 00:20:47
171
8
Best way to custom edit records in ASP.NET?
I'm coming from a Rails background and doing some work on a ASP.NET project (not ASP MVC). Newbie question: what's the easiest way to make a custom editor for a table of records? For example: I have a bunch of data rows and want to change the "category" field on each -- maybe a dropdown, maybe a link, maybe the user types it in. In Rails, I'd iterate over the rows to build a table, and would have a form for each row. The form would have an input box or dropdown, and submit the data to a controller like "/item/edit/15?category=foo" where 15 was the itemID and the new category was "foo". I'm new to the ASP.NET model and am not sure of the "right" way to do this -- just the simplest way to get back the new data & save it off. Would I make a custom control and append it to each row? Any help appreciated.
asp.net
null
null
null
null
null
open
Best way to custom edit records in ASP.NET? === I'm coming from a Rails background and doing some work on a ASP.NET project (not ASP MVC). Newbie question: what's the easiest way to make a custom editor for a table of records? For example: I have a bunch of data rows and want to change the "category" field on each -- maybe a dropdown, maybe a link, maybe the user types it in. In Rails, I'd iterate over the rows to build a table, and would have a form for each row. The form would have an input box or dropdown, and submit the data to a controller like "/item/edit/15?category=foo" where 15 was the itemID and the new category was "foo". I'm new to the ASP.NET model and am not sure of the "right" way to do this -- just the simplest way to get back the new data & save it off. Would I make a custom control and append it to each row? Any help appreciated.
0
12,709
08/15/2008 20:33:33
1,414
08/15/2008 15:07:31
21
6
Load an XmlNodeList into an XmlDocument without looping?
I originally asked this question on RefactorMyCode, but got no responses there... Basically I'm just try to load an XmlNodeList into an XmlDocument and I was wondering if there's a more efficient method than looping. Private Function GetPreviousMonthsXml(ByVal months As Integer, ByVal startDate As Date, ByVal xDoc As XmlDocument, ByVal path As String, ByVal nodeName As String) As XmlDocument '' build xpath string with list of months to return Dim xp As New StringBuilder("//") xp.Append(nodeName) xp.Append("[") For i As Integer = 0 To (months - 1) '' get year and month portion of date for datestring xp.Append("starts-with(@Id, '") xp.Append(startDate.AddMonths(-i).ToString("yyyy-MM")) If i < (months - 1) Then xp.Append("') or ") Else xp.Append("')]") End If Next '' *** This is the block that needs to be refactored *** '' import nodelist into an xmldocument Dim xnl As XmlNodeList = xDoc.SelectNodes(xp.ToString()) Dim returnXDoc As New XmlDocument(xDoc.NameTable) returnXDoc = xDoc.Clone() Dim nodeParents As XmlNodeList = returnXDoc.SelectNodes(path) For Each nodeParent As XmlNode In nodeParents For Each nodeToDelete As XmlNode In nodeParent.SelectNodes(nodeName) nodeParent.RemoveChild(nodeToDelete) Next Next For Each node As XmlNode In xnl Dim newNode As XmlNode = returnXDoc.ImportNode(node, True) returnXDoc.DocumentElement.SelectSingleNode("//" & node.ParentNode.Name & "[@Id='" & newNode.Attributes("Id").Value.Split("-")(0) & "']").AppendChild(newNode) Next '' *** end *** Return returnXDoc
vb
vb.net
xml
xmlnodelist
xmldocument
null
open
Load an XmlNodeList into an XmlDocument without looping? === I originally asked this question on RefactorMyCode, but got no responses there... Basically I'm just try to load an XmlNodeList into an XmlDocument and I was wondering if there's a more efficient method than looping. Private Function GetPreviousMonthsXml(ByVal months As Integer, ByVal startDate As Date, ByVal xDoc As XmlDocument, ByVal path As String, ByVal nodeName As String) As XmlDocument '' build xpath string with list of months to return Dim xp As New StringBuilder("//") xp.Append(nodeName) xp.Append("[") For i As Integer = 0 To (months - 1) '' get year and month portion of date for datestring xp.Append("starts-with(@Id, '") xp.Append(startDate.AddMonths(-i).ToString("yyyy-MM")) If i < (months - 1) Then xp.Append("') or ") Else xp.Append("')]") End If Next '' *** This is the block that needs to be refactored *** '' import nodelist into an xmldocument Dim xnl As XmlNodeList = xDoc.SelectNodes(xp.ToString()) Dim returnXDoc As New XmlDocument(xDoc.NameTable) returnXDoc = xDoc.Clone() Dim nodeParents As XmlNodeList = returnXDoc.SelectNodes(path) For Each nodeParent As XmlNode In nodeParents For Each nodeToDelete As XmlNode In nodeParent.SelectNodes(nodeName) nodeParent.RemoveChild(nodeToDelete) Next Next For Each node As XmlNode In xnl Dim newNode As XmlNode = returnXDoc.ImportNode(node, True) returnXDoc.DocumentElement.SelectSingleNode("//" & node.ParentNode.Name & "[@Id='" & newNode.Attributes("Id").Value.Split("-")(0) & "']").AppendChild(newNode) Next '' *** end *** Return returnXDoc
0
12,716
08/15/2008 20:40:11
814
08/09/2008 04:07:15
1
2
C++ Problems with #import of .NET out-of-proc server.
In C++ program, I am trying to #import TLB of .NET out of proc server. I get errors like: z:\server.tlh(111) : error C2146: syntax error : missing ';' before identifier 'GetType' z:\server.tlh(111) : error C2501: '_TypePtr' : missing storage-class or type specifiers z:\server.tli(74) : error C2143: syntax error : missing ';' before 'tag::id' z:\server.tli(74) : error C2433: '_TypePtr' : 'inline' not permitted on data declarations z:\server.tli(74) : error C2501: '_TypePtr' : missing storage-class or type specifiers z:\server.tli(74) : fatal error C1004: unexpected end of file found The TLH looks like: ... _bstr_t GetToString ( ); VARIANT_BOOL Equals ( const _variant_t & obj ); long GetHashCode ( ); _TypePtr GetType ( ); long Open ( ); ... I am not really interested in the having the base object .NET object methods like GetType(), Equals(), etc. But GetType() seems to be causing problems. Some google research indicates I could #import MSCORLIB.TLB (or put it in path), but I can't get that to compile either. Any tips?
c#
c++
com
interop
null
null
open
C++ Problems with #import of .NET out-of-proc server. === In C++ program, I am trying to #import TLB of .NET out of proc server. I get errors like: z:\server.tlh(111) : error C2146: syntax error : missing ';' before identifier 'GetType' z:\server.tlh(111) : error C2501: '_TypePtr' : missing storage-class or type specifiers z:\server.tli(74) : error C2143: syntax error : missing ';' before 'tag::id' z:\server.tli(74) : error C2433: '_TypePtr' : 'inline' not permitted on data declarations z:\server.tli(74) : error C2501: '_TypePtr' : missing storage-class or type specifiers z:\server.tli(74) : fatal error C1004: unexpected end of file found The TLH looks like: ... _bstr_t GetToString ( ); VARIANT_BOOL Equals ( const _variant_t & obj ); long GetHashCode ( ); _TypePtr GetType ( ); long Open ( ); ... I am not really interested in the having the base object .NET object methods like GetType(), Equals(), etc. But GetType() seems to be causing problems. Some google research indicates I could #import MSCORLIB.TLB (or put it in path), but I can't get that to compile either. Any tips?
0