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
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
65,998 | 09/15/2008 19:32:17 | 5,196 | 09/08/2008 12:39:19 | 83 | 3 | Apps that support both DirectX 9 and 10 | I have a noobish question for any graphics programmer.
I am confused how some games (like Crysis) can support both DirectX 9 (in XP) and 10 (in Vista)?
What I understand so far is that if you write a DX10 app, then it can only runs in Vista.
Maybe they have 2 code bases -- one written in DX9 and another in DX10? But isn't that an overkill?
| graphics | compatibility | directx | null | null | null | open | Apps that support both DirectX 9 and 10
===
I have a noobish question for any graphics programmer.
I am confused how some games (like Crysis) can support both DirectX 9 (in XP) and 10 (in Vista)?
What I understand so far is that if you write a DX10 app, then it can only runs in Vista.
Maybe they have 2 code bases -- one written in DX9 and another in DX10? But isn't that an overkill?
| 0 |
66,006 | 09/15/2008 19:33:39 | 9,642 | 09/15/2008 19:26:50 | 1 | 0 | JavaScript in client-side XSL processing? | Is it possible to have XML-embedded JavaScript executed to assist in client-side (browser-based) XSL transformations? How is it done and how official is it?
Microsoft's XML DOM objects allow this on the server-side (i.e. in ASP/ASP.NET). For clarification, I do not mean HTML DOM scripting performed *after* the document is transformed. | javascript | browser | xslt | null | null | null | open | JavaScript in client-side XSL processing?
===
Is it possible to have XML-embedded JavaScript executed to assist in client-side (browser-based) XSL transformations? How is it done and how official is it?
Microsoft's XML DOM objects allow this on the server-side (i.e. in ASP/ASP.NET). For clarification, I do not mean HTML DOM scripting performed *after* the document is transformed. | 0 |
66,007 | 09/15/2008 19:33:42 | 6,358 | 09/14/2008 18:37:40 | 1 | 0 | Auto-updating in Corporate Environments (C#) | I have a three-tier application which is installed in corporate environments. With every server version update, all clients have to be updated, too. Currently, I provide an MSI package which is automatically deployed via Active Directory, however my customers (mostly with 20-300 users each) seem to hate the MSI solution because it is
- Complicated to get it running (little Active Directory knowledge);
- The update process can't be triggered by the server, when a new version is detected;
- Customers can't install multiple versions of the client (e.g. 2.3 and 2.4) at the same time to speak to different servers;
- The update process itself doesn't always work as expected (sometimes very strange behaviour healing itself after a few hours)
I've now made a few experiments with ClickOnce, but that way to unflexible for me and too hard to integrate in my automated build process. Also, it produces cryptic error messages which would surely confuse my customers.
I would have no problems to write the update logic myself, but there the problem is that the users running to self-updating applications have too restricted rights to perform an update. I've found that they are able to write to their Local Application Data directory, but I don't think this would be the typical place to install application files into.
Do you know a way to an update that "just works"? | c# | .net | update | null | null | null | open | Auto-updating in Corporate Environments (C#)
===
I have a three-tier application which is installed in corporate environments. With every server version update, all clients have to be updated, too. Currently, I provide an MSI package which is automatically deployed via Active Directory, however my customers (mostly with 20-300 users each) seem to hate the MSI solution because it is
- Complicated to get it running (little Active Directory knowledge);
- The update process can't be triggered by the server, when a new version is detected;
- Customers can't install multiple versions of the client (e.g. 2.3 and 2.4) at the same time to speak to different servers;
- The update process itself doesn't always work as expected (sometimes very strange behaviour healing itself after a few hours)
I've now made a few experiments with ClickOnce, but that way to unflexible for me and too hard to integrate in my automated build process. Also, it produces cryptic error messages which would surely confuse my customers.
I would have no problems to write the update logic myself, but there the problem is that the users running to self-updating applications have too restricted rights to perform an update. I've found that they are able to write to their Local Application Data directory, but I don't think this would be the typical place to install application files into.
Do you know a way to an update that "just works"? | 0 |
66,009 | 09/15/2008 19:33:50 | 1,946 | 08/19/2008 14:53:06 | 196 | 9 | How would you implement a breadcrumb helper in asp.net mvc? | I know you could make a helper pretty easily given the data. So, if possible, please only submit answers that also include getting the data (eg. from the routeTable). | asp.net-mvc | navigation | null | null | null | null | open | How would you implement a breadcrumb helper in asp.net mvc?
===
I know you could make a helper pretty easily given the data. So, if possible, please only submit answers that also include getting the data (eg. from the routeTable). | 0 |
66,012 | 09/15/2008 19:34:08 | 8,303 | 09/15/2008 15:40:08 | 1 | 1 | How do I best localize an entire app to many different languages? | I'm using Visual Studio (2005 and up). I am looking into trying out making an application where the user can change language for all menues, input formats and such. How would I go on doing this, as I suppose that there is some complete feature within .Net that can help me with this?
I need to take the following into account (and fill me in if I miss some obvious stuff)
- Strings (menues, texts)
- Input data (parsing floats, dates, etc..)
- Should be easy to add support for another language | c# | .net | language | localize | localizing | null | open | How do I best localize an entire app to many different languages?
===
I'm using Visual Studio (2005 and up). I am looking into trying out making an application where the user can change language for all menues, input formats and such. How would I go on doing this, as I suppose that there is some complete feature within .Net that can help me with this?
I need to take the following into account (and fill me in if I miss some obvious stuff)
- Strings (menues, texts)
- Input data (parsing floats, dates, etc..)
- Should be easy to add support for another language | 0 |
66,016 | 09/15/2008 19:34:21 | 9,613 | 09/15/2008 19:21:47 | 1 | 0 | What is the best implementation of an exception mechanism ? | Most program languages have some kind of exception handling; some languages have return codes, others have try/catch, or rescue/retry, etc., each with its own pecularities in readability, robustness, and practical effectiveness in a large group development effort. Which one is the best and why ? | exception | null | null | null | null | null | open | What is the best implementation of an exception mechanism ?
===
Most program languages have some kind of exception handling; some languages have return codes, others have try/catch, or rescue/retry, etc., each with its own pecularities in readability, robustness, and practical effectiveness in a large group development effort. Which one is the best and why ? | 0 |
66,032 | 09/15/2008 19:36:44 | 4,332 | 09/02/2008 21:56:33 | 151 | 8 | Order of DOM NodeList returned by getChildNodes() | The DOM method `getChildNodes()` returns a `NodeList` of the children of the current `Node`. Whilst a `NodeList` is ordered, is the list guaranteed to be in document order?
For example, given `<a><b/><c/><d/></a>` is `a.getChildNodes()` guaranteed to return a `NodeList` with `b`, `c` and `d` *in that order*?
The [javadoc][1] isn't clear on this.
[1]: http://java.sun.com/javase/6/docs/api/org/w3c/dom/Node.html#getChildNodes() | java | xml | dom | null | null | null | open | Order of DOM NodeList returned by getChildNodes()
===
The DOM method `getChildNodes()` returns a `NodeList` of the children of the current `Node`. Whilst a `NodeList` is ordered, is the list guaranteed to be in document order?
For example, given `<a><b/><c/><d/></a>` is `a.getChildNodes()` guaranteed to return a `NodeList` with `b`, `c` and `d` *in that order*?
The [javadoc][1] isn't clear on this.
[1]: http://java.sun.com/javase/6/docs/api/org/w3c/dom/Node.html#getChildNodes() | 0 |
66,040 | 09/15/2008 19:37:17 | 9,608 | 09/15/2008 19:20:10 | 1 | 0 | Application Level Replication Technologies | I am building out a solution that will be deployed in multiple data centers in multiple regions around the world, with each data center having a replicated copy of data actively updated in each region. I will have a combination of multiple databases and file systems in each data center, the state of which must be kept consistent (within a data center). These multiple repositories will be fronted by a SOA service tier.
I can tolerate some latency in the replication, and need to allow for regions to be off-line, and then catch up later.
Given the multiple back end repositories of data, I can't easily rely on independent replication solutions for each one to maintain a consistent state. I am thus lead to implementing replication at the application layer -- by replicating the SOA requests in some manner. I'll need to make sure that replication loops don't occur, and that last writer conditions are sorted out correctly.
In your experience, what is the best pattern for solving this problem, and are there good products (free or otherwise) that should be investigated?
| replication | soa | null | null | null | null | open | Application Level Replication Technologies
===
I am building out a solution that will be deployed in multiple data centers in multiple regions around the world, with each data center having a replicated copy of data actively updated in each region. I will have a combination of multiple databases and file systems in each data center, the state of which must be kept consistent (within a data center). These multiple repositories will be fronted by a SOA service tier.
I can tolerate some latency in the replication, and need to allow for regions to be off-line, and then catch up later.
Given the multiple back end repositories of data, I can't easily rely on independent replication solutions for each one to maintain a consistent state. I am thus lead to implementing replication at the application layer -- by replicating the SOA requests in some manner. I'll need to make sure that replication loops don't occur, and that last writer conditions are sorted out correctly.
In your experience, what is the best pattern for solving this problem, and are there good products (free or otherwise) that should be investigated?
| 0 |
66,041 | 09/15/2008 19:37:20 | 9,432 | 09/15/2008 18:47:52 | 1 | 0 | How to sort by Lucene.Net field and ignore common stop words such as 'a' and 'the'? | I've found how to sort query results by a given field in a Lucene.Net index instead of by score; all it takes is a field that is indexed but not tokenized. However, what I haven't been able to figure out is how to sort that field while ignoring stop words such as "a" and "the", so that the following book titles, for example, would sort in ascending order like so:
1. The Cat in the Hat
2. Horton Hears a Who
Is such a thing possible, and if yes, how?
I'm using Lucene.Net 2.3.1.2. | lucene | lucene.net | null | null | null | null | open | How to sort by Lucene.Net field and ignore common stop words such as 'a' and 'the'?
===
I've found how to sort query results by a given field in a Lucene.Net index instead of by score; all it takes is a field that is indexed but not tokenized. However, what I haven't been able to figure out is how to sort that field while ignoring stop words such as "a" and "the", so that the following book titles, for example, would sort in ascending order like so:
1. The Cat in the Hat
2. Horton Hears a Who
Is such a thing possible, and if yes, how?
I'm using Lucene.Net 2.3.1.2. | 0 |
66,066 | 09/15/2008 19:39:15 | 1,797 | 08/18/2008 15:46:11 | 997 | 52 | What is the best way to implement constants in Java ? | I've seen examples like this:
public class MaxSeconds {
public static final int MAX_SECONDS = 25;
}
and supposed that I could have a Constants class to wrap constants in, declaring them static final. I know practically no Java at all and am wondering if this is the best way to create constants. | java | constants | null | null | null | null | open | What is the best way to implement constants in Java ?
===
I've seen examples like this:
public class MaxSeconds {
public static final int MAX_SECONDS = 25;
}
and supposed that I could have a Constants class to wrap constants in, declaring them static final. I know practically no Java at all and am wondering if this is the best way to create constants. | 0 |
66,094 | 09/15/2008 19:41:18 | 9,626 | 09/15/2008 19:24:17 | 1 | 0 | .NET 3.5 Linq Datasource and Joins | Have been trying out the new Dynamic Data site create tool that shipped with .NET 3.5. The tool uses LINQ Datasources to get the data from the database using a .dmbl context file for a reference. I am interseted in customizing a data grid but I need to show data from more than one table. Does anyone know how to do this using the LINQ Datasource object? | linq | .net-3.5 | linq-to-sql | dynamicdata | null | null | open | .NET 3.5 Linq Datasource and Joins
===
Have been trying out the new Dynamic Data site create tool that shipped with .NET 3.5. The tool uses LINQ Datasources to get the data from the database using a .dmbl context file for a reference. I am interseted in customizing a data grid but I need to show data from more than one table. Does anyone know how to do this using the LINQ Datasource object? | 0 |
66,104 | 09/15/2008 19:42:36 | 8,026 | 09/15/2008 14:57:02 | 1 | 4 | Why does Tomcat 5.5 (with Java 1.4, running on Windows XP 32-bit) suddenly hang? | I've been running Tomcat 5.5 with Java 1.4 for a while now with a huge webapp. Most of the time it runs fine, but sometimes it will just hang, with no exception generated, and no apparant way of getting it to run again other than re-starting Tomcat. The tomcat instance is allowed a gigabyte of memory on the heap, but rarely exceeds 300 MB. Has anyone else run into this issue, and is there a solution for it? | tomcat | java | windows | null | null | null | open | Why does Tomcat 5.5 (with Java 1.4, running on Windows XP 32-bit) suddenly hang?
===
I've been running Tomcat 5.5 with Java 1.4 for a while now with a huge webapp. Most of the time it runs fine, but sometimes it will just hang, with no exception generated, and no apparant way of getting it to run again other than re-starting Tomcat. The tomcat instance is allowed a gigabyte of memory on the heap, but rarely exceeds 300 MB. Has anyone else run into this issue, and is there a solution for it? | 0 |
66,107 | 09/15/2008 19:42:59 | 9,628 | 09/15/2008 19:24:42 | 1 | 0 | How to identify specific digits of an integer input in C? | I have a lot of java background and am new to C. If the input integer is 11031, I want to count the number of 1's digits, how would I do this?
I know in java I can take the input as a String and use charAt, but I understand there is no implicit String function in C... | c | null | null | null | null | null | open | How to identify specific digits of an integer input in C?
===
I have a lot of java background and am new to C. If the input integer is 11031, I want to count the number of 1's digits, how would I do this?
I know in java I can take the input as a String and use charAt, but I understand there is no implicit String function in C... | 0 |
66,111 | 09/15/2008 19:43:07 | 3,458 | 08/28/2008 16:25:51 | 212 | 20 | XWindows ignores multiple ClentMessage's sent during same second | I've encountered an interesting problem while developing for our legacy XWindows application.
For reasons that don't bear explaining, I am sending ClientMessage from a comand-line utility to a GUI app.Most of the messages end up having the same contents, as the message's purpose is to trigger a synchronous communication process over some side pipes. I've noticed that some of the time I would send two messages, but only one gets delivered. I've traced this to the fact that both messages had the same contents and were sent in the same second (IOW, the log timestamp on the sending was the same number). As soon as I added some dummy contents to the messages to make them all different, the problem went away.
This happened over two different X servers: vncserver and Exceed. Am I hitting some XWindows feature that I am not aware of - some kind of message throttling/compression? Has anyone encountered this kind of thing? | xwindows | null | null | null | null | null | open | XWindows ignores multiple ClentMessage's sent during same second
===
I've encountered an interesting problem while developing for our legacy XWindows application.
For reasons that don't bear explaining, I am sending ClientMessage from a comand-line utility to a GUI app.Most of the messages end up having the same contents, as the message's purpose is to trigger a synchronous communication process over some side pipes. I've noticed that some of the time I would send two messages, but only one gets delivered. I've traced this to the fact that both messages had the same contents and were sent in the same second (IOW, the log timestamp on the sending was the same number). As soon as I added some dummy contents to the messages to make them all different, the problem went away.
This happened over two different X servers: vncserver and Exceed. Am I hitting some XWindows feature that I am not aware of - some kind of message throttling/compression? Has anyone encountered this kind of thing? | 0 |
66,117 | 09/15/2008 19:43:55 | 2,832 | 08/25/2008 12:57:37 | 297 | 18 | ASP.NET - Common Gotchas | When I am working with ASP.NET, I find that there are always unexpected things I run into that take forever to debug. I figure that having a consolidated list of these would be great for those "weird error" circumstances, plus to expand our knowledge of oddness in the platform.
So: answer with one of your "Gotcha"s!
I'll start:
Under ASP.NET (VB), performing a Response.Redirect inside a try/catch block does not stop execution of the current Response, which can lead to two concurrent Responses executing against the same Session. | c# | asp.net | vb | gotcha | null | 02/03/2012 16:35:50 | not constructive | ASP.NET - Common Gotchas
===
When I am working with ASP.NET, I find that there are always unexpected things I run into that take forever to debug. I figure that having a consolidated list of these would be great for those "weird error" circumstances, plus to expand our knowledge of oddness in the platform.
So: answer with one of your "Gotcha"s!
I'll start:
Under ASP.NET (VB), performing a Response.Redirect inside a try/catch block does not stop execution of the current Response, which can lead to two concurrent Responses executing against the same Session. | 4 |
66,130 | 09/15/2008 19:44:32 | 9,674 | 09/15/2008 19:33:50 | 1 | 0 | What's so bad about VB .NET? | Having spent time on Reddit and (*gasp*) Digg, I hear a lot of trash-talk on .NET and MS products, and a lot of interesting talk about other languages. As a (*second gasp*) Project Manager at a small software company utilizing VB/.NET extensively, I'm not sure what's so bad about it.
**Can someone tell me where it falls short, what would be a better platform** for a software needing high-reliability, simple and intuitive GUI, since most of our clients are used to DOS interfaces, and scalability between let's say 5 to 100 users depending on the configuration? Currently SQL Server in the background.
PS - Feel free to ask followup questions for more info? Also no I am not the type of PM you read about on these sites, and no I won't ask you to build an OS for $10-$100
Thanks! | .net | vb.net | vb6 | null | null | 08/05/2011 08:54:45 | not constructive | What's so bad about VB .NET?
===
Having spent time on Reddit and (*gasp*) Digg, I hear a lot of trash-talk on .NET and MS products, and a lot of interesting talk about other languages. As a (*second gasp*) Project Manager at a small software company utilizing VB/.NET extensively, I'm not sure what's so bad about it.
**Can someone tell me where it falls short, what would be a better platform** for a software needing high-reliability, simple and intuitive GUI, since most of our clients are used to DOS interfaces, and scalability between let's say 5 to 100 users depending on the configuration? Currently SQL Server in the background.
PS - Feel free to ask followup questions for more info? Also no I am not the type of PM you read about on these sites, and no I won't ask you to build an OS for $10-$100
Thanks! | 4 |
66,132 | 09/15/2008 19:44:46 | 7,945 | 09/15/2008 14:45:18 | 1 | 0 | IMAP in emacs rmail? | Is there an Emacs package for using rmail with an imap server? | emacs | imap | null | null | null | null | open | IMAP in emacs rmail?
===
Is there an Emacs package for using rmail with an imap server? | 0 |
66,148 | 09/15/2008 19:46:01 | 9,627 | 09/15/2008 19:24:36 | 1 | 0 | Is there a user friendly XML editor out there? I can't find anything good, preferably open source | Something to take an XML schema and let you add/edit data but not change the XML structure, preferably installed on a server. basically a UI to edit xml documents as a web app. Someone has got to have done this already right? | xml | server | cms | user-interface | editing | 05/28/2012 17:47:47 | not constructive | Is there a user friendly XML editor out there? I can't find anything good, preferably open source
===
Something to take an XML schema and let you add/edit data but not change the XML structure, preferably installed on a server. basically a UI to edit xml documents as a web app. Someone has got to have done this already right? | 4 |
66,156 | 09/15/2008 19:46:47 | 9,501 | 09/15/2008 18:59:40 | 1 | 0 | Who's Data Access Layer do you use for .NET? | We have grown our own DAL library, but are researching using a third party DAL - to relieve the maintenance overhead.
I know that Microsoft and some others have written simple DALs - although Microsoft's doesn't seem to play well with Oracle databases.
Any other suggestions? Or are we stuck with what we have?
| .net | data-access-layer | null | null | null | null | open | Who's Data Access Layer do you use for .NET?
===
We have grown our own DAL library, but are researching using a third party DAL - to relieve the maintenance overhead.
I know that Microsoft and some others have written simple DALs - although Microsoft's doesn't seem to play well with Oracle databases.
Any other suggestions? Or are we stuck with what we have?
| 0 |
66,164 | 09/15/2008 19:47:17 | 9,727 | 09/15/2008 19:47:17 | 1 | 0 | How to write an SQL query to find out which logins have been granted which rights in Sql Server 2005? | I'm responsible for some test database servers. Historically, too many other poeple have access to them. They run on SQL Server 2005. I've been writing queries and wrapping them in scripts so I can run a regular audit of rights. Finding out which users had Administrator rights on the server itself was fine, as was finding out who had the 'sysadmin' role on their login - it was a single line query for the latter.
But how to find out which logins have a User Mapping to a particular (or any) database? I can find the sys.database_principals and sys.server_principals tables. I have located the sys.databases table. I haven't worked out how to find out which users have rights on a database, and if so, what. Every Google search brings up people manually using the User Mapping pane of the Login dialog, rather than using a query to do so. Any ideas? | sql | database | null | null | null | null | open | How to write an SQL query to find out which logins have been granted which rights in Sql Server 2005?
===
I'm responsible for some test database servers. Historically, too many other poeple have access to them. They run on SQL Server 2005. I've been writing queries and wrapping them in scripts so I can run a regular audit of rights. Finding out which users had Administrator rights on the server itself was fine, as was finding out who had the 'sysadmin' role on their login - it was a single line query for the latter.
But how to find out which logins have a User Mapping to a particular (or any) database? I can find the sys.database_principals and sys.server_principals tables. I have located the sys.databases table. I haven't worked out how to find out which users have rights on a database, and if so, what. Every Google search brings up people manually using the User Mapping pane of the Login dialog, rather than using a query to do so. Any ideas? | 0 |
66,165 | 09/15/2008 19:47:22 | 9,411 | 09/15/2008 18:43:54 | 11 | 1 | What's happening with perl6? | Is there any visible progress? Is it now just an academic exercise? Do you believe perl will continue to evolve with or without perl6 or will soon be forgotten? | programming-languages | null | null | null | null | null | open | What's happening with perl6?
===
Is there any visible progress? Is it now just an academic exercise? Do you believe perl will continue to evolve with or without perl6 or will soon be forgotten? | 0 |
66,166 | 09/15/2008 19:47:25 | 5,661 | 09/10/2008 17:49:47 | 106 | 6 | C++ web service framework | We are looking for a C++ web services framework, preferably open source.
Any recommendations?
| c++ | xml | web-services | frameworks | xsd | null | open | C++ web service framework
===
We are looking for a C++ web services framework, preferably open source.
Any recommendations?
| 0 |
66,227 | 09/15/2008 19:51:37 | 9,411 | 09/15/2008 18:43:54 | 11 | 1 | What is the best multi-platform RAD language? | What is the best multi-platform RAD language for writing a desktop application? Nice GUI capability would be a bonus. | gui | programming-languages | multi-platform | null | null | 01/29/2012 00:30:53 | not constructive | What is the best multi-platform RAD language?
===
What is the best multi-platform RAD language for writing a desktop application? Nice GUI capability would be a bonus. | 4 |
66,277 | 09/15/2008 19:55:25 | 1,228 | 08/13/2008 13:58:55 | 1,985 | 141 | Do you get one instance of TFS Workgroup per MSDN license? | I work for a small shop that currently only has two full MSDN developer licenses. The license allows you to run the Workgroup edition of TFS. We have one running, but its a pain in the butt dealing with who gets access to it (only five seats on the Workgroup edition).
I'm wondering, since we have two MSDN dev licenses, can we host two separate instances of TFS workgroup? | tfs | licensing | msdn | null | null | 05/10/2012 13:12:24 | too localized | Do you get one instance of TFS Workgroup per MSDN license?
===
I work for a small shop that currently only has two full MSDN developer licenses. The license allows you to run the Workgroup edition of TFS. We have one running, but its a pain in the butt dealing with who gets access to it (only five seats on the Workgroup edition).
I'm wondering, since we have two MSDN dev licenses, can we host two separate instances of TFS workgroup? | 3 |
66,293 | 09/15/2008 19:56:44 | 5,626 | 09/10/2008 15:11:18 | 106 | 3 | Image Misalignment in Visual Studio application | I have a Visual Studio application with a splash screen image cut into "slices". The positions are specified in the Form Designer so they line up properly on the screen. However, the images are out of place when the application is run on the Chinese version of Windows XP. It looks as if the image slices were "exploded" apart.
What's going on here? Do international versions of Windows have a different meaning of the "top left" coordinate of the picture? How can I force the images to be precisely displayed where I want them?
| windows | vs2005 | null | null | null | null | open | Image Misalignment in Visual Studio application
===
I have a Visual Studio application with a splash screen image cut into "slices". The positions are specified in the Form Designer so they line up properly on the screen. However, the images are out of place when the application is run on the Chinese version of Windows XP. It looks as if the image slices were "exploded" apart.
What's going on here? Do international versions of Windows have a different meaning of the "top left" coordinate of the picture? How can I force the images to be precisely displayed where I want them?
| 0 |
66,317 | 09/15/2008 19:58:47 | 3,798 | 08/30/2008 22:09:59 | 538 | 21 | Which is the best VM program for a programmer? | VMWare, VirtualBox or Virtual PC. What are the advantages and or disadvantages of each for a programmer? What is the best for Linux Guest OS, which is the best for Windows Guest OS's? | vmware | virtualbox | virtual-pc | null | null | null | open | Which is the best VM program for a programmer?
===
VMWare, VirtualBox or Virtual PC. What are the advantages and or disadvantages of each for a programmer? What is the best for Linux Guest OS, which is the best for Windows Guest OS's? | 0 |
66,330 | 09/15/2008 19:59:31 | 9,792 | 09/15/2008 19:59:31 | 1 | 0 | Perl aids for regression testing | Is there a Perl module that allows me to view diffs between actual and reference output of programs (or functions)? The test fails if there are differences.
Also, in case there are differences but the output is OK (because the functionality has changed) I want to be able to commit the actual output as future reference output. | testing | perl | regression | null | null | null | open | Perl aids for regression testing
===
Is there a Perl module that allows me to view diffs between actual and reference output of programs (or functions)? The test fails if there are differences.
Also, in case there are differences but the output is OK (because the functionality has changed) I want to be able to commit the actual output as future reference output. | 0 |
66,361 | 09/15/2008 20:02:08 | 6,943 | 09/15/2008 12:52:19 | 1 | 5 | What are the first tasks for implementing Unit Testing in Brownfield Applications? | Do you refactor your SQL first? Your architecture? or your code base?
Do you change languages? Do you throw everything away and start from scratch? [Not refactoring] | sql | language-agnostic | programming-languages | testing-strategies | null | null | open | What are the first tasks for implementing Unit Testing in Brownfield Applications?
===
Do you refactor your SQL first? Your architecture? or your code base?
Do you change languages? Do you throw everything away and start from scratch? [Not refactoring] | 0 |
66,382 | 09/15/2008 20:04:37 | 9,825 | 09/15/2008 20:04:37 | 1 | 0 | Is it possible to cache a value evaluated in a lambda expression? (C# + Linq) | In the ContainsIngredients method in the following code, is it possible to cache the *p.Ingredients* value instead of explicitly referencing it several times? This is a fairly trivial example that I just cooked up for illustrative purposes, but the code I'm working on references values deep inside *p* eg. *p.InnerObject.ExpensiveMethod().Value*
edit:
I'm using the PredicateBuilder from http://www.albahari.com/nutshell/predicatebuilder.html
public class IngredientBag
{
private readonly Dictionary<string, string> _ingredients = new Dictionary<string, string>();
public void Add(string type, string name)
{
_ingredients.Add(type, name);
}
public string Get(string type)
{
return _ingredients[type];
}
public bool Contains(string type)
{
return _ingredients.ContainsKey(type);
}
}
public class Potion
{
public IngredientBag Ingredients { get; private set;}
public string Name {get; private set;}
public Potion(string name) : this(name, null)
{
}
public Potion(string name, IngredientBag ingredients)
{
Name = name;
Ingredients = ingredients;
}
public static Expression<Func<Potion, bool>>
ContainsIngredients(string ingredientType, params string[] ingredients)
{
var predicate = PredicateBuilder.False<Potion>();
// Here, I'm accessing p.Ingredients several times in one
// expression. Is there any way to cache this value and
// reference the cached value in the expression?
foreach (var ingredient in ingredients)
{
var temp = ingredient;
predicate = predicate.Or (
p => p.Ingredients != null &&
p.Ingredients.Contains(ingredientType) &&
p.Ingredients.Get(ingredientType).Contains(temp));
}
return predicate;
}
}
[STAThread]
static void Main()
{
var potions = new List<Potion>
{
new Potion("Invisibility", new IngredientBag()),
new Potion("Bonus"),
new Potion("Speed", new IngredientBag()),
new Potion("Strength", new IngredientBag()),
new Potion("Dummy Potion")
};
potions[0].Ingredients.Add("solid", "Eye of Newt");
potions[0].Ingredients.Add("liquid", "Gall of Peacock");
potions[0].Ingredients.Add("gas", "Breath of Spider");
potions[2].Ingredients.Add("solid", "Hair of Toad");
potions[2].Ingredients.Add("gas", "Peacock's anguish");
potions[3].Ingredients.Add("liquid", "Peacock Sweat");
potions[3].Ingredients.Add("gas", "Newt's aura");
var predicate = Potion.ContainsIngredients("solid", "Newt", "Toad")
.Or(Potion.ContainsIngredients("gas", "Spider", "Scorpion"));
foreach (var result in
from p in potions
where(predicate).Compile()(p)
select p)
{
Console.WriteLine(result.Name);
}
} | c# | linq | lambda | predicate | null | null | open | Is it possible to cache a value evaluated in a lambda expression? (C# + Linq)
===
In the ContainsIngredients method in the following code, is it possible to cache the *p.Ingredients* value instead of explicitly referencing it several times? This is a fairly trivial example that I just cooked up for illustrative purposes, but the code I'm working on references values deep inside *p* eg. *p.InnerObject.ExpensiveMethod().Value*
edit:
I'm using the PredicateBuilder from http://www.albahari.com/nutshell/predicatebuilder.html
public class IngredientBag
{
private readonly Dictionary<string, string> _ingredients = new Dictionary<string, string>();
public void Add(string type, string name)
{
_ingredients.Add(type, name);
}
public string Get(string type)
{
return _ingredients[type];
}
public bool Contains(string type)
{
return _ingredients.ContainsKey(type);
}
}
public class Potion
{
public IngredientBag Ingredients { get; private set;}
public string Name {get; private set;}
public Potion(string name) : this(name, null)
{
}
public Potion(string name, IngredientBag ingredients)
{
Name = name;
Ingredients = ingredients;
}
public static Expression<Func<Potion, bool>>
ContainsIngredients(string ingredientType, params string[] ingredients)
{
var predicate = PredicateBuilder.False<Potion>();
// Here, I'm accessing p.Ingredients several times in one
// expression. Is there any way to cache this value and
// reference the cached value in the expression?
foreach (var ingredient in ingredients)
{
var temp = ingredient;
predicate = predicate.Or (
p => p.Ingredients != null &&
p.Ingredients.Contains(ingredientType) &&
p.Ingredients.Get(ingredientType).Contains(temp));
}
return predicate;
}
}
[STAThread]
static void Main()
{
var potions = new List<Potion>
{
new Potion("Invisibility", new IngredientBag()),
new Potion("Bonus"),
new Potion("Speed", new IngredientBag()),
new Potion("Strength", new IngredientBag()),
new Potion("Dummy Potion")
};
potions[0].Ingredients.Add("solid", "Eye of Newt");
potions[0].Ingredients.Add("liquid", "Gall of Peacock");
potions[0].Ingredients.Add("gas", "Breath of Spider");
potions[2].Ingredients.Add("solid", "Hair of Toad");
potions[2].Ingredients.Add("gas", "Peacock's anguish");
potions[3].Ingredients.Add("liquid", "Peacock Sweat");
potions[3].Ingredients.Add("gas", "Newt's aura");
var predicate = Potion.ContainsIngredients("solid", "Newt", "Toad")
.Or(Potion.ContainsIngredients("gas", "Spider", "Scorpion"));
foreach (var result in
from p in potions
where(predicate).Compile()(p)
select p)
{
Console.WriteLine(result.Name);
}
} | 0 |
66,385 | 09/15/2008 20:04:52 | 6,199 | 09/12/2008 21:42:18 | 1 | 0 | Dynamic Database Schema | What is a recommended architecture for providing storage for a dynamic logical database schema?
To clarify: Where a system is required to provide storage for a model whose schema may be extended or altered by its users once in production, what are some good technologies, database models or storage engines that will allow this?
A few possibilities to illustrate:
* Creating/altering database objects via dynamically generated DML
* Creating tables with large numbers of sparse physical columns and using only those required for the 'overlaid' logical schema
* Creating a 'long, narrow' table that stores dynamic column values as rows that then need to be pivoted to create a 'short, wide' rowset containing all the values for a specific entity
* Using a BigTable/SimpleDB PropertyBag type system
Any answers based on real world experience would be greatly appreciated | sql | architecture | database-design | dynamicdata | null | null | open | Dynamic Database Schema
===
What is a recommended architecture for providing storage for a dynamic logical database schema?
To clarify: Where a system is required to provide storage for a model whose schema may be extended or altered by its users once in production, what are some good technologies, database models or storage engines that will allow this?
A few possibilities to illustrate:
* Creating/altering database objects via dynamically generated DML
* Creating tables with large numbers of sparse physical columns and using only those required for the 'overlaid' logical schema
* Creating a 'long, narrow' table that stores dynamic column values as rows that then need to be pivoted to create a 'short, wide' rowset containing all the values for a specific entity
* Using a BigTable/SimpleDB PropertyBag type system
Any answers based on real world experience would be greatly appreciated | 0 |
66,420 | 09/15/2008 20:07:21 | 9,587 | 09/15/2008 19:16:34 | 33 | 1 | How do you launch the javascript debugger in Google Chrome? | When using Google Chrome, I want to debug some javascript. How can I do that? | javascript | google-chrome | debugging | null | null | null | open | How do you launch the javascript debugger in Google Chrome?
===
When using Google Chrome, I want to debug some javascript. How can I do that? | 0 |
66,422 | 09/15/2008 20:07:32 | 9,750 | 09/15/2008 19:52:42 | 1 | 0 | How do I rotate an image at 12 midnight every day? | I need to rotate an image at 12 midnight every day from a group of 5-10 images. How can I go about doing this with javascript or jquery or even php? | js | rotate | null | null | null | null | open | How do I rotate an image at 12 midnight every day?
===
I need to rotate an image at 12 midnight every day from a group of 5-10 images. How can I go about doing this with javascript or jquery or even php? | 0 |
66,423 | 09/15/2008 20:07:32 | 4,257 | 09/02/2008 14:39:35 | 655 | 48 | Can a servlet determine if the data posted to it is enctype="multipart/form-data"? | I have a servlet that is used for many different actions, used in the [Front Controller pattern][1]. Does anyone know if it is possible to tell if the data posted back to it is enctype="multipart/form-data"? I can't read the request parameters until I decide this, so I can't dispatch the request to the proper controller.
Any ideas?
[1]: http://java.sun.com/blueprints/patterns/FrontController.html | java | servlets | frontcontroller | multipartform-data | null | null | open | Can a servlet determine if the data posted to it is enctype="multipart/form-data"?
===
I have a servlet that is used for many different actions, used in the [Front Controller pattern][1]. Does anyone know if it is possible to tell if the data posted back to it is enctype="multipart/form-data"? I can't read the request parameters until I decide this, so I can't dispatch the request to the proper controller.
Any ideas?
[1]: http://java.sun.com/blueprints/patterns/FrontController.html | 0 |
66,438 | 09/15/2008 20:08:47 | 9,771 | 09/15/2008 19:55:57 | 1 | 0 | j2me screen flicker when switching between canvases | I'm writing a mobile phone game using j2me. In this game, I am using multiple Canvas objects.
For example, the game menu is a Canvas object, and the actual game is a Canvas object too.
I've noticed that, on some devices, when I switch from one Canvas to another, e.g from the main menu to the game, the screen momentarily "flickers".
Is there anyway to avoid this? | java-me | null | null | null | null | null | open | j2me screen flicker when switching between canvases
===
I'm writing a mobile phone game using j2me. In this game, I am using multiple Canvas objects.
For example, the game menu is a Canvas object, and the actual game is a Canvas object too.
I've noticed that, on some devices, when I switch from one Canvas to another, e.g from the main menu to the game, the screen momentarily "flickers".
Is there anyway to avoid this? | 0 |
66,446 | 09/15/2008 20:09:44 | 9,843 | 09/15/2008 20:09:44 | 1 | 0 | What is the best OpenGL java binding? | I am trying to achieve better performance for my Java SWT application, and I just found out it is possible to use OpenGL in SWT. It seems there are more than one Java binding for OpenGL. Which one do you prefer?
Note that I have never used OpenGL before, and that the application needs to work on Windows, Linux and Mac OS X.
| java | gui | opengl | swt | performance | null | open | What is the best OpenGL java binding?
===
I am trying to achieve better performance for my Java SWT application, and I just found out it is possible to use OpenGL in SWT. It seems there are more than one Java binding for OpenGL. Which one do you prefer?
Note that I have never used OpenGL before, and that the application needs to work on Windows, Linux and Mac OS X.
| 0 |
66,452 | 09/15/2008 20:10:48 | 5,056 | 09/07/2008 15:43:17 | 904 | 66 | What kind of code overview documentation do you write? | As suggested, I have closed the question posed [here][1] and have broken it up into separate questions regarding code documentation to be posed throughout the day.
----------
This is the final question in the series.
- The first part: [How do you document
your methods?][2]
- The second part: [Are tests valid
documentation?][3]
This question has to do with what documentation overview do you provide of your system.
You've doc-commented your API, you've written the unit tests, now what kind of documentation do you provide to pull it all together? Is there only documentation from the point of view of the user or do you make an extra effort to provide maintanance programmers with an overview of the system's logic and control flow? Do you discuss why your program is structured the way it is and how far down that rabbit hole do you go?
Should this overview documentation be provided in a single document or broken down by the system's major components? Keeping in mind that the target audience are other programmers what is appropriate for length and tone? Do you mandate what concepts the programmer should be familiar with or is that being to bossy?
Do you write this documentation in a big bang at the end or as you go? If you do it as you go then how do you handle keeping it in sync with design changes?
What do you do for this important step and what do you like to see has been done when picking up someone else's project?
[1]: http://stackoverflow.com/questions/63297/how-do-you-do-documentation
[2]: http://stackoverflow.com/questions/63801/how-do-you-document-your-methods
[3]: http://stackoverflow.com/questions/64898/are-tests-valid-documentation | documentation | guidance | null | null | null | 03/16/2012 20:09:28 | off topic | What kind of code overview documentation do you write?
===
As suggested, I have closed the question posed [here][1] and have broken it up into separate questions regarding code documentation to be posed throughout the day.
----------
This is the final question in the series.
- The first part: [How do you document
your methods?][2]
- The second part: [Are tests valid
documentation?][3]
This question has to do with what documentation overview do you provide of your system.
You've doc-commented your API, you've written the unit tests, now what kind of documentation do you provide to pull it all together? Is there only documentation from the point of view of the user or do you make an extra effort to provide maintanance programmers with an overview of the system's logic and control flow? Do you discuss why your program is structured the way it is and how far down that rabbit hole do you go?
Should this overview documentation be provided in a single document or broken down by the system's major components? Keeping in mind that the target audience are other programmers what is appropriate for length and tone? Do you mandate what concepts the programmer should be familiar with or is that being to bossy?
Do you write this documentation in a big bang at the end or as you go? If you do it as you go then how do you handle keeping it in sync with design changes?
What do you do for this important step and what do you like to see has been done when picking up someone else's project?
[1]: http://stackoverflow.com/questions/63297/how-do-you-do-documentation
[2]: http://stackoverflow.com/questions/63801/how-do-you-document-your-methods
[3]: http://stackoverflow.com/questions/64898/are-tests-valid-documentation | 2 |
66,455 | 09/15/2008 20:10:56 | 391,806 | 09/15/2008 19:07:07 | 1 | 2 | Is there an easy way to change the behavior of a Java/Swing control when it gets focus? | For most GUI's I've used, when a control that contains text gets the focus, the entire contents of the control are selected. This means if you just start typing, you completely replace the former contents.
Example: You have spin control that is initialized with the value zero. You tab to it and type "1" The value in the control is now 1.
With Swing, this doesn't happen. The text in the control is not selected and the carat appears at one end or another of the existing text. Continuing the above example:
With a Swing JSpinner, when you tab to the spin control, the carat is at the left. You type "1" and the value in the control is now 10.
This drives me, (and my users) up a wall, and I'd like to change it. Even more important, I'd like to change it globally so the new behavior applies to JTextField, JPasswordField, JFormattedTextField, JTextArea, JComboBox, JSpinner, and so on. The only way I have found to do this to add a FocusAdapter to each control and override the focusGained() method to Do The Right Thing[tm].
There's gotta be an easier, and less fragile way. Please? | java | gui | swing | null | null | null | open | Is there an easy way to change the behavior of a Java/Swing control when it gets focus?
===
For most GUI's I've used, when a control that contains text gets the focus, the entire contents of the control are selected. This means if you just start typing, you completely replace the former contents.
Example: You have spin control that is initialized with the value zero. You tab to it and type "1" The value in the control is now 1.
With Swing, this doesn't happen. The text in the control is not selected and the carat appears at one end or another of the existing text. Continuing the above example:
With a Swing JSpinner, when you tab to the spin control, the carat is at the left. You type "1" and the value in the control is now 10.
This drives me, (and my users) up a wall, and I'd like to change it. Even more important, I'd like to change it globally so the new behavior applies to JTextField, JPasswordField, JFormattedTextField, JTextArea, JComboBox, JSpinner, and so on. The only way I have found to do this to add a FocusAdapter to each control and override the focusGained() method to Do The Right Thing[tm].
There's gotta be an easier, and less fragile way. Please? | 0 |
66,457 | 09/15/2008 20:11:02 | 8,763 | 09/15/2008 16:49:24 | 1 | 0 | How to convert GMT to LocalTime in Win32 C | I want to convert various location/date/times in history from GMT to local time. It seems that `SystemTimeToTzSpecificLocalTime` is better than `FileTimeToLocalFileTime`. When the date/time pairs also include various locations, the conversion gets hairy. I've found a data set at [ftp://elsie.nci.nih.gov/pub/][1] that seems to be nicely complete through history and space, but it appears to be designed to be compiled for one time zone instead of all of them.
Is there a nice C package that will solve the problem for me?
[1]: ftp://elsie.nci.nih.gov/pub/ | c | winapi | timezone | null | null | null | open | How to convert GMT to LocalTime in Win32 C
===
I want to convert various location/date/times in history from GMT to local time. It seems that `SystemTimeToTzSpecificLocalTime` is better than `FileTimeToLocalFileTime`. When the date/time pairs also include various locations, the conversion gets hairy. I've found a data set at [ftp://elsie.nci.nih.gov/pub/][1] that seems to be nicely complete through history and space, but it appears to be designed to be compiled for one time zone instead of all of them.
Is there a nice C package that will solve the problem for me?
[1]: ftp://elsie.nci.nih.gov/pub/ | 0 |
66,475 | 09/15/2008 20:12:57 | 9,857 | 09/15/2008 20:12:57 | 1 | 0 | How can I get Column number of the cursor in a TextBox in C#? | I've got a multiline textBox that I would like to have a label on the form displaying the current line and column position of, as Visual Studio does.
I know I can get the line # with GetLineFromCharIndex, but how can I get the column # on that line?
| c# | null | null | null | null | null | open | How can I get Column number of the cursor in a TextBox in C#?
===
I've got a multiline textBox that I would like to have a label on the form displaying the current line and column position of, as Visual Studio does.
I know I can get the line # with GetLineFromCharIndex, but how can I get the column # on that line?
| 0 |
66,479 | 09/15/2008 20:13:40 | 9,858 | 09/15/2008 20:13:40 | 1 | 0 | Unescaping angle-brackets through System.Xml.XmlWriter | I'm writing a string containing some XML via System.Xml.XmlWriter. I'm stuck using WriteString(), and from the documentation:
> WriteString does the following:
> The characters &, <, and > are replaced with &amp;, &lt;, and &gt;, respectively.
I'd like this to stop, but I can't seem to find any XmlWriterSettings properties to control this behavior. What are some workarounds? Thanks!
David | c# | .net | xml | null | null | null | open | Unescaping angle-brackets through System.Xml.XmlWriter
===
I'm writing a string containing some XML via System.Xml.XmlWriter. I'm stuck using WriteString(), and from the documentation:
> WriteString does the following:
> The characters &, <, and > are replaced with &amp;, &lt;, and &gt;, respectively.
I'd like this to stop, but I can't seem to find any XmlWriterSettings properties to control this behavior. What are some workarounds? Thanks!
David | 0 |
66,486 | 09/15/2008 20:14:39 | 9,058 | 09/15/2008 17:35:57 | 1 | 0 | How do I stub data for designers when using Expression Blend and Visual Studio? | We are trying out Visual Studio 2008 and Expression Blend on a new project. The goal is to clearly define the role of the developer and designer as separate, but reap the benefit of the developer being able to directly consume the XAML produced by the designer.
For the most part this has worked great, and I really like the possibilities. One difficulty we have come across though is designing against DataBindings. In many cases, the GUI does not populate rows, or other data structures unless the application is run, and a database call is made. Consequently the designer does not have access to the visual layout of the GUI.
What I would like to do, is somehow create some simple stubbed or mocked data that the designer can use to work on the design. The big goal is to have that stubbed data show up in Expression Blend, but then be applied to the real collection at runtime.
Has anyone found a solid method of doing this? | wpf | expression-blend | xaml | null | null | null | open | How do I stub data for designers when using Expression Blend and Visual Studio?
===
We are trying out Visual Studio 2008 and Expression Blend on a new project. The goal is to clearly define the role of the developer and designer as separate, but reap the benefit of the developer being able to directly consume the XAML produced by the designer.
For the most part this has worked great, and I really like the possibilities. One difficulty we have come across though is designing against DataBindings. In many cases, the GUI does not populate rows, or other data structures unless the application is run, and a database call is made. Consequently the designer does not have access to the visual layout of the GUI.
What I would like to do, is somehow create some simple stubbed or mocked data that the designer can use to work on the design. The big goal is to have that stubbed data show up in Expression Blend, but then be applied to the real collection at runtime.
Has anyone found a solid method of doing this? | 0 |
66,492 | 09/15/2008 20:15:13 | 6,842 | 09/15/2008 12:42:31 | 1 | 0 | Checking online status from an iphone web app | Is there a way to check to see if an iphone is online from a web app. That is, in mobile safari, can I check the online status of the device to see if I should try an ajax call or not.
In firefox, this would be
if(navigator.onLine) { onlineCode() }
| iphone | mobile-safari | javascript | null | null | null | open | Checking online status from an iphone web app
===
Is there a way to check to see if an iphone is online from a web app. That is, in mobile safari, can I check the online status of the device to see if I should try an ajax call or not.
In firefox, this would be
if(navigator.onLine) { onlineCode() }
| 0 |
66,504 | 09/15/2008 20:16:35 | 8,768 | 09/15/2008 16:50:17 | 1 | 0 | Java VNC Libraries | Are there any VNC Libraries for Java, I need to build a JSP/Servlet based VNC server, to allow user to share their desktops with helpdesk. I've seen jVNC, but i'd like to build it myself, for a University project. | java | vnc | null | null | null | null | open | Java VNC Libraries
===
Are there any VNC Libraries for Java, I need to build a JSP/Servlet based VNC server, to allow user to share their desktops with helpdesk. I've seen jVNC, but i'd like to build it myself, for a University project. | 0 |
66,505 | 09/15/2008 20:16:44 | 9,731 | 09/15/2008 19:48:46 | 1 | 3 | How to handle static fields that vary by implementing class | I hit this problem all the time. Suppose I am making a command line interface (Java or C#, the problem is the same I think, I will show C# here).
1. I define an interface ICommand
2. I create an abstract base class CommandBase which implements ICommand, to contain common code.
3. I create several implementation classes, each extending the base class (and by extension the interface).
Now - suppose that the interface specifies that all commands implement the Name property and the Execute method...
For Name each of my instance classes must return a string that is the name of that command. That string ("HELP", "PRINT" etc) is static to the class concerned. What I would love to be able to do is define:
public abstract static const string Name;
However (sadly) you cannot define static members in an interface.
I have struggled with this issue for years now (pretty much any place I have a family of similar classes) and so will post my own 3 possible solutions below for your votes. However since none of them is ideal I am hoping someone will post a more elegant solution.
| c# | java | null | null | null | null | open | How to handle static fields that vary by implementing class
===
I hit this problem all the time. Suppose I am making a command line interface (Java or C#, the problem is the same I think, I will show C# here).
1. I define an interface ICommand
2. I create an abstract base class CommandBase which implements ICommand, to contain common code.
3. I create several implementation classes, each extending the base class (and by extension the interface).
Now - suppose that the interface specifies that all commands implement the Name property and the Execute method...
For Name each of my instance classes must return a string that is the name of that command. That string ("HELP", "PRINT" etc) is static to the class concerned. What I would love to be able to do is define:
public abstract static const string Name;
However (sadly) you cannot define static members in an interface.
I have struggled with this issue for years now (pretty much any place I have a family of similar classes) and so will post my own 3 possible solutions below for your votes. However since none of them is ideal I am hoping someone will post a more elegant solution.
| 0 |
66,518 | 09/15/2008 20:17:52 | 2,490 | 08/22/2008 13:52:54 | 52 | 5 | Flip an Image horizontally | I need to flip an image so that a character faces in the right direction. This needs to be done "on the fly' as they say.
The issue I am having is that with Gif images, I seem to lose the transparency. (The background goes white)
Below is the code: (Alternatively someone could send me to a good example)
$img = imagecreatefromgif("./unit.gif");
$size_x = imagesx($img);
$size_y = imagesy($img);
$temp = imagecreatetruecolor($size_x, $size_y);
imagecolortransparent($img, imagecolorallocate($img, 0, 0, 0));
imagealphablending($img, false);
imagesavealpha($img, true);
$x = imagecopyresampled($temp, $img, 0, 0, ($size_x-1), 0, $size_x, $size_y, 0-$size_x, $size_y);
if ($x) {
$img = $temp;
}
else {
die("Unable to flip image");
}
header("Content-type: image/gif");
imagegif($img);
imagedestroy($img); | php | null | null | null | null | null | open | Flip an Image horizontally
===
I need to flip an image so that a character faces in the right direction. This needs to be done "on the fly' as they say.
The issue I am having is that with Gif images, I seem to lose the transparency. (The background goes white)
Below is the code: (Alternatively someone could send me to a good example)
$img = imagecreatefromgif("./unit.gif");
$size_x = imagesx($img);
$size_y = imagesy($img);
$temp = imagecreatetruecolor($size_x, $size_y);
imagecolortransparent($img, imagecolorallocate($img, 0, 0, 0));
imagealphablending($img, false);
imagesavealpha($img, true);
$x = imagecopyresampled($temp, $img, 0, 0, ($size_x-1), 0, $size_x, $size_y, 0-$size_x, $size_y);
if ($x) {
$img = $temp;
}
else {
die("Unable to flip image");
}
header("Content-type: image/gif");
imagegif($img);
imagedestroy($img); | 0 |
66,525 | 09/15/2008 20:18:31 | 2,995 | 08/26/2008 10:48:14 | 168 | 20 | Does anybody know how to correctly install ANTLR to work with .Net? | The full ANTLR jar is meant to have some embedded Visual Studio solution within it but I can't find it. Hoping someone out there has already overcome this issue. | antlr | null | null | null | null | null | open | Does anybody know how to correctly install ANTLR to work with .Net?
===
The full ANTLR jar is meant to have some embedded Visual Studio solution within it but I can't find it. Hoping someone out there has already overcome this issue. | 0 |
66,542 | 09/15/2008 20:20:18 | 9,615 | 09/15/2008 19:22:01 | 1 | 0 | How do I run Oracle plsql procedure from Lisp? | How do I get started? | lisp | plsql | null | null | null | null | open | How do I run Oracle plsql procedure from Lisp?
===
How do I get started? | 0 |
66,544 | 09/15/2008 20:20:27 | 7,988 | 09/15/2008 14:51:18 | 1 | 0 | what is the easiest way to lookup function names of a c binary in a cross-platform manner? | I want to write a small utility to call arbitrary functions from a C shared library. User should be able to list all the exported functions similar to what objdump or nm does. I checked these utilities' source but they are intimidating. Couldn't find enough information on google, if dl library has this functionality either. | c | symbols | null | null | null | null | open | what is the easiest way to lookup function names of a c binary in a cross-platform manner?
===
I want to write a small utility to call arbitrary functions from a C shared library. User should be able to list all the exported functions similar to what objdump or nm does. I checked these utilities' source but they are intimidating. Couldn't find enough information on google, if dl library has this functionality either. | 0 |
66,594 | 09/15/2008 20:26:26 | 1,145 | 08/12/2008 19:03:34 | 41 | 4 | Installation of demo project - best practices | Using Windows Installer (targeting XP and Vista), is there a best practice for installing demo projects and files with your application? | installation | windows-installer | null | null | null | null | open | Installation of demo project - best practices
===
Using Windows Installer (targeting XP and Vista), is there a best practice for installing demo projects and files with your application? | 0 |
66,606 | 09/15/2008 20:27:54 | 339 | 08/04/2008 18:45:47 | 21 | 2 | What package includes AB the Apache Server Benchmarking Tool in Ubuntu | I'm trying to find [ab - Apache HTTP server benchmarking tool][1] for Ubuntu, I'm hoping there's a package I can install for it. I decided I need to do some simple load testing on my applications.
[1]: http://httpd.apache.org/docs/2.0/programs/ab.html | linux | apache | ubuntu | null | null | 12/06/2011 17:05:03 | off topic | What package includes AB the Apache Server Benchmarking Tool in Ubuntu
===
I'm trying to find [ab - Apache HTTP server benchmarking tool][1] for Ubuntu, I'm hoping there's a package I can install for it. I decided I need to do some simple load testing on my applications.
[1]: http://httpd.apache.org/docs/2.0/programs/ab.html | 2 |
66,610 | 09/15/2008 20:28:08 | 3,741 | 08/30/2008 14:00:21 | 11 | 1 | How can I create a site in php and have it generate a static version? | For a particular project I have, no server side code is allowed. How can I create the web site in php (with includes, conditionals, etc) and then have that converted into a static html site that I can give to the client? | php | html | null | null | null | null | open | How can I create a site in php and have it generate a static version?
===
For a particular project I have, no server side code is allowed. How can I create the web site in php (with includes, conditionals, etc) and then have that converted into a static html site that I can give to the client? | 0 |
66,622 | 09/15/2008 20:29:54 | 3,263 | 08/27/2008 15:33:09 | 227 | 14 | Threadsafe foreach enumeration of lists | I need to enumerate though generic IList<> of objects. The contents of the list may change, as in being added or removed by other threads, and this will kill my enumeration with a "Collection was modified; enumeration operation may not execute."
What is a good way of doing threadsafe foreach on a IList<>? prefferably without cloning the entire list. It is not possible to clone the actual objects referenced by the list. | c# | multithreading | null | null | null | null | open | Threadsafe foreach enumeration of lists
===
I need to enumerate though generic IList<> of objects. The contents of the list may change, as in being added or removed by other threads, and this will kill my enumeration with a "Collection was modified; enumeration operation may not execute."
What is a good way of doing threadsafe foreach on a IList<>? prefferably without cloning the entire list. It is not possible to clone the actual objects referenced by the list. | 0 |
66,635 | 09/15/2008 20:31:28 | 9,938 | 09/15/2008 20:31:28 | 83 | 0 | Namespaces in C# | I'm using an ASP.NET MVC project and everytime I add a class to a folder it makes really long namespaces.
Example:
Project = Tully.Saps.Data
Folder = DataAccess/Interfaces
Namespace = Tully.Saps.Data.DataAccess.Interfaces
Folder = DataAccess/MbNetRepositories
Namespace = Tully.Saps.Data.DataAccess.MbNetRepositories
Question:
Is it best to leave the namespace alone and add the using clause to the classes that access it or change the namespace to Tully.Saps.Data for everything in this project?
| c# | null | null | null | null | null | open | Namespaces in C#
===
I'm using an ASP.NET MVC project and everytime I add a class to a folder it makes really long namespaces.
Example:
Project = Tully.Saps.Data
Folder = DataAccess/Interfaces
Namespace = Tully.Saps.Data.DataAccess.Interfaces
Folder = DataAccess/MbNetRepositories
Namespace = Tully.Saps.Data.DataAccess.MbNetRepositories
Question:
Is it best to leave the namespace alone and add the using clause to the classes that access it or change the namespace to Tully.Saps.Data for everything in this project?
| 0 |
66,636 | 09/15/2008 20:31:33 | 9,940 | 09/15/2008 20:31:33 | 1 | 0 | Decorating a parent class method | Not sure if what I want to accomplish is even possible, but I'd like to make a child class have a method of the parent class be a 'classmethod' even though the method in the parent class is not. Essentiall I'm trying to accomplish the following:
class foo(Object):
def meth1(self,val):
self.value=val
class bar(foo):
meth1=classmethod(foo.meth1)
| python | oop | null | null | null | null | open | Decorating a parent class method
===
Not sure if what I want to accomplish is even possible, but I'd like to make a child class have a method of the parent class be a 'classmethod' even though the method in the parent class is not. Essentiall I'm trying to accomplish the following:
class foo(Object):
def meth1(self,val):
self.value=val
class bar(foo):
meth1=classmethod(foo.meth1)
| 0 |
66,643 | 09/15/2008 20:31:53 | 5,963 | 09/11/2008 19:40:07 | 81 | 7 | Fail fast finally clause in Java | Is there a way to detect, from within the finally clause, that an exception is in the process of being thrown?
ie:
<pre><code>
try {
// code that may or may not throw an exception
} finally {
SomeCleanupFunctionThatThrows();
// if currently executing an exception, exit the program,
// otherwise just let the exception thrown by the function
// above propagate
}
</code></pre>
or is ignoring one of the exceptions the only thing you can do. In C++ it doesn't even let you ignore one of the exceptions and just calls terminate(). Most other languages use the same rules as java. | java | exception | fault-tolerance | null | null | null | open | Fail fast finally clause in Java
===
Is there a way to detect, from within the finally clause, that an exception is in the process of being thrown?
ie:
<pre><code>
try {
// code that may or may not throw an exception
} finally {
SomeCleanupFunctionThatThrows();
// if currently executing an exception, exit the program,
// otherwise just let the exception thrown by the function
// above propagate
}
</code></pre>
or is ignoring one of the exceptions the only thing you can do. In C++ it doesn't even let you ignore one of the exceptions and just calls terminate(). Most other languages use the same rules as java. | 0 |
66,654 | 09/15/2008 20:33:09 | 3,830 | 08/31/2008 05:08:21 | 67 | 5 | Setting movie metadata with QTKit | I'm trying to convert old QuickTime framework code to the 64-bit Cocoa-based QTKit on OS X, which means that I can't drop down to the straight C function calls at any time. Specifically, I'm trying to find a way to write QuickTime VR movies with QTKit, as they require some special metadata to set the display controller. How can I do this with QTKit? | osx | objectivec | quicktime | qtkit | null | null | open | Setting movie metadata with QTKit
===
I'm trying to convert old QuickTime framework code to the 64-bit Cocoa-based QTKit on OS X, which means that I can't drop down to the straight C function calls at any time. Specifically, I'm trying to find a way to write QuickTime VR movies with QTKit, as they require some special metadata to set the display controller. How can I do this with QTKit? | 0 |
66,668 | 09/15/2008 20:34:40 | 9,955 | 09/15/2008 20:34:40 | 1 | 0 | Problem with unicode String literal in unit test | I have a JUnit test that tests adding Strings to a Dictionary custom type. Everything works fine for everyone else on a Linux/Windows machine, however, being the first dev in my shop on a mac, this unit test fails for me. The offending lines are where unicode string literals are used:
dict.add( "Su字/会意pin", "Su字/会意pin" );
dict.add( "字/会意", "字/会意" );
Is there a platform-independent way to specify the unicode string? I've tried changing the encoding of the file in Eclipse to UTF-8 instead of the default MacRoman, but the test still fails. | java | osx | unicode | encoding | null | null | open | Problem with unicode String literal in unit test
===
I have a JUnit test that tests adding Strings to a Dictionary custom type. Everything works fine for everyone else on a Linux/Windows machine, however, being the first dev in my shop on a mac, this unit test fails for me. The offending lines are where unicode string literals are used:
dict.add( "Su字/会意pin", "Su字/会意pin" );
dict.add( "字/会意", "字/会意" );
Is there a platform-independent way to specify the unicode string? I've tried changing the encoding of the file in Eclipse to UTF-8 instead of the default MacRoman, but the test still fails. | 0 |
66,671 | 09/15/2008 20:34:53 | 7,853 | 09/15/2008 14:32:48 | 11 | 1 | Any recommendations for deployment from SVN, with version numbers written into my code automagically? | I've gotten comfy with SVN, and now I need a way to deploy my code to staging or live servers more easily. I'd also like some method for putting build info in the footer of this site to aid in testing. Site is PHP/MySQL. | php | version-control | web-deployment-project | null | null | null | open | Any recommendations for deployment from SVN, with version numbers written into my code automagically?
===
I've gotten comfy with SVN, and now I need a way to deploy my code to staging or live servers more easily. I'd also like some method for putting build info in the footer of this site to aid in testing. Site is PHP/MySQL. | 0 |
66,677 | 09/15/2008 20:35:17 | 6,436 | 09/15/2008 09:56:43 | 140 | 19 | Simple/lightweight alternative to GNU Mailman? | I'm looking for a dead simple mailing list (unix friendly). Robustness, fine-grained configurability, "enterprise-readiness" (whatever that means) are not requirements. I just need to setup a tiny mailing list for a few friends. Rather than hack something up myself, I was wondering if anybody knows of anything already out there with a similar goal?
I should note right now that I **don't** want an externally hosted mailing list-- it needs to be software I can install and run on my server. I know of many places I can host a mailing list at (Google/Yahoo groups), but it would be nice to keep the data local. | mailinglist | mailman | null | null | null | null | open | Simple/lightweight alternative to GNU Mailman?
===
I'm looking for a dead simple mailing list (unix friendly). Robustness, fine-grained configurability, "enterprise-readiness" (whatever that means) are not requirements. I just need to setup a tiny mailing list for a few friends. Rather than hack something up myself, I was wondering if anybody knows of anything already out there with a similar goal?
I should note right now that I **don't** want an externally hosted mailing list-- it needs to be software I can install and run on my server. I know of many places I can host a mailing list at (Google/Yahoo groups), but it would be nice to keep the data local. | 0 |
66,687 | 09/15/2008 20:35:48 | 5,640 | 09/10/2008 15:33:37 | 1,029 | 77 | Any successful profibus communications from .NET? | Has anyone successfully talked [profibus][1] from a .NET application?
If you did, what device/card did you use to accomplish this, what was the application, and did you use any kind of preexisting or available code?
[1]: http://www.profibus.com/ | communication | plc | industrial | null | null | null | open | Any successful profibus communications from .NET?
===
Has anyone successfully talked [profibus][1] from a .NET application?
If you did, what device/card did you use to accomplish this, what was the application, and did you use any kind of preexisting or available code?
[1]: http://www.profibus.com/ | 0 |
66,720 | 09/15/2008 20:40:30 | 3,957 | 09/01/2008 02:50:44 | 260 | 18 | Are there any tools to visualize an OWL ontology? (please include a screenshot) | I'm looking for a tool that will render on OWL ontology in a reasonably useful graphic format. The primary purpose of the graphic format being inclusion into a PowerPoint slide or printing on a large plotter for management review.
I am currently using TopBraid Composer which does a reasonably well at visualizing a single class but doesn't seem to have a clear way of visualizing the entire ontology (as a whole).
Anyone know of any good solutions to this problem?
![TopBraid Composer Graph view screenshot][1]
[1]: http://i37.tinypic.com/2gufbz9.jpg | semantic | ontology | owl | null | null | null | open | Are there any tools to visualize an OWL ontology? (please include a screenshot)
===
I'm looking for a tool that will render on OWL ontology in a reasonably useful graphic format. The primary purpose of the graphic format being inclusion into a PowerPoint slide or printing on a large plotter for management review.
I am currently using TopBraid Composer which does a reasonably well at visualizing a single class but doesn't seem to have a clear way of visualizing the entire ontology (as a whole).
Anyone know of any good solutions to this problem?
![TopBraid Composer Graph view screenshot][1]
[1]: http://i37.tinypic.com/2gufbz9.jpg | 0 |
66,722 | 09/15/2008 20:40:41 | 9,961 | 09/15/2008 20:37:20 | 1 | 0 | Best library for computervision in C/C++? | What libraries do I have to pick from when working with Computer Vision in C/C++?
I realize that Google has a lot of good results, but maybe there's great libraries out there that it missed. | c++ | c | computervision | null | null | 10/05/2011 13:31:33 | not constructive | Best library for computervision in C/C++?
===
What libraries do I have to pick from when working with Computer Vision in C/C++?
I realize that Google has a lot of good results, but maybe there's great libraries out there that it missed. | 4 |
66,727 | 09/15/2008 20:41:28 | 4,668 | 09/05/2008 04:08:05 | 245 | 9 | Parsing HTML-like Documents with PHP | I have a bunch of legacy documents that are HTML-like. As in, they look like HTML, but have additional made up tags that aren't a part of HTML
<strong>This is an example of a <pseud-template>fake tag</pseud-template></strong>
I need to parse these files. PHP is the only only tool available. The documents don't come close to being well formed XML.
My original thought was to use the loadHTML methods on PHPs DOMDocument. However, these methods choke on the make up HTML tags, and will refuse to parse the string/file.
$oDom = new DomDocument();
$oDom->loadHTML("<strong>This is an example of a <pseud-template>fake tag</pseud-template></strong>");
//gives us
DOMDocument::loadHTML() [function.loadHTML]: Tag pseud-template invalid in Entity, line: 1 occured in ....
The only solution I've been able to come up with is to pre-process the files with string replacement functions that will remove the invalid tags and replace them with a valid HTML tag (maybe a span with an id of the tag name).
Is there a more elegant solution? A way to let DOMDocument know about additional tags to consider as valid? Is there a different, robust HTML parsing class/object out there for PHP?
(if it's not obvious, I don't consider regular expressions a valid solution here) | php | html | parsing | null | null | null | open | Parsing HTML-like Documents with PHP
===
I have a bunch of legacy documents that are HTML-like. As in, they look like HTML, but have additional made up tags that aren't a part of HTML
<strong>This is an example of a <pseud-template>fake tag</pseud-template></strong>
I need to parse these files. PHP is the only only tool available. The documents don't come close to being well formed XML.
My original thought was to use the loadHTML methods on PHPs DOMDocument. However, these methods choke on the make up HTML tags, and will refuse to parse the string/file.
$oDom = new DomDocument();
$oDom->loadHTML("<strong>This is an example of a <pseud-template>fake tag</pseud-template></strong>");
//gives us
DOMDocument::loadHTML() [function.loadHTML]: Tag pseud-template invalid in Entity, line: 1 occured in ....
The only solution I've been able to come up with is to pre-process the files with string replacement functions that will remove the invalid tags and replace them with a valid HTML tag (maybe a span with an id of the tag name).
Is there a more elegant solution? A way to let DOMDocument know about additional tags to consider as valid? Is there a different, robust HTML parsing class/object out there for PHP?
(if it's not obvious, I don't consider regular expressions a valid solution here) | 0 |
66,728 | 09/15/2008 20:41:33 | 9,950 | 09/15/2008 20:33:58 | 1 | 0 | Installing Svn 1.5.x on Debian Etch - Best approach? | (a little off topic - although SVN is a key programming tool....)
**How do you install svn 1.5 on debian etch?** The svn 1.5 packages available for etch are 1.4 and I really need the cool new merge tracking feature in svn1.5 (according to CollabNet its as good as ClearCase...an interesting statement in oh so many ways). So, what's the least painful way to go?
My options are:
- build it from source
- create my own debian package
- upgrade to a test version of Lenny
- find someone else's svn 1.5 package
Which one have you chosen or which do you think has the least amount of suffering? | svn | debian | version-control | null | null | null | open | Installing Svn 1.5.x on Debian Etch - Best approach?
===
(a little off topic - although SVN is a key programming tool....)
**How do you install svn 1.5 on debian etch?** The svn 1.5 packages available for etch are 1.4 and I really need the cool new merge tracking feature in svn1.5 (according to CollabNet its as good as ClearCase...an interesting statement in oh so many ways). So, what's the least painful way to go?
My options are:
- build it from source
- create my own debian package
- upgrade to a test version of Lenny
- find someone else's svn 1.5 package
Which one have you chosen or which do you think has the least amount of suffering? | 0 |
66,730 | 09/15/2008 20:41:58 | 8,453 | 09/15/2008 16:04:01 | 1 | 0 | How do I create a new signal in pygtk | I've created a python object, but I want to send signals on it. I made it inherit from gobject.GObject, but there doesn't seem to be any way to create a new signal on my object. | python | gobject | gtk+ | null | null | null | open | How do I create a new signal in pygtk
===
I've created a python object, but I want to send signals on it. I made it inherit from gobject.GObject, but there doesn't seem to be any way to create a new signal on my object. | 0 |
66,731 | 09/15/2008 20:42:04 | 7,300 | 09/15/2008 13:29:31 | 1 | 2 | Unhandled Exception Logging for Winforms | Is there anything like [elmah][1] for Winforms? I'm looking for a standard way to process unhandled exceptions and grab a screenshot and other environment information before packaging that up for support.
[1]: http://code.google.com/p/elmah/ | .net | winforms | exception | logging | null | null | open | Unhandled Exception Logging for Winforms
===
Is there anything like [elmah][1] for Winforms? I'm looking for a standard way to process unhandled exceptions and grab a screenshot and other environment information before packaging that up for support.
[1]: http://code.google.com/p/elmah/ | 0 |
66,743 | 09/15/2008 20:43:25 | 7,093 | 09/15/2008 13:09:49 | 76 | 9 | IMAP4 server for .NET | Are there any free (non-GPL) libraries for .NET that provide IMAP4 server side functionality?
E.g. handles the socket level and message handshaking so that an IMAP4 client (such as outlook) can retrieve, read, edit and/or delete messages.
I am not trying to connect to an IMAP4 server, I'd like the assistance to implement one. | .net | imap4 | null | null | null | null | open | IMAP4 server for .NET
===
Are there any free (non-GPL) libraries for .NET that provide IMAP4 server side functionality?
E.g. handles the socket level and message handshaking so that an IMAP4 client (such as outlook) can retrieve, read, edit and/or delete messages.
I am not trying to connect to an IMAP4 server, I'd like the assistance to implement one. | 0 |
66,750 | 09/15/2008 20:44:02 | 9,661 | 09/15/2008 19:30:38 | 1 | 0 | How to control the capitalization of month and day names returned by DateFormat? | Here is a quick test program:
public static void main( String[] args )
{
Date date = Calendar.getInstance().getTime();
System.out.println("Months:");
printDate( "MMMM", "en", date );
printDate( "MMMM", "es", date );
printDate( "MMMM", "fr", date );
printDate( "MMMM", "de", date );
System.out.println("Days:");
printDate( "EEEE", "en", date );
printDate( "EEEE", "es", date );
printDate( "EEEE", "fr", date );
printDate( "EEEE", "de", date );
}
public static void printDate( String format, String locale, Date date )
{
System.out.println( locale + ": " + (new SimpleDateFormat( format, new Locale( locale ) )).format( date ) );
}
The output is:
<code>
Months:
en: September
es: septiembre
fr: septembre
de: September
Days:
en: Monday
es: lunes
fr: lundi
de: Montag</code>
How can I control the capitalization of the names. For some reason the Spanish and French always seem to return names that start with a lowercase letter. | java | internationalization | date | null | null | null | open | How to control the capitalization of month and day names returned by DateFormat?
===
Here is a quick test program:
public static void main( String[] args )
{
Date date = Calendar.getInstance().getTime();
System.out.println("Months:");
printDate( "MMMM", "en", date );
printDate( "MMMM", "es", date );
printDate( "MMMM", "fr", date );
printDate( "MMMM", "de", date );
System.out.println("Days:");
printDate( "EEEE", "en", date );
printDate( "EEEE", "es", date );
printDate( "EEEE", "fr", date );
printDate( "EEEE", "de", date );
}
public static void printDate( String format, String locale, Date date )
{
System.out.println( locale + ": " + (new SimpleDateFormat( format, new Locale( locale ) )).format( date ) );
}
The output is:
<code>
Months:
en: September
es: septiembre
fr: septembre
de: September
Days:
en: Monday
es: lunes
fr: lundi
de: Montag</code>
How can I control the capitalization of the names. For some reason the Spanish and French always seem to return names that start with a lowercase letter. | 0 |
66,759 | 09/15/2008 20:45:11 | 6,143 | 09/12/2008 16:01:15 | 61 | 6 | Are there any advantages compiling for the 3.5 .net framework instead of 2.0? | For example less memory consumption, faster startup, better performance...
Personally I don't think so however, I may have missed something.
| .net | frameworks | null | null | null | null | open | Are there any advantages compiling for the 3.5 .net framework instead of 2.0?
===
For example less memory consumption, faster startup, better performance...
Personally I don't think so however, I may have missed something.
| 0 |
66,767 | 09/15/2008 20:45:41 | 9,943 | 09/15/2008 20:32:03 | 1 | 0 | Java Servlet 404 errors | What culprits are the most likely to cause a `404 resource not found` error when a page in a given .WAR, autocreated by Sun's J2EE `deploytool`, is trying to load a Servlet in the same .WAR file?
<br/>
Eg:
> <style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 404 - /MyServlet/MyServlet</h1><HR size="1" noshade><p><b>type</b> Status report</p><p><b>message</b> <u>/MyServlet/MyServlet</u></p><p><b>description</b> <u>The requested resource (/MyServlet/MyServlet) is not available.</u></p>
<hr>
Related: Of these, how many would you expect to be server specific? eg: <i>Sun Java Application Server </i> vs <i>Tomcat & Catalina </i>?
| java | web-applications | java-ee | servlets | null | null | open | Java Servlet 404 errors
===
What culprits are the most likely to cause a `404 resource not found` error when a page in a given .WAR, autocreated by Sun's J2EE `deploytool`, is trying to load a Servlet in the same .WAR file?
<br/>
Eg:
> <style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 404 - /MyServlet/MyServlet</h1><HR size="1" noshade><p><b>type</b> Status report</p><p><b>message</b> <u>/MyServlet/MyServlet</u></p><p><b>description</b> <u>The requested resource (/MyServlet/MyServlet) is not available.</u></p>
<hr>
Related: Of these, how many would you expect to be server specific? eg: <i>Sun Java Application Server </i> vs <i>Tomcat & Catalina </i>?
| 0 |
66,770 | 09/15/2008 20:46:06 | 8,344 | 09/15/2008 15:45:08 | 41 | 4 | Why is RSpec so slow? | Whenever I run rspec tests it takes forever and a day of overhead before it actually starts running tests. Why is rspec so slow? Is there a way to speed up its initial load? | ruby | ruby-on-rails | rspec | rubyonrails | null | null | open | Why is RSpec so slow?
===
Whenever I run rspec tests it takes forever and a day of overhead before it actually starts running tests. Why is rspec so slow? Is there a way to speed up its initial load? | 0 |
66,773 | 09/15/2008 20:46:23 | 747 | 08/08/2008 14:15:00 | 1 | 0 | Add a linebreak in an HTML text area | How can i add a line break to the text area in a html page?
i use VB.net for server side coding. | html | vb.net | null | null | null | null | open | Add a linebreak in an HTML text area
===
How can i add a line break to the text area in a html page?
i use VB.net for server side coding. | 0 |
66,776 | 09/15/2008 20:46:31 | 5,640 | 09/10/2008 15:33:37 | 1,039 | 77 | OPC in .NET | Where is a good place to start with making an application in .NET that communicates through [OPC][1]?
[1]: http://www.opcfoundation.org/Default.aspx/01_about/01_whatis.asp | automation | communication | ole | plc | industrial | null | open | OPC in .NET
===
Where is a good place to start with making an application in .NET that communicates through [OPC][1]?
[1]: http://www.opcfoundation.org/Default.aspx/01_about/01_whatis.asp | 0 |
66,800 | 09/15/2008 20:49:05 | 9,593 | 09/15/2008 19:17:26 | 18 | 1 | Promising alternatives to make? | I've been using make and makefiles for many many years, and although the concept
is sound, the implementation has something to be desired.
Has anyone found any good alternatives to make that don't overcomplicate
the problem? | build-automation | make | null | null | null | null | open | Promising alternatives to make?
===
I've been using make and makefiles for many many years, and although the concept
is sound, the implementation has something to be desired.
Has anyone found any good alternatives to make that don't overcomplicate
the problem? | 0 |
66,810 | 09/15/2008 20:49:59 | 9,986 | 09/15/2008 20:42:14 | 1 | 0 | Custom style with Qt | Has anybody experience in building a custom style in Qt? What I have in my mind is a complete new style that affects all kind of widgets. I have seen some examples in the web for a custom combo box. But I have no idea how much time and code it takes to build a "complete" new custom style ... maybe someone can give me a hint. | qt | custom | style | null | null | null | open | Custom style with Qt
===
Has anybody experience in building a custom style in Qt? What I have in my mind is a complete new style that affects all kind of widgets. I have seen some examples in the web for a custom combo box. But I have no idea how much time and code it takes to build a "complete" new custom style ... maybe someone can give me a hint. | 0 |
66,819 | 09/15/2008 20:50:38 | 9,777 | 09/15/2008 19:56:37 | 1 | 1 | Best way to represent a parameterized enum in C#? | Are there any good solutions to represent a parameterized enum in C# 3.0? I am looking for something like [OCaml][1] or [haXe][2] has. I can only think of class hierarchy with a simple enum field for easy switching for now, maybe there are better ideas?
[1]: http://www.ocaml.org
[2]: http://www.haxe.org | c# | enums | ocaml | null | null | null | open | Best way to represent a parameterized enum in C#?
===
Are there any good solutions to represent a parameterized enum in C# 3.0? I am looking for something like [OCaml][1] or [haXe][2] has. I can only think of class hierarchy with a simple enum field for easy switching for now, maybe there are better ideas?
[1]: http://www.ocaml.org
[2]: http://www.haxe.org | 0 |
66,837 | 09/15/2008 20:52:14 | 208 | 08/03/2008 13:52:08 | 33 | 1 | Javascript CDATA Tags | Are CDATA tags ever necessary in script tags and if so when?
In other words, when and where is this:
<script type="text/javascript">
//<![CDATA[
...code...
//]]>
</script>
preferable to this:
<script type="text/javascript">
...code...
</script> | javascript | standards | null | null | null | null | open | Javascript CDATA Tags
===
Are CDATA tags ever necessary in script tags and if so when?
In other words, when and where is this:
<script type="text/javascript">
//<![CDATA[
...code...
//]]>
</script>
preferable to this:
<script type="text/javascript">
...code...
</script> | 0 |
66,840 | 09/15/2008 20:52:23 | 1,992 | 08/19/2008 18:04:16 | 579 | 22 | Integration of JavaScript and JMS | Where can I find a guide for integrating JavaScript and JMS (Java Messaging Service)?
I would like a best practice or established technology that allows me to directly or indirectly receive messages from a topic and update a site based on the message. I was thinking of creating two components, a servlet for the Web module, and an MDB (Message-Driven Bean) for the EJB module. The web client will comsume messages from the JMS topic, and the MDB will handle the onMessage.
Does this sound correct? Have you seen any examples? | javascript | jms | activemq | java | ejb | null | open | Integration of JavaScript and JMS
===
Where can I find a guide for integrating JavaScript and JMS (Java Messaging Service)?
I would like a best practice or established technology that allows me to directly or indirectly receive messages from a topic and update a site based on the message. I was thinking of creating two components, a servlet for the Web module, and an MDB (Message-Driven Bean) for the EJB module. The web client will comsume messages from the JMS topic, and the MDB will handle the onMessage.
Does this sound correct? Have you seen any examples? | 0 |
66,870 | 09/15/2008 20:55:36 | 9,947 | 09/15/2008 20:32:53 | 1 | 0 | How do I run a program as nobody? | I want a user-privileged (not root) process to launch new processes as user "nobody". I've tried a straight call to setuid that fails with -1 EPERM on Ubuntu 8.04:
#include <sys/types.h>
#include <unistd.h>
int main() {
setuid(65534);
while (1);
return 0;
}
How should I do this instead? | c | linux | security | ubuntu | null | null | open | How do I run a program as nobody?
===
I want a user-privileged (not root) process to launch new processes as user "nobody". I've tried a straight call to setuid that fails with -1 EPERM on Ubuntu 8.04:
#include <sys/types.h>
#include <unistd.h>
int main() {
setuid(65534);
while (1);
return 0;
}
How should I do this instead? | 0 |
66,880 | 09/15/2008 20:56:32 | 5,314 | 09/09/2008 02:04:53 | 360 | 38 | How to test credit card interactions? | After reading [this answer][1], I wonder if there's a way to get a "testing" credit card number. One that you can experiment with but that doesn't actually charge anything.
[1]: http://stackoverflow.com/questions/63668/confessions-of-your-worst-wtf-moment-what-not-to-do#63730 | testing | credit-card | null | null | null | null | open | How to test credit card interactions?
===
After reading [this answer][1], I wonder if there's a way to get a "testing" credit card number. One that you can experiment with but that doesn't actually charge anything.
[1]: http://stackoverflow.com/questions/63668/confessions-of-your-worst-wtf-moment-what-not-to-do#63730 | 0 |
10,827,404 | 05/31/2012 04:20:41 | 1,419,112 | 05/26/2012 14:25:35 | 1 | 0 | Index out of range exception error | Am using some calculation in my sql query..how can i use that calculated field in my c#,
Am getting the above error,
My query is;
Select OwnerCompanyLog.olog_name,inlt_companyid,inlt_childcompid,inlt_effectinterest,inlt_percent,inlt_sharetype,inlt_shares,inlt_childbase,inlt_effdate,
(inlt_percent * inlt_effectinterest)/100)eff
from InterestLogTable
INNER JOIN OwnerCompanyLog
ON
InterestLogTable.inlt_childcompid = OwnerCompanyLog.olog_companyid
where inlt_companyid=5
Order By inlt_childcompid
I want to use this column (inlt_percent * inlt_effectinterest)/100)effin my c# as
ParentCompany.Effect = parentCompanyReader["eff"].ToString();
But i got the above error. | sql-server | null | null | null | null | null | open | Index out of range exception error
===
Am using some calculation in my sql query..how can i use that calculated field in my c#,
Am getting the above error,
My query is;
Select OwnerCompanyLog.olog_name,inlt_companyid,inlt_childcompid,inlt_effectinterest,inlt_percent,inlt_sharetype,inlt_shares,inlt_childbase,inlt_effdate,
(inlt_percent * inlt_effectinterest)/100)eff
from InterestLogTable
INNER JOIN OwnerCompanyLog
ON
InterestLogTable.inlt_childcompid = OwnerCompanyLog.olog_companyid
where inlt_companyid=5
Order By inlt_childcompid
I want to use this column (inlt_percent * inlt_effectinterest)/100)effin my c# as
ParentCompany.Effect = parentCompanyReader["eff"].ToString();
But i got the above error. | 0 |
10,827,498 | 05/31/2012 04:34:59 | 968,312 | 09/28/2011 04:09:11 | 1,042 | 52 | Updates to Wordpress theme template/stylesheet are not reflected when a file is edited | I am developing a theme in Wordpress. I have an issue where updates to my stylesheet (style.css) are not being reflected in the browser after FTPing a new version of the file to the server. Edits will only show up in the browser after waiting a long time, (15+ minutes). I have tried all the things mentioned [here][1], which have not worked. These include:
- Making sure no caching plugins are installed in Wordpress
- Clearing the browser cache
- Trying from a different browser
- Making sure I am editing and accessing the correct file
- Checking webhost configuration panel for a caching plugin
[1]: http://codex.wordpress.org/I_Make_Changes_and_Nothing_Happens
Something seems to be caching the stylesheet but I'm not sure how this might be so. | wordpress | caching | varnish | null | null | null | open | Updates to Wordpress theme template/stylesheet are not reflected when a file is edited
===
I am developing a theme in Wordpress. I have an issue where updates to my stylesheet (style.css) are not being reflected in the browser after FTPing a new version of the file to the server. Edits will only show up in the browser after waiting a long time, (15+ minutes). I have tried all the things mentioned [here][1], which have not worked. These include:
- Making sure no caching plugins are installed in Wordpress
- Clearing the browser cache
- Trying from a different browser
- Making sure I am editing and accessing the correct file
- Checking webhost configuration panel for a caching plugin
[1]: http://codex.wordpress.org/I_Make_Changes_and_Nothing_Happens
Something seems to be caching the stylesheet but I'm not sure how this might be so. | 0 |
10,827,507 | 05/31/2012 04:35:35 | 1,377,949 | 05/06/2012 11:07:59 | 14 | 0 | Is there an SQL-like feature in Google Apps Script? | Is it possible to connect to Google Spreadsheet in GAS using SQL-type queries? If so, any working samples?
Thanks. | google-spreadsheet | google-apps-script | google-spreadsheet-api | null | null | null | open | Is there an SQL-like feature in Google Apps Script?
===
Is it possible to connect to Google Spreadsheet in GAS using SQL-type queries? If so, any working samples?
Thanks. | 0 |
10,827,513 | 05/31/2012 04:36:46 | 1,238,670 | 02/28/2012 19:23:54 | 115 | 0 | Django template CSS/IMG is "off" in the URL | I have
/path/to/my/theme/static/css/frontend.css
which is called by base.html
<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/frontend.css" media="all" />
In which I've got a background for the header:
#header-wrapper
min-width: 960px;
height: 150px;
background: transparent url(img/header-bg.png) repeat-x center bottom;
}
The file is
/path/to/my/theme/static/img
I've run manage.py collectstatic to gather the files and almost everything looks correct except the link generated looks like: http://example.com/static/css/img/header-bg.png
In which the image does not show, because the correct URL is: http://example.com/static/img/header-bg.png
Where am I going wrong?? | django | django-templates | null | null | null | null | open | Django template CSS/IMG is "off" in the URL
===
I have
/path/to/my/theme/static/css/frontend.css
which is called by base.html
<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/frontend.css" media="all" />
In which I've got a background for the header:
#header-wrapper
min-width: 960px;
height: 150px;
background: transparent url(img/header-bg.png) repeat-x center bottom;
}
The file is
/path/to/my/theme/static/img
I've run manage.py collectstatic to gather the files and almost everything looks correct except the link generated looks like: http://example.com/static/css/img/header-bg.png
In which the image does not show, because the correct URL is: http://example.com/static/img/header-bg.png
Where am I going wrong?? | 0 |
10,827,515 | 05/31/2012 04:36:51 | 1,041,040 | 11/11/2011 04:20:23 | 8 | 0 | Read huge free text docs in one file for lucene indexing | I have heaps of free text news docs in one big file. The structure of each news doc is like:
>(Header line) Category, Doc1, Date (day, month, year)
(body text)
...
...
...
>(Header line) Category, Doc2, Date (day, month, year)
(body text)
...
...
...
If I extract each doc from the big file, it costs too much time and not efficient. Therefore, I decide to read the file line by line and feed information to lucene the same time.
I write c# code to index each doc to lucene like:
Streamreader sr = new Streamreader(file);
string line = "";
while((line = sr.ReadLine()) != null)
{
How can I tell this line is a doc header line from text line
and get the metadata and all the text lines of a doc for lucene to index.
Also, the text is read by OCR which can not give correct line-separating.
Captions are mixed with content text
iterate the process till the end of the file
}
with thanks
| text | lucene | indexing | huge | null | null | open | Read huge free text docs in one file for lucene indexing
===
I have heaps of free text news docs in one big file. The structure of each news doc is like:
>(Header line) Category, Doc1, Date (day, month, year)
(body text)
...
...
...
>(Header line) Category, Doc2, Date (day, month, year)
(body text)
...
...
...
If I extract each doc from the big file, it costs too much time and not efficient. Therefore, I decide to read the file line by line and feed information to lucene the same time.
I write c# code to index each doc to lucene like:
Streamreader sr = new Streamreader(file);
string line = "";
while((line = sr.ReadLine()) != null)
{
How can I tell this line is a doc header line from text line
and get the metadata and all the text lines of a doc for lucene to index.
Also, the text is read by OCR which can not give correct line-separating.
Captions are mixed with content text
iterate the process till the end of the file
}
with thanks
| 0 |
1,986,907 | 12/31/2009 19:59:53 | 4,794 | 09/05/2008 16:11:30 | 2,270 | 113 | Can CakePHP's testAction method survive a redirect call? | I'm starting to write unit tests using the CakePHP framework and SimpleTest. The documentation describes [a problem with the testAction method][1] when your controller redirects the browser to another page. There is a hopeful note with a [link to a possible fix][2], but the link is broken.
Has anybody gotten this working? Know how to find where that broken link should point?
I found a discussion of using [partial mock objects][3] to override the redirect call, but that doesn't seem to work with the testAction method. I suspect I'd have to somehow register the mock controller with the dispatcher.
Here's a [similar question on Google groups][4].
[1]: http://book.cakephp.org/view/366/Testing-controllers#Pitfalls-370
[2]: https://trac.cakephp.org/ticket/4154
[3]: http://groups.google.com/group/cake-php/browse_thread/thread/eea1e499d57bd9ce
[4]: http://groups.google.com/group/cake-php/browse_thread/thread/eea20121c17e24c8 | cakephp | unit-testing | php | null | null | null | open | Can CakePHP's testAction method survive a redirect call?
===
I'm starting to write unit tests using the CakePHP framework and SimpleTest. The documentation describes [a problem with the testAction method][1] when your controller redirects the browser to another page. There is a hopeful note with a [link to a possible fix][2], but the link is broken.
Has anybody gotten this working? Know how to find where that broken link should point?
I found a discussion of using [partial mock objects][3] to override the redirect call, but that doesn't seem to work with the testAction method. I suspect I'd have to somehow register the mock controller with the dispatcher.
Here's a [similar question on Google groups][4].
[1]: http://book.cakephp.org/view/366/Testing-controllers#Pitfalls-370
[2]: https://trac.cakephp.org/ticket/4154
[3]: http://groups.google.com/group/cake-php/browse_thread/thread/eea1e499d57bd9ce
[4]: http://groups.google.com/group/cake-php/browse_thread/thread/eea20121c17e24c8 | 0 |
1,986,908 | 12/31/2009 20:00:21 | 196,629 | 10/26/2009 13:11:24 | 444 | 16 | Batch script to take backup of all *.c and *.h files. | I want to copy files with matching regex to destination with same directory structure. If I use dir /b /s, I get full path of source then how can I get the relative path from source path?
something like this,
file_list=`find ./abc/test -name "*.c"`
for file_n in $file_list
do
cp $file_n $targetdir/$file_n
done | batch | scripting | shell | dos | null | null | open | Batch script to take backup of all *.c and *.h files.
===
I want to copy files with matching regex to destination with same directory structure. If I use dir /b /s, I get full path of source then how can I get the relative path from source path?
something like this,
file_list=`find ./abc/test -name "*.c"`
for file_n in $file_list
do
cp $file_n $targetdir/$file_n
done | 0 |
66,885 | 09/15/2008 20:57:18 | 7,754 | 09/15/2008 14:21:17 | 64 | 15 | restful_authentication and OpenID | I'm thoroughly confused about current state of the art for using OpenID together with `restful_authentication`. The obvious google search gives several well-known pages which do not make sense taken together (considering their timestamps).
What shall I do given that I'm running Rails 2.0 (or 2.1) and I want OpenID authentication alongside usual login/password?
Thank you, | ruby-on-rails | openid | restful-authentication | null | null | null | open | restful_authentication and OpenID
===
I'm thoroughly confused about current state of the art for using OpenID together with `restful_authentication`. The obvious google search gives several well-known pages which do not make sense taken together (considering their timestamps).
What shall I do given that I'm running Rails 2.0 (or 2.1) and I want OpenID authentication alongside usual login/password?
Thank you, | 0 |
66,893 | 09/15/2008 20:58:20 | 361 | 08/05/2008 04:20:27 | 602 | 25 | Tree data structure in C# | I was looking for a tree or graph data structure in C# but I guess there isn't on provided. <http://msdn.microsoft.com/en-us/library/ms379574.aspx> explains a bit about why. Is there a convenient library which is commonly used to provide this functionality? Perhaps through a strategy pattern to solve the issues presented in the article.
I feel a bit silly implementing my own tree, just as I would implementing my own ArrayList. | c# | data-structures | null | null | null | null | open | Tree data structure in C#
===
I was looking for a tree or graph data structure in C# but I guess there isn't on provided. <http://msdn.microsoft.com/en-us/library/ms379574.aspx> explains a bit about why. Is there a convenient library which is commonly used to provide this functionality? Perhaps through a strategy pattern to solve the issues presented in the article.
I feel a bit silly implementing my own tree, just as I would implementing my own ArrayList. | 0 |
66,904 | 09/15/2008 20:59:09 | 9,436 | 09/15/2008 18:48:22 | 1 | 0 | Virtualizing treelistview? | Does anyone know of a good way to display hierarchical data with columns?
It has to be virtualizing, as it must be able to handle several million records.
It should also be multi-select, most treeview controls are not.
Winforms preferred, but will ElementHost WPF if necessary.
| .net | winforms | wpf | null | null | null | open | Virtualizing treelistview?
===
Does anyone know of a good way to display hierarchical data with columns?
It has to be virtualizing, as it must be able to handle several million records.
It should also be multi-select, most treeview controls are not.
Winforms preferred, but will ElementHost WPF if necessary.
| 0 |
66,912 | 09/15/2008 20:59:45 | 9,818 | 09/15/2008 20:03:31 | 1 | 0 | The <h:message> doesn't display properly when using <t:inputFileUpload> inside <t:PanelTabbedPane> | In a JSP page, I created a <h:form enctype="multipart/form-data"> with some elements: <t:inputText>, <t:inputDate>, etc. Also, I added some <h:message for="someElement"> And I wanted to allow the user upload several files (one at a time) within the form (using <t:inputFileUpload> ) So far, at this point my code works fine.
The headache comes when I try to put the form inside a <t:panelTabbedPane serverSideTabSwitch="false"> (and thus of course, inside a <t:panelTab> )
First at all, the <t:inputFileUpload> fails to load the file at the value assigned in the Managed Bean UploadedFile attribute #{myBean.upFile}
Then, [googling for a clue][1], I knew that <t:panelTabbedPane> generates a form called "autoform", so I was getting nested forms. Ok, I fix that creating the <h:form> out of the <t:panelTabbedPane> and eureka! file input worked again! (the autoform doesn't generate)
But, oh surprise! oh terrible Murphy law! All my <h:message> begins to fail. The Eclipse console's output show me that all <h:message> are looking for nonexistents elements ID's (who have their ID's in part equals to they are looking for, but at the end of the ID's their names change)
At this point, I putted a <h:mesagges> tag to show me all errors at once at the beginning of the Panel, and it works fine. So, errors exists and errors show properly at the beginning of the Panel.
**¿How can I get the <h:message for="xyz"> working properly?**
Thanks in advance.
I'm using Tomahawk-1.1.6 with myFaces-impl-1.2.3 in a eclipse Ganymede project with Geronimo as Application Server (Geronimo gives me the myFaces jar implementation while I put the tomahawk jar in the WEB-INF/lib folder of application)
[1]: http://markmail.org/message/b4nht4f6xb74noxp "That has no answer when I readed it" | jsf | null | null | null | null | null | open | The <h:message> doesn't display properly when using <t:inputFileUpload> inside <t:PanelTabbedPane>
===
In a JSP page, I created a <h:form enctype="multipart/form-data"> with some elements: <t:inputText>, <t:inputDate>, etc. Also, I added some <h:message for="someElement"> And I wanted to allow the user upload several files (one at a time) within the form (using <t:inputFileUpload> ) So far, at this point my code works fine.
The headache comes when I try to put the form inside a <t:panelTabbedPane serverSideTabSwitch="false"> (and thus of course, inside a <t:panelTab> )
First at all, the <t:inputFileUpload> fails to load the file at the value assigned in the Managed Bean UploadedFile attribute #{myBean.upFile}
Then, [googling for a clue][1], I knew that <t:panelTabbedPane> generates a form called "autoform", so I was getting nested forms. Ok, I fix that creating the <h:form> out of the <t:panelTabbedPane> and eureka! file input worked again! (the autoform doesn't generate)
But, oh surprise! oh terrible Murphy law! All my <h:message> begins to fail. The Eclipse console's output show me that all <h:message> are looking for nonexistents elements ID's (who have their ID's in part equals to they are looking for, but at the end of the ID's their names change)
At this point, I putted a <h:mesagges> tag to show me all errors at once at the beginning of the Panel, and it works fine. So, errors exists and errors show properly at the beginning of the Panel.
**¿How can I get the <h:message for="xyz"> working properly?**
Thanks in advance.
I'm using Tomahawk-1.1.6 with myFaces-impl-1.2.3 in a eclipse Ganymede project with Geronimo as Application Server (Geronimo gives me the myFaces jar implementation while I put the tomahawk jar in the WEB-INF/lib folder of application)
[1]: http://markmail.org/message/b4nht4f6xb74noxp "That has no answer when I readed it" | 0 |
66,919 | 09/15/2008 21:00:30 | 6,984 | 09/15/2008 12:57:10 | 31 | 1 | How to increment in vim under windows (where CTRL-A does not work...) | While CTRL-X works fine in vim under windows, CTRL-A selects all (duh).
Is there a way to increment a number with a keystroke under windows?
| vim | null | null | null | null | null | open | How to increment in vim under windows (where CTRL-A does not work...)
===
While CTRL-X works fine in vim under windows, CTRL-A selects all (duh).
Is there a way to increment a number with a keystroke under windows?
| 0 |
66,921 | 09/15/2008 21:00:49 | 4,794 | 09/05/2008 16:11:30 | 175 | 8 | Load a form without showing it | Short version: I want to trigger the Form_Load() event without making the form visible. This doesn't work because Show() ignores the current value of the Visible property:
tasksForm.Visible = false;
tasksForm.Show();
Long version: I have a WinForms application with two forms: main and tasks. The main form is always displayed. The user can either click a button to open the tasks form, or click some buttons that just run a task directly without opening the tasks form.
When a user asks to run a task directly, I'd like to just call some public methods on the tasks form without showing it. Unfortunately, the task logic depends on stuff that happens in the Form_Load() event. The only way I can find to trigger Form_Load() is to call Show(). The best I've been able to do is to show the form in the minimized state:
tasksForm.WindowState = FormWindowState.Minimized;
tasksForm.Show();
I suppose the cleanest solution would be to pull the tasks logic out of the tasks form and into a controller class. Then I can use that class from the main form and from the tasks form, and only load the tasks form when I need it visible for the user. However, if it's an easy thing to load the form without displaying it, that would be a smaller change.
| c# | winforms | null | null | null | null | open | Load a form without showing it
===
Short version: I want to trigger the Form_Load() event without making the form visible. This doesn't work because Show() ignores the current value of the Visible property:
tasksForm.Visible = false;
tasksForm.Show();
Long version: I have a WinForms application with two forms: main and tasks. The main form is always displayed. The user can either click a button to open the tasks form, or click some buttons that just run a task directly without opening the tasks form.
When a user asks to run a task directly, I'd like to just call some public methods on the tasks form without showing it. Unfortunately, the task logic depends on stuff that happens in the Form_Load() event. The only way I can find to trigger Form_Load() is to call Show(). The best I've been able to do is to show the form in the minimized state:
tasksForm.WindowState = FormWindowState.Minimized;
tasksForm.Show();
I suppose the cleanest solution would be to pull the tasks logic out of the tasks form and into a controller class. Then I can use that class from the main form and from the tasks form, and only load the tasks form when I need it visible for the user. However, if it's an easy thing to load the form without displaying it, that would be a smaller change.
| 0 |
66,922 | 09/15/2008 21:01:02 | 543 | 08/06/2008 15:41:31 | 696 | 38 | What are some Search Servers out there? | I'm looking to find alternatives to [Solr][1] from the Apache Software Foundation.
For those that don't know, Solr is an enterprise search server. A client application uses a web-services like interface to submit documents for indexing and also to perform search queries. Solr has other features built in like caching and replication. I believe it was originally started by CNet and then open-sourced.
I'm looking for other search servers out there that might be seen as the competition.
[1]: http://lucene.apache.org/solr/ | search | full-text-search | solr | search-server | null | null | open | What are some Search Servers out there?
===
I'm looking to find alternatives to [Solr][1] from the Apache Software Foundation.
For those that don't know, Solr is an enterprise search server. A client application uses a web-services like interface to submit documents for indexing and also to perform search queries. Solr has other features built in like caching and replication. I believe it was originally started by CNet and then open-sourced.
I'm looking for other search servers out there that might be seen as the competition.
[1]: http://lucene.apache.org/solr/ | 0 |
66,923 | 09/15/2008 21:01:02 | 10,059 | 09/15/2008 21:01:02 | 1 | 0 | How do you whether a string is an Ip or a hostname | So you have a String that is retrieved from an admin web UI (so it is definitely a String). How can you find out whether this string is an IP address or a hostname in Java? | java | null | null | null | null | null | open | How do you whether a string is an Ip or a hostname
===
So you have a String that is retrieved from an admin web UI (so it is definitely a String). How can you find out whether this string is an IP address or a hostname in Java? | 0 |
66,952 | 09/15/2008 21:03:59 | 10,024 | 09/15/2008 20:53:05 | 1 | 0 | Tools to you test/debug/fix PHP concurrency issues? | I find myself doing some relatively advanced stuff with memcached in PHP. It's becoming a mental struggle to think about and resolve race conditions and concurrency issues caused by the lock-free nature of the cache.
PHP seems pretty poor in tools when it comes to concurrency (threads, anyone?), so I wonder if there are any solutions out there to test/debug this properly.
I don't want to wait until two users request two scripts that will run as parallel processes at the same time and cause a concurrency issue that will leave me scratching my head, or that I might not ever notice until it snowballs into a clusterfsck.
Any magic PHP concurrency wand I should know of? | php | concurrency | memcached | null | null | null | open | Tools to you test/debug/fix PHP concurrency issues?
===
I find myself doing some relatively advanced stuff with memcached in PHP. It's becoming a mental struggle to think about and resolve race conditions and concurrency issues caused by the lock-free nature of the cache.
PHP seems pretty poor in tools when it comes to concurrency (threads, anyone?), so I wonder if there are any solutions out there to test/debug this properly.
I don't want to wait until two users request two scripts that will run as parallel processes at the same time and cause a concurrency issue that will leave me scratching my head, or that I might not ever notice until it snowballs into a clusterfsck.
Any magic PHP concurrency wand I should know of? | 0 |
66,964 | 09/15/2008 21:05:49 | 4,872 | 09/06/2008 09:14:55 | 391 | 10 | How do I create a link to a footnote in HTML? | For example:
> This is main body of my content. I have a
> footnote link for this line [1]. Then, I have some more
> content. Some of it is interesting and it
> has some footnotes as well [2].
>
> [1] Here is my first footnote.
>
> [2] Another footnote.
So, if I click on the "[1]" link it directs the web page to the first footnote reference and so on. How exactly do I accomplish this in HTML? | html | syntax | null | null | null | null | open | How do I create a link to a footnote in HTML?
===
For example:
> This is main body of my content. I have a
> footnote link for this line [1]. Then, I have some more
> content. Some of it is interesting and it
> has some footnotes as well [2].
>
> [1] Here is my first footnote.
>
> [2] Another footnote.
So, if I click on the "[1]" link it directs the web page to the first footnote reference and so on. How exactly do I accomplish this in HTML? | 0 |
66,986 | 09/15/2008 21:08:44 | 3,474 | 08/28/2008 17:28:46 | 1,034 | 61 | Is there an Eclipse command to surround the current selection with parentheses? | Is there an Eclipse command to surround the current selection with parentheses?
| eclipse | keyboard-shortcuts | null | null | null | null | open | Is there an Eclipse command to surround the current selection with parentheses?
===
Is there an Eclipse command to surround the current selection with parentheses?
| 0 |
67,000 | 09/15/2008 21:10:09 | 10,093 | 09/15/2008 21:10:09 | 1 | 0 | Fast, Pixel Precision 2D Drawing API for Graphics App? | I woud like to create a cross-platform drawing program. The one requirement for writing my app is that I have pixel level precision over the canvas. For instance, I want to write my own line drawing algorithm rather than rely on someone elses. I do not want any form of anti-aliasing (again, pixel level control is required.) I would like the users interactions on the screen to be quick and responsive (pending my ability to write fast algorithms.)
Ideally, I would like to write this in Python, or perhaps Java as a second choice. The ability to easily make the final app cross-platform is a must. I will submit to different API's on different OS'es if necessary as long as I can write an abstraction layer around them. Any ideas? | graphics | 2d | drawing | null | null | null | open | Fast, Pixel Precision 2D Drawing API for Graphics App?
===
I woud like to create a cross-platform drawing program. The one requirement for writing my app is that I have pixel level precision over the canvas. For instance, I want to write my own line drawing algorithm rather than rely on someone elses. I do not want any form of anti-aliasing (again, pixel level control is required.) I would like the users interactions on the screen to be quick and responsive (pending my ability to write fast algorithms.)
Ideally, I would like to write this in Python, or perhaps Java as a second choice. The ability to easily make the final app cross-platform is a must. I will submit to different API's on different OS'es if necessary as long as I can write an abstraction layer around them. Any ideas? | 0 |
67,004 | 09/15/2008 21:10:26 | 8,852 | 09/15/2008 17:02:17 | 3 | 0 | What is a good algorithm for deciding whether a passed in amount can be built additively from a set of numbers? | What is a good algorithm for deciding whether a passed in amount can be built additively from a set of numbers. In my case I'm determining whether a certain currency amount (such as $40) can be met by adding up some combination of a set of bills (such as $5, $10 and $20 bills). That is a simple example, but the algorithm needs to work for the generic case where the bill set can differ over time (due to running out of a bill) or due to bill denominations differing by currency. The problem would apply to a foreign exchange teller at an airport.
So $50 can be met with a set of ($20 and $30), but cannot be met with a set of ($20 and $40).
In addition. If the amount cannot be met with the bill denominations available how do you determine the closest amounts above and below which can be met? | algorithm | null | null | null | null | null | open | What is a good algorithm for deciding whether a passed in amount can be built additively from a set of numbers?
===
What is a good algorithm for deciding whether a passed in amount can be built additively from a set of numbers. In my case I'm determining whether a certain currency amount (such as $40) can be met by adding up some combination of a set of bills (such as $5, $10 and $20 bills). That is a simple example, but the algorithm needs to work for the generic case where the bill set can differ over time (due to running out of a bill) or due to bill denominations differing by currency. The problem would apply to a foreign exchange teller at an airport.
So $50 can be met with a set of ($20 and $30), but cannot be met with a set of ($20 and $40).
In addition. If the amount cannot be met with the bill denominations available how do you determine the closest amounts above and below which can be met? | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.