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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
107,823 | 107,832 | Why is my Java program leaking memory when I call run() on a Thread object? | (Jeopardy-style question, I wish the answer had been online when I had this issue) Using Java 1.4, I have a method that I want to run as a thread some of the time, but not at others. So I declared it as a subclass of Thread, then either called start() or run() depending on what I needed. But I found that my program wou... | This is a known bug in Java 1.4: https://bugs.java.com/bugdatabase/view_bug;jsessionid=5869e03fee226ffffffffc40d4fa881a86e3:WuuT?bug_id=4533087 It's fixed in Java 1.5 but Sun doesn't intend to fix it in 1.4. The issue is that, at construction time, a Thread is added to a list of references in an internal thread table. ... | Why is my Java program leaking memory when I call run() on a Thread object? (Jeopardy-style question, I wish the answer had been online when I had this issue) Using Java 1.4, I have a method that I want to run as a thread some of the time, but not at others. So I declared it as a subclass of Thread, then either called ... | TITLE:
Why is my Java program leaking memory when I call run() on a Thread object?
QUESTION:
(Jeopardy-style question, I wish the answer had been online when I had this issue) Using Java 1.4, I have a method that I want to run as a thread some of the time, but not at others. So I declared it as a subclass of Thread, t... | [
"java",
"multithreading",
"memory-leaks"
] | 28 | 48 | 6,898 | 3 | 0 | 2008-09-20T10:19:21.987000 | 2008-09-20T10:25:06.870000 |
107,828 | 107,843 | How can I turn on PHP errors display on just a subfolder | I don't want PHP errors to display /html, but I want them to display in /html/beta/usercomponent. Everything is set up so that errors do not display at all. How can I get errors to just show up in that one folder (and its subfolders)? | In.htaccess: php_value error_reporting 2147483647 This number, according to documentation should enable 'all' errors irrespective of version, if you want a more granular setting, manually OR the values together, or run php -r 'echo E_ALL | E_STRICT;' to let php compute the value for you. You need AllowOverride All in a... | How can I turn on PHP errors display on just a subfolder I don't want PHP errors to display /html, but I want them to display in /html/beta/usercomponent. Everything is set up so that errors do not display at all. How can I get errors to just show up in that one folder (and its subfolders)? | TITLE:
How can I turn on PHP errors display on just a subfolder
QUESTION:
I don't want PHP errors to display /html, but I want them to display in /html/beta/usercomponent. Everything is set up so that errors do not display at all. How can I get errors to just show up in that one folder (and its subfolders)?
ANSWER:
I... | [
"php"
] | 16 | 28 | 26,442 | 4 | 0 | 2008-09-20T10:21:56.287000 | 2008-09-20T10:30:01.930000 |
107,840 | 107,848 | How to display latest revision in a file? | I'm wondering how do you deal with displaying release revision number when pushing live new versions of your app? You can use $Rev$ in a file to get latest revision, but only after you update the file. What if I want to update a string in one file every time I change any file in the repository/directory? Is there a way... | Did you try to use hooks? They work on server-side only but may do the trick. Otherwise I would just call a script do update the revision if the keywords aren't suitable for you. | How to display latest revision in a file? I'm wondering how do you deal with displaying release revision number when pushing live new versions of your app? You can use $Rev$ in a file to get latest revision, but only after you update the file. What if I want to update a string in one file every time I change any file i... | TITLE:
How to display latest revision in a file?
QUESTION:
I'm wondering how do you deal with displaying release revision number when pushing live new versions of your app? You can use $Rev$ in a file to get latest revision, but only after you update the file. What if I want to update a string in one file every time I... | [
"svn",
"versioning"
] | 5 | 2 | 3,158 | 6 | 0 | 2008-09-20T10:29:02.323000 | 2008-09-20T10:32:34.187000 |
107,846 | 110,610 | Connectionstring error after encrypted using aspnet_regiis.exe | I've encrypted the connectionstring in my web.config file using the steps in the link below: http://www.codeproject.com/KB/database/WebFarmConnStringsNet20.aspx However, whenever I call my application, it will give the following error: Failed to decrypt using provider 'CustomProvider'. Error message from the provider: ... | Well, I found the source of the problem, and boy was it embarrassing. In the attribute keyContainerName, I spelled the name incorrectly. That it. That's what caused the problem. Apparently, the encryption will work even if you provide an incorrect keyContainerName, which I incorrectly assumed will fail. So, once I decr... | Connectionstring error after encrypted using aspnet_regiis.exe I've encrypted the connectionstring in my web.config file using the steps in the link below: http://www.codeproject.com/KB/database/WebFarmConnStringsNet20.aspx However, whenever I call my application, it will give the following error: Failed to decrypt usi... | TITLE:
Connectionstring error after encrypted using aspnet_regiis.exe
QUESTION:
I've encrypted the connectionstring in my web.config file using the steps in the link below: http://www.codeproject.com/KB/database/WebFarmConnStringsNet20.aspx However, whenever I call my application, it will give the following error: Fai... | [
"asp.net",
"connection-string",
"rsa",
"aspnet-regiis.exe"
] | 0 | 1 | 5,227 | 2 | 0 | 2008-09-20T10:31:53.517000 | 2008-09-21T09:16:59.820000 |
107,872 | 107,874 | How can I integrate Laconica update stream into SharePoint? | I have Laconica (self hosted twitter ) configured on my local intranet and would like to integrate the public stream into SharePoint site with a web part. How can I do this? | You can point an RSS Viewer web part at the laconi.ca public stream RSS feed and use this XSLT to ensure attractive output. Result screen shot: XSL transform: 5 false 1033 RSS_Viewer_WebPart left True background-color:#F9F9F9; 0 0 margin:0px;padding:0px;border-spacing:0px;background-color:transparent; vertical-align:to... | How can I integrate Laconica update stream into SharePoint? I have Laconica (self hosted twitter ) configured on my local intranet and would like to integrate the public stream into SharePoint site with a web part. How can I do this? | TITLE:
How can I integrate Laconica update stream into SharePoint?
QUESTION:
I have Laconica (self hosted twitter ) configured on my local intranet and would like to integrate the public stream into SharePoint site with a web part. How can I do this?
ANSWER:
You can point an RSS Viewer web part at the laconi.ca publi... | [
"sharepoint",
"rss",
"moss",
"twitter",
"laconica"
] | 4 | 8 | 777 | 2 | 0 | 2008-09-20T10:51:20.413000 | 2008-09-20T10:54:10.733000 |
107,903 | 107,938 | How to create a zip file in the same format as the Finder's "Compress" menu item? | On Mac OS X, you can create a zip archive from the Finder by selecting some files and selecting "Compress" from the contextual menu or the File menu. Unfortunately, the resulting file is not identical to the archive created by the zip command (with the default options). This distinction matters to at least one service ... | Use the ditto command-line tool as follows: ditto -ck --rsrc --sequesterRsrc folder file.zip See the ditto man page for more. | How to create a zip file in the same format as the Finder's "Compress" menu item? On Mac OS X, you can create a zip archive from the Finder by selecting some files and selecting "Compress" from the contextual menu or the File menu. Unfortunately, the resulting file is not identical to the archive created by the zip com... | TITLE:
How to create a zip file in the same format as the Finder's "Compress" menu item?
QUESTION:
On Mac OS X, you can create a zip archive from the Finder by selecting some files and selecting "Compress" from the contextual menu or the File menu. Unfortunately, the resulting file is not identical to the archive crea... | [
"macos",
"shell",
"automation",
"zip"
] | 35 | 19 | 11,313 | 4 | 0 | 2008-09-20T11:04:29.833000 | 2008-09-20T11:27:28.717000 |
107,919 | 107,929 | Is it feasible to introduce Test Driven Development (TDD) in a mature project? | Say we have realized a value of TDD too late. Project is already matured, good deal of customers started using it. Say automated testing used are mostly functional/system testing and there is a good deal of automated GUI testing. Say we have new feature requests, and new bug reports (!). So good deal of development sti... | Creating a complex mocking infrastructure will probably just hide the problems in your code. I would recommend that you start with integration tests, with a test database, around the areas of the code base that you plan to change. Once you have enough tests to ensure that you won't break anything if you make a change, ... | Is it feasible to introduce Test Driven Development (TDD) in a mature project? Say we have realized a value of TDD too late. Project is already matured, good deal of customers started using it. Say automated testing used are mostly functional/system testing and there is a good deal of automated GUI testing. Say we have... | TITLE:
Is it feasible to introduce Test Driven Development (TDD) in a mature project?
QUESTION:
Say we have realized a value of TDD too late. Project is already matured, good deal of customers started using it. Say automated testing used are mostly functional/system testing and there is a good deal of automated GUI te... | [
"unit-testing",
"mocking",
"tdd"
] | 37 | 27 | 4,295 | 6 | 0 | 2008-09-20T11:14:48.903000 | 2008-09-20T11:21:51.120000 |
107,936 | 107,951 | How to add some non-standard font to a website? | Is there a way to add some custom font on a website without using images, Flash or some other graphics? For example, I was working on a wedding website, and I found a lot of nice fonts for that subject. But I can't find the right way to add that font on the server. And how do I include that font with CSS into the HTML?... | This could be done via CSS: Hello world! It is supported for all of the regular browsers if you use TrueType-Fonts (TTF), the Web Open Font Format (WOFF) or Embedded Opentype (EOT). | How to add some non-standard font to a website? Is there a way to add some custom font on a website without using images, Flash or some other graphics? For example, I was working on a wedding website, and I found a lot of nice fonts for that subject. But I can't find the right way to add that font on the server. And ho... | TITLE:
How to add some non-standard font to a website?
QUESTION:
Is there a way to add some custom font on a website without using images, Flash or some other graphics? For example, I was working on a wedding website, and I found a lot of nice fonts for that subject. But I can't find the right way to add that font on ... | [
"html",
"css",
"fonts",
"font-face"
] | 583 | 564 | 1,019,425 | 21 | 0 | 2008-09-20T11:26:52.153000 | 2008-09-20T11:35:52.630000 |
107,964 | 110,309 | CSS list-style: none; still shows bullet | I am using YUI reset/base, after the reset it sets the ul and li tags to list-style: disc outside; My markup looks like this: Testing My CSS is: #nav {} #nav ul li { list-style: none; } Now that makes the small disc beside each li disappear. Why doesn't this work though? #nav {} #nav ul.links { list-style: none; } It w... | I think that Dan was close with his answer, but this isn't an issue of specificity. You can set the list-style on the list (the UL) but you can also override that list-style for individual list items (the LIs). You are telling the browser to not use bullets on the list, but YUI tells the browser to use them on individu... | CSS list-style: none; still shows bullet I am using YUI reset/base, after the reset it sets the ul and li tags to list-style: disc outside; My markup looks like this: Testing My CSS is: #nav {} #nav ul li { list-style: none; } Now that makes the small disc beside each li disappear. Why doesn't this work though? #nav {}... | TITLE:
CSS list-style: none; still shows bullet
QUESTION:
I am using YUI reset/base, after the reset it sets the ul and li tags to list-style: disc outside; My markup looks like this: Testing My CSS is: #nav {} #nav ul li { list-style: none; } Now that makes the small disc beside each li disappear. Why doesn't this wo... | [
"css"
] | 3 | 9 | 12,785 | 6 | 0 | 2008-09-20T11:44:41.563000 | 2008-09-21T05:21:51.960000 |
107,971 | 107,993 | A Firefox javascript bookmarking problem | I'm using the following JavaScript code: This will create a bookmark for Firefox and IE. But the link for Firefox will show up in the sidepanel of the browser, instead of being displayed in the main screen. I personally find this very annoying and am looking for a better solution. It is of course possible to edit the b... | I think that's the only solution for Firefox... I have a better function for that action, it works even for Opera and shows a message for other "unsupported" browsers. | A Firefox javascript bookmarking problem I'm using the following JavaScript code: This will create a bookmark for Firefox and IE. But the link for Firefox will show up in the sidepanel of the browser, instead of being displayed in the main screen. I personally find this very annoying and am looking for a better solutio... | TITLE:
A Firefox javascript bookmarking problem
QUESTION:
I'm using the following JavaScript code: This will create a bookmark for Firefox and IE. But the link for Firefox will show up in the sidepanel of the browser, instead of being displayed in the main screen. I personally find this very annoying and am looking fo... | [
"javascript",
"firefox",
"bookmarks"
] | 7 | 4 | 9,418 | 4 | 0 | 2008-09-20T11:48:34.363000 | 2008-09-20T12:05:33.713000 |
107,972 | 107,979 | Calling C# events from outside the owning class? | Is it possible under any set of circumstances to be able to accomplish this? My current circumstances are this: public class CustomForm: Form { public class CustomGUIElement {... public event MouseEventHandler Click; // etc, and so forth.... }
private List _elements;...
public void CustomForm_Click(object sender, Mou... | You just need to add a public method for invoking the event. Microsoft already does this for some events such as PerformClick for controls that expose a Click event. public class CustomGUIElement { public void PerformClick() { OnClick(EventArgs.Empty); }
protected virtual void OnClick(EventArgs e) { if (Click!= null) ... | Calling C# events from outside the owning class? Is it possible under any set of circumstances to be able to accomplish this? My current circumstances are this: public class CustomForm: Form { public class CustomGUIElement {... public event MouseEventHandler Click; // etc, and so forth.... }
private List _elements;...... | TITLE:
Calling C# events from outside the owning class?
QUESTION:
Is it possible under any set of circumstances to be able to accomplish this? My current circumstances are this: public class CustomForm: Form { public class CustomGUIElement {... public event MouseEventHandler Click; // etc, and so forth.... }
private ... | [
"c#",
"events",
"inheritance"
] | 20 | 34 | 25,245 | 4 | 0 | 2008-09-20T11:49:11.053000 | 2008-09-20T11:52:34.383000 |
107,995 | 2,318,189 | How do you recursively unzip archives in a directory and its subdirectories from the Unix command-line? | The unzip command doesn't have an option for recursively unzipping archives. If I have the following directory structure and archives: /Mother/Loving.zip /Scurvy/Sea Dogs.zip /Scurvy/Cures/Limes.zip And I want to unzip all of the archives into directories with the same name as each archive: /Mother/Loving/1.txt /Mother... | If you want to extract the files to the respective folder you can try this find. -name "*.zip" | while read filename; do unzip -o -d "`dirname "$filename"`" "$filename"; done; A multi-processed version for systems that can handle high I/O: find. -name "*.zip" | xargs -P 5 -I fileName sh -c 'unzip -o -d "$(dirname "file... | How do you recursively unzip archives in a directory and its subdirectories from the Unix command-line? The unzip command doesn't have an option for recursively unzipping archives. If I have the following directory structure and archives: /Mother/Loving.zip /Scurvy/Sea Dogs.zip /Scurvy/Cures/Limes.zip And I want to unz... | TITLE:
How do you recursively unzip archives in a directory and its subdirectories from the Unix command-line?
QUESTION:
The unzip command doesn't have an option for recursively unzipping archives. If I have the following directory structure and archives: /Mother/Loving.zip /Scurvy/Sea Dogs.zip /Scurvy/Cures/Limes.zip... | [
"unix",
"recursion",
"spaces",
"unzip"
] | 98 | 174 | 177,046 | 12 | 0 | 2008-09-20T12:06:29.903000 | 2010-02-23T12:50:56.547000 |
108,000 | 109,051 | Optimal multiplayer maze generation algorithm | I'm working on a simple multiplayer game in which 2-4 players are placed at separate entrypoints in a maze and need to reach a goal point. Generating a maze in general is very easy, but in this case the goal of the game is to reach the goal before everyone else and I don't want the generation algorithm to drastically f... | An alternative to freespace's answer would be to generate a random maze, then assign each cell a value representing the number of moves to reach the end of the maze (you can do both at once if you decide that you're starting at the 'end'). Then pick a distance (perhaps the highest one with n points at that distance?) a... | Optimal multiplayer maze generation algorithm I'm working on a simple multiplayer game in which 2-4 players are placed at separate entrypoints in a maze and need to reach a goal point. Generating a maze in general is very easy, but in this case the goal of the game is to reach the goal before everyone else and I don't ... | TITLE:
Optimal multiplayer maze generation algorithm
QUESTION:
I'm working on a simple multiplayer game in which 2-4 players are placed at separate entrypoints in a maze and need to reach a goal point. Generating a maze in general is very easy, but in this case the goal of the game is to reach the goal before everyone... | [
"algorithm",
"language-agnostic",
"maze"
] | 5 | 8 | 1,482 | 5 | 0 | 2008-09-20T12:09:01.287000 | 2008-09-20T19:13:40.033000 |
108,005 | 492,856 | How can I get the filetype icon that Windows Explorer shows? | first question here. I'm developing a program in C# (.NET 3.5) that displays files in a listview. I'd like to have the "large icon" view display the icon that Windows Explorer uses for that filetype, otherwise I'll have to use some existing code like this: private int getFileTypeIconIndex(string fileName) { string file... | You might find the use of Icon.ExtractAssociatedIcon a much simpler (an managed) approach than using SHGetFileInfo. But watch out: two files with the same extension may have different icons. | How can I get the filetype icon that Windows Explorer shows? first question here. I'm developing a program in C# (.NET 3.5) that displays files in a listview. I'd like to have the "large icon" view display the icon that Windows Explorer uses for that filetype, otherwise I'll have to use some existing code like this: pr... | TITLE:
How can I get the filetype icon that Windows Explorer shows?
QUESTION:
first question here. I'm developing a program in C# (.NET 3.5) that displays files in a listview. I'd like to have the "large icon" view display the icon that Windows Explorer uses for that filetype, otherwise I'll have to use some existing ... | [
"c#",
"winforms"
] | 18 | 12 | 15,129 | 4 | 0 | 2008-09-20T12:11:31.093000 | 2009-01-29T18:37:28.610000 |
108,009 | 108,482 | PLY: Token shifting problem in C parser | I'm writing a C parser using PLY, and recently ran into a problem. This code: typedef int my_type; my_type x; Is correct C code, because my_type is defined as a type previously to being used as such. I handle it by filling a type symbol table in the parser that gets used by the lexer to differentiate between types and ... | With some help from Dave Beazley (PLY's creator), my problem was solved. The idea is to use special sub-rules and do the actions in them. In my case, I split the declaration rule to: def p_decl_body(self, p): """ decl_body: declaration_specifiers init_declarator_list_opt """ # < >
def p_declaration(self, p): """ decla... | PLY: Token shifting problem in C parser I'm writing a C parser using PLY, and recently ran into a problem. This code: typedef int my_type; my_type x; Is correct C code, because my_type is defined as a type previously to being used as such. I handle it by filling a type symbol table in the parser that gets used by the l... | TITLE:
PLY: Token shifting problem in C parser
QUESTION:
I'm writing a C parser using PLY, and recently ran into a problem. This code: typedef int my_type; my_type x; Is correct C code, because my_type is defined as a type previously to being used as such. I handle it by filling a type symbol table in the parser that ... | [
"python",
"parsing",
"yacc",
"ply"
] | 3 | 2 | 874 | 3 | 0 | 2008-09-20T12:14:41.240000 | 2008-09-20T15:28:02.633000 |
108,010 | 108,045 | Parse multiple XML files with ASP.NET (C#) and return those with particular element | Greetings. I'm looking for a way to parse a number of XML files in a particular directory with ASP.NET (C#). I'd like to be able to return content from particular elements, but before that, need to find those that have a certain value between an element. Example XML file 1: Title 1 Content filter Example XML file 2: Ti... | If you are using.Net 3.5, this is extremely easy with LINQ: //get the files XElement xe1 = XElement.Load(string_file_path_1); XElement xe2 = XElement.Load(string_file_path_2);
//Give me all XML that has a filter of 'filter'. var filter_elements1 = from p in xe1.Descendants("filter") select p; var filter_elements2 = fr... | Parse multiple XML files with ASP.NET (C#) and return those with particular element Greetings. I'm looking for a way to parse a number of XML files in a particular directory with ASP.NET (C#). I'd like to be able to return content from particular elements, but before that, need to find those that have a certain value b... | TITLE:
Parse multiple XML files with ASP.NET (C#) and return those with particular element
QUESTION:
Greetings. I'm looking for a way to parse a number of XML files in a particular directory with ASP.NET (C#). I'd like to be able to return content from particular elements, but before that, need to find those that have... | [
"c#",
"asp.net",
"xml"
] | 2 | 7 | 12,212 | 4 | 0 | 2008-09-20T12:15:01.863000 | 2008-09-20T12:41:03.160000 |
108,025 | 114,049 | Weather web service for Europe? | We are looking for a reliable "current weather" web service for Europe, with city resolution. We only need the current weather. Since it is for a commercial web site, we don't mind paying a reasonable fee for the service. What are our options? What service would you recommend or avoid based on previous experience? Note... | The US NOAA has coded METAR information available for cities worldwide. Given the ICAO airport code for the city in question (eg. EGLL for London) you can quickly get a METAR report. | Weather web service for Europe? We are looking for a reliable "current weather" web service for Europe, with city resolution. We only need the current weather. Since it is for a commercial web site, we don't mind paying a reasonable fee for the service. What are our options? What service would you recommend or avoid ba... | TITLE:
Weather web service for Europe?
QUESTION:
We are looking for a reliable "current weather" web service for Europe, with city resolution. We only need the current weather. Since it is for a commercial web site, we don't mind paying a reasonable fee for the service. What are our options? What service would you rec... | [
"web-services",
"rest",
"xml-rpc",
"provider",
"weather"
] | 11 | 4 | 20,359 | 6 | 0 | 2008-09-20T12:24:11.220000 | 2008-09-22T09:52:27.213000 |
108,037 | 108,042 | What is Cloud computing? | Could anybody explain in plain words how Cloud computing works? I have read the Wikipedia article, but still not sure that I understand how cloud actually works. | Aside from the latest marketing term? Basically all the resources your program needs are held "somewhere" on the internet. You interact with them via a defined service contract; SOAP, REST, POX or whatever and what happens after that is up to the service provider. You don't care about how your information is stored or ... | What is Cloud computing? Could anybody explain in plain words how Cloud computing works? I have read the Wikipedia article, but still not sure that I understand how cloud actually works. | TITLE:
What is Cloud computing?
QUESTION:
Could anybody explain in plain words how Cloud computing works? I have read the Wikipedia article, but still not sure that I understand how cloud actually works.
ANSWER:
Aside from the latest marketing term? Basically all the resources your program needs are held "somewhere" ... | [
"cloud",
"terminology"
] | 48 | 38 | 12,443 | 13 | 0 | 2008-09-20T12:35:08.383000 | 2008-09-20T12:38:16.880000 |
108,043 | 108,058 | Closing/cleaning up "mixed" file descriptors / sockets | When I create a socket using accept() and make a FILE out of it using fdopen(), what do I have to do to clean everything up? Do I need to do fclose() on the FILE, shutdown() and close() on the socket, or only the shutdown() and or close() or fclose()? If I don't do fclose(), do I have to free() the FILE pointer manuall... | From man fdopen: The file descriptor is not dup’ed, and will be closed when the stream created by fdopen() is closed So I would just use fclose(), which also closes the underlying file descriptor. I don't know whether shutdown() is needed, either. | Closing/cleaning up "mixed" file descriptors / sockets When I create a socket using accept() and make a FILE out of it using fdopen(), what do I have to do to clean everything up? Do I need to do fclose() on the FILE, shutdown() and close() on the socket, or only the shutdown() and or close() or fclose()? If I don't do... | TITLE:
Closing/cleaning up "mixed" file descriptors / sockets
QUESTION:
When I create a socket using accept() and make a FILE out of it using fdopen(), what do I have to do to clean everything up? Do I need to do fclose() on the FILE, shutdown() and close() on the socket, or only the shutdown() and or close() or fclos... | [
"c",
"sockets",
"io",
"file-descriptor"
] | 6 | 5 | 3,704 | 3 | 0 | 2008-09-20T12:38:21.637000 | 2008-09-20T12:48:51.597000 |
108,047 | 108,060 | Whats the best Ribbon UI control to retro fit to a legacy MFC application build with VC2005? | What experience have you had with introducing a Ribbon style control to legacy MFC applications? I know it exists in the new VC2008 Feature Pack, but changing compilers from VC2005 is a big deal for our source base and integration to our environment, Intel FORTRAN, ClearCase, many 3rd libraries. There are quiet a few d... | In my projects I'm using the MFC Feature Pack in Visual Studio 2008, which is based on code from BCGSoft. Their BCGControlBar Library Professional Edition includes a ribbon control and is compatible with Visual Studio 2005. I'm not aware of any open source ribbon control libraries for C++, though. | Whats the best Ribbon UI control to retro fit to a legacy MFC application build with VC2005? What experience have you had with introducing a Ribbon style control to legacy MFC applications? I know it exists in the new VC2008 Feature Pack, but changing compilers from VC2005 is a big deal for our source base and integrat... | TITLE:
Whats the best Ribbon UI control to retro fit to a legacy MFC application build with VC2005?
QUESTION:
What experience have you had with introducing a Ribbon style control to legacy MFC applications? I know it exists in the new VC2008 Feature Pack, but changing compilers from VC2005 is a big deal for our source... | [
"c++",
"user-interface",
"mfc",
"ribbon",
"stingray"
] | 2 | 6 | 2,927 | 4 | 0 | 2008-09-20T12:42:54.090000 | 2008-09-20T12:52:45.767000 |
108,051 | 108,748 | MOSS 2007: BDC permisson problem - no BDC application is listed in the web part's configuration menu | I'm actually working at MOSS 2007 project where I have to import data from an external data source (WebService) via an application in the Business Data Catalog. The application definition was created with BDC Meta Man and was imported successfully into the Business Data Catalog without any errors. I've first tested the... | Make sure you set the permissions on the application as well as the entity. | MOSS 2007: BDC permisson problem - no BDC application is listed in the web part's configuration menu I'm actually working at MOSS 2007 project where I have to import data from an external data source (WebService) via an application in the Business Data Catalog. The application definition was created with BDC Meta Man a... | TITLE:
MOSS 2007: BDC permisson problem - no BDC application is listed in the web part's configuration menu
QUESTION:
I'm actually working at MOSS 2007 project where I have to import data from an external data source (WebService) via an application in the Business Data Catalog. The application definition was created w... | [
"sharepoint",
"moss",
"bdc"
] | 2 | 3 | 741 | 1 | 0 | 2008-09-20T12:45:39.827000 | 2008-09-20T17:04:38.360000 |
108,059 | 108,084 | struts action controller - multithreaded? | when they say the action controller in the struts framework is multi threaded, does it mean that there are multiple instances of the servlet taking the request and forwarding it to the model. OR does it mean that there is one single instance taking all the requests? Any visuals will be appreciated | As per most other servlets, a separate thread is created to process each request. You have to implement the SingleThreadedModel interface to get a new instance of the servlet for each request. | struts action controller - multithreaded? when they say the action controller in the struts framework is multi threaded, does it mean that there are multiple instances of the servlet taking the request and forwarding it to the model. OR does it mean that there is one single instance taking all the requests? Any visuals... | TITLE:
struts action controller - multithreaded?
QUESTION:
when they say the action controller in the struts framework is multi threaded, does it mean that there are multiple instances of the servlet taking the request and forwarding it to the model. OR does it mean that there is one single instance taking all the req... | [
"jakarta-ee",
"struts"
] | 1 | 1 | 4,337 | 3 | 0 | 2008-09-20T12:52:18.577000 | 2008-09-20T13:00:19.337000 |
108,081 | 108,142 | Are there any High Level, easy to install GUI libraries for Common Lisp? | Are there any good, cross platform (SBCL and CLISP at the very least) easy to install GUI libraries? | Ltk is quite popular, very portable, and reasonably well documented through the Tk docs. Installation on SBCL is as easy as saying: (require:asdf-install) (asdf-install:install:ltk) There's also Cells-Gtk, which is reported to be quite usable but may have a slightly steeper learning curve because of its reliance on Cel... | Are there any High Level, easy to install GUI libraries for Common Lisp? Are there any good, cross platform (SBCL and CLISP at the very least) easy to install GUI libraries? | TITLE:
Are there any High Level, easy to install GUI libraries for Common Lisp?
QUESTION:
Are there any good, cross platform (SBCL and CLISP at the very least) easy to install GUI libraries?
ANSWER:
Ltk is quite popular, very portable, and reasonably well documented through the Tk docs. Installation on SBCL is as eas... | [
"user-interface",
"lisp",
"common-lisp"
] | 36 | 25 | 6,560 | 5 | 0 | 2008-09-20T12:59:13.350000 | 2008-09-20T13:25:53.940000 |
108,088 | 108,093 | Best practices for detecting DOS (denial of service) attacks? | I am looking for best practices for detecting and preventing DOS in the service implementation (not external network monitoring). The service handles queries for user, group and attribute information. What is your favorite source of information on dealing with DOS? | This is a technique I found very useful.. Prevent Denial of Service (DOS) attacks in your web application | Best practices for detecting DOS (denial of service) attacks? I am looking for best practices for detecting and preventing DOS in the service implementation (not external network monitoring). The service handles queries for user, group and attribute information. What is your favorite source of information on dealing wi... | TITLE:
Best practices for detecting DOS (denial of service) attacks?
QUESTION:
I am looking for best practices for detecting and preventing DOS in the service implementation (not external network monitoring). The service handles queries for user, group and attribute information. What is your favorite source of informa... | [
"security",
"denial-of-service"
] | 18 | 10 | 13,662 | 3 | 0 | 2008-09-20T13:02:13.453000 | 2008-09-20T13:04:57.110000 |
108,094 | 2,509,622 | Disabling single line copy in Visual Studio | Is there anyway to disable the rather annoying feature that Visual Studio (2008 in my case) has of copying the line (with text on it) the cursor is on when CTRL - C is pressed and no selection is made? I know of the option to disable copying blank lines. But this is driving me crazy as well. ETA: I'm not looking to cus... | If you aren't willing to customize the keyboard settings, then Ctrl + C will always be Edit.Copy, which will copy the current line if nothing is selected. If you aren't willing to use the tools VS provides to customize the interface, then you can't do it. However, the following works: Assign this macro to Ctrl + C: Sub... | Disabling single line copy in Visual Studio Is there anyway to disable the rather annoying feature that Visual Studio (2008 in my case) has of copying the line (with text on it) the cursor is on when CTRL - C is pressed and no selection is made? I know of the option to disable copying blank lines. But this is driving m... | TITLE:
Disabling single line copy in Visual Studio
QUESTION:
Is there anyway to disable the rather annoying feature that Visual Studio (2008 in my case) has of copying the line (with text on it) the cursor is on when CTRL - C is pressed and no selection is made? I know of the option to disable copying blank lines. But... | [
"visual-studio",
"visual-studio-2008",
"keyboard-shortcuts"
] | 40 | 16 | 5,701 | 8 | 0 | 2008-09-20T13:05:08.173000 | 2010-03-24T16:48:46.373000 |
108,104 | 108,122 | How do I convert a System.Type to its nullable version? | Once again one of those: "Is there an easier built-in way of doing things instead of my helper method?" So it's easy to get the underlying type from a nullable type, but how do I get the nullable version of a.NET type? So I have typeof(int) typeof(DateTime) System.Type t = something; and I want int? DateTime? or Nullab... | Here is the code I use: Type GetNullableType(Type type) { // Use Nullable.GetUnderlyingType() to remove the Nullable wrapper if type is already nullable. type = Nullable.GetUnderlyingType(type)?? type; // avoid type becoming null if (type.IsValueType) return typeof(Nullable<>).MakeGenericType(type); else return type; } | How do I convert a System.Type to its nullable version? Once again one of those: "Is there an easier built-in way of doing things instead of my helper method?" So it's easy to get the underlying type from a nullable type, but how do I get the nullable version of a.NET type? So I have typeof(int) typeof(DateTime) System... | TITLE:
How do I convert a System.Type to its nullable version?
QUESTION:
Once again one of those: "Is there an easier built-in way of doing things instead of my helper method?" So it's easy to get the underlying type from a nullable type, but how do I get the nullable version of a.NET type? So I have typeof(int) typeo... | [
"c#",
".net"
] | 85 | 126 | 29,062 | 4 | 0 | 2008-09-20T13:08:11.613000 | 2008-09-20T13:15:32.857000 |
108,116 | 139,847 | MEF (Managed Extensibility Framework) vs IoC/DI | What problems does MEF (Managed Extensibility Framework) solves that cannot be solved by existing IoC/DI containers? | The principle purpose of MEF is extensibility; to serve as a 'plug-in' framework for when the author of the application and the author of the plug-in ( extension ) are different and have no particular knowledge of each other beyond a published interface ( contract ) library. Another problem space MEF addresses that's d... | MEF (Managed Extensibility Framework) vs IoC/DI What problems does MEF (Managed Extensibility Framework) solves that cannot be solved by existing IoC/DI containers? | TITLE:
MEF (Managed Extensibility Framework) vs IoC/DI
QUESTION:
What problems does MEF (Managed Extensibility Framework) solves that cannot be solved by existing IoC/DI containers?
ANSWER:
The principle purpose of MEF is extensibility; to serve as a 'plug-in' framework for when the author of the application and the ... | [
"dependency-injection",
"inversion-of-control",
"mef"
] | 56 | 54 | 13,849 | 3 | 0 | 2008-09-20T13:12:08.310000 | 2008-09-26T14:24:14.740000 |
108,149 | 108,157 | What is the best way to replace the file browse button in html? | I know that it's possible to replace the browse button, which is generated in html, when you use input tag with type="file. I'm not sure what is the best way, so if someone has experience with this please contribute. | The best way is to make the file input control almost invisible (by giving it a very low opacity - do not do " visibility: hidden " or " display: none ") and absolutely position something under it - with a lower z-index. This way, the actual control will not be visible, and whatever you put under it will show through. ... | What is the best way to replace the file browse button in html? I know that it's possible to replace the browse button, which is generated in html, when you use input tag with type="file. I'm not sure what is the best way, so if someone has experience with this please contribute. | TITLE:
What is the best way to replace the file browse button in html?
QUESTION:
I know that it's possible to replace the browse button, which is generated in html, when you use input tag with type="file. I'm not sure what is the best way, so if someone has experience with this please contribute.
ANSWER:
The best way... | [
"html",
"css",
"file",
"input"
] | 18 | 22 | 22,872 | 5 | 0 | 2008-09-20T13:30:35.833000 | 2008-09-20T13:33:37.370000 |
108,169 | 108,248 | How do I take a slice of a list (A sublist) in scheme? | Given a list, how would I select a new list, containing a slice of the original list (Given offset and number of elements)? EDIT: Good suggestions so far. Isn't there something specified in one of the SRFI's? This appears to be a very fundamental thing, so I'm surprised that I need to implement it in user-land. | The following code will do what you want: (define get-n-items (lambda (lst num) (if (> num 0) (cons (car lst) (get-n-items (cdr lst) (- num 1))) '())));'
(define slice (lambda (lst start count) (if (> start 1) (slice (cdr lst) (- start 1) count) (get-n-items lst count)))) Example: > (define l '(2 3 4 5 6 7 8 9));' () ... | How do I take a slice of a list (A sublist) in scheme? Given a list, how would I select a new list, containing a slice of the original list (Given offset and number of elements)? EDIT: Good suggestions so far. Isn't there something specified in one of the SRFI's? This appears to be a very fundamental thing, so I'm surp... | TITLE:
How do I take a slice of a list (A sublist) in scheme?
QUESTION:
Given a list, how would I select a new list, containing a slice of the original list (Given offset and number of elements)? EDIT: Good suggestions so far. Isn't there something specified in one of the SRFI's? This appears to be a very fundamental ... | [
"lisp",
"scheme"
] | 18 | 10 | 22,560 | 6 | 0 | 2008-09-20T13:36:52.200000 | 2008-09-20T14:08:40.547000 |
108,171 | 108,258 | Hibernate 3: unable to query PostgreSQL database | I am setting up a project using Hibernate 3.3.1 GA and PostgreSQL 8.3. I've just created a database, the first table, added one row there and now configuring Hibernate. However, even the simplest query: Criteria criteria = session.createCriteria(Place.class); List result = criteria.list(); could not be executed (empty ... | After applying debugger to the Hibernate code, it is fixed! It is not visible in the question's text, but the problem is that Place passed to the createCriteria() method is from another package, not com/example/data, specified in the configuration XML files. Hibernate invokes Class.isAssignableFrom(), and if false is r... | Hibernate 3: unable to query PostgreSQL database I am setting up a project using Hibernate 3.3.1 GA and PostgreSQL 8.3. I've just created a database, the first table, added one row there and now configuring Hibernate. However, even the simplest query: Criteria criteria = session.createCriteria(Place.class); List result... | TITLE:
Hibernate 3: unable to query PostgreSQL database
QUESTION:
I am setting up a project using Hibernate 3.3.1 GA and PostgreSQL 8.3. I've just created a database, the first table, added one row there and now configuring Hibernate. However, even the simplest query: Criteria criteria = session.createCriteria(Place.c... | [
"java",
"database",
"hibernate",
"postgresql",
"jdbc"
] | 4 | 3 | 13,849 | 1 | 0 | 2008-09-20T13:38:06.033000 | 2008-09-20T14:13:04.373000 |
108,183 | 108,192 | How to prevent SIGPIPEs (or handle them properly) | I have a small server program that accepts connections on a TCP or local UNIX socket, reads a simple command and (depending on the command) sends a reply. The problem is that the client may have no interest in the answer and sometimes exits early. So writing to that socket will cause a SIGPIPE and make my server crash.... | You generally want to ignore the SIGPIPE and handle the error directly in your code. This is because signal handlers in C have many restrictions on what they can do. The most portable way to do this is to set the SIGPIPE handler to SIG_IGN. This will prevent any socket or pipe write from causing a SIGPIPE signal. To ig... | How to prevent SIGPIPEs (or handle them properly) I have a small server program that accepts connections on a TCP or local UNIX socket, reads a simple command and (depending on the command) sends a reply. The problem is that the client may have no interest in the answer and sometimes exits early. So writing to that soc... | TITLE:
How to prevent SIGPIPEs (or handle them properly)
QUESTION:
I have a small server program that accepts connections on a TCP or local UNIX socket, reads a simple command and (depending on the command) sends a reply. The problem is that the client may have no interest in the answer and sometimes exits early. So w... | [
"c",
"io",
"signals",
"broken-pipe",
"sigpipe"
] | 305 | 312 | 246,596 | 10 | 0 | 2008-09-20T13:43:21.013000 | 2008-09-20T13:46:21.210000 |
108,193 | 108,404 | Union and Intersect in Django | class Tag(models.Model): name = models.CharField(maxlength=100)
class Blog(models.Model): name = models.CharField(maxlength=100) tags = models.ManyToManyField(Tag) Simple models just to ask my question. I wonder how can i query blogs using tags in two different ways. Blog entries that are tagged with "tag1" or "tag2":... | You could use Q objects for #1: # Blogs who have either hockey or django tags. from django.db.models import Q Blog.objects.filter( Q(tags__name__iexact='hockey') | Q(tags__name__iexact='django') ) Unions and intersections, I believe, are a bit outside the scope of the Django ORM, but its possible to to these. The follo... | Union and Intersect in Django class Tag(models.Model): name = models.CharField(maxlength=100)
class Blog(models.Model): name = models.CharField(maxlength=100) tags = models.ManyToManyField(Tag) Simple models just to ask my question. I wonder how can i query blogs using tags in two different ways. Blog entries that are... | TITLE:
Union and Intersect in Django
QUESTION:
class Tag(models.Model): name = models.CharField(maxlength=100)
class Blog(models.Model): name = models.CharField(maxlength=100) tags = models.ManyToManyField(Tag) Simple models just to ask my question. I wonder how can i query blogs using tags in two different ways. Blo... | [
"python",
"django",
"django-models",
"django-views",
"tagging"
] | 34 | 23 | 17,154 | 4 | 0 | 2008-09-20T13:46:52.487000 | 2008-09-20T15:01:12.527000 |
108,207 | 3,612,949 | How do I make an HTML text box show a hint when empty? | I want the search box on my web page to display the word "Search" in gray italics. When the box receives focus, it should look just like an empty text box. If there is already text in it, it should display the text normally (black, non-italics). This will help me avoid clutter by removing the label. BTW, this is an on-... | Another option, if you're happy to have this feature only for newer browsers, is to use the support offered by HTML 5's placeholder attribute: In the absence of any styles, in Chrome this looks like: You can try demos out here and in HTML5 Placeholder Styling with CSS. Be sure to check the browser compatibility of this... | How do I make an HTML text box show a hint when empty? I want the search box on my web page to display the word "Search" in gray italics. When the box receives focus, it should look just like an empty text box. If there is already text in it, it should display the text normally (black, non-italics). This will help me a... | TITLE:
How do I make an HTML text box show a hint when empty?
QUESTION:
I want the search box on my web page to display the word "Search" in gray italics. When the box receives focus, it should look just like an empty text box. If there is already text in it, it should display the text normally (black, non-italics). T... | [
"javascript",
"html"
] | 234 | 393 | 384,266 | 22 | 0 | 2008-09-20T13:55:10.127000 | 2010-08-31T20:27:30.743000 |
108,211 | 108,227 | Add a column to existing table and uniquely number them on MS SQL Server | I want to add a column to an existing legacy database and write a procedure by which I can assign each record a different value. Something like adding a column and autogenerate the data for it. Like, if I add a new column called "ID" (number) I want to then initialize a unique value to each of the records. So, my ID co... | This will depend on the database but for SQL Server, this could be achieved as follows: alter table Example add NewColumn int identity(1,1) | Add a column to existing table and uniquely number them on MS SQL Server I want to add a column to an existing legacy database and write a procedure by which I can assign each record a different value. Something like adding a column and autogenerate the data for it. Like, if I add a new column called "ID" (number) I wa... | TITLE:
Add a column to existing table and uniquely number them on MS SQL Server
QUESTION:
I want to add a column to an existing legacy database and write a procedure by which I can assign each record a different value. Something like adding a column and autogenerate the data for it. Like, if I add a new column called ... | [
"sql",
"sql-server"
] | 132 | 239 | 283,631 | 9 | 0 | 2008-09-20T13:57:14.367000 | 2008-09-20T14:01:09.583000 |
108,270 | 108,316 | Subclassed form not behaving properly in Designer view (VS 2008) | I have subclassed Form to include some extra functionality, which boils down to a List which displays in a set of predefined spots on the form. I have the following: public class ButtonForm: Form { public class TitleButton { public TitleButton() { /* does stuff here */ } // there's other stuff too, just thought I shoul... | First of all you need to inherit your TitleButton class from Component so that the designer knows it is a component that can be created via designer generated code. Then you need to instruct the designer code generator to work on the contents of the collection and not the collection instance itself. So try the followin... | Subclassed form not behaving properly in Designer view (VS 2008) I have subclassed Form to include some extra functionality, which boils down to a List which displays in a set of predefined spots on the form. I have the following: public class ButtonForm: Form { public class TitleButton { public TitleButton() { /* does... | TITLE:
Subclassed form not behaving properly in Designer view (VS 2008)
QUESTION:
I have subclassed Form to include some extra functionality, which boils down to a List which displays in a set of predefined spots on the form. I have the following: public class ButtonForm: Form { public class TitleButton { public Title... | [
"c#",
"winforms",
"visual-studio-2008"
] | 0 | 3 | 224 | 1 | 0 | 2008-09-20T14:18:36.343000 | 2008-09-20T14:33:13.390000 |
108,272 | 108,293 | Should a novice programmer spend time learning to write "desktop" applications these days, or is the web where it's at? | As a novice, I've spent time learning a smattering of C and a fair bit of PHP. I've looked at writing desktop applications for Windows, but there seems to be a fair barrier to entry due to complexity of APIs. Is it worth learning this, or will native applications become less common in the future? The way I see it, the ... | I don't think it is ever a good idea to choose one side and stick with it religiously. I think a good engineer will expose themselves to as much as they can so he can make an informed decision about which is the best tool to complete a task. In other words, don't choose a platform, OS, programming language, etc. and th... | Should a novice programmer spend time learning to write "desktop" applications these days, or is the web where it's at? As a novice, I've spent time learning a smattering of C and a fair bit of PHP. I've looked at writing desktop applications for Windows, but there seems to be a fair barrier to entry due to complexity ... | TITLE:
Should a novice programmer spend time learning to write "desktop" applications these days, or is the web where it's at?
QUESTION:
As a novice, I've spent time learning a smattering of C and a fair bit of PHP. I've looked at writing desktop applications for Windows, but there seems to be a fair barrier to entry ... | [
"desktop"
] | 10 | 20 | 2,440 | 17 | 0 | 2008-09-20T14:18:43.970000 | 2008-09-20T14:24:51.880000 |
108,276 | 111,372 | How to play a sound in Actionscript 3 that is not in the same directory as the SWF? | I have a project with a bunch of external sounds to a SWF. I want to play them, but any time I attempt load a new URL into the sound object it fails with either, Error #2068: Invalid Sound or raises an ioError with Error #2032 Stream Error // Tried with path prefixed with "http://.." "file://.." "//.." and "..") var pa... | Well, I've just done a test by putting an mp3 in a directory: soundTest/assets/song.mp3 then creating a swf that calls the mp3 in another directory: soundTest/swfs/soundTest.swf and when I use var path:String = "../assets/song.mp3"; then it compiles with no errors. What is your actual directory structure? | How to play a sound in Actionscript 3 that is not in the same directory as the SWF? I have a project with a bunch of external sounds to a SWF. I want to play them, but any time I attempt load a new URL into the sound object it fails with either, Error #2068: Invalid Sound or raises an ioError with Error #2032 Stream Er... | TITLE:
How to play a sound in Actionscript 3 that is not in the same directory as the SWF?
QUESTION:
I have a project with a bunch of external sounds to a SWF. I want to play them, but any time I attempt load a new URL into the sound object it fails with either, Error #2068: Invalid Sound or raises an ioError with Err... | [
"flash",
"url",
"actionscript",
"audio",
"urlrequest"
] | 3 | 2 | 11,503 | 4 | 0 | 2008-09-20T14:20:00.723000 | 2008-09-21T16:38:13.330000 |
108,281 | 108,913 | Can I refactor my MySQL queries into one query based on number of results? | I have a table y Which has two columns a and b Entries are: a b
1 2
1 3
1 4
0 5
0 2
0 4 I want to get 2,3,4 if I search column a for 1, and 5,2,4 if I search column a. So, if I search A for something that is in A, (1) I get those rows, and if there are no entries A for given value, give me the 'Defaults' ( a = '0... | I think I have it: SELECT b FROM y where a=if(@value IN (select a from y group by a),@value,0); It checks if @value exists in the table, if not, then it uses 0 as a default. @value can be a php value too. Hope it helps:) | Can I refactor my MySQL queries into one query based on number of results? I have a table y Which has two columns a and b Entries are: a b
1 2
1 3
1 4
0 5
0 2
0 4 I want to get 2,3,4 if I search column a for 1, and 5,2,4 if I search column a. So, if I search A for something that is in A, (1) I get those rows, and... | TITLE:
Can I refactor my MySQL queries into one query based on number of results?
QUESTION:
I have a table y Which has two columns a and b Entries are: a b
1 2
1 3
1 4
0 5
0 2
0 4 I want to get 2,3,4 if I search column a for 1, and 5,2,4 if I search column a. So, if I search A for something that is in A, (1) I g... | [
"php",
"sql",
"mysql"
] | 1 | 2 | 648 | 6 | 0 | 2008-09-20T14:21:38.330000 | 2008-09-20T18:19:20.490000 |
108,292 | 112,607 | How to send clean email messages from your application? | When developing an application that sends out notification email messages, what are the best practices for not getting flagged as a spammer by your hosting company. (Cover any of:) best technique for not flooding a mail server best mail server products, if you were to set up your own sending messages as if from a speci... | best technique for not flooding a mail server not a lot you can do about this beyond checking with your mail server admin (if it's a shared hosting account / not in your control). but if the requirement is one email to a single recipient per event, that shouldn't be too much of an issue. the things that tend to clog ma... | How to send clean email messages from your application? When developing an application that sends out notification email messages, what are the best practices for not getting flagged as a spammer by your hosting company. (Cover any of:) best technique for not flooding a mail server best mail server products, if you wer... | TITLE:
How to send clean email messages from your application?
QUESTION:
When developing an application that sends out notification email messages, what are the best practices for not getting flagged as a spammer by your hosting company. (Cover any of:) best technique for not flooding a mail server best mail server pr... | [
"email",
"smtp",
"spf",
"reverse-dns"
] | 4 | 5 | 1,755 | 3 | 0 | 2008-09-20T14:24:51.630000 | 2008-09-22T00:03:56.567000 |
108,294 | 108,302 | GWT or DOJO or something else? | I come from the Microsoft world (and I come in peace). I want to rapidly prototype a web app and if it works out, take it live - and I don't want to use ASP.Net. I am not sure which web application toolkit to use though. Should I use GWT, DOJO...other recommendations? I am open to any server-side language but am lookin... | If you're open to doing Java, GWT is the way to go. It allows you to have a relatively uniform codebase across client-server, and to only use one language on both. There are some limitations to doing very off-the-beaten-path AJAXy things (which GWT makes difficult, but not impossible), but it doesn't sound like that's ... | GWT or DOJO or something else? I come from the Microsoft world (and I come in peace). I want to rapidly prototype a web app and if it works out, take it live - and I don't want to use ASP.Net. I am not sure which web application toolkit to use though. Should I use GWT, DOJO...other recommendations? I am open to any ser... | TITLE:
GWT or DOJO or something else?
QUESTION:
I come from the Microsoft world (and I come in peace). I want to rapidly prototype a web app and if it works out, take it live - and I don't want to use ASP.Net. I am not sure which web application toolkit to use though. Should I use GWT, DOJO...other recommendations? I ... | [
"javascript",
"web-applications",
"gwt",
"frameworks",
"dojo"
] | 6 | 5 | 7,680 | 8 | 0 | 2008-09-20T14:25:08.853000 | 2008-09-20T14:27:49.173000 |
108,301 | 110,026 | Is "do not load this page directly" really necessary in PHP? | I was going to ask what the best way to do this is, but then decided I should ask whether or not it is even necessary. I have never seen it done in JSP development, but it appears to be common practice in PHP. What is the reasoning behind this, and if I do not protect against this, what else should I be taking into con... | The reason this is more common in PHP than other similar languages has to do with PHP's history. Early versions of PHP had the "register_globals" setting on as a default (in fact, it may not have even been a setting in really early versions). Register_globals tells PHP to define global variables according to the query ... | Is "do not load this page directly" really necessary in PHP? I was going to ask what the best way to do this is, but then decided I should ask whether or not it is even necessary. I have never seen it done in JSP development, but it appears to be common practice in PHP. What is the reasoning behind this, and if I do no... | TITLE:
Is "do not load this page directly" really necessary in PHP?
QUESTION:
I was going to ask what the best way to do this is, but then decided I should ask whether or not it is even necessary. I have never seen it done in JSP development, but it appears to be common practice in PHP. What is the reasoning behind th... | [
"php",
"methodology"
] | 1 | 8 | 690 | 8 | 0 | 2008-09-20T14:27:42.467000 | 2008-09-21T02:17:47.127000 |
108,320 | 527,189 | Code behind in ASP.NET MVC | What is the purpose of the code behind view file in ASP.NET MVC besides setting of the generic parameter of ViewPage? | Here's my list of reasons why code-behind can be useful taken from my own post. I'm sure there are many more. Databinding legacy ASP.NET controls - if an alternative is not available or a temporary solution is needed. View logic that requires recursion to create some kind of nested or hierarchical HTML. View logic that... | Code behind in ASP.NET MVC What is the purpose of the code behind view file in ASP.NET MVC besides setting of the generic parameter of ViewPage? | TITLE:
Code behind in ASP.NET MVC
QUESTION:
What is the purpose of the code behind view file in ASP.NET MVC besides setting of the generic parameter of ViewPage?
ANSWER:
Here's my list of reasons why code-behind can be useful taken from my own post. I'm sure there are many more. Databinding legacy ASP.NET controls - ... | [
"asp.net-mvc"
] | 9 | 12 | 6,171 | 6 | 0 | 2008-09-20T14:35:11.467000 | 2009-02-09T05:30:12.667000 |
108,346 | 108,378 | Checking for external dependances in vb.net | Something i've never really done before, but what is the best way to make sure that any external assemblies/dll's that my application uses are available, and possibly the correct version. I wrote an app that relies on the System.Data.SQLite.dll, i went to test it on a machine where that dll was missing, and my app just... | What you want to do is use reflection to check and see if the assembly can be loaded into memory. Wrap that up in a try..catch block and handle any of the specific exceptions that come from it. Try Assembly.Load("System.Data.SQLite, Version=1.0.22.0, Culture=neutral, PublicKeyToken=DB937BC2D44FF139"); Catch ex As FileN... | Checking for external dependances in vb.net Something i've never really done before, but what is the best way to make sure that any external assemblies/dll's that my application uses are available, and possibly the correct version. I wrote an app that relies on the System.Data.SQLite.dll, i went to test it on a machine... | TITLE:
Checking for external dependances in vb.net
QUESTION:
Something i've never really done before, but what is the best way to make sure that any external assemblies/dll's that my application uses are available, and possibly the correct version. I wrote an app that relies on the System.Data.SQLite.dll, i went to te... | [
".net"
] | 1 | 1 | 262 | 4 | 0 | 2008-09-20T14:41:23.307000 | 2008-09-20T14:52:28.960000 |
108,380 | 109,663 | best way to get started in setting up Mono for ASP.NET on Mac | I have recently gained access to a Mac. I am wondering if anyone has any tips/advice for setting up Mono on a mac for development and execution of ASP.NET? Most resources point to Linux implementations which tend to differ a lot from the way Mac's do things. Any tips or advice would be helpful | To launch the development ASP.NET server, just open a terminal window and run the "xsp2" command from the Mono installation. The only thing that is missing from the Mono distribution on the Mac compared to Linux is the Apache module, that one you will have to compile yourself if you want to deploy your application in p... | best way to get started in setting up Mono for ASP.NET on Mac I have recently gained access to a Mac. I am wondering if anyone has any tips/advice for setting up Mono on a mac for development and execution of ASP.NET? Most resources point to Linux implementations which tend to differ a lot from the way Mac's do things.... | TITLE:
best way to get started in setting up Mono for ASP.NET on Mac
QUESTION:
I have recently gained access to a Mac. I am wondering if anyone has any tips/advice for setting up Mono on a mac for development and execution of ASP.NET? Most resources point to Linux implementations which tend to differ a lot from the wa... | [
"asp.net",
"macos",
"mono",
"developer-machine"
] | 7 | 9 | 3,698 | 5 | 0 | 2008-09-20T14:52:52.157000 | 2008-09-20T22:46:26.917000 |
108,387 | 108,423 | Apache and IIS side by side (both listening to port 80) on windows2003 | What are some good ways to do this? Is it even possible to do cleanly? Ideally I'd like to use packet headers to decide which server should handle requests. However, if there is an easier/better way let me know. | It's impossible for both servers to listen on the same port at the same IP address: since a single socket can only be opened by a single process, only the first server configured for a certain IP/port combination will successfully bind, and the second one will fail. You will thus need a workaround to achieve what you w... | Apache and IIS side by side (both listening to port 80) on windows2003 What are some good ways to do this? Is it even possible to do cleanly? Ideally I'd like to use packet headers to decide which server should handle requests. However, if there is an easier/better way let me know. | TITLE:
Apache and IIS side by side (both listening to port 80) on windows2003
QUESTION:
What are some good ways to do this? Is it even possible to do cleanly? Ideally I'd like to use packet headers to decide which server should handle requests. However, if there is an easier/better way let me know.
ANSWER:
It's impos... | [
"apache",
"iis",
"networking",
"windows-server-2003"
] | 48 | 33 | 187,398 | 9 | 0 | 2008-09-20T14:55:06.287000 | 2008-09-20T15:06:38.177000 |
108,396 | 108,879 | Fluent NHibernate Many-to-Many | I am using Fluent NHibernate and having some issues getting a many to many relationship setup with one of my classes. It's probably a stupid mistake but I've been stuck for a little bit trying to get it working. Anyways, I have a couple classes that have Many-Many relationships. public class Person { public Person() { ... | The fact that it is adding two records to the table looks like you are missing an inverse attribute. Since both the person and the group are being changed, NHibernate is persisting the relation twice (once for each object). The inverse attribute is specifically for avoiding this. I'm not sure about how to add it in map... | Fluent NHibernate Many-to-Many I am using Fluent NHibernate and having some issues getting a many to many relationship setup with one of my classes. It's probably a stupid mistake but I've been stuck for a little bit trying to get it working. Anyways, I have a couple classes that have Many-Many relationships. public cl... | TITLE:
Fluent NHibernate Many-to-Many
QUESTION:
I am using Fluent NHibernate and having some issues getting a many to many relationship setup with one of my classes. It's probably a stupid mistake but I've been stuck for a little bit trying to get it working. Anyways, I have a couple classes that have Many-Many relati... | [
"c#",
"nhibernate",
"fluent-nhibernate",
"fluent"
] | 22 | 39 | 24,625 | 4 | 0 | 2008-09-20T14:58:51.377000 | 2008-09-20T17:57:59.857000 |
108,399 | 1,451,446 | What embedded database with Isolated Storage support can you recommend? | I'm looking for embedded database engine supporting isolating storage. Currently I'm aware of VistaDB. What else you can recommend? Requirements are pretty simple: xcopy deployment support for isolated storage preferably free Note that you don't know exact path to the file when using IS. | VistaDB seems to have support for isolated storage. I've been using it for nearly a year now and am very happy with it all round. It's not free but its pricing starts at $60USD for version 4 (very soon to be released). There is a free Express Edition but this is for non-commercial projects only. | What embedded database with Isolated Storage support can you recommend? I'm looking for embedded database engine supporting isolating storage. Currently I'm aware of VistaDB. What else you can recommend? Requirements are pretty simple: xcopy deployment support for isolated storage preferably free Note that you don't kn... | TITLE:
What embedded database with Isolated Storage support can you recommend?
QUESTION:
I'm looking for embedded database engine supporting isolating storage. Currently I'm aware of VistaDB. What else you can recommend? Requirements are pretty simple: xcopy deployment support for isolated storage preferably free Note... | [
"database",
"embedded-database",
"isolatedstorage"
] | 3 | 1 | 1,918 | 5 | 0 | 2008-09-20T14:59:38.147000 | 2009-09-20T16:55:46.787000 |
108,403 | 108,420 | Solutions for INSERT OR UPDATE on SQL Server | Assume a table structure of MyTable(KEY, datafield1, datafield2...). Often I want to either update an existing record, or insert a new record if it doesn't exist. Essentially: IF (key exists) run update command ELSE run insert command What's the best performing way to write this? | don't forget about transactions. Performance is good, but simple (IF EXISTS..) approach is very dangerous. When multiple threads will try to perform Insert-or-update you can easily get primary key violation. Solutions provided by @Beau Crawford & @Esteban show general idea but error-prone. To avoid deadlocks and PK vio... | Solutions for INSERT OR UPDATE on SQL Server Assume a table structure of MyTable(KEY, datafield1, datafield2...). Often I want to either update an existing record, or insert a new record if it doesn't exist. Essentially: IF (key exists) run update command ELSE run insert command What's the best performing way to write ... | TITLE:
Solutions for INSERT OR UPDATE on SQL Server
QUESTION:
Assume a table structure of MyTable(KEY, datafield1, datafield2...). Often I want to either update an existing record, or insert a new record if it doesn't exist. Essentially: IF (key exists) run update command ELSE run insert command What's the best perfor... | [
"sql",
"sql-server",
"database",
"insert",
"upsert"
] | 738 | 445 | 928,146 | 22 | 0 | 2008-09-20T15:00:47.833000 | 2008-09-20T15:06:11.063000 |
108,405 | 108,433 | How can I compile Asp.Net Aspx Pages before loading them with a webserver? | It's really annoying that visual studio hides typos in aspx pages (not the code behind). If the compiler would compile them, I would get a compile error. | Compile the pages at compile time. See Mike Hadlow's post here: http://mikehadlow.blogspot.com/2008/05/compiling-aspx-templates-using.html | How can I compile Asp.Net Aspx Pages before loading them with a webserver? It's really annoying that visual studio hides typos in aspx pages (not the code behind). If the compiler would compile them, I would get a compile error. | TITLE:
How can I compile Asp.Net Aspx Pages before loading them with a webserver?
QUESTION:
It's really annoying that visual studio hides typos in aspx pages (not the code behind). If the compiler would compile them, I would get a compile error.
ANSWER:
Compile the pages at compile time. See Mike Hadlow's post here: ... | [
"asp.net"
] | 35 | 27 | 20,487 | 5 | 0 | 2008-09-20T15:01:49.593000 | 2008-09-20T15:10:37.170000 |
108,432 | 108,477 | Can IIS7 be installed on XP? | I'm pretty sure I know the answer to this, but short of a virtual Vista installation, is there a way to install IIS 7 on XP? | No. Which means I'm moving to vista this week as I have to use IIS7. EDIT: Ha - voted up! I assume it's a sympathy vote.:-) | Can IIS7 be installed on XP? I'm pretty sure I know the answer to this, but short of a virtual Vista installation, is there a way to install IIS 7 on XP? | TITLE:
Can IIS7 be installed on XP?
QUESTION:
I'm pretty sure I know the answer to this, but short of a virtual Vista installation, is there a way to install IIS 7 on XP?
ANSWER:
No. Which means I'm moving to vista this week as I have to use IIS7. EDIT: Ha - voted up! I assume it's a sympathy vote.:-) | [
"iis-7",
"windows-xp"
] | 8 | 6 | 10,520 | 3 | 0 | 2008-09-20T15:10:36.153000 | 2008-09-20T15:26:13.963000 |
108,439 | 108,615 | How do I get the result of a command in a variable in windows? | I'm looking to get the result of a command as a variable in a Windows batch script (see how to get the result of a command in bash for the bash scripting equivalent). A solution that will work in a.bat file is preferred, but other common windows scripting solutions are also welcome. | If you have to capture all the command output you can use a batch like this: @ECHO OFF IF NOT "%1"=="" GOTO ADDV SET VAR= FOR /F %%I IN ('DIR *.TXT /B /O:D') DO CALL %0 %%I SET VAR GOTO END:ADDV SET VAR=%VAR%!%1:END All output lines are stored in VAR separated with "!". But if only a single-line console-output is expec... | How do I get the result of a command in a variable in windows? I'm looking to get the result of a command as a variable in a Windows batch script (see how to get the result of a command in bash for the bash scripting equivalent). A solution that will work in a.bat file is preferred, but other common windows scripting s... | TITLE:
How do I get the result of a command in a variable in windows?
QUESTION:
I'm looking to get the result of a command as a variable in a Windows batch script (see how to get the result of a command in bash for the bash scripting equivalent). A solution that will work in a.bat file is preferred, but other common w... | [
"windows",
"scripting",
"batch-file"
] | 177 | 44 | 351,054 | 13 | 0 | 2008-09-20T15:13:28.503000 | 2008-09-20T16:23:21.097000 |
108,445 | 108,589 | Will having multiple filegroups help speed up my database? | Currently, I am developing a product that does fairly intensive calculations using MS SQL Server 2005. At a high level, the architecture of my product is based on the concept of "runs" where each time I do some analytics it gets stored in a series of run tables (~100 tables per run). The problem I'm having is that when... | In terms of performance, the big gain in using separate files/filegroups is that it lets you spread your data across multiple physical disks. This is beneficial because with several disks, multiple data requests can be handled simultaneously (parallel is generally faster than serial). All other things being equal, this... | Will having multiple filegroups help speed up my database? Currently, I am developing a product that does fairly intensive calculations using MS SQL Server 2005. At a high level, the architecture of my product is based on the concept of "runs" where each time I do some analytics it gets stored in a series of run tables... | TITLE:
Will having multiple filegroups help speed up my database?
QUESTION:
Currently, I am developing a product that does fairly intensive calculations using MS SQL Server 2005. At a high level, the architecture of my product is based on the concept of "runs" where each time I do some analytics it gets stored in a se... | [
"sql-server"
] | 6 | 3 | 2,554 | 7 | 0 | 2008-09-20T15:14:49.140000 | 2008-09-20T16:08:03.397000 |
108,461 | 108,496 | How do I pop up an image in a separate div on mouse-over using CSS only? | I have a small gallery of thumbnails. When I place my mouse pointer over a thumbnail image I'd like to have a full size image pop up in a div in the top right of the screen. I've seen this done using just CSS and I'd like to go down that route rather than use javascript if possible. | Pure CSS Popups2, from the same site that brings us Complexspiral. Note that this example is using actual navigational links as the rolled-over element. If you don't want that, it may cause some stickiness regarding versions of IE. The basic technique is to stick each image inside a link tag with an actual href (Otherw... | How do I pop up an image in a separate div on mouse-over using CSS only? I have a small gallery of thumbnails. When I place my mouse pointer over a thumbnail image I'd like to have a full size image pop up in a div in the top right of the screen. I've seen this done using just CSS and I'd like to go down that route rat... | TITLE:
How do I pop up an image in a separate div on mouse-over using CSS only?
QUESTION:
I have a small gallery of thumbnails. When I place my mouse pointer over a thumbnail image I'd like to have a full size image pop up in a div in the top right of the screen. I've seen this done using just CSS and I'd like to go d... | [
"css",
"xhtml",
"popup"
] | 5 | 5 | 3,842 | 4 | 0 | 2008-09-20T15:21:03.853000 | 2008-09-20T15:32:39.613000 |
108,485 | 108,495 | How do I get started reverse engineering z80 machine code? | I have a.z80 memory dump. How do I reverse engineer it? What do I need to know? How can I minimize manual labour? | Most powerful disassembler - IDA supports z80. Also list of disassemblers published at " Software Development Tools for Z80 Family " page | How do I get started reverse engineering z80 machine code? I have a.z80 memory dump. How do I reverse engineer it? What do I need to know? How can I minimize manual labour? | TITLE:
How do I get started reverse engineering z80 machine code?
QUESTION:
I have a.z80 memory dump. How do I reverse engineer it? What do I need to know? How can I minimize manual labour?
ANSWER:
Most powerful disassembler - IDA supports z80. Also list of disassemblers published at " Software Development Tools for ... | [
"assembly",
"reverse-engineering",
"disassembly",
"decompiling",
"z80"
] | 5 | 14 | 5,825 | 2 | 0 | 2008-09-20T15:29:16.343000 | 2008-09-20T15:32:35.073000 |
108,499 | 108,534 | Can I check if a SOAP web service supports a certain WebMethod? | Our web services are distributed across different servers for various reasons (such as decreasing latency to the client), and they're not always all up-to-date. Rather than throwing an exception when a method doesn't exist because the particular web service is too old, it would be nicer if we could have the client chec... | Unit test the web service to ensure its signatures don't break. When you write code that breaks the method signature, you'll know and can adjust the other applications accordingly. Or just don't break the web services and publish them in a way that enable syou to version them. As in http://services.domain.com/MyService... | Can I check if a SOAP web service supports a certain WebMethod? Our web services are distributed across different servers for various reasons (such as decreasing latency to the client), and they're not always all up-to-date. Rather than throwing an exception when a method doesn't exist because the particular web servic... | TITLE:
Can I check if a SOAP web service supports a certain WebMethod?
QUESTION:
Our web services are distributed across different servers for various reasons (such as decreasing latency to the client), and they're not always all up-to-date. Rather than throwing an exception when a method doesn't exist because the par... | [
"asp.net",
"web-services",
"soap"
] | 1 | 1 | 2,152 | 3 | 0 | 2008-09-20T15:33:33.103000 | 2008-09-20T15:45:59.610000 |
108,503 | 108,524 | MySQL: Advisable number of rows | Consider an indexed MySQL table with 7 columns, being constantly queried and written to. What is the advisable number of rows that this table should be allowed to contain before the performance would be improved by splitting the data off into other tables? | Whether or not you would get a performance gain by partitioning the data depends on the data and the queries you will run on it. You can store many millions of rows in a table and with good indexes and well-designed queries it will still be super-fast. Only consider partitioning if you are already confident that your i... | MySQL: Advisable number of rows Consider an indexed MySQL table with 7 columns, being constantly queried and written to. What is the advisable number of rows that this table should be allowed to contain before the performance would be improved by splitting the data off into other tables? | TITLE:
MySQL: Advisable number of rows
QUESTION:
Consider an indexed MySQL table with 7 columns, being constantly queried and written to. What is the advisable number of rows that this table should be allowed to contain before the performance would be improved by splitting the data off into other tables?
ANSWER:
Whet... | [
"mysql",
"performance",
"database-design",
"optimization"
] | 1 | 11 | 5,212 | 8 | 0 | 2008-09-20T15:34:49.093000 | 2008-09-20T15:42:56.217000 |
108,505 | 108,517 | DataGridViewCell Bordercolor | Does anyone know how to change the Bordercolor for a Datagridviewcell in c#? Here's a picture of what I mean: Datagridviewstyle http://www.zivillian.de/datagridview.png Picture Backgroundcolor, Textcolor and Images are no Problem, but I don't know how to realise the Borders. EDIT: I want to realise this with winforms. ... | You'd have to draw the cells yourself to achieve this, using OwnerDraw. | DataGridViewCell Bordercolor Does anyone know how to change the Bordercolor for a Datagridviewcell in c#? Here's a picture of what I mean: Datagridviewstyle http://www.zivillian.de/datagridview.png Picture Backgroundcolor, Textcolor and Images are no Problem, but I don't know how to realise the Borders. EDIT: I want to... | TITLE:
DataGridViewCell Bordercolor
QUESTION:
Does anyone know how to change the Bordercolor for a Datagridviewcell in c#? Here's a picture of what I mean: Datagridviewstyle http://www.zivillian.de/datagridview.png Picture Backgroundcolor, Textcolor and Images are no Problem, but I don't know how to realise the Border... | [
"c#",
".net",
"datagridview",
"coding-style"
] | 2 | 2 | 2,530 | 2 | 0 | 2008-09-20T15:35:00.777000 | 2008-09-20T15:39:44.370000 |
108,518 | 108,575 | RSA encryption library for C++ | I am developing a Win32 application and I would like to use an RSA encryption library. Which library would you recommend? | I use the following library: http://www.efgh.com/software/rsa.htm It's public domain, compact, self contained, and does the work well. | RSA encryption library for C++ I am developing a Win32 application and I would like to use an RSA encryption library. Which library would you recommend? | TITLE:
RSA encryption library for C++
QUESTION:
I am developing a Win32 application and I would like to use an RSA encryption library. Which library would you recommend?
ANSWER:
I use the following library: http://www.efgh.com/software/rsa.htm It's public domain, compact, self contained, and does the work well. | [
"c++",
"winapi",
"encryption",
"rsa"
] | 36 | 7 | 52,004 | 9 | 0 | 2008-09-20T15:39:54.120000 | 2008-09-20T16:05:43.870000 |
108,521 | 109,109 | Sharepoint calculated field's formula for created by | i have a sharepoint list with 2 users for examole (user A and user B) i need a calculated field in the list items such that if user "A" created the item the field vaule will be "X" and if user "B" created the item fields value would be "Y" but i couldnt use [created by] in the furmiula of the calculated field!! why is ... | If using Sharepoint Designer is an option you can create a workflow for that list. Set it to start when a new item is created -or- edited, use a condition of "If Created_By equals..." and an action of "Set yourfield to yourvalue", then add an Else If branch and repeat. This will always override anything a user enters i... | Sharepoint calculated field's formula for created by i have a sharepoint list with 2 users for examole (user A and user B) i need a calculated field in the list items such that if user "A" created the item the field vaule will be "X" and if user "B" created the item fields value would be "Y" but i couldnt use [created ... | TITLE:
Sharepoint calculated field's formula for created by
QUESTION:
i have a sharepoint list with 2 users for examole (user A and user B) i need a calculated field in the list items such that if user "A" created the item the field vaule will be "X" and if user "B" created the item fields value would be "Y" but i cou... | [
"sharepoint",
"list",
"formula"
] | 5 | 6 | 18,158 | 3 | 0 | 2008-09-20T15:41:44.770000 | 2008-09-20T19:36:10.603000 |
108,537 | 108,619 | What are the main differences between CLTL2 and ANSI CL? | Any online links / resources? | Bill Clementson has http://bc.tech.coop/cltl2-ansi.htm which is a repost of http://groups.google.com/group/comp.lang.lisp/msg/0e9aced3bf023d86 I also found http://web.archive.org/web/20060111013153/http://www.ntlug.org/~cbbrowne/commonlisp.html#AEN10329 while answering the question. I've not compared the two. As the po... | What are the main differences between CLTL2 and ANSI CL? Any online links / resources? | TITLE:
What are the main differences between CLTL2 and ANSI CL?
QUESTION:
Any online links / resources?
ANSWER:
Bill Clementson has http://bc.tech.coop/cltl2-ansi.htm which is a repost of http://groups.google.com/group/comp.lang.lisp/msg/0e9aced3bf023d86 I also found http://web.archive.org/web/20060111013153/http://w... | [
"lisp",
"common-lisp"
] | 1 | 5 | 957 | 1 | 0 | 2008-09-20T15:47:51.167000 | 2008-09-20T16:23:53.687000 |
108,558 | 108,569 | Cookies and subdomains | Can a cookie be shared between two sites on the same top level domain? Say www.example.com and secure.example.com? We are looking into implementing a cache for non-secure content, and need to segregate secure content to another domain. What parameters does the cookie need? I'm using asp.net | Yes, you can. Use: Response.Cookies("UID").Domain = ".myserver.com" | Cookies and subdomains Can a cookie be shared between two sites on the same top level domain? Say www.example.com and secure.example.com? We are looking into implementing a cache for non-secure content, and need to segregate secure content to another domain. What parameters does the cookie need? I'm using asp.net | TITLE:
Cookies and subdomains
QUESTION:
Can a cookie be shared between two sites on the same top level domain? Say www.example.com and secure.example.com? We are looking into implementing a cache for non-secure content, and need to segregate secure content to another domain. What parameters does the cookie need? I'm u... | [
"asp.net",
"cookies"
] | 20 | 23 | 9,216 | 3 | 0 | 2008-09-20T15:58:58.677000 | 2008-09-20T16:02:37.527000 |
108,567 | 108,583 | Moving Directories with History | I have a SVN structure like this: /Projects /Project1 /Project2 /someFolder /Project3 /Project4 I would like to move all the projects into the /Projects folder, which means I want to move Projects 3 and 4 from /someFolder into the /projects folder. The caveat: I'd like to keep the full history. I assume that every clie... | svn help rename Moving/renaming in subversion keeps history intact. | Moving Directories with History I have a SVN structure like this: /Projects /Project1 /Project2 /someFolder /Project3 /Project4 I would like to move all the projects into the /Projects folder, which means I want to move Projects 3 and 4 from /someFolder into the /projects folder. The caveat: I'd like to keep the full h... | TITLE:
Moving Directories with History
QUESTION:
I have a SVN structure like this: /Projects /Project1 /Project2 /someFolder /Project3 /Project4 I would like to move all the projects into the /Projects folder, which means I want to move Projects 3 and 4 from /someFolder into the /projects folder. The caveat: I'd like ... | [
"svn"
] | 70 | 58 | 71,296 | 9 | 0 | 2008-09-20T16:02:15.767000 | 2008-09-20T16:06:53.600000 |
108,586 | 108,606 | Topological sort, recursive, using generators | Data: a dependency list, already verified to be acyclic. So here, 'a' depends on 'b','c' (c depends on d), etc... A = { 'a': dict(b=1, c=1), 'c': dict(d=1), 'd': dict(e=1,f=1,g=1), 'h': dict(j=1) } I'd like to have a top-down, recursive solution to let's say, find the chain starting at 'a': a, c, d, e, g, f, b So, righ... | Try this: #!/usr/bin/env python
def get_all(D, k): yield k for ii in D.get(k, []): for jj in get_all(D, ii): yield jj
A = { 'a': dict(b=1, c=1), 'c': dict(d=1), 'd': dict(e=1,f=1,g=1), 'h': dict(j=1) }
for ii in get_all(A,'a'): print ii Gives me steve@rei:~/code/tmp $ python recur.py a c d e g f b | Topological sort, recursive, using generators Data: a dependency list, already verified to be acyclic. So here, 'a' depends on 'b','c' (c depends on d), etc... A = { 'a': dict(b=1, c=1), 'c': dict(d=1), 'd': dict(e=1,f=1,g=1), 'h': dict(j=1) } I'd like to have a top-down, recursive solution to let's say, find the chain... | TITLE:
Topological sort, recursive, using generators
QUESTION:
Data: a dependency list, already verified to be acyclic. So here, 'a' depends on 'b','c' (c depends on d), etc... A = { 'a': dict(b=1, c=1), 'c': dict(d=1), 'd': dict(e=1,f=1,g=1), 'h': dict(j=1) } I'd like to have a top-down, recursive solution to let's s... | [
"python",
"recursion",
"generator",
"topology"
] | 3 | 4 | 3,139 | 2 | 0 | 2008-09-20T16:07:18.857000 | 2008-09-20T16:18:00.657000 |
108,593 | 110,456 | MalformedInputException while using Shrinksafe with IBM JRE | While trying to use Shrinksafe custom_rhino.jar to build Dojo I get MalformedInputException. The problem occurs when build reaches custom widgets/templates which contain french letters stored in UTF-8. The AIX machine has LANG=en_US which should be correct, judging by other documented problems regarding MalformedInputE... | In the linked forum, I didn't see a clarification about the default character encoding on your build machine. It may be that Dojo is using an encoding of UTF-8, but in fact your files are encoded with something like ISO-8859-1 (I'm assuming western Latin characters are used for French). Do you have an editor such as Ec... | MalformedInputException while using Shrinksafe with IBM JRE While trying to use Shrinksafe custom_rhino.jar to build Dojo I get MalformedInputException. The problem occurs when build reaches custom widgets/templates which contain french letters stored in UTF-8. The AIX machine has LANG=en_US which should be correct, ju... | TITLE:
MalformedInputException while using Shrinksafe with IBM JRE
QUESTION:
While trying to use Shrinksafe custom_rhino.jar to build Dojo I get MalformedInputException. The problem occurs when build reaches custom widgets/templates which contain french letters stored in UTF-8. The AIX machine has LANG=en_US which sho... | [
"java",
"dojo",
"aix",
"ibm-jre"
] | 1 | 2 | 475 | 1 | 0 | 2008-09-20T16:09:28.493000 | 2008-09-21T07:14:20.520000 |
108,598 | 177,416 | Entity Framework: how to return a base type from L2E | Considering the following architecture: a base object 'Entity' a derived object 'Entry:Base' and a further derived object 'CancelledEntry:Entry' In EntitySQL I can write the following: [...] where it is of (only MyEntities.Entry) [...] to return only objects of type Entry and no Entity or CancelledEntry. In linq to sql... | Why don't you apply an extension method on IQueryable< Entry > called ApplyBaseEntryFilter() which would apply this filter and return an IQueryable< Entry >. This is an example of how to reuse linq query fragments. Using extension methods on IQueryable< Entity > is a great way to re-use queries as you should neve rneed... | Entity Framework: how to return a base type from L2E Considering the following architecture: a base object 'Entity' a derived object 'Entry:Base' and a further derived object 'CancelledEntry:Entry' In EntitySQL I can write the following: [...] where it is of (only MyEntities.Entry) [...] to return only objects of type ... | TITLE:
Entity Framework: how to return a base type from L2E
QUESTION:
Considering the following architecture: a base object 'Entity' a derived object 'Entry:Base' and a further derived object 'CancelledEntry:Entry' In EntitySQL I can write the following: [...] where it is of (only MyEntities.Entry) [...] to return onl... | [
".net",
"entity-framework",
"ado.net"
] | 0 | 2 | 710 | 2 | 0 | 2008-09-20T16:12:16.710000 | 2008-10-07T06:50:47.920000 |
108,604 | 108,614 | What factor determines the cost of a software project? | If you have $100 in your hand right now. And have to bet on one of these options. That would you bet it on? The question is: What is the most important factor, that determents the cost of a project. Typing speed of the programmers. The total amount of characters typed while programming. The 'wc *.c' command. The end si... | From McConnell: http://www.codinghorror.com/blog/archives/000637.html [For a software project], size is easily the most significant determinant of effort, cost, and schedule. The kind of software you're developing comes in second, and personnel factors are a close third. The programming language and environment you use... | What factor determines the cost of a software project? If you have $100 in your hand right now. And have to bet on one of these options. That would you bet it on? The question is: What is the most important factor, that determents the cost of a project. Typing speed of the programmers. The total amount of characters ty... | TITLE:
What factor determines the cost of a software project?
QUESTION:
If you have $100 in your hand right now. And have to bet on one of these options. That would you bet it on? The question is: What is the most important factor, that determents the cost of a project. Typing speed of the programmers. The total amoun... | [
"project-management",
"estimation"
] | 1 | 7 | 1,224 | 6 | 0 | 2008-09-20T16:17:56.307000 | 2008-09-20T16:22:51.863000 |
108,682 | 108,721 | What is the reasoning behind the recommended layout for Subversion repositories? | Version Control with Subversion recommends the following layout for (single-project) repositories (complemented by this question ): /trunk /tags /rel.1 (approximately)... /branches /rel1fixes What are the relative merits of this arrangement when compared with a (perhaps) more process-oriented one?: /development /curren... | The main difference between the recommended layout and your proposed layout is that the recommended layout is somewhat self-documenting as to where to commit things, and how it behaves. For example, in the recommended layout, it's obvious that all new development is committed to trunk, and most branches are made from t... | What is the reasoning behind the recommended layout for Subversion repositories? Version Control with Subversion recommends the following layout for (single-project) repositories (complemented by this question ): /trunk /tags /rel.1 (approximately)... /branches /rel1fixes What are the relative merits of this arrangemen... | TITLE:
What is the reasoning behind the recommended layout for Subversion repositories?
QUESTION:
Version Control with Subversion recommends the following layout for (single-project) repositories (complemented by this question ): /trunk /tags /rel.1 (approximately)... /branches /rel1fixes What are the relative merits ... | [
"svn"
] | 17 | 18 | 5,653 | 7 | 0 | 2008-09-20T16:40:59.260000 | 2008-09-20T16:54:37.043000 |
108,687 | 108,778 | Issues creating a box using CSS | I want to create a box shape and I am having trouble. I want the box to have a background color, and then different color inside the box. The box will then have a list of items using ul and li, and each list item will have a background of white, and the list item's background color is too stretch the entire distance of... | You can do this pretty cleanly with this css:.box { width: 100px; border: solid #884400; border-width: 8px 3px 8px 3px; background-color: #ccaa77; }.box ul { margin: 0px; padding: 0px; padding-top: 50px; /* presuming the non-list header space at the top of your box is desirable */ }.box ul li { margin: 0px 2px 2px 2px;... | Issues creating a box using CSS I want to create a box shape and I am having trouble. I want the box to have a background color, and then different color inside the box. The box will then have a list of items using ul and li, and each list item will have a background of white, and the list item's background color is to... | TITLE:
Issues creating a box using CSS
QUESTION:
I want to create a box shape and I am having trouble. I want the box to have a background color, and then different color inside the box. The box will then have a list of items using ul and li, and each list item will have a background of white, and the list item's back... | [
"css"
] | 6 | 8 | 11,116 | 5 | 0 | 2008-09-20T16:41:23.410000 | 2008-09-20T17:15:57.787000 |
108,689 | 109,643 | Custom Text Wrapping in WPF | Is there a way of wrapping text in a non-rectangular container in WPF? Here is how it is done in photoshop | Unfortunately there isn't a straightforward way without making a complete implementation of a TextFormatter. MSDN article on the basics of an Advanced TextFormatter: The text layout and UI controls in WPF provide formatting properties that allow you to easily include formatted text in your application. These controls e... | Custom Text Wrapping in WPF Is there a way of wrapping text in a non-rectangular container in WPF? Here is how it is done in photoshop | TITLE:
Custom Text Wrapping in WPF
QUESTION:
Is there a way of wrapping text in a non-rectangular container in WPF? Here is how it is done in photoshop
ANSWER:
Unfortunately there isn't a straightforward way without making a complete implementation of a TextFormatter. MSDN article on the basics of an Advanced TextFor... | [
"wpf",
"text"
] | 9 | 5 | 2,930 | 2 | 0 | 2008-09-20T16:41:44.843000 | 2008-09-20T22:39:33.987000 |
108,728 | 108,791 | Suggestions for implementation of a command line interface | I am redesigning a command line application and am looking for a way to make its use more intuitive. Are there any conventions for the format of parameters passed into a command line application? Or any other method that people have found useful? | I see a lot of Windows command line specifics, but if your program is intended for Linux, I find the GNU command line standard to be the most intuitive. Basically, it uses double hyphens for the long form of a command (e.g., --help ) and a single hyphen for the short version (e.g., -h ). You can also "stack" the short ... | Suggestions for implementation of a command line interface I am redesigning a command line application and am looking for a way to make its use more intuitive. Are there any conventions for the format of parameters passed into a command line application? Or any other method that people have found useful? | TITLE:
Suggestions for implementation of a command line interface
QUESTION:
I am redesigning a command line application and am looking for a way to make its use more intuitive. Are there any conventions for the format of parameters passed into a command line application? Or any other method that people have found usef... | [
"command-line",
"user-interface"
] | 37 | 29 | 18,425 | 17 | 0 | 2008-09-20T16:56:06.823000 | 2008-09-20T17:21:15.047000 |
108,768 | 108,781 | Needless pointer-casts in C | I got a comment to my answer on this thread: Malloc inside a function call appears to be getting freed on return? In short I had code like this: int * somefunc (void) { int * temp = (int*) malloc (sizeof (int)); temp[0] = 0; return temp; } I got this comment: Can I just say, please don't cast the return value of malloc... | It seems fitting I post an answer, since I left the comment:P Basically, if you forget to include stdlib.h the compiler will assume malloc returns an int. Without casting, you will get a warning. With casting you won't. So by casting you get nothing, and run the risk of suppressing legitimate warnings. Much is written ... | Needless pointer-casts in C I got a comment to my answer on this thread: Malloc inside a function call appears to be getting freed on return? In short I had code like this: int * somefunc (void) { int * temp = (int*) malloc (sizeof (int)); temp[0] = 0; return temp; } I got this comment: Can I just say, please don't cas... | TITLE:
Needless pointer-casts in C
QUESTION:
I got a comment to my answer on this thread: Malloc inside a function call appears to be getting freed on return? In short I had code like this: int * somefunc (void) { int * temp = (int*) malloc (sizeof (int)); temp[0] = 0; return temp; } I got this comment: Can I just say... | [
"c++",
"c",
"pointers"
] | 16 | 17 | 2,784 | 12 | 0 | 2008-09-20T17:11:40.060000 | 2008-09-20T17:17:51.077000 |
108,777 | 109,359 | DatagridView virtual model with comboboxColumn | is it possible to have different items in different rows within a comboboxcolumn in a datagridview. This would be using virtual mode. Code samples would be great. | I think what you're looking for is here. The technique involves handling the EditingControlShowing event of the DataGridView control and updating the datasource for the DataGridViewComboBoxEditingControl (presumably based on the values in the other columns in that row). Edit: here's some code that shows the main points... | DatagridView virtual model with comboboxColumn is it possible to have different items in different rows within a comboboxcolumn in a datagridview. This would be using virtual mode. Code samples would be great. | TITLE:
DatagridView virtual model with comboboxColumn
QUESTION:
is it possible to have different items in different rows within a comboboxcolumn in a datagridview. This would be using virtual mode. Code samples would be great.
ANSWER:
I think what you're looking for is here. The technique involves handling the Editin... | [
"c#",
".net",
"winforms",
"datagridview"
] | 2 | 5 | 2,644 | 1 | 0 | 2008-09-20T17:15:21.097000 | 2008-09-20T20:56:03.627000 |
108,782 | 123,186 | Is EJB still alive? | Do you still use session or entity EJBs in your project? Why? | EJB3 is a vast improvement over previous versions. It's still technically the standard server-side implementation toolset for JavaEE and since it now has none of the previous baggage (thanks to annotations and Java Persistence), is quite usable and being deployed as we speak. As one commenter noted, JBoss SEAM is based... | Is EJB still alive? Do you still use session or entity EJBs in your project? Why? | TITLE:
Is EJB still alive?
QUESTION:
Do you still use session or entity EJBs in your project? Why?
ANSWER:
EJB3 is a vast improvement over previous versions. It's still technically the standard server-side implementation toolset for JavaEE and since it now has none of the previous baggage (thanks to annotations and J... | [
"java",
"jakarta-ee",
"ejb"
] | 11 | 28 | 6,637 | 6 | 0 | 2008-09-20T17:18:25.957000 | 2008-09-23T19:21:14.967000 |
108,798 | 108,802 | Generally define the process of testing | How would you define testing? In the interest of full disclosure, I'm posting this because I already have some answers I like. | Testing is any process by which it is verified that each feature (user story, requirement...) has been developed as required, or not. | Generally define the process of testing How would you define testing? In the interest of full disclosure, I'm posting this because I already have some answers I like. | TITLE:
Generally define the process of testing
QUESTION:
How would you define testing? In the interest of full disclosure, I'm posting this because I already have some answers I like.
ANSWER:
Testing is any process by which it is verified that each feature (user story, requirement...) has been developed as required, ... | [
"testing",
"quotes"
] | 4 | 3 | 601 | 7 | 0 | 2008-09-20T17:22:53.513000 | 2008-09-20T17:25:00.637000 |
108,813 | 108,830 | 404 Http error handler in Asp.Net MVC (RC 5) | How can I Handler 404 errors without the framework throwing an Exception 500 error code? | http://jason.whitehorn.ws/2008/06/17/Friendly-404-Errors-In-ASPNET-MVC.aspx gives the following explanation: Add a wildcard routing rule as your final rule: routes.MapRoute("Error", "{*url}", new { controller = "Error", action = "Http404" }); Any request that doesn't match another rule gets routed to the Http404 action... | 404 Http error handler in Asp.Net MVC (RC 5) How can I Handler 404 errors without the framework throwing an Exception 500 error code? | TITLE:
404 Http error handler in Asp.Net MVC (RC 5)
QUESTION:
How can I Handler 404 errors without the framework throwing an Exception 500 error code?
ANSWER:
http://jason.whitehorn.ws/2008/06/17/Friendly-404-Errors-In-ASPNET-MVC.aspx gives the following explanation: Add a wildcard routing rule as your final rule: ro... | [
"asp.net-mvc",
"http",
"http-status-code-404"
] | 20 | 21 | 17,854 | 4 | 0 | 2008-09-20T17:31:31.480000 | 2008-09-20T17:38:37.593000 |
108,819 | 108,836 | Best way to randomize an array with .NET | What is the best way to randomize an array of strings with.NET? My array contains about 500 strings and I'd like to create a new Array with the same strings but in a random order. Please include a C# example in your answer. | First, you should use the most upvoted answer to this question so far, which is https://stackoverflow.com/a/110570/1757994. You can shuffle using LINQ. var myShuffledArray = myArray.Shuffle(). Add the following code as a file called EnumerableExtensions.cs to your project: public static class EnumerableExtensions {
pu... | Best way to randomize an array with .NET What is the best way to randomize an array of strings with.NET? My array contains about 500 strings and I'd like to create a new Array with the same strings but in a random order. Please include a C# example in your answer. | TITLE:
Best way to randomize an array with .NET
QUESTION:
What is the best way to randomize an array of strings with.NET? My array contains about 500 strings and I'd like to create a new Array with the same strings but in a random order. Please include a C# example in your answer.
ANSWER:
First, you should use the mo... | [
"c#",
".net",
"algorithm",
"sorting",
"random"
] | 191 | 219 | 219,580 | 21 | 0 | 2008-09-20T17:33:26.157000 | 2008-09-20T17:40:06.357000 |
108,822 | 118,828 | Delete all data for a kind in Google App Engine | I would like to wipe out all data for a specific kind in Google App Engine. What is the best way to do this? I wrote a delete script (hack), but since there is so much data is timeout's out after a few hundred records. | The official answer from Google is that you have to delete in chunks spread over multiple requests. You can use AJAX, meta refresh, or request your URL from a script until there are no entities left. | Delete all data for a kind in Google App Engine I would like to wipe out all data for a specific kind in Google App Engine. What is the best way to do this? I wrote a delete script (hack), but since there is so much data is timeout's out after a few hundred records. | TITLE:
Delete all data for a kind in Google App Engine
QUESTION:
I would like to wipe out all data for a specific kind in Google App Engine. What is the best way to do this? I wrote a delete script (hack), but since there is so much data is timeout's out after a few hundred records.
ANSWER:
The official answer from G... | [
"python",
"google-app-engine"
] | 47 | 6 | 29,243 | 19 | 0 | 2008-09-20T17:34:24.203000 | 2008-09-23T02:44:10.277000 |
108,832 | 108,856 | How Do You Clone A VM Using VMware Fusion? | Is it possible to clone a virtual machine using VMware Fusion on Mac OS X? I'm trying the 30 day evaluation version but there doesn't appear to be a clone feature. I tried using the Finder to copy a VM's package structure but the copy didn't appear in the Virtual Machine Library. | Just use File->open to open the copy of the VM. It will probably ask you if you want to change the VM's unique ID. If you plan to run both the original and the clone at the same time, and it's not a Windows OS that needs activation, you should say yes. | How Do You Clone A VM Using VMware Fusion? Is it possible to clone a virtual machine using VMware Fusion on Mac OS X? I'm trying the 30 day evaluation version but there doesn't appear to be a clone feature. I tried using the Finder to copy a VM's package structure but the copy didn't appear in the Virtual Machine Libra... | TITLE:
How Do You Clone A VM Using VMware Fusion?
QUESTION:
Is it possible to clone a virtual machine using VMware Fusion on Mac OS X? I'm trying the 30 day evaluation version but there doesn't appear to be a clone feature. I tried using the Finder to copy a VM's package structure but the copy didn't appear in the Vir... | [
"macos",
"vmware"
] | 21 | 21 | 37,800 | 5 | 0 | 2008-09-20T17:38:49.480000 | 2008-09-20T17:45:33.053000 |
108,838 | 108,925 | Running code in the context of a java WAR from the command line | How would I go about writing some code to allow access to a Java class in my webapp from the command line. E.g. I have a java class with command line interface, that can runs code in the context of the webapp, with access to the DB etc. I want to log on the machine hosting my WARred app in tomcat and be able to interac... | Do you just want to run class files that just so happen to be bundled in the WAR, or do you want ot interact with the actual, running WAR instance? If the former, then the WAR is just a normal Jar file and you can execute classes in that just like any other other Jar file. If you want to interact with the running WAR, ... | Running code in the context of a java WAR from the command line How would I go about writing some code to allow access to a Java class in my webapp from the command line. E.g. I have a java class with command line interface, that can runs code in the context of the webapp, with access to the DB etc. I want to log on th... | TITLE:
Running code in the context of a java WAR from the command line
QUESTION:
How would I go about writing some code to allow access to a Java class in my webapp from the command line. E.g. I have a java class with command line interface, that can runs code in the context of the webapp, with access to the DB etc. I... | [
"java",
"security",
"tomcat",
"war",
"servlets"
] | 1 | 4 | 2,415 | 2 | 0 | 2008-09-20T17:40:47.963000 | 2008-09-20T18:25:43.860000 |
108,853 | 108,894 | Relative urls for Javascript files | I have some code in a javascript file that needs to send queries back to the server. The question is, how do I find the url for the script that I am in, so I can build a proper request url for ajax. I.e., the same script is included on /, /help, /whatever, and so on, while it will always need to request from /data.json... | For this I like to put elements in the page's, containing the URLs to use for requests. They can be generated by your server-side language so they always point to the right view: becomes and can be retrieved by Javascript with: document.getElementById ('link-action-1').href; | Relative urls for Javascript files I have some code in a javascript file that needs to send queries back to the server. The question is, how do I find the url for the script that I am in, so I can build a proper request url for ajax. I.e., the same script is included on /, /help, /whatever, and so on, while it will alw... | TITLE:
Relative urls for Javascript files
QUESTION:
I have some code in a javascript file that needs to send queries back to the server. The question is, how do I find the url for the script that I am in, so I can build a proper request url for ajax. I.e., the same script is included on /, /help, /whatever, and so on,... | [
"javascript",
"html",
"url"
] | 18 | 23 | 12,175 | 5 | 0 | 2008-09-20T17:44:47.767000 | 2008-09-20T18:08:20.657000 |
108,866 | 108,884 | Is there memset() that accepts integers larger than char? | Is there a version of memset() which sets a value that is larger than 1 byte (char)? For example, let's say we have a memset32() function, so using it we can do the following: int32_t array[10]; memset32(array, 0xDEADBEEF, sizeof(array)); This will set the value 0xDEADBEEF in all the elements of array. Currently it see... | void memset64( void * dest, uint64_t value, uintptr_t size ) { uintptr_t i; for( i = 0; i < (size & (~7)); i+=8 ) { memcpy( ((char*)dest) + i, &value, 8 ); } for(; i < size; i++ ) { ((char*)dest)[i] = ((char*)&value)[i&7]; } } (Explanation, as requested in the comments: when you assign to a pointer, the compiler assume... | Is there memset() that accepts integers larger than char? Is there a version of memset() which sets a value that is larger than 1 byte (char)? For example, let's say we have a memset32() function, so using it we can do the following: int32_t array[10]; memset32(array, 0xDEADBEEF, sizeof(array)); This will set the value... | TITLE:
Is there memset() that accepts integers larger than char?
QUESTION:
Is there a version of memset() which sets a value that is larger than 1 byte (char)? For example, let's say we have a memset32() function, so using it we can do the following: int32_t array[10]; memset32(array, 0xDEADBEEF, sizeof(array)); This ... | [
"c",
"optimization"
] | 35 | 39 | 30,247 | 7 | 0 | 2008-09-20T17:50:20.780000 | 2008-09-20T18:00:58.257000 |
108,926 | 137,529 | Where can I find good tutorials on XSL-FO (Formatting/ed Objects), the stuff one feeds to fop and get PDF's? | On a company that I've worked, me and my colleagues, implemented a tailored document distribution system on top of XSL-FO. My task was to get the script to deliver the documents and configure the CUPS print server and the Fax server, so I never had the time to get my hands dirty on XSL-FO. I'm thinking of implementing ... | I like to refer people to this 2003 IBM developerWorks article: HTML to Formatting Objects (FO) conversion guide I don't recommend using the provided.xsl to convert HTML to FO, but use the narrative to understand the different XSL-FO constructs and how they relate to HTML (which we all understand). | Where can I find good tutorials on XSL-FO (Formatting/ed Objects), the stuff one feeds to fop and get PDF's? On a company that I've worked, me and my colleagues, implemented a tailored document distribution system on top of XSL-FO. My task was to get the script to deliver the documents and configure the CUPS print serv... | TITLE:
Where can I find good tutorials on XSL-FO (Formatting/ed Objects), the stuff one feeds to fop and get PDF's?
QUESTION:
On a company that I've worked, me and my colleagues, implemented a tailored document distribution system on top of XSL-FO. My task was to get the script to deliver the documents and configure t... | [
"xml",
"pdf",
"xsl-fo",
"apache-fop"
] | 13 | 12 | 11,796 | 8 | 0 | 2008-09-20T18:25:48.010000 | 2008-09-26T03:05:02.293000 |
108,938 | 117,610 | Application Context in Rails | Rails comes with a handy session hash into which we can cram stuff to our heart's content. I would, however, like something like ASP's application context, which instead of sharing data only within a single session, will share it with all sessions in the same application. I'm writing a simple dashboard app, and would l... | Right answer: memcached. Fast, clean, supports multiple processes, integrates very cleanly with Rails these days. Not even that bad to set up, but it is one more thing to keep running. 90% Answer: There are probably multiple Rails processes running around -- one for each Mongrel you have, for example. Depending on the ... | Application Context in Rails Rails comes with a handy session hash into which we can cram stuff to our heart's content. I would, however, like something like ASP's application context, which instead of sharing data only within a single session, will share it with all sessions in the same application. I'm writing a simp... | TITLE:
Application Context in Rails
QUESTION:
Rails comes with a handy session hash into which we can cram stuff to our heart's content. I would, however, like something like ASP's application context, which instead of sharing data only within a single session, will share it with all sessions in the same application. ... | [
"ruby-on-rails"
] | 3 | 8 | 3,598 | 7 | 0 | 2008-09-20T18:33:44.090000 | 2008-09-22T20:58:25.320000 |
108,940 | 269,758 | How do I use (require :PACKAGE) in clisp under Ubuntu Hardy? | I am trying to evaluate the answer provided here, and am getting the error: "A file with name ASDF-INSTALL does not exist" when using clisp: dsm@localhost:~$ clisp -q [1]> (require:asdf-install)
*** - LOAD: A file with name ASDF-INSTALL does not exist The following restarts are available: ABORT:R1 ABORT Break 1 [2]>:r... | use clc:clc-require in clisp. Refer to 'man common-lisp-controller'. I had the same error in clisp and resolved it by using clc:clc-require. sbcl works fine with just require though. | How do I use (require :PACKAGE) in clisp under Ubuntu Hardy? I am trying to evaluate the answer provided here, and am getting the error: "A file with name ASDF-INSTALL does not exist" when using clisp: dsm@localhost:~$ clisp -q [1]> (require:asdf-install)
*** - LOAD: A file with name ASDF-INSTALL does not exist The fo... | TITLE:
How do I use (require :PACKAGE) in clisp under Ubuntu Hardy?
QUESTION:
I am trying to evaluate the answer provided here, and am getting the error: "A file with name ASDF-INSTALL does not exist" when using clisp: dsm@localhost:~$ clisp -q [1]> (require:asdf-install)
*** - LOAD: A file with name ASDF-INSTALL doe... | [
"linux",
"ubuntu",
"lisp",
"common-lisp",
"asdf"
] | 4 | 1 | 2,425 | 4 | 0 | 2008-09-20T18:35:30.093000 | 2008-11-06T18:27:17.990000 |
108,947 | 108,955 | How verbose should validation output be? | I have an application that reads a database and outputs alerts to any dependencies that are not being met. My thinking on this issue is "Give the minimum information that points the user to the issue." I have been told by a co-worker that I should be as verbose as possible, printing out the values of the database field... | When writing, know your audience. If you're logging warning/error messages for your own consumption, then it's fairly easy: what do you need to know when something goes wrong? If you're logging warning/error messages for someone else, then things get tricky. What do they know? What does their mental model of the system... | How verbose should validation output be? I have an application that reads a database and outputs alerts to any dependencies that are not being met. My thinking on this issue is "Give the minimum information that points the user to the issue." I have been told by a co-worker that I should be as verbose as possible, prin... | TITLE:
How verbose should validation output be?
QUESTION:
I have an application that reads a database and outputs alerts to any dependencies that are not being met. My thinking on this issue is "Give the minimum information that points the user to the issue." I have been told by a co-worker that I should be as verbose... | [
"database",
"validation",
"formatting",
"user-interface"
] | 0 | 2 | 446 | 7 | 0 | 2008-09-20T18:37:19.183000 | 2008-09-20T18:43:08.593000 |
108,971 | 156,024 | Using Side-by-Side assemblies to load the x64 or x32 version of a DLL | We have two versions of a managed C++ assembly, one for x86 and one for x64. This assembly is called by a.net application complied for AnyCPU. We are deploying our code via a file copy install, and would like to continue to do so. Is it possible to use a Side-by-Side assembly manifest to loading a x86 or x64 assembly r... | I created a simple solution that is able to load platform-specific assembly from an executable compiled as AnyCPU. The technique used can be summarized as follows: Make sure default.NET assembly loading mechanism ("Fusion" engine) can't find either x86 or x64 version of the platform-specific assembly Before the main ap... | Using Side-by-Side assemblies to load the x64 or x32 version of a DLL We have two versions of a managed C++ assembly, one for x86 and one for x64. This assembly is called by a.net application complied for AnyCPU. We are deploying our code via a file copy install, and would like to continue to do so. Is it possible to u... | TITLE:
Using Side-by-Side assemblies to load the x64 or x32 version of a DLL
QUESTION:
We have two versions of a managed C++ assembly, one for x86 and one for x64. This assembly is called by a.net application complied for AnyCPU. We are deploying our code via a file copy install, and would like to continue to do so. I... | [
"c#",
".net",
"64-bit"
] | 61 | 67 | 40,598 | 5 | 0 | 2008-09-20T18:45:45.920000 | 2008-10-01T02:42:21.687000 |
109,023 | 109,025 | Count the number of set bits in a 32-bit integer | 8 bits representing the number 7 look like this: 00000111 Three bits are set. What are the algorithms to determine the number of set bits in a 32-bit integer? | This is known as the ' Hamming Weight ', 'popcount' or 'sideways addition'. Some CPUs have a single built-in instruction to do it and others have parallel instructions which act on bit vectors. Instructions like x86's popcnt (on CPUs where it's supported) will almost certainly be fastest for a single integer. Some othe... | Count the number of set bits in a 32-bit integer 8 bits representing the number 7 look like this: 00000111 Three bits are set. What are the algorithms to determine the number of set bits in a 32-bit integer? | TITLE:
Count the number of set bits in a 32-bit integer
QUESTION:
8 bits representing the number 7 look like this: 00000111 Three bits are set. What are the algorithms to determine the number of set bits in a 32-bit integer?
ANSWER:
This is known as the ' Hamming Weight ', 'popcount' or 'sideways addition'. Some CPUs... | [
"algorithm",
"binary",
"bit-manipulation",
"hammingweight",
"iec10967"
] | 1,013 | 992 | 648,406 | 66 | 0 | 2008-09-20T19:04:38.837000 | 2008-09-20T19:05:22.550000 |
109,027 | 109,041 | What is the best way to paginate results in php | I need to display many pages of news in a site. Should I do the pagination in the database query using LIMIT or with the PHP script after getting all the results? | Use limit in SQL! Every time! Otherwise you're throwing around considerably more data than you need to, which makes your scripts unnecessarily slow, and will lead to scalability problems as the amount of data in your tables increases. Limit is your friend! | What is the best way to paginate results in php I need to display many pages of news in a site. Should I do the pagination in the database query using LIMIT or with the PHP script after getting all the results? | TITLE:
What is the best way to paginate results in php
QUESTION:
I need to display many pages of news in a site. Should I do the pagination in the database query using LIMIT or with the PHP script after getting all the results?
ANSWER:
Use limit in SQL! Every time! Otherwise you're throwing around considerably more d... | [
"php",
"pagination"
] | 5 | 10 | 3,467 | 6 | 0 | 2008-09-20T19:06:00.973000 | 2008-09-20T19:09:45.767000 |
109,032 | 116,357 | VB.NET - RichTextBox - Apply formatting to selected text | I have a RichTextBox control on my form. I also have this button, labeled Bold, that I want, if someone selects text in the RichTextBox, then presses the button, the selected text turns bold. Any way to do that? Simple, everyday task for end users. Thanks. | A variation on the above that takes into consideration switching bold on/off depending on the currently selected text's font info: With Me.rtbDoc If.SelectionFont IsNot Nothing Then Dim currentFont As System.Drawing.Font =.SelectionFont Dim newFontStyle As System.Drawing.FontStyle
If.SelectionFont.Bold = True Then new... | VB.NET - RichTextBox - Apply formatting to selected text I have a RichTextBox control on my form. I also have this button, labeled Bold, that I want, if someone selects text in the RichTextBox, then presses the button, the selected text turns bold. Any way to do that? Simple, everyday task for end users. Thanks. | TITLE:
VB.NET - RichTextBox - Apply formatting to selected text
QUESTION:
I have a RichTextBox control on my form. I also have this button, labeled Bold, that I want, if someone selects text in the RichTextBox, then presses the button, the selected text turns bold. Any way to do that? Simple, everyday task for end use... | [
"vb.net",
"visual-studio",
"winforms",
"formatting",
"text-editor"
] | 2 | 3 | 21,709 | 2 | 0 | 2008-09-20T19:07:52.357000 | 2008-09-22T17:49:06.320000 |
109,044 | 109,115 | ASP.NET MVC: Making routes/URLs IIS6 and IIS7-friendly | I have an ASP.NET MVC-application which I want deployable on both IIS6 and IIS7 and as we all know, IIS6 needs the ".mvc"-naming in the URL. Will this code work to make sure it works on all IIS-versions? Without having to make special adjustments in code, global.asax or config-files for the different IIS-versions. bool... | That should fix the.mvc problem since the integrated pipeline is IIS7 strictly. But remember to change settings on the IIS7 website to use "2.0 Integrated Pipeline" otherwhise it will return false aswell. Also ofcouse setup the mapping of.mvc to the asp.net isapi dll, but Im guessing that you already know this. Some sm... | ASP.NET MVC: Making routes/URLs IIS6 and IIS7-friendly I have an ASP.NET MVC-application which I want deployable on both IIS6 and IIS7 and as we all know, IIS6 needs the ".mvc"-naming in the URL. Will this code work to make sure it works on all IIS-versions? Without having to make special adjustments in code, global.as... | TITLE:
ASP.NET MVC: Making routes/URLs IIS6 and IIS7-friendly
QUESTION:
I have an ASP.NET MVC-application which I want deployable on both IIS6 and IIS7 and as we all know, IIS6 needs the ".mvc"-naming in the URL. Will this code work to make sure it works on all IIS-versions? Without having to make special adjustments ... | [
".net",
"asp.net-mvc",
"iis",
"url",
"url-routing"
] | 3 | 3 | 1,807 | 2 | 0 | 2008-09-20T19:10:17.060000 | 2008-09-20T19:37:22.567000 |
109,064 | 111,002 | Countdown timer on ASP.NET page | Could you recommend me a way to place a coundown timer on ASP.NET page? Now I use this code: Default.aspx 60 Default.aspx.cs protected void Timer1_Tick(object sender, EventArgs e) { int seconds = int.Parse(Label1.Text); if (seconds > 0) Label1.Text = (seconds - 1).ToString(); else Timer1.Enabled = false; } But it is tr... | OK, finally I ended with Really simple. Like old good plain HTML with JavaScript. | Countdown timer on ASP.NET page Could you recommend me a way to place a coundown timer on ASP.NET page? Now I use this code: Default.aspx 60 Default.aspx.cs protected void Timer1_Tick(object sender, EventArgs e) { int seconds = int.Parse(Label1.Text); if (seconds > 0) Label1.Text = (seconds - 1).ToString(); else Timer1... | TITLE:
Countdown timer on ASP.NET page
QUESTION:
Could you recommend me a way to place a coundown timer on ASP.NET page? Now I use this code: Default.aspx 60 Default.aspx.cs protected void Timer1_Tick(object sender, EventArgs e) { int seconds = int.Parse(Label1.Text); if (seconds > 0) Label1.Text = (seconds - 1).ToStr... | [
"asp.net",
"javascript",
"asp.net-ajax"
] | 5 | 6 | 53,529 | 5 | 0 | 2008-09-20T19:19:45.323000 | 2008-09-21T13:18:41.593000 |
109,066 | 132,047 | How do I use FlashVars with ActionScript 3.0? | I found this guide for using the flash parameters, thought it might be useful to post here, since Flash CS3 lacks a usage example for reading these parameters. See answers for the link | Not sure why his example calls LoaderInfo. The DisplayObject class has its own (readonly) loaderinfo property. As long as your main class extends a DisplayObject, you can call the property directly package { import flash.display.Sprite;
public class Main extends Sprite {
public function Main() { var test1:String = ''... | How do I use FlashVars with ActionScript 3.0? I found this guide for using the flash parameters, thought it might be useful to post here, since Flash CS3 lacks a usage example for reading these parameters. See answers for the link | TITLE:
How do I use FlashVars with ActionScript 3.0?
QUESTION:
I found this guide for using the flash parameters, thought it might be useful to post here, since Flash CS3 lacks a usage example for reading these parameters. See answers for the link
ANSWER:
Not sure why his example calls LoaderInfo. The DisplayObject c... | [
"actionscript-3",
"parameters",
"documentation",
"flashvars"
] | 4 | 3 | 10,469 | 2 | 0 | 2008-09-20T19:20:19.877000 | 2008-09-25T08:01:42.680000 |
109,070 | 109,085 | Is there a .NET OS abstraction layer to make OS calls work cross-platform? | I really want to write.NET apps that run on any platform (PC, Linux and Mac). I am not really concerned about UI capabilities because these are mostly background services. I have heard of MONO and that it allows you to write.NET apps that run on Mac and Linux, but I want to be able to write a single app that when compi... | Yes, Mono has the windows service stuff ported to Linux, but you are going to have to think of a better way to store configuration settings than Registry... Using XML files for instance would be cross platform. You should also check out mono's wiki on how to develop portable applications here. | Is there a .NET OS abstraction layer to make OS calls work cross-platform? I really want to write.NET apps that run on any platform (PC, Linux and Mac). I am not really concerned about UI capabilities because these are mostly background services. I have heard of MONO and that it allows you to write.NET apps that run on... | TITLE:
Is there a .NET OS abstraction layer to make OS calls work cross-platform?
QUESTION:
I really want to write.NET apps that run on any platform (PC, Linux and Mac). I am not really concerned about UI capabilities because these are mostly background services. I have heard of MONO and that it allows you to write.NE... | [
".net",
"mono",
"cross-platform",
"operating-system",
"abstraction"
] | 1 | 8 | 404 | 2 | 0 | 2008-09-20T19:23:10.447000 | 2008-09-20T19:29:43.833000 |
109,083 | 110,909 | Does anyone know of any problems with using WCF to expose a SOAP interface for non .NET clients? | Does anyone know of any problems with using WCF to expose a SOAP interface for non.NET clients? For example incompatibilities with other SOAP libraries? This is so that the SOAP interface can be exposed for third parties to integrate with our software. | Some of the problem areas I've encountered with WCF: It generates WSDL that is split across multiple URLs. That is, one part of the schema is at one URL, another is at a different URL, etc. The "main" WSDL URL (the one with just "?WSDL" after the service name) references the others via xsd:import elements. Many SOAP cl... | Does anyone know of any problems with using WCF to expose a SOAP interface for non .NET clients? Does anyone know of any problems with using WCF to expose a SOAP interface for non.NET clients? For example incompatibilities with other SOAP libraries? This is so that the SOAP interface can be exposed for third parties to... | TITLE:
Does anyone know of any problems with using WCF to expose a SOAP interface for non .NET clients?
QUESTION:
Does anyone know of any problems with using WCF to expose a SOAP interface for non.NET clients? For example incompatibilities with other SOAP libraries? This is so that the SOAP interface can be exposed fo... | [
"wcf",
"networking",
"soap",
"network-programming",
"network-protocols"
] | 4 | 8 | 592 | 3 | 0 | 2008-09-20T19:28:27.690000 | 2008-09-21T12:33:32.607000 |
109,086 | 109,091 | Stop setInterval call in JavaScript | I am using setInterval(fname, 10000); to call a function every 10 seconds in JavaScript. Is it possible to stop calling it on some event? I want the user to be able to stop the repeated refresh of data. | setInterval() returns an interval ID, which you can pass to clearInterval(): var refreshIntervalId = setInterval(fname, 10000);
/* later */ clearInterval(refreshIntervalId); See the docs for setInterval() and clearInterval(). | Stop setInterval call in JavaScript I am using setInterval(fname, 10000); to call a function every 10 seconds in JavaScript. Is it possible to stop calling it on some event? I want the user to be able to stop the repeated refresh of data. | TITLE:
Stop setInterval call in JavaScript
QUESTION:
I am using setInterval(fname, 10000); to call a function every 10 seconds in JavaScript. Is it possible to stop calling it on some event? I want the user to be able to stop the repeated refresh of data.
ANSWER:
setInterval() returns an interval ID, which you can pa... | [
"javascript",
"dom-events",
"setinterval"
] | 1,768 | 2,714 | 1,426,066 | 9 | 0 | 2008-09-20T19:29:55.377000 | 2008-09-20T19:30:59.243000 |
109,087 | 109,106 | How to get instance variables in Python? | Is there a built-in method in Python to get an array of all a class' instance variables? For example, if I have this code: class hi: def __init__(self): self.ii = "foo" self.kk = "bar" Is there a way for me to do this: >>> mystery_method(hi) ["ii", "kk"] Edit: I originally had asked for class variables erroneously. | Every object has a __dict__ variable containing all the variables and its values in it. Try this >>> hi_obj = hi() >>> hi_obj.__dict__.keys() Output dict_keys(['ii', 'kk']) | How to get instance variables in Python? Is there a built-in method in Python to get an array of all a class' instance variables? For example, if I have this code: class hi: def __init__(self): self.ii = "foo" self.kk = "bar" Is there a way for me to do this: >>> mystery_method(hi) ["ii", "kk"] Edit: I originally had a... | TITLE:
How to get instance variables in Python?
QUESTION:
Is there a built-in method in Python to get an array of all a class' instance variables? For example, if I have this code: class hi: def __init__(self): self.ii = "foo" self.kk = "bar" Is there a way for me to do this: >>> mystery_method(hi) ["ii", "kk"] Edit: ... | [
"python",
"methods",
"instance-variables"
] | 155 | 194 | 212,324 | 12 | 0 | 2008-09-20T19:30:24.580000 | 2008-09-20T19:34:17.050000 |
109,124 | 109,139 | How do you capture stderr, stdout, and the exit code all at once, in Perl? | Is it possible to run an external process from Perl, capture its stderr, stdout AND the process exit code? I seem to be able to do combinations of these, e.g. use backticks to get stdout, IPC::Open3 to capture outputs, and system() to get exit codes. How do you capture stderr, stdout, and the exit code all at once? | If you reread the documentation for IPC::Open3, you'll see a note that you should call waitpid to reap the child process. Once you do this, the status should be available in $?. The exit value is $? >> 8. See $? in perldoc perlvar. | How do you capture stderr, stdout, and the exit code all at once, in Perl? Is it possible to run an external process from Perl, capture its stderr, stdout AND the process exit code? I seem to be able to do combinations of these, e.g. use backticks to get stdout, IPC::Open3 to capture outputs, and system() to get exit c... | TITLE:
How do you capture stderr, stdout, and the exit code all at once, in Perl?
QUESTION:
Is it possible to run an external process from Perl, capture its stderr, stdout AND the process exit code? I seem to be able to do combinations of these, e.g. use backticks to get stdout, IPC::Open3 to capture outputs, and syst... | [
"perl",
"stdout",
"exit-code"
] | 58 | 28 | 53,614 | 6 | 0 | 2008-09-20T19:40:40.733000 | 2008-09-20T19:49:11.913000 |
109,129 | 109,161 | Dynamically created operators | I created a program using dev-cpp and wxwidgets which solves a puzzle. The user must fill the operations blocks and the results blocks, and the program will solve it. I'm solving it using brute force, I generate all non-repeated 9 length number combinations using a recursive algorithm. It does it pretty fast. Up to her... | Not sure that this is really what you're looking for but.. Any Object Oriented language such as C++ or C# will allow you to create an "Operator" base class and then to derive from this base class a "PlusOperator" or "MinusOperator" etc'. this is the standard way to avoid such case statements. However I am not sure this... | Dynamically created operators I created a program using dev-cpp and wxwidgets which solves a puzzle. The user must fill the operations blocks and the results blocks, and the program will solve it. I'm solving it using brute force, I generate all non-repeated 9 length number combinations using a recursive algorithm. It ... | TITLE:
Dynamically created operators
QUESTION:
I created a program using dev-cpp and wxwidgets which solves a puzzle. The user must fill the operations blocks and the results blocks, and the program will solve it. I'm solving it using brute force, I generate all non-repeated 9 length number combinations using a recurs... | [
"c++",
"dynamic",
"operators",
"wxwidgets"
] | 1 | 1 | 198 | 2 | 0 | 2008-09-20T19:43:18.620000 | 2008-09-20T19:58:20.457000 |
109,134 | 109,159 | How do you change the style of a div programmatically | How do I change the style (color) of a div such as the following? " "> <%= ((foo.isTrue)? foo.Name: "false foo") %>"` | If you want to alter the color of the div with client side code (javascript) running in the browser, you do something like the following: | How do you change the style of a div programmatically How do I change the style (color) of a div such as the following? " "> <%= ((foo.isTrue)? foo.Name: "false foo") %>"` | TITLE:
How do you change the style of a div programmatically
QUESTION:
How do I change the style (color) of a div such as the following? " "> <%= ((foo.isTrue)? foo.Name: "false foo") %>"`
ANSWER:
If you want to alter the color of the div with client side code (javascript) running in the browser, you do something lik... | [
"asp.net",
"asp.net-mvc"
] | 11 | 7 | 51,921 | 8 | 0 | 2008-09-20T19:46:42.980000 | 2008-09-20T19:58:15.730000 |
109,141 | 109,445 | How do you manage a large product backlog? | We have a large backlog of things we should do in our software, in a lot of different categories, for example: New problem areas for our products to solve New functionality supporting existing problem areas New functionality requested by our existing users Usability and "look" enhancements Architectural upgrades to the... | Managing a large backlog in an aggressive manner is almost always wasteful. By the time you get to the middle of a prioritized pile things have more often than not changed. I'd recommend adopting something like what Corey Ladas calls a priority filter: http://leansoftwareengineering.com/2008/08/19/priority-filter/ Esse... | How do you manage a large product backlog? We have a large backlog of things we should do in our software, in a lot of different categories, for example: New problem areas for our products to solve New functionality supporting existing problem areas New functionality requested by our existing users Usability and "look"... | TITLE:
How do you manage a large product backlog?
QUESTION:
We have a large backlog of things we should do in our software, in a lot of different categories, for example: New problem areas for our products to solve New functionality supporting existing problem areas New functionality requested by our existing users Us... | [
"project-management",
"requirements",
"product-management",
"backlog"
] | 22 | 12 | 9,855 | 9 | 0 | 2008-09-20T19:49:40.803000 | 2008-09-20T21:18:22.230000 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.