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
48,446
09/07/2008 13:53:10
2,716
08/24/2008 16:59:02
1
1
Scheduling Windows Mobile apps to run
How do you schedule a Windows Mobile application to periodically start up to perform some background processing. For example, assume I'm writing an email client and want to check for email every hour, regardless of whether my app is running at the time. The app is a native C/C++ app on Windows Mobile 5.0 or later.
windows-mobile
scheduledtasks
null
null
null
null
open
Scheduling Windows Mobile apps to run === How do you schedule a Windows Mobile application to periodically start up to perform some background processing. For example, assume I'm writing an email client and want to check for email every hour, regardless of whether my app is running at the time. The app is a native C/C++ app on Windows Mobile 5.0 or later.
0
48,458
09/07/2008 14:08:47
96
08/01/2008 18:33:48
938
69
Project structure for Google App Engine
I started an application in Google App Engine right when it came out, to play with the technology and work on a pet project that I had been thinking about for a long time but never gotten around to starting. The result is [BowlSK][1]. However, as it has grown, and features have been added, it has gotten really difficult to keep things organized - mainly due to the fact that this is my first python project, and I didn't know anything about it until I started working. What I have: - Main Level contains: - all .py files (didn't know how to make packages work) - all .html templates for main level pages - Subdirectories: - separate folders for css, images, js, etc. - folders that hold .html templates for subdirecty-type urls Example:<br/> http://www.bowlsk.com/ maps to HomePage (default package), template at "index.html"<br/> http://www.bowlsk.com/games/view-series.html?series=7130 maps to ViewSeriesPage (again, default package), template at "games/view-series.html" It's nasty. How do I restructure? I had 2 ideas: - Main Folder containing: appdef, indexes, main.py? - Subfolder for code. Does this have to be my first package? - Subfolder for templates. Folder heirarchy would match package heirarchy - Individual subfolders for css, images, js, etc. - Main Folder containing appdef, indexes, main.py? - Subfolder for code + templates. This way I have the handler class right next to the template, because in this stage, I'm adding lots of features, so modifications to one mean modifications to the other. Again, do I have to have this folder name be the first package name for my classes? I'd like the folder to be "src", but I don't want my classes to be "src.WhateverPage" Is there a best practice? With Django 1.0 on the horizon, is there something I can do now to improve my ability to integrate with it when it becomes the official GAE templating engine? I would simply start trying these things, and seeing which seems better, but pyDev's refactoring support doesn't seem to handle package moves very well, so it will likely be a non-trivial task to get all of this working again. Thanks. [1]: http://www.bowlsk.com
python
google
appengine
gae
null
null
open
Project structure for Google App Engine === I started an application in Google App Engine right when it came out, to play with the technology and work on a pet project that I had been thinking about for a long time but never gotten around to starting. The result is [BowlSK][1]. However, as it has grown, and features have been added, it has gotten really difficult to keep things organized - mainly due to the fact that this is my first python project, and I didn't know anything about it until I started working. What I have: - Main Level contains: - all .py files (didn't know how to make packages work) - all .html templates for main level pages - Subdirectories: - separate folders for css, images, js, etc. - folders that hold .html templates for subdirecty-type urls Example:<br/> http://www.bowlsk.com/ maps to HomePage (default package), template at "index.html"<br/> http://www.bowlsk.com/games/view-series.html?series=7130 maps to ViewSeriesPage (again, default package), template at "games/view-series.html" It's nasty. How do I restructure? I had 2 ideas: - Main Folder containing: appdef, indexes, main.py? - Subfolder for code. Does this have to be my first package? - Subfolder for templates. Folder heirarchy would match package heirarchy - Individual subfolders for css, images, js, etc. - Main Folder containing appdef, indexes, main.py? - Subfolder for code + templates. This way I have the handler class right next to the template, because in this stage, I'm adding lots of features, so modifications to one mean modifications to the other. Again, do I have to have this folder name be the first package name for my classes? I'd like the folder to be "src", but I don't want my classes to be "src.WhateverPage" Is there a best practice? With Django 1.0 on the horizon, is there something I can do now to improve my ability to integrate with it when it becomes the official GAE templating engine? I would simply start trying these things, and seeing which seems better, but pyDev's refactoring support doesn't seem to handle package moves very well, so it will likely be a non-trivial task to get all of this working again. Thanks. [1]: http://www.bowlsk.com
0
48,470
09/07/2008 14:29:07
4,790
09/05/2008 16:00:28
18
4
How to disable Visual Studio macro "tip" balloon?
Whenever I use a macro in Visual Studio I get an annoying tip balloon in the system tray and an accompanying "pop" sound. It says: > Visual Studio .NET macros > > To stop the macro from running, double-click the spinning cassette. > Click here to not show this balloon again. I have trouble clicking the balloon because my macro runs so quickly. Is this controllable by some dialog box option? (I found someone else asking this question on [some other site](http://www.tech-archive.net/Archive/VisualStudio/microsoft.public.vsnet.ide/2005-11/msg00267.html) but it's not answered there. I give credit here because I've copied and pasted some pieces from there.)
visual-studio
macros
null
null
null
null
open
How to disable Visual Studio macro "tip" balloon? === Whenever I use a macro in Visual Studio I get an annoying tip balloon in the system tray and an accompanying "pop" sound. It says: > Visual Studio .NET macros > > To stop the macro from running, double-click the spinning cassette. > Click here to not show this balloon again. I have trouble clicking the balloon because my macro runs so quickly. Is this controllable by some dialog box option? (I found someone else asking this question on [some other site](http://www.tech-archive.net/Archive/VisualStudio/microsoft.public.vsnet.ide/2005-11/msg00267.html) but it's not answered there. I give credit here because I've copied and pasted some pieces from there.)
0
48,474
09/07/2008 14:31:25
5,038
09/07/2008 13:46:36
1
0
How do I position one image on top of another in HTML?
I'm a beginning rails programmer, attempting to show many images on a page. Some images are to lay on top of others. To make it simple, say I want a blue square, with a red square in the upper right corner of the blue square (but not tight in the corner). I am trying to avoid compositing (with ImageMagick and similar) due to perfomance issues. I just want to position overlapping images relative to one another. As a more difficult example, imagine an odometer placed inside a larger image. For six digits, I would need to composite a million different images, or do it all on the fly, where all that is needed is to place the six images on top of the other one.
html
rails
null
null
null
null
open
How do I position one image on top of another in HTML? === I'm a beginning rails programmer, attempting to show many images on a page. Some images are to lay on top of others. To make it simple, say I want a blue square, with a red square in the upper right corner of the blue square (but not tight in the corner). I am trying to avoid compositing (with ImageMagick and similar) due to perfomance issues. I just want to position overlapping images relative to one another. As a more difficult example, imagine an odometer placed inside a larger image. For six digits, I would need to composite a million different images, or do it all on the fly, where all that is needed is to place the six images on top of the other one.
0
48,475
09/07/2008 14:31:31
5,035
09/07/2008 13:39:10
1
0
Database Design for Tagging
How would you design a database to support the following tagging features: * items can have a large number of tags * searches for all items that are tagged with a given set of tags must be quick * creating/writing items may be slower to enable quick lookup/reading Ideally, the lookup of all items that are tagged with (at least) a set of n given tags should be done using a single SQL statement. Since the number of tags to search for as well as the number of tags on any item are unknown and may be high, using JOINs is impractical. Any ideas?
sql
tagging
database-design
null
null
null
open
Database Design for Tagging === How would you design a database to support the following tagging features: * items can have a large number of tags * searches for all items that are tagged with a given set of tags must be quick * creating/writing items may be slower to enable quick lookup/reading Ideally, the lookup of all items that are tagged with (at least) a set of n given tags should be done using a single SQL statement. Since the number of tags to search for as well as the number of tags on any item are unknown and may be high, using JOINs is impractical. Any ideas?
0
48,486
09/07/2008 14:45:38
217
08/03/2008 15:59:20
28
2
Choosing a desktop database
I'm looking for a desktop/embedded database. The two candidates I'm looking at are Microsoft SQL Server CE and Oracle Lite. If anyone's used both of these products, it'd be great if you could compare them. I haven't been able to find any comparisons online. The backend DB is Oracle10g. Thanks!
oracle
sql-server-ce
null
null
null
null
open
Choosing a desktop database === I'm looking for a desktop/embedded database. The two candidates I'm looking at are Microsoft SQL Server CE and Oracle Lite. If anyone's used both of these products, it'd be great if you could compare them. I haven't been able to find any comparisons online. The backend DB is Oracle10g. Thanks!
0
48,491
09/07/2008 14:56:04
4,300
09/02/2008 18:28:23
1
0
keep rsync from removing unfinished source files
I have two machines, speed and mass. speed has a fast Internet connection and is running a crawler which downloads a lot of files to disk. mass has a lot of disk space. I want to move the files from speed to mass after they're done downloading. Ideally, I'd just run: $ rsync --remove-source-files speed:/var/crawldir . but I worry that rsync will unlink a source file that hasn't finished downloading yet. (I looked at the source code and I didn't see anything protecting against this.) Any suggestions?
storage
rsync
webcrawler
null
null
null
open
keep rsync from removing unfinished source files === I have two machines, speed and mass. speed has a fast Internet connection and is running a crawler which downloads a lot of files to disk. mass has a lot of disk space. I want to move the files from speed to mass after they're done downloading. Ideally, I'd just run: $ rsync --remove-source-files speed:/var/crawldir . but I worry that rsync will unlink a source file that hasn't finished downloading yet. (I looked at the source code and I didn't see anything protecting against this.) Any suggestions?
0
48,493
09/07/2008 14:56:56
1,628
08/17/2008 16:33:47
1
2
Moving from legacy(COBOL) to Enterprise .net
I have worked as a developer/analyst for 10 years primarily in OpenVMS COBOL and SAS. I have been given the oppurtunity to "dabble" in asp.net as well as other things such as Informatica. But everything has to fit in within the scope of my current duties. I would say that actual development work takes up about 70% of my time while the rest is dealing with internal customers and other business related issues. I tinker with .net at home but that is a far cry from the environment at work which consists of a n-tier framework in.net 1.1 to WCF applications in 3.0. My problem is making the transition from "legacy" to Enterprise .net application developemnt as well as modern development practices. Im not a dummy but the learning curve seems straight up with a limited amount of time that I have to work on it. Any advice would be appreciated.
self-improvement
null
null
null
null
03/01/2012 19:23:15
not constructive
Moving from legacy(COBOL) to Enterprise .net === I have worked as a developer/analyst for 10 years primarily in OpenVMS COBOL and SAS. I have been given the oppurtunity to "dabble" in asp.net as well as other things such as Informatica. But everything has to fit in within the scope of my current duties. I would say that actual development work takes up about 70% of my time while the rest is dealing with internal customers and other business related issues. I tinker with .net at home but that is a far cry from the environment at work which consists of a n-tier framework in.net 1.1 to WCF applications in 3.0. My problem is making the transition from "legacy" to Enterprise .net application developemnt as well as modern development practices. Im not a dummy but the learning curve seems straight up with a limited amount of time that I have to work on it. Any advice would be appreciated.
4
48,494
09/07/2008 14:58:17
5,048
09/07/2008 14:58:17
1
0
Firewall - Build or Buy
I have a Linux web server farm with about 5 web servers, web traffic is about 20Mbps. We currently have a Barracuda 340 Load Balancer (keep away from this device - piece of crap!) that is acting as a firewall. I want to put in a dedicated firewall and I'd like to know what peoples opinions are on building versus buying a dedicated firewall. Main requirments: - Dynamically block rouge traffic - Dynamically rate limit traffic - Block all ports except 80, 443 - Limit port 22 to a set of IPs - High availability setup Also if we go for the build route, how do we know what level traffic the system can handle. Thanks in advance!
firewall
null
null
null
null
null
open
Firewall - Build or Buy === I have a Linux web server farm with about 5 web servers, web traffic is about 20Mbps. We currently have a Barracuda 340 Load Balancer (keep away from this device - piece of crap!) that is acting as a firewall. I want to put in a dedicated firewall and I'd like to know what peoples opinions are on building versus buying a dedicated firewall. Main requirments: - Dynamically block rouge traffic - Dynamically rate limit traffic - Block all ports except 80, 443 - Limit port 22 to a set of IPs - High availability setup Also if we go for the build route, how do we know what level traffic the system can handle. Thanks in advance!
0
48,496
09/07/2008 15:02:08
2,686
08/24/2008 14:42:08
103
8
how to teach a crash course on C++
In a few weeks we'll be teaching a crash course on C++ for Java programmers straight out of college. They have little or no experience yet with C or C++. Previous editions of this course were just 1 or 2 half-day sessions and covered topics including: * new language features, e.g. * header vs. implementation * pointers and references * memory management * operator overloading * templates * the standard libraries, e.g. * the C library headers * basic iostreams * basic STL * using libraries (headers, linking) * they'll be using Linux, so * basic Linux console commands * gcc and how to interpret its error messages * Makefiles and autotools * basic debugger commands * any topic they ask about During the course each person individually writes, compiles, runs, and debugs simple programs using the newly introduced features. Is this the best way to learn? Which topics do you consider most crucial? Which topics should be added or removed? Which topics just can't be covered adequately in a short time?
c++
teaching
null
null
null
null
open
how to teach a crash course on C++ === In a few weeks we'll be teaching a crash course on C++ for Java programmers straight out of college. They have little or no experience yet with C or C++. Previous editions of this course were just 1 or 2 half-day sessions and covered topics including: * new language features, e.g. * header vs. implementation * pointers and references * memory management * operator overloading * templates * the standard libraries, e.g. * the C library headers * basic iostreams * basic STL * using libraries (headers, linking) * they'll be using Linux, so * basic Linux console commands * gcc and how to interpret its error messages * Makefiles and autotools * basic debugger commands * any topic they ask about During the course each person individually writes, compiles, runs, and debugs simple programs using the newly introduced features. Is this the best way to learn? Which topics do you consider most crucial? Which topics should be added or removed? Which topics just can't be covered adequately in a short time?
0
48,497
09/07/2008 15:02:09
4,875
09/06/2008 09:36:00
1
1
problem with dojo dijit.form.ValidationTextBox
The following xhtml code is not working: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <link rel="stylesheet" type="text/css" href="/dojotoolkit/dijit/themes/tundra/tundra.css" /> <link rel="stylesheet" type="text/css" href="/dojotoolkit/dojo/resources/dojo.css" /> <script type="text/javascript" src="/dojotoolkit/dojo/dojo.js" djConfig="parseOnLoad: true"/> <script type="text/javascript"> dojo.require("dijit.form.ValidationTextBox"); dojo.require("dojo.parser"); </script> </head> <body class="nihilo"> <input type="text" dojoType="dijit.form.ValidationTextBox" size="30" /> </body> </html> In FireBug I get the following error message: [Exception... "Component returned failure code: 0x80004003 (NS_ERROR_INVALID_POINTER) [nsIDOMNSHTMLElement.innerHTML]" nsresult: "0x80004003 (NS_ERROR_INVALID_POINTER)" location: "JS frame :: http://localhost:21000/dojotoolkit/dojo/dojo.js :: anonymous :: line 319" data: no] http://localhost:21000/dojotoolkit/dojo/dojo.js Line 319 Any idea what is wrong?
javascript
dojo
null
null
null
null
open
problem with dojo dijit.form.ValidationTextBox === The following xhtml code is not working: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <link rel="stylesheet" type="text/css" href="/dojotoolkit/dijit/themes/tundra/tundra.css" /> <link rel="stylesheet" type="text/css" href="/dojotoolkit/dojo/resources/dojo.css" /> <script type="text/javascript" src="/dojotoolkit/dojo/dojo.js" djConfig="parseOnLoad: true"/> <script type="text/javascript"> dojo.require("dijit.form.ValidationTextBox"); dojo.require("dojo.parser"); </script> </head> <body class="nihilo"> <input type="text" dojoType="dijit.form.ValidationTextBox" size="30" /> </body> </html> In FireBug I get the following error message: [Exception... "Component returned failure code: 0x80004003 (NS_ERROR_INVALID_POINTER) [nsIDOMNSHTMLElement.innerHTML]" nsresult: "0x80004003 (NS_ERROR_INVALID_POINTER)" location: "JS frame :: http://localhost:21000/dojotoolkit/dojo/dojo.js :: anonymous :: line 319" data: no] http://localhost:21000/dojotoolkit/dojo/dojo.js Line 319 Any idea what is wrong?
0
48,505
09/07/2008 15:07:31
2,297
08/21/2008 14:30:42
754
68
Citrix Server sort of app - on a Mac?
Does anyone know of a similar product to Citrix Server that'll run on the Mac OS? Essentially, I'm looking to allow multiple remote users to log in to the same OSX Server at the same time (with full visual desktop, not SSH).
osx
citrix
null
null
null
null
open
Citrix Server sort of app - on a Mac? === Does anyone know of a similar product to Citrix Server that'll run on the Mac OS? Essentially, I'm looking to allow multiple remote users to log in to the same OSX Server at the same time (with full visual desktop, not SSH).
0
48,521
09/07/2008 15:18:43
4,694
09/05/2008 09:30:26
36
3
How can you databind a single object in .NET ?
I would like to use a component that exposes the datasource property, but instead of supplying the datasource with whole list of objects, I would like to use only simple object. Is there any way to do this ? The mentioned component is DevExpress.XtraDataLayout.DataLayoutControl - this is fairly irrelevant to the question though.
.net
data-binding
null
null
null
null
open
How can you databind a single object in .NET ? === I would like to use a component that exposes the datasource property, but instead of supplying the datasource with whole list of objects, I would like to use only simple object. Is there any way to do this ? The mentioned component is DevExpress.XtraDataLayout.DataLayoutControl - this is fairly irrelevant to the question though.
0
48,526
09/07/2008 15:30:19
658
08/07/2008 15:07:47
1,875
99
Call Visitors web stat program from PHP
I've been looking into different web statistics programs for my site, and one promising one is [Visitors][1]. Unfortunately, it's a C program and I don't know how to call it from the web server. I've tried using PHP's [shell_exec][2], but my web host ([NFSN][3]) has PHP's [safe mode][4] on and it's giving me an error message. Is there a way to execute the program within safe mode? If not, can it work with CGI? If so, how? (I've never used CGI before) [1]: http://www.hping.org/visitors/ [2]: http://us.php.net/manual/en/function.shell-exec.php [3]: https://www.nearlyfreespeech.net/ [4]: http://us2.php.net/features.safe-mode
statistics
cgi
analytics
visitors
php-safe-mode
null
open
Call Visitors web stat program from PHP === I've been looking into different web statistics programs for my site, and one promising one is [Visitors][1]. Unfortunately, it's a C program and I don't know how to call it from the web server. I've tried using PHP's [shell_exec][2], but my web host ([NFSN][3]) has PHP's [safe mode][4] on and it's giving me an error message. Is there a way to execute the program within safe mode? If not, can it work with CGI? If so, how? (I've never used CGI before) [1]: http://www.hping.org/visitors/ [2]: http://us.php.net/manual/en/function.shell-exec.php [3]: https://www.nearlyfreespeech.net/ [4]: http://us2.php.net/features.safe-mode
0
48,550
09/07/2008 16:15:01
4,642
09/04/2008 23:22:08
333
11
How do I publish a Asp.net web application using MSBuild?
I am trying to publish an Asp.net MVC web application locally using the NAnt and MSBuild. This is what I am using for my NAnt target; <target name="publish-artifacts-to-build"> <msbuild project="my-solution.sln" target="Publish"> <property name="Configuration" value="debug" /> <property name="OutDir" value="builds\" /> <arg line="/m:2 /tv:3.5" /> </msbuild> </target> and all I get is this as a response; [msbuild] Skipping unpublishable project. Is it possible to publish web applications via the command line in this way?
asp.net-mvc
msbuild
nant
publish
null
null
open
How do I publish a Asp.net web application using MSBuild? === I am trying to publish an Asp.net MVC web application locally using the NAnt and MSBuild. This is what I am using for my NAnt target; <target name="publish-artifacts-to-build"> <msbuild project="my-solution.sln" target="Publish"> <property name="Configuration" value="debug" /> <property name="OutDir" value="builds\" /> <arg line="/m:2 /tv:3.5" /> </msbuild> </target> and all I get is this as a response; [msbuild] Skipping unpublishable project. Is it possible to publish web applications via the command line in this way?
0
48,555
09/07/2008 16:23:12
1,944
08/19/2008 14:49:14
423
18
Best way to compress HTML, CSS & JS with mod_deflate and mod_gzip disabled
I have a few sites on a shared host that is running Apache 2. I would like to compress the HTML, CSS and Javascript that is delivered to the browser. The host has disabled mod_deflate and mod_gzip, so these options are out. I do have PHP 5 at my disposal, though, so I could use the gzip component of that. I am currently placing the following in my .htaccess file: > php_value output_handler ob_gzhandler However, this only compresses the HTML and leaves out the CSS and JS. Is there a reliable way of transparently compressing the output of the CSS and JS without having to change every page? I have searched Google and a number of solutions are presented, but I've yet to get one to work. If anyone could suggest a solution that they know to work, that would be very gratefully received. Note, **Method 2** in **[The Definitive Post on Gzipping your CSS][1]** looks like a good solution, but I couldn't get it working. Has anyone else succeeded using this method? [1]: http://www.fiftyfoureleven.com/weblog/web-development/css/the-definitive-css-gzip-method
php
html
apache
compression
null
null
open
Best way to compress HTML, CSS & JS with mod_deflate and mod_gzip disabled === I have a few sites on a shared host that is running Apache 2. I would like to compress the HTML, CSS and Javascript that is delivered to the browser. The host has disabled mod_deflate and mod_gzip, so these options are out. I do have PHP 5 at my disposal, though, so I could use the gzip component of that. I am currently placing the following in my .htaccess file: > php_value output_handler ob_gzhandler However, this only compresses the HTML and leaves out the CSS and JS. Is there a reliable way of transparently compressing the output of the CSS and JS without having to change every page? I have searched Google and a number of solutions are presented, but I've yet to get one to work. If anyone could suggest a solution that they know to work, that would be very gratefully received. Note, **Method 2** in **[The Definitive Post on Gzipping your CSS][1]** looks like a good solution, but I couldn't get it working. Has anyone else succeeded using this method? [1]: http://www.fiftyfoureleven.com/weblog/web-development/css/the-definitive-css-gzip-method
0
48,562
09/07/2008 16:32:55
5,060
09/07/2008 16:15:26
1
0
How do I implement a pre-commit hook script in SVN that calls dos2unix to validate checked-in file
I was wondering if anyone here had some experience writing this type of script and if they could give me some pointers. Thanks.
python
svn
dos2unix
null
null
null
open
How do I implement a pre-commit hook script in SVN that calls dos2unix to validate checked-in file === I was wondering if anyone here had some experience writing this type of script and if they could give me some pointers. Thanks.
0
48,567
09/07/2008 16:38:40
1,360
08/14/2008 18:11:31
58
13
Change user for running windows forms program
I wrote a simple Windows Forms program in C#. I want to be able to input a windows user name and password and when I click a login button to switch to program to run as the user I've entered as input.
.net
windows
forms
as
run
null
open
Change user for running windows forms program === I wrote a simple Windows Forms program in C#. I want to be able to input a windows user name and password and when I click a login button to switch to program to run as the user I've entered as input.
0
48,570
09/07/2008 16:42:07
5,056
09/07/2008 15:43:17
1
0
Something like a callback delegate function in php
I would like to implement something similar to a c# delegate method in PHP. A quick word to explain what I'm trying to do overall: I am trying to implement some asynchronous functionality. Basically some resource-intensive calls that get queued, cached, and dispatched when the underlying system gets around to it. When the asynchronous call finally receives a response I would like a callback event to be raised. I am having some problems coming up with a mechanism to do callbacks in PHP. I have come up with a method that works for now but I am unhappy with it. Basically it involves passing a reference to the object and the name of the method on it that will serve as the callback (taking the response as an argument) and then use eval to call the method when need be. This is sub-optimal for a variety of reasons, is there a better way of doing this that anyone knows of?
php
oop
null
null
null
null
open
Something like a callback delegate function in php === I would like to implement something similar to a c# delegate method in PHP. A quick word to explain what I'm trying to do overall: I am trying to implement some asynchronous functionality. Basically some resource-intensive calls that get queued, cached, and dispatched when the underlying system gets around to it. When the asynchronous call finally receives a response I would like a callback event to be raised. I am having some problems coming up with a mechanism to do callbacks in PHP. I have come up with a method that works for now but I am unhappy with it. Basically it involves passing a reference to the object and the name of the method on it that will serve as the callback (taking the response as an argument) and then use eval to call the method when need be. This is sub-optimal for a variety of reasons, is there a better way of doing this that anyone knows of?
0
48,574
09/07/2008 16:46:48
1,233
08/13/2008 15:07:10
586
40
Troubleshooting a NullReference exception in a service
I have a windows service that runs various system monitoring operations. However, when running SNMP related checks, I always get a NullReference exception. The code runs fine when run through the user interface (under my username and password), but always errors running as the service. I've tried running the service as different user accounts (including mine), with no luck. I've tried replacing the SNMP monitoring code with calling the PowerShell cmdlet get-snmp (from the /n NetCmdlets), but that yields the same error. The application I'm working with is [PolyMon][1]. Any ideas? [1]: http://codeplex.com/polymon
.net
exception
powershell
service
null
null
open
Troubleshooting a NullReference exception in a service === I have a windows service that runs various system monitoring operations. However, when running SNMP related checks, I always get a NullReference exception. The code runs fine when run through the user interface (under my username and password), but always errors running as the service. I've tried running the service as different user accounts (including mine), with no luck. I've tried replacing the SNMP monitoring code with calling the PowerShell cmdlet get-snmp (from the /n NetCmdlets), but that yields the same error. The application I'm working with is [PolyMon][1]. Any ideas? [1]: http://codeplex.com/polymon
0
48,578
09/07/2008 16:54:10
1,540
08/16/2008 13:42:36
31
3
.NET MVC Ambiguous Type Reference
Not entirely sure what's going on here; any help would be appreciated. I'm trying to create a new .NET MVC web app. I was pretty sure I had it set up correctly, but I'm getting the following error: The type 'System.Web.Mvc.ViewPage' is ambiguous: it could come from assembly 'C:\MyProject\bin\System.Web.Mvc.DLL' or from assembly 'C:\MyProject\bin\MyProject.DLL'. Please specify the assembly explicitly in the type name. The source error it reports is as follows: Line 1: <%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %> Line 2: Line 3: <asp:Content ID="indexContent" ContentPlaceHolderID="MainContentPlaceHolder" runat="server"> Anything stand out that I'm doing completely wrong?
asp.net
mvc
null
null
null
null
open
.NET MVC Ambiguous Type Reference === Not entirely sure what's going on here; any help would be appreciated. I'm trying to create a new .NET MVC web app. I was pretty sure I had it set up correctly, but I'm getting the following error: The type 'System.Web.Mvc.ViewPage' is ambiguous: it could come from assembly 'C:\MyProject\bin\System.Web.Mvc.DLL' or from assembly 'C:\MyProject\bin\MyProject.DLL'. Please specify the assembly explicitly in the type name. The source error it reports is as follows: Line 1: <%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %> Line 2: Line 3: <asp:Content ID="indexContent" ContentPlaceHolderID="MainContentPlaceHolder" runat="server"> Anything stand out that I'm doing completely wrong?
0
48,605
09/07/2008 17:40:25
4,903
09/06/2008 14:16:54
33
4
Why do most Java system architects insist on first coding to an interface?
I'm not asking this question out of spite, but I really want to know, because I might be missing something. Almost every Java book I read talks about using the interface as a way to share state and behavior between objects that when first "constructed" did not seem to share a relationship. However, whenever I see architects design an application, the first thing they do is start coding to an interface. How come? How do you know all the relationships between objects that will occur within that interface? If you already know those relationships, then why not just extend an abstract class?
java
interface
system
architect
null
null
open
Why do most Java system architects insist on first coding to an interface? === I'm not asking this question out of spite, but I really want to know, because I might be missing something. Almost every Java book I read talks about using the interface as a way to share state and behavior between objects that when first "constructed" did not seem to share a relationship. However, whenever I see architects design an application, the first thing they do is start coding to an interface. How come? How do you know all the relationships between objects that will occur within that interface? If you already know those relationships, then why not just extend an abstract class?
0
48,616
09/07/2008 17:54:48
31,505
2008-09-01
1,366
39
[ASP.NET] How to access controls in listview's layouttemplate?
How do I set a property of a user control in listview's layouttemplate from codebehind? <asp:ListView ...> <LayoutTemplate> <myprefix:MyControl id="myControl" ... /> </LayoutTemplate> ... </asp:ListView> I want to do this: myControl.SomeProperty = somevalue;
asp.net
listview
null
null
null
null
open
[ASP.NET] How to access controls in listview's layouttemplate? === How do I set a property of a user control in listview's layouttemplate from codebehind? <asp:ListView ...> <LayoutTemplate> <myprefix:MyControl id="myControl" ... /> </LayoutTemplate> ... </asp:ListView> I want to do this: myControl.SomeProperty = somevalue;
0
48,633
09/07/2008 18:09:33
281
08/04/2008 12:13:17
23
2
Max Table size you have seen in a MySQL DB
What is the maximum size you have seen a MySQL table? 2 Million at 50gig? 5million at 80gig? Any stories appreciated. Did you end up compressing data? Splitting the table if it grew too big?
mysql
db
size
null
null
null
open
Max Table size you have seen in a MySQL DB === What is the maximum size you have seen a MySQL table? 2 Million at 50gig? 5million at 80gig? Any stories appreciated. Did you end up compressing data? Splitting the table if it grew too big?
0
48,647
09/07/2008 18:20:43
4,928
09/06/2008 18:16:34
16
1
Does ScopeGuard use really lead to better code?
I came across [this article][1] written by Andrei Alexandrescu and Petru Marginean many years ago, which presents and discusses a utility class called ScopeGuard for writing exception-safe code. I'd like to know if coding with these objects truly leads to better code or if it obfuscates error handling, in that perhaps the guard's callback would be better presented in a catch block? Does anyone have any experience using these in actual production code? [1]: http://www.ddj.com/cpp/184403758
c++
null
null
null
null
null
open
Does ScopeGuard use really lead to better code? === I came across [this article][1] written by Andrei Alexandrescu and Petru Marginean many years ago, which presents and discusses a utility class called ScopeGuard for writing exception-safe code. I'd like to know if coding with these objects truly leads to better code or if it obfuscates error handling, in that perhaps the guard's callback would be better presented in a catch block? Does anyone have any experience using these in actual production code? [1]: http://www.ddj.com/cpp/184403758
0
48,659
09/07/2008 18:27:59
5,074
09/07/2008 17:50:27
1
0
How do you send and receive UDP packets in Java on a multihomed machine?
I have a machine with VmWare installed which added two extra network interfaces. The OS is Vista. I have two Java applications, one which broadcasts datagrams, and one which receives those datagrams. The problem I'm having is that unless I disable both VmWare network interfaces, the receiver can't receive the datagrams. What is the best way to make that work without disabling the interfaces?
java
null
null
null
null
null
open
How do you send and receive UDP packets in Java on a multihomed machine? === I have a machine with VmWare installed which added two extra network interfaces. The OS is Vista. I have two Java applications, one which broadcasts datagrams, and one which receives those datagrams. The problem I'm having is that unless I disable both VmWare network interfaces, the receiver can't receive the datagrams. What is the best way to make that work without disabling the interfaces?
0
48,668
09/07/2008 18:34:32
4,883
09/06/2008 10:24:59
224
0
How should anonymous types be used in C#?
I've seen lots of descriptions how anonymous types work, but I'm not sure how they're really useful. What are some scenarios that anonymous types can be used to address in a well-designed program?
c#
null
null
null
null
null
open
How should anonymous types be used in C#? === I've seen lots of descriptions how anonymous types work, but I'm not sure how they're really useful. What are some scenarios that anonymous types can be used to address in a well-designed program?
0
48,669
09/07/2008 18:36:12
2,757
08/24/2008 21:53:16
378
24
Are there any tools out there to compare the structure of 2 web pages?
I receive HTML pages from our creative team, and then use those to build aspx pages. One challenge I frequently face is getting the HTML I spit out to match theirs exactly. I almost always end up screwing up the nesting of &lt;div&gt;s between my page and the master pages. Does anyone know of a tool that will help in this situation -- something that will compare 2 pages and output the structural differences? I can't use a standard diff tool, because IDs change from what I receive from creative, text replaces <i>lorem ipsum</i>, etc..
html
dom
diff
asp.net
null
null
open
Are there any tools out there to compare the structure of 2 web pages? === I receive HTML pages from our creative team, and then use those to build aspx pages. One challenge I frequently face is getting the HTML I spit out to match theirs exactly. I almost always end up screwing up the nesting of &lt;div&gt;s between my page and the master pages. Does anyone know of a tool that will help in this situation -- something that will compare 2 pages and output the structural differences? I can't use a standard diff tool, because IDs change from what I receive from creative, text replaces <i>lorem ipsum</i>, etc..
0
48,679
09/07/2008 18:56:33
5,080
09/07/2008 18:56:33
1
0
Copy a file without using the windows file cache
Anybody know of a way to copy a file from path A to path B and suppressing the Windows file system cache.<br> Typical use is copying a large file from a USB drive, or server to your local machine. Windows seems to swap everything out if the file is really big, ie 2gb. Prefer example in C#, but I'm guessing this would be a Win32 call of some sort if possible. Thanks, Ruvan
windows
c#
filesystem
winapi
null
null
open
Copy a file without using the windows file cache === Anybody know of a way to copy a file from path A to path B and suppressing the Windows file system cache.<br> Typical use is copying a large file from a USB drive, or server to your local machine. Windows seems to swap everything out if the file is really big, ie 2gb. Prefer example in C#, but I'm guessing this would be a Win32 call of some sort if possible. Thanks, Ruvan
0
48,680
09/07/2008 18:57:24
1,736
08/18/2008 11:29:16
167
10
Winforms c# - Set focus to first child control of tab page.
Say I have a `Textbox` nested within a `TabControl`. When the form loads I would like to focus on that textbox (by default the focus is set to the tabControl). Simply calling `textbox1.focus()` in the `Load` event of the form does not appear to work. I have been able to focus it by doing the following: private void frmMainLoad(object sender, EventArgs e) { foreach (TabPage tab in this.tabControl1.TabPages) { this.tabControl1.SelectedTab = tab; } } **My question is:** **Is there a more elegant way to do this?**
c#
.net
winforms
null
null
null
open
Winforms c# - Set focus to first child control of tab page. === Say I have a `Textbox` nested within a `TabControl`. When the form loads I would like to focus on that textbox (by default the focus is set to the tabControl). Simply calling `textbox1.focus()` in the `Load` event of the form does not appear to work. I have been able to focus it by doing the following: private void frmMainLoad(object sender, EventArgs e) { foreach (TabPage tab in this.tabControl1.TabPages) { this.tabControl1.SelectedTab = tab; } } **My question is:** **Is there a more elegant way to do this?**
0
48,681
09/07/2008 18:57:35
4,491
09/04/2008 06:44:23
95
2
Pros/Cons of Django vs Pylons
I'm begining a new webapp in Python. I've narrowed my choices down to Django and Pylons. What are the pros/cons of each?
python
django
pylons
null
null
03/07/2012 11:38:55
not constructive
Pros/Cons of Django vs Pylons === I'm begining a new webapp in Python. I've narrowed my choices down to Django and Pylons. What are the pros/cons of each?
4
48,688
09/07/2008 19:07:50
4,694
09/05/2008 09:30:26
36
6
How to save persistent objects databound to a DataLayoutControl (DevExpress tools) ?
I have a small form displaying the DataLayoutControl component. If I use a GridControl the objects get saved. If I use the DataLayoutControl (which shows them individually) they do not get saved after they are changed. The underlying object is changed after the user interface edits, but doesn't get saved. How can I enable this ? PS: I have tried UnitOfWork.CommitChanges (i have one uow going through the whole architecture) to no avail.
devexpress
xpo
null
null
null
null
open
How to save persistent objects databound to a DataLayoutControl (DevExpress tools) ? === I have a small form displaying the DataLayoutControl component. If I use a GridControl the objects get saved. If I use the DataLayoutControl (which shows them individually) they do not get saved after they are changed. The underlying object is changed after the user interface edits, but doesn't get saved. How can I enable this ? PS: I have tried UnitOfWork.CommitChanges (i have one uow going through the whole architecture) to no avail.
0
48,726
09/07/2008 19:56:07
5,076
09/07/2008 18:26:03
41
1
Best javascript i18n techniques / AJAX - dates, times, numbers, currency
For server side generated content, i18n support is usually pretty easy, for example, Java provides extensive i18n support. But, these rich server side libraries are not available within the browser, which causes a problem when trying to format data client side (AJAX style.) What javascript libraries and techniques are recommended for performing client side formatting and time-zone calculations? Also - beyond simple client side formatting, how can consistency be achieved when performing both server side and client side formatting?
javascript
ajax
internationalization
null
null
null
open
Best javascript i18n techniques / AJAX - dates, times, numbers, currency === For server side generated content, i18n support is usually pretty easy, for example, Java provides extensive i18n support. But, these rich server side libraries are not available within the browser, which causes a problem when trying to format data client side (AJAX style.) What javascript libraries and techniques are recommended for performing client side formatting and time-zone calculations? Also - beyond simple client side formatting, how can consistency be achieved when performing both server side and client side formatting?
0
48,732
09/07/2008 20:07:59
1,583
08/16/2008 20:54:12
311
11
What are your top design consideration?
When designing and writing code, after "make it work" what are your top design considerations?
design
software-engineering
null
null
null
07/03/2012 12:38:45
not constructive
What are your top design consideration? === When designing and writing code, after "make it work" what are your top design considerations?
4
48,733
09/07/2008 20:09:11
48,310
09/07/2008 10:55:41
26
4
java/hibernate (jpa) designing the server data reload
Our design has a jboss/webapp that is used to maintain the data via hibernate (using jpa) to the db. The model has 10-15 persistent classes with 3-5 levels of depth in the relationships. We then have a separate jvm that is the server using this data. As it is running continuously we just have one long db session. Now when the webapp changes some data, it signals the server to reload the changed data. What we have found is that we need to tell hibernate to purge the data and then reload it. Just doing a fetch/merge with the db does not do the job - mainly in respect of the objects several layers down the hierarchy. Any thoughts on whether there is anything fundamentally wrong with this design or if anyone is doing this and has had better luck with working with hibernate on the reloads. Thanks, Chris
java
hibernate
null
null
null
null
open
java/hibernate (jpa) designing the server data reload === Our design has a jboss/webapp that is used to maintain the data via hibernate (using jpa) to the db. The model has 10-15 persistent classes with 3-5 levels of depth in the relationships. We then have a separate jvm that is the server using this data. As it is running continuously we just have one long db session. Now when the webapp changes some data, it signals the server to reload the changed data. What we have found is that we need to tell hibernate to purge the data and then reload it. Just doing a fetch/merge with the db does not do the job - mainly in respect of the objects several layers down the hierarchy. Any thoughts on whether there is anything fundamentally wrong with this design or if anyone is doing this and has had better luck with working with hibernate on the reloads. Thanks, Chris
0
48,744
09/07/2008 20:18:50
4,857
09/06/2008 03:07:01
15
2
How Do You ... find the phone numbers in 50,000 HTML pages?
The Fizzbuzz question here at stackoverflow led me to this Question.<br><br> *I loved the reponses ... And I thought others might enjoy this too !* Jeff listed 5 Questions in his a blog which he thought would test the metal of programmers applying for jobs.<br>[Jeff´s Original Post][1] \#3 was scripting and regexes ... And posts such as the following make me desire more ore in my metal ... > It seriously frightens me that there > are programmers out there who can not > solve that phone number problem in a > full hour. That should take more like > 2 minutes! If you can't answer that, > go live in a cave. > > Seriously, now I know where those code > examples at the DailyWTF must come > from. (Well, that and chachaching, > apparently.) > > Proposed new regex challenge: write a > script to find where those programmers > are working and fire them all before > they bankrupt their companies or get > somebody killed. Clifton on January > 23, 2008 02:09 PM And for anyone but Clifton an answer in the next 2minutes isn´t sought after. [1]: http://www.codinghorror.com/blog/archives/001042.html
language-agnostic
interview-questions
fun
null
null
null
open
How Do You ... find the phone numbers in 50,000 HTML pages? === The Fizzbuzz question here at stackoverflow led me to this Question.<br><br> *I loved the reponses ... And I thought others might enjoy this too !* Jeff listed 5 Questions in his a blog which he thought would test the metal of programmers applying for jobs.<br>[Jeff´s Original Post][1] \#3 was scripting and regexes ... And posts such as the following make me desire more ore in my metal ... > It seriously frightens me that there > are programmers out there who can not > solve that phone number problem in a > full hour. That should take more like > 2 minutes! If you can't answer that, > go live in a cave. > > Seriously, now I know where those code > examples at the DailyWTF must come > from. (Well, that and chachaching, > apparently.) > > Proposed new regex challenge: write a > script to find where those programmers > are working and fire them all before > they bankrupt their companies or get > somebody killed. Clifton on January > 23, 2008 02:09 PM And for anyone but Clifton an answer in the next 2minutes isn´t sought after. [1]: http://www.codinghorror.com/blog/archives/001042.html
0
48,750
09/07/2008 20:24:24
4,903
09/06/2008 14:16:54
58
4
Is it wrong to get feedback from Stack Overflow on a live system architecture?
I am the technical director at a startup, and I will eventually be tasked with implementing a "real" system architecture when we hire more programmers. Right now our clients are small enough, and it is just me, so documented deployments, source control, unit tests and quality assurance servers are non-existent. Eventually I will need to devise a work-flow and architecture patterns for the majority of the work we will do (e-commerce). If I posted an architecture diagram, and asked for feedback, would that be a misuse of the Stack Overflow system? I don't want to get into that battle of "hey, don't ask us to do your job for you", but the reality is that any programmer who eventually moves into this realm will have to figure it out with feedback from other developers. HighScalability.com is what comes to mind when I think about this sorta thing in terms of the knowledge I need. So if this is not the right kind of forum for that, then any book recommendations or white papers you can recommend would be appreciated.
architecture
books
resouces
null
null
null
open
Is it wrong to get feedback from Stack Overflow on a live system architecture? === I am the technical director at a startup, and I will eventually be tasked with implementing a "real" system architecture when we hire more programmers. Right now our clients are small enough, and it is just me, so documented deployments, source control, unit tests and quality assurance servers are non-existent. Eventually I will need to devise a work-flow and architecture patterns for the majority of the work we will do (e-commerce). If I posted an architecture diagram, and asked for feedback, would that be a misuse of the Stack Overflow system? I don't want to get into that battle of "hey, don't ask us to do your job for you", but the reality is that any programmer who eventually moves into this realm will have to figure it out with feedback from other developers. HighScalability.com is what comes to mind when I think about this sorta thing in terms of the knowledge I need. So if this is not the right kind of forum for that, then any book recommendations or white papers you can recommend would be appreciated.
0
48,755
09/07/2008 20:28:46
3,475
08/28/2008 17:53:18
100
5
When should a method be static?
In addition, are there any performance advantages to static methods over instance methods? I came across the following recently: http://www.cafeaulait.org/course/week4/22.html I would be very interested in the feedback of the Stack Overflow community on this.
static
language-agnostic
null
null
null
null
open
When should a method be static? === In addition, are there any performance advantages to static methods over instance methods? I came across the following recently: http://www.cafeaulait.org/course/week4/22.html I would be very interested in the feedback of the Stack Overflow community on this.
0
48,757
09/07/2008 20:32:40
1,154
08/12/2008 23:39:07
384
41
Unhandled exceptions filter in a windows service
I am creating a windows service and want to know best practices for this. In all my windows Program I have a form that asks the user if he wants to report the error and if he answers yes I created a case in FogBugz. What should I do in a windows service.
.net
windows-service
exception
null
null
null
open
Unhandled exceptions filter in a windows service === I am creating a windows service and want to know best practices for this. In all my windows Program I have a form that asks the user if he wants to report the error and if he answers yes I created a case in FogBugz. What should I do in a windows service.
0
48,772
09/07/2008 20:49:56
1,638
08/17/2008 17:58:57
474
47
How do I create a foreign key in mssql?
I have never "hand coded" creation code for mssql and foreign key deceleration is seemingly different from MsSql and Postgres...here is my sql so far: <pre> <code> drop table exams; drop table question_bank; drop table anwser_bank; create table exams ( exam_id uniqueidentifier primary key, exam_name varchar(50), ); create table question_bank ( question_id uniqueidentifier primary key, question_exam_id uniqueidentifier not null, question_text varchar(1024) not null, question_point_value decimal, constraint question_exam_id foreign key references exams(exam_id) ); create table anwser_bank ( anwser_id uniqueidentifier primary key, anwser_question_id uniqueidentifier, anwser_text varchar(1024), anwser_is_correct bit ); </code> </pre> when I run the query I get this error: Msg 8139, Level 16, State 0, Line 9 Number of referencing columns in foreign key differs from number of referenced columns, table 'question_bank'. Can you spot the error? thanks.
sql
sql-server
mssql
tsql
null
null
open
How do I create a foreign key in mssql? === I have never "hand coded" creation code for mssql and foreign key deceleration is seemingly different from MsSql and Postgres...here is my sql so far: <pre> <code> drop table exams; drop table question_bank; drop table anwser_bank; create table exams ( exam_id uniqueidentifier primary key, exam_name varchar(50), ); create table question_bank ( question_id uniqueidentifier primary key, question_exam_id uniqueidentifier not null, question_text varchar(1024) not null, question_point_value decimal, constraint question_exam_id foreign key references exams(exam_id) ); create table anwser_bank ( anwser_id uniqueidentifier primary key, anwser_question_id uniqueidentifier, anwser_text varchar(1024), anwser_is_correct bit ); </code> </pre> when I run the query I get this error: Msg 8139, Level 16, State 0, Line 9 Number of referencing columns in foreign key differs from number of referenced columns, table 'question_bank'. Can you spot the error? thanks.
0
48,774
09/07/2008 20:51:35
79
08/01/2008 16:05:09
78
2
Boolean Expressions in Shell Scripts
What's the "right" way to do the following as a boolean expression? for i in `ls $1/resources`; do if [ $i != "database.db" ] then if [ $i != "tiles" ] then if [ $i != "map.pdf" ] then if [ $i != "map.png" ] then svn export -q $1/resources/$i ../MyProject/Resources/$i ...
bash
shell
expression
null
null
null
open
Boolean Expressions in Shell Scripts === What's the "right" way to do the following as a boolean expression? for i in `ls $1/resources`; do if [ $i != "database.db" ] then if [ $i != "tiles" ] then if [ $i != "map.pdf" ] then if [ $i != "map.png" ] then svn export -q $1/resources/$i ../MyProject/Resources/$i ...
0
48,777
09/07/2008 20:57:16
422
08/05/2008 15:11:55
917
47
Python: No module named core.exceptions
I'm trying to get Google AppEngine to work on my Debian box and am getting the following error when I try to access my page: <type 'exceptions.ImportError'>: No module named core.exceptions The same app works fine for me when I run it on my other Ubuntu box, so I know it's not a problem with the app itself. However, I need to get it working on this Debian box. It originally had python 2.4 but after AppEngine complained about it I installed the python2.5 and python2.5-dev packages (to no avail). I saw on this [Google Group post][1] that it may be due to the version of AppEngine and just to reinstall it, but that didn't work. Any ideas? [1]: http://groups.google.com/group/google-appengine/browse_thread/thread/8f2459d2df9d735a/df2b1e9bb76f87c0?show_docid=df2b1e9bb76f87c0&fwc=1
python
appengine
null
null
null
null
open
Python: No module named core.exceptions === I'm trying to get Google AppEngine to work on my Debian box and am getting the following error when I try to access my page: <type 'exceptions.ImportError'>: No module named core.exceptions The same app works fine for me when I run it on my other Ubuntu box, so I know it's not a problem with the app itself. However, I need to get it working on this Debian box. It originally had python 2.4 but after AppEngine complained about it I installed the python2.5 and python2.5-dev packages (to no avail). I saw on this [Google Group post][1] that it may be due to the version of AppEngine and just to reinstall it, but that didn't work. Any ideas? [1]: http://groups.google.com/group/google-appengine/browse_thread/thread/8f2459d2df9d735a/df2b1e9bb76f87c0?show_docid=df2b1e9bb76f87c0&fwc=1
0
48,782
09/07/2008 21:00:06
1,360
08/14/2008 18:11:31
65
13
TinyMCE vs Xinha
I have to choose an online WYSIWYG editor. I'm pending between [TinyMCE][1] and [Xinha][2]. My application is developed in Asp.Net 3.5. Could you help me with with some pros and cons? [1]: http://tinymce.moxiecode.com/ [2]: http://trac.xinha.org/
html
editor
tinymce
wsyiswyg
null
null
open
TinyMCE vs Xinha === I have to choose an online WYSIWYG editor. I'm pending between [TinyMCE][1] and [Xinha][2]. My application is developed in Asp.Net 3.5. Could you help me with with some pros and cons? [1]: http://tinymce.moxiecode.com/ [2]: http://trac.xinha.org/
0
48,794
09/07/2008 21:16:55
481
08/06/2008 08:40:41
31
6
Html.RenderPartial call from masterpage
Here is a scenario: Let's say I have site with two controllers responsible for displaying different type of content - Pages and Articles. I need to embed Partial View into my masterpage that will list pages and articles filtered with some criteria, and be displayed on each page. I cannot set Model on my masterpage (am I right?). How do I solve this task using Html.RenderPartial?
asp.net
asp.net-mvc
renterpartial
master-pages
null
null
open
Html.RenderPartial call from masterpage === Here is a scenario: Let's say I have site with two controllers responsible for displaying different type of content - Pages and Articles. I need to embed Partial View into my masterpage that will list pages and articles filtered with some criteria, and be displayed on each page. I cannot set Model on my masterpage (am I right?). How do I solve this task using Html.RenderPartial?
0
48,805
09/07/2008 21:26:29
2,757
08/24/2008 21:53:16
387
26
How do you access browser history?
<a href="http://www.semanticator.com/">Semanticator</a> is an e-Marketing tool that chooses which web page to display based on where you were before. That is, if you've been browsing truck sites and then go to Ford.com, your first page would be of the Ford Explorer. I know you can get the immediate preceding page with HTTP_REFERRER, but how do you know where they were 6 sites ago?
browser
history
null
null
null
null
open
How do you access browser history? === <a href="http://www.semanticator.com/">Semanticator</a> is an e-Marketing tool that chooses which web page to display based on where you were before. That is, if you've been browsing truck sites and then go to Ford.com, your first page would be of the Ford Explorer. I know you can get the immediate preceding page with HTTP_REFERRER, but how do you know where they were 6 sites ago?
0
48,817
09/07/2008 21:40:27
4,984
09/07/2008 08:11:30
1
0
Where to find resources on Refactoring?
Besides Martin Fowler's seminal book "[Refactoring - Improving the design of existing code][1]" and Joshua Kerievsky's book "[Refactoring to Patterns][2]", are there any good resources on refactoring? [1]: http://www.amazon.com/Refactoring-Improving-Existing-Addison-Wesley-Technology/dp/0201485672/ref=pd_bbs_sr_1?ie=UTF8&s=books&qid=1220823304&sr=8-1 [2]: http://www.amazon.com/Refactoring-Patterns-Addison-Wesley-Signature-Kerievsky/dp/0321213351/ref=pd_bbs_sr_2?ie=UTF8&s=books&qid=1220823304&sr=8-2
refactoring
null
null
null
null
null
open
Where to find resources on Refactoring? === Besides Martin Fowler's seminal book "[Refactoring - Improving the design of existing code][1]" and Joshua Kerievsky's book "[Refactoring to Patterns][2]", are there any good resources on refactoring? [1]: http://www.amazon.com/Refactoring-Improving-Existing-Addison-Wesley-Technology/dp/0201485672/ref=pd_bbs_sr_1?ie=UTF8&s=books&qid=1220823304&sr=8-1 [2]: http://www.amazon.com/Refactoring-Patterns-Addison-Wesley-Signature-Kerievsky/dp/0321213351/ref=pd_bbs_sr_2?ie=UTF8&s=books&qid=1220823304&sr=8-2
0
48,839
09/07/2008 22:13:44
4,141
09/02/2008 01:28:28
16
1
Pricing for Agile Development
I hear very positive things about Agile Development, in particular as a way to keep the customer involved throughout the process, and therefore maximising the likelihood of building what the customer actually needs. The issue I have is the vast majority of new/potential customers want fixed quotes which to my mind forces us down the predictive rather than adaptive path. What pricing structures have folk here had success with on agile projects?
agile
null
null
null
null
null
open
Pricing for Agile Development === I hear very positive things about Agile Development, in particular as a way to keep the customer involved throughout the process, and therefore maximising the likelihood of building what the customer actually needs. The issue I have is the vast majority of new/potential customers want fixed quotes which to my mind forces us down the predictive rather than adaptive path. What pricing structures have folk here had success with on agile projects?
0
48,844
09/07/2008 22:24:27
5,095
09/07/2008 20:09:12
1
0
Is the Mono Developer Support from Novell worth it?
My company are thinking about using Mono for an upcoming product, so we were thinking about the $12,995 [Mono Kickstart](http://www.mono-project.com/Kickstart) support from Novell. Anybody here used it, is it worth it?
mono
null
null
null
null
null
open
Is the Mono Developer Support from Novell worth it? === My company are thinking about using Mono for an upcoming product, so we were thinking about the $12,995 [Mono Kickstart](http://www.mono-project.com/Kickstart) support from Novell. Anybody here used it, is it worth it?
0
48,859
09/07/2008 22:46:37
5,077
09/07/2008 18:38:49
11
4
Detecting Client Disconnects in Web Services
I'm using the [Apache CXF][1] Web Services stack. When a client times out or disconnects from the server before the operation is complete, the server keeps running the operation until it is complete. I would like to have the server detect when the client disconnects and handle that accordingly. Is there a way to detect when a client disconnects using Apache CXF? What about using other Java web-services stacks? [1]: http://cxf.apache.org/
java
web-services
cxf
null
null
null
open
Detecting Client Disconnects in Web Services === I'm using the [Apache CXF][1] Web Services stack. When a client times out or disconnects from the server before the operation is complete, the server keeps running the operation until it is complete. I would like to have the server detect when the client disconnects and handle that accordingly. Is there a way to detect when a client disconnects using Apache CXF? What about using other Java web-services stacks? [1]: http://cxf.apache.org/
0
48,864
09/07/2008 22:51:42
5,056
09/07/2008 15:43:17
48
9
What is this Icarus thing that comes with MbUnit?
I've had to install MbUnit multiple times now and it keeps coming with something called the Gallilo Icarus GUI Test Runner. I have tried using it thinking it was just an update to the MbUnit GUI but it won't detect my MbUnit tests and sometimes won't even open the assemblies properly. Perhaps I'm just overlooking it but I haven't been able to find much of an answer on their website either except that it has something to do with a new testing platform. Can someone give me a better explanation of what this is?
tdd
mbunit
null
null
null
null
open
What is this Icarus thing that comes with MbUnit? === I've had to install MbUnit multiple times now and it keeps coming with something called the Gallilo Icarus GUI Test Runner. I have tried using it thinking it was just an update to the MbUnit GUI but it won't detect my MbUnit tests and sometimes won't even open the assemblies properly. Perhaps I'm just overlooking it but I haven't been able to find much of an answer on their website either except that it has something to do with a new testing platform. Can someone give me a better explanation of what this is?
0
48,872
09/07/2008 23:01:20
100
08/01/2008 20:41:59
974
36
Why/when should you use nested classes in .net? Or shouldn't you?
In [Kathleen Dollard's recent blog post][1], she presents an interesting reason to use nested classes in .net. However, she also mentions that FxCop doesn't like nested classes. I'm assuming that the people writing FxCop rules aren't stupid, so there must be reasoning behind that position, but I haven't been able to find it. [1]: http://msmvps.com/blogs/kathleen/archive/2008/09/05/in-praise-of-nested-classes.aspx
.net
fxcop
nestedclasses
null
null
null
open
Why/when should you use nested classes in .net? Or shouldn't you? === In [Kathleen Dollard's recent blog post][1], she presents an interesting reason to use nested classes in .net. However, she also mentions that FxCop doesn't like nested classes. I'm assuming that the people writing FxCop rules aren't stupid, so there must be reasoning behind that position, but I haven't been able to find it. [1]: http://msmvps.com/blogs/kathleen/archive/2008/09/05/in-praise-of-nested-classes.aspx
0
48,877
09/07/2008 23:09:31
4,883
09/06/2008 10:24:59
239
0
Choosing between AJAX, Flex and Silverlight
AJAX, Flex and Silverlight are a few ways to make more interactive web applications. What kinds of factors would you consider when deciding which to use for a new web app? Does any one of them offer better cross-platform compatibility, performance, developer tools or community support?
untagged
null
null
null
null
07/23/2012 05:53:16
not constructive
Choosing between AJAX, Flex and Silverlight === AJAX, Flex and Silverlight are a few ways to make more interactive web applications. What kinds of factors would you consider when deciding which to use for a new web app? Does any one of them offer better cross-platform compatibility, performance, developer tools or community support?
4
48,884
09/07/2008 23:18:33
2,678
08/24/2008 14:30:46
33
1
Amazon API library for Python?
What Python libraries do folks use for querying Amazon product data? (Amazon Associates Web Service - used to be called E-Commerce API, or something along those lines). Based on my research, PyAWS (http://pyaws.sourceforge.net/) seems okay, but still pretty raw (and hasn't been updated in a while). Wondering if there's an obvious canonical library that I'm just missing.
python
amazon
null
null
null
null
open
Amazon API library for Python? === What Python libraries do folks use for querying Amazon product data? (Amazon Associates Web Service - used to be called E-Commerce API, or something along those lines). Based on my research, PyAWS (http://pyaws.sourceforge.net/) seems okay, but still pretty raw (and hasn't been updated in a while). Wondering if there's an obvious canonical library that I'm just missing.
0
48,905
09/07/2008 23:46:50
5,113
09/07/2008 23:46:50
1
0
Fundeps and GADTs: When is type checking decidable?
I was reading a research paper about Haskell and how HList is implemented and wondering when the techniques described are and are not decidable for the type checker. Also, because you can do similar things with GADTs, I was wondering if GADT type checking is always decidable. I would prefer citations if you have them so I can read/understand the explanations. Thanks!
haskell
typeinference
decidability
fundeps
gadt
null
open
Fundeps and GADTs: When is type checking decidable? === I was reading a research paper about Haskell and how HList is implemented and wondering when the techniques described are and are not decidable for the type checker. Also, because you can do similar things with GADTs, I was wondering if GADT type checking is always decidable. I would prefer citations if you have them so I can read/understand the explanations. Thanks!
0
48,908
09/08/2008 00:00:32
277
08/04/2008 10:55:22
454
18
How Do Sockets Work in C?
I am a bit confused about socket programming in C. You create a socket, bind it to an interface and an IP address and get it to listen. I found a couple of web resources on that, and understood it fine. In particular, I found an article [Network programming under Unix systems][1] to be very informative. What confuses me is the timing of data arriving on the socket. How can you tell when packets arrive, and how big the packet is, do you have to do all the heavy lifting yourself? My basic assumption here is that packets can be of variable length, so once binary data starts appearing down the socket, how do you begin to construct packets from that? [1]: http://users.actcom.co.il/~choo/lupg/tutorials/internetworking/internet-theory.html
c
sockets
network-programming
null
null
null
open
How Do Sockets Work in C? === I am a bit confused about socket programming in C. You create a socket, bind it to an interface and an IP address and get it to listen. I found a couple of web resources on that, and understood it fine. In particular, I found an article [Network programming under Unix systems][1] to be very informative. What confuses me is the timing of data arriving on the socket. How can you tell when packets arrive, and how big the packet is, do you have to do all the heavy lifting yourself? My basic assumption here is that packets can be of variable length, so once binary data starts appearing down the socket, how do you begin to construct packets from that? [1]: http://users.actcom.co.il/~choo/lupg/tutorials/internetworking/internet-theory.html
0
48,919
09/08/2008 00:15:50
2,469
08/22/2008 12:41:47
502
37
Javascript make the web broswer srcoll to the top?
What is the Javascript to scroll to the top when a button/link/etc. . . clicked?
javascript
website
null
null
null
null
open
Javascript make the web broswer srcoll to the top? === What is the Javascript to scroll to the top when a button/link/etc. . . clicked?
0
48,931
09/08/2008 00:29:58
5,114
09/08/2008 00:02:38
1
0
How to read bound hover callback functions in jquery
I used jquery to set hover callbacks for elements on my page. I'm now writing a module which needs to temporarily set new hover behavior for some elements. The new module has no access to the original code for the hover functions. I want to store the old hover functions before I set new ones so I can restore them when finished with the temporary hover behavior. I think these can be stored using the jquery.data() function: //save old hover behavior (somehow) $('#foo').data('oldhoverin',???) $('#foo').data('oldhoverout',???); //set new hover behavior $('#foo').hover(newhoverin,newhoverout); Do stuff with new hover behavior... //restore old hover behavior $('#foo').hover($('#foo').data('oldhoverin'),$('#foo').data('oldhoverout')); But how do I get the currently registered hover functions from jquery?
javascript
jquery
callback
null
null
null
open
How to read bound hover callback functions in jquery === I used jquery to set hover callbacks for elements on my page. I'm now writing a module which needs to temporarily set new hover behavior for some elements. The new module has no access to the original code for the hover functions. I want to store the old hover functions before I set new ones so I can restore them when finished with the temporary hover behavior. I think these can be stored using the jquery.data() function: //save old hover behavior (somehow) $('#foo').data('oldhoverin',???) $('#foo').data('oldhoverout',???); //set new hover behavior $('#foo').hover(newhoverin,newhoverout); Do stuff with new hover behavior... //restore old hover behavior $('#foo').hover($('#foo').data('oldhoverin'),$('#foo').data('oldhoverout')); But how do I get the currently registered hover functions from jquery?
0
48,933
09/08/2008 00:32:56
4,037
09/01/2008 13:58:54
11
0
How do I list loaded plugins in Vim?
Does anybody know of a way to list up the "loaded plugins" in **Vim**? I know I should be keeping track of this kind of stuff myself but it would always be nice to be able to check the current status. Thanks
vim
plugins
null
null
null
null
open
How do I list loaded plugins in Vim? === Does anybody know of a way to list up the "loaded plugins" in **Vim**? I know I should be keeping track of this kind of stuff myself but it would always be nice to be able to check the current status. Thanks
0
48,934
09/08/2008 00:34:45
369
08/05/2008 08:33:43
1,006
59
In Delphi 7, why can I assign a value to a const?
I copied some Delphi code from one project to another, and found that it doesn't compile in the new project, though it did in the old one. The code looks something like this: procedure TForm1.CalculateGP(..) const Price : money = 0; begin ... Price := 1.0; ... end; So in the new project, Delphi complains that "left side cannot be assigned to" - understandable! But this code compiles in the old project. So my question is, **why**? Is there a compiler switch to allow consts to be reassigned? How does that even work? I thought consts were replaced by their values at compile time?
delphi
constants
null
null
null
null
open
In Delphi 7, why can I assign a value to a const? === I copied some Delphi code from one project to another, and found that it doesn't compile in the new project, though it did in the old one. The code looks something like this: procedure TForm1.CalculateGP(..) const Price : money = 0; begin ... Price := 1.0; ... end; So in the new project, Delphi complains that "left side cannot be assigned to" - understandable! But this code compiles in the old project. So my question is, **why**? Is there a compiler switch to allow consts to be reassigned? How does that even work? I thought consts were replaced by their values at compile time?
0
48,935
09/08/2008 00:35:47
146,637
08/01/2008 17:23:43
166
6
c# Using WPF and .net 3.5, how can i register a global hot key to say CTRL+SHIFT+(LETTER)
Im building an app in c# using WPF and i need it to bind to some keys. Ive found some links but not work well with my setup. Anyone done this before? also if i could bind to the windows key would be great.
c#
.net
windows
wpf
hotkey
null
open
c# Using WPF and .net 3.5, how can i register a global hot key to say CTRL+SHIFT+(LETTER) === Im building an app in c# using WPF and i need it to bind to some keys. Ive found some links but not work well with my setup. Anyone done this before? also if i could bind to the windows key would be great.
0
48,947
09/08/2008 00:53:34
4,960
09/07/2008 02:07:20
49
10
How do I implement a callback in PHP?
How are callbacks written in PHP?
php
null
null
null
null
null
open
How do I implement a callback in PHP? === How are callbacks written in PHP?
0
48,972
09/08/2008 01:29:38
5,118
09/08/2008 00:23:26
1
0
Which Washington DC area school would you recommend for a masters degree in computer science?
I'm doing research on which grad school I should go to in the Washington DC area. I'd be going part time as I have full time employment as a software engineer in the metro area.
education
null
null
null
null
09/27/2011 12:46:48
not constructive
Which Washington DC area school would you recommend for a masters degree in computer science? === I'm doing research on which grad school I should go to in the Washington DC area. I'd be going part time as I have full time employment as a software engineer in the metro area.
4
48,984
09/08/2008 01:42:20
2,975
08/26/2008 09:40:04
915
39
Is there a way to make WatiN click a link before the page finishes loading
We're using WatiN for testing our UI, but one page (which is unfortunately not under our teams control) takes forever to finish loading. Is there a way to get WatiN to click a link on the page before the page finishes rendering completely?
unit-testing
automated-tests
watin
null
null
null
open
Is there a way to make WatiN click a link before the page finishes loading === We're using WatiN for testing our UI, but one page (which is unfortunately not under our teams control) takes forever to finish loading. Is there a way to get WatiN to click a link on the page before the page finishes rendering completely?
0
48,992
09/08/2008 01:50:28
5,119
09/08/2008 00:33:07
1
4
Best SVN Tools
Just wanted to see what tools for SVN people use, perhaps i can find some new cool ones. Im pretty much standard right now, ankh and tortoise.
svn
version-control
svn-tools
null
null
10/19/2011 11:27:57
not constructive
Best SVN Tools === Just wanted to see what tools for SVN people use, perhaps i can find some new cool ones. Im pretty much standard right now, ankh and tortoise.
4
48,993
09/08/2008 01:51:01
364
08/05/2008 05:33:41
527
30
Linking combo box (JQuery preferrably)
I am wondering if anyone has any experience using a JQuery plugin that converts a html <select> <option> Blah </option> </select> combo box into something (probably a div) where selecting an item acts the same as clicking a link. I guess you could probably use javascript to handle a selection event (my javascript knowledge is a little in disrepair at the moment) and 'switch' on the value of the combo box but this seems like more of a hack. Your advice, experience and recommendations are appreciated.
javascript
html
jquery
combobox
null
null
open
Linking combo box (JQuery preferrably) === I am wondering if anyone has any experience using a JQuery plugin that converts a html <select> <option> Blah </option> </select> combo box into something (probably a div) where selecting an item acts the same as clicking a link. I guess you could probably use javascript to handle a selection event (my javascript knowledge is a little in disrepair at the moment) and 'switch' on the value of the combo box but this seems like more of a hack. Your advice, experience and recommendations are appreciated.
0
48,999
09/08/2008 01:55:28
5,123
09/08/2008 01:51:30
1
0
Getting DIV id based on x & y position
The problem I'm trying to solve is "What's at this position?" It's fairly trivial to get the x/y position (offset) of a DIV, but what about the reverse? How do I get the id of a DIV (or any element) given an x/y position?
javascript
null
null
null
null
null
open
Getting DIV id based on x & y position === The problem I'm trying to solve is "What's at this position?" It's fairly trivial to get the x/y position (offset) of a DIV, but what about the reverse? How do I get the id of a DIV (or any element) given an x/y position?
0
49,002
09/08/2008 01:58:15
4,883
09/06/2008 10:24:59
259
0
Prefer composition over inheritance?
Why prefer composition over inheritance? What trade-offs are there for each approach? When should you choose inheritance over composition?
oop
inheritance
null
null
null
null
open
Prefer composition over inheritance? === Why prefer composition over inheritance? What trade-offs are there for each approach? When should you choose inheritance over composition?
0
49,011
09/08/2008 02:08:07
720
08/08/2008 08:47:12
1,041
35
REST how to handle query parameters when put to resource?
I have a REST data service where I want to allow the users to create new items with HTTP PUT using different formats like json,xml,csv. Now I'm a little unsure how to best handle the format specification in the url: PUT -> /ressource/ID/json PUT -> /ressource/ID/xml or PUT -> /ressource/ID?format=json So what is the best way to specify a format indicator? If I specify the format with an query parameter and want to do a **PUT** how can I do this with curl? curl -T test/data.json -d "format=json" http://localhost:5000/ressource/33 does not work. curl -T test/data.json http://localhost:5000/update?format=json works, but I would rather let curl build the query parameters instead of adding them by myself.
html
rest
null
null
null
null
open
REST how to handle query parameters when put to resource? === I have a REST data service where I want to allow the users to create new items with HTTP PUT using different formats like json,xml,csv. Now I'm a little unsure how to best handle the format specification in the url: PUT -> /ressource/ID/json PUT -> /ressource/ID/xml or PUT -> /ressource/ID?format=json So what is the best way to specify a format indicator? If I specify the format with an query parameter and want to do a **PUT** how can I do this with curl? curl -T test/data.json -d "format=json" http://localhost:5000/ressource/33 does not work. curl -T test/data.json http://localhost:5000/update?format=json works, but I would rather let curl build the query parameters instead of adding them by myself.
0
49,019
09/08/2008 02:10:58
4,883
09/06/2008 10:24:59
259
0
What makes a good programming team?
I'm very interested in the community's input on this question: What are some characteristics of a good team of programmers? As a follow-up, what are your suggestions for a non-manager that wants to improve the team that they're on? It seems that some teams cooperate very well together and effectively deal with adversity. There are also teams that seem kind of "fragile," in that the team members aren't very happy, they aren't as productive, or things will fall apart if something goes wrong.
project-management
null
null
null
null
null
open
What makes a good programming team? === I'm very interested in the community's input on this question: What are some characteristics of a good team of programmers? As a follow-up, what are your suggestions for a non-manager that wants to improve the team that they're on? It seems that some teams cooperate very well together and effectively deal with adversity. There are also teams that seem kind of "fragile," in that the team members aren't very happy, they aren't as productive, or things will fall apart if something goes wrong.
0
49,035
09/08/2008 02:20:19
61
08/01/2008 14:21:00
1,179
87
What does the const operator mean when used with a method in C++?
Given a declaration like this: class A { public void Foo() const; }; What does it mean? Google turns up this: >Member functions should be declared with the const keyword after them if they can operate on a const (this) object. If the function is not declared const, in can not be applied to a const object, and the compiler will give an error message. But I find that somewhat confusing; can anyone out there put it in better terms? Thanks.
c++
null
null
null
null
null
open
What does the const operator mean when used with a method in C++? === Given a declaration like this: class A { public void Foo() const; }; What does it mean? Google turns up this: >Member functions should be declared with the const keyword after them if they can operate on a const (this) object. If the function is not declared const, in can not be applied to a const object, and the compiler will give an error message. But I find that somewhat confusing; can anyone out there put it in better terms? Thanks.
0
49,046
09/08/2008 02:31:38
5,065
09/07/2008 17:03:03
1
0
Different sizeof() results
Why does n not equal 8 in the following function? <pre> void foo(char cvalue[8]) { int n = sizeof (cvalue); } </pre> But n *does* equal 8 in this version of the function: <pre> void bar() { char cvalue[8]); int n = sizeof (cvalue); } </pre>
c++
null
null
null
null
null
open
Different sizeof() results === Why does n not equal 8 in the following function? <pre> void foo(char cvalue[8]) { int n = sizeof (cvalue); } </pre> But n *does* equal 8 in this version of the function: <pre> void bar() { char cvalue[8]); int n = sizeof (cvalue); } </pre>
0
49,066
09/08/2008 02:45:54
5,110
09/07/2008 22:57:07
1
1
Renaming the containing project folder in VS.net under TFS.
I have a vs.net project, and after some refactoring, have modified the name of the project. How can I easily rename the underlying windows folder name to match this new project name under a TFS controlled project and solution? Note, I used to be able to do by fiddling with things in the background using SourceSafe ...
vs2008
tfs
vs2005
folders
null
null
open
Renaming the containing project folder in VS.net under TFS. === I have a vs.net project, and after some refactoring, have modified the name of the project. How can I easily rename the underlying windows folder name to match this new project name under a TFS controlled project and solution? Note, I used to be able to do by fiddling with things in the background using SourceSafe ...
0
49,075
09/08/2008 02:51:07
826
08/09/2008 05:24:54
362
23
Adding command recall to a Unix command line application
I'm working on a command line application for Solaris, written in Java6. I'd like to be able to scroll through a history of previous commands using the up and down arrows like many Unix tools allow (shells, VIM command mode prompt, etc). Is there any standard way of achieving this, or do I have to roll my own?
java
unix
command-line
commandprompt
null
null
open
Adding command recall to a Unix command line application === I'm working on a command line application for Solaris, written in Java6. I'd like to be able to scroll through a history of previous commands using the up and down arrows like many Unix tools allow (shells, VIM command mode prompt, etc). Is there any standard way of achieving this, or do I have to roll my own?
0
49,080
09/08/2008 02:54:38
5,119
09/08/2008 00:33:07
13
9
What are the best Visual Studio addins?
I currently use Resharper and have for a few years now. I know there are a ton of other useful addins out there but i never seem to have the time to sort through them to see which is worthy of using. So i was hoping some of you would be able to help me do some sorting.
visual-studio-addins
visual-studio
null
null
null
null
open
What are the best Visual Studio addins? === I currently use Resharper and have for a few years now. I know there are a ton of other useful addins out there but i never seem to have the time to sort through them to see which is worthy of using. So i was hoping some of you would be able to help me do some sorting.
0
49,089
09/08/2008 02:59:53
4,337
09/02/2008 22:43:39
126
14
Where WCF and ADO.Net Data services stand?
I am bit confused about ADO.Net Data Services. Is it just meant for creating RESTful web services? I know WCF started in the SOAP world but now I hear it has good support for REST. Same goes for ADO.Net data services where you can make it work in an RPC model if you cannot look at everything from a resource oriented view. At least from the demos I saw recently, it looks like ADO.Net Data Services is built on WCF stack on the server. Please correct me if I am wrong. I am not intending to start a REST vs SOAP debate but I guess things are not that crystal clear anymore. Any suggestions or guidelines on what to use where?
wcf
rest
ado.net
null
null
null
open
Where WCF and ADO.Net Data services stand? === I am bit confused about ADO.Net Data Services. Is it just meant for creating RESTful web services? I know WCF started in the SOAP world but now I hear it has good support for REST. Same goes for ADO.Net data services where you can make it work in an RPC model if you cannot look at everything from a resource oriented view. At least from the demos I saw recently, it looks like ADO.Net Data Services is built on WCF stack on the server. Please correct me if I am wrong. I am not intending to start a REST vs SOAP debate but I guess things are not that crystal clear anymore. Any suggestions or guidelines on what to use where?
0
49,092
09/08/2008 03:00:53
2,653
08/23/2008 23:43:40
292
17
Online Interactive Consoles
Where can I find an online interactive console for my favorite language/api? * [Ruby][1] * Python? * PHP? * Perl? * Scheme? * Java? * C? [1]: http://tryruby.hobix.com/
online
interactive
repl
null
null
null
open
Online Interactive Consoles === Where can I find an online interactive console for my favorite language/api? * [Ruby][1] * Python? * PHP? * Perl? * Scheme? * Java? * C? [1]: http://tryruby.hobix.com/
0
49,098
09/08/2008 03:02:27
2,147
08/20/2008 15:14:13
1,247
78
Can cout alter variables somehow
So I have a function that looks something like this: float function(){ float x = SomeValue; return x / SomeOtherValue; } At some point, this function overflows and returns a really large negative value. To try and track down exactly where this was happening, I added a cout statement so that the function looked like this: float function(){ float x = SomeValue; cout << x; return x / SomeOtherValue; } and it worked! Of course, I solved the problem altogether by using a double. But I'm curious as to why the function worked properly when I couted it. Is this typical, or could there be a bug somewhere else that I'm missing? (If it's any help, the value stored in the float is just an integer value, and not a particularly big one. I just put it in a float to avoid casting.)
c++
double
float
cout
null
null
open
Can cout alter variables somehow === So I have a function that looks something like this: float function(){ float x = SomeValue; return x / SomeOtherValue; } At some point, this function overflows and returns a really large negative value. To try and track down exactly where this was happening, I added a cout statement so that the function looked like this: float function(){ float x = SomeValue; cout << x; return x / SomeOtherValue; } and it worked! Of course, I solved the problem altogether by using a double. But I'm curious as to why the function worked properly when I couted it. Is this typical, or could there be a bug somewhere else that I'm missing? (If it's any help, the value stored in the float is just an integer value, and not a particularly big one. I just put it in a float to avoid casting.)
0
49,107
09/08/2008 03:07:35
4,969
09/07/2008 04:56:11
1
1
What's the cleanest way to simulate pass-by-reference in Actionscript 3.0?
Actionscript 3.0 (and I assume Javascript and ECMAScript in general) lacks pass-by-reference for native types like ints. As a result I'm finding getting values back from a function really clunky. What's the normal pattern to work around this? For example, is there a clean way to implement _swap( intA, intB )_ in Actionscript?
actionscript-3
null
null
null
null
null
open
What's the cleanest way to simulate pass-by-reference in Actionscript 3.0? === Actionscript 3.0 (and I assume Javascript and ECMAScript in general) lacks pass-by-reference for native types like ints. As a result I'm finding getting values back from a function really clunky. What's the normal pattern to work around this? For example, is there a clean way to implement _swap( intA, intB )_ in Actionscript?
0
49,110
09/08/2008 03:10:28
3,535
08/29/2008 02:26:17
303
46
How do I write a for loop in bash
I'm looking for the basic loop like: for(int i = 0; i < MAX; i++) { doSomething(i); } but for bash.
bash
null
null
null
null
null
open
How do I write a for loop in bash === I'm looking for the basic loop like: for(int i = 0; i < MAX; i++) { doSomething(i); } but for bash.
0
49,134
09/08/2008 03:50:23
5,132
09/08/2008 03:37:55
1
0
What's the best .NET library for OpenID and ASP.NET MVC?
I'm looking at using OpenID for my authentication scheme and wanted to know what the best .NET library is to use for MVC specific applications? thx
openid
.net
authentication
null
null
09/19/2011 12:14:38
not constructive
What's the best .NET library for OpenID and ASP.NET MVC? === I'm looking at using OpenID for my authentication scheme and wanted to know what the best .NET library is to use for MVC specific applications? thx
4
49,137
09/08/2008 03:53:39
3,153
08/27/2008 02:45:05
675
29
Calling python from a c++ program for distribution
I would like to call python script files from my c++ program. I am not sure that the people I will distribute to will have python installed. Basically I'm looking for a .lib file that I can use that has an Apache like distribution license.
c++
python
null
null
null
null
open
Calling python from a c++ program for distribution === I would like to call python script files from my c++ program. I am not sure that the people I will distribute to will have python installed. Basically I'm looking for a .lib file that I can use that has an Apache like distribution license.
0
49,138
09/08/2008 03:54:15
2,281
08/21/2008 13:07:52
88
4
Storing MD5 Hash in SQL Server
In Sql Server would a varbinary(16) be the most efficient way of storing an MD5 hash? Won't be doing anything with it except returning it in a linq query.
sql-server
md5
null
null
null
null
open
Storing MD5 Hash in SQL Server === In Sql Server would a varbinary(16) be the most efficient way of storing an MD5 hash? Won't be doing anything with it except returning it in a linq query.
0
49,146
09/08/2008 03:59:57
4,491
09/04/2008 06:44:23
110
2
What is the best way to make an .exe file from a python program
I've used several modules to make .exe's for python which options/library is best? It has been some tome since i've done this and I'm curious if there are any new options etc.
python
windows
executable
exe
null
null
open
What is the best way to make an .exe file from a python program === I've used several modules to make .exe's for python which options/library is best? It has been some tome since i've done this and I'm curious if there are any new options etc.
0
49,147
09/08/2008 04:00:54
4,960
09/07/2008 02:07:20
106
12
How do I create a MessageBox in C# ?
I am trying to display a MessageBox when I click a button in C#. How do I do this?
c#
.net
null
null
null
null
open
How do I create a MessageBox in C# ? === I am trying to display a MessageBox when I click a button in C#. How do I do this?
0
49,156
09/08/2008 04:11:21
1,666
08/17/2008 21:07:18
779
51
Importing JavaScript in JSP tags
I have a .tag file that requires a javascript library (as in a .js file). Currently I am just remembering to import the .js file in every JSP that uses the tag but this is a bit cumbersome and prone to error. Is there a way to do the importing of the .js inside the JSP tag? *(for caching reasons I would want the .js to be a script import)*
java
jsp
jsp-tags
null
null
null
open
Importing JavaScript in JSP tags === I have a .tag file that requires a javascript library (as in a .js file). Currently I am just remembering to import the .js file in every JSP that uses the tag but this is a bit cumbersome and prone to error. Is there a way to do the importing of the .js inside the JSP tag? *(for caching reasons I would want the .js to be a script import)*
0
49,158
09/08/2008 04:11:48
3,847
08/31/2008 11:18:23
1
1
GreaseMonkey script to auto login using HTTP authentication
I've got quite a few GreaseMonkey scripts that I wrote at my work which automatically log me into the internal sites we have here. I've managed to write a script for nearly each one of these sites except for our time sheet application, which uses HTTP authentication. Is there a way I can use GreaseMonkey to log me into this site automatically?
javascript
http
authentication
greasemonkey
httpauthentication
null
open
GreaseMonkey script to auto login using HTTP authentication === I've got quite a few GreaseMonkey scripts that I wrote at my work which automatically log me into the internal sites we have here. I've managed to write a script for nearly each one of these sites except for our time sheet application, which uses HTTP authentication. Is there a way I can use GreaseMonkey to log me into this site automatically?
0
49,164
09/08/2008 04:21:22
4,491
09/04/2008 06:44:23
113
2
How do I turn a python program into an .egg file?
How do I turn a python program into an .egg file?
python
deployment
egg
null
null
null
open
How do I turn a python program into an .egg file? === How do I turn a python program into an .egg file?
0
49,166
09/08/2008 04:24:37
5,133
09/08/2008 04:08:48
26
1
Connecting to registry remotely, and getting exceptions
I've inherited a hoary old piece of code (by hoary, I mean warty with lots of undocumented bug fixes than WTF-y) and there's one part that's giving me a bit of trouble. Here's how it connects to the remote registry to get the add/remove programs key: try { remoteKey = RegistryKey.OpenRemoteBaseKey( RegistryHive.LocalMachine, addr.Value).OpenSubKey( "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall"); return 1; } catch (IOException e) { IOException myexception = e; //Console.WriteLine("{0}: {1}: {2}", // e.GetType().Name, e.Message, addr.Value); return 2; } catch (UnauthorizedAccessException e) { UnauthorizedAccessException myexception = e; //Console.WriteLine("{0}: {1}: {2}", // e.GetType().Name, e.Message, addr.Value); return 3; } catch (System.Security.SecurityException e) { System.Security.SecurityException myexception = e; //Console.WriteLine("{0}: {1}: {2}", // e.GetType().Name, e.Message, addr.Value); return 4; } Now, I have two problems: * I know why the IOException - if it's a non-Windows machine it'll throw that. The difference between UnauthorizedAccessException and SecurityException I'm not so clear on. Anyone got any ideas? * This entire bit of code was designed before anyone had thought you might not use your local logon for everything. I can't work out how you do authentication for remotely connecting to the registry, anyway, and this code looks like it's only used in one case, when it can't get this information from WMI. Any help with either would be great.
windows
c#
exception
null
null
null
open
Connecting to registry remotely, and getting exceptions === I've inherited a hoary old piece of code (by hoary, I mean warty with lots of undocumented bug fixes than WTF-y) and there's one part that's giving me a bit of trouble. Here's how it connects to the remote registry to get the add/remove programs key: try { remoteKey = RegistryKey.OpenRemoteBaseKey( RegistryHive.LocalMachine, addr.Value).OpenSubKey( "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall"); return 1; } catch (IOException e) { IOException myexception = e; //Console.WriteLine("{0}: {1}: {2}", // e.GetType().Name, e.Message, addr.Value); return 2; } catch (UnauthorizedAccessException e) { UnauthorizedAccessException myexception = e; //Console.WriteLine("{0}: {1}: {2}", // e.GetType().Name, e.Message, addr.Value); return 3; } catch (System.Security.SecurityException e) { System.Security.SecurityException myexception = e; //Console.WriteLine("{0}: {1}: {2}", // e.GetType().Name, e.Message, addr.Value); return 4; } Now, I have two problems: * I know why the IOException - if it's a non-Windows machine it'll throw that. The difference between UnauthorizedAccessException and SecurityException I'm not so clear on. Anyone got any ideas? * This entire bit of code was designed before anyone had thought you might not use your local logon for everything. I can't work out how you do authentication for remotely connecting to the registry, anyway, and this code looks like it's only used in one case, when it can't get this information from WMI. Any help with either would be great.
0
49,168
09/08/2008 04:29:51
3,153
08/27/2008 02:45:05
675
30
Embedding Perl inside a C++ application
I would like to call Perl script files from my c++ program. I am not sure that the people I will distribute to will have Perl installed. Basically I'm looking for a .lib file that I can use that has an Apache like distribution license.
c++
perl
null
null
null
null
open
Embedding Perl inside a C++ application === I would like to call Perl script files from my c++ program. I am not sure that the people I will distribute to will have Perl installed. Basically I'm looking for a .lib file that I can use that has an Apache like distribution license.
0
49,183
09/08/2008 04:57:32
45,603
08/25/2008 09:52:34
249
14
MFC: MessageBox during a Drag-Drop
I need to display an error message on rejecting a drop in my application. I tried this in the OnDrop() but then the source application hangs till my message box is dismissed. How?
mfc
drag-and-drop
null
null
null
null
open
MFC: MessageBox during a Drag-Drop === I need to display an error message on rejecting a drop in my application. I tried this in the OnDrop() but then the source application hangs till my message box is dismissed. How?
0
49,194
09/08/2008 05:18:12
364
08/05/2008 05:33:41
537
35
ASP.NET MVC Preview 4 - Stop Url.RouteUrl() etc. using existing parameters
I have an action like this: /* Inside TestController, route to this action is 'test-route' */ public ActionResult TestAction(String param) { /* ... */ } The URL that leads to this action looks like this: TestController.mvc/TestAction/param In the view this action redirects to I would like to have a form that can submit to this action different values for 'param'. I.e. the action should be: TestController.mvc/TestAction I have tried a few things, but if I recall correctly they all use a common method in the framework that prefills parameters where possible. Here is what I have tried: <form method="get" action="<%=Url.Action("TestAction")%>"> and <form method="get" action="<%=Url.RouteUrl("test-route")%>"> and <% using (Html.Form("TestController", "TestAction", FormMethod.Get)) { %> However, because param is already included in the URL for the page all of the rendered forms for these calls have an 'action' of TestController.mvc/TestAction/param. Can someone please let me know what I'm missing :-)
c#
asp.net-mvc
forms
routing
null
null
open
ASP.NET MVC Preview 4 - Stop Url.RouteUrl() etc. using existing parameters === I have an action like this: /* Inside TestController, route to this action is 'test-route' */ public ActionResult TestAction(String param) { /* ... */ } The URL that leads to this action looks like this: TestController.mvc/TestAction/param In the view this action redirects to I would like to have a form that can submit to this action different values for 'param'. I.e. the action should be: TestController.mvc/TestAction I have tried a few things, but if I recall correctly they all use a common method in the framework that prefills parameters where possible. Here is what I have tried: <form method="get" action="<%=Url.Action("TestAction")%>"> and <form method="get" action="<%=Url.RouteUrl("test-route")%>"> and <% using (Html.Form("TestController", "TestAction", FormMethod.Get)) { %> However, because param is already included in the URL for the page all of the rendered forms for these calls have an 'action' of TestController.mvc/TestAction/param. Can someone please let me know what I'm missing :-)
0
49,195
09/08/2008 05:23:35
2,592
08/23/2008 12:32:00
76
5
What language should i learn as a bridge to C (and derivatives)
The first language i learnt was PHP, but i have more recently picked up python. As these are all 'high-level' languages, i have found them a bit difficult to pick up. I tried a bit of objective-c, and i just gave up. So, what language should i learn to bridge between python to C
python
c
null
null
null
null
open
What language should i learn as a bridge to C (and derivatives) === The first language i learnt was PHP, but i have more recently picked up python. As these are all 'high-level' languages, i have found them a bit difficult to pick up. I tried a bit of objective-c, and i just gave up. So, what language should i learn to bridge between python to C
0
49,196
09/08/2008 05:25:01
342
08/04/2008 19:59:52
684
76
Storing third-party libraries in source control
Should libraries that the application relies on be stored in source control? One part of me says it should and another part say's no. It feels wrong to add a 20mb library that dwarfs the entire app just because you rely on a couple of functions from it (albeit rather heavily). Should you just store the jar/dll or maybe even the distributed zip/tar of the project? What do other people do?
version-control
null
null
null
null
null
open
Storing third-party libraries in source control === Should libraries that the application relies on be stored in source control? One part of me says it should and another part say's no. It feels wrong to add a 20mb library that dwarfs the entire app just because you rely on a couple of functions from it (albeit rather heavily). Should you just store the jar/dll or maybe even the distributed zip/tar of the project? What do other people do?
0
49,199
09/08/2008 05:28:16
4,906
09/06/2008 14:21:25
52
1
Is there a FLASH editor that supports intellisense & step-into debugging?
I'm considering using Flash but I'm pretty addicted to Intellisense and Step-at-a-time debugging.
ide
flash
null
null
null
null
open
Is there a FLASH editor that supports intellisense & step-into debugging? === I'm considering using Flash but I'm pretty addicted to Intellisense and Step-at-a-time debugging.
0
49,207
09/08/2008 05:38:42
1,068
08/12/2008 08:44:09
28
6
Cycle count measurement
I have a MS Visual Studio 2005 application solution. All the code is in C. I want to measure the number of cycles taken for execution by particular functions. Is there any Win32 API which i can use to get the cycle count. I have used gettimeofday() to get time in micro secs, but i want to know the cycles consumed? -AD
profiling
null
null
null
null
null
open
Cycle count measurement === I have a MS Visual Studio 2005 application solution. All the code is in C. I want to measure the number of cycles taken for execution by particular functions. Is there any Win32 API which i can use to get the cycle count. I have used gettimeofday() to get time in micro secs, but i want to know the cycles consumed? -AD
0
49,211
09/08/2008 05:42:23
4,916
09/06/2008 15:33:03
1
1
How can I use a key blob generated from Win32 CryptoAPI in my .NET application?
I have an existing application that is written in C++ for Windows. This application uses the Win32 CryptoAPI to generate a TripleDES session key for encrypting/decrypting data. We're using the [exponent of one trick][1] to export the session key out as a blob, which allows the blob to be stored somewhere in a decrypted format. The question is how can we use this in our .NET application (C#). The framework encapsulates/wraps much of what the CryptoAPI is doing. Part of the problem is the CryptAPI states that the TripleDES algorithm for the [Microsoft Enhanced Cryptographic Provider][2] is 168 bits (3 keys of 56 bits). However, the .NET framework states their keys are 192 bits (3 keys of 64 bits). Apparently, the 3 extra bytes in the .NET framework is for parity? Anyway, we need to read the key portion out of the blob and somehow be able to use that in our .NET application. Currently we are not getting the expected results when attempting to use the key in .NET. The decryption is failing miserably. Any help would be greatly appreciated. [1]: http://www.phdcc.com/cryptorc4.htm [2]: http://msdn.microsoft.com/en-us/library/aa386986(VS.85).aspx
.net
c++
cryptography
null
null
null
open
How can I use a key blob generated from Win32 CryptoAPI in my .NET application? === I have an existing application that is written in C++ for Windows. This application uses the Win32 CryptoAPI to generate a TripleDES session key for encrypting/decrypting data. We're using the [exponent of one trick][1] to export the session key out as a blob, which allows the blob to be stored somewhere in a decrypted format. The question is how can we use this in our .NET application (C#). The framework encapsulates/wraps much of what the CryptoAPI is doing. Part of the problem is the CryptAPI states that the TripleDES algorithm for the [Microsoft Enhanced Cryptographic Provider][2] is 168 bits (3 keys of 56 bits). However, the .NET framework states their keys are 192 bits (3 keys of 64 bits). Apparently, the 3 extra bytes in the .NET framework is for parity? Anyway, we need to read the key portion out of the blob and somehow be able to use that in our .NET application. Currently we are not getting the expected results when attempting to use the key in .NET. The decryption is failing miserably. Any help would be greatly appreciated. [1]: http://www.phdcc.com/cryptorc4.htm [2]: http://msdn.microsoft.com/en-us/library/aa386986(VS.85).aspx
0
49,214
09/08/2008 05:45:34
2,975
08/26/2008 09:40:04
940
41
Populating a list of integers in .NET
I need a list of integers from 1 to x where x is set by the user. I could build it with a for loop eg assuming x is an integer set previously: List<int> iList = new List<int>(); for (int i = 1; i <= x; i++) { iList.Add(i); } This seems dumb, surely there's a more elegant way to do this, something like the [PHP range method][1] [1]: http://au2.php.net/manual/en/function.range.php
c#
.net
list
integer
null
null
open
Populating a list of integers in .NET === I need a list of integers from 1 to x where x is set by the user. I could build it with a for loop eg assuming x is an integer set previously: List<int> iList = new List<int>(); for (int i = 1; i <= x; i++) { iList.Add(i); } This seems dumb, surely there's a more elegant way to do this, something like the [PHP range method][1] [1]: http://au2.php.net/manual/en/function.range.php
0
49,224
09/08/2008 06:10:43
3,153
08/27/2008 02:45:05
692
30
Good crash reporting library in c#
Does anyone know of a good crash reporting library for C#? In C++ there is CrashRpt available, so I'd like something along those lines. Ideally I'd like the library to zip up general information about the computer, and a crash mini dump file. I would also need a library that is free for commercial use and that has source code available.
c#
c++
crash
crashrpt
null
null
open
Good crash reporting library in c# === Does anyone know of a good crash reporting library for C#? In C++ there is CrashRpt available, so I'd like something along those lines. Ideally I'd like the library to zip up general information about the computer, and a crash mini dump file. I would also need a library that is free for commercial use and that has source code available.
0
49,226
09/08/2008 06:13:19
959
08/11/2008 05:23:02
70
8
128 bit data encryption using Java
I need to store some sensitive data by encrypting it with atleast 128 bit key. I investigated into javax.crypto package and found that there are certain Cipher names, like PBEWithMD5AndDES or PBEWithSHA1AndDESede which provides encryption upto 56 bit and 80 bit (http://en.wikipedia.org/wiki/Desede). I referred other guys posts but those are mainly using RSA and in my understanding RSA is generally suitable for encrypting the communication data (with private-public key pair). My need is different, I just want to store the data and retrieve it back by decrypting it. Therefore I don't need any private-public key pairs. Please let me know if you have any idea about this. Thanks in advance.
java
cryptography
null
null
null
null
open
128 bit data encryption using Java === I need to store some sensitive data by encrypting it with atleast 128 bit key. I investigated into javax.crypto package and found that there are certain Cipher names, like PBEWithMD5AndDES or PBEWithSHA1AndDESede which provides encryption upto 56 bit and 80 bit (http://en.wikipedia.org/wiki/Desede). I referred other guys posts but those are mainly using RSA and in my understanding RSA is generally suitable for encrypting the communication data (with private-public key pair). My need is different, I just want to store the data and retrieve it back by decrypting it. Therefore I don't need any private-public key pairs. Please let me know if you have any idea about this. Thanks in advance.
0
49,251
09/08/2008 06:53:06
1,084
08/12/2008 11:01:49
453
38
Crash reporting in C for Linux
Following this question: <a href="http://stackoverflow.com/questions/49224/good-crash-reporting-library-in-c">Good crash reporting library in c#</a> Is there any library like CrashRpt.dll that does the same on Linux? That is, generate a failure report including a core dump and any necessary environment and notify the developer about it?
c
linux
crashrpt
null
null
null
open
Crash reporting in C for Linux === Following this question: <a href="http://stackoverflow.com/questions/49224/good-crash-reporting-library-in-c">Good crash reporting library in c#</a> Is there any library like CrashRpt.dll that does the same on Linux? That is, generate a failure report including a core dump and any necessary environment and notify the developer about it?
0