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
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
35,560 | 08/30/2008 01:46:19 | 2,701 | 08/24/2008 15:51:24 | 92 | 8 | Lazy Loading with a WCF Service Domain Model? | I'm looking to push my domain model into a WCF Service API and wanted to get some thoughts on lazy loading techniques with this type of setup.
Any suggestions when taking this approach? | web-services | wcf | ddd | null | null | null | open | Lazy Loading with a WCF Service Domain Model?
===
I'm looking to push my domain model into a WCF Service API and wanted to get some thoughts on lazy loading techniques with this type of setup.
Any suggestions when taking this approach? | 0 |
35,563 | 08/30/2008 01:48:42 | 3,499 | 08/28/2008 19:39:37 | 86 | 12 | How do I make bash reverse-search work in Terminal.app without it displaying garbled output? | Using Terminal.app on OS X 10.5, often you see the commands get garbled when you do a reverse-search with Bash. Is there some kind of termcap or perhaps a bash shopt command that can fix this? It is very annoying.
Steps to reproduce: Open Terminal.app, reverse-search to a longish command. Hit <ctrl>-E once you've found the command. The cursor goes to the end of the line, but the display doesn't update.
I'm guessing this is some kind of problem with the readline library on OS X. It's more of a problem with updating the cursor position after a search than anything else. Basically, ctrl-a and ctrl-e tend to break the search output.
![os x terminal failure image][1]
In the above, the first part of the command should be displayed, and the cursor should be at the end of the line, but it isn't. You literally can't see what you're editing when this happens.
[1]: http://involution.com/images/osxterminal.png | osx | bash | null | null | null | null | open | How do I make bash reverse-search work in Terminal.app without it displaying garbled output?
===
Using Terminal.app on OS X 10.5, often you see the commands get garbled when you do a reverse-search with Bash. Is there some kind of termcap or perhaps a bash shopt command that can fix this? It is very annoying.
Steps to reproduce: Open Terminal.app, reverse-search to a longish command. Hit <ctrl>-E once you've found the command. The cursor goes to the end of the line, but the display doesn't update.
I'm guessing this is some kind of problem with the readline library on OS X. It's more of a problem with updating the cursor position after a search than anything else. Basically, ctrl-a and ctrl-e tend to break the search output.
![os x terminal failure image][1]
In the above, the first part of the command should be displayed, and the cursor should be at the end of the line, but it isn't. You literally can't see what you're editing when this happens.
[1]: http://involution.com/images/osxterminal.png | 0 |
35,564 | 08/30/2008 01:48:51 | 2,066 | 08/20/2008 03:59:13 | 11 | 2 | RoR on Windows with Mongrel | Where is the best tutorial for getting RoR working on a windows box with Mongrel? I'm a complete noob at server management, so the more detailed the better! | ruby | windows | null | null | null | null | open | RoR on Windows with Mongrel
===
Where is the best tutorial for getting RoR working on a windows box with Mongrel? I'm a complete noob at server management, so the more detailed the better! | 0 |
35,569 | 08/30/2008 01:51:05 | 3,594 | 08/29/2008 08:46:29 | 47 | 5 | Why does Python's __iter__ on a mapping return keys() instead of iteritems()? | It seems like if you want to get the keys of a mapping, you ask for them; otherwise, give me the _whole_ mapping (constituted by a set of key-value pairs). Is there a historical reason for this? | python | mapping | iteration | null | null | null | open | Why does Python's __iter__ on a mapping return keys() instead of iteritems()?
===
It seems like if you want to get the keys of a mapping, you ask for them; otherwise, give me the _whole_ mapping (constituted by a set of key-value pairs). Is there a historical reason for this? | 0 |
35,599 | 08/30/2008 02:25:53 | 1,368 | 08/14/2008 18:57:47 | 114 | 8 | What makes the Unix file system more superior to the Windows file system? | I'll admit that I don't know the inner workings of the unix operating system, so I was hoping someone could shed some light on this topic.
Why is the unix file system better than the windows file system?
Would grep work just as well on windows, or is their something fundamentally different that makes it more powerful on a unix box? | unix | filesystems | null | null | null | null | open | What makes the Unix file system more superior to the Windows file system?
===
I'll admit that I don't know the inner workings of the unix operating system, so I was hoping someone could shed some light on this topic.
Why is the unix file system better than the windows file system?
Would grep work just as well on windows, or is their something fundamentally different that makes it more powerful on a unix box? | 0 |
35,610 | 08/30/2008 02:37:19 | 2,523 | 08/22/2008 16:13:28 | 21 | 2 | What programs should I write to truly experience this fancy new lanauge ? | <p>Tried Scheme at one point, just built up half of a "math" and "string" library before getting bored...</p>
<p>Similar experience with Java, but stopped early because I was appalled at the lack of operator overloading.</p>
<p>When you try out a new language, is there a program/game/function/exercise/problem that you use to get into the hot meaty center and really EXPERIENCE the language? I've been wanted to try Python, Ruby, some lisps, etc but can't seem to find any meaningful work to do with them, or any reason to use them for anything over languages I already know.</p>
<p><i>Sorry this is a discussion, but you are EXACTLY the people I want to get input from on this</i></p> | lanaguage | discuss | null | null | null | null | open | What programs should I write to truly experience this fancy new lanauge ?
===
<p>Tried Scheme at one point, just built up half of a "math" and "string" library before getting bored...</p>
<p>Similar experience with Java, but stopped early because I was appalled at the lack of operator overloading.</p>
<p>When you try out a new language, is there a program/game/function/exercise/problem that you use to get into the hot meaty center and really EXPERIENCE the language? I've been wanted to try Python, Ruby, some lisps, etc but can't seem to find any meaningful work to do with them, or any reason to use them for anything over languages I already know.</p>
<p><i>Sorry this is a discussion, but you are EXACTLY the people I want to get input from on this</i></p> | 0 |
35,615 | 08/30/2008 02:42:38 | 1,349,865 | 08/28/2008 22:42:35 | 26 | 7 | What is a good online resource for css 'design patterns'? | Can anyone out there recommend a good online resource for CSS 'design patterns'?
I know design patterns in a software context usually refer to OO based design patterns, but I mean design patterns in the broader sense of the term: i.e. common, clean solutions to common problems / tasks.
An example of such a resource would be [this list of table designs][1], this gives you all you really need to know about how to make tables look nice using a set of CSS techniques.
Other examples of common problems which could have nice set solutions would be things like rounded corners on divs, highly usable form layouts etc.
[1]: http://www.smashingmagazine.com/2008/08/13/top-10-css-table-designs/ | html | css | xhtml | null | null | 03/29/2012 17:31:01 | not constructive | What is a good online resource for css 'design patterns'?
===
Can anyone out there recommend a good online resource for CSS 'design patterns'?
I know design patterns in a software context usually refer to OO based design patterns, but I mean design patterns in the broader sense of the term: i.e. common, clean solutions to common problems / tasks.
An example of such a resource would be [this list of table designs][1], this gives you all you really need to know about how to make tables look nice using a set of CSS techniques.
Other examples of common problems which could have nice set solutions would be things like rounded corners on divs, highly usable form layouts etc.
[1]: http://www.smashingmagazine.com/2008/08/13/top-10-css-table-designs/ | 4 |
35,634 | 08/30/2008 03:04:54 | 3,594 | 08/29/2008 08:46:29 | 56 | 5 | Ruby "is" equivalent | Is there a Ruby equivalent for Python's "is"? It tests whether two objects are identical (i.e. have the same memory location). | python | ruby | identical | null | null | null | open | Ruby "is" equivalent
===
Is there a Ruby equivalent for Python's "is"? It tests whether two objects are identical (i.e. have the same memory location). | 0 |
35,639 | 08/30/2008 03:16:38 | 113 | 08/02/2008 05:39:54 | 1 | 2 | Using Office to programatically convert documents? | I'm interested in using Office 2007 to convert between the pre-2007 binary formats (.doc, .xls, .ppt) and the new Office Open XML formats (.docx, .xlsx, .pptx)
How would I do this? I'd like to write a simple command line app that takes in two filenames (input and output) and perhaps the source and/or destination types, and performs the conversion. | microsoftoffice | null | null | null | null | null | open | Using Office to programatically convert documents?
===
I'm interested in using Office 2007 to convert between the pre-2007 binary formats (.doc, .xls, .ppt) and the new Office Open XML formats (.docx, .xlsx, .pptx)
How would I do this? I'd like to write a simple command line app that takes in two filenames (input and output) and perhaps the source and/or destination types, and performs the conversion. | 0 |
35,646 | 08/30/2008 03:26:11 | 577 | 08/06/2008 21:36:25 | 101 | 6 | Do you continue development in a branch or in the trunk? | Suppose you're developing a software product that has periodic releases. What are the best practices with regard to branching and merging? Slicing off periodic release branches to the public (or whomever your customer is) and then continuing development on the trunk, or considering the trunk the stable version, tagging it as a release periodically, and doing your experimental work in branches. What do folks think is the trunk considered "gold" or considered a "sand box"? | svn | version-control | releasing | null | null | 03/07/2012 16:14:46 | not constructive | Do you continue development in a branch or in the trunk?
===
Suppose you're developing a software product that has periodic releases. What are the best practices with regard to branching and merging? Slicing off periodic release branches to the public (or whomever your customer is) and then continuing development on the trunk, or considering the trunk the stable version, tagging it as a release periodically, and doing your experimental work in branches. What do folks think is the trunk considered "gold" or considered a "sand box"? | 4 |
35,662 | 08/30/2008 03:54:57 | 372 | 08/05/2008 09:16:41 | 2,208 | 163 | Best practices when "going dark" | I'm sure some of you would have read Jeff's Atwood's [Don't Go Dark][1] article. The gist is that it is anathema to go "lock yourself in a room" and perform a development task or project for long periods of time. The best practice would be to have a team (at least another person) with you, [commit early and commit often][2], do your work iteratively, etc. etc.
This has become relevant to me because I have an upcoming "internal" project for a [small travel agency business][3], owned and operated by my wife, and we can't afford to hire anyone for it (other than myself of course). The plans/specs that I've drawn up are a little ambitious, but now I'm beginning to doubt if I could pull it off in less than a year if at all.
My question now is, for those of you who have had *no other choice* but to do it all alone (e.g., people who have done successful one-man-projects, or people who are one-man IT departments), what best practices have you found so that you are able to:
- Produce high quality software
- Focus on your tasks and not get distracted or derailed in your work (especially in work-at-home gigs)
- Manage your time
- QA/test your software efficiently
- Maintain best practices in software development like source control, iterative development, etc.
I am particularly interested in people who have done work-at-home setups, as this is where I would likely do my work. I have to mention that we do have a 3 year old around the house, although we have hired a nanny to assist us with her, so that should be taken into account.
I'd love to hear your thoughts.
[1]: http://www.codinghorror.com/blog/archives/001134.html
[2]: http://www.codinghorror.com/blog/archives/001165.html
[3]: http://inavtravel.com | productivity | null | null | null | null | 10/28/2011 07:35:32 | off topic | Best practices when "going dark"
===
I'm sure some of you would have read Jeff's Atwood's [Don't Go Dark][1] article. The gist is that it is anathema to go "lock yourself in a room" and perform a development task or project for long periods of time. The best practice would be to have a team (at least another person) with you, [commit early and commit often][2], do your work iteratively, etc. etc.
This has become relevant to me because I have an upcoming "internal" project for a [small travel agency business][3], owned and operated by my wife, and we can't afford to hire anyone for it (other than myself of course). The plans/specs that I've drawn up are a little ambitious, but now I'm beginning to doubt if I could pull it off in less than a year if at all.
My question now is, for those of you who have had *no other choice* but to do it all alone (e.g., people who have done successful one-man-projects, or people who are one-man IT departments), what best practices have you found so that you are able to:
- Produce high quality software
- Focus on your tasks and not get distracted or derailed in your work (especially in work-at-home gigs)
- Manage your time
- QA/test your software efficiently
- Maintain best practices in software development like source control, iterative development, etc.
I am particularly interested in people who have done work-at-home setups, as this is where I would likely do my work. I have to mention that we do have a 3 year old around the house, although we have hired a nanny to assist us with her, so that should be taken into account.
I'd love to hear your thoughts.
[1]: http://www.codinghorror.com/blog/archives/001134.html
[2]: http://www.codinghorror.com/blog/archives/001165.html
[3]: http://inavtravel.com | 2 |
35,669 | 08/30/2008 04:01:53 | 2,600 | 08/23/2008 13:40:14 | 372 | 27 | Windows Home Server versus Vista Backup and Restore Center | I've been using Window Home Server for my backups here at home for most of a year now, and I'm really pleased with it. It's far better than the software I was using previously (Acronis). I'm thinking about a backup strategy for my work machine and I'd like to know how WHS compares with Vista's built-in backup and restore features. The plan is to do a full backup to a local external hard drive and backup the documents folder to a network drive on the server. Anyone have experience using the Vista backup feature like this? | windows-vista | backup | home-server | null | null | null | open | Windows Home Server versus Vista Backup and Restore Center
===
I've been using Window Home Server for my backups here at home for most of a year now, and I'm really pleased with it. It's far better than the software I was using previously (Acronis). I'm thinking about a backup strategy for my work machine and I'd like to know how WHS compares with Vista's built-in backup and restore features. The plan is to do a full backup to a local external hard drive and backup the documents folder to a network drive on the server. Anyone have experience using the Vista backup feature like this? | 0 |
35,670 | 08/30/2008 04:01:55 | 115 | 08/02/2008 05:44:40 | 408 | 60 | Begining SVN | I am ready to start using SVN, but I have NO (as in the money required for free bear) experience with source control. I have installed subversion on my server (that was easy, 'apt-get install subversion') but now I don't know what to do, how to configure it, or how to use it.<br /><br />What suggestions do you have, and where can I find good resources to learn to start using it? | svn | subversion | null | null | null | null | open | Begining SVN
===
I am ready to start using SVN, but I have NO (as in the money required for free bear) experience with source control. I have installed subversion on my server (that was easy, 'apt-get install subversion') but now I don't know what to do, how to configure it, or how to use it.<br /><br />What suggestions do you have, and where can I find good resources to learn to start using it? | 0 |
35,677 | 08/30/2008 04:11:35 | 2,659 | 08/24/2008 02:37:40 | 41 | 3 | What is the best architecture to bridge to XMPP? | If I have a separate system with its own concept of users and presence, what is the most appropriate architecture for creating a bridge to an XMPP server network? As far as I can tell there are three primary ways:
1. Act as a server. This creates one touchpoint, but I fear it has implications for compatibility, and potentially creates complexity in my system for emulating a server.
2. Act as a clients. This seems to imply that I need one connection per user in my system, which just isn't going to scale well.
3. I've heard of an XMPP gateway protocol, but it's unclear if this is any better than the client solution. I also can't tell if this is standard or not.
Any suggestions or tradeoffs would be appreciated. For example, would any of these solutions require running code inside the target XMPP server (not likely something I can do). | architecture | xmpp | bridge | null | null | null | open | What is the best architecture to bridge to XMPP?
===
If I have a separate system with its own concept of users and presence, what is the most appropriate architecture for creating a bridge to an XMPP server network? As far as I can tell there are three primary ways:
1. Act as a server. This creates one touchpoint, but I fear it has implications for compatibility, and potentially creates complexity in my system for emulating a server.
2. Act as a clients. This seems to imply that I need one connection per user in my system, which just isn't going to scale well.
3. I've heard of an XMPP gateway protocol, but it's unclear if this is any better than the client solution. I also can't tell if this is standard or not.
Any suggestions or tradeoffs would be appreciated. For example, would any of these solutions require running code inside the target XMPP server (not likely something I can do). | 0 |
35,698 | 08/30/2008 05:26:02 | 3,542 | 08/29/2008 04:24:06 | 86 | 8 | "Multi-agent computing" in simple terms | I've encountered the term "multi-agent computing" as of late, and I don't quite get what it is. I've read a book about it, but that didn't answer the fundamental question of what an agent was.
Does someone out there have a pointer to some reference which is clear and concise and answers the question without a load of bullshit/marketing speak? I want to know if this is something I should familiarise myself, or whether it's some crap I can probably ignore, because I honestly can't tell. | multi-agent | null | null | null | null | null | open | "Multi-agent computing" in simple terms
===
I've encountered the term "multi-agent computing" as of late, and I don't quite get what it is. I've read a book about it, but that didn't answer the fundamental question of what an agent was.
Does someone out there have a pointer to some reference which is clear and concise and answers the question without a load of bullshit/marketing speak? I want to know if this is something I should familiarise myself, or whether it's some crap I can probably ignore, because I honestly can't tell. | 0 |
35,699 | 08/30/2008 05:28:40 | 3,499 | 08/28/2008 19:39:37 | 116 | 15 | On a two-column page, how can I grow the left div to the same height of the right div using CSS or Javascript? | I'm trying to make a two-column page using a div-based layout (no tables please!). Problem is, I can't grow the left div to match the height of the right one. My right div typically has a lot of content.
Here's is a paired down example of my template to illustrate the problem.
<div style="float:left; width: 150px; border: 1px solid;">
<ul>
<li>nav1</li>
<li>nav2</li>
<li>nav3</li>
<li>nav4</li>
</ul>
</div>
<div style="float:left; width: 250px">
Lorem ipsum dolor sit amet, consectetur adipisicing elit,
sed do eiusmod tempor incididunt ut labore et dolore magna
....
</div>
![alt text][1]
[1]: http://involution.com/images/divlayout.png | javascript | html | css | null | null | null | open | On a two-column page, how can I grow the left div to the same height of the right div using CSS or Javascript?
===
I'm trying to make a two-column page using a div-based layout (no tables please!). Problem is, I can't grow the left div to match the height of the right one. My right div typically has a lot of content.
Here's is a paired down example of my template to illustrate the problem.
<div style="float:left; width: 150px; border: 1px solid;">
<ul>
<li>nav1</li>
<li>nav2</li>
<li>nav3</li>
<li>nav4</li>
</ul>
</div>
<div style="float:left; width: 250px">
Lorem ipsum dolor sit amet, consectetur adipisicing elit,
sed do eiusmod tempor incididunt ut labore et dolore magna
....
</div>
![alt text][1]
[1]: http://involution.com/images/divlayout.png | 0 |
35,700 | 08/30/2008 05:30:24 | 356 | 08/05/2008 01:13:09 | 89 | 10 | Writing cross-platform apps in C | What things should be kept most in mind when writing cross-platform applications in C? Targeted platforms: 32-bit Intel based PC, Mac, and Linux. I'm especially looking for the type of versatility that Jungle Disk has in their USB desktop edition ( <http://www.jungledisk.com/desktop/download.aspx> )
What are tips and "gotchas" for this type of development? | c | cross-platform | 32bit | null | null | null | open | Writing cross-platform apps in C
===
What things should be kept most in mind when writing cross-platform applications in C? Targeted platforms: 32-bit Intel based PC, Mac, and Linux. I'm especially looking for the type of versatility that Jungle Disk has in their USB desktop edition ( <http://www.jungledisk.com/desktop/download.aspx> )
What are tips and "gotchas" for this type of development? | 0 |
35,707 | 08/30/2008 05:41:38 | 356 | 08/05/2008 01:13:09 | 89 | 10 | Decision making in distributed applications | With a distributed application, where you have lots of clients and one main server, should you:
- Make the clients dumb and the server smart: clients are fast and non-invasive. Business rules are needed in only 1 place
- Make the clients smart and the server dumb: take as much load as possible off of the server
Additional info:
- Clients collect tons of data about the computer they are on. The server must analyze all of this info to determine the health of these computers
- The owners of the client computers are temperamental and will shut down the clients if the client starts to consume too many resources (thus negating the purpose of the distributed app in helping diagnose problems) | distributed | null | null | null | null | null | open | Decision making in distributed applications
===
With a distributed application, where you have lots of clients and one main server, should you:
- Make the clients dumb and the server smart: clients are fast and non-invasive. Business rules are needed in only 1 place
- Make the clients smart and the server dumb: take as much load as possible off of the server
Additional info:
- Clients collect tons of data about the computer they are on. The server must analyze all of this info to determine the health of these computers
- The owners of the client computers are temperamental and will shut down the clients if the client starts to consume too many resources (thus negating the purpose of the distributed app in helping diagnose problems) | 0 |
35,709 | 08/30/2008 05:43:56 | 23 | 08/01/2008 12:11:43 | 60 | 6 | Change Active Sound Card on the Fly | I currently have speakers set up both in my office and in my living room, connected to my PC via two sound cards, and would like to switch the set of speakers I'm outputting to on the fly.
Anyone know an application or a windows API call that I can use to change the default sound output device? It is currently a bit of a pain to traverse the existing control panel system.
| windows | hardware | audio | null | null | null | open | Change Active Sound Card on the Fly
===
I currently have speakers set up both in my office and in my living room, connected to my PC via two sound cards, and would like to switch the set of speakers I'm outputting to on the fly.
Anyone know an application or a windows API call that I can use to change the default sound output device? It is currently a bit of a pain to traverse the existing control panel system.
| 0 |
35,720 | 08/30/2008 05:57:13 | 3,479 | 08/28/2008 18:04:39 | 11 | 2 | Getting started with SideShow Devices | Is there a recommendation for a hardware platform for developing/testing SideShow devices, or is the Emulator adequate? | hardware | windows-vista | emulator | null | null | null | open | Getting started with SideShow Devices
===
Is there a recommendation for a hardware platform for developing/testing SideShow devices, or is the Emulator adequate? | 0 |
35,721 | 08/30/2008 05:57:20 | 1,969 | 08/19/2008 16:03:19 | 303 | 19 | Seeking code highlighter recommendation for WordPress | Can anybody recommend a reliable and decently documented code highlighter for WordPress 2.6.1. I have tried Code Snippet by Roman Roan and Developer Formatter by Gilberto Saraiva. But they don't seem to work as described in the documentation and are mangling the code snippets instead of prettifying them. | php | wordpress | codehighlighter | geshi | null | 07/09/2012 15:52:06 | not constructive | Seeking code highlighter recommendation for WordPress
===
Can anybody recommend a reliable and decently documented code highlighter for WordPress 2.6.1. I have tried Code Snippet by Roman Roan and Developer Formatter by Gilberto Saraiva. But they don't seem to work as described in the documentation and are mangling the code snippets instead of prettifying them. | 4 |
35,722 | 08/30/2008 05:58:04 | 2,727 | 08/24/2008 18:23:21 | 21 | 2 | Desktop search utility for pdf,chm and djvu files | I want to write a tool that helps me search pdf/chm/djvu files in linux. Any pointers on how to go about it? The major problem is reading/importing data from all these files. Can this be done with C and shell scripting? | desktop-search | null | null | null | null | null | open | Desktop search utility for pdf,chm and djvu files
===
I want to write a tool that helps me search pdf/chm/djvu files in linux. Any pointers on how to go about it? The major problem is reading/importing data from all these files. Can this be done with C and shell scripting? | 0 |
35,727 | 08/30/2008 06:09:31 | 1,220 | 08/13/2008 13:44:48 | 927 | 67 | 101 tutorial for setting up nhibernate? | I am looking for a tutorial on setting up nhibernate.
There seems to be few out there, but most are either written in gibberish, or are on an extremely ancient release.
Any good resources, possibly even the inclusion of fluent or a code configured install? | nhibernate | tutorials | basic | fluent-interface | null | null | open | 101 tutorial for setting up nhibernate?
===
I am looking for a tutorial on setting up nhibernate.
There seems to be few out there, but most are either written in gibberish, or are on an extremely ancient release.
Any good resources, possibly even the inclusion of fluent or a code configured install? | 0 |
35,743 | 08/30/2008 06:48:47 | 3,677 | 08/29/2008 20:21:57 | 3 | 0 | FileUpload control inside an UpdatePanel without refreshing the whole page? | According to [Microsoft][1] the FileUpload control is not compatible with an AJAX UpdatePanel.
I am aware that a PostBackTrigger can be added to the submit button of the form like this:
<Triggers>
<asp:PostBackTrigger ControlID="Button1" />
</Triggers>
The problem is that this forces the form to perform a full post-back which voids out the whole point of using the UpdatePanel in the first place. Is there a workaround to this issue that does not cause the whole page to refresh?
[1]: http://msdn.microsoft.com/en-us/library/bb386454.aspx | .net | asp.net | ajax | updatepanel | file-upload | null | open | FileUpload control inside an UpdatePanel without refreshing the whole page?
===
According to [Microsoft][1] the FileUpload control is not compatible with an AJAX UpdatePanel.
I am aware that a PostBackTrigger can be added to the submit button of the form like this:
<Triggers>
<asp:PostBackTrigger ControlID="Button1" />
</Triggers>
The problem is that this forces the form to perform a full post-back which voids out the whole point of using the UpdatePanel in the first place. Is there a workaround to this issue that does not cause the whole page to refresh?
[1]: http://msdn.microsoft.com/en-us/library/bb386454.aspx | 0 |
35,745 | 08/30/2008 06:51:07 | 1,398 | 08/15/2008 06:32:35 | 233 | 18 | Are there any tools to visualize template/class methods and their usage? | I have taken over a large code base and would like to get an overview how and where certain classes and their methods are used.
Is there any good tool that can somehow visualize the dependencies and draw a nice call tree or something similar?
The code is in C++ in Visual Studio if that helps narrow down any selection. | visualization | null | null | null | null | null | open | Are there any tools to visualize template/class methods and their usage?
===
I have taken over a large code base and would like to get an overview how and where certain classes and their methods are used.
Is there any good tool that can somehow visualize the dependencies and draw a nice call tree or something similar?
The code is in C++ in Visual Studio if that helps narrow down any selection. | 0 |
35,748 | 08/30/2008 06:56:31 | 1,398 | 08/15/2008 06:32:35 | 233 | 18 | Is it possible to list named events in Windows? | I would like to create events for certain resources that are used across various processes and access these events by name. The problem seems to be that the names of the events must be known to all applications referring to them.
Is there maybe a way to get a list of names events in the system?
I am aware that I might use some standard names, but it seems rather inflexible with regard to future extensibility (all application would require a recompile). | windows | events | null | null | null | null | open | Is it possible to list named events in Windows?
===
I would like to create events for certain resources that are used across various processes and access these events by name. The problem seems to be that the names of the events must be known to all applications referring to them.
Is there maybe a way to get a list of names events in the system?
I am aware that I might use some standard names, but it seems rather inflexible with regard to future extensibility (all application would require a recompile). | 0 |
35,753 | 08/30/2008 07:08:22 | 3,373 | 08/28/2008 09:40:18 | 18 | 8 | Is Python good for big software projects (not web based)? | Right now I'm developing mostly in C/C++, but I wrote some small utilities in Python to automatize some tasks and I really love it as language (especially the productivity).
Except for the performances (a problem that could be sometimes solved thanks to the ease of interfacing Python with C modules), do you think it is proper for production use in the development of stand-alone complex applications (think for example to a word processor or a graphic tool)?
What IDE would you suggest? The IDLE provided with Python is not enough even for small projects in my opinion.
| python | ide | null | null | null | null | open | Is Python good for big software projects (not web based)?
===
Right now I'm developing mostly in C/C++, but I wrote some small utilities in Python to automatize some tasks and I really love it as language (especially the productivity).
Except for the performances (a problem that could be sometimes solved thanks to the ease of interfacing Python with C modules), do you think it is proper for production use in the development of stand-alone complex applications (think for example to a word processor or a graphic tool)?
What IDE would you suggest? The IDLE provided with Python is not enough even for small projects in my opinion.
| 0 |
35,762 | 08/30/2008 07:51:26 | 3,153 | 08/27/2008 02:45:05 | 56 | 4 | Linux GUI development | I have a large GUI project that I'd like to port to Linux.
What is the best framework to use for GUI programming in Linux? Should KDE / Gnome frameworks be used? Or can I use something more generic other than X?
I feel like if I chose one of Gnome or KDE, I'm closing the market out for a chunk of the Linux market who have chosen one over the other. (Yes I know there is overlap)
Is there a better way? Or would I have to create 2 complete GUI apps to have near 100% coverage? | linux | kde | gnome | c++ | gui | null | open | Linux GUI development
===
I have a large GUI project that I'd like to port to Linux.
What is the best framework to use for GUI programming in Linux? Should KDE / Gnome frameworks be used? Or can I use something more generic other than X?
I feel like if I chose one of Gnome or KDE, I'm closing the market out for a chunk of the Linux market who have chosen one over the other. (Yes I know there is overlap)
Is there a better way? Or would I have to create 2 complete GUI apps to have near 100% coverage? | 0 |
35,772 | 08/30/2008 08:16:37 | 3,710 | 08/30/2008 08:16:37 | 1 | 0 | How to embed user-specific data in .NET windows setup app at setup download time? | I'd like to have a link in my ASP.NET web site that authenticated users click to download a windows app that is already pre-configured with their client ID and some site config data. My goal is no typing required for the user during the client app install, both for the user friendliness, and to avoid config errors from mis-typed technical bits. Ideally I'd like the web server-side code to run as part of the ASP.NET app.
FogBugz seems to do something like this. There is a menu option within the web app to download a screenshot tool, and when you download and run the installer, it knows your particular FogBugz web address so it can send screenshots there. (Hey Joel, looking for a question to answer? hint hint) | .net | windows | installer | setup | fogbugz | null | open | How to embed user-specific data in .NET windows setup app at setup download time?
===
I'd like to have a link in my ASP.NET web site that authenticated users click to download a windows app that is already pre-configured with their client ID and some site config data. My goal is no typing required for the user during the client app install, both for the user friendliness, and to avoid config errors from mis-typed technical bits. Ideally I'd like the web server-side code to run as part of the ASP.NET app.
FogBugz seems to do something like this. There is a menu option within the web app to download a screenshot tool, and when you download and run the installer, it knows your particular FogBugz web address so it can send screenshots there. (Hey Joel, looking for a question to answer? hint hint) | 0 |
35,782 | 08/30/2008 08:26:43 | 1,131 | 08/12/2008 17:04:04 | 108 | 4 | Formatting tabular data using unicode characters | I need to produce a calculation trace file containing tabular data showing intermediate results. I am currently using a combination of the standard ascii pipe symbols (|) and dashes (-) to draw the table lines:
E.g.
Numerator | Denominator | Result
----------|-------------|-------
6 | 2 | 3
10 | 5 | 2
Are there any unicode characters that could be used to produce a more professional looking table?
(The file must be a raw text format and cannot use HTML or any other markup)
| unicode | null | null | null | null | null | open | Formatting tabular data using unicode characters
===
I need to produce a calculation trace file containing tabular data showing intermediate results. I am currently using a combination of the standard ascii pipe symbols (|) and dashes (-) to draw the table lines:
E.g.
Numerator | Denominator | Result
----------|-------------|-------
6 | 2 | 3
10 | 5 | 2
Are there any unicode characters that could be used to produce a more professional looking table?
(The file must be a raw text format and cannot use HTML or any other markup)
| 0 |
35,785 | 08/30/2008 08:33:01 | 3,583 | 08/29/2008 07:41:50 | 1 | 0 | XML serialization in Java? | Is there a (preferably free) Java analogue of .NET's XML serialization? | java | xml | serialization | null | null | null | open | XML serialization in Java?
===
Is there a (preferably free) Java analogue of .NET's XML serialization? | 0 |
35,790 | 08/30/2008 08:44:33 | 3,515 | 08/28/2008 22:05:40 | 1 | 0 | What XML books do you recommend? | XML is everywhere - I am looking for a book that would summarize some key aspects of practical use of XML with possible problems and solutions not a "XML bible" thing.
Thanks for feedback in advance!
| xml | books | case-study | null | null | null | open | What XML books do you recommend?
===
XML is everywhere - I am looking for a book that would summarize some key aspects of practical use of XML with possible problems and solutions not a "XML bible" thing.
Thanks for feedback in advance!
| 0 |
35,798 | 08/30/2008 08:55:43 | 184 | 08/03/2008 05:34:19 | 1,471 | 19 | Techniques to detect Polymorphic and Metamorphic viruses? | What techniques can be applied to detect [Polymorphic][1] and [Metamorphic][2] viruses?
How difficult is to implement these techniques?
Are these techniques being applied in modern day anti-virus softwares?
[1]: http://en.wikipedia.org/wiki/Computer_virus#Polymorphic_code
[2]: http://en.wikipedia.org/wiki/Computer_virus#Metamorphic_code | antivirus | virus | null | null | null | null | open | Techniques to detect Polymorphic and Metamorphic viruses?
===
What techniques can be applied to detect [Polymorphic][1] and [Metamorphic][2] viruses?
How difficult is to implement these techniques?
Are these techniques being applied in modern day anti-virus softwares?
[1]: http://en.wikipedia.org/wiki/Computer_virus#Polymorphic_code
[2]: http://en.wikipedia.org/wiki/Computer_virus#Metamorphic_code | 0 |
35,805 | 08/30/2008 09:12:41 | 3,154 | 08/27/2008 02:48:03 | 33 | 2 | Why is my instance variable not in __dict__? | If I create a class `A` as follows:
class A:
def _ _init_ _(self):
self.name = 'A'
Inspecting the `_ _dict_ _` member looks like `{'name': 'A'}`
If however I create a class `B`:
class B:
name = 'B'
`_ _dict_ _` is empty.
What is the difference between the two, and why doesn't `name` show up in `B`'s `_ _dict_ _`? | python | newbie | null | null | null | null | open | Why is my instance variable not in __dict__?
===
If I create a class `A` as follows:
class A:
def _ _init_ _(self):
self.name = 'A'
Inspecting the `_ _dict_ _` member looks like `{'name': 'A'}`
If however I create a class `B`:
class B:
name = 'B'
`_ _dict_ _` is empty.
What is the difference between the two, and why doesn't `name` show up in `B`'s `_ _dict_ _`? | 0 |
35,817 | 08/30/2008 09:27:24 | 3,715 | 08/30/2008 09:17:39 | 1 | 0 | What's the best way to escape os.system() calls in Python? | When using `os.system()` it's often necessary to escape filenames passed as parameters to commands. What's the best way to do this? Preferably something that would work on multiple operating systems/shells.
I'm currently doing the following, but am sure there must be a library function for this, or at least a more elegant/robust/efficient option:
def sh_escape(s):
return s.replace("(","\\(").replace(")","\\)").replace(" ","\\ ")
os.system("cat %s | grep something | sort > %s"
% (sh_escape(in_filename),
sh_escape(out_filename))) | python | bash | shell | os.system | null | null | open | What's the best way to escape os.system() calls in Python?
===
When using `os.system()` it's often necessary to escape filenames passed as parameters to commands. What's the best way to do this? Preferably something that would work on multiple operating systems/shells.
I'm currently doing the following, but am sure there must be a library function for this, or at least a more elegant/robust/efficient option:
def sh_escape(s):
return s.replace("(","\\(").replace(")","\\)").replace(" ","\\ ")
os.system("cat %s | grep something | sort > %s"
% (sh_escape(in_filename),
sh_escape(out_filename))) | 0 |
35,834 | 08/30/2008 09:46:06 | 1,493 | 08/12/2008 06:55:12 | 141 | 6 | Get a list of current windows, and give one of them focus, in .Net | Without resorting to PInvoke, is there a way in .net to find out what windows are open? This is slightly different than asking what applications are running in memory. For example, Firefox could be running, but could be more than one window. Basically, I just want to be privy to the same information that the taskbar (and alt-tab?) is.
Also, once I have a reference to a window, is there any way to programatically give it focus?
Is there any way to do this with managed code? | .net | windows | null | null | null | null | open | Get a list of current windows, and give one of them focus, in .Net
===
Without resorting to PInvoke, is there a way in .net to find out what windows are open? This is slightly different than asking what applications are running in memory. For example, Firefox could be running, but could be more than one window. Basically, I just want to be privy to the same information that the taskbar (and alt-tab?) is.
Also, once I have a reference to a window, is there any way to programatically give it focus?
Is there any way to do this with managed code? | 0 |
35,837 | 08/30/2008 09:48:27 | 3,713 | 08/30/2008 09:06:27 | 1 | 0 | What is the Difference Between Mercurial and Git? | I've been using git for some time now on Windows (with msysGit) and I like the idea of distributed source control. Just recently I've been looking at Mercurial (hg) and it looks interesting. However, I can't wrap my head around the differences between hg and git.
Has anyone made a side-by-side comparison between git and hg? I'm interested to know what differs hg and git without having to jump into a fanboy discussion. | git | comparison | mercurial | version-control | null | null | open | What is the Difference Between Mercurial and Git?
===
I've been using git for some time now on Windows (with msysGit) and I like the idea of distributed source control. Just recently I've been looking at Mercurial (hg) and it looks interesting. However, I can't wrap my head around the differences between hg and git.
Has anyone made a side-by-side comparison between git and hg? I'm interested to know what differs hg and git without having to jump into a fanboy discussion. | 0 |
35,842 | 08/30/2008 09:53:25 | 3,583 | 08/29/2008 07:41:50 | 7 | 5 | Process ID in Java | How do I get the id of my Java process? I know there are several platform-dependent hacks, but I'm after a generic solution. | java | pid | null | null | null | null | open | Process ID in Java
===
How do I get the id of my Java process? I know there are several platform-dependent hacks, but I'm after a generic solution. | 0 |
35,848 | 08/30/2008 10:01:31 | 2,528 | 08/22/2008 16:39:39 | 150 | 6 | VB.NET form Height Question |
I have a VB6.0 project and I want to convert it in VB.Net.
In my VB6.0 application some of the MDI Child form’s height is 17000 and width is 13000. Now I want to set the same form size in VB.Net forms, but it allows maximum form width = 1036, height = 780 for resolution 1024x768.
How can I increase form size with same resolution?
Also I want to print this from so, I can not use auto scroll property of vb.net forms.
Thaks | vb.net | null | null | null | null | null | open | VB.NET form Height Question
===
I have a VB6.0 project and I want to convert it in VB.Net.
In my VB6.0 application some of the MDI Child form’s height is 17000 and width is 13000. Now I want to set the same form size in VB.Net forms, but it allows maximum form width = 1036, height = 780 for resolution 1024x768.
How can I increase form size with same resolution?
Also I want to print this from so, I can not use auto scroll property of vb.net forms.
Thaks | 0 |
35,849 | 08/30/2008 10:02:20 | 3,717 | 08/30/2008 09:44:24 | 1 | 1 | What logging is good logging for your app? | So we've discussed logging in passing at my place of work and I was wondering if some of you guys here could give me some ideas of your approaches?
Typically our scenario is, no logging really at all, and mostly .NET apps, winforms/WPF clients talking through web services or direct to a db.
So, the real question is, where or what would you log? At the moment we have users reporting error messages - so I would assume log startups/shutdowns, exceptions...
Do you take it to calls to the web services or db? Page loads?
How do you get a good idea of what the user was trying to do at the time?
Is it better to go all the way and log everything across multiple attempts/days, or log only what you need to (given hdd is cheap).
I guess that's a few questions, but I wanted to get more of an idea of what the actual practice is out there in larger shops! | .net | logging | client-applications | null | null | null | open | What logging is good logging for your app?
===
So we've discussed logging in passing at my place of work and I was wondering if some of you guys here could give me some ideas of your approaches?
Typically our scenario is, no logging really at all, and mostly .NET apps, winforms/WPF clients talking through web services or direct to a db.
So, the real question is, where or what would you log? At the moment we have users reporting error messages - so I would assume log startups/shutdowns, exceptions...
Do you take it to calls to the web services or db? Page loads?
How do you get a good idea of what the user was trying to do at the time?
Is it better to go all the way and log everything across multiple attempts/days, or log only what you need to (given hdd is cheap).
I guess that's a few questions, but I wanted to get more of an idea of what the actual practice is out there in larger shops! | 0 |
35,853 | 08/30/2008 10:04:55 | 3,583 | 08/29/2008 07:41:50 | 12 | 5 | P/Invoke in Mono | What's the current status of Mono's Platform Invoke implementation on Linux? And on Solaris? | mono | .net | pinvoke | linux | solaris | null | open | P/Invoke in Mono
===
What's the current status of Mono's Platform Invoke implementation on Linux? And on Solaris? | 0 |
35,870 | 08/30/2008 10:34:05 | 3,725 | 08/30/2008 10:34:05 | 1 | 0 | Comparison of Lat, Long Coordinates | I have a list of more than 15 thousand latitude and longitude coordinates. Given any X,Y coordinates, what is the fastest way to find the closest coordinates on the list?
| sorting | comparison | null | null | null | null | open | Comparison of Lat, Long Coordinates
===
I have a list of more than 15 thousand latitude and longitude coordinates. Given any X,Y coordinates, what is the fastest way to find the closest coordinates on the list?
| 0 |
35,874 | 08/30/2008 10:45:56 | 2,935 | 08/26/2008 08:23:46 | 31 | 5 | How do you enforce or maintain the quality of the bug reports in your bug tracker? | High-quality bug reports are essential for effective bug tracking - in an ideal world all bug reports would contain essential information such as which version of the software it affects and a step-by-step description on how to reproduce the bug.
In reality, though, bugs reported can vary a lot in quality. They might be on-liners ("feature X doesn't work, fix it!"), feature requests, PEBKACs or unintelligble.
How do you enforce or maintain the quality of the bug reports in your bug tracker to stay effective? | bug-tracking | qa | development-process | null | null | null | open | How do you enforce or maintain the quality of the bug reports in your bug tracker?
===
High-quality bug reports are essential for effective bug tracking - in an ideal world all bug reports would contain essential information such as which version of the software it affects and a step-by-step description on how to reproduce the bug.
In reality, though, bugs reported can vary a lot in quality. They might be on-liners ("feature X doesn't work, fix it!"), feature requests, PEBKACs or unintelligble.
How do you enforce or maintain the quality of the bug reports in your bug tracker to stay effective? | 0 |
35,879 | 08/30/2008 11:01:31 | 115 | 08/02/2008 05:44:40 | 443 | 63 | Base64 Encoding Image | I am building an open search add-on for Firefox/IE and the image needs to be Base64 Encoded so how can I base 64 encode the favicon I have?
I am only familiar with PHP | php | encoding | base64 | opensearch | null | null | open | Base64 Encoding Image
===
I am building an open search add-on for Firefox/IE and the image needs to be Base64 Encoded so how can I base 64 encode the favicon I have?
I am only familiar with PHP | 0 |
35,893 | 08/30/2008 11:22:42 | 3,730 | 08/30/2008 11:22:42 | 1 | 0 | Grid controls compatible with .NET and Mono? | Do you know any grid control compatible with .NET and Mono?
DataGridView seems to be quite buggy on Mono, and GTK# controls depends on GTK+ so you need to install it in windows machines where, usually, it's not present. | c# | controls | mono | datagrid | null | null | open | Grid controls compatible with .NET and Mono?
===
Do you know any grid control compatible with .NET and Mono?
DataGridView seems to be quite buggy on Mono, and GTK# controls depends on GTK+ so you need to install it in windows machines where, usually, it's not present. | 0 |
35,896 | 08/30/2008 11:33:55 | 3,205 | 08/27/2008 13:06:13 | 152 | 13 | How can I play compressed sound files in C# in a portable way? | Is there a portable, not patent-restricted way to play compressed sound files in C# / .Net? <a href="http://msdn.microsoft.com/en-us/library/system.media.soundplayer.aspx">System.Media.SoundPlayer</a> can handle only WAV, but those are typically to big to embed in a downloadable apllication. MP3 is protected with patents, so even if there was a fully managed decoder/player it wouldn't be free to redistribute. The best format available would seem to be OGG Vorbis, but I had no luck getting any C# Vorbis libraries to work (I managed to extract a raw PCM with <a href="http://anonsvn.mono-project.com/source/trunk/csvorbis/">csvorbis</a> but I don't know how to play it afterwards).
I neither want to distribute any binaries with my application nor depend on P/Invoke, as the project should run at least on Windows and Linux. I'm fine with bundling .Net assemblies as long as they are license-compatible with GPL.
[this question is a follow up to a <a href="http://lists.ximian.com/pipermail/mono-devel-list/2007-June/023863.html">mailing list discussion on mono-dev</a> mailing list a year ago] | c# | .net | mono | oggvorbis | audio | null | open | How can I play compressed sound files in C# in a portable way?
===
Is there a portable, not patent-restricted way to play compressed sound files in C# / .Net? <a href="http://msdn.microsoft.com/en-us/library/system.media.soundplayer.aspx">System.Media.SoundPlayer</a> can handle only WAV, but those are typically to big to embed in a downloadable apllication. MP3 is protected with patents, so even if there was a fully managed decoder/player it wouldn't be free to redistribute. The best format available would seem to be OGG Vorbis, but I had no luck getting any C# Vorbis libraries to work (I managed to extract a raw PCM with <a href="http://anonsvn.mono-project.com/source/trunk/csvorbis/">csvorbis</a> but I don't know how to play it afterwards).
I neither want to distribute any binaries with my application nor depend on P/Invoke, as the project should run at least on Windows and Linux. I'm fine with bundling .Net assemblies as long as they are license-compatible with GPL.
[this question is a follow up to a <a href="http://lists.ximian.com/pipermail/mono-devel-list/2007-June/023863.html">mailing list discussion on mono-dev</a> mailing list a year ago] | 0 |
35,905 | 08/30/2008 11:53:01 | 3,715 | 08/30/2008 09:17:39 | 11 | 1 | How do I autorun an application in a terminal in Ubuntu? | I've created a few `autorun` script files on various USB devices that run `bash` scripts when they mount. These scripts run "in the background", how do I get them to run in a terminal window? (Like the "Application in Terminal" gnome Launcher type.) | bash | ubuntu | gnome | autorun | null | null | open | How do I autorun an application in a terminal in Ubuntu?
===
I've created a few `autorun` script files on various USB devices that run `bash` scripts when they mount. These scripts run "in the background", how do I get them to run in a terminal window? (Like the "Application in Terminal" gnome Launcher type.) | 0 |
35,907 | 08/30/2008 11:57:41 | 3,732 | 08/30/2008 11:57:41 | 1 | 0 | 3rd Party UI components for .net Compact Framework? | I have a .Net compact framework application with a frankly unimpressive UI.
My win32 app uses Dev Express components and looks great, but I can't find anything similar for the compact framework.
Can anyone recommend components that will jazz up my UI?
Does such a thing exist, oram I going to have to owner draw my components or even worse use native code? | compactframework | null | null | null | null | null | open | 3rd Party UI components for .net Compact Framework?
===
I have a .Net compact framework application with a frankly unimpressive UI.
My win32 app uses Dev Express components and looks great, but I can't find anything similar for the compact framework.
Can anyone recommend components that will jazz up my UI?
Does such a thing exist, oram I going to have to owner draw my components or even worse use native code? | 0 |
35,914 | 08/30/2008 12:10:50 | 2,258 | 08/21/2008 11:31:56 | 71 | 7 | In .NET, how do I launch a file with command line arguments (without knowing the location of the exe)? | Here's the situation: I am trying to launch an application, but the location of the .exe isn't known to me. Now, if the file extension is registered (in Windows), I can do something like:
Process.Start("Sample.xls");
However, I need to pass some command line arguments as well. I couldn't get this to work
Process p = new Process();
p.StartInfo.FileName = "Sample.xls";
p.StartInfo.Arguments = "/r"; // open in read-only mode
p.Start();
Any suggestions on a mechanism to solve this? | c# | .net | vb.net | null | null | null | open | In .NET, how do I launch a file with command line arguments (without knowing the location of the exe)?
===
Here's the situation: I am trying to launch an application, but the location of the .exe isn't known to me. Now, if the file extension is registered (in Windows), I can do something like:
Process.Start("Sample.xls");
However, I need to pass some command line arguments as well. I couldn't get this to work
Process p = new Process();
p.StartInfo.FileName = "Sample.xls";
p.StartInfo.Arguments = "/r"; // open in read-only mode
p.Start();
Any suggestions on a mechanism to solve this? | 0 |
35,922 | 08/30/2008 12:19:01 | 745 | 08/08/2008 13:47:26 | 348 | 33 | Are there any "nice to program" GUI toolkits for Python? | I've played around with GTK, TK, wxPython, Cocoa, curses and others. They are are fairly horrible to use.. GTK/TK/wx/curses all seem to basically be direct-ports of the appropriate C libraries, and Cocoa basically mandates using both PyObjC and Interface Builder, both of which I dislike..
The Shoes GUI library for Ruby is great.. It's very sensibly designed, and very "rubyish", and borrows some nice-to-use things from web development (like using hex colours codes, or `:color => rgb(128,0,0)`)
As the title says: are there any nice, "Pythonic" GUI toolkits? | python | gui | null | null | null | null | open | Are there any "nice to program" GUI toolkits for Python?
===
I've played around with GTK, TK, wxPython, Cocoa, curses and others. They are are fairly horrible to use.. GTK/TK/wx/curses all seem to basically be direct-ports of the appropriate C libraries, and Cocoa basically mandates using both PyObjC and Interface Builder, both of which I dislike..
The Shoes GUI library for Ruby is great.. It's very sensibly designed, and very "rubyish", and borrows some nice-to-use things from web development (like using hex colours codes, or `:color => rgb(128,0,0)`)
As the title says: are there any nice, "Pythonic" GUI toolkits? | 0 |
35,940 | 08/30/2008 12:53:58 | 3,394 | 08/28/2008 12:35:39 | 433 | 33 | Elegant Snippets of F# | I'm currently learning F# quite intensively. I really love it as a language, it just sort of 'feels' right and seems to allow you to produce some succint elegant code.
I'm interested in finding some really nice 'wow factor' snippets of F# code which demonstate the elegence of the language, especially compared to C#. For example I really like:-
<pre>
#light
let ListProduct l = List.fold_left (*) 1 l
</pre>
Which inputs a list of ints and multiplies each element in the list, i.e. obtains the product of the list (e.g. a list of 1,2,3 would be calculated as 1*2*3=6). The closest C# equivilent, using LINQ and functional concepts as as follows:-
using System;
using System.Collections.Generic;
using System.Linq;
...
public static class ListHelper {
public static int ListProduct(List<int> l) {
return l.Aggregate(1, (i, j) => i * j);
}
}
Before LINQ that would have been:-
using System;
using System.Collections.Generic;
...
public static class ListHelper {
public static int ListProduct(List<int> l) {
int ret = 1;
foreach (int i in l) ret *= i;
return ret;
}
}
I'm certainly not trying to criticise C# here, I think it's a wonderful language, it's just nice to see how F# compares and to see how it can do some things more elegantly - does anyone have anything really nice? | f# | null | null | null | null | null | open | Elegant Snippets of F#
===
I'm currently learning F# quite intensively. I really love it as a language, it just sort of 'feels' right and seems to allow you to produce some succint elegant code.
I'm interested in finding some really nice 'wow factor' snippets of F# code which demonstate the elegence of the language, especially compared to C#. For example I really like:-
<pre>
#light
let ListProduct l = List.fold_left (*) 1 l
</pre>
Which inputs a list of ints and multiplies each element in the list, i.e. obtains the product of the list (e.g. a list of 1,2,3 would be calculated as 1*2*3=6). The closest C# equivilent, using LINQ and functional concepts as as follows:-
using System;
using System.Collections.Generic;
using System.Linq;
...
public static class ListHelper {
public static int ListProduct(List<int> l) {
return l.Aggregate(1, (i, j) => i * j);
}
}
Before LINQ that would have been:-
using System;
using System.Collections.Generic;
...
public static class ListHelper {
public static int ListProduct(List<int> l) {
int ret = 1;
foreach (int i in l) ret *= i;
return ret;
}
}
I'm certainly not trying to criticise C# here, I think it's a wonderful language, it's just nice to see how F# compares and to see how it can do some things more elegantly - does anyone have anything really nice? | 0 |
35,943 | 08/30/2008 13:08:07 | 1,384,652 | 08/01/2008 12:01:23 | 1,713 | 83 | Logging in a PHP webapp | I want to keep logs of some things that people do in my app, in some cases so that it can be undone if needed.
Is it best to store such logs in a file or a database? I'm completely at a loss as to what the pros and cons are except that it's another table to setup.
Is there a third (or fourth etc) option that I'm not aware of that I should look into and learn about? | php | logging | null | null | null | null | open | Logging in a PHP webapp
===
I want to keep logs of some things that people do in my app, in some cases so that it can be undone if needed.
Is it best to store such logs in a file or a database? I'm completely at a loss as to what the pros and cons are except that it's another table to setup.
Is there a third (or fourth etc) option that I'm not aware of that I should look into and learn about? | 0 |
35,948 | 08/30/2008 13:20:02 | 3,117 | 08/26/2008 18:40:00 | 16 | 1 | Django Templates and variable attributes. | I'm using Google App Engine and Django Templates.<br>
I have a table that I want to display the objects look something like:<br>
Object Result:
Items = [item1,item2]
Users = [{name='username',item1=3,item2=4},..]
The django template is:
<table>
<tr align="center">
<th>user</th>
{% for item in result.items %}
<th>{{item}}</th>
{% endfor %}
</tr>
{% for user in result.users %}
<tr align="center">
<td>{{user.name}}</td>
{% for item in result.items %}
<td>{{ user.item }}</td>
{% endfor %}
</tr>
{% endfor %}
</table>
</code>
now the [django manual](http://www.djangoproject.com/documentation/0.96/templates/#variables) states that when it sees a **.** in variables<br>
it tries several things to get the data, one of which is dictionary lookup which is exactly what I want but doesn't seem to happen... | python | django | google-app-engine | null | null | null | open | Django Templates and variable attributes.
===
I'm using Google App Engine and Django Templates.<br>
I have a table that I want to display the objects look something like:<br>
Object Result:
Items = [item1,item2]
Users = [{name='username',item1=3,item2=4},..]
The django template is:
<table>
<tr align="center">
<th>user</th>
{% for item in result.items %}
<th>{{item}}</th>
{% endfor %}
</tr>
{% for user in result.users %}
<tr align="center">
<td>{{user.name}}</td>
{% for item in result.items %}
<td>{{ user.item }}</td>
{% endfor %}
</tr>
{% endfor %}
</table>
</code>
now the [django manual](http://www.djangoproject.com/documentation/0.96/templates/#variables) states that when it sees a **.** in variables<br>
it tries several things to get the data, one of which is dictionary lookup which is exactly what I want but doesn't seem to happen... | 0 |
35,950 | 08/30/2008 13:20:42 | 3,373 | 08/28/2008 09:40:18 | 33 | 7 | I don't understand std::tr1::unordered_map | I need an associative container that makes me index a certain object through a string, but that also keeps the order of insertion, so I can look for a specific object by its name or just iterate on it and retrieve objects in the same order I inserted them.
I think this [hybrid of linked list and hash map][1] should do the job, but before I tried to use std::tr1::unordered_map thinking that it was working in that way I described, but it wasn't. So could someone explain me the meaning and behavior of unordered_map?
[1]: http://www.ddj.com/cpp/184406207 | c++ | unordered-map | null | null | null | null | open | I don't understand std::tr1::unordered_map
===
I need an associative container that makes me index a certain object through a string, but that also keeps the order of insertion, so I can look for a specific object by its name or just iterate on it and retrieve objects in the same order I inserted them.
I think this [hybrid of linked list and hash map][1] should do the job, but before I tried to use std::tr1::unordered_map thinking that it was working in that way I described, but it wasn't. So could someone explain me the meaning and behavior of unordered_map?
[1]: http://www.ddj.com/cpp/184406207 | 0 |
35,954 | 08/30/2008 13:31:17 | 372 | 08/05/2008 09:16:41 | 2,283 | 169 | How do you full-text search multiple criteria on left-joined tables in SQL Server? | I have a query that originally looks like this:
select c.Id, c.Name, c.CountryCode, c.CustomerNumber, cacc.AccountNumber, ca.Line1, ca.CityName, ca.PostalCode
from dbo.Customer as c
left join dbo.CustomerAddress as ca on ca.CustomerId = c.Id
left join dbo.CustomerAccount as cacc on cacc.CustomerId = c.Id
where c.CountryCode = 'XX' and (cacc.AccountNumber like '%C17%' or c.Name like '%op%'
or ca.Line1 like '%ae%' or ca.CityName like '%ab%' or ca.PostalCode like '%10%')
On a database with 90,000 records this query takes around 7 seconds to execute (obviously all the joins and likes are taxing).
I have been trying to find a way to bring the query execution time down with full-text search on the columns concerned. However, I haven't seen an example of a full-text search that has three table joins like this, especially since my join condition is not part of the search term.
Is there a way to do this in full-text search? | sql-server | full-text-search | null | null | null | null | open | How do you full-text search multiple criteria on left-joined tables in SQL Server?
===
I have a query that originally looks like this:
select c.Id, c.Name, c.CountryCode, c.CustomerNumber, cacc.AccountNumber, ca.Line1, ca.CityName, ca.PostalCode
from dbo.Customer as c
left join dbo.CustomerAddress as ca on ca.CustomerId = c.Id
left join dbo.CustomerAccount as cacc on cacc.CustomerId = c.Id
where c.CountryCode = 'XX' and (cacc.AccountNumber like '%C17%' or c.Name like '%op%'
or ca.Line1 like '%ae%' or ca.CityName like '%ab%' or ca.PostalCode like '%10%')
On a database with 90,000 records this query takes around 7 seconds to execute (obviously all the joins and likes are taxing).
I have been trying to find a way to bring the query execution time down with full-text search on the columns concerned. However, I haven't seen an example of a full-text search that has three table joins like this, especially since my join condition is not part of the search term.
Is there a way to do this in full-text search? | 0 |
35,973 | 08/30/2008 14:13:17 | 3,740 | 08/30/2008 13:51:36 | 1 | 0 | add preddefined data for typedef enums in c |
What is the best approach to define additional data for typedef enums in C?
Example:
typedef enum {
kVizsla = 0,
kTerrier = 3,
kYellowLab = 10
} DogType;
Now I would like to define names for each, for example kVizsla should be "vizsla".
I currently use a function that returns a srting using a large switch block.
| c | enum | typedef | null | null | null | open | add preddefined data for typedef enums in c
===
What is the best approach to define additional data for typedef enums in C?
Example:
typedef enum {
kVizsla = 0,
kTerrier = 3,
kYellowLab = 10
} DogType;
Now I would like to define names for each, for example kVizsla should be "vizsla".
I currently use a function that returns a srting using a large switch block.
| 0 |
35,974 | 08/30/2008 14:14:44 | 3,742 | 08/30/2008 14:08:11 | 1 | 0 | Embed Images in emails created using SQL Server Database Mail | I'm working on an email solution in SQL Server ONLY that will use Database Mail to send out HTML formatted emails. The catch is that the images in the HTML need to be embedded in the outgoing email. This wouldn't be a problem if I were using a .net app to generate & send the emails but, unfortunately, all I have is SQL Server.
Is it possible for SQL Server to embed images on its own? | sql | database | email | server | null | null | open | Embed Images in emails created using SQL Server Database Mail
===
I'm working on an email solution in SQL Server ONLY that will use Database Mail to send out HTML formatted emails. The catch is that the images in the HTML need to be embedded in the outgoing email. This wouldn't be a problem if I were using a .net app to generate & send the emails but, unfortunately, all I have is SQL Server.
Is it possible for SQL Server to embed images on its own? | 0 |
35,983 | 08/30/2008 14:22:55 | 1,431 | 08/15/2008 15:31:33 | 177 | 6 | Rollbacking bad changes with svn in Eclipse | Let's say I have committed some bad changes to Subversion repository. Then I commit good changes, that I want to keep.
What would be easiest way to roll back those bad changes in Eclipse, and keep the good changes? Assuming that files relating to bad changes are not same as those relating to the good changes. How things change if good changes were made to same files as bad changes?
I am mostly looking a way to do this via Eclipse plugins (Subclipse or Subversive) but commandline commands are also interesting.
| svn | eclipse | sublicpse | subversive | null | null | open | Rollbacking bad changes with svn in Eclipse
===
Let's say I have committed some bad changes to Subversion repository. Then I commit good changes, that I want to keep.
What would be easiest way to roll back those bad changes in Eclipse, and keep the good changes? Assuming that files relating to bad changes are not same as those relating to the good changes. How things change if good changes were made to same files as bad changes?
I am mostly looking a way to do this via Eclipse plugins (Subclipse or Subversive) but commandline commands are also interesting.
| 0 |
35,988 | 08/30/2008 14:33:25 | 3,738 | 08/30/2008 13:31:42 | 1 | 3 | C-like structures in Python | Is there a way to conveniently define a C-like structure in Python? I'm tired of writing stuff like:
class MyStruct():
def __init__(self, field1, field2, field3)
self.field1 = field1
self.field2 = field2
self.field3 = field3
(Interesting, it appears I can't type underscores following non-whitespace in pre-formatted text blocks)
| python | struct | null | null | null | null | open | C-like structures in Python
===
Is there a way to conveniently define a C-like structure in Python? I'm tired of writing stuff like:
class MyStruct():
def __init__(self, field1, field2, field3)
self.field1 = field1
self.field2 = field2
self.field3 = field3
(Interesting, it appears I can't type underscores following non-whitespace in pre-formatted text blocks)
| 0 |
35,991 | 08/30/2008 14:36:39 | 2,841 | 08/25/2008 13:38:48 | 111 | 10 | Altering database tables in Django | I'm considering using Django for a project I'm starting (fyi, a browser-based game) and one of the features I'm liking the most is using `syncdb` to automatically create the database tables based on the Django models I define (a feature that I can't seem to find in any other framework).
I was already thinking this was too good to be true when I saw this in the [documentation][1]:
> Syncdb will not alter existing tables
> syncdb will only create tables for models which have not yet been installed. It will never issue ALTER TABLE statements to match changes made to a model class after installation. Changes to model classes and database schemas often involve some form of ambiguity and, in those cases, Django would have to guess at the correct changes to make. There is a risk that critical data would be lost in the process.
> If you have made changes to a model and wish to alter the database tables to match, use the sql command to display the new SQL structure and compare that to your existing table schema to work out the changes.
It seems that altering existing tables will have to be done "by hand".
What I would like to know is the best way to do this. Two solutions come to mind:
- As the documentation suggests, make the changes manually in the DB;
- Do a backup of the database, wipe it, create the tables again (with syncdb, since now it's creating the tables from scratch) and import the backed-up data (this might take too long if the database is big)
Any ideas?
[1]: http://www.djangoproject.com/documentation/django-admin/ | database | django | null | null | null | null | open | Altering database tables in Django
===
I'm considering using Django for a project I'm starting (fyi, a browser-based game) and one of the features I'm liking the most is using `syncdb` to automatically create the database tables based on the Django models I define (a feature that I can't seem to find in any other framework).
I was already thinking this was too good to be true when I saw this in the [documentation][1]:
> Syncdb will not alter existing tables
> syncdb will only create tables for models which have not yet been installed. It will never issue ALTER TABLE statements to match changes made to a model class after installation. Changes to model classes and database schemas often involve some form of ambiguity and, in those cases, Django would have to guess at the correct changes to make. There is a risk that critical data would be lost in the process.
> If you have made changes to a model and wish to alter the database tables to match, use the sql command to display the new SQL structure and compare that to your existing table schema to work out the changes.
It seems that altering existing tables will have to be done "by hand".
What I would like to know is the best way to do this. Two solutions come to mind:
- As the documentation suggests, make the changes manually in the DB;
- Do a backup of the database, wipe it, create the tables again (with syncdb, since now it's creating the tables from scratch) and import the backed-up data (this might take too long if the database is big)
Any ideas?
[1]: http://www.djangoproject.com/documentation/django-admin/ | 0 |
35,999 | 08/30/2008 14:45:47 | 572 | 08/06/2008 20:56:54 | 2,221 | 186 | How do I execute a file in Cygwin? | I created a C file in Eclipse on Windows and then used Cygwin to navigate to the directory. I called gcc on the C source file and a.exe was produced. How do I execute a.exe in the Cygwin shell? | c | gcc | cygwin | null | null | null | open | How do I execute a file in Cygwin?
===
I created a C file in Eclipse on Windows and then used Cygwin to navigate to the directory. I called gcc on the C source file and a.exe was produced. How do I execute a.exe in the Cygwin shell? | 0 |
36,001 | 08/30/2008 14:48:38 | 3,747 | 08/30/2008 14:33:59 | 1 | 0 | SQL Server 2005 Auto Updated DateTime Column - LastUpdated | I have a table defined (see code snippet below). How can I add a constraint or whatever so that the LastUpdate column is automatically updated anytime the row is changed?
CREATE TABLE dbo.Profiles
(
UserName varchar(100) NOT NULL,
LastUpdate datetime NOT NULL CONSTRAINT DF_Profiles_LastUpdate DEFAULT (getdate()),
FullName varchar(50) NOT NULL,
Birthdate smalldatetime NULL,
PageSize int NOT NULL CONSTRAINT DF_Profiles_PageSize DEFAULT ((10)),
CONSTRAINT PK_Profiles PRIMARY KEY CLUSTERED (UserName ASC),
CONSTRAINT FK_Profils_Users FOREIGN KEY (UserName) REFERENCES dbo.Users (UserName) ON UPDATE CASCADE ON DELETE CASCADE
) | sql-server | null | null | null | null | null | open | SQL Server 2005 Auto Updated DateTime Column - LastUpdated
===
I have a table defined (see code snippet below). How can I add a constraint or whatever so that the LastUpdate column is automatically updated anytime the row is changed?
CREATE TABLE dbo.Profiles
(
UserName varchar(100) NOT NULL,
LastUpdate datetime NOT NULL CONSTRAINT DF_Profiles_LastUpdate DEFAULT (getdate()),
FullName varchar(50) NOT NULL,
Birthdate smalldatetime NULL,
PageSize int NOT NULL CONSTRAINT DF_Profiles_PageSize DEFAULT ((10)),
CONSTRAINT PK_Profiles PRIMARY KEY CLUSTERED (UserName ASC),
CONSTRAINT FK_Profils_Users FOREIGN KEY (UserName) REFERENCES dbo.Users (UserName) ON UPDATE CASCADE ON DELETE CASCADE
) | 0 |
36,014 | 08/30/2008 14:57:13 | 3,347 | 08/28/2008 03:11:14 | 1 | 2 | Why is .NET exception not caught by try/catch block? | I'm working on a project using the [ANTLR][1] parser library for C#. I've built a grammar to parse some text and it works well. However, when the parser comes across an illegal or unexpected token, it throws one of many exceptions. The problem is that in some cases (not all) that my try/catch block won't catch it and instead stops execution as an unhandled exception.
The issue for me is that I can't replicate this issue anywhere else but in my full code. The call stack shows that the exception definitely occurs within my try/catch(Exception) block. The only thing I can think of is that there are a few ANTLR assembly calls that occur between my code and the code throwing the exception and this library does not have debugging enabled, so I can't step through it. I wonder if non-debuggable assemblies inhibit exception bubbling? The call stack looks like this; external assembly calls are in Antlr.Runtime:
Expl.Itinerary.dll!TimeDefLexer.mTokens() Line 1213 C#
Antlr3.Runtime.dll!Antlr.Runtime.Lexer.NextToken() + 0xfc bytes
Antlr3.Runtime.dll!Antlr.Runtime.CommonTokenStream.FillBuffer() + 0x22c bytes
Antlr3.Runtime.dll!Antlr.Runtime.CommonTokenStream.LT(int k = 1) + 0x68 bytes
Expl.Itinerary.dll!TimeDefParser.prog() Line 109 + 0x17 bytes C#
Expl.Itinerary.dll!Expl.Itinerary.TDLParser.Parse(string Text = "", Expl.Itinerary.IItinerary Itinerary = {Expl.Itinerary.MemoryItinerary}) Line 17 + 0xa bytes C#
The code snippet from the bottom-most call in Parse() looks like:
try {
// Execution stopped at parser.prog()
TimeDefParser.prog_return prog_ret = parser.prog();
return prog_ret == null ? null : prog_ret.value;
}
catch (Exception ex) {
throw new ParserException(ex.Message, ex);
}
To me, a catch (Exception) clause should've captured any exception whatsoever. Is there any reason why it wouldn't?
[1]: http://antlr.org | c# | .net | exception | null | null | null | open | Why is .NET exception not caught by try/catch block?
===
I'm working on a project using the [ANTLR][1] parser library for C#. I've built a grammar to parse some text and it works well. However, when the parser comes across an illegal or unexpected token, it throws one of many exceptions. The problem is that in some cases (not all) that my try/catch block won't catch it and instead stops execution as an unhandled exception.
The issue for me is that I can't replicate this issue anywhere else but in my full code. The call stack shows that the exception definitely occurs within my try/catch(Exception) block. The only thing I can think of is that there are a few ANTLR assembly calls that occur between my code and the code throwing the exception and this library does not have debugging enabled, so I can't step through it. I wonder if non-debuggable assemblies inhibit exception bubbling? The call stack looks like this; external assembly calls are in Antlr.Runtime:
Expl.Itinerary.dll!TimeDefLexer.mTokens() Line 1213 C#
Antlr3.Runtime.dll!Antlr.Runtime.Lexer.NextToken() + 0xfc bytes
Antlr3.Runtime.dll!Antlr.Runtime.CommonTokenStream.FillBuffer() + 0x22c bytes
Antlr3.Runtime.dll!Antlr.Runtime.CommonTokenStream.LT(int k = 1) + 0x68 bytes
Expl.Itinerary.dll!TimeDefParser.prog() Line 109 + 0x17 bytes C#
Expl.Itinerary.dll!Expl.Itinerary.TDLParser.Parse(string Text = "", Expl.Itinerary.IItinerary Itinerary = {Expl.Itinerary.MemoryItinerary}) Line 17 + 0xa bytes C#
The code snippet from the bottom-most call in Parse() looks like:
try {
// Execution stopped at parser.prog()
TimeDefParser.prog_return prog_ret = parser.prog();
return prog_ret == null ? null : prog_ret.value;
}
catch (Exception ex) {
throw new ParserException(ex.Message, ex);
}
To me, a catch (Exception) clause should've captured any exception whatsoever. Is there any reason why it wouldn't?
[1]: http://antlr.org | 0 |
36,019 | 08/30/2008 15:00:37 | 3,736 | 08/30/2008 12:49:28 | 35 | 5 | Deleting messages from Exchange IMAP mailbox on iPhone | I have a secondary Exchange mailbox configured on my iPhone using IMAP. This all appears to work fine except when a message is deleted on the phone, it still shows normally in Outlook. It does not seem to matter what I set the "remove deleted messages" setting to on the phone.
I understand this is due to a combination of the phone not expunging the deleted messages and Exchange showing deleted but not expunged messages in Outlook.
I'm looking for an automated solution to this that does not have a large delay between deleting the message on the phone and it disappearing in Outlook. The message should also show in the Deleted Items when deleted from the phone. | iphone | exchange | imap | null | null | null | open | Deleting messages from Exchange IMAP mailbox on iPhone
===
I have a secondary Exchange mailbox configured on my iPhone using IMAP. This all appears to work fine except when a message is deleted on the phone, it still shows normally in Outlook. It does not seem to matter what I set the "remove deleted messages" setting to on the phone.
I understand this is due to a combination of the phone not expunging the deleted messages and Exchange showing deleted but not expunged messages in Outlook.
I'm looking for an automated solution to this that does not have a large delay between deleting the message on the phone and it disappearing in Outlook. The message should also show in the Deleted Items when deleted from the phone. | 0 |
36,022 | 08/30/2008 15:05:05 | 335,696 | 08/30/2008 00:40:13 | 8 | 3 | Single Best hardwear upgrade for the money? | If you could upgrade one piece of hardware on your coding machine what would it be? | hardware | workspace | null | null | null | null | open | Single Best hardwear upgrade for the money?
===
If you could upgrade one piece of hardware on your coding machine what would it be? | 0 |
36,028 | 08/30/2008 15:09:06 | 3,747 | 08/30/2008 14:33:59 | 1 | 0 | How to assign a method's output to a textbox value without code behind | How do I assign a method's output to a textbox value without code behind?
<%@ Page Language="VB" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
Public TextFromString As String = "test text test text"
Public TextFromMethod As String = RepeatChar("S", 50) 'SubSonic.Sugar.Web.GenerateLoremIpsum(400, "w")
Public Function RepeatChar(ByVal Input As String, ByVal Count As Integer)
Return New String(Input, Count)
End Function
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>Test Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<%=TextFromString%>
<br />
<asp:TextBox ID="TextBox1" runat="server" Text="<%# TextFromString %>"></asp:TextBox>
<br />
<%=TextFromMethod%>
<br />
<asp:TextBox ID="TextBox2" runat="server" Text="<%# TextFromMethod %>"></asp:TextBox>
</div>
</form>
</body>
</html> | vb.net | null | null | null | null | null | open | How to assign a method's output to a textbox value without code behind
===
How do I assign a method's output to a textbox value without code behind?
<%@ Page Language="VB" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
Public TextFromString As String = "test text test text"
Public TextFromMethod As String = RepeatChar("S", 50) 'SubSonic.Sugar.Web.GenerateLoremIpsum(400, "w")
Public Function RepeatChar(ByVal Input As String, ByVal Count As Integer)
Return New String(Input, Count)
End Function
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>Test Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<%=TextFromString%>
<br />
<asp:TextBox ID="TextBox1" runat="server" Text="<%# TextFromString %>"></asp:TextBox>
<br />
<%=TextFromMethod%>
<br />
<asp:TextBox ID="TextBox2" runat="server" Text="<%# TextFromMethod %>"></asp:TextBox>
</div>
</form>
</body>
</html> | 0 |
36,030 | 08/30/2008 15:15:01 | 3,750 | 08/30/2008 14:43:09 | 1 | 0 | Yaws uses old config file | I'm developing a web app on Yaws 1.65 (installed through apt) running on Debian etch on a VPS with UML. Whenever I do /etc/init.d/yaws restart or a stop/start, it initializes according to an old version of the config file (/etc/yaws/yaws.conf).
I know this because I changed the docroot from the default to another directory (call it A), then a few weeks later changed it to directory B, and the config file has stayed with B for the last several months. But then, after a restart, it switches back to A. If it switched back to the package default, that would be understandable, but it switches to an old customized version instead.
The funny thing is that if I leave it stopped for several minutes, when I start it again, everything switches back to normal (using directory B). But while it's stopped, if I run ps, I don't see any yaws-related processes (yaws, heart, etc). This problem has survived several reboots, so it's got to be an old cached copy of the config somewhere, but I have yet to find anything like that.
Any idea what could be going on? | yaws | null | null | null | null | null | open | Yaws uses old config file
===
I'm developing a web app on Yaws 1.65 (installed through apt) running on Debian etch on a VPS with UML. Whenever I do /etc/init.d/yaws restart or a stop/start, it initializes according to an old version of the config file (/etc/yaws/yaws.conf).
I know this because I changed the docroot from the default to another directory (call it A), then a few weeks later changed it to directory B, and the config file has stayed with B for the last several months. But then, after a restart, it switches back to A. If it switched back to the package default, that would be understandable, but it switches to an old customized version instead.
The funny thing is that if I leave it stopped for several minutes, when I start it again, everything switches back to normal (using directory B). But while it's stopped, if I run ps, I don't see any yaws-related processes (yaws, heart, etc). This problem has survived several reboots, so it's got to be an old cached copy of the config somewhere, but I have yet to find anything like that.
Any idea what could be going on? | 0 |
36,039 | 08/30/2008 15:27:34 | 4,381 | 09/03/2008 10:48:17 | 1 | 1 | Templates spread across multiple files | C++ seems to be rather grouchy when declaring templates across multiple files. More specifically, when working with templated classes, the linker expect all method definitions for the class in a single compiler object file. When you take into account headers, other declarations, inheritance, etc., things get really messy.
Are there any general advice or workarounds for organizing or redistributing templated member definitions across multiple files? | c++ | templates | null | null | null | null | open | Templates spread across multiple files
===
C++ seems to be rather grouchy when declaring templates across multiple files. More specifically, when working with templated classes, the linker expect all method definitions for the class in a single compiler object file. When you take into account headers, other declarations, inheritance, etc., things get really messy.
Are there any general advice or workarounds for organizing or redistributing templated member definitions across multiple files? | 0 |
36,054 | 08/30/2008 15:46:09 | 1,219 | 08/13/2008 13:44:47 | 1,409 | 99 | Anyone have experience with Sphinx speech recognition? | Has anyone used the [Sphinx][1] speech recognition stack to build IVR applications? I am looking for open source alternatives to the expensive and somewhat limiting choices from MSFT and others. I have not been able to find a comprehensive package that ties open source speech/voip applications together.
[1]: http://cmusphinx.sourceforge.net/html/cmusphinx.php | speech-recognition | ivr | null | null | null | null | open | Anyone have experience with Sphinx speech recognition?
===
Has anyone used the [Sphinx][1] speech recognition stack to build IVR applications? I am looking for open source alternatives to the expensive and somewhat limiting choices from MSFT and others. I have not been able to find a comprehensive package that ties open source speech/voip applications together.
[1]: http://cmusphinx.sourceforge.net/html/cmusphinx.php | 0 |
36,056 | 08/30/2008 15:49:05 | 1,219 | 08/13/2008 13:44:47 | 1,409 | 99 | What's a good open source VoiceXML implementation? | I am trying to find out if it's possible to build a complete IVR application by cobbling together parts from open source projects. Is anyone using a non-commercial VoiceXML implementation to build speech-enabled systems? | speech-recognition | ivr | voip | null | null | null | open | What's a good open source VoiceXML implementation?
===
I am trying to find out if it's possible to build a complete IVR application by cobbling together parts from open source projects. Is anyone using a non-commercial VoiceXML implementation to build speech-enabled systems? | 0 |
36,064 | 08/30/2008 15:55:19 | 3,412 | 08/28/2008 13:33:44 | 21 | 1 | What is the replacement of Controller.ReadFromRequest in ASP.NET MVC? | I am attempting to update a project from ASP.NET MVC Preview 3 to Preview 5 and it seems that Controller.ReadFromRequest(string key) has been removed from the Controller class. Does anyone know of any alternatives to retrieving information based on an identifier from a form? | asp.net-mvc | null | null | null | null | null | open | What is the replacement of Controller.ReadFromRequest in ASP.NET MVC?
===
I am attempting to update a project from ASP.NET MVC Preview 3 to Preview 5 and it seems that Controller.ReadFromRequest(string key) has been removed from the Controller class. Does anyone know of any alternatives to retrieving information based on an identifier from a form? | 0 |
36,077 | 08/30/2008 16:16:32 | 3,153 | 08/27/2008 02:45:05 | 89 | 4 | Finding out the source of an exception in C++ after it is caught? | I'm looking for an answer in MS VC++.
When debugging a large C++ application, which unfortunately has a very extensive usage of C++ exceptions. Sometimes I catch an exception a little later than I actually want.
Example in pseudo code:
FunctionB()
{
...
throw e;
...
}
FunctionA()
{
...
FunctionB()
...
}
try
{
Function A()
}
catch(e)
{
(<--- breakpoint)
...
}
I catch the exception with a breakpoint when debugging. But I can't trace back if the exception occurred in FunctionA() or FunctionB(), or some other function. (Assuming extensive exception use and a huge version of the above example).
One solution to my problem is to determine and save the call stack in the exception constructor. But this would require me to derive all exceptions from this base exception class. It would also require a lot of code, and perhaps slow down my program.
Is there an easier way that requires less work? Without having to change my large code base?
Are there better solutions to this problem in other languages? | c++ | exception | vc++ | advice | winapi | null | open | Finding out the source of an exception in C++ after it is caught?
===
I'm looking for an answer in MS VC++.
When debugging a large C++ application, which unfortunately has a very extensive usage of C++ exceptions. Sometimes I catch an exception a little later than I actually want.
Example in pseudo code:
FunctionB()
{
...
throw e;
...
}
FunctionA()
{
...
FunctionB()
...
}
try
{
Function A()
}
catch(e)
{
(<--- breakpoint)
...
}
I catch the exception with a breakpoint when debugging. But I can't trace back if the exception occurred in FunctionA() or FunctionB(), or some other function. (Assuming extensive exception use and a huge version of the above example).
One solution to my problem is to determine and save the call stack in the exception constructor. But this would require me to derive all exceptions from this base exception class. It would also require a lot of code, and perhaps slow down my program.
Is there an easier way that requires less work? Without having to change my large code base?
Are there better solutions to this problem in other languages? | 0 |
36,079 | 08/30/2008 16:18:35 | 356 | 08/05/2008 01:13:09 | 126 | 16 | PHP mail using Gmail | In my PHP webapp, I want to be notified via email whenever certain errors occur. I'd like to use my Gmail account for sending these. How could this be done? | php | email | gmail | null | null | null | open | PHP mail using Gmail
===
In my PHP webapp, I want to be notified via email whenever certain errors occur. I'd like to use my Gmail account for sending these. How could this be done? | 0 |
36,081 | 08/30/2008 16:19:22 | 2,701 | 08/24/2008 15:51:24 | 97 | 9 | How to Throw an exception in a using block with .NET 2.0? | I'm trying to leverage the using block more and more these days when I have an object that implements IDisposable but one thing I have not figured out is how to throw and exception as I would in a normal try/catch ... any code samples to point me in the right direction? | ado.net | null | null | null | null | null | open | How to Throw an exception in a using block with .NET 2.0?
===
I'm trying to leverage the using block more and more these days when I have an object that implements IDisposable but one thing I have not figured out is how to throw and exception as I would in a normal try/catch ... any code samples to point me in the right direction? | 0 |
36,101 | 08/30/2008 16:37:31 | 3,764 | 08/30/2008 16:14:55 | 1 | 0 | How do I set the name of a window in ROR? | How do I "name" a browser window in ROR, such that I can open a page in it later, from another (popup) window (using the target="name" html parameter) | html | ruby | ruby-on-rails | target | null | null | open | How do I set the name of a window in ROR?
===
How do I "name" a browser window in ROR, such that I can open a page in it later, from another (popup) window (using the target="name" html parameter) | 0 |
36,106 | 08/30/2008 16:39:01 | 3,474 | 08/28/2008 17:28:46 | 147 | 14 | What are some alternative bitset data structures? | I have an information retrieval application that tracks bit sets with sizes on the order of 10s of millions. The number of "set" bits in the set varies widely, from none to all. Currently, I'm simply setting bits in an array (`java.util.BitSet`), so each bit set takes several megabytes.
My plan is to look at the cardinality of the first *N* bits, then make a decision about what data structure to use for the remainder. Clearly some data structures are better for very sparse bit sets, and others when roughly half the bits are set (when most bits are set, I can use negation to treat it as a sparse set of zeroes).
- What structures might be good at each extreme?
- Are there any in the middle?
Here are a few constraints or hints:
1. The bits are set only once, and in index order.
2. I need 100% accuracy, so something like a Bloom filter isn't good enough.
3. After the set is built, I need to be able to efficiently iterate over the "set" bits.
4. The bits are randomly distributed, so run-length–encoding algorithms aren't likely to be much better than a simple list of bit indexes.
5. I'm trying to optimize memory utilization, but speed still carries *some* weight.
Something with an open source Java implementation is helpful, but not strictly necessary. I'm more interested in the fundamentals. | data-structures | information-retrieval | null | null | null | null | open | What are some alternative bitset data structures?
===
I have an information retrieval application that tracks bit sets with sizes on the order of 10s of millions. The number of "set" bits in the set varies widely, from none to all. Currently, I'm simply setting bits in an array (`java.util.BitSet`), so each bit set takes several megabytes.
My plan is to look at the cardinality of the first *N* bits, then make a decision about what data structure to use for the remainder. Clearly some data structures are better for very sparse bit sets, and others when roughly half the bits are set (when most bits are set, I can use negation to treat it as a sparse set of zeroes).
- What structures might be good at each extreme?
- Are there any in the middle?
Here are a few constraints or hints:
1. The bits are set only once, and in index order.
2. I need 100% accuracy, so something like a Bloom filter isn't good enough.
3. After the set is built, I need to be able to efficiently iterate over the "set" bits.
4. The bits are randomly distributed, so run-length–encoding algorithms aren't likely to be much better than a simple list of bit indexes.
5. I'm trying to optimize memory utilization, but speed still carries *some* weight.
Something with an open source Java implementation is helpful, but not strictly necessary. I'm more interested in the fundamentals. | 0 |
36,108 | 08/30/2008 16:39:28 | 2,122 | 08/20/2008 13:13:16 | 8 | 1 | How to get controls in WPF to fill available space? | Didn't get a reply to this on the MSDN WPF forum, so I thought I'd try here.
Some WPF controls - like the button - seem to happily consume all the availible space in its' container if you don't specify the height it is to have.
And some - like the ones I need to use right now, the (multiline) TextBox and the ListBox - seem more worried about just taking the space necessary to fit their contents, and no more.
If you put these guys in a cell in a UniformGrid, they will expand to fit the available space. However, uniformgrids are not right for all situations. What if you have a grid with some rows set to a * height to divide the height between itself and other * rows? What if you have a StackPanel and you have a label, a list and a button - how can you get the list to take up all the space not eaten by the label and the button?
I would think this would really be a basic layout requirement, but I can't figure out how to get them to fill the space that they could (putting them in a DockPanel and setting it to fill also doesn't work, it seems, since the DockPanel only takes up the space needed by its' subcontrols..
I have tried to search for the answer to this, and I am guessing the answer must be out there, as a resizable GUI would be quite horrible if you had to play with Height/Width and MinHeight/MinWidth etc.
Can you bind your height and width to the grid cell you occupy? Or is there another way to do this?
Very grateful for any insights!
Rune
| gui | wpf | null | null | null | null | open | How to get controls in WPF to fill available space?
===
Didn't get a reply to this on the MSDN WPF forum, so I thought I'd try here.
Some WPF controls - like the button - seem to happily consume all the availible space in its' container if you don't specify the height it is to have.
And some - like the ones I need to use right now, the (multiline) TextBox and the ListBox - seem more worried about just taking the space necessary to fit their contents, and no more.
If you put these guys in a cell in a UniformGrid, they will expand to fit the available space. However, uniformgrids are not right for all situations. What if you have a grid with some rows set to a * height to divide the height between itself and other * rows? What if you have a StackPanel and you have a label, a list and a button - how can you get the list to take up all the space not eaten by the label and the button?
I would think this would really be a basic layout requirement, but I can't figure out how to get them to fill the space that they could (putting them in a DockPanel and setting it to fill also doesn't work, it seems, since the DockPanel only takes up the space needed by its' subcontrols..
I have tried to search for the answer to this, and I am guessing the answer must be out there, as a resizable GUI would be quite horrible if you had to play with Height/Width and MinHeight/MinWidth etc.
Can you bind your height and width to the grid cell you occupy? Or is there another way to do this?
Very grateful for any insights!
Rune
| 0 |
36,109 | 08/30/2008 16:39:42 | 1,412 | 08/15/2008 15:05:57 | 462 | 26 | Quoting command-line arguments in shell scripts | The following shell script takes a list of arguments, turns Unix paths into WINE/Windows paths and invokes the given executable under WINE.
#! /bin/sh
if test "${1+set}" != "set"
then
echo "Usage; winewrap EXEC [ARGS...]"
exit 1
fi
EXEC="$1"
shift
ARGS=""
for p in "$@";
do
if [ -e "$p" ];
then
p=$(winepath -w $p)
fi
ARGS="$ARGS '$p'"
done
CMD="wine '$EXEC' $ARGS"
echo $CMD
$CMD
However, there's something wrong with the quotation of command-line arguments.
$ winewrap '/home/chris/.wine/drive_c/Program Files/Microsoft Research/Z3-1.3.6/bin/z3.exe' -smt /tmp/smtlib3cee8b.smt
Executing: wine '/home/chris/.wine/drive_c/Program Files/Microsoft Research/Z3-1.3.6/bin/z3.exe' '-smt' 'Z: mp\smtlib3cee8b.smt'
wine: cannot find ''/home/chris/.wine/drive_c/Program'
Note that:
1. The path to the executable is being chopped off at the first space, even though it is single-quoted.
2. The literal "\t" in the last path is being transformed into a tab character.
Obviously, the quotations aren't being parsed the way I intended by the shell. How can I avoid these errors? | shell | unix | wine | null | null | null | open | Quoting command-line arguments in shell scripts
===
The following shell script takes a list of arguments, turns Unix paths into WINE/Windows paths and invokes the given executable under WINE.
#! /bin/sh
if test "${1+set}" != "set"
then
echo "Usage; winewrap EXEC [ARGS...]"
exit 1
fi
EXEC="$1"
shift
ARGS=""
for p in "$@";
do
if [ -e "$p" ];
then
p=$(winepath -w $p)
fi
ARGS="$ARGS '$p'"
done
CMD="wine '$EXEC' $ARGS"
echo $CMD
$CMD
However, there's something wrong with the quotation of command-line arguments.
$ winewrap '/home/chris/.wine/drive_c/Program Files/Microsoft Research/Z3-1.3.6/bin/z3.exe' -smt /tmp/smtlib3cee8b.smt
Executing: wine '/home/chris/.wine/drive_c/Program Files/Microsoft Research/Z3-1.3.6/bin/z3.exe' '-smt' 'Z: mp\smtlib3cee8b.smt'
wine: cannot find ''/home/chris/.wine/drive_c/Program'
Note that:
1. The path to the executable is being chopped off at the first space, even though it is single-quoted.
2. The literal "\t" in the last path is being transformed into a tab character.
Obviously, the quotations aren't being parsed the way I intended by the shell. How can I avoid these errors? | 0 |
36,114 | 08/30/2008 16:43:28 | 335,696 | 08/30/2008 00:40:13 | 30 | 3 | Variable Holding data in a while statement | I know I must be missing something small but in a while statement how does the variable hold the data when it finishes the first pass and goes into the second pass. | c++ | null | null | null | null | null | open | Variable Holding data in a while statement
===
I know I must be missing something small but in a while statement how does the variable hold the data when it finishes the first pass and goes into the second pass. | 0 |
36,122 | 08/30/2008 16:45:44 | 3,677 | 08/29/2008 20:21:57 | 8 | 0 | What is the most efficient way to keep track of a specific character's index in a string? | Take the following string as an example:
"The quick brown fox"
Right now the q in quick is at index 4 of the string (starting at 0) and the f in fox is at index 16. Now lets say the user enters some more text into this string.
"The very quick dark brown fox"
Now the q is at index 9 and the f is at index 26.
What is the most efficient method of keeping track of the index of the original q in quick and f in fox no matter how many characters are added by the user? | efficiency | algorithm | string | index | null | null | open | What is the most efficient way to keep track of a specific character's index in a string?
===
Take the following string as an example:
"The quick brown fox"
Right now the q in quick is at index 4 of the string (starting at 0) and the f in fox is at index 16. Now lets say the user enters some more text into this string.
"The very quick dark brown fox"
Now the q is at index 9 and the f is at index 26.
What is the most efficient method of keeping track of the index of the original q in quick and f in fox no matter how many characters are added by the user? | 0 |
36,127 | 08/30/2008 16:51:03 | 3,153 | 08/27/2008 02:45:05 | 94 | 4 | Any recommended VC++ settings for better PDB analysis on release builds | Are there any VC++ settings I should know about to generate better PDB files that contain more information?
I have a crash dump analysis system in place based on the project [crashrpt][1].
Also, my production build server has the source code installed on the D:\\, but my development machine has the source code on the C:\\. I entered the source path in the VC++ settings, but when looking through the call stack of a crash, it doesn't automatically jump to my source code. I believe if I had my dev machine's source code on the D: it would work.
[1]: http://code.google.com/p/crashrpt/ | crashrpt | vc++ | c++ | pdb | visual-studio | null | open | Any recommended VC++ settings for better PDB analysis on release builds
===
Are there any VC++ settings I should know about to generate better PDB files that contain more information?
I have a crash dump analysis system in place based on the project [crashrpt][1].
Also, my production build server has the source code installed on the D:\\, but my development machine has the source code on the C:\\. I entered the source path in the VC++ settings, but when looking through the call stack of a crash, it doesn't automatically jump to my source code. I believe if I had my dev machine's source code on the D: it would work.
[1]: http://code.google.com/p/crashrpt/ | 0 |
36,129 | 08/30/2008 16:51:19 | 1,603 | 08/17/2008 13:57:31 | 21 | 3 | What are some real life examples of Design Patterns used in software | I'm reading through head first design patterns at the moment and while the book is excellent I also would like to see how these are actually used in the real world.
If you know of a good example of design pattern usage (preferably in a OSS program so we can have a look :) then please list it below. | design-patterns | self-improvement | null | null | null | null | open | What are some real life examples of Design Patterns used in software
===
I'm reading through head first design patterns at the moment and while the book is excellent I also would like to see how these are actually used in the real world.
If you know of a good example of design pattern usage (preferably in a OSS program so we can have a look :) then please list it below. | 0 |
36,139 | 08/30/2008 17:03:09 | 3,205 | 08/27/2008 13:06:13 | 177 | 17 | How do I sort a list of strings in Python? | What is the best way of creating an alphabetically sorted list in Python? | python | string | sorting | null | null | null | open | How do I sort a list of strings in Python?
===
What is the best way of creating an alphabetically sorted list in Python? | 0 |
36,144 | 08/30/2008 17:05:14 | 3,288 | 08/27/2008 17:23:42 | 1 | 1 | How do you make a post request into a new browser tab using JavaScript / XUL? | I'm trying to open a new browser tab with the results of a POST request. I'm trying to do so using a function containing the following code:
var windowManager = Components.classes["@mozilla.org/appshell/window-mediator;1"]
.getService(Components.interface
s.nsIWindowMediator);
var browserWindow = windowManager.getMostRecentWindow("navigator:browser");
var browser = browserWindow.getBrowser();
if(browser.mCurrentBrowser.currentURI.spec == "about:blank")
browserWindow.loadURI(url, null, postData, false);
else
browser.loadOneTab(url, null, null, postData, false, false);
I'm using a string as url, and JSON data as postData. Is there something I'm doing wrong?
Build identifier: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.0.1) Gecko/2008070206 Firefox/3.0.1
Thanks in advance.
| xul | firefox | ubiquity | javascript | null | null | open | How do you make a post request into a new browser tab using JavaScript / XUL?
===
I'm trying to open a new browser tab with the results of a POST request. I'm trying to do so using a function containing the following code:
var windowManager = Components.classes["@mozilla.org/appshell/window-mediator;1"]
.getService(Components.interface
s.nsIWindowMediator);
var browserWindow = windowManager.getMostRecentWindow("navigator:browser");
var browser = browserWindow.getBrowser();
if(browser.mCurrentBrowser.currentURI.spec == "about:blank")
browserWindow.loadURI(url, null, postData, false);
else
browser.loadOneTab(url, null, null, postData, false, false);
I'm using a string as url, and JSON data as postData. Is there something I'm doing wrong?
Build identifier: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.0.1) Gecko/2008070206 Firefox/3.0.1
Thanks in advance.
| 0 |
36,152 | 08/30/2008 17:09:16 | 3,288 | 08/27/2008 17:23:42 | 1 | 1 | How do you unsubscribe from a ubiquity command | I can't seem to find details on how to unsubscribe from ubiquity commands. The command list page only seems to have information about the installed commands and there are no links to deleting them. Am I missing something? | ubiquity | null | null | null | null | null | open | How do you unsubscribe from a ubiquity command
===
I can't seem to find details on how to unsubscribe from ubiquity commands. The command list page only seems to have information about the installed commands and there are no links to deleting them. Am I missing something? | 0 |
36,182 | 08/30/2008 17:25:40 | 3,333 | 08/28/2008 00:32:00 | 23 | 7 | How expensive is ST_GeomFromText | In postgis, is the "ST_GeomFromText" call very expensive? I ask mostly because I have a frequently called query that attempts to find the point that is nearest another point that matches some criteria, and which is also within a certain distance of that other point, and the way I currently wrote it, it's doing the same ST_GeomFromText twice:
$findNearIDMatchStmt = $postconn->prepare(
"SELECT internalid " .
"FROM waypoint " .
"WHERE id = ? AND " .
" category = ? AND ".
" (b.category in (1, 3) OR type like ?) AND ".
" ST_DWithin(point, ST_GeomFromText(?," . SRID .
" ),". SMALL_EPSILON . ") " .
" ORDER BY ST_Distance(point, ST_GeomFromText(?,", SRID .
" )) " .
" LIMIT 1");
Is there a better way to re-write this?
Slightly OT: In the preview screen, all my underscores are being rendered as & # 9 5 ; - I hope that's not going to show up that way in the post. | gis | postgis | null | null | null | null | open | How expensive is ST_GeomFromText
===
In postgis, is the "ST_GeomFromText" call very expensive? I ask mostly because I have a frequently called query that attempts to find the point that is nearest another point that matches some criteria, and which is also within a certain distance of that other point, and the way I currently wrote it, it's doing the same ST_GeomFromText twice:
$findNearIDMatchStmt = $postconn->prepare(
"SELECT internalid " .
"FROM waypoint " .
"WHERE id = ? AND " .
" category = ? AND ".
" (b.category in (1, 3) OR type like ?) AND ".
" ST_DWithin(point, ST_GeomFromText(?," . SRID .
" ),". SMALL_EPSILON . ") " .
" ORDER BY ST_Distance(point, ST_GeomFromText(?,", SRID .
" )) " .
" LIMIT 1");
Is there a better way to re-write this?
Slightly OT: In the preview screen, all my underscores are being rendered as & # 9 5 ; - I hope that's not going to show up that way in the post. | 0 |
36,183 | 08/30/2008 17:26:09 | 2,289 | 08/21/2008 13:59:43 | 1 | 1 | Replacing the nth instance of a regex match in Javascript | I'm trying to write a regex function that will identify and replace a single instance of a match within a string without affecting the other instances. For example, I have this string:
12||34||56
I want to replace the second set of pipes with ampersands to get this string:
12||34&&56
The regex function needs to be able to handle x amount of pipes and allow me to replace the nth set of pipes, so I could use the same function to make these replacements:
23||45||45||56||67 -> 23&&45||45||56||67
23||34||98||87 -> 23||34||98&&87
I know that I could just split/replace/concat the string at the pipes, and I also know that I can match on /\|\|/ and iterate through the resulting array, but I'm interested to know if it's possible to write a single expression that can do this. Note that this would be for Javascript, so it's possible to generate a regex at runtime using eval(), but it's not possible to use any Perl-specific regex instructions. | javascript | regex | null | null | null | null | open | Replacing the nth instance of a regex match in Javascript
===
I'm trying to write a regex function that will identify and replace a single instance of a match within a string without affecting the other instances. For example, I have this string:
12||34||56
I want to replace the second set of pipes with ampersands to get this string:
12||34&&56
The regex function needs to be able to handle x amount of pipes and allow me to replace the nth set of pipes, so I could use the same function to make these replacements:
23||45||45||56||67 -> 23&&45||45||56||67
23||34||98||87 -> 23||34||98&&87
I know that I could just split/replace/concat the string at the pipes, and I also know that I can match on /\|\|/ and iterate through the resulting array, but I'm interested to know if it's possible to write a single expression that can do this. Note that this would be for Javascript, so it's possible to generate a regex at runtime using eval(), but it's not possible to use any Perl-specific regex instructions. | 0 |
36,186 | 08/30/2008 17:31:20 | 3,747 | 08/30/2008 14:33:59 | 15 | 6 | Best Versioning Tools to use for Photoshop/Illustrator and related binary files? | I previously asked about Version Cue 3 vs Subversion. I think this is a better question and someone suggested [http://www.gridironsoftware.com/Flow/][1] I hope this question will allow others to join in and suggest other tools or give specific recommendation to using Version Que versus other tools.
[1]: http://www.gridironsoftware.com/Flow/ | versioning | photoshop | null | null | null | null | open | Best Versioning Tools to use for Photoshop/Illustrator and related binary files?
===
I previously asked about Version Cue 3 vs Subversion. I think this is a better question and someone suggested [http://www.gridironsoftware.com/Flow/][1] I hope this question will allow others to join in and suggest other tools or give specific recommendation to using Version Que versus other tools.
[1]: http://www.gridironsoftware.com/Flow/ | 0 |
36,239 | 08/30/2008 18:42:57 | 338 | 08/04/2008 18:34:44 | 817 | 55 | What should we do to prepare for 2038? | I would like to think that some of the software I'm writing today will be used in 30 years. But I am also aware that a lot of it is based upon the UNIX tradition of exposing time as the number of seconds since 1970.
#include <stdio.h>
#include <time.h>
#include <limits.h>
void print(time_t rt) {
struct tm * t = gmtime(&rt);
puts(asctime(t));
}
int main() {
print(0);
print(time(0));
print(LONG_MAX);
print(LONG_MAX+1);
}
Execution results in:
* Thu Jan 1 00:00:00 1970
* Sat Aug 30 18:37:08 2008
* Tue Jan 19 03:14:07 **2038**
* Fri Dec 13 20:45:52 **1901**
>> The functions ctime(), gmtime(), and localtime() all take as an argument a time value representing the time in seconds since the Epoch (00:00:00 UTC, January 1, 1970; see time(3) ).
I wonder if there is anything proactive to do in this area as a programmer, or are we to trust that all software systems (aka Operating Systems) will some how be magically upgraded in the future?
| time | unix | maintainability | null | null | null | open | What should we do to prepare for 2038?
===
I would like to think that some of the software I'm writing today will be used in 30 years. But I am also aware that a lot of it is based upon the UNIX tradition of exposing time as the number of seconds since 1970.
#include <stdio.h>
#include <time.h>
#include <limits.h>
void print(time_t rt) {
struct tm * t = gmtime(&rt);
puts(asctime(t));
}
int main() {
print(0);
print(time(0));
print(LONG_MAX);
print(LONG_MAX+1);
}
Execution results in:
* Thu Jan 1 00:00:00 1970
* Sat Aug 30 18:37:08 2008
* Tue Jan 19 03:14:07 **2038**
* Fri Dec 13 20:45:52 **1901**
>> The functions ctime(), gmtime(), and localtime() all take as an argument a time value representing the time in seconds since the Epoch (00:00:00 UTC, January 1, 1970; see time(3) ).
I wonder if there is anything proactive to do in this area as a programmer, or are we to trust that all software systems (aka Operating Systems) will some how be magically upgraded in the future?
| 0 |
36,260 | 08/30/2008 19:06:44 | 1,891 | 08/19/2008 05:37:52 | 30 | 2 | Dealing with circular dependencies in OCaml | I'm writing an interpreter for an experimental language. Three of the main constructs of the language are definitions, statements, and expressions. Definitions can contain statements and expressions, statements can contain definitions and expressions, and one kind of expression can contain statements. I represent all of these using union types so I can easily use pattern matching on them. Ideally, I would like to put the code for these in different files, but OMake complains about circular dependency issues. As far as I know, circular type definitions across modules are not allowed.
The only way I know of to solve this is to define all three types at once:
type defn = ...
and stmt = ...
and expr = ...
It seems like this requires all the code for types to be in the same file. Is there any way around this? How do you deal with circular definitions in your code? | ocaml | null | null | null | null | null | open | Dealing with circular dependencies in OCaml
===
I'm writing an interpreter for an experimental language. Three of the main constructs of the language are definitions, statements, and expressions. Definitions can contain statements and expressions, statements can contain definitions and expressions, and one kind of expression can contain statements. I represent all of these using union types so I can easily use pattern matching on them. Ideally, I would like to put the code for these in different files, but OMake complains about circular dependency issues. As far as I know, circular type definitions across modules are not allowed.
The only way I know of to solve this is to define all three types at once:
type defn = ...
and stmt = ...
and expr = ...
It seems like this requires all the code for types to be in the same file. Is there any way around this? How do you deal with circular definitions in your code? | 0 |
36,261 | 08/30/2008 19:08:02 | 2,025 | 08/19/2008 20:59:50 | 1,323 | 135 | Test/expand my email regex | I'm really not confident with Regex, I know some basic syntax but not enough to keep me happy.
I'm trying to build a regular expression to check if an email is valid. So far here's what I've got:
[A-Za-z0-9._-]+@[A-Za-z0-9]+.[A-Za-z.]+
It needs to take account of periods in the username/domain and I think it works with multiple TLDs (e.g. co.uk).
I'm working with the preg engine in PHP so it needs to work with that. Thanks if you can help! | php | regex | pcre | email-address | null | null | open | Test/expand my email regex
===
I'm really not confident with Regex, I know some basic syntax but not enough to keep me happy.
I'm trying to build a regular expression to check if an email is valid. So far here's what I've got:
[A-Za-z0-9._-]+@[A-Za-z0-9]+.[A-Za-z.]+
It needs to take account of periods in the username/domain and I think it works with multiple TLDs (e.g. co.uk).
I'm working with the preg engine in PHP so it needs to work with that. Thanks if you can help! | 0 |
36,262 | 08/30/2008 19:08:50 | 3,777 | 08/30/2008 18:12:00 | 1 | 0 | How much should one DataSet represent? | How much should one DataSet represent? Using the example of an ordering system: While showing your order I also show a list of items similar to one of yours as well as a list of our most popular items.
While your items are tangled in a web of relationships involving you and your past orders, preferred suppliers, and the various other kinds of information related to you as a client, the other items do not have these same relationships. The set of queries I use to navigate the set of stuff representing you is different than the queries I use for one of these other lists of items.
My inclination is to create different DataSets for different kinds of relationships but then I create ten separate item DataTables and that seems wrong. When I instantiate the larger DataSet even though I am only interested in a small subset that seems wrong, and when I try to pack all of these into one DataSet I have a big messy looking thing with several items tables next to each other and I am pretty sure that IS wrong.
Maybe I am over-valuing the relationship feature of DataSets or maybe I just need to get over myself, either way I could use some guidance.
| .net | null | null | null | null | null | open | How much should one DataSet represent?
===
How much should one DataSet represent? Using the example of an ordering system: While showing your order I also show a list of items similar to one of yours as well as a list of our most popular items.
While your items are tangled in a web of relationships involving you and your past orders, preferred suppliers, and the various other kinds of information related to you as a client, the other items do not have these same relationships. The set of queries I use to navigate the set of stuff representing you is different than the queries I use for one of these other lists of items.
My inclination is to create different DataSets for different kinds of relationships but then I create ten separate item DataTables and that seems wrong. When I instantiate the larger DataSet even though I am only interested in a small subset that seems wrong, and when I try to pack all of these into one DataSet I have a big messy looking thing with several items tables next to each other and I am pretty sure that IS wrong.
Maybe I am over-valuing the relationship feature of DataSets or maybe I just need to get over myself, either way I could use some guidance.
| 0 |
36,268 | 08/30/2008 19:13:12 | 2,147 | 08/20/2008 15:14:13 | 543 | 52 | What makes a good website for an open source project? | (I'd like to apologize because this IS a somewhat subjective question, but it's one that I'd like to get some ideas on.)
So, an open source project I'm working on is working on redesigning its website. This kind of got me thinking: what exactly is it that people look for in an open source web site? So I'm asking that question to you guys:
1. If you're looking for an open-source tool to do something, what do you look for on a candidate's website?
2. Possibly more importantly, what do you expect NOT to see on its website?
3. What are some examples of good open source websites that deliver the things you want in number 1 and don't deliver the things in number 2?
One other thing to note: Since there's no "right" answer to this, I'm a bit hesitant to accept a single answer. But I'd also like to reward the person that I feel gives the best answer. Thus, I'd like to note that the answer that I choose as "correct" won't necessarily be the correct answer. | open-source | website | null | null | null | null | open | What makes a good website for an open source project?
===
(I'd like to apologize because this IS a somewhat subjective question, but it's one that I'd like to get some ideas on.)
So, an open source project I'm working on is working on redesigning its website. This kind of got me thinking: what exactly is it that people look for in an open source web site? So I'm asking that question to you guys:
1. If you're looking for an open-source tool to do something, what do you look for on a candidate's website?
2. Possibly more importantly, what do you expect NOT to see on its website?
3. What are some examples of good open source websites that deliver the things you want in number 1 and don't deliver the things in number 2?
One other thing to note: Since there's no "right" answer to this, I'm a bit hesitant to accept a single answer. But I'd also like to reward the person that I feel gives the best answer. Thus, I'd like to note that the answer that I choose as "correct" won't necessarily be the correct answer. | 0 |
36,274 | 08/30/2008 19:20:04 | 3,747 | 08/30/2008 14:33:59 | 20 | 7 | What is Lazy Loading? | What is Lazy Loading? | data-binding | null | null | null | null | null | open | What is Lazy Loading?
===
What is Lazy Loading? | 0 |
36,294 | 08/30/2008 19:42:24 | 1,178 | 08/13/2008 11:15:35 | 167 | 14 | F# language - hints for newbie | Looks like here in StackOveflow there is a group of **F#** enthusiasts.
I'd like to know better this language, so, apart from the [functional programming theory][1], can you point me to the better starting points to start using the F# language? I mean, tutorials, how-tos, but first of all working samples to have the chance to start doing something and enjoy the language.
Thanks a lot
Andrea
[1]: http://en.wikipedia.org/wiki/Functional_programming | f# | null | null | null | null | 07/19/2012 15:05:37 | not constructive | F# language - hints for newbie
===
Looks like here in StackOveflow there is a group of **F#** enthusiasts.
I'd like to know better this language, so, apart from the [functional programming theory][1], can you point me to the better starting points to start using the F# language? I mean, tutorials, how-tos, but first of all working samples to have the chance to start doing something and enjoy the language.
Thanks a lot
Andrea
[1]: http://en.wikipedia.org/wiki/Functional_programming | 4 |
36,296 | 08/30/2008 19:43:11 | 536 | 08/06/2008 15:30:22 | 484 | 19 | What's the answer to this Microsoft PDC challenge? | In [today's channel9.msdn.com video][1], the PDC guys posted a challenge to decipher this code:
2973853263233233753482843823642933243283
6434928432937228939232737732732535234532
9335283373377282333349287338449365335325
3283443783243263673762933373883363333472
8936639338428833535236433333237634438833
3275387394324354374325383293375366284282
3323383643473233852922933873933663333833
9228632439434936334633337636632933333428
9285333384346333346365364364365365336367
2873353883543533683523253893663653393433
8837733538538437838338536338232536832634
8284348375376338372376377364368392352393
3883393733943693253343433882852753933822
7533337432433532332332328232332332932432
3323323323323336323333323323323327323324
2873323253233233233892792792792792792792
7934232332332332332332332733432333832336
9344372376326339329376282344
Decipher it and win a t-shirt. (Lame, I know, was hoping for a free trip to the PDC.)
I notice some interesting patterns in this code, such as the 332 pattern towards the end, but I'm at a loss as to where to go from here. They've said the answer is a text question.
Any ideas on deciphering this code?
[1]: http://channel9.msdn.com/posts/Dan/Countdown-to-PDC2008-By-Developers-for-Developers-Don-Box-and-Chris-Anderson/ | pdc | encryption | null | null | null | null | open | What's the answer to this Microsoft PDC challenge?
===
In [today's channel9.msdn.com video][1], the PDC guys posted a challenge to decipher this code:
2973853263233233753482843823642933243283
6434928432937228939232737732732535234532
9335283373377282333349287338449365335325
3283443783243263673762933373883363333472
8936639338428833535236433333237634438833
3275387394324354374325383293375366284282
3323383643473233852922933873933663333833
9228632439434936334633337636632933333428
9285333384346333346365364364365365336367
2873353883543533683523253893663653393433
8837733538538437838338536338232536832634
8284348375376338372376377364368392352393
3883393733943693253343433882852753933822
7533337432433532332332328232332332932432
3323323323323336323333323323323327323324
2873323253233233233892792792792792792792
7934232332332332332332332733432333832336
9344372376326339329376282344
Decipher it and win a t-shirt. (Lame, I know, was hoping for a free trip to the PDC.)
I notice some interesting patterns in this code, such as the 332 pattern towards the end, but I'm at a loss as to where to go from here. They've said the answer is a text question.
Any ideas on deciphering this code?
[1]: http://channel9.msdn.com/posts/Dan/Countdown-to-PDC2008-By-Developers-for-Developers-Don-Box-and-Chris-Anderson/ | 0 |
36,314 | 08/30/2008 20:12:55 | 3,786 | 08/30/2008 19:51:33 | 1 | 0 | What is 'Currying'? | I've seen references to curried functions in several articles and blogs but I can't find a good explanation (or at least one that makes sense!) | computer-science | terms | functional-programming | null | null | null | open | What is 'Currying'?
===
I've seen references to curried functions in several articles and blogs but I can't find a good explanation (or at least one that makes sense!) | 0 |
36,315 | 08/30/2008 20:13:32 | 3,191 | 08/27/2008 12:32:21 | 124 | 5 | Alternative to HttpUtility for .NET 3.5 SP1 client framework? | It'd be really nice to target my Windows Forms app to the .NET 3.5 SP1 *client* framework. But, right now I'm using the `HttpUtility.HtmlDecode` and `HttpUtility.UrlDecode` functions, and the MSDN documentation doesn't point to any alternatives inside of, say, System.Net or something.
So, short from reflectoring the source code and copying it into my assembly---which I don't think would be worth it---are there alternatives inside of the .NET 3.5 SP1 client framework that you know of, to replace this functionality? It seems a bit strange that they'd restrict these useful functions to server-only code. | .net | deployment | .net-client-framework | null | null | null | open | Alternative to HttpUtility for .NET 3.5 SP1 client framework?
===
It'd be really nice to target my Windows Forms app to the .NET 3.5 SP1 *client* framework. But, right now I'm using the `HttpUtility.HtmlDecode` and `HttpUtility.UrlDecode` functions, and the MSDN documentation doesn't point to any alternatives inside of, say, System.Net or something.
So, short from reflectoring the source code and copying it into my assembly---which I don't think would be worth it---are there alternatives inside of the .NET 3.5 SP1 client framework that you know of, to replace this functionality? It seems a bit strange that they'd restrict these useful functions to server-only code. | 0 |
36,324 | 08/30/2008 20:24:38 | 1,714 | 08/18/2008 08:40:59 | 1 | 0 | "The system cannot find the file specified" when invoking subprocess.Popen in python | I'm trying to use svnmerge.py to merge some files. Under the hood it uses python, and when I use it I get an error - "The system cannot find the file specified". Colleagues at work are running the same version of svnmerge.py, and of python (2.5.2, specifically r252:60911) without an issue.
I found [this link][1], which describes my problem. Trying what was outlined there, I confirmed Python could find svn (it's in my path):
<pre>
P:\>python
Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> i,k = os.popen4("svn --version")
>>> i.close()
>>> k.readline()
'svn, version 1.4.2 (r22196)\n'
</pre>
Looking at the svnmerge.py code, though, I noticed for python versions 2.4 and higher it was following a different execution path. Rather than invoking
os.popen4() it uses subprocess.Popen(). Trying that reproduces the error:
<pre>
C:\>python
Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information.
>>> import subprocess
>>> p = subprocess.Popen("svn --version", stdout=subprocess.PIPE,
>>> close_fds=False, stderr=subprocess.PIPE)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python25\lib\subprocess.py", line 594, in __init__
errread, errwrite)
File "C:\Python25\lib\subprocess.py", line 816, in _execute_child
startupinfo)
WindowsError: [Error 2] The system cannot find the file specified
>>>
</pre>
For now, I've commented out the 2.4-and-higher specific code, but I'd like to find a proper solution.
If it's not obvious, I'm a complete python newbie, but google hasn't helped. Any pointers?
[1]: http://www.nabble.com/problem-under-some-windows-desktop-td15868057.html | python | svnmerge | null | null | null | null | open | "The system cannot find the file specified" when invoking subprocess.Popen in python
===
I'm trying to use svnmerge.py to merge some files. Under the hood it uses python, and when I use it I get an error - "The system cannot find the file specified". Colleagues at work are running the same version of svnmerge.py, and of python (2.5.2, specifically r252:60911) without an issue.
I found [this link][1], which describes my problem. Trying what was outlined there, I confirmed Python could find svn (it's in my path):
<pre>
P:\>python
Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> i,k = os.popen4("svn --version")
>>> i.close()
>>> k.readline()
'svn, version 1.4.2 (r22196)\n'
</pre>
Looking at the svnmerge.py code, though, I noticed for python versions 2.4 and higher it was following a different execution path. Rather than invoking
os.popen4() it uses subprocess.Popen(). Trying that reproduces the error:
<pre>
C:\>python
Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information.
>>> import subprocess
>>> p = subprocess.Popen("svn --version", stdout=subprocess.PIPE,
>>> close_fds=False, stderr=subprocess.PIPE)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python25\lib\subprocess.py", line 594, in __init__
errread, errwrite)
File "C:\Python25\lib\subprocess.py", line 816, in _execute_child
startupinfo)
WindowsError: [Error 2] The system cannot find the file specified
>>>
</pre>
For now, I've commented out the 2.4-and-higher specific code, but I'd like to find a proper solution.
If it's not obvious, I'm a complete python newbie, but google hasn't helped. Any pointers?
[1]: http://www.nabble.com/problem-under-some-windows-desktop-td15868057.html | 0 |
36,326 | 08/30/2008 20:34:18 | 3,205 | 08/27/2008 13:06:13 | 207 | 19 | How can I store user-tweakable configuration in app.config? | I know it is a good idea to store configuration data in app.config (e.g. database connection strings) instead of hardcoing it, even if I am writing an application just for myself. But is there a way to update the configuration data stored in app.config from the program that is using it? | c# | .net | app-config | null | null | null | open | How can I store user-tweakable configuration in app.config?
===
I know it is a good idea to store configuration data in app.config (e.g. database connection strings) instead of hardcoing it, even if I am writing an application just for myself. But is there a way to update the configuration data stored in app.config from the program that is using it? | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.