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
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
37,122 | 08/31/2008 21:22:51 | 1,191 | 08/13/2008 12:16:32 | 31 | 1 | Make Browser Window Blink in Task Bar | How do I make a user's browser blink/flash/highlight in the task bar using JavaScript? For example, if I make an AJAX request every 10 seconds to see if the user has any new messages on the server, I want the user to know it right away, even if he is using another application at the time. | javascript | browser | null | null | null | null | open | Make Browser Window Blink in Task Bar
===
How do I make a user's browser blink/flash/highlight in the task bar using JavaScript? For example, if I make an AJAX request every 10 seconds to see if the user has any new messages on the server, I want the user to know it right away, even if he is using another application at the time. | 0 |
37,133 | 08/31/2008 21:34:19 | 3,631 | 08/29/2008 16:06:08 | 91 | 10 | "Programming" for a 9 year old | I am looking for recommendations on a web site/software for providing an introduction to programming concepts for my 9 year old.
I remember using Logo/turtle graphics at a similar age and would love a simple self-contained web site that gave a number of step-by-step tutorials. There is some neat current generation Logo software out there, but the packages I looked at seemed more complex that I wanted for an absolute beginner.
Any experiences that have worked well? | children | null | null | null | null | 03/08/2012 23:07:44 | not constructive | "Programming" for a 9 year old
===
I am looking for recommendations on a web site/software for providing an introduction to programming concepts for my 9 year old.
I remember using Logo/turtle graphics at a similar age and would love a simple self-contained web site that gave a number of step-by-step tutorials. There is some neat current generation Logo software out there, but the packages I looked at seemed more complex that I wanted for an absolute beginner.
Any experiences that have worked well? | 4 |
37,139 | 08/31/2008 21:37:48 | 3,305 | 08/27/2008 18:56:35 | 176 | 12 | How do you maintain a project schedule? | One of the elements of the [Joel Test][1] is that you have an up to date schedule. How do you create and maintain your project schedule? How often is it updated?
[1]: http://www.joelonsoftware.com/articles/fog0000000043.html | project-management | project-planning | null | null | null | null | open | How do you maintain a project schedule?
===
One of the elements of the [Joel Test][1] is that you have an up to date schedule. How do you create and maintain your project schedule? How often is it updated?
[1]: http://www.joelonsoftware.com/articles/fog0000000043.html | 0 |
37,141 | 08/31/2008 21:40:39 | 3,653 | 08/29/2008 17:35:20 | 11 | 2 | Event handling in Dojo | Hello All: Apologies in advance for the appaling long post (and pretty applaing code, too).
Taking Jeff Atwood's [advice](http://www.codinghorror.com/blog/archives/001163.html), I decided to use a JavaScript library for the very basic to-do list application I'm writing. I picked the [Dojo toolkit](http://dojotoolkit.org/), version 1.1.1. At first, all was fine: the drag-and-drop code I wrote worked first time, you can drag tasks on-screen to change their order of precedence, and each drag-and-drop operation calls an event handler that sends an AJAX call to the server to let it know that order has been changed.
Then I went to add in the email tracking functionality. Standard stuff: new incoming emails have a unique ID number attached to their subject line, all subsequent emails about that problem can be tracked by simply leaving that ID number in the subject when you reply. So, we have a list of open tasks, each with their own ID number, and each of those tasks has a time-ordered list of associated emails. I wanted the text of those emails to be available to the user as they were looking at their list of tasks, so I made each task box a Dijit "Tree" control - top level contains the task description, branches contain email dates, and a single "leaf" off of each of those branches contains the email text.
First problem: I wanted the tree view to be fully-collapsed by default. After searching Google quite extensively, I found a number of solutions, all of which seemed to be valid for previous versions of Dojo but not the one I was using. I eventually figured out that the best solution would seem to be to have a event handler called when the Tree control had loaded that simply collapsed each branch/leaf. Unfortunately, even though the Tree control had been instantiated and its "startup" event handler called, the branches and leaves still hadn't loaded (the data was still being loaded via an AJAX call). So, I modified the system so that all email text and Tree structure is added server-side. This means the whole fully-populated Tree control is available when its startup event handler is called.
So, the startup event handler fully collapses the tree. Next, I couldn't find a "proper" way to have nice formatted text for the email leaves. I can put the email text in the leaf just fine, but any HTML gets escaped out and shows up in the web page. Cue more rummaging around Dojo's documentation (tends to be out of date, with code and examples for pre-1.0 versions) and Google. I eventually came up with the solution of getting JavaScript to go and read the SPAN element that's inside each leaf node and un-escape the escaped HTML code in it's innerHTML. I figured I'd put code to do this in with the fully-collapse-the-tree code, in the Tree control's startup event handler.
However... it turns out that the SPAN element isn't actually created until the user clicks on the expando (the little "+" symbol in a tree view you click to expand a node). Okay, fair enough - I'll add the re-formatting code to the onExpand() event handler, or whatever it's called. Which doesn't seem to exist. I've searched to documentation, I've searched Google... I'm quite possibly mis-understanding Dojo's "publish/subscribe" event handling system, but I think that mainly because there doesn't seem to be any comprehensive documentation for it anywhere (like, where do I find out what events I can subscribe to?).
So, in the end, the best solution I can come up with is to add an onClick event handler (not a "Dojo" event, but a plain JavaScript event that Dojo knows nothing about) to the expando node of each Tree branch that re-formats the HTML inside the SPAN element of each leaf. Except... when that is called, the SPAN element still doesn't exist (sometimes - other times it's been cached, just to further confuse you). Therefore, I have the event handler set up a timer that periodically calls a function that checks to see if the relevant SPAN element has turned up yet before then re-formatting it.
// An event handler called whenever a "email title" tree node is expanded.
function formatTreeNode(nodeID) {
if (dijit.byId(nodeID).getChildren().length != 0) {
clearInterval(nodeUpdateIntervalID);
messageBody = dijit.byId(nodeID).getChildren()[0].labelNode.innerHTML
if (messageBody.indexOf("<b>Message text:</b>") == -1) {
messageBody = messageBody.replace(/>/g, ">");
messageBody = messageBody.replace(/</g, "<");
messageBody = messageBody.replace(/&/g, "&");
dijit.byId(nodeID).getChildren()[0].labelNode.innerHTML = "<b>Message text:</b><div style=\"font-family:courier\">"+messageBody+"</div>";
}
}
}
// An event handler called when a tree node has been set up - we changed the default fully-expanded to fully-collapsed.
function setupTree(theTree) {
dijit.byId("tree-"+theTree).rootNode.collapse();
messageNode = dijit.byId("tree-"+theTree).rootNode.getChildren();
for (pl = 0; pl < messageNode.length; pl++) {
messageNode[pl].collapse();
messageNode[pl].expandoNode.onclick = eval("nodeUpdateIntervalID = setInterval(\"formatTreeNode('"+messageNode[pl].id+"')\",200); formatTreeNode('"+messageNode[pl].id+"');");
}
}
The above has the feel of a truly horrible hack, and I feel sure I must have taken a wrong turn somewhere early on in my thought process. Can someone please tell me:
* The correct way to go about putting nicely-formatted text inside a Dojo/Dijit Tree control.
* The correct way to handle Dojo events, like where I can figure out what events are available for me to subscribe to.
* A better JavaScript library to use (can I do what I want to with JQuery and avoid the all-around-the-houses approach seen above?).
PS: If you're naming a software project, give thought to its name's uniqueness in Google - I'm sure searching for "Dojo" documentation in Google would be easier without all the martial arts results getting in the way.
PPS: Firefox spellchecker knows how to spell "Atwood", correcting me when I put two 'T's instead of one. Is Jeff just that famous now? | javascript | dojo | dijit | null | null | null | open | Event handling in Dojo
===
Hello All: Apologies in advance for the appaling long post (and pretty applaing code, too).
Taking Jeff Atwood's [advice](http://www.codinghorror.com/blog/archives/001163.html), I decided to use a JavaScript library for the very basic to-do list application I'm writing. I picked the [Dojo toolkit](http://dojotoolkit.org/), version 1.1.1. At first, all was fine: the drag-and-drop code I wrote worked first time, you can drag tasks on-screen to change their order of precedence, and each drag-and-drop operation calls an event handler that sends an AJAX call to the server to let it know that order has been changed.
Then I went to add in the email tracking functionality. Standard stuff: new incoming emails have a unique ID number attached to their subject line, all subsequent emails about that problem can be tracked by simply leaving that ID number in the subject when you reply. So, we have a list of open tasks, each with their own ID number, and each of those tasks has a time-ordered list of associated emails. I wanted the text of those emails to be available to the user as they were looking at their list of tasks, so I made each task box a Dijit "Tree" control - top level contains the task description, branches contain email dates, and a single "leaf" off of each of those branches contains the email text.
First problem: I wanted the tree view to be fully-collapsed by default. After searching Google quite extensively, I found a number of solutions, all of which seemed to be valid for previous versions of Dojo but not the one I was using. I eventually figured out that the best solution would seem to be to have a event handler called when the Tree control had loaded that simply collapsed each branch/leaf. Unfortunately, even though the Tree control had been instantiated and its "startup" event handler called, the branches and leaves still hadn't loaded (the data was still being loaded via an AJAX call). So, I modified the system so that all email text and Tree structure is added server-side. This means the whole fully-populated Tree control is available when its startup event handler is called.
So, the startup event handler fully collapses the tree. Next, I couldn't find a "proper" way to have nice formatted text for the email leaves. I can put the email text in the leaf just fine, but any HTML gets escaped out and shows up in the web page. Cue more rummaging around Dojo's documentation (tends to be out of date, with code and examples for pre-1.0 versions) and Google. I eventually came up with the solution of getting JavaScript to go and read the SPAN element that's inside each leaf node and un-escape the escaped HTML code in it's innerHTML. I figured I'd put code to do this in with the fully-collapse-the-tree code, in the Tree control's startup event handler.
However... it turns out that the SPAN element isn't actually created until the user clicks on the expando (the little "+" symbol in a tree view you click to expand a node). Okay, fair enough - I'll add the re-formatting code to the onExpand() event handler, or whatever it's called. Which doesn't seem to exist. I've searched to documentation, I've searched Google... I'm quite possibly mis-understanding Dojo's "publish/subscribe" event handling system, but I think that mainly because there doesn't seem to be any comprehensive documentation for it anywhere (like, where do I find out what events I can subscribe to?).
So, in the end, the best solution I can come up with is to add an onClick event handler (not a "Dojo" event, but a plain JavaScript event that Dojo knows nothing about) to the expando node of each Tree branch that re-formats the HTML inside the SPAN element of each leaf. Except... when that is called, the SPAN element still doesn't exist (sometimes - other times it's been cached, just to further confuse you). Therefore, I have the event handler set up a timer that periodically calls a function that checks to see if the relevant SPAN element has turned up yet before then re-formatting it.
// An event handler called whenever a "email title" tree node is expanded.
function formatTreeNode(nodeID) {
if (dijit.byId(nodeID).getChildren().length != 0) {
clearInterval(nodeUpdateIntervalID);
messageBody = dijit.byId(nodeID).getChildren()[0].labelNode.innerHTML
if (messageBody.indexOf("<b>Message text:</b>") == -1) {
messageBody = messageBody.replace(/>/g, ">");
messageBody = messageBody.replace(/</g, "<");
messageBody = messageBody.replace(/&/g, "&");
dijit.byId(nodeID).getChildren()[0].labelNode.innerHTML = "<b>Message text:</b><div style=\"font-family:courier\">"+messageBody+"</div>";
}
}
}
// An event handler called when a tree node has been set up - we changed the default fully-expanded to fully-collapsed.
function setupTree(theTree) {
dijit.byId("tree-"+theTree).rootNode.collapse();
messageNode = dijit.byId("tree-"+theTree).rootNode.getChildren();
for (pl = 0; pl < messageNode.length; pl++) {
messageNode[pl].collapse();
messageNode[pl].expandoNode.onclick = eval("nodeUpdateIntervalID = setInterval(\"formatTreeNode('"+messageNode[pl].id+"')\",200); formatTreeNode('"+messageNode[pl].id+"');");
}
}
The above has the feel of a truly horrible hack, and I feel sure I must have taken a wrong turn somewhere early on in my thought process. Can someone please tell me:
* The correct way to go about putting nicely-formatted text inside a Dojo/Dijit Tree control.
* The correct way to handle Dojo events, like where I can figure out what events are available for me to subscribe to.
* A better JavaScript library to use (can I do what I want to with JQuery and avoid the all-around-the-houses approach seen above?).
PS: If you're naming a software project, give thought to its name's uniqueness in Google - I'm sure searching for "Dojo" documentation in Google would be easier without all the martial arts results getting in the way.
PPS: Firefox spellchecker knows how to spell "Atwood", correcting me when I put two 'T's instead of one. Is Jeff just that famous now? | 0 |
37,142 | 08/31/2008 21:41:24 | 3,855 | 08/31/2008 11:44:40 | 1 | 0 | How to make Ruby or Python web sites to use multiple cores? | Even though [Python][1] and [Ruby][2] have one kernel thread per interpreter thread, they have a global interpreter lock (GIL) that is used to protect potentially shared data structures, so this inhibits multi-processor execution. Even though the portions in those languajes that are written in C or C++ can be free-threaded, that's not possible with pure interpreted code unless you use multiple processes. What's the best way to achieve this? [Using FastCGI][3]? Creating a [cluster or a farm][4] of virtualized servers? Using their Java equivalents, JRuby and Jython?
[1]: http://twistedmatrix.com/pipermail/twisted-python/2004-May/007896.html
[2]: http://www.reddit.com/comments/6wmum/thread_safe_ruby_on_rails_in_22_release/
[3]: http://blogs.codehaus.org/people/tirsen/archives/001041_ruby_on_rails_and_fastcgi_scaling_using_processes_instead_of_threads.html
[4]: http://blog.innerewut.de/files/images/stage_2.png | python | ruby | multithreading | multicore | null | null | open | How to make Ruby or Python web sites to use multiple cores?
===
Even though [Python][1] and [Ruby][2] have one kernel thread per interpreter thread, they have a global interpreter lock (GIL) that is used to protect potentially shared data structures, so this inhibits multi-processor execution. Even though the portions in those languajes that are written in C or C++ can be free-threaded, that's not possible with pure interpreted code unless you use multiple processes. What's the best way to achieve this? [Using FastCGI][3]? Creating a [cluster or a farm][4] of virtualized servers? Using their Java equivalents, JRuby and Jython?
[1]: http://twistedmatrix.com/pipermail/twisted-python/2004-May/007896.html
[2]: http://www.reddit.com/comments/6wmum/thread_safe_ruby_on_rails_in_22_release/
[3]: http://blogs.codehaus.org/people/tirsen/archives/001041_ruby_on_rails_and_fastcgi_scaling_using_processes_instead_of_threads.html
[4]: http://blog.innerewut.de/files/images/stage_2.png | 0 |
37,157 | 08/31/2008 21:55:35 | 1,384,652 | 08/01/2008 12:01:23 | 1,816 | 86 | Caching MySQL queries | Is there a simple way to cache MySQL queries in PHP or failing that, is there a small class set that someone has written and made available that will do it? I can cache a whole page but that won't work as some data changes but some does not, I want to cache the part that does not. | php | mysql | caching | null | null | null | open | Caching MySQL queries
===
Is there a simple way to cache MySQL queries in PHP or failing that, is there a small class set that someone has written and made available that will do it? I can cache a whole page but that won't work as some data changes but some does not, I want to cache the part that does not. | 0 |
37,162 | 08/31/2008 22:00:25 | 3,915 | 08/31/2008 21:34:28 | 1 | 0 | How do I make an HTML page print in landscape when the user selects 'print'? | We generate web pages that should always be printed in landscape mode. Web browser print dialogs default to portrait, so for every print job the user has to manually select landscape. It's minor, but would be nice for the user if we can remove this unnecessary step.
Thanks in advance to all respondents. | html | print | landscape | portrait | null | null | open | How do I make an HTML page print in landscape when the user selects 'print'?
===
We generate web pages that should always be printed in landscape mode. Web browser print dialogs default to portrait, so for every print job the user has to manually select landscape. It's minor, but would be nice for the user if we can remove this unnecessary step.
Thanks in advance to all respondents. | 0 |
37,185 | 08/31/2008 22:22:58 | 3,712 | 08/30/2008 09:04:55 | 1 | 0 | What's the idiomatic way to do async socket programming in Delphi? | What is the normal way people writing network code in Delphi use Windows-style overlapped asynchronous socket I/O?
Here's my prior research into this question:
The [Indy][1] components seem entirely synchronous. On the other hand, while ScktComp unit does use WSAAsyncSelect, it basically only asynchronizes a BSD-style multiplexed socket app. You get dumped in a single event callback, as if you had just returned from select() in a loop, and have to do all the state machine navigation yourself.
The .NET situation is considerably nicer, with Socket.BeginRead / Socket.EndRead, where the continuation is passed directly to Socket.BeginRead, and that's where you pick back up. A continuation coded as a closure obviously has all the context you need, and more.
[1]: http://indyproject.org/ | delphi | sockets | winapi | networking | asynchronous | null | open | What's the idiomatic way to do async socket programming in Delphi?
===
What is the normal way people writing network code in Delphi use Windows-style overlapped asynchronous socket I/O?
Here's my prior research into this question:
The [Indy][1] components seem entirely synchronous. On the other hand, while ScktComp unit does use WSAAsyncSelect, it basically only asynchronizes a BSD-style multiplexed socket app. You get dumped in a single event callback, as if you had just returned from select() in a loop, and have to do all the state machine navigation yourself.
The .NET situation is considerably nicer, with Socket.BeginRead / Socket.EndRead, where the continuation is passed directly to Socket.BeginRead, and that's where you pick back up. A continuation coded as a closure obviously has all the context you need, and more.
[1]: http://indyproject.org/ | 0 |
37,189 | 08/31/2008 22:28:22 | 1,203 | 08/13/2008 12:55:14 | 1 | 0 | C# console program can't send fax when run as a scheduled task | I have a console program written in C# that I am using to send faxes. When I step through the program in Visual Studio it works fine. When I double click on the program in Windows Explorer it works fine. When I setup a Windows scheduled task to run the program it fails with this in the event log.
EventType clr20r3, P1 consolefaxtest.exe, P2 1.0.0.0,
P3 48bb146b, P4 consolefaxtest, P5 1.0.0.0, P6 48bb146b,
P7 1, P8 80, P9 system.io.filenotfoundexception,
P10 NIL.
I wrote a batch file to run the fax program and it fails with this message.
Unhandled Exception: System.IO.FileNotFoundException: Operation failed.
at FAXCOMEXLib.FaxDocumentClass.ConnectedSubmit(FaxServer pFaxServer)
Can anyone explain this behavior to me?
| c# | console | fax | null | null | null | open | C# console program can't send fax when run as a scheduled task
===
I have a console program written in C# that I am using to send faxes. When I step through the program in Visual Studio it works fine. When I double click on the program in Windows Explorer it works fine. When I setup a Windows scheduled task to run the program it fails with this in the event log.
EventType clr20r3, P1 consolefaxtest.exe, P2 1.0.0.0,
P3 48bb146b, P4 consolefaxtest, P5 1.0.0.0, P6 48bb146b,
P7 1, P8 80, P9 system.io.filenotfoundexception,
P10 NIL.
I wrote a batch file to run the fax program and it fails with this message.
Unhandled Exception: System.IO.FileNotFoundException: Operation failed.
at FAXCOMEXLib.FaxDocumentClass.ConnectedSubmit(FaxServer pFaxServer)
Can anyone explain this behavior to me?
| 0 |
37,198 | 08/31/2008 22:37:32 | 3,576 | 08/29/2008 06:56:00 | 53 | 1 | What is the best way to get OS specific information in Java? | Specifically getting on Windows the "..\Documents & Settings/All Users,
the current users My Documents dirctory,
and basicaly any path that needs the front end to be dynamically derived based on the OS your software is running on. | java | null | null | null | null | null | open | What is the best way to get OS specific information in Java?
===
Specifically getting on Windows the "..\Documents & Settings/All Users,
the current users My Documents dirctory,
and basicaly any path that needs the front end to be dynamically derived based on the OS your software is running on. | 0 |
37,219 | 08/31/2008 22:51:21 | 3,146 | 08/27/2008 00:25:15 | 41 | 5 | How do you remove a specific revision in the git history? | Suppose you git history looks like this:
1
2
3
4
5
Where 1-5 are separate revisions. You need to remove 3 while still keeping 1, 2, 4 and 5. How to do it?
Is there an efficient method when there are hundreds of revisions after the one to be deleted? | git | null | null | null | null | null | open | How do you remove a specific revision in the git history?
===
Suppose you git history looks like this:
1
2
3
4
5
Where 1-5 are separate revisions. You need to remove 3 while still keeping 1, 2, 4 and 5. How to do it?
Is there an efficient method when there are hundreds of revisions after the one to be deleted? | 0 |
37,248 | 08/31/2008 23:18:41 | 708 | 08/08/2008 06:10:02 | 489 | 14 | C# Preprocessor | While the C# spec does include a pre-processor and basic directives (#define, #if, etc), the language does not have the same flexible pre-processor found in languages such as C/C++. I believe the lack of such a flexible pre-processor was a design decision made by Anders Hejlsberg (although, unfortunately, I can't find reference to this now). From experience, this is certainly a good decision, as there were some really terrible un-maintainable macros created back when I was doing a lot of C/C++.
That said, there are a number of scenarios where I could find a slightly more flexible pre-processor to be useful. Code such as the following could be improved by some simple pre-processor directives:
public string MyProperty
{
get { return _myProperty; }
set
{
if (value != _myProperty)
{
_myProperty = value;
NotifyPropertyChanged("MyProperty");
// This line above could be improved by replacing the literal string with
// a pre-processor directive like "#Property", which could be translated
// to the string value "MyProperty" This new notify call would be as follows:
// NotifyPropertyChanged(#Property);
}
}
}
Would it be a good idea to write a pre-processor to handle extremely simple cases like this? Steve McConnell wrote in [Code Complete][1] (p208):
> *Write your own preprocessor* If a language doesn't include a preprocessor, it's fairly easy to write one...
I am torn. It was a design decision to leave such a flexible pre-processor out of C#. However, an author I highly respect mentions it may be ok in some circumstances.
**Should I build a C# pre-processor? Is there one available that does the simple things I want to do?**
[1]: http://www.amazon.com/Code-Complete-Practical-Handbook-Construction/dp/0735619670 | c# | null | null | null | null | null | open | C# Preprocessor
===
While the C# spec does include a pre-processor and basic directives (#define, #if, etc), the language does not have the same flexible pre-processor found in languages such as C/C++. I believe the lack of such a flexible pre-processor was a design decision made by Anders Hejlsberg (although, unfortunately, I can't find reference to this now). From experience, this is certainly a good decision, as there were some really terrible un-maintainable macros created back when I was doing a lot of C/C++.
That said, there are a number of scenarios where I could find a slightly more flexible pre-processor to be useful. Code such as the following could be improved by some simple pre-processor directives:
public string MyProperty
{
get { return _myProperty; }
set
{
if (value != _myProperty)
{
_myProperty = value;
NotifyPropertyChanged("MyProperty");
// This line above could be improved by replacing the literal string with
// a pre-processor directive like "#Property", which could be translated
// to the string value "MyProperty" This new notify call would be as follows:
// NotifyPropertyChanged(#Property);
}
}
}
Would it be a good idea to write a pre-processor to handle extremely simple cases like this? Steve McConnell wrote in [Code Complete][1] (p208):
> *Write your own preprocessor* If a language doesn't include a preprocessor, it's fairly easy to write one...
I am torn. It was a design decision to leave such a flexible pre-processor out of C#. However, an author I highly respect mentions it may be ok in some circumstances.
**Should I build a C# pre-processor? Is there one available that does the simple things I want to do?**
[1]: http://www.amazon.com/Code-Complete-Practical-Handbook-Construction/dp/0735619670 | 0 |
37,263 | 08/31/2008 23:39:48 | 1,588 | 08/17/2008 01:05:22 | 243 | 10 | Where does "Change Management" end and "Project Failure" begin? | I got into a mini-argument with my boss recently regarding "project failure." After three years, our project to migrate a codebase to a new platform (a project I was on for 1.5 years, but my team lead was on for only a few months) went live. He, along with senior management of both my company and the client (I'm one of those god-awful consultants you hear so much about. My engagement is an "Application Outsourcing") declared the project to be a success. I disagreed, stating that old presentations I had found showed that compared to the original schedule, the delay in deployment was best measured in months and could potentially be measured in years. I explained what I know of project failure, and the studies and statistics behind failure rates. He responded that that was all academia, and that no project he led had failed, thanks to the wonders of change/risk management - what seems to come down to explaining delays and re-evaluating the schedule based on new data.
Maybe consulting like this differs from other projects, but it seems like this is just failure wrapped up in a prettier name to avoid the stigma of having failed to deliver on time, on budget, or with full functionality. The fact that he explained that my company gave away hours of work for free in order to finish the project within the maxed out budget says a lot.
So I ask you this:
* What is change management, and how does it apply to a project?
* Where does "change management" end, and "project failure" begin?
| project-management | project-failure | change-management | null | null | null | open | Where does "Change Management" end and "Project Failure" begin?
===
I got into a mini-argument with my boss recently regarding "project failure." After three years, our project to migrate a codebase to a new platform (a project I was on for 1.5 years, but my team lead was on for only a few months) went live. He, along with senior management of both my company and the client (I'm one of those god-awful consultants you hear so much about. My engagement is an "Application Outsourcing") declared the project to be a success. I disagreed, stating that old presentations I had found showed that compared to the original schedule, the delay in deployment was best measured in months and could potentially be measured in years. I explained what I know of project failure, and the studies and statistics behind failure rates. He responded that that was all academia, and that no project he led had failed, thanks to the wonders of change/risk management - what seems to come down to explaining delays and re-evaluating the schedule based on new data.
Maybe consulting like this differs from other projects, but it seems like this is just failure wrapped up in a prettier name to avoid the stigma of having failed to deliver on time, on budget, or with full functionality. The fact that he explained that my company gave away hours of work for free in order to finish the project within the maxed out budget says a lot.
So I ask you this:
* What is change management, and how does it apply to a project?
* Where does "change management" end, and "project failure" begin?
| 0 |
37,271 | 08/31/2008 23:50:24 | 2,443 | 08/22/2008 10:53:30 | 226 | 22 | What's the best way to persist data in a Java Desktop Application? | I have a large tree of Java Objects in my Desktop Application and am trying to decide on the best way of persisting them as a file to the file system.
Some thoughts I've had were:
- **Roll my own serializer using DataOutputStream**: This would give me the greatest control of what was in the file, but at the cost of micromanaging it.
- **Straight old Serialization using ObjectOutputStream and its various related classes**: I'm not sold on it though since I find the data brittle. Changing any object's structure breaks the serialized instances of it. So I'm locked in to what seems to be a horrible versioning nightmare.
- **XML Serialization**: It's not as brittle, but it's significantly slower that straight out serialization. It can be transformed outside of my program.
- **JavaDB**: I'd considered this since I'm comfortable writing JDBC applications. The difference here is that the database instance would only persist while the file was being opened or saved. It's not pretty but... it does lend itself to migrating to a central server architecture if the need arises later and it introduces the possibility of quering the datamodel in a simpler way.
I'm curious to see what other people think. And I'm hoping that I've missed some obvious, and simpler approach than the ones above.
Thanks in advance,
Allain | java | persistence | desktop | oop | null | null | open | What's the best way to persist data in a Java Desktop Application?
===
I have a large tree of Java Objects in my Desktop Application and am trying to decide on the best way of persisting them as a file to the file system.
Some thoughts I've had were:
- **Roll my own serializer using DataOutputStream**: This would give me the greatest control of what was in the file, but at the cost of micromanaging it.
- **Straight old Serialization using ObjectOutputStream and its various related classes**: I'm not sold on it though since I find the data brittle. Changing any object's structure breaks the serialized instances of it. So I'm locked in to what seems to be a horrible versioning nightmare.
- **XML Serialization**: It's not as brittle, but it's significantly slower that straight out serialization. It can be transformed outside of my program.
- **JavaDB**: I'd considered this since I'm comfortable writing JDBC applications. The difference here is that the database instance would only persist while the file was being opened or saved. It's not pretty but... it does lend itself to migrating to a central server architecture if the need arises later and it introduces the possibility of quering the datamodel in a simpler way.
I'm curious to see what other people think. And I'm hoping that I've missed some obvious, and simpler approach than the ones above.
Thanks in advance,
Allain | 0 |
37,275 | 08/31/2008 23:57:08 | 1,208 | 08/13/2008 13:11:36 | 144 | 22 | SQL Query for Logins | What is the SQL query to select all of the MSSQL Server's logins? | sql | null | null | null | null | null | open | SQL Query for Logins
===
What is the SQL query to select all of the MSSQL Server's logins? | 0 |
37,296 | 09/01/2008 00:17:45 | 279 | 08/04/2008 11:30:57 | 498 | 49 | How to robustly, but minimally, distribute items across a peer-to-peer system | If one has a peer-to-peer system that can be queried, one would like to
- reduce the total number of queries across the network (by distributing "popular" items widely and "similar" items together)
- avoid excess storage at each node
- assure good availability to even moderately rare items in the face of client downtime, hardware failure, and users leaving (possibly detecting rare items for archivists/historians)
- avoid queries failing to find matches in the event of network partitions
Given these requirements:
1. Are there any standard approaches? If not, is there any respected, but experimental, research? I'm familiar some with distribution schemes, but I haven't seen anything really address learning for robustness.
2. Am I missing any obvious criteria?
3. Is anybody interested in working on/solving this problem? (If so, I'm happy to open-source part of a very lame simulator I threw together this weekend, and generally offer unhelpful advice).
Context: This problem is a consideration for my work on scenario connectors, for items that are publicly shared. http://scen-connect.sourceforge.net/ | p2p | machinelearning | language-agnostic | distributed | fault-tolerance | null | open | How to robustly, but minimally, distribute items across a peer-to-peer system
===
If one has a peer-to-peer system that can be queried, one would like to
- reduce the total number of queries across the network (by distributing "popular" items widely and "similar" items together)
- avoid excess storage at each node
- assure good availability to even moderately rare items in the face of client downtime, hardware failure, and users leaving (possibly detecting rare items for archivists/historians)
- avoid queries failing to find matches in the event of network partitions
Given these requirements:
1. Are there any standard approaches? If not, is there any respected, but experimental, research? I'm familiar some with distribution schemes, but I haven't seen anything really address learning for robustness.
2. Am I missing any obvious criteria?
3. Is anybody interested in working on/solving this problem? (If so, I'm happy to open-source part of a very lame simulator I threw together this weekend, and generally offer unhelpful advice).
Context: This problem is a consideration for my work on scenario connectors, for items that are publicly shared. http://scen-connect.sourceforge.net/ | 0 |
37,299 | 09/01/2008 00:18:18 | 1,043 | 08/11/2008 18:08:32 | 1,335 | 56 | XCode equivalent of ' __asm int 3 / DebugBreak() / Halt ? | What's the instruction to cause a hard-break in XCode? For example under Visual Studio I could do '_asm int 3' or 'DebugBreak()'. Under some GCC implementations it's asm("break 0") or asm("trap").
I've tried various combos under XCode without any luck. (inline assembler works fine so it's not a syntax issue).
For reference this is for an assert macro. I don't want to use the definitions in assert.h both for portability, and because they appear to do an abort() in the version XCode provides.
| xcode | osx | null | null | null | null | open | XCode equivalent of ' __asm int 3 / DebugBreak() / Halt ?
===
What's the instruction to cause a hard-break in XCode? For example under Visual Studio I could do '_asm int 3' or 'DebugBreak()'. Under some GCC implementations it's asm("break 0") or asm("trap").
I've tried various combos under XCode without any luck. (inline assembler works fine so it's not a syntax issue).
For reference this is for an assert macro. I don't want to use the definitions in assert.h both for portability, and because they appear to do an abort() in the version XCode provides.
| 0 |
37,306 | 09/01/2008 00:32:32 | 3,191 | 08/27/2008 12:32:21 | 156 | 6 | Is there a good way to use an OS-dependent font in Windows Forms? | I'd like to use Segoe UI 9 pt on Vista, and Tahoma 8 pt on Windows XP/etc. (Actually, I'd settle for Segoe UI on both, but my users probably don't have it installed.) But, these being quite different, they really screw up the layout of my forms. So... is there a good way to deal with this?
An example: I have a `Label`, with some blank space in the middle, into which I place a `NumericUpDown` control. If I use Segoe UI, the `NumericUpDown` is about 5 pixels or so to the left of the blank space, compared to when I use Tahoma. This is a pain; I'm not sure what to do here.
So most specifically, my question would be: how can I place controls in the middle of a blank space in my `Label`s (or `CheckBox`es, etc.)? Most generally: is there a good way to handle varying fonts in Windows Forms? | winforms | .net | fonts | gui | layout | null | open | Is there a good way to use an OS-dependent font in Windows Forms?
===
I'd like to use Segoe UI 9 pt on Vista, and Tahoma 8 pt on Windows XP/etc. (Actually, I'd settle for Segoe UI on both, but my users probably don't have it installed.) But, these being quite different, they really screw up the layout of my forms. So... is there a good way to deal with this?
An example: I have a `Label`, with some blank space in the middle, into which I place a `NumericUpDown` control. If I use Segoe UI, the `NumericUpDown` is about 5 pixels or so to the left of the blank space, compared to when I use Tahoma. This is a pain; I'm not sure what to do here.
So most specifically, my question would be: how can I place controls in the middle of a blank space in my `Label`s (or `CheckBox`es, etc.)? Most generally: is there a good way to handle varying fonts in Windows Forms? | 0 |
37,310 | 09/01/2008 00:40:03 | 3,576 | 08/29/2008 06:56:00 | 53 | 1 | Checking the results of a Factory in a unit test | I have developed some classes with similar behavior, they all implement the same interface. I implemented a factory that creates the appropriate object and returns the interface. I am writing a unit test for the factory. All you get back is an interface to the object.
What is the best way to test that the factory has worked correctly?
I would like to know the answer in Java, but if there is a solution that crosses languages I would like to know it. | unit-testing | tdd | java | null | null | null | open | Checking the results of a Factory in a unit test
===
I have developed some classes with similar behavior, they all implement the same interface. I implemented a factory that creates the appropriate object and returns the interface. I am writing a unit test for the factory. All you get back is an interface to the object.
What is the best way to test that the factory has worked correctly?
I would like to know the answer in Java, but if there is a solution that crosses languages I would like to know it. | 0 |
37,317 | 09/01/2008 00:48:03 | 3,452 | 08/28/2008 16:16:17 | 91 | 4 | How do you return the focus to the last used control after clicking a button in a winform app? | I'm working on a windows forms application (C#) where a user is entering data in a form. At any point while editing the data in the form the user can click one of the buttons on the form to perform certain actions. By default the focus goes to the clicked button so the user has to click back on to the control they want to edit in order to continue modifying the data on the form. What I need to be able to do is return the focus to the last edited control after the button click event has been processed. Here's a sample screenshot that illustrates what I'm talking about:
![Sample App Screen Shot][1]
[1]: http://lh6.ggpht.com/joe.r.barone/SLs4KZMBqfI/AAAAAAAABNw/P6xtqhCo8Y4/s800/SampleApp1.jpg
The user can be entering data in textbox1, textbox2, textbox3, etc and click the button. I need the button to return the focus back to the control that most recently had the focus before the button was clicked.
I'm wondering if anyone has a better way of implementing this functionality than what I've come up with. Here's what I'm doing right now:
public partial class Form1 : Form
{
Control _lastEnteredControl;
private void textBox_Enter(object sender, EventArgs e)
{
_lastEnteredControl = (Control)sender;
}
private void button1_Click(object sender, EventArgs e)
{
MessageBox.Show("Do something here");
_lastEnteredControl.Focus();
}
}
So basically what we have here is a class variable that points to the last entered control. Each textbox on the form is setup so the textBox_Enter method is fired when the control receives the focus. Then, when the button is clicked focus is returned to the control that had the focus before the button was clicked. Anybody have any more elegant solutions for this? | c# | winforms | null | null | null | null | open | How do you return the focus to the last used control after clicking a button in a winform app?
===
I'm working on a windows forms application (C#) where a user is entering data in a form. At any point while editing the data in the form the user can click one of the buttons on the form to perform certain actions. By default the focus goes to the clicked button so the user has to click back on to the control they want to edit in order to continue modifying the data on the form. What I need to be able to do is return the focus to the last edited control after the button click event has been processed. Here's a sample screenshot that illustrates what I'm talking about:
![Sample App Screen Shot][1]
[1]: http://lh6.ggpht.com/joe.r.barone/SLs4KZMBqfI/AAAAAAAABNw/P6xtqhCo8Y4/s800/SampleApp1.jpg
The user can be entering data in textbox1, textbox2, textbox3, etc and click the button. I need the button to return the focus back to the control that most recently had the focus before the button was clicked.
I'm wondering if anyone has a better way of implementing this functionality than what I've come up with. Here's what I'm doing right now:
public partial class Form1 : Form
{
Control _lastEnteredControl;
private void textBox_Enter(object sender, EventArgs e)
{
_lastEnteredControl = (Control)sender;
}
private void button1_Click(object sender, EventArgs e)
{
MessageBox.Show("Do something here");
_lastEnteredControl.Focus();
}
}
So basically what we have here is a class variable that points to the last entered control. Each textbox on the form is setup so the textBox_Enter method is fired when the control receives the focus. Then, when the button is clicked focus is returned to the control that had the focus before the button was clicked. Anybody have any more elegant solutions for this? | 0 |
37,324 | 09/01/2008 01:00:24 | 2,975 | 08/26/2008 09:40:04 | 208 | 19 | What is the syntax for an inner join in linq to sql? | I'm writing a linq to sql statement & I'm just after the standard syntax for a normal inner join with an 'on' clause in C#.
ie how do you represent this in LINQ to SQL?:
SELECT * FROM table1
inner join table2 on table1.field table2.field | linq-to-sql | c# | .net | null | null | null | open | What is the syntax for an inner join in linq to sql?
===
I'm writing a linq to sql statement & I'm just after the standard syntax for a normal inner join with an 'on' clause in C#.
ie how do you represent this in LINQ to SQL?:
SELECT * FROM table1
inner join table2 on table1.field table2.field | 0 |
37,335 | 09/01/2008 01:10:03 | 3,827 | 08/31/2008 04:42:17 | 1 | 5 | How to deal with "java.lang.OutOfMemoryError: Java heap space" error (64MB heap size) | I am writing a client-side Swing application (graphical font designer) on Java 5. Recently, I am running into "java.lang.OutOfMemoryError: Java heap space" error because I am not being conservative on memory usage. The user can open unlimited number of files, and the program keeps the opened objects in the memory. After a quick research I found [Ergonomics in the 5.0 Java Virtual Machine][1] and others saying on Windows machine the JVM defaults max heap size as 64MB.
Given this situation, how should I deal with this constraint?
I could increase the max heap size using command line option to java, but that would require figuring out available RAM and writing some launching program or script. Besides, increasing to some finite max does not ultimately get rid of the issue.
I could rewrite some of my code to persist objects to file system frequently (using database is the same thing) to free up the memory. It could work, but it's probably a lot work too.
If you could point me to details of above ideas or some alternatives like automatic virtual memory, extending heap size dynamically, that will be great.
[1]: http://java.sun.com/docs/hotspot/gc5.0/ergo5.html | java | jvm | heap | tuning | outofmemoryerror | null | open | How to deal with "java.lang.OutOfMemoryError: Java heap space" error (64MB heap size)
===
I am writing a client-side Swing application (graphical font designer) on Java 5. Recently, I am running into "java.lang.OutOfMemoryError: Java heap space" error because I am not being conservative on memory usage. The user can open unlimited number of files, and the program keeps the opened objects in the memory. After a quick research I found [Ergonomics in the 5.0 Java Virtual Machine][1] and others saying on Windows machine the JVM defaults max heap size as 64MB.
Given this situation, how should I deal with this constraint?
I could increase the max heap size using command line option to java, but that would require figuring out available RAM and writing some launching program or script. Besides, increasing to some finite max does not ultimately get rid of the issue.
I could rewrite some of my code to persist objects to file system frequently (using database is the same thing) to free up the memory. It could work, but it's probably a lot work too.
If you could point me to details of above ideas or some alternatives like automatic virtual memory, extending heap size dynamically, that will be great.
[1]: http://java.sun.com/docs/hotspot/gc5.0/ergo5.html | 0 |
37,337 | 09/01/2008 01:12:31 | 3,836 | 08/31/2008 08:07:03 | 141 | 3 | Beyond GoF design patterns | Do you frequently use design patterns outside the [Gang of Four design patterns book][1]? If so, where did you pick them up from?
[1]: http://www.amazon.com/Design-Patterns-Object-Oriented-Addison-Wesley-Professional/dp/0201633612 | design-patterns | null | null | null | null | null | open | Beyond GoF design patterns
===
Do you frequently use design patterns outside the [Gang of Four design patterns book][1]? If so, where did you pick them up from?
[1]: http://www.amazon.com/Design-Patterns-Object-Oriented-Addison-Wesley-Professional/dp/0201633612 | 0 |
37,343 | 09/01/2008 01:23:51 | 255 | 08/04/2008 05:46:02 | 414 | 9 | Wordpress MediaWiki Cookie Integration | I have my Wordpress install and MediaWiki [sharing the same login information][1]. Unfortunately users need to log into both separately, but at least they use the same credentials.
What I would like to do is cause a successful log in on the Wordpress blog to also cause a log in for MediaWiki (ideally both directions). There are two ways this could happen:
1. Logging in causes a log in on the other application (writes the cookie and creates the session in the DB)
2. Accessing an application checks for the cookie of the other and then automatically logs in.
Since the user names are shared it seems like the latter should be pretty easy to do. Any tips would be great.
[1]: http://stackoverflow.com/questions/33745 "Thanks ceejayoz" | php | wordpress | lamp | mediawiki | null | null | open | Wordpress MediaWiki Cookie Integration
===
I have my Wordpress install and MediaWiki [sharing the same login information][1]. Unfortunately users need to log into both separately, but at least they use the same credentials.
What I would like to do is cause a successful log in on the Wordpress blog to also cause a log in for MediaWiki (ideally both directions). There are two ways this could happen:
1. Logging in causes a log in on the other application (writes the cookie and creates the session in the DB)
2. Accessing an application checks for the cookie of the other and then automatically logs in.
Since the user names are shared it seems like the latter should be pretty easy to do. Any tips would be great.
[1]: http://stackoverflow.com/questions/33745 "Thanks ceejayoz" | 0 |
37,346 | 09/01/2008 01:27:25 | 61 | 08/01/2008 14:21:00 | 1,004 | 79 | Why can't a forward declaration be used for a std::vector? | If I create a class like so:
// B.h
#ifndef _B_H_
#define _B_H_
class B
{
private:
int x;
int y;
};
#endif // _B_H_
and use it like this:
// main.cpp
#include <iostream>
#include <vector>
class B; // Forward declaration.
class A
{
public:
A() {
std::cout << v.size() << std::endl;
}
private:
std::vector<B> v;
};
int main()
{
A a;
}
The compiler fails when compiling `main.cpp`. Now the solution I know is to `#include "B.h"`, but I'm curious as to why it fails. Neither `g++` or `cl`'s error messages were very enlightening in this matter. | c++ | null | null | null | null | null | open | Why can't a forward declaration be used for a std::vector?
===
If I create a class like so:
// B.h
#ifndef _B_H_
#define _B_H_
class B
{
private:
int x;
int y;
};
#endif // _B_H_
and use it like this:
// main.cpp
#include <iostream>
#include <vector>
class B; // Forward declaration.
class A
{
public:
A() {
std::cout << v.size() << std::endl;
}
private:
std::vector<B> v;
};
int main()
{
A a;
}
The compiler fails when compiling `main.cpp`. Now the solution I know is to `#include "B.h"`, but I'm curious as to why it fails. Neither `g++` or `cl`'s error messages were very enlightening in this matter. | 0 |
37,374 | 09/01/2008 02:13:07 | 2,975 | 08/26/2008 09:40:04 | 265 | 20 | How do you implement caching in Linq to SQL? | This may well end up being a [subjective][1] question, but anyway:
We've just started using LINQ to SQL at work for our DAL & we haven't really come up with a standard for out caching model. Previously we had being using a base 'DAL' class that implemented a cache manager property that all our DAL classes inherited from, but now we don't have that. I'm wondering if anyone has come up with a 'standard' approach to caching LINQ to SQL results?
We're working in a web environment (IIS) if that makes a difference.
[1]: http://stackoverflow.com/questions/tagged/subjective | .net | sql | linq-to-sql | iis | null | null | open | How do you implement caching in Linq to SQL?
===
This may well end up being a [subjective][1] question, but anyway:
We've just started using LINQ to SQL at work for our DAL & we haven't really come up with a standard for out caching model. Previously we had being using a base 'DAL' class that implemented a cache manager property that all our DAL classes inherited from, but now we don't have that. I'm wondering if anyone has come up with a 'standard' approach to caching LINQ to SQL results?
We're working in a web environment (IIS) if that makes a difference.
[1]: http://stackoverflow.com/questions/tagged/subjective | 0 |
37,375 | 09/01/2008 02:13:52 | 781 | 08/08/2008 21:28:19 | 140 | 10 | How do I unit test a WCF service? | We have a whole bunch of DLLs that give us access to our database and other applications and services.
We've wrapped these DLLs with a thin WCF service layer which our clients then consume.
I'm a little unsure on how to write unit tests that only test the WCF service layer. Should I just write unit tests for the DLLs, and integration tests for the WCF services? I'd appreciate any wisdom... I know that if my unit tests actually go to the database they won't actually be true unit tests, but I'm unsure on how to mock stuff in this scenario.
Thanks in advance! | wcf | unit-testing | null | null | null | null | open | How do I unit test a WCF service?
===
We have a whole bunch of DLLs that give us access to our database and other applications and services.
We've wrapped these DLLs with a thin WCF service layer which our clients then consume.
I'm a little unsure on how to write unit tests that only test the WCF service layer. Should I just write unit tests for the DLLs, and integration tests for the WCF services? I'd appreciate any wisdom... I know that if my unit tests actually go to the database they won't actually be true unit tests, but I'm unsure on how to mock stuff in this scenario.
Thanks in advance! | 0 |
37,378 | 09/01/2008 02:16:17 | 2,701 | 08/24/2008 15:51:24 | 138 | 15 | How to convince my co-workers not to use datasets for enterprise development (.NET 2.0+) | Everyone I work with is obsessed with the data-centric approach to enterprise development and hates the idea of using custom collections/objects. What is the best way to convince them otherwise? | oop | ddd | enterprise-development | null | null | null | open | How to convince my co-workers not to use datasets for enterprise development (.NET 2.0+)
===
Everyone I work with is obsessed with the data-centric approach to enterprise development and hates the idea of using custom collections/objects. What is the best way to convince them otherwise? | 0 |
37,381 | 09/01/2008 02:22:26 | 3,948 | 09/01/2008 01:47:47 | 1 | 1 | What's a good way to write a Cocoa front-end to an Erlang application? | I'm exploring the possibility of writing an application in Erlang, but it would need to have a portion written in Cocoa (presumably Objective-C). I'd like the front-end and back-end to be able to communicate easily. How can this best be done?
I can think of using C ports and connected processes, but I think I'd like a reverse situation (the front-end starting and connecting to the back-end). There are named pipes (FIFOs), or I could use network communications over a TCP port or a named BSD socket. Does anyone have experience in this area? | osx | objectivec | cocoa | erlang | null | null | open | What's a good way to write a Cocoa front-end to an Erlang application?
===
I'm exploring the possibility of writing an application in Erlang, but it would need to have a portion written in Cocoa (presumably Objective-C). I'd like the front-end and back-end to be able to communicate easily. How can this best be done?
I can think of using C ports and connected processes, but I think I'd like a reverse situation (the front-end starting and connecting to the back-end). There are named pipes (FIFOs), or I could use network communications over a TCP port or a named BSD socket. Does anyone have experience in this area? | 0 |
37,388 | 09/01/2008 02:32:47 | 2,566 | 08/22/2008 22:30:40 | 58 | 7 | Having MSDN on a usb key | Is there a way to have msdn documentation on a usb key ?
either web or the MSDN Library program.
i've been setting up my usbkey with portableapps stuff. | msdn | portability | null | null | null | null | open | Having MSDN on a usb key
===
Is there a way to have msdn documentation on a usb key ?
either web or the MSDN Library program.
i've been setting up my usbkey with portableapps stuff. | 0 |
37,391 | 09/01/2008 02:37:53 | 1,384 | 08/14/2008 23:34:44 | 99 | 10 | Arithmetic with Arbitrarily Large Integers in PHP | Ok, so PHP isn't the best language to be dealing with arbitrarily large integers in, considering that it only natively supports 32-bit signed integers. What I'm trying to do though is create a class that could represent an arbitrarily large binary number and be able to perform simple arithmetic operations on two of them (add/subtract/multiply/divide).
My target is dealing with 128-bit integers.
There's a couple of approaches I'm looking at, and problems I see with them. Any input or commentary on what you would choose and how you might go about it would be greatly appreciated.
**Approach #1:** Create a 128-bit integer class that stores its integer internally as four 32-bit integers. The only problem with this approach is that I'm not sure how to go about handling overflow/underflow issues when manipulating individual chunks of the two operands.
**Approach #2:** Use the bcmath extension, as this looks like something it was designed to tackle. My only worry in taking this approach is the scale setting of the bcmath extension, because there can't be any rounding errors in my 128-bit integers; they must be precise. I'm also worried about being able to eventually convert the result of the bcmath functions into a binary string (which I'll later need to shove into some mcrypt encryption functions).
**Approach #3:** Store the numbers as binary strings (probably LSB first). Theoretically I should be able to store integers of any arbitrary size this way. All I would have to do is write the four basic arithmetic functions to perform add/sub/mult/div on two binary strings and produce a binary string result. This is exactly the format I need to hand over to mcrypt as well, so that's an added plus. This is the approach I think has the most promise at the moment, but the one sticking point I've got is that PHP doesn't offer me any way to manipulate the individual bits (that I know of). I believe I'd have to break it up into byte-sized chunks (no pun intended), at which point my questions about handling overflow/underflow from Approach #1 apply. | php | integer | null | null | null | null | open | Arithmetic with Arbitrarily Large Integers in PHP
===
Ok, so PHP isn't the best language to be dealing with arbitrarily large integers in, considering that it only natively supports 32-bit signed integers. What I'm trying to do though is create a class that could represent an arbitrarily large binary number and be able to perform simple arithmetic operations on two of them (add/subtract/multiply/divide).
My target is dealing with 128-bit integers.
There's a couple of approaches I'm looking at, and problems I see with them. Any input or commentary on what you would choose and how you might go about it would be greatly appreciated.
**Approach #1:** Create a 128-bit integer class that stores its integer internally as four 32-bit integers. The only problem with this approach is that I'm not sure how to go about handling overflow/underflow issues when manipulating individual chunks of the two operands.
**Approach #2:** Use the bcmath extension, as this looks like something it was designed to tackle. My only worry in taking this approach is the scale setting of the bcmath extension, because there can't be any rounding errors in my 128-bit integers; they must be precise. I'm also worried about being able to eventually convert the result of the bcmath functions into a binary string (which I'll later need to shove into some mcrypt encryption functions).
**Approach #3:** Store the numbers as binary strings (probably LSB first). Theoretically I should be able to store integers of any arbitrary size this way. All I would have to do is write the four basic arithmetic functions to perform add/sub/mult/div on two binary strings and produce a binary string result. This is exactly the format I need to hand over to mcrypt as well, so that's an added plus. This is the approach I think has the most promise at the moment, but the one sticking point I've got is that PHP doesn't offer me any way to manipulate the individual bits (that I know of). I believe I'd have to break it up into byte-sized chunks (no pun intended), at which point my questions about handling overflow/underflow from Approach #1 apply. | 0 |
37,396 | 09/01/2008 02:44:04 | 2,274 | 08/21/2008 12:44:42 | 113 | 10 | Linux Lightweight Distro and X Windows for Development | I want to build a lightweight linux configuration to use for development. The first idea is to use it inside a Virtual Machine under Windows, or old Laptops with 1Gb RAM top. Maybe even a distributable environment for developers.
So the whole idea is to use a LAMP server, Java Application Server (Tomcat or Jetty) and X Windows (any Window manager, from FVWM to Enlightment), Eclipse, maybe jEdit and of course Firefox.
What Distro you guys recommend ? And About window manger or applications and services installed ?
| linux | desktop | lightweight | null | null | null | open | Linux Lightweight Distro and X Windows for Development
===
I want to build a lightweight linux configuration to use for development. The first idea is to use it inside a Virtual Machine under Windows, or old Laptops with 1Gb RAM top. Maybe even a distributable environment for developers.
So the whole idea is to use a LAMP server, Java Application Server (Tomcat or Jetty) and X Windows (any Window manager, from FVWM to Enlightment), Eclipse, maybe jEdit and of course Firefox.
What Distro you guys recommend ? And About window manger or applications and services installed ?
| 0 |
37,398 | 09/01/2008 02:49:02 | 3,955 | 09/01/2008 02:49:02 | 1 | 0 | How do I make a fully statically linked .exe with Visual Studio Express 2005 ? | My current preferred C++ environment is the free and largely excellent Microsoft Visual Studio 2005 Express edition. From time to time I have sent release .exe files to other people with pleasing results. However recently I made the disturbing discovery that the pleasing results were based on more luck that I would like. Attempting to run one of these programs on an old (2001 vintage, not scrupulously updated) XP box gave me nothing but a nasty "System cannot run x.exe" (or similar) message.
Some googling revealed that with this toolset, even specifying static linking results in a simple hello-world.exe actually relying on extra .dll files (msvcm80.dll etc.). An incredibly elaborate version scheming system (mainfest files anyone?) then will not let the .exe run without exactly the right .dll versions. I don't want or need this stuff, I just want an old fashioned self contained .exe that does nothing but lowest common denominator Win32 operations and runs on any old win32 OS.
Does anyone know if its possible to do what I want to do with my existing toolset ?
Thank you.
| c++ | visual-studio | linker | null | null | null | open | How do I make a fully statically linked .exe with Visual Studio Express 2005 ?
===
My current preferred C++ environment is the free and largely excellent Microsoft Visual Studio 2005 Express edition. From time to time I have sent release .exe files to other people with pleasing results. However recently I made the disturbing discovery that the pleasing results were based on more luck that I would like. Attempting to run one of these programs on an old (2001 vintage, not scrupulously updated) XP box gave me nothing but a nasty "System cannot run x.exe" (or similar) message.
Some googling revealed that with this toolset, even specifying static linking results in a simple hello-world.exe actually relying on extra .dll files (msvcm80.dll etc.). An incredibly elaborate version scheming system (mainfest files anyone?) then will not let the .exe run without exactly the right .dll versions. I don't want or need this stuff, I just want an old fashioned self contained .exe that does nothing but lowest common denominator Win32 operations and runs on any old win32 OS.
Does anyone know if its possible to do what I want to do with my existing toolset ?
Thank you.
| 0 |
37,425 | 09/01/2008 03:39:42 | 1,747 | 08/18/2008 12:12:28 | 101 | 11 | What is the best way to interpret Perfmon analysis into application specific observations/data? | Many of us have used Perfmon tool to do performance analysis. Especially with .Net counters, but there are so many variables going on in Perfmon, that it always becomes hard to interpret Perfmon results in to valuable feedback about my application. I want to use perfmon, (not a tool like [Ants Profiler][1] etc) but how do I accurately interpret the observations?
Any inputs are welcome.
[1]: http://www.red-gate.com/products/ants_profiler/index.htm | .net | performance | perfmon | null | null | null | open | What is the best way to interpret Perfmon analysis into application specific observations/data?
===
Many of us have used Perfmon tool to do performance analysis. Especially with .Net counters, but there are so many variables going on in Perfmon, that it always becomes hard to interpret Perfmon results in to valuable feedback about my application. I want to use perfmon, (not a tool like [Ants Profiler][1] etc) but how do I accurately interpret the observations?
Any inputs are welcome.
[1]: http://www.red-gate.com/products/ants_profiler/index.htm | 0 |
37,428 | 09/01/2008 03:47:54 | 3,965 | 09/01/2008 03:39:38 | 1 | 0 | Get back to basics. How do I get back into C++? | I haven't used C++ since college. Even though I've wanted to I haven't needed to do any until I started wanting to write plugins for Launchy. Is there a good book to read to get back into it? My experience since college is mainly C# and recently ruby. I bought some book for C# developers and it ended up being on how to write C++ with CLI. While a good book it wasn't quite what I was looking for. | c++ | null | null | null | null | null | open | Get back to basics. How do I get back into C++?
===
I haven't used C++ since college. Even though I've wanted to I haven't needed to do any until I started wanting to write plugins for Launchy. Is there a good book to read to get back into it? My experience since college is mainly C# and recently ruby. I bought some book for C# developers and it ended up being on how to write C++ with CLI. While a good book it wasn't quite what I was looking for. | 0 |
37,441 | 09/01/2008 04:11:42 | 2,147 | 08/20/2008 15:14:13 | 573 | 54 | Reasons for SQL differences | First of all, I should point out that I'm not asking this question for any practical reason. I'm just asking out of sheer curiosity.
Why is it that SQL distributions are so non-standard? I know there's an ANSI standard for SQL, but it just seems that developers of SQL databases go out of their way to find different ways to do things. First of all I should ask: am I getting the point? Are there really that many meaningful differences in the way SQL databases work or is it just the two databases I've been working with (MS-SQL and Postgresql)?
Next, why are there so many differences? I should say that I'm a beginner of this, so I haven't gotten to any of the bigger issues that I may be missing. | sql | sql-server | postgresql | null | null | null | open | Reasons for SQL differences
===
First of all, I should point out that I'm not asking this question for any practical reason. I'm just asking out of sheer curiosity.
Why is it that SQL distributions are so non-standard? I know there's an ANSI standard for SQL, but it just seems that developers of SQL databases go out of their way to find different ways to do things. First of all I should ask: am I getting the point? Are there really that many meaningful differences in the way SQL databases work or is it just the two databases I've been working with (MS-SQL and Postgresql)?
Next, why are there so many differences? I should say that I'm a beginner of this, so I haven't gotten to any of the bigger issues that I may be missing. | 0 |
37,449 | 09/01/2008 04:18:59 | 797 | 08/09/2008 02:14:04 | 743 | 34 | Equivalent to StAX for C | I've used the StAX API in Java quite a bit, and find it quite a clean way of dealing with XML files. Is there any equivalent library I could use for performing similar processing in C? | java | c | xml | null | null | null | open | Equivalent to StAX for C
===
I've used the StAX API in Java quite a bit, and find it quite a clean way of dealing with XML files. Is there any equivalent library I could use for performing similar processing in C? | 0 |
37,464 | 09/01/2008 04:55:58 | 752 | 08/08/2008 14:49:24 | 23 | 3 | iPhone App Minus App Store? | I've been looking into iPhone development, but I've been having problems coming up with the answer to a certain question.
If I create an application on my Mac, is there any way I can get it to run on an iPhone without going through the app store?
It doesn't matter if the iPhone has to be jailbroken, as long as I can still run an application created using the official SDK. For reasons I won't get into, I can't have this program going through the app store.
Thanks for any help you can give! | iphone | null | null | null | null | null | open | iPhone App Minus App Store?
===
I've been looking into iPhone development, but I've been having problems coming up with the answer to a certain question.
If I create an application on my Mac, is there any way I can get it to run on an iPhone without going through the app store?
It doesn't matter if the iPhone has to be jailbroken, as long as I can still run an application created using the official SDK. For reasons I won't get into, I can't have this program going through the app store.
Thanks for any help you can give! | 0 |
37,468 | 09/01/2008 05:05:54 | 3,747 | 08/30/2008 14:33:59 | 62 | 12 | How to Determine the Installed ASP.NET Version of Host from a Web Page | I have a site running in a Windows shared hosting environment. In their control panel for the shared hosting account I have it set to use ASP.NET version 3.0 but it doesn't say 3.5 SP1 specifically.
How can I view the installed version running on the server where my website is hosted in an asp.net page? | asp.net | null | null | null | null | null | open | How to Determine the Installed ASP.NET Version of Host from a Web Page
===
I have a site running in a Windows shared hosting environment. In their control panel for the shared hosting account I have it set to use ASP.NET version 3.0 but it doesn't say 3.5 SP1 specifically.
How can I view the installed version running on the server where my website is hosted in an asp.net page? | 0 |
37,471 | 09/01/2008 05:10:08 | 1,343 | 08/14/2008 15:46:01 | 160 | 28 | Is this minimum spanning tree algorithm correct? | The minimum spanning tree problem is to take a connected weighted graph and find the sub set of it's edges with the lowest total weight that keeps the connected restriction but results in an acyclic graph.
The algorithm I am considering is:
- Find all cycles.
- remove the largest edge from each cycle.
The impetus for this version is an environment that is restricted to "rule satisfaction" without any iterative constructs. It might also be applicable to insanely parallel hardware. | algorithm | correctness | null | null | null | null | open | Is this minimum spanning tree algorithm correct?
===
The minimum spanning tree problem is to take a connected weighted graph and find the sub set of it's edges with the lowest total weight that keeps the connected restriction but results in an acyclic graph.
The algorithm I am considering is:
- Find all cycles.
- remove the largest edge from each cycle.
The impetus for this version is an environment that is restricted to "rule satisfaction" without any iterative constructs. It might also be applicable to insanely parallel hardware. | 0 |
37,473 | 09/01/2008 05:15:05 | 456 | 08/05/2008 21:47:05 | 402 | 21 | How can I `assert()` without `abort()`ing? | If I use `assert()` and the assertion fails then `assert()` will call `abort()`, ending the running program abruptly. I can't afford that in my production code. Is there a way to assert in runtime yet be able to catch failed assertions so I have the chance to handle them gracefully? | c++ | null | null | null | null | null | open | How can I `assert()` without `abort()`ing?
===
If I use `assert()` and the assertion fails then `assert()` will call `abort()`, ending the running program abruptly. I can't afford that in my production code. Is there a way to assert in runtime yet be able to catch failed assertions so I have the chance to handle them gracefully? | 0 |
37,479 | 09/01/2008 05:17:35 | 1,057 | 08/11/2008 22:41:35 | 41 | 5 | Can I simply decorate an existing instance? | below I have a very simple example of what I'm trying to do. I want to be able to use HTMLDecorator with any other class.
import cgi
class ClassX(object):
pass # ... with own __repr__
class ClassY(object):
pass # ... with own __repr__
inst_x=ClassX()
inst_y=ClassY()
inst_z=[ i*i for i in range(25) ]
inst_b=True
class HTMLDecorator(object):
def html(self): # an "enhanced" version of __repr__
return cgi.escape(self.__repr__()).join(("<H1>","</H1>"))
print HTMLDecorator(inst_x).html()
print HTMLDecorator(inst_y).html()
wrapped_z = HTMLDecorator(inst_z)
inst_z[0] += 70
wrapped_z[0] += 71
print wrapped_z.html()
print HTMLDecorator(inst_b).html()
Output:
<pre>Traceback (most recent call last):
File "html.py", line 21, in <module>
print HTMLDecorator(inst_x).html()
TypeError: default __new__ takes no parameters</pre>
Is what I'm trying to do possible? If so, what am I doing wrong? | python | oop | null | null | null | null | open | Can I simply decorate an existing instance?
===
below I have a very simple example of what I'm trying to do. I want to be able to use HTMLDecorator with any other class.
import cgi
class ClassX(object):
pass # ... with own __repr__
class ClassY(object):
pass # ... with own __repr__
inst_x=ClassX()
inst_y=ClassY()
inst_z=[ i*i for i in range(25) ]
inst_b=True
class HTMLDecorator(object):
def html(self): # an "enhanced" version of __repr__
return cgi.escape(self.__repr__()).join(("<H1>","</H1>"))
print HTMLDecorator(inst_x).html()
print HTMLDecorator(inst_y).html()
wrapped_z = HTMLDecorator(inst_z)
inst_z[0] += 70
wrapped_z[0] += 71
print wrapped_z.html()
print HTMLDecorator(inst_b).html()
Output:
<pre>Traceback (most recent call last):
File "html.py", line 21, in <module>
print HTMLDecorator(inst_x).html()
TypeError: default __new__ takes no parameters</pre>
Is what I'm trying to do possible? If so, what am I doing wrong? | 0 |
37,483 | 09/01/2008 05:20:41 | 2,601 | 08/23/2008 13:45:18 | 1 | 2 | Calculate Video Duration | I suck at math. I need to figure out how to calculate a video duration with only a few examples of values. For example, a value of 70966 is displayed as 1:10 minutes. A value of 30533 displays as 30 seconds. A value of 7007 displays as 7 seconds. | math | video | calculate | duration | null | 05/03/2012 19:56:34 | off topic | Calculate Video Duration
===
I suck at math. I need to figure out how to calculate a video duration with only a few examples of values. For example, a value of 70966 is displayed as 1:10 minutes. A value of 30533 displays as 30 seconds. A value of 7007 displays as 7 seconds. | 2 |
37,486 | 09/01/2008 05:25:01 | 3,971 | 09/01/2008 05:21:51 | 1 | 0 | Filter out HTML tags and resolve entities in python | Because regular expressions scare me, I'm trying to find a way to remove all HTML tags and resolve HTML entities from a string in Python. | python | html | null | null | null | null | open | Filter out HTML tags and resolve entities in python
===
Because regular expressions scare me, I'm trying to find a way to remove all HTML tags and resolve HTML entities from a string in Python. | 0 |
37,495 | 09/01/2008 05:34:39 | 242 | 08/03/2008 22:55:19 | 382 | 24 | Silverlight enabled browser tracking | I'm trying to get some stats on how many of the visitors to our website have Silverlight enabled browsers.
We currently use Google Analytics for the rest of our stats so ideally we'd like to just add 'Silverlight enabled' tracking in with the rest of our Google Analytics stats. But if it has to get written out to a DB etc then so be it.
Nikhil has [some javascript](http://www.nikhilk.net/Silverlight-Analytics.aspx) to add Google Analytics tracking of how many users **install** Silverlight, but not how many **already have it installed**, which is what I'm after.
Anyone know how to do this?
Thanks in advance for any help/ideas.
| silverlight | tracking | google-analytics | null | null | null | open | Silverlight enabled browser tracking
===
I'm trying to get some stats on how many of the visitors to our website have Silverlight enabled browsers.
We currently use Google Analytics for the rest of our stats so ideally we'd like to just add 'Silverlight enabled' tracking in with the rest of our Google Analytics stats. But if it has to get written out to a DB etc then so be it.
Nikhil has [some javascript](http://www.nikhilk.net/Silverlight-Analytics.aspx) to add Google Analytics tracking of how many users **install** Silverlight, but not how many **already have it installed**, which is what I'm after.
Anyone know how to do this?
Thanks in advance for any help/ideas.
| 0 |
37,501 | 09/01/2008 05:46:49 | 3,747 | 08/30/2008 14:33:59 | 64 | 13 | List of ASP.NET Versions? | Thanks to a Q&A on stackoverflow I just found out how to determine the installed version on my hosting provider's server. Now I need to know what that number means.
Using <%=Environment.Version%> on my local machine returns 2.0.50727.3053. Which I've found to mean v3.5 SP1.
Can someone give me a list of the version 1, 1.1, 2, ect.. to the actual Environment.Version codes or break down what that code means? | asp.net | null | null | null | null | null | open | List of ASP.NET Versions?
===
Thanks to a Q&A on stackoverflow I just found out how to determine the installed version on my hosting provider's server. Now I need to know what that number means.
Using <%=Environment.Version%> on my local machine returns 2.0.50727.3053. Which I've found to mean v3.5 SP1.
Can someone give me a list of the version 1, 1.1, 2, ect.. to the actual Environment.Version codes or break down what that code means? | 0 |
37,503 | 09/01/2008 05:49:14 | 1,196 | 08/13/2008 12:33:04 | 823 | 46 | Is it possible to convert projects wizard created for MSVS 2005 to MSVS 2008 format autom | I have a bunch of wizards created for MSVS 2005. Is it possible to convert them to MSVS 2008 format automatically? | visual-studio | templates | null | null | null | null | open | Is it possible to convert projects wizard created for MSVS 2005 to MSVS 2008 format autom
===
I have a bunch of wizards created for MSVS 2005. Is it possible to convert them to MSVS 2008 format automatically? | 0 |
37,516 | 09/01/2008 06:13:41 | 45,603 | 08/25/2008 09:52:34 | 64 | 5 | Recursion in Live VC++ Code | Would you use recursion in live VC++ code?
| vc++ | recursion | null | null | null | null | open | Recursion in Live VC++ Code
===
Would you use recursion in live VC++ code?
| 0 |
37,517 | 09/01/2008 06:15:01 | 3,973 | 09/01/2008 06:04:30 | 1 | 1 | Incomplete information card game | I would like to develop a [trick taking](http://en.wikipedia.org/wiki/Trick-taking_game) card game. The game is between four players, one of which is a human and the other three hands are played by the computer.
Where can I read up about developing the AI for such games? | ai | card-game | null | null | null | null | open | Incomplete information card game
===
I would like to develop a [trick taking](http://en.wikipedia.org/wiki/Trick-taking_game) card game. The game is between four players, one of which is a human and the other three hands are played by the computer.
Where can I read up about developing the AI for such games? | 0 |
37,519 | 09/01/2008 06:15:44 | 3,742 | 08/30/2008 14:08:11 | 1 | 2 | Add XML Comments to class properties generated by the LINQ to SQL designer | I used the LINQ to SQL designer in Visual Studio to create an object model of a database. Now, I want to add XML comments to each generated property but I can't figure out how to do it without erasing the properties the next time the dbml file is refreshed.
How can this be done? | xml | linq | null | null | null | null | open | Add XML Comments to class properties generated by the LINQ to SQL designer
===
I used the LINQ to SQL designer in Visual Studio to create an object model of a database. Now, I want to add XML comments to each generated property but I can't figure out how to do it without erasing the properties the next time the dbml file is refreshed.
How can this be done? | 0 |
37,525 | 09/01/2008 06:25:36 | 797 | 08/09/2008 02:14:04 | 743 | 34 | What steps can I give a windows user to make a given file writeable | Imagine we have a program trying to write to a particular file, but failing.
On the Windows platform, what are the possible things which might be causing the file to be un-writable, and what steps could be suggested to an end user/administrator to fix it. | windows | filesystems | null | null | null | null | open | What steps can I give a windows user to make a given file writeable
===
Imagine we have a program trying to write to a particular file, but failing.
On the Windows platform, what are the possible things which might be causing the file to be un-writable, and what steps could be suggested to an end user/administrator to fix it. | 0 |
37,529 | 09/01/2008 06:31:32 | 3,462 | 08/28/2008 16:34:01 | 31 | 7 | Simple audio input API on a Mac? | I'd like to pull a stream of PCM samples from a Mac's line-in or built-in mic and do a little live analysis (the exact nature doesn't pertain to this question, but it could be an FFT every so often, or some basic statistics on the sample levels, or what have you).
What's a good fit for this? Writing an AudioUnit that just passes the sound through and incidentally hands it off somewhere for analysis? Writing a JACK-aware app and figuring out how to get it to play with the JACK server? Ecasound?
This is a cheesy proof-of-concept hobby project, so simplicity of API is the driving factor (followed by reasonable choice of programming language). | osx | audio | null | null | null | null | open | Simple audio input API on a Mac?
===
I'd like to pull a stream of PCM samples from a Mac's line-in or built-in mic and do a little live analysis (the exact nature doesn't pertain to this question, but it could be an FFT every so often, or some basic statistics on the sample levels, or what have you).
What's a good fit for this? Writing an AudioUnit that just passes the sound through and incidentally hands it off somewhere for analysis? Writing a JACK-aware app and figuring out how to get it to play with the JACK server? Ecasound?
This is a cheesy proof-of-concept hobby project, so simplicity of API is the driving factor (followed by reasonable choice of programming language). | 0 |
37,532 | 09/01/2008 06:36:54 | 2,375 | 08/21/2008 22:37:01 | 3 | 2 | Start Schedulrd Windows Task From SSIS | Does anyone know if you can and how to start off a scheduled Windows task on a Remote Server from within an SSIS package?
Cheers
Nigel | ssis | sql-server | windows | null | null | null | open | Start Schedulrd Windows Task From SSIS
===
Does anyone know if you can and how to start off a scheduled Windows task on a Remote Server from within an SSIS package?
Cheers
Nigel | 0 |
37,535 | 09/01/2008 06:45:40 | 3,715 | 08/30/2008 09:17:39 | 35 | 6 | What's the easiest way to read a FoxPro DBF file from Python? | I've got a bunch of FoxPro (VFP9) DBF files on my Ubuntu system, is there a library to open these in Python? I only need to read them, and would preferably have access to the memo fields too. | python | dbf | vfp | foxpro | null | null | open | What's the easiest way to read a FoxPro DBF file from Python?
===
I've got a bunch of FoxPro (VFP9) DBF files on my Ubuntu system, is there a library to open these in Python? I only need to read them, and would preferably have access to the memo fields too. | 0 |
37,538 | 09/01/2008 06:49:22 | 116 | 08/02/2008 05:51:57 | 4,807 | 211 | (C) How do I determine the size of my array? | i.e., the number of elements the array can hold? | c | memory | null | null | null | null | open | (C) How do I determine the size of my array?
===
i.e., the number of elements the array can hold? | 0 |
37,551 | 09/01/2008 07:01:34 | 3,904 | 08/31/2008 19:51:07 | 1 | 0 | Multiple threads stuck in native calls (Java) | I have a problem with an application running on Fedora Core 6 with JDK 1.5.0_08.
After some amount of uptime (usually some days) threads begin getting stuck in native methods.
The threads are locked in something like this:
"pool-2-thread-2571" prio=1 tid=0x08dd0b28 nid=0x319e waiting for monitor entry [0xb91fe000..0xb91ff7d4]
at java.lang.Class.getDeclaredConstructors0(Native Method)
or
"pool-2-thread-2547" prio=1 tid=0x75641620 nid=0x1745 waiting for monitor entry [0xbc7fe000..0xbc7ff554]
at sun.misc.Unsafe.defineClass(Native Method)
Especially puzzling to me is this one:
"HealthMonitor-10" daemon prio=1 tid=0x0868d1c0 nid=0x2b72 waiting for monitor entry [0xbe5ff000..0xbe5ff4d4]
at java.lang.Thread.dumpThreads(Native Method)
at java.lang.Thread.getStackTrace(Thread.java:1383)
The threads remain stuck until the VM is restarted.
Can anyone give me an idea as to what is happening here, what might be causing the native methods to block?
The monitor entry address range at the top of each stuck thread is different. How can I figure out what is holding this monitor?
Any suggestions or advice will be greatly appreciated!
Thanks,
David | java | multithreading | blocked | native-methods | null | null | open | Multiple threads stuck in native calls (Java)
===
I have a problem with an application running on Fedora Core 6 with JDK 1.5.0_08.
After some amount of uptime (usually some days) threads begin getting stuck in native methods.
The threads are locked in something like this:
"pool-2-thread-2571" prio=1 tid=0x08dd0b28 nid=0x319e waiting for monitor entry [0xb91fe000..0xb91ff7d4]
at java.lang.Class.getDeclaredConstructors0(Native Method)
or
"pool-2-thread-2547" prio=1 tid=0x75641620 nid=0x1745 waiting for monitor entry [0xbc7fe000..0xbc7ff554]
at sun.misc.Unsafe.defineClass(Native Method)
Especially puzzling to me is this one:
"HealthMonitor-10" daemon prio=1 tid=0x0868d1c0 nid=0x2b72 waiting for monitor entry [0xbe5ff000..0xbe5ff4d4]
at java.lang.Thread.dumpThreads(Native Method)
at java.lang.Thread.getStackTrace(Thread.java:1383)
The threads remain stuck until the VM is restarted.
Can anyone give me an idea as to what is happening here, what might be causing the native methods to block?
The monitor entry address range at the top of each stuck thread is different. How can I figure out what is holding this monitor?
Any suggestions or advice will be greatly appreciated!
Thanks,
David | 0 |
37,555 | 09/01/2008 07:04:07 | 1,003 | 08/11/2008 12:44:52 | 1 | 0 | Adding server-side event to extender control | I have an extender control that raises a textbox's OnTextChanged event 500ms after the user has finished typing. The problem with this is that OnTextChanged get raised when the textbox loses focus, which causes problems (because of the postback).
What I'd like to do is give the extender control its own server-side event (say, OnDelayedSubmit) so I can handle it separately. The event will originate in the extender control's behavior script (after the 500ms delay), so putting a __doPostBack in onchanged for instance, is not an option. | asp.net | .net-3.5 | null | null | null | null | open | Adding server-side event to extender control
===
I have an extender control that raises a textbox's OnTextChanged event 500ms after the user has finished typing. The problem with this is that OnTextChanged get raised when the textbox loses focus, which causes problems (because of the postback).
What I'd like to do is give the extender control its own server-side event (say, OnDelayedSubmit) so I can handle it separately. The event will originate in the extender control's behavior script (after the 500ms delay), so putting a __doPostBack in onchanged for instance, is not an option. | 0 |
37,564 | 09/01/2008 07:24:22 | 1,647 | 08/17/2008 18:32:33 | 1 | 1 | What exactly is Appdomain recycling | I am trying to figure out what exactly is Appdomain recycling?
When a aspx page is requested for the first time from a DotNet application, i understand that an appdomain for that app is created, and required assemblies are loaded into that appdomain, and the request will be served.
Now, if the web.config file or the contents of the bin folder, etc are modified, the appdomain will be "recycled".
My question is, at the end of the recycling process, will the appdomain be loaded with assemblies and ready to serve the next request? or a page has to be requested to trigger the assemblies to load?. | asp.net | null | null | null | null | null | open | What exactly is Appdomain recycling
===
I am trying to figure out what exactly is Appdomain recycling?
When a aspx page is requested for the first time from a DotNet application, i understand that an appdomain for that app is created, and required assemblies are loaded into that appdomain, and the request will be served.
Now, if the web.config file or the contents of the bin folder, etc are modified, the appdomain will be "recycled".
My question is, at the end of the recycling process, will the appdomain be loaded with assemblies and ready to serve the next request? or a page has to be requested to trigger the assemblies to load?. | 0 |
37,568 | 09/01/2008 07:30:48 | 925 | 08/10/2008 16:16:15 | 55 | 11 | find duplicate addresses in database, stop users entering them early? | How do I find duplicate addresses in a database, or better stop people already when filling in the form ? I guess the earlier the better?
Is there any good way of abstracting street, postal code etc so that typos and simple attempts to get 2 registrations can be detected? like:
Quellenstrasse 66/11
Quellenstr. 66a-11
I'm talking German addresses...
Thanks! | database | duplicate | address | sanitization | prevention | null | open | find duplicate addresses in database, stop users entering them early?
===
How do I find duplicate addresses in a database, or better stop people already when filling in the form ? I guess the earlier the better?
Is there any good way of abstracting street, postal code etc so that typos and simple attempts to get 2 registrations can be detected? like:
Quellenstrasse 66/11
Quellenstr. 66a-11
I'm talking German addresses...
Thanks! | 0 |
37,573 | 09/01/2008 07:41:10 | 1,721 | 08/18/2008 09:58:47 | 23 | 3 | Integrating InstantRails with Aptana or any other IDE | So I've been using InstantRails to check out Ruby on rails. I've been using Notepad++ for the editing. Now I don't want to install Ruby or Rails on my machine. Is there any walk through/tutorial on how to integrate Radrails or Netbeans with InstantRails? | ruby | ruby-on-rails | ide | aptana | radrails | null | open | Integrating InstantRails with Aptana or any other IDE
===
So I've been using InstantRails to check out Ruby on rails. I've been using Notepad++ for the editing. Now I don't want to install Ruby or Rails on my machine. Is there any walk through/tutorial on how to integrate Radrails or Netbeans with InstantRails? | 0 |
37,579 | 09/01/2008 07:46:43 | 3,985 | 09/01/2008 07:11:56 | 1 | 0 | Queue alternatives to MSMQ on Windows? | If you want to use a queuing product for durable messaging under Windows, running .NET 2.0 and above, which alternatives to MSMQ exist today? I know of ActiveMQ (http://activemq.apache.org/), and I've seen references to WSMQ (pointing to http://wsmq.net), but the site seems to be down.
Are there any other alternatives? | .net | soa | messaging | msmq | null | null | open | Queue alternatives to MSMQ on Windows?
===
If you want to use a queuing product for durable messaging under Windows, running .NET 2.0 and above, which alternatives to MSMQ exist today? I know of ActiveMQ (http://activemq.apache.org/), and I've seen references to WSMQ (pointing to http://wsmq.net), but the site seems to be down.
Are there any other alternatives? | 0 |
37,584 | 09/01/2008 07:52:00 | 377 | 08/05/2008 10:01:14 | 763 | 53 | InfoPath 2003 and the xs:any type | I am implementing exception handling for our BizTalk services, and have run into a fairly major stumbling block.
In order to make the exception processing as generic as possible, and therefore to allow us to use it for any BizTalk application, our XML error schema includes an xs:any node, into which we can place a variety of data, depending on the actual exception. The generated XML should then be presented to a user through an InfoPath 2003 form for manual intervention before being represented back to BizTalk.
The problem is that InfoPath 2003 doesn't like schemas with an xs:any node. What we'd really like to do is the show the content of the exception report in a form with all relevant parameters mapped , and the entire content of the xs:any node in a text box, since users who are able to see these messages will be conversant with XML. Unfortunately, I am unable to make InfoPath even load the schema at design time.
Does anyone have any recommendation for how to achieve what we need, please?
Thanks in advance | infopath | xml | form | null | null | null | open | InfoPath 2003 and the xs:any type
===
I am implementing exception handling for our BizTalk services, and have run into a fairly major stumbling block.
In order to make the exception processing as generic as possible, and therefore to allow us to use it for any BizTalk application, our XML error schema includes an xs:any node, into which we can place a variety of data, depending on the actual exception. The generated XML should then be presented to a user through an InfoPath 2003 form for manual intervention before being represented back to BizTalk.
The problem is that InfoPath 2003 doesn't like schemas with an xs:any node. What we'd really like to do is the show the content of the exception report in a form with all relevant parameters mapped , and the entire content of the xs:any node in a text box, since users who are able to see these messages will be conversant with XML. Unfortunately, I am unable to make InfoPath even load the schema at design time.
Does anyone have any recommendation for how to achieve what we need, please?
Thanks in advance | 0 |
37,586 | 09/01/2008 07:54:44 | 1,895 | 08/19/2008 07:17:07 | 48 | 9 | Consuming web services from Oracle PL/SQL | Our application is interfacing with a lot of web services these days. We have our own package that someone wrote a few years back using UTL_HTTP and it generally works, but needs some hard-coding of the SOAP envelope to work with certain systems. I would like to make it more generic, but lack experience to know how many scenarios I would have to deal with.
I know that 10g has UTL_DBWS, but there are not a huge number of use-cases on-line. Is it stable and flexible enough for general use? | web-services | oracle | plsql | null | null | null | open | Consuming web services from Oracle PL/SQL
===
Our application is interfacing with a lot of web services these days. We have our own package that someone wrote a few years back using UTL_HTTP and it generally works, but needs some hard-coding of the SOAP envelope to work with certain systems. I would like to make it more generic, but lack experience to know how many scenarios I would have to deal with.
I know that 10g has UTL_DBWS, but there are not a huge number of use-cases on-line. Is it stable and flexible enough for general use? | 0 |
37,590 | 09/01/2008 08:01:29 | 2,608 | 08/23/2008 14:39:53 | 91 | 7 | How to convert .ICO to .PNG? | What tool can I use to convert a .ICO file to a .PNG file? | graphics | null | null | null | null | null | open | How to convert .ICO to .PNG?
===
What tool can I use to convert a .ICO file to a .PNG file? | 0 |
37,591 | 09/01/2008 08:03:52 | 231 | 08/03/2008 19:35:19 | 75 | 9 | Displaying XML data in a Winfoms control | I would like to display details of an xml error log to a user in a winforms application and am looking for the best control to do the job.
The error data contains all of the sever variables at the time that the error occurred. These have been formatted into an XML document that looks something to the effect of:
<error>
<serverVariables>
<item>
<value>
</item>
</serverVariables>
<queryString>
<item name="">
<value string="">
</item>
</queryString>
</error>
I would like to read this data from the string that it is stored in and display it to the user via a windows form in a useful way. XML Notepad does a cool job of formatting xml, but is not really was I am looking for since I would prefer to rather display item details in a *Name : string* format.
Any suggestions or am I looking and a custom implementation?
| xml | winforms | formatting | c# | null | null | open | Displaying XML data in a Winfoms control
===
I would like to display details of an xml error log to a user in a winforms application and am looking for the best control to do the job.
The error data contains all of the sever variables at the time that the error occurred. These have been formatted into an XML document that looks something to the effect of:
<error>
<serverVariables>
<item>
<value>
</item>
</serverVariables>
<queryString>
<item name="">
<value string="">
</item>
</queryString>
</error>
I would like to read this data from the string that it is stored in and display it to the user via a windows form in a useful way. XML Notepad does a cool job of formatting xml, but is not really was I am looking for since I would prefer to rather display item details in a *Name : string* format.
Any suggestions or am I looking and a custom implementation?
| 0 |
37,593 | 09/01/2008 08:04:39 | 2,608 | 08/23/2008 14:39:53 | 91 | 7 | Where can I get free Vista style developer graphics? | What is the best source of free Vista style graphics for application development? I want 32x32 and 16x16 that I can use in a Winforms application. | graphics | null | null | null | null | null | open | Where can I get free Vista style developer graphics?
===
What is the best source of free Vista style graphics for application development? I want 32x32 and 16x16 that I can use in a Winforms application. | 0 |
37,597 | 09/01/2008 08:08:16 | 2,608 | 08/23/2008 14:39:53 | 91 | 7 | Why does TreeNodeCollection not implenent IEnumerable<TreeNode>? | TreeNodeCollection, like some of the other control collections in System.Windows.Forms, implements IEnumerable. Is there any design reason behind this or is it just a hangover from the days before generics? | .net | winforms | null | null | null | null | open | Why does TreeNodeCollection not implenent IEnumerable<TreeNode>?
===
TreeNodeCollection, like some of the other control collections in System.Windows.Forms, implements IEnumerable. Is there any design reason behind this or is it just a hangover from the days before generics? | 0 |
37,614 | 09/01/2008 08:23:52 | 1,583 | 08/16/2008 20:54:12 | 1 | 0 | Team Explorer on codeplex anonymously | I was on codeplex and trying to connect to their source control using team explorer. No joy though.
I tried connecting with https or http, using the server name and the project name. As I do not have a user on codeplex I could not login.
I am just trying to check out some code without changing it. My question is:
How can you connect team explorer to a codeplex server anonymously?
Cheers,
Oded
| version-control | tfs | codeplex | null | null | null | open | Team Explorer on codeplex anonymously
===
I was on codeplex and trying to connect to their source control using team explorer. No joy though.
I tried connecting with https or http, using the server name and the project name. As I do not have a user on codeplex I could not login.
I am just trying to check out some code without changing it. My question is:
How can you connect team explorer to a codeplex server anonymously?
Cheers,
Oded
| 0 |
37,628 | 09/01/2008 08:39:21 | 142 | 08/02/2008 12:41:43 | 267 | 17 | Reflection |
What is reflection, and why is it useful?
I'm particularly interested in Java, but I assume the principles are the same in any language(?). | reflection | java | null | null | null | null | open | Reflection
===
What is reflection, and why is it useful?
I'm particularly interested in Java, but I assume the principles are the same in any language(?). | 0 |
37,640 | 09/01/2008 09:04:42 | 3,742 | 08/30/2008 14:08:11 | 1 | 2 | Best GUI tool for documenting a SQL Server DB | What tool(s) do you use to generate documentation for a database (preferably into a .chm help file)? | sql | documentation | null | null | null | null | open | Best GUI tool for documenting a SQL Server DB
===
What tool(s) do you use to generate documentation for a database (preferably into a .chm help file)? | 0 |
37,644 | 09/01/2008 09:10:27 | 1,951 | 08/19/2008 15:06:09 | 670 | 38 | Examining Berkeley DB files from the CLI | I have a set of Berkeley DB files on my Linux file system that I'd like to examine.
What useful tools exist for getting a quick overview of the contents? I can write Perl scripts that use BDB modules for examining them, but I'm looking for some CLI utility to be able to take a look inside without having to start writing scripts. | linux | cli | berkeley-db | null | null | null | open | Examining Berkeley DB files from the CLI
===
I have a set of Berkeley DB files on my Linux file system that I'd like to examine.
What useful tools exist for getting a quick overview of the contents? I can write Perl scripts that use BDB modules for examining them, but I'm looking for some CLI utility to be able to take a look inside without having to start writing scripts. | 0 |
37,649 | 09/01/2008 09:19:56 | 890 | 08/10/2008 08:05:36 | 96 | 4 | Swapping column values in MySQL | I have a MySQL table with coordinates, the column names are X and Y. Now I want to swap the column values in this table, so that X becomes Y and Y becomes X. The most apparent solution would be renaming the columns, but I don't want to make structure changes since I don't necessarily have permissions to do that.
Is this possible to do with <b>UPDATE</b> in some way? <b>UPDATE table SET X=Y, Y=X</b> obviously won't do what I want. | mysql | database | null | null | null | null | open | Swapping column values in MySQL
===
I have a MySQL table with coordinates, the column names are X and Y. Now I want to swap the column values in this table, so that X becomes Y and Y becomes X. The most apparent solution would be renaming the columns, but I don't want to make structure changes since I don't necessarily have permissions to do that.
Is this possible to do with <b>UPDATE</b> in some way? <b>UPDATE table SET X=Y, Y=X</b> obviously won't do what I want. | 0 |
37,650 | 09/01/2008 09:21:14 | 3,416 | 08/28/2008 13:45:40 | 1 | 2 | How to implement a file download in asp.net | What is the best way to implement, from a web page a download action using asp.net 2.0?
Log files for a action are created in a directory called [Application Root]/Logs. I have the full path and want to provide a button, that when clicked will download the log file from the IIS server to the users local pc. | asp.net | .net2.0 | null | null | null | null | open | How to implement a file download in asp.net
===
What is the best way to implement, from a web page a download action using asp.net 2.0?
Log files for a action are created in a directory called [Application Root]/Logs. I have the full path and want to provide a button, that when clicked will download the log file from the IIS server to the users local pc. | 0 |
37,662 | 09/01/2008 09:34:37 | 381 | 08/05/2008 10:39:26 | 1,656 | 28 | Looking for a n-ary tree implementation in Perl | I'm writing a Perl script and would like to use a n-ary tree data structure.
Is there a good implementation that is available as source code (rather than part of a Perl library) ? | perl | beginner | algorithm | tree | null | null | open | Looking for a n-ary tree implementation in Perl
===
I'm writing a Perl script and would like to use a n-ary tree data structure.
Is there a good implementation that is available as source code (rather than part of a Perl library) ? | 0 |
37,672 | 09/01/2008 09:44:58 | 51 | 08/01/2008 13:31:13 | 1,758 | 79 | Create DB in Sql Server based on Visio Data Model | I have created a database model in Visio Professional (2003). I know that the Enterprise version has the ability to create a DB in Sql Server based on the data in Visio. I do not have the option to install Enterprise. Aside from going through the entire thing one table and relationship at a time and creating the whole database from scratch, by hand, can anyone recommend any tool/utility/method for converting the visio database model into a Sql Script that can be used to create a new DB in Sql Server? | sql-server | database | script | visio | null | null | open | Create DB in Sql Server based on Visio Data Model
===
I have created a database model in Visio Professional (2003). I know that the Enterprise version has the ability to create a DB in Sql Server based on the data in Visio. I do not have the option to install Enterprise. Aside from going through the entire thing one table and relationship at a time and creating the whole database from scratch, by hand, can anyone recommend any tool/utility/method for converting the visio database model into a Sql Script that can be used to create a new DB in Sql Server? | 0 |
37,684 | 09/01/2008 09:58:49 | 2,138 | 08/20/2008 14:23:45 | 34 | 3 | replace URL with HTML Links javascript | i am using the next function to match urls inside a given text and replace them for html links. The regex is working great but currently i am only replacing the first match.
Does anyone knows how I can replace all the url? I guess i should be using *exec* command but i did not really figured how to do it.
function replaceURLWithHTMLLinks(text) {
var exp = /(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/i;
return text.replace(exp,"<a href='$1'>$1</a>");
}
| javascript | regex | null | null | null | null | open | replace URL with HTML Links javascript
===
i am using the next function to match urls inside a given text and replace them for html links. The regex is working great but currently i am only replacing the first match.
Does anyone knows how I can replace all the url? I guess i should be using *exec* command but i did not really figured how to do it.
function replaceURLWithHTMLLinks(text) {
var exp = /(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/i;
return text.replace(exp,"<a href='$1'>$1</a>");
}
| 0 |
37,692 | 09/01/2008 10:06:42 | 3,713 | 08/30/2008 09:06:27 | 53 | 16 | Eclipse Plugin Dev: How do I get the paths for the currently selected project? | I'm writing a plugin that will parse a bunch of files in a project. But for the moment I'm stuck searching through the Eclipse API for answers.
The plugin works like this: Whenever I open a source file I let the plugin parse the source's corresponding build file (this could be further developed with caching the parse result). Getting the file is simple enough:
public void showSelection(IWorkbenchPart sourcePart) {
// Gets the currently selected file from the editor
IFile file = (IFile) workbenchPart.getSite().getPage().getActiveEditor()
.getEditorInput().getAdapter(IFile.class);
if (file != null) {
String path = file.getProjectRelativePath();
/** Snipped out: Rip out the source path part
* and replace with build path
* Then parse it. */
}
}
The problem I have is I have to use **hard coded strings** for the paths where the source files and build files go. Anyone know how to retrieve the build path from Eclipse? (I'm working in CDT by the way). Also is there a simple way to determine what the source path is (e.g. one file is under the "src" directory) of a source file? | java | eclipse | plugin-development | eclipse-api | null | null | open | Eclipse Plugin Dev: How do I get the paths for the currently selected project?
===
I'm writing a plugin that will parse a bunch of files in a project. But for the moment I'm stuck searching through the Eclipse API for answers.
The plugin works like this: Whenever I open a source file I let the plugin parse the source's corresponding build file (this could be further developed with caching the parse result). Getting the file is simple enough:
public void showSelection(IWorkbenchPart sourcePart) {
// Gets the currently selected file from the editor
IFile file = (IFile) workbenchPart.getSite().getPage().getActiveEditor()
.getEditorInput().getAdapter(IFile.class);
if (file != null) {
String path = file.getProjectRelativePath();
/** Snipped out: Rip out the source path part
* and replace with build path
* Then parse it. */
}
}
The problem I have is I have to use **hard coded strings** for the paths where the source files and build files go. Anyone know how to retrieve the build path from Eclipse? (I'm working in CDT by the way). Also is there a simple way to determine what the source path is (e.g. one file is under the "src" directory) of a source file? | 0 |
37,696 | 09/01/2008 10:16:45 | 2,138 | 08/20/2008 14:23:45 | 41 | 3 | concatenate several fields into one with SQL | i have three tables *tag*, *page*, *page-tag*
With the next data
***page***
ID NAME
1 page 1
2 page 2
3 page 3
4 page 4
***tag***
ID NAME
1 tag 1
2 tag 2
3 tag 3
4 tag 4
***page-tag***
ID PAGE-ID TAG-ID
1 2 1
2 2 3
3 3 4
4 1 1
5 1 2
6 1 3
I would like to get a string containing the correspondent tag names for each page with SQL in a single query. This is my desired output.
ID NAME TAGS
1 page 1 tag 1, tag 2, tag 3
2 page 2 tag 1, tag 3
3 page 3 tag 4
4 page 4
Is this possible with SQL? | sql | null | null | null | null | null | open | concatenate several fields into one with SQL
===
i have three tables *tag*, *page*, *page-tag*
With the next data
***page***
ID NAME
1 page 1
2 page 2
3 page 3
4 page 4
***tag***
ID NAME
1 tag 1
2 tag 2
3 tag 3
4 tag 4
***page-tag***
ID PAGE-ID TAG-ID
1 2 1
2 2 3
3 3 4
4 1 1
5 1 2
6 1 3
I would like to get a string containing the correspondent tag names for each page with SQL in a single query. This is my desired output.
ID NAME TAGS
1 page 1 tag 1, tag 2, tag 3
2 page 2 tag 1, tag 3
3 page 3 tag 4
4 page 4
Is this possible with SQL? | 0 |
37,702 | 09/01/2008 10:25:46 | 1,068 | 08/12/2008 08:44:09 | 3 | 3 | True random number generator | Sorry for this not being a "real" question, but Sometime back i remember seeing a post here about randomizing a randomizer randomly to generate truly random numbers, not just pseudo random. I dont see it if i search for it.
Does anybody know about that article? | random-number | null | null | null | null | null | open | True random number generator
===
Sorry for this not being a "real" question, but Sometime back i remember seeing a post here about randomizing a randomizer randomly to generate truly random numbers, not just pseudo random. I dont see it if i search for it.
Does anybody know about that article? | 0 |
37,731 | 09/01/2008 10:55:18 | 2,594 | 08/23/2008 12:42:57 | 85 | 11 | To use views or not to use views. | I seem right now to be embroiled in a debate with another programmer on this project who thinks that views have no merits. He proposes a system that PHP looks something like this:
$draw = new Draw;
$nav = $draw->wideHeaderBox().
$draw->left().
$draw->image().
Image::get($image,60,array('id'=>'header_image')).
$draw->imageEnd().
$draw->leftEnd().
$draw->left(10).
'<div id="header_text">'.
self::defaultSectionText().
'</div>'.
$draw->leftEnd().
and so on (this is in the controller btw). Now his arguments for this actually make some sense, he claims that if there is a redesign all we need to do is change the HTML in one place and it changes everywhere automatically. For some reason however, this method still rubs me the wrong way, is there any merit to views over this method? I mean besides not having to retype HTML by hand. | php | mvc | null | null | null | null | open | To use views or not to use views.
===
I seem right now to be embroiled in a debate with another programmer on this project who thinks that views have no merits. He proposes a system that PHP looks something like this:
$draw = new Draw;
$nav = $draw->wideHeaderBox().
$draw->left().
$draw->image().
Image::get($image,60,array('id'=>'header_image')).
$draw->imageEnd().
$draw->leftEnd().
$draw->left(10).
'<div id="header_text">'.
self::defaultSectionText().
'</div>'.
$draw->leftEnd().
and so on (this is in the controller btw). Now his arguments for this actually make some sense, he claims that if there is a redesign all we need to do is change the HTML in one place and it changes everywhere automatically. For some reason however, this method still rubs me the wrong way, is there any merit to views over this method? I mean besides not having to retype HTML by hand. | 0 |
37,732 | 09/01/2008 10:58:24 | 4,013 | 09/01/2008 10:58:24 | 1 | 0 | What is the regex pattern for datetime (2008-09-01 12:35:45 ) ? | Dont have any additional information. Just what is the regex pattern for datetime (2008-09-01 12:35:45 ) ? | regex | patterns | date | null | null | null | open | What is the regex pattern for datetime (2008-09-01 12:35:45 ) ?
===
Dont have any additional information. Just what is the regex pattern for datetime (2008-09-01 12:35:45 ) ? | 0 |
37,743 | 09/01/2008 11:03:34 | 1,178 | 08/13/2008 11:15:35 | 184 | 15 | SQL query to get the top "n" scores out of a list | I'd like to find the different ways to solve a real life problem I had: imagine to have a contest, or a game, during which the users collect points. You have to build a query to show the list of users with the best "n" scores.
I'm making an example to clarify. Let's say that this is the Users table, with the points earned:
UserId - Points
1 - 100
2 - 75
3 - 50
4 - 50
5 - 50
6 - 25
If I want the top 3 scores, the result will be:
UserId - Points
1 - 100
2 - 75
3 - 50
4 - 50
5 - 50
This can be realized in a view or a stored procedure, as you want. My target db is Sql Server. Actually I solved this, but I think there are different way to obtain the result... faster or more efficent than mine.
| sql-server | puzzle | null | null | null | null | open | SQL query to get the top "n" scores out of a list
===
I'd like to find the different ways to solve a real life problem I had: imagine to have a contest, or a game, during which the users collect points. You have to build a query to show the list of users with the best "n" scores.
I'm making an example to clarify. Let's say that this is the Users table, with the points earned:
UserId - Points
1 - 100
2 - 75
3 - 50
4 - 50
5 - 50
6 - 25
If I want the top 3 scores, the result will be:
UserId - Points
1 - 100
2 - 75
3 - 50
4 - 50
5 - 50
This can be realized in a view or a stored procedure, as you want. My target db is Sql Server. Actually I solved this, but I think there are different way to obtain the result... faster or more efficent than mine.
| 0 |
37,759 | 09/01/2008 11:15:11 | 2,471 | 08/22/2008 12:47:10 | 16 | 1 | How do you prevent default site web.config file being inherited by virtual directories? | I have the following code in a web.config file of the default IIS site.
<httpModules>
<add type="MDL.BexWebControls.Charts.ChartStreamHandler,Charts" name="ChartStreamHandler"/>
</httpModules>
Then when I setup and browse to a virtual directory I get this error
Could not load file or assembly 'Charts' or one of its dependencies. The system cannot find the file specified.
The virtual directory is inheriting the modules from the default web.config.
How do you stop this inheritance?
| asp.net | configurationfiles | null | null | null | null | open | How do you prevent default site web.config file being inherited by virtual directories?
===
I have the following code in a web.config file of the default IIS site.
<httpModules>
<add type="MDL.BexWebControls.Charts.ChartStreamHandler,Charts" name="ChartStreamHandler"/>
</httpModules>
Then when I setup and browse to a virtual directory I get this error
Could not load file or assembly 'Charts' or one of its dependencies. The system cannot find the file specified.
The virtual directory is inheriting the modules from the default web.config.
How do you stop this inheritance?
| 0 |
37,764 | 09/01/2008 11:20:22 | 1,176 | 08/13/2008 10:32:13 | 1 | 0 | SugarCRM 5 - Create a sub panel for invoices in Account Panel | I'm customizing a SugarCRM 5, and in my **SugarCRM database** I've all invoices, which were imported from our ERP. Now, I would like to know if it is possible to create a new Sub panel in the Accounts Panel **without editing the original SugarCRM files**, so that my client invoices index are visible in that interface.
Thanks
| sugar | crm | null | null | null | null | open | SugarCRM 5 - Create a sub panel for invoices in Account Panel
===
I'm customizing a SugarCRM 5, and in my **SugarCRM database** I've all invoices, which were imported from our ERP. Now, I would like to know if it is possible to create a new Sub panel in the Accounts Panel **without editing the original SugarCRM files**, so that my client invoices index are visible in that interface.
Thanks
| 0 |
37,783 | 09/01/2008 11:33:31 | 3,205 | 08/27/2008 13:06:13 | 270 | 19 | Are there any guidelines for designing user interface for mobile devices? | I am creating an application for a Windows Mobile computer. The catch is that the device (<a href="http://www.motorola.com/business/v/index.jsp?vgnextoid=d4397b103d175110VgnVCM1000008406b00aRCRD">Motorola MC17</a>) does not have a touch screen or universal keys - there are only six programmable hardware keys. <a href="http://en.wikipedia.org/wiki/Fitts%27s_law">Fitt's law</a> is not applicable here, most Microsoft guidelines are also moot. For now I'm mimicking Nokia's S60 keyboard layout as close as possible, since it's the most popular phone platform among my target audience.
<img src="http://www.ixbt.com/short/images/motorolaMC17_2.jpg" alt="Motorola MC17"/>
Are there any guidelines for creating a simple, discoverable user interface on such a constrained device? What fonts and colours should I use to make my UI readable? How do I measure if the items on-screen are big enough? What conventions should I follow? | gui | user-interface | windows-mobile | usability | null | null | open | Are there any guidelines for designing user interface for mobile devices?
===
I am creating an application for a Windows Mobile computer. The catch is that the device (<a href="http://www.motorola.com/business/v/index.jsp?vgnextoid=d4397b103d175110VgnVCM1000008406b00aRCRD">Motorola MC17</a>) does not have a touch screen or universal keys - there are only six programmable hardware keys. <a href="http://en.wikipedia.org/wiki/Fitts%27s_law">Fitt's law</a> is not applicable here, most Microsoft guidelines are also moot. For now I'm mimicking Nokia's S60 keyboard layout as close as possible, since it's the most popular phone platform among my target audience.
<img src="http://www.ixbt.com/short/images/motorolaMC17_2.jpg" alt="Motorola MC17"/>
Are there any guidelines for creating a simple, discoverable user interface on such a constrained device? What fonts and colours should I use to make my UI readable? How do I measure if the items on-screen are big enough? What conventions should I follow? | 0 |
37,785 | 09/01/2008 11:33:49 | 4,013 | 09/01/2008 10:58:24 | 1 | 0 | unit testing dynamic fixtures in CakePHP | > If you are not familiar with the CakePHP framework, you can maybe still help me. CakePHP uses [SimpleTest][1]
In the cakephp framework i am building tests for a behavior that is configured by adding fields to the table. This is intended to work in the same way that adding the "created" and "modified" fields will auto-populate these fields on save.
To test this I *could* create dozens of fixtures/model combos to test the different setups, but it would be a hundred times better, faster and easier to just have the fixture change "shape" between test methods.
Do you know how to do this?
[1]: http://simletest.org | unit-testing | cakephp | fixture | null | null | null | open | unit testing dynamic fixtures in CakePHP
===
> If you are not familiar with the CakePHP framework, you can maybe still help me. CakePHP uses [SimpleTest][1]
In the cakephp framework i am building tests for a behavior that is configured by adding fields to the table. This is intended to work in the same way that adding the "created" and "modified" fields will auto-populate these fields on save.
To test this I *could* create dozens of fixtures/model combos to test the different setups, but it would be a hundred times better, faster and easier to just have the fixture change "shape" between test methods.
Do you know how to do this?
[1]: http://simletest.org | 0 |
37,791 | 09/01/2008 11:38:36 | 4,012 | 09/01/2008 10:51:15 | 11 | 1 | How do you manage SQL Queries | At the moment my code (PHP) has too many SQL queries in it. eg...
// not a real example, but you get the idea...
$results = $db->GetResults("SELECT * FROM sometable WHERE iUser=$userid");
if ($results) {
// Do something
}
I am looking into using stored procedures to reduce this and make things a little more robust, but I have some concerns..
I have hundreds of different queries in use around the web site, and many of them are quite similar. How should I manage all these queries when they are removed from their context (the code that uses the results) and placed in a stored procedure on the database? | php | sql | mysql | null | null | null | open | How do you manage SQL Queries
===
At the moment my code (PHP) has too many SQL queries in it. eg...
// not a real example, but you get the idea...
$results = $db->GetResults("SELECT * FROM sometable WHERE iUser=$userid");
if ($results) {
// Do something
}
I am looking into using stored procedures to reduce this and make things a little more robust, but I have some concerns..
I have hundreds of different queries in use around the web site, and many of them are quite similar. How should I manage all these queries when they are removed from their context (the code that uses the results) and placed in a stored procedure on the database? | 0 |
37,799 | 09/01/2008 11:44:09 | 2,246 | 08/21/2008 08:53:01 | 31 | 3 | GCOV for multi-threaded apps | Is it possible to use gcov for coverage testing of multi-threaded applications?
I've set some trivial tests of our code-base up, but it would be nice to have some idea of the coverage we're achieving. If gcov isn't appropriate can anyone recommend an alternative tool (possible oprofile), ideally with some good documentation on getting started. | c++ | testing | coverage | null | null | null | open | GCOV for multi-threaded apps
===
Is it possible to use gcov for coverage testing of multi-threaded applications?
I've set some trivial tests of our code-base up, but it would be nice to have some idea of the coverage we're achieving. If gcov isn't appropriate can anyone recommend an alternative tool (possible oprofile), ideally with some good documentation on getting started. | 0 |
37,803 | 09/01/2008 11:48:37 | 3,388 | 08/28/2008 11:58:07 | 1 | 1 | How to create a graphical user interface mock-up for research? | I am a student and interested in doing some research on user interface. For some experiments, I have to change the behaviors of many default interactions in an operating system such as double-click or drag-and-drop in Windows (to make it faster, more efficient, etc.)
The best way is to change the behaviors of these interactions in an operating system itself (It can be Windows, Mac or any flavors of Unix) because then I can set up a real environment for a long-term user study. But, unless I hack the operating system's kernel, I think there's no way to do this natively.
Now I use Java and its captured events such as mouse_pressed, mouse_released, or mouse_clicked to implement a mock-up operating system. However implementing the whole thing up (even for just one scenario like dragging files through file windows) is labor-intensive and time-consuming. There should be a better way to do this. I am thinking about doing this in Flash, but I have never used it before. Has anyone done the same thing or got any ideas?
| gui | user-interface | operating-system | research | interaction | null | open | How to create a graphical user interface mock-up for research?
===
I am a student and interested in doing some research on user interface. For some experiments, I have to change the behaviors of many default interactions in an operating system such as double-click or drag-and-drop in Windows (to make it faster, more efficient, etc.)
The best way is to change the behaviors of these interactions in an operating system itself (It can be Windows, Mac or any flavors of Unix) because then I can set up a real environment for a long-term user study. But, unless I hack the operating system's kernel, I think there's no way to do this natively.
Now I use Java and its captured events such as mouse_pressed, mouse_released, or mouse_clicked to implement a mock-up operating system. However implementing the whole thing up (even for just one scenario like dragging files through file windows) is labor-intensive and time-consuming. There should be a better way to do this. I am thinking about doing this in Flash, but I have never used it before. Has anyone done the same thing or got any ideas?
| 0 |
37,804 | 09/01/2008 11:49:00 | 1,666 | 08/17/2008 21:07:18 | 482 | 36 | Link to samba shares in html | *First off if you're unaware, samba or smb == Windows file sharing, \\\computer\share etc.*
I have a bunch of different files on a bunch of different computers. It's mostly media and there is quite a bit of it. I'm looking into various ways of consolidating this into something more manageable.
Currently there are a few options I'm looking at, the **most** insane of which is some kind of samba share indexer that would generate a list of things shared on the various samba servers I tell it about and upload them to a website which could then be searched and browsed.
It's a cheap solution, OK?
Ignoring the fact that the idea is obviously a couple of methods short of a class, do you chaps know of any way to link to samba file shares in html in a cross-browser way? In windows one does \\\computer\share, in linux one does smb://computer/share, neither of which work afaik from browsers that aren't also used as file managers (e.g. Internet Explorer). | samba | smb | html | null | null | null | open | Link to samba shares in html
===
*First off if you're unaware, samba or smb == Windows file sharing, \\\computer\share etc.*
I have a bunch of different files on a bunch of different computers. It's mostly media and there is quite a bit of it. I'm looking into various ways of consolidating this into something more manageable.
Currently there are a few options I'm looking at, the **most** insane of which is some kind of samba share indexer that would generate a list of things shared on the various samba servers I tell it about and upload them to a website which could then be searched and browsed.
It's a cheap solution, OK?
Ignoring the fact that the idea is obviously a couple of methods short of a class, do you chaps know of any way to link to samba file shares in html in a cross-browser way? In windows one does \\\computer\share, in linux one does smb://computer/share, neither of which work afaik from browsers that aren't also used as file managers (e.g. Internet Explorer). | 0 |
37,805 | 09/01/2008 11:49:07 | 2,257 | 08/21/2008 11:26:12 | 1,218 | 85 | Filter linq list on property value | I have a `List<int>` and a `List<customObject>`. The customObject class has an ID property. How can I get a `List<customObject>` containing only the objects where the ID property is in the `List<int>` using LINQ?
| linq | linq-to-objects | .net | null | null | null | open | Filter linq list on property value
===
I have a `List<int>` and a `List<customObject>`. The customObject class has an ID property. How can I get a `List<customObject>` containing only the objects where the ID property is in the `List<int>` using LINQ?
| 0 |
37,808 | 09/01/2008 11:55:27 | 4,018 | 09/01/2008 11:24:40 | 3 | 0 | Examples of using semantic web technologies in real world applications | Are you working on a (probably commercial) product which uses RDF/OWL/SPARQL technologies? If so, can you please describe your product? | semantic-web | rdf | null | null | null | null | open | Examples of using semantic web technologies in real world applications
===
Are you working on a (probably commercial) product which uses RDF/OWL/SPARQL technologies? If so, can you please describe your product? | 0 |
37,809 | 09/01/2008 11:55:57 | 383 | 08/05/2008 10:46:37 | 2,398 | 211 | How do I generate a Friendly URL in C#? | How can I go about generating a Friendly URL in C#? Currently I simple replace spaces with an underscore, but how would I go about generating URL's like Stack Overflow?
For example how can I convert:
> How do I generate a Friendly URL in C#?
Into
> how-do-i-generate-a-friendly-url-in-C | c# | friendly-url | null | null | null | null | open | How do I generate a Friendly URL in C#?
===
How can I go about generating a Friendly URL in C#? Currently I simple replace spaces with an underscore, but how would I go about generating URL's like Stack Overflow?
For example how can I convert:
> How do I generate a Friendly URL in C#?
Into
> how-do-i-generate-a-friendly-url-in-C | 0 |
37,812 | 09/01/2008 11:59:03 | 3,182 | 08/27/2008 09:11:40 | 189 | 7 | MSMQ monitoring | Is there anything which can help with msmq monitoring? I'd like to get some event/monit when a message appears in queue and the same on leave. | monitoring | msmq | null | null | null | null | open | MSMQ monitoring
===
Is there anything which can help with msmq monitoring? I'd like to get some event/monit when a message appears in queue and the same on leave. | 0 |
37,821 | 09/01/2008 12:05:22 | 2,252 | 08/21/2008 10:02:14 | 1 | 0 | Viewing event log via a web interface | I'd like to be able to view the event log for a series of asp.net websites running on IIS. Can I do this externally, for example, through a web interface? | asp.net | iis | logging | monitoring | null | null | open | Viewing event log via a web interface
===
I'd like to be able to view the event log for a series of asp.net websites running on IIS. Can I do this externally, for example, through a web interface? | 0 |
37,822 | 09/01/2008 12:05:29 | 2,438 | 08/22/2008 10:45:13 | 1 | 5 | Is it just the iPhone simulator that is restricted to intel only Mac's? | I have read that the iPhone SDK (part of xcode 3) is restricted to Mac's with the intel chipset. Does this restriction apply to only the simulator part of the SDK or the complete shebang? | iphone | xcode | osx | null | null | null | open | Is it just the iPhone simulator that is restricted to intel only Mac's?
===
I have read that the iPhone SDK (part of xcode 3) is restricted to Mac's with the intel chipset. Does this restriction apply to only the simulator part of the SDK or the complete shebang? | 0 |
37,823 | 09/01/2008 12:05:52 | 4,018 | 09/01/2008 11:24:40 | 3 | 0 | Good reasons NOT to use a relational database? | Can you please point to alternative data storage tools and give good reasons to use them instead of good-old relational databases? Imo most applications rarely use full power of SQL, it would be interesting to see how to build a SQL-free application. | sql | database | null | null | null | null | open | Good reasons NOT to use a relational database?
===
Can you please point to alternative data storage tools and give good reasons to use them instead of good-old relational databases? Imo most applications rarely use full power of SQL, it would be interesting to see how to build a SQL-free application. | 0 |
37,830 | 09/01/2008 12:07:38 | 2,374 | 08/21/2008 22:14:30 | 289 | 20 | How do I implement a chromeless window with WPF? | I want to show a chromeless modal window with a close button in the upper right corner.
Is this possible? | wpf | gui | user-interface | null | null | null | open | How do I implement a chromeless window with WPF?
===
I want to show a chromeless modal window with a close button in the upper right corner.
Is this possible? | 0 |
37,832 | 09/01/2008 12:09:10 | 2,902 | 08/25/2008 20:49:25 | 208 | 13 | UI and event testing | So I know that unit testing is a must. I get the idea that TDD is the way to go when adding new modules. Even if, in practice, I don't actually do it. A bit like commenting code, really.
The real thing is, I'm struggling to get my head around how to unit-test the UI and more generally objects that generate events: user controls, asynchronous database operations, etc.
So much of my code relates to UI events that I can't quite see how to even start the unit testing.
There must be some primers and starter docs out there? Some hints and tips?
I'm generally working in C# (2.0 and 3.5) but I'm not sure that this is strictly relevant to the question. | tdd | unit-testing | visual-studio | gui | null | null | open | UI and event testing
===
So I know that unit testing is a must. I get the idea that TDD is the way to go when adding new modules. Even if, in practice, I don't actually do it. A bit like commenting code, really.
The real thing is, I'm struggling to get my head around how to unit-test the UI and more generally objects that generate events: user controls, asynchronous database operations, etc.
So much of my code relates to UI events that I can't quite see how to even start the unit testing.
There must be some primers and starter docs out there? Some hints and tips?
I'm generally working in C# (2.0 and 3.5) but I'm not sure that this is strictly relevant to the question. | 0 |
37,843 | 09/01/2008 12:15:14 | 383 | 08/05/2008 10:46:37 | 2,396 | 212 | What is WPF? | I have seen lots of questions recently about WPF...
- What is it?
- What does it stand for?
- How can I begin programming WPF? | wpf | null | null | null | null | null | open | What is WPF?
===
I have seen lots of questions recently about WPF...
- What is it?
- What does it stand for?
- How can I begin programming WPF? | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.