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
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
34,781 | 08/29/2008 17:16:59 | 577 | 08/06/2008 21:36:25 | 71 | 6 | How do you build a ratings implementation? | We have need for a "rating" system in a project we are working on, similar to the one in SO. However, in ours there are multiple entities that need to be "tagged" with a vote up (only up, never down, like an increment). Sometimes we will need to show all of the entities in order of what is rated highest, regardless of entity type, basically mixing the result sets, I guess. What data structures / algorithms do you use to implement this so that is flexible and still scalable? | algorithm | data-structures | database-design | null | null | null | open | How do you build a ratings implementation?
===
We have need for a "rating" system in a project we are working on, similar to the one in SO. However, in ours there are multiple entities that need to be "tagged" with a vote up (only up, never down, like an increment). Sometimes we will need to show all of the entities in order of what is rated highest, regardless of entity type, basically mixing the result sets, I guess. What data structures / algorithms do you use to implement this so that is flexible and still scalable? | 0 |
34,784 | 08/29/2008 17:17:40 | 925 | 08/10/2008 16:16:15 | 53 | 9 | mercurial setup for visual studion 2008 projects | What is a good setup for .hgignore file when working with Visual Studio 2008?
I mostly develop on my own, only occasionly I clone the repository for somebody else to work on it.
I'm thinking about obj folders, .suo, .sln, .user files etc.. Can they just be included or are there file I shouldn't include?
Thanks! | mercurial | distributed | versioning | visual-studio-2008 | null | null | open | mercurial setup for visual studion 2008 projects
===
What is a good setup for .hgignore file when working with Visual Studio 2008?
I mostly develop on my own, only occasionly I clone the repository for somebody else to work on it.
I'm thinking about obj folders, .suo, .sln, .user files etc.. Can they just be included or are there file I shouldn't include?
Thanks! | 0 |
34,785 | 08/29/2008 17:17:42 | 3,044 | 08/26/2008 13:31:46 | 247 | 25 | When/if to seek a patent? | I am working part-time on a personal project, and it's been going very well. I've shown it to a few people, and they are all extremely enthusiastic, so I've been considering actually finishing it up, adding some bells and whistles, and selling it.
One key feature of the product is a certain combination of user interface and functionality that I haven't ever seen before, and which, in my humble opinion, is both very useful and very cool - it makes (I hope) a very unique and compelling selling point, particularly to a certain demographic.
I'm not sure if or how I should seek a patent on this feature before I release it. I have no budget for this, only my personal time and money, so spending thousands of dollars on a lawyer probably isn't an option.
To be honest, I don't really care about having a monopoly on the the idea... if others imitate me, that will prove I've had enough success myself that I'm probably going to be happy. If I could pay off half my student loans, I'd consider that a smashing success. I'm somewhat libertarian, philosophically, and tend to regard patents as a rather necessary evil.
On the other hand, part of me says that I shouldn't close doors on myself, and if, by some miracle, my product really does become popular and I end up starting a company based off of it, I'm not going to want to limit my success. This scenario is unlikely, I know, but still, I'm not sure if I should consider this or not. And an even bigger concern... having a patent might provide some negotiating power or legal backing if I should draw attention from a certain huge, punitive software company who decides they want what I have.
Additionally, there is the logical possibility that someone else has already patented a similar idea. If that is the case, would I be better off not even looking for it? I know that damages are much, much higher for willful infringement, but much less if I did due diligence in trying to find existing patents. I guess it would at least give me a position to work from, and adjust it so as not to actually infringe, before I release. But is this even possible to do myself, or do I need to hire an expensive lawyer in order to have any confidence in my findings? | legal | business | null | null | null | 05/06/2012 23:06:32 | off topic | When/if to seek a patent?
===
I am working part-time on a personal project, and it's been going very well. I've shown it to a few people, and they are all extremely enthusiastic, so I've been considering actually finishing it up, adding some bells and whistles, and selling it.
One key feature of the product is a certain combination of user interface and functionality that I haven't ever seen before, and which, in my humble opinion, is both very useful and very cool - it makes (I hope) a very unique and compelling selling point, particularly to a certain demographic.
I'm not sure if or how I should seek a patent on this feature before I release it. I have no budget for this, only my personal time and money, so spending thousands of dollars on a lawyer probably isn't an option.
To be honest, I don't really care about having a monopoly on the the idea... if others imitate me, that will prove I've had enough success myself that I'm probably going to be happy. If I could pay off half my student loans, I'd consider that a smashing success. I'm somewhat libertarian, philosophically, and tend to regard patents as a rather necessary evil.
On the other hand, part of me says that I shouldn't close doors on myself, and if, by some miracle, my product really does become popular and I end up starting a company based off of it, I'm not going to want to limit my success. This scenario is unlikely, I know, but still, I'm not sure if I should consider this or not. And an even bigger concern... having a patent might provide some negotiating power or legal backing if I should draw attention from a certain huge, punitive software company who decides they want what I have.
Additionally, there is the logical possibility that someone else has already patented a similar idea. If that is the case, would I be better off not even looking for it? I know that damages are much, much higher for willful infringement, but much less if I did due diligence in trying to find existing patents. I guess it would at least give me a position to work from, and adjust it so as not to actually infringe, before I release. But is this even possible to do myself, or do I need to hire an expensive lawyer in order to have any confidence in my findings? | 2 |
34,790 | 08/29/2008 17:19:25 | 3,468 | 08/28/2008 17:05:59 | 41 | 5 | duplicating jquery datepicker | the datepicker function only works on the first input box that is created.
i'm trying to duplicate a datepicker by cloning the div that is containing it.
<a href="#" id="dupMe">click</a>
<div id="template">
input-text <input type="text" value="text1" id="txt" />
date time picker <input type="text" id="example" value="(add date)" />
</div>
to initialize the datepicker, according to the [jQuery UI documentation][1] I only have to do $('#example').datepicker(); and it does work but only on the first datepicker that is created.
the code to duplicate the div is the following
$("a#dupMe").click(function(event){
event.preventDefault();
i++;
var a = $("#template").clone(true).insertBefore("#template").hide().fadeIn(1000);
a.find("input#txt").attr('value', i);
a.find("input#example").datepicker();
});
the strangest thing is that on the document.ready i have
$('#template #example').datepicker();
$("#template #txt").click(function() { alert($(this).val()); });
and if i click on the #txt it always works.
[1]: http://docs.jquery.com/UI/Datepicker | jquery | null | null | null | null | null | open | duplicating jquery datepicker
===
the datepicker function only works on the first input box that is created.
i'm trying to duplicate a datepicker by cloning the div that is containing it.
<a href="#" id="dupMe">click</a>
<div id="template">
input-text <input type="text" value="text1" id="txt" />
date time picker <input type="text" id="example" value="(add date)" />
</div>
to initialize the datepicker, according to the [jQuery UI documentation][1] I only have to do $('#example').datepicker(); and it does work but only on the first datepicker that is created.
the code to duplicate the div is the following
$("a#dupMe").click(function(event){
event.preventDefault();
i++;
var a = $("#template").clone(true).insertBefore("#template").hide().fadeIn(1000);
a.find("input#txt").attr('value', i);
a.find("input#example").datepicker();
});
the strangest thing is that on the document.ready i have
$('#template #example').datepicker();
$("#template #txt").click(function() { alert($(this).val()); });
and if i click on the #txt it always works.
[1]: http://docs.jquery.com/UI/Datepicker | 0 |
34,798 | 08/29/2008 17:21:32 | 2,486 | 08/22/2008 13:39:26 | 25 | 7 | Entire Page refreshes even though gridview is in an update panel | I have a gridview that is within an updatepanel for a modal popup I have on a page.
The issue is that the entire page refreshes every time I click an imagebutton that is within my gridview. This causes my entire page to load and since I have grayed out the rest of the page so that the user cannot click on it this is very annoying.
Does any one know what I am missing. | gridview | updatepanel | null | null | null | null | open | Entire Page refreshes even though gridview is in an update panel
===
I have a gridview that is within an updatepanel for a modal popup I have on a page.
The issue is that the entire page refreshes every time I click an imagebutton that is within my gridview. This causes my entire page to load and since I have grayed out the rest of the page so that the user cannot click on it this is very annoying.
Does any one know what I am missing. | 0 |
34,802 | 08/29/2008 17:22:59 | 317 | 08/04/2008 15:43:28 | 305 | 15 | ValidationRule To Enforce Unique Name | I'm trying to write a custom WPF ValidationRule to enforce that a certain property is unique within the context of a given collection. For example: I am editing a collection of custom objects bound to a ListView and I need to ensure that the Name property of each object in the collection is unique. Does anyone know how to do this? | wpf | validation | data-binding | null | null | null | open | ValidationRule To Enforce Unique Name
===
I'm trying to write a custom WPF ValidationRule to enforce that a certain property is unique within the context of a given collection. For example: I am editing a collection of custom objects bound to a ListView and I need to ensure that the Name property of each object in the collection is unique. Does anyone know how to do this? | 0 |
34,806 | 08/29/2008 17:29:38 | 1,782 | 08/18/2008 14:30:58 | 1,078 | 76 | Classes design decision | I have a little dilemma that maybe you can help me sort out.
I've been working today in modifying ASP.NET's Membership to add a level of indirection. Basically, ASP.NET's Membership supports Users and Roles, leaving all authorization rules to be based on whether a user belongs to a Role or not.
What I need to do is add the concept of Function, where a user will belong to a role (or roles) and the role will have one or more functions associated with them, allowing us to authorize a specific action based on if the user belongs to a role which has a function assigned.
Having said that, my problem has nothing to do with it, it's a generic class design issue.
I want to provide an abstract method in my base RoleProvider class to create the function (and persist it), but I want to make it optional to save a description for that function, so I need to create my CreateFunction method with an overload, one signature accepting the name, and the other accepting the name and the description.
I can think of the following scenarios:
1. Create both signatures with the abstract modifier. This has the problem that the implementer may not respect the best practice that says that one overload should call the other one with the parameters normalized, and the logic should only be in the final one (the one with all the parameters). Besides, it's not nice to require both methods to be implemented by the developer.
2. Create the first like virtual, and the second like abstract. Call the second from the first, allow the implementer to override the behavior. It has the same problem, the implementer could make "bad decisions" when overriding it.
3. Same as before, but do not allow the first to be overriden (remove the virtual modifier). The problem here is that the implementer has to be aware that the method could be called with a null description and has to handle that situation.
I think the best option is the third one...
How is this scenario handled in general? When you design an abstract class and it contains overloaded methods. It isn't that uncommon I think...
| oop | asp.net-membership | inheritance | null | null | null | open | Classes design decision
===
I have a little dilemma that maybe you can help me sort out.
I've been working today in modifying ASP.NET's Membership to add a level of indirection. Basically, ASP.NET's Membership supports Users and Roles, leaving all authorization rules to be based on whether a user belongs to a Role or not.
What I need to do is add the concept of Function, where a user will belong to a role (or roles) and the role will have one or more functions associated with them, allowing us to authorize a specific action based on if the user belongs to a role which has a function assigned.
Having said that, my problem has nothing to do with it, it's a generic class design issue.
I want to provide an abstract method in my base RoleProvider class to create the function (and persist it), but I want to make it optional to save a description for that function, so I need to create my CreateFunction method with an overload, one signature accepting the name, and the other accepting the name and the description.
I can think of the following scenarios:
1. Create both signatures with the abstract modifier. This has the problem that the implementer may not respect the best practice that says that one overload should call the other one with the parameters normalized, and the logic should only be in the final one (the one with all the parameters). Besides, it's not nice to require both methods to be implemented by the developer.
2. Create the first like virtual, and the second like abstract. Call the second from the first, allow the implementer to override the behavior. It has the same problem, the implementer could make "bad decisions" when overriding it.
3. Same as before, but do not allow the first to be overriden (remove the virtual modifier). The problem here is that the implementer has to be aware that the method could be called with a null description and has to handle that situation.
I think the best option is the third one...
How is this scenario handled in general? When you design an abstract class and it contains overloaded methods. It isn't that uncommon I think...
| 0 |
34,809 | 08/29/2008 17:30:15 | 392 | 08/05/2008 12:29:07 | 914 | 50 | What Is The Best Way To Tell If An Object is Modified? | I have an object that is mapped to a cookie as a serialized base-64 string. I only want to write out a new cookie if there are changes made to the object stored in the cookie on server-side.
What I want to do is get a hash code when the object is pulled from the cookie/initialized and compare the original hash code to the hash code that exists just before I send the cookie header off to the client to ensure I don't have to re-serialize/send the cookie unless changes were made.
I was going to override the Object.GetHashCode() method, but I wasn't sure that this is the best way to go about checking if an object is modified.
Are there any other ways I can check if an object is modified, or should I override the `GetHashCode()` method. | c# | null | null | null | null | null | open | What Is The Best Way To Tell If An Object is Modified?
===
I have an object that is mapped to a cookie as a serialized base-64 string. I only want to write out a new cookie if there are changes made to the object stored in the cookie on server-side.
What I want to do is get a hash code when the object is pulled from the cookie/initialized and compare the original hash code to the hash code that exists just before I send the cookie header off to the client to ensure I don't have to re-serialize/send the cookie unless changes were made.
I was going to override the Object.GetHashCode() method, but I wasn't sure that this is the best way to go about checking if an object is modified.
Are there any other ways I can check if an object is modified, or should I override the `GetHashCode()` method. | 0 |
34,818 | 08/29/2008 17:34:46 | 357 | 08/05/2008 01:29:23 | 1,069 | 65 | SQL Server - Does column order matter? | In terms of performance and optimizations:
- When constructing a table in SQL Server, does it matter what order I put the columns in?
- Does it matter if my primary key is the first column?
- When constructing a multi-field index, does it matter if the columns are adjacent?
- Using ALTER TABLE syntax, is it possible to specify in what position I want to add a column?
- If not, how can I move a column to a difference position? | sql-server | performance | optimization | null | null | null | open | SQL Server - Does column order matter?
===
In terms of performance and optimizations:
- When constructing a table in SQL Server, does it matter what order I put the columns in?
- Does it matter if my primary key is the first column?
- When constructing a multi-field index, does it matter if the columns are adjacent?
- Using ALTER TABLE syntax, is it possible to specify in what position I want to add a column?
- If not, how can I move a column to a difference position? | 0 |
34,848 | 08/29/2008 17:47:46 | 1,349,865 | 08/28/2008 22:42:35 | 1 | 5 | Using Zend Framework and setting a Zend_Form_Element form field to be required, how do I change the validator used to ensure that the element is not blank | When using a Zend_Form, the only way to validate that a input is not left blank is to do
$element->setRequired(true);
If this is not set and the element is blank, it appears to me that validation is not run on the element.
If I do use setRequired(), the element is automatically given the standard NotEmpty validator. The thing is that the error message with this validator sucks, "Value is empty, but a non-empty value is required". I want to change this message. At the moment I have done this by changing the Zend_Validate_NotEmpty class, but this is a bit hacky.
I would ideally like to be able to use my own class (derived from Zend_Validate_NotEmpty) to perform the not empty check. | php | zend | zend-framework | form-validation | null | null | open | Using Zend Framework and setting a Zend_Form_Element form field to be required, how do I change the validator used to ensure that the element is not blank
===
When using a Zend_Form, the only way to validate that a input is not left blank is to do
$element->setRequired(true);
If this is not set and the element is blank, it appears to me that validation is not run on the element.
If I do use setRequired(), the element is automatically given the standard NotEmpty validator. The thing is that the error message with this validator sucks, "Value is empty, but a non-empty value is required". I want to change this message. At the moment I have done this by changing the Zend_Validate_NotEmpty class, but this is a bit hacky.
I would ideally like to be able to use my own class (derived from Zend_Validate_NotEmpty) to perform the not empty check. | 0 |
34,858 | 08/29/2008 17:52:23 | 1,736 | 08/18/2008 11:29:16 | 53 | 9 | How to benchmark a SQL Sever Query? | I'd like to know the standard way to benchmark a SQL Sever Query, preferibly I'd like to know about the tools that come with SQL Server rather than 3rd Party tools. | sql-server | database | benchmarking | null | null | null | open | How to benchmark a SQL Sever Query?
===
I'd like to know the standard way to benchmark a SQL Sever Query, preferibly I'd like to know about the tools that come with SQL Server rather than 3rd Party tools. | 0 |
34,868 | 08/29/2008 17:57:50 | 2,687 | 08/24/2008 14:45:10 | 63 | 3 | How do you create optional arguments in php? | In the php manual they describe functions like so:
string **date** ( string $format [, int $timestamp ] )
How would this function look when you define it? | php | null | null | null | null | null | open | How do you create optional arguments in php?
===
In the php manual they describe functions like so:
string **date** ( string $format [, int $timestamp ] )
How would this function look when you define it? | 0 |
34,879 | 08/29/2008 18:01:15 | 2,469 | 08/22/2008 12:41:47 | 151 | 15 | Print out the keys and Data of a Hashtable in C# .NET 1.1 | I need debug some old code that uses a Hashtable to store response from various threads.
I need a way to go through the entire Hashtable and print out both keys and the data in the Hastable.
How can this be done? | c# | .net | hashtable | null | null | null | open | Print out the keys and Data of a Hashtable in C# .NET 1.1
===
I need debug some old code that uses a Hashtable to store response from various threads.
I need a way to go through the entire Hashtable and print out both keys and the data in the Hastable.
How can this be done? | 0 |
34,896 | 08/29/2008 18:07:04 | 2,628 | 08/23/2008 18:34:26 | 250 | 6 | When is it Best to Sanitize User Input? | User equals untrustworthy. Never trust untrustworthy user's input. I get that. However, I am wondering when the best time to sanitize input is. For example, do you blindly store user input and then sanitize it whenever it is accessed/used, or do you sanitize the input immediately and then store this "cleaned" version? Maybe there are also some other approaches I haven't though of in addition to these. I am leaning more towards the first method, because any data that came from user input must still be approached cautiously, where the "cleaned" data might still unknowingly or accidentally be dangerous. Either way, what method do people think is best, and for what reasons? | sanitization | user-input | sanitize-now | sanitize-later | null | null | open | When is it Best to Sanitize User Input?
===
User equals untrustworthy. Never trust untrustworthy user's input. I get that. However, I am wondering when the best time to sanitize input is. For example, do you blindly store user input and then sanitize it whenever it is accessed/used, or do you sanitize the input immediately and then store this "cleaned" version? Maybe there are also some other approaches I haven't though of in addition to these. I am leaning more towards the first method, because any data that came from user input must still be approached cautiously, where the "cleaned" data might still unknowingly or accidentally be dangerous. Either way, what method do people think is best, and for what reasons? | 0 |
34,898 | 08/29/2008 18:08:41 | 3,012 | 08/26/2008 11:55:24 | 36 | 5 | Where can I find a list of upcoming software development conferences? | There are a large number of software development conferences held around the world every year, but I've yet to find a website that contains anything approaching a comprehensive list of them all. Does anyone know of one?
I'm particularly interested in conferences held in the US or UK for Microsoft products or technologies, as well as conferences focusing on best practices for architecture and process. | education | conferences | null | null | null | null | open | Where can I find a list of upcoming software development conferences?
===
There are a large number of software development conferences held around the world every year, but I've yet to find a website that contains anything approaching a comprehensive list of them all. Does anyone know of one?
I'm particularly interested in conferences held in the US or UK for Microsoft products or technologies, as well as conferences focusing on best practices for architecture and process. | 0 |
34,913 | 08/29/2008 18:11:45 | 2,034 | 08/19/2008 21:29:30 | 1 | 0 | C# Linq Grouping | I'm experimenting with Linq and am having trouble figuring out grouping I've gone through several tutorials but for some reason can't figure this out.
As an example, say I have a table (SiteStats) with multiple website IDs that stores a count of how many visitors by type have accessed each site in total and for the past 30 days.
SiteID.........VisitorType.........Last30........Total
.......1.......................1................10.........100
.......1.......................2................40.........140
.......2.......................1................20.........180
etc.
In SQL, I can easily get the counts for SiteID 1 with the following:
SELECT SiteID,
SUM(Last30) AS Last30Sum
FROM Sites
WHERE SiteID = 1
GROUP BY SiteID
and should get a row like
SiteID.........Last30Total
.......1......................50
However I'm not sure how to get this result using Linq. I've tried
var statsRecord = from ss in db.SiteStats
where ss.SiteId == siteId
group ss by ss.SiteId into ss
select ss;
but I'm not able to get back the total with something like
statsRecord.Last30
Can someone please let me know where I'm going wrong. Any help is appreciated.
| c# | linq | null | null | null | null | open | C# Linq Grouping
===
I'm experimenting with Linq and am having trouble figuring out grouping I've gone through several tutorials but for some reason can't figure this out.
As an example, say I have a table (SiteStats) with multiple website IDs that stores a count of how many visitors by type have accessed each site in total and for the past 30 days.
SiteID.........VisitorType.........Last30........Total
.......1.......................1................10.........100
.......1.......................2................40.........140
.......2.......................1................20.........180
etc.
In SQL, I can easily get the counts for SiteID 1 with the following:
SELECT SiteID,
SUM(Last30) AS Last30Sum
FROM Sites
WHERE SiteID = 1
GROUP BY SiteID
and should get a row like
SiteID.........Last30Total
.......1......................50
However I'm not sure how to get this result using Linq. I've tried
var statsRecord = from ss in db.SiteStats
where ss.SiteId == siteId
group ss by ss.SiteId into ss
select ss;
but I'm not able to get back the total with something like
statsRecord.Last30
Can someone please let me know where I'm going wrong. Any help is appreciated.
| 0 |
34,914 | 08/29/2008 18:12:01 | 3,657 | 08/29/2008 17:57:49 | 1 | 1 | How do you use XML::Parser with Style => 'Objects' | The manual page for XML::Parser::Style::Objects is horrible. A simple hello world style program would really be helpful.
I really wanted to do something like this: (not real code of course)
use XML::Parser;
my $p = XML::Parser->new(Style => 'Objects', Pkg => 'MyNode');
my $tree = $p->parsefile('foo.xml');
$tree->doSomething();
MyNode::doSomething() {
my $self = shift;
print "This is a normal node";
for $kid ($self->Kids)
{
$kid->doSomething();
}
}
MyNode::special::doSomething() {
my $self = shift;
print "This is a special node";
}
| xml | perl | null | null | null | null | open | How do you use XML::Parser with Style => 'Objects'
===
The manual page for XML::Parser::Style::Objects is horrible. A simple hello world style program would really be helpful.
I really wanted to do something like this: (not real code of course)
use XML::Parser;
my $p = XML::Parser->new(Style => 'Objects', Pkg => 'MyNode');
my $tree = $p->parsefile('foo.xml');
$tree->doSomething();
MyNode::doSomething() {
my $self = shift;
print "This is a normal node";
for $kid ($self->Kids)
{
$kid->doSomething();
}
}
MyNode::special::doSomething() {
my $self = shift;
print "This is a special node";
}
| 0 |
34,916 | 08/29/2008 18:12:30 | 985 | 08/11/2008 12:12:42 | 81 | 8 | Scaffoling in pylons | Is there anything similar to rails' scaffolding fo pylons? I've been poking around google, but fofund only this thing caled dbsprockets, which is fine, although probably way to much for my needs. What i really need is a basic CRUD thas is based on the SQLAlchemy model. | python | pylons | null | null | null | null | open | Scaffoling in pylons
===
Is there anything similar to rails' scaffolding fo pylons? I've been poking around google, but fofund only this thing caled dbsprockets, which is fine, although probably way to much for my needs. What i really need is a basic CRUD thas is based on the SQLAlchemy model. | 0 |
34,920 | 08/29/2008 18:13:21 | 1,539 | 08/16/2008 13:31:36 | 1 | 3 | File Lock in Perl | What is the best way to create a lock on a file in PERL? | perl | files | locking | null | null | null | open | File Lock in Perl
===
What is the best way to create a lock on a file in PERL? | 0 |
34,924 | 08/29/2008 18:14:44 | 1,226 | 08/13/2008 13:55:55 | 165 | 12 | 3.1 or 5.1 audio in Flash | Is it possible to do 3.1 or 5.1 audio using Flash? We're starting a project here for an interactive kiosk, and we've been told to use Flash. However, we also have a requirement to support either 3.1 or 5.1 audio (where 5.1 is the most wanted feature).
I haven't done any high-tech audio stuff using Flash, so I was wondering if anyone knew if it was possible to do?
Thanks. | flash | audio | 3.1 | 5.1 | null | null | open | 3.1 or 5.1 audio in Flash
===
Is it possible to do 3.1 or 5.1 audio using Flash? We're starting a project here for an interactive kiosk, and we've been told to use Flash. However, we also have a requirement to support either 3.1 or 5.1 audio (where 5.1 is the most wanted feature).
I haven't done any high-tech audio stuff using Flash, so I was wondering if anyone knew if it was possible to do?
Thanks. | 0 |
34,925 | 08/29/2008 18:15:04 | 2,314 | 08/21/2008 15:33:37 | 212 | 16 | XmlSerializer changes in .NET 3.5 SP1 | I've seen quite a few posts on changes in .NET 3.5 SP1, but stumbled into one that I've yet to see documentation for yesterday. I had code working just fine on my machine, from VS, msbuild command line, everything, but it failed on the build server (running .NET 3.5 RTM).
[XmlRoot("foo")]
public class Foo
{
static void Main()
{
XmlSerializer serializer = new XmlSerializer(typeof(Foo));
string xml = @"<foo name='ack' />";
using (StringReader sr = new StringReader(xml))
{
Foo foo = serializer.Deserialize(sr) as Foo;
}
}
[XmlAttribute("name")]
public string Name { get; set; }
public Foo Bar { get; private set; }
}
In SP1, the above code runs just fine. In RTM, you get an InvalidOperationException:
> Unable to generate a temporary class (result=1).
> error CS0200: Property or indexer 'ConsoleApplication2.Foo.Bar' cannot be assign to -- it is read only
Of course, all that's needed to make it run under RTM is adding [XmlIgnore] to the Bar property.
My google fu is apparently not up to finding documentation of these kinds of changes. Is there a change list anywhere that lists this change (and similar under-the-hood changes that might jump up and shout "gotcha")? Is this a bug or a feature? | sp1 | .net3.5 | null | null | null | null | open | XmlSerializer changes in .NET 3.5 SP1
===
I've seen quite a few posts on changes in .NET 3.5 SP1, but stumbled into one that I've yet to see documentation for yesterday. I had code working just fine on my machine, from VS, msbuild command line, everything, but it failed on the build server (running .NET 3.5 RTM).
[XmlRoot("foo")]
public class Foo
{
static void Main()
{
XmlSerializer serializer = new XmlSerializer(typeof(Foo));
string xml = @"<foo name='ack' />";
using (StringReader sr = new StringReader(xml))
{
Foo foo = serializer.Deserialize(sr) as Foo;
}
}
[XmlAttribute("name")]
public string Name { get; set; }
public Foo Bar { get; private set; }
}
In SP1, the above code runs just fine. In RTM, you get an InvalidOperationException:
> Unable to generate a temporary class (result=1).
> error CS0200: Property or indexer 'ConsoleApplication2.Foo.Bar' cannot be assign to -- it is read only
Of course, all that's needed to make it run under RTM is adding [XmlIgnore] to the Bar property.
My google fu is apparently not up to finding documentation of these kinds of changes. Is there a change list anywhere that lists this change (and similar under-the-hood changes that might jump up and shout "gotcha")? Is this a bug or a feature? | 0 |
34,926 | 08/29/2008 18:16:14 | 3,661 | 08/29/2008 18:16:14 | 1 | 0 | Strip HTML in SSRS (VB.NET) | my DataSet returns a field with HTML, e.g.
<b>blah blah </b><i> blah </i>.
how do i strip all the HTML tags? has to be done with inline VB.NET
Changing the data in the table is not an option.
thank you | vb.net | reporting-services | null | null | null | null | open | Strip HTML in SSRS (VB.NET)
===
my DataSet returns a field with HTML, e.g.
<b>blah blah </b><i> blah </i>.
how do i strip all the HTML tags? has to be done with inline VB.NET
Changing the data in the table is not an option.
thank you | 0 |
34,938 | 08/29/2008 18:21:17 | 2,083 | 08/20/2008 08:52:59 | 251 | 9 | if statement condition optimisation | I have an if statment with two conditions (seperated by an OR operator), one of the conditions covers +70% of situations and takes far less time to process/execute than the second condition, so in the interests of speed i only want the second condition to be processed if the first condition evaluates to false.
if i order the conditions so that the first condition (the quicker one) appears in the if statment first - on the occasions where this condition is met and evaluates true is the second condition even processed ?
if ( (condition1) | (condition2) ){
// do this
}
or would i need to nest two if statements to only check the second condition if the first evaluates to false ?
if (condition1){
// do this
}else if (condition2){
// do this
}
I am working in php, however i assume that this may be language-agnostic.
Thanks | php | language-agnostic | conditional | null | null | null | open | if statement condition optimisation
===
I have an if statment with two conditions (seperated by an OR operator), one of the conditions covers +70% of situations and takes far less time to process/execute than the second condition, so in the interests of speed i only want the second condition to be processed if the first condition evaluates to false.
if i order the conditions so that the first condition (the quicker one) appears in the if statment first - on the occasions where this condition is met and evaluates true is the second condition even processed ?
if ( (condition1) | (condition2) ){
// do this
}
or would i need to nest two if statements to only check the second condition if the first evaluates to false ?
if (condition1){
// do this
}else if (condition2){
// do this
}
I am working in php, however i assume that this may be language-agnostic.
Thanks | 0 |
34,955 | 08/29/2008 18:27:44 | 3,575 | 08/29/2008 06:54:39 | 16 | 3 | Best practices for debugging linking errors. | When building projects in C++, I've found debugging linking errors to be tricky, especially when picking up other people's code. What strategies do people use for debugging and fixing linking errors? | c++ | gcc | visual-studio | linker | compilation | null | open | Best practices for debugging linking errors.
===
When building projects in C++, I've found debugging linking errors to be tricky, especially when picking up other people's code. What strategies do people use for debugging and fixing linking errors? | 0 |
34,968 | 08/29/2008 18:35:42 | 2,603 | 08/23/2008 13:46:11 | 16 | 1 | Best (cheapest) ssl certificates | I'm looking for cheap ssl certs for running a personal website over https without triggering Firefox's "you may be facing a man-in-the-middle-attack" response that self signed certs provoke. Nothing particularly fancy, no EV, etc. Any recommendations/where do you get your certificates from? | ssl | null | null | null | null | 01/30/2012 00:25:58 | not constructive | Best (cheapest) ssl certificates
===
I'm looking for cheap ssl certs for running a personal website over https without triggering Firefox's "you may be facing a man-in-the-middle-attack" response that self signed certs provoke. Nothing particularly fancy, no EV, etc. Any recommendations/where do you get your certificates from? | 4 |
34,973 | 08/29/2008 18:37:02 | 3,429 | 08/28/2008 14:49:15 | 1 | 1 | Tools for finding memory corruption in managed c++ code? | I have a .NET application, which is using an open source C++ compression library for compressing images. We are accessing the C++ library via managed C++. I'm seeing heap corruption during compression. A call to _CrtIsValidHeapPointer is finding an error on a call to free() when cleaning up after compression.
My question is, are there tools such as Purify to help diagnosis this problem and what is causing the heap corruption when working in a combination of managed and unmanaged code? I do have the exception caught in the debugger, but it would be nice to have other tools to help find the solution to the problem. | .net | managed-c++ | null | null | null | null | open | Tools for finding memory corruption in managed c++ code?
===
I have a .NET application, which is using an open source C++ compression library for compressing images. We are accessing the C++ library via managed C++. I'm seeing heap corruption during compression. A call to _CrtIsValidHeapPointer is finding an error on a call to free() when cleaning up after compression.
My question is, are there tools such as Purify to help diagnosis this problem and what is causing the heap corruption when working in a combination of managed and unmanaged code? I do have the exception caught in the debugger, but it would be nice to have other tools to help find the solution to the problem. | 0 |
34,975 | 08/29/2008 18:38:05 | 2,328 | 08/21/2008 16:45:54 | 419 | 22 | Branching Strategies | The company I work for is starting to have issues with their current branching model, and I was wondering what different kinds of branching strategies the community has been exposed to?
Are there any good ones for different situations? What does your company use? What are the advantages and disadvantages of them? | version-control | branch | null | null | null | 02/24/2012 19:53:51 | not constructive | Branching Strategies
===
The company I work for is starting to have issues with their current branching model, and I was wondering what different kinds of branching strategies the community has been exposed to?
Are there any good ones for different situations? What does your company use? What are the advantages and disadvantages of them? | 4 |
34,977 | 08/29/2008 18:38:42 | 3,663 | 08/29/2008 18:38:42 | 1 | 0 | Byte level length description | I have a protocol that requires a length field up to 32-bits, and it must be
generated at runtime to describe how many bytes are in a given packet.
The code below is kind of ugly but I am wondering if this can be refactored to
be slightly more efficient or easily understandable. The problem is that the
code will only generate enough bytes to describe the lenght of the packet, so
less than 255 bytes = 1 byte of length, less than 65535 = 2 bytes of length
etc...
{
extern char byte_stream[];
int bytes = offset_in_packet;
int n = length_of_packet;
/* Under 4 billion, so this can be represented in 32 bits. */
int t;
/* 32-bit number used for temporary storage. */
/* These are the bytes we will break up n into. */
unsigned char first, second, third, fourth;
t = n & 0xFF000000;
/* We have used AND to "mask out" the first byte of the number. */
/* The only bits which can be on in t are the first 8 bits. */
first = t >> 24;
if (t) {
printf("byte 1: 0x%02x\n",first );
byte_stream[bytes] = first; bytes++;
write_zeros = 1;
}
/* Now we shift t so that it is between 0 and 255. This is the first, highest byte of n. */
t = n & 0x00FF0000;
second = t >> 16;
if (t || write_zeros) {
printf("byte 2: 0x%02x\n", second );
byte_stream[bytes] = second; bytes++;
write_zeros = 1;
}
t = n & 0x0000FF00;
third = t >> 8;
if ( t || write_zeros) {
printf("byte 3: 0x%02x\n", third );
byte_stream[bytes] = third; bytes++;
write_zeros = 1;
}
t = n & 0x000000FF;
fourth = t;
if (t || write_zeros) {
printf("byte 4: 0x%02x\n", fourth);
byte_stream[bytes] = fourth; bytes++;
}
}
| c | length | protocol | null | null | null | open | Byte level length description
===
I have a protocol that requires a length field up to 32-bits, and it must be
generated at runtime to describe how many bytes are in a given packet.
The code below is kind of ugly but I am wondering if this can be refactored to
be slightly more efficient or easily understandable. The problem is that the
code will only generate enough bytes to describe the lenght of the packet, so
less than 255 bytes = 1 byte of length, less than 65535 = 2 bytes of length
etc...
{
extern char byte_stream[];
int bytes = offset_in_packet;
int n = length_of_packet;
/* Under 4 billion, so this can be represented in 32 bits. */
int t;
/* 32-bit number used for temporary storage. */
/* These are the bytes we will break up n into. */
unsigned char first, second, third, fourth;
t = n & 0xFF000000;
/* We have used AND to "mask out" the first byte of the number. */
/* The only bits which can be on in t are the first 8 bits. */
first = t >> 24;
if (t) {
printf("byte 1: 0x%02x\n",first );
byte_stream[bytes] = first; bytes++;
write_zeros = 1;
}
/* Now we shift t so that it is between 0 and 255. This is the first, highest byte of n. */
t = n & 0x00FF0000;
second = t >> 16;
if (t || write_zeros) {
printf("byte 2: 0x%02x\n", second );
byte_stream[bytes] = second; bytes++;
write_zeros = 1;
}
t = n & 0x0000FF00;
third = t >> 8;
if ( t || write_zeros) {
printf("byte 3: 0x%02x\n", third );
byte_stream[bytes] = third; bytes++;
write_zeros = 1;
}
t = n & 0x000000FF;
fourth = t;
if (t || write_zeros) {
printf("byte 4: 0x%02x\n", fourth);
byte_stream[bytes] = fourth; bytes++;
}
}
| 0 |
34,981 | 08/29/2008 18:39:24 | 3,622 | 08/29/2008 15:41:44 | 1 | 3 | Scrum: Resistance is (not) futile | I'm the second dev and a recent hire here at a PHP/MySQL shop. I was hired mostly due to my experience in wrangling some sort of process out of a chaotic mess. At least, that's what I did at my last company. ;)
Since I've been here (a few months now), I've brought on board my boss, my product manager and several other key figures (But mostly chickens, if you pardon the Scrum-based stereotyping). I've also helped bring in some visibility to the development cycle of a major product that has been lagging for over a year. People are loving it!
However, my coworker (the only other dev here for now) is not into it. She prefers to close her door and focus on her work and be left alone. Me? I'm into the whole Agile approach of collaboration, cooperation and openness. Without her input, I started the Scrum practices (daily scrums, burndown charts and other things I've found that worked for me and my previous teams (ala [H. Kniberg's cool wall chart][1]). During out daily stand up she slinks by and ignores us as if we actually weren't standing right outside her door (we are actually). It's pretty amazing. I've never seen such resistance.
Question... how do I get her onboard? Peer pressure is not working.
Thanks from fellow Scrum-borg,
beaudetious
[1]: www.crisp.se/henrik.kniberg/ScrumAndXpFromTheTrenches.pdf | scrum | agile | xp | null | null | null | open | Scrum: Resistance is (not) futile
===
I'm the second dev and a recent hire here at a PHP/MySQL shop. I was hired mostly due to my experience in wrangling some sort of process out of a chaotic mess. At least, that's what I did at my last company. ;)
Since I've been here (a few months now), I've brought on board my boss, my product manager and several other key figures (But mostly chickens, if you pardon the Scrum-based stereotyping). I've also helped bring in some visibility to the development cycle of a major product that has been lagging for over a year. People are loving it!
However, my coworker (the only other dev here for now) is not into it. She prefers to close her door and focus on her work and be left alone. Me? I'm into the whole Agile approach of collaboration, cooperation and openness. Without her input, I started the Scrum practices (daily scrums, burndown charts and other things I've found that worked for me and my previous teams (ala [H. Kniberg's cool wall chart][1]). During out daily stand up she slinks by and ignores us as if we actually weren't standing right outside her door (we are actually). It's pretty amazing. I've never seen such resistance.
Question... how do I get her onboard? Peer pressure is not working.
Thanks from fellow Scrum-borg,
beaudetious
[1]: www.crisp.se/henrik.kniberg/ScrumAndXpFromTheTrenches.pdf | 0 |
34,987 | 08/29/2008 18:41:35 | 779 | 08/08/2008 20:48:29 | 68 | 3 | How to declare an array of strings in C++? | I am trying to iterate over all the elements of a static array of strings in the best possible way. I want to be able to declare it on one line and easily add/remove elements from it without having to keep track of the number. Sounds really simple, doesn't it?
Possible non-solutions:
vector<string> v;
v.push_back("abc");
b.push_back("xyz");
for(i=0; i < v.size(); i++) cout << v[i] << endl;
Problems - no way to create the vector on one line with a list of strings
Possible non-solution 2:
<pre>
string list[] = {"abc", "xyz"};
</pre>
Problems - no way to get the number of strings automatically (that i know of).
There must be an easy way of doing this ...
| c++ | null | null | null | null | null | open | How to declare an array of strings in C++?
===
I am trying to iterate over all the elements of a static array of strings in the best possible way. I want to be able to declare it on one line and easily add/remove elements from it without having to keep track of the number. Sounds really simple, doesn't it?
Possible non-solutions:
vector<string> v;
v.push_back("abc");
b.push_back("xyz");
for(i=0; i < v.size(); i++) cout << v[i] << endl;
Problems - no way to create the vector on one line with a list of strings
Possible non-solution 2:
<pre>
string list[] = {"abc", "xyz"};
</pre>
Problems - no way to get the number of strings automatically (that i know of).
There must be an easy way of doing this ...
| 0 |
34,988 | 08/29/2008 18:41:42 | 1,782 | 08/18/2008 14:30:58 | 1,083 | 79 | How to transform a WebService call using behaviours? | We have some really old code that calls WebServices using behaviours (webservice.htc), and we are having some strange problems... since they've been deprecated a long time ago, I want to change the call.
What's the correct way of doing it? It's ASP.NET 1.1 | asp.net-1.1 | behavior | c# | javascript | null | null | open | How to transform a WebService call using behaviours?
===
We have some really old code that calls WebServices using behaviours (webservice.htc), and we are having some strange problems... since they've been deprecated a long time ago, I want to change the call.
What's the correct way of doing it? It's ASP.NET 1.1 | 0 |
35,002 | 08/29/2008 18:47:23 | 1,853 | 08/18/2008 22:03:57 | 118 | 10 | Does C# have a way of giving me an immutable Dictionary? | Is there anything built into the C# libraries that can give me an immutable Dictionary? Something along the lines of this in Java:
Collections.unmodifiableMap(myMap);
And just to clarify, I am not looking to stop the keys / values themselves from being changed, just the structure of the Dictionary. I want something that fails fast and loud if any of IDictionary's mutator methods are called (Add, Remove, Clear). | c# | dictionary | collections | java | null | null | open | Does C# have a way of giving me an immutable Dictionary?
===
Is there anything built into the C# libraries that can give me an immutable Dictionary? Something along the lines of this in Java:
Collections.unmodifiableMap(myMap);
And just to clarify, I am not looking to stop the keys / values themselves from being changed, just the structure of the Dictionary. I want something that fails fast and loud if any of IDictionary's mutator methods are called (Add, Remove, Clear). | 0 |
35,007 | 08/29/2008 18:48:17 | 2,582 | 08/23/2008 04:50:45 | 1 | 0 | How to expose a collection property? | Every time I create an object that has a collection property I go back and forth on the best way to do it?
1. public property with a getter that
returns a reference to private variable
2. explicit get_ObjList and set_ObjList
methods that return and create new or cloned
objects every time
3. explicit get_ObjList that returns an
IEnumerator and a set_ObjList that
takes IEnumerator
Does it make a difference if the collection is an array (i.e., objList.Clone()) versus a List<T>?
If returning the actual collection as a reference is so bad because it creates dependencies, then why return any property as a reference?
| c# | .net | architecture | null | null | null | open | How to expose a collection property?
===
Every time I create an object that has a collection property I go back and forth on the best way to do it?
1. public property with a getter that
returns a reference to private variable
2. explicit get_ObjList and set_ObjList
methods that return and create new or cloned
objects every time
3. explicit get_ObjList that returns an
IEnumerator and a set_ObjList that
takes IEnumerator
Does it make a difference if the collection is an array (i.e., objList.Clone()) versus a List<T>?
If returning the actual collection as a reference is so bad because it creates dependencies, then why return any property as a reference?
| 0 |
35,011 | 08/29/2008 18:50:51 | 667 | 08/07/2008 16:00:54 | 84 | 3 | Register Multiple Assemblies to the GAC in Vista | I've got a whole directory of dll's I need to register to the GAC. I'd like to avoid registering each file explicitly- but it appears that gacutil has no "register directory" option. Anyone have a fast/simple solution? | .net | gac | gacutil | null | null | null | open | Register Multiple Assemblies to the GAC in Vista
===
I've got a whole directory of dll's I need to register to the GAC. I'd like to avoid registering each file explicitly- but it appears that gacutil has no "register directory" option. Anyone have a fast/simple solution? | 0 |
35,017 | 08/29/2008 18:52:54 | 1,534 | 08/16/2008 12:20:49 | 651 | 41 | File database suggestion with support for multiple concurent users. | I need a database that could be stored network drive and would allow multiple users (up to 20) to use it without any server software.
I'm considering MS Access or Berkeley DB.
Can you share your experience with file databases? <br>
Which one did you use, did you have any problems with it?
| database | ms-access | concurrency | berkeley-db | null | null | open | File database suggestion with support for multiple concurent users.
===
I need a database that could be stored network drive and would allow multiple users (up to 20) to use it without any server software.
I'm considering MS Access or Berkeley DB.
Can you share your experience with file databases? <br>
Which one did you use, did you have any problems with it?
| 0 |
35,026 | 08/29/2008 18:55:35 | 1,220 | 08/13/2008 13:44:48 | 870 | 61 | SQL Server, convert a named instance to default instance? | I need to convert a named instance of SQL server 2005, to a default instance.
Is there a way to do this without a reinstall? | sql-server | named-instance | null | null | null | null | open | SQL Server, convert a named instance to default instance?
===
I need to convert a named instance of SQL server 2005, to a default instance.
Is there a way to do this without a reinstall? | 0 |
35,037 | 08/29/2008 18:58:55 | 2,703 | 08/24/2008 16:06:02 | 28 | 1 | Convert complex filename into HTML link | I have a directory with PDF files that I need to create an index for. It is a PHP page with a list of links:
<A HREF="path to file">filename</A>
The filenames can be complicated:
LVD 2-1133 - Ändring av dumpningslina (1984-11-20).pdf
What is the correct way to link to this file on a Linux/Apache server?
Is there a PHP function to do this conversion?
| php | html | null | null | null | null | open | Convert complex filename into HTML link
===
I have a directory with PDF files that I need to create an index for. It is a PHP page with a list of links:
<A HREF="path to file">filename</A>
The filenames can be complicated:
LVD 2-1133 - Ändring av dumpningslina (1984-11-20).pdf
What is the correct way to link to this file on a Linux/Apache server?
Is there a PHP function to do this conversion?
| 0 |
35,047 | 08/29/2008 19:02:34 | 137 | 08/02/2008 10:46:12 | 1,851 | 118 | Migrating database changes from development to live | Perhaps the biggest risk in pushing new functionality to live lies with the database modifications required by the new code. In Rails, I believe they have 'migrations', in which you can programmatically make changes to your development host, and then make the same changes live along with the code that uses the revised schema. And roll both back if needs be, in a synchronised fashion.
Has anyone come across a similar toolset for PHP/MySQL? Would love to hear about it, or any programmatic or process solutions to help make this less risky... | php | mysql | migration | schema | null | null | open | Migrating database changes from development to live
===
Perhaps the biggest risk in pushing new functionality to live lies with the database modifications required by the new code. In Rails, I believe they have 'migrations', in which you can programmatically make changes to your development host, and then make the same changes live along with the code that uses the revised schema. And roll both back if needs be, in a synchronised fashion.
Has anyone come across a similar toolset for PHP/MySQL? Would love to hear about it, or any programmatic or process solutions to help make this less risky... | 0 |
35,049 | 08/29/2008 19:02:48 | 1,807 | 08/18/2008 16:52:32 | 161 | 9 | custom action dll in managed code | How can I call a custom action dll written in managed code (.net) from an installer without using an unmanaged intermediary?
| .net | installer | null | null | null | null | open | custom action dll in managed code
===
How can I call a custom action dll written in managed code (.net) from an installer without using an unmanaged intermediary?
| 0 |
35,050 | 08/29/2008 19:03:01 | 1,384,652 | 08/01/2008 12:01:23 | 1,675 | 83 | Comparison of Javascript libraries | After the suggestion to use a library for [my ajax needs][1] I am going to use one, the problem is that there are so many and I've no idea how to even begin telling them apart.
Thus, can anybody A) Give a rundown of the differences or B) Point me (and others like me) somewhere that has such a list. Failing that plan C is to go with whichever gets mentioned the most here.
[1]: http://stackoverflow.com/questions/34486/what-more-is-needed-for-ajax-than-this-function | javascript | comparison | null | null | null | null | open | Comparison of Javascript libraries
===
After the suggestion to use a library for [my ajax needs][1] I am going to use one, the problem is that there are so many and I've no idea how to even begin telling them apart.
Thus, can anybody A) Give a rundown of the differences or B) Point me (and others like me) somewhere that has such a list. Failing that plan C is to go with whichever gets mentioned the most here.
[1]: http://stackoverflow.com/questions/34486/what-more-is-needed-for-ajax-than-this-function | 0 |
35,070 | 08/29/2008 19:09:47 | 1,683 | 08/18/2008 00:30:32 | 122 | 10 | programmatically merge .reg file into win32 registry | What's the best way to programmatically merge a .reg file into the registry? This is for unit testing; the .reg file is a test artifact which will be added then removed at the start and end of testing.
Or, if there's a better way to unit test against the registry...
thanks. | registry | unit-testing | null | null | null | null | open | programmatically merge .reg file into win32 registry
===
What's the best way to programmatically merge a .reg file into the registry? This is for unit testing; the .reg file is a test artifact which will be added then removed at the start and end of testing.
Or, if there's a better way to unit test against the registry...
thanks. | 0 |
35,076 | 08/29/2008 19:13:14 | 3,344 | 08/28/2008 02:36:16 | 11 | 2 | Strategy for identifying unused tables in SQL Server 2000? | I'm working with a SQL Server 2000 database that likely has a few dozen tables that are no longer accessed. I'd like to clear out the data that we no longer need to be maintaining, but I'm not sure how to identify which tables to remove.
The database is shared by several different applications, so I can't be 100% confident that reviewing these will give me a complete list of the objects that are used.
What I'd like to do, if it's possible, is to get a list of tables that haven't been accessed at all for some period of time. No reads, no writes. How should I approach this?
| sqlserver | database | sql | null | null | null | open | Strategy for identifying unused tables in SQL Server 2000?
===
I'm working with a SQL Server 2000 database that likely has a few dozen tables that are no longer accessed. I'd like to clear out the data that we no longer need to be maintaining, but I'm not sure how to identify which tables to remove.
The database is shared by several different applications, so I can't be 100% confident that reviewing these will give me a complete list of the objects that are used.
What I'd like to do, if it's possible, is to get a list of tables that haven't been accessed at all for some period of time. No reads, no writes. How should I approach this?
| 0 |
35,106 | 08/29/2008 19:28:50 | 1,414 | 08/15/2008 15:07:31 | 756 | 63 | Is there a built in way in .Net AJAX to manually serialize an object to a JSON string? | I've found [`ScriptingJsonSerializationSection`][1] but I'm not sure how to use it. I could write a function to convert the object to a JSON string manually, but since .Net can do it on the fly with the `<System.Web.Services.WebMethod()>` and `<System.Web.Script.Services.ScriptMethod()>` attributes so there must be a built in way.
[1]: http://msdn.microsoft.com/en-us/library/system.web.configuration.scriptingjsonserializationsection.scriptingjsonserializationsection.aspx | .net-2.0 | asp.net | json | serialization | vb.net | null | open | Is there a built in way in .Net AJAX to manually serialize an object to a JSON string?
===
I've found [`ScriptingJsonSerializationSection`][1] but I'm not sure how to use it. I could write a function to convert the object to a JSON string manually, but since .Net can do it on the fly with the `<System.Web.Services.WebMethod()>` and `<System.Web.Script.Services.ScriptMethod()>` attributes so there must be a built in way.
[1]: http://msdn.microsoft.com/en-us/library/system.web.configuration.scriptingjsonserializationsection.scriptingjsonserializationsection.aspx | 0 |
35,123 | 08/29/2008 19:36:33 | 3,657 | 08/29/2008 17:57:49 | 26 | 5 | Prevent SWT scrolledComposite from eating part of it's children | What did I do wrong?
Here is an excerpt from my code:
public void createPartControl(Composite parent) {
parent.setLayout(new FillLayout());
ScrolledComposite scrollBox = new ScrolledComposite(parent, SWT.V_SCROLL);
scrollBox.setExpandHorizontal(true);
mParent = new Composite(scrollBox, SWT.NONE);
scrollBox.setContent(mParent);
FormLayout layout = new FormLayout();
mParent.setLayout(layout);
// Adds a bunch of controls here
mParent.layout();
mParent.setSize(mParent.computeSize(SWT.DEFAULT, SWT.DEFAULT, true));
}
but it clips the last button:
![alt text][1]
[1]: http://img366.imageshack.us/img366/1140/screenshotiz7.png "Screenshot" | java | eclipse | rcp | swt | null | null | open | Prevent SWT scrolledComposite from eating part of it's children
===
What did I do wrong?
Here is an excerpt from my code:
public void createPartControl(Composite parent) {
parent.setLayout(new FillLayout());
ScrolledComposite scrollBox = new ScrolledComposite(parent, SWT.V_SCROLL);
scrollBox.setExpandHorizontal(true);
mParent = new Composite(scrollBox, SWT.NONE);
scrollBox.setContent(mParent);
FormLayout layout = new FormLayout();
mParent.setLayout(layout);
// Adds a bunch of controls here
mParent.layout();
mParent.setSize(mParent.computeSize(SWT.DEFAULT, SWT.DEFAULT, true));
}
but it clips the last button:
![alt text][1]
[1]: http://img366.imageshack.us/img366/1140/screenshotiz7.png "Screenshot" | 0 |
35,167 | 08/29/2008 19:54:43 | 2,470 | 08/22/2008 12:42:38 | 213 | 31 | Is there a way to perform a circular bit shift in C#? | I know that the following is true
int i = 17; //binary 10001
int j = i << 1; //decimal 34, binary 100010
But, if you shift too far, the bits fall off the end. Where this happens is a matter of the size of integer you are working with.
Is there a way to perform a shift so that the bits rotate around to the other side? I'm looking for a single operation, not a for loop. | c# | null | null | null | null | null | open | Is there a way to perform a circular bit shift in C#?
===
I know that the following is true
int i = 17; //binary 10001
int j = i << 1; //decimal 34, binary 100010
But, if you shift too far, the bits fall off the end. Where this happens is a matter of the size of integer you are working with.
Is there a way to perform a shift so that the bits rotate around to the other side? I'm looking for a single operation, not a for loop. | 0 |
35,170 | 08/29/2008 19:56:47 | 3,594 | 08/29/2008 08:46:29 | 28 | 4 | Verilog automatic task | What does it mean if a task is declared with the automatic keyword in Verilog?
task automatic do_things;
input [31:0] number_of_things;
reg [31:0] tmp_thing;
begin
// ...
end
endtask;
Note: This question is mostly because I'm curious if there are any hardware programmers on the site. :) | verilog | null | null | null | null | null | open | Verilog automatic task
===
What does it mean if a task is declared with the automatic keyword in Verilog?
task automatic do_things;
input [31:0] number_of_things;
reg [31:0] tmp_thing;
begin
// ...
end
endtask;
Note: This question is mostly because I'm curious if there are any hardware programmers on the site. :) | 0 |
35,178 | 08/29/2008 19:59:14 | 2,897 | 08/25/2008 20:17:12 | 83 | 4 | Regex to replace Boolean with bool | I am working on a C++ code base that was recently moved from X/Motif to Qt. I am trying to write a PERL script that will replace all occurrences of Boolean (from X) with bool. The script just does a simple replacement.
s/\bBoolean\b/bool/g
There are few conditions that I can not get to work right.
1) We have CORBA in our code and \b matches CORBA::Boolean which should **not** be changed.
2) It should not match if it was found in a string (i.e. "Boolean")
For #2, I used the following which seems to work.
<pre>s/\bBoolean\b(?!")/bool/g</pre>
| regex | perl | null | null | null | null | open | Regex to replace Boolean with bool
===
I am working on a C++ code base that was recently moved from X/Motif to Qt. I am trying to write a PERL script that will replace all occurrences of Boolean (from X) with bool. The script just does a simple replacement.
s/\bBoolean\b/bool/g
There are few conditions that I can not get to work right.
1) We have CORBA in our code and \b matches CORBA::Boolean which should **not** be changed.
2) It should not match if it was found in a string (i.e. "Boolean")
For #2, I used the following which seems to work.
<pre>s/\bBoolean\b(?!")/bool/g</pre>
| 0 |
35,185 | 08/29/2008 20:03:58 | 380 | 08/05/2008 10:39:18 | 1,751 | 160 | Finding a single number in a list | What would be the best algorithm for finding a number that occurs only once in a list which has all other numbers occurring exactly twice.
So, in the list of integers (lets take it as an array) each integer repeats exactly twice, except one. To find that one, what is the best algorithm. | puzzle | algorithm | null | null | null | null | open | Finding a single number in a list
===
What would be the best algorithm for finding a number that occurs only once in a list which has all other numbers occurring exactly twice.
So, in the list of integers (lets take it as an array) each integer repeats exactly twice, except one. To find that one, what is the best algorithm. | 0 |
35,186 | 08/29/2008 20:04:27 | 3,535 | 08/29/2008 02:26:17 | 36 | 13 | How do I fix a NoSuchMethodError? | I'm getting a NoSuchMethodError when running my Java program. What's wrong and how do I fix it? | java | null | null | null | null | null | open | How do I fix a NoSuchMethodError?
===
I'm getting a NoSuchMethodError when running my Java program. What's wrong and how do I fix it? | 0 |
35,191 | 08/29/2008 20:07:31 | 3,675 | 08/29/2008 19:49:08 | 1 | 1 | Error in TFS Merge | When merging two code branches in TFS, I get an error stating: "the given key was not present in the dictionary". Some files are checked out and show up in "Pending Changes", but no changes are actually made.
I have a workaround:
1. Attempt to merge (Fails with error)
2. Get latest from trunk
3. Undo all pending changes with "merge, edit" or "merge"
4. Merge Again (Works this time)
Any ideas what's causing this error? | teamfoundationserver | merge | null | null | null | null | open | Error in TFS Merge
===
When merging two code branches in TFS, I get an error stating: "the given key was not present in the dictionary". Some files are checked out and show up in "Pending Changes", but no changes are actually made.
I have a workaround:
1. Attempt to merge (Fails with error)
2. Get latest from trunk
3. Undo all pending changes with "merge, edit" or "merge"
4. Merge Again (Works this time)
Any ideas what's causing this error? | 0 |
35,194 | 08/29/2008 20:08:23 | 2,343 | 08/21/2008 18:18:20 | 11 | 3 | Working in Visual Studio (2005 or 2008) on a networked drive | Have you guys had any experiences (positive or negative) by placing your source code/solution on a network drive for Visual Studio 2005 or 2008? Please note I am not referring to placing your actual source control system on that drive, but rather your working folder.
Thanks
| visual-studio-2008 | visual-studio-2005 | null | null | null | null | open | Working in Visual Studio (2005 or 2008) on a networked drive
===
Have you guys had any experiences (positive or negative) by placing your source code/solution on a network drive for Visual Studio 2005 or 2008? Please note I am not referring to placing your actual source control system on that drive, but rather your working folder.
Thanks
| 0 |
35,208 | 08/29/2008 20:14:19 | 2,462 | 08/22/2008 12:21:34 | 23 | 8 | requiredfield validator is preventing another form from submitting | I have a page with many forms in panels and usercontrols, and a requiredfield validator I just added to one form is preventing all of my other forms from submitting. what's the rule that I'm not following? | asp.net | null | null | null | null | null | open | requiredfield validator is preventing another form from submitting
===
I have a page with many forms in panels and usercontrols, and a requiredfield validator I just added to one form is preventing all of my other forms from submitting. what's the rule that I'm not following? | 0 |
35,211 | 08/29/2008 20:15:50 | 1,228 | 08/13/2008 13:58:55 | 891 | 63 | Identify an event via a Linq Expression tree | The compiler usually chokes when an event doesn't appear beside a += or a -=, so I'm not sure if this is possible.
I want to be able to identify an event by using an Expression tree, so I can create an event watcher for a test. The syntax would look something like this:
using(var foo = new EventWatcher(target, x => x.MyEventToWatch)
{
// act here
} // throws on Dispose() if MyEventToWatch hasn't fired
My questions are twofold:
1. Will the compiler choke? And if so, any suggestions on how to prevent this?
2. How can I
parse the Expression object from the
constructor in order to attach to
the **MyEventToWatch** event of
**target**? | c# | linq | expressiontree | null | null | null | open | Identify an event via a Linq Expression tree
===
The compiler usually chokes when an event doesn't appear beside a += or a -=, so I'm not sure if this is possible.
I want to be able to identify an event by using an Expression tree, so I can create an event watcher for a test. The syntax would look something like this:
using(var foo = new EventWatcher(target, x => x.MyEventToWatch)
{
// act here
} // throws on Dispose() if MyEventToWatch hasn't fired
My questions are twofold:
1. Will the compiler choke? And if so, any suggestions on how to prevent this?
2. How can I
parse the Expression object from the
constructor in order to attach to
the **MyEventToWatch** event of
**target**? | 0 |
35,219 | 08/29/2008 20:19:31 | 91 | 08/01/2008 17:55:22 | 5,163 | 233 | Optimizing Sharepoint Search Crawling | With SharePoint Server 2007, there is also a Search Feature and a Crawler. However, the Crawler is somewhat limited in that it only supports Basic Auth when crawling external sites and that there is no way to tell it to ignore noindex,nofollow attributes.
Now, there is a site i'd like to index, unfortunately this site uses it's own Authentication System, and it uses noindex,nofollow on the pages. As I control that site, i can remove the Attributes, but it's a PITA to do so. Also, it does not solve the Authentication issue.
So I just wonder if it's possible to extend Sharepoint's Crawler somehow? | sharepoint | .net | c# | null | null | null | open | Optimizing Sharepoint Search Crawling
===
With SharePoint Server 2007, there is also a Search Feature and a Crawler. However, the Crawler is somewhat limited in that it only supports Basic Auth when crawling external sites and that there is no way to tell it to ignore noindex,nofollow attributes.
Now, there is a site i'd like to index, unfortunately this site uses it's own Authentication System, and it uses noindex,nofollow on the pages. As I control that site, i can remove the Attributes, but it's a PITA to do so. Also, it does not solve the Authentication issue.
So I just wonder if it's possible to extend Sharepoint's Crawler somehow? | 0 |
35,224 | 08/29/2008 20:21:13 | 1,638 | 08/17/2008 17:58:57 | 365 | 44 | Flex ComboBox, default value and dataproviders | I have a Flex ComboBox that gets populated by a dataprovider all is well...
I would now like to add a default " -- select a item --" option at the 0 index, how can I do this and still use a dataprovider? I have not seen any examples of such, but I can't imagine this being hard...
| flex | data-binding | null | null | null | null | open | Flex ComboBox, default value and dataproviders
===
I have a Flex ComboBox that gets populated by a dataprovider all is well...
I would now like to add a default " -- select a item --" option at the 0 index, how can I do this and still use a dataprovider? I have not seen any examples of such, but I can't imagine this being hard...
| 0 |
35,232 | 08/29/2008 20:26:39 | 1,249 | 08/13/2008 19:56:10 | 183 | 22 | Would building an application using a Sql Server Database File (mdf) be a terrible idea? | I'm working on a side project that would be a simple web application to maintain a list of classes and their upcoming schedules.
I would really like to use Linq to SQL for this project, but unfortunately the server environment I'm developing for only has MySql available. I've dabbled briefly with Subsonic but it just doesn't get the job done.
The database requirements for this application aren't that great, though, so I'm curious if using an MDF file in App_Data would be a workable solution. Otherwise, it appears I'm going to have to hand-code sql queries which I want to avoid at all costs. | asp.net | sql | sql-server | mysql | null | null | open | Would building an application using a Sql Server Database File (mdf) be a terrible idea?
===
I'm working on a side project that would be a simple web application to maintain a list of classes and their upcoming schedules.
I would really like to use Linq to SQL for this project, but unfortunately the server environment I'm developing for only has MySql available. I've dabbled briefly with Subsonic but it just doesn't get the job done.
The database requirements for this application aren't that great, though, so I'm curious if using an MDF file in App_Data would be a workable solution. Otherwise, it appears I'm going to have to hand-code sql queries which I want to avoid at all costs. | 0 |
35,233 | 08/29/2008 20:27:11 | 3,305 | 08/27/2008 18:56:35 | 61 | 9 | Rewrite or repair? | I'm sure you have all been there, you take on a project where there is a creaky old code base which is barely fit for purpose and you have to make the decision to either re-write it from scratch or repair what already exists.
Conventional wisdom tends to suggest that you should never attempt a re-write from scratch as the risk of failure is very high. So what did you do when faced with this problem, how did you make the decision and how did it turn out? | refactoring | rewrite | null | null | null | null | open | Rewrite or repair?
===
I'm sure you have all been there, you take on a project where there is a creaky old code base which is barely fit for purpose and you have to make the decision to either re-write it from scratch or repair what already exists.
Conventional wisdom tends to suggest that you should never attempt a re-write from scratch as the risk of failure is very high. So what did you do when faced with this problem, how did you make the decision and how did it turn out? | 0 |
35,240 | 08/29/2008 20:31:27 | 3,560 | 08/29/2008 05:20:51 | 11 | 2 | Retrieving HTTP status code from loaded iframe with Javascript | I used the jQuery Form plugin for asynchronous form submission. For forms that contain files, it copies the form to a hidden iframe, submits it, and copies back the iframe's contents. The problem is that I can't figure out how to find what HTTP status code was returned by the server. For example, if the server returns 404, the data from the iframe will be copied as normal and treated as a regular response.
I've tried poking around in the iframe objects looking for some sort of `status_code` attribute, but haven't been able to find anything like that. | ajax | iframe | http | forms | null | null | open | Retrieving HTTP status code from loaded iframe with Javascript
===
I used the jQuery Form plugin for asynchronous form submission. For forms that contain files, it copies the form to a hidden iframe, submits it, and copies back the iframe's contents. The problem is that I can't figure out how to find what HTTP status code was returned by the server. For example, if the server returns 404, the data from the iframe will be copied as normal and treated as a regular response.
I've tried poking around in the iframe objects looking for some sort of `status_code` attribute, but haven't been able to find anything like that. | 0 |
35,248 | 08/29/2008 20:34:35 | 3,543 | 08/29/2008 04:25:59 | 91 | 6 | Large File Download | Internet Explorer has a file download limit of 4GB (2 GB on IE6)
(More info here: [http://support.microsoft.com/kb/298618][1])
I am working on a site that will allow the user to download very large files (up to and exceeding 100GB)
What is the best way to do this ***without using FTP***. I don't think Flash or Silverlight can save files to the client so as far as I know they won't cut it.
I'm guessing we will need an ActiveX or Java applet to pull this off. Something like the download manager that MSDN uses.
Does anyone know of a commercial (or free) component that will do that? We do not want the user to have to install a "browser wide" download manager (like GetRight), we want it to only work with downloading on our site.
[1]: http://support.microsoft.com/kb/298618 | java | browser | flash | silverlight | null | null | open | Large File Download
===
Internet Explorer has a file download limit of 4GB (2 GB on IE6)
(More info here: [http://support.microsoft.com/kb/298618][1])
I am working on a site that will allow the user to download very large files (up to and exceeding 100GB)
What is the best way to do this ***without using FTP***. I don't think Flash or Silverlight can save files to the client so as far as I know they won't cut it.
I'm guessing we will need an ActiveX or Java applet to pull this off. Something like the download manager that MSDN uses.
Does anyone know of a commercial (or free) component that will do that? We do not want the user to have to install a "browser wide" download manager (like GetRight), we want it to only work with downloading on our site.
[1]: http://support.microsoft.com/kb/298618 | 0 |
35,256 | 08/29/2008 20:37:42 | 137 | 08/02/2008 10:46:12 | 1,876 | 119 | Managing multiple identical databases efficiently? | In Podcast #19, Joel fails to answer the question posed to him by Ryan from San Diego; how, if you have a database per client of a web application instead of one database used by all clients, do you "go about providing updates and enhancements to all databases efficiently?"
I'm particularly interested in the answer to this. Does anyone out there have any thoughts on the matter? Did you structure a web application this way and how do you roll out changes to schema and code in such a scenario?
| database | null | null | null | null | null | open | Managing multiple identical databases efficiently?
===
In Podcast #19, Joel fails to answer the question posed to him by Ryan from San Diego; how, if you have a database per client of a web application instead of one database used by all clients, do you "go about providing updates and enhancements to all databases efficiently?"
I'm particularly interested in the answer to this. Does anyone out there have any thoughts on the matter? Did you structure a web application this way and how do you roll out changes to schema and code in such a scenario?
| 0 |
35,284 | 08/29/2008 20:54:55 | 2,603 | 08/23/2008 13:46:11 | 48 | 1 | How do I restore files to previous states in git? | Given the following interaction:
$ git add foo
$ git commit -m "Initial import of 'foo'"
$ rm foo # This could be any destructive action on foo, like editing it.
How do I restore 'foo' in my working copy? I'm looking for something like:
$ git <magic> foo
Restored foo to revision <blah>. | git | null | null | null | null | null | open | How do I restore files to previous states in git?
===
Given the following interaction:
$ git add foo
$ git commit -m "Initial import of 'foo'"
$ rm foo # This could be any destructive action on foo, like editing it.
How do I restore 'foo' in my working copy? I'm looking for something like:
$ git <magic> foo
Restored foo to revision <blah>. | 0 |
35,286 | 08/29/2008 20:56:02 | 2,541 | 08/22/2008 18:21:46 | 282 | 34 | DOS filename escaping for use with *nix commands | Earlier today I wanted to escape a DOS filename so I could use it with sed. I had a DOS batch file something like this:
set FILENAME=%~f1
sed 's/Some Pattern/%FILENAME%/' inputfile
(Note: %~f1 - expands %1 to a Fully qualified path name - C:\utils\MyFile.txt)
I found that the backslashes in %FILENAME% were just escaping the next letter.
How can I double them up so that they are escaped?
(I have cygwin installed so feel free to use any other *nix commands) | ms-dos | scripting | shell | null | null | null | open | DOS filename escaping for use with *nix commands
===
Earlier today I wanted to escape a DOS filename so I could use it with sed. I had a DOS batch file something like this:
set FILENAME=%~f1
sed 's/Some Pattern/%FILENAME%/' inputfile
(Note: %~f1 - expands %1 to a Fully qualified path name - C:\utils\MyFile.txt)
I found that the backslashes in %FILENAME% were just escaping the next letter.
How can I double them up so that they are escaped?
(I have cygwin installed so feel free to use any other *nix commands) | 0 |
35,292 | 08/29/2008 21:00:03 | 3,305 | 08/27/2008 18:56:35 | 86 | 9 | Log files in massively distributed systems | I do a lot of work in the grid and HPC space and one of the biggest challenges we have with a system distributed across hundreds (or in some case thousands) of servers is analysing the log files.
Currently log files are written locally to the disk on each blade but we could also consider publishing logging information using for example a UDP Appender and collect it centally.
Given that the objective is to be able to identify problems in as close to real time as possible, what should we do? | cluster-analysis | grid | hpc | null | null | null | open | Log files in massively distributed systems
===
I do a lot of work in the grid and HPC space and one of the biggest challenges we have with a system distributed across hundreds (or in some case thousands) of servers is analysing the log files.
Currently log files are written locally to the disk on each blade but we could also consider publishing logging information using for example a UDP Appender and collect it centally.
Given that the objective is to be able to identify problems in as close to real time as possible, what should we do? | 0 |
35,301 | 08/29/2008 21:11:17 | 3,238 | 08/27/2008 14:17:11 | 1 | 0 | What is the diffference between the | and || or operators? | I have always used || (two pipes) in OR expressions, both in C# and PHP. Occasonally I see a single pipe used: | What is the difference between those two usages? Are there any caveats when using one over the other or are they interchangeable? | c# | php | conditional | operator | bool | null | open | What is the diffference between the | and || or operators?
===
I have always used || (two pipes) in OR expressions, both in C# and PHP. Occasonally I see a single pipe used: | What is the difference between those two usages? Are there any caveats when using one over the other or are they interchangeable? | 0 |
35,304 | 08/29/2008 21:13:57 | 1,798 | 08/18/2008 15:49:32 | 16 | 2 | FlexUnit component testing patterns: use addAsync or manually initialize? | We've been using Flex for about 6 months here at work, and I found that my first batches of FlexUnit tests involving custom components would tend to follow this sort of pattern:
import mx.core.Application;
import mx.events.FlexEvent;
import flexunit.framework.TestCase;
public class CustomComponentTest extends TestCase {
private var component:CustomComponent;
public function testSomeAspect() : void {
component = new CustomComponent();
// set some properties...
component.addEventListener(FlexEvent.CREATION_COMPLETE,
addAsync(verifySomeAspect, 5000));
component.height = 0;
component.width = 0;
Application.application.addChild(component);
}
public function verifySomeAspect(event:FlexEvent) : void {
// Assert some things about component...
}
override public function tearDown() : void {
try {
if (component) {
Application.application.removeChild(component);
component = null;
}
} catch (e:Error) {
// ok to ignore
}
}
Basically, you need to make sure the component has been fully initialized before you can reliably verify anything about it, and in Flex this happens asynchronously after it has been added to the display list. So you need to setup a callback (using FlexUnit's addAsync function) to be notified when that's happened.
Lately i've been just manually calling the methods that the runtime would call for you in the necessary places, so now my tests tend to look more like this:
import flexunit.framework.TestCase;
public class CustomComponentTest extends TestCase {
public function testSomeAspect() : void {
var component:CustomComponent = new CustomComponent();
component.initialize();
// set some properties...
component.validateProperties();
// Assert some things about component...
}
This is much easier to follow, but it kinda feels like I'm cheating a little either way. The first case is slamming it into the current Application (which would be the unit test runner shell app), and the latter isn't a "real" environment.
I was wondering how other people would handle this sort of situation? | unit-testing | flex | null | null | null | null | open | FlexUnit component testing patterns: use addAsync or manually initialize?
===
We've been using Flex for about 6 months here at work, and I found that my first batches of FlexUnit tests involving custom components would tend to follow this sort of pattern:
import mx.core.Application;
import mx.events.FlexEvent;
import flexunit.framework.TestCase;
public class CustomComponentTest extends TestCase {
private var component:CustomComponent;
public function testSomeAspect() : void {
component = new CustomComponent();
// set some properties...
component.addEventListener(FlexEvent.CREATION_COMPLETE,
addAsync(verifySomeAspect, 5000));
component.height = 0;
component.width = 0;
Application.application.addChild(component);
}
public function verifySomeAspect(event:FlexEvent) : void {
// Assert some things about component...
}
override public function tearDown() : void {
try {
if (component) {
Application.application.removeChild(component);
component = null;
}
} catch (e:Error) {
// ok to ignore
}
}
Basically, you need to make sure the component has been fully initialized before you can reliably verify anything about it, and in Flex this happens asynchronously after it has been added to the display list. So you need to setup a callback (using FlexUnit's addAsync function) to be notified when that's happened.
Lately i've been just manually calling the methods that the runtime would call for you in the necessary places, so now my tests tend to look more like this:
import flexunit.framework.TestCase;
public class CustomComponentTest extends TestCase {
public function testSomeAspect() : void {
var component:CustomComponent = new CustomComponent();
component.initialize();
// set some properties...
component.validateProperties();
// Assert some things about component...
}
This is much easier to follow, but it kinda feels like I'm cheating a little either way. The first case is slamming it into the current Application (which would be the unit test runner shell app), and the latter isn't a "real" environment.
I was wondering how other people would handle this sort of situation? | 0 |
35,315 | 08/29/2008 21:17:26 | 3,452 | 08/28/2008 16:16:17 | 1 | 0 | How do you combine multiple result sets in SSRS? | What's the best way to combine results sets from disparate data sources in SSRS?
In my particular example, I need to write a report that pulls data from SQL Server and combines it with another set of data that comes from a DB2 database. I know that you can't do this "out of the box" in SSRS 2005. I'm not excited about having to pull the data into a temporary table on my SQL box because users need to be able to run this report on demand and it seems like having to use SSIS to get the data into the table on demand will be slow and hard to manage with multiple users trying to get at the report simultaneously. Are there any other, more elegant solutions out there? | reporting-services | null | null | null | null | null | open | How do you combine multiple result sets in SSRS?
===
What's the best way to combine results sets from disparate data sources in SSRS?
In my particular example, I need to write a report that pulls data from SQL Server and combines it with another set of data that comes from a DB2 database. I know that you can't do this "out of the box" in SSRS 2005. I'm not excited about having to pull the data into a temporary table on my SQL box because users need to be able to run this report on demand and it seems like having to use SSIS to get the data into the table on demand will be slow and hard to manage with multiple users trying to get at the report simultaneously. Are there any other, more elegant solutions out there? | 0 |
35,317 | 08/29/2008 21:18:41 | 1,438 | 08/15/2008 15:44:20 | 616 | 38 | Why does Vista complain about a dead process when I use Cygwin ssh and how do I get it to shut up? | I recently bought a Vista machine for my home and when I use ssh to log in at work Vista pops up a box complaining about a process that died. Once I dismiss the box, everything is fine. So I really don't care if some process died. How do I get Vista to shut up about it?
* * *
I'm at work right now, so I can't test any answers or provide the text of the dialog box. I plan to update this question later when I have more details and time. I'm asking the question without details so that I won't forget later. Please remain calm! ;-) | cygwin | ssh | windows-vista | null | null | null | open | Why does Vista complain about a dead process when I use Cygwin ssh and how do I get it to shut up?
===
I recently bought a Vista machine for my home and when I use ssh to log in at work Vista pops up a box complaining about a process that died. Once I dismiss the box, everything is fine. So I really don't care if some process died. How do I get Vista to shut up about it?
* * *
I'm at work right now, so I can't test any answers or provide the text of the dialog box. I plan to update this question later when I have more details and time. I'm asking the question without details so that I won't forget later. Please remain calm! ;-) | 0 |
35,320 | 08/29/2008 21:19:24 | 3,677 | 08/29/2008 20:21:57 | 1 | 0 | How do you get the last record generated in a recursive CTE? | In the code below I am using a recursive CTE(Common Table Expression) in SQL Server 2005 to try and find the top level parent of a basic hierarchical structure. The rule of this hierarchy is that every CustID has a ParentID and if the CustID has no parent then the ParentID = CustID and it is the highest level.
DECLARE @LookupID int
--Our test value
SET @LookupID = 1
WITH cteLevelOne (ParentID, CustID) AS
(
SELECT a.ParentID, a.CustID
FROM tblCustomer AS a
WHERE a.CustID = @LookupID
UNION ALL
SELECT a.ParentID, a.CustID
FROM tblCustomer AS a
INNER JOIN cteLevelOne AS c ON a.CustID = c.ParentID
WHERE c.CustID <> a.CustomerID
)
So if tblCustomer looks like this:
<table>
<tr>
<th>ParentID</th>
<th>CustID</th>
</tr>
<tr>
<td>
5
</td>
<td>
5
</td>
</tr>
<tr>
<td>
1
</td>
<td>
8
</td>
</tr>
<tr>
<td>
5
</td>
<td>
4
</td>
</tr>
<tr>
<td>
4
</td>
<td>
1
</td>
</tr>
</table>
</br>
The result I get from the code above is:
<table>
<tr>
<th>ParentID</th>
<th>CustID</th>
</tr>
<tr>
<td>
4
</td>
<td>
1
</td>
</tr>
<tr>
<td>
5
</td>
<td>
4
</td>
</tr>
<tr>
<td>
5
</td>
<td>
5
</td>
</tr>
</table>
</br>
What I want is just the last row of that result:
<table border="1">
<tr>
<th>ParentID</th>
<th>CustID</th>
</tr>
<tr>
<td>
5
</td>
<td>
5
</td>
</tr>
</table>
</br>
How do I just return the last record generated in the CTE (which would be highest level CustID)?
Also note that there are multiple unrelated CustID hierarchies in this table so I can't just do a SELECT * FROM tblCustomer WHERE ParentID = CustID
| sql | common-table-expression | recursion | sql-server | null | null | open | How do you get the last record generated in a recursive CTE?
===
In the code below I am using a recursive CTE(Common Table Expression) in SQL Server 2005 to try and find the top level parent of a basic hierarchical structure. The rule of this hierarchy is that every CustID has a ParentID and if the CustID has no parent then the ParentID = CustID and it is the highest level.
DECLARE @LookupID int
--Our test value
SET @LookupID = 1
WITH cteLevelOne (ParentID, CustID) AS
(
SELECT a.ParentID, a.CustID
FROM tblCustomer AS a
WHERE a.CustID = @LookupID
UNION ALL
SELECT a.ParentID, a.CustID
FROM tblCustomer AS a
INNER JOIN cteLevelOne AS c ON a.CustID = c.ParentID
WHERE c.CustID <> a.CustomerID
)
So if tblCustomer looks like this:
<table>
<tr>
<th>ParentID</th>
<th>CustID</th>
</tr>
<tr>
<td>
5
</td>
<td>
5
</td>
</tr>
<tr>
<td>
1
</td>
<td>
8
</td>
</tr>
<tr>
<td>
5
</td>
<td>
4
</td>
</tr>
<tr>
<td>
4
</td>
<td>
1
</td>
</tr>
</table>
</br>
The result I get from the code above is:
<table>
<tr>
<th>ParentID</th>
<th>CustID</th>
</tr>
<tr>
<td>
4
</td>
<td>
1
</td>
</tr>
<tr>
<td>
5
</td>
<td>
4
</td>
</tr>
<tr>
<td>
5
</td>
<td>
5
</td>
</tr>
</table>
</br>
What I want is just the last row of that result:
<table border="1">
<tr>
<th>ParentID</th>
<th>CustID</th>
</tr>
<tr>
<td>
5
</td>
<td>
5
</td>
</tr>
</table>
</br>
How do I just return the last record generated in the CTE (which would be highest level CustID)?
Also note that there are multiple unrelated CustID hierarchies in this table so I can't just do a SELECT * FROM tblCustomer WHERE ParentID = CustID
| 0 |
35,322 | 08/29/2008 21:20:38 | 1,946 | 08/19/2008 14:53:06 | 100 | 6 | How to return status 401 instead of redirecting to login page for select actions | I'm writing an app using asp.net-mvc deploying to iis6. I'm using forms authentication. Usually when a user tries to access a resource without proper authorization I want them to be redirected to a login page. FormsAuth does this for me easy enough.
Problem: Now I have an action being accessed by a console app. Whats the quickest way to have this action respond w/ status 401 instead of redirecting the request to the login page?
I want the console app to be able to react to this 401 StatusCode instead of it being transparent. I'd also like to keep the default, redirect unauthorized requests to login page behavior. | asp.net-mvc | forms-authentication | asp.net | null | null | null | open | How to return status 401 instead of redirecting to login page for select actions
===
I'm writing an app using asp.net-mvc deploying to iis6. I'm using forms authentication. Usually when a user tries to access a resource without proper authorization I want them to be redirected to a login page. FormsAuth does this for me easy enough.
Problem: Now I have an action being accessed by a console app. Whats the quickest way to have this action respond w/ status 401 instead of redirecting the request to the login page?
I want the console app to be able to react to this 401 StatusCode instead of it being transparent. I'd also like to keep the default, redirect unauthorized requests to login page behavior. | 0 |
35,339 | 08/29/2008 21:27:23 | 658 | 08/07/2008 15:07:47 | 386 | 25 | Russell's Paradox | Let X be the set of all sets that do not contain themselves. Is X a member of X? | set-theory | paradox | mathematics | null | null | 08/10/2011 03:40:44 | off topic | Russell's Paradox
===
Let X be the set of all sets that do not contain themselves. Is X a member of X? | 2 |
35,357 | 08/29/2008 21:36:27 | 2,894 | 08/25/2008 20:06:55 | 246 | 30 | Minimalistic Database Administration | I am a developer. An architect on good days. Somehow I find myself also being the DBA for my small company. My background is fair in the DB arts but I have never been a full fledged DBA. My question is what do I have to do to ensure a realiable and reasonably functional database environment with as little actual effort as possible?
I am sure that I need to make sure that backups are being preformed and that is being done. That is an easy one. What else should I be doing on a consistant basis? | database | administration | tasks | null | null | null | open | Minimalistic Database Administration
===
I am a developer. An architect on good days. Somehow I find myself also being the DBA for my small company. My background is fair in the DB arts but I have never been a full fledged DBA. My question is what do I have to do to ensure a realiable and reasonably functional database environment with as little actual effort as possible?
I am sure that I need to make sure that backups are being preformed and that is being done. That is an easy one. What else should I be doing on a consistant basis? | 0 |
35,366 | 08/29/2008 21:41:57 | 2,147 | 08/20/2008 15:14:13 | 522 | 52 | varchar vs nvarchar performance | I'm working on a database for a small web app at my school using SQL Server 2005. I see a couple of schools of thought on the issue of varchar vs nvarchar:
1. Use varchar unless you deal with a lot of internationalized data, then use nvarchar.
2. Just use nvarchar for everything.
I'm beginning to see the merits of view 2. I know that nvarchar does take up twice as much space, but that isn't necessarily a huge deal since this is only going to store data for a few hundred students. To me it seems like it would be easiest not to worry about it and just allow everything to use nvarchar. Or is there something I'm missing? | sql | sqlserver-2005 | varchar | nvarchar | null | null | open | varchar vs nvarchar performance
===
I'm working on a database for a small web app at my school using SQL Server 2005. I see a couple of schools of thought on the issue of varchar vs nvarchar:
1. Use varchar unless you deal with a lot of internationalized data, then use nvarchar.
2. Just use nvarchar for everything.
I'm beginning to see the merits of view 2. I know that nvarchar does take up twice as much space, but that isn't necessarily a huge deal since this is only going to store data for a few hundred students. To me it seems like it would be easiest not to worry about it and just allow everything to use nvarchar. Or is there something I'm missing? | 0 |
35,372 | 08/29/2008 21:48:22 | 802 | 08/09/2008 02:50:52 | 1 | 0 | How can I change the way my Drupal theme displays the front page | I am trying to build an website for my college's magazine. I used the "views" module to show a block of static content I created on the front page.
My question is: how can I edit the theme's css so it changes the way that block of static content is displayed?
For reference, <a href="http://www.historia.uff.br/aroda/">here's the link</a> to the site (in portuguese, and with almost zero content for now). | css | drupal | themes | null | null | null | open | How can I change the way my Drupal theme displays the front page
===
I am trying to build an website for my college's magazine. I used the "views" module to show a block of static content I created on the front page.
My question is: how can I edit the theme's css so it changes the way that block of static content is displayed?
For reference, <a href="http://www.historia.uff.br/aroda/">here's the link</a> to the site (in portuguese, and with almost zero content for now). | 0 |
35,373 | 08/29/2008 21:48:32 | 3,191 | 08/27/2008 12:32:21 | 73 | 3 | Best practices for signing .NET assemblies? | I have a solution consisting of 5 projects, each of which compile to separate assemblies. Right now I'm code-signing them, but I'm pretty sure I'm doing it wrong. What's the best practice here?
- Sign each with a different key; make sure the passwords are different
- Sign each with a different key; use the same password if you want
- Sign each with the same key
- Something else entirely
Basically I'm not quite sure what "signing" does to them, or what the best practices are here, so a more generally discussion would be good. All I really know is that FxCop yelled at me, and it was easy to fix by clicking the "Sign this assembly" checkbox and generating a .pfx file using Visual Studio (2008).
Thanks! | .net | assembly | signing | null | null | null | open | Best practices for signing .NET assemblies?
===
I have a solution consisting of 5 projects, each of which compile to separate assemblies. Right now I'm code-signing them, but I'm pretty sure I'm doing it wrong. What's the best practice here?
- Sign each with a different key; make sure the passwords are different
- Sign each with a different key; use the same password if you want
- Sign each with the same key
- Something else entirely
Basically I'm not quite sure what "signing" does to them, or what the best practices are here, so a more generally discussion would be good. All I really know is that FxCop yelled at me, and it was easy to fix by clicking the "Sign this assembly" checkbox and generating a .pfx file using Visual Studio (2008).
Thanks! | 0 |
35,375 | 08/29/2008 21:49:07 | 3,433 | 08/28/2008 15:04:27 | 152 | 10 | Internet Access in Ubuntu on VirtualBox | I recently installed Ubuntu on a VirtualBox VM ... it installed just fine (much easier than on VirtualPC). However, I'm unable to get internet access from the guest OS (ie. Ubuntu). Can anyone give me any pointers on how I might enable this?
The Host OS is Windows Vista, and the hardware is an IBM Lenovo.
Thanks! :-) | virtualbox | ubuntu | null | null | null | null | open | Internet Access in Ubuntu on VirtualBox
===
I recently installed Ubuntu on a VirtualBox VM ... it installed just fine (much easier than on VirtualPC). However, I'm unable to get internet access from the guest OS (ie. Ubuntu). Can anyone give me any pointers on how I might enable this?
The Host OS is Windows Vista, and the hardware is an IBM Lenovo.
Thanks! :-) | 0 |
35,380 | 08/29/2008 21:52:57 | 2,727 | 08/24/2008 18:23:21 | 18 | 0 | Print Odd-Even numbers using signals | The problem is to print natural nos. 1,2,...n such that the parent process prints all odd numbers and child all even numbers using POSIX signals. Output should be:
Parent : 1
Child : 2
Parent : 3
and so on...any suggestions? | c | signals | null | null | null | null | open | Print Odd-Even numbers using signals
===
The problem is to print natural nos. 1,2,...n such that the parent process prints all odd numbers and child all even numbers using POSIX signals. Output should be:
Parent : 1
Child : 2
Parent : 3
and so on...any suggestions? | 0 |
35,402 | 08/29/2008 22:10:02 | 3,576 | 08/29/2008 06:56:00 | 51 | 1 | Resharper 4.0 encapsulation question... | When using Resharper to encapsulate a classes properties, is there a way to get it to do more than one property at a time? | resharper | null | null | null | null | null | open | Resharper 4.0 encapsulation question...
===
When using Resharper to encapsulate a classes properties, is there a way to get it to do more than one property at a time? | 0 |
35,407 | 08/29/2008 22:19:16 | 1,447 | 08/15/2008 16:13:59 | 26 | 3 | Trouble with parallel make not always starting another job when one finishes | I'm working on a system with four logical CPS (two dual-core CPUs if it matters). I'm using make to parallelize twelve trivially parallelizable tasks and doing it from cron.
The invocation looks like:
make -C [dir] -j 4 -l 3.99 [12 targets]
The trouble I'm running into is that sometimes one job will finish but the next one won't startup even though it shouldn't be stopped by the load average limiter. Each target takes about four hours to complete and I'm wondering if this might be part of the problem. | make | null | null | null | null | null | open | Trouble with parallel make not always starting another job when one finishes
===
I'm working on a system with four logical CPS (two dual-core CPUs if it matters). I'm using make to parallelize twelve trivially parallelizable tasks and doing it from cron.
The invocation looks like:
make -C [dir] -j 4 -l 3.99 [12 targets]
The trouble I'm running into is that sometimes one job will finish but the next one won't startup even though it shouldn't be stopped by the load average limiter. Each target takes about four hours to complete and I'm wondering if this might be part of the problem. | 0 |
35,420 | 08/29/2008 22:30:03 | 547 | 08/06/2008 16:09:22 | 558 | 30 | mysql software: any suggestions to oversee my mysql replication server? | I've had a tough time setting up my replication server. Is there any program (OS X, Win, Linux or php no problem) that lets me monitor and resolve replication issues? (btw, for those -uhm- following, ive been on this issue [here][1], [here][2], [here][3] and [here][4]. Either i'm going about this the wrong way or i must be immensely thick)
My production database is several megs in size and growing. Every time the database replication stops and the databases inevitably begin to slide out of sync i cringe. My last resync from dump took almost 4 hours roundtrip!
As always, even after sync, I run into this kind of show-stopping error":
Error 'Duplicate entry '252440' for key 1' on query.
I would love it if there was some way to closely monitor whats going on and perhaps let the software deal with it. I'm even all ears for service companies which may help me monitor my data better. Or an alternate way to mirror altogether.
**Edit**: going through my previous questions i found [this][5] which helps tremendously. I'm still all ears on the monitoring solution.
cheers,
/mp
[1]: http://stackoverflow.com/questions/8166/mysql-replication-if-i-dont-specify-any-databases-will-logbin-log-everything
[2]: http://stackoverflow.com/questions/3798/full-complete-mysql-db-replication-ideas-what-do-people-do
[3]: http://stackoverflow.com/questions/8365/mysql-administrator-backups-compatibility-mode-what-exactly-is-this-doing
[4]: http://stackoverflow.com/questions/30660/mysql-binary-log-replication-can-it-be-set-to-ignore-errors
[5]: http://stackoverflow.com/questions/30660/mysql-binary-log-replication-can-it-be-set-to-ignore-errors#30889 | mysql | mysql-management | null | null | null | null | open | mysql software: any suggestions to oversee my mysql replication server?
===
I've had a tough time setting up my replication server. Is there any program (OS X, Win, Linux or php no problem) that lets me monitor and resolve replication issues? (btw, for those -uhm- following, ive been on this issue [here][1], [here][2], [here][3] and [here][4]. Either i'm going about this the wrong way or i must be immensely thick)
My production database is several megs in size and growing. Every time the database replication stops and the databases inevitably begin to slide out of sync i cringe. My last resync from dump took almost 4 hours roundtrip!
As always, even after sync, I run into this kind of show-stopping error":
Error 'Duplicate entry '252440' for key 1' on query.
I would love it if there was some way to closely monitor whats going on and perhaps let the software deal with it. I'm even all ears for service companies which may help me monitor my data better. Or an alternate way to mirror altogether.
**Edit**: going through my previous questions i found [this][5] which helps tremendously. I'm still all ears on the monitoring solution.
cheers,
/mp
[1]: http://stackoverflow.com/questions/8166/mysql-replication-if-i-dont-specify-any-databases-will-logbin-log-everything
[2]: http://stackoverflow.com/questions/3798/full-complete-mysql-db-replication-ideas-what-do-people-do
[3]: http://stackoverflow.com/questions/8365/mysql-administrator-backups-compatibility-mode-what-exactly-is-this-doing
[4]: http://stackoverflow.com/questions/30660/mysql-binary-log-replication-can-it-be-set-to-ignore-errors
[5]: http://stackoverflow.com/questions/30660/mysql-binary-log-replication-can-it-be-set-to-ignore-errors#30889 | 0 |
35,429 | 08/29/2008 22:42:01 | 3,690 | 08/29/2008 22:25:01 | 1 | 1 | nmake, visualstudio, and .mak files | I was given a C++ project that was compiled using MS Visual Studio .net 2003 C++ compiler, and a .mak file that was used to compile it. I am able to build it from the command line using nmake project.mak, but the compiler complains that afxres.h was not found. I did a little searching around and the afxres.h is in the Visual Studio directory in an includes file. Where am I supposed to specify to nmake where to look for this header file? | visual-studio | nmake | .mak | null | null | null | open | nmake, visualstudio, and .mak files
===
I was given a C++ project that was compiled using MS Visual Studio .net 2003 C++ compiler, and a .mak file that was used to compile it. I am able to build it from the command line using nmake project.mak, but the compiler complains that afxres.h was not found. I did a little searching around and the afxres.h is in the Visual Studio directory in an includes file. Where am I supposed to specify to nmake where to look for this header file? | 0 |
35,432 | 08/29/2008 22:47:47 | 572 | 08/06/2008 20:56:54 | 2,190 | 182 | How can I point Visual Studio 2008 to a new path for projects? | I didn't see the option to point the workspace (or it's VS equilivant, I'm still learning the terminology for VS, but it is called a workspace in Eclipse) to My Documents/Programming instead of, well, wherever it is now. | visual-studio | null | null | null | null | null | open | How can I point Visual Studio 2008 to a new path for projects?
===
I didn't see the option to point the workspace (or it's VS equilivant, I'm still learning the terminology for VS, but it is called a workspace in Eclipse) to My Documents/Programming instead of, well, wherever it is now. | 0 |
35,465 | 08/29/2008 23:25:27 | 2,510 | 08/22/2008 15:37:19 | 1 | 0 | Easy/Simple online source control? | I'm working on a project with a small team for a couple months. We need simple source control. Preferably something online.
Any suggestions? | management | project | control | source | null | 03/23/2012 14:37:34 | not constructive | Easy/Simple online source control?
===
I'm working on a project with a small team for a couple months. We need simple source control. Preferably something online.
Any suggestions? | 4 |
35,470 | 08/29/2008 23:44:29 | 3,446 | 08/28/2008 15:47:28 | 16 | 3 | Are there any static analysis tools for Python? | I am starting to use Python (specifically because of Django) and I would like to remove the burden for exhaustive testing by performing some static analysis. What tools/parameters/etc. exist to detect issues at compile time that would otherwise show up during runtime? (type errors are probably the most obvious case of this, but undefined variables are another big one that could be avoided with an in-depth analysis of the AST.)
Obviously testing is important, and I don't imply that tests can be obviated entirely; however, there are many runtime errors in python that are not possible in other languages that perform stricter run-time checking -- I'm hoping that there are tools to bring at least some of these capabilities to python as well. | python | static-analysis | null | null | null | null | open | Are there any static analysis tools for Python?
===
I am starting to use Python (specifically because of Django) and I would like to remove the burden for exhaustive testing by performing some static analysis. What tools/parameters/etc. exist to detect issues at compile time that would otherwise show up during runtime? (type errors are probably the most obvious case of this, but undefined variables are another big one that could be avoided with an in-depth analysis of the AST.)
Obviously testing is important, and I don't imply that tests can be obviated entirely; however, there are many runtime errors in python that are not possible in other languages that perform stricter run-time checking -- I'm hoping that there are tools to bring at least some of these capabilities to python as well. | 0 |
35,474 | 08/29/2008 23:49:12 | 572 | 08/06/2008 20:56:54 | 2,192 | 183 | How much process do you follow on your own projects? | Do you follow a process at all? If so, which ones? If not, how do you manage the development cycle? | project | software-engineering | null | null | null | 07/04/2012 20:25:54 | not constructive | How much process do you follow on your own projects?
===
Do you follow a process at all? If so, which ones? If not, how do you manage the development cycle? | 4 |
35,479 | 08/29/2008 23:55:09 | 2,543 | 08/22/2008 18:27:05 | 143 | 28 | Exception in Web Service locks DLL and prevents publishing. Workaround? | I'm using a native DLL (FastImage.dll) in a C# ASP.NET Web Service that sometimes locks (can't delete it---says access denied); this requires stopping IIS to delete the DLL. The inability to delete this DLL in the bin folder of my published Web Service prevents me from publishing successfully (even though it thinks it published successfully!), which makes development and fixing the bug difficult (especially when it just happily runs old code since my changes may not be reflected on the server!). Note that the bug causing the Web Service to bomb and lock up the DLL is in my code, which is outside of said DLL, so I think this is a more general problem than just the FreeImage library (not to bring them any heat).
1. Has anyone experienced this?
2. Is there a way to make sure that when it says "Publish succeeded" from the VS IDE that it really means it, or to run sort of script to check that the files are really deleted before it attempts to Publish (like a pre-build step in VC++). (Right now I manually delete the files before publishing to make sure that I know the DLLs were replaced, instead of running old DLLs. It's still a problem, though if I can't delete the DLL.)
3. How would I detect whether a file was successfully deleted from a batch file? (so I can stop and start IIS if it fails)
4. Is it possible to stop and start IIS from a script (preferably from the Publish... action in the VS IDE) and if so, how? | c# | asp.net | visual-studio | web-services | iis | null | open | Exception in Web Service locks DLL and prevents publishing. Workaround?
===
I'm using a native DLL (FastImage.dll) in a C# ASP.NET Web Service that sometimes locks (can't delete it---says access denied); this requires stopping IIS to delete the DLL. The inability to delete this DLL in the bin folder of my published Web Service prevents me from publishing successfully (even though it thinks it published successfully!), which makes development and fixing the bug difficult (especially when it just happily runs old code since my changes may not be reflected on the server!). Note that the bug causing the Web Service to bomb and lock up the DLL is in my code, which is outside of said DLL, so I think this is a more general problem than just the FreeImage library (not to bring them any heat).
1. Has anyone experienced this?
2. Is there a way to make sure that when it says "Publish succeeded" from the VS IDE that it really means it, or to run sort of script to check that the files are really deleted before it attempts to Publish (like a pre-build step in VC++). (Right now I manually delete the files before publishing to make sure that I know the DLLs were replaced, instead of running old DLLs. It's still a problem, though if I can't delete the DLL.)
3. How would I detect whether a file was successfully deleted from a batch file? (so I can stop and start IIS if it fails)
4. Is it possible to stop and start IIS from a script (preferably from the Publish... action in the VS IDE) and if so, how? | 0 |
35,480 | 08/29/2008 23:56:27 | 3,421 | 08/28/2008 14:25:39 | 1 | 1 | Clearing Class::DBI's internal cache. | I'm currently working on a large implementation of Class::DBI for an existing database structure, and am running into a problem with clearing the cache from Class::DBI. This is a mod_perl implementation, so an instance of a class can be quite old between times that it is accessed.
From the man pages I found two options:
Music::DBI->clear_object_index();
And:
Music::Artist->purge_object_index_every(2000);
Now, when I add clear_object_index() to the DESTROY method, it seems to run, but doesn't actually empty the cache. I am able to manually change the database, re-run the request, and it is still the old version.
purge_object_index_every says that it clears the index every n requests. Setting this to "1" or "0", seems to clear the index... sometimes. I'd expect one of those two to work, but for some reason it doesn't do it every time. More like 1 in 5 times.
Any suggestions for clearing this out? | perl | null | null | null | null | null | open | Clearing Class::DBI's internal cache.
===
I'm currently working on a large implementation of Class::DBI for an existing database structure, and am running into a problem with clearing the cache from Class::DBI. This is a mod_perl implementation, so an instance of a class can be quite old between times that it is accessed.
From the man pages I found two options:
Music::DBI->clear_object_index();
And:
Music::Artist->purge_object_index_every(2000);
Now, when I add clear_object_index() to the DESTROY method, it seems to run, but doesn't actually empty the cache. I am able to manually change the database, re-run the request, and it is still the old version.
purge_object_index_every says that it clears the index every n requests. Setting this to "1" or "0", seems to clear the index... sometimes. I'd expect one of those two to work, but for some reason it doesn't do it every time. More like 1 in 5 times.
Any suggestions for clearing this out? | 0 |
35,485 | 08/30/2008 00:03:39 | 1,841 | 08/18/2008 20:36:10 | 78 | 3 | Linux: What is the best way to estimate the code & static data size of program? | I want to be able to get an estimate of how much code & static data is used by my C++ program?
Is there a way to find this out by looking at the executable or object files? Or perhaps something I can do at runtime?
Will objdump & readelf help? | c++ | c | linux | null | null | null | open | Linux: What is the best way to estimate the code & static data size of program?
===
I want to be able to get an estimate of how much code & static data is used by my C++ program?
Is there a way to find this out by looking at the executable or object files? Or perhaps something I can do at runtime?
Will objdump & readelf help? | 0 |
35,486 | 08/30/2008 00:04:38 | 2,066 | 08/20/2008 03:59:13 | 1 | 1 | Fluid rounded corners with jquery | What is the best way to create fluid width/height rounded corners with jquery? | jquery | null | null | null | null | null | open | Fluid rounded corners with jquery
===
What is the best way to create fluid width/height rounded corners with jquery? | 0 |
35,488 | 08/30/2008 00:05:34 | 572 | 08/06/2008 20:56:54 | 2,192 | 183 | Is there a good tool for managing the Windows Environment Variables? | The one that comes with Windows XP is not that great. The text field is small, everything's on one line, and it's hard to edit. Does something better exist? If not, where should I start to make one? | windows | path-variables | null | null | null | null | open | Is there a good tool for managing the Windows Environment Variables?
===
The one that comes with Windows XP is not that great. The text field is small, everything's on one line, and it's hard to edit. Does something better exist? If not, where should I start to make one? | 0 |
35,490 | 08/30/2008 00:07:41 | 3,279 | 08/27/2008 16:46:21 | 163 | 11 | Spread vs MPI vs zeromq? | In one of the answers to [Broadcast like UDP with the Reliability of TCP][1], a user mentions the [Spread][2] messaging API. I've also run across one called [ØMQ][3]. I also have some familiarity with [MPI][4].
So, my main question is: why would I choose one over the other? More specifically, why would I choose to use Spread or ØMQ when there are mature implementations of MPI to be had?
[1]: http://stackoverflow.com/questions/31572/broadcast-like-udp-with-the-reliability-of-tcp#31629
[2]: http://spread.org
[3]: http://zeromq.org
[4]: http://www-unix.mcs.anl.gov/mpi/ | networking | api | distributed | cluster-analysis | messaging | null | open | Spread vs MPI vs zeromq?
===
In one of the answers to [Broadcast like UDP with the Reliability of TCP][1], a user mentions the [Spread][2] messaging API. I've also run across one called [ØMQ][3]. I also have some familiarity with [MPI][4].
So, my main question is: why would I choose one over the other? More specifically, why would I choose to use Spread or ØMQ when there are mature implementations of MPI to be had?
[1]: http://stackoverflow.com/questions/31572/broadcast-like-udp-with-the-reliability-of-tcp#31629
[2]: http://spread.org
[3]: http://zeromq.org
[4]: http://www-unix.mcs.anl.gov/mpi/ | 0 |
35,491 | 08/30/2008 00:09:38 | 1,841 | 08/18/2008 20:36:10 | 78 | 3 | Mac OS X: What is the best way to estimate the code & static data size of program? | I want to be able to get an estimate of how much code & static data is used by my C++ program?
Is there a way to find this out by looking at the executable or object files? Or perhaps something I can do at runtime?
Will otool help? | c++ | c | osx | macos | null | null | open | Mac OS X: What is the best way to estimate the code & static data size of program?
===
I want to be able to get an estimate of how much code & static data is used by my C++ program?
Is there a way to find this out by looking at the executable or object files? Or perhaps something I can do at runtime?
Will otool help? | 0 |
35,499 | 08/30/2008 00:14:19 | 3,695 | 08/30/2008 00:14:19 | 1 | 0 | Ajax polling. | In the project i am currently working on, we have the need to develop a web chat application, not a very complex chat, just a way to connect two people to talk about a very specific topic, we don't need any kind of authentication for one of the two users, we don't have to support emoticons, avatars, or stuff like that.
Some project members suggested that we could use XMPP through BOSH, I said that is like trying to catch a fish with a boat's net, and proposed a more simpler method, like a simple Ajax/MySQL web chat, but we're worried about the performance hit in the server because of the constant polling of many chats open at the same time.
Has anyone done something like this before? What would you recommend? | php | ajax | chat | null | null | null | open | Ajax polling.
===
In the project i am currently working on, we have the need to develop a web chat application, not a very complex chat, just a way to connect two people to talk about a very specific topic, we don't need any kind of authentication for one of the two users, we don't have to support emoticons, avatars, or stuff like that.
Some project members suggested that we could use XMPP through BOSH, I said that is like trying to catch a fish with a boat's net, and proposed a more simpler method, like a simple Ajax/MySQL web chat, but we're worried about the performance hit in the server because of the constant polling of many chats open at the same time.
Has anyone done something like this before? What would you recommend? | 0 |
35,522 | 08/30/2008 00:44:43 | 335,696 | 08/30/2008 00:40:13 | 1 | 0 | looping and average in c++ | Programming Student here...trying to work on a project but I'm stuck.
The project is trying to find the miles per gallon per trip then at the end outputting total miles and total gallons used and averaging miles per gallon
How do I loop back up to the first question after the first set of questions has been asked.
Also how will I average the trips...will I have to have a variable for each of the trips?
I'm stuck, any help would be great! | c++ | null | null | null | null | null | open | looping and average in c++
===
Programming Student here...trying to work on a project but I'm stuck.
The project is trying to find the miles per gallon per trip then at the end outputting total miles and total gallons used and averaging miles per gallon
How do I loop back up to the first question after the first set of questions has been asked.
Also how will I average the trips...will I have to have a variable for each of the trips?
I'm stuck, any help would be great! | 0 |
35,528 | 08/30/2008 00:53:39 | 1,343 | 08/14/2008 15:46:01 | 143 | 26 | canonical problems list | Does anyone known of a a good reference for canonical CS problems?
I'm thinking of things like "the sorting problem", "the bin packing problem", "the travailing salesman problem" and what not. | theory | reference | null | null | null | null | open | canonical problems list
===
Does anyone known of a a good reference for canonical CS problems?
I'm thinking of things like "the sorting problem", "the bin packing problem", "the travailing salesman problem" and what not. | 0 |
35,530 | 08/30/2008 00:55:26 | 1,175 | 08/13/2008 10:21:54 | 977 | 94 | What Are High-Pass and Low-Pass Filters? | Graphics and audio editing and processing software often contain functions called "High-Pass Filter" and "Low-Pass Filter". Exactly what do these do, and what are the algorithms for implementing them? | algorithm | graphics | audio | photoshop | null | null | open | What Are High-Pass and Low-Pass Filters?
===
Graphics and audio editing and processing software often contain functions called "High-Pass Filter" and "Low-Pass Filter". Exactly what do these do, and what are the algorithms for implementing them? | 0 |
35,537 | 08/30/2008 01:11:46 | 3,270 | 08/27/2008 15:54:29 | 1 | 0 | Zoom for a form in C# | Is there an easy way to set the zoom level for a form in C#? In VBA there was a zoom property of the form. | c# | vba | null | null | null | null | open | Zoom for a form in C#
===
Is there an easy way to set the zoom level for a form in C#? In VBA there was a zoom property of the form. | 0 |
35,538 | 08/30/2008 01:15:32 | 3,594 | 08/29/2008 08:46:29 | 47 | 5 | Validate (X)HTML in Python | What's the best way to go about validating that a document follows some version of HTML (prefereably that I can specify)? I'd like to be able to know where the failures occur, as in a web-based validator, except in a native Python app. | python | html | validation | xhtml | null | null | open | Validate (X)HTML in Python
===
What's the best way to go about validating that a document follows some version of HTML (prefereably that I can specify)? I'd like to be able to know where the failures occur, as in a web-based validator, except in a native Python app. | 0 |
35,541 | 08/30/2008 01:17:52 | 3,435 | 08/28/2008 15:10:35 | 20 | 4 | Are there any good programs for actionscript/flex that'll count lines of code, number of functions, files, packages,etc... | Doug McCune had created something that was exactly what I needed ([http://dougmccune.com/blog/2007/05/10/analyze-your-actionscript-code-with-this-apollo-app/][1]) but alas - it was for AIR beta 2. I just would like some tool that I can run that would provide some decent metrics...any idea's?
[1]: http://dougmccune.com/blog/2007/05/10/analyze-your-actionscript-code-with-this-apollo-app/ | flex | actionscript-3 | code-analysis | null | null | null | open | Are there any good programs for actionscript/flex that'll count lines of code, number of functions, files, packages,etc...
===
Doug McCune had created something that was exactly what I needed ([http://dougmccune.com/blog/2007/05/10/analyze-your-actionscript-code-with-this-apollo-app/][1]) but alas - it was for AIR beta 2. I just would like some tool that I can run that would provide some decent metrics...any idea's?
[1]: http://dougmccune.com/blog/2007/05/10/analyze-your-actionscript-code-with-this-apollo-app/ | 0 |
35,551 | 08/30/2008 01:29:05 | 2,148 | 08/20/2008 15:20:13 | 235 | 18 | Excluding FxCop rule in source. | In a project I'm working on FxCop shows me lots of (and I mean more than 400) errors on the InitializeComponent() methods generated by the Windows Forms designer. Most of those errors are just the assignment of the Text property of labels.
I'd like to suppress those methods in source, so I copied the suppression code generated by FxCop into AssemblyInfo.cs, but it doesn't work.
This is the attribute that FxCop copied to the clipboard.
[module: SuppressMessage("Microsoft.Globalization",
"CA1303:DoNotPassLiteralsAsLocalizedParameters",
Scope = "member",
Target = "WindowsClient.MainForm.InitializeComponent():System.Void",
MessageId = "System.Windows.Forms.Control.set_Text(System.String)")]
Anyone knows the correct attribute to suppress this messages?
Thanks.
PS: I'm using Visual Studio 2005, C#, FxCop 1.36. | fxcop | initializecomponent | suppression | null | null | null | open | Excluding FxCop rule in source.
===
In a project I'm working on FxCop shows me lots of (and I mean more than 400) errors on the InitializeComponent() methods generated by the Windows Forms designer. Most of those errors are just the assignment of the Text property of labels.
I'd like to suppress those methods in source, so I copied the suppression code generated by FxCop into AssemblyInfo.cs, but it doesn't work.
This is the attribute that FxCop copied to the clipboard.
[module: SuppressMessage("Microsoft.Globalization",
"CA1303:DoNotPassLiteralsAsLocalizedParameters",
Scope = "member",
Target = "WindowsClient.MainForm.InitializeComponent():System.Void",
MessageId = "System.Windows.Forms.Control.set_Text(System.String)")]
Anyone knows the correct attribute to suppress this messages?
Thanks.
PS: I'm using Visual Studio 2005, C#, FxCop 1.36. | 0 |
35,559 | 08/30/2008 01:44:34 | 1,208 | 08/13/2008 13:11:36 | 133 | 19 | How far does SQL Server Express Edition scale? | Wikipedia says SQL Server Express Edition is limited to "one processor, 1 GB memory and 4 GB database files". Does anyone have practical experience with how well this scales?
| sql-server | null | null | null | null | null | open | How far does SQL Server Express Edition scale?
===
Wikipedia says SQL Server Express Edition is limited to "one processor, 1 GB memory and 4 GB database files". Does anyone have practical experience with how well this scales?
| 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.