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
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
54,188 | 09/10/2008 14:26:41 | 4,240 | 09/02/2008 13:51:18 | 1 | 0 | Are C++ Reads and Writes of an int atomic | I have two threads, one updating an int and one reading it. This value is a statistic where the order of the read and write is irrelevant.
My question is, do I need to synchronize access to this multi-byte value anyway? Or, put another way, can part of the write be complete and get interrupted, and then the read happen.
For example, think of
value = ox0000FFFF
increment value to 0x00010000
Is there a time where the value looks like 0x0001FFFF that I should be worried about? Certainly the larger the type, the more possible something like this is
I've always synchronized these types of accesses, but was curious what the community thought. | c++ | multithreading | synchronization | null | null | null | open | Are C++ Reads and Writes of an int atomic
===
I have two threads, one updating an int and one reading it. This value is a statistic where the order of the read and write is irrelevant.
My question is, do I need to synchronize access to this multi-byte value anyway? Or, put another way, can part of the write be complete and get interrupted, and then the read happen.
For example, think of
value = ox0000FFFF
increment value to 0x00010000
Is there a time where the value looks like 0x0001FFFF that I should be worried about? Certainly the larger the type, the more possible something like this is
I've always synchronized these types of accesses, but was curious what the community thought. | 0 |
54,199 | 09/10/2008 14:30:59 | 5,596 | 09/10/2008 14:30:57 | 1 | 0 | How to implement Repository pattern withe LinqToEntities? | How to implement Repository pattern withe LinqToEntities
how to implement the interface | .net | .net-3.5 | linq-to-entities | null | null | null | open | How to implement Repository pattern withe LinqToEntities?
===
How to implement Repository pattern withe LinqToEntities
how to implement the interface | 0 |
54,200 | 09/10/2008 14:31:04 | 2,208 | 08/20/2008 22:18:12 | 121 | 16 | Encrypting appSettings in web.config | I am developing a web app which requires a username and password to be stored in the web.Config, it also refers to some URLs which will be requested by the web app itself and never the client.
I know the .Net framework will not allow a web.config file to be served, however I still think its bad practice to leave this sort of information in plain text.
Everything I have read so far requires me to use a command line switch or to store values in the registry of the server. I have access to neither of these as the host is online and I have only FTP and Control Panel (helm) access.
Can anyone recommend any good, free encryption DLL's or methods which I can use? I'd rather not develop my own! | encryption | security | settings | null | null | null | open | Encrypting appSettings in web.config
===
I am developing a web app which requires a username and password to be stored in the web.Config, it also refers to some URLs which will be requested by the web app itself and never the client.
I know the .Net framework will not allow a web.config file to be served, however I still think its bad practice to leave this sort of information in plain text.
Everything I have read so far requires me to use a command line switch or to store values in the registry of the server. I have access to neither of these as the host is online and I have only FTP and Control Panel (helm) access.
Can anyone recommend any good, free encryption DLL's or methods which I can use? I'd rather not develop my own! | 0 |
54,207 | 09/10/2008 14:32:19 | 2,595 | 08/23/2008 12:52:27 | 13 | 6 | Soap logging in .net | I have an internal enterprise app that currently consumes 10 different web services. They're consumed via old style "Web References" instead of using WCF.
The problem I'm having is trying to work with the other teams in the company who are authoring the services I'm consuming. I found I needed to capture the exact SOAP messages that I'm sending and receiving. I did this by creating a new attribute that extends SoapExtensionAttribute. I then just add that attribute to the service method in the generated Reference.cs file. This works, but is painful for two reasons. First, it's a generated file so anything I do in there can be overwritten. Second, I have to remember to remove the attribute before checking in the file.
**Is There a better way to capture the exact SOAP messages that I am sending and receiving?**
Thanks! | c# | web-services | soap | null | null | null | open | Soap logging in .net
===
I have an internal enterprise app that currently consumes 10 different web services. They're consumed via old style "Web References" instead of using WCF.
The problem I'm having is trying to work with the other teams in the company who are authoring the services I'm consuming. I found I needed to capture the exact SOAP messages that I'm sending and receiving. I did this by creating a new attribute that extends SoapExtensionAttribute. I then just add that attribute to the service method in the generated Reference.cs file. This works, but is painful for two reasons. First, it's a generated file so anything I do in there can be overwritten. Second, I have to remember to remove the attribute before checking in the file.
**Is There a better way to capture the exact SOAP messages that I am sending and receiving?**
Thanks! | 0 |
54,217 | 09/10/2008 14:34:44 | 1,096,640 | 09/08/2008 13:10:56 | 1 | 1 | AJAX XMLHttpRequest object limt | Is there a security limit to the number of AJAX XMLHttpRequest objects you can create on a single page? If so, does this vary from one browser to another? | ajax | null | null | null | null | null | open | AJAX XMLHttpRequest object limt
===
Is there a security limit to the number of AJAX XMLHttpRequest objects you can create on a single page? If so, does this vary from one browser to another? | 0 |
54,219 | 09/10/2008 14:36:26 | 2,547 | 08/22/2008 19:10:02 | 916 | 44 | How should I handle a situation where I need to store several unrelated types but provide specific types on demand? | I'm working on an editor for files that are used by an important internal testing tool we use. The tool itself is large, complicated, and refactoring or rewriting would take more resources than we are able to devote to it for the forseeable future, so my hands are tied when it comes to large modifications. I must use a .NET language.
The files are XML serialized versions of four classes that are used by the tool (let's call them A, B, C, and D). The classes form a tree structure when all is well. Our editor works by loading a set of files, deserializing them, working out the relationships between them, and keeping track of any bad states it can find. The idea is for us to move away from hand-editing these files, which introduces tons of errors.
For a particular type of error, I'd like to maintain a collection of all files that have the problem. All four classes can have the problem, and I'd like to reduce duplication of code as much as possible. An important requirement is the user needs to be able to get the items in sets; for example, they need to get all A objects with an error, and telling them to iterate over the whole collection and pick out what they want is unacceptable compared to a <code>GetAs()</code> method. So, my first thought was to make a generic item that related the deserialized object and some metadata to indicate the error:
public class ErrorItem<T>
{
public T Item { get; set; }
public Metadata Metadata { get; set; }
}
Then, I'd have a collection class that could hold all of the error items, with helper methods to extract the items of a specific class when the user needs them. This is where the trouble starts.
None of the classes inherit from a common ancestor (other than <code>Object</code>). This was probably a mistake of the initial design, but I've spent a few days thinking about it and the classes really don't have much in common other than a GUID property that uniquely identifies each item so I can see why the original designer did not relate them through inheritance. This means that the unified error collection would need to store <code>ErrorItem<Object></code> objects, since I don't have a base class or interface to restrict what comes in. However, this makes the idea of this unified collection a little sketchy to me:
Public Class ErrorCollection
{
public ErrorItem<Object> AllItems { get; set; }
}
However, this has consequences on the public interface. What I really want is to return the appropriate <code>ErrorItem</code> generic type like this:
public ErrorItem<A>[] GetA()
This is impossible because I can only store <code>ErrorItem<Object></code>! I've gone over some workarounds in my head; mostly they include creating a new <code>ErrorItem</code> of the appropriate type on-the-fly, but it just feels kind of ugly. Another thought has been using a <code>Dictionary</code> to keep items organized by type, but it still doesn't seem right.
Is there some kind of pattern that might help me here? I know the easiest way to solve this is to add a base class that A, B, C, and D derive from, but I'm trying to have as small an impact on the original tool as possible. Is the cost of any workaround great enough that I should push to change the initial tool? | .net | generics | null | null | null | null | open | How should I handle a situation where I need to store several unrelated types but provide specific types on demand?
===
I'm working on an editor for files that are used by an important internal testing tool we use. The tool itself is large, complicated, and refactoring or rewriting would take more resources than we are able to devote to it for the forseeable future, so my hands are tied when it comes to large modifications. I must use a .NET language.
The files are XML serialized versions of four classes that are used by the tool (let's call them A, B, C, and D). The classes form a tree structure when all is well. Our editor works by loading a set of files, deserializing them, working out the relationships between them, and keeping track of any bad states it can find. The idea is for us to move away from hand-editing these files, which introduces tons of errors.
For a particular type of error, I'd like to maintain a collection of all files that have the problem. All four classes can have the problem, and I'd like to reduce duplication of code as much as possible. An important requirement is the user needs to be able to get the items in sets; for example, they need to get all A objects with an error, and telling them to iterate over the whole collection and pick out what they want is unacceptable compared to a <code>GetAs()</code> method. So, my first thought was to make a generic item that related the deserialized object and some metadata to indicate the error:
public class ErrorItem<T>
{
public T Item { get; set; }
public Metadata Metadata { get; set; }
}
Then, I'd have a collection class that could hold all of the error items, with helper methods to extract the items of a specific class when the user needs them. This is where the trouble starts.
None of the classes inherit from a common ancestor (other than <code>Object</code>). This was probably a mistake of the initial design, but I've spent a few days thinking about it and the classes really don't have much in common other than a GUID property that uniquely identifies each item so I can see why the original designer did not relate them through inheritance. This means that the unified error collection would need to store <code>ErrorItem<Object></code> objects, since I don't have a base class or interface to restrict what comes in. However, this makes the idea of this unified collection a little sketchy to me:
Public Class ErrorCollection
{
public ErrorItem<Object> AllItems { get; set; }
}
However, this has consequences on the public interface. What I really want is to return the appropriate <code>ErrorItem</code> generic type like this:
public ErrorItem<A>[] GetA()
This is impossible because I can only store <code>ErrorItem<Object></code>! I've gone over some workarounds in my head; mostly they include creating a new <code>ErrorItem</code> of the appropriate type on-the-fly, but it just feels kind of ugly. Another thought has been using a <code>Dictionary</code> to keep items organized by type, but it still doesn't seem right.
Is there some kind of pattern that might help me here? I know the easiest way to solve this is to add a base class that A, B, C, and D derive from, but I'm trying to have as small an impact on the original tool as possible. Is the cost of any workaround great enough that I should push to change the initial tool? | 0 |
54,221 | 09/10/2008 14:37:10 | 1,310 | 08/14/2008 13:42:16 | 804 | 37 | How would I allow a user to stream video to a web application for storage? | I'd like to add some functionality to a site that would allow users to record video using their webcam and easily store it online. I don't even know if this is possible right now, but I think flash has access to local webcams running through the browser.
Do you have any suggestions or resources to get me started on this? I'm primarily a java developer so If I could do it in an applet that would be great, but It may be easier to accomplish this using flash or some other technology.
This would mean streaming the video back to the webserver and storing it there.
Uploading a file is easy enough, but I'd rather the user not have to deal with that if it's possible.
Just to be clear. I'm not talking about uploading a video. I'm talking about allowing the user to click "record" in a web application and having the video streamed to the server and stored when the user clicks "stop".
| java | flash | web-applications | applet | null | null | open | How would I allow a user to stream video to a web application for storage?
===
I'd like to add some functionality to a site that would allow users to record video using their webcam and easily store it online. I don't even know if this is possible right now, but I think flash has access to local webcams running through the browser.
Do you have any suggestions or resources to get me started on this? I'm primarily a java developer so If I could do it in an applet that would be great, but It may be easier to accomplish this using flash or some other technology.
This would mean streaming the video back to the webserver and storing it there.
Uploading a file is easy enough, but I'd rather the user not have to deal with that if it's possible.
Just to be clear. I'm not talking about uploading a video. I'm talking about allowing the user to click "record" in a web application and having the video streamed to the server and stored when the user clicks "stop".
| 0 |
54,222 | 09/10/2008 14:37:24 | 1,108 | 08/12/2008 12:16:28 | 42 | 6 | Linq to SQL - Accessing System Databases/Tables? | Right now I have an SSIS package that runs every morning and gives me a report on the number of packages that failed or succeeded from the day before. The information for these packages is contained partly within the <code>sysjobs</code> table (a system table) within the <code>msdb</code> database (a system database) in SQL Server 2005.
When trying to move the package to a C# executable (mostly to gain better formatting over the email that gets sent out), I wasn't able to find a way to create a dbml file that allowed me to access these tables through Linq. I tried to look for any properties that would make these tables visible, but I haven't had much luck.
Does anyone know if this is possible with Linq to SQL? | c# | sql-server | linq | linq-to-sql | null | null | open | Linq to SQL - Accessing System Databases/Tables?
===
Right now I have an SSIS package that runs every morning and gives me a report on the number of packages that failed or succeeded from the day before. The information for these packages is contained partly within the <code>sysjobs</code> table (a system table) within the <code>msdb</code> database (a system database) in SQL Server 2005.
When trying to move the package to a C# executable (mostly to gain better formatting over the email that gets sent out), I wasn't able to find a way to create a dbml file that allowed me to access these tables through Linq. I tried to look for any properties that would make these tables visible, but I haven't had much luck.
Does anyone know if this is possible with Linq to SQL? | 0 |
54,227 | 09/10/2008 14:38:33 | 5,599 | 09/10/2008 14:32:15 | 1 | 0 | Asp.net path compaction | I have an asp.net url path which is being generated in a web form, and is coming out something like "/foo/bar/../bar/path.aspx", and is coming out in the generated html like this too. It should be shortened to "/foo/bar/path.aspx".
Path.Combine didn't fix it. Is there a function to clean this path up? | c# | asp.net | asp | path | combine | null | open | Asp.net path compaction
===
I have an asp.net url path which is being generated in a web form, and is coming out something like "/foo/bar/../bar/path.aspx", and is coming out in the generated html like this too. It should be shortened to "/foo/bar/path.aspx".
Path.Combine didn't fix it. Is there a function to clean this path up? | 0 |
54,230 | 09/10/2008 14:39:38 | 5,564 | 09/10/2008 14:08:33 | 1 | 0 | CakePHP ACL Database Setup: ARO / ACO structure? | I'm struggling to implement ACL in CakePHP. After reading the documentation in the [cake manual][1] as well as several other tutorials, blog posts etc, I found Aran Johnson's excellent tutorial which has helped fill in many of the gaps. His examples seem to conflict with others I've seen though in a few places - specifically in the ARO tree structure he uses.
In his [examples][2] his user groups are set up as a cascading tree, with the most general user type being at the top of the tree, and its children branching off for each more restricted access type. Elsewhere I've usually seen each user type as a child of the same generic user type.
How do you set up your AROs and ACOs in CakePHP? Any and all tips appreciated!
[1]: http://manual.cakephp.org/view/171/Access-Control-Lists
[2]: http://aranworld.com/article/169/acl-and-auth-tutorial-database-setup | cakephp | acl | null | null | null | null | open | CakePHP ACL Database Setup: ARO / ACO structure?
===
I'm struggling to implement ACL in CakePHP. After reading the documentation in the [cake manual][1] as well as several other tutorials, blog posts etc, I found Aran Johnson's excellent tutorial which has helped fill in many of the gaps. His examples seem to conflict with others I've seen though in a few places - specifically in the ARO tree structure he uses.
In his [examples][2] his user groups are set up as a cascading tree, with the most general user type being at the top of the tree, and its children branching off for each more restricted access type. Elsewhere I've usually seen each user type as a child of the same generic user type.
How do you set up your AROs and ACOs in CakePHP? Any and all tips appreciated!
[1]: http://manual.cakephp.org/view/171/Access-Control-Lists
[2]: http://aranworld.com/article/169/acl-and-auth-tutorial-database-setup | 0 |
54,237 | 09/10/2008 14:41:43 | 4,906 | 09/06/2008 14:21:25 | 69 | 4 | Is there a way to highlight the target of a bookmark? (www.site.com/page.htm#bookmark) ? |
I want to link to bookmark on a page (mysite.com/mypage.htm#bookmark) AND visually highlight the item that was bookmarked (maybe having a red boarder). Naturally, there would be multiple items bookmarked. So that if someone clicked on <page>#bookmark2 then *that* other area would be highlighted).
I can see how to do that with .asp or .aspx but I'd like to do it more simply than that. I thought maybe there was a clever way to do it with CSS.
WHY I'm interested:
- I want to have our programs link to a shopping page that lists all the programs on it. I'm using a bookmark so they're jumping to the particular program area (site.com/shoppingpage#Programx) but just to make it *obvious* I'd like to actually highlight the page being linked to. | css | null | null | null | null | null | open | Is there a way to highlight the target of a bookmark? (www.site.com/page.htm#bookmark) ?
===
I want to link to bookmark on a page (mysite.com/mypage.htm#bookmark) AND visually highlight the item that was bookmarked (maybe having a red boarder). Naturally, there would be multiple items bookmarked. So that if someone clicked on <page>#bookmark2 then *that* other area would be highlighted).
I can see how to do that with .asp or .aspx but I'd like to do it more simply than that. I thought maybe there was a clever way to do it with CSS.
WHY I'm interested:
- I want to have our programs link to a shopping page that lists all the programs on it. I'm using a bookmark so they're jumping to the particular program area (site.com/shoppingpage#Programx) but just to make it *obvious* I'd like to actually highlight the page being linked to. | 0 |
54,249 | 09/10/2008 14:43:51 | 4,877 | 09/06/2008 09:50:35 | 1 | 0 | Will a hard drive survive in a fire resistant safe? | I've been working with a friend trying to come up with a way to backup his important data. He's wanting to put a flash drive or portable drive in a fire safe. I'm thinking the temperature in the safe, while not enough to damage paper, will damage the delicate electronics in a flash drive or warp the platters on a hard drive.
I've suggested instead of storing it in a fire safe, to take it to work. That way it's off site. Or maybe to sign up for an online storage account.
What do you all think?
Thanks in advance! | backup | data-protection | null | null | null | null | open | Will a hard drive survive in a fire resistant safe?
===
I've been working with a friend trying to come up with a way to backup his important data. He's wanting to put a flash drive or portable drive in a fire safe. I'm thinking the temperature in the safe, while not enough to damage paper, will damage the delicate electronics in a flash drive or warp the platters on a hard drive.
I've suggested instead of storing it in a fire safe, to take it to work. That way it's off site. Or maybe to sign up for an online storage account.
What do you all think?
Thanks in advance! | 0 |
54,255 | 09/10/2008 14:46:35 | 4,639 | 09/04/2008 23:07:22 | 84 | 1 | In vim is there a way to delete without putting text in the register? | Using vim I often want to replace a block of code with a block that I just yanked.
But when I delete the block of code that is to be replaced, that block itself goes into the register which erases the block I just yanked. So I've got in the habit of yanking, then inserting, then deleting what I didn't want, but with large blocks of code this gets messy trying to keep the inserted block and the block to delete separate.
So what is the slickest and quickest way to replace text in vim?
- is there a way to delete text without putting it into the register?
- is there a way to say e.g. "replace next word" or "replace up to next paragraph"
- or is the best way to somehow use the multi-register feature? | vim | vi | null | null | null | null | open | In vim is there a way to delete without putting text in the register?
===
Using vim I often want to replace a block of code with a block that I just yanked.
But when I delete the block of code that is to be replaced, that block itself goes into the register which erases the block I just yanked. So I've got in the habit of yanking, then inserting, then deleting what I didn't want, but with large blocks of code this gets messy trying to keep the inserted block and the block to delete separate.
So what is the slickest and quickest way to replace text in vim?
- is there a way to delete text without putting it into the register?
- is there a way to say e.g. "replace next word" or "replace up to next paragraph"
- or is the best way to somehow use the multi-register feature? | 0 |
54,264 | 09/10/2008 14:49:45 | 1,175 | 08/13/2008 10:21:54 | 1,558 | 118 | Tracking Refactorings in a Bug Database | Let's say you work someplace where every change to source code must be associated with a bug-report or feature-request, and there is no way to get that policy reformed. In such an environment, what is the best way to deal with code refactorings (that is, changes that improve the code but do not fix a bug or add a feature)?
- Write up a bug-report and associate the refactoring with it.
- Write up a feature-request and associate the refactoring with it.
- Sneak in the refactorings while working on code that is associated with a bug-report/feature-request.
- Just don't do any refactoring.
- Other
Note that all bug reports and feature descriptions will be visible to managers and customers. | refactoring | bug-tracking | null | null | null | null | open | Tracking Refactorings in a Bug Database
===
Let's say you work someplace where every change to source code must be associated with a bug-report or feature-request, and there is no way to get that policy reformed. In such an environment, what is the best way to deal with code refactorings (that is, changes that improve the code but do not fix a bug or add a feature)?
- Write up a bug-report and associate the refactoring with it.
- Write up a feature-request and associate the refactoring with it.
- Sneak in the refactorings while working on code that is associated with a bug-report/feature-request.
- Just don't do any refactoring.
- Other
Note that all bug reports and feature descriptions will be visible to managers and customers. | 0 |
54,295 | 09/10/2008 15:00:48 | 5,084 | 09/07/2008 19:06:24 | 1 | 0 | Writing java.util.Properties to xml does not sort keys. | I'd like to store a properties file as XML. Is there a way to sort the keys when doing this so that the generated XML file will be in alphabetical order?
String propFile = "/path/to/file";
Properties props = new Properties();
/*set some properties here*/
try {
FileOutputStream xmlStream = new FileOutputStream(propFile);
/*this comes out unsorted*/
props.storeToXML(xmlStream,"");
} catch (IOException e) {
e.printStackTrace();
} | java | xml | null | null | null | null | open | Writing java.util.Properties to xml does not sort keys.
===
I'd like to store a properties file as XML. Is there a way to sort the keys when doing this so that the generated XML file will be in alphabetical order?
String propFile = "/path/to/file";
Properties props = new Properties();
/*set some properties here*/
try {
FileOutputStream xmlStream = new FileOutputStream(propFile);
/*this comes out unsorted*/
props.storeToXML(xmlStream,"");
} catch (IOException e) {
e.printStackTrace();
} | 0 |
54,299 | 09/10/2008 15:01:48 | 4,144 | 09/02/2008 02:27:42 | 95 | 6 | Is it possible to over OO? | My question is simple; is it possible to over object orientate your code?
How much is too much? At what point are you giving up readability and maintainability for the sake of OO?
I am a huge OO person but sometimes I wonder if I am over-complicating my code....
Thoughts? | oop | null | null | null | null | null | open | Is it possible to over OO?
===
My question is simple; is it possible to over object orientate your code?
How much is too much? At what point are you giving up readability and maintainability for the sake of OO?
I am a huge OO person but sometimes I wonder if I am over-complicating my code....
Thoughts? | 0 |
54,318 | 09/10/2008 15:07:18 | 1,341 | 08/14/2008 15:30:17 | 412 | 14 | Any tools to get code churn metrics for a Subversion repository? | I'm looking for any tools that can give you code churn metrics (graphs and charts would be even better) for a Subversion repository.
One tool I know of is [statsvn][1] - a Java tool that creates some HTML reports and some code churn metrics.
I wanted to know if there are any others that are maybe open source, extensible, etc.
[1]: http://www.statsvn.org/ | svn | project-management | null | null | null | null | open | Any tools to get code churn metrics for a Subversion repository?
===
I'm looking for any tools that can give you code churn metrics (graphs and charts would be even better) for a Subversion repository.
One tool I know of is [statsvn][1] - a Java tool that creates some HTML reports and some code churn metrics.
I wanted to know if there are any others that are maybe open source, extensible, etc.
[1]: http://www.statsvn.org/ | 0 |
54,320 | 09/10/2008 15:07:33 | 1,980 | 08/19/2008 16:40:39 | 143 | 6 | How can I become a better communicator? | Sometimes it takes me two or three attempts to explain how a piece of code functions or how a process works within an application so that the person I am speaking to understands (or at least responds as if they understand).
I'm reading a few different books on Technical Writing but what can I do to become a better verbal "code communicator"? | self-improvement | null | null | null | null | 03/01/2012 19:48:14 | not constructive | How can I become a better communicator?
===
Sometimes it takes me two or three attempts to explain how a piece of code functions or how a process works within an application so that the person I am speaking to understands (or at least responds as if they understand).
I'm reading a few different books on Technical Writing but what can I do to become a better verbal "code communicator"? | 4 |
54,334 | 09/10/2008 15:11:42 | 2,017 | 08/19/2008 20:01:30 | 149 | 16 | How do I concatenate text in a query in sql server? | SELECT notes + 'SomeText'
FROM NotesTable a
gives `The data types nvarchar and text are incompatible in the add operator.` as an error.
| sql | sql-server | null | null | null | null | open | How do I concatenate text in a query in sql server?
===
SELECT notes + 'SomeText'
FROM NotesTable a
gives `The data types nvarchar and text are incompatible in the add operator.` as an error.
| 0 |
54,337 | 09/10/2008 15:12:19 | 2,894 | 08/25/2008 20:06:55 | 563 | 52 | How can you find out where the style for a ASP .Net web page element came from? | I have a quandary. My web application (C#, .Net 3.0, etc) has Themes, CSS sheets and, of course, inline style definitions. Now that's alot of chefs adding stuff to the soup. All of this results, not surprisingly, in my pages having bizarre styling on occasion.
I am sure that all these styles are applied in a hierarchical method (although I am not sure of that order). The issue is that each style is applied as a "transparent" layer which just masks what it is applying. This is, I feel, a good idea as you can specifiy styles for the whole and then one-off them as needed. Unfortunately I can't tell from which layer the style actually came from.
I could solve this issue by explicitly expressing the style at all layers but that gets bulky and hard to manage and the page(s) works 80% of the time. I just need to figure out where that squirrelly 20% came from. | c# | asp.net | css | themes | null | null | open | How can you find out where the style for a ASP .Net web page element came from?
===
I have a quandary. My web application (C#, .Net 3.0, etc) has Themes, CSS sheets and, of course, inline style definitions. Now that's alot of chefs adding stuff to the soup. All of this results, not surprisingly, in my pages having bizarre styling on occasion.
I am sure that all these styles are applied in a hierarchical method (although I am not sure of that order). The issue is that each style is applied as a "transparent" layer which just masks what it is applying. This is, I feel, a good idea as you can specifiy styles for the whole and then one-off them as needed. Unfortunately I can't tell from which layer the style actually came from.
I could solve this issue by explicitly expressing the style at all layers but that gets bulky and hard to manage and the page(s) works 80% of the time. I just need to figure out where that squirrelly 20% came from. | 0 |
54,364 | 09/10/2008 15:17:06 | 2,144 | 08/20/2008 14:49:43 | 95 | 8 | Using ActiveDirectoryMembershipProvider with two domain controllers | We have an ASP.NET applicatoin running at a customer site that uses ActiveDirectory for user login via the ActiveDirectoryMembershipProvider. Their primary domain controller that we were pointing to went down this morning, and in getting everything set back up the client was wondering if we could have a redundant connection to two domain controllers; i.e. specifying a primary and a backup AD server. A Google search proved fruitless - does anyone know if this can be done?
| asp.net | directoryservices | activedirectory | null | null | null | open | Using ActiveDirectoryMembershipProvider with two domain controllers
===
We have an ASP.NET applicatoin running at a customer site that uses ActiveDirectory for user login via the ActiveDirectoryMembershipProvider. Their primary domain controller that we were pointing to went down this morning, and in getting everything set back up the client was wondering if we could have a redundant connection to two domain controllers; i.e. specifying a primary and a backup AD server. A Google search proved fruitless - does anyone know if this can be done?
| 0 |
54,365 | 09/10/2008 15:17:09 | 1,277,510 | 09/07/2008 10:45:49 | 81 | 7 | prepend to a file one liner shell? | This is probably [a complex solution][1].
I am looking for a simple operator like ">>", but for prepending.
I am afraid it does not exist. I'll have to do something like
<pre>
mv $F tmp
cat header tmp > $F
</pre>
Anything smarter? (I am not fond of tmp files)
[1]: http://www.linuxtopia.org/online_books/advanced_bash_scripting_guide/x13320.html | shell | null | null | null | null | null | open | prepend to a file one liner shell?
===
This is probably [a complex solution][1].
I am looking for a simple operator like ">>", but for prepending.
I am afraid it does not exist. I'll have to do something like
<pre>
mv $F tmp
cat header tmp > $F
</pre>
Anything smarter? (I am not fond of tmp files)
[1]: http://www.linuxtopia.org/online_books/advanced_bash_scripting_guide/x13320.html | 0 |
54,380 | 09/10/2008 15:21:15 | 5,431 | 09/09/2008 14:45:50 | 1 | 0 | Problem rolling out ADO.Net Data Service application to IIS | I am adding a ADO.Net Data Service lookup feature to an existing web page. Everything works great when running from visual studio, but when I roll it out to IIS, I get the following error:
> The server encountered an error processing the request. See server logs for more details.
I get this even when trying to display the default page, i.e.:
> http://server/FFLookup.svc
I have 3.5 SP1 installed on the server.
What am I missing, and which "Server Logs" is it refering to? I can't find any further error messages.
Thanks
Patrick | .net | wcf-data-services | web-services | null | null | null | open | Problem rolling out ADO.Net Data Service application to IIS
===
I am adding a ADO.Net Data Service lookup feature to an existing web page. Everything works great when running from visual studio, but when I roll it out to IIS, I get the following error:
> The server encountered an error processing the request. See server logs for more details.
I get this even when trying to display the default page, i.e.:
> http://server/FFLookup.svc
I have 3.5 SP1 installed on the server.
What am I missing, and which "Server Logs" is it refering to? I can't find any further error messages.
Thanks
Patrick | 0 |
54,387 | 09/10/2008 15:23:26 | 1,324,220 | 08/23/2008 19:01:43 | 552 | 30 | Exposing .net methods as Excel functions? | I have a set of calculation methods sitting in a .Net DLL. I would like to make those methods available to Excel (2003+) users so they can use them in their spreadsheets.
For example, my .net method:
public double CalculateSomethingReallyComplex(doube a, double b) {...}
I would like enable them to call this method just by typing a formula in a random cell:
=CalculateSomethingReallyComplex(A1; B1)
What would be the best way to accomplish this? | .net | excel | interop | null | null | null | open | Exposing .net methods as Excel functions?
===
I have a set of calculation methods sitting in a .Net DLL. I would like to make those methods available to Excel (2003+) users so they can use them in their spreadsheets.
For example, my .net method:
public double CalculateSomethingReallyComplex(doube a, double b) {...}
I would like enable them to call this method just by typing a formula in a random cell:
=CalculateSomethingReallyComplex(A1; B1)
What would be the best way to accomplish this? | 0 |
54,401 | 09/10/2008 15:27:50 | 4,639 | 09/04/2008 23:07:22 | 102 | 1 | What is the best strategy for code chunks and macros in vim? | As I develop more with vim, I find myself wanting to copy in blocks of useful code, similar to "templates" in Eclipse.
I was thinking of making a separate file for each code chunk and just reading them in with
<code>:r code-fornext</code><br/>
but that just seems kind of primitive. Googling around I find vim macros mentioned and something about "maps" but nothing that seems straightforward.
What I am looking for are e.g. something like Eclipse's "Templates" so I pop in a code chunk with the cursor sitting in the middle of it.
Or JEdit's "Macros" which I can record doing complicated deletes and renaming one line, then I can play it again on 10 other lines so it does the same to them.
Does vim have anything like these two functionalities? | vim | vi | null | null | null | null | open | What is the best strategy for code chunks and macros in vim?
===
As I develop more with vim, I find myself wanting to copy in blocks of useful code, similar to "templates" in Eclipse.
I was thinking of making a separate file for each code chunk and just reading them in with
<code>:r code-fornext</code><br/>
but that just seems kind of primitive. Googling around I find vim macros mentioned and something about "maps" but nothing that seems straightforward.
What I am looking for are e.g. something like Eclipse's "Templates" so I pop in a code chunk with the cursor sitting in the middle of it.
Or JEdit's "Macros" which I can record doing complicated deletes and renaming one line, then I can play it again on 10 other lines so it does the same to them.
Does vim have anything like these two functionalities? | 0 |
54,418 | 09/10/2008 15:33:10 | 4,915 | 09/06/2008 15:29:52 | 1 | 0 | How do I (or can I) SELECT DISTINCT on multiple columns (postgresql)? | I need to retrieve all rows from a table where 2 columns combined are all different. So I want all the sales that do not have any other sales that happened on the same day for the same price. The sales that are unique based on day and price will get updated to an active status.
So I'm thinking:
UPDATE sales
SET status = 'ACTIVE'
WHERE id IN (SELECT DISTINCT (saleprice, saledate), id, count(id)
FROM sales
HAVING count = 1)
But my brain hurts going any farther than that. | sql | postgresql | null | null | null | null | open | How do I (or can I) SELECT DISTINCT on multiple columns (postgresql)?
===
I need to retrieve all rows from a table where 2 columns combined are all different. So I want all the sales that do not have any other sales that happened on the same day for the same price. The sales that are unique based on day and price will get updated to an active status.
So I'm thinking:
UPDATE sales
SET status = 'ACTIVE'
WHERE id IN (SELECT DISTINCT (saleprice, saledate), id, count(id)
FROM sales
HAVING count = 1)
But my brain hurts going any farther than that. | 0 |
54,419 | 09/10/2008 15:33:23 | 5,408 | 09/09/2008 13:23:01 | 59 | 5 | How to host 2 WCF services in 1 Windows Service? | I have a WCF application that has two Services that I am trying to host in a single Windows Service using net.tcp. I can run either of the services just fine, but as soon as I try to put them both in the Windows Service only the first one loads up. I have determined that the second services ctor is being called but the OnStart never fires. This tells me that WCF is finding something wrong with loading up that second service.
Using net.tcp I know I need to turn on port sharing and start the port sharing service on the server. This all seems to be working properly. I have tried putting the services on different tcp ports and still no success.
My service installer class looks like this:
[RunInstaller(true)]
public class ProjectInstaller : Installer
{
private ServiceProcessInstaller _process;
private ServiceInstaller _serviceAdmin;
private ServiceInstaller _servicePrint;
public ProjectInstaller()
{
_process = new ServiceProcessInstaller();
_process.Account = ServiceAccount.LocalSystem;
_servicePrint = new ServiceInstaller();
_servicePrint.ServiceName = "PrintingService";
_servicePrint.StartType = ServiceStartMode.Automatic;
_serviceAdmin = new ServiceInstaller();
_serviceAdmin.ServiceName = "PrintingAdminService";
_serviceAdmin.StartType = ServiceStartMode.Automatic;
Installers.AddRange(new Installer[] { _process, _servicePrint, _serviceAdmin });
}
}
and both services looking very similar
class PrintService : ServiceBase
{
public ServiceHost _host = null;
public PrintService()
{
ServiceName = "PCTSPrintingService";
CanStop = true;
AutoLog = true;
}
protected override void OnStart(string[] args)
{
if (_host != null) _host.Close();
_host = new ServiceHost(typeof(Printing.ServiceImplementation.PrintingService));
_host.Faulted += host_Faulted;
_host.Open();
}
}
| wcf | windows-services | null | null | null | null | open | How to host 2 WCF services in 1 Windows Service?
===
I have a WCF application that has two Services that I am trying to host in a single Windows Service using net.tcp. I can run either of the services just fine, but as soon as I try to put them both in the Windows Service only the first one loads up. I have determined that the second services ctor is being called but the OnStart never fires. This tells me that WCF is finding something wrong with loading up that second service.
Using net.tcp I know I need to turn on port sharing and start the port sharing service on the server. This all seems to be working properly. I have tried putting the services on different tcp ports and still no success.
My service installer class looks like this:
[RunInstaller(true)]
public class ProjectInstaller : Installer
{
private ServiceProcessInstaller _process;
private ServiceInstaller _serviceAdmin;
private ServiceInstaller _servicePrint;
public ProjectInstaller()
{
_process = new ServiceProcessInstaller();
_process.Account = ServiceAccount.LocalSystem;
_servicePrint = new ServiceInstaller();
_servicePrint.ServiceName = "PrintingService";
_servicePrint.StartType = ServiceStartMode.Automatic;
_serviceAdmin = new ServiceInstaller();
_serviceAdmin.ServiceName = "PrintingAdminService";
_serviceAdmin.StartType = ServiceStartMode.Automatic;
Installers.AddRange(new Installer[] { _process, _servicePrint, _serviceAdmin });
}
}
and both services looking very similar
class PrintService : ServiceBase
{
public ServiceHost _host = null;
public PrintService()
{
ServiceName = "PCTSPrintingService";
CanStop = true;
AutoLog = true;
}
protected override void OnStart(string[] args)
{
if (_host != null) _host.Close();
_host = new ServiceHost(typeof(Printing.ServiceImplementation.PrintingService));
_host.Faulted += host_Faulted;
_host.Open();
}
}
| 0 |
54,421 | 09/10/2008 15:33:49 | 577 | 08/06/2008 21:36:25 | 433 | 17 | What is the design pattern for processing command line arguments | If you are writing a program that is executable from the command line, you often want to offer the user several options or flags, along with possibly more than one argument. I have stumbled my way through this many times, but is there some sort of design pattern for looping through args and spinning off the appropriate functions?
Consider:
myprogram -f filename -d directory -r regex
How do you organize the code after you retrieve the arguments using whatever built-ins for your language? (language-specific answers welcomed, if that helps you articulate an answer) | design-patterns | command-line | arguments | null | null | null | open | What is the design pattern for processing command line arguments
===
If you are writing a program that is executable from the command line, you often want to offer the user several options or flags, along with possibly more than one argument. I have stumbled my way through this many times, but is there some sort of design pattern for looping through args and spinning off the appropriate functions?
Consider:
myprogram -f filename -d directory -r regex
How do you organize the code after you retrieve the arguments using whatever built-ins for your language? (language-specific answers welcomed, if that helps you articulate an answer) | 0 |
54,426 | 09/10/2008 15:35:31 | 5,613 | 09/10/2008 14:51:53 | 1 | 1 | What's cleanest, shortest Javascript to submit a URL the user is at to another process via URL? | Like the Delicious submission bookmarklet, I'd like to have some standard Javascript I can use to submit any visited URL to a 3rd party site when that's possible by URL. Suggestions?
For example, I've been using
javascript:void(location.href="http://www.yacktrack.com/home?query="+encodeURI(location.href))
so far but wonder if there's something more sophisticated I could use or better practice | javascript | submission | urlhacks | null | null | null | open | What's cleanest, shortest Javascript to submit a URL the user is at to another process via URL?
===
Like the Delicious submission bookmarklet, I'd like to have some standard Javascript I can use to submit any visited URL to a 3rd party site when that's possible by URL. Suggestions?
For example, I've been using
javascript:void(location.href="http://www.yacktrack.com/home?query="+encodeURI(location.href))
so far but wonder if there's something more sophisticated I could use or better practice | 0 |
54,440 | 09/10/2008 15:37:24 | 3,797 | 08/30/2008 21:52:47 | 11 | 2 | Adding Items Using DataBinding from TreeView to ListBox WPF | I want to add the selected item from the TreeView to the ListBox control using DataBinding (If it can work with Databinding).
<TreeView HorizontalAlignment="Left" Margin="30,32,0,83" Name="treeView1" Width="133" >
</TreeView>
<ListBox Margin="208,36,93,0" Name="listBox1" Height="196" VerticalAlignment="Top">
</ListBox>
TreeView is populated from the code behind page with some dummy data.
| wpf | null | null | null | null | null | open | Adding Items Using DataBinding from TreeView to ListBox WPF
===
I want to add the selected item from the TreeView to the ListBox control using DataBinding (If it can work with Databinding).
<TreeView HorizontalAlignment="Left" Margin="30,32,0,83" Name="treeView1" Width="133" >
</TreeView>
<ListBox Margin="208,36,93,0" Name="listBox1" Height="196" VerticalAlignment="Top">
</ListBox>
TreeView is populated from the code behind page with some dummy data.
| 0 |
54,459 | 09/10/2008 15:42:43 | 1,694 | 08/18/2008 02:45:22 | 1,450 | 42 | Website load testing | My team has just developed a website for a client and wants to test that it'll work under the expected usage for 50 simultaneous users. So the plan is to write a test program that will act as 50 simultaneous users. We need this test program to be able to:
1. Be logged in with a cookie. Our session ids are not embedded in our URLs and we don't want them to be.
2. Submit a few forms rather than just clicking on links.
3. Measure the response time of every page and keep statistics on every page; average, best, and worst load times would be nice.
4. Wait a realistic amount of time between actions.
I don't need to worry about these clients doing anything with Javascript; our site only uses a little Javascript and the clients should be able to do almost everything without it.
So before we try to build our own software for doing this, is there something out there which would meet some or all of these needs? A Python solution would be ideal, but we'll take anything, so long as it's free. (We have a budget for programmer time but no budget for buying software, so it wouldn't matter how money we'd save to buy a COTS product.) | performance | stresstesting | null | null | null | null | open | Website load testing
===
My team has just developed a website for a client and wants to test that it'll work under the expected usage for 50 simultaneous users. So the plan is to write a test program that will act as 50 simultaneous users. We need this test program to be able to:
1. Be logged in with a cookie. Our session ids are not embedded in our URLs and we don't want them to be.
2. Submit a few forms rather than just clicking on links.
3. Measure the response time of every page and keep statistics on every page; average, best, and worst load times would be nice.
4. Wait a realistic amount of time between actions.
I don't need to worry about these clients doing anything with Javascript; our site only uses a little Javascript and the clients should be able to do almost everything without it.
So before we try to build our own software for doing this, is there something out there which would meet some or all of these needs? A Python solution would be ideal, but we'll take anything, so long as it's free. (We have a budget for programmer time but no budget for buying software, so it wouldn't matter how money we'd save to buy a COTS product.) | 0 |
54,475 | 09/10/2008 15:46:58 | 5,079 | 09/07/2008 18:47:39 | 1 | 1 | Help with aggressive JavaScript caching | I've run into a problem where I make changes to a few JavaScript files that are referenced in an HTML file, but the browser doesn't see the changes. It holds onto the copy cached in the browser, even though the web server has a newer version.
Not until I force the browser to clear the cache do I see the changes.
Is this a web-server configuration? Do I need to set my JavaScript files to never cache? I've seen some interesting techniques in the [Google Web Toolkit][1] where they actually create a **new** JavaScript file name any time an update is made. I believe this is to prevent proxies and browsers from keeping old versions of the JavaScript files with the same names.
Is there a list of best practices somewhere?
[1]: http://code.google.com/docreader/#p=google-web-toolkit-doc-1-5&s=google-web-toolkit-doc-1-5&t=FAQ_GWTApplicationFiles | javascript | caching | null | null | null | null | open | Help with aggressive JavaScript caching
===
I've run into a problem where I make changes to a few JavaScript files that are referenced in an HTML file, but the browser doesn't see the changes. It holds onto the copy cached in the browser, even though the web server has a newer version.
Not until I force the browser to clear the cache do I see the changes.
Is this a web-server configuration? Do I need to set my JavaScript files to never cache? I've seen some interesting techniques in the [Google Web Toolkit][1] where they actually create a **new** JavaScript file name any time an update is made. I believe this is to prevent proxies and browsers from keeping old versions of the JavaScript files with the same names.
Is there a list of best practices somewhere?
[1]: http://code.google.com/docreader/#p=google-web-toolkit-doc-1-5&s=google-web-toolkit-doc-1-5&t=FAQ_GWTApplicationFiles | 0 |
54,482 | 09/10/2008 15:48:21 | 886 | 08/10/2008 07:46:39 | 133 | 10 | How do I list user defined types in a SQL Server database? | I need to enumerate all the user defined types created in a SQL Server database with CREATE TYPE, and/or find out whether they have already been defined.
With tables or stored procedures I'd do something like this:
if exists (select * from dbo.sysobjects where name='foobar' and xtype='U')
drop table foobar
However I can't find the equivalent (or a suitable alternative) for user defined types! I definitely can't see them anywhere in sysobjects. Can anyone enlighten me? | sql-server | null | null | null | null | null | open | How do I list user defined types in a SQL Server database?
===
I need to enumerate all the user defined types created in a SQL Server database with CREATE TYPE, and/or find out whether they have already been defined.
With tables or stored procedures I'd do something like this:
if exists (select * from dbo.sysobjects where name='foobar' and xtype='U')
drop table foobar
However I can't find the equivalent (or a suitable alternative) for user defined types! I definitely can't see them anywhere in sysobjects. Can anyone enlighten me? | 0 |
54,495 | 09/10/2008 15:52:40 | 1,368 | 08/14/2008 18:57:47 | 168 | 11 | Demanding better work environments, how to say it in a polite way? | We all know that a programmers working environment is vital for productivity.
What techniques have you guys used to sway your employer to improve your situation?
Improvements include:
- dual monitors
- faster computer
- ergo chair
- quite working environment (not by the photocopier, sheesh!)
- well lit desk
- don't block access to gmail/hotmail/twitter/etc.
| work | null | null | null | null | 11/17/2011 16:09:22 | off topic | Demanding better work environments, how to say it in a polite way?
===
We all know that a programmers working environment is vital for productivity.
What techniques have you guys used to sway your employer to improve your situation?
Improvements include:
- dual monitors
- faster computer
- ergo chair
- quite working environment (not by the photocopier, sheesh!)
- well lit desk
- don't block access to gmail/hotmail/twitter/etc.
| 2 |
54,500 | 09/10/2008 15:55:30 | 145 | 08/02/2008 14:40:17 | 905 | 36 | Storing Images in PostgreSQL | Alright, so I'm working on an application which will use a Linux back-end running PostgreSQL to serve up images to a Windows box with the front end written in C#.NET, though the front-end should hardly matter. My question is:
- **What is the best way to deal with storing images in Postgres?**
The images are around 4-6 megapixels each, and we're storing upwards of 3000. It might also be good to note: this is not a web application, there will at most be about two front-ends accessing the database at once. | postgresql | image | null | null | null | null | open | Storing Images in PostgreSQL
===
Alright, so I'm working on an application which will use a Linux back-end running PostgreSQL to serve up images to a Windows box with the front end written in C#.NET, though the front-end should hardly matter. My question is:
- **What is the best way to deal with storing images in Postgres?**
The images are around 4-6 megapixels each, and we're storing upwards of 3000. It might also be good to note: this is not a web application, there will at most be about two front-ends accessing the database at once. | 0 |
54,512 | 09/10/2008 15:58:05 | 83 | 08/01/2008 16:31:56 | 1,171 | 82 | How should I store short text strings into a MS SQL Server database? | varchar(255), varchar(256), nvarchar(255), nvarchar(256), nvarchar(max), etc?
256 seems like a nice, round, space-efficient number. But I've seen 255 used a lot. Why?
What's the difference between varchar and nvarchar? | sql | sql-server | database | mssql | database-design | null | open | How should I store short text strings into a MS SQL Server database?
===
varchar(255), varchar(256), nvarchar(255), nvarchar(256), nvarchar(max), etc?
256 seems like a nice, round, space-efficient number. But I've seen 255 used a lot. Why?
What's the difference between varchar and nvarchar? | 0 |
54,522 | 09/10/2008 16:01:23 | 5,648 | 09/10/2008 16:01:23 | 1 | 0 | Printing data into a preprinted form in C# .Net 3.5 SP1 | I need to print out data into a pre-printed A6 form (1/4 the size of a landsacpe A4). I do not need to print paragraphs of text, just short lines scattered about on the page.
All the stuff on MSDN is about priting paragraphs of text.
Thanks for any help you can give,
Roberto | c# | .net | printing | null | null | null | open | Printing data into a preprinted form in C# .Net 3.5 SP1
===
I need to print out data into a pre-printed A6 form (1/4 the size of a landsacpe A4). I do not need to print paragraphs of text, just short lines scattered about on the page.
All the stuff on MSDN is about priting paragraphs of text.
Thanks for any help you can give,
Roberto | 0 |
54,536 | 09/10/2008 16:07:58 | 5,429 | 09/09/2008 14:35:58 | 31 | 2 | win32 GUI app that writes usage text to stdout when invoked as "app.exe --help" | How do I create a windows application that does the following:
* it's a regular GUI app when invoked with no command line arguments
* specifying the optional "--help" command line argument causes the app to write usage text to stdout then terminate
* it must be a single executable. No cheating by making a console app exec a 2nd executable.
* assume the main application code is written in C/C++
* bonus points if no GUI window is created when "--help" is specified. (i.e., no flicker from a short-lived window)
In my experience the standard visual studio template for console app has no GUI capability, and the normal win32 template does not send its stdout to the parent cmd shell.
| windows | null | null | null | null | null | open | win32 GUI app that writes usage text to stdout when invoked as "app.exe --help"
===
How do I create a windows application that does the following:
* it's a regular GUI app when invoked with no command line arguments
* specifying the optional "--help" command line argument causes the app to write usage text to stdout then terminate
* it must be a single executable. No cheating by making a console app exec a 2nd executable.
* assume the main application code is written in C/C++
* bonus points if no GUI window is created when "--help" is specified. (i.e., no flicker from a short-lived window)
In my experience the standard visual studio template for console app has no GUI capability, and the normal win32 template does not send its stdout to the parent cmd shell.
| 0 |
54,539 | 09/10/2008 16:08:24 | 1,942 | 08/19/2008 14:45:43 | 384 | 30 | Prevent Use of the Back Button (in IE) | So the SMEs at my current place of employment want to try and disable the back button for certain pages. We have a page where the user makes some selections and submits them to be processed. In some instances they have to enter a comment on another page. What the users have figured out is that they don't have to enter a comment if they submit the information and go to the page with the comment and then hit the back button to return to the previous page. I know there are several different solutions to this (and many of them are far more elegant then disabling the back button), but this is what I'm left with. Is it possible to prevent someone from going back to the previous page through altering the behavior of the back button. (like a submit -> return false sorta thing). Due to double posting information I can't have it return to the previous page and then move to the current one. I can only have it not direct away from the current page. I Googled it, but i only saw posts saying that it will always return to the previous page. I was hoping that someone has some mad kung foo js skills that can make this possible. | javascript | internet-explorer | backbutton | null | null | null | open | Prevent Use of the Back Button (in IE)
===
So the SMEs at my current place of employment want to try and disable the back button for certain pages. We have a page where the user makes some selections and submits them to be processed. In some instances they have to enter a comment on another page. What the users have figured out is that they don't have to enter a comment if they submit the information and go to the page with the comment and then hit the back button to return to the previous page. I know there are several different solutions to this (and many of them are far more elegant then disabling the back button), but this is what I'm left with. Is it possible to prevent someone from going back to the previous page through altering the behavior of the back button. (like a submit -> return false sorta thing). Due to double posting information I can't have it return to the previous page and then move to the current one. I can only have it not direct away from the current page. I Googled it, but i only saw posts saying that it will always return to the previous page. I was hoping that someone has some mad kung foo js skills that can make this possible. | 0 |
54,546 | 09/10/2008 16:10:35 | 533 | 08/06/2008 15:17:04 | 1,167 | 53 | How can I indicate that multiple versions of a dependent assembly are okay? | Assemblies A and B are privately deployed and strongly named. Assembly A contains references to Assembly B. There are two versions of Assembly B: B1 and B2. I want to be able to indicate for Assembly A that it may bind to either B1 or B2 -- ideally, by incorporating this information into the assembly itself. What are my options?
I'm somewhat familiar with versioning policy and the way it applies to the GAC, but I don't want to be dependent on these assemblies being in the GAC. | .net | versioning | null | null | null | null | open | How can I indicate that multiple versions of a dependent assembly are okay?
===
Assemblies A and B are privately deployed and strongly named. Assembly A contains references to Assembly B. There are two versions of Assembly B: B1 and B2. I want to be able to indicate for Assembly A that it may bind to either B1 or B2 -- ideally, by incorporating this information into the assembly itself. What are my options?
I'm somewhat familiar with versioning policy and the way it applies to the GAC, but I don't want to be dependent on these assemblies being in the GAC. | 0 |
54,566 | 09/10/2008 16:19:57 | 2,863 | 08/25/2008 16:09:56 | 75 | 8 | Call to a member function on a non-object | So I'm refactoring my code to implement more OOP. I set up a class to hold page attributes.
class PageAtrributes
{
private $db_connection;
private $page_title;
public function __construct($db_connection)
{
$this->db_connection = $db_connection;
$this->page_title = '';
}
public function get_page_title()
{
return $this->page_title;
}
public function set_page_title($page_title)
{
$this->page_title = $page_title;
}
}
Later on I call the set_page_title() function like so
$objPage->set_page_title($myrow['title']);
When I do I receive the error message "**Call to a member function set_page_title() on a non-object**."
So what am I missing? | php | oop | null | null | null | null | open | Call to a member function on a non-object
===
So I'm refactoring my code to implement more OOP. I set up a class to hold page attributes.
class PageAtrributes
{
private $db_connection;
private $page_title;
public function __construct($db_connection)
{
$this->db_connection = $db_connection;
$this->page_title = '';
}
public function get_page_title()
{
return $this->page_title;
}
public function set_page_title($page_title)
{
$this->page_title = $page_title;
}
}
Later on I call the set_page_title() function like so
$objPage->set_page_title($myrow['title']);
When I do I receive the error message "**Call to a member function set_page_title() on a non-object**."
So what am I missing? | 0 |
54,567 | 09/10/2008 16:20:21 | 2,443 | 08/22/2008 10:53:30 | 510 | 29 | How do I get InputVerifier to work with an editable JComboBox | I've got an JComboBox with a custom inputVerifyer set to limit MaxLength when it's set to editable.
The verify method never seems to get called.
The same verifyer gets invoked on a JTextField fine.
What might I be doing wrong?
Thanks. | java | swing | null | null | null | null | open | How do I get InputVerifier to work with an editable JComboBox
===
I've got an JComboBox with a custom inputVerifyer set to limit MaxLength when it's set to editable.
The verify method never seems to get called.
The same verifyer gets invoked on a JTextField fine.
What might I be doing wrong?
Thanks. | 0 |
54,578 | 09/10/2008 16:23:47 | 5,429 | 09/09/2008 14:35:58 | 41 | 2 | How to capture output of "pnputil.exe -e" | How do I capture the output of "%windir%/system32/pnputil.exe -e"?
(assume windows vista 32-bit)
Bonus for technical explanation of why the app normally writes output to the cmd shell, but when stdout and/or stderr are redirected then the app writes nothing to the console or to stdout/stderr?
<pre>
C:\Windows\System32>PnPutil.exe --help
Microsoft PnP Utility {...}
C:\Windows\System32>pnputil -e > c:\foo.txt
C:\Windows\System32>type c:\foo.txt
C:\Windows\System32>dir c:\foo.txt
Volume in drive C has no label.
Volume Serial Number is XXXX-XXXX
Directory of c:\
09/10/2008 12:10 PM 0 foo.txt
1 File(s) 0 bytes
</pre>
| windows | null | null | null | null | null | open | How to capture output of "pnputil.exe -e"
===
How do I capture the output of "%windir%/system32/pnputil.exe -e"?
(assume windows vista 32-bit)
Bonus for technical explanation of why the app normally writes output to the cmd shell, but when stdout and/or stderr are redirected then the app writes nothing to the console or to stdout/stderr?
<pre>
C:\Windows\System32>PnPutil.exe --help
Microsoft PnP Utility {...}
C:\Windows\System32>pnputil -e > c:\foo.txt
C:\Windows\System32>type c:\foo.txt
C:\Windows\System32>dir c:\foo.txt
Volume in drive C has no label.
Volume Serial Number is XXXX-XXXX
Directory of c:\
09/10/2008 12:10 PM 0 foo.txt
1 File(s) 0 bytes
</pre>
| 0 |
54,579 | 09/10/2008 16:25:29 | 5,469 | 09/09/2008 21:03:22 | 1 | 7 | WCF Configuration without a config file | Does anyone know of a good example of how to expose a WCF service programatically without the use of a configuration file? I know the service object model is much richer now with WCF, so I know it's possible. I just have not seen an example of how to do so. Conversely, I would like to see how consuming without a configuration file is done as well.
Before anyone asks, I have a very specific need to do this without configuration files. I would normally not recommend such a practice, but as I said, there is a very specific need in this case. | wcf | configuration | configurationfiles | null | null | null | open | WCF Configuration without a config file
===
Does anyone know of a good example of how to expose a WCF service programatically without the use of a configuration file? I know the service object model is much richer now with WCF, so I know it's possible. I just have not seen an example of how to do so. Conversely, I would like to see how consuming without a configuration file is done as well.
Before anyone asks, I have a very specific need to do this without configuration files. I would normally not recommend such a practice, but as I said, there is a very specific need in this case. | 0 |
54,585 | 09/10/2008 16:29:54 | 5,436 | 09/09/2008 15:18:48 | 1 | 0 | When should you use a class vs a struct in C++? | In what scenarios is it better to use a struct vs a class in C++? | c++ | class | struct | null | null | null | open | When should you use a class vs a struct in C++?
===
In what scenarios is it better to use a struct vs a class in C++? | 0 |
54,586 | 09/10/2008 16:30:43 | 2,523 | 08/22/2008 16:13:28 | 41 | 3 | Solid Config for webdev in emacs under linux AND windows ? | I have a windows laptop (thinkpad) and somewhat recently rediscovered emacs and the benefit that all those wacky shortcuts can be when the arrow keys are located somewhere near you right armpit.
I was discouraged after php-mode, css-mode, etc, under mmm-mode was inconsistent, buggy, and refused to properly interpret some of my files. (In all fairness, I'm most likely doin' it wrong) So I eventually found the nxhtml package which worked pretty well.
However, nxhtml causes weird bugs and actually crashes on certain files (certain combinations of nested modes I supposed) under linux! (using Ubuntu 7.10 and Kubuntu 8.04)
I'd like to be able to work on the laptop as well as the home linux pc without having to deal with inconsistent implementations of something that shouldn't be this hard. I've googled and looked around and there's a good chance I'm the only human on the planet having these problems... Anyone got some advice?
(in lieu of an emacs solutions, a good enough cross-platform lightweight text editor with the dev features would also work I suppose...)
| windows | linux | emacs | cross-platform | null | null | open | Solid Config for webdev in emacs under linux AND windows ?
===
I have a windows laptop (thinkpad) and somewhat recently rediscovered emacs and the benefit that all those wacky shortcuts can be when the arrow keys are located somewhere near you right armpit.
I was discouraged after php-mode, css-mode, etc, under mmm-mode was inconsistent, buggy, and refused to properly interpret some of my files. (In all fairness, I'm most likely doin' it wrong) So I eventually found the nxhtml package which worked pretty well.
However, nxhtml causes weird bugs and actually crashes on certain files (certain combinations of nested modes I supposed) under linux! (using Ubuntu 7.10 and Kubuntu 8.04)
I'd like to be able to work on the laptop as well as the home linux pc without having to deal with inconsistent implementations of something that shouldn't be this hard. I've googled and looked around and there's a good chance I'm the only human on the planet having these problems... Anyone got some advice?
(in lieu of an emacs solutions, a good enough cross-platform lightweight text editor with the dev features would also work I suppose...)
| 0 |
54,590 | 09/10/2008 16:33:56 | 5,291 | 09/08/2008 21:37:17 | 1 | 0 | Best PHP Framework w/ AJAX Support? | I'm fairly familiar with many of the PHP frameworks out there, but I'm wondering which ones actually integrate AJAX functionality and which ones do it well? Ideally I'd love to find a framework that would allow me to avoid JavaScript alltogether (at least for typical/basic JavaScript functionality).
Does such a thing exist? If not, does anything come close? | javascript | php | ajax | frameworks | null | 09/10/2011 23:44:20 | not constructive | Best PHP Framework w/ AJAX Support?
===
I'm fairly familiar with many of the PHP frameworks out there, but I'm wondering which ones actually integrate AJAX functionality and which ones do it well? Ideally I'd love to find a framework that would allow me to avoid JavaScript alltogether (at least for typical/basic JavaScript functionality).
Does such a thing exist? If not, does anything come close? | 4 |
54,606 | 09/10/2008 16:38:27 | 307 | 08/04/2008 14:26:05 | 806 | 35 | Software to Creative UI Mockups | What are good Open Source / Free software packages that let you design GUIs quickly, like "on a napkin" style, but also give a bit of polish that you could throw into a slide deck? Preference would be to use some clipart/objects ala Visio, but not required.
NOT:
+ Visio
+ PowerPoint
+ KeyNote
| gui | design | recommendation | userexperience | null | null | open | Software to Creative UI Mockups
===
What are good Open Source / Free software packages that let you design GUIs quickly, like "on a napkin" style, but also give a bit of polish that you could throw into a slide deck? Preference would be to use some clipart/objects ala Visio, but not required.
NOT:
+ Visio
+ PowerPoint
+ KeyNote
| 0 |
54,612 | 09/10/2008 16:39:14 | 4,778 | 09/05/2008 15:06:23 | 28 | 1 | Fast Disk Cloning | Is there a way to have Linux read ahead when cloning a disk? I use the program named "dd" to clone disks. The last time I did this it seemed as though the OS was reading then writing but never at the same time. Ideally, the destination disk would be constantly writing without waiting that's of course if the source disk can keep up. | dd | linux | hdd | null | null | null | open | Fast Disk Cloning
===
Is there a way to have Linux read ahead when cloning a disk? I use the program named "dd" to clone disks. The last time I did this it seemed as though the OS was reading then writing but never at the same time. Ideally, the destination disk would be constantly writing without waiting that's of course if the source disk can keep up. | 0 |
54,626 | 09/10/2008 16:42:35 | 4,903 | 09/06/2008 14:16:54 | 231 | 15 | How do I get an XML file as XML (and not a string) with Ajax in Prototype.js? | This code is from Prototype.js. I've looked at probably 20 different tutorials, and I can't figure out why this is not working. The response I get is null.
new Ajax.Request( /path/to/xml/file.xml, {
method: "get",
contentType: "application/xml",
onSuccess: function( transport ) {
alert( transport.responseXML );
}
});
If I change the responseXML to responseText, then it alerts to me the XML file as a string. This is not a PHP page serving up XML, but an actual XML file, so I know it is not the response headers. | xml | prototype | javascript | null | null | null | open | How do I get an XML file as XML (and not a string) with Ajax in Prototype.js?
===
This code is from Prototype.js. I've looked at probably 20 different tutorials, and I can't figure out why this is not working. The response I get is null.
new Ajax.Request( /path/to/xml/file.xml, {
method: "get",
contentType: "application/xml",
onSuccess: function( transport ) {
alert( transport.responseXML );
}
});
If I change the responseXML to responseText, then it alerts to me the XML file as a string. This is not a PHP page serving up XML, but an actual XML file, so I know it is not the response headers. | 0 |
54,652 | 09/10/2008 16:48:46 | 380 | 08/05/2008 10:39:18 | 2,434 | 195 | Need help with Programming Environment | I am a .net developer (currently using Visual Studio 2008). I am looking to buy a new computer which I don't want to change for the next 3 years.
Among the choices I have, I am thinking whether a dual core 3 GHz machine will be better, or will a 2.4 GHz quad core machine be better?
Please help. | development-environment | null | null | null | null | null | open | Need help with Programming Environment
===
I am a .net developer (currently using Visual Studio 2008). I am looking to buy a new computer which I don't want to change for the next 3 years.
Among the choices I have, I am thinking whether a dual core 3 GHz machine will be better, or will a 2.4 GHz quad core machine be better?
Please help. | 0 |
54,658 | 09/10/2008 16:50:57 | 247 | 08/04/2008 00:50:51 | 78 | 10 | Is there a ClientScriptManager.RegisterClientScriptInclude equivalent for CSS | The [ClientScriptManager.RegisterClientScriptInclude][1] method allows you to register a JavaScript reference with the Page object (checking for duplicates).
Is there an equivalent of this method for CSS references?
Similar questions apply for [ClientScriptManager.RegisterClientScriptBlock][2] and [ClientScriptManager.RegisterClientScriptResource][3]
[1]: http://msdn.microsoft.com/en-us/library/kx145dw2.aspx
[2]: http://msdn.microsoft.com/en-us/library/system.web.ui.clientscriptmanager.registerclientscriptblock.aspx
[3]: http://msdn.microsoft.com/en-us/library/system.web.ui.clientscriptmanager.registerclientscriptresource.aspx | asp.net | css | null | null | null | null | open | Is there a ClientScriptManager.RegisterClientScriptInclude equivalent for CSS
===
The [ClientScriptManager.RegisterClientScriptInclude][1] method allows you to register a JavaScript reference with the Page object (checking for duplicates).
Is there an equivalent of this method for CSS references?
Similar questions apply for [ClientScriptManager.RegisterClientScriptBlock][2] and [ClientScriptManager.RegisterClientScriptResource][3]
[1]: http://msdn.microsoft.com/en-us/library/kx145dw2.aspx
[2]: http://msdn.microsoft.com/en-us/library/system.web.ui.clientscriptmanager.registerclientscriptblock.aspx
[3]: http://msdn.microsoft.com/en-us/library/system.web.ui.clientscriptmanager.registerclientscriptresource.aspx | 0 |
54,669 | 09/10/2008 16:53:16 | 999 | 08/11/2008 12:32:21 | 684 | 50 | Apache Download: Make sure that page was viewed before download | The job at hand:
I want to make sure that my website's users view a page before they start a download. If they have not looked at the page but try to hotlink to the files directly they should go to the webpage before the download is allowed.
Any suggestions that are better than my idea to send out a cookie and - before the download starts - check if the cookie exists (via .htaccess)?
The webpage and the download files will be located on different servers.
Environment:
* Apache 2 on all machines
* PHP 5 on all machines
* MySQL 5 available on the "webpage" server (no access from the download servers)
| apache | download | php | cookie | protection | null | open | Apache Download: Make sure that page was viewed before download
===
The job at hand:
I want to make sure that my website's users view a page before they start a download. If they have not looked at the page but try to hotlink to the files directly they should go to the webpage before the download is allowed.
Any suggestions that are better than my idea to send out a cookie and - before the download starts - check if the cookie exists (via .htaccess)?
The webpage and the download files will be located on different servers.
Environment:
* Apache 2 on all machines
* PHP 5 on all machines
* MySQL 5 available on the "webpage" server (no access from the download servers)
| 0 |
54,674 | 09/10/2008 16:54:04 | 1,876 | 08/19/2008 02:26:08 | 90 | 6 | Any good building tools for a C++ project, which can replaceme make ?? | i'm wondering if there is any nice and neat tool to replace the GNU Autotools or Make to build a very large C++ project, which are such a complicated thing to use.
It is simple to generate all the files that de Autotools require if the project is small, but if the source code is divided in many directories, with multiple third party libraries and many dependencies, you fall into the "Autotools Hell"..
thanks for any recommendations
| c++ | build-process | make | null | null | null | open | Any good building tools for a C++ project, which can replaceme make ??
===
i'm wondering if there is any nice and neat tool to replace the GNU Autotools or Make to build a very large C++ project, which are such a complicated thing to use.
It is simple to generate all the files that de Autotools require if the project is small, but if the source code is divided in many directories, with multiple third party libraries and many dependencies, you fall into the "Autotools Hell"..
thanks for any recommendations
| 0 |
54,702 | 09/10/2008 17:02:00 | 1,491,425 | 08/13/2008 13:49:51 | 15 | 0 | AJAX Dropdown extender question | I am using the example on the AJAX website for the dropdown extender. I'm looking to make the target control, the label, have the dropdown image appear always instead of just when I hover over it. Is there any way to do this? | asp.net | ajax | dropdownextender | null | null | null | open | AJAX Dropdown extender question
===
I am using the example on the AJAX website for the dropdown extender. I'm looking to make the target control, the label, have the dropdown image appear always instead of just when I hover over it. Is there any way to do this? | 0 |
54,703 | 09/10/2008 17:02:03 | 2,362 | 08/21/2008 20:46:43 | 148 | 14 | Should I choose scripting or compiled code for small tasks? | I'm a Java programmer, and I like my compiler, static analysis tools and unit testing frameworks as tools that help me quickly deliver robust and efficient code. The JRE is pretty much everywhere I would work, too.
Given that situation, I can't see a reason why I would ever choose to use shell scripting, vb scripting etc, no matter how small the task is if I wear one of my other hats like my cool black sysadmin fedora.
I don't wear the other hats too often, **under what circumstances should I choose scripting over writing compiled code?**
| testing | scripting | null | null | null | null | open | Should I choose scripting or compiled code for small tasks?
===
I'm a Java programmer, and I like my compiler, static analysis tools and unit testing frameworks as tools that help me quickly deliver robust and efficient code. The JRE is pretty much everywhere I would work, too.
Given that situation, I can't see a reason why I would ever choose to use shell scripting, vb scripting etc, no matter how small the task is if I wear one of my other hats like my cool black sysadmin fedora.
I don't wear the other hats too often, **under what circumstances should I choose scripting over writing compiled code?**
| 0 |
54,708 | 09/10/2008 17:03:10 | 1,734 | 08/18/2008 11:25:32 | 28 | 3 | Programmatically accessing Data in an ASP.net 2.0 Repeater | This is an ASP.Net 2.0 web app. The Item template looks like this, for reference:
<ItemTemplate>
<tr>
<td class="class1" align=center><a href='url'><img src="img.gif"></a></td>
<td class="class1"><%# DataBinder.Eval(Container.DataItem,"field1") %></td>
<td class="class1"><%# DataBinder.Eval(Container.DataItem,"field2") %></td>
<td class="class1"><%# DataBinder.Eval(Container.DataItem,"field3") %></td>
<td class="class1"><%# DataBinder.Eval(Container.DataItem,"field4") %></td>
</tr>
</ItemTemplate>
Using this code in the bowels of the codebehind:
foreach (RepeaterItem item in rptrFollowupSummary.Items)
{
string val = ((DataBoundLiteralControl)item.Controls[0]).Text;
Trace.Write(val);
}
I produce this:
<tr>
<td class="class1" align=center><a href='url'><img src="img.gif"></a></td>
<td class="class1">23</td>
<td class="class1">1/1/2000</td>
<td class="class1">-2</td>
<td class="class1">11</td>
</tr>
What I need is the data from Field1 and Field4
I can't seem to get at the data the way I would in say a DataList or a GridView, and I can't seem to come up with anything else on Google or quickly leverage this one to do what I want. The only way I can see to get at the data is going to be using a regex to go and get it (Because a man takes what he wants. He takes it all. And I'm a man, aren't I? Aren't I?).
Am I on the right track (not looking for the specific regex to do this; forging that might be a followup question ;) ), or am I missing something? | asp.net | repeater | dataaccess | null | null | null | open | Programmatically accessing Data in an ASP.net 2.0 Repeater
===
This is an ASP.Net 2.0 web app. The Item template looks like this, for reference:
<ItemTemplate>
<tr>
<td class="class1" align=center><a href='url'><img src="img.gif"></a></td>
<td class="class1"><%# DataBinder.Eval(Container.DataItem,"field1") %></td>
<td class="class1"><%# DataBinder.Eval(Container.DataItem,"field2") %></td>
<td class="class1"><%# DataBinder.Eval(Container.DataItem,"field3") %></td>
<td class="class1"><%# DataBinder.Eval(Container.DataItem,"field4") %></td>
</tr>
</ItemTemplate>
Using this code in the bowels of the codebehind:
foreach (RepeaterItem item in rptrFollowupSummary.Items)
{
string val = ((DataBoundLiteralControl)item.Controls[0]).Text;
Trace.Write(val);
}
I produce this:
<tr>
<td class="class1" align=center><a href='url'><img src="img.gif"></a></td>
<td class="class1">23</td>
<td class="class1">1/1/2000</td>
<td class="class1">-2</td>
<td class="class1">11</td>
</tr>
What I need is the data from Field1 and Field4
I can't seem to get at the data the way I would in say a DataList or a GridView, and I can't seem to come up with anything else on Google or quickly leverage this one to do what I want. The only way I can see to get at the data is going to be using a regex to go and get it (Because a man takes what he wants. He takes it all. And I'm a man, aren't I? Aren't I?).
Am I on the right track (not looking for the specific regex to do this; forging that might be a followup question ;) ), or am I missing something? | 0 |
54,709 | 09/10/2008 17:03:20 | 4,872 | 09/06/2008 09:14:55 | 113 | 3 | What is the best style/syntax to use with Rhino Mocks? | Multiple approaches exist to write your unit tests when using Rhino Mocks:
- The Standard Syntax
- Record/Replay Syntax
- The Fluent Syntax
What is the ideal and less frictionless way? | c# | unit-testing | syntax | mocking | rhino-mocks | null | open | What is the best style/syntax to use with Rhino Mocks?
===
Multiple approaches exist to write your unit tests when using Rhino Mocks:
- The Standard Syntax
- Record/Replay Syntax
- The Fluent Syntax
What is the ideal and less frictionless way? | 0 |
54,725 | 09/10/2008 17:08:37 | 1,412 | 08/15/2008 15:05:57 | 703 | 43 | Change the "From:" address in Unix "mail" | Sending a message from the Unix command line using `mail TO_ADDR` results in an email from `$USER@$HOSTNAME`. Is there a way to change the "From:" address inserted by `mail`? | unix | email | null | null | null | null | open | Change the "From:" address in Unix "mail"
===
Sending a message from the Unix command line using `mail TO_ADDR` results in an email from `$USER@$HOSTNAME`. Is there a way to change the "From:" address inserted by `mail`? | 0 |
54,753 | 09/10/2008 17:16:45 | 5,241 | 09/08/2008 16:53:54 | 11 | 1 | Tool for debugging makefiles | I have a large legacy codebase with very complicated makefiles, with lots of variables. Sometimes I need to change them, and I find that it's very difficult to figure out why the change isn't working the way I expect. What I'd like to find is a tool that basically does step-through-debugging of the "make" process, where I would give it a directory, and I would be able to see the value of different variables at different points in the process. None of the debug flags to make seem to show me what I want, although it's possible that I'm missing something. Does anyone know of a way to do this? | make | null | null | null | null | null | open | Tool for debugging makefiles
===
I have a large legacy codebase with very complicated makefiles, with lots of variables. Sometimes I need to change them, and I find that it's very difficult to figure out why the change isn't working the way I expect. What I'd like to find is a tool that basically does step-through-debugging of the "make" process, where I would give it a directory, and I would be able to see the value of different variables at different points in the process. None of the debug flags to make seem to show me what I want, although it's possible that I'm missing something. Does anyone know of a way to do this? | 0 |
54,754 | 09/10/2008 17:16:53 | 4,872 | 09/06/2008 09:14:55 | 123 | 3 | How can you do paging with NHibernate? | For example, I want to populate a gridview control in an ASP.NET web page with only the data necessary for the # of rows displayed. How can NHibernate support this? | .net | nhibernate | orm | pagination | null | null | open | How can you do paging with NHibernate?
===
For example, I want to populate a gridview control in an ASP.NET web page with only the data necessary for the # of rows displayed. How can NHibernate support this? | 0 |
54,758 | 09/10/2008 17:17:21 | 536 | 08/06/2008 15:30:22 | 630 | 28 | Getting the back/fwd history of web browser in C# WinForms | In C# WinForms, what's the proper way to get the backward/forward history stack for the System.Windows.Forms.WebBrowser? | c# | webbrowser | winforms | mshtml | navigation | null | open | Getting the back/fwd history of web browser in C# WinForms
===
In C# WinForms, what's the proper way to get the backward/forward history stack for the System.Windows.Forms.WebBrowser? | 0 |
54,760 | 09/10/2008 17:20:03 | 4,233 | 09/02/2008 13:24:50 | 1 | 2 | Unfiltering NSPasteboard | Is there a way to unfilter an NSPasteboard for what the source application specifically declared it would provide?
I'm attempting to serialize pasteboard data in my application. When another application places an RTF file on a pasteboard and then I ask for the available types, I get eleven different flavors of said RTF, everything from the original RTF to plain strings to dyn.* values.
Saving off all that data into a plist or raw data on disk isn't usually a problem as it's pretty small, but when an image of any considerable size is placed on the pasteboard, the resulting output can be tens of times larger than the source data (with multiple flavors of TIFF and PICT data being made available via filtering).
I'd like to just be able to save off what the original app made available if possible. | cocoa | filtering | pasteboard | null | null | null | open | Unfiltering NSPasteboard
===
Is there a way to unfilter an NSPasteboard for what the source application specifically declared it would provide?
I'm attempting to serialize pasteboard data in my application. When another application places an RTF file on a pasteboard and then I ask for the available types, I get eleven different flavors of said RTF, everything from the original RTF to plain strings to dyn.* values.
Saving off all that data into a plist or raw data on disk isn't usually a problem as it's pretty small, but when an image of any considerable size is placed on the pasteboard, the resulting output can be tens of times larger than the source data (with multiple flavors of TIFF and PICT data being made available via filtering).
I'd like to just be able to save off what the original app made available if possible. | 0 |
54,770 | 09/10/2008 17:24:56 | 3,465 | 08/28/2008 16:49:35 | 16 | 2 | ClickOnce Deployment, system update required Microsoft.mshtml | We have an application that works with MS Office and uses Microsoft.mshtml.dll. We use ClickOnce to deploy the application. The application deploys without issues on most machines, but sometimes we get errors saying "System Update Required, Microsoft.mshtl.dll should be in the GAC".
We tried installing the PIA for Office without luck. Since Microsoft.mshtml.dll is a system dependent file we cannot include it in the package and re-distribute it. What would be the best way to deploy the application? | clickonce | microsoft.mshtml | null | null | null | null | open | ClickOnce Deployment, system update required Microsoft.mshtml
===
We have an application that works with MS Office and uses Microsoft.mshtml.dll. We use ClickOnce to deploy the application. The application deploys without issues on most machines, but sometimes we get errors saying "System Update Required, Microsoft.mshtl.dll should be in the GAC".
We tried installing the PIA for Office without luck. Since Microsoft.mshtml.dll is a system dependent file we cannot include it in the package and re-distribute it. What would be the best way to deploy the application? | 0 |
54,771 | 09/10/2008 17:25:19 | 354 | 08/05/2008 00:31:33 | 31 | 2 | Website Monitoring Libraries | There has been some talk of Website performance monitoring tools and services on stackoverflow, however, they seem fairly expensive for what they actually do. Are there any good opensource libraries for automating checking/monitoring the availability of a website? | monitoring | null | null | null | null | null | open | Website Monitoring Libraries
===
There has been some talk of Website performance monitoring tools and services on stackoverflow, however, they seem fairly expensive for what they actually do. Are there any good opensource libraries for automating checking/monitoring the availability of a website? | 0 |
54,789 | 09/10/2008 17:35:36 | 1,768 | 08/18/2008 13:32:15 | 185 | 13 | What is the correct .NET exception to throw when try to insert a duplicate object into a collection? | I have an Asset object that has a property AssignedSoftware, which is a collection.
I want to make sure that the same piece of Software is not assigned to an Asset more than once. In Add method I check to see if the Software already exist, and if it does, I want to throw an exception.
Is there a standard .NET exception that I should be throwing? Or does best practices dictate I create my own custom exception? | c# | exception | collections | null | null | null | open | What is the correct .NET exception to throw when try to insert a duplicate object into a collection?
===
I have an Asset object that has a property AssignedSoftware, which is a collection.
I want to make sure that the same piece of Software is not assigned to an Asset more than once. In Add method I check to see if the Software already exist, and if it does, I want to throw an exception.
Is there a standard .NET exception that I should be throwing? Or does best practices dictate I create my own custom exception? | 0 |
54,790 | 09/10/2008 17:36:00 | 3,798 | 08/30/2008 22:09:59 | 309 | 18 | Is it possible to build MSBuild files (visual studio sln) from the command line in Mono? | Is it possible to build Visual Studio solutions without having to fire up MonoDevelop? | mono | null | null | null | null | null | open | Is it possible to build MSBuild files (visual studio sln) from the command line in Mono?
===
Is it possible to build Visual Studio solutions without having to fire up MonoDevelop? | 0 |
54,791 | 09/10/2008 17:36:30 | 5,208 | 09/08/2008 13:23:19 | 13 | 1 | Conferences and training for architects, best practices, | It's getting close to the time when I need to submit training and travel requests. I'm looking for conferences and classes in the coming 12 months that are geared toward improving coding and software development, best practices, system architecture, etc. They need to be in the US or Canada since I'll never get approval for anything else.
Here are a few that I've found, but I'm looking for other suggestions. Also feedback on any of these would be appreciated too:
<a href="http://www.spsymposium.com/agenda.html">Software Process Symposium</a>
<a href="http://sdbestpractices.com/index.php?option=com_frontpage&Itemid=1">Software Development Best Practices</a>
<a href="http://www.sqe.com/bettersoftwareconf/">Better Software Conference</a>
<a href="http://www.iasaconnections.com/shows/iasa2008fall/default.asp?s=119">IASA Connections</a>
The IASA event looks like the closest match for me but doesn't give me enough lead time to request & schedule it. | architecture | self-improvement | education | null | null | null | open | Conferences and training for architects, best practices,
===
It's getting close to the time when I need to submit training and travel requests. I'm looking for conferences and classes in the coming 12 months that are geared toward improving coding and software development, best practices, system architecture, etc. They need to be in the US or Canada since I'll never get approval for anything else.
Here are a few that I've found, but I'm looking for other suggestions. Also feedback on any of these would be appreciated too:
<a href="http://www.spsymposium.com/agenda.html">Software Process Symposium</a>
<a href="http://sdbestpractices.com/index.php?option=com_frontpage&Itemid=1">Software Development Best Practices</a>
<a href="http://www.sqe.com/bettersoftwareconf/">Better Software Conference</a>
<a href="http://www.iasaconnections.com/shows/iasa2008fall/default.asp?s=119">IASA Connections</a>
The IASA event looks like the closest match for me but doesn't give me enough lead time to request & schedule it. | 0 |
54,795 | 09/10/2008 17:37:57 | 4,381 | 09/03/2008 10:48:17 | 66 | 3 | Limiting CPU speed for profiling | I'm trying to optimize several bottlenecks on an application which is supposed to run on a really wide range of CPUs and architectures (some of them very close to embeded devices).
The results of my profiler, however, aren't really significant because of the speed of my CPU. Is there any way (preferably under Windows or Mac OS X) to limit the speed of my CPU for profiling purposes?
I've thought about using a virtual machine, but haven't found any with such functionality. | c++ | profiling | cpu | null | null | null | open | Limiting CPU speed for profiling
===
I'm trying to optimize several bottlenecks on an application which is supposed to run on a really wide range of CPUs and architectures (some of them very close to embeded devices).
The results of my profiler, however, aren't really significant because of the speed of my CPU. Is there any way (preferably under Windows or Mac OS X) to limit the speed of my CPU for profiling purposes?
I've thought about using a virtual machine, but haven't found any with such functionality. | 0 |
54,797 | 09/10/2008 17:38:05 | 672 | 08/07/2008 16:18:07 | 578 | 40 | How do you implement Levenshtein distance in Delphi? | I'm posting this in the spirit of answering your own questions.
The question I had was: How can I implement the Levenshtein algorithm for calculating edit-distance between two strings, as [described here][1], in Delphi?
[1]: http://en.wikipedia.org/wiki/Levenshtein_distance | edit-distance | algorithm | null | null | null | null | open | How do you implement Levenshtein distance in Delphi?
===
I'm posting this in the spirit of answering your own questions.
The question I had was: How can I implement the Levenshtein algorithm for calculating edit-distance between two strings, as [described here][1], in Delphi?
[1]: http://en.wikipedia.org/wiki/Levenshtein_distance | 0 |
54,808 | 09/10/2008 17:41:28 | 5,495 | 09/10/2008 02:23:09 | 1 | 0 | How to best merge information, at a server, into a "form", a PDF being generated as the final output | **Background**:
I have a VB6 application I've "inherited" that generates a PDF for the user to review using unsupported Acrobat Reader OCX integration. The program generates an FDF file with the data, then renders the merged result when the FDF is merged with a PDF. It only works correctly with Acrobat Reader 4 :-(. Installing a newer version of Acrobat Reader breaks this application, making the users very unhappy.
I want to re-architect this app so that it will send the data to be merged to a PDF output generation server. This server will merge the data passed to it onto the form, generate a PDF image of this, and store it, so that any user wishing to view the final result can then simply get the PDF (it is generated just once). If the underlying data is changed, the PDF will be deleted and regenerated next time it is requested. The client program can then have any version of Acrobat Reader they wish, as it will be used exclusively for displaying PDF files (as it was intended). The server will most likely be written in .NET (C#) with Visual Studio 2005, probably as a Web Service...
**Question**:
How would others recommend I go about this? Should I use Adobe's Acrobat 9 at the server to do this, puting the data into FDF or Adobe's XML format, and letting Acrobat do the merge? Are there great competitors in the "merge data onto form and output a PDF" space? How do others do this? It has to be API based, no GUI at the server, of course...
While some output is generated via FDF/PDF, another part of the application actually sends lines, graphics, and text to the printer (or a form for preview purposes) one page at a time, giving the proper x/y coordinates, font, size, etc. for each, knowing when it is at the end of a page, etc. This code is currently in the program that displays this for the user to review, and it is also in the program that prints the final form to the printer. For consistency between reviewer and printer, I'd like to move this output generation logic to a server as well, either using a good PDF generation API tool or use the code as is and generate a PDF with a PDF printer... and saving this PDF for display by the clients.
Googling "Form software" or "fill form software" or similar searches returns sooooooooo much unrelated material, mostly related to UI for users to fill in forms, I just don't know how to properly narrow down my search. This site seems the perfect place to ask such a question, as other programmers must also need to generate similar outputs, and have tried out some great tools. | .net | forms | pdf-generation | null | null | null | open | How to best merge information, at a server, into a "form", a PDF being generated as the final output
===
**Background**:
I have a VB6 application I've "inherited" that generates a PDF for the user to review using unsupported Acrobat Reader OCX integration. The program generates an FDF file with the data, then renders the merged result when the FDF is merged with a PDF. It only works correctly with Acrobat Reader 4 :-(. Installing a newer version of Acrobat Reader breaks this application, making the users very unhappy.
I want to re-architect this app so that it will send the data to be merged to a PDF output generation server. This server will merge the data passed to it onto the form, generate a PDF image of this, and store it, so that any user wishing to view the final result can then simply get the PDF (it is generated just once). If the underlying data is changed, the PDF will be deleted and regenerated next time it is requested. The client program can then have any version of Acrobat Reader they wish, as it will be used exclusively for displaying PDF files (as it was intended). The server will most likely be written in .NET (C#) with Visual Studio 2005, probably as a Web Service...
**Question**:
How would others recommend I go about this? Should I use Adobe's Acrobat 9 at the server to do this, puting the data into FDF or Adobe's XML format, and letting Acrobat do the merge? Are there great competitors in the "merge data onto form and output a PDF" space? How do others do this? It has to be API based, no GUI at the server, of course...
While some output is generated via FDF/PDF, another part of the application actually sends lines, graphics, and text to the printer (or a form for preview purposes) one page at a time, giving the proper x/y coordinates, font, size, etc. for each, knowing when it is at the end of a page, etc. This code is currently in the program that displays this for the user to review, and it is also in the program that prints the final form to the printer. For consistency between reviewer and printer, I'd like to move this output generation logic to a server as well, either using a good PDF generation API tool or use the code as is and generate a PDF with a PDF printer... and saving this PDF for display by the clients.
Googling "Form software" or "fill form software" or similar searches returns sooooooooo much unrelated material, mostly related to UI for users to fill in forms, I just don't know how to properly narrow down my search. This site seems the perfect place to ask such a question, as other programmers must also need to generate similar outputs, and have tried out some great tools. | 0 |
54,833 | 09/10/2008 17:48:28 | 1,980 | 08/19/2008 16:40:39 | 165 | 6 | Prevent Multi-Line ASP:Textbox from trimming line feeds | I have the following webform:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs"
Inherits="TestWebApp.Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:TextBox ID="txtMultiLine" runat="server"
Width="400px" Height="300px" TextMode="MultiLine"></asp:TextBox>
<br />
<asp:Button ID="btnSubmit" runat="server"
Text="Do A Postback" OnClick="btnSubmitClick" />
</div>
</form>
</body>
</html>
and each time I post-back the leading line feeds in the textbox are being removed. Is there any way that I can prevent this behavior?
I was thinking of creating a custom-control that inherited from the textbox but I wanted to get a sanity check here first. | c# | asp.net | textbox | postback | null | null | open | Prevent Multi-Line ASP:Textbox from trimming line feeds
===
I have the following webform:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs"
Inherits="TestWebApp.Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:TextBox ID="txtMultiLine" runat="server"
Width="400px" Height="300px" TextMode="MultiLine"></asp:TextBox>
<br />
<asp:Button ID="btnSubmit" runat="server"
Text="Do A Postback" OnClick="btnSubmitClick" />
</div>
</form>
</body>
</html>
and each time I post-back the leading line feeds in the textbox are being removed. Is there any way that I can prevent this behavior?
I was thinking of creating a custom-control that inherited from the textbox but I wanted to get a sanity check here first. | 0 |
54,836 | 09/10/2008 17:48:49 | 327 | 08/04/2008 17:08:49 | 660 | 47 | How can I monitor trace output of a .Net app? | I'm working on some code that uses the System.Diagnostics.Trace class and I'm wondering how to monitor what is written via calls to Trace.WriteLine() both when running in debug mode in Visual Studio and when running outside the debugger. | .net | visual-studio | windows | null | null | null | open | How can I monitor trace output of a .Net app?
===
I'm working on some code that uses the System.Diagnostics.Trace class and I'm wondering how to monitor what is written via calls to Trace.WriteLine() both when running in debug mode in Visual Studio and when running outside the debugger. | 0 |
54,837 | 09/10/2008 17:49:24 | 5,640 | 09/10/2008 15:33:37 | 31 | 4 | Modbus - .NET | Does anyone know of a good (preferably open source) library for dealing with the Modbus protocol? I have seen a few libraries, but I am looking for some people's personal experiences, not just the top ten Google hits. I figure there has to be at least one other person who deals with PLCs and automation hardware like I do out there.
Open to any other materials that might have been a help to you as well... | .net | open-source | protocols | plc | modbus | null | open | Modbus - .NET
===
Does anyone know of a good (preferably open source) library for dealing with the Modbus protocol? I have seen a few libraries, but I am looking for some people's personal experiences, not just the top ten Google hits. I figure there has to be at least one other person who deals with PLCs and automation hardware like I do out there.
Open to any other materials that might have been a help to you as well... | 0 |
54,851 | 09/10/2008 17:55:01 | 1,768 | 08/18/2008 13:32:15 | 192 | 14 | What are some best practices for creating my own custom exception? | In a follow-up to a [previous question][1] regarding exceptions, what are best practices for creating a custom exception in .NET?
More specifically should you inherit from System.Exception, System.ApplicationException or some other base exception?
[1]: http://stackoverflow.com/questions/54789/what-is-the-correct-net-exception-to-throw-when-try-to-insert-a-duplicate-objec | c# | .net | exception | null | null | null | open | What are some best practices for creating my own custom exception?
===
In a follow-up to a [previous question][1] regarding exceptions, what are best practices for creating a custom exception in .NET?
More specifically should you inherit from System.Exception, System.ApplicationException or some other base exception?
[1]: http://stackoverflow.com/questions/54789/what-is-the-correct-net-exception-to-throw-when-try-to-insert-a-duplicate-objec | 0 |
54,861 | 09/10/2008 17:58:19 | 2,443 | 08/22/2008 10:53:30 | 535 | 31 | How do I open a Document from Java? | I've been using the following code to open Office Documents, PDF, etc. on my windows machines using Java and it's working fine, except for some reason when a filename has embedded it within it multiple contiguous spaces like "File[SPACE][SPACE]Test.doc".
How can I make this work? I'm not averse to canning the whole piece of code... but I'd rather not replace it with a third party library that calls JNI.
public static void openDocument(String path) throws IOException {
// Make forward slashes backslashes (for windows)
// Double quote any path segments with spaces in them
path = path.replace("/", "\\").replaceAll(
"\\\\([^\\\\\\\\\"]* [^\\\\\\\\\"]*)", "\\\\\\\"$1\"");
String command = "C:\\Windows\\System32\\cmd.exe /c start " + path + "";
Runtime.getRuntime().exec(command);
}
EDIT: When I run it with the errant file windows complains about finding the file. But... when I run the command line directly from the command line it runs just fine. | java | processes | windows | null | null | null | open | How do I open a Document from Java?
===
I've been using the following code to open Office Documents, PDF, etc. on my windows machines using Java and it's working fine, except for some reason when a filename has embedded it within it multiple contiguous spaces like "File[SPACE][SPACE]Test.doc".
How can I make this work? I'm not averse to canning the whole piece of code... but I'd rather not replace it with a third party library that calls JNI.
public static void openDocument(String path) throws IOException {
// Make forward slashes backslashes (for windows)
// Double quote any path segments with spaces in them
path = path.replace("/", "\\").replaceAll(
"\\\\([^\\\\\\\\\"]* [^\\\\\\\\\"]*)", "\\\\\\\"$1\"");
String command = "C:\\Windows\\System32\\cmd.exe /c start " + path + "";
Runtime.getRuntime().exec(command);
}
EDIT: When I run it with the errant file windows complains about finding the file. But... when I run the command line directly from the command line it runs just fine. | 0 |
54,864 | 09/10/2008 17:59:25 | 1,536,194 | 09/02/2008 18:08:27 | 61 | 10 | How well does .NET scale? | (I'll begin by making it clear, I am not a .NET developer and am not tied to any other environment.)
Recently, I heard that the London Stock Exchange went down for an entire day. I've also heard that the software was written in .NET. Up to this point they would experience performance hits on busy days. People seem to be blaming .NET.
I don't want to debate the story, but it brought to mind the question of just how does .NET scale? How big is too big for .NET?
| .net | architecture | web-applications | scalability | null | null | open | How well does .NET scale?
===
(I'll begin by making it clear, I am not a .NET developer and am not tied to any other environment.)
Recently, I heard that the London Stock Exchange went down for an entire day. I've also heard that the software was written in .NET. Up to this point they would experience performance hits on busy days. People seem to be blaming .NET.
I don't want to debate the story, but it brought to mind the question of just how does .NET scale? How big is too big for .NET?
| 0 |
54,866 | 09/10/2008 18:00:12 | 1,965 | 08/19/2008 15:51:08 | 3,856 | 226 | Best way to parse Space Seperated Text | I have string like this
/c SomeText\MoreText "Some Text\More Text\Lol" SomeText
I want to tokenize it, however I can't just split on the spaces. I've come up with somewhat ugly parser that works, but I'm wondering if anyone has a more elegant design.
This is in C# btw.
| c# | string | tokenize | null | null | null | open | Best way to parse Space Seperated Text
===
I have string like this
/c SomeText\MoreText "Some Text\More Text\Lol" SomeText
I want to tokenize it, however I can't just split on the spaces. I've come up with somewhat ugly parser that works, but I'm wondering if anyone has a more elegant design.
This is in C# btw.
| 0 |
54,867 | 09/10/2008 18:01:27 | 4,883 | 09/06/2008 10:24:59 | 585 | 5 | Old style and new style classes in Python | What is the difference between old style and new style classes in Python? Is there ever a reason to use old-style classes these days? | python | null | null | null | null | null | open | Old style and new style classes in Python
===
What is the difference between old style and new style classes in Python? Is there ever a reason to use old-style classes these days? | 0 |
54,868 | 09/10/2008 18:01:36 | 2,841 | 08/25/2008 13:38:48 | 148 | 12 | What is the best HTML editor for Eclipse? | I was amazed to find out that apparently Eclipse doesn't come with a decent HTML editor by default (it opened my .html file in some kind of browser view and apparently tried to render it). And the basic text editor is not good enough (I need at least some syntax highlighting and automatic indenting).
Any suggestions? | html | eclipse | editor | null | null | null | open | What is the best HTML editor for Eclipse?
===
I was amazed to find out that apparently Eclipse doesn't come with a decent HTML editor by default (it opened my .html file in some kind of browser view and apparently tried to render it). And the basic text editor is not good enough (I need at least some syntax highlighting and automatic indenting).
Any suggestions? | 0 |
54,877 | 09/10/2008 18:03:12 | 404 | 08/05/2008 13:34:59 | 627 | 43 | jQuery "after" selector question | I can't seem to figure out a good way to do this, but it seems like it should be simple. I have an element that I want to append a div to. Then I have another element that I want to clone and shove into that intermediate div. Here's what I was hoping to do:
$("#somediv > ul").after("<div id='xxx'></div>").append($("#someotherdiv").clone());
This seems to be close, but not quite there. The problem with this is that the "append" seems to be operating on the original "#somediv > ul" selector. This sort of makes sense, but it's not what I wanted. How can I most efficiently select that intermediate div that I added with the "after" and put my "#someotherdiv" into it?
| jquery | selectors | null | null | null | null | open | jQuery "after" selector question
===
I can't seem to figure out a good way to do this, but it seems like it should be simple. I have an element that I want to append a div to. Then I have another element that I want to clone and shove into that intermediate div. Here's what I was hoping to do:
$("#somediv > ul").after("<div id='xxx'></div>").append($("#someotherdiv").clone());
This seems to be close, but not quite there. The problem with this is that the "append" seems to be operating on the original "#somediv > ul" selector. This sort of makes sense, but it's not what I wanted. How can I most efficiently select that intermediate div that I added with the "after" and put my "#someotherdiv" into it?
| 0 |
54,882 | 09/10/2008 18:04:26 | 4,220 | 09/02/2008 11:59:43 | 58 | 4 | How do I in java add a stacktrace to my debugging printout | What's the easiest way to print a stacktrace from a debugging printout? Often during testing you would like to know the callstack leading up to the situation provoking a debug message. | java | debugging | null | null | null | null | open | How do I in java add a stacktrace to my debugging printout
===
What's the easiest way to print a stacktrace from a debugging printout? Often during testing you would like to know the callstack leading up to the situation provoking a debug message. | 0 |
54,886 | 09/10/2008 18:05:39 | 5,659 | 09/10/2008 17:19:31 | 1 | 0 | Hidden / Tricks for Eclipse | Alright it can be a lame question, but everybody uses these things differently. What's some of the best time savers out there for this IDE.
<BR><BR>Tom | java | ide | eclipse | null | null | 09/26/2011 23:04:58 | not constructive | Hidden / Tricks for Eclipse
===
Alright it can be a lame question, but everybody uses these things differently. What's some of the best time savers out there for this IDE.
<BR><BR>Tom | 4 |
54,889 | 09/10/2008 18:05:54 | 5,471 | 09/09/2008 21:13:23 | 1 | 1 | As a ASP.NET programmer, do I need to be concern about email injection attacks ? | There are lots of PHP articles about the subject so is this a PHP only problem. | asp.net | security | email | null | null | null | open | As a ASP.NET programmer, do I need to be concern about email injection attacks ?
===
There are lots of PHP articles about the subject so is this a PHP only problem. | 0 |
54,909 | 09/10/2008 18:11:50 | 1,288 | 08/14/2008 12:14:17 | 870 | 58 | How do I clone a generic List in Java? | I have an ArrayList of Strings that I'd like to return a copy of. The ArrayList clone method has the following signature:
public Object clone()
After I call this method, how do I cast the returned Object back to an ArrayList of Strings?
EDIT: Unfortunately markdown syntax doesn't allow me to express Java's generic collection syntax. | java | clone | null | null | null | null | open | How do I clone a generic List in Java?
===
I have an ArrayList of Strings that I'd like to return a copy of. The ArrayList clone method has the following signature:
public Object clone()
After I call this method, how do I cast the returned Object back to an ArrayList of Strings?
EDIT: Unfortunately markdown syntax doesn't allow me to express Java's generic collection syntax. | 0 |
54,926 | 09/10/2008 18:18:28 | 2,598 | 08/23/2008 13:13:34 | 477 | 30 | Java: Make a JPanel not draw its background | Is it possible, in Java, to make a JPanel skip drawing its background thus being transparent except for the components on it? | java | gui | null | null | null | null | open | Java: Make a JPanel not draw its background
===
Is it possible, in Java, to make a JPanel skip drawing its background thus being transparent except for the components on it? | 0 |
54,929 | 09/10/2008 18:20:47 | 380 | 08/05/2008 10:39:18 | 2,549 | 198 | What are the hidden features of Asp.Net? | There are always features that would be useful in fringe scenarios, but for that very reason most people don't know them.
What are the ones that you know? | asp.net | null | null | null | null | 02/12/2012 02:11:31 | not constructive | What are the hidden features of Asp.Net?
===
There are always features that would be useful in fringe scenarios, but for that very reason most people don't know them.
What are the ones that you know? | 4 |
54,943 | 09/10/2008 18:27:38 | 4,872 | 09/06/2008 09:14:55 | 153 | 3 | How do I know when to use state based testing versus mock testing? | Which scenarios, areas of an application/system, etc. are best suited for 'classic' state based testing versus using mock objects? | unit-testing | null | null | null | null | null | open | How do I know when to use state based testing versus mock testing?
===
Which scenarios, areas of an application/system, etc. are best suited for 'classic' state based testing versus using mock objects? | 0 |
54,952 | 09/10/2008 18:30:55 | 1,430,323 | 09/10/2008 18:30:55 | 1 | 0 | Java, UTF-8 and Windows console | We try to use Java and UTF-8 on Windows. The application writes logs on the console, and we would like to use UTF-8 for the logs as our application has internationalized logs.
It is possible to configure the JVM so it generates UTF-8, using `-Dfile.encoding=UTF-8` as arguments to the JVM. It works fine, but the output on a Windows console is garbled.
Then, we can set the code page of the console to 65001 (`chcp 65001`), but in this case, the `.bat` files do not work. This means that when we try to launch our application through our script (named start.bat), absolutely nothing happens. The command simple returns:
C:\Application> chcp 65001
Activated code page: 65001
C:\Application> start.bat
C:\Application>
But without `chcp 65001`, there is no problem, and the application can be launched.
Any hints about that?
Thanks in advance.
| java | windows | console | utf8 | null | null | open | Java, UTF-8 and Windows console
===
We try to use Java and UTF-8 on Windows. The application writes logs on the console, and we would like to use UTF-8 for the logs as our application has internationalized logs.
It is possible to configure the JVM so it generates UTF-8, using `-Dfile.encoding=UTF-8` as arguments to the JVM. It works fine, but the output on a Windows console is garbled.
Then, we can set the code page of the console to 65001 (`chcp 65001`), but in this case, the `.bat` files do not work. This means that when we try to launch our application through our script (named start.bat), absolutely nothing happens. The command simple returns:
C:\Application> chcp 65001
Activated code page: 65001
C:\Application> start.bat
C:\Application>
But without `chcp 65001`, there is no problem, and the application can be launched.
Any hints about that?
Thanks in advance.
| 0 |
54,953 | 09/10/2008 18:31:37 | 4,257 | 09/02/2008 14:39:35 | 477 | 40 | Count Xpaths in XmlSpy | I am using XmlSpy to analyze an xml file, and I want to get a quick count of the number of nodes that match a given xpath. I know how to enter the xpath and get the list of nodes, but I am really just interested in the count. Is it possible to get this?
I'm using XmlSpy Professional Edition version 2007 sp2, if it matters. | xml | xpath | xmlspy | null | null | null | open | Count Xpaths in XmlSpy
===
I am using XmlSpy to analyze an xml file, and I want to get a quick count of the number of nodes that match a given xpath. I know how to enter the xpath and get the list of nodes, but I am really just interested in the count. Is it possible to get this?
I'm using XmlSpy Professional Edition version 2007 sp2, if it matters. | 0 |
54,955 | 09/10/2008 18:32:18 | 4,883 | 09/06/2008 10:24:59 | 595 | 5 | What is a prepared statement? | I see a bunch of lines in the .log files in the postgres pg_log directory that say something like:
> ERROR: prepared statement "pdo_pgsql_stmt_09e097f4" does not exist
What are prepared statements, and what kinds of things can cause these error messages to be displayed? | postgresql | null | null | null | null | null | open | What is a prepared statement?
===
I see a bunch of lines in the .log files in the postgres pg_log directory that say something like:
> ERROR: prepared statement "pdo_pgsql_stmt_09e097f4" does not exist
What are prepared statements, and what kinds of things can cause these error messages to be displayed? | 0 |
54,957 | 09/10/2008 18:33:08 | 5,663 | 09/10/2008 18:22:28 | 1 | 0 | Pls recommend a good platform (environment / language /reuseable component) for data visualization | I have lots and lots of data in various structures. Are there any better platforms other than Excel charts which can help me.
thanks | datavisualization | null | null | null | null | null | open | Pls recommend a good platform (environment / language /reuseable component) for data visualization
===
I have lots and lots of data in various structures. Are there any better platforms other than Excel charts which can help me.
thanks | 0 |
54,963 | 09/10/2008 18:34:57 | 5,486 | 09/09/2008 23:09:59 | 111 | 3 | How would you refactor this LINQ code? | I've got a lot of ugly code that looks like this:
if (!string.IsNullOrEmpty(ddlFileName.SelectedItem.Text))
results = results.Where(x => x.FileName.Contains(ddlFileName.SelectedValue));
if (chkFileName.Checked)
results = results.Where(x => string.IsNullOrEmpty(x.FileName));
if (!string.IsNullOrEmpty(ddlIPAddress.SelectedItem.Text))
results = results.Where(x => x.IpAddress.Contains(ddlIPAddress.SelectedValue));
if (chkIPAddress.Checked)
results = results.Where(x => string.IsNullOrEmpty(x.IpAddress));
...etc.
`results` is an `IQueryable<MyObject>`.
The idea is that for each of these innumerable dropdowns and checkboxes, if the dropdown has something selected, the user wants to match that item. If the checkbox is checked, the user wants specifically those records where that field is null or an empty string. (The UI doesn't let both be selected at the same time.) This all adds to the LINQ Expression which gets executed at the end, after we've added all the conditions.
It *seems* like there ought to be some way to pull out an `Expression<Func<MyObject, bool>>` or two so that I can put the repeated parts in a method and just pass in what changes. I've done this in other places, but this set of code has me stymied. (Also, I'd like to avoid "Dynamic LINQ", because I want to keep things type-safe if possible.) Any ideas? | c# | .net | linq | linq-to-sql | null | null | open | How would you refactor this LINQ code?
===
I've got a lot of ugly code that looks like this:
if (!string.IsNullOrEmpty(ddlFileName.SelectedItem.Text))
results = results.Where(x => x.FileName.Contains(ddlFileName.SelectedValue));
if (chkFileName.Checked)
results = results.Where(x => string.IsNullOrEmpty(x.FileName));
if (!string.IsNullOrEmpty(ddlIPAddress.SelectedItem.Text))
results = results.Where(x => x.IpAddress.Contains(ddlIPAddress.SelectedValue));
if (chkIPAddress.Checked)
results = results.Where(x => string.IsNullOrEmpty(x.IpAddress));
...etc.
`results` is an `IQueryable<MyObject>`.
The idea is that for each of these innumerable dropdowns and checkboxes, if the dropdown has something selected, the user wants to match that item. If the checkbox is checked, the user wants specifically those records where that field is null or an empty string. (The UI doesn't let both be selected at the same time.) This all adds to the LINQ Expression which gets executed at the end, after we've added all the conditions.
It *seems* like there ought to be some way to pull out an `Expression<Func<MyObject, bool>>` or two so that I can put the repeated parts in a method and just pass in what changes. I've done this in other places, but this set of code has me stymied. (Also, I'd like to avoid "Dynamic LINQ", because I want to keep things type-safe if possible.) Any ideas? | 0 |
54,966 | 09/10/2008 18:35:47 | 1,385,358 | 08/25/2008 03:05:06 | 892 | 46 | Replacing Windows Explorer With Third Party Tool | How would I go about replacing Windows Explorer with a third party tool such as TotalCommander, explorer++, etc?
I would like to have one of those load instead of win explorer when I type "C:\directoryName" into the run window. Is this possible? | windows | windows-vista | filemanagement | null | null | null | open | Replacing Windows Explorer With Third Party Tool
===
How would I go about replacing Windows Explorer with a third party tool such as TotalCommander, explorer++, etc?
I would like to have one of those load instead of win explorer when I type "C:\directoryName" into the run window. Is this possible? | 0 |
54,971 | 09/10/2008 18:37:57 | 4,761 | 09/05/2008 13:41:59 | 516 | 26 | Profiling visualization tools? | I need to display profiling information pulled from a deeply embedded CPU, presenting it in a way which other developers on my team will be able to act upon. The profiling data is a snapshot of a cycle counter at the entry and exit of every function, so we have a call graph annotated with sub-microsecond timing accuracy. I'd prefer not to just dump out function names and timing like gprof, I'm looking for something easier to understand and act upon.
Has anyone worked with a particularly good profiling tool (on any platform), which made it easy to identify areas of the code to drill into? I'm looking for an inspirational example to follow for how to display the call graph, but if there is good tool with an input format I can massage my data to I'll use it. I could use Windows, Linux, or MacOS X to run the visualization tool.
A profiling article on <A HREF="http://www.ibm.com/developerworks/library/l-graphvis/">IBM DeveloperWorks</A> led me to <A HREF="http://www.graphviz.org/">GraphViz</A>, with a <A HREF="http://www.graphviz.org/Gallery/directed/profile.html">profiling</A> example on their site. Barring another suggestion here, I'll use GraphViz and mimic their profiling example. | performance | null | null | null | null | null | open | Profiling visualization tools?
===
I need to display profiling information pulled from a deeply embedded CPU, presenting it in a way which other developers on my team will be able to act upon. The profiling data is a snapshot of a cycle counter at the entry and exit of every function, so we have a call graph annotated with sub-microsecond timing accuracy. I'd prefer not to just dump out function names and timing like gprof, I'm looking for something easier to understand and act upon.
Has anyone worked with a particularly good profiling tool (on any platform), which made it easy to identify areas of the code to drill into? I'm looking for an inspirational example to follow for how to display the call graph, but if there is good tool with an input format I can massage my data to I'll use it. I could use Windows, Linux, or MacOS X to run the visualization tool.
A profiling article on <A HREF="http://www.ibm.com/developerworks/library/l-graphvis/">IBM DeveloperWorks</A> led me to <A HREF="http://www.graphviz.org/">GraphViz</A>, with a <A HREF="http://www.graphviz.org/Gallery/directed/profile.html">profiling</A> example on their site. Barring another suggestion here, I'll use GraphViz and mimic their profiling example. | 0 |
54,972 | 09/10/2008 18:38:07 | 730 | 08/08/2008 12:40:04 | 215 | 34 | How to Prevent the "Please tell Microsoft about this problem" Dialog Boxes | We have an error that we can't seem to find and don't have the need/resources to try and track it down. What we do need to do is just keep the freaking "Please tell Microsoft about this problem" dialog boxes from cluttering up the server.
It is from an MS-Access error (we think) but I can't find where Access is installed (I don't think it is); there is no MS Office directory on any of the drives.
If we could just stop the dialog boxes from appearing that would be great.
Thanks.
Spec: Window Server 2003 sp2 | ms-access | windows2003 | dialog | null | null | null | open | How to Prevent the "Please tell Microsoft about this problem" Dialog Boxes
===
We have an error that we can't seem to find and don't have the need/resources to try and track it down. What we do need to do is just keep the freaking "Please tell Microsoft about this problem" dialog boxes from cluttering up the server.
It is from an MS-Access error (we think) but I can't find where Access is installed (I don't think it is); there is no MS Office directory on any of the drives.
If we could just stop the dialog boxes from appearing that would be great.
Thanks.
Spec: Window Server 2003 sp2 | 0 |
54,978 | 09/10/2008 18:40:33 | 4,593 | 09/04/2008 19:05:18 | 33 | 5 | Command parsing library | My team has a command parsing library for console apps. Each team around us has their own as well. There isn't anything in the BCL so I suppose this is natural.
I've look at the the module in Mono, which seems solid, and the one on CodePlex looks fine as well. There are probably others out there that will work (and I would love to hear your suggestions).
The real question is: how do I get my team, and others around us, to commit to just using one? | .net | console | null | null | null | null | open | Command parsing library
===
My team has a command parsing library for console apps. Each team around us has their own as well. There isn't anything in the BCL so I suppose this is natural.
I've look at the the module in Mono, which seems solid, and the one on CodePlex looks fine as well. There are probably others out there that will work (and I would love to hear your suggestions).
The real question is: how do I get my team, and others around us, to commit to just using one? | 0 |
54,989 | 09/10/2008 18:45:04 | 1,807 | 08/18/2008 16:52:32 | 216 | 17 | Change windows hostname from command line | Is it possible to change the hostname in Windows 2003 from the command line with out-of-the-box tools? | windows | null | null | null | null | null | open | Change windows hostname from command line
===
Is it possible to change the hostname in Windows 2003 from the command line with out-of-the-box tools? | 0 |
54,991 | 09/10/2008 18:45:15 | 231 | 08/03/2008 19:35:19 | 130 | 10 | Generating Random Passwords | Could not find a duplicate for this so will ask it.
When a user on our site looses his password and heads off to the Lost Password page we need to give him a new temporary password. I don't really mind how random this is, or if it matches all the "needed" strong password rules, all I want to do is give them a password that they can change later.
The application is a Web application written in C#. so I was thinking of being mean and going for the easy route of using part of a Guid. i.e.
Guid.NewGuid().ToString("d").Substring(1,8)
Suggesstions? thoughts? | random | passwords | c# | null | null | null | open | Generating Random Passwords
===
Could not find a duplicate for this so will ask it.
When a user on our site looses his password and heads off to the Lost Password page we need to give him a new temporary password. I don't really mind how random this is, or if it matches all the "needed" strong password rules, all I want to do is give them a password that they can change later.
The application is a Web application written in C#. so I was thinking of being mean and going for the easy route of using part of a Guid. i.e.
Guid.NewGuid().ToString("d").Substring(1,8)
Suggesstions? thoughts? | 0 |
54,998 | 09/10/2008 18:47:58 | 383 | 08/05/2008 10:46:37 | 2,734 | 257 | How Scalable is Sqlite? | I recently read this Question about [Sqlite Vs MySql][1] and the answer pointed out that Sqlite doesn't scale well and the official website [sort-of confirms this][2], however.
How scalable is Sqlite and what are its upper most limits?
[1]: http://beta.stackoverflow.com/questions/3630/sqlite-vs-mysql
[2]: http://www.sqlite.org/whentouse.html | sqlite | scalability | null | null | null | null | open | How Scalable is Sqlite?
===
I recently read this Question about [Sqlite Vs MySql][1] and the answer pointed out that Sqlite doesn't scale well and the official website [sort-of confirms this][2], however.
How scalable is Sqlite and what are its upper most limits?
[1]: http://beta.stackoverflow.com/questions/3630/sqlite-vs-mysql
[2]: http://www.sqlite.org/whentouse.html | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.