question_id
int64
4
6.31M
answer_id
int64
7
6.31M
title
stringlengths
9
150
question_body
stringlengths
0
28.8k
answer_body
stringlengths
60
27.2k
question_text
stringlengths
40
28.9k
combined_text
stringlengths
124
39.6k
tags
listlengths
1
6
question_score
int64
0
26.3k
answer_score
int64
0
28.8k
view_count
int64
15
14M
answer_count
int64
0
182
favorite_count
int64
0
32
question_creation_date
stringdate
2008-07-31 21:42:52
2011-06-10 18:12:18
answer_creation_date
stringdate
2008-07-31 22:17:57
2011-06-10 18:14:17
77,013
77,049
Which open-source C++ database GUI project should I help with?
I am looking for an open-source project involving c++ GUI(s) working with a database. I have not done it before, and am looking for a way to get my feet wet. Which can I work on?
How about this one http://sourceforge.net/projects/sqlitebrowser/: SQLite Database browser is a light GUI editor for SQLite databases, built on top of QT. The main goal of the project is to allow non-technical users to create, modify and edit SQLite databases using a set of wizards and a spreadsheet-like interface.
Which open-source C++ database GUI project should I help with? I am looking for an open-source project involving c++ GUI(s) working with a database. I have not done it before, and am looking for a way to get my feet wet. Which can I work on?
TITLE: Which open-source C++ database GUI project should I help with? QUESTION: I am looking for an open-source project involving c++ GUI(s) working with a database. I have not done it before, and am looking for a way to get my feet wet. Which can I work on? ANSWER: How about this one http://sourceforge.net/projects/...
[ "c++", "database", "qt", "open-source", "qt4" ]
3
2
1,849
5
0
2008-09-16T20:59:34.563000
2008-09-16T21:02:42.670000
77,025
77,106
What is the best way the _DoPostBack javascript method in Asp.net
I want to set a breakpoint on the __DoPostBack method, but it's a pain to find the correct file to set the breakpoint in. The method __DoPostBack is contained in an auto-generated js file called something like: ScriptResource.axd?d=P_lo2... After a few post-backs visual studio gets littered with many of these files, an...
If you using IE7 for testing you can use View -> Script Debugger -> Break on next statement and then just click the button that generates the event(__DoPostBack)
What is the best way the _DoPostBack javascript method in Asp.net I want to set a breakpoint on the __DoPostBack method, but it's a pain to find the correct file to set the breakpoint in. The method __DoPostBack is contained in an auto-generated js file called something like: ScriptResource.axd?d=P_lo2... After a few p...
TITLE: What is the best way the _DoPostBack javascript method in Asp.net QUESTION: I want to set a breakpoint on the __DoPostBack method, but it's a pain to find the correct file to set the breakpoint in. The method __DoPostBack is contained in an auto-generated js file called something like: ScriptResource.axd?d=P_lo...
[ "asp.net", "asp.net-ajax" ]
1
0
3,125
2
0
2008-09-16T21:00:25.653000
2008-09-16T21:07:35.043000
77,034
77,448
How can I get Google Charts to display multiple colors in a scatter chart?
I would like to display multiple colors (and potentially shapes and sizes) of data points in a Google Chart scatter chart. Does anyone have an example of how to do so?
I answered my own question after waiting SECONDS for an answer here:-) You can indeed have different colors for different data elements. For example: http://chart.apis.google.com/chart?chs=300x200&cht=s&chd=t:1,2,3|6,5,4&chds=1,3,0,10&chxt=x,y&chxl=0:|0|1|2|1:|0|10&chm=d,ff0000,0,0,8,0|a,ff8080,0,1,42,0|c,ffff00,0,2,16...
How can I get Google Charts to display multiple colors in a scatter chart? I would like to display multiple colors (and potentially shapes and sizes) of data points in a Google Chart scatter chart. Does anyone have an example of how to do so?
TITLE: How can I get Google Charts to display multiple colors in a scatter chart? QUESTION: I would like to display multiple colors (and potentially shapes and sizes) of data points in a Google Chart scatter chart. Does anyone have an example of how to do so? ANSWER: I answered my own question after waiting SECONDS f...
[ "google-visualization", "scatter" ]
7
4
7,665
4
0
2008-09-16T21:01:16.323000
2008-09-16T21:41:28.863000
77,082
77,104
Cleanest way to implement collapsable entries in a table generated via asp:Repeater?
Before anyone suggests scrapping the table tags altogether, I'm just modifying this part of a very large system, so it really wouldn't be wise for me to revise the table structure (the app is filled with similar tables). This is a webapp in C#.NET - data comes in from a webservice and is displayed onscreen in a table. ...
When you build the row in the databinding event, you can add in a unique identifier using say the id of the data field or something else that you use to make it unique. Then you could use a client side method to expand collapse if you want to fill it with data in the beginning, toggling the style.display setting in Jav...
Cleanest way to implement collapsable entries in a table generated via asp:Repeater? Before anyone suggests scrapping the table tags altogether, I'm just modifying this part of a very large system, so it really wouldn't be wise for me to revise the table structure (the app is filled with similar tables). This is a weba...
TITLE: Cleanest way to implement collapsable entries in a table generated via asp:Repeater? QUESTION: Before anyone suggests scrapping the table tags altogether, I'm just modifying this part of a very large system, so it really wouldn't be wise for me to revise the table structure (the app is filled with similar table...
[ "c#", "repeater" ]
1
1
611
2
0
2008-09-16T21:05:02.257000
2008-09-16T21:07:24.030000
77,086
79,744
Which is faster, python webpages or php webpages?
Which is faster, python webpages or php webpages? Does anyone know how the speed of pylons(or any of the other frameworks) compares to a similar website made with php? I know that serving a python base webpage via cgi is slower than php because of its long start up every time. I enjoy using pylons and I would still use...
It sounds like you don't want to compare the two languages, but that you want to compare two web systems. This is tricky, because there are many variables involved. For example, Python web applications can take advantage of mod_wsgi to talk to web servers, which is faster than any of the typical ways that PHP talks to ...
Which is faster, python webpages or php webpages? Which is faster, python webpages or php webpages? Does anyone know how the speed of pylons(or any of the other frameworks) compares to a similar website made with php? I know that serving a python base webpage via cgi is slower than php because of its long start up ever...
TITLE: Which is faster, python webpages or php webpages? QUESTION: Which is faster, python webpages or php webpages? Does anyone know how the speed of pylons(or any of the other frameworks) compares to a similar website made with php? I know that serving a python base webpage via cgi is slower than php because of its ...
[ "php", "python", "performance", "pylons" ]
42
90
58,926
10
0
2008-09-16T21:05:26.673000
2008-09-17T03:44:12.750000
77,090
1,479,467
Are there any good Continuous Testing plugins for Eclipse out right now?
I've used the MIT Continuous testing plugin in the past, but it has long since passed out of date and is no longer compatible with anything approaching a modern release of Eclipse. Does anyone have a good replacement? Free, naturally, is preferred.
I found that Infinitest now has an Eclipse plugin that seems to work pretty well.
Are there any good Continuous Testing plugins for Eclipse out right now? I've used the MIT Continuous testing plugin in the past, but it has long since passed out of date and is no longer compatible with anything approaching a modern release of Eclipse. Does anyone have a good replacement? Free, naturally, is preferred...
TITLE: Are there any good Continuous Testing plugins for Eclipse out right now? QUESTION: I've used the MIT Continuous testing plugin in the past, but it has long since passed out of date and is no longer compatible with anything approaching a modern release of Eclipse. Does anyone have a good replacement? Free, natur...
[ "eclipse", "testing" ]
13
10
3,581
6
0
2008-09-16T21:06:04.563000
2009-09-25T20:36:49.367000
77,126
77,147
What are some good compilers to use when learning C++?
What are some suggestions for easy to use C++ compilers for a beginner? Free or open-source ones would be preferred.
GCC is a good choice for simple things. Visual Studio Express edition is the free version of the major windows C++ compiler. If you are on Windows I would use VS. If you are on linux you should use GCC. *I say GCC for simple things because for a more complicated project the build process isn't so easy
What are some good compilers to use when learning C++? What are some suggestions for easy to use C++ compilers for a beginner? Free or open-source ones would be preferred.
TITLE: What are some good compilers to use when learning C++? QUESTION: What are some suggestions for easy to use C++ compilers for a beginner? Free or open-source ones would be preferred. ANSWER: GCC is a good choice for simple things. Visual Studio Express edition is the free version of the major windows C++ compil...
[ "c++", "compiler-construction" ]
1
17
1,618
14
0
2008-09-16T21:09:00.797000
2008-09-16T21:10:18.517000
77,127
77,361
When to throw an exception?
I have exceptions created for every condition that my application does not expect. UserNameNotValidException, PasswordNotCorrectException etc. However I was told I should not create exceptions for those conditions. In my UML those ARE exceptions to the main flow, so why should it not be an exception? Any guidance or be...
My personal guideline is: an exception is thrown when a fundamental assumption of the current code block is found to be false. Example 1: say I have a function which is supposed to examine an arbitrary class and return true if that class inherits from List<>. This function asks the question, "Is this object a descendan...
When to throw an exception? I have exceptions created for every condition that my application does not expect. UserNameNotValidException, PasswordNotCorrectException etc. However I was told I should not create exceptions for those conditions. In my UML those ARE exceptions to the main flow, so why should it not be an e...
TITLE: When to throw an exception? QUESTION: I have exceptions created for every condition that my application does not expect. UserNameNotValidException, PasswordNotCorrectException etc. However I was told I should not create exceptions for those conditions. In my UML those ARE exceptions to the main flow, so why sho...
[ "exception", "language-agnostic" ]
506
715
185,142
33
0
2008-09-16T21:09:02.233000
2008-09-16T21:33:56.760000
77,128
77,440
PHP Deployment to windows/unix servers
We have various php projects developed on windows (xampp) that need to be deployed to a mix of linux/windows servers. We've used capistrano in the past to deploy from windows to the linux servers, but recent changes in architecture and windows servers left the old config not working. The recipe works fine for the linux...
I use 4 different approaches depending on the client environment: Capistrano and similar tools (effective, but complex) rsync from + to Windows, Linux, Mac (simple, doesn't enforce discipline) svn from + to Windows, Linux, Mac (simple, doesn't enforce discipline) On-server scripts (run through the browser, complex) The...
PHP Deployment to windows/unix servers We have various php projects developed on windows (xampp) that need to be deployed to a mix of linux/windows servers. We've used capistrano in the past to deploy from windows to the linux servers, but recent changes in architecture and windows servers left the old config not worki...
TITLE: PHP Deployment to windows/unix servers QUESTION: We have various php projects developed on windows (xampp) that need to be deployed to a mix of linux/windows servers. We've used capistrano in the past to deploy from windows to the linux servers, but recent changes in architecture and windows servers left the ol...
[ "php", "windows", "linux", "deployment", "automation" ]
6
4
3,033
5
0
2008-09-16T21:09:04.713000
2008-09-16T21:41:00.813000
77,131
88,668
kSOAP Marshalling help needed
Does anyone have a good complex object marshalling example using the kSOAP package?
Although this example is not compilable and complete, the basic idea is to have a class that tells kSOAP how to turn an XML tag into an object (i.e. readInstance()) and how to turn an object into an XML tag (i.e. writeInstance()). public class MarshalBase64File implements Marshal { public static Class FILE_CLASS = Fil...
kSOAP Marshalling help needed Does anyone have a good complex object marshalling example using the kSOAP package?
TITLE: kSOAP Marshalling help needed QUESTION: Does anyone have a good complex object marshalling example using the kSOAP package? ANSWER: Although this example is not compilable and complete, the basic idea is to have a class that tells kSOAP how to turn an XML tag into an object (i.e. readInstance()) and how to tur...
[ "soap", "java-me", "ksoap" ]
3
4
4,785
1
0
2008-09-16T21:09:09.737000
2008-09-17T23:26:49.350000
77,133
77,210
Is it possible to send WM_QUERYENDSESSION messages to a window in a different process?
I want to debug a windows C++ application I've written to see why it isn't responding to WM_QUERYENDSESSION how I expect it to. Clearly it's a little tricky to do this by just shutting the system down. Is there any utility or code which I can use to send a fake WM_QUERYENDSESSION to my application windows myself?
I've used the Win32::GuiTest Perl module to do this kind of thing in the past.
Is it possible to send WM_QUERYENDSESSION messages to a window in a different process? I want to debug a windows C++ application I've written to see why it isn't responding to WM_QUERYENDSESSION how I expect it to. Clearly it's a little tricky to do this by just shutting the system down. Is there any utility or code wh...
TITLE: Is it possible to send WM_QUERYENDSESSION messages to a window in a different process? QUESTION: I want to debug a windows C++ application I've written to see why it isn't responding to WM_QUERYENDSESSION how I expect it to. Clearly it's a little tricky to do this by just shutting the system down. Is there any ...
[ "winapi", "message" ]
4
1
3,970
4
0
2008-09-16T21:09:12.623000
2008-09-16T21:15:46.460000
77,171
77,275
data access in DDD?
After reading Evan's and Nilsson's books I am still not sure how to manage Data access in a domain driven project. Should the CRUD methods be part of the repositories, i.e. OrderRepository.GetOrdersByCustomer(customer) or should they be part of the entities: Customer.GetOrders(). The latter approach seems more OO, but ...
CRUD-ish methods should be part of the Repository...ish. But I think you should ask why you have a bunch of CRUD methods. What do they really do? What are they really for? If you actually call out the data access patterns your application uses I think it makes the repository a lot more useful and keeps you from having ...
data access in DDD? After reading Evan's and Nilsson's books I am still not sure how to manage Data access in a domain driven project. Should the CRUD methods be part of the repositories, i.e. OrderRepository.GetOrdersByCustomer(customer) or should they be part of the entities: Customer.GetOrders(). The latter approach...
TITLE: data access in DDD? QUESTION: After reading Evan's and Nilsson's books I am still not sure how to manage Data access in a domain driven project. Should the CRUD methods be part of the repositories, i.e. OrderRepository.GetOrdersByCustomer(customer) or should they be part of the entities: Customer.GetOrders(). T...
[ "domain-driven-design", "data-access" ]
10
15
3,841
6
0
2008-09-16T21:12:29.777000
2008-09-16T21:23:36.567000
77,172
77,500
Stored procedures/DB schema in source control
Do you guys keep track of stored procedures and database schema in your source control system of choice? When you make a change (add a table, update an stored proc, how do you get the changes into source control? We use SQL Server at work, and I've begun using darcs for versioning, but I'd be curious about general stra...
We choose to script everything, and that includes all stored procedures and schema changes. No wysiwyg tools, and no fancy 'sync' programs are necessary. Schema changes are easy, all you need to do is create and maintain a single file for that version, including all schema and data changes. This becomes your conversion...
Stored procedures/DB schema in source control Do you guys keep track of stored procedures and database schema in your source control system of choice? When you make a change (add a table, update an stored proc, how do you get the changes into source control? We use SQL Server at work, and I've begun using darcs for ver...
TITLE: Stored procedures/DB schema in source control QUESTION: Do you guys keep track of stored procedures and database schema in your source control system of choice? When you make a change (add a table, update an stored proc, how do you get the changes into source control? We use SQL Server at work, and I've begun u...
[ "sql-server", "database", "version-control" ]
70
43
23,349
21
0
2008-09-16T21:12:35.220000
2008-09-16T21:46:08.727000
77,193
77,641
How do you justify Refactoring work to your penny-pinching boss?
You've just written a pile of code to deliver some important feature under pressure. You've cut a few corners, you've mashed some code into some over-bloated classes with names like SerialIndirectionShutoffManager.. You tell your boss you're going to need a week to clean this stuff up. "Clean what up?" "My code - its a...
It's important to include refactoring time in your original estimates. Going to your boss after you've delivered the product and then telling him that you're not actually done is lying about being done. You didn't actually make the deliverable deadline. It's like a surgeon doing surgery and then not making sure he put ...
How do you justify Refactoring work to your penny-pinching boss? You've just written a pile of code to deliver some important feature under pressure. You've cut a few corners, you've mashed some code into some over-bloated classes with names like SerialIndirectionShutoffManager.. You tell your boss you're going to need...
TITLE: How do you justify Refactoring work to your penny-pinching boss? QUESTION: You've just written a pile of code to deliver some important feature under pressure. You've cut a few corners, you've mashed some code into some over-bloated classes with names like SerialIndirectionShutoffManager.. You tell your boss yo...
[ "refactoring" ]
16
25
2,564
18
0
2008-09-16T21:14:11.503000
2008-09-16T21:58:24.250000
77,198
98,180
What does BlazeDS Livecycle Data Services do, that something like PyAMF or RubyAMF not do?
I'm doing a tech review and looking at AMF integration with various backends (Rails, Python, Grails etc). Lots of options are out there, question is, what do the Adobe products do (BlazeDS etc) that something like RubyAMF / pyAMF don't?
Other than NIO (RTMP) channels, LCDS include also the "data management" features. Using this feature, you basically implement, in an ActionScript class, a CRUD-like interface defined by LCDS, and you get: automatic progressive list loading (large lists/datagrids loads while scrolling) automatic crud management (you get...
What does BlazeDS Livecycle Data Services do, that something like PyAMF or RubyAMF not do? I'm doing a tech review and looking at AMF integration with various backends (Rails, Python, Grails etc). Lots of options are out there, question is, what do the Adobe products do (BlazeDS etc) that something like RubyAMF / pyAMF...
TITLE: What does BlazeDS Livecycle Data Services do, that something like PyAMF or RubyAMF not do? QUESTION: I'm doing a tech review and looking at AMF integration with various backends (Rails, Python, Grails etc). Lots of options are out there, question is, what do the Adobe products do (BlazeDS etc) that something li...
[ "python", "ruby-on-rails", "ruby", "apache-flex", "blazeds" ]
4
3
2,449
4
0
2008-09-16T21:15:02.077000
2008-09-19T00:02:00.117000
77,213
78,306
How can I eliminate duplicated Enum code?
I have a large number of Enums that implement this interface: /** * Interface for an enumeration, each element of which can be uniquely identified by its code */ public interface CodableEnum { /** * Get the element with a particular code * @param code * @return */ public CodableEnum getByCode(String code); /** * Get ...
You could factor the duplicated code into a CodeableEnumHelper class: public class CodeableEnumHelper { public static CodeableEnum getByCode(String code, CodeableEnum[] values) { for (CodeableEnum e: values) { if (e.getCode().equalsIgnoreCase(code)) { return e; } } return null; } } Each CodeableEnum class would still h...
How can I eliminate duplicated Enum code? I have a large number of Enums that implement this interface: /** * Interface for an enumeration, each element of which can be uniquely identified by its code */ public interface CodableEnum { /** * Get the element with a particular code * @param code * @return */ public Codab...
TITLE: How can I eliminate duplicated Enum code? QUESTION: I have a large number of Enums that implement this interface: /** * Interface for an enumeration, each element of which can be uniquely identified by its code */ public interface CodableEnum { /** * Get the element with a particular code * @param code * @retu...
[ "java", "enums", "enumeration" ]
23
13
9,247
15
0
2008-09-16T21:15:52.357000
2008-09-16T23:22:40.837000
77,226
77,249
How can I capitalize the first letter of each word in a string in Perl?
What is the easiest way to capitalize the first letter in each word of a string?
See the faq. I don't believe ucfirst() satisfies the OP's question to capitalize the first letter of each word in a string without splitting the string and joining it later.
How can I capitalize the first letter of each word in a string in Perl? What is the easiest way to capitalize the first letter in each word of a string?
TITLE: How can I capitalize the first letter of each word in a string in Perl? QUESTION: What is the easiest way to capitalize the first letter in each word of a string? ANSWER: See the faq. I don't believe ucfirst() satisfies the OP's question to capitalize the first letter of each word in a string without splitting...
[ "perl", "capitalize", "title-case" ]
37
21
74,348
10
0
2008-09-16T21:17:00.170000
2008-09-16T21:19:29.383000
77,266
77,360
Can operator>> read an int hex AND decimal?
Can I persuade operator>> in C++ to read both a hex value AND and a decimal value? The following program demonstrates how reading hex goes wrong. I'd like the same istringstream to be able to read both hex and decimal. #include #include int main(int argc, char** argv) { int result = 0; // std::istringstream is("5"); //...
Use std::setbase(0) which enables prefix dependent parsing. It will be able to parse 10 (dec) as 10 decimal, 0x10 (hex) as 16 decimal and 010 (octal) as 8 decimal. #include is >> std::setbase(0) >> result;
Can operator>> read an int hex AND decimal? Can I persuade operator>> in C++ to read both a hex value AND and a decimal value? The following program demonstrates how reading hex goes wrong. I'd like the same istringstream to be able to read both hex and decimal. #include #include int main(int argc, char** argv) { int r...
TITLE: Can operator>> read an int hex AND decimal? QUESTION: Can I persuade operator>> in C++ to read both a hex value AND and a decimal value? The following program demonstrates how reading hex goes wrong. I'd like the same istringstream to be able to read both hex and decimal. #include #include int main(int argc, ch...
[ "c++", "hex", "istringstream" ]
6
12
2,727
3
0
2008-09-16T21:22:34.230000
2008-09-16T21:33:47.773000
77,278
80,777
How can I package my Perl script to run on a machine without Perl?
People also often ask "How can I compile Perl?" while what they really want is to create an executable that can run on machines even if they don't have Perl installed. There are several solutions, I know of: perl2exe of IndigoStar It is commercial. I never tried. Its web site says it can cross compile Win32, Linux, and...
In addition to the three tools listed in the question, there's another one called Cava Packager written by Mark Dootson, who has also contributed to PAR in the past. It only runs under Windows, has a nice Wx GUI and works differently from the typical three contenders in that it assembles all Perl dependencies in a sour...
How can I package my Perl script to run on a machine without Perl? People also often ask "How can I compile Perl?" while what they really want is to create an executable that can run on machines even if they don't have Perl installed. There are several solutions, I know of: perl2exe of IndigoStar It is commercial. I ne...
TITLE: How can I package my Perl script to run on a machine without Perl? QUESTION: People also often ask "How can I compile Perl?" while what they really want is to create an executable that can run on machines even if they don't have Perl installed. There are several solutions, I know of: perl2exe of IndigoStar It i...
[ "perl", "compilation", "executable", "distribution" ]
20
12
11,737
4
0
2008-09-16T21:23:41.107000
2008-09-17T07:23:28.403000
77,280
77,324
How do you set up an API key system for your website?
Let say that I have a website with some information that could be access externally. Those information need to be only change by the respected client. Example: Google Analytic or WordPress API key. How can I create a system that work like that (no matter the programming language)?
A number of smart people are working on a standard, and it's called OAuth. It already has a number of sample implementations, so it's pretty easy to get started.
How do you set up an API key system for your website? Let say that I have a website with some information that could be access externally. Those information need to be only change by the respected client. Example: Google Analytic or WordPress API key. How can I create a system that work like that (no matter the program...
TITLE: How do you set up an API key system for your website? QUESTION: Let say that I have a website with some information that could be access externally. Those information need to be only change by the respected client. Example: Google Analytic or WordPress API key. How can I create a system that work like that (no ...
[ "api-design" ]
19
18
22,967
5
0
2008-09-16T21:23:52.040000
2008-09-16T21:28:59.453000
77,287
162,315
Trouble having a modal dialog to open a secondary dialog
I have a modal dialog form which has some "help links" within it which should open other non-modal panels or dialogs on top of it (while keeping the main dialog otherwise modal). However, these always end up behind the mask. YUI seems to be recognizing the highest z-index out there and setting the mask and modal dialog...
By default, YUI manages the z-index of anything that extends YAHOO.widget.Overlay and uses an overlay panel. It does this through the YAHOO.widget.Overlay's "bringToTop" method. You can turn this off by simply changing the "bringToTop" method to be an empty function: YAHOO.widget.Overlay.prototype.bringToTop = function...
Trouble having a modal dialog to open a secondary dialog I have a modal dialog form which has some "help links" within it which should open other non-modal panels or dialogs on top of it (while keeping the main dialog otherwise modal). However, these always end up behind the mask. YUI seems to be recognizing the highes...
TITLE: Trouble having a modal dialog to open a secondary dialog QUESTION: I have a modal dialog form which has some "help links" within it which should open other non-modal panels or dialogs on top of it (while keeping the main dialog otherwise modal). However, these always end up behind the mask. YUI seems to be reco...
[ "javascript", "jquery-ui", "z-index", "jquery-ui-dialog", "yui" ]
4
4
2,284
2
0
2008-09-16T21:24:21.323000
2008-10-02T13:39:07.653000
77,293
77,457
What is an easy way to create a MessageBox with custom button text in Managed C++?
I would like to keep the overhead at a minimum. Right now I have: // Launch a Message Box with advice to the user DialogResult result = MessageBox::Show("This may take awhile, do you wish to continue?", "Warning", MessageBoxButtons::YesNo, MessageBoxIcon::Exclamation); // The test will only be launched if the user has...
You can use "OK" and "Cancel" By substituting MessageBoxButtons::YesNo with MessageBoxButtons::OKCancel MessageBoxButtons Enum Short of that you would have to create a new form, as I don't believe the Enum can be extended.
What is an easy way to create a MessageBox with custom button text in Managed C++? I would like to keep the overhead at a minimum. Right now I have: // Launch a Message Box with advice to the user DialogResult result = MessageBox::Show("This may take awhile, do you wish to continue?", "Warning", MessageBoxButtons::YesN...
TITLE: What is an easy way to create a MessageBox with custom button text in Managed C++? QUESTION: I would like to keep the overhead at a minimum. Right now I have: // Launch a Message Box with advice to the user DialogResult result = MessageBox::Show("This may take awhile, do you wish to continue?", "Warning", Messa...
[ "c++" ]
3
2
11,956
3
0
2008-09-16T21:24:44.130000
2008-09-16T21:42:33.790000
77,317
84,775
Infopath 2007 - How do I perform data validation on the current view ONLY?
I have an infopath 2007 form that I am developing which uses 3 different views. The 3 different views are basically the same form, but have different text boxes shown, depending upon what button the user selects. I run into a problem where 'view 1' has some form validation, but the user has selected 'view 2' and submit...
Rather than tick the standard "this field cannot be blank" checkbox (for example), you need to use the Data Validation rules instead. Lets say you have two views with a textbox in each that cannot be blank, but you want to only enforce the current view. Here's the structure of the form: fields: currentView (number) (de...
Infopath 2007 - How do I perform data validation on the current view ONLY? I have an infopath 2007 form that I am developing which uses 3 different views. The 3 different views are basically the same form, but have different text boxes shown, depending upon what button the user selects. I run into a problem where 'view...
TITLE: Infopath 2007 - How do I perform data validation on the current view ONLY? QUESTION: I have an infopath 2007 form that I am developing which uses 3 different views. The 3 different views are basically the same form, but have different text boxes shown, depending upon what button the user selects. I run into a p...
[ "validation", "view", "infopath", "office-2007" ]
2
2
6,395
1
0
2008-09-16T21:27:38.070000
2008-09-17T15:55:58.873000
77,342
77,593
Why has XSLT never seen the popularity of many other languages that came out during the internet boom?
The use of XSLT (XML Stylesheet Language Transform) has never seen the same popularity of many of the other languages that came out during the internet boom. While it is in use, and in some cases by large successful companies (i.e. Blizzard Entertainment), it has never seemed to reach mainstream. Why do you think this ...
One problem is that XSLT looks complicated. Any developer should be able to pick up the language constructs as there are analogs in most other languages. The problem is that the constructs and data all look exactly the same which makes it difficult to distinguish between the two which makes XSLT more difficult to read ...
Why has XSLT never seen the popularity of many other languages that came out during the internet boom? The use of XSLT (XML Stylesheet Language Transform) has never seen the same popularity of many of the other languages that came out during the internet boom. While it is in use, and in some cases by large successful c...
TITLE: Why has XSLT never seen the popularity of many other languages that came out during the internet boom? QUESTION: The use of XSLT (XML Stylesheet Language Transform) has never seen the same popularity of many of the other languages that came out during the internet boom. While it is in use, and in some cases by ...
[ "xml", "xslt" ]
13
27
4,318
15
0
2008-09-16T21:31:06.377000
2008-09-16T21:54:31.110000
77,387
77,474
How to instantiate a Java array given an array type at runtime?
In the Java collections framework, the Collection interface declares the following method: T[] toArray(T[] a) Returns an array containing all of the elements in this collection; the runtime type of the returned array is that of the specified array. If the collection fits in the specified array, it is returned therein. ...
Use the static method java.lang.reflect.Array.newInstance(Class componentType, int length) A tutorial on its use can be found here: http://java.sun.com/docs/books/tutorial/reflect/special/arrayInstance.html
How to instantiate a Java array given an array type at runtime? In the Java collections framework, the Collection interface declares the following method: T[] toArray(T[] a) Returns an array containing all of the elements in this collection; the runtime type of the returned array is that of the specified array. If the ...
TITLE: How to instantiate a Java array given an array type at runtime? QUESTION: In the Java collections framework, the Collection interface declares the following method: T[] toArray(T[] a) Returns an array containing all of the elements in this collection; the runtime type of the returned array is that of the specif...
[ "java", "arrays", "collections" ]
21
35
20,207
4
0
2008-09-16T21:36:10.500000
2008-09-16T21:44:12.320000
77,428
78,378
What is the best way to handle URL mappings between an RIA version and plain old HTML version of a site?
So if you have a RIA version (Silverlight or Flash) and a standard HTML version (or AJAX even), should you have the same URL for both, or is it ok to have a different one for the RIA app and just redirect accordingly? So, for instance, if you have a site ( http://example.com ), is it ok to have the about page URL for t...
The URLs of your pages denote the identity of the content. In my view, if the content is the same but the presentation varies (i.e RIA vs. HTML), then the URL should be the same and you should use some other mechanism to select between the different presentation forms. Choices of other mechanisms include cookies, conte...
What is the best way to handle URL mappings between an RIA version and plain old HTML version of a site? So if you have a RIA version (Silverlight or Flash) and a standard HTML version (or AJAX even), should you have the same URL for both, or is it ok to have a different one for the RIA app and just redirect accordingl...
TITLE: What is the best way to handle URL mappings between an RIA version and plain old HTML version of a site? QUESTION: So if you have a RIA version (Silverlight or Flash) and a standard HTML version (or AJAX even), should you have the same URL for both, or is it ok to have a different one for the RIA app and just r...
[ "ria" ]
2
2
253
3
0
2008-09-16T21:39:36.217000
2008-09-16T23:34:43.100000
77,431
77,463
What's a good JavaScript plugin color picker?
I make a lot of web applications and from time to time I need a color picker. What's one that I can use like an API and doesn't require a lot of code to plug in? I also need it to work in all browsers.
Farbtastic is a nice jQuery color picker But apparently doesn't work in IE6 Here is another jQuery color picker that looks nice, not sure about it compatibility though.
What's a good JavaScript plugin color picker? I make a lot of web applications and from time to time I need a color picker. What's one that I can use like an API and doesn't require a lot of code to plug in? I also need it to work in all browsers.
TITLE: What's a good JavaScript plugin color picker? QUESTION: I make a lot of web applications and from time to time I need a color picker. What's one that I can use like an API and doesn't require a lot of code to plug in? I also need it to work in all browsers. ANSWER: Farbtastic is a nice jQuery color picker But ...
[ "javascript", "color-picker" ]
11
13
8,802
4
0
2008-09-16T21:40:15.403000
2008-09-16T21:43:08.407000
77,436
81,222
Ant is not able to delete some files on windows
I have an ant build that makes directories, calls javac and all the regular stuff. The issue I am having is that when I try to do a clean (delete all the stuff that was generated) the delete task reports that is was unable to delete some files. When I try to delete them manually it works just fine. The files are appare...
I encountered this problem once. It was because the file i tried to delete was a part of a classpath for another task.
Ant is not able to delete some files on windows I have an ant build that makes directories, calls javac and all the regular stuff. The issue I am having is that when I try to do a clean (delete all the stuff that was generated) the delete task reports that is was unable to delete some files. When I try to delete them m...
TITLE: Ant is not able to delete some files on windows QUESTION: I have an ant build that makes directories, calls javac and all the regular stuff. The issue I am having is that when I try to do a clean (delete all the stuff that was generated) the delete task reports that is was unable to delete some files. When I tr...
[ "java", "windows", "ant", "build-automation" ]
23
15
25,058
15
0
2008-09-16T21:40:43.560000
2008-09-17T08:47:56.063000
77,485
77,727
What are the relative strengths and weaknesses of Git, Mercurial, and Bazaar?
What do folks here see as the relative strengths and weaknesses of Git, Mercurial, and Bazaar? In considering each of them with one another and against version control systems like SVN and Perforce, what issues should be considered? In planning a migration from SVN to one of these distributed version control systems, w...
Git is very fast, scales very well, and is very transparent about its concepts. The down side of this is that it has a relatively steep learning curve. A Win32 port is available, but not quite a first-class citizen. Git exposes hashes as version numbers to users; this provides guarantees (in that a single hash always r...
What are the relative strengths and weaknesses of Git, Mercurial, and Bazaar? What do folks here see as the relative strengths and weaknesses of Git, Mercurial, and Bazaar? In considering each of them with one another and against version control systems like SVN and Perforce, what issues should be considered? In planni...
TITLE: What are the relative strengths and weaknesses of Git, Mercurial, and Bazaar? QUESTION: What do folks here see as the relative strengths and weaknesses of Git, Mercurial, and Bazaar? In considering each of them with one another and against version control systems like SVN and Perforce, what issues should be con...
[ "svn", "git", "version-control", "mercurial", "bazaar" ]
142
148
18,432
15
0
2008-09-16T21:45:09.837000
2008-09-16T22:05:28.603000
77,507
85,417
What are your favourite ZX Spectrum development tools?
What are your favourite assemblers, compilers, environments, interpreters for the good old ZX Spectrum?
I always used to use Roybot Assembler - which had you enter your program using the BASIC editor and REM statements. It comes with a decent debugger/disassembler that lets you single-step machine code too. The Hisoft Gens and Mons assembler and disassembler (aka Devpak) are probably fairly popular. For high-level compil...
What are your favourite ZX Spectrum development tools? What are your favourite assemblers, compilers, environments, interpreters for the good old ZX Spectrum?
TITLE: What are your favourite ZX Spectrum development tools? QUESTION: What are your favourite assemblers, compilers, environments, interpreters for the good old ZX Spectrum? ANSWER: I always used to use Roybot Assembler - which had you enter your program using the BASIC editor and REM statements. It comes with a de...
[ "z80", "sinclair", "zxspectrum" ]
27
5
14,340
14
0
2008-09-16T21:46:52.733000
2008-09-17T17:05:48.067000
77,528
78,691
How do you run CMD.exe under the Local System Account?
I'm currently running Vista and I would like to manually complete the same operations as my Windows Service. Since the Windows Service is running under the Local System Account, I would like to emulate this same behavior. Basically, I would like to run CMD.EXE under the Local System Account. I found information online ...
Though I haven't personally tested, I have good reason to believe that the above stated AT COMMAND solution will work for XP, 2000 and Server 2003. Per my and Bryant's testing, we've identified that the same approach does not work with Vista or Windows Server 2008 -- most probably due to added security and the /interac...
How do you run CMD.exe under the Local System Account? I'm currently running Vista and I would like to manually complete the same operations as my Windows Service. Since the Windows Service is running under the Local System Account, I would like to emulate this same behavior. Basically, I would like to run CMD.EXE unde...
TITLE: How do you run CMD.exe under the Local System Account? QUESTION: I'm currently running Vista and I would like to manually complete the same operations as my Windows Service. Since the Windows Service is running under the Local System Account, I would like to emulate this same behavior. Basically, I would like t...
[ "windows-services", "user-accounts" ]
180
273
486,576
11
0
2008-09-16T21:48:52.120000
2008-09-17T00:36:37.227000
77,531
77,549
Where do I enter the Windows Server 2008 key after installing it?
When I installed Windows Server 2008 I didn't have the (activation) key. Now that I have it I can't find where to enter it. Anybody know?
Go to Control Panel\System and then under Windows Activation click "Change Product Key".
Where do I enter the Windows Server 2008 key after installing it? When I installed Windows Server 2008 I didn't have the (activation) key. Now that I have it I can't find where to enter it. Anybody know?
TITLE: Where do I enter the Windows Server 2008 key after installing it? QUESTION: When I installed Windows Server 2008 I didn't have the (activation) key. Now that I have it I can't find where to enter it. Anybody know? ANSWER: Go to Control Panel\System and then under Windows Activation click "Change Product Key".
[ "windows-server-2008" ]
0
11
33,678
5
0
2008-09-16T21:49:01.933000
2008-09-16T21:50:43.007000
77,534
472,991
wsdl.exe Error: Unable to import binding '...' from namespace '...'
When running wsdl.exe on a WSDL I created, I get this error: Error: Unable to import binding 'SomeBinding' from namespace 'SomeNS'. Unable to import operation 'someOperation'. These members may not be derived. I'm using the document-literal style, and to the best of my knowledge I'm following all the rules. To sum it u...
I have came across to the same error message. After digging for a while, found out that one can supply xsd files in addition to wsdl file. So included/imported.xsd files in addition to.wsdl at the end of the wsdl command as follows: wsdl.exe myWebService.wsdl myXsd1.xsd myType1.xsd myXsd2.xsd... Wsdl gave some warnings...
wsdl.exe Error: Unable to import binding '...' from namespace '...' When running wsdl.exe on a WSDL I created, I get this error: Error: Unable to import binding 'SomeBinding' from namespace 'SomeNS'. Unable to import operation 'someOperation'. These members may not be derived. I'm using the document-literal style, and ...
TITLE: wsdl.exe Error: Unable to import binding '...' from namespace '...' QUESTION: When running wsdl.exe on a WSDL I created, I get this error: Error: Unable to import binding 'SomeBinding' from namespace 'SomeNS'. Unable to import operation 'someOperation'. These members may not be derived. I'm using the document-l...
[ ".net", "soap", "wsdl" ]
37
61
37,877
6
0
2008-09-16T21:49:14.837000
2009-01-23T14:05:24.403000
77,552
77,612
'id' is a bad variable name in Python
Why is it bad to name a variable id in Python?
id() is a fundamental built-in: Help on built-in function id in module __builtin__: id(...) id(object) -> integer Return the identity of an object. This is guaranteed to be unique among simultaneously existing objects. (Hint: it's the object's memory address.) In general, using variable names that eclipse a keyword o...
'id' is a bad variable name in Python Why is it bad to name a variable id in Python?
TITLE: 'id' is a bad variable name in Python QUESTION: Why is it bad to name a variable id in Python? ANSWER: id() is a fundamental built-in: Help on built-in function id in module __builtin__: id(...) id(object) -> integer Return the identity of an object. This is guaranteed to be unique among simultaneously exist...
[ "python" ]
208
193
77,134
9
0
2008-09-16T21:50:58.653000
2008-09-16T21:55:59.703000
77,558
77,585
How can I use the PHP File api to write raw bytes?
I want to write a raw byte/byte stream to a position in a file. This is what I have currently: $fpr = fopen($out, 'r+'); fseek($fpr, 1); //seek to second byte fwrite($fpr, 0x63); fclose($fpr); This currently writes the actually string value of "99" starting at byte offset 1. IE, it writes bytes "9" and "9". I just want...
fwrite() takes strings. Try chr(0x63) if you want to write a 0x63 byte to the file.
How can I use the PHP File api to write raw bytes? I want to write a raw byte/byte stream to a position in a file. This is what I have currently: $fpr = fopen($out, 'r+'); fseek($fpr, 1); //seek to second byte fwrite($fpr, 0x63); fclose($fpr); This currently writes the actually string value of "99" starting at byte off...
TITLE: How can I use the PHP File api to write raw bytes? QUESTION: I want to write a raw byte/byte stream to a position in a file. This is what I have currently: $fpr = fopen($out, 'r+'); fseek($fpr, 1); //seek to second byte fwrite($fpr, 0x63); fclose($fpr); This currently writes the actually string value of "99" st...
[ "php", "file-io" ]
3
8
6,776
4
0
2008-09-16T21:51:45.640000
2008-09-16T21:54:15.040000
77,598
77,630
Getting java and flash to talk to each other
I have an application written in java, and I want to add a flash front end to it. The flash front end will run on the same computer as the java app in the stand alone flash player. I need two way communication between the two parts, and have no idea how to even start going about this. I suppose I could open a socket be...
AMF is a messaging protocol commonly used to talk between flash and a backend system. There're several Java implementations, but I haven't used any of them so can't tell you which is best. Blaze DS Red5 Granite DS Flash can also talk plain old XML, SOAP or REST to the backend, so depending on your codebase that might b...
Getting java and flash to talk to each other I have an application written in java, and I want to add a flash front end to it. The flash front end will run on the same computer as the java app in the stand alone flash player. I need two way communication between the two parts, and have no idea how to even start going a...
TITLE: Getting java and flash to talk to each other QUESTION: I have an application written in java, and I want to add a flash front end to it. The flash front end will run on the same computer as the java app in the stand alone flash player. I need two way communication between the two parts, and have no idea how to ...
[ "java", "flash" ]
5
6
2,246
5
0
2008-09-16T21:54:53.510000
2008-09-16T21:57:33.833000
77,603
77,788
Performance Testing
We are developing automated regression tests using VMWare and NUnit. We have divided tests into steps and now I would like to see each step be examined for performance regression. Simply timing the tests, as NUnit does, does not seem reliable. I have figured in a acceptance factor of about 15% but our steps can differ ...
For this sort of performance testing, there's no such thing as a system that will give you a simple pass/fail result. In real life, changing your system is likely to make some things faster and some other things slower, so it's usually not a choice between "better" and "not better", it's a choice between different kind...
Performance Testing We are developing automated regression tests using VMWare and NUnit. We have divided tests into steps and now I would like to see each step be examined for performance regression. Simply timing the tests, as NUnit does, does not seem reliable. I have figured in a acceptance factor of about 15% but o...
TITLE: Performance Testing QUESTION: We are developing automated regression tests using VMWare and NUnit. We have divided tests into steps and now I would like to see each step be examined for performance regression. Simply timing the tests, as NUnit does, does not seem reliable. I have figured in a acceptance factor ...
[ ".net", "nunit", "vmware", "regression-testing" ]
2
5
930
3
0
2008-09-16T21:55:16.677000
2008-09-16T22:10:23.600000
77,632
77,709
What is cool about generics, why use them?
I thought I'd offer this softball to whomever would like to hit it out of the park. What are generics, what are the advantages of generics, why, where, how should I use them? Please keep it fairly basic. Thanks.
Allows you to write code/use library methods which are type-safe, i.e. a List is guaranteed to be a list of strings. As a result of generics being used the compiler can perform compile-time checks on code for type safety, i.e. are you trying to put an int into that list of strings? Using an ArrayList would cause that t...
What is cool about generics, why use them? I thought I'd offer this softball to whomever would like to hit it out of the park. What are generics, what are the advantages of generics, why, where, how should I use them? Please keep it fairly basic. Thanks.
TITLE: What is cool about generics, why use them? QUESTION: I thought I'd offer this softball to whomever would like to hit it out of the park. What are generics, what are the advantages of generics, why, where, how should I use them? Please keep it fairly basic. Thanks. ANSWER: Allows you to write code/use library m...
[ "c#", "generics", "types" ]
95
137
72,777
29
0
2008-09-16T21:57:43.817000
2008-09-16T22:04:16.267000
77,637
104,574
SWFAddress Deeplinks and C# library?
Is there a C# class for interacting with SWFAddress deeplink URL strings (reading deeplink parameters, building SWFAddress URLs, etc.)? Planning to write one myself otherwise; but I wanted to make sure I wasn't reinventing the wheel first.
If you're trying to read those deep linking URLs on the server side (which I assume you are), know that it's not possible. Those deep linking systems use the fragment part of URLs (the part that comes after the hash ( # ) symbol) for designating specific parts of the flash apps in the browser URL and fragments are not ...
SWFAddress Deeplinks and C# library? Is there a C# class for interacting with SWFAddress deeplink URL strings (reading deeplink parameters, building SWFAddress URLs, etc.)? Planning to write one myself otherwise; but I wanted to make sure I wasn't reinventing the wheel first.
TITLE: SWFAddress Deeplinks and C# library? QUESTION: Is there a C# class for interacting with SWFAddress deeplink URL strings (reading deeplink parameters, building SWFAddress URLs, etc.)? Planning to write one myself otherwise; but I wanted to make sure I wasn't reinventing the wheel first. ANSWER: If you're trying...
[ "asp.net", "flash" ]
1
1
782
1
0
2008-09-16T21:58:03.037000
2008-09-19T19:01:57.993000
77,639
77,705
When is it right for a constructor to throw an exception?
When is it right for a constructor to throw an exception? (Or in the case of Objective C: when is it right for an init'er to return nil?) It seems to me that a constructor should fail -- and thus refuse to create an object -- if the object isn't complete. I.e., the constructor should have a contract with its caller to ...
The constructor's job is to bring the object into a usable state. There are basically two schools of thought on this. One group favors two-stage construction. The constructor merely brings the object into a sleeper state in which it refuses to do any work. There's an additional function that does the actual initializat...
When is it right for a constructor to throw an exception? When is it right for a constructor to throw an exception? (Or in the case of Objective C: when is it right for an init'er to return nil?) It seems to me that a constructor should fail -- and thus refuse to create an object -- if the object isn't complete. I.e., ...
TITLE: When is it right for a constructor to throw an exception? QUESTION: When is it right for a constructor to throw an exception? (Or in the case of Objective C: when is it right for an init'er to return nil?) It seems to me that a constructor should fail -- and thus refuse to create an object -- if the object isn'...
[ "exception", "language-agnostic", "constructor" ]
258
352
100,933
23
0
2008-09-16T21:58:08.013000
2008-09-16T22:03:59.713000
77,645
77,825
Best practice: How to handle concurrency of browser and website navigation
It is a well known problem to every web developer. As far as I tried to find a good solution to this problem - there was none (or at least I could not find it). Lets assume the following: The user does not behave, as he was expected to. The actual project I'm working in uses a navigation within the web portal. But if t...
The stack solution sounds interesting, but it will probably break if the user chooses to navigate "in parallel" on different tabs or using bookmarks. I'm afraid I don't really understand why you have to keep all this state for each user: ideally the web should follow the REST principle and be completely stateless. Ther...
Best practice: How to handle concurrency of browser and website navigation It is a well known problem to every web developer. As far as I tried to find a good solution to this problem - there was none (or at least I could not find it). Lets assume the following: The user does not behave, as he was expected to. The actu...
TITLE: Best practice: How to handle concurrency of browser and website navigation QUESTION: It is a well known problem to every web developer. As far as I tried to find a good solution to this problem - there was none (or at least I could not find it). Lets assume the following: The user does not behave, as he was exp...
[ "browser", "navigation", "struts" ]
0
1
904
1
0
2008-09-16T21:58:28.573000
2008-09-16T22:13:33.293000
77,659
101,632
Blocking dialogs in .NET WebBrowser control
I have a.NET 2.0 WebBrowser control used to navigate some pages with no user interaction (don't ask...long story). Because of the user-less nature of this application, I have set the WebBrowser control's ScriptErrorsSuppressed property to true, which the documentation included with VS 2005 states will [...]"hide all it...
This is most definitely hacky, but if you do any work with the WebBrowser control, you'll find yourself doing a lot of hacky stuff. This is the easiest way that I know of to do this. You need to inject JavaScript to override the alert function... something along the lines of injecting this JavaScript function: window.a...
Blocking dialogs in .NET WebBrowser control I have a.NET 2.0 WebBrowser control used to navigate some pages with no user interaction (don't ask...long story). Because of the user-less nature of this application, I have set the WebBrowser control's ScriptErrorsSuppressed property to true, which the documentation include...
TITLE: Blocking dialogs in .NET WebBrowser control QUESTION: I have a.NET 2.0 WebBrowser control used to navigate some pages with no user interaction (don't ask...long story). Because of the user-less nature of this application, I have set the WebBrowser control's ScriptErrorsSuppressed property to true, which the doc...
[ "c#", ".net", "winforms", "activex", "mshtml" ]
19
7
37,077
12
0
2008-09-16T22:00:27.820000
2008-09-19T12:58:18.073000
77,664
77,767
SQL Server compatibility mode
We're currently running a server on Compatibility mode 8 and I want to update it. What are the implications of just going in and changing it? What is likely to break? Is there anything that checks the data will survive before I perform it? Can I rollback to mode 8 without performing a restore and without loss of data?
If you're going from 80 to 90, the differences are minimal. Going from 65 to 70+ can cause severe impact (NULLs are stored differently). Implications - your SPs can return different results than you'd expect Likely to break: functions, SPs Data should survive; nothing in there should affect things. Moving from 80 to 90...
SQL Server compatibility mode We're currently running a server on Compatibility mode 8 and I want to update it. What are the implications of just going in and changing it? What is likely to break? Is there anything that checks the data will survive before I perform it? Can I rollback to mode 8 without performing a rest...
TITLE: SQL Server compatibility mode QUESTION: We're currently running a server on Compatibility mode 8 and I want to update it. What are the implications of just going in and changing it? What is likely to break? Is there anything that checks the data will survive before I perform it? Can I rollback to mode 8 without...
[ "sql-server", "upgrade", "compatibility" ]
6
5
4,722
4
0
2008-09-16T22:00:46.977000
2008-09-16T22:08:35.600000
77,686
78,224
Java Applet - Partially Signed?
Is it possible to sign only part of an applet? Ie, have an applet that pops up no security warnings about being signed, but if some particular function is used (that requires privileges) then use the signed jar? From what I can tell, some (perhaps most) browsers will pop up the warning for a signed applet even if you d...
Try splitting your code into an unsigned jar and a signed jar.
Java Applet - Partially Signed? Is it possible to sign only part of an applet? Ie, have an applet that pops up no security warnings about being signed, but if some particular function is used (that requires privileges) then use the signed jar? From what I can tell, some (perhaps most) browsers will pop up the warning f...
TITLE: Java Applet - Partially Signed? QUESTION: Is it possible to sign only part of an applet? Ie, have an applet that pops up no security warnings about being signed, but if some particular function is used (that requires privileges) then use the signed jar? From what I can tell, some (perhaps most) browsers will po...
[ "java", "security", "applet", "signed-applet" ]
0
1
763
3
0
2008-09-16T22:02:23.523000
2008-09-16T23:09:44.610000
77,694
78,158
How to quickly theme a view?
I've defined a view with the CCK and View 2 modules. I would like to quickly define a template specific to this view. Is there any tutorial or information on this? What are the files I need to modify? Here are my findings: (Edited) In fact, there are two ways to theme a view: the " field " way and the " node " way. In ...
In fact there are two ways to theme a view: the " field " way and the " node " way. In "edit View", you can choose " Row style: Node ", or " Row style: Fields ". with the " Node " way, you can create a node-contentname.tpl.php wich will be called for each node in the view. You'll have access to your cck field values wi...
How to quickly theme a view? I've defined a view with the CCK and View 2 modules. I would like to quickly define a template specific to this view. Is there any tutorial or information on this? What are the files I need to modify? Here are my findings: (Edited) In fact, there are two ways to theme a view: the " field " ...
TITLE: How to quickly theme a view? QUESTION: I've defined a view with the CCK and View 2 modules. I would like to quickly define a template specific to this view. Is there any tutorial or information on this? What are the files I need to modify? Here are my findings: (Edited) In fact, there are two ways to theme a vi...
[ "drupal", "drupal-views", "cck", "drupal-theming" ]
85
52
91,766
10
0
2008-09-16T22:02:57.703000
2008-09-16T22:55:11.370000
77,697
77,743
BugzScout in hosted Fogbugz
Is it possible to use BugzScout in the fogcreek-hosted version of Fogbugz?
Yes, you can! The documentation is on the FogBugz Knowledge Exchange. The sample code that ships for the for-your-server version of FogBugz is available for download here.
BugzScout in hosted Fogbugz Is it possible to use BugzScout in the fogcreek-hosted version of Fogbugz?
TITLE: BugzScout in hosted Fogbugz QUESTION: Is it possible to use BugzScout in the fogcreek-hosted version of Fogbugz? ANSWER: Yes, you can! The documentation is on the FogBugz Knowledge Exchange. The sample code that ships for the for-your-server version of FogBugz is available for download here.
[ "fogbugz", "fogbugz-on-demand", "bugzscout" ]
4
6
662
1
0
2008-09-16T22:03:27.187000
2008-09-16T22:06:34.373000
77,718
77,963
Why doesn't Java offer operator overloading?
Coming from C++ to Java, the obvious unanswered question is why didn't Java include operator overloading? Isn't Complex a, b, c; a = b + c; much simpler than Complex a, b, c; a = b.add(c);? Is there a known reason for this, valid arguments for not allowing operator overloading? Is the reason arbitrary, or lost to time?
Assuming you wanted to overwrite the previous value of the object referred to by a, then a member function would have to be invoked. Complex a, b, c; //... a = b.add(c); In C++, this expression tells the compiler to create three (3) objects on the stack, perform addition, and copy the resultant value from the temporary...
Why doesn't Java offer operator overloading? Coming from C++ to Java, the obvious unanswered question is why didn't Java include operator overloading? Isn't Complex a, b, c; a = b + c; much simpler than Complex a, b, c; a = b.add(c);? Is there a known reason for this, valid arguments for not allowing operator overloadi...
TITLE: Why doesn't Java offer operator overloading? QUESTION: Coming from C++ to Java, the obvious unanswered question is why didn't Java include operator overloading? Isn't Complex a, b, c; a = b + c; much simpler than Complex a, b, c; a = b.add(c);? Is there a known reason for this, valid arguments for not allowing ...
[ "java", "operator-overloading" ]
489
12
200,291
18
0
2008-09-16T22:04:40.070000
2008-09-16T22:31:07.760000
77,726
78,040
Xml or Sqlite, When to drop Xml for a Database?
I really like Xml for saving data, but when does sqlite/database become the better option? eg, when the xml has more than x items or is greater than y MB? I am coding an rss reader and I believe I made the wrong choice in using xml over a sqlite database to store a cache of all the feeds items. There are some feeds whi...
I basically agree with Mitchel, that this can be highly specific depending on what are you going to do with XML and SQLite. For your case (cache), it seems to me that using SQLite (or other embedded databases) makes more sense. First I don't really think that SQLite will need more overhead than XML. And I mean both dev...
Xml or Sqlite, When to drop Xml for a Database? I really like Xml for saving data, but when does sqlite/database become the better option? eg, when the xml has more than x items or is greater than y MB? I am coding an rss reader and I believe I made the wrong choice in using xml over a sqlite database to store a cache ...
TITLE: Xml or Sqlite, When to drop Xml for a Database? QUESTION: I really like Xml for saving data, but when does sqlite/database become the better option? eg, when the xml has more than x items or is greater than y MB? I am coding an rss reader and I believe I made the wrong choice in using xml over a sqlite database...
[ "xml", "database" ]
56
24
41,763
18
0
2008-09-16T22:05:27.073000
2008-09-16T22:40:04.573000
77,731
78,147
iBATIS for Python?
At my current gig, we use iBATIS through Java to CRUD our databases. I like the abstract qualities of the tool, especially when working with legacy databases, as it doesn't impose its own syntax on you. I'm looking for a Python analogue to this library, since the website only has Java/.NET/Ruby versions available. I do...
iBatis sequesters the SQL DML (or the definitions of the SQL) in an XML file. It specifically focuses on the mapping between the SQL and some object model defined elsewhere. SQL Alchemy can do this -- but it isn't really a very complete solution. Like iBatis, you can merely have SQL table definitions and a mapping betw...
iBATIS for Python? At my current gig, we use iBATIS through Java to CRUD our databases. I like the abstract qualities of the tool, especially when working with legacy databases, as it doesn't impose its own syntax on you. I'm looking for a Python analogue to this library, since the website only has Java/.NET/Ruby versi...
TITLE: iBATIS for Python? QUESTION: At my current gig, we use iBATIS through Java to CRUD our databases. I like the abstract qualities of the tool, especially when working with legacy databases, as it doesn't impose its own syntax on you. I'm looking for a Python analogue to this library, since the website only has Ja...
[ "python", "orm", "ibatis" ]
5
10
6,007
2
0
2008-09-16T22:05:58.697000
2008-09-16T22:53:33.713000
77,744
77,884
How can I change the text color in the windows command prompt
I have a command line program, which outputs logging to the screen. I want error lines to show up in red. Is there some special character codes I can output to switch the text color to red, then switch it back to white? I'm using ruby but I imagine this would be the same in any other language. Something like: red = "\0...
You need to access the Win32 Console API. Unfortunately, I don't know how you'd do that from Ruby. In Perl, I'd use the Win32::Console module. The Windows console does not respond to ANSI escape codes. According to the article on colorizing Ruby output that artur02 mentioned, you need to install & load the win32console...
How can I change the text color in the windows command prompt I have a command line program, which outputs logging to the screen. I want error lines to show up in red. Is there some special character codes I can output to switch the text color to red, then switch it back to white? I'm using ruby but I imagine this woul...
TITLE: How can I change the text color in the windows command prompt QUESTION: I have a command line program, which outputs logging to the screen. I want error lines to show up in red. Is there some special character codes I can output to switch the text color to red, then switch it back to white? I'm using ruby but I...
[ "windows", "ruby", "command-line", "colors" ]
13
7
34,570
14
0
2008-09-16T22:06:36.963000
2008-09-16T22:21:08.363000
77,817
77,911
C++ runtime knowledge of classes
I have multiple classes that all derive from a base class, now some of the derived classes will not be compiled depending on the platform. I have a class that allows me to return an object of the base class, however now all the names of the derived classes have been hard coded. Is there a way to determine what classes ...
Are you looking for C++ runtime class registration? I found this link ( backup ). That would probably accomplish what you want, I am not sure about the dynamically loaded modules and whether or not you can register them using the same method.
C++ runtime knowledge of classes I have multiple classes that all derive from a base class, now some of the derived classes will not be compiled depending on the platform. I have a class that allows me to return an object of the base class, however now all the names of the derived classes have been hard coded. Is there...
TITLE: C++ runtime knowledge of classes QUESTION: I have multiple classes that all derive from a base class, now some of the derived classes will not be compiled depending on the platform. I have a class that allows me to return an object of the base class, however now all the names of the derived classes have been ha...
[ "c++", "class", "runtime" ]
3
3
7,916
7
0
2008-09-16T22:13:07.977000
2008-09-16T22:26:00.130000
77,826
77,916
PHP: $_SESSION - What are the pros and cons of storing temporarily used data in the $_SESSION variable
One thing I've started doing more often recently is retrieving some data at the beginning of a task and storing it in a $_SESSION['myDataForTheTask']. Now it seems very convenient to do so but I don't know anything about performance, security risks or similar, using this approach. Is it something which is regularly don...
Well Session variables are really one of the only ways (and probably the most efficient) of having these variables available for the entire time that visitor is on the website, there's no real way for a user to edit them (other than an exploit in your code, or in the PHP interpreter) so they are fairly secure. It's a g...
PHP: $_SESSION - What are the pros and cons of storing temporarily used data in the $_SESSION variable One thing I've started doing more often recently is retrieving some data at the beginning of a task and storing it in a $_SESSION['myDataForTheTask']. Now it seems very convenient to do so but I don't know anything ab...
TITLE: PHP: $_SESSION - What are the pros and cons of storing temporarily used data in the $_SESSION variable QUESTION: One thing I've started doing more often recently is retrieving some data at the beginning of a task and storing it in a $_SESSION['myDataForTheTask']. Now it seems very convenient to do so but I don'...
[ "php", "session", "scope" ]
33
21
13,743
15
0
2008-09-16T22:13:48.037000
2008-09-16T22:26:16.180000
77,833
2,434,747
How to make any arbitrary SECTION of ANY aspx webpage available as an Ajax popup
I wonder if anyone can think of a good technique to enable any arbitrary section of an aspx page (say, the contents within a specified DIV tag) to be able to be called and displayed in an ajax modal popup? (So, only a certain section of the page would be displayed) For example: 1) You have a large application with many...
http://api.jquery.com/load/ http://css.dzone.com/articles/jquery-load-data-from-other-pa
How to make any arbitrary SECTION of ANY aspx webpage available as an Ajax popup I wonder if anyone can think of a good technique to enable any arbitrary section of an aspx page (say, the contents within a specified DIV tag) to be able to be called and displayed in an ajax modal popup? (So, only a certain section of th...
TITLE: How to make any arbitrary SECTION of ANY aspx webpage available as an Ajax popup QUESTION: I wonder if anyone can think of a good technique to enable any arbitrary section of an aspx page (say, the contents within a specified DIV tag) to be able to be called and displayed in an ajax modal popup? (So, only a cer...
[ "asp.net", "asp.net-ajax" ]
0
0
357
4
0
2008-09-16T22:15:30.373000
2010-03-12T17:57:21.933000
77,873
78,300
Filling PDF Forms with PHP
Are there PHP libraries which can be used to fill PDF forms and then save (flatten) them to PDF files?
The libraries and frameworks mentioned here are good, but if all you want to do is fill in a form and flatten it, I recommend the command line tool called pdftk (PDF Toolkit). See https://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/ You can call the command line from php, and the command is pdftk formfile.pdf fill_form...
Filling PDF Forms with PHP Are there PHP libraries which can be used to fill PDF forms and then save (flatten) them to PDF files?
TITLE: Filling PDF Forms with PHP QUESTION: Are there PHP libraries which can be used to fill PDF forms and then save (flatten) them to PDF files? ANSWER: The libraries and frameworks mentioned here are good, but if all you want to do is fill in a form and flatten it, I recommend the command line tool called pdftk (P...
[ "php", "pdf" ]
48
50
73,123
8
0
2008-09-16T22:19:08.913000
2008-09-16T23:21:41.260000
77,887
78,111
Interpreting Stacks in Windows Minidumps
As someone who is just starting to learn the intricacies of computer debugging, for the life of me, I can't understand how to read the Stack Text of a dump in Windbg. I've no idea of where to start on how to interpret them or how to go about it. Can anyone offer direction to this poor soul? ie (the only dump I have on ...
First, you need to have the proper symbols configured. The symbols will allow you to match memory addresses to function names. In order to do this you have to create a local folder in your machine in which you will store a local cache of symbols (for example: C:\symbols). Then you need to specify the symbols server pat...
Interpreting Stacks in Windows Minidumps As someone who is just starting to learn the intricacies of computer debugging, for the life of me, I can't understand how to read the Stack Text of a dump in Windbg. I've no idea of where to start on how to interpret them or how to go about it. Can anyone offer direction to thi...
TITLE: Interpreting Stacks in Windows Minidumps QUESTION: As someone who is just starting to learn the intricacies of computer debugging, for the life of me, I can't understand how to read the Stack Text of a dump in Windbg. I've no idea of where to start on how to interpret them or how to go about it. Can anyone offe...
[ "multithreading", "windbg", "stack-trace" ]
9
18
8,848
3
0
2008-09-16T22:21:27.240000
2008-09-16T22:49:30.493000
77,891
77,949
What emails clients are being used out there?
This is not "exactly" a programming question, but it's highly related. We are writing an app that sends out email invitations for a client (no, it's not spam). Their designer gave us an HTML and CSS template to use which is fine. The problem is that it looks like crap in Outlook 2007 because Microsoft decided to use Wo...
My understanding of the generally perceived best-practise on this, is is to code for the lowest-common denominator. There are plenty of email clients with enough use in-the-wild that aren't great at rendering "modern" HTML. Firstly, aim to send your mails as a 2-part multipart mime message. An HTML part AND a plain-tex...
What emails clients are being used out there? This is not "exactly" a programming question, but it's highly related. We are writing an app that sends out email invitations for a client (no, it's not spam). Their designer gave us an HTML and CSS template to use which is fine. The problem is that it looks like crap in Ou...
TITLE: What emails clients are being used out there? QUESTION: This is not "exactly" a programming question, but it's highly related. We are writing an app that sends out email invitations for a client (no, it's not spam). Their designer gave us an HTML and CSS template to use which is fine. The problem is that it loo...
[ "html", "email", "outlook", "statistics" ]
6
6
1,305
14
0
2008-09-16T22:21:47.270000
2008-09-16T22:29:57.890000
77,914
77,928
Failures caused by logrotate on Apache 2 with passphrase protected SSL key
I have an Apache 2 installation on Debian with mod_ssl installed. The server private key is protected by a passphase that needs to be entered on start-up. The error and access logs are subject to logrotate on a weekly basis. I find that Apache crashes with a passphrase-related error shortly after logrotate runs. I unde...
One option is to use Apache's provided log rotation tool. Its configured a bit differently than the system logrotate, but as it works with pipes, can move files around without an Apache restart.
Failures caused by logrotate on Apache 2 with passphrase protected SSL key I have an Apache 2 installation on Debian with mod_ssl installed. The server private key is protected by a passphase that needs to be entered on start-up. The error and access logs are subject to logrotate on a weekly basis. I find that Apache c...
TITLE: Failures caused by logrotate on Apache 2 with passphrase protected SSL key QUESTION: I have an Apache 2 installation on Debian with mod_ssl installed. The server private key is protected by a passphase that needs to be entered on start-up. The error and access logs are subject to logrotate on a weekly basis. I ...
[ "ssl", "crash", "apache2", "logrotate", "passphrase" ]
3
1
1,727
3
0
2008-09-16T22:26:08.723000
2008-09-16T22:28:06.583000
77,934
104,227
How do I display an image with ltk?
I have written code to read a windows bitmap and would now like to display it with ltk. How can I construct an appropriate object? Is there such functionality in ltk? If not how can I do it directly interfacing to tk?
It has been a while since I used LTK for anything, but the simplest way to display an image with LTK is as follows: (defpackage #:ltk-image-example (:use #:cl #:ltk)) (in-package #:ltk-image-example) (defun image-example () (with-ltk () (let ((image (make-image))) (image-load image "testimage.gif") (let ((canvas (mak...
How do I display an image with ltk? I have written code to read a windows bitmap and would now like to display it with ltk. How can I construct an appropriate object? Is there such functionality in ltk? If not how can I do it directly interfacing to tk?
TITLE: How do I display an image with ltk? QUESTION: I have written code to read a windows bitmap and would now like to display it with ltk. How can I construct an appropriate object? Is there such functionality in ltk? If not how can I do it directly interfacing to tk? ANSWER: It has been a while since I used LTK fo...
[ "lisp", "tcl", "tk-toolkit", "sbcl", "ltk" ]
4
4
2,266
2
0
2008-09-16T22:28:50.620000
2008-09-19T18:17:33.110000
77,954
77,971
How can you get Perl to stop when referencing an undef value?
How do you get Perl to stop and give a stack trace when you reference an undef value, rather than merely warning? It seems that use strict; isn't sufficient for this purpose.
use warnings FATAL => 'uninitialized'; use Carp (); $SIG{__DIE__} = \&Carp::confess; The first line makes the warning fatal. The next two cause a stack trace when your program dies. See also man 3pm warnings for more details.
How can you get Perl to stop when referencing an undef value? How do you get Perl to stop and give a stack trace when you reference an undef value, rather than merely warning? It seems that use strict; isn't sufficient for this purpose.
TITLE: How can you get Perl to stop when referencing an undef value? QUESTION: How do you get Perl to stop and give a stack trace when you reference an undef value, rather than merely warning? It seems that use strict; isn't sufficient for this purpose. ANSWER: use warnings FATAL => 'uninitialized'; use Carp (); $SI...
[ "perl", "warnings", "undef" ]
15
20
2,711
6
0
2008-09-16T22:30:07.437000
2008-09-16T22:32:25.853000
77,957
78,562
Visual Studio keeps adding blank lines
I'm using Visual Studio 2008 for an ASP.Net application, and Visual Studio keeps adding blank lines to my aspx file whenever I save, switch to design mode and back to code view, switch to split mode, or switch between files. Before I save, I will have: Then, it will magically transform into: I know it's mostly an aesth...
The only time I've seen Visual Studio do something close to this is when the XML/HTML in question is invalid, for example you are missing a closing tag somewhere.
Visual Studio keeps adding blank lines I'm using Visual Studio 2008 for an ASP.Net application, and Visual Studio keeps adding blank lines to my aspx file whenever I save, switch to design mode and back to code view, switch to split mode, or switch between files. Before I save, I will have: Then, it will magically tran...
TITLE: Visual Studio keeps adding blank lines QUESTION: I'm using Visual Studio 2008 for an ASP.Net application, and Visual Studio keeps adding blank lines to my aspx file whenever I save, switch to design mode and back to code view, switch to split mode, or switch between files. Before I save, I will have: Then, it w...
[ "visual-studio", "visual-studio-2008" ]
1
2
2,952
4
0
2008-09-16T22:30:19.150000
2008-09-17T00:11:09.330000
77,960
77,991
What to put in a session variable
I recently came across a ASP 1.1 web application that put a whole heap of stuff in the session variable - including all the DB data objects and even the DB connection object. It ends up being huge. When the web session times out (four hours after the user has finished using the application) sometimes their database tra...
This is pretty hard to answer because it's so application-specific, but here are a few guidelines I use: Put as little as possible in the session. User-specific selections that should only last during a given visit are a good choice often, variables that need to be accessible to multiple pages throughout the user's vis...
What to put in a session variable I recently came across a ASP 1.1 web application that put a whole heap of stuff in the session variable - including all the DB data objects and even the DB connection object. It ends up being huge. When the web session times out (four hours after the user has finished using the applica...
TITLE: What to put in a session variable QUESTION: I recently came across a ASP 1.1 web application that put a whole heap of stuff in the session variable - including all the DB data objects and even the DB connection object. It ends up being huge. When the web session times out (four hours after the user has finished...
[ "asp.net", "asp-classic" ]
7
6
4,267
9
0
2008-09-16T22:30:45.890000
2008-09-16T22:34:07.317000
77,982
78,110
Esc and Enter keys in Cocoa dialog
How can I dismiss dialog in Cocoa application when user presses Esc or Enter key? I have OK button, is it possible to make it default button?
If you present the alert panel using the NSAlert class or, NSRunAlertPanel family of functions, or the NSBeginAlertSheet family of functions, you will get support for default and cancel buttons automatically. If you're presenting a sheet that needs OK/Cancel buttons, and you're not using any of the above, you should be...
Esc and Enter keys in Cocoa dialog How can I dismiss dialog in Cocoa application when user presses Esc or Enter key? I have OK button, is it possible to make it default button?
TITLE: Esc and Enter keys in Cocoa dialog QUESTION: How can I dismiss dialog in Cocoa application when user presses Esc or Enter key? I have OK button, is it possible to make it default button? ANSWER: If you present the alert panel using the NSAlert class or, NSRunAlertPanel family of functions, or the NSBeginAlertS...
[ "cocoa", "interface-builder" ]
6
9
3,315
2
0
2008-09-16T22:33:25.493000
2008-09-16T22:49:23.770000
77,990
78,050
Redraw screen in terminal
How do some programs edit whats being displayed on the terminal (to pick a random example, the program 'sl')? I'm thinking of the Linux terminal here, it may happen in other OS's too, I don't know. I've always thought once some text was displayed, it stayed there. How do you change it without redrawing the entire scree...
Many applications make use of the curses library, or some language binding to it. For rewriting on a single line, such as updating progress information, the special character " carriage return ", often specified by the escape sequence "\r", can return the cursor to the start of the current line allowing subsequent outp...
Redraw screen in terminal How do some programs edit whats being displayed on the terminal (to pick a random example, the program 'sl')? I'm thinking of the Linux terminal here, it may happen in other OS's too, I don't know. I've always thought once some text was displayed, it stayed there. How do you change it without ...
TITLE: Redraw screen in terminal QUESTION: How do some programs edit whats being displayed on the terminal (to pick a random example, the program 'sl')? I'm thinking of the Linux terminal here, it may happen in other OS's too, I don't know. I've always thought once some text was displayed, it stayed there. How do you ...
[ "linux", "terminal" ]
9
5
12,555
9
0
2008-09-16T22:34:03.043000
2008-09-16T22:41:08.907000
78,004
78,063
How should I start when developing a system based on modules or plugins?
I intend to develop a system that is entirely based on modules. The system base should have support for finding out about plugins, starting them up and being able to provide ways for those modules to communicate. Ideally, one should be able to put in new modules and yank out unused modules at will, and modules should b...
You should definitely look at OSGi. It aims at being the component/plugin mechanism for Java. It allows you to modularize your code (in so-called bundles) and update bundles at runtime. You can also completely hide implementation packages from unwanted access by other bundles, eg. only provide the API. Eclipse was the ...
How should I start when developing a system based on modules or plugins? I intend to develop a system that is entirely based on modules. The system base should have support for finding out about plugins, starting them up and being able to provide ways for those modules to communicate. Ideally, one should be able to put...
TITLE: How should I start when developing a system based on modules or plugins? QUESTION: I intend to develop a system that is entirely based on modules. The system base should have support for finding out about plugins, starting them up and being able to provide ways for those modules to communicate. Ideally, one sho...
[ "java", "events", "plugins", "module" ]
7
10
548
4
0
2008-09-16T22:35:24.163000
2008-09-16T22:42:44.037000
78,018
78,067
Executing different set of MSBuild tasks for each user?
In our development environment each developer has their own dev server. Often times they do not actually develop on that server but develop from their local machine, deploy to their dev server, and then attach with the remote debugger to do debugging. My question is; how can I use MSBuild to execute a different set of ...
You could use the project user file (*.suo / *.user) to do some 'poor mans dependency injection'. looks like this guy did something similar
Executing different set of MSBuild tasks for each user? In our development environment each developer has their own dev server. Often times they do not actually develop on that server but develop from their local machine, deploy to their dev server, and then attach with the remote debugger to do debugging. My question ...
TITLE: Executing different set of MSBuild tasks for each user? QUESTION: In our development environment each developer has their own dev server. Often times they do not actually develop on that server but develop from their local machine, deploy to their dev server, and then attach with the remote debugger to do debug...
[ "visual-studio", "deployment", "msbuild", "build" ]
1
2
548
2
0
2008-09-16T22:38:06.060000
2008-09-16T22:43:28.683000
78,048
78,095
Best way to detect an application crash and restart it?
What's the best way to detect an application crash in XP (produces the same pair of 'error' windows each time - each with same window title) and then restart it? I'm especially interested to hear of solutions that use minimal system resources as the system in question is quite old. I had thought of using a scripting la...
How about creating a wrapper application that launches the faulty app as a child and waits for it? If the exit code of the child indicates an error, then restart it, else exit.
Best way to detect an application crash and restart it? What's the best way to detect an application crash in XP (produces the same pair of 'error' windows each time - each with same window title) and then restart it? I'm especially interested to hear of solutions that use minimal system resources as the system in ques...
TITLE: Best way to detect an application crash and restart it? QUESTION: What's the best way to detect an application crash in XP (produces the same pair of 'error' windows each time - each with same window title) and then restart it? I'm especially interested to hear of solutions that use minimal system resources as ...
[ "windows-xp", "crash" ]
8
3
14,868
5
0
2008-09-16T22:40:50.233000
2008-09-16T22:48:07.503000
78,049
79,485
Publishing multiple sites on a single instance of umbraco
I am looking to setup a parallel site to one already that already uses umbraco for its content management system. The new site would share admins, templates, macros, and media resources, but not any content. If I setup multiple host headers pointing to the same directory with an umbraco install, how can I switch the to...
I believe you first have to change a setting in umbracosettings.config: true Then I think you also have to right click on each top node and click 'Manage Hostnames', then add the appropriate host name for that top node. It already sounds like you have IIS configured correctly, so you should be good to go on that front....
Publishing multiple sites on a single instance of umbraco I am looking to setup a parallel site to one already that already uses umbraco for its content management system. The new site would share admins, templates, macros, and media resources, but not any content. If I setup multiple host headers pointing to the same ...
TITLE: Publishing multiple sites on a single instance of umbraco QUESTION: I am looking to setup a parallel site to one already that already uses umbraco for its content management system. The new site would share admins, templates, macros, and media resources, but not any content. If I setup multiple host headers poi...
[ "content-management-system", "umbraco", "sites", "hostheaders" ]
1
16
5,197
1
0
2008-09-16T22:41:05.880000
2008-09-17T02:58:31.130000
78,053
78,866
How to iterate over all the page breaks in an Excel 2003 worksheet via COM
I've been trying to retrieve the locations of all the page breaks on a given Excel 2003 worksheet over COM. Here's an example of the kind of thing I'm trying to do: Excel::HPageBreaksPtr pHPageBreaks = pSheet->GetHPageBreaks(); long count = pHPageBreaks->Count; for (long i=0; i < count; ++i) { Excel::HPageBreakPtr pHPa...
Experimenting with Excel 2007 from Visual Basic, I discovered that the page break isn't known unless it has been displayed on the screen at least once. The best workaround I could find was to page down, from the top of the sheet to the last row containing data. Then you can enumerate all the page breaks. Here's the VBA...
How to iterate over all the page breaks in an Excel 2003 worksheet via COM I've been trying to retrieve the locations of all the page breaks on a given Excel 2003 worksheet over COM. Here's an example of the kind of thing I'm trying to do: Excel::HPageBreaksPtr pHPageBreaks = pSheet->GetHPageBreaks(); long count = pHPa...
TITLE: How to iterate over all the page breaks in an Excel 2003 worksheet via COM QUESTION: I've been trying to retrieve the locations of all the page breaks on a given Excel 2003 worksheet over COM. Here's an example of the kind of thing I'm trying to do: Excel::HPageBreaksPtr pHPageBreaks = pSheet->GetHPageBreaks();...
[ "c++", "excel", "com", "vba" ]
1
2
2,765
2
0
2008-09-16T22:41:20.980000
2008-09-17T01:14:02.470000
78,061
78,632
Chart controls for MFC application?
I would like to have some suggestions about which third-part controls can we use in our Visual C++ MFC application?
We've deployed IOComp 's Plot Pack in both ActiveX and.Net flavors with great success. Great API, incredibly flexible, provides a toolbar that lets users pan/zoom/customize. It's solid, has a long track record, relatively inexpensive, and is very fast. (I'm not affiliated, by the way.)
Chart controls for MFC application? I would like to have some suggestions about which third-part controls can we use in our Visual C++ MFC application?
TITLE: Chart controls for MFC application? QUESTION: I would like to have some suggestions about which third-part controls can we use in our Visual C++ MFC application? ANSWER: We've deployed IOComp 's Plot Pack in both ActiveX and.Net flavors with great success. Great API, incredibly flexible, provides a toolbar tha...
[ "user-interface", "visual-c++", "mfc" ]
2
2
8,845
7
0
2008-09-16T22:42:32.477000
2008-09-17T00:21:52.393000
78,062
78,343
SSRS 2005 Matrix and border styles when exporting to XLS
The Matrix in SSRS (SQL Server Reporting Services 2005) seems to have issues with certain the border styles when exporting to XLS (but not PDF or web view; maybe other formats, not sure?). For example: Create a matrix and set the Matrix border style to Black Solid 1px, but all 4 of the cells to have a border style of B...
This seems to be a bug in SSRS 2005 Excel rendering. I've been able to fix this by explicitly setting all sides of the matrix BorderStyle property (Left, Right, Top, Bottom) to Solid. Also, when you do this, it seems like setting the BorderStyle.Default property to Solid or None doesn't matter. The value explicitly set...
SSRS 2005 Matrix and border styles when exporting to XLS The Matrix in SSRS (SQL Server Reporting Services 2005) seems to have issues with certain the border styles when exporting to XLS (but not PDF or web view; maybe other formats, not sure?). For example: Create a matrix and set the Matrix border style to Black Soli...
TITLE: SSRS 2005 Matrix and border styles when exporting to XLS QUESTION: The Matrix in SSRS (SQL Server Reporting Services 2005) seems to have issues with certain the border styles when exporting to XLS (but not PDF or web view; maybe other formats, not sure?). For example: Create a matrix and set the Matrix border s...
[ "asp.net", "reporting-services", "reporting", "reportviewer", "styles" ]
2
2
3,568
2
0
2008-09-16T22:42:41.133000
2008-09-16T23:30:02.440000
78,064
91,536
Error code or Exception - which is the best practice for an ASP.Net web service?
I've read this thread for WCF has inbuilt Custom Fault codes and stuff. But what is the best practice for ASP.Net web services? Do I throw exceptions and let the client handle the exception or send an Error code (success, failure etc) that the client would rely upon to do its processing. Update: Just to discuss further...
Jeff Atwood posted an interesting aerticle about this subject some time ago. Allthough a.NET exception is converted to a SoapFault, which is compatible with most other toolkits, the information in the faults isn't very good. Therefor, the conlusion of the article is that.NET webservices don't throw very good exception ...
Error code or Exception - which is the best practice for an ASP.Net web service? I've read this thread for WCF has inbuilt Custom Fault codes and stuff. But what is the best practice for ASP.Net web services? Do I throw exceptions and let the client handle the exception or send an Error code (success, failure etc) that...
TITLE: Error code or Exception - which is the best practice for an ASP.Net web service? QUESTION: I've read this thread for WCF has inbuilt Custom Fault codes and stuff. But what is the best practice for ASP.Net web services? Do I throw exceptions and let the client handle the exception or send an Error code (success,...
[ "asp.net", "web-services" ]
2
2
2,629
2
0
2008-09-16T22:43:01.290000
2008-09-18T10:43:11.940000
78,108
78,188
Is there a difference between apache module vs cgi (concerning security)?
E.g. Is it more secure to use mod_php instead of php-cgi? Or is it more secure to use mod_perl instead of traditional cgi-scripts? I'm mainly interested in security concerns, but speed might be an issue if there are significant differences.
Security in what sense? Either way it really depends on what script is running and how well it is written. Too many scripts these days are half-assed and do not properly do input validation. I personally prefer FastCGI to mod_php since if a FastCGI process dies a new one will get spawned, whereas I have seen mod_php ki...
Is there a difference between apache module vs cgi (concerning security)? E.g. Is it more secure to use mod_php instead of php-cgi? Or is it more secure to use mod_perl instead of traditional cgi-scripts? I'm mainly interested in security concerns, but speed might be an issue if there are significant differences.
TITLE: Is there a difference between apache module vs cgi (concerning security)? QUESTION: E.g. Is it more secure to use mod_php instead of php-cgi? Or is it more secure to use mod_perl instead of traditional cgi-scripts? I'm mainly interested in security concerns, but speed might be an issue if there are significant ...
[ "php", "perl", "apache", "mod-perl", "mod-php" ]
19
15
21,406
6
0
2008-09-16T22:49:22.443000
2008-09-16T23:02:53.223000
78,125
78,202
Why can't I convert 'char**' to a 'const char* const*' in C?
The following code snippet (correctly) gives a warning in C and an error in C++ (using gcc & g++ respectively, tested with versions 3.4.5 and 4.2.1; MSVC does not seem to care): char **a; const char** b = a; I can understand and accept this. The C++ solution to this problem is to change b to be a const char * const *, ...
I had this same problem a few years ago and it irked me to no end. The rules in C are more simply stated (i.e. they don't list exceptions like converting char** to const char*const* ). Consequenlty, it's just not allowed. With the C++ standard, they included more rules to allow cases like this. In the end, it's just a ...
Why can't I convert 'char**' to a 'const char* const*' in C? The following code snippet (correctly) gives a warning in C and an error in C++ (using gcc & g++ respectively, tested with versions 3.4.5 and 4.2.1; MSVC does not seem to care): char **a; const char** b = a; I can understand and accept this. The C++ solution ...
TITLE: Why can't I convert 'char**' to a 'const char* const*' in C? QUESTION: The following code snippet (correctly) gives a warning in C and an error in C++ (using gcc & g++ respectively, tested with versions 3.4.5 and 4.2.1; MSVC does not seem to care): char **a; const char** b = a; I can understand and accept this....
[ "c", "pointers", "constants", "const-correctness" ]
63
61
23,594
6
0
2008-09-16T22:50:30.617000
2008-09-16T23:04:21.097000
78,127
78,169
CGPathAddArc vs CGPathAddArcToPoint
Apple's CoreGraphics library defines two functions for describing an arc. CGPathAddArc adds an arc based on a center point, radius, and pair of angles. CGPathAddArcToPoint adds an arc based on a radius and a pair of tangent lines. The details are explained in the CGPath API reference. Why two functions? Simple convenie...
The former gets you a portion of a circle (really, an approximation of one), while the latter exposes the fact that you're creating a Bézier path. Depending on what you're actually drawing, one or the other might be more convenient. You could really consider both of them conveniences for CGPathAddCurveToPoint.
CGPathAddArc vs CGPathAddArcToPoint Apple's CoreGraphics library defines two functions for describing an arc. CGPathAddArc adds an arc based on a center point, radius, and pair of angles. CGPathAddArcToPoint adds an arc based on a radius and a pair of tangent lines. The details are explained in the CGPath API reference...
TITLE: CGPathAddArc vs CGPathAddArcToPoint QUESTION: Apple's CoreGraphics library defines two functions for describing an arc. CGPathAddArc adds an arc based on a center point, radius, and pair of angles. CGPathAddArcToPoint adds an arc based on a radius and a pair of tangent lines. The details are explained in the CG...
[ "c", "macos", "drawing", "core-graphics" ]
13
8
10,074
2
0
2008-09-16T22:50:43.923000
2008-09-16T22:59:07.040000
78,157
215,547
Bursty writes to SD/USB stalling my time-critical apps on embedded Linux
I'm working on an embedded Linux project that interfaces an ARM9 to a hardware video encoder chip, and writes the video out to SD card or USB stick. The software architecture involves a kernel driver that reads data into a pool of buffers, and a userland app that writes the data to a file on the mounted removable devic...
For the record, there turned out to be two main aspects that seem to have eliminated the problem in all but the most extreme cases. This system is still in development and hasn't been thoroughly torture-tested yet but is working fairly well (touch wood). The big win came from making the userland writer app multi-thread...
Bursty writes to SD/USB stalling my time-critical apps on embedded Linux I'm working on an embedded Linux project that interfaces an ARM9 to a hardware video encoder chip, and writes the video out to SD card or USB stick. The software architecture involves a kernel driver that reads data into a pool of buffers, and a u...
TITLE: Bursty writes to SD/USB stalling my time-critical apps on embedded Linux QUESTION: I'm working on an embedded Linux project that interfaces an ARM9 to a hardware video encoder chip, and writes the video out to SD card or USB stick. The software architecture involves a kernel driver that reads data into a pool o...
[ "linux", "video", "embedded", "filesystems", "real-time" ]
14
10
4,013
10
0
2008-09-16T22:54:34.583000
2008-10-18T20:47:20.753000
78,161
79,794
Assistance porting commctrl commands to C#
In a C++ app, I have an hWnd pointing to a window running in a third party process. This window contains controls which extend the COM TreeView control. I am interested in obtaining the CheckState of this control. I use the hWnd to get an HTREEITEM using TreeView_GetRoot(hwnd) from commctrl.h hwnd points to the window ...
We have these definitions from CommCtrl.h: #define TreeView_SetItemState(hwndTV, hti, data, _mask) \ { TVITEM _ms_TVi;\ _ms_TVi.mask = TVIF_STATE; \ _ms_TVi.hItem = (hti); \ _ms_TVi.stateMask = (_mask);\ _ms_TVi.state = (data);\ SNDMSG((hwndTV), TVM_SETITEM, 0, (LPARAM)(TV_ITEM *)&_ms_TVi);\ } #define TreeView_SetChec...
Assistance porting commctrl commands to C# In a C++ app, I have an hWnd pointing to a window running in a third party process. This window contains controls which extend the COM TreeView control. I am interested in obtaining the CheckState of this control. I use the hWnd to get an HTREEITEM using TreeView_GetRoot(hwnd)...
TITLE: Assistance porting commctrl commands to C# QUESTION: In a C++ app, I have an hWnd pointing to a window running in a third party process. This window contains controls which extend the COM TreeView control. I am interested in obtaining the CheckState of this control. I use the hWnd to get an HTREEITEM using Tree...
[ "c#", "com", "treeview" ]
1
2
838
2
0
2008-09-16T22:55:54.877000
2008-09-17T03:52:08.223000
78,172
166,767
Using C/Pthreads: do shared variables need to be volatile?
In the C programming language and Pthreads as the threading library; do variables/structures that are shared between threads need to be declared as volatile? Assuming that they might be protected by a lock or not (barriers perhaps). Does the pthread POSIX standard have any say about this, is this compiler-dependent or ...
I think one very important property of volatile is that it makes the variable be written to memory when modified, and reread from memory each time it accessed. The other answers here mix volatile and synchronization, and it is clear from some other answers than this that volatile is NOT a sync primitive (credit where c...
Using C/Pthreads: do shared variables need to be volatile? In the C programming language and Pthreads as the threading library; do variables/structures that are shared between threads need to be declared as volatile? Assuming that they might be protected by a lock or not (barriers perhaps). Does the pthread POSIX stand...
TITLE: Using C/Pthreads: do shared variables need to be volatile? QUESTION: In the C programming language and Pthreads as the threading library; do variables/structures that are shared between threads need to be declared as volatile? Assuming that they might be protected by a lock or not (barriers perhaps). Does the p...
[ "c", "multithreading", "pthreads" ]
36
8
20,382
13
0
2008-09-16T22:59:37.613000
2008-10-03T13:12:17.543000
78,181
149,993
How do you get a string from a MemoryStream?
If I am given a MemoryStream that I know has been populated with a String, how do I get a String back out?
This sample shows how to read and write a string to a MemoryStream. Imports System.IO Module Module1 Sub Main() ' We don't need to dispose any of the MemoryStream ' because it is a managed object. However, just for ' good practice, we'll close the MemoryStream. Using ms As New MemoryStream Dim sw As New StreamWriter(m...
How do you get a string from a MemoryStream? If I am given a MemoryStream that I know has been populated with a String, how do I get a String back out?
TITLE: How do you get a string from a MemoryStream? QUESTION: If I am given a MemoryStream that I know has been populated with a String, how do I get a String back out? ANSWER: This sample shows how to read and write a string to a MemoryStream. Imports System.IO Module Module1 Sub Main() ' We don't need to dispose a...
[ ".net", "vb.net", "string", "memorystream" ]
612
496
573,776
13
0
2008-09-16T23:02:01.587000
2008-09-29T18:20:38.280000
78,194
78,227
What tools are there for timed batch processes in Java EE?
My employer just asked me to run a timed batch process in a Java EE WebSphere application they have running. It's supposed to run a certain class at 11:30 pm everyday. I'm not very familiar with Java EE nor WebSphere server (or tomcat, in the development environment), and I've been digging around but all I've found is ...
You should look at the open-source Quartz library from OpenSymphony. Very easy to use and perfect for this kind of thing. TimerTasks are best suited for running something in a short time in the future. But for a repeated execution in a large timeframe such as this, Quartz excels. You can even keep your list of upcoming...
What tools are there for timed batch processes in Java EE? My employer just asked me to run a timed batch process in a Java EE WebSphere application they have running. It's supposed to run a certain class at 11:30 pm everyday. I'm not very familiar with Java EE nor WebSphere server (or tomcat, in the development enviro...
TITLE: What tools are there for timed batch processes in Java EE? QUESTION: My employer just asked me to run a timed batch process in a Java EE WebSphere application they have running. It's supposed to run a certain class at 11:30 pm everyday. I'm not very familiar with Java EE nor WebSphere server (or tomcat, in the ...
[ "tomcat", "jakarta-ee", "process", "timer", "websphere" ]
2
5
2,941
7
0
2008-09-16T23:03:26.933000
2008-09-16T23:10:13.657000
78,217
78,327
Managing large user databases for single-signon
How would you implement a system with the following objectives: Manage authentication, authorization for hundreds of thousands of existing users currently tightly integrated with a 3rd party vendor's application (We want to bust these users out into something we manage and make our apps work against it, plus our 3rd pa...
There is a difference between authentication and authorization/profiling so don't force both necessarily into a single tool. Your second solution of using LDAP for authentication and a DB for authorization seems more robust as the LDAP data is controlled by the user and the DB would be controlled by an admin. The latte...
Managing large user databases for single-signon How would you implement a system with the following objectives: Manage authentication, authorization for hundreds of thousands of existing users currently tightly integrated with a 3rd party vendor's application (We want to bust these users out into something we manage an...
TITLE: Managing large user databases for single-signon QUESTION: How would you implement a system with the following objectives: Manage authentication, authorization for hundreds of thousands of existing users currently tightly integrated with a 3rd party vendor's application (We want to bust these users out into some...
[ "django", "authentication", "active-directory", "ldap", "authorization" ]
6
5
950
5
0
2008-09-16T23:08:32.803000
2008-09-16T23:26:51.747000
78,230
78,248
Compiling mxml files with ant and flex sdk
I am just getting started with flex and am using the SDK (not Flex Builder). I was wondering what's the best way to compile a mxml file from an ant build script.
The Flex SDK ships with a set of ant tasks. More info at: http://livedocs.adobe.com/flex/3/html/help.html?content=anttasks_1.html Here is an example of compiling Flex SWCs with ant: http://www.mikechambers.com/blog/2006/05/19/example-using-ant-with-compc-to-compile-swcs/ mike chambers
Compiling mxml files with ant and flex sdk I am just getting started with flex and am using the SDK (not Flex Builder). I was wondering what's the best way to compile a mxml file from an ant build script.
TITLE: Compiling mxml files with ant and flex sdk QUESTION: I am just getting started with flex and am using the SDK (not Flex Builder). I was wondering what's the best way to compile a mxml file from an ant build script. ANSWER: The Flex SDK ships with a set of ant tasks. More info at: http://livedocs.adobe.com/flex...
[ "apache-flex", "ant", "mxml" ]
7
10
12,435
4
0
2008-09-16T23:10:27.480000
2008-09-16T23:12:55.413000
78,233
78,292
XML to Excel (2007) Ideas using Windows XP, and C#.Net
I have a dataset that I have modified into an xml document and then used a xsl sheet to transform into an Excel xml format in order to allow the data to be opened programatically from my application. I have run into two problems with this: Excel is not the default Windows application to open Excel files, therefore when...
Process.Start(@"C:\Program Files\Microsoft Office\Officexx\excel.exe", "yourfile.xml"); That being said, you will still get the message box. I suppose that you could use the Interop, but I am not sure how well it will work for you.
XML to Excel (2007) Ideas using Windows XP, and C#.Net I have a dataset that I have modified into an xml document and then used a xsl sheet to transform into an Excel xml format in order to allow the data to be opened programatically from my application. I have run into two problems with this: Excel is not the default ...
TITLE: XML to Excel (2007) Ideas using Windows XP, and C#.Net QUESTION: I have a dataset that I have modified into an xml document and then used a xsl sheet to transform into an Excel xml format in order to allow the data to be opened programatically from my application. I have run into two problems with this: Excel i...
[ "c#", ".net", "xml", "excel" ]
2
1
4,783
6
0
2008-09-16T23:10:38.790000
2008-09-16T23:19:42.077000
78,257
78,295
Dictionary webservice recommendation
Lot of googling did not help me! Are there any good dictionary web based available? I am looking for a site which can send me the meaning of words if we pass the word through query string!
I found you a Big Huge Thesaurus with a web API, and a dictionary at Aonaware that looks like it uses SOAP
Dictionary webservice recommendation Lot of googling did not help me! Are there any good dictionary web based available? I am looking for a site which can send me the meaning of words if we pass the word through query string!
TITLE: Dictionary webservice recommendation QUESTION: Lot of googling did not help me! Are there any good dictionary web based available? I am looking for a site which can send me the meaning of words if we pass the word through query string! ANSWER: I found you a Big Huge Thesaurus with a web API, and a dictionary a...
[ "web-services" ]
17
14
13,684
3
0
2008-09-16T23:14:16.613000
2008-09-16T23:20:34.290000
78,263
79,912
How to fix a corrupt Delphi 2009 Install
I installed both the Delphi 2009 trial and actual release via the web installer when I received them and experienced the same errors when installing both. Both times it appears that the core web installer failed when it went to spawn the additional install packages for boost, documentation and dbtools. (It brought up a...
Step 1 Clean out the registry of all things Delphi 2009. You're looking for HKLM\Software\Codegear\BDS\6.0 and everything under it. Purge the HKCU equivalent while you're at it. Search under HKEY.CLASSES.ROOT for anything that contains "CodeGear\RAD Studio\6.0" - assuming you installed into the default folder. Purge al...
How to fix a corrupt Delphi 2009 Install I installed both the Delphi 2009 trial and actual release via the web installer when I received them and experienced the same errors when installing both. Both times it appears that the core web installer failed when it went to spawn the additional install packages for boost, do...
TITLE: How to fix a corrupt Delphi 2009 Install QUESTION: I installed both the Delphi 2009 trial and actual release via the web installer when I received them and experienced the same errors when installing both. Both times it appears that the core web installer failed when it went to spawn the additional install pack...
[ "delphi", "delphi-2009" ]
2
4
3,413
2
0
2008-09-16T23:15:03.210000
2008-09-17T04:15:34.860000
78,278
83,715
Clean implementation of the strategy pattern in Perl
How do I write a clean implementation of the strategy pattern in Perl? I want to do it in a way that leverages Perl's features.
It really depends on what you mean by "clean implementation". As in any other language, you can use Perl's object system with polymorphism to do this for you. However, since Perl has first class functions, this pattern isn't normally coded explicitly. Leon Timmermans' example of sort { lc($a) cmp lc($b) } @items demons...
Clean implementation of the strategy pattern in Perl How do I write a clean implementation of the strategy pattern in Perl? I want to do it in a way that leverages Perl's features.
TITLE: Clean implementation of the strategy pattern in Perl QUESTION: How do I write a clean implementation of the strategy pattern in Perl? I want to do it in a way that leverages Perl's features. ANSWER: It really depends on what you mean by "clean implementation". As in any other language, you can use Perl's objec...
[ "perl", "design-patterns", "strategy-pattern" ]
3
5
1,151
2
0
2008-09-16T23:17:06.200000
2008-09-17T14:17:36.333000
78,282
78,344
Reading files in use and system files on Windows XP & Vista using .NET
I have this idea for a free backup application. The largest problem I need to solve at the moment is how to access files which are being used or are system files. I would like the application to be able to perform a full backup of files (i.e. not on a disk sector by sector level). I'll turn the server part of the appli...
What you're looking for regarding the files in use is the " Volume Shadow Copy Service " which is available on Windows XP, Server 2003 and above. This will allow you to copy files even when they are in use. I have found a CodeProject article " Volume Shadow Copies from.NET " which describes a simple Outlook PST backup ...
Reading files in use and system files on Windows XP & Vista using .NET I have this idea for a free backup application. The largest problem I need to solve at the moment is how to access files which are being used or are system files. I would like the application to be able to perform a full backup of files (i.e. not on...
TITLE: Reading files in use and system files on Windows XP & Vista using .NET QUESTION: I have this idea for a free backup application. The largest problem I need to solve at the moment is how to access files which are being used or are system files. I would like the application to be able to perform a full backup of ...
[ "c#", ".net", "windows" ]
0
5
701
3
0
2008-09-16T23:17:42.190000
2008-09-16T23:30:03.267000
78,296
78,324
What are the reasons why PHP would echo errors, even with error_reporting(0)?
What are some reasons why PHP would force errors to show, no matter what you tell it to disable? I have tried error_reporting(0); ini_set('display_errors', 0); with no luck.
Note the caveat in the manual at http://uk.php.net/error_reporting: Most of E_STRICT errors are evaluated at the compile time thus such errors are not reported in the file where error_reporting is enhanced to include E_STRICT errors (and vice versa). If your underlying system is configured to report E_STRICT errors, th...
What are the reasons why PHP would echo errors, even with error_reporting(0)? What are some reasons why PHP would force errors to show, no matter what you tell it to disable? I have tried error_reporting(0); ini_set('display_errors', 0); with no luck.
TITLE: What are the reasons why PHP would echo errors, even with error_reporting(0)? QUESTION: What are some reasons why PHP would force errors to show, no matter what you tell it to disable? I have tried error_reporting(0); ini_set('display_errors', 0); with no luck. ANSWER: Note the caveat in the manual at http://u...
[ "php", "error-reporting", "ini-set" ]
11
15
48,665
8
0
2008-09-16T23:21:23.193000
2008-09-16T23:26:17.067000
78,303
78,677
Remoting facilities on Visual Studio 2008
I'm toying with my first remoting project and I need to create a RemotableType DLL. I know I can compile it by hand with csc, but I wonder if there are some facilities in place on Visual Studio to handle the Remoting case, or, more specificly, to tell it that a specific file should be compiled as a.dll without having t...
You can get away with just calling csc.exe on the pre-build event if you don't want to mess with the.proj file directly and add build events.
Remoting facilities on Visual Studio 2008 I'm toying with my first remoting project and I need to create a RemotableType DLL. I know I can compile it by hand with csc, but I wonder if there are some facilities in place on Visual Studio to handle the Remoting case, or, more specificly, to tell it that a specific file sh...
TITLE: Remoting facilities on Visual Studio 2008 QUESTION: I'm toying with my first remoting project and I need to create a RemotableType DLL. I know I can compile it by hand with csc, but I wonder if there are some facilities in place on Visual Studio to handle the Remoting case, or, more specificly, to tell it that ...
[ "c#", "visual-studio", "remoting" ]
0
0
383
2
0
2008-09-16T23:22:26.657000
2008-09-17T00:33:37.060000
78,336
78,366
Hard drive device name on Solaris
I need to figure out the hard drive name for a solaris box and it is not clear to me what the device name is. On linux, it would be something like /dev/hda or /dev/sda, but on solaris I am getting a bit lost in the partitions and what the device is called. I think that entries like /dev/rdsk/c0t0d0s0 are the partitions...
/dev/rdsk/c0t0d0s0 means Controller 0, SCSI target (ID) 0, and s means Slice (partition) 0. Typically, by convention, s2 is the entire disk. This partition overlaps with the other partitions. prtvtoc /dev/rdsk/c0t0d0s0 will show you the partition table for the disk, to make sure.
Hard drive device name on Solaris I need to figure out the hard drive name for a solaris box and it is not clear to me what the device name is. On linux, it would be something like /dev/hda or /dev/sda, but on solaris I am getting a bit lost in the partitions and what the device is called. I think that entries like /de...
TITLE: Hard drive device name on Solaris QUESTION: I need to figure out the hard drive name for a solaris box and it is not clear to me what the device name is. On linux, it would be something like /dev/hda or /dev/sda, but on solaris I am getting a bit lost in the partitions and what the device is called. I think tha...
[ "solaris" ]
8
12
16,164
8
0
2008-09-16T23:28:43.100000
2008-09-16T23:32:46.177000
78,389
79,719
RhinoMocks: Correct way to mock property getter
I'm new to RhinoMocks, and trying to get a grasp on the syntax in addition to what is happening under the hood. I have a user object, we'll call it User, which has a property called IsAdministrator. The value for IsAdministrator is evaluated via another class that checks the User's security permissions, and returns eit...
One quick note before I jump into this. Typically you want to avoid the use of a "Strict" mock because it makes for a brittle test. A strict mock will throw an exception if anything occurs that you do not explicitly tell Rhino will happen. Also I think you may be misunderstanding exactly what Rhino is doing when you ma...
RhinoMocks: Correct way to mock property getter I'm new to RhinoMocks, and trying to get a grasp on the syntax in addition to what is happening under the hood. I have a user object, we'll call it User, which has a property called IsAdministrator. The value for IsAdministrator is evaluated via another class that checks ...
TITLE: RhinoMocks: Correct way to mock property getter QUESTION: I'm new to RhinoMocks, and trying to get a grasp on the syntax in addition to what is happening under the hood. I have a user object, we'll call it User, which has a property called IsAdministrator. The value for IsAdministrator is evaluated via another ...
[ "tdd", "rhino-mocks" ]
12
11
12,262
3
0
2008-09-16T23:37:01.800000
2008-09-17T03:41:00.480000
78,392
99,021
How to install php-gtk in the Acer Aspire One?
I have an application that works pretty well in Ubuntu, Windows and the Xandros that come with the Asus EeePC. Now we are moving to the Acer Aspire One but I'm having a lot of trouble making php-gtk to compile under the Fedora-like (Linpus Linux Lite) Linux that come with it.
Hi Guys well I finally got this thing to work the basic workflow was this: #!/bin/bash sudo yum install yum-utils #We don't want to update the main gtk2 by mistake so we download them #manually and install with no-deps[1](and forced because gtk version #version of AA1 and the gtk2-devel aren't compatible). sudo yumdown...
How to install php-gtk in the Acer Aspire One? I have an application that works pretty well in Ubuntu, Windows and the Xandros that come with the Asus EeePC. Now we are moving to the Acer Aspire One but I'm having a lot of trouble making php-gtk to compile under the Fedora-like (Linpus Linux Lite) Linux that come with ...
TITLE: How to install php-gtk in the Acer Aspire One? QUESTION: I have an application that works pretty well in Ubuntu, Windows and the Xandros that come with the Asus EeePC. Now we are moving to the Acer Aspire One but I'm having a lot of trouble making php-gtk to compile under the Fedora-like (Linpus Linux Lite) Lin...
[ "php", "fedora", "php-gtk" ]
0
1
2,047
3
0
2008-09-16T23:38:21.500000
2008-09-19T02:39:18.693000
78,422
78,578
How Many Network Connections Can a Computer Support?
When writing a custom server, what are the best practices or techniques to determine maximum number of users that can connect to the server at any given time? I would assume that the capabilities of the computer hardware, network capacity, and server protocol would all be important factors. Also, do you think it is a g...
Dan Kegel put together a summary of techniques for handling large amounts of network connections from a single server, here: http://www.kegel.com/c10k.html
How Many Network Connections Can a Computer Support? When writing a custom server, what are the best practices or techniques to determine maximum number of users that can connect to the server at any given time? I would assume that the capabilities of the computer hardware, network capacity, and server protocol would a...
TITLE: How Many Network Connections Can a Computer Support? QUESTION: When writing a custom server, what are the best practices or techniques to determine maximum number of users that can connect to the server at any given time? I would assume that the capabilities of the computer hardware, network capacity, and serve...
[ "networking", "network-programming" ]
8
8
11,847
6
0
2008-09-16T23:45:38.627000
2008-09-17T00:13:13.383000
78,423
81,659
Using a custom framework
The error I'm getting: in /Users/robert/Documents/funWithFrameworks/build/Debug-iphonesimulator/funWithFrameworks.framework/funWithFrameworks, can't link with a main executable Cliff notes: trying to include framework doesn't want to link More detail: I'm developing for a mobile device... hint, hint using Xcode and I'm...
Apple clearly said that you can not use dynamic libraries on their mobiles. And a private framework is just this. You can, however, use static libraries.
Using a custom framework The error I'm getting: in /Users/robert/Documents/funWithFrameworks/build/Debug-iphonesimulator/funWithFrameworks.framework/funWithFrameworks, can't link with a main executable Cliff notes: trying to include framework doesn't want to link More detail: I'm developing for a mobile device... hint,...
TITLE: Using a custom framework QUESTION: The error I'm getting: in /Users/robert/Documents/funWithFrameworks/build/Debug-iphonesimulator/funWithFrameworks.framework/funWithFrameworks, can't link with a main executable Cliff notes: trying to include framework doesn't want to link More detail: I'm developing for a mobi...
[ "iphone", "xcode", "macos", "cocoa" ]
3
5
8,486
4
0
2008-09-16T23:45:40.313000
2008-09-17T10:04:35.753000
78,431
78,482
Redirect command to input of another in Python
I would like to replicate this in python: gvimdiff <(hg cat file.txt) file.txt (hg cat file.txt outputs the most recently committed version of file.txt) I know how to pipe the file to gvimdiff, but it won't accept another file: $ hg cat file.txt | gvimdiff file.txt - Too many edit arguments: "-" Getting to the python p...
It can be done. As of Python 2.5, however, this mechanism is Linux-specific and not portable: import subprocess import sys file = sys.argv[1] p1 = subprocess.Popen(['hg', 'cat', file], stdout=subprocess.PIPE) p2 = subprocess.Popen([ 'gvimdiff', '/proc/self/fd/%s' % p1.stdout.fileno(), file]) p2.wait() That said, in th...
Redirect command to input of another in Python I would like to replicate this in python: gvimdiff <(hg cat file.txt) file.txt (hg cat file.txt outputs the most recently committed version of file.txt) I know how to pipe the file to gvimdiff, but it won't accept another file: $ hg cat file.txt | gvimdiff file.txt - Too m...
TITLE: Redirect command to input of another in Python QUESTION: I would like to replicate this in python: gvimdiff <(hg cat file.txt) file.txt (hg cat file.txt outputs the most recently committed version of file.txt) I know how to pipe the file to gvimdiff, but it won't accept another file: $ hg cat file.txt | gvimdif...
[ "python", "bash", "redirect", "diff", "vimdiff" ]
7
10
5,244
4
0
2008-09-16T23:46:47.673000
2008-09-16T23:57:32.093000
78,453
78,496
How do I estimate tasks using function points?
What are the steps to estimating using function points? Is there a quick-reference guide of some sort out there?
I took a conference session on Function Point Analysis a few years back. There is a lot too it. You can check out the Free Function Point Training Manual online, the Fundamentals of Function Points, or I suspect you can get a book on it at a computer store. You might also check out the International Function Point User...
How do I estimate tasks using function points? What are the steps to estimating using function points? Is there a quick-reference guide of some sort out there?
TITLE: How do I estimate tasks using function points? QUESTION: What are the steps to estimating using function points? Is there a quick-reference guide of some sort out there? ANSWER: I took a conference session on Function Point Analysis a few years back. There is a lot too it. You can check out the Free Function P...
[ "project-planning", "estimation" ]
4
6
4,569
3
0
2008-09-16T23:52:15.663000
2008-09-16T23:59:59.327000
78,471
78,628
Date object last modified
How can I find out the date a MS SQL Server 2000 object was last modified? I need to get a list of all the views, procs, functions etc that were modified since Aug 15th. In sysObjects I can see the date objects were created but I need to know when they were last altered. NB: this is an SQL 2000 database.
Note that SQL Server actually does not record the last modification date. It does not exist in any system tables. The Schema Changes History report is actually constructed from the Default Trace. Since many admins (and web hosts) turn that off, it may not work for you. Buck Woody had a good explanation of how this repo...
Date object last modified How can I find out the date a MS SQL Server 2000 object was last modified? I need to get a list of all the views, procs, functions etc that were modified since Aug 15th. In sysObjects I can see the date objects were created but I need to know when they were last altered. NB: this is an SQL 200...
TITLE: Date object last modified QUESTION: How can I find out the date a MS SQL Server 2000 object was last modified? I need to get a list of all the views, procs, functions etc that were modified since Aug 15th. In sysObjects I can see the date objects were created but I need to know when they were last altered. NB: ...
[ "sql-server", "sql-server-2000" ]
8
6
58,009
4
0
2008-09-16T23:55:18.027000
2008-09-17T00:21:16.327000
78,474
78,565
Determine if a string is an integer or a float in ANSI C
Using only ANSI C, what is the best way to, with fair certainty, determine if a C style string is either a integer or a real number (i.e float/double)?
Don't use atoi and atof as these functions return 0 on failure. Last time I checked 0 is a valid integer and float, therefore no use for determining type. use the strto{l,ul,ull,ll,d} functions, as these set errno on failure, and also report where the converted data ended. strtoul: http://www.opengroup.org/onlinepubs/0...
Determine if a string is an integer or a float in ANSI C Using only ANSI C, what is the best way to, with fair certainty, determine if a C style string is either a integer or a real number (i.e float/double)?
TITLE: Determine if a string is an integer or a float in ANSI C QUESTION: Using only ANSI C, what is the best way to, with fair certainty, determine if a C style string is either a integer or a real number (i.e float/double)? ANSWER: Don't use atoi and atof as these functions return 0 on failure. Last time I checked ...
[ "c", "floating-point", "numbers" ]
9
34
27,137
9
0
2008-09-16T23:55:42.190000
2008-09-17T00:11:24.243000
78,475
81,129
In Delphi, is TDataSet thread safe?
I'd like to be able to open a TDataSet asynchronously in its own thread so that the main VCL thread can continue until that's done, and then have the main VCL thread read from that TDataSet afterwards. I've done some experimenting and have gotten into some very weird situations, so I'm wondering if anyone has done this...
Provided you only want to use the dataset in its own thread, you can just use synchronize to communicate with the main thread for any VCL/UI update, like with any other component. Or, better, you can implement communication between the mainthread and worker threads with your own messaging system. check Hallvard's solut...
In Delphi, is TDataSet thread safe? I'd like to be able to open a TDataSet asynchronously in its own thread so that the main VCL thread can continue until that's done, and then have the main VCL thread read from that TDataSet afterwards. I've done some experimenting and have gotten into some very weird situations, so I...
TITLE: In Delphi, is TDataSet thread safe? QUESTION: I'd like to be able to open a TDataSet asynchronously in its own thread so that the main VCL thread can continue until that's done, and then have the main VCL thread read from that TDataSet afterwards. I've done some experimenting and have gotten into some very weir...
[ "multithreading", "delphi", "dataset" ]
14
5
5,060
6
0
2008-09-16T23:55:59.587000
2008-09-17T08:28:46.607000
78,477
78,821
Get a ASP.NET (inc MVC) application talking to a Flex UI over AMF
How can I get a ASP.NET (inc MVC) application talking to a Flex UI over AMF. I am wanting to push approx 100+ records around at a time and AMF would appear to be the way forward, but there doesn't appear to be anything obvious.
If you're pressed for time, you can just use the RemoteObject to hit a compiled DLL (like WebORB - its free for.NET, but you need a VS copy above Express to compile your classes that you want to expose to Flex) and Retrieve the object that way... Obviously your objects should have a DAL in place or be generated so you ...
Get a ASP.NET (inc MVC) application talking to a Flex UI over AMF How can I get a ASP.NET (inc MVC) application talking to a Flex UI over AMF. I am wanting to push approx 100+ records around at a time and AMF would appear to be the way forward, but there doesn't appear to be anything obvious.
TITLE: Get a ASP.NET (inc MVC) application talking to a Flex UI over AMF QUESTION: How can I get a ASP.NET (inc MVC) application talking to a Flex UI over AMF. I am wanting to push approx 100+ records around at a time and AMF would appear to be the way forward, but there doesn't appear to be anything obvious. ANSWER:...
[ ".net", "apache-flex", "actionscript-3", "amf" ]
4
6
5,548
4
0
2008-09-16T23:56:34.060000
2008-09-17T01:06:09.947000
78,493
78,504
What does $$ mean in the shell?
I once read that one way to obtain a unique filename in a shell for temp files was to use a double dollar sign ( $$ ). This does produce a number that varies from time to time... but if you call it repeatedly, it returns the same number. (The solution is to just use the time.) I am curious to know what $$ actually is, ...
In Bash $$ is the process ID, as noted in the comments it is not safe to use as a temp filename for a variety of reasons. For temporary file names, use the mktemp command.
What does $$ mean in the shell? I once read that one way to obtain a unique filename in a shell for temp files was to use a double dollar sign ( $$ ). This does produce a number that varies from time to time... but if you call it repeatedly, it returns the same number. (The solution is to just use the time.) I am curio...
TITLE: What does $$ mean in the shell? QUESTION: I once read that one way to obtain a unique filename in a shell for temp files was to use a double dollar sign ( $$ ). This does produce a number that varies from time to time... but if you call it repeatedly, it returns the same number. (The solution is to just use the...
[ "shell", "scripting" ]
161
113
83,581
12
0
2008-09-16T23:59:32.743000
2008-09-17T00:02:13.923000