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
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
14,760 | 08/18/2008 15:04:25 | 1,739 | 08/18/2008 11:38:21 | 1 | 0 | Is it possible to disable command input in the toolbar search box? | In the Visual Studio toolbar, you can enter commands into the search box by prefixing them with a > symbol. Is there any way to disable this? I've never used the feature, and it's slightly annoying when trying to actually search for something that you know is prefixed by greater-than in the code. It's particularly annoying when you accidentally search for "> exit" and the IDE quits (I knew there was a line in the code that was something like *if(counter > exitCount)* so entered that search without thinking).
At the very least, can you escape the > symbol so that you can search for it? Prefixing with ^ doesn't seem to work. | visual-studio | null | null | null | null | null | open | Is it possible to disable command input in the toolbar search box?
===
In the Visual Studio toolbar, you can enter commands into the search box by prefixing them with a > symbol. Is there any way to disable this? I've never used the feature, and it's slightly annoying when trying to actually search for something that you know is prefixed by greater-than in the code. It's particularly annoying when you accidentally search for "> exit" and the IDE quits (I knew there was a line in the code that was something like *if(counter > exitCount)* so entered that search without thinking).
At the very least, can you escape the > symbol so that you can search for it? Prefixing with ^ doesn't seem to work. | 0 |
14,762 | 08/18/2008 15:07:42 | 1,702 | 08/18/2008 05:39:28 | 1 | 1 | Please recommend a Java profiler | I am looking for the Java equivalent of gprof.
I did a little Java profiling using System.getCurrentMillis(),
and saw several GUI tools which seem too much.
A good compromise could be a text-based Java profiler, preferably
free or low-cost, which works in either Windows XP or Linux. | java | linux | free | profiler | windowsxp | 02/24/2012 14:46:54 | not constructive | Please recommend a Java profiler
===
I am looking for the Java equivalent of gprof.
I did a little Java profiling using System.getCurrentMillis(),
and saw several GUI tools which seem too much.
A good compromise could be a text-based Java profiler, preferably
free or low-cost, which works in either Windows XP or Linux. | 4 |
14,770 | 08/18/2008 15:10:12 | 1,752 | 08/18/2008 12:35:37 | 1 | 0 | How best to use File Version and Assembly Version | In .Net there are two version numbers available when building a project, File Version and Assembly Version. How are you using these numbers? Keeping the them the same? Auto-incrementing one, but manually changing the other?
Also what about the AssemblyInformationalVersion attribute?
I'd found this support KB article that provided some help. [How to use Assembly Version and Assembly File Version][1]
[1]: http://support.microsoft.com/kb/556041 | .net | attributes | version | null | null | null | open | How best to use File Version and Assembly Version
===
In .Net there are two version numbers available when building a project, File Version and Assembly Version. How are you using these numbers? Keeping the them the same? Auto-incrementing one, but manually changing the other?
Also what about the AssemblyInformationalVersion attribute?
I'd found this support KB article that provided some help. [How to use Assembly Version and Assembly File Version][1]
[1]: http://support.microsoft.com/kb/556041 | 0 |
14,775 | 08/18/2008 15:11:40 | 1,632 | 08/17/2008 17:09:25 | 39 | 6 | Interview question on C# and VB.net similiarties/differences. | I have been a VB.net developer for a few years know but I am currently apply to a few companies that use C#. I have even been told that at least one of the companies doesn't want VB.net developers.
I have been looking online trying to find a real difference between the two and have asked on crackoverflow. The only major differences are a few syntax difference which are trivial to me because I am also a Java developer. What would be a good response to an interviewer when they tell me they are looking for a C# developer or some other similar question? | c# | vb.net | interview-questions | null | null | null | open | Interview question on C# and VB.net similiarties/differences.
===
I have been a VB.net developer for a few years know but I am currently apply to a few companies that use C#. I have even been told that at least one of the companies doesn't want VB.net developers.
I have been looking online trying to find a real difference between the two and have asked on crackoverflow. The only major differences are a few syntax difference which are trivial to me because I am also a Java developer. What would be a good response to an interviewer when they tell me they are looking for a C# developer or some other similar question? | 0 |
14,791 | 08/18/2008 15:23:33 | 730 | 08/08/2008 12:40:04 | 51 | 13 | Is "include file" in shtml the best method to keep non-database changing data | We have a website that uses '#include file' command to roll info into some web pages. The authors can access the text files to update things like the occasional class or contact information for the department.
My question is this, I don't *see* anyone using this method and wonder if it is a good idea to keep using it. If not, what method should I transition to instead? | web-page | shtml | inclue-file | null | null | null | open | Is "include file" in shtml the best method to keep non-database changing data
===
We have a website that uses '#include file' command to roll info into some web pages. The authors can access the text files to update things like the occasional class or contact information for the department.
My question is this, I don't *see* anyone using this method and wonder if it is a good idea to keep using it. If not, what method should I transition to instead? | 0 |
14,801 | 08/18/2008 15:34:34 | 1,793 | 08/18/2008 15:34:34 | 1 | 0 | How can I override an EJB 3 session bean method with a generic argument - if possible at all? | Suppose you have the following EJB 3 interfaces/classes:
public interface Repository<E>
{
public void delete(E entity);
}
public abstract class AbstractRepository<E>
implements
Repository<E>
{
public void delete(E entity){
//...
}
}
public interface FooRepository<Foo>
{
//other methods
}
@Local(FooRepository.class)
@Stateless
public class FooRepositoryImpl
extends
AbstractRepository<Foo> implements FooRepository
{
@Override
public void delete(Foo entity){
//do something before deleting the entity
super.delete(entity);
}
//other methods
}
And then another bean that accesses the FooRepository bean:
//...
@EJB
private FooRepository fooRepository;
public void someMethod(Foo foo)
{
fooRepository.delete(foo);
}
//...
However, the overriding method is never executed when the delete method of the FooRepository bean is called. Instead, only the implementation of the delete method that is defined in AbstractRepository is executed. What am I doing wrong or is it simply a limitation of Java/EJB 3 that generics and inheritance don't play well together yet? | java | generics | inheritance | ejb-3.0 | java-ee | null | open | How can I override an EJB 3 session bean method with a generic argument - if possible at all?
===
Suppose you have the following EJB 3 interfaces/classes:
public interface Repository<E>
{
public void delete(E entity);
}
public abstract class AbstractRepository<E>
implements
Repository<E>
{
public void delete(E entity){
//...
}
}
public interface FooRepository<Foo>
{
//other methods
}
@Local(FooRepository.class)
@Stateless
public class FooRepositoryImpl
extends
AbstractRepository<Foo> implements FooRepository
{
@Override
public void delete(Foo entity){
//do something before deleting the entity
super.delete(entity);
}
//other methods
}
And then another bean that accesses the FooRepository bean:
//...
@EJB
private FooRepository fooRepository;
public void someMethod(Foo foo)
{
fooRepository.delete(foo);
}
//...
However, the overriding method is never executed when the delete method of the FooRepository bean is called. Instead, only the implementation of the delete method that is defined in AbstractRepository is executed. What am I doing wrong or is it simply a limitation of Java/EJB 3 that generics and inheritance don't play well together yet? | 0 |
14,810 | 08/18/2008 15:42:49 | 1,772 | 08/18/2008 14:05:29 | 1 | 3 | Taking the SCJP exam | What do you think about taking the Sun Certified Java Programmer ([SCJP][1]) exam? I think it's an essential requirement to learn the Java language properly. Without it silly programming mistakes are made as a direct result of poor understanding of the language's inner workings. Agree?
[1]: http://www.sun.com/training/certification/java/scjp.xml | java | development | null | null | null | 01/23/2012 10:11:49 | off topic | Taking the SCJP exam
===
What do you think about taking the Sun Certified Java Programmer ([SCJP][1]) exam? I think it's an essential requirement to learn the Java language properly. Without it silly programming mistakes are made as a direct result of poor understanding of the language's inner workings. Agree?
[1]: http://www.sun.com/training/certification/java/scjp.xml | 2 |
14,823 | 08/18/2008 15:53:49 | 1,247 | 08/13/2008 18:48:08 | 31 | 2 | Is Ruby On Rails ready for the Enterprise? | Is anyone out there using RoR for large scale, business critical enterprise applications?
Are there any other lightweight web-frameworks based on dynamic languages that people are using for these types of apps?
If you're not using these types of application frameworks what's stopping you? Is it simply the inertia associated with any large IT organization. Are the speed and stability issues of these frameworks enough of a problem that they offset the improvements in development cycle times? | ruby | ruby-on-rails | enterprise | null | null | null | open | Is Ruby On Rails ready for the Enterprise?
===
Is anyone out there using RoR for large scale, business critical enterprise applications?
Are there any other lightweight web-frameworks based on dynamic languages that people are using for these types of apps?
If you're not using these types of application frameworks what's stopping you? Is it simply the inertia associated with any large IT organization. Are the speed and stability issues of these frameworks enough of a problem that they offset the improvements in development cycle times? | 0 |
14,827 | 08/18/2008 15:55:33 | 572 | 08/06/2008 20:56:54 | 613 | 55 | What do you (or your company) use for wiping a machine? | I have two computers, and I'm thinking about getting rid of one of them, but I want to make sure that it's clean of anything of mine before doing so. What have you used or does your company use for this purpose? | security | safety | null | null | null | null | open | What do you (or your company) use for wiping a machine?
===
I have two computers, and I'm thinking about getting rid of one of them, but I want to make sure that it's clean of anything of mine before doing so. What have you used or does your company use for this purpose? | 0 |
14,828 | 08/18/2008 15:55:34 | 1,795 | 08/18/2008 15:35:22 | 1 | 0 | Issues with DB after publishing via Database Publishing Wizard from MSFT | I work on quite a few DotNetNuke sites, and occasionally (I haven't figured out the common factor yet), when I use the Database Publishing Wizard from Microsoft to create scripts for the site I've created on my Dev server, after running the scripts at the host (usually GoDaddy.com), and uploading the site files, I get an error... I'm 99.9% sure that it's not file related, so not sure where to begin in the DB. Unfortunately with DotNetNuke you don't get the YSOD, but a generic error, with no real way to find the actual exception that has occured.
I'm just curious if anyone has had similar deployment issues using the Database Publishing Wizard, and if so, how they overcame them? I own the RedGate toolset, but some hosts like GoDaddy don't allow you to direct connect to their servers...
| sql | deployment | dotnetnuke | null | null | null | open | Issues with DB after publishing via Database Publishing Wizard from MSFT
===
I work on quite a few DotNetNuke sites, and occasionally (I haven't figured out the common factor yet), when I use the Database Publishing Wizard from Microsoft to create scripts for the site I've created on my Dev server, after running the scripts at the host (usually GoDaddy.com), and uploading the site files, I get an error... I'm 99.9% sure that it's not file related, so not sure where to begin in the DB. Unfortunately with DotNetNuke you don't get the YSOD, but a generic error, with no real way to find the actual exception that has occured.
I'm just curious if anyone has had similar deployment issues using the Database Publishing Wizard, and if so, how they overcame them? I own the RedGate toolset, but some hosts like GoDaddy don't allow you to direct connect to their servers...
| 0 |
14,837 | 08/18/2008 16:05:43 | 242,853 | 08/15/2008 16:00:39 | 29 | 14 | How to get started with speech-to-text? | I'm really interested in speech-to-text algorithms, but I'm not sure where to start studying up on them. A bunch of searching around led me to [this](http://cslu.cse.ogi.edu/HLTsurvey/download.html), but it's from 1996 and I'm fairly certain that there have been improvements since then.
Does anyone who has any experience with this sort of stuff have any recommendations for reading / source code to examine? Or just general advice on what I should be trying to learn about if I want to get into the world of writing speech recognition programs (sometimes it's hard to know what to search for if you don't have much knowledge about the domain). | speech-recognition | language-agnostic | null | null | null | null | open | How to get started with speech-to-text?
===
I'm really interested in speech-to-text algorithms, but I'm not sure where to start studying up on them. A bunch of searching around led me to [this](http://cslu.cse.ogi.edu/HLTsurvey/download.html), but it's from 1996 and I'm fairly certain that there have been improvements since then.
Does anyone who has any experience with this sort of stuff have any recommendations for reading / source code to examine? Or just general advice on what I should be trying to learn about if I want to get into the world of writing speech recognition programs (sometimes it's hard to know what to search for if you don't have much knowledge about the domain). | 0 |
14,857 | 08/18/2008 16:18:31 | 1,414 | 08/15/2008 15:07:31 | 76 | 7 | Why does VS 2005 keep giving me the "'x' is ambiguous in the namespace 'y'" error? | I'm not sure what VS setting I've changed or if it's a web.config setting or what, but I keep getting this error in the error list and yet all solutions build fine. Here are some examples:
Error 5 'CompilerGlobalScopeAttribute' is ambiguous in the namespace 'System.Runtime.CompilerServices'. C:\projects\MyProject\Web\Controls\EmailStory.ascx 609 184 C:\...\Web\
Error 6 'ArrayList' is ambiguous in the namespace 'System.Collections'. C:\projects\MyProject\Web\Controls\EmailStory.ascx.vb 13 28 C:\...\Web\
Error 7 'Exception' is ambiguous in the namespace 'System'. C:\projects\MyProject\Web\Controls\EmailStory.ascx.vb 37 21 C:\...\Web\
Error 8 'EventArgs' is ambiguous in the namespace 'System'. C:\projects\MyProject\Web\Controls\EmailStory.ascx.vb 47 64 C:\...\Web\
Error 9 'EventArgs' is ambiguous in the namespace 'System'. C:\projects\MyProject\Web\Controls\EmailStory.ascx.vb 140 72 C:\...\Web\
Error 10 'Array' is ambiguous in the namespace 'System'. C:\projects\MyProject\Web\Controls\EmailStory.ascx.vb 147 35 C:\...\Web\
[...etc...]
Error 90 'DateTime' is ambiguous in the namespace 'System'. C:\projects\MyProject\Web\App_Code\XsltHelperFunctions.vb 13 8 C:\...\Web\
As you can imagine, it's really annoying since there are blue squiggly underlines everywhere in the code, and filtering out relevant errors in the Error List pane is near impossible. I've checked the default ASP.Net web.config and machine.config but nothing seemed to stand out there.
Any help or suggestions would be appreciated, thanks!
| vs2005 | error | .net | asp.net | namespace | null | open | Why does VS 2005 keep giving me the "'x' is ambiguous in the namespace 'y'" error?
===
I'm not sure what VS setting I've changed or if it's a web.config setting or what, but I keep getting this error in the error list and yet all solutions build fine. Here are some examples:
Error 5 'CompilerGlobalScopeAttribute' is ambiguous in the namespace 'System.Runtime.CompilerServices'. C:\projects\MyProject\Web\Controls\EmailStory.ascx 609 184 C:\...\Web\
Error 6 'ArrayList' is ambiguous in the namespace 'System.Collections'. C:\projects\MyProject\Web\Controls\EmailStory.ascx.vb 13 28 C:\...\Web\
Error 7 'Exception' is ambiguous in the namespace 'System'. C:\projects\MyProject\Web\Controls\EmailStory.ascx.vb 37 21 C:\...\Web\
Error 8 'EventArgs' is ambiguous in the namespace 'System'. C:\projects\MyProject\Web\Controls\EmailStory.ascx.vb 47 64 C:\...\Web\
Error 9 'EventArgs' is ambiguous in the namespace 'System'. C:\projects\MyProject\Web\Controls\EmailStory.ascx.vb 140 72 C:\...\Web\
Error 10 'Array' is ambiguous in the namespace 'System'. C:\projects\MyProject\Web\Controls\EmailStory.ascx.vb 147 35 C:\...\Web\
[...etc...]
Error 90 'DateTime' is ambiguous in the namespace 'System'. C:\projects\MyProject\Web\App_Code\XsltHelperFunctions.vb 13 8 C:\...\Web\
As you can imagine, it's really annoying since there are blue squiggly underlines everywhere in the code, and filtering out relevant errors in the Error List pane is near impossible. I've checked the default ASP.Net web.config and machine.config but nothing seemed to stand out there.
Any help or suggestions would be appreciated, thanks!
| 0 |
14,872 | 08/18/2008 16:33:46 | 1,659 | 08/17/2008 20:20:20 | 238 | 29 | [ADO.NET ERRROR]: CREATE DATABASE permission denied in database 'master'. An attempt to attach an auto-named database for file HelloWorld.mdf failed... | Anyone seen this before?
> CREATE DATABASE permission denied in database 'master'.
> An attempt to attach an auto-named database for file
> C:\\Documents and Settings\\..\\App_Data\\HelloWorld.mdf failed.
> A database with the same name exists, or specified file cannot be
> opened, or it is located on UNC share.
I'm asking on a friend's behalf. I've sent him these links:
* <http://blog.benhall.me.uk/2008/03/sql-server-and-vista-create-database.html>
* <http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=702726&SiteID=1>
| sql-server | ado.net | db | sql-server-express | null | null | open | [ADO.NET ERRROR]: CREATE DATABASE permission denied in database 'master'. An attempt to attach an auto-named database for file HelloWorld.mdf failed...
===
Anyone seen this before?
> CREATE DATABASE permission denied in database 'master'.
> An attempt to attach an auto-named database for file
> C:\\Documents and Settings\\..\\App_Data\\HelloWorld.mdf failed.
> A database with the same name exists, or specified file cannot be
> opened, or it is located on UNC share.
I'm asking on a friend's behalf. I've sent him these links:
* <http://blog.benhall.me.uk/2008/03/sql-server-and-vista-create-database.html>
* <http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=702726&SiteID=1>
| 0 |
14,873 | 08/18/2008 16:33:58 | 1,339 | 08/14/2008 15:11:18 | 18 | 2 | How do I display database query statistics on Wordpress site? | I've noticed that a few Wordpress blogs have query statistics present in their footer that simply state the number of queries and the total time required to process them for the particular page, reading something like:
> 23 queries. 0.448 seconds
I was wondering how this is accomplished. Is it through the use of a particular Wordpress plug-in or perhaps from using some particular php function in the page's code? | mysql | performance | wordpress | statistics | layout | null | open | How do I display database query statistics on Wordpress site?
===
I've noticed that a few Wordpress blogs have query statistics present in their footer that simply state the number of queries and the total time required to process them for the particular page, reading something like:
> 23 queries. 0.448 seconds
I was wondering how this is accomplished. Is it through the use of a particular Wordpress plug-in or perhaps from using some particular php function in the page's code? | 0 |
14,874 | 08/18/2008 16:34:01 | 1,043 | 08/11/2008 18:08:32 | 350 | 34 | Drawing a view hierachy into a specific content in Cocoa | For part of my application I have a need to create an image of a certain view and all of its subviews.
To do this I'm creating a context that wraps a bitmap with the same-size as the view, but I'm unsure how to draw the view hierarchy into it. I can draw a single view just be setting the context and explicitly calling drawRect, but this does not deal with all of the subviews.
I can't see anything in the NSView interface that could help with this so I suspect the solution may lie at a higher level.
Cheers | cocoa | osx | null | null | null | null | open | Drawing a view hierachy into a specific content in Cocoa
===
For part of my application I have a need to create an image of a certain view and all of its subviews.
To do this I'm creating a context that wraps a bitmap with the same-size as the view, but I'm unsure how to draw the view hierarchy into it. I can draw a single view just be setting the context and explicitly calling drawRect, but this does not deal with all of the subviews.
I can't see anything in the NSView interface that could help with this so I suspect the solution may lie at a higher level.
Cheers | 0 |
14,878 | 08/18/2008 16:36:30 | 702 | 08/08/2008 01:31:17 | 18 | 2 | ASP.NET AjaxToolKit vs other third party Ajax controls (Telerik, etc) | We have a new developer who swears by Telerik controls and would like us to purchase licenses for the entire development team (8 devs) as he feels they speed up the development process. As half of the team is pretty new to ASP.NET, they're still learning what comes out of the box with Visual Studio 2008 and might be overwhelmed with a whole new set of controls.
Has anyone else here used Telerik or other third party controls? Does the productivity gained by using third party controls outweigh the cost of the controls? | asp.net | controls | ajaxtoolkit | thirdparty | null | 11/27/2011 13:42:22 | not constructive | ASP.NET AjaxToolKit vs other third party Ajax controls (Telerik, etc)
===
We have a new developer who swears by Telerik controls and would like us to purchase licenses for the entire development team (8 devs) as he feels they speed up the development process. As half of the team is pretty new to ASP.NET, they're still learning what comes out of the box with Visual Studio 2008 and might be overwhelmed with a whole new set of controls.
Has anyone else here used Telerik or other third party controls? Does the productivity gained by using third party controls outweigh the cost of the controls? | 4 |
14,884 | 08/18/2008 16:39:23 | 58 | 08/01/2008 13:56:33 | 2,139 | 82 | Find the best combination from a given set of multiple sets | Say you have a shipment. It needs to go from point A to point B, point B to point C and finally point C to point D. You need it to get there in five days for the least amount of money possible. There are three possible shippers for each leg, each with their own different time and cost for each leg:
Array
(
[leg0] => Array
(
[UPS] => Array
(
[days] => 1
[cost] => 5000
)
[FedEx] => Array
(
[days] => 2
[cost] => 3000
)
[Conway] => Array
(
[days] => 5
[cost] => 1000
)
)
[leg1] => Array
(
[UPS] => Array
(
[days] => 1
[cost] => 3000
)
[FedEx] => Array
(
[days] => 2
[cost] => 3000
)
[Conway] => Array
(
[days] => 3
[cost] => 1000
)
)
[leg2] => Array
(
[UPS] => Array
(
[days] => 1
[cost] => 4000
)
[FedEx] => Array
(
[days] => 1
[cost] => 3000
)
[Conway] => Array
(
[days] => 2
[cost] => 5000
)
)
)
How would you go about finding the best combination programmatically?
My best attempt so far (third or fourth algorithm) is:
1. Find the longest shipper for each leg
2. Eliminate the most "expensive" one
3. Find the cheapest shipper for each leg
4. Calculate the total cost & days
5. If days are acceptable, finish, else, goto 1
Quickly mocked-up in PHP (note that the test array below works swimmingly, but if you try it with the test array from above, it does not find the correct combination):
$shippers["leg1"] = array(
"UPS" => array("days" => 1, "cost" => 4000),
"Conway" => array("days" => 3, "cost" => 3200),
"FedEx" => array("days" => 8, "cost" => 1000)
);
$shippers["leg2"] = array(
"UPS" => array("days" => 1, "cost" => 3500),
"Conway" => array("days" => 2, "cost" => 2800),
"FedEx" => array("days" => 4, "cost" => 900)
);
$shippers["leg3"] = array(
"UPS" => array("days" => 1, "cost" => 3500),
"Conway" => array("days" => 2, "cost" => 2800),
"FedEx" => array("days" => 4, "cost" => 900)
);
$times = 0;
$totalDays = 9999999;
print "<h1>Shippers to Choose From:</h1><pre>";
print_r($shippers);
print "</pre><br />";
while($totalDays > $maxDays && $times < 500){
$totalDays = 0;
$times++;
$worstShipper = null;
$longestShippers = null;
$cheapestShippers = null;
foreach($shippers as $legName => $leg){
//find longest shipment for each leg (in terms of days)
unset($longestShippers[$legName]);
$longestDays = null;
if(count($leg) > 1){
foreach($leg as $shipperName => $shipper){
if(empty($longestDays) || $shipper["days"] > $longestDays){
$longestShippers[$legName]["days"] = $shipper["days"];
$longestShippers[$legName]["cost"] = $shipper["cost"];
$longestShippers[$legName]["name"] = $shipperName;
$longestDays = $shipper["days"];
}
}
}
}
foreach($longestShippers as $leg => $shipper){
$shipper["totalCost"] = $shipper["days"] * $shipper["cost"];
//print $shipper["totalCost"] . " <?> " . $worstShipper["totalCost"] . ";";
if(empty($worstShipper) || $shipper["totalCost"] > $worstShipper["totalCost"]){
$worstShipper = $shipper;
$worstShipperLeg = $leg;
}
}
//print "worst shipper is: shippers[$worstShipperLeg][{$worstShipper['name']}]" . $shippers[$worstShipperLeg][$worstShipper["name"]]["days"];
unset($shippers[$worstShipperLeg][$worstShipper["name"]]);
print "<h1>Next:</h1><pre>";
print_r($shippers);
print "</pre><br />";
foreach($shippers as $legName => $leg){
//find cheapest shipment for each leg (in terms of cost)
unset($cheapestShippers[$legName]);
$lowestCost = null;
foreach($leg as $shipperName => $shipper){
if(empty($lowestCost) || $shipper["cost"] < $lowestCost){
$cheapestShippers[$legName]["days"] = $shipper["days"];
$cheapestShippers[$legName]["cost"] = $shipper["cost"];
$cheapestShippers[$legName]["name"] = $shipperName;
$lowestCost = $shipper["cost"];
}
}
//recalculate days and see if we are under max days...
$totalDays += $cheapestShippers[$legName]['days'];
}
//print "<h2>totalDays: $totalDays</h2>";
}
print "<h1>Chosen Shippers:</h1><pre>";
print_r($cheapestShippers);
print "</pre>";
I think I may have to actually do some sort of thing where I literally make each combination one by one (with a series of loops) and add up the total "score" of each, and find the best one.... | algorithm | puzzle | php | combinations | null | null | open | Find the best combination from a given set of multiple sets
===
Say you have a shipment. It needs to go from point A to point B, point B to point C and finally point C to point D. You need it to get there in five days for the least amount of money possible. There are three possible shippers for each leg, each with their own different time and cost for each leg:
Array
(
[leg0] => Array
(
[UPS] => Array
(
[days] => 1
[cost] => 5000
)
[FedEx] => Array
(
[days] => 2
[cost] => 3000
)
[Conway] => Array
(
[days] => 5
[cost] => 1000
)
)
[leg1] => Array
(
[UPS] => Array
(
[days] => 1
[cost] => 3000
)
[FedEx] => Array
(
[days] => 2
[cost] => 3000
)
[Conway] => Array
(
[days] => 3
[cost] => 1000
)
)
[leg2] => Array
(
[UPS] => Array
(
[days] => 1
[cost] => 4000
)
[FedEx] => Array
(
[days] => 1
[cost] => 3000
)
[Conway] => Array
(
[days] => 2
[cost] => 5000
)
)
)
How would you go about finding the best combination programmatically?
My best attempt so far (third or fourth algorithm) is:
1. Find the longest shipper for each leg
2. Eliminate the most "expensive" one
3. Find the cheapest shipper for each leg
4. Calculate the total cost & days
5. If days are acceptable, finish, else, goto 1
Quickly mocked-up in PHP (note that the test array below works swimmingly, but if you try it with the test array from above, it does not find the correct combination):
$shippers["leg1"] = array(
"UPS" => array("days" => 1, "cost" => 4000),
"Conway" => array("days" => 3, "cost" => 3200),
"FedEx" => array("days" => 8, "cost" => 1000)
);
$shippers["leg2"] = array(
"UPS" => array("days" => 1, "cost" => 3500),
"Conway" => array("days" => 2, "cost" => 2800),
"FedEx" => array("days" => 4, "cost" => 900)
);
$shippers["leg3"] = array(
"UPS" => array("days" => 1, "cost" => 3500),
"Conway" => array("days" => 2, "cost" => 2800),
"FedEx" => array("days" => 4, "cost" => 900)
);
$times = 0;
$totalDays = 9999999;
print "<h1>Shippers to Choose From:</h1><pre>";
print_r($shippers);
print "</pre><br />";
while($totalDays > $maxDays && $times < 500){
$totalDays = 0;
$times++;
$worstShipper = null;
$longestShippers = null;
$cheapestShippers = null;
foreach($shippers as $legName => $leg){
//find longest shipment for each leg (in terms of days)
unset($longestShippers[$legName]);
$longestDays = null;
if(count($leg) > 1){
foreach($leg as $shipperName => $shipper){
if(empty($longestDays) || $shipper["days"] > $longestDays){
$longestShippers[$legName]["days"] = $shipper["days"];
$longestShippers[$legName]["cost"] = $shipper["cost"];
$longestShippers[$legName]["name"] = $shipperName;
$longestDays = $shipper["days"];
}
}
}
}
foreach($longestShippers as $leg => $shipper){
$shipper["totalCost"] = $shipper["days"] * $shipper["cost"];
//print $shipper["totalCost"] . " <?> " . $worstShipper["totalCost"] . ";";
if(empty($worstShipper) || $shipper["totalCost"] > $worstShipper["totalCost"]){
$worstShipper = $shipper;
$worstShipperLeg = $leg;
}
}
//print "worst shipper is: shippers[$worstShipperLeg][{$worstShipper['name']}]" . $shippers[$worstShipperLeg][$worstShipper["name"]]["days"];
unset($shippers[$worstShipperLeg][$worstShipper["name"]]);
print "<h1>Next:</h1><pre>";
print_r($shippers);
print "</pre><br />";
foreach($shippers as $legName => $leg){
//find cheapest shipment for each leg (in terms of cost)
unset($cheapestShippers[$legName]);
$lowestCost = null;
foreach($leg as $shipperName => $shipper){
if(empty($lowestCost) || $shipper["cost"] < $lowestCost){
$cheapestShippers[$legName]["days"] = $shipper["days"];
$cheapestShippers[$legName]["cost"] = $shipper["cost"];
$cheapestShippers[$legName]["name"] = $shipperName;
$lowestCost = $shipper["cost"];
}
}
//recalculate days and see if we are under max days...
$totalDays += $cheapestShippers[$legName]['days'];
}
//print "<h2>totalDays: $totalDays</h2>";
}
print "<h1>Chosen Shippers:</h1><pre>";
print_r($cheapestShippers);
print "</pre>";
I think I may have to actually do some sort of thing where I literally make each combination one by one (with a series of loops) and add up the total "score" of each, and find the best one.... | 0 |
14,893 | 08/18/2008 16:48:50 | 1,734 | 08/18/2008 11:25:32 | 1 | 0 | Improving Your Build Process | Or, actually establishing a build process when there isn't much of one in place to begin with.
Currently, that's pretty much the situation my group faces. We do web-app development primarily (but no desktop development at this time). Software deployments are ugly and unwieldy even with our modest apps, and we've had far too many issues crop up in the two years I have been a part of this team (and company). It's past time to do something about that, and the upshot is that we'll be able to kill two Joel Test birds with one stone (daily builds and one-step builds, neither of which exists in any form whatsoever).
What I'm after here is some general insight on the kinds of things I need to be doing or thinking about, from people who have been in software development for longer than I have and also have bigger brains. I'm confident that will be most of the people currently posting in the beta.
Relevant Tools:
Visual Build
Source Safe 6.0 (I know, but I can't do anything about whether or not we use Source Safe at this time. That might be the next battle I fight.)
Tentatively, I've got a Visual Build project that does this:
1. Get source and place in local directory, including necessary DLLs needed for project.
2. Get config files and rename as needed (we're storing them in a special sub directory that isn't part of the actual application, and they are named according to use).
3. Build using Visual Studio
4. Precompile using command line, copying into what will be a "build" directory
5. Copy to destination.
6. Get any necessary additional resources - mostly things like documents, images, and reports that are associated with the project (and put into directory from step 5). There's a lot of this stuff, and I didn't want to include it previously. However, I'm going to only copy changed items, so maybe it's irrelevant. I wasn't sure whether I really wanted to include this stuff in earlier steps.
I still need to coax some logging out of Visual Build for all of this, but I'm not at a point where I need to do that yet.
Does anyone have any advice or suggestions to make? We're not currently using a Deployment Project, I'll note. It would remove some of the steps necessary in this build I presume (like web.config swapping).
| build-process | build-automation | build | null | null | null | open | Improving Your Build Process
===
Or, actually establishing a build process when there isn't much of one in place to begin with.
Currently, that's pretty much the situation my group faces. We do web-app development primarily (but no desktop development at this time). Software deployments are ugly and unwieldy even with our modest apps, and we've had far too many issues crop up in the two years I have been a part of this team (and company). It's past time to do something about that, and the upshot is that we'll be able to kill two Joel Test birds with one stone (daily builds and one-step builds, neither of which exists in any form whatsoever).
What I'm after here is some general insight on the kinds of things I need to be doing or thinking about, from people who have been in software development for longer than I have and also have bigger brains. I'm confident that will be most of the people currently posting in the beta.
Relevant Tools:
Visual Build
Source Safe 6.0 (I know, but I can't do anything about whether or not we use Source Safe at this time. That might be the next battle I fight.)
Tentatively, I've got a Visual Build project that does this:
1. Get source and place in local directory, including necessary DLLs needed for project.
2. Get config files and rename as needed (we're storing them in a special sub directory that isn't part of the actual application, and they are named according to use).
3. Build using Visual Studio
4. Precompile using command line, copying into what will be a "build" directory
5. Copy to destination.
6. Get any necessary additional resources - mostly things like documents, images, and reports that are associated with the project (and put into directory from step 5). There's a lot of this stuff, and I didn't want to include it previously. However, I'm going to only copy changed items, so maybe it's irrelevant. I wasn't sure whether I really wanted to include this stuff in earlier steps.
I still need to coax some logging out of Visual Build for all of this, but I'm not at a point where I need to do that yet.
Does anyone have any advice or suggestions to make? We're not currently using a Deployment Project, I'll note. It would remove some of the steps necessary in this build I presume (like web.config swapping).
| 0 |
14,909 | 08/18/2008 16:58:12 | 619 | 08/07/2008 11:18:24 | 146 | 15 | Tree-Based (vs. HTML-Based) Web Framework? | Anyone who writes client-side JavaScript is familiar with the DOM - the tree structure that your browser references in memory, generated from the HTML it got from the server. JavaScript can add, remove and modify nodes on the DOM tree to make changes to the page. I find it very nice to work with (browser bugs aside), and very different from the way my server-side code has to generate the page in the first place.
My question is: what server-side frameworks/languages build a page by treating it as a DOM tree from the beginning - inserting nodes instead of echoing strings? I think it would be very helpful if the client-side and server-side code both saw the page the same way. You could certainly hack something like this together in any web server language, but a framework dedicated to creating a page this way could make some very nice optimizations.
Open source, being widely deployed and having been around a while would all be pluses. | language | null | null | null | null | null | open | Tree-Based (vs. HTML-Based) Web Framework?
===
Anyone who writes client-side JavaScript is familiar with the DOM - the tree structure that your browser references in memory, generated from the HTML it got from the server. JavaScript can add, remove and modify nodes on the DOM tree to make changes to the page. I find it very nice to work with (browser bugs aside), and very different from the way my server-side code has to generate the page in the first place.
My question is: what server-side frameworks/languages build a page by treating it as a DOM tree from the beginning - inserting nodes instead of echoing strings? I think it would be very helpful if the client-side and server-side code both saw the page the same way. You could certainly hack something like this together in any web server language, but a framework dedicated to creating a page this way could make some very nice optimizations.
Open source, being widely deployed and having been around a while would all be pluses. | 0 |
14,911 | 08/18/2008 16:58:50 | 1,776 | 08/18/2008 14:21:43 | 86 | 9 | PDF generation from XHTML in a LAMP environment | Can anyone recommend a good server-side PDF generation tool that would work in a Linux environment. I want easy as possible, pass it a XHTML file (with images) and have it generate a PDF from the **rendered** source.
I don't have a massive budget, but anything under $1000 should be alright.
Andrew | linux | pdf | pdf-generation | null | null | null | open | PDF generation from XHTML in a LAMP environment
===
Can anyone recommend a good server-side PDF generation tool that would work in a Linux environment. I want easy as possible, pass it a XHTML file (with images) and have it generate a PDF from the **rendered** source.
I don't have a massive budget, but anything under $1000 should be alright.
Andrew | 0 |
14,923 | 08/18/2008 17:05:40 | 83 | 08/01/2008 16:31:56 | 667 | 61 | Can I generate ASP.NET MVC routes from a Sitemap? | I'm thinking of learning the ASP.NET MVC framework for an upcoming project. Can I use the advanced routing to create long URLs based on the sitemap hiearachy?
Example navigation path:<br/>
Home > Shop > Products > Household > Kitchen > Cookware > Cooksets > Nonstick
Typical (I think) MVC URL:<br/>
http://example.com/products/category/NonstickCooksets
Desired URL:<br/>
http://example.com/shop/products/household/kitchen/cookware/cooksets/nonstick
Can I do this? | asp.net-mvc | url | sitemap | null | null | null | open | Can I generate ASP.NET MVC routes from a Sitemap?
===
I'm thinking of learning the ASP.NET MVC framework for an upcoming project. Can I use the advanced routing to create long URLs based on the sitemap hiearachy?
Example navigation path:<br/>
Home > Shop > Products > Household > Kitchen > Cookware > Cooksets > Nonstick
Typical (I think) MVC URL:<br/>
http://example.com/products/category/NonstickCooksets
Desired URL:<br/>
http://example.com/shop/products/household/kitchen/cookware/cooksets/nonstick
Can I do this? | 0 |
14,934 | 08/18/2008 17:11:15 | 1,144 | 08/12/2008 19:00:54 | 85 | 9 | Parameter Binding: What happens under the hood? | .NET, Java and other high level database API's in various language often provide techniques known as prepared statements and parameter binding as opposed to sending plain text commands to the Database server. What I would like to know is what happens when you execute a statement like this:
SqlCommand cmd = new SqlCommand("GetMemberByID");
cmd.CommandType = CommandType.StoredProcedure;
SqlParameter param = new SqlParameter("@ID", memberID);
para.DbType = DbType.Integer;
cmd.Parameters.Add(param);
I know this is an best-practise, SQL injection attacks are minimized this way. But what exactly happens under to hood when you execute these statements? Is the end result still a SQL safe string? Or what is the end result? And is this enough to prevent SQL injection attacks? | sql | database | api | null | null | null | open | Parameter Binding: What happens under the hood?
===
.NET, Java and other high level database API's in various language often provide techniques known as prepared statements and parameter binding as opposed to sending plain text commands to the Database server. What I would like to know is what happens when you execute a statement like this:
SqlCommand cmd = new SqlCommand("GetMemberByID");
cmd.CommandType = CommandType.StoredProcedure;
SqlParameter param = new SqlParameter("@ID", memberID);
para.DbType = DbType.Integer;
cmd.Parameters.Add(param);
I know this is an best-practise, SQL injection attacks are minimized this way. But what exactly happens under to hood when you execute these statements? Is the end result still a SQL safe string? Or what is the end result? And is this enough to prevent SQL injection attacks? | 0 |
14,943 | 08/18/2008 17:16:52 | 1,375 | 08/14/2008 21:41:25 | 1 | 0 | How to Disable Alt + F4 closing form? | What is the best way to disable Alt + F4 in a c# win form to prevent the user from closing the form?
I am using a form as a popup dialog to display a progress bar and I do not want the user to be able to close it.
Thanks. | c# | winforms | null | null | null | null | open | How to Disable Alt + F4 closing form?
===
What is the best way to disable Alt + F4 in a c# win form to prevent the user from closing the form?
I am using a form as a popup dialog to display a progress bar and I do not want the user to be able to close it.
Thanks. | 0 |
14,963 | 08/18/2008 17:30:18 | 1,463 | 08/15/2008 17:26:44 | 83 | 9 | .NET 3.5 Service Pack 1 causes 404 pages on ASP.NET Web App | I have a problem with IIS 6.0 ceasing to work for an ASP.NET application after installing Service Pack 1 for .NET 3.5.
I have 2 identical virtual dedicated servers. Installing SP1 on the first had no adverse effect. Installing it on the second caused ASP.NET pages to start returning 404 page not found.
Static .html pages working okay on both servers.
Has anybody else experienced this? Any solutions?
| iis | .net-3.5 | servicepacks | null | null | null | open | .NET 3.5 Service Pack 1 causes 404 pages on ASP.NET Web App
===
I have a problem with IIS 6.0 ceasing to work for an ASP.NET application after installing Service Pack 1 for .NET 3.5.
I have 2 identical virtual dedicated servers. Installing SP1 on the first had no adverse effect. Installing it on the second caused ASP.NET pages to start returning 404 page not found.
Static .html pages working okay on both servers.
Has anybody else experienced this? Any solutions?
| 0 |
14,967 | 08/18/2008 17:35:38 | 1,816 | 08/18/2008 17:35:38 | 1 | 0 | c# Coding standard / Best practices | I'm a recent AI graduate (circa 2 years) working for a modest operation. It has fallen to me (primarily as Im the first 'adopter' in the department) to create a basic (read useful?) c# coding standards document.
I think I should explain that Im probably the most junior software engineer going, but I'm looking forward to this task as hopefully I might actually be able to produce something half usable. Ive done a pretty extensive search of the internet and read articles on what a coding standards document should / should not contain. This seems like a good as place as any to ask for some suggestions.
I realise that I am potentially opening a door to a whole world of disagreement about 'the best way to do things'. I both understand and respect the undeniable fact that each programmer has a prefered method of solving each individual task, as a result Im not looking to write anything so draconianly proscriptive as to stifle personal flair but to try and get a general methodology and agreed standards (e.g. naming conventions) to help make individuals code more readable.
So here goes .... any suggestions? any at all?
TK | c# | standards | null | null | null | null | open | c# Coding standard / Best practices
===
I'm a recent AI graduate (circa 2 years) working for a modest operation. It has fallen to me (primarily as Im the first 'adopter' in the department) to create a basic (read useful?) c# coding standards document.
I think I should explain that Im probably the most junior software engineer going, but I'm looking forward to this task as hopefully I might actually be able to produce something half usable. Ive done a pretty extensive search of the internet and read articles on what a coding standards document should / should not contain. This seems like a good as place as any to ask for some suggestions.
I realise that I am potentially opening a door to a whole world of disagreement about 'the best way to do things'. I both understand and respect the undeniable fact that each programmer has a prefered method of solving each individual task, as a result Im not looking to write anything so draconianly proscriptive as to stifle personal flair but to try and get a general methodology and agreed standards (e.g. naming conventions) to help make individuals code more readable.
So here goes .... any suggestions? any at all?
TK | 0 |
15,015 | 08/18/2008 18:12:09 | 877 | 08/10/2008 04:07:29 | 11 | 0 | Web Application Testing for .Net (WatiN Test Recorder) | I've been using WatiN as a testing tool for my current project. Besides the minor bugs with the Test Recorder, I've been able to use it and automate a lot of my tests in conjunction with NUnit. Anyone else out there with experience with different tools they might suggest? | watin | automated-tests | null | null | null | null | open | Web Application Testing for .Net (WatiN Test Recorder)
===
I've been using WatiN as a testing tool for my current project. Besides the minor bugs with the Test Recorder, I've been able to use it and automate a lot of my tests in conjunction with NUnit. Anyone else out there with experience with different tools they might suggest? | 0 |
15,024 | 08/18/2008 18:17:49 | 1,795 | 08/18/2008 15:35:22 | 1 | 2 | Tools to help a small shop score higher on the "Joel Test" | Questions #1 through #4 on the [Joel Test][1] in my opinion are all about the development tools being used and the support system in place for developers:
1. Do you use source control?
2. Can you make a build in one step?
3. Do you make daily builds?
4. Do you have a bug database?
I'm just curious what free/cheap (but good) tools exist for the small development shops that don't have large bank accounts to use to achieve a positive answer on these questions.
For source control I know Subversion is a great solution, and if you are a one man shop you could even use SourceGear's [Vault][2].
I use NAnt for my larger projects, but have yet to set up a script to build my installers as well as running the obfusication tools all as a single step. Any other suggestions?
If you can answer yes to the building in a single step, I think creating daily builds would be easy, but what tools would you recommend for automating those daily builds?
For a one or two man team, it's already been discussed on SO that you can use FogBugz On Demand, but what other bug tracking solutions exist for small teams?
[1]: http://www.joelonsoftware.com/articles/fog0000000043.html
[2]: http://www.sourcegear.com/vault/index.html | joeltest | dailybuilds | sourcecontrol | bugtracking | null | null | open | Tools to help a small shop score higher on the "Joel Test"
===
Questions #1 through #4 on the [Joel Test][1] in my opinion are all about the development tools being used and the support system in place for developers:
1. Do you use source control?
2. Can you make a build in one step?
3. Do you make daily builds?
4. Do you have a bug database?
I'm just curious what free/cheap (but good) tools exist for the small development shops that don't have large bank accounts to use to achieve a positive answer on these questions.
For source control I know Subversion is a great solution, and if you are a one man shop you could even use SourceGear's [Vault][2].
I use NAnt for my larger projects, but have yet to set up a script to build my installers as well as running the obfusication tools all as a single step. Any other suggestions?
If you can answer yes to the building in a single step, I think creating daily builds would be easy, but what tools would you recommend for automating those daily builds?
For a one or two man team, it's already been discussed on SO that you can use FogBugz On Demand, but what other bug tracking solutions exist for small teams?
[1]: http://www.joelonsoftware.com/articles/fog0000000043.html
[2]: http://www.sourcegear.com/vault/index.html | 0 |
15,034 | 08/18/2008 18:25:13 | 1,365 | 08/14/2008 18:28:56 | 1 | 2 | Visual Studio Error: The "GenerateResource" task failed unexpectedly. | When building a VS 2008 solution with 19 projects I sometimes get:
The "GenerateResource" task failed unexpectedly.
System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
at System.IO.MemoryStream.set_Capacity(Int32 value)
at System.IO.MemoryStream.EnsureCapacity(Int32 value)
at System.IO.MemoryStream.WriteByte(Byte value)
at System.IO.BinaryWriter.Write(Byte value)
at System.Resources.ResourceWriter.Write7BitEncodedInt(BinaryWriter store, Int32 value)
at System.Resources.ResourceWriter.Generate()
at System.Resources.ResourceWriter.Dispose(Boolean disposing)
at System.Resources.ResourceWriter.Close()
at Microsoft.Build.Tasks.ProcessResourceFiles.WriteResources(IResourceWriter writer)
at Microsoft.Build.Tasks.ProcessResourceFiles.WriteResources(String filename)
at Microsoft.Build.Tasks.ProcessResourceFiles.ProcessFile(String inFile, String outFile)
at Microsoft.Build.Tasks.ProcessResourceFiles.Run(TaskLoggingHelper log, ITaskItem[] assemblyFilesList, ArrayList inputs, ArrayList outputs, Boolean sourcePath, String language, String namespacename, String resourcesNamespace, String filename, String classname, Boolean publicClass)
at Microsoft.Build.Tasks.GenerateResource.Execute()
at Microsoft.Build.BuildEngine.TaskEngine.ExecuteInstantiatedTask(EngineProxy engineProxy, ItemBucket bucket, TaskExecutionMode howToExecuteTask, ITask task, Boolean& taskResult) C:\Windows\Microsoft.NET\Framework\v3.5
Usually happens after VS has been running for about 4 hours; the only way to get VS to compile properly is to close out VS, and start it again.
I'm on a machine with 3GB Ram. TaskManager shows the devenv.exe working set to be 578060K, and the entire memory allocation for the machine is 1.78GB. It should have more than enough ram to generate the resources.
Thanks in advance for any ideas. | visual-studio | outofmemoryexception | null | null | null | null | open | Visual Studio Error: The "GenerateResource" task failed unexpectedly.
===
When building a VS 2008 solution with 19 projects I sometimes get:
The "GenerateResource" task failed unexpectedly.
System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
at System.IO.MemoryStream.set_Capacity(Int32 value)
at System.IO.MemoryStream.EnsureCapacity(Int32 value)
at System.IO.MemoryStream.WriteByte(Byte value)
at System.IO.BinaryWriter.Write(Byte value)
at System.Resources.ResourceWriter.Write7BitEncodedInt(BinaryWriter store, Int32 value)
at System.Resources.ResourceWriter.Generate()
at System.Resources.ResourceWriter.Dispose(Boolean disposing)
at System.Resources.ResourceWriter.Close()
at Microsoft.Build.Tasks.ProcessResourceFiles.WriteResources(IResourceWriter writer)
at Microsoft.Build.Tasks.ProcessResourceFiles.WriteResources(String filename)
at Microsoft.Build.Tasks.ProcessResourceFiles.ProcessFile(String inFile, String outFile)
at Microsoft.Build.Tasks.ProcessResourceFiles.Run(TaskLoggingHelper log, ITaskItem[] assemblyFilesList, ArrayList inputs, ArrayList outputs, Boolean sourcePath, String language, String namespacename, String resourcesNamespace, String filename, String classname, Boolean publicClass)
at Microsoft.Build.Tasks.GenerateResource.Execute()
at Microsoft.Build.BuildEngine.TaskEngine.ExecuteInstantiatedTask(EngineProxy engineProxy, ItemBucket bucket, TaskExecutionMode howToExecuteTask, ITask task, Boolean& taskResult) C:\Windows\Microsoft.NET\Framework\v3.5
Usually happens after VS has been running for about 4 hours; the only way to get VS to compile properly is to close out VS, and start it again.
I'm on a machine with 3GB Ram. TaskManager shows the devenv.exe working set to be 578060K, and the entire memory allocation for the machine is 1.78GB. It should have more than enough ram to generate the resources.
Thanks in advance for any ideas. | 0 |
15,040 | 08/18/2008 18:26:53 | 1,771 | 08/18/2008 13:45:11 | 1 | 1 | How to set LAMP server using an ubuntu server appliance | This is based on [Federico Cargnelutti tutorial][1]. It was a great introduction to
VMware appliances, but one of the command was not working and it doesn't describe how to change the keyboard layout and the timezone.
[1]: http://phpimpact.wordpress.com/2008/05/24/virtual-appliances-lamp-development-made-easy/
| vmware | ubuntu | php | apache | mysql | null | open | How to set LAMP server using an ubuntu server appliance
===
This is based on [Federico Cargnelutti tutorial][1]. It was a great introduction to
VMware appliances, but one of the command was not working and it doesn't describe how to change the keyboard layout and the timezone.
[1]: http://phpimpact.wordpress.com/2008/05/24/virtual-appliances-lamp-development-made-easy/
| 0 |
15,047 | 08/18/2008 18:31:08 | 1,752 | 08/18/2008 12:35:37 | 6 | 3 | Looking for example of Command pattern for UI | I'm working on a WinForm .Net application with the basic UI that includes toolbar buttons, menu items and keystrokes that all initiate the same underlying code. Right now the event handlers for each of these call a common method to perform the function.
From what I've read this type of action could be handled by the [Command design pattern][1] with the additional benefit of automatically enabling/disabling or checking/unchecking the UI elements.
I've been searching the net for a good example project, but really haven't found one. Does anyone have a good example that can be shared?
[1]: http://www.dofactory.com/Patterns/PatternCommand.aspx | .net | design | patterns | command | null | null | open | Looking for example of Command pattern for UI
===
I'm working on a WinForm .Net application with the basic UI that includes toolbar buttons, menu items and keystrokes that all initiate the same underlying code. Right now the event handlers for each of these call a common method to perform the function.
From what I've read this type of action could be handled by the [Command design pattern][1] with the additional benefit of automatically enabling/disabling or checking/unchecking the UI elements.
I've been searching the net for a good example project, but really haven't found one. Does anyone have a good example that can be shared?
[1]: http://www.dofactory.com/Patterns/PatternCommand.aspx | 0 |
15,053 | 08/18/2008 18:35:22 | 1,533 | 08/16/2008 12:20:13 | 1 | 0 | How to get out parameters working in SharePoint workflows | I'm trying to create a custom workflow action with an output parameter for error handling. Working from various examples, I can't get Parameter Direction="Out" to work. Everything seems right, but when I try to assign the output to the "error" variable in SharePoint Designer, it places asterisks around it and flags it as a workflow error. Here is what the action XML looks like:
<Action Name="Create Folder"
ClassName="ActivityLibrary.CreateFolderActivityTest"
Assembly="ActivityLibrary, Version=1.0.0.0, Culture=neutral, PublicKeyToken=xxxxxxxxxxx"
AppliesTo="all"
CreatesInList="ListId"
Category="Custom">
<RuleDesigner Sentence="Create a folder %1 in the %2 base folder. If an error occurs it will be output to %3.">
<FieldBind Field="FolderName" Text="folder name" Id="1" />
<FieldBind Field="BaseFolderPath" Text="folder path" Id="2"/>
<FieldBind Field="OutError" DesignerType="ParameterNames" Text="out error" Id="3"/>
</RuleDesigner>
<Parameters>
<Parameter Name="FolderName" Type="System.String, mscorlib" Direction="In" />
<Parameter Name="BaseFolderPath" Type="System.String, mscorlib" Direction="In" />
<Parameter Name="OutError" Type="System.String, mscorlib" Direction="Out" />
</Parameters>
</Action>
| sharepoint | workflows | null | null | null | null | open | How to get out parameters working in SharePoint workflows
===
I'm trying to create a custom workflow action with an output parameter for error handling. Working from various examples, I can't get Parameter Direction="Out" to work. Everything seems right, but when I try to assign the output to the "error" variable in SharePoint Designer, it places asterisks around it and flags it as a workflow error. Here is what the action XML looks like:
<Action Name="Create Folder"
ClassName="ActivityLibrary.CreateFolderActivityTest"
Assembly="ActivityLibrary, Version=1.0.0.0, Culture=neutral, PublicKeyToken=xxxxxxxxxxx"
AppliesTo="all"
CreatesInList="ListId"
Category="Custom">
<RuleDesigner Sentence="Create a folder %1 in the %2 base folder. If an error occurs it will be output to %3.">
<FieldBind Field="FolderName" Text="folder name" Id="1" />
<FieldBind Field="BaseFolderPath" Text="folder path" Id="2"/>
<FieldBind Field="OutError" DesignerType="ParameterNames" Text="out error" Id="3"/>
</RuleDesigner>
<Parameters>
<Parameter Name="FolderName" Type="System.String, mscorlib" Direction="In" />
<Parameter Name="BaseFolderPath" Type="System.String, mscorlib" Direction="In" />
<Parameter Name="OutError" Type="System.String, mscorlib" Direction="Out" />
</Parameters>
</Action>
| 0 |
15,056 | 08/18/2008 18:36:58 | 1,185 | 08/13/2008 12:02:03 | 425 | 41 | Do you have any recommended macros for Microsoft Visual Studio? | What are some macros that you have found useful in Visual Studio for code manipulation and automation? | visual-studio | macros | null | null | null | 09/21/2011 06:37:16 | not constructive | Do you have any recommended macros for Microsoft Visual Studio?
===
What are some macros that you have found useful in Visual Studio for code manipulation and automation? | 4 |
15,057 | 08/18/2008 18:37:12 | 1,795 | 08/18/2008 15:35:22 | 16 | 3 | find orphaned methods in codebase | I'm sure we've all seen it before...A code base that has been around for a year or two, and as features have been added and bugs fixed, we end up with pieces of code that aren't actually in use anymore. I'm wondering if there is a way (especially in VS.NET with or without a third-party tool) to search the codebase and show me which methods are NEVER used anywhere else in the code?
The one challenge I can think of in regards to this type of utility would be the inability to map back when implicit type conversions are occuring. But assuming that wasn't a problem, what are my options? | codebase | codesearch | unusedcode | null | null | null | open | find orphaned methods in codebase
===
I'm sure we've all seen it before...A code base that has been around for a year or two, and as features have been added and bugs fixed, we end up with pieces of code that aren't actually in use anymore. I'm wondering if there is a way (especially in VS.NET with or without a third-party tool) to search the codebase and show me which methods are NEVER used anywhere else in the code?
The one challenge I can think of in regards to this type of utility would be the inability to map back when implicit type conversions are occuring. But assuming that wasn't a problem, what are my options? | 0 |
15,062 | 08/18/2008 18:40:34 | 636 | 08/07/2008 12:32:33 | 218 | 18 | PowerShell - how do I do a string replacement in a function? | How do I convert function input parameters to the right type? I want to return a string that has part of the URL passed into it removed.
**This works but uses a hard coded string:**
function CleanUrl($input)
{
$x = "http://google.com".Replace("http://", "")
return $x
}
$SiteName = CleanUrl($HostHeader)
echo $SiteName
**This fails:**
function CleanUrl($input)
{
$x = $input.Replace("http://", "")
return $x
}
Method invocation failed because [System.Array+SZArrayEnumerator] doesn't contain a method named 'Replace'.
At M:\PowerShell\test.ps1:13 char:21
+ $x = $input.Replace( <<<< "http://", "") | string | powershell | function | replacement | null | null | open | PowerShell - how do I do a string replacement in a function?
===
How do I convert function input parameters to the right type? I want to return a string that has part of the URL passed into it removed.
**This works but uses a hard coded string:**
function CleanUrl($input)
{
$x = "http://google.com".Replace("http://", "")
return $x
}
$SiteName = CleanUrl($HostHeader)
echo $SiteName
**This fails:**
function CleanUrl($input)
{
$x = $input.Replace("http://", "")
return $x
}
Method invocation failed because [System.Array+SZArrayEnumerator] doesn't contain a method named 'Replace'.
At M:\PowerShell\test.ps1:13 char:21
+ $x = $input.Replace( <<<< "http://", "") | 0 |
15,066 | 08/18/2008 18:41:19 | 271 | 08/04/2008 10:25:01 | 272 | 18 | Cycle Button Background Images in C# | I have a form in C# that has a button that, when clicked, I want the background image to cycle through a set of images (which I have as resources to the project). The images are named '_1', '_2', etc. and each time I click the button I want its background image to increment to the next one and go back to "_1" when it gets to the highest. Is there a way to do this?
I tried getting `button1.BackgroundImage.ToString()` but that yields `System.Drawing.Bitmap` instead of `Resources._1` like I was thinking it would (in which case I could just get the last character and switch on that to change the background to the appropriate new image).
Thanks for your help. | c# | .net | null | null | null | null | open | Cycle Button Background Images in C#
===
I have a form in C# that has a button that, when clicked, I want the background image to cycle through a set of images (which I have as resources to the project). The images are named '_1', '_2', etc. and each time I click the button I want its background image to increment to the next one and go back to "_1" when it gets to the highest. Is there a way to do this?
I tried getting `button1.BackgroundImage.ToString()` but that yields `System.Drawing.Bitmap` instead of `Resources._1` like I was thinking it would (in which case I could just get the last character and switch on that to change the background to the appropriate new image).
Thanks for your help. | 0 |
15,087 | 08/18/2008 19:00:52 | 1,749 | 08/18/2008 12:17:04 | 1 | 0 | Access 2000 connecting to SQL Server 2005 | The company I work for has an old Access 2000 application that was using a SQL Server 2000 back-end. We were tasked with moving the back-end to a SQL Server 2005 database on a new server. Unfortunately, the application was not functioning correctly while trying to do any inserts or updates. My research has found many forum posts that Access 2000 -> SQL 2005 is not supported by Microsoft, but I cannot find any Microsoft documentation to verify that.
Can anyone either link me to some official documentation, or has anyone used this setup and can confirm that this should be working and our problems lie somewhere else?
Not sure if it matters, but the app is an ADP compiled into an ADE.
Thank you for your help in advance. | sql-server | microsoftaccess | null | null | null | null | open | Access 2000 connecting to SQL Server 2005
===
The company I work for has an old Access 2000 application that was using a SQL Server 2000 back-end. We were tasked with moving the back-end to a SQL Server 2005 database on a new server. Unfortunately, the application was not functioning correctly while trying to do any inserts or updates. My research has found many forum posts that Access 2000 -> SQL 2005 is not supported by Microsoft, but I cannot find any Microsoft documentation to verify that.
Can anyone either link me to some official documentation, or has anyone used this setup and can confirm that this should be working and our problems lie somewhere else?
Not sure if it matters, but the app is an ADP compiled into an ADE.
Thank you for your help in advance. | 0 |
15,102 | 08/18/2008 19:17:00 | 805 | 08/09/2008 03:27:03 | 116 | 6 | Office VSTO Word 2003 project keeps trying to autoconvert to 2007 | I am working on a Office Word Addon for Word 2k3. When I reopen the project, the VS2008 auto covert dialog box opens and tries to convert it to Word 2K7.
How can I reopen this file and keep it at Word 2k3? | c# | visual-studio | microsoftoffice | vsto | word2003 | null | open | Office VSTO Word 2003 project keeps trying to autoconvert to 2007
===
I am working on a Office Word Addon for Word 2k3. When I reopen the project, the VS2008 auto covert dialog box opens and tries to convert it to Word 2K7.
How can I reopen this file and keep it at Word 2k3? | 0 |
15,109 | 08/18/2008 19:24:23 | 1,743 | 08/18/2008 12:04:06 | 36 | 1 | Visual Studio 2005 Setup project install crashes over Terminal Server | I have a setup project created by Visual Studio 2005, and consists of both a C# .NET 2.0 project and C++ MFC project, and the C++ run time. It works properly when run from the main console, but when run over a Terminal Server session on a Windows XP target, the install fails in the following way -
When the Setup.exe is invoked, it immediately crashes before the first welcome screen is displayed. When invoked over a physical console, the setup runs normally.
I figured I could go back to a lab machine to debug, but it runs fine on a lab machine over Terminal Server.
I see other descriptions of setup problems over Terminal Server sessions, but I don't see a definite solution. Both machines have a nearly identical configuration except that the one that is failing also has the GoToMyPC Host installed.
Has anyone else seen these problems, and how can I troubleshoot this?
Thanks,
| setup | project | gotomypc | install | null | null | open | Visual Studio 2005 Setup project install crashes over Terminal Server
===
I have a setup project created by Visual Studio 2005, and consists of both a C# .NET 2.0 project and C++ MFC project, and the C++ run time. It works properly when run from the main console, but when run over a Terminal Server session on a Windows XP target, the install fails in the following way -
When the Setup.exe is invoked, it immediately crashes before the first welcome screen is displayed. When invoked over a physical console, the setup runs normally.
I figured I could go back to a lab machine to debug, but it runs fine on a lab machine over Terminal Server.
I see other descriptions of setup problems over Terminal Server sessions, but I don't see a definite solution. Both machines have a nearly identical configuration except that the one that is failing also has the GoToMyPC Host installed.
Has anyone else seen these problems, and how can I troubleshoot this?
Thanks,
| 0 |
15,111 | 08/18/2008 19:26:36 | 1,185 | 08/13/2008 12:02:03 | 445 | 42 | Do you have any recommended code-snippets for Microsoft Visual Studio? | What are some macros that you have found useful in Visual Studio for code manipulation and automation? Since good code can be useful in all languages, this question is not language specific. | .net | visual-studio | language-agnostic | codesnippet | null | 09/21/2011 06:36:47 | not constructive | Do you have any recommended code-snippets for Microsoft Visual Studio?
===
What are some macros that you have found useful in Visual Studio for code manipulation and automation? Since good code can be useful in all languages, this question is not language specific. | 4 |
15,124 | 08/18/2008 19:41:39 | 361 | 08/05/2008 04:20:27 | 153 | 9 | .net Job Interview | I have a job interview tomorrow for a .net shop. For the past few years I have been developing in languages other than .net and figure it is probably a good idea to brush up on what is cool and new in the world of .net. I've been reading about LINQ and WPF but these are more technologies than trends. What else should I look at?
Been reading things like:
- <http://msdn.microsoft.com/en-us/library/bb332048.aspx>
- <http://msdn.microsoft.com/en-us/library/ms754130.aspx>
| interview-questions | .net | null | null | null | 11/30/2011 03:11:47 | not constructive | .net Job Interview
===
I have a job interview tomorrow for a .net shop. For the past few years I have been developing in languages other than .net and figure it is probably a good idea to brush up on what is cool and new in the world of .net. I've been reading about LINQ and WPF but these are more technologies than trends. What else should I look at?
Been reading things like:
- <http://msdn.microsoft.com/en-us/library/bb332048.aspx>
- <http://msdn.microsoft.com/en-us/library/ms754130.aspx>
| 4 |
15,133 | 08/18/2008 19:49:40 | 942 | 08/10/2008 21:10:34 | 146 | 14 | Tool in Visual Studio 2008 for helping with Localization | Does anyone have any recommendations of tools that can be of assistance with moving literal values into resource files for localization?
I've used a resharper plugin called RGreatX but was wondering if there is anything else out there.
It's one heck of a long manual process for moving the strings across and think there must be a better way! RGreatX is OK but could be a bit slicker I feel.
| visual-studio | visualstudioextensibility | localization | winforms | null | null | open | Tool in Visual Studio 2008 for helping with Localization
===
Does anyone have any recommendations of tools that can be of assistance with moving literal values into resource files for localization?
I've used a resharper plugin called RGreatX but was wondering if there is anything else out there.
It's one heck of a long manual process for moving the strings across and think there must be a better way! RGreatX is OK but could be a bit slicker I feel.
| 0 |
15,139 | 08/18/2008 19:52:16 | 1,323 | 08/14/2008 14:22:11 | 11 | 1 | Building Standalone Applications in JavaScript | With the increased power of JavaScript frameworks like YUI, JQuery, and Prototype, and debugging tools like Firebug, doing an application entirely in browser-side JavaScript looks like a great way to make simple applications like puzzle games and specialized calculators.
Is there any downside to this other than exposing your source code? How should you handle data storage for this kind of program? | javascript | browsers | deployment | null | null | null | open | Building Standalone Applications in JavaScript
===
With the increased power of JavaScript frameworks like YUI, JQuery, and Prototype, and debugging tools like Firebug, doing an application entirely in browser-side JavaScript looks like a great way to make simple applications like puzzle games and specialized calculators.
Is there any downside to this other than exposing your source code? How should you handle data storage for this kind of program? | 0 |
15,142 | 08/18/2008 19:54:39 | 1,463 | 08/15/2008 17:26:44 | 83 | 9 | What are the pros and cons to keeping SQL in Stored Procs versus Code | What are the advantages/disadvantages of keeping SQL in your C# source code or in Stored Procs? I've been discussing this with a friend on an open source project that we're working on (C# ASP.NET Forum). At the moment, most of the database access is done by building the SQL inline in C# and calling to the SQL Server DB. So I'm trying to establish which, for this particular project, would be best.
So far I have:
Advantages for in Code:
- Easier to maintain - don't need to run a SQL script to update queries
- Easier to port to another DB - no procs to port
Advantages for Stored Procs:
- Performance
- Security
| c# | sql-server | sql | storedprocedures | null | null | open | What are the pros and cons to keeping SQL in Stored Procs versus Code
===
What are the advantages/disadvantages of keeping SQL in your C# source code or in Stored Procs? I've been discussing this with a friend on an open source project that we're working on (C# ASP.NET Forum). At the moment, most of the database access is done by building the SQL inline in C# and calling to the SQL Server DB. So I'm trying to establish which, for this particular project, would be best.
So far I have:
Advantages for in Code:
- Easier to maintain - don't need to run a SQL script to update queries
- Easier to port to another DB - no procs to port
Advantages for Stored Procs:
- Performance
- Security
| 0 |
15,163 | 08/18/2008 20:11:22 | 863 | 08/09/2008 19:07:26 | 141 | 9 | Prevent a TreeView from firing events in VB6? | In some VB6 code, I have a handler for a TreeView's Collapse event:
Private Sub MyTree_Collapse(ByVal Node as MSComCtlLib.Node)
This is called whenever a node in the tree is collapsed, whether by the user or programmatically. As it turns out, through some roundabout execution, it may happen that this handler will wind up telling a node to collapse, leading to infinite recursion.
I can think of multiple ways to skin this cat, but what seems simplest to me is to tell the TreeView not to raise events for some period of time. I can't find a simple call to let me do this, though. Has anyone successfully done this, or do I need to keep track of state in some other manner so I can respond appropriately when recursive events come along? | events | vb6 | treeview | null | null | null | open | Prevent a TreeView from firing events in VB6?
===
In some VB6 code, I have a handler for a TreeView's Collapse event:
Private Sub MyTree_Collapse(ByVal Node as MSComCtlLib.Node)
This is called whenever a node in the tree is collapsed, whether by the user or programmatically. As it turns out, through some roundabout execution, it may happen that this handler will wind up telling a node to collapse, leading to infinite recursion.
I can think of multiple ways to skin this cat, but what seems simplest to me is to tell the TreeView not to raise events for some period of time. I can't find a simple call to let me do this, though. Has anyone successfully done this, or do I need to keep track of state in some other manner so I can respond appropriately when recursive events come along? | 0 |
15,171 | 08/18/2008 20:15:13 | 479 | 08/06/2008 08:37:10 | 105 | 8 | User script location linux (debian etch) | In the linux file system, where should user scripts be placed?
I'm thinking specifically python scripts to be called by cron.
| linux | debian | null | null | null | null | open | User script location linux (debian etch)
===
In the linux file system, where should user scripts be placed?
I'm thinking specifically python scripts to be called by cron.
| 0 |
15,176 | 08/18/2008 20:18:22 | 1,836 | 08/18/2008 19:45:57 | 1 | 0 | How to gauge the quality of a software product | I have a product, X, which we deliver to a client, C every month, including bugfixes, enhancements, new development etc.) Each month, I am asked to err "guarantee" the quality of the product.
For this we use a number of statistics garnered from the tests that we do, such as:
reopen rate (number of bugs reopened/number of corrected bugs tested);
new bug rate (number of new, including regressions, bugs found during testing/number of corrected bugs tested);
for each new enhancement, the new bug rate (the number of bugs found for this enhancement/number of mandays)
and various other figures.
It is impossible, for reasons we shan't go into) to test everything every time.
So, my question is:
How do I estimate the number and type of bugs that remain in my software?
What testing strategies do I have to follow to make sure that the product is good?
I know this is a bit of an open question, but hey, I also know that there are no simple solutions.
Thanks. | testing | quality | null | null | null | null | open | How to gauge the quality of a software product
===
I have a product, X, which we deliver to a client, C every month, including bugfixes, enhancements, new development etc.) Each month, I am asked to err "guarantee" the quality of the product.
For this we use a number of statistics garnered from the tests that we do, such as:
reopen rate (number of bugs reopened/number of corrected bugs tested);
new bug rate (number of new, including regressions, bugs found during testing/number of corrected bugs tested);
for each new enhancement, the new bug rate (the number of bugs found for this enhancement/number of mandays)
and various other figures.
It is impossible, for reasons we shan't go into) to test everything every time.
So, my question is:
How do I estimate the number and type of bugs that remain in my software?
What testing strategies do I have to follow to make sure that the product is good?
I know this is a bit of an open question, but hey, I also know that there are no simple solutions.
Thanks. | 0 |
15,187 | 08/18/2008 20:31:15 | 1,412 | 08/15/2008 15:05:57 | 49 | 6 | Writing Emacs extensions in languages other than Lisp | I'd like to take an existing application (written in OCaml) and create an Emacs "interface" for it (like, for example, the Emacs GDB mode). I would prefer to do this without writing a ton of Lisp code. In MVC terms, I'd like for the View to be Emacs, but for the Model and Controller to remain (primarily) OCaml.
Does anybody know of a way to write Emacs extensions in a language other than Lisp? This could either take the form of bindings to the Emacs extension API in some other language (e.g., making OCaml a first-class Emacs extension language) or an Emacs interaction mode where, for example, the extension has a pipe into which it can write Emacs Lisp expressions and read out result values. | emacs | lisp | ocaml | null | null | null | open | Writing Emacs extensions in languages other than Lisp
===
I'd like to take an existing application (written in OCaml) and create an Emacs "interface" for it (like, for example, the Emacs GDB mode). I would prefer to do this without writing a ton of Lisp code. In MVC terms, I'd like for the View to be Emacs, but for the Model and Controller to remain (primarily) OCaml.
Does anybody know of a way to write Emacs extensions in a language other than Lisp? This could either take the form of bindings to the Emacs extension API in some other language (e.g., making OCaml a first-class Emacs extension language) or an Emacs interaction mode where, for example, the extension has a pipe into which it can write Emacs Lisp expressions and read out result values. | 0 |
15,203 | 08/18/2008 20:46:11 | 1,363 | 08/14/2008 18:24:19 | 1 | 1 | Best way to deploy subversion in a multisite windows environment | We are planning on moving for MS Source Safe (ouch) to SVN. We are working mostly in a Microsoft environment (windows, Visual Studio, .NET) and we have developers in multiple sites. I heard about VisualSVN and integration with visual studio. On the other hand I can get someone to host SVN for me and use TortoiseSVN. Any recommendations? Any pitfalls I should avoid? | svn | tortoisesvn | visualsvnserver | null | null | null | open | Best way to deploy subversion in a multisite windows environment
===
We are planning on moving for MS Source Safe (ouch) to SVN. We are working mostly in a Microsoft environment (windows, Visual Studio, .NET) and we have developers in multiple sites. I heard about VisualSVN and integration with visual studio. On the other hand I can get someone to host SVN for me and use TortoiseSVN. Any recommendations? Any pitfalls I should avoid? | 0 |
15,204 | 08/18/2008 20:49:22 | 1,224 | 08/13/2008 13:54:35 | 1 | 0 | What is the best way to iterate through a strongly-typed generic List<T>? | What is the best way to iterate through a strongly-typed generic List<T> in C#.NET and VB.NET? | .net | system.collections.gener | strongly-typed | collections | null | null | open | What is the best way to iterate through a strongly-typed generic List<T>?
===
What is the best way to iterate through a strongly-typed generic List<T> in C#.NET and VB.NET? | 0 |
15,208 | 08/18/2008 20:52:04 | 1,813 | 08/18/2008 17:29:38 | 1 | 6 | What's the best Linux backup solution? | We have a four Linux boxes (all running Debian or Ubuntu) on our office network. None of these boxes are especially critical and they're all using RAID. To date, I've therefore been doing backups of the boxes by having a cron job upload tarballs containing the contents of /etc, MySQL dumps and other such changing, non-packaged data to a box at our geographically separate hosting centre.
I've realised, however that
* the tarballs are sufficient to rebuild from, but it's certainly not a painless process to do so (I recently tried this out as part of a hardware upgrade of one of the boxes)
* long-term, the process isn't sustainable. Each of the boxes is currently producing a tarball of a couple of hundred MB each day, 99% of which is the same as the previous day
* partly due to the size issue, the backup process requires more manual intervention than I want (to find whatever 5GB file is inflating the size of the tarball and kill it)
* again due to the size issue, I'm leaving stuff out which it would be nice to include - the contents of users' home directories, for example. There's almost nothing of value there that isn't in source control (and these aren't our main dev boxes), but it would be nice to keep them anyway.
* there must be a better way
So, my question is, how should I be doing this properly? The requirements are:
* needs to be an offsite backup (one of the main things I'm doing here is protecting against fire/whatever)
* should require as little manual intervention as possible (I'm lazy, and box-herding isn't my main job)
* should continue to scale with a couple more boxes, slightly more data, etc.
* preferably free/open source (cost isn't the issue, but especially for backups, openness seems like a good thing)
* an option to produce some kind of DVD/Blu-Ray/whatever backup from time to time wouldn't be bad
My first thought was that this kind of incremental backup was what tar was created for - create a tar file once each month, add incrementally to it. rsync results to remote box. But others probably have better suggestions.
| linux | backup | null | null | null | 07/24/2011 17:52:48 | off topic | What's the best Linux backup solution?
===
We have a four Linux boxes (all running Debian or Ubuntu) on our office network. None of these boxes are especially critical and they're all using RAID. To date, I've therefore been doing backups of the boxes by having a cron job upload tarballs containing the contents of /etc, MySQL dumps and other such changing, non-packaged data to a box at our geographically separate hosting centre.
I've realised, however that
* the tarballs are sufficient to rebuild from, but it's certainly not a painless process to do so (I recently tried this out as part of a hardware upgrade of one of the boxes)
* long-term, the process isn't sustainable. Each of the boxes is currently producing a tarball of a couple of hundred MB each day, 99% of which is the same as the previous day
* partly due to the size issue, the backup process requires more manual intervention than I want (to find whatever 5GB file is inflating the size of the tarball and kill it)
* again due to the size issue, I'm leaving stuff out which it would be nice to include - the contents of users' home directories, for example. There's almost nothing of value there that isn't in source control (and these aren't our main dev boxes), but it would be nice to keep them anyway.
* there must be a better way
So, my question is, how should I be doing this properly? The requirements are:
* needs to be an offsite backup (one of the main things I'm doing here is protecting against fire/whatever)
* should require as little manual intervention as possible (I'm lazy, and box-herding isn't my main job)
* should continue to scale with a couple more boxes, slightly more data, etc.
* preferably free/open source (cost isn't the issue, but especially for backups, openness seems like a good thing)
* an option to produce some kind of DVD/Blu-Ray/whatever backup from time to time wouldn't be bad
My first thought was that this kind of incremental backup was what tar was created for - create a tar file once each month, add incrementally to it. rsync results to remote box. But others probably have better suggestions.
| 2 |
15,211 | 08/18/2008 20:53:06 | 170 | 08/02/2008 23:13:02 | 161 | 12 | Subversion Management Tools | we have a lot of users running in different shared and solo-owned repositories in Subversion. As part of our work, we do project-shared code and individual work, and we need to control access, ideally on a group basis.
Currenly, we use [SVNManager](http://svnmanager.sourceforge.net/) to allow users to manage access and create repositories. However, in order to get that working we had to do quite a bit of hacking.
Does anyone know of a free, open-source, linux-compatible SVN management system?
Thanks for your help. | svn | linux | subversion | management | null | null | open | Subversion Management Tools
===
we have a lot of users running in different shared and solo-owned repositories in Subversion. As part of our work, we do project-shared code and individual work, and we need to control access, ideally on a group basis.
Currenly, we use [SVNManager](http://svnmanager.sourceforge.net/) to allow users to manage access and create repositories. However, in order to get that working we had to do quite a bit of hacking.
Does anyone know of a free, open-source, linux-compatible SVN management system?
Thanks for your help. | 0 |
15,219 | 08/18/2008 21:03:18 | 810 | 08/09/2008 03:49:52 | 658 | 33 | UltraWebGrid: How to use a drop-down list in a column | I'm using the Infragistics grid and I'm having a difficult time using a drop-down list as the value selector for one of my columns.
I tried reading the documentation but Infragistics' documentation is not so good. I've also taken a look at this [discussion][1] with no luck.
What I'm doing so far:
col.Type = ColumnType.DropDownList;
col.DataType = "System.String";
col.ValueList = myValueList;
where `myValueList` is:
ValueList myValueList = new ValueList();
myValueList.Prompt = "My text prompt";
myValueList.DisplayStyle = ValueListDisplayStyle.DisplayText;
foreach(MyObjectType item in MyObjectTypeCollection)
{
myValueList.ValueItems.Add(item.ID, item.Text); // Note that the ID is a string (not my design)
}
When I look at the page, I expect to see a drop-down list in the cells for this column, but my columns are empty.
[1]: http://news.infragistics.com/forums/p/9063/45792.aspx | c# | asp.net | grid | infragistics | ultrawebgrid | null | open | UltraWebGrid: How to use a drop-down list in a column
===
I'm using the Infragistics grid and I'm having a difficult time using a drop-down list as the value selector for one of my columns.
I tried reading the documentation but Infragistics' documentation is not so good. I've also taken a look at this [discussion][1] with no luck.
What I'm doing so far:
col.Type = ColumnType.DropDownList;
col.DataType = "System.String";
col.ValueList = myValueList;
where `myValueList` is:
ValueList myValueList = new ValueList();
myValueList.Prompt = "My text prompt";
myValueList.DisplayStyle = ValueListDisplayStyle.DisplayText;
foreach(MyObjectType item in MyObjectTypeCollection)
{
myValueList.ValueItems.Add(item.ID, item.Text); // Note that the ID is a string (not my design)
}
When I look at the page, I expect to see a drop-down list in the cells for this column, but my columns are empty.
[1]: http://news.infragistics.com/forums/p/9063/45792.aspx | 0 |
15,228 | 08/18/2008 21:17:15 | 5 | 07/31/2008 14:22:31 | 1,120 | 59 | Setting an ASP.NET Master Page at runtime | I'm working on a site which needs to be able to support two or more looks, changable at runtime. I'd hoped to be able to handle the change with a CSS switch, but it looks like I'll need to use a different masterpage for each design.
So, what's the best way to set the masterpage at runtime? Page.MasterPageFile can only be set in the Page.OnPreInit event. It looks like the solutions are to make all my pages inherit from a common base which handles the PreInit event, or to use an HttpModule which does that.
Any advice? | asp.net | null | null | null | null | null | open | Setting an ASP.NET Master Page at runtime
===
I'm working on a site which needs to be able to support two or more looks, changable at runtime. I'd hoped to be able to handle the change with a CSS switch, but it looks like I'll need to use a different masterpage for each design.
So, what's the best way to set the masterpage at runtime? Page.MasterPageFile can only be set in the Page.OnPreInit event. It looks like the solutions are to make all my pages inherit from a common base which handles the PreInit event, or to use an HttpModule which does that.
Any advice? | 0 |
15,240 | 08/18/2008 21:22:20 | 1,841 | 08/18/2008 20:36:10 | 1 | 0 | How do you create a debug only function that takes a variable argument list? Like printf() | I'd like to make a debug logging function with the same parameters as printf. But one that can be removed by the pre-processor during optimized builds.
For example:
Debug_Print("Warning: value %d > 3!\n", value);
I've looked at variadic macros but those aren't available on all platforms.
| c | c++ | preprocessor | macros | null | null | open | How do you create a debug only function that takes a variable argument list? Like printf()
===
I'd like to make a debug logging function with the same parameters as printf. But one that can be removed by the pre-processor during optimized builds.
For example:
Debug_Print("Warning: value %d > 3!\n", value);
I've looked at variadic macros but those aren't available on all platforms.
| 0 |
15,241 | 08/18/2008 21:23:50 | 1,116 | 08/12/2008 13:25:41 | 181 | 14 | Does anyone have any real-world experience of CSLA? | The main web application of my company is crying out for a nifty set of libraries to make it in some way maintainable and scalable and one of my colleagues has suggested CSLA. So I've bought the book but as :
> _programmers don't read books anymore_
I wanted to gauge the SOFlow community's opinion of it.
So here are my questions.
1. How may people are using CSLA?
2. What are the pros and cons?
3. After reading [this][1] does CSLA really not fit in with TDD?
4. What are my alternatives?
5. If you have stopped using it or decided against why?
[1]: http://stackoverflow.com/questions/1234/csla-master-class | .net | framework | csla | null | null | null | open | Does anyone have any real-world experience of CSLA?
===
The main web application of my company is crying out for a nifty set of libraries to make it in some way maintainable and scalable and one of my colleagues has suggested CSLA. So I've bought the book but as :
> _programmers don't read books anymore_
I wanted to gauge the SOFlow community's opinion of it.
So here are my questions.
1. How may people are using CSLA?
2. What are the pros and cons?
3. After reading [this][1] does CSLA really not fit in with TDD?
4. What are my alternatives?
5. If you have stopped using it or decided against why?
[1]: http://stackoverflow.com/questions/1234/csla-master-class | 0 |
15,247 | 08/18/2008 21:26:57 | 116 | 08/02/2008 05:51:57 | 2,757 | 159 | Simplest way to make a Google Map mashup? | Given a list of locations such as
<td>El Cerrito, CA</td>
<td>Corvallis, OR</td>
<td>Morganton, NC</td>
<td>New York, NY</td>
<td>San Diego, CA</td>
What's the easiest way to generate a Google Map with pushpins for each location?
| google-maps | web2.0 | null | null | null | null | open | Simplest way to make a Google Map mashup?
===
Given a list of locations such as
<td>El Cerrito, CA</td>
<td>Corvallis, OR</td>
<td>Morganton, NC</td>
<td>New York, NY</td>
<td>San Diego, CA</td>
What's the easiest way to generate a Google Map with pushpins for each location?
| 0 |
15,254 | 08/18/2008 21:33:35 | 1,739 | 08/18/2008 11:38:21 | 6 | 0 | Can placement new for arrays be used in a portable way? | Is it possible to actually make use of placement new in portable code when using it for arrays?
It appears that the pointer you get back from new[] is not always the same as the address you pass in (5.3.4, note 12 in the standard seems to confirm that this is correct), but I don't see how you can allocate a buffer for the array to go in if this is the case.
The following example shows the problem. Compiled with Visual Studio, this example results in memory corruption:
#include <new>
#include <stdio.h>
class A
{
public:
A() : data(0) {}
virtual ~A() {}
int data;
};
int main(int argc, char* argv[])
{
const int NUMELEMENTS=20;
char *pBuffer = new char[NUMELEMENTS*sizeof(A)];
A *pA = new(pBuffer) A[NUMELEMENTS];
// With VC++, pA will be four bytes higher than pBuffer
printf("Buffer address: %x, Array address: %x\n", pBuffer, pA);
// Debug runtime will assert here due to heap corruption
delete[] pBuffer;
return 0;
}
Looking at the memory, the compiler seems to be using the first four bytes of the buffer to store a count of the number of items in it. This means that because the buffer is only <code>sizeof(A)*NUMELEMENTS</code> big, the last element in the array is written into unallocated heap.
So the question is can you find out how much additional overhead your implementation wants in order to use placement new[] safely? Ideally, I need a technique that's portable between different compilers. Note that, at least in VC's case, the overhead seems to differ for different classes. For instance, if I remove the virtual destructor in the example, the address returned from new[] is the same as the address I pass in. | c++ | null | null | null | null | null | open | Can placement new for arrays be used in a portable way?
===
Is it possible to actually make use of placement new in portable code when using it for arrays?
It appears that the pointer you get back from new[] is not always the same as the address you pass in (5.3.4, note 12 in the standard seems to confirm that this is correct), but I don't see how you can allocate a buffer for the array to go in if this is the case.
The following example shows the problem. Compiled with Visual Studio, this example results in memory corruption:
#include <new>
#include <stdio.h>
class A
{
public:
A() : data(0) {}
virtual ~A() {}
int data;
};
int main(int argc, char* argv[])
{
const int NUMELEMENTS=20;
char *pBuffer = new char[NUMELEMENTS*sizeof(A)];
A *pA = new(pBuffer) A[NUMELEMENTS];
// With VC++, pA will be four bytes higher than pBuffer
printf("Buffer address: %x, Array address: %x\n", pBuffer, pA);
// Debug runtime will assert here due to heap corruption
delete[] pBuffer;
return 0;
}
Looking at the memory, the compiler seems to be using the first four bytes of the buffer to store a count of the number of items in it. This means that because the buffer is only <code>sizeof(A)*NUMELEMENTS</code> big, the last element in the array is written into unallocated heap.
So the question is can you find out how much additional overhead your implementation wants in order to use placement new[] safely? Ideally, I need a technique that's portable between different compilers. Note that, at least in VC's case, the overhead seems to differ for different classes. For instance, if I remove the virtual destructor in the example, the address returned from new[] is the same as the address I pass in. | 0 |
15,266 | 08/18/2008 21:40:01 | 544 | 08/06/2008 15:58:13 | 121 | 5 | Objective-C/Cocoa: How do I accept a bad server certificate? | Using NSURLRequest, I am trying to access a web site that has an expired certificate. When I send the request, my connection:didFailWithError delegate method is invoked with the following info:
-1203, NSURLErrorDomain, bad server certificate
My searches have only turned up one solution: a hidden class method in NSURLRequest:
[NSURLRequest setAllowsAnyHTTPSCertificate:YES forHost:myHost];
However, I can't use it. This is for an iPhone app and Apple assures me that they will not approve apps that call private APIs.
Any suggestions on what to do? Do I need to use CFNetwork APIs, and if so, two questions:
- Any sample code I can use to get started? I haven't found any online.
- If I use CFNetwork for this, do I have to ditch NSURL entirely?
| objectivec | cocoa | iphone | cocoa-touch | network | null | open | Objective-C/Cocoa: How do I accept a bad server certificate?
===
Using NSURLRequest, I am trying to access a web site that has an expired certificate. When I send the request, my connection:didFailWithError delegate method is invoked with the following info:
-1203, NSURLErrorDomain, bad server certificate
My searches have only turned up one solution: a hidden class method in NSURLRequest:
[NSURLRequest setAllowsAnyHTTPSCertificate:YES forHost:myHost];
However, I can't use it. This is for an iPhone app and Apple assures me that they will not approve apps that call private APIs.
Any suggestions on what to do? Do I need to use CFNetwork APIs, and if so, two questions:
- Any sample code I can use to get started? I haven't found any online.
- If I use CFNetwork for this, do I have to ditch NSURL entirely?
| 0 |
15,272 | 08/18/2008 21:44:07 | 163 | 08/02/2008 20:40:09 | 40 | 5 | Aging Data Structure in C# | I want a data structure that will allow querying *how many items in last <strong>X</strong> minutes*. An item may just be a simple identifier or a more complex data structure, preferably the timestamp of the item will be in the item, rather than stored outside (as a hash or similar, wouldn't want to have problems with multiple items having same timestamp).
So far it seems that with LINQ I could easily filter items with timestamp greater than a given time and aggregate a count. Though I'm hesitant to try to work .NET 3.5 specific stuff into my production environment yet. Are there any other suggestions for a similar data structure?
The other part that I'm interested in is *aging* old data out, If I'm only going to be asking for counts of items less than 6 hours ago I would like anything older than that to be removed from my data structure because this may be a long-running program. | c# | .net-3.5 | linq | datastructure | null | null | open | Aging Data Structure in C#
===
I want a data structure that will allow querying *how many items in last <strong>X</strong> minutes*. An item may just be a simple identifier or a more complex data structure, preferably the timestamp of the item will be in the item, rather than stored outside (as a hash or similar, wouldn't want to have problems with multiple items having same timestamp).
So far it seems that with LINQ I could easily filter items with timestamp greater than a given time and aggregate a count. Though I'm hesitant to try to work .NET 3.5 specific stuff into my production environment yet. Are there any other suggestions for a similar data structure?
The other part that I'm interested in is *aging* old data out, If I'm only going to be asking for counts of items less than 6 hours ago I would like anything older than that to be removed from my data structure because this may be a long-running program. | 0 |
15,302 | 08/18/2008 22:14:34 | 1,538 | 08/16/2008 13:21:01 | 71 | 7 | What do the getUTC* methods on the date object do? | What does it mean when you get or create a date in UTC format in JavaScript? | javascript | webdevelopment | null | null | null | null | open | What do the getUTC* methods on the date object do?
===
What does it mean when you get or create a date in UTC format in JavaScript? | 0 |
15,305 | 08/18/2008 22:15:39 | 1,849 | 08/18/2008 21:46:57 | 1 | 1 | JNI and Java: ant calling make or make calling ant? | I'm just about to make my first trip into the world of JNI (Java Native Interface) to provide file system change notifications from platform specific C/C++ code to Java. That is unless someone suggest some brilliant library for doing this that I've missed.
Being new to JNI I've managed to find much documentation on the interface side of it and library generation side of it, but I've not found much on building the native library.
I've got an existing build based on ant for the pre-existing Java source, so I'm trying to work out if I should get ant to call make to create the library or if it's best to get make to call ant after creating the library?
Neither option jumps out as being terribly nice, but both seem better than trying to get ant to call a compiler to compile the code and generate the library directly. | java | ant | make | jni | automake | null | open | JNI and Java: ant calling make or make calling ant?
===
I'm just about to make my first trip into the world of JNI (Java Native Interface) to provide file system change notifications from platform specific C/C++ code to Java. That is unless someone suggest some brilliant library for doing this that I've missed.
Being new to JNI I've managed to find much documentation on the interface side of it and library generation side of it, but I've not found much on building the native library.
I've got an existing build based on ant for the pre-existing Java source, so I'm trying to work out if I should get ant to call make to create the library or if it's best to get make to call ant after creating the library?
Neither option jumps out as being terribly nice, but both seem better than trying to get ant to call a compiler to compile the code and generate the library directly. | 0 |
15,310 | 08/18/2008 22:19:16 | 1,644 | 08/17/2008 18:23:42 | 21 | 3 | Optimizing the PDF Export of Huge Reports in Sql Reporting Services 2005 | First off I understand that it is a horrible idea to run extremely large/long running reports. I am aware that Microsoft has a rule of thumb stating that a SSRS report should take no longer than 30 seconds to execute. However sometimes gargantuan reports are a preferred evil due to external forces such complying with state laws.
At my place of employment, we have an asp.net (2.0) app that we have migrated from Crystal Reports to SSRS. Due to the large user base and complex reporting UI requirements we have a set of screens that accepts user inputted parameters and creates schedules to be run over night. Since the application supports multiple reporting frameworks we do not use the scheduling/snapshot facilities of SSRS. All of the reports in the system are generated by a scheduled console app which takes user entered parameters and generates the reports with the corresponding reporting solutions the reports were created with. In the case of SSRS reports, the console app generates the SSRS reports and exports them as PDFs via the SSRS web service API.
So far SSRS has been much easier to deal with than Crystal with the exception of a certain 25,000 page report that we have recently converted from crystal reports to SSRS. The SSRS server is a 64bit 2003 server with 32 gigs of ram running SSRS 2005. All of our smaller reports work fantastically, but we are having trouble with our larger reports such as this one. Unfortunately, we can't seem to generate the aforemention report through the web service API. The following error occurs roughly 30-35 minutes into the generation/export:
Exception Message: The underlying connection was closed: An unexpected error occurred on a receive.
The web service call is something I'm sure you all have seen before:
data = rs.Render(this.ReportPath, this.ExportFormat, null, deviceInfo,
selectedParameters, null, null, out encoding, out mimeType, out usedParameters,
out warnings, out streamIds);
The odd thing is that this report will run/render/export if the report is run directly on the reporting server using the report manager. The proc that produces the data for the report runs for about 5 minutes. The report renders in SSRS native format in the browser/viewer after about 12 minutes. Exporting to pdf through the browser/viewer in the report manager takes an additional 55 minutes. This works reliably and it produces a whopping 1.03gb pdf.
Here are some of the more obvious things I've tried to get the report working via the web service API:
- set the HttpRuntime ExecutionTimeout
value to 3 hours on the report
server
- disabled http keep alives on the report server
- increased the script timeout on the report server
- set the report to never time out on the server
- set the report timeout to several hours on the client call
From the tweaks I have tried, I am fairly comfortable saying that any timeout issues have been eliminated.
Based off of my research of the error message, I believe that the web service API does not send chunked responses by default. This means that it tries to send all 1.3gb over the wire in one response. At a certain point, IIS throws in the towel. Unfortunately the API abstracts away web service configuration so I can't seem to find a way to enable response chunking.
1. Does anyone know of anyway to reduce/optimize the PDF export phase and or the size of the PDF without lowering the total page count?
2. Is there a way to turn on response chunking for SSRS?
3. Does anyone else have any other theories as to why this runs on the server but not through the API? | reporting-services | sqlreportingservices | null | null | null | null | open | Optimizing the PDF Export of Huge Reports in Sql Reporting Services 2005
===
First off I understand that it is a horrible idea to run extremely large/long running reports. I am aware that Microsoft has a rule of thumb stating that a SSRS report should take no longer than 30 seconds to execute. However sometimes gargantuan reports are a preferred evil due to external forces such complying with state laws.
At my place of employment, we have an asp.net (2.0) app that we have migrated from Crystal Reports to SSRS. Due to the large user base and complex reporting UI requirements we have a set of screens that accepts user inputted parameters and creates schedules to be run over night. Since the application supports multiple reporting frameworks we do not use the scheduling/snapshot facilities of SSRS. All of the reports in the system are generated by a scheduled console app which takes user entered parameters and generates the reports with the corresponding reporting solutions the reports were created with. In the case of SSRS reports, the console app generates the SSRS reports and exports them as PDFs via the SSRS web service API.
So far SSRS has been much easier to deal with than Crystal with the exception of a certain 25,000 page report that we have recently converted from crystal reports to SSRS. The SSRS server is a 64bit 2003 server with 32 gigs of ram running SSRS 2005. All of our smaller reports work fantastically, but we are having trouble with our larger reports such as this one. Unfortunately, we can't seem to generate the aforemention report through the web service API. The following error occurs roughly 30-35 minutes into the generation/export:
Exception Message: The underlying connection was closed: An unexpected error occurred on a receive.
The web service call is something I'm sure you all have seen before:
data = rs.Render(this.ReportPath, this.ExportFormat, null, deviceInfo,
selectedParameters, null, null, out encoding, out mimeType, out usedParameters,
out warnings, out streamIds);
The odd thing is that this report will run/render/export if the report is run directly on the reporting server using the report manager. The proc that produces the data for the report runs for about 5 minutes. The report renders in SSRS native format in the browser/viewer after about 12 minutes. Exporting to pdf through the browser/viewer in the report manager takes an additional 55 minutes. This works reliably and it produces a whopping 1.03gb pdf.
Here are some of the more obvious things I've tried to get the report working via the web service API:
- set the HttpRuntime ExecutionTimeout
value to 3 hours on the report
server
- disabled http keep alives on the report server
- increased the script timeout on the report server
- set the report to never time out on the server
- set the report timeout to several hours on the client call
From the tweaks I have tried, I am fairly comfortable saying that any timeout issues have been eliminated.
Based off of my research of the error message, I believe that the web service API does not send chunked responses by default. This means that it tries to send all 1.3gb over the wire in one response. At a certain point, IIS throws in the towel. Unfortunately the API abstracts away web service configuration so I can't seem to find a way to enable response chunking.
1. Does anyone know of anyway to reduce/optimize the PDF export phase and or the size of the PDF without lowering the total page count?
2. Is there a way to turn on response chunking for SSRS?
3. Does anyone else have any other theories as to why this runs on the server but not through the API? | 0 |
15,326 | 08/18/2008 22:35:42 | 1,797 | 08/18/2008 15:46:11 | 79 | 9 | IE7 HTML/CSS margin-bottom bug. | Here is the scenario:
I have a table with a margin-bottom of 19px. Below that I have a form that contains some fieldsets. One of them is floated right. The problem is that the margin-bottom is not getting the full 19px in IE7. I've gone through all of the IE7 css/margin/float bugs that I can think of and have tried remedies but have been unsuccessful. I have been googling for a while now and cannot find anything that is helping out.
Here is what I have tried.
1. Wrapping the form or fieldset in an unstyled div. No apparent change.
2. Nixing the margin-bottom on the table and instead wrapping that with a div and giving it a padding-bottom of 19px. No apparent change.
3. Nixing the margin-bottom on the table and adding a div with a fixed height of 19px. No apparent change.
I know there are some others that I am forgetting, but those are the things I have tried out recently. This happens to each fieldset.
| internet-explorer-7 | css | html | design | null | null | open | IE7 HTML/CSS margin-bottom bug.
===
Here is the scenario:
I have a table with a margin-bottom of 19px. Below that I have a form that contains some fieldsets. One of them is floated right. The problem is that the margin-bottom is not getting the full 19px in IE7. I've gone through all of the IE7 css/margin/float bugs that I can think of and have tried remedies but have been unsuccessful. I have been googling for a while now and cannot find anything that is helping out.
Here is what I have tried.
1. Wrapping the form or fieldset in an unstyled div. No apparent change.
2. Nixing the margin-bottom on the table and instead wrapping that with a div and giving it a padding-bottom of 19px. No apparent change.
3. Nixing the margin-bottom on the table and adding a div with a fixed height of 19px. No apparent change.
I know there are some others that I am forgetting, but those are the things I have tried out recently. This happens to each fieldset.
| 0 |
15,334 | 08/18/2008 22:41:10 | 1,670 | 08/17/2008 21:56:17 | 1 | 0 | How to create short snippets in VIM? | I have recently started using VIM as my text editor and am currently working on my own customizations.
I suppose keyboard mappings can do pretty much anything, but for the time being I'm using them as a sort of snippets facility almost exclusively.
So, for example, if I type def{TAB} (<em>:imap def{TAB} def ():<ESC>3ha</em>), it expands to:
def |(): # '|' represents the caret
This works as expected, but I find it annoying when VIM waits for a full command while I'm typing a word containing "def" and am not interested in expanding it.
* Is there a way to avoid this or use this function more effectively to this end?
* Is any other VIM feature better suited for this? | vim | vimtips | null | null | null | null | open | How to create short snippets in VIM?
===
I have recently started using VIM as my text editor and am currently working on my own customizations.
I suppose keyboard mappings can do pretty much anything, but for the time being I'm using them as a sort of snippets facility almost exclusively.
So, for example, if I type def{TAB} (<em>:imap def{TAB} def ():<ESC>3ha</em>), it expands to:
def |(): # '|' represents the caret
This works as expected, but I find it annoying when VIM waits for a full command while I'm typing a word containing "def" and am not interested in expanding it.
* Is there a way to avoid this or use this function more effectively to this end?
* Is any other VIM feature better suited for this? | 0 |
15,349 | 08/18/2008 23:05:04 | 1,043 | 08/11/2008 18:08:32 | 380 | 37 | Which scripting language to support in an existing codebase? | I'm looking at adding scripting functionality to an existing codebase and am weighing up the pros/cons of various packages. Lua is probably the most obvious choice, but I was wondering if people have any other suggestions based on their experience.
Scripts will be triggered upon certain events and may stay resident for a period of time. For example upon startup a script may define several options which the program presents to the user as a number of buttons. Upon selecting one of these buttons the program will notify the script where further events may occur.
These are the only real requirements;
1. Must be cross-platform and compilable from source
2. Scripts must be able to call registered code-side functions
3. Code must be able to call script-side functions
4. Be used within a C/C++ codebase.
Cheers!
| scripting | datadriven | null | null | null | null | open | Which scripting language to support in an existing codebase?
===
I'm looking at adding scripting functionality to an existing codebase and am weighing up the pros/cons of various packages. Lua is probably the most obvious choice, but I was wondering if people have any other suggestions based on their experience.
Scripts will be triggered upon certain events and may stay resident for a period of time. For example upon startup a script may define several options which the program presents to the user as a number of buttons. Upon selecting one of these buttons the program will notify the script where further events may occur.
These are the only real requirements;
1. Must be cross-platform and compilable from source
2. Scripts must be able to call registered code-side functions
3. Code must be able to call script-side functions
4. Be used within a C/C++ codebase.
Cheers!
| 0 |
15,365 | 08/18/2008 23:17:09 | 1,858 | 08/18/2008 22:50:18 | 1 | 0 | Requirements, Specs, and Managing Up in an Agile Environment | My company has tried to adopt the scrum methodology with mixed success. Theses are some areas where we've had issues. How do you handle these?
1. Tracking requirements from
Product Marketing through to product. We're trying out JIRA to track all requirements individually and assigning a release to each one as it is picked for implementation.
2. Who creates stories? Product
Management who doesn't know enough
to create effectively small stories,
developers who may not have domain
knowledge, an analyst in between?
3. Functional specs
1. do you write them or just try to get them into a story
definition?
2. Do you write functional
specs per story? Per feature?
3. How do you see the relationship between functional specs and stories?
4. answering the question from people
with VP in their title "what are we
going to get by [8 months from
now]?"
| agile | productmanagement | scrum | null | null | null | open | Requirements, Specs, and Managing Up in an Agile Environment
===
My company has tried to adopt the scrum methodology with mixed success. Theses are some areas where we've had issues. How do you handle these?
1. Tracking requirements from
Product Marketing through to product. We're trying out JIRA to track all requirements individually and assigning a release to each one as it is picked for implementation.
2. Who creates stories? Product
Management who doesn't know enough
to create effectively small stories,
developers who may not have domain
knowledge, an analyst in between?
3. Functional specs
1. do you write them or just try to get them into a story
definition?
2. Do you write functional
specs per story? Per feature?
3. How do you see the relationship between functional specs and stories?
4. answering the question from people
with VP in their title "what are we
going to get by [8 months from
now]?"
| 0 |
15,366 | 08/18/2008 23:18:02 | 305 | 08/04/2008 14:04:19 | 354 | 26 | Only accepting certain ajax requests from authenticated users | What's the best practice for making sure that certain ajax calls to certain pages are only accepted from authenticated users?
For example:
Let's say that I have a main page called **blog.php** (I know, creativity abounds). Let's also say that there is a page called **delete.php** which looks for the parameter **post_id** and then deletes some entry from a database.
In this very contrived example, there's some mechanism on blog.php which sends a request via ajax to delete.php to delete an entry.
Now this mechanism is only going to be available to authenticated users on blog.php. But what's to stop someone from just calling delete.php with a bunch of random numbers and deleting everything in site?
I did a quick test where I set a session variable in blog.php and then did an ajax call to delete.php to return if the session variable was set or not ***(it wasn't)***.
What's the accepted way to handle this sort of thing? | php | ajax | authentication | null | null | null | open | Only accepting certain ajax requests from authenticated users
===
What's the best practice for making sure that certain ajax calls to certain pages are only accepted from authenticated users?
For example:
Let's say that I have a main page called **blog.php** (I know, creativity abounds). Let's also say that there is a page called **delete.php** which looks for the parameter **post_id** and then deletes some entry from a database.
In this very contrived example, there's some mechanism on blog.php which sends a request via ajax to delete.php to delete an entry.
Now this mechanism is only going to be available to authenticated users on blog.php. But what's to stop someone from just calling delete.php with a bunch of random numbers and deleting everything in site?
I did a quick test where I set a session variable in blog.php and then did an ajax call to delete.php to return if the session variable was set or not ***(it wasn't)***.
What's the accepted way to handle this sort of thing? | 0 |
15,373 | 08/18/2008 23:27:11 | 1,693 | 08/18/2008 02:25:37 | 65 | 3 | Non-tech skills that complement programming | What non-tech skills have you found to enhance and/or complement programming skills? Try and think outside of the office setting, too. | nontechnical | null | null | null | null | 01/09/2012 16:44:01 | not constructive | Non-tech skills that complement programming
===
What non-tech skills have you found to enhance and/or complement programming skills? Try and think outside of the office setting, too. | 4 |
15,376 | 08/18/2008 23:29:17 | 1,370 | 08/14/2008 19:52:54 | 250 | 32 | What's the best UML diagramming tool? | I'm trying to choose a tool for creating <acronym title="Unified Modeling Language">UML</acronym> diagrams of all flavours. Usability is a major criteria for me, but I'd still take more power with a steeper learning curve and be happy. Free (as in beer) would be nice, but I'd be willing to pay if the tool's worth it. What should I be using? | uml | diagram | modeling | null | null | 06/09/2012 16:55:36 | not constructive | What's the best UML diagramming tool?
===
I'm trying to choose a tool for creating <acronym title="Unified Modeling Language">UML</acronym> diagrams of all flavours. Usability is a major criteria for me, but I'd still take more power with a steeper learning curve and be happy. Free (as in beer) would be nice, but I'd be willing to pay if the tool's worth it. What should I be using? | 4 |
15,390 | 08/18/2008 23:45:14 | 1,848 | 08/18/2008 21:44:36 | 1 | 0 | Best practices for managing and deploying large javascript apps | What are some standard practices for managing a medium-large javascript app? My concerns are both speed for browser download and ease and maintainability of development.
Our JS is roughly "namespaced" eg:
var Client = {
var1: '',
var2: '',
accounts: {
/* 100's of functions and variables */
},
orders: {
/* 100's of functions and variables and subsections */
}
/* etc, etc for a couple hundred kb */
}
At the moment, we have one (unpacked, unstripped, highly readable) javascript file to handle all the business logic on the web app. In addition, there is jQuery and several jQuery extensions. The problem we face is that it takes *forever* to find anything in the JS and the browser still has a dozen files to download.
Is it common to have a handful of "source" js files that get "compiled" into one final, compressed js file? Any other handy hints or best practices? | javascript | deployment | webapplications | null | null | null | open | Best practices for managing and deploying large javascript apps
===
What are some standard practices for managing a medium-large javascript app? My concerns are both speed for browser download and ease and maintainability of development.
Our JS is roughly "namespaced" eg:
var Client = {
var1: '',
var2: '',
accounts: {
/* 100's of functions and variables */
},
orders: {
/* 100's of functions and variables and subsections */
}
/* etc, etc for a couple hundred kb */
}
At the moment, we have one (unpacked, unstripped, highly readable) javascript file to handle all the business logic on the web app. In addition, there is jQuery and several jQuery extensions. The problem we face is that it takes *forever* to find anything in the JS and the browser still has a dozen files to download.
Is it common to have a handful of "source" js files that get "compiled" into one final, compressed js file? Any other handy hints or best practices? | 0 |
15,395 | 08/18/2008 23:50:25 | 1,855 | 08/18/2008 22:12:56 | 1 | 2 | SQL Server 2008 vs 2005 Linq integration | Linq To SQL or Entity framework both integrate nicely with SQL Server 2005.
The SQL Server 2008 spec sheet promises even better integration - but I can't see it.
What are some examples of what you can do Linq-wise when talking to a 2008 server that you can't when talking to SQL Server 2005? | sqlserver | linq | null | null | null | null | open | SQL Server 2008 vs 2005 Linq integration
===
Linq To SQL or Entity framework both integrate nicely with SQL Server 2005.
The SQL Server 2008 spec sheet promises even better integration - but I can't see it.
What are some examples of what you can do Linq-wise when talking to a 2008 server that you can't when talking to SQL Server 2005? | 0 |
15,412 | 08/19/2008 00:11:00 | 708 | 08/08/2008 06:10:02 | 185 | 10 | Is Single Responsibility Principle a rule of OOP? | An [answer][1] to a Stack Overflow question stated that a particular framework violated a plain and simple OOP rule: Single Responsibility Principle (SRP).
**Is the Single Responsibility Principle *really* a rule of OOP?**
My understanding of the definition of Object Orientated Programming is "a paradigm where objects and their behaviour are used to create software". This includes the following techniques: Encapsulation, Polymorphism & Inheritance.
Now don't get me wrong - I believe SRP to be the key to most good OO designs, but I feel there are cases where this principle can and should be broken (just like database normalization rules). I aggressively push the benefits of SRP, and the great majority of my code follows this principle.
*But, is it a rule, and thus implies that it shouldn't be broken?*
[1]: http://stackoverflow.com/questions/15241/does-anyone-have-any-real-world-experience-of-csla#15357 | design | oop | null | null | null | null | open | Is Single Responsibility Principle a rule of OOP?
===
An [answer][1] to a Stack Overflow question stated that a particular framework violated a plain and simple OOP rule: Single Responsibility Principle (SRP).
**Is the Single Responsibility Principle *really* a rule of OOP?**
My understanding of the definition of Object Orientated Programming is "a paradigm where objects and their behaviour are used to create software". This includes the following techniques: Encapsulation, Polymorphism & Inheritance.
Now don't get me wrong - I believe SRP to be the key to most good OO designs, but I feel there are cases where this principle can and should be broken (just like database normalization rules). I aggressively push the benefits of SRP, and the great majority of my code follows this principle.
*But, is it a rule, and thus implies that it shouldn't be broken?*
[1]: http://stackoverflow.com/questions/15241/does-anyone-have-any-real-world-experience-of-csla#15357 | 0 |
15,414 | 08/19/2008 00:12:01 | 369 | 08/05/2008 08:33:43 | 130 | 17 | Is it possible to coax Visual Studio 2008 into using italics for comments? | I'm quite used to my IDE setup in Delphi 7, where I have my comments rendered in italics.
This doesn't appear to be possible in VS2008. There's only an option for bold font, not italics.
Is there some kind of registry hack or font magic I can perform to get it to work? The font I'm using is Consolas, if that makes a difference. | visual-studio | fonts | consolas | null | null | null | open | Is it possible to coax Visual Studio 2008 into using italics for comments?
===
I'm quite used to my IDE setup in Delphi 7, where I have my comments rendered in italics.
This doesn't appear to be possible in VS2008. There's only an option for bold font, not italics.
Is there some kind of registry hack or font magic I can perform to get it to work? The font I'm using is Consolas, if that makes a difference. | 0 |
15,423 | 08/19/2008 00:21:12 | 883 | 08/10/2008 07:32:41 | 11 | 1 | How to change the icon of .bat file programatically? | I'd like to know what's the way to actually set the icon of a `.bat` file to an arbitrary icon.
How would I go about doing that programmatically, independently of the language I may be using. | windows | batch-file | icon | null | null | null | open | How to change the icon of .bat file programatically?
===
I'd like to know what's the way to actually set the icon of a `.bat` file to an arbitrary icon.
How would I go about doing that programmatically, independently of the language I may be using. | 0 |
15,446 | 08/19/2008 00:50:04 | 1,807 | 08/18/2008 16:52:32 | 51 | 3 | Documenting program archetecture | What have people found to be effective methods of documenting the architecture of a large project so that programmers new to the code can "get their bearings" (relatively) quickly? | documentation | null | null | null | null | null | open | Documenting program archetecture
===
What have people found to be effective methods of documenting the architecture of a large project so that programmers new to the code can "get their bearings" (relatively) quickly? | 0 |
15,470 | 08/19/2008 01:02:59 | 692 | 08/07/2008 22:04:29 | 1 | 0 | How do I get rid of Home in ASP.Net MVC? | I know this site is written using ASP.Net MVC and I do not see "/Home" in the url. This proves to me that it can be done. What special route and do I need? | asp.net-mvc | null | null | null | null | null | open | How do I get rid of Home in ASP.Net MVC?
===
I know this site is written using ASP.Net MVC and I do not see "/Home" in the url. This proves to me that it can be done. What special route and do I need? | 0 |
15,478 | 08/19/2008 01:11:28 | 1,873 | 08/19/2008 01:11:28 | 1 | 0 | .Net drawing clipping bug | gdi+ DrawLines function has a clipping bug that can be reproduced by running the following code:
protected override void OnPaint(PaintEventArgs e)
{
PointF[] points = new PointF[] { new PointF(73.36f, 196),
new PointF(75.44f, 32),
new PointF(77.52f, 32),
new PointF(79.6f, 196),
new PointF(85.84f, 196) };
Rectangle b = new Rectangle(70, 32, 20, 164);
e.Graphics.SetClip(b);
e.Graphics.DrawLines(Pens.Red, points); // clipped incorrectly
e.Graphics.TranslateTransform(80, 0);
e.Graphics.ResetClip();
e.Graphics.DrawLines(Pens.Red, points);
}
Setting the antials mode on the graphics object resolves this but that is not a real solution.
Does anybody know of an workaround?
| winforms | system.drawing | gdi+ | graphics | null | null | open | .Net drawing clipping bug
===
gdi+ DrawLines function has a clipping bug that can be reproduced by running the following code:
protected override void OnPaint(PaintEventArgs e)
{
PointF[] points = new PointF[] { new PointF(73.36f, 196),
new PointF(75.44f, 32),
new PointF(77.52f, 32),
new PointF(79.6f, 196),
new PointF(85.84f, 196) };
Rectangle b = new Rectangle(70, 32, 20, 164);
e.Graphics.SetClip(b);
e.Graphics.DrawLines(Pens.Red, points); // clipped incorrectly
e.Graphics.TranslateTransform(80, 0);
e.Graphics.ResetClip();
e.Graphics.DrawLines(Pens.Red, points);
}
Setting the antials mode on the graphics object resolves this but that is not a real solution.
Does anybody know of an workaround?
| 0 |
15,481 | 08/19/2008 01:18:29 | 1,870 | 08/19/2008 00:42:51 | 1 | 3 | Java Coding standard / best practices - labeled brake/continue | Sometimes a labeled brake or continue can make code a lot more readable.
OUTERLOOP: for ( ;/*stuff*/; ) {
//...lots of code
if ( isEnough() ) break OUTERLOOP;
//...more code
}
I was wondering what the common convention for the labels was. All caps? first cap? | java | convention | label | null | null | null | open | Java Coding standard / best practices - labeled brake/continue
===
Sometimes a labeled brake or continue can make code a lot more readable.
OUTERLOOP: for ( ;/*stuff*/; ) {
//...lots of code
if ( isEnough() ) break OUTERLOOP;
//...more code
}
I was wondering what the common convention for the labels was. All caps? first cap? | 0 |
15,486 | 08/19/2008 01:23:04 | 493 | 08/06/2008 10:25:05 | 1,887 | 145 | Sorting an IList in C# | So I came across an interesting problem today. We have a WCF web service that returns an IList<MyObj>. Not really a big deal until I wanted to sort it.
Turns out the IList interface doesn't have a sort method built in.
I ended up using the `ArrayList.Adapter(list).Sort(new MyComparer())` method to solve the problem but it just seemed a bit "ghetto" to me.
I toyed with writing an extension method, also with inheriting from IList and implementing my own Sort() method as well as casting to a List<MyObj> but none of these seemed overly elegant.
So my question is, does anyone have an elegant solution to sorting an IList<MyObj> | c# | generics | sorting | ilist | null | null | open | Sorting an IList in C#
===
So I came across an interesting problem today. We have a WCF web service that returns an IList<MyObj>. Not really a big deal until I wanted to sort it.
Turns out the IList interface doesn't have a sort method built in.
I ended up using the `ArrayList.Adapter(list).Sort(new MyComparer())` method to solve the problem but it just seemed a bit "ghetto" to me.
I toyed with writing an extension method, also with inheriting from IList and implementing my own Sort() method as well as casting to a List<MyObj> but none of these seemed overly elegant.
So my question is, does anyone have an elegant solution to sorting an IList<MyObj> | 0 |
15,496 | 08/19/2008 01:36:03 | 486 | 08/06/2008 09:19:11 | 270 | 29 | Hidden Features of Java | After reading [Hidden Features of C#](http://stackoverflow.com/questions/9033/hidden-features-of-c) I wondered, What are some of the hidden features of Java?
| java | null | null | null | null | null | open | Hidden Features of Java
===
After reading [Hidden Features of C#](http://stackoverflow.com/questions/9033/hidden-features-of-c) I wondered, What are some of the hidden features of Java?
| 0 |
15,504 | 08/19/2008 01:44:28 | 1,463 | 08/15/2008 17:26:44 | 120 | 11 | Use SVN instead of CVS on SourceForge | I've just setup a new project on SourceForge and the admins set it up with CVS as the SCM, however, I want to use SVN. There is NO code in this project yet - empty directory.
How do I change this project from using CVS to SVN? | svn | cvs | sourceforge | null | null | null | open | Use SVN instead of CVS on SourceForge
===
I've just setup a new project on SourceForge and the admins set it up with CVS as the SCM, however, I want to use SVN. There is NO code in this project yet - empty directory.
How do I change this project from using CVS to SVN? | 0 |
15,513 | 08/19/2008 01:51:44 | 1,767 | 08/18/2008 13:29:17 | 1 | 0 | How do I track down performance problems with page rendering? | I've been tasked with improving the performance of an ASP.NET 2.0 application. The page I'm currently focused on has many problems but one that I'm having trouble digging into is the render time of the page. Using Trace.axd the duration between Begin Render and End Render is 1.4 seconds. From MSDN I see that
> All ASP.NET Web server controls have a
> Render method that writes out the
> control's markup that is sent to the
> browser.
If I had the source code for all the controls on the page, I would just instrument them to trace out their render time. Unfortunately, this particular page has lots of controls, most of them third-party. Is there tool or technique to get better visibility into what is going on during the render? I would like to know if there is a particularly poorly performing control, or if there are simply too many controls on the page. | asp.net | performance | null | null | null | null | open | How do I track down performance problems with page rendering?
===
I've been tasked with improving the performance of an ASP.NET 2.0 application. The page I'm currently focused on has many problems but one that I'm having trouble digging into is the render time of the page. Using Trace.axd the duration between Begin Render and End Render is 1.4 seconds. From MSDN I see that
> All ASP.NET Web server controls have a
> Render method that writes out the
> control's markup that is sent to the
> browser.
If I had the source code for all the controls on the page, I would just instrument them to trace out their render time. Unfortunately, this particular page has lots of controls, most of them third-party. Is there tool or technique to get better visibility into what is going on during the render? I would like to know if there is a particularly poorly performing control, or if there are simply too many controls on the page. | 0 |
15,514 | 08/19/2008 01:51:46 | 700 | 08/08/2008 00:32:27 | 69 | 10 | Is there anyway to disable the client-side validation for dojo date text box? | In my example below I'm using a dijit.form.DateTextBox.
<input type="text" name="startDate" dojoType="dijit.form.DateTextBox" constraints="{datePattern:'MM/dd/yyyy'}" value='<c:out value="${sessionScope.adminMessageForm.startDate}"/>' />
So for example, if the user starts to enter "asdf" into the date the field turns yellow and a popup error message appears saying "The value entered is not valid." Even if I remove the constraints="{datePattern:'MM/dd/yyyy'}" it still validates.
Without going into details as to why, I would like to be able keep the dojoType and still prevent validation in particular circumstances. | javascript | dojo | null | null | null | null | open | Is there anyway to disable the client-side validation for dojo date text box?
===
In my example below I'm using a dijit.form.DateTextBox.
<input type="text" name="startDate" dojoType="dijit.form.DateTextBox" constraints="{datePattern:'MM/dd/yyyy'}" value='<c:out value="${sessionScope.adminMessageForm.startDate}"/>' />
So for example, if the user starts to enter "asdf" into the date the field turns yellow and a popup error message appears saying "The value entered is not valid." Even if I remove the constraints="{datePattern:'MM/dd/yyyy'}" it still validates.
Without going into details as to why, I would like to be able keep the dojoType and still prevent validation in particular circumstances. | 0 |
15,528 | 08/19/2008 02:01:15 | 1,693 | 08/18/2008 02:25:37 | 105 | 4 | What's wrong with Java? | I regularly see/hear negative comments about Java, but there never seems to be any specific negative point about it, at least nothing that hasn't been addressed in later versions.
So, really, what's wrong with Java? | java | language | null | null | null | 06/07/2012 07:56:57 | not constructive | What's wrong with Java?
===
I regularly see/hear negative comments about Java, but there never seems to be any specific negative point about it, at least nothing that hasn't been addressed in later versions.
So, really, what's wrong with Java? | 4 |
15,583 | 08/19/2008 02:40:24 | 430 | 08/05/2008 16:45:35 | 467 | 33 | What are the correct stencils for object relational diagramming in visio? | All of my Visio experience is with LAN/WAN documentation. I recently had a desire to visualize the relationship between [objects][1] in the [Nagios][2] configuration and I realized I didn't know how to do it properly and moved on to something more important. I was reading the responses to [this thread][3] and realized this is something software developers must do a lot.
So this is probably a soft-pitch question, but what is the proper method for documenting object relationships in Visio? Is there a better template to use? What stencil collection is the proper stencil in?
In my probably naive view I imagine an object being a large box with a single "reception" connector and containing multiple smaller boxes, each of which represents an object member and having its own connector. So, each object member field would connect out to the "reception" connector on the object of the member's type. In and of itself those objects are fairly easy to build. The problem I ran into is that the connector lines didn't respect the objects and ran over the top of them, making an awful, unusable mess.
Thanks for any pointers.
[1]: http://nagios.sourceforge.net/docs/3_0/objectdefinitions.html
[2]: http://www.nagios.org/
[3]: http://stackoverflow.com/questions/15446/documenting-program-archetecture | visio | visualization | modeling | null | null | null | open | What are the correct stencils for object relational diagramming in visio?
===
All of my Visio experience is with LAN/WAN documentation. I recently had a desire to visualize the relationship between [objects][1] in the [Nagios][2] configuration and I realized I didn't know how to do it properly and moved on to something more important. I was reading the responses to [this thread][3] and realized this is something software developers must do a lot.
So this is probably a soft-pitch question, but what is the proper method for documenting object relationships in Visio? Is there a better template to use? What stencil collection is the proper stencil in?
In my probably naive view I imagine an object being a large box with a single "reception" connector and containing multiple smaller boxes, each of which represents an object member and having its own connector. So, each object member field would connect out to the "reception" connector on the object of the member's type. In and of itself those objects are fairly easy to build. The problem I ran into is that the connector lines didn't respect the objects and ran over the top of them, making an awful, unusable mess.
Thanks for any pointers.
[1]: http://nagios.sourceforge.net/docs/3_0/objectdefinitions.html
[2]: http://www.nagios.org/
[3]: http://stackoverflow.com/questions/15446/documenting-program-archetecture | 0 |
15,593 | 08/19/2008 02:45:27 | 1,875 | 08/19/2008 02:23:09 | 1 | 0 | Practical use of System.WeakReference | I understand what [System.WeakReference][1] does, but what I can't seem to grasp is a practical example of what it might be useful for. The class itself seems to me to be, well, a hack. It seems to me that there are other, better means of solving a problem where a WeakReference is used in examples I've seen. What's the canonical example of where you've really got to use a WeakReference? Aren't we trying to get <i>farther</i> away from this type of behavior and use of this class?
[1]: http://msdn.microsoft.com/en-us/library/ms404247.aspx | .net | .net-framework | garbage-collection | null | null | null | open | Practical use of System.WeakReference
===
I understand what [System.WeakReference][1] does, but what I can't seem to grasp is a practical example of what it might be useful for. The class itself seems to me to be, well, a hack. It seems to me that there are other, better means of solving a problem where a WeakReference is used in examples I've seen. What's the canonical example of where you've really got to use a WeakReference? Aren't we trying to get <i>farther</i> away from this type of behavior and use of this class?
[1]: http://msdn.microsoft.com/en-us/library/ms404247.aspx | 0 |
15,621 | 08/19/2008 03:03:30 | 1,511 | 08/16/2008 03:15:00 | 1 | 0 | Subversion question | What is the best way to structure a repository in Subversion for Visual Studio projects? I have a few C# .dll projects which are common to many applications. Currently, I have one big repository. I have each dll stored as a separate project within the repository and every application project stored as a project within the same repository.
I have recently switched to Subversion for source control and I fear that I did not do a good job of structuring the repository. I would like to hear what others are doing. | subversion | null | null | null | null | null | open | Subversion question
===
What is the best way to structure a repository in Subversion for Visual Studio projects? I have a few C# .dll projects which are common to many applications. Currently, I have one big repository. I have each dll stored as a separate project within the repository and every application project stored as a project within the same repository.
I have recently switched to Subversion for source control and I fear that I did not do a good job of structuring the repository. I would like to hear what others are doing. | 0 |
15,632 | 08/19/2008 03:12:27 | 1,580 | 08/16/2008 20:34:26 | 1 | 0 | SSRS - Uninstall Trial Version of VS Business Intelligence | I've been using the Trial version of SQL Server Reporting Services for a while now. My company finally purchased the software from an online distributor, and for support of Oracle, we needed to upgrade to MSSQL 2005 SP2. Anyway, the "full" version of the software would not install, as it was already installed (It seems the installer doesn't recognize what was installed was the trial version). So I tried uninstalling MSSQL 2005, and everything related (including visual studio), I can not seem to get it reinstalled. The error is a vague error message, and when i click the link to get more information, the usual "no information about this error was found" error.
> TITLE: Microsoft SQL Server 2005 Setup
> ------------------------------
>
> There was an unexpected failure during
> the setup wizard. You may review the
> setup logs and/or click the help
> button for more information.
>
>
> For help, click:
> http://go.microsoft.com/fwlink?LinkID=20476&ProdName=Microsoft+SQL+Server&ProdVer=9.00.1399.06&EvtSrc=setup.rll&EvtID=50000&EvtType=packageengine%5cinstallpackageaction.cpp%40InstallToolsAction.11%40sqls%3a%3aInstallPackageAction%3a%3aperform%400x643
>
> ------------------------------ BUTTONS:
>
> OK
> ------------------------------
Bottom line, I wanna know how to fully uninstall MSSQL 2005.
Thanks! | visual-studio | mssql | reporting-services | null | null | null | open | SSRS - Uninstall Trial Version of VS Business Intelligence
===
I've been using the Trial version of SQL Server Reporting Services for a while now. My company finally purchased the software from an online distributor, and for support of Oracle, we needed to upgrade to MSSQL 2005 SP2. Anyway, the "full" version of the software would not install, as it was already installed (It seems the installer doesn't recognize what was installed was the trial version). So I tried uninstalling MSSQL 2005, and everything related (including visual studio), I can not seem to get it reinstalled. The error is a vague error message, and when i click the link to get more information, the usual "no information about this error was found" error.
> TITLE: Microsoft SQL Server 2005 Setup
> ------------------------------
>
> There was an unexpected failure during
> the setup wizard. You may review the
> setup logs and/or click the help
> button for more information.
>
>
> For help, click:
> http://go.microsoft.com/fwlink?LinkID=20476&ProdName=Microsoft+SQL+Server&ProdVer=9.00.1399.06&EvtSrc=setup.rll&EvtID=50000&EvtType=packageengine%5cinstallpackageaction.cpp%40InstallToolsAction.11%40sqls%3a%3aInstallPackageAction%3a%3aperform%400x643
>
> ------------------------------ BUTTONS:
>
> OK
> ------------------------------
Bottom line, I wanna know how to fully uninstall MSSQL 2005.
Thanks! | 0 |
15,635 | 08/19/2008 03:16:05 | 1,881 | 08/19/2008 03:16:05 | 1 | 0 | Using Visual Studio to develop for C++ for Unix | Does anyone have battle stories to share trying to use Visual Studio to develop applications for Unix? And I'm not talking using .NET with a Mono or Wine virtual platform running beneath.
Our company has about 20 developers all running Windows XP/Vista and developing primarily for Linux & Solaris. Until recently we all logged into a main Linux server and modified/built code the good old fashioned way: Emacs, Vi, dtpad - take your pick. Then someone said, "hey - we're living in the Dark Ages, we should be using an IDE".
So we tried out a few and decided that Visual Studio was the only one that would meet our performance needs (yes, I'm sure that IDE X is a very nice IDE, but we chose VS).
The problem is, how do you setup your environment to have the files available locally to VS, but also available to a build server? We settled with writing a Visual Studio plugin - it writes our files locally and to the build server whenever we hit "Save" and we have a bit fat "sync" button that we can push when our files change on the server side (for when we update to the latest files from our source control server).
The plugin also uses Visual Studio's external build system feature that ultimately just ssh's into the build server and calls our local "make" utility (which is Boost Build v2 - has great dependency checking, but is *really* slow to start as a result i.e. 30-60 seconds to begin). The results are piped back into Visual Studio so the developer can click on the error and be taken to the appropriate line of code (quite slick actually). The build server uses GCC and cross-compiles all of our Solaris builds.
But even after we've done all this, I can't help but sigh whenever I start to write code in Visual Studio. I click a file, start typing, and VS chugs to catch up with me.
Is there anything more annoying than having to stop and wait for your tools? Are the benefits worth the frustration?
Thoughts, stories, help?
| c++ | visual-studio | unix | developmentenvironment | null | null | open | Using Visual Studio to develop for C++ for Unix
===
Does anyone have battle stories to share trying to use Visual Studio to develop applications for Unix? And I'm not talking using .NET with a Mono or Wine virtual platform running beneath.
Our company has about 20 developers all running Windows XP/Vista and developing primarily for Linux & Solaris. Until recently we all logged into a main Linux server and modified/built code the good old fashioned way: Emacs, Vi, dtpad - take your pick. Then someone said, "hey - we're living in the Dark Ages, we should be using an IDE".
So we tried out a few and decided that Visual Studio was the only one that would meet our performance needs (yes, I'm sure that IDE X is a very nice IDE, but we chose VS).
The problem is, how do you setup your environment to have the files available locally to VS, but also available to a build server? We settled with writing a Visual Studio plugin - it writes our files locally and to the build server whenever we hit "Save" and we have a bit fat "sync" button that we can push when our files change on the server side (for when we update to the latest files from our source control server).
The plugin also uses Visual Studio's external build system feature that ultimately just ssh's into the build server and calls our local "make" utility (which is Boost Build v2 - has great dependency checking, but is *really* slow to start as a result i.e. 30-60 seconds to begin). The results are piped back into Visual Studio so the developer can click on the error and be taken to the appropriate line of code (quite slick actually). The build server uses GCC and cross-compiles all of our Solaris builds.
But even after we've done all this, I can't help but sigh whenever I start to write code in Visual Studio. I click a file, start typing, and VS chugs to catch up with me.
Is there anything more annoying than having to stop and wait for your tools? Are the benefits worth the frustration?
Thoughts, stories, help?
| 0 |
15,636 | 08/19/2008 03:16:32 | 1,632 | 08/17/2008 17:09:25 | 67 | 8 | Migrating to GIT | What are some good resources and tips for migrating from SVN to GIT? | svn | git | sourcecontrol | null | null | null | open | Migrating to GIT
===
What are some good resources and tips for migrating from SVN to GIT? | 0 |
15,649 | 08/19/2008 03:31:27 | 1,659 | 08/17/2008 20:20:20 | 344 | 44 | Can you really build a fast word processor with GoF Design Patterns? | The Gang of Four's [Design Patterns](http://en.wikipedia.org/wiki/Design_Patterns) uses a word processor as an example for at least a few of their patterns, particularly Composite and Flyweight.
Other than by using C or C++, could you really use those patterns and the object-oriented overhead they entail to write a high-performing fully featured word processor?
I know that Eclipse is written in Java but I haven't used it much so I don't know if it's all that fast or as polished as something like Visual Studio, which has a C++ based text editing system. | java | performance | ide | designpatterns | text-processing | null | open | Can you really build a fast word processor with GoF Design Patterns?
===
The Gang of Four's [Design Patterns](http://en.wikipedia.org/wiki/Design_Patterns) uses a word processor as an example for at least a few of their patterns, particularly Composite and Flyweight.
Other than by using C or C++, could you really use those patterns and the object-oriented overhead they entail to write a high-performing fully featured word processor?
I know that Eclipse is written in Java but I haven't used it much so I don't know if it's all that fast or as polished as something like Visual Studio, which has a C++ based text editing system. | 0 |
15,656 | 08/19/2008 03:39:09 | 1,580 | 08/16/2008 20:34:26 | 1 | 1 | SSRS - Process dies/goes to sleep after not being used | Another SSRS question here: We have a development, a QA, a Prod-Backup and a Production SSRS set of servers. On our production and prod-backup, SSRS will go to sleep if not used for a period of time. This does not occur on our development or QA server. In the corporate environment we're in, we don't have physical (or even remote login) access to these machines, and have to work with a team of remote administrators to configure our SSRS application. We have asked that they fix, if possible, this issue. So far, they haven't been able to identify the issue, and I would like to know if any of my peers know the answer to this question. Thanks. | mssql | reporting-services | null | null | null | null | open | SSRS - Process dies/goes to sleep after not being used
===
Another SSRS question here: We have a development, a QA, a Prod-Backup and a Production SSRS set of servers. On our production and prod-backup, SSRS will go to sleep if not used for a period of time. This does not occur on our development or QA server. In the corporate environment we're in, we don't have physical (or even remote login) access to these machines, and have to work with a team of remote administrators to configure our SSRS application. We have asked that they fix, if possible, this issue. So far, they haven't been able to identify the issue, and I would like to know if any of my peers know the answer to this question. Thanks. | 0 |
15,674 | 08/19/2008 04:08:12 | 1,339 | 08/14/2008 15:11:18 | 45 | 3 | Subversion Revision number across multiple projects | When using Subversion (svn) for source control with multiple projects I've noticed that the revision number increases across all of my projects' directories. To illustrate my svn layout (using fictitious project names):
/NinjaProg/branches
/tags
/trunk
/StealthApp/branches
/tags
/trunk
/SnailApp/branches
/tags
/trunk
When I perform a commit to the trunk of the Ninja Program, let's say I get that it has been updated to revision 7. The next day let's say that I make a small change to the Stealth Application and it comes back as revision 8.
The question is this: **Is it common accepted practice to, when maintaining multiple projects with one Subversion server, to have unrelated projects' revision number increase across all projects?** Or am I doing it wrong and should be creating individual repositories for each project? Or is it something else entirely? | subversion | svn | revision | sourcecontrol | repository | null | open | Subversion Revision number across multiple projects
===
When using Subversion (svn) for source control with multiple projects I've noticed that the revision number increases across all of my projects' directories. To illustrate my svn layout (using fictitious project names):
/NinjaProg/branches
/tags
/trunk
/StealthApp/branches
/tags
/trunk
/SnailApp/branches
/tags
/trunk
When I perform a commit to the trunk of the Ninja Program, let's say I get that it has been updated to revision 7. The next day let's say that I make a small change to the Stealth Application and it comes back as revision 8.
The question is this: **Is it common accepted practice to, when maintaining multiple projects with one Subversion server, to have unrelated projects' revision number increase across all projects?** Or am I doing it wrong and should be creating individual repositories for each project? Or is it something else entirely? | 0 |
15,678 | 08/19/2008 04:13:07 | 470 | 08/06/2008 02:58:55 | 11 | 1 | Can I configure VisualStudio 2008 to always build the startup project? | I have a solution with several projects, where the startup project has a post-build event that does all the copying of "plugin" projects and other organizing tasks. After upgrading the solution from VS 2005 to VS 2008, it appears as though the post-build event only fires if I modify the startup project, which means my updated plugins don't get plugged in to the current debugging session. This makes sense, but it seems like a change in behavior. Is anyone else noticing a change in behavior with regard to which projects get built?
Does anyone know of a workaround that I can use to force the startup project to rebuild whenever I hit F5? Perhaps I configured VS 2005 to work this way so long ago that I've forgotten all about it ... | visual-studio | null | null | null | null | null | open | Can I configure VisualStudio 2008 to always build the startup project?
===
I have a solution with several projects, where the startup project has a post-build event that does all the copying of "plugin" projects and other organizing tasks. After upgrading the solution from VS 2005 to VS 2008, it appears as though the post-build event only fires if I modify the startup project, which means my updated plugins don't get plugged in to the current debugging session. This makes sense, but it seems like a change in behavior. Is anyone else noticing a change in behavior with regard to which projects get built?
Does anyone know of a workaround that I can use to force the startup project to rebuild whenever I hit F5? Perhaps I configured VS 2005 to work this way so long ago that I've forgotten all about it ... | 0 |
15,681 | 08/19/2008 04:15:52 | 1,875 | 08/19/2008 02:23:09 | 11 | 2 | Developer Setup for Starting Out with Cocoa/Mac Programming | I'd like to start experimenting with Cocoa and programming for Mac OSX. I'm not terribly concerned with Objective C syntax/constructs/bheaviors at this point, but more curious as to an efficient setup on in terms of an editor and/or IDE that will get me going quickly. Is there any IDE even remotely similar to Visual Studio (since that's where I've spent most of my time over the last 7 years) in terms of it's solution/project concept? Any other tools, tips, suggestions and/or resources to get up and experimenting quickly?
I'd like to avoid a lot of the intro stuff and get into things like "If you want to create an Mac desktop application, you can use <i>Acme IDE</i> and set up your project like this." | mac | osx | cocoa | null | null | null | open | Developer Setup for Starting Out with Cocoa/Mac Programming
===
I'd like to start experimenting with Cocoa and programming for Mac OSX. I'm not terribly concerned with Objective C syntax/constructs/bheaviors at this point, but more curious as to an efficient setup on in terms of an editor and/or IDE that will get me going quickly. Is there any IDE even remotely similar to Visual Studio (since that's where I've spent most of my time over the last 7 years) in terms of it's solution/project concept? Any other tools, tips, suggestions and/or resources to get up and experimenting quickly?
I'd like to avoid a lot of the intro stuff and get into things like "If you want to create an Mac desktop application, you can use <i>Acme IDE</i> and set up your project like this." | 0 |
15,687 | 08/19/2008 04:22:34 | 307 | 08/04/2008 14:26:05 | 464 | 33 | How can I convert all line endings to CRLF, LF, or CR during SVN operations | So, you are all ready to do a big SVN Commit and it bombs because you have inconsistent line endings in some of your files. Fun part is, you're looking at 1,000s of files spanning dozens of folders of different depths.
What do you do? | language-agnostic | svn | subversion | howto | sourcecontrol | null | open | How can I convert all line endings to CRLF, LF, or CR during SVN operations
===
So, you are all ready to do a big SVN Commit and it bombs because you have inconsistent line endings in some of your files. Fun part is, you're looking at 1,000s of files spanning dozens of folders of different depths.
What do you do? | 0 |
15,690 | 08/19/2008 04:26:33 | 1,650 | 08/17/2008 19:07:22 | 1 | 3 | How do you begin designing a large system? | It's been mentioned to me that I'll be the sole developer behind a large new system. Among other things I'll be designing a UI and database schema.
I'm sure I'll receive some guidance, but I'd like to be able to knock their socks off. What can I do in the meantime to prepare, and what will I need to keep in mind when I sit down at my computer with the spec?
A few things to keep in mind: I'm a college student at my first real programming job. I'll be using Java. We already have SCM set up with automated testing, etc...so tools are not an issue. | java | design | null | null | null | null | open | How do you begin designing a large system?
===
It's been mentioned to me that I'll be the sole developer behind a large new system. Among other things I'll be designing a UI and database schema.
I'm sure I'll receive some guidance, but I'd like to be able to knock their socks off. What can I do in the meantime to prepare, and what will I need to keep in mind when I sit down at my computer with the spec?
A few things to keep in mind: I'm a college student at my first real programming job. I'll be using Java. We already have SCM set up with automated testing, etc...so tools are not an issue. | 0 |
15,694 | 08/19/2008 04:28:54 | 708 | 08/08/2008 06:10:02 | 229 | 12 | Is the .NET Client Profile worth targetting? | I've recently been looking into targeting the .NET Client Profile for a WPF application I am building. However, I was frustrated to notice that the Client Profile is only valid for the following OS configurations:
- Windows XP SP2+
- Windows Server 2003
In addition, the client profile is **not** valid for x64 or ia64 editions; and will also not install if *any previous version of the .NET Framework has been installed*.
I'm wondering if the effort in adding the extra OS configurations to the testing matrix is worth the effort. Is there any metrics available that state the percentage of users that could possibly benefit from the client profile? I believe that once the .NET Framework has been installed, extra information is passed to a web server as part of a web request signifying that the framework is available. Granted, I would imagine that Windows XP SP2 users without the .NET Framework installed would be a large amount of people. It would then be a question of whether my application targeted those individuals specifically.
Has anyone else determined if it is worth the extra effort to target these specific users? | .net | client-profile | null | null | null | null | open | Is the .NET Client Profile worth targetting?
===
I've recently been looking into targeting the .NET Client Profile for a WPF application I am building. However, I was frustrated to notice that the Client Profile is only valid for the following OS configurations:
- Windows XP SP2+
- Windows Server 2003
In addition, the client profile is **not** valid for x64 or ia64 editions; and will also not install if *any previous version of the .NET Framework has been installed*.
I'm wondering if the effort in adding the extra OS configurations to the testing matrix is worth the effort. Is there any metrics available that state the percentage of users that could possibly benefit from the client profile? I believe that once the .NET Framework has been installed, extra information is passed to a web server as part of a web request signifying that the framework is available. Granted, I would imagine that Windows XP SP2 users without the .NET Framework installed would be a large amount of people. It would then be a question of whether my application targeted those individuals specifically.
Has anyone else determined if it is worth the extra effort to target these specific users? | 0 |
15,695 | 08/19/2008 04:29:40 | 1,666 | 08/17/2008 21:07:18 | 21 | 4 | Good Stripes tutorials / examples? | The company I just started working for is using [Stripes][1] for parts of its web page development these days, and while it seems to be a nice enough web framework it seems that no one uses it-- it is almost non existent on the 'net. It's not even first in it's [google search][2] and the result you **do** get is for its old home page.
So, do any of you people use Stripes? Of your own volition? Do you know of any good tutorials / examples?
[1]: http://www.stripesframework.org/display/stripes/Home
[2]: http://www.google.com/search?client=opera&rls=en&q=stripes&sourceid=opera&ie=utf-8&oe=utf-8 | java | stripes | tutorials | null | null | 04/04/2012 04:58:29 | off topic | Good Stripes tutorials / examples?
===
The company I just started working for is using [Stripes][1] for parts of its web page development these days, and while it seems to be a nice enough web framework it seems that no one uses it-- it is almost non existent on the 'net. It's not even first in it's [google search][2] and the result you **do** get is for its old home page.
So, do any of you people use Stripes? Of your own volition? Do you know of any good tutorials / examples?
[1]: http://www.stripesframework.org/display/stripes/Home
[2]: http://www.google.com/search?client=opera&rls=en&q=stripes&sourceid=opera&ie=utf-8&oe=utf-8 | 2 |
15,700 | 08/19/2008 04:32:13 | 1,886 | 08/19/2008 04:20:19 | 1 | 0 | Runtime Configuration in .Net (specifically the EntLib) | I'm looking for a way to configure a DB connection at runtime; specifically using the Enterprise Library. I see that there's a *.Data.Configuration (or something close to this ... don't recall off the top of my head) assembly but am finding not much on the interwebs. Complicating matters is the fact that the API help is broken on Vista.
Now, I found this work-around:
Configuration cfg = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
ConnectionStringSettings connection = new ConnectionStringSettings();
connection.Name = "Runtime Connection";
connection.ProviderName = "System.Data.OleDb";
connection.ConnectionString = "myconstring";
cfg.ConnectionStrings.ConnectionStrings.Add(connection);
cfg.Save(ConfigurationSaveMode.Modified);
ConfigurationManager.RefreshSection("connectionStrings");
var runtimeCon = DatabaseFactory.CreateDatabase("Runtime Connection");
And although it gives me what I want, it permanently edits the App.config. Sure I can go back and delete the changes, but I'd rather not go through this hassle.
Thanks! | .net | connectionstring | enterpriselibrary | null | null | null | open | Runtime Configuration in .Net (specifically the EntLib)
===
I'm looking for a way to configure a DB connection at runtime; specifically using the Enterprise Library. I see that there's a *.Data.Configuration (or something close to this ... don't recall off the top of my head) assembly but am finding not much on the interwebs. Complicating matters is the fact that the API help is broken on Vista.
Now, I found this work-around:
Configuration cfg = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
ConnectionStringSettings connection = new ConnectionStringSettings();
connection.Name = "Runtime Connection";
connection.ProviderName = "System.Data.OleDb";
connection.ConnectionString = "myconstring";
cfg.ConnectionStrings.ConnectionStrings.Add(connection);
cfg.Save(ConfigurationSaveMode.Modified);
ConfigurationManager.RefreshSection("connectionStrings");
var runtimeCon = DatabaseFactory.CreateDatabase("Runtime Connection");
And although it gives me what I want, it permanently edits the App.config. Sure I can go back and delete the changes, but I'd rather not go through this hassle.
Thanks! | 0 |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.