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
24,734
08/24/2008 00:40:48
1,147
08/12/2008 19:29:43
65
7
SelectNodes not working on stackoverflow feed
I'm trying to add support for stackoverflow feeds in my rss reader but **SelectNodes** and **SelectSingleNode** have no effect. This is probably something to do with ATOM and xml namespaces that I just don't understand yet. I have gotten it to work by removing all attributes from the **feed** tag, but that's a hack and I would like to do it properly. So, how do you use **SelectNodes** with atom feeds? Here's a snippet of the feed. <?xml version="1.0" encoding="utf-8"?> <feed xmlns="http://www.w3.org/2005/Atom" xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" xmlns:thr="http://purl.org/syndication/thread/1.0"> <title type="html">StackOverflow.com - Questions tagged: c</title> <link rel="self" href="http://stackoverflow.com/feeds/tag/c" type="application/atom+xml" /> <subtitle>Check out the latest from StackOverflow.com</subtitle> <updated>2008-08-24T12:25:30Z</updated> <id>http://stackoverflow.com/feeds/tag/c</id> <creativeCommons:license>http://www.creativecommons.org/licenses/by-nc/2.5/rdf</creativeCommons:license> <entry> <id>http://stackoverflow.com/questions/22901/what-is-the-best-way-to-communicate-with-a-sql-server</id> <title type="html">What is the best way to communicate with a SQL server?</title> <category scheme="http://stackoverflow.com/feeds/tag/c/tags" term="c" /><category scheme="http://stackoverflow.com/feeds/tag/c/tags" term="c++" /><category scheme="http://stackoverflow.com/feeds/tag/c/tags" term="sql" /><category scheme="http://stackoverflow.com/feeds/tag/c/tags" term="mysql" /><category scheme="http://stackoverflow.com/feeds/tag/c/tags" term="database" /> <author><name>Ed</name></author> <link rel="alternate" href="http://stackoverflow.com/questions/22901/what-is-the-best-way-to-communicate-with-a-sql-server" /> <published>2008-08-22T05:09:04Z</published> <updated>2008-08-23T04:52:39Z</updated> <summary type="html">&lt;p&gt;I am going to be using c/c++, and would like to know the best way to talk to a MySQL server. Should I use the library that comes with the server installation? Are they any good libraries I should consider other than the official one?&lt;/p&gt;</summary> <link rel="replies" type="application/atom+xml" href="http://stackoverflow.com/feeds/question/22901/answers" thr:count="2"/> <thr:total>2</thr:total> </entry> </feed>
c#
atom
rss
.net
null
null
open
SelectNodes not working on stackoverflow feed === I'm trying to add support for stackoverflow feeds in my rss reader but **SelectNodes** and **SelectSingleNode** have no effect. This is probably something to do with ATOM and xml namespaces that I just don't understand yet. I have gotten it to work by removing all attributes from the **feed** tag, but that's a hack and I would like to do it properly. So, how do you use **SelectNodes** with atom feeds? Here's a snippet of the feed. <?xml version="1.0" encoding="utf-8"?> <feed xmlns="http://www.w3.org/2005/Atom" xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" xmlns:thr="http://purl.org/syndication/thread/1.0"> <title type="html">StackOverflow.com - Questions tagged: c</title> <link rel="self" href="http://stackoverflow.com/feeds/tag/c" type="application/atom+xml" /> <subtitle>Check out the latest from StackOverflow.com</subtitle> <updated>2008-08-24T12:25:30Z</updated> <id>http://stackoverflow.com/feeds/tag/c</id> <creativeCommons:license>http://www.creativecommons.org/licenses/by-nc/2.5/rdf</creativeCommons:license> <entry> <id>http://stackoverflow.com/questions/22901/what-is-the-best-way-to-communicate-with-a-sql-server</id> <title type="html">What is the best way to communicate with a SQL server?</title> <category scheme="http://stackoverflow.com/feeds/tag/c/tags" term="c" /><category scheme="http://stackoverflow.com/feeds/tag/c/tags" term="c++" /><category scheme="http://stackoverflow.com/feeds/tag/c/tags" term="sql" /><category scheme="http://stackoverflow.com/feeds/tag/c/tags" term="mysql" /><category scheme="http://stackoverflow.com/feeds/tag/c/tags" term="database" /> <author><name>Ed</name></author> <link rel="alternate" href="http://stackoverflow.com/questions/22901/what-is-the-best-way-to-communicate-with-a-sql-server" /> <published>2008-08-22T05:09:04Z</published> <updated>2008-08-23T04:52:39Z</updated> <summary type="html">&lt;p&gt;I am going to be using c/c++, and would like to know the best way to talk to a MySQL server. Should I use the library that comes with the server installation? Are they any good libraries I should consider other than the official one?&lt;/p&gt;</summary> <link rel="replies" type="application/atom+xml" href="http://stackoverflow.com/feeds/question/22901/answers" thr:count="2"/> <thr:total>2</thr:total> </entry> </feed>
0
24,772
08/24/2008 01:26:34
1,490
08/15/2008 21:35:24
389
50
How do I write a Firefox Addon?
What are some resources for getting started writing a Firefox Addon? Is there an API guide somewhere? Is there a getting tarted tutorial somewhere? Is there a developer discussion board somewhere?
firefox
addon
gettingstarted
tutorials
null
null
open
How do I write a Firefox Addon? === What are some resources for getting started writing a Firefox Addon? Is there an API guide somewhere? Is there a getting tarted tutorial somewhere? Is there a developer discussion board somewhere?
0
24,797
08/24/2008 02:08:15
1,950
08/19/2008 14:57:18
68
4
Effectively Converting dates between UTC and Local (ie. PST) time in SQL 2005
What is the best way to convert a UTC datetime into local datetime. It isn't as simple as a getutcdate() and getdate() difference because the difference changes depending on what the date is. CLR integration isn't an option for me either.
sql-server
null
null
null
null
null
open
Effectively Converting dates between UTC and Local (ie. PST) time in SQL 2005 === What is the best way to convert a UTC datetime into local datetime. It isn't as simple as a getutcdate() and getdate() difference because the difference changes depending on what the date is. CLR integration isn't an option for me either.
0
24,812
08/24/2008 02:40:19
1,921
08/19/2008 14:17:41
69
14
Reccomendations needed for good AI references
I've been asked to help out on an XNA project with the AI. I'm not totally new to the concepts (pathfinding, flocking, etc.) but this would be the first "real" code. I'd be very thankful for any resources (links or books); I want to make sure I do this right.
ai
xna
gamedevelopment
null
null
null
open
Reccomendations needed for good AI references === I've been asked to help out on an XNA project with the AI. I'm not totally new to the concepts (pathfinding, flocking, etc.) but this would be the first "real" code. I'd be very thankful for any resources (links or books); I want to make sure I do this right.
0
24,813
08/24/2008 02:42:07
2,657
08/24/2008 02:14:27
1
2
Automating MSI Build Process
Does anyone have a good way to build MSI (vdproj) projects using MsBuild or Nant? I know [one answer][1] was to install Visual Studio on the build server and just use devenv.exe to build the project, but, I prefer not to install Visual Studio on our build servers. [1]: http://forums.msdn.microsoft.com/en-US/msbuild/thread/6e213531-9d88-43ef-8262-fe0e4e7f479a/
build-process
build-automation
null
null
null
null
open
Automating MSI Build Process === Does anyone have a good way to build MSI (vdproj) projects using MsBuild or Nant? I know [one answer][1] was to install Visual Studio on the build server and just use devenv.exe to build the project, but, I prefer not to install Visual Studio on our build servers. [1]: http://forums.msdn.microsoft.com/en-US/msbuild/thread/6e213531-9d88-43ef-8262-fe0e4e7f479a/
0
24,816
08/24/2008 02:52:42
2,657
08/24/2008 02:14:27
1
2
Escaping strings with jQuery
Does anyone know of an easy way to escape HTML from strings in [jQuery][1]? I need to be able to pass an arbitrary string and have it properly escaped for display in an HTML page (preventing JavaScript/HTML injection attacks). I'm sure it's possible to extend jQuery to do this, but I don't know enough about the framework at the moment to accomplish this. [1]: http://jquery.com/
javascript
jquery
mvc
null
null
null
open
Escaping strings with jQuery === Does anyone know of an easy way to escape HTML from strings in [jQuery][1]? I need to be able to pass an arbitrary string and have it properly escaped for display in an HTML page (preventing JavaScript/HTML injection attacks). I'm sure it's possible to extend jQuery to do this, but I don't know enough about the framework at the moment to accomplish this. [1]: http://jquery.com/
0
24,821
08/24/2008 03:02:15
1,953
08/19/2008 15:13:00
91
13
Buffer Output
This problem started [on a different board][1], but [Dave Ward][2], who was very prompt and helpful there is also here, so I'd like to pick up here for hopefully the last remaining piece of the puzzle. Basically, I was looking for a way to do constant updates to a web page from a long process. I thought AJAX was the way to go, but Dave has [a nice article about using Javascript][3]. I integrated it into my application and it worked great on my client, but NOT my server WebHost4Life. I have another server @ Brinkster and decided to try it there and it DOES work. All the code is the same on my client, WebHost4Life, and Brinkster, so there's obviously something going on with WebHost4Life. I'm planning to write an email to them or request technical support, but I'd like to be proactive and try to figure out what could be going on with their end to cause this difference. I did everything I could with my code to turn off Buffering like Page.Response.BufferOutput = False. What server settings could they have implemented to cause this difference? Is there any way I could circumvent it on my own without their help? If not, what would they need to do? For reference, a link to the working version of a simpler version of my application is located @ [http://www.jasoncomedy.com/javascriptfun/javascriptfun.aspx][4] and the same version that isn't working is located @ [http://www.tabroom.org/Ajaxfun/Default.aspx][5]. You'll notice in the working version, you get updates with each step, but in the one that doesn't, it sits there for a long time until everything is done and then does all the updates to the client at once ... and that makes me sad :( [1]: http://forums.asp.net/t/1304033.aspx [2]: http://stackoverflow.com/users/60/dave-ward [3]: http://encosia.com/2007/10/03/easy-incremental-status-updates-for-long-requests/ [4]: http://www.jasoncomedy.com/javascriptfun/javascriptfun.aspx [5]: http://www.tabroom.org/Ajaxfun/Default.aspx
asp.net
javascript
html
null
null
null
open
Buffer Output === This problem started [on a different board][1], but [Dave Ward][2], who was very prompt and helpful there is also here, so I'd like to pick up here for hopefully the last remaining piece of the puzzle. Basically, I was looking for a way to do constant updates to a web page from a long process. I thought AJAX was the way to go, but Dave has [a nice article about using Javascript][3]. I integrated it into my application and it worked great on my client, but NOT my server WebHost4Life. I have another server @ Brinkster and decided to try it there and it DOES work. All the code is the same on my client, WebHost4Life, and Brinkster, so there's obviously something going on with WebHost4Life. I'm planning to write an email to them or request technical support, but I'd like to be proactive and try to figure out what could be going on with their end to cause this difference. I did everything I could with my code to turn off Buffering like Page.Response.BufferOutput = False. What server settings could they have implemented to cause this difference? Is there any way I could circumvent it on my own without their help? If not, what would they need to do? For reference, a link to the working version of a simpler version of my application is located @ [http://www.jasoncomedy.com/javascriptfun/javascriptfun.aspx][4] and the same version that isn't working is located @ [http://www.tabroom.org/Ajaxfun/Default.aspx][5]. You'll notice in the working version, you get updates with each step, but in the one that doesn't, it sits there for a long time until everything is done and then does all the updates to the client at once ... and that makes me sad :( [1]: http://forums.asp.net/t/1304033.aspx [2]: http://stackoverflow.com/users/60/dave-ward [3]: http://encosia.com/2007/10/03/easy-incremental-status-updates-for-long-requests/ [4]: http://www.jasoncomedy.com/javascriptfun/javascriptfun.aspx [5]: http://www.tabroom.org/Ajaxfun/Default.aspx
0
24,823
08/24/2008 03:05:47
404
08/05/2008 13:34:59
673
42
Implementing a custom Windows Workflow activity that executes an asynchronous operation
I'm having some conceptual trouble on figuring out how to best implement this... I want to create a custom Activity class for Windows Workflow. The activity has to call out to a third party library method that itself runs another process asynchronously and may take anywhere from seconds to many hours to complete. This library offers the ability for me to either poll for the method result or to subscribe to an event that indicates its completion. In my non-workflow apps, I typically just subscribe to that event, but that doesn't seem to be reasonable in the workflow case. I'm also not sure exactly how to best implement a polling scheme. Can someone recommend some pointers to similar problems?
windows
workflow
asynchronous
activity
null
null
open
Implementing a custom Windows Workflow activity that executes an asynchronous operation === I'm having some conceptual trouble on figuring out how to best implement this... I want to create a custom Activity class for Windows Workflow. The activity has to call out to a third party library method that itself runs another process asynchronously and may take anywhere from seconds to many hours to complete. This library offers the ability for me to either poll for the method result or to subscribe to an event that indicates its completion. In my non-workflow apps, I typically just subscribe to that event, but that doesn't seem to be reasonable in the workflow case. I'm also not sure exactly how to best implement a polling scheme. Can someone recommend some pointers to similar problems?
0
24,847
08/24/2008 05:00:45
369
08/05/2008 08:33:43
436
33
What's a good linux C/C++ IDE for a low-res screen?
I recently bought an Asus Eee PC 901, on which I am running Ubuntu linux. I was mucking around in C on my old (larger) laptop, and I want to continue to do so on the Eee. However, Anjuta - the IDE that I was using - is not very usable with the Eee's resolution of 1024x600. What with the status pane at the bottom, and the giant toolbar buttons, there's not much free real-estate for code. Can anyone recommend an IDE which is (or can be configured to be) suitable for low resolutions? I would much prefer something that supports modern IDE features like code folding and auto-completion.
linux
ide
c
c++
eeepc
null
open
What's a good linux C/C++ IDE for a low-res screen? === I recently bought an Asus Eee PC 901, on which I am running Ubuntu linux. I was mucking around in C on my old (larger) laptop, and I want to continue to do so on the Eee. However, Anjuta - the IDE that I was using - is not very usable with the Eee's resolution of 1024x600. What with the status pane at the bottom, and the giant toolbar buttons, there's not much free real-estate for code. Can anyone recommend an IDE which is (or can be configured to be) suitable for low resolutions? I would much prefer something that supports modern IDE features like code folding and auto-completion.
0
24,849
08/24/2008 05:10:57
184
08/03/2008 05:34:19
815
11
Is there some way to introduce a delay in javascript?
Is there some function like delay() or wait() for delaying executing of the JavaScript code for a specific number of milliseconds?
javascript
null
null
null
null
null
open
Is there some way to introduce a delay in javascript? === Is there some function like delay() or wait() for delaying executing of the JavaScript code for a specific number of milliseconds?
0
24,853
08/24/2008 05:19:19
2,128
08/20/2008 13:32:09
80
3
(C) What is the difference between ++i and i++
In C, what is the difference between using ++i and i++. And which should be used in the incrementation block of a for loop?
c
forloop
increment
null
null
null
open
(C) What is the difference between ++i and i++ === In C, what is the difference between using ++i and i++. And which should be used in the incrementation block of a for loop?
0
24,864
08/24/2008 05:46:57
122
08/02/2008 07:56:07
3,760
175
VirtualBox from an existing partition
I installed VirtualBox on my Ubuntu Hardy Heron installation, and I would like to use it to virtualize Windows for those rare occasions that I actually need to do something there. Unfortunately, I don't have an installation disk at the moment, but I do have Vista already installed on a partition (it came with the machine). Is there a way I can easily copy this partition into a .vdi virtual image?
windows
linux
virtualization
virtualbox
null
null
open
VirtualBox from an existing partition === I installed VirtualBox on my Ubuntu Hardy Heron installation, and I would like to use it to virtualize Windows for those rare occasions that I actually need to do something there. Unfortunately, I don't have an installation disk at the moment, but I do have Vista already installed on a partition (it came with the machine). Is there a way I can easily copy this partition into a .vdi virtual image?
0
24,866
08/24/2008 05:48:22
184
08/03/2008 05:34:19
820
11
Is it essential that I use libraries to manipulate xml?
I am using java back end for creating an xml string which is passed to the browser. Currently I am using simple string manipulation to produce this xml. Is it essential that I use some xml library in java to produce the xml string? I find the libraries very difficult to use compared to what I need.
java
xml
null
null
null
null
open
Is it essential that I use libraries to manipulate xml? === I am using java back end for creating an xml string which is passed to the browser. Currently I am using simple string manipulation to produce this xml. Is it essential that I use some xml library in java to produce the xml string? I find the libraries very difficult to use compared to what I need.
0
24,881
08/24/2008 06:30:09
2,128
08/20/2008 13:32:09
117
3
C gcc errors
I'm trying to solve [the 3n+1 problem][1] and I have a for loop that looks like this: for(int i = low; i <= high; ++i) { res = runalg(i); if (res > highestres) { highestres = res; } } Unfortunately I'm getting this error when I try to compile with GCC: > 3np1.c:15: error: âforâ loop initial > declaration used outside C99 mode I don't know what C99 mode is. Any ideas? [1]: http://online-judge.uva.es/p/v1/100.html
c
forloop
gcc
null
null
null
open
C gcc errors === I'm trying to solve [the 3n+1 problem][1] and I have a for loop that looks like this: for(int i = low; i <= high; ++i) { res = runalg(i); if (res > highestres) { highestres = res; } } Unfortunately I'm getting this error when I try to compile with GCC: > 3np1.c:15: error: âforâ loop initial > declaration used outside C99 mode I don't know what C99 mode is. Any ideas? [1]: http://online-judge.uva.es/p/v1/100.html
0
24,885
08/24/2008 06:47:47
834
08/09/2008 07:29:24
140
12
Do you use Amazons Cloud services for your company?
I read a lot about the possibilities of [Amazons Cloud][1] computing, like [S3][2] or [EC2][3] and I wondered if someone actually uses this for mission-critical applications. Do you host your company website in the cloud? Do you store files there? Do you run your build servers in the cloud? There are already some services like [Scalr][4] or [WeoCeo][5] that could help you with this task, but I don't know if management is already at the point where this is a real issue... [1]: http://aws.amazon.com/ [2]: http://aws.amazon.com/s3 [3]: http://aws.amazon.com/ec2 [4]: https://www.scalr.net/ [5]: http://weoceo.weogeo.com/
cloud
cloudcomputing
amazon
null
null
null
open
Do you use Amazons Cloud services for your company? === I read a lot about the possibilities of [Amazons Cloud][1] computing, like [S3][2] or [EC2][3] and I wondered if someone actually uses this for mission-critical applications. Do you host your company website in the cloud? Do you store files there? Do you run your build servers in the cloud? There are already some services like [Scalr][4] or [WeoCeo][5] that could help you with this task, but I don't know if management is already at the point where this is a real issue... [1]: http://aws.amazon.com/ [2]: http://aws.amazon.com/s3 [3]: http://aws.amazon.com/ec2 [4]: https://www.scalr.net/ [5]: http://weoceo.weogeo.com/
0
24,886
08/24/2008 06:48:23
116
08/02/2008 05:51:57
3,903
198
Is there a performance difference between i++ and ++i ?
Is there a performance difference between i++ and ++i if the resulting value is not used?
c
performance
optimization
assembler
null
null
open
Is there a performance difference between i++ and ++i ? === Is there a performance difference between i++ and ++i if the resulting value is not used?
0
24,891
08/24/2008 06:50:56
2,128
08/20/2008 13:32:09
119
3
C Memory Management
I've always heard that in C you have to really watch how you manage memory. And I'm still beginning to learn C, but thus far, I have not had to do any memory managing related activities at all.. I always imagined having to release variables and do all sorts of ugly things. But this doesn't seem to be the case. Can someone show me (with code examples) an example of when you would have to do some "memory management" ?
memory
c
null
null
null
null
open
C Memory Management === I've always heard that in C you have to really watch how you manage memory. And I'm still beginning to learn C, but thus far, I have not had to do any memory managing related activities at all.. I always imagined having to release variables and do all sorts of ugly things. But this doesn't seem to be the case. Can someone show me (with code examples) an example of when you would have to do some "memory management" ?
0
24,901
08/24/2008 07:14:22
116
08/02/2008 05:51:57
3,913
201
Is there a performance difference between i++ and ++i in C++?
We looked at this answer for C in this question: <http://stackoverflow.com/questions/24886/is-there-a-performance-difference-between-i-and-i-in-c> What's the answer for C++?
c++
optimization
performance
null
null
null
open
Is there a performance difference between i++ and ++i in C++? === We looked at this answer for C in this question: <http://stackoverflow.com/questions/24886/is-there-a-performance-difference-between-i-and-i-in-c> What's the answer for C++?
0
24,915
08/24/2008 07:53:13
2,663
08/24/2008 05:25:57
11
3
BizTalk DB2 adapter connection error
My colleagues are attempting to connect BizTalk 2006 R2 via DB2/MVS adapter to a database hosted on z/OS mainframe. When testing the connecting settings, they are getting the following error Could not connect to data source 'New Data Source': The network connection was terminated because the host failed to send any data. SQLSTATE: 08S01, SQLCODE: -605 When putting the settings in a regular connection string and opening with .NET code, that is fine. I am new to BizTalk and DB2. Can anybody suggest what to look out for when this error surfaces?
db2
biztalk
null
null
null
null
open
BizTalk DB2 adapter connection error === My colleagues are attempting to connect BizTalk 2006 R2 via DB2/MVS adapter to a database hosted on z/OS mainframe. When testing the connecting settings, they are getting the following error Could not connect to data source 'New Data Source': The network connection was terminated because the host failed to send any data. SQLSTATE: 08S01, SQLCODE: -605 When putting the settings in a regular connection string and opening with .NET code, that is fine. I am new to BizTalk and DB2. Can anybody suggest what to look out for when this error surfaces?
0
24,929
08/24/2008 08:42:23
2,528
08/22/2008 16:39:39
95
4
Difference between EXISTS and IN in SQL?
I would like to know the difference between the EXIST and IN clause in SQL? When should we use EXIST and when IN should be used? Thank you.
sql
null
null
null
null
null
open
Difference between EXISTS and IN in SQL? === I would like to know the difference between the EXIST and IN clause in SQL? When should we use EXIST and when IN should be used? Thank you.
0
24,931
08/24/2008 08:46:57
1,670
08/17/2008 21:56:17
6
0
How to capture Python interpreter's and/or CMD.EXE's output from a Python script?
1. Is it possible to capture Python interpreter's output from a Python script? 2. Is it possible to capture Windows CMD's output from a Python script? If so, which librar(y|ies) should I look into?
python
pythoninterpreter
cmd.exe
null
null
null
open
How to capture Python interpreter's and/or CMD.EXE's output from a Python script? === 1. Is it possible to capture Python interpreter's output from a Python script? 2. Is it possible to capture Windows CMD's output from a Python script? If so, which librar(y|ies) should I look into?
0
24,941
08/24/2008 09:10:36
276
08/04/2008 10:44:14
73
6
Where can i find extended HTML reporters for Simpletest?
I am using [Simpletest][1] as my unit test framework for the PHP site I am currently working on. I like the fact that it is shipped with a simple HTML reporter, but I would like a bit more advanced reporter. I have read at the reporter api documentation, but it would be nice to be able to use an existing reporter, instead of having to do it yourself. Are there any good extended HTML reporters/GUI:s out there for Simpletest? [1]: http://www.simpletest.org/
php
unittesting
simpletest
gui
null
null
open
Where can i find extended HTML reporters for Simpletest? === I am using [Simpletest][1] as my unit test framework for the PHP site I am currently working on. I like the fact that it is shipped with a simple HTML reporter, but I would like a bit more advanced reporter. I have read at the reporter api documentation, but it would be nice to be able to use an existing reporter, instead of having to do it yourself. Are there any good extended HTML reporters/GUI:s out there for Simpletest? [1]: http://www.simpletest.org/
0
24,954
08/24/2008 10:05:38
2,669
08/24/2008 09:07:31
1
0
Windows: List and Launch applications associated with an extension
How to determine the applications associated with a particular extension (e.g. .JPG) and then determine where the executable to that application is located so that it can be launched via a call to say System.Diagnostics.Process.Start(...).
windows
registry
.net
null
null
null
open
Windows: List and Launch applications associated with an extension === How to determine the applications associated with a particular extension (e.g. .JPG) and then determine where the executable to that application is located so that it can be launched via a call to say System.Diagnostics.Process.Start(...).
0
24,959
08/24/2008 10:28:10
2,041
08/19/2008 23:02:38
95
7
Debugging asp.net with firefox and visual studio.net - very slow compared to IE
Debugging asp.net websites/web projects in visual studio.net 2005 with Firefox is loads slower than using IE. I've read something somewhere that there is a way of fixing this but i can't for the life of me find it again. Does anyone know what i'm on about and can point me in the right direction please? Cheers John
vs2005
firefox
debugging
null
null
null
open
Debugging asp.net with firefox and visual studio.net - very slow compared to IE === Debugging asp.net websites/web projects in visual studio.net 2005 with Firefox is loads slower than using IE. I've read something somewhere that there is a way of fixing this but i can't for the life of me find it again. Does anyone know what i'm on about and can point me in the right direction please? Cheers John
0
24,963
08/24/2008 10:38:17
1,073
08/12/2008 10:10:14
1
3
How to learn MDX
I am currently learning OLAP & MDX after many years of relational database development. Any tips on getting started in MDX? What are the best books and resources to learn MDX?
olap
ssas
mdx
null
null
null
open
How to learn MDX === I am currently learning OLAP & MDX after many years of relational database development. Any tips on getting started in MDX? What are the best books and resources to learn MDX?
0
24,965
08/24/2008 10:43:17
832
08/09/2008 06:51:40
1,803
138
TDD n00b - Challenges? Solutions? Recommendations?
OK, I know there have already been questions about [getting started with TDD](http://stackoverflow.com/questions/4303/why-should-i-practice-test-driven-development-and-how-should-i-start).. However, I guess I kind of know the general concensus is to _just do it_ , However, I seem to have the following problems getting my head into the game: * When working with collections, do will still test for obvious add/remove/inserts successful, even when based on Generics etc where we kind of "know" its going to work? * Some tests seem to take forever to implement.. Such as when working with string output, is there a "better" way to go about this sort of thing? (e.g. test the object model before parsing, break parsing down into small ops and test there) In my mind you should always test the "end result" but that can vary wildly and be tedious to set up. * I don't have a testing framework to use (work wont pay for one) so I can "practice" more. Are there any good ones that are free for commercial use? (at the moment I am using good 'ol _Debug.Assert_ :) * Probably the biggest.. Sometimes I don't know what to expect _NOT_ to happen.. I mean, you get your green light but I am always concerned that I may be missing a test.. Do you dig deeper to try and break the code, or leave it be and wait for it all fall over later (which will cost more).. So basically what I am looking for here is not a " _just do it_ " but more " _I did this, had problems with this, solved them by this_ ".. The **personal** experience :)
tdd
experience
null
null
null
10/07/2011 13:02:51
not constructive
TDD n00b - Challenges? Solutions? Recommendations? === OK, I know there have already been questions about [getting started with TDD](http://stackoverflow.com/questions/4303/why-should-i-practice-test-driven-development-and-how-should-i-start).. However, I guess I kind of know the general concensus is to _just do it_ , However, I seem to have the following problems getting my head into the game: * When working with collections, do will still test for obvious add/remove/inserts successful, even when based on Generics etc where we kind of "know" its going to work? * Some tests seem to take forever to implement.. Such as when working with string output, is there a "better" way to go about this sort of thing? (e.g. test the object model before parsing, break parsing down into small ops and test there) In my mind you should always test the "end result" but that can vary wildly and be tedious to set up. * I don't have a testing framework to use (work wont pay for one) so I can "practice" more. Are there any good ones that are free for commercial use? (at the moment I am using good 'ol _Debug.Assert_ :) * Probably the biggest.. Sometimes I don't know what to expect _NOT_ to happen.. I mean, you get your green light but I am always concerned that I may be missing a test.. Do you dig deeper to try and break the code, or leave it be and wait for it all fall over later (which will cost more).. So basically what I am looking for here is not a " _just do it_ " but more " _I did this, had problems with this, solved them by this_ ".. The **personal** experience :)
4
24,968
08/24/2008 10:49:32
1,929
08/19/2008 14:25:01
21
4
What are your most useful Resharper settings configurations and codetemplates?
I find Resharper a must for VS2008 but there are so many options to configure everything. What are the settings you immediately configure in a new Resharper install? Do you share your setting with all your team?
#visualstudio
resharper
null
null
null
null
open
What are your most useful Resharper settings configurations and codetemplates? === I find Resharper a must for VS2008 but there are so many options to configure everything. What are the settings you immediately configure in a new Resharper install? Do you share your setting with all your team?
0
24,986
08/24/2008 11:50:08
2,455
08/22/2008 11:29:07
43
1
How do I profile a Maven Application in Netbeans?
I've got a project using Maven 2 as the build tool. I use Netbeans 6 as my IDE and really want to be able to use the profiler. How can I get this to work?
profiling
maven-2
netbeans
profiler
null
null
open
How do I profile a Maven Application in Netbeans? === I've got a project using Maven 2 as the build tool. I use Netbeans 6 as my IDE and really want to be able to use the profiler. How can I get this to work?
0
24,991
08/24/2008 12:03:28
755
08/08/2008 15:28:16
284
20
Why can't I explicitly pass the type argument to a generic Java method?
I have defined a Java function: static <T> List<T> createEmptyList() { return new ArrayList<T>(); } One way to call it is like so: List<Integer> myList = createEmptyList(); // Compiles Why can't I call it by explicitly passing the generic type argument? : Object myObject = createEmtpyList<Integer>(); // Doesn't compile. Why? I get the error "Illegal start of expression" from the compiler.
java
generics
syntax
null
null
null
open
Why can't I explicitly pass the type argument to a generic Java method? === I have defined a Java function: static <T> List<T> createEmptyList() { return new ArrayList<T>(); } One way to call it is like so: List<Integer> myList = createEmptyList(); // Compiles Why can't I call it by explicitly passing the generic type argument? : Object myObject = createEmtpyList<Integer>(); // Doesn't compile. Why? I get the error "Illegal start of expression" from the compiler.
0
24,993
08/24/2008 12:11:01
31,505
2008-09-01
451
23
InvalidOperationException while creating wcf web service instance
I have a WCF Web Service which is referenced from a class library. After the project is run, when creating the service client object from inside a class library, I receive an InvalidOperationException with message: Could not find default endpoint element that references contract 'MyServiceReference.IMyService' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this contract could be found in the client element. The code I am using to create the instance is: myServiceClient = new MyServiceClient(); where MyServiceClient inherits from System.ServiceModel.ClientBase<myrootnamespace.Web.MyServiceReference.IMyService> How do I solve this? Note: I have a seperate console application which simply creates the same service object and makes calls to it and it works without no problems.
wcf
webservices
null
null
null
null
open
InvalidOperationException while creating wcf web service instance === I have a WCF Web Service which is referenced from a class library. After the project is run, when creating the service client object from inside a class library, I receive an InvalidOperationException with message: Could not find default endpoint element that references contract 'MyServiceReference.IMyService' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this contract could be found in the client element. The code I am using to create the instance is: myServiceClient = new MyServiceClient(); where MyServiceClient inherits from System.ServiceModel.ClientBase<myrootnamespace.Web.MyServiceReference.IMyService> How do I solve this? Note: I have a seperate console application which simply creates the same service object and makes calls to it and it works without no problems.
0
24,995
08/24/2008 12:14:14
755
08/08/2008 15:28:16
284
20
Is there a functional language for C++ ecosystem?
Java has [Scala][1] and .NET has [F#][2]. Both of these languages are very highly integrated into the respective Java and .NET platforms. Classes can be written in Scala then extended in Java for example. Does there exist an equivalent functional language that interoperates highly with C++? [1]: http://www.scala-lang.org/ [2]: http://research.microsoft.com/fsharp/
c++
functional
null
null
null
null
open
Is there a functional language for C++ ecosystem? === Java has [Scala][1] and .NET has [F#][2]. Both of these languages are very highly integrated into the respective Java and .NET platforms. Classes can be written in Scala then extended in Java for example. Does there exist an equivalent functional language that interoperates highly with C++? [1]: http://www.scala-lang.org/ [2]: http://research.microsoft.com/fsharp/
0
25,007
08/24/2008 12:33:58
1,199,387
08/06/2008 23:58:10
273
19
Conditional formating - percentage to color conversion
I'm a little bit stuck here - I know this is basics, but it's Sunday and I figured this would be the type of question that get answered in 10min on Stack Overflow, and it might even be a fun one to answer... What's the easiest way to convert a percentage to a color ranging from Green (100%) to Red (0%), with Yellow for 50%? I'm using plain 32bit RGB - so each component is an integer between 0 and 255. I'm doing this in C#, but I guess for a problem like this the language doesn't really matter that much.
c#
colors
null
null
null
null
open
Conditional formating - percentage to color conversion === I'm a little bit stuck here - I know this is basics, but it's Sunday and I figured this would be the type of question that get answered in 10min on Stack Overflow, and it might even be a fun one to answer... What's the easiest way to convert a percentage to a color ranging from Green (100%) to Red (0%), with Yellow for 50%? I'm using plain 32bit RGB - so each component is an integer between 0 and 255. I'm doing this in C#, but I guess for a problem like this the language doesn't really matter that much.
0
25,033
08/24/2008 13:29:20
2,628
08/23/2008 18:34:26
90
1
I Am Not Getting the Result I Expect Using readLine() in Java
I am using the code snippet below, however it's not working quite as I understand it should. public static void main(String[] args) { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String line; try { line = br.readLine(); while(line != null) { System.out.println(line); line = br.readLine(); } } catch (IOException e) { e.printStackTrace(); } } From reading the Javadoc about readLine() it says: Reads a line of text. A line is considered to be terminated by any one of a line feed ('\n'), a carriage return ('\r'), or a carriage return followed immediately by a linefeed. **Returns**: A String containing the contents of the line, not including any line-termination characters, or null if the end of the stream has been reached **Throws**: IOException - If an I/O error occurs From my understanding of this, readLine should return null the first time no input is entered other than a line termination, like '\r'. However, this code just ends up looping infinitely. After debugging, I have found that instead of null being returned when just a termination character is entered, it actually returns an empty string (""). This doesn't make sense to me. What am I not understanding correctly?
java
java-io
null
null
null
null
open
I Am Not Getting the Result I Expect Using readLine() in Java === I am using the code snippet below, however it's not working quite as I understand it should. public static void main(String[] args) { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String line; try { line = br.readLine(); while(line != null) { System.out.println(line); line = br.readLine(); } } catch (IOException e) { e.printStackTrace(); } } From reading the Javadoc about readLine() it says: Reads a line of text. A line is considered to be terminated by any one of a line feed ('\n'), a carriage return ('\r'), or a carriage return followed immediately by a linefeed. **Returns**: A String containing the contents of the line, not including any line-termination characters, or null if the end of the stream has been reached **Throws**: IOException - If an I/O error occurs From my understanding of this, readLine should return null the first time no input is entered other than a line termination, like '\r'. However, this code just ends up looping infinitely. After debugging, I have found that instead of null being returned when just a termination character is entered, it actually returns an empty string (""). This doesn't make sense to me. What am I not understanding correctly?
0
25,041
08/24/2008 13:40:00
1,693
08/18/2008 02:25:37
417
22
SPAN Height in Firefox
Using CSS, I'm trying to specify the height of a SPAN tag in Firefox, but it's just not accepting it (IE does, funnily enough). Firefox accepts the height if I use a DIV, but the problem with using a DIV is the annoying line break after it, which I can't have in this particular instance. I tried setting the CSS style attribute of: <pre>display: inline</pre> for the DIV, but Firefox seems to then revert to SPAN behaviour anyway, and ignores the height attribute once again.
css
firefox
null
null
null
null
open
SPAN Height in Firefox === Using CSS, I'm trying to specify the height of a SPAN tag in Firefox, but it's just not accepting it (IE does, funnily enough). Firefox accepts the height if I use a DIV, but the problem with using a DIV is the annoying line break after it, which I can't have in this particular instance. I tried setting the CSS style attribute of: <pre>display: inline</pre> for the DIV, but Firefox seems to then revert to SPAN behaviour anyway, and ignores the height attribute once again.
0
25,042
08/24/2008 13:40:15
1,710
08/18/2008 07:18:54
327
16
Am I allowed to have "incomplete" aggregates in DDD?
DDD states that you should only ever access entities through their aggregate root. So say for instance that you have an aggregate root X which potentially has a *lot* of child Y entities. Now, for some scenario, you only really care about a subset of these Y entities at a time (maybe you're displaying them in a paged list or whatever). Is it OK to implement a repository then, so that in such scenarios it returns an *incomplete* aggregate? Ie. an X object who'se Ys collection only contains the Y instances we're interested in and not *all* of them? This could for instance cause methods on X which perform some calculation involving the Ys to not behave as expected. Is this perhaps an indication that the Y entity in question should be considered promoted to an aggregate root? My current idea (in C#) is to leverage the delayed execution of LINQ, so that my X object has an IQueryable<Y> to represent its relationship with Y. This way, I can have transparent lazy loading with filtering... But getting this to work with an ORM (Linq to Sql in my case) might be a bit tricky. Any other clever ideas?
domain-driven-design
null
null
null
null
null
open
Am I allowed to have "incomplete" aggregates in DDD? === DDD states that you should only ever access entities through their aggregate root. So say for instance that you have an aggregate root X which potentially has a *lot* of child Y entities. Now, for some scenario, you only really care about a subset of these Y entities at a time (maybe you're displaying them in a paged list or whatever). Is it OK to implement a repository then, so that in such scenarios it returns an *incomplete* aggregate? Ie. an X object who'se Ys collection only contains the Y instances we're interested in and not *all* of them? This could for instance cause methods on X which perform some calculation involving the Ys to not behave as expected. Is this perhaps an indication that the Y entity in question should be considered promoted to an aggregate root? My current idea (in C#) is to leverage the delayed execution of LINQ, so that my X object has an IQueryable<Y> to represent its relationship with Y. This way, I can have transparent lazy loading with filtering... But getting this to work with an ORM (Linq to Sql in my case) might be a bit tricky. Any other clever ideas?
0
25,046
08/24/2008 13:42:35
2,450
08/22/2008 11:13:30
11
1
Lisp Executable
I've just started learning Lisp and I can't figure out how to compile and link lisp code to an executable. Im using clisp and "clisp -c" produces two files .fas and .lib, what do I do next to get an exeutable?
lisp
clisp
null
null
null
null
open
Lisp Executable === I've just started learning Lisp and I can't figure out how to compile and link lisp code to an executable. Im using clisp and "clisp -c" produces two files .fas and .lib, what do I do next to get an exeutable?
0
25,063
08/24/2008 14:05:31
381
08/05/2008 10:39:26
1,251
25
How to mentor a junior programmer
Does anyone have any suggestions on how to mentor a junior programmer ? If you have mentored someone did you follow any process or was it quite informal ? If you've been mentored in the past what kind of things did you find most helpful ?
teaching
language-agnostic
bestpractice
mentoring
null
null
open
How to mentor a junior programmer === Does anyone have any suggestions on how to mentor a junior programmer ? If you have mentored someone did you follow any process or was it quite informal ? If you've been mentored in the past what kind of things did you find most helpful ?
0
25,116
08/24/2008 15:37:50
2,679
08/24/2008 14:31:44
1
1
Binary buffer in Python
In Python you can use [StringIO][1] for a file-like buffer for character data. [Memory-mapped file][2] basically does similar thing for binary data, but it requires a file that is used as the basis. Does Python have a file object that is intended for binary data and is memory only, equivalent to Java's [ByteArrayOutputStream][3]? [1]: http://docs.python.org/lib/module-StringIO.html [2]: http://docs.python.org/lib/module-mmap.html [3]: http://java.sun.com/javase/6/docs/api/java/io/ByteArrayOutputStream.html
python
io
binary
buffer
null
null
open
Binary buffer in Python === In Python you can use [StringIO][1] for a file-like buffer for character data. [Memory-mapped file][2] basically does similar thing for binary data, but it requires a file that is used as the basis. Does Python have a file object that is intended for binary data and is memory only, equivalent to Java's [ByteArrayOutputStream][3]? [1]: http://docs.python.org/lib/module-StringIO.html [2]: http://docs.python.org/lib/module-mmap.html [3]: http://java.sun.com/javase/6/docs/api/java/io/ByteArrayOutputStream.html
0
25,128
08/24/2008 16:01:46
1,384,652
08/01/2008 12:01:23
1,191
67
Images in PHP
Is it possible to create images with PHP (as opposed to simply linking to them via HTML) and if so, where should I go first to learn about such a thing?
php
image
null
null
null
null
open
Images in PHP === Is it possible to create images with PHP (as opposed to simply linking to them via HTML) and if so, where should I go first to learn about such a thing?
0
25,132
08/24/2008 16:04:39
2,077
08/20/2008 07:26:21
76
2
Are named entities in HTML still necessary in the age of Unicode aware browsers?
I did a lot of PHP programming in the last years and one thing that keeps annoying me is the weak support for Unicode and multibyte strings (to be sure, natively there is none). For example, "htmlentities" seems to be a much used funtion in the PHP world and I found it to be absolutely annoying when you've put an effort into keeping every string localizable, only store UTF-8 in your database, only deliver UTF-8 webpages etc. Suddenly, somewhere between your database and the browser there's this hopelessly naive function pretending every byte is a character and messes everything up. I would just <i>love</i> to just dump this kind of functions, they seem totally superfluous. <b>Is it still necessary these days to write '&amp;auml;' instead of 'ä'?</b> At least my Firefox seems perfectly happy to display even the strangest Asian glyphs as long as they're served in a proper encoding.
php
unicode
html
internationalization
null
null
open
Are named entities in HTML still necessary in the age of Unicode aware browsers? === I did a lot of PHP programming in the last years and one thing that keeps annoying me is the weak support for Unicode and multibyte strings (to be sure, natively there is none). For example, "htmlentities" seems to be a much used funtion in the PHP world and I found it to be absolutely annoying when you've put an effort into keeping every string localizable, only store UTF-8 in your database, only deliver UTF-8 webpages etc. Suddenly, somewhere between your database and the browser there's this hopelessly naive function pretending every byte is a character and messes everything up. I would just <i>love</i> to just dump this kind of functions, they seem totally superfluous. <b>Is it still necessary these days to write '&amp;auml;' instead of 'ä'?</b> At least my Firefox seems perfectly happy to display even the strangest Asian glyphs as long as they're served in a proper encoding.
0
25,137
08/24/2008 16:08:46
290
08/04/2008 12:57:50
368
40
What Is Your Experience With Model Checking?
- What types of applications have you used [model checking][1] for? - What model checking tool did you use? - How would you summarize your experience w/ the technique, specifically in evaluating its effectiveness in delivering higher quality software? In the course of my studies, I had a chance to use [Spin][2], and it aroused my curiosity as to how much actual model checking is going on and how much value are organizations getting out of it. In my work experience, I've worked on business applications, where there is (naturally) no consideration of applying formal verification to the logic. I'd really like to learn about SO folks model checking experience and thoughts on the subject. Will model checking ever become a more "mainstream" developing practice that we should have in our toolkit? [1]: http://en.wikipedia.org/wiki/Model_checking [2]: http://spinroot.com/spin/whatispin.html
model-checking
formal-verification
correctness
formal-methods
algorithm
null
open
What Is Your Experience With Model Checking? === - What types of applications have you used [model checking][1] for? - What model checking tool did you use? - How would you summarize your experience w/ the technique, specifically in evaluating its effectiveness in delivering higher quality software? In the course of my studies, I had a chance to use [Spin][2], and it aroused my curiosity as to how much actual model checking is going on and how much value are organizations getting out of it. In my work experience, I've worked on business applications, where there is (naturally) no consideration of applying formal verification to the logic. I'd really like to learn about SO folks model checking experience and thoughts on the subject. Will model checking ever become a more "mainstream" developing practice that we should have in our toolkit? [1]: http://en.wikipedia.org/wiki/Model_checking [2]: http://spinroot.com/spin/whatispin.html
0
25,147
08/24/2008 16:21:17
2,118
08/20/2008 12:54:09
185
8
How can I merge PHP arrays?
I have two arrays of animals (for example). $array = array( array( 'id' => 1, 'name' => 'Cat', ), array( 'id' => 2, 'name' => 'Mouse', ) ); $array2 = array( array( 'id' => 2, 'age' => 321, ), array( 'id' => 1, 'age' => 123, ) ); How can I merge the two arrays into one by the ID?
php
arrays
null
null
null
null
open
How can I merge PHP arrays? === I have two arrays of animals (for example). $array = array( array( 'id' => 1, 'name' => 'Cat', ), array( 'id' => 2, 'name' => 'Mouse', ) ); $array2 = array( array( 'id' => 2, 'age' => 321, ), array( 'id' => 1, 'age' => 123, ) ); How can I merge the two arrays into one by the ID?
0
25,156
08/24/2008 16:28:54
2,586
08/23/2008 08:44:06
6
5
New language to learn for a business applications developer
Say, one is a business applications developer (database, UI, 3-layer architecture, you know) working on Java or .NET platform and not going to change his career direction. What new programming language would you recommend him to learn to continue his professional growth and why?
language
null
null
null
null
null
open
New language to learn for a business applications developer === Say, one is a business applications developer (database, UI, 3-layer architecture, you know) working on Java or .NET platform and not going to change his career direction. What new programming language would you recommend him to learn to continue his professional growth and why?
0
25,158
08/24/2008 16:31:25
2,703
08/24/2008 16:06:02
1
0
Building C# .NET windows application with multiple views
I'm rewriting an old application and use this a a good opportunity to try out C# and .NET development (I usually do a lot of plug-in stuff in C). The application is basically a timer collecting data. It has a start view with a button to start the measurement. During the measurement the app has five different views depending on what information the user wants to see. What is the best practice to switch between the views? From start to running? Between the running views? Ideas: - Use one form and hide and show controls - Use one start form and then a form with a TabControl - Use six separate forms
c#
.net
windows
null
null
null
open
Building C# .NET windows application with multiple views === I'm rewriting an old application and use this a a good opportunity to try out C# and .NET development (I usually do a lot of plug-in stuff in C). The application is basically a timer collecting data. It has a start view with a button to start the measurement. During the measurement the app has five different views depending on what information the user wants to see. What is the best practice to switch between the views? From start to running? Between the running views? Ideas: - Use one form and hide and show controls - Use one start form and then a form with a TabControl - Use six separate forms
0
25,174
08/24/2008 16:45:06
2,706
08/24/2008 16:23:08
1
0
How to prevent session timeout in Symfony 1.0?
I've used the PHP MVC framework Symfony to build an on-demand web app. It has an annoying bug - the session expires after about 15-30 minutes of inactivity. There is a config directive to prevent session expiration but it does not work. Even workarounds such as [this one][1] did not help me. I intend not to migrate to Symfony 1.1 (which fixes this bug) in the foreseeable future. Has anyone been there and solved it? I would be most grateful for a hint or two! [1]: http://robrosenbaum.com/php/howto-disable-session-timeout-in-symfony/
php
symfony
null
null
null
null
open
How to prevent session timeout in Symfony 1.0? === I've used the PHP MVC framework Symfony to build an on-demand web app. It has an annoying bug - the session expires after about 15-30 minutes of inactivity. There is a config directive to prevent session expiration but it does not work. Even workarounds such as [this one][1] did not help me. I intend not to migrate to Symfony 1.1 (which fixes this bug) in the foreseeable future. Has anyone been there and solved it? I would be most grateful for a hint or two! [1]: http://robrosenbaum.com/php/howto-disable-session-timeout-in-symfony/
0
25,182
08/24/2008 16:53:34
26
08/01/2008 12:18:14
1,874
107
What's optimal? UNION vs WHERE IN (str1, str2, str3)
I'm writing a program that sends an email out at a client's specific local time. I have a .NET method that takes a timezone & time and destination timezone and returns the time in that timezone. So my method is to select every distinct timezone in the database, check if it is the correct time using the method, then select every client out of the database with that timezone(s). The query will look like one of these. Keep in mind the order of the result set does not matter, so a union would be fine. Which runs faster, or do they really do the same thing? SELECT email FROM tClient WHERE timezoneID in (1, 4, 9) or SELECT email FROM tClient WHERE timezoneID = 1 UNION SELECT email FROM tClient WHERE timezoneID = 4 UNION SELECT email FROM tCLIENT WHERE timezoneID = 9
sql
null
null
null
null
null
open
What's optimal? UNION vs WHERE IN (str1, str2, str3) === I'm writing a program that sends an email out at a client's specific local time. I have a .NET method that takes a timezone & time and destination timezone and returns the time in that timezone. So my method is to select every distinct timezone in the database, check if it is the correct time using the method, then select every client out of the database with that timezone(s). The query will look like one of these. Keep in mind the order of the result set does not matter, so a union would be fine. Which runs faster, or do they really do the same thing? SELECT email FROM tClient WHERE timezoneID in (1, 4, 9) or SELECT email FROM tClient WHERE timezoneID = 1 UNION SELECT email FROM tClient WHERE timezoneID = 4 UNION SELECT email FROM tCLIENT WHERE timezoneID = 9
0
25,184
08/24/2008 16:56:59
269
08/04/2008 10:13:44
1,278
88
Starting out in Consultancy
What extra skills should developers interested in Consulting possess and what is the best way to gain them?
business
personaldevelopment
null
null
null
null
open
Starting out in Consultancy === What extra skills should developers interested in Consulting possess and what is the best way to gain them?
0
25,192
08/24/2008 17:05:40
2,367
08/21/2008 21:14:31
1
1
Java SWIFT Library
I'm looking for a Java library for SWIFT messages. I want to * parse SWIFT messages into an object model * validate SWIFT messages (including SWIFT network validation rules) * build / change SWIFT messages by using an object model So far I've looked at two libraries * AnaSys Message Objects ([link text][1]) * Datamation SWIFT Message Suite ([link text][2]) Both libraries allow to accomplish the tasks mentioned above but in both cases I'm not really happy. AnaSys uses a internal XML representation for all SWIFT messages which you need to know in order to access the fields of a message. And you need to operate on the DOM of the XML representation, there is no way to say "get the contents of field '50K' of the SWIFT message". And the Datamation library seems to have the nicer API but does not find all errors. So does anyone know other SWIFT libraries to use? [1]: http://www.anasys.com/products/messageobjects/ [2]: http://www.paymentcomponents.com/swift/message_suite/components_suite.html
java
swift
null
null
null
null
open
Java SWIFT Library === I'm looking for a Java library for SWIFT messages. I want to * parse SWIFT messages into an object model * validate SWIFT messages (including SWIFT network validation rules) * build / change SWIFT messages by using an object model So far I've looked at two libraries * AnaSys Message Objects ([link text][1]) * Datamation SWIFT Message Suite ([link text][2]) Both libraries allow to accomplish the tasks mentioned above but in both cases I'm not really happy. AnaSys uses a internal XML representation for all SWIFT messages which you need to know in order to access the fields of a message. And you need to operate on the DOM of the XML representation, there is no way to say "get the contents of field '50K' of the SWIFT message". And the Datamation library seems to have the nicer API but does not find all errors. So does anyone know other SWIFT libraries to use? [1]: http://www.anasys.com/products/messageobjects/ [2]: http://www.paymentcomponents.com/swift/message_suite/components_suite.html
0
25,200
08/24/2008 17:17:51
2,684
08/24/2008 14:38:27
1
0
C#.NET Winforms: Is it possible to override Label.Autosize ?
I don't like the AutoSize property of the Label control. I have a custom Label that draws a fancy rounded border among other things. I'm placing a AutoSize = false in my constructor, however, when I place it in design mode, the property always is True. I have overridden other properties with success but this one is happily ignoring me. Does anybody has a clue if this is "by MS design" ? Here's the full source code of my Label in case anyone is interested. Thanks in advance. <pre><code> using System; using System.ComponentModel; using System.Drawing; using System.Drawing.Drawing2D; using System.Windows.Forms; namespace Dentactil.UI.WinControls { [DefaultProperty("TextString")] [DefaultEvent("TextClick")] public partial class RoundedLabel : UserControl { private static readonly Color DEFAULT_BORDER_COLOR = Color.FromArgb( 132, 100, 161 ); private const float DEFAULT_BORDER_WIDTH = 2.0F; private const int DEFAULT_ROUNDED_WIDTH = 16; private const int DEFAULT_ROUNDED_HEIGHT = 12; private Color mBorderColor = DEFAULT_BORDER_COLOR; private float mBorderWidth = DEFAULT_BORDER_WIDTH; private int mRoundedWidth = DEFAULT_ROUNDED_WIDTH; private int mRoundedHeight = DEFAULT_ROUNDED_HEIGHT; public event EventHandler TextClick; private Padding mPadding = new Padding(8); public RoundedLabel() { InitializeComponent(); } public Cursor TextCursor { get { return lblText.Cursor; } set { lblText.Cursor = value; } } public Padding TextPadding { get { return mPadding; } set { mPadding = value; UpdateInternalBounds(); } } public ContentAlignment TextAlign { get { return lblText.TextAlign; } set { lblText.TextAlign = value; } } public string TextString { get { return lblText.Text; } set { lblText.Text = value; } } public override Font Font { get { return base.Font; } set { base.Font = value; lblText.Font = value; } } public override Color ForeColor { get { return base.ForeColor; } set { base.ForeColor = value; lblText.ForeColor = value; } } public Color BorderColor { get { return mBorderColor; } set { mBorderColor = value; Invalidate(); } } [DefaultValue(DEFAULT_BORDER_WIDTH)] public float BorderWidth { get { return mBorderWidth; } set { mBorderWidth = value; Invalidate(); } } [DefaultValue(DEFAULT_ROUNDED_WIDTH)] public int RoundedWidth { get { return mRoundedWidth; } set { mRoundedWidth = value; Invalidate(); } } [DefaultValue(DEFAULT_ROUNDED_HEIGHT)] public int RoundedHeight { get { return mRoundedHeight; } set { mRoundedHeight = value; Invalidate(); } } private void UpdateInternalBounds() { lblText.Left = mPadding.Left; lblText.Top = mPadding.Top; int width = Width - mPadding.Right - mPadding.Left; lblText.Width = width > 0 ? width : 0; int heigth = Height - mPadding.Bottom - mPadding.Top; lblText.Height = heigth > 0 ? heigth : 0; } protected override void OnLoad(EventArgs e) { UpdateInternalBounds(); base.OnLoad(e); } protected override void OnPaint(PaintEventArgs e) { SmoothingMode smoothingMode = e.Graphics.SmoothingMode; e.Graphics.SmoothingMode = SmoothingMode.AntiAlias; int roundedWidth = RoundedWidth > (Width - 1)/2 ? (Width - 1)/2 : RoundedWidth; int roundedHeight = RoundedHeight > (Height - 1)/2 ? (Height - 1)/2 : RoundedHeight; GraphicsPath path = new GraphicsPath(); path.AddLine(0, roundedHeight, 0, Height - 1 - roundedHeight); path.AddArc(new RectangleF(0, Height - 1 - 2*roundedHeight, 2*roundedWidth, 2*roundedHeight), 180, -90); path.AddLine(roundedWidth, Height - 1, Width - 1 - 2*roundedWidth, Height - 1); path.AddArc(new RectangleF(Width - 1 - 2*roundedWidth, Height - 1 - 2*roundedHeight, 2*roundedWidth, 2*roundedHeight), 90, -90); path.AddLine(Width - 1, Height - 1 - roundedHeight, Width - 1, roundedHeight); path.AddArc(new RectangleF(Width - 1 - 2*roundedWidth, 0, 2*roundedWidth, 2*roundedHeight), 0, -90); path.AddLine(Width - 1 - roundedWidth, 0, roundedWidth, 0); path.AddArc(new RectangleF(0, 0, 2*roundedWidth, 2*roundedHeight), -90, -90); e.Graphics.DrawPath(new Pen(new SolidBrush(BorderColor), BorderWidth), path); e.Graphics.SmoothingMode = smoothingMode; base.OnPaint(e); } protected override void OnResize(EventArgs e) { UpdateInternalBounds(); base.OnResize(e); } private void lblText_Click(object sender, EventArgs e) { if (TextClick != null) { TextClick(this, e); } } } } </pre></code> (there are some issues with Stack Overflow's markup and the Underscore, but it's easy to follow the code).
c#
label
winforms
autosize
override
null
open
C#.NET Winforms: Is it possible to override Label.Autosize ? === I don't like the AutoSize property of the Label control. I have a custom Label that draws a fancy rounded border among other things. I'm placing a AutoSize = false in my constructor, however, when I place it in design mode, the property always is True. I have overridden other properties with success but this one is happily ignoring me. Does anybody has a clue if this is "by MS design" ? Here's the full source code of my Label in case anyone is interested. Thanks in advance. <pre><code> using System; using System.ComponentModel; using System.Drawing; using System.Drawing.Drawing2D; using System.Windows.Forms; namespace Dentactil.UI.WinControls { [DefaultProperty("TextString")] [DefaultEvent("TextClick")] public partial class RoundedLabel : UserControl { private static readonly Color DEFAULT_BORDER_COLOR = Color.FromArgb( 132, 100, 161 ); private const float DEFAULT_BORDER_WIDTH = 2.0F; private const int DEFAULT_ROUNDED_WIDTH = 16; private const int DEFAULT_ROUNDED_HEIGHT = 12; private Color mBorderColor = DEFAULT_BORDER_COLOR; private float mBorderWidth = DEFAULT_BORDER_WIDTH; private int mRoundedWidth = DEFAULT_ROUNDED_WIDTH; private int mRoundedHeight = DEFAULT_ROUNDED_HEIGHT; public event EventHandler TextClick; private Padding mPadding = new Padding(8); public RoundedLabel() { InitializeComponent(); } public Cursor TextCursor { get { return lblText.Cursor; } set { lblText.Cursor = value; } } public Padding TextPadding { get { return mPadding; } set { mPadding = value; UpdateInternalBounds(); } } public ContentAlignment TextAlign { get { return lblText.TextAlign; } set { lblText.TextAlign = value; } } public string TextString { get { return lblText.Text; } set { lblText.Text = value; } } public override Font Font { get { return base.Font; } set { base.Font = value; lblText.Font = value; } } public override Color ForeColor { get { return base.ForeColor; } set { base.ForeColor = value; lblText.ForeColor = value; } } public Color BorderColor { get { return mBorderColor; } set { mBorderColor = value; Invalidate(); } } [DefaultValue(DEFAULT_BORDER_WIDTH)] public float BorderWidth { get { return mBorderWidth; } set { mBorderWidth = value; Invalidate(); } } [DefaultValue(DEFAULT_ROUNDED_WIDTH)] public int RoundedWidth { get { return mRoundedWidth; } set { mRoundedWidth = value; Invalidate(); } } [DefaultValue(DEFAULT_ROUNDED_HEIGHT)] public int RoundedHeight { get { return mRoundedHeight; } set { mRoundedHeight = value; Invalidate(); } } private void UpdateInternalBounds() { lblText.Left = mPadding.Left; lblText.Top = mPadding.Top; int width = Width - mPadding.Right - mPadding.Left; lblText.Width = width > 0 ? width : 0; int heigth = Height - mPadding.Bottom - mPadding.Top; lblText.Height = heigth > 0 ? heigth : 0; } protected override void OnLoad(EventArgs e) { UpdateInternalBounds(); base.OnLoad(e); } protected override void OnPaint(PaintEventArgs e) { SmoothingMode smoothingMode = e.Graphics.SmoothingMode; e.Graphics.SmoothingMode = SmoothingMode.AntiAlias; int roundedWidth = RoundedWidth > (Width - 1)/2 ? (Width - 1)/2 : RoundedWidth; int roundedHeight = RoundedHeight > (Height - 1)/2 ? (Height - 1)/2 : RoundedHeight; GraphicsPath path = new GraphicsPath(); path.AddLine(0, roundedHeight, 0, Height - 1 - roundedHeight); path.AddArc(new RectangleF(0, Height - 1 - 2*roundedHeight, 2*roundedWidth, 2*roundedHeight), 180, -90); path.AddLine(roundedWidth, Height - 1, Width - 1 - 2*roundedWidth, Height - 1); path.AddArc(new RectangleF(Width - 1 - 2*roundedWidth, Height - 1 - 2*roundedHeight, 2*roundedWidth, 2*roundedHeight), 90, -90); path.AddLine(Width - 1, Height - 1 - roundedHeight, Width - 1, roundedHeight); path.AddArc(new RectangleF(Width - 1 - 2*roundedWidth, 0, 2*roundedWidth, 2*roundedHeight), 0, -90); path.AddLine(Width - 1 - roundedWidth, 0, roundedWidth, 0); path.AddArc(new RectangleF(0, 0, 2*roundedWidth, 2*roundedHeight), -90, -90); e.Graphics.DrawPath(new Pen(new SolidBrush(BorderColor), BorderWidth), path); e.Graphics.SmoothingMode = smoothingMode; base.OnPaint(e); } protected override void OnResize(EventArgs e) { UpdateInternalBounds(); base.OnResize(e); } private void lblText_Click(object sender, EventArgs e) { if (TextClick != null) { TextClick(this, e); } } } } </pre></code> (there are some issues with Stack Overflow's markup and the Underscore, but it's easy to follow the code).
0
25,224
08/24/2008 17:48:12
2,462
08/22/2008 12:21:34
1
1
joining latest of various usermetadata tags to user rows
I have a postgres database with a user table (userid, firstname, lastname) and a usermetadata table (userid, code, content, created datetime). I store various information about each user in the usermetadata table by code and keep a full history. so for example, a user (userid 15) has the following metadata: 15, 'QHS', '20', '2008-08-24 13:36:33.465567-04' 15, 'QHE', '8', '2008-08-24 12:07:08.660519-04' 15, 'QHS', '21', '2008-08-24 09:44:44.39354-04' 15, 'QHE', '10', '2008-08-24 08:47:57.672058-04' I need to fetch a list of all my users and the most recent value of each of various usermetadata codes. I did this programmatically and it was, of course godawful slow. The best I could figure out to do it in SQL was to join sub-selects, which were also slow and I had to do one for each code.
database
postgresql
null
null
null
null
open
joining latest of various usermetadata tags to user rows === I have a postgres database with a user table (userid, firstname, lastname) and a usermetadata table (userid, code, content, created datetime). I store various information about each user in the usermetadata table by code and keep a full history. so for example, a user (userid 15) has the following metadata: 15, 'QHS', '20', '2008-08-24 13:36:33.465567-04' 15, 'QHE', '8', '2008-08-24 12:07:08.660519-04' 15, 'QHS', '21', '2008-08-24 09:44:44.39354-04' 15, 'QHE', '10', '2008-08-24 08:47:57.672058-04' I need to fetch a list of all my users and the most recent value of each of various usermetadata codes. I did this programmatically and it was, of course godawful slow. The best I could figure out to do it in SQL was to join sub-selects, which were also slow and I had to do one for each code.
0
25,225
08/24/2008 17:49:02
1,582
08/16/2008 20:41:09
6
2
Combining values from different files into one CSV file
I have a couple of files containing a value in each line
regex
linux
unix
shell
null
null
open
Combining values from different files into one CSV file === I have a couple of files containing a value in each line
0
25,227
08/24/2008 17:50:23
2,638
08/23/2008 20:10:14
126
6
Your feeling about 'brainteaser'-based interviews
...either as interviewer and/or interviewee! I know lots of people are against them. I'm quite fond of brainteasers (math/CS-based, and I certainly prefer those which don't require any specialized knowledge). In my line of work, 'problem solving' is quite an important requirement when looking for new hires and I think brainteasers *can* be a good tool. However, there are a few problems with them: - it's hard to find an original brainteaser (there's no point reusing over and over again the same brainteasers, as candidates will just get the 'list'); - it's hard to find a brainteaser which is quite 'open', from which a conversation can start with a candidate (I really dislike those which have a 'trick', and much prefer those which have different solutions, extensions,...); - using one (or more) brainteasers in an interview process tends to take (a lot of) time; - some people are so much stressed during a job interview that they sometimes even lack the self-confidence needed to just 'have a go'. As an interviewee, I have to say that being given brainteasers that I found interesting during the interview process is one of the reasons I chose my current employer! So, what are your thoughts/advice on the use of brainteasers?
interview-questions
null
null
null
null
03/11/2012 14:07:48
not constructive
Your feeling about 'brainteaser'-based interviews === ...either as interviewer and/or interviewee! I know lots of people are against them. I'm quite fond of brainteasers (math/CS-based, and I certainly prefer those which don't require any specialized knowledge). In my line of work, 'problem solving' is quite an important requirement when looking for new hires and I think brainteasers *can* be a good tool. However, there are a few problems with them: - it's hard to find an original brainteaser (there's no point reusing over and over again the same brainteasers, as candidates will just get the 'list'); - it's hard to find a brainteaser which is quite 'open', from which a conversation can start with a candidate (I really dislike those which have a 'trick', and much prefer those which have different solutions, extensions,...); - using one (or more) brainteasers in an interview process tends to take (a lot of) time; - some people are so much stressed during a job interview that they sometimes even lack the self-confidence needed to just 'have a go'. As an interviewee, I have to say that being given brainteasers that I found interesting during the interview process is one of the reasons I chose my current employer! So, what are your thoughts/advice on the use of brainteasers?
4
9,617,481
03/08/2012 12:13:21
1,256,938
03/08/2012 11:55:26
1
0
JSF2+AJAX: Keep Scrollbar position, plain mojarra
I have a more complex webapp in JSF2 (+EJB3.1 +JPA2 on glassfish 3.1), which only uses standard (mojarra) JSF-components and makes massive use of nested composites and ajax-calls. I want all my scrollbars save and restore their position whenever an ajax-call occurs. I tried different approaches, but none seems really good to me, so I need some hints which way to go: 1. JavaScript: Add a JavaScript which reads all scrollbar-positions either when a scroll occurs (element.onScroll must be set by javascript, cause this attribute is not available in XHTML4) or when an ajax-request occurs (jsf.ajax.addOnEvent(savePositions)). Save the scrollbars' positions either in hidden input-fields or in cookie. Restore them when the ajax-response occurs (jsf.ajax.addOnEvent(restorePositions)). Contras if not using cookies: -The scroll position must be stored in the hidden input field before the ajax-request occurs, so the element.onScroll-attribute must be used here. Not really nice, cause it saves the positions many many times, although one time before each ajax-request would be sufficient. -All hidden input fields must be transferred in the ajax-call. Since the JSF-site uses several forms, there seems no way to automatically add them to all ajax-calls. Instead every <f:ajax> element needs the hidden input fields added to the execute-attribute. -One hidden input field is needed for every scrollable element. Contra if using cookies: -well, cookies need to be enabled for the website. Contra in general: -JavaScript code must either know or iterate through all elements, which have scrollbars. -JavaScript code must be executed again, if a componenent is re-rendered and needs the onScroll-attribute set. 2. JavaScript + Composite: So I thought of writing a composite scrollStateSave, which points to the JSF-id of the element, which has the scrollbars. The composite contains the hidden input field (or cookie) and javascript and handles everything, so I just need to add one "instance" of the composite per element, which has scrollbars. The javascript makes use of closures to work for multiple elements on one site. Contra: -The javascript inside the composite is not executed on a re-render after an ajax-call. There are workarounds for this, but they look ugly to me. 3. Myfaces has an option AUTO_SCROLL: How does it work exactly? Does it work for non-myfaces-jsf-components? 4. Tomahawk offers a <t:autoScroll>-behaviour. Using the tomahawk-replacements for the standard-mojarra-jsf2-components would be ok for me. but documentation of <t:autoscroll> speaks of an attribute "event", while implementation needs attribute "value". What should I put in this attribute to make <t:autoScrolll> work?
jsf-2.0
null
null
null
null
null
open
JSF2+AJAX: Keep Scrollbar position, plain mojarra === I have a more complex webapp in JSF2 (+EJB3.1 +JPA2 on glassfish 3.1), which only uses standard (mojarra) JSF-components and makes massive use of nested composites and ajax-calls. I want all my scrollbars save and restore their position whenever an ajax-call occurs. I tried different approaches, but none seems really good to me, so I need some hints which way to go: 1. JavaScript: Add a JavaScript which reads all scrollbar-positions either when a scroll occurs (element.onScroll must be set by javascript, cause this attribute is not available in XHTML4) or when an ajax-request occurs (jsf.ajax.addOnEvent(savePositions)). Save the scrollbars' positions either in hidden input-fields or in cookie. Restore them when the ajax-response occurs (jsf.ajax.addOnEvent(restorePositions)). Contras if not using cookies: -The scroll position must be stored in the hidden input field before the ajax-request occurs, so the element.onScroll-attribute must be used here. Not really nice, cause it saves the positions many many times, although one time before each ajax-request would be sufficient. -All hidden input fields must be transferred in the ajax-call. Since the JSF-site uses several forms, there seems no way to automatically add them to all ajax-calls. Instead every <f:ajax> element needs the hidden input fields added to the execute-attribute. -One hidden input field is needed for every scrollable element. Contra if using cookies: -well, cookies need to be enabled for the website. Contra in general: -JavaScript code must either know or iterate through all elements, which have scrollbars. -JavaScript code must be executed again, if a componenent is re-rendered and needs the onScroll-attribute set. 2. JavaScript + Composite: So I thought of writing a composite scrollStateSave, which points to the JSF-id of the element, which has the scrollbars. The composite contains the hidden input field (or cookie) and javascript and handles everything, so I just need to add one "instance" of the composite per element, which has scrollbars. The javascript makes use of closures to work for multiple elements on one site. Contra: -The javascript inside the composite is not executed on a re-render after an ajax-call. There are workarounds for this, but they look ugly to me. 3. Myfaces has an option AUTO_SCROLL: How does it work exactly? Does it work for non-myfaces-jsf-components? 4. Tomahawk offers a <t:autoScroll>-behaviour. Using the tomahawk-replacements for the standard-mojarra-jsf2-components would be ok for me. but documentation of <t:autoscroll> speaks of an attribute "event", while implementation needs attribute "value". What should I put in this attribute to make <t:autoScrolll> work?
0
9,617,482
03/08/2012 12:13:23
1,254,554
03/07/2012 11:31:39
1
0
android threading with activity;
In my activity class i created a obj from other java file in the same package , now that the work is finished in runnable , how do i come back to my activity class from where the thread was started. consider this situation; public class myActivity extends activity{ MyThread t; public void onCreate(Bundle savedInstanceState) { t = new Mythread(); t.start(); } now t is simple java class which does some background checking of data , but I dont know how to come from this t.run() method to my activity so that I can jump to another activity from there.any help is appreciated.I am new to this scenario.Thanks in advance. Regards, Rohit }
android-intent
null
null
null
null
null
open
android threading with activity; === In my activity class i created a obj from other java file in the same package , now that the work is finished in runnable , how do i come back to my activity class from where the thread was started. consider this situation; public class myActivity extends activity{ MyThread t; public void onCreate(Bundle savedInstanceState) { t = new Mythread(); t.start(); } now t is simple java class which does some background checking of data , but I dont know how to come from this t.run() method to my activity so that I can jump to another activity from there.any help is appreciated.I am new to this scenario.Thanks in advance. Regards, Rohit }
0
9,617,483
03/08/2012 12:13:24
1,256,667
03/08/2012 09:34:16
1
0
Japanese characters in file appearing garbled after changing Formats (Region & Langauge) in Windows English OS to Japanese (Java application))
Whilst investigating an internationalisation issue in some Java code whereby on a Japanese Windows 7 OS, the Japanese titles of media files (images/videos) appear as Chinese characters in excel files exported from a manager application (that records events such as item A started "playing", stopped "playing", item B started and so on), I came across a problem with displaying Japanese characters in an applet. These displayed correctly outside of the application (e.g. on my desktop). Even in the application but outside the applet I could type Japanese and it would be displayed correctly (e.g. when logging in to the application). In the applet, on the other hand, the Japanese characters were appearing as open boxes. This type of issue has been written about extensively, and I tried some of the fixes, but without success. My first, unsuccessful, attempt was to place a Japanese true type font into the jre/lib/fonts/fallback folder. At this stage, I tested my application anyway (by exporting the excel files mentioned above) and found that the Japanese titles were correctly stored in the excel files mentioned above. However, I then tried another suggested fix for the incorrectly displaying Japanese characters in the applet. This was to set the Formats property under Region and Language (Control Panel) to Japanese. Unfortunately, the applet display problem remained as before, but in addition now the Japanese titles of the media files are appearing garbled in the excel files. An example: [リサイズ]『IMAXハッピーフィート2ã€?ポスター.jpg when it should be something like (note these two are not necessarily the same title): ②ソニー損保 自動車保険 クルマと人と「時代が変わっても」篇 【30秒】.jpg I now wish to get back to the original situation. I have set the Formats back to English (United Kingdom). I have also restarted Tomcat, MySql, rebooted my machine and recompiled all my Java code. However, I am unable to get back to the happy situation of the ungarbled Japanese titles in the excel files. Any help, whether in the form of sharing your experiences with similar issues, or pointing me in the right direction, would be much appreciated.
java
windows
fonts
japanese
formats
null
open
Japanese characters in file appearing garbled after changing Formats (Region & Langauge) in Windows English OS to Japanese (Java application)) === Whilst investigating an internationalisation issue in some Java code whereby on a Japanese Windows 7 OS, the Japanese titles of media files (images/videos) appear as Chinese characters in excel files exported from a manager application (that records events such as item A started "playing", stopped "playing", item B started and so on), I came across a problem with displaying Japanese characters in an applet. These displayed correctly outside of the application (e.g. on my desktop). Even in the application but outside the applet I could type Japanese and it would be displayed correctly (e.g. when logging in to the application). In the applet, on the other hand, the Japanese characters were appearing as open boxes. This type of issue has been written about extensively, and I tried some of the fixes, but without success. My first, unsuccessful, attempt was to place a Japanese true type font into the jre/lib/fonts/fallback folder. At this stage, I tested my application anyway (by exporting the excel files mentioned above) and found that the Japanese titles were correctly stored in the excel files mentioned above. However, I then tried another suggested fix for the incorrectly displaying Japanese characters in the applet. This was to set the Formats property under Region and Language (Control Panel) to Japanese. Unfortunately, the applet display problem remained as before, but in addition now the Japanese titles of the media files are appearing garbled in the excel files. An example: [リサイズ]『IMAXハッピーフィート2ã€?ポスター.jpg when it should be something like (note these two are not necessarily the same title): ②ソニー損保 自動車保険 クルマと人と「時代が変わっても」篇 【30秒】.jpg I now wish to get back to the original situation. I have set the Formats back to English (United Kingdom). I have also restarted Tomcat, MySql, rebooted my machine and recompiled all my Java code. However, I am unable to get back to the happy situation of the ungarbled Japanese titles in the excel files. Any help, whether in the form of sharing your experiences with similar issues, or pointing me in the right direction, would be much appreciated.
0
9,617,488
03/08/2012 12:13:36
1,003,183
10/19/2011 13:03:58
10
0
IIS7.5 MS Access Authentication
I have IIS7.5 with two websites, and I have an Access database on a server on our network. The first website has anonymous auth on, using a specific network account (lets say 'jim.smith'). The second website has windows auth on. I've written some ASP to use a DSN-Less connection to the Access database, and I'm using the same code in both websites. When logged on to a computer with the same network account as is in use with the first website anonymous setting ('jim.smith') - when viewing in a browser, the first website has access to the database, the second website does not. The error message is: 80004005 The Microsoft Jet database engine cannot open the file '...'. It is already opened exclusively by another user, or you need permission to view its data. It is definitely not opened by another user. So the first website is being accessed by network user 'jim.smith' via the anonymous setting. The second website is being accessed by network user 'jim.smith' via windows auth. Why would access to the database work from website one, and not website two..? Does anyone know how to make windows auth work the same as the anonymous setting so I have access to the database from website two..? Cheers! Steve
ms-access
authentication
iis-7.5
null
null
null
open
IIS7.5 MS Access Authentication === I have IIS7.5 with two websites, and I have an Access database on a server on our network. The first website has anonymous auth on, using a specific network account (lets say 'jim.smith'). The second website has windows auth on. I've written some ASP to use a DSN-Less connection to the Access database, and I'm using the same code in both websites. When logged on to a computer with the same network account as is in use with the first website anonymous setting ('jim.smith') - when viewing in a browser, the first website has access to the database, the second website does not. The error message is: 80004005 The Microsoft Jet database engine cannot open the file '...'. It is already opened exclusively by another user, or you need permission to view its data. It is definitely not opened by another user. So the first website is being accessed by network user 'jim.smith' via the anonymous setting. The second website is being accessed by network user 'jim.smith' via windows auth. Why would access to the database work from website one, and not website two..? Does anyone know how to make windows auth work the same as the anonymous setting so I have access to the database from website two..? Cheers! Steve
0
9,617,490
03/08/2012 12:13:42
494,461
11/02/2010 08:05:55
397
1
how to expose a c# class as a com objects interface?
I have a c# class P2PLib. public int portRecv=10101; public int portSend = 10102; public int multicastPort=10103; int memberNum = 0; string data; string time; List<Member> MemberList = new List<Member>(); public void DisplayMembers(); public void start(...); public void join(..); public void leave(..); void add(...); void remove(...); How do I create server side code of this class in my interop communication between c# and c++? http://msdn.microsoft.com/en-us/library/aa645738(v=vs.71).aspx example shows how we interface can be groups of methods but I am confused as to how will my variables like portsend and others will be initiated in c++ client side code.
c#
c++
com
null
null
null
open
how to expose a c# class as a com objects interface? === I have a c# class P2PLib. public int portRecv=10101; public int portSend = 10102; public int multicastPort=10103; int memberNum = 0; string data; string time; List<Member> MemberList = new List<Member>(); public void DisplayMembers(); public void start(...); public void join(..); public void leave(..); void add(...); void remove(...); How do I create server side code of this class in my interop communication between c# and c++? http://msdn.microsoft.com/en-us/library/aa645738(v=vs.71).aspx example shows how we interface can be groups of methods but I am confused as to how will my variables like portsend and others will be initiated in c++ client side code.
0
9,617,493
03/08/2012 12:13:48
1,256,835
03/08/2012 11:02:51
1
0
Simple php if !empty-function
I want to simply echo a link (set in a custom field in Wordpress), when the corresponding field is not empty. I tried the following, but the output is missing the link. Only the field as plain text gets printed <?php $projekt_link = the_field('link'); if(!empty($projekt_link)){ echo '<a href="'.$projekt_link->name.'" class="button">Zum Projekt</a>'; } ?>
php
null
null
null
null
null
open
Simple php if !empty-function === I want to simply echo a link (set in a custom field in Wordpress), when the corresponding field is not empty. I tried the following, but the output is missing the link. Only the field as plain text gets printed <?php $projekt_link = the_field('link'); if(!empty($projekt_link)){ echo '<a href="'.$projekt_link->name.'" class="button">Zum Projekt</a>'; } ?>
0
9,617,474
03/08/2012 12:12:49
1,256,944
03/08/2012 11:57:16
1
0
Several collection formats for the same table in Hive
I process data with two maps per records, one is ("&","=")-formatted (id=111&name=...), the other one is (";","=")-formatted. Of course, I could : - replace ";" by "&" in the data - or define * one of them as MAP<STRING,STRING> with "COLLECTION ITEMS TERMINATED BY ..." specified at declaration * and treat the other map as STRING and parse it with str_to_map() at each query. But isn't there any more elegant solution like **multiple collection format declaration** for the same table? Thank.
hive
null
null
null
null
null
open
Several collection formats for the same table in Hive === I process data with two maps per records, one is ("&","=")-formatted (id=111&name=...), the other one is (";","=")-formatted. Of course, I could : - replace ";" by "&" in the data - or define * one of them as MAP<STRING,STRING> with "COLLECTION ITEMS TERMINATED BY ..." specified at declaration * and treat the other map as STRING and parse it with str_to_map() at each query. But isn't there any more elegant solution like **multiple collection format declaration** for the same table? Thank.
0
9,617,495
03/08/2012 12:13:57
1,161,002
01/20/2012 16:23:58
20
3
Symfony2: should I use JSON Twig templates?
Quick question on best practice. I have an AJAX application where there are 4 routes that all return JSON to be used by jQuery. I'm currently using something like this at the end of the Controller return new Response(json_encode($some_array)); In one place I use JMSSerializer because the object I'm trying to pass out to Javascript has protected attributes. That never seemed right and I wondered at one point if I should 'teach' the object to know how to encode all its attributes to JSON and send them out as the return value of one of its methods. Anyway I had a brainwave this morning that what I **should** be doing is to make a Twig JSON template that contains the exact format I want it to output, then fill the variables from the PHP. A couple of loops would also be necessary to output a collection of objects within an object. That way there's a clear promise/contract from the PHP of what exactly it will return to the Javascript, that can't be messed up if I happen to e.g. change the object. I suspect this would be easier for the guy who's doing the javascript to understand since the template would be easier to read than the PHP. Am I on the right track: should I be using **JSON Twig templates** rather than json_encode in general?
php
jquery
ajax
json
symfony-2.0
03/09/2012 19:08:31
not constructive
Symfony2: should I use JSON Twig templates? === Quick question on best practice. I have an AJAX application where there are 4 routes that all return JSON to be used by jQuery. I'm currently using something like this at the end of the Controller return new Response(json_encode($some_array)); In one place I use JMSSerializer because the object I'm trying to pass out to Javascript has protected attributes. That never seemed right and I wondered at one point if I should 'teach' the object to know how to encode all its attributes to JSON and send them out as the return value of one of its methods. Anyway I had a brainwave this morning that what I **should** be doing is to make a Twig JSON template that contains the exact format I want it to output, then fill the variables from the PHP. A couple of loops would also be necessary to output a collection of objects within an object. That way there's a clear promise/contract from the PHP of what exactly it will return to the Javascript, that can't be messed up if I happen to e.g. change the object. I suspect this would be easier for the guy who's doing the javascript to understand since the template would be easier to read than the PHP. Am I on the right track: should I be using **JSON Twig templates** rather than json_encode in general?
4
9,527,760
03/02/2012 03:57:50
370,213
06/18/2010 10:46:28
15
0
MongoDB _id query on capped collection without an _id index, performance will be poor collection
i create a capped collection(`crawl02`) and create an index for this capped. > db.system.indexes.find() { "v" : 1, "key" : { "_id" : 1 }, "ns" : "test.crawl02", "name" : "_id_" } when i runing an application and query capped collection,the `MongoDB Log` ALWAYS output the follow log: `[conn2] warning: _id query on capped collection without an _id index, performance will be poor collection: test.crawl01`. my code statement to query a capped collection (c#) var cursor = this.QueueCollection //crawl02 .Find(Query.GT("_id", this._lastId)) .SetFlags(QueryFlags.AwaitData |QueryFlags.TailableCursor | QueryFlags.NoCursorTimeout) .SetSortOrder(SortBy.Ascending("$natural")); return (MongoCursorEnumerator<QueueMessage<T>>)cursor.GetEnumerator(); read a message from about cursor variable: while(true){ if (this._cursor.MoveNext()) return this._currsor.Current; else return null } i don't understand why the mongodb waning me the `crawl02` not have an index.
c#
mongodb
null
null
null
null
open
MongoDB _id query on capped collection without an _id index, performance will be poor collection === i create a capped collection(`crawl02`) and create an index for this capped. > db.system.indexes.find() { "v" : 1, "key" : { "_id" : 1 }, "ns" : "test.crawl02", "name" : "_id_" } when i runing an application and query capped collection,the `MongoDB Log` ALWAYS output the follow log: `[conn2] warning: _id query on capped collection without an _id index, performance will be poor collection: test.crawl01`. my code statement to query a capped collection (c#) var cursor = this.QueueCollection //crawl02 .Find(Query.GT("_id", this._lastId)) .SetFlags(QueryFlags.AwaitData |QueryFlags.TailableCursor | QueryFlags.NoCursorTimeout) .SetSortOrder(SortBy.Ascending("$natural")); return (MongoCursorEnumerator<QueueMessage<T>>)cursor.GetEnumerator(); read a message from about cursor variable: while(true){ if (this._cursor.MoveNext()) return this._currsor.Current; else return null } i don't understand why the mongodb waning me the `crawl02` not have an index.
0
25,238
08/24/2008 17:59:04
1,725
08/18/2008 10:57:01
31
2
100% Min Height CSS layout
What's the best way to make an element of 100% minimum height across a wide range of browsers ? In particular if you have a layout with a header and footer of fixed height how do you make the middle content part fill 100% of the space in between with the footer fixed to the bottom ?
html
css
xhtml
valid
null
null
open
100% Min Height CSS layout === What's the best way to make an element of 100% minimum height across a wide range of browsers ? In particular if you have a layout with a header and footer of fixed height how do you make the middle content part fill 100% of the space in between with the footer fixed to the bottom ?
0
25,240
08/24/2008 18:00:47
2,515
08/22/2008 15:49:45
1
0
Inserting at the very end in FCKeditor
FCKeditor has InsertHtml ([JavaScript API document](http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/JavaScript_API)) that inserts HTML in the current cursor position. How do I insert at the very end of the document? Do I need to start browser sniffing with something like this if ( element.insertAdjacentHTML ) // IE element.insertAdjacentHTML( 'beforeBegin', html ) ; else // Gecko { var oRange = document.createRange() ; oRange.setStartBefore( element ) ; var oFragment = oRange.createContextualFragment( html ); element.parentNode.insertBefore( oFragment, element ) ; } or there is a blessed way that I miss?
fckeditor
plugins
null
null
null
null
open
Inserting at the very end in FCKeditor === FCKeditor has InsertHtml ([JavaScript API document](http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/JavaScript_API)) that inserts HTML in the current cursor position. How do I insert at the very end of the document? Do I need to start browser sniffing with something like this if ( element.insertAdjacentHTML ) // IE element.insertAdjacentHTML( 'beforeBegin', html ) ; else // Gecko { var oRange = document.createRange() ; oRange.setStartBefore( element ) ; var oFragment = oRange.createContextualFragment( html ); element.parentNode.insertBefore( oFragment, element ) ; } or there is a blessed way that I miss?
0
25,241
08/24/2008 18:00:54
1,725
08/18/2008 10:57:01
31
2
Unit testing IHttpModule
How do you unit test a HttpModule in asp.net given that HttpApplication and HttpContext do no implement an interface ?
c#
asp.net
unit-testing
mvc
mocking
null
open
Unit testing IHttpModule === How do you unit test a HttpModule in asp.net given that HttpApplication and HttpContext do no implement an interface ?
0
25,259
08/24/2008 18:21:11
1,632
08/17/2008 17:09:25
231
20
How do you change a title to be part of the url like Stackoverflow?
What is a good complete Regex or some other process that would take "How do you change a title to be part of the url like Stackoverflow?" and turn it into "how-do-you-change-a-title-to-be-part-of-the-url-like-stackoverflow" that is used in the smart urls? The dev environment is I am using is Rails but if there are some other platform specific solutions (.net, php, django), I would love to see those too. I am sure I (or another reader) will come across the same problem on a different platform down the line.
regex
null
null
null
null
null
open
How do you change a title to be part of the url like Stackoverflow? === What is a good complete Regex or some other process that would take "How do you change a title to be part of the url like Stackoverflow?" and turn it into "how-do-you-change-a-title-to-be-part-of-the-url-like-stackoverflow" that is used in the smart urls? The dev environment is I am using is Rails but if there are some other platform specific solutions (.net, php, django), I would love to see those too. I am sure I (or another reader) will come across the same problem on a different platform down the line.
0
25,261
08/24/2008 18:23:21
2,727
08/24/2008 18:23:21
1
0
help with sigprocmask()
I haven't completely understood how to use sigprocmask(). Particularly how the set and oldset in its syntax work and how to use them. int sigprocmask(int how, const sigset_t *set, sigset_t *oldset); Please explain with an example used to block, say SIGUSR1 for a few seconds and then unblock and handle it.
c
signals
sigprocmask
null
null
null
open
help with sigprocmask() === I haven't completely understood how to use sigprocmask(). Particularly how the set and oldset in its syntax work and how to use them. int sigprocmask(int how, const sigset_t *set, sigset_t *oldset); Please explain with an example used to block, say SIGUSR1 for a few seconds and then unblock and handle it.
0
25,268
08/24/2008 18:31:54
1,117
08/12/2008 13:27:15
1,040
74
What are the best practices when using SWIG with C#?
Has anybody out there used the [SWIG][1] library with C#? If you have, what pitfalls did you find and what is the best way to use the library? I am thinking about using it as a wrapper for a program that was written in C and I want to wrap the header files where I can use them in my .NET application. [1]: http://www.swig.org/exec.html
swig
c#
c
null
null
null
open
What are the best practices when using SWIG with C#? === Has anybody out there used the [SWIG][1] library with C#? If you have, what pitfalls did you find and what is the best way to use the library? I am thinking about using it as a wrapper for a program that was written in C and I want to wrap the header files where I can use them in my .NET application. [1]: http://www.swig.org/exec.html
0
25,269
08/24/2008 18:32:14
2,086
08/20/2008 10:43:39
40
8
Remotely starting and stopping a service on a W2008 server
I'm having an amazing amount of trouble starting and stopping a service on my remote server from my msbuild script. SC.EXE and the ServiceController MSBuild task don't provide switches to allow a username/password so they won't authenticate, so I'm using RemoteService.exe from www.intelliadmin.com -Authenticating with \\xx.xx.xx.xxx -Authentication complete -Stopping service -Error: Access Denied The user account details I'm specifying are for a local admin on the server, so whats up?! I'm tearing my hair out!
services
server2008
null
null
null
null
open
Remotely starting and stopping a service on a W2008 server === I'm having an amazing amount of trouble starting and stopping a service on my remote server from my msbuild script. SC.EXE and the ServiceController MSBuild task don't provide switches to allow a username/password so they won't authenticate, so I'm using RemoteService.exe from www.intelliadmin.com -Authenticating with \\xx.xx.xx.xxx -Authentication complete -Stopping service -Error: Access Denied The user account details I'm specifying are for a local admin on the server, so whats up?! I'm tearing my hair out!
0
25,277
08/24/2008 18:47:16
2,134
08/20/2008 13:58:24
624
23
Can you perform an AND search of keywords using FREETEXT() on SQL Server 2005?
There is a [request][1] to make the SO search default to an AND style functionality over the current OR when multiple terms are used. The official response was: > not as simple as it sounds; we use SQL Server 2005's FREETEXT() function, and I can't find a way to specify AND vs. OR -- can you? So, is there a way? [1]: http://stackoverflow.uservoice.com/pages/general/suggestions/16644
stackoverflow
search
mssql
sql-server-2005
freetext
null
open
Can you perform an AND search of keywords using FREETEXT() on SQL Server 2005? === There is a [request][1] to make the SO search default to an AND style functionality over the current OR when multiple terms are used. The official response was: > not as simple as it sounds; we use SQL Server 2005's FREETEXT() function, and I can't find a way to specify AND vs. OR -- can you? So, is there a way? [1]: http://stackoverflow.uservoice.com/pages/general/suggestions/16644
0
25,282
08/24/2008 18:58:16
1,797
08/18/2008 15:46:11
746
37
How would you implement a hashtable in language x?
The point of this question is to collect a list of examples of hashtable implementations using arrays in different languages. It would also be nice if someone could throw in a pretty detailed overview of how they work, and what is happening with each example.
hash
array
language-agnostic
null
null
06/17/2012 13:37:47
not constructive
How would you implement a hashtable in language x? === The point of this question is to collect a list of examples of hashtable implementations using arrays in different languages. It would also be nice if someone could throw in a pretty detailed overview of how they work, and what is happening with each example.
4
25,297
08/24/2008 19:37:24
2,717
08/24/2008 17:01:00
1
0
Reserved Keyword in Enumeration in C#
I would like to use "as" and "is" as members of an enumeration. I know that this is possible in VB.NET to write it like this: Public Enum Test [as] = 1 [is] = 2 End Enum How do I write the equivalent statement in C#? This: public enum Test { as = 1, is = 2 } does not compile. Thanks in advance.
c#
vb.net
.net-2.0
null
null
null
open
Reserved Keyword in Enumeration in C# === I would like to use "as" and "is" as members of an enumeration. I know that this is possible in VB.NET to write it like this: Public Enum Test [as] = 1 [is] = 2 End Enum How do I write the equivalent statement in C#? This: public enum Test { as = 1, is = 2 } does not compile. Thanks in advance.
0
25,323
08/24/2008 20:34:10
2,741
08/24/2008 20:17:51
1
0
WCF - Domain Objects and IExtensibleDataObject
OK, so I've been asking this question round and about various places, and never really gotten a good answer. Typical scenario. We use old-school XML Web Services *internally* for communicating between a server farm and several distributed *and* local clients. No third parties involved, only our own applications used by ourselves and our customers. We're currently pondering moving from XML WS to a WCF/object-based model and have been experimenting with various approaches. One of them involves transferring the domain objects/aggregates directly over the wire, possibly invoking DataContract attributes on them. By using IExtensibleDataObject and a DataContract using the Order property on the DataMembers, we should be able to cope with simple property versioning issues (remember, we controll all clients and can easily force-update them). Yet I keep hearing that we should use dedicated, transfer-only Data Transfer Objects (DTOs) over the wire. Why? Is there really still a reason to do so? We use the same domain model on the server side and client side, of course prefilling collections etc. only when deemed right and "neccessary". Collection properties generally utilize the service locator principle and IoC to invoke either an Nhibernate-based "service" to fetch data directly (on the server side), and a WCF "service" client on the client side to talk to the WCF server farm.
wcf
domain-driven-design
serialization
soa
soap
null
open
WCF - Domain Objects and IExtensibleDataObject === OK, so I've been asking this question round and about various places, and never really gotten a good answer. Typical scenario. We use old-school XML Web Services *internally* for communicating between a server farm and several distributed *and* local clients. No third parties involved, only our own applications used by ourselves and our customers. We're currently pondering moving from XML WS to a WCF/object-based model and have been experimenting with various approaches. One of them involves transferring the domain objects/aggregates directly over the wire, possibly invoking DataContract attributes on them. By using IExtensibleDataObject and a DataContract using the Order property on the DataMembers, we should be able to cope with simple property versioning issues (remember, we controll all clients and can easily force-update them). Yet I keep hearing that we should use dedicated, transfer-only Data Transfer Objects (DTOs) over the wire. Why? Is there really still a reason to do so? We use the same domain model on the server side and client side, of course prefilling collections etc. only when deemed right and "neccessary". Collection properties generally utilize the service locator principle and IoC to invoke either an Nhibernate-based "service" to fetch data directly (on the server side), and a WCF "service" client on the client side to talk to the WCF server farm.
0
25,331
08/24/2008 20:55:49
2,454
08/22/2008 11:22:25
50
2
Best book/resource for learning Java design patterns?
I know the MVC design pattern but would be a little unclear about other Java design patterns, so I was just wondering if there's any useful books or other resources you could recommend to get up to speed with these patterns?
java
design-patterns
null
null
null
09/15/2011 07:17:45
off topic
Best book/resource for learning Java design patterns? === I know the MVC design pattern but would be a little unclear about other Java design patterns, so I was just wondering if there's any useful books or other resources you could recommend to get up to speed with these patterns?
2
25,332
08/24/2008 20:57:33
1,592
08/17/2008 06:18:13
11
3
What's a good natural language library to use for paraphrasing?
I'm looking for an existing library to summarize or paraphrase content (I'm aiming at blog posts) - any experience with existing natural language processing libraries? I'm open to a variety of languages, so I'm more interested in the abilities & accuracy.
natural-language-process
language-agnostic
null
null
null
null
open
What's a good natural language library to use for paraphrasing? === I'm looking for an existing library to summarize or paraphrase content (I'm aiming at blog posts) - any experience with existing natural language processing libraries? I'm open to a variety of languages, so I'm more interested in the abilities & accuracy.
0
25,343
08/24/2008 21:10:33
33
08/01/2008 12:32:10
425
26
Is there any way to automate windows forms testing?
I am familiar with nunit for unit testing of the business layer however I am looking now to automate the test of the win forms gui layer. I have seen [watin][1] and the watin recorder for automating tests on web application by accessing the controls and automating them. However I am struggling to find a watin equivalent for windows forms (written in c# or vb.net) preferably that is open source. Does one exist or are all products based on recording mouse and keyboard presses? [1]: http://watin.sourceforge.net/
automated-tests
c#
vb.net
.net
winforms
null
open
Is there any way to automate windows forms testing? === I am familiar with nunit for unit testing of the business layer however I am looking now to automate the test of the win forms gui layer. I have seen [watin][1] and the watin recorder for automating tests on web application by accessing the controls and automating them. However I am struggling to find a watin equivalent for windows forms (written in c# or vb.net) preferably that is open source. Does one exist or are all products based on recording mouse and keyboard presses? [1]: http://watin.sourceforge.net/
0
25,349
08/24/2008 21:23:23
2,684
08/24/2008 14:38:27
31
4
What would be the fastest way to remove Newlines from a String in C#?
I have a string that has some Environment.Newline in it. I'd like to strip those from the string and instead, replace the Newline with something like a comma. What would be, in your opinion, the best way to do this using C#.NET 2.0? Thanks in advance.
c#
.net
string
replace
null
null
open
What would be the fastest way to remove Newlines from a String in C#? === I have a string that has some Environment.Newline in it. I'd like to strip those from the string and instead, replace the Newline with something like a comma. What would be, in your opinion, the best way to do this using C#.NET 2.0? Thanks in advance.
0
25,355
08/24/2008 21:31:33
2,723
08/24/2008 17:49:45
1
0
Custom Attribute Binding in Silverlight
I've got two Silverlight Controls in my project, both have properties TeamId. I would like to bind these together in XAML in the control hosting both user controls similar to: <agChat:UserTeams x:Name="oUserTeams" /> <agChat:OnlineUser x:Name="oOnlineUsers" TeamId="{Binding ElementName=oUserTeams, Path=TeamId}" /> In the first control, I'm implementing System.ComponentModel.INotifyPropertyChanged and raising the PropertyChanged event upon the TeamId property changing. In the second control, I've used the propdp snippet to identify the TeamId as a Dependency property. // Using a DependencyProperty as the backing store for TeamId. This enables animation, styling, binding, etc... public static readonly DependencyProperty TeamIdProperty = DependencyProperty.Register( "TeamId", typeof(string), typeof(OnlineUsers), new System.Windows.PropertyMetadata(new System.Windows.PropertyChangedCallback(TeamChanged))); However when the silverlight controls first gets created, I get the follow exception from Silverlight: > Unhandled Error in Silverlight 2 Application Invalid attribute value {Binding ElementName=oUserTeams, Path=TeamId} for property TeamId. [Line: 21 Position: 146] at System.Windows.Application.LoadComponent(Object component, Uri xamlUri) at agChat.Page.InitializeComponent() at agChat.Page..ctor() at agChat.App.Application_Startup(Object sender, StartupEventArgs e) at System.Windows.CoreInvokeHandler.InvokeEventHandler(Int32 typeIndex, Delegate handlerDelegate, Object sender, Object args) at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, String eventName) Any ideas what I'm doing wrong? Obviously this could all be done in code-behind, but this *seems* like the correct approach. Kevin
silverlight
null
null
null
null
null
open
Custom Attribute Binding in Silverlight === I've got two Silverlight Controls in my project, both have properties TeamId. I would like to bind these together in XAML in the control hosting both user controls similar to: <agChat:UserTeams x:Name="oUserTeams" /> <agChat:OnlineUser x:Name="oOnlineUsers" TeamId="{Binding ElementName=oUserTeams, Path=TeamId}" /> In the first control, I'm implementing System.ComponentModel.INotifyPropertyChanged and raising the PropertyChanged event upon the TeamId property changing. In the second control, I've used the propdp snippet to identify the TeamId as a Dependency property. // Using a DependencyProperty as the backing store for TeamId. This enables animation, styling, binding, etc... public static readonly DependencyProperty TeamIdProperty = DependencyProperty.Register( "TeamId", typeof(string), typeof(OnlineUsers), new System.Windows.PropertyMetadata(new System.Windows.PropertyChangedCallback(TeamChanged))); However when the silverlight controls first gets created, I get the follow exception from Silverlight: > Unhandled Error in Silverlight 2 Application Invalid attribute value {Binding ElementName=oUserTeams, Path=TeamId} for property TeamId. [Line: 21 Position: 146] at System.Windows.Application.LoadComponent(Object component, Uri xamlUri) at agChat.Page.InitializeComponent() at agChat.Page..ctor() at agChat.App.Application_Startup(Object sender, StartupEventArgs e) at System.Windows.CoreInvokeHandler.InvokeEventHandler(Int32 typeIndex, Delegate handlerDelegate, Object sender, Object args) at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, String eventName) Any ideas what I'm doing wrong? Obviously this could all be done in code-behind, but this *seems* like the correct approach. Kevin
0
25,356
08/24/2008 21:32:21
2,178
08/20/2008 19:05:22
86
1
Flash designer/coder collaboration best practices
I've done several flash projects working as the actionscripter with a designer doing all the pretty things and animation. When starting out i found quite a lot of information about actionscript coding and flash design. Most of the information available seems to focus on one or the other. I didn't find any information about building flash projects in a way that lets the coder do their thing AND gives the designer freedom as well. Hopefully more experienced people can share, these are some of the things i discovered after a few projects - Version control is a must (as always) but can be difficult to explain to designers - No actionscript in the flash .fla files, they are binary and as a coder you want to try to keep away as much as possible - Model View Controller is the best way i've found to isolate visual design changes - Try to build the views so that they use frame labels, this allows the designer to decide what actually happens What are your experiences?
flash
actionscript
null
null
null
null
open
Flash designer/coder collaboration best practices === I've done several flash projects working as the actionscripter with a designer doing all the pretty things and animation. When starting out i found quite a lot of information about actionscript coding and flash design. Most of the information available seems to focus on one or the other. I didn't find any information about building flash projects in a way that lets the coder do their thing AND gives the designer freedom as well. Hopefully more experienced people can share, these are some of the things i discovered after a few projects - Version control is a must (as always) but can be difficult to explain to designers - No actionscript in the flash .fla files, they are binary and as a coder you want to try to keep away as much as possible - Model View Controller is the best way i've found to isolate visual design changes - Try to build the views so that they use frame labels, this allows the designer to decide what actually happens What are your experiences?
0
25,367
08/24/2008 21:42:41
2,755
08/24/2008 21:39:28
1
0
What is the best calendar pop-up for populating a web form?
I want to be able to make an HTTP call updating some select boxes after a date is selected. I would like to be in control of updating the textbox so I know when there has been a "true" change (in the event the same date was selected). Ideally, I would call a function to pop-up the calendar and be able to evaluate the date before populating the text box...so I can do my validation before making a server call.
javascript
null
null
null
null
null
open
What is the best calendar pop-up for populating a web form? === I want to be able to make an HTTP call updating some select boxes after a date is selected. I would like to be in control of updating the textbox so I know when there has been a "true" change (in the event the same date was selected). Ideally, I would call a function to pop-up the calendar and be able to evaluate the date before populating the text box...so I can do my validation before making a server call.
0
25,375
08/24/2008 21:51:57
1,595
08/17/2008 08:00:50
485
20
How can I represent an very large integer in .NET?
Does .NET come with a class capable of representing extremely large integers, such as 100 factorial? If not, what are some good third party libraries to accomplish this?
.net
null
null
null
null
null
open
How can I represent an very large integer in .NET? === Does .NET come with a class capable of representing extremely large integers, such as 100 factorial? If not, what are some good third party libraries to accomplish this?
0
25,376
08/24/2008 21:53:16
2,757
08/24/2008 21:53:16
1
0
What is a good use of lambda expressions, and how can I learn to use them?
I've read that Lambda Expressions are an incredibly powerful addition to C#, yet I find myself mystified by them. How can they improve my life or make my code better? Can anyone point to a good resource for learning such expressions? They seem cool as hell, but how do they relate to my day-to-day life as an asp.net developer?
lambda
c#
null
null
null
null
open
What is a good use of lambda expressions, and how can I learn to use them? === I've read that Lambda Expressions are an incredibly powerful addition to C#, yet I find myself mystified by them. How can they improve my life or make my code better? Can anyone point to a good resource for learning such expressions? They seem cool as hell, but how do they relate to my day-to-day life as an asp.net developer?
0
25,379
08/24/2008 21:56:17
2,715
08/24/2008 16:57:35
1
1
Family Website CMS
I am looking for a CMS that would be incredibly user-friendly and would have the following features: - really simple message board (no login required) - family tree - story telling area - photo section - news section Is there anything out there like this that is really easily configurable? I've already messed around with Mambo and Family Connects, but I didnt like either of those. In the past I've just programmed my own websites, for lack of easily implementable features. However, I've assuming there's something I need out there just like this, that I can't find. Thanks.
plugins
content-management-system
null
null
null
11/19/2011 01:12:53
not constructive
Family Website CMS === I am looking for a CMS that would be incredibly user-friendly and would have the following features: - really simple message board (no login required) - family tree - story telling area - photo section - news section Is there anything out there like this that is really easily configurable? I've already messed around with Mambo and Family Connects, but I didnt like either of those. In the past I've just programmed my own websites, for lack of easily implementable features. However, I've assuming there's something I need out there just like this, that I can't find. Thanks.
4
25,396
08/24/2008 22:14:43
1,857
08/18/2008 22:24:37
41
2
ASP.NET Forms Authorization
I'm working on a website built with pure html and css, and I need a way to restrict access to pages located within particular directories within the site. The solution I came up with was, of course, ASP.Net Forms Authorization. I created the default Visual Studio log in form and set up the users, roles, and access restrictions with Visual Studio's wizard. The problem is, I can't log in to the website with the credentials that I have set. I'm using IIS 7.
asp.net
iis7
null
null
null
null
open
ASP.NET Forms Authorization === I'm working on a website built with pure html and css, and I need a way to restrict access to pages located within particular directories within the site. The solution I came up with was, of course, ASP.Net Forms Authorization. I created the default Visual Studio log in form and set up the users, roles, and access restrictions with Visual Studio's wizard. The problem is, I can't log in to the website with the credentials that I have set. I'm using IIS 7.
0
25,432
08/24/2008 23:07:25
1,828
08/18/2008 18:48:27
1
0
Linq 2 SQL on shared host
I recently ran into an issue with linq on a shared host. The host is Shared Intellect and they support v3.5 of the framework. However, I am uncertain to whether they have SP1 installed. My suspicion is that they do not. I have a simple "News" table that has the following structure: NewsID uniqueidentifier Title nvarchar(250) Introduction nvarchar(1000) Article ntext DateEntered datetime (default getdate()) IsPublic bit (default true) My goal is to display the 3 most recent records from this table. I initially went the D&D method (I know, I know) and created a linq datasource and was unable to find a way to limit the results the way I desired, so I removed that and wrote the following: var dc = new NewsDataContext(); var news = from a in dc.News where a.IsPublic == true orderby a.DateEntered descending select new { a.NewsID, a.Introduction }; lstNews.DataSource = news.Take(3); lstNews.DataBind(); This worked perfectly on my local machine. However, when I uploaded everything to the shared host, I recieved the following error: > .Read_<>f__AnonymousType0`2 > (System.Data.Linq.SqlClient.Implementation.ObjectMaterializer`1<System.Data.SqlClient.SqlDataReader>) > Description: An unhandled exception > occurred during the execution of the > current web request. Please review the > stack trace for more information about > the error and where it originated in > the code. > > Exception Details: > System.MethodAccessException: > .Read_<>f__AnonymousType0`2(System.Data.Linq.SqlClient.Implementation.ObjectMaterializer`1<System.Data.SqlClient.SqlDataReader>) I tried to research the error on Google, but met with no success. I then tried to modify my query in every way I could imagine, removing various combinations of the where/orderby parameters as well as limiting my query to a single column and even removing the "Take" command. My Question therefore comes in 3 parts. 1. Has anyone else encountered this and if so, is there a "quick" fix? 2. Is there a way to use the datasource to limit the rows? 3. Is there some way to determine what version of the framework the shared host is running short of emailing them directly (which I have done and am awaiting an answer) Thanks in advance for the help and please let me know if I need to provide more details.
linq-to-sql
hosting
shared
null
null
null
open
Linq 2 SQL on shared host === I recently ran into an issue with linq on a shared host. The host is Shared Intellect and they support v3.5 of the framework. However, I am uncertain to whether they have SP1 installed. My suspicion is that they do not. I have a simple "News" table that has the following structure: NewsID uniqueidentifier Title nvarchar(250) Introduction nvarchar(1000) Article ntext DateEntered datetime (default getdate()) IsPublic bit (default true) My goal is to display the 3 most recent records from this table. I initially went the D&D method (I know, I know) and created a linq datasource and was unable to find a way to limit the results the way I desired, so I removed that and wrote the following: var dc = new NewsDataContext(); var news = from a in dc.News where a.IsPublic == true orderby a.DateEntered descending select new { a.NewsID, a.Introduction }; lstNews.DataSource = news.Take(3); lstNews.DataBind(); This worked perfectly on my local machine. However, when I uploaded everything to the shared host, I recieved the following error: > .Read_<>f__AnonymousType0`2 > (System.Data.Linq.SqlClient.Implementation.ObjectMaterializer`1<System.Data.SqlClient.SqlDataReader>) > Description: An unhandled exception > occurred during the execution of the > current web request. Please review the > stack trace for more information about > the error and where it originated in > the code. > > Exception Details: > System.MethodAccessException: > .Read_<>f__AnonymousType0`2(System.Data.Linq.SqlClient.Implementation.ObjectMaterializer`1<System.Data.SqlClient.SqlDataReader>) I tried to research the error on Google, but met with no success. I then tried to modify my query in every way I could imagine, removing various combinations of the where/orderby parameters as well as limiting my query to a single column and even removing the "Take" command. My Question therefore comes in 3 parts. 1. Has anyone else encountered this and if so, is there a "quick" fix? 2. Is there a way to use the datasource to limit the rows? 3. Is there some way to determine what version of the framework the shared host is running short of emailing them directly (which I have done and am awaiting an answer) Thanks in advance for the help and please let me know if I need to provide more details.
0
25,449
08/24/2008 23:28:38
2,644
08/23/2008 21:56:47
46
4
How to create a pluginable Java program?
I want to create a Java program that can be extended with plugins. How can I do that and where should I look for? I have a set of interfaces that the plugin must implement, and it should be in a jar. The program should watch for new jars in a relative (to the program) folder and registered them somehow.
java
plugins
null
null
null
null
open
How to create a pluginable Java program? === I want to create a Java program that can be extended with plugins. How can I do that and where should I look for? I have a set of interfaces that the plugin must implement, and it should be in a jar. The program should watch for new jars in a relative (to the program) folder and registered them somehow.
0
25,450
08/24/2008 23:33:25
1,666
08/17/2008 21:07:18
238
17
Abstraction away from CSS
Let me make something quite clear. I. **Hate**. CSS. It is a never-ending nightmare. Every minor layout change feels like a hack. Solutions to problems seem to often involve jiggering numbers around like some chef trying to work out exactly how much nutmeg to put in his soon-to-be famous rice pudding. Then comes the multiple browser issue, the multiple resolution issues.. .. to cut a long story short, it's a pain. A PITA, if you will. Many frameworks seek to abstract away from HTML (custom tags, JSFs component system) in an effort to make dealing with that particular kettle of fish easier. Is there anything you folks have used that has a similar concept applied to CSS? Something that does a bunch of cross-browser magic for you, supports like variables (why do I have to type #3c5c8d every time I want that colour), supports caclulated fields (which are 'compiled' into CSS and JS), etc. Alternatively, am I even thinking about this correctly? Am I trying to push a very square block through a very round hole?
css
abstraction
null
null
null
null
open
Abstraction away from CSS === Let me make something quite clear. I. **Hate**. CSS. It is a never-ending nightmare. Every minor layout change feels like a hack. Solutions to problems seem to often involve jiggering numbers around like some chef trying to work out exactly how much nutmeg to put in his soon-to-be famous rice pudding. Then comes the multiple browser issue, the multiple resolution issues.. .. to cut a long story short, it's a pain. A PITA, if you will. Many frameworks seek to abstract away from HTML (custom tags, JSFs component system) in an effort to make dealing with that particular kettle of fish easier. Is there anything you folks have used that has a similar concept applied to CSS? Something that does a bunch of cross-browser magic for you, supports like variables (why do I have to type #3c5c8d every time I want that colour), supports caclulated fields (which are 'compiled' into CSS and JS), etc. Alternatively, am I even thinking about this correctly? Am I trying to push a very square block through a very round hole?
0
25,455
08/24/2008 23:39:46
1,581
08/16/2008 20:39:26
18
1
Best Practices: What is the most efficient way to populate a time (or time range)?
While plenty of solutions exist for entering dates (such as calendars, drop-down menus, etc.), it doesn't seem like there are too many "standard" ways to ask for a time (or time range). I've personally tried drop-down menus for the hour, minute, and second fields (and sometimes an "AM/PM" field, as well). I've also tried several clock-like input devices, most of which are too hard to use for the typical end-user. I've even tried "pop-out" time selection menus (which allow you to, for example, hover over the hour "10" to receive a submenu that contains ":00",":15",":30", and ":45") -- but none of these methods seem natural. So far, the best (and most universal) method I have found is just using simple text fields and forcing a user to manually populate the hour, minute, and second. Alternatively, I've had good experiences creating something similar to Outlook's "Day View" which allows you to drag and drop an event to set the start and end times. Is there a "best way" to ask for this information? Is anybody using some type of time input widget that's really intuitive and easy to use? Or is there at least a way that's more efficient than using plain text boxes?
time
input-devices
null
null
null
null
open
Best Practices: What is the most efficient way to populate a time (or time range)? === While plenty of solutions exist for entering dates (such as calendars, drop-down menus, etc.), it doesn't seem like there are too many "standard" ways to ask for a time (or time range). I've personally tried drop-down menus for the hour, minute, and second fields (and sometimes an "AM/PM" field, as well). I've also tried several clock-like input devices, most of which are too hard to use for the typical end-user. I've even tried "pop-out" time selection menus (which allow you to, for example, hover over the hour "10" to receive a submenu that contains ":00",":15",":30", and ":45") -- but none of these methods seem natural. So far, the best (and most universal) method I have found is just using simple text fields and forcing a user to manually populate the hour, minute, and second. Alternatively, I've had good experiences creating something similar to Outlook's "Day View" which allows you to drag and drop an event to set the start and end times. Is there a "best way" to ask for this information? Is anybody using some type of time input widget that's really intuitive and easy to use? Or is there at least a way that's more efficient than using plain text boxes?
0
25,458
08/24/2008 23:40:16
392
08/05/2008 12:29:07
541
43
How costly is Reflection? Really.
I constantly hear how bad reflection is to use. While I generally avoid reflection and rarely find situations where it is impossible to solve my problem without it, I was wondering... For those who have used reflection in applications, have you measured performance hits and, is it really so bad?
c#
.net
performance
reflection
null
null
open
How costly is Reflection? Really. === I constantly hear how bad reflection is to use. While I generally avoid reflection and rarely find situations where it is impossible to solve my problem without it, I was wondering... For those who have used reflection in applications, have you measured performance hits and, is it really so bad?
0
25,460
08/24/2008 23:43:00
1,704
08/18/2008 05:42:19
1
0
Asynchronous Stored Procedure Calls
Is it possible to call a stored prodcedure from another stored procedure asynchronously?
sql
stored-procedures
null
null
null
null
open
Asynchronous Stored Procedure Calls === Is it possible to call a stored prodcedure from another stored procedure asynchronously?
0
25,461
08/24/2008 23:44:53
1,675
08/17/2008 22:59:34
1
2
stdbool.h c++
In a project I am interfacing between c++ and a c library that uses stdbool.h defined as such. <pre><code>#ifndef _STDBOOL_H #define _STDBOOL_H /* C99 Boolean types for compilers without C99 support */ /* http://www.opengroup.org/onlinepubs/009695399/basedefs/stdbool.h.html */ #if !defined(__cplusplus) #if !defined(__GNUC__) /* _Bool builtin type is included in GCC */ typedef enum { _Bool_must_promote_to_int = -1, false = 0, true = 1 } _Bool; #endif #define bool _Bool #define true 1 #define false 0 #define __bool_true_false_are_defined 1 #endif #endif </code></pre> Some structures have <code>bool</code> members. So if I have one of these structures defined as local variables within a c++ function and pass it to a c function the sizes are inconsistent between c++ and c as bool is one bye in c++ and 4 in c. Does anyone have any advice to how to overcome this without resorting to my current solution which is <pre><code>//#define bool _Bool #define bool unsigned char </code></pre> Which is against the C99 standard for [stdbool.h](http://www.opengroup.org/onlinepubs/000095399/basedefs/stdbool.h.html)
c++
c
null
null
null
null
open
stdbool.h c++ === In a project I am interfacing between c++ and a c library that uses stdbool.h defined as such. <pre><code>#ifndef _STDBOOL_H #define _STDBOOL_H /* C99 Boolean types for compilers without C99 support */ /* http://www.opengroup.org/onlinepubs/009695399/basedefs/stdbool.h.html */ #if !defined(__cplusplus) #if !defined(__GNUC__) /* _Bool builtin type is included in GCC */ typedef enum { _Bool_must_promote_to_int = -1, false = 0, true = 1 } _Bool; #endif #define bool _Bool #define true 1 #define false 0 #define __bool_true_false_are_defined 1 #endif #endif </code></pre> Some structures have <code>bool</code> members. So if I have one of these structures defined as local variables within a c++ function and pass it to a c function the sizes are inconsistent between c++ and c as bool is one bye in c++ and 4 in c. Does anyone have any advice to how to overcome this without resorting to my current solution which is <pre><code>//#define bool _Bool #define bool unsigned char </code></pre> Which is against the C99 standard for [stdbool.h](http://www.opengroup.org/onlinepubs/000095399/basedefs/stdbool.h.html)
0
25,475
08/25/2008 00:03:13
1,190
08/13/2008 12:15:38
633
56
How do I put unicode characters in my Antlr grammar?
I'm trying to build a grammar with the following: NUMERIC: INTEGER | FLOAT | INFINITY | PI ... INFINITY: '∞' PI: 'π' But Antlr refuses to load the grammar.
unicode
internationalization
parsing
antlr
null
null
open
How do I put unicode characters in my Antlr grammar? === I'm trying to build a grammar with the following: NUMERIC: INTEGER | FLOAT | INFINITY | PI ... INFINITY: '∞' PI: 'π' But Antlr refuses to load the grammar.
0
25,481
08/25/2008 00:07:43
1,190
08/13/2008 12:15:38
633
57
Where do I get the Antlr Ant task?
I'm trying to call an Antlr task in my Ant build.xml as follows: <path id="classpath.build"> <fileset dir="${dir.lib.build}" includes="**/*.jar" /> </path> ... <target name="generate-lexer" depends="init"> <antlr target="${file.antlr.lexer}"> <classpath refid="classpath.build"/> </antlr> </target> But Ant can't find the task definition. I've put all of the following in that `dir.lib.build`: * antlr-3.1.jar * antlr-2.7.7.jar * antlr-runtime-3.1.jar * stringtemplate-3.2.jar But none of those seems to have the task definition. (I've also tried putting those jars in my Ant classpath; same problem.)
ant
parsing
antlr
null
null
null
open
Where do I get the Antlr Ant task? === I'm trying to call an Antlr task in my Ant build.xml as follows: <path id="classpath.build"> <fileset dir="${dir.lib.build}" includes="**/*.jar" /> </path> ... <target name="generate-lexer" depends="init"> <antlr target="${file.antlr.lexer}"> <classpath refid="classpath.build"/> </antlr> </target> But Ant can't find the task definition. I've put all of the following in that `dir.lib.build`: * antlr-3.1.jar * antlr-2.7.7.jar * antlr-runtime-3.1.jar * stringtemplate-3.2.jar But none of those seems to have the task definition. (I've also tried putting those jars in my Ant classpath; same problem.)
0
25,499
08/25/2008 00:27:50
2,768
08/24/2008 23:52:54
1
0
What's the simplest way to execute a query in Visual C++
I'm using Visual C++ 2005 and would like to know the simplest way to connect to a MS SQL Server and execute a query. I'm looking for something as simple as ADO.NET's SqlCommand class with it's ExecuteNonQuery(), ExecuteScalar() and ExecuteReader(). I don't care if it's MFC, ATL etc. as long as it's unmanaged code and simple.
sql-server-2005
mfc
visual-c++
null
null
null
open
What's the simplest way to execute a query in Visual C++ === I'm using Visual C++ 2005 and would like to know the simplest way to connect to a MS SQL Server and execute a query. I'm looking for something as simple as ADO.NET's SqlCommand class with it's ExecuteNonQuery(), ExecuteScalar() and ExecuteReader(). I don't care if it's MFC, ATL etc. as long as it's unmanaged code and simple.
0
25,519
08/25/2008 01:00:50
2,121
08/20/2008 13:11:31
16
2
Filtering out anchor tags in a string
I need to filter out anchor tags in a string. For instance, "Check out this site: < a href="http://www.stackoverflow.com">stackoverflow< /a>" I need to be able to filter out the anchor tag to this: Check out this site: http://www.stackoverflow.com (without the link of course). That format may not be constant, either. There could be other attributes to the anchor tag. Also, there could be more than 1 anchor tag in the string. I'm doing the filtering in vb.net before it goes to the database.
asp.net
html
vb.net
null
null
null
open
Filtering out anchor tags in a string === I need to filter out anchor tags in a string. For instance, "Check out this site: < a href="http://www.stackoverflow.com">stackoverflow< /a>" I need to be able to filter out the anchor tag to this: Check out this site: http://www.stackoverflow.com (without the link of course). That format may not be constant, either. There could be other attributes to the anchor tag. Also, there could be more than 1 anchor tag in the string. I'm doing the filtering in vb.net before it goes to the database.
0
25,530
08/25/2008 01:11:59
828
08/09/2008 06:12:41
13
2
Best Method to run a Java Application as a *nix Daemon or Windows Service?
I am looking for the best method to run a Java Application as a *NIX daemon or a Windows Service. I've looked in to the [Java Service Wrapper][1], the [Apache Commons project 'jsvc'][2], and the [Apache Commons project 'procrun'][3]. So far, the Java Service Wrapper looks like it's the best option... but, I'm wondering if there are any other "Open Source friendly" licensed products out there. [1]: http://wrapper.tanukisoftware.org/ [2]: http://commons.apache.org/daemon/jsvc.html [3]: http://commons.apache.org/daemon/procrun.html
java
daemon
unix
windows
null
null
open
Best Method to run a Java Application as a *nix Daemon or Windows Service? === I am looking for the best method to run a Java Application as a *NIX daemon or a Windows Service. I've looked in to the [Java Service Wrapper][1], the [Apache Commons project 'jsvc'][2], and the [Apache Commons project 'procrun'][3]. So far, the Java Service Wrapper looks like it's the best option... but, I'm wondering if there are any other "Open Source friendly" licensed products out there. [1]: http://wrapper.tanukisoftware.org/ [2]: http://commons.apache.org/daemon/jsvc.html [3]: http://commons.apache.org/daemon/procrun.html
0
25,532
08/25/2008 01:13:04
2,572
08/23/2008 00:38:49
21
1
ASP.NET Master Pages equivalent in Java
What would be the Master Pages equivalent in the Java web development world? I've heard of Tiles, Tapestry and Velocity but don't know anything about them. Are they as easy to use as Master Pages? I want something as easy as set up one template and subsequent pages derive from the template and override content regions, similar to Master Pages. Any examples would be great!!
java
mvc
masterpages
null
null
null
open
ASP.NET Master Pages equivalent in Java === What would be the Master Pages equivalent in the Java web development world? I've heard of Tiles, Tapestry and Velocity but don't know anything about them. Are they as easy to use as Master Pages? I want something as easy as set up one template and subsequent pages derive from the template and override content regions, similar to Master Pages. Any examples would be great!!
0
25,546
08/25/2008 01:46:05
2,312
08/21/2008 15:19:59
11
1
Securely sync folders over a public network
I need to keep the files & folders on two Windows-based, non-domain machines synchronized across a public network. I was thinking rsync over SSH - but I was wondering if there is a simpler solution? Any possibility of using the sync framework over SFTP/SCP/SSH? Or I'm open to better ideas?
synchronization
security
rsync
null
null
null
open
Securely sync folders over a public network === I need to keep the files & folders on two Windows-based, non-domain machines synchronized across a public network. I was thinking rsync over SSH - but I was wondering if there is a simpler solution? Any possibility of using the sync framework over SFTP/SCP/SSH? Or I'm open to better ideas?
0
25,550
08/25/2008 01:49:22
2,775
08/25/2008 01:49:22
1
0
What's the best way to import/read data from pdf files?
We get a large amount of data from our clients in pdf files in varying formats [layout-wise], these files are typically report output, and are typically properly annotated [they don't usually need OCR], but not formatted well enough that simply copying several hundred pages of text out of acrobat is not going to work. The best approach I've found so far is to write a script to parse the nearly-valid xml output (the comments are invalid and many characters are escaped in varying ways, é becomes [[[e9]]]é, $ becomes \$, % becomes \%...) of the command-line pdftoipe utility (to convert pdf files for a program called [ipe][1]), which gives me text elements with their positions on each page [see sample below], which works well enough for reports where the same values are on the same place on every page I care about, but would require extra scripting effort for importing matrix [cross-tab] pdf files. pdftoipe is not at all intended for this, and at best can be compiled manually using cygwin for windows. Are there libraries that make this easy from some scripting language I can tolerate? A graphical tool would be awesome too. And a pony. pdftoipe output of [this sample][2] looks like this: <ipe creator="pdftoipe 2006/10/09"><info media="0 0 612 792"/> <-- Page: 1 1 --> <page gridsize="8"> <path fill="1 1 1" fillrule="wind"> 64.8 144 m 486 144 l 486 727.2 l 64.8 727.2 l 64.8 144 l h </path> <path fill="1 1 1" fillrule="wind"> 64.8 144 m 486 144 l 486 727.2 l 64.8 727.2 l 64.8 144 l h </path> <path fill="1 1 1" fillrule="wind"> 64.8 144 m 486 144 l 486 727.2 l 64.8 727.2 l 64.8 144 l h </path> <text stroke="1 0 0" pos="0 0" size="18" transformable="yes" matrix="1 0 0 1 181.8 707.88">This is a sample PDF fil</text> <text stroke="1 0 0" pos="0 0" size="18" transformable="yes" matrix="1 0 0 1 356.28 707.88">e.</text> <text stroke="1 0 0" pos="0 0" size="18" transformable="yes" matrix="1 0 0 1 368.76 707.88"> </text> <text stroke="0 0 0" pos="0 0" size="12.6" transformable="yes" matrix="1 0 0 1 67.32 692.4"> </text> <text stroke="0 0 0" pos="0 0" size="12.6" transformable="yes" matrix="1 0 0 1 67.32 677.88"> </text> <text stroke="0 0 0" pos="0 0" size="12.6" transformable="yes" matrix="1 0 0 1 67.32 663.36"> </text> <text stroke="0 0 0" pos="0 0" size="12.6" transformable="yes" matrix="1 0 0 1 67.32 648.84"> </text> <text stroke="0 0 0" pos="0 0" size="12.6" transformable="yes" matrix="1 0 0 1 67.32 634.32"> </text> <text stroke="0 0 0" pos="0 0" size="12.6" transformable="yes" matrix="1 0 0 1 67.32 619.8"> </text> <text stroke="0 0 0" pos="0 0" size="12.6" transformable="yes" matrix="1 0 0 1 67.32 605.28"> </text> <text stroke="0 0 0" pos="0 0" size="12.6" transformable="yes" matrix="1 0 0 1 67.32 590.76"> </text> <text stroke="0 0 0" pos="0 0" size="12.6" transformable="yes" matrix="1 0 0 1 67.32 576.24"> </text> <text stroke="0 0 0" pos="0 0" size="12.6" transformable="yes" matrix="1 0 0 1 67.32 561.72"> </text> <text stroke="0 0 0" pos="0 0" size="12.6" transformable="yes" matrix="1 0 0 1 67.32 547.2"> </text> <text stroke="0 0 0" pos="0 0" size="12.6" transformable="yes" matrix="1 0 0 1 67.32 532.68"> </text> <text stroke="0 0 0" pos="0 0" size="12.6" transformable="yes" matrix="1 0 0 1 67.32 518.16"> </text> <text stroke="0 0 0" pos="0 0" size="12.6" transformable="yes" matrix="1 0 0 1 67.32 503.64"> </text> <text stroke="0 0 0" pos="0 0" size="12.6" transformable="yes" matrix="1 0 0 1 67.32 489.12"> </text> <text stroke="0 0 0" pos="0 0" size="12.6" transformable="yes" matrix="1 0 0 1 67.32 474.6"> </text> <text stroke="0 0 1" pos="0 0" size="16.2" transformable="yes" matrix="1 0 0 1 67.32 456.24">If you can read this</text> <text stroke="0 0 1" pos="0 0" size="16.2" transformable="yes" matrix="1 0 0 1 214.92 456.24">,</text> <text stroke="0 0 1" pos="0 0" size="16.2" transformable="yes" matrix="1 0 0 1 219.48 456.24"> you already have A</text> <text stroke="0 0 1" pos="0 0" size="16.2" transformable="yes" matrix="1 0 0 1 370.8 456.24">dobe Acrobat </text> <text stroke="0 0 1" pos="0 0" size="16.2" transformable="yes" matrix="1 0 0 1 67.32 437.64">Reader i</text> <text stroke="0 0 1" pos="0 0" size="16.2" transformable="yes" matrix="1 0 0 1 131.28 437.64">n</text> <text stroke="0 0 1" pos="0 0" size="16.2" transformable="yes" matrix="1 0 0 1 141.12 437.64">stalled on your computer.</text> <text stroke="0 0 0" pos="0 0" size="16.2" transformable="yes" matrix="1 0 0 1 337.92 437.64"> </text> <text stroke="0 0.502 0" pos="0 0" size="12.6" transformable="yes" matrix="1 0 0 1 342.48 437.64"> </text> <image width="800" height="600" rect="-92.04 800.64 374.4 449.76" ColorSpace="DeviceRGB" BitsPerComponent="8" Filter="DCTDecode" length="369925"> feedcafebabe... </image> </page> </ipe> [1]: http://tclab.kaist.ac.kr/ipe/ [2]: http://brunndahl.navarro.se/sida_002/?CoMeT_function=get_file&id=9_1 "sample pdf file"
pdf
import
null
null
null
null
open
What's the best way to import/read data from pdf files? === We get a large amount of data from our clients in pdf files in varying formats [layout-wise], these files are typically report output, and are typically properly annotated [they don't usually need OCR], but not formatted well enough that simply copying several hundred pages of text out of acrobat is not going to work. The best approach I've found so far is to write a script to parse the nearly-valid xml output (the comments are invalid and many characters are escaped in varying ways, é becomes [[[e9]]]é, $ becomes \$, % becomes \%...) of the command-line pdftoipe utility (to convert pdf files for a program called [ipe][1]), which gives me text elements with their positions on each page [see sample below], which works well enough for reports where the same values are on the same place on every page I care about, but would require extra scripting effort for importing matrix [cross-tab] pdf files. pdftoipe is not at all intended for this, and at best can be compiled manually using cygwin for windows. Are there libraries that make this easy from some scripting language I can tolerate? A graphical tool would be awesome too. And a pony. pdftoipe output of [this sample][2] looks like this: <ipe creator="pdftoipe 2006/10/09"><info media="0 0 612 792"/> <-- Page: 1 1 --> <page gridsize="8"> <path fill="1 1 1" fillrule="wind"> 64.8 144 m 486 144 l 486 727.2 l 64.8 727.2 l 64.8 144 l h </path> <path fill="1 1 1" fillrule="wind"> 64.8 144 m 486 144 l 486 727.2 l 64.8 727.2 l 64.8 144 l h </path> <path fill="1 1 1" fillrule="wind"> 64.8 144 m 486 144 l 486 727.2 l 64.8 727.2 l 64.8 144 l h </path> <text stroke="1 0 0" pos="0 0" size="18" transformable="yes" matrix="1 0 0 1 181.8 707.88">This is a sample PDF fil</text> <text stroke="1 0 0" pos="0 0" size="18" transformable="yes" matrix="1 0 0 1 356.28 707.88">e.</text> <text stroke="1 0 0" pos="0 0" size="18" transformable="yes" matrix="1 0 0 1 368.76 707.88"> </text> <text stroke="0 0 0" pos="0 0" size="12.6" transformable="yes" matrix="1 0 0 1 67.32 692.4"> </text> <text stroke="0 0 0" pos="0 0" size="12.6" transformable="yes" matrix="1 0 0 1 67.32 677.88"> </text> <text stroke="0 0 0" pos="0 0" size="12.6" transformable="yes" matrix="1 0 0 1 67.32 663.36"> </text> <text stroke="0 0 0" pos="0 0" size="12.6" transformable="yes" matrix="1 0 0 1 67.32 648.84"> </text> <text stroke="0 0 0" pos="0 0" size="12.6" transformable="yes" matrix="1 0 0 1 67.32 634.32"> </text> <text stroke="0 0 0" pos="0 0" size="12.6" transformable="yes" matrix="1 0 0 1 67.32 619.8"> </text> <text stroke="0 0 0" pos="0 0" size="12.6" transformable="yes" matrix="1 0 0 1 67.32 605.28"> </text> <text stroke="0 0 0" pos="0 0" size="12.6" transformable="yes" matrix="1 0 0 1 67.32 590.76"> </text> <text stroke="0 0 0" pos="0 0" size="12.6" transformable="yes" matrix="1 0 0 1 67.32 576.24"> </text> <text stroke="0 0 0" pos="0 0" size="12.6" transformable="yes" matrix="1 0 0 1 67.32 561.72"> </text> <text stroke="0 0 0" pos="0 0" size="12.6" transformable="yes" matrix="1 0 0 1 67.32 547.2"> </text> <text stroke="0 0 0" pos="0 0" size="12.6" transformable="yes" matrix="1 0 0 1 67.32 532.68"> </text> <text stroke="0 0 0" pos="0 0" size="12.6" transformable="yes" matrix="1 0 0 1 67.32 518.16"> </text> <text stroke="0 0 0" pos="0 0" size="12.6" transformable="yes" matrix="1 0 0 1 67.32 503.64"> </text> <text stroke="0 0 0" pos="0 0" size="12.6" transformable="yes" matrix="1 0 0 1 67.32 489.12"> </text> <text stroke="0 0 0" pos="0 0" size="12.6" transformable="yes" matrix="1 0 0 1 67.32 474.6"> </text> <text stroke="0 0 1" pos="0 0" size="16.2" transformable="yes" matrix="1 0 0 1 67.32 456.24">If you can read this</text> <text stroke="0 0 1" pos="0 0" size="16.2" transformable="yes" matrix="1 0 0 1 214.92 456.24">,</text> <text stroke="0 0 1" pos="0 0" size="16.2" transformable="yes" matrix="1 0 0 1 219.48 456.24"> you already have A</text> <text stroke="0 0 1" pos="0 0" size="16.2" transformable="yes" matrix="1 0 0 1 370.8 456.24">dobe Acrobat </text> <text stroke="0 0 1" pos="0 0" size="16.2" transformable="yes" matrix="1 0 0 1 67.32 437.64">Reader i</text> <text stroke="0 0 1" pos="0 0" size="16.2" transformable="yes" matrix="1 0 0 1 131.28 437.64">n</text> <text stroke="0 0 1" pos="0 0" size="16.2" transformable="yes" matrix="1 0 0 1 141.12 437.64">stalled on your computer.</text> <text stroke="0 0 0" pos="0 0" size="16.2" transformable="yes" matrix="1 0 0 1 337.92 437.64"> </text> <text stroke="0 0.502 0" pos="0 0" size="12.6" transformable="yes" matrix="1 0 0 1 342.48 437.64"> </text> <image width="800" height="600" rect="-92.04 800.64 374.4 449.76" ColorSpace="DeviceRGB" BitsPerComponent="8" Filter="DCTDecode" length="369925"> feedcafebabe... </image> </page> </ipe> [1]: http://tclab.kaist.ac.kr/ipe/ [2]: http://brunndahl.navarro.se/sida_002/?CoMeT_function=get_file&id=9_1 "sample pdf file"
0
25,552
08/25/2008 01:49:55
1,693
08/18/2008 02:25:37
448
23
Using Java to get OS-level system information
I'm currently building a Java app that could end up being run on many different platforms, but primarily variants of Solaris, Linux and Windows. Has anyone been able to successfully extract information such as the current disk space used, CPU utilisation and memory used in the underlying OS? What about just what the Java app itself is consuming? Preferrably I'd like to get this information without using JNI.
java
null
null
null
null
null
open
Using Java to get OS-level system information === I'm currently building a Java app that could end up being run on many different platforms, but primarily variants of Solaris, Linux and Windows. Has anyone been able to successfully extract information such as the current disk space used, CPU utilisation and memory used in the underlying OS? What about just what the Java app itself is consuming? Preferrably I'd like to get this information without using JNI.
0
25,561
08/25/2008 01:59:45
2,754
08/24/2008 21:39:01
11
3
Capturing a repeated group
I am attempting to parse a string like the following using a .NET regular expression: H3Y5NC8E-TGA5B6SB-2NVAQ4E0 and return the following using Split: H3Y5NC8E TGA5B6SB 2NVAQ4E0 The number of characters in each group can vary and the number of groups can also vary. I am using the following expression: ([ABCDEFGHJKLMNPQRSTVXYZ0123456789]{8}-?){4} This works insofar as it correctly matches the input. However, when I use the Split method to extract each character group, I just get the final group. RegexBuddy complains that I have repeated the capturing group itself and that I should put a capture group around the repeated group. However, none of my attempts to do this achieve the desired result. I have been trying expressions like this: (([ABCDEFGHJKLMNPQRSTVXYZ0123456789]{8})-?){4} But this does not work. Since I generate the regex in code, I could just expand it out by the number of groups, but I was hoping for a more elegant solution.
regex
.net-2.0
null
null
null
null
open
Capturing a repeated group === I am attempting to parse a string like the following using a .NET regular expression: H3Y5NC8E-TGA5B6SB-2NVAQ4E0 and return the following using Split: H3Y5NC8E TGA5B6SB 2NVAQ4E0 The number of characters in each group can vary and the number of groups can also vary. I am using the following expression: ([ABCDEFGHJKLMNPQRSTVXYZ0123456789]{8}-?){4} This works insofar as it correctly matches the input. However, when I use the Split method to extract each character group, I just get the final group. RegexBuddy complains that I have repeated the capturing group itself and that I should put a capture group around the repeated group. However, none of my attempts to do this achieve the desired result. I have been trying expressions like this: (([ABCDEFGHJKLMNPQRSTVXYZ0123456789]{8})-?){4} But this does not work. Since I generate the regex in code, I could just expand it out by the number of groups, but I was hoping for a more elegant solution.
0