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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
78,497 | 739,034 | Design patterns or best practices for shell scripts | Does anyone know of any resources that talk about best practices or design patterns for shell scripts (sh, bash etc.)? | I wrote quite complex shell scripts and my first suggestion is "don't". The reason is that is fairly easy to make a small mistake that hinders your script, or even make it dangerous. That said, I don't have other resources to pass you but my personal experience. Here is what I normally do, which is overkill, but tends ... | Design patterns or best practices for shell scripts Does anyone know of any resources that talk about best practices or design patterns for shell scripts (sh, bash etc.)? | TITLE:
Design patterns or best practices for shell scripts
QUESTION:
Does anyone know of any resources that talk about best practices or design patterns for shell scripts (sh, bash etc.)?
ANSWER:
I wrote quite complex shell scripts and my first suggestion is "don't". The reason is that is fairly easy to make a small ... | [
"design-patterns",
"bash",
"shell"
] | 185 | 240 | 79,194 | 8 | 0 | 2008-09-17T00:00:03.273000 | 2009-04-10T22:14:48.503000 |
78,523 | 78,549 | OpenID Migration | I'm curious about OpenID. While I agree that the idea of unified credentials is great, I have a few reservations. What is to prevent an OpenID provider from going crazy and holding the OpenID accounts they have hostage until you pay $n? If I decide I don't like the provider I'm with this there a way to migrate to a dif... | This is why you can use OpenID delegation, i.e. you set up two META tags on your personal website and then you can use that site's URL as an alias for your current OpenID provider of choice. Should it get unfriendly you just switch to another and update your tags. Additionally you can always operate your own OpenID ide... | OpenID Migration I'm curious about OpenID. While I agree that the idea of unified credentials is great, I have a few reservations. What is to prevent an OpenID provider from going crazy and holding the OpenID accounts they have hostage until you pay $n? If I decide I don't like the provider I'm with this there a way to... | TITLE:
OpenID Migration
QUESTION:
I'm curious about OpenID. While I agree that the idea of unified credentials is great, I have a few reservations. What is to prevent an OpenID provider from going crazy and holding the OpenID accounts they have hostage until you pay $n? If I decide I don't like the provider I'm with t... | [
"openid"
] | 11 | 15 | 1,329 | 7 | 0 | 2008-09-17T00:04:34.400000 | 2008-09-17T00:08:45.780000 |
78,536 | 78,612 | Deep cloning objects | I want to do something like: MyObject myObj = GetMyObj(); // Create and fill a new object MyObject newObj = myObj.Clone(); And then make changes to the new object that are not reflected in the original object. I don't often need this functionality, so when it's been necessary, I've resorted to creating a new object and... | Whereas one approach is to implement the ICloneable interface (described here, so I won't regurgitate), here's a nice deep clone object copier I found on The Code Project a while ago and incorporated it into our code. As mentioned elsewhere, it requires your objects to be serializable. using System; using System.IO; us... | Deep cloning objects I want to do something like: MyObject myObj = GetMyObj(); // Create and fill a new object MyObject newObj = myObj.Clone(); And then make changes to the new object that are not reflected in the original object. I don't often need this functionality, so when it's been necessary, I've resorted to crea... | TITLE:
Deep cloning objects
QUESTION:
I want to do something like: MyObject myObj = GetMyObj(); // Create and fill a new object MyObject newObj = myObj.Clone(); And then make changes to the new object that are not reflected in the original object. I don't often need this functionality, so when it's been necessary, I'v... | [
"c#",
".net",
"clone",
"deep-copy"
] | 2,638 | 1,922 | 1,020,107 | 59 | 0 | 2008-09-17T00:06:27.547000 | 2008-09-17T00:18:28.830000 |
78,548 | 746,011 | Passing data to Master Page in ASP.NET MVC | What is your way of passing data to Master Page (using ASP.NET MVC) without breaking MVC rules? Personally, I prefer to code abstract controller (base controller) or base class which is passed to all views. | If you prefer your views to have strongly typed view data classes this might work for you. Other solutions are probably more correct but this is a nice balance between design and practicality IMHO. The master page takes a strongly typed view data class containing only information relevant to it: public class MasterView... | Passing data to Master Page in ASP.NET MVC What is your way of passing data to Master Page (using ASP.NET MVC) without breaking MVC rules? Personally, I prefer to code abstract controller (base controller) or base class which is passed to all views. | TITLE:
Passing data to Master Page in ASP.NET MVC
QUESTION:
What is your way of passing data to Master Page (using ASP.NET MVC) without breaking MVC rules? Personally, I prefer to code abstract controller (base controller) or base class which is passed to all views.
ANSWER:
If you prefer your views to have strongly t... | [
"c#",
".net",
"asp.net",
"asp.net-mvc"
] | 102 | 77 | 35,764 | 9 | 0 | 2008-09-17T00:08:39.663000 | 2009-04-14T01:33:07.737000 |
78,570 | 78,573 | Which JavaScript library is recommended for neat UI effects? | I need a JavaScript library that supports Ajax as well as help me in making simple and neat animation effects in a website I am working on. Which library do you recommend? | I would definitely recommend JQuery as the easiest to use and the one which requires you to write the least code. http://jquery.com/ | Which JavaScript library is recommended for neat UI effects? I need a JavaScript library that supports Ajax as well as help me in making simple and neat animation effects in a website I am working on. Which library do you recommend? | TITLE:
Which JavaScript library is recommended for neat UI effects?
QUESTION:
I need a JavaScript library that supports Ajax as well as help me in making simple and neat animation effects in a website I am working on. Which library do you recommend?
ANSWER:
I would definitely recommend JQuery as the easiest to use an... | [
"html",
"javascript"
] | 2 | 9 | 1,306 | 11 | 0 | 2008-09-17T00:12:09.500000 | 2008-09-17T00:12:48.500000 |
78,586 | 90,318 | Create a calendar event on Palm OS | I've been googling for a while now, and can't figure out how to create an event in the calendar on a newer Palm OS device. Any ideas on how to do this? I'm guessing that I'll be creating a record in the calendar database, but the format of the data in that record, and which database to put it in, I don't know. | In Palm's later devices, they moved to an extended format for the PIM applications like Contacts and Calendar. This was done to allow better mapping between the device's databases and those used by Microsoft Outlook, but it meant that the format changed from the traditional format in the original PIMs. Palm has a PIM A... | Create a calendar event on Palm OS I've been googling for a while now, and can't figure out how to create an event in the calendar on a newer Palm OS device. Any ideas on how to do this? I'm guessing that I'll be creating a record in the calendar database, but the format of the data in that record, and which database t... | TITLE:
Create a calendar event on Palm OS
QUESTION:
I've been googling for a while now, and can't figure out how to create an event in the calendar on a newer Palm OS device. Any ideas on how to do this? I'm guessing that I'll be creating a record in the calendar database, but the format of the data in that record, an... | [
"palm-os",
"garnet-os"
] | 2 | 4 | 170 | 2 | 0 | 2008-09-17T00:13:56.593000 | 2008-09-18T05:36:50.943000 |
78,592 | 78,631 | What is a good equivalent to Perl lists in bash? | In perl one would simply do the following to store and iterate over a list of names my @fruit = (apple, orange, kiwi); foreach (@fruit) { print $_; } What would the equivalent be in bash? | bash (unlike POSIX sh) supports arrays: fruits=(apple orange kiwi "dried mango") for fruit in "${fruits[@]}"; do echo "${fruit}" done This has the advantage that array elements may contain spaces or other members of $IFS; as long as they were correctly inserted as separate elements, they are read out the same way. | What is a good equivalent to Perl lists in bash? In perl one would simply do the following to store and iterate over a list of names my @fruit = (apple, orange, kiwi); foreach (@fruit) { print $_; } What would the equivalent be in bash? | TITLE:
What is a good equivalent to Perl lists in bash?
QUESTION:
In perl one would simply do the following to store and iterate over a list of names my @fruit = (apple, orange, kiwi); foreach (@fruit) { print $_; } What would the equivalent be in bash?
ANSWER:
bash (unlike POSIX sh) supports arrays: fruits=(apple or... | [
"arrays",
"bash"
] | 24 | 45 | 21,152 | 4 | 0 | 2008-09-17T00:15:13.847000 | 2008-09-17T00:21:22.567000 |
78,619 | 78,681 | What is the fastest way to convert float to int on x86 | What is the fastest way you know to convert a floating-point number to an int on an x86 CPU. Preferrably in C or assembly (that can be in-lined in C) for any combination of the following: 32/64/80-bit float -> 32/64-bit integer I'm looking for some technique that is faster than to just let the compiler do it. | It depends on if you want a truncating conversion or a rounding one and at what precision. By default, C will perform a truncating conversion when you go from float to int. There are FPU instructions that do it but it's not an ANSI C conversion and there are significant caveats to using it (such as knowing the FPU roun... | What is the fastest way to convert float to int on x86 What is the fastest way you know to convert a floating-point number to an int on an x86 CPU. Preferrably in C or assembly (that can be in-lined in C) for any combination of the following: 32/64/80-bit float -> 32/64-bit integer I'm looking for some technique that i... | TITLE:
What is the fastest way to convert float to int on x86
QUESTION:
What is the fastest way you know to convert a floating-point number to an int on an x86 CPU. Preferrably in C or assembly (that can be in-lined in C) for any combination of the following: 32/64/80-bit float -> 32/64-bit integer I'm looking for som... | [
"c",
"optimization",
"x86",
"floating-point",
"assembly"
] | 26 | 18 | 30,829 | 10 | 0 | 2008-09-17T00:20:06.423000 | 2008-09-17T00:34:40.867000 |
78,626 | 78,646 | Is it stupid to write a large batch processing program entirely in PL/SQL? | I'm starting work on a program which is perhaps most naturally described as a batch of calculations on database tables, and will be executed once a month. All input is in Oracle database tables, and all output will be to Oracle database tables. The program should stay maintainable for many years to come. It seems strai... | Normally I say put as little in PL/SQL as possible - it is typically a lot less maintainable - at one of my last jobs I really saw how messy and hard to work with it could get. However, since it is batch processing - and since the input and output are both the DB - it makes good sense to put the logic into PL/SQL - to ... | Is it stupid to write a large batch processing program entirely in PL/SQL? I'm starting work on a program which is perhaps most naturally described as a batch of calculations on database tables, and will be executed once a month. All input is in Oracle database tables, and all output will be to Oracle database tables. ... | TITLE:
Is it stupid to write a large batch processing program entirely in PL/SQL?
QUESTION:
I'm starting work on a program which is perhaps most naturally described as a batch of calculations on database tables, and will be executed once a month. All input is in Oracle database tables, and all output will be to Oracle... | [
"oracle",
"plsql",
"batch-processing"
] | 3 | 3 | 5,440 | 11 | 0 | 2008-09-17T00:21:09.697000 | 2008-09-17T00:24:25.260000 |
78,669 | 78,701 | How do I enable Platform Builder mode in VS2008 | After installing VS2008, the platform builder mod, and the WM7 aku, VS usually prompts you, upon first startup, for your default mode. If you make a mistake and select something other than PB7, how do you get back into PB mode? I can get the device window, but it is always greyed out. I can also configure my normal con... | Go to the Tool menu and select "Import and Export Settings..." option. Then select "Reset all settings" in the Wizard. On the next screen you can save current settings. Then on the final screen, it should allow you to select which collection of settings you want to use. I don't have platform builder but hopefully that ... | How do I enable Platform Builder mode in VS2008 After installing VS2008, the platform builder mod, and the WM7 aku, VS usually prompts you, upon first startup, for your default mode. If you make a mistake and select something other than PB7, how do you get back into PB mode? I can get the device window, but it is alway... | TITLE:
How do I enable Platform Builder mode in VS2008
QUESTION:
After installing VS2008, the platform builder mod, and the WM7 aku, VS usually prompts you, upon first startup, for your default mode. If you make a mistake and select something other than PB7, how do you get back into PB mode? I can get the device windo... | [
"visual-studio",
"visual-studio-2008",
"windows-mobile",
"smartphone",
"platform-builder"
] | 3 | 4 | 5,812 | 2 | 0 | 2008-09-17T00:30:29.830000 | 2008-09-17T00:40:17.153000 |
78,696 | 78,707 | Vista UAC, Access Elevation and .Net | I'm trying to find out if there is any way to elevate a specific function within an application. For example, I have an app with system and user settings that are stored in the registry, I only need elevation for when the system settings need to be changed. Unfortunately all of the info I've come across talks about onl... | What you really need to do is store your settings the Application Data folder. | Vista UAC, Access Elevation and .Net I'm trying to find out if there is any way to elevate a specific function within an application. For example, I have an app with system and user settings that are stored in the registry, I only need elevation for when the system settings need to be changed. Unfortunately all of the ... | TITLE:
Vista UAC, Access Elevation and .Net
QUESTION:
I'm trying to find out if there is any way to elevate a specific function within an application. For example, I have an app with system and user settings that are stored in the registry, I only need elevation for when the system settings need to be changed. Unfortu... | [
".net",
"uac",
"elevation"
] | 5 | 2 | 4,684 | 6 | 0 | 2008-09-17T00:38:23.167000 | 2008-09-17T00:41:53.237000 |
78,703 | 792,025 | Javascript framework calendar plugin | Does any know of a good calendar (not datepicker, but a BIG browsable calendar) plugin for one of the major javascript frameworks. I'd prefer jQuery. | just published a new open source project (jQuery plugin). sounds exactly like what you want: FullCalendar Hope it works well for you! | Javascript framework calendar plugin Does any know of a good calendar (not datepicker, but a BIG browsable calendar) plugin for one of the major javascript frameworks. I'd prefer jQuery. | TITLE:
Javascript framework calendar plugin
QUESTION:
Does any know of a good calendar (not datepicker, but a BIG browsable calendar) plugin for one of the major javascript frameworks. I'd prefer jQuery.
ANSWER:
just published a new open source project (jQuery plugin). sounds exactly like what you want: FullCalendar ... | [
"javascript",
"jquery",
"calendar"
] | 42 | 51 | 28,161 | 9 | 0 | 2008-09-17T00:40:58.573000 | 2009-04-27T01:51:35.947000 |
78,716 | 78,920 | Is XSLT worth it? | A while ago, I started on a project where I designed a html-esque XML schema so that authors could write their content (educational course material) in a simplified format which would then be transformed into HTML via XSLT. I played around (struggled) with it for a while and got it to a very basic level but then was to... | Advantages of XSLT: Domain-specific to XML, so for example no need to quote literal XML in the output. Supports XPath/XQuery, which can be a nice way to query DOMs, in the same way that regular expressions can be a nice way to query strings. Functional language. Disadvantages of XSLT: Can be obscenely verbose - you don... | Is XSLT worth it? A while ago, I started on a project where I designed a html-esque XML schema so that authors could write their content (educational course material) in a simplified format which would then be transformed into HTML via XSLT. I played around (struggled) with it for a while and got it to a very basic lev... | TITLE:
Is XSLT worth it?
QUESTION:
A while ago, I started on a project where I designed a html-esque XML schema so that authors could write their content (educational course material) in a simplified format which would then be transformed into HTML via XSLT. I played around (struggled) with it for a while and got it t... | [
"html",
"xml",
"xslt",
"xml-parsing"
] | 116 | 65 | 34,704 | 41 | 0 | 2008-09-17T00:43:50.687000 | 2008-09-17T01:26:23.847000 |
78,717 | 79,071 | "foreach values" macro in gcc & cpp | I have a 'foreach' macro I use frequently in C++ that works for most STL containers: #define foreach(var, container) \ for(typeof((container).begin()) var = (container).begin(); \ var!= (container).end(); \ ++var) (Note that 'typeof' is a gcc extension.) It is used like this: std::vector< Blorgus > blorgi =...; foreach... | You can do this using two loops. The first declares the iterator, with a name which is a function of the container variable (and you can make this uglier if you're worried about conflicts with your own code). The second declares the value variable. #define ci(container) container ## iter #define foreach_value(var, cont... | "foreach values" macro in gcc & cpp I have a 'foreach' macro I use frequently in C++ that works for most STL containers: #define foreach(var, container) \ for(typeof((container).begin()) var = (container).begin(); \ var!= (container).end(); \ ++var) (Note that 'typeof' is a gcc extension.) It is used like this: std::ve... | TITLE:
"foreach values" macro in gcc & cpp
QUESTION:
I have a 'foreach' macro I use frequently in C++ that works for most STL containers: #define foreach(var, container) \ for(typeof((container).begin()) var = (container).begin(); \ var!= (container).end(); \ ++var) (Note that 'typeof' is a gcc extension.) It is used ... | [
"c++",
"gcc"
] | 13 | 5 | 9,412 | 11 | 0 | 2008-09-17T00:43:53.090000 | 2008-09-17T01:48:56.443000 |
78,723 | 79,169 | How to test function call order | Considering such code: class ToBeTested { public: void doForEach() { for (vector::iterator it = m_contained.begin(); it!= m_contained.end(); it++) { doOnce(*it); doTwice(*it); doTwice(*it); } } void doOnce(Contained & c) { // do something } void doTwice(Contained & c) { // do something }
// other methods private: vect... | If you're interested in performance, I recommend that you write a test that measures performance. Check the current time, run the method you're concerned about, then check the time again. Assert that the total time taken is less than some value. The problem with check that methods are called in a certain order is that ... | How to test function call order Considering such code: class ToBeTested { public: void doForEach() { for (vector::iterator it = m_contained.begin(); it!= m_contained.end(); it++) { doOnce(*it); doTwice(*it); doTwice(*it); } } void doOnce(Contained & c) { // do something } void doTwice(Contained & c) { // do something }... | TITLE:
How to test function call order
QUESTION:
Considering such code: class ToBeTested { public: void doForEach() { for (vector::iterator it = m_contained.begin(); it!= m_contained.end(); it++) { doOnce(*it); doTwice(*it); doTwice(*it); } } void doOnce(Contained & c) { // do something } void doTwice(Contained & c) {... | [
"c++",
"unit-testing",
"tdd"
] | 3 | 1 | 2,646 | 7 | 0 | 2008-09-17T00:45:22.993000 | 2008-09-17T02:05:36.497000 |
78,731 | 78,777 | SQL Server Express 64 bit prerequisite to include in setup deployment project | Where can I obtain the SQL Server Express 64 bit prerequisite to include in a Visual Studio 2008 setup deployment project. The prerequisite that comes with Visual Studio 2008 is 32 bit only. | Looks like there is no SQL Express x64 based on this post and it also says on the express download page that it runs in WOW. However, SQL Server Express 2008 does come in a x64 version. | SQL Server Express 64 bit prerequisite to include in setup deployment project Where can I obtain the SQL Server Express 64 bit prerequisite to include in a Visual Studio 2008 setup deployment project. The prerequisite that comes with Visual Studio 2008 is 32 bit only. | TITLE:
SQL Server Express 64 bit prerequisite to include in setup deployment project
QUESTION:
Where can I obtain the SQL Server Express 64 bit prerequisite to include in a Visual Studio 2008 setup deployment project. The prerequisite that comes with Visual Studio 2008 is 32 bit only.
ANSWER:
Looks like there is no S... | [
"sql-server"
] | 0 | 1 | 1,369 | 1 | 0 | 2008-09-17T00:47:07.310000 | 2008-09-17T00:58:51.790000 |
78,752 | 78,768 | What are some techniques for stored database keys in URL | I have read that using database keys in a URL is a bad thing to do. For instance, My table has 3 fields: ID:int, Title:nvarchar(5), Description:Text I want to create a page that displays a record. Something like... http://server/viewitem.aspx?id=1234 First off, could someone elaborate on why this is a bad thing to do? ... | I think it's perfectly reasonable to use primary keys in the URL. Some considerations, however: 1) Avoid SQL injection attacks. If you just blindly accept the value of the id URL parameter and pass it into the DB, you are at risk. Make sure you sanitise the input so that it matches whatever format of key you have (e.g.... | What are some techniques for stored database keys in URL I have read that using database keys in a URL is a bad thing to do. For instance, My table has 3 fields: ID:int, Title:nvarchar(5), Description:Text I want to create a page that displays a record. Something like... http://server/viewitem.aspx?id=1234 First off, c... | TITLE:
What are some techniques for stored database keys in URL
QUESTION:
I have read that using database keys in a URL is a bad thing to do. For instance, My table has 3 fields: ID:int, Title:nvarchar(5), Description:Text I want to create a page that displays a record. Something like... http://server/viewitem.aspx?id... | [
"database"
] | 4 | 4 | 512 | 9 | 0 | 2008-09-17T00:52:53.083000 | 2008-09-17T00:56:56.570000 |
78,757 | 79,635 | Make a Query in MS Access default to landscape when printed | How can I programmatically make a query in MS Access default to landscape when printed, specifically when viewing it as a PivotChart? I'm currently attempting this in MS Access 2003, but would like to see a solution for any version. | The following function should do the trick: Function SetLandscape() Application.Printer.Orientation = acPRORLandscape End Function Should be able to call this from the autoexec function to ensure it always runs. | Make a Query in MS Access default to landscape when printed How can I programmatically make a query in MS Access default to landscape when printed, specifically when viewing it as a PivotChart? I'm currently attempting this in MS Access 2003, but would like to see a solution for any version. | TITLE:
Make a Query in MS Access default to landscape when printed
QUESTION:
How can I programmatically make a query in MS Access default to landscape when printed, specifically when viewing it as a PivotChart? I'm currently attempting this in MS Access 2003, but would like to see a solution for any version.
ANSWER:
... | [
"vba",
"database",
"ms-access",
"printing"
] | 1 | 3 | 3,216 | 2 | 0 | 2008-09-17T00:55:01.533000 | 2008-09-17T03:26:01.187000 |
78,799 | 78,858 | Is there a benefit to defining a class inside another class in Python? | What I'm talking about here are nested classes. Essentially, I have two classes that I'm modeling. A DownloadManager class and a DownloadThread class. The obvious OOP concept here is composition. However, composition doesn't necessarily mean nesting, right? I have code that looks something like this: class DownloadThre... | You might want to do this when the "inner" class is a one-off, which will never be used outside the definition of the outer class. For example to use a metaclass, it's sometimes handy to do class Foo(object): class __metaclass__(type):.... instead of defining a metaclass separately, if you're only using it once. The on... | Is there a benefit to defining a class inside another class in Python? What I'm talking about here are nested classes. Essentially, I have two classes that I'm modeling. A DownloadManager class and a DownloadThread class. The obvious OOP concept here is composition. However, composition doesn't necessarily mean nesting... | TITLE:
Is there a benefit to defining a class inside another class in Python?
QUESTION:
What I'm talking about here are nested classes. Essentially, I have two classes that I'm modeling. A DownloadManager class and a DownloadThread class. The obvious OOP concept here is composition. However, composition doesn't necess... | [
"python",
"oop"
] | 154 | 174 | 122,655 | 7 | 0 | 2008-09-17T01:02:31.157000 | 2008-09-17T01:12:59.480000 |
78,801 | 95,255 | SQLite3::BusyException | Running a rails site right now using SQLite3. About once every 500 requests or so, I get a ActiveRecord::StatementInvalid (SQLite3::BusyException: database is locked:... What's the way to fix this that would be minimally invasive to my code? I'm using SQLLite at the moment because you can store the DB in source control... | By default, sqlite returns immediatly with a blocked, busy error if the database is busy and locked. You can ask for it to wait and keep trying for a while before giving up. This usually fixes the problem, unless you do have 1000s of threads accessing your db, when I agree sqlite would be inappropriate. // set SQLite t... | SQLite3::BusyException Running a rails site right now using SQLite3. About once every 500 requests or so, I get a ActiveRecord::StatementInvalid (SQLite3::BusyException: database is locked:... What's the way to fix this that would be minimally invasive to my code? I'm using SQLLite at the moment because you can store t... | TITLE:
SQLite3::BusyException
QUESTION:
Running a rails site right now using SQLite3. About once every 500 requests or so, I get a ActiveRecord::StatementInvalid (SQLite3::BusyException: database is locked:... What's the way to fix this that would be minimally invasive to my code? I'm using SQLLite at the moment becau... | [
"ruby-on-rails",
"ruby",
"database",
"sqlite"
] | 38 | 9 | 28,105 | 16 | 0 | 2008-09-17T01:02:39.067000 | 2008-09-18T18:21:29.607000 |
78,806 | 78,844 | Refactor Mercilessly or Build One To Throw Away? | Where a new system concept or new technology is used, one has to build a system to throw away, for even the best planning is not so omniscient as to get it right the first time. Hence plan to throw one away; you will, anyhow. -- Fred Brooks, The Mythical Man-Month [Emphasis mine] Build one to throw away. That's what th... | If you're doing test-driven development, you can refactor your way out of almost any trouble. I've changed major design decisions without much trouble, and rescued decade-old codebases. The only exception is when you've discovered that your architecture is completely wrong from beginning to end. For example, if you wro... | Refactor Mercilessly or Build One To Throw Away? Where a new system concept or new technology is used, one has to build a system to throw away, for even the best planning is not so omniscient as to get it right the first time. Hence plan to throw one away; you will, anyhow. -- Fred Brooks, The Mythical Man-Month [Empha... | TITLE:
Refactor Mercilessly or Build One To Throw Away?
QUESTION:
Where a new system concept or new technology is used, one has to build a system to throw away, for even the best planning is not so omniscient as to get it right the first time. Hence plan to throw one away; you will, anyhow. -- Fred Brooks, The Mythica... | [
"refactoring"
] | 25 | 13 | 4,799 | 14 | 0 | 2008-09-17T01:03:41.450000 | 2008-09-17T01:10:05.010000 |
78,816 | 79,047 | Generate LINQ query from multiple controls | I have recently written an application(vb.net) that stores and allows searching for old council plans. Now while the application works well, the other day I was having a look at the routine that I use to generate the SQL string to pass the database and frankly, it was bad. I was just posting a question here to see if a... | When programming complex ad-hoc query type things, attributes can be your best friend. Take a more declarative approach and decorate your classes, interfaces, and/or properties with some custom attributes, then write some generic "glue" code that binds your UI to your model. This will allow your model and presentation ... | Generate LINQ query from multiple controls I have recently written an application(vb.net) that stores and allows searching for old council plans. Now while the application works well, the other day I was having a look at the routine that I use to generate the SQL string to pass the database and frankly, it was bad. I w... | TITLE:
Generate LINQ query from multiple controls
QUESTION:
I have recently written an application(vb.net) that stores and allows searching for old council plans. Now while the application works well, the other day I was having a look at the routine that I use to generate the SQL string to pass the database and frankl... | [
"sql",
"linq"
] | 1 | 0 | 872 | 7 | 0 | 2008-09-17T01:05:03.787000 | 2008-09-17T01:45:08.450000 |
78,823 | 84,718 | Best way to differentiate MVC Controllers based on HTTP headers | Problem My current project requires me to do different things based on different HTTP request headers for nearly every action. Currently, I have one massive Controller (all for the same resource type), and every action method has an ActionName attribute (so that I can have multiple versions of the same action that take... | It sounds like you have slightly different behavior from your actions based on which header comes in. I would try to isolate the differences as much as possible. For example, if the application logic is the same, but the only difference is how you render the response to the user, you might consider writing a custom Act... | Best way to differentiate MVC Controllers based on HTTP headers Problem My current project requires me to do different things based on different HTTP request headers for nearly every action. Currently, I have one massive Controller (all for the same resource type), and every action method has an ActionName attribute (s... | TITLE:
Best way to differentiate MVC Controllers based on HTTP headers
QUESTION:
Problem My current project requires me to do different things based on different HTTP request headers for nearly every action. Currently, I have one massive Controller (all for the same resource type), and every action method has an Actio... | [
".net",
"asp.net",
"asp.net-mvc",
"routes"
] | 3 | 4 | 890 | 4 | 0 | 2008-09-17T01:06:17.577000 | 2008-09-17T15:48:18.970000 |
78,826 | 1,740,065 | How to multicast using gen_udp in Erlang? | How do you use gen_udp in Erlang to do multicasting? I know its in the code, there is just no documentation behind it. Sending out data is obvious and simple. I was wondering on how to add memberships. Not only adding memberships at start-up, but adding memberships while running would be useful too. | Here is example code on how to listen in on Bonjour / Zeroconf traffic. -module(zcclient).
-export([open/2,start/0]). -export([stop/1,receiver/0]).
open(Addr,Port) -> {ok,S} = gen_udp:open(Port,[{reuseaddr,true}, {ip,Addr}, {multicast_ttl,4}, {multicast_loop,false}, binary]), inet:setopts(S,[{add_membership,{Addr,{0,... | How to multicast using gen_udp in Erlang? How do you use gen_udp in Erlang to do multicasting? I know its in the code, there is just no documentation behind it. Sending out data is obvious and simple. I was wondering on how to add memberships. Not only adding memberships at start-up, but adding memberships while runnin... | TITLE:
How to multicast using gen_udp in Erlang?
QUESTION:
How do you use gen_udp in Erlang to do multicasting? I know its in the code, there is just no documentation behind it. Sending out data is obvious and simple. I was wondering on how to add memberships. Not only adding memberships at start-up, but adding member... | [
"networking",
"erlang",
"multicast"
] | 18 | 15 | 5,715 | 4 | 0 | 2008-09-17T01:06:59.587000 | 2009-11-16T04:36:03.823000 |
78,847 | 79,239 | How to retrieve a changed value of databound textbox within datagrid | ASP.NET 1.1 - I have a DataGrid on an ASPX page that is databound and displays a value within a textbox. The user is able to change this value, then click on a button where the code behind basically iterates through each DataGridItem in the grid, does a FindControl for the ID of the textbox then assigns the.Text value ... | So the code sample is from your button click event? Are you sure you are not rebinding your datasource on postback? | How to retrieve a changed value of databound textbox within datagrid ASP.NET 1.1 - I have a DataGrid on an ASPX page that is databound and displays a value within a textbox. The user is able to change this value, then click on a button where the code behind basically iterates through each DataGridItem in the grid, does... | TITLE:
How to retrieve a changed value of databound textbox within datagrid
QUESTION:
ASP.NET 1.1 - I have a DataGrid on an ASPX page that is databound and displays a value within a textbox. The user is able to change this value, then click on a button where the code behind basically iterates through each DataGridItem... | [
"c#",
"asp.net",
"datagrid",
"textbox"
] | 2 | 0 | 3,719 | 2 | 0 | 2008-09-17T01:10:50.200000 | 2008-09-17T02:22:11.997000 |
78,849 | 85,391 | Best way to get the color where a mouse was clicked in AS3 | I have an image (mx) and i want to get the uint of the pixel that was clicked. Any ideas? | Here's an even simpler implementation. All you do is take a snapshot of the stage using the draw() method of bitmapData, then use getPixel() on the pixel under the mouse. The advantage of this is that you can sample anything that's been drawn to the stage, not just a given bitmap. import flash.display.Bitmap; import fl... | Best way to get the color where a mouse was clicked in AS3 I have an image (mx) and i want to get the uint of the pixel that was clicked. Any ideas? | TITLE:
Best way to get the color where a mouse was clicked in AS3
QUESTION:
I have an image (mx) and i want to get the uint of the pixel that was clicked. Any ideas?
ANSWER:
Here's an even simpler implementation. All you do is take a snapshot of the stage using the draw() method of bitmapData, then use getPixel() on ... | [
"apache-flex",
"flash",
"actionscript-3"
] | 10 | 8 | 14,533 | 3 | 0 | 2008-09-17T01:11:08.127000 | 2008-09-17T17:02:20.837000 |
78,850 | 79,017 | Publishing vs Copying | What is the difference between publishing a website with visual studio and just copying the files over to the server? Is the only difference that the publish files are pre-compiled? | There is not much difference between "publish", and copying the files. Publish appears in a webapplication. The only difference really is publishing gives you the option to only include html and dll's, where as copying you would need to parse out source code manually. There is no full precompiling in the publish option... | Publishing vs Copying What is the difference between publishing a website with visual studio and just copying the files over to the server? Is the only difference that the publish files are pre-compiled? | TITLE:
Publishing vs Copying
QUESTION:
What is the difference between publishing a website with visual studio and just copying the files over to the server? Is the only difference that the publish files are pre-compiled?
ANSWER:
There is not much difference between "publish", and copying the files. Publish appears in... | [
"asp.net",
"visual-studio"
] | 4 | 3 | 434 | 2 | 0 | 2008-09-17T01:11:16.533000 | 2008-09-17T01:42:04.713000 |
78,859 | 78,887 | Which IDE should I use for developing custom code for InfoPath Forms, VSTA or VSTO? | I am new to developing for Office Forms Server / MOSS 2007. I have to choose between designing my web-based forms and writing code for them in Visual Studio Tools for Applications (aka VSTA) or Visual Studio Tools for Office (aka VSTO). VSTA is included free as part of the license for InfoPath 2007; VSTO, also free, re... | This explains it better than I can: http://blogs.msdn.com/andreww/archive/2006/02/21/536179.aspx Given the fact that the license for VSTA comes with InfoPath, I'd probably run with that. | Which IDE should I use for developing custom code for InfoPath Forms, VSTA or VSTO? I am new to developing for Office Forms Server / MOSS 2007. I have to choose between designing my web-based forms and writing code for them in Visual Studio Tools for Applications (aka VSTA) or Visual Studio Tools for Office (aka VSTO).... | TITLE:
Which IDE should I use for developing custom code for InfoPath Forms, VSTA or VSTO?
QUESTION:
I am new to developing for Office Forms Server / MOSS 2007. I have to choose between designing my web-based forms and writing code for them in Visual Studio Tools for Applications (aka VSTA) or Visual Studio Tools for ... | [
"ms-office",
"vsto",
"infopath",
"vsta"
] | 1 | 2 | 978 | 2 | 0 | 2008-09-17T01:13:06.997000 | 2008-09-17T01:19:08.747000 |
78,869 | 78,889 | Are Java code signing certificates the same as SSL certificates? | I'm looking around for a Java code signing certificate so my Java applets don't throw up such scary security warnings. However, all the places I've found offering them charge (in my opinion) way too much, like over USD200 per year. While doing research, a code signing certificate seems almost exactly the same as an SSL... | Short answer: No, they're different. Long answer: It's the same sort of certificate and it uses the same crypto software, but the certificate has flags indicating what it is allowed to be used for. Code signing and web server are different uses. | Are Java code signing certificates the same as SSL certificates? I'm looking around for a Java code signing certificate so my Java applets don't throw up such scary security warnings. However, all the places I've found offering them charge (in my opinion) way too much, like over USD200 per year. While doing research, a... | TITLE:
Are Java code signing certificates the same as SSL certificates?
QUESTION:
I'm looking around for a Java code signing certificate so my Java applets don't throw up such scary security warnings. However, all the places I've found offering them charge (in my opinion) way too much, like over USD200 per year. While... | [
"java",
"ssl",
"certificate",
"code-signing"
] | 40 | 39 | 19,207 | 4 | 0 | 2008-09-17T01:14:48.647000 | 2008-09-17T01:19:21.633000 |
78,884 | 80,522 | How do I format text in between xsl:text tags? | I have an xslt sheet with some text similar to below: I am some text, and I want to be bold I would like some text to be bold, but this doesn't work. I am some text, and I want to be bold The deprecated b tag doesn't work either. How do I format text within an xsl:text tag? | You don't. xsl:text can only contain text nodes and is an element node, not a string that starts with less-than character; XSLT is about creating node trees, not markup. So, you have to do I am some text, and I want to be bold | How do I format text in between xsl:text tags? I have an xslt sheet with some text similar to below: I am some text, and I want to be bold I would like some text to be bold, but this doesn't work. I am some text, and I want to be bold The deprecated b tag doesn't work either. How do I format text within an xsl:text tag... | TITLE:
How do I format text in between xsl:text tags?
QUESTION:
I have an xslt sheet with some text similar to below: I am some text, and I want to be bold I would like some text to be bold, but this doesn't work. I am some text, and I want to be bold The deprecated b tag doesn't work either. How do I format text with... | [
"xslt",
"formatting"
] | 5 | 7 | 37,879 | 5 | 0 | 2008-09-17T01:18:24.193000 | 2008-09-17T06:25:08.760000 |
78,900 | 78,990 | How to check for memory leaks in Guile extension modules? | I develop an extension module for Guile, written in C. This extension module embeds a Python interpreter. Since this extension module invokes the Python interpreter, I need to verify that it properly manages the memory occupied by Python objects. I found that the Python interpreter is well-behaved in its own memory han... | You've got a couple options. One is to write a supressions file for valgrind that turns off reporting of stuff that you're not working on. Python has such a file, for example: http://svn.python.org/projects/python/trunk/Misc/valgrind-python.supp If valgrind doesn't like your setup, another possibility is using libmudfl... | How to check for memory leaks in Guile extension modules? I develop an extension module for Guile, written in C. This extension module embeds a Python interpreter. Since this extension module invokes the Python interpreter, I need to verify that it properly manages the memory occupied by Python objects. I found that th... | TITLE:
How to check for memory leaks in Guile extension modules?
QUESTION:
I develop an extension module for Guile, written in C. This extension module embeds a Python interpreter. Since this extension module invokes the Python interpreter, I need to verify that it properly manages the memory occupied by Python object... | [
"python",
"memory-leaks",
"valgrind",
"guile"
] | 8 | 8 | 445 | 1 | 0 | 2008-09-17T01:22:56.133000 | 2008-09-17T01:38:24.580000 |
78,905 | 677,241 | How do I make a component in Joomla display as an article? | More specifically I am trying to make the mailto component show within my template; the same way as an article does. By default the mailto component opens in a new window. So far I changed the code so it opens on the same window, but that way the whole template is gone. Any suggestions? | use "component as content" plugin http://extensions.joomla.org/extensions/core-enhancements/embed-&-include/5947/details | How do I make a component in Joomla display as an article? More specifically I am trying to make the mailto component show within my template; the same way as an article does. By default the mailto component opens in a new window. So far I changed the code so it opens on the same window, but that way the whole template... | TITLE:
How do I make a component in Joomla display as an article?
QUESTION:
More specifically I am trying to make the mailto component show within my template; the same way as an article does. By default the mailto component opens in a new window. So far I changed the code so it opens on the same window, but that way ... | [
"joomla",
"components",
"mailto",
"joomla-article"
] | 0 | 1 | 42,163 | 3 | 0 | 2008-09-17T01:23:40.280000 | 2009-03-24T12:54:29.163000 |
78,909 | 78,929 | Cross-browser JavaScript debugging | I have a few scripts on a site I recently started maintaining. I get those Object Not Found errors in IE6 (which Firefox fails to report in its Error Console?). What's the best way to debug these- any good cross-browser-compatible IDEs, or javascript debugging libraries of some sort? | There's no cross-browser JS debugger that I know of (because most browsers use different JS engines). For firefox, I'd definitely recommend firebug ( http://www.getfirebug.com ) For IE, the best I've found is Microsoft Script Debugger ( http://www.microsoft.com/downloads/details.aspx?familyid=2f465be0-94fd-4569-b3c4-df... | Cross-browser JavaScript debugging I have a few scripts on a site I recently started maintaining. I get those Object Not Found errors in IE6 (which Firefox fails to report in its Error Console?). What's the best way to debug these- any good cross-browser-compatible IDEs, or javascript debugging libraries of some sort? | TITLE:
Cross-browser JavaScript debugging
QUESTION:
I have a few scripts on a site I recently started maintaining. I get those Object Not Found errors in IE6 (which Firefox fails to report in its Error Console?). What's the best way to debug these- any good cross-browser-compatible IDEs, or javascript debugging librar... | [
"javascript"
] | 1 | 3 | 703 | 10 | 0 | 2008-09-17T01:24:17.783000 | 2008-09-17T01:27:33.453000 |
78,913 | 78,936 | Single most effective practice to prevent arithmetic overflow and underflow | What is the single most effective practice to prevent arithmetic overflow and underflow? Some examples that come to mind are: testing based on valid input ranges validation using formal methods use of invariants detection at runtime using language features or libraries (this does not prevent it) | One possibility is to use a language that has arbitrarily sized integers that never overflow / underflow. Otherwise, if this is something you're really concerned about, and if your language allows it, write a wrapper class that acts like an integer, but checks every operation for overflow. You could even have it do the... | Single most effective practice to prevent arithmetic overflow and underflow What is the single most effective practice to prevent arithmetic overflow and underflow? Some examples that come to mind are: testing based on valid input ranges validation using formal methods use of invariants detection at runtime using langu... | TITLE:
Single most effective practice to prevent arithmetic overflow and underflow
QUESTION:
What is the single most effective practice to prevent arithmetic overflow and underflow? Some examples that come to mind are: testing based on valid input ranges validation using formal methods use of invariants detection at r... | [
"language-agnostic",
"numbers",
"overflow",
"math"
] | 1 | 3 | 3,782 | 7 | 0 | 2008-09-17T01:25:10.883000 | 2008-09-17T01:28:33.577000 |
78,932 | 78,945 | How do I programmatically set the value of a select box element using JavaScript? | I have the following HTML element: Annual Leave Medical Leave Long Service Leave Without Pay Using a JavaScript function with the leaveCode number as a parameter, how do I select the appropriate option in the list? | You can use this function: function selectElement(id, valueToSelect) { let element = document.getElementById(id); element.value = valueToSelect; }
selectElement('leaveCode', '11'); Annual Leave Medical Leave Long Service Leave Without Pay Optionally if you want to trigger onchange event also, you can use: element.disp... | How do I programmatically set the value of a select box element using JavaScript? I have the following HTML element: Annual Leave Medical Leave Long Service Leave Without Pay Using a JavaScript function with the leaveCode number as a parameter, how do I select the appropriate option in the list? | TITLE:
How do I programmatically set the value of a select box element using JavaScript?
QUESTION:
I have the following HTML element: Annual Leave Medical Leave Long Service Leave Without Pay Using a JavaScript function with the leaveCode number as a parameter, how do I select the appropriate option in the list?
ANSW... | [
"javascript",
"html",
"dom"
] | 621 | 777 | 1,405,202 | 17 | 0 | 2008-09-17T01:28:04.513000 | 2008-09-17T01:31:38.607000 |
78,952 | 99,113 | Oracle ASP.net Provider-model objects performance | Oracle 11g version of ODP.Net introduces the provider model objects (session state provider, identity provider etc) which lets the application to store these information in an oracle DB without writing custom provider implementation. Has anyone has done any performance benchmarking on these objects? how do they compare... | I would recommend you download a copy of Reflector and compare the codebases for the SQL Server and Oracle providers (They shouldn't be that complicated.) I'm going to guess that they're going to look almost identical and perform (from a.NET runtime perspective) similarly. Whether the Oracle backend is any faster...tha... | Oracle ASP.net Provider-model objects performance Oracle 11g version of ODP.Net introduces the provider model objects (session state provider, identity provider etc) which lets the application to store these information in an oracle DB without writing custom provider implementation. Has anyone has done any performance ... | TITLE:
Oracle ASP.net Provider-model objects performance
QUESTION:
Oracle 11g version of ODP.Net introduces the provider model objects (session state provider, identity provider etc) which lets the application to store these information in an oracle DB without writing custom provider implementation. Has anyone has don... | [
"asp.net",
"oracle",
"oracle11g",
"provider"
] | 0 | 1 | 777 | 1 | 0 | 2008-09-17T01:32:49.603000 | 2008-09-19T02:57:28.947000 |
78,974 | 3,258,564 | How to set the output cache directive on custom controls with no code in front | I've written a control that inherits from the System.Web.UI.WebControls.DropDownList and so I don't have any code in front for this control, but I still want to set the OutputCache directive. I there any way to set this in the C# code, say with an attribute or something like that? I'm particularly hoping to be able to ... | I realize this is an incredibly old question but it is still worthy of an answer. What you are talking about isn't a User Control it is a Custom Control. What you want to do with the OutputCache can be done simply with the Context Cache. In your code where you are getting the data and binding to your DropDownList do so... | How to set the output cache directive on custom controls with no code in front I've written a control that inherits from the System.Web.UI.WebControls.DropDownList and so I don't have any code in front for this control, but I still want to set the OutputCache directive. I there any way to set this in the C# code, say w... | TITLE:
How to set the output cache directive on custom controls with no code in front
QUESTION:
I've written a control that inherits from the System.Web.UI.WebControls.DropDownList and so I don't have any code in front for this control, but I still want to set the OutputCache directive. I there any way to set this in ... | [
"c#",
"asp.net",
"caching",
"outputcache"
] | 0 | 2 | 1,290 | 2 | 0 | 2008-09-17T01:35:20.783000 | 2010-07-15T18:14:40.667000 |
78,978 | 79,079 | Regex for Specific Tag | I'm working on a regular expression in a.NET project to get a specific tag. I would like to match the entire DIV tag and its contents: Test The first paragraph. The Store paragraph Code: Regex re = new Regex("(.*? )", RegexOptions.Multiline);
if (re.IsMatch(test)) Console.WriteLine("it matches"); else Console.WriteLin... | Out-of-the-box, without special modifiers, most regex implementations don't go beyond the end-of-line to match text. You probably should look in the documentation of the regex engine you're using for such modifier. I have one other advice: beware of greed! Traditionally, regex are greedy which means that your regex wou... | Regex for Specific Tag I'm working on a regular expression in a.NET project to get a specific tag. I would like to match the entire DIV tag and its contents: Test The first paragraph. The Store paragraph Code: Regex re = new Regex("(.*? )", RegexOptions.Multiline);
if (re.IsMatch(test)) Console.WriteLine("it matches")... | TITLE:
Regex for Specific Tag
QUESTION:
I'm working on a regular expression in a.NET project to get a specific tag. I would like to match the entire DIV tag and its contents: Test The first paragraph. The Store paragraph Code: Regex re = new Regex("(.*? )", RegexOptions.Multiline);
if (re.IsMatch(test)) Console.Write... | [
".net",
"regex"
] | 2 | 1 | 2,774 | 11 | 0 | 2008-09-17T01:35:40.750000 | 2008-09-17T01:50:27.203000 |
78,983 | 79,495 | What are the best practices for moving between version control systems? | There are about 200 projects in cvs and at least 100 projects in vss. Some are inactive code in maintenance mode. Some are legacy apps. Some are old apps no longer in use. About 10% are in active development. The plan is to move everything to perforce my end of year 2009. Has anyone done a large migration like this? Ha... | On the VSS side, there are conversion tools that are available to help with migration. They can mostly maintain version history (there are caveats that are explained in the readme and docs). I have migrated well over 50 VSS projcts into perforce using the VSS to perforce tool. Getting the data out of VSS can be a bit f... | What are the best practices for moving between version control systems? There are about 200 projects in cvs and at least 100 projects in vss. Some are inactive code in maintenance mode. Some are legacy apps. Some are old apps no longer in use. About 10% are in active development. The plan is to move everything to perfo... | TITLE:
What are the best practices for moving between version control systems?
QUESTION:
There are about 200 projects in cvs and at least 100 projects in vss. Some are inactive code in maintenance mode. Some are legacy apps. Some are old apps no longer in use. About 10% are in active development. The plan is to move e... | [
"version-control",
"cvs",
"perforce"
] | 4 | 5 | 1,282 | 6 | 0 | 2008-09-17T01:37:05.397000 | 2008-09-17T02:59:59.347000 |
78,984 | 79,208 | Database Authentication for Intranet Applications | I am looking for a best practice for End to End Authentication for internal Web Applications to the Database layer. The most common scenario I have seen is to use a single SQL account with the permissions set to what is required by the application. This account is used by all application calls. Then when people require... | Dale - That's it exactly. If you want to provide access to the underlying data store to those users then do it via services. And in my experience, it is those experienced computer users coming out of Uni/College that damage things the most. As the saying goes, they know just enough to be dangerous. If they want to auto... | Database Authentication for Intranet Applications I am looking for a best practice for End to End Authentication for internal Web Applications to the Database layer. The most common scenario I have seen is to use a single SQL account with the permissions set to what is required by the application. This account is used ... | TITLE:
Database Authentication for Intranet Applications
QUESTION:
I am looking for a best practice for End to End Authentication for internal Web Applications to the Database layer. The most common scenario I have seen is to use a single SQL account with the permissions set to what is required by the application. Thi... | [
"asp.net",
"sql",
"nhibernate"
] | 2 | 2 | 346 | 5 | 0 | 2008-09-17T01:37:09.250000 | 2008-09-17T02:16:50.777000 |
79,002 | 79,038 | What Java versions does Griffon support? | I want to write a Swing application in Griffon but I am not sure what versions of Java I can support. | According to the Griffon website, 1.5 or higher. http://groovy.codehaus.org/Installing+Griffon | What Java versions does Griffon support? I want to write a Swing application in Griffon but I am not sure what versions of Java I can support. | TITLE:
What Java versions does Griffon support?
QUESTION:
I want to write a Swing application in Griffon but I am not sure what versions of Java I can support.
ANSWER:
According to the Griffon website, 1.5 or higher. http://groovy.codehaus.org/Installing+Griffon | [
"java",
"swing",
"groovy",
"griffon"
] | 3 | 4 | 310 | 1 | 0 | 2008-09-17T01:39:30.787000 | 2008-09-17T01:43:45.927000 |
79,023 | 79,050 | Is there a C++ gdb GUI for Linux? | Briefly: Does anyone know of a GUI for gdb that brings it on par or close to the feature set you get in the more recent version of Visual C++? In detail: As someone who has spent a lot of time programming in Windows, one of the larger stumbling blocks I've found whenever I have to code C++ in Linux is that debugging an... | You won't find anything overlaying GDB which can compete with the raw power of the Visual Studio debugger. It's just too powerful, and it's just too well integrated inside the IDE. For a Linux alternative, try DDD if free software is your thing. | Is there a C++ gdb GUI for Linux? Briefly: Does anyone know of a GUI for gdb that brings it on par or close to the feature set you get in the more recent version of Visual C++? In detail: As someone who has spent a lot of time programming in Windows, one of the larger stumbling blocks I've found whenever I have to code... | TITLE:
Is there a C++ gdb GUI for Linux?
QUESTION:
Briefly: Does anyone know of a GUI for gdb that brings it on par or close to the feature set you get in the more recent version of Visual C++? In detail: As someone who has spent a lot of time programming in Windows, one of the larger stumbling blocks I've found whene... | [
"c++",
"linux",
"gdb",
"debugging"
] | 224 | 56 | 130,126 | 28 | 0 | 2008-09-17T01:42:57.143000 | 2008-09-17T01:45:42.397000 |
79,041 | 79,067 | Retrieve all nodes in a tree that are children of another one | I have a web system which has a classical parent-children menu saved in a database, with fields id as the PK, and parent_id to pointing to the owning menu. (Yes, I know this doesn't scale very well, but that's another topic). So for these records (id-parent_id pairs): 0-7 0-4 4-9 4-14 4-16 9-6 I have this tree: 0 ├ 7 └... | This is the perfect chance to use recursion! Pseudo-code: nodeList = {} enumerateNodes(rootNode, nodeList);
function enumerateNodes(node, nodeList) { nodeList += node; foreach ( childnode in node.children ) { enumerateNodes(childnode, nodeList); } } Edit: Didn't notice that your tree is in the adjacent list format. I ... | Retrieve all nodes in a tree that are children of another one I have a web system which has a classical parent-children menu saved in a database, with fields id as the PK, and parent_id to pointing to the owning menu. (Yes, I know this doesn't scale very well, but that's another topic). So for these records (id-parent_... | TITLE:
Retrieve all nodes in a tree that are children of another one
QUESTION:
I have a web system which has a classical parent-children menu saved in a database, with fields id as the PK, and parent_id to pointing to the owning menu. (Yes, I know this doesn't scale very well, but that's another topic). So for these r... | [
"php",
"tree"
] | 0 | 1 | 516 | 4 | 0 | 2008-09-17T01:44:11.807000 | 2008-09-17T01:48:11.657000 |
79,111 | 79,205 | .NET (C#): Getting child windows when you only have a process handle or PID? | Kind of a special case problem: I start a process with System.Diagnostics.Process.Start(..) The process opens a splash screen -- this splash screen becomes the main window. The splash screen closes and the 'real' UI is shown. The main window (splash screen) is now invalid. I still have the Process object, and I can que... | If you don't mind using the Windows API, you could use EnumWindowsProc, and check each of the handles that that turns up using GetWindowThreadProcessId (to see that it's in your process), and then maybe IsWindowVisible, GetWindowCaption and GetWindowTextLength to determine which hWnd in your process is the one you want... | .NET (C#): Getting child windows when you only have a process handle or PID? Kind of a special case problem: I start a process with System.Diagnostics.Process.Start(..) The process opens a splash screen -- this splash screen becomes the main window. The splash screen closes and the 'real' UI is shown. The main window (... | TITLE:
.NET (C#): Getting child windows when you only have a process handle or PID?
QUESTION:
Kind of a special case problem: I start a process with System.Diagnostics.Process.Start(..) The process opens a splash screen -- this splash screen becomes the main window. The splash screen closes and the 'real' UI is shown.... | [
"c#",
".net",
"windows",
"user-interface"
] | 22 | 10 | 42,927 | 9 | 0 | 2008-09-17T01:54:52.747000 | 2008-09-17T02:15:28.767000 |
79,121 | 79,796 | CUDA global (as in C) dynamic arrays allocated to device memory | So, im trying to write some code that utilizes Nvidia's CUDA architecture. I noticed that copying to and from the device was really hurting my overall performance, so now I am trying to move a large amount of data onto the device. As this data is used in numerous functions, I would like it to be global. Yes, I can pass... | Something like this should probably work. #include #define NDEBUG #define CUT_CHECK_ERROR(errorMessage) do { \ cudaThreadSynchronize(); \ cudaError_t err = cudaGetLastError(); \ if( cudaSuccess!= err) { \ fprintf(stderr, "Cuda error: %s in file '%s' in line %i: %s.\n", \ errorMessage, __FILE__, __LINE__, cudaGetErrorSt... | CUDA global (as in C) dynamic arrays allocated to device memory So, im trying to write some code that utilizes Nvidia's CUDA architecture. I noticed that copying to and from the device was really hurting my overall performance, so now I am trying to move a large amount of data onto the device. As this data is used in n... | TITLE:
CUDA global (as in C) dynamic arrays allocated to device memory
QUESTION:
So, im trying to write some code that utilizes Nvidia's CUDA architecture. I noticed that copying to and from the device was really hurting my overall performance, so now I am trying to move a large amount of data onto the device. As this... | [
"cuda",
"nvidia"
] | 7 | 5 | 28,046 | 6 | 0 | 2008-09-17T01:55:53.493000 | 2008-09-17T03:52:41.950000 |
79,129 | 434,793 | Implementing Profile Provider in ASP.NET MVC | For the life of me, I cannot get the SqlProfileProvider to work in an MVC project that I'm working on. The first interesting thing that I realized is that Visual Studio does not automatically generate the ProfileCommon proxy class for you. That's not a big deal since it's simpy a matter of extending the ProfileBase cla... | Here's what you need to do: 1) In Web.config's section, add "inherits" attribute in addition to your other attribute settings: | Implementing Profile Provider in ASP.NET MVC For the life of me, I cannot get the SqlProfileProvider to work in an MVC project that I'm working on. The first interesting thing that I realized is that Visual Studio does not automatically generate the ProfileCommon proxy class for you. That's not a big deal since it's si... | TITLE:
Implementing Profile Provider in ASP.NET MVC
QUESTION:
For the life of me, I cannot get the SqlProfileProvider to work in an MVC project that I'm working on. The first interesting thing that I realized is that Visual Studio does not automatically generate the ProfileCommon proxy class for you. That's not a big ... | [
"asp.net-mvc",
"profile",
"profile-provider"
] | 63 | 56 | 38,412 | 4 | 0 | 2008-09-17T01:56:37.173000 | 2009-01-12T08:25:20.520000 |
79,136 | 79,152 | How do I create a container file? | I would like to create a file format for my app like Quake, OO, and MS Office 07 have. Basically a uncompressed zip folder, or tar file. I need this to be cross platform (mac and windows). Can I do something via command prompt and bash? | Have a look at the open source 7Zip compression format. For your specific needs, you can use it in an "Archive" mode, zero compression but very fast. It provides a powerful SDK, LZMA, from the site: "LZMA is the default and general compression method of 7z format in the 7-Zip program. LZMA provides a high compression r... | How do I create a container file? I would like to create a file format for my app like Quake, OO, and MS Office 07 have. Basically a uncompressed zip folder, or tar file. I need this to be cross platform (mac and windows). Can I do something via command prompt and bash? | TITLE:
How do I create a container file?
QUESTION:
I would like to create a file format for my app like Quake, OO, and MS Office 07 have. Basically a uncompressed zip folder, or tar file. I need this to be cross platform (mac and windows). Can I do something via command prompt and bash?
ANSWER:
Have a look at the ope... | [
"windows",
"macos",
"file-format",
"container-file"
] | 2 | 2 | 5,356 | 6 | 0 | 2008-09-17T01:57:53.490000 | 2008-09-17T02:00:29.397000 |
79,165 | 79,178 | How do I migrate an SVN repository with history to a new Git repository? | I read the Git manual, FAQ, Git - SVN crash course, etc. and they all explain this and that, but nowhere can you find a simple instruction like: SVN repository in: svn://myserver/path/to/svn/repos Git repository in: git://myserver/path/to/git/repos git-do-the-magic-svn-import-with-history \ svn://myserver/path/to/svn/r... | Magic: $ git svn clone http://svn/repo/here/trunk Git and SVN operate very differently. You need to learn Git, and if you want to track changes from SVN upstream, you need to learn git-svn. The git-svn main page has a good examples section: $ git svn --help | How do I migrate an SVN repository with history to a new Git repository? I read the Git manual, FAQ, Git - SVN crash course, etc. and they all explain this and that, but nowhere can you find a simple instruction like: SVN repository in: svn://myserver/path/to/svn/repos Git repository in: git://myserver/path/to/git/repo... | TITLE:
How do I migrate an SVN repository with history to a new Git repository?
QUESTION:
I read the Git manual, FAQ, Git - SVN crash course, etc. and they all explain this and that, but nowhere can you find a simple instruction like: SVN repository in: svn://myserver/path/to/svn/repos Git repository in: git://myserve... | [
"svn",
"git",
"version-control",
"git-svn"
] | 1,625 | 552 | 557,292 | 34 | 0 | 2008-09-17T02:04:20.853000 | 2008-09-17T02:08:25.197000 |
79,197 | 86,322 | Combining two SyndicationFeeds | What's a simple way to combine feed and feed2? I want the items from feed2 to be added to feed. Also I want to avoid duplicates as feed might already have items when a question is tagged with both WPF and Silverlight. Uri feedUri = new Uri("http://stackoverflow.com/feeds/tag/silverlight"); XmlReader reader = XmlReader.... | You can use LINQ to simplify the code to join two lists (don't forget to put System.Linq in your usings and if necessary reference System.Core in your project) Here's a Main that does the union and prints them to console (with proper cleanup of the Reader). using System; using System.Collections.Generic; using System.L... | Combining two SyndicationFeeds What's a simple way to combine feed and feed2? I want the items from feed2 to be added to feed. Also I want to avoid duplicates as feed might already have items when a question is tagged with both WPF and Silverlight. Uri feedUri = new Uri("http://stackoverflow.com/feeds/tag/silverlight")... | TITLE:
Combining two SyndicationFeeds
QUESTION:
What's a simple way to combine feed and feed2? I want the items from feed2 to be added to feed. Also I want to avoid duplicates as feed might already have items when a question is tagged with both WPF and Silverlight. Uri feedUri = new Uri("http://stackoverflow.com/feeds... | [
"c#",
"linq",
".net-3.5"
] | 10 | 11 | 3,255 | 6 | 0 | 2008-09-17T02:13:22.127000 | 2008-09-17T18:49:42.810000 |
79,210 | 79,358 | Best C++ IDE for *nix | What is the best C++ IDE for a *nix envirnoment? I have heard the C/C++ module of Eclipse is decent as well as Notepad++ but beyond these two I have no real idea. Any thoughts or comments? | On Ubuntu, some the IDEs that are available in the repositories are: Kdevelop Geany Anjuta There is also: Eclipse (Recommended you don't install from repositories, due to issues with file/folder permissions) Code::blocks And of course, everyone's favourite text-based editors: vi/vim emacs Its true that vim and emacs ar... | Best C++ IDE for *nix What is the best C++ IDE for a *nix envirnoment? I have heard the C/C++ module of Eclipse is decent as well as Notepad++ but beyond these two I have no real idea. Any thoughts or comments? | TITLE:
Best C++ IDE for *nix
QUESTION:
What is the best C++ IDE for a *nix envirnoment? I have heard the C/C++ module of Eclipse is decent as well as Notepad++ but beyond these two I have no real idea. Any thoughts or comments?
ANSWER:
On Ubuntu, some the IDEs that are available in the repositories are: Kdevelop Gean... | [
"c++",
"ide"
] | 30 | 29 | 20,047 | 22 | 0 | 2008-09-17T02:17:08.390000 | 2008-09-17T02:38:36.183000 |
79,215 | 79,772 | How do you reference .js files located within the View folders from a Page using Asp.net MVC | For example, if I have a page located in Views/Home/Index.aspx and a JavaScript file located in Views/Home/Index.js, how do you reference this on the aspx page? The example below doesn't work even though the compiler says the path is correct The exact same issue has been posted here in more detail: http://forums.asp.ne... | For shared javascript resources using the Content folder makes sense. The issue was I was specifically trying to solve was aspx page specific javascript that would never be reused. I think what I will just have to do is put the aspx page specific javascript right onto the page itself and keep the shared js resources in... | How do you reference .js files located within the View folders from a Page using Asp.net MVC For example, if I have a page located in Views/Home/Index.aspx and a JavaScript file located in Views/Home/Index.js, how do you reference this on the aspx page? The example below doesn't work even though the compiler says the p... | TITLE:
How do you reference .js files located within the View folders from a Page using Asp.net MVC
QUESTION:
For example, if I have a page located in Views/Home/Index.aspx and a JavaScript file located in Views/Home/Index.js, how do you reference this on the aspx page? The example below doesn't work even though the c... | [
"c#",
"javascript",
"asp.net-mvc"
] | 4 | 1 | 5,086 | 5 | 0 | 2008-09-17T02:18:06.653000 | 2008-09-17T03:49:10.883000 |
79,229 | 90,349 | How often should Oracle database statistics be run? | In your experience, how often should Oracle database statistics be run? Our team of developers recently discovered that statistics hadn't been run our production box in over 2 1/2 months. That sounds like a long time to me, but I'm not a DBA. | At my last job we ran statistics once a week. If I remember correctly, we scheduled them on a Thursday night, and on Friday the DBAs were very careful to monitor the longest running queries for anything unexpected. (Friday was picked because it was often just after a code release, and tended to be a fairly low traffic ... | How often should Oracle database statistics be run? In your experience, how often should Oracle database statistics be run? Our team of developers recently discovered that statistics hadn't been run our production box in over 2 1/2 months. That sounds like a long time to me, but I'm not a DBA. | TITLE:
How often should Oracle database statistics be run?
QUESTION:
In your experience, how often should Oracle database statistics be run? Our team of developers recently discovered that statistics hadn't been run our production box in over 2 1/2 months. That sounds like a long time to me, but I'm not a DBA.
ANSWER... | [
"database",
"performance",
"oracle",
"statistics"
] | 23 | 13 | 110,321 | 9 | 0 | 2008-09-17T02:20:48.630000 | 2008-09-18T05:44:52.047000 |
79,241 | 79,311 | How do you know what a good index is? | When working with tables in Oracle, how do you know when you are setting up a good index versus a bad index? | This depends on what you mean by 'good' and 'bad'. Basically you need to realise that every index you add will increase performance on any search by that column (so adding an index to the 'lastname' column of a person table will increase performance on queries that have "where lastname = " in them) but decrease write p... | How do you know what a good index is? When working with tables in Oracle, how do you know when you are setting up a good index versus a bad index? | TITLE:
How do you know what a good index is?
QUESTION:
When working with tables in Oracle, how do you know when you are setting up a good index versus a bad index?
ANSWER:
This depends on what you mean by 'good' and 'bad'. Basically you need to realise that every index you add will increase performance on any search ... | [
"database",
"oracle",
"indexing"
] | 12 | 23 | 12,145 | 6 | 0 | 2008-09-17T02:22:41.527000 | 2008-09-17T02:31:42.160000 |
79,248 | 79,283 | What is a multitasking operating system? | What are the characteristics of a multitasking operating system? What makes it multitasking? Are there non-multitasking operating systems? | What are the characteristics of a multitasking operating system? What makes it multitasking? Multitasking operating systems allow more than one program to run at a time. They can support either preemptive multitasking, where the OS doles out time to applications (virtually all modern OSes) or cooperative multitasking, ... | What is a multitasking operating system? What are the characteristics of a multitasking operating system? What makes it multitasking? Are there non-multitasking operating systems? | TITLE:
What is a multitasking operating system?
QUESTION:
What are the characteristics of a multitasking operating system? What makes it multitasking? Are there non-multitasking operating systems?
ANSWER:
What are the characteristics of a multitasking operating system? What makes it multitasking? Multitasking operati... | [
"operating-system",
"computer-science"
] | 11 | 12 | 67,119 | 12 | 0 | 2008-09-17T02:23:47.780000 | 2008-09-17T02:28:12.903000 |
79,258 | 79,433 | Find style references that don't exist | Is there a tool that will find for me all the css classes that I am referencing in my HTML that don't actually exist? ie. if I have in my HTML and the topnav class doesn't exist in any of the referenced CSS files. This is similar to SO#33242, which asks how to find unused CSS styles. This isn't a duplicate, as that que... | You can put this JavaScript in the page that can perform this task for you: function forItems(a, f) { for (var i = 0; i < a.length; i++) f(a.item(i)) }
function classExists(className) { var pattern = new RegExp('\\.' + className + '\\b'), found = false
try { forItems(document.styleSheets, function(ss) { // decompose ... | Find style references that don't exist Is there a tool that will find for me all the css classes that I am referencing in my HTML that don't actually exist? ie. if I have in my HTML and the topnav class doesn't exist in any of the referenced CSS files. This is similar to SO#33242, which asks how to find unused CSS styl... | TITLE:
Find style references that don't exist
QUESTION:
Is there a tool that will find for me all the css classes that I am referencing in my HTML that don't actually exist? ie. if I have in my HTML and the topnav class doesn't exist in any of the referenced CSS files. This is similar to SO#33242, which asks how to fi... | [
"css"
] | 1 | 4 | 613 | 4 | 0 | 2008-09-17T02:25:08.993000 | 2008-09-17T02:48:38.423000 |
79,264 | 79,570 | How to extract files from Windows Vista Complete PC Backup? | Is there a program or API I can code against to extract individual files from a Windows Vista Complete PC Backup image? I like the idea of having a complete image to restore from, but hate the idea that I have to make two backups, one for restoring individual files, and one for restoring my computer in the event of a c... | Yes there is an API. Windows Vista Complete PC Backup creates a.vhd (virtual hard disk) image that can be accessed via the Virtual Server 2005 API or from a command line utility available in Virtual Server 2005 which is freely available here. | How to extract files from Windows Vista Complete PC Backup? Is there a program or API I can code against to extract individual files from a Windows Vista Complete PC Backup image? I like the idea of having a complete image to restore from, but hate the idea that I have to make two backups, one for restoring individual ... | TITLE:
How to extract files from Windows Vista Complete PC Backup?
QUESTION:
Is there a program or API I can code against to extract individual files from a Windows Vista Complete PC Backup image? I like the idea of having a complete image to restore from, but hate the idea that I have to make two backups, one for res... | [
"windows",
"api",
"windows-vista",
"backup"
] | 2 | 2 | 2,403 | 2 | 0 | 2008-09-17T02:26:09.803000 | 2008-09-17T03:11:53.657000 |
79,266 | 157,340 | How do you interpret a query's explain plan? | When attempting to understand how a SQL statement is executing, it is sometimes recommended to look at the explain plan. What is the process one should go through in interpreting (making sense) of an explain plan? What should stand out as, "Oh, this is working splendidly?" versus "Oh no, that's not right." | I shudder whenever I see comments that full tablescans are bad and index access is good. Full table scans, index range scans, fast full index scans, nested loops, merge join, hash joins etc. are simply access mechanisms that must be understood by the analyst and combined with a knowledge of the database structure and t... | How do you interpret a query's explain plan? When attempting to understand how a SQL statement is executing, it is sometimes recommended to look at the explain plan. What is the process one should go through in interpreting (making sense) of an explain plan? What should stand out as, "Oh, this is working splendidly?" v... | TITLE:
How do you interpret a query's explain plan?
QUESTION:
When attempting to understand how a SQL statement is executing, it is sometimes recommended to look at the explain plan. What is the process one should go through in interpreting (making sense) of an explain plan? What should stand out as, "Oh, this is work... | [
"sql",
"database",
"performance",
"oracle",
"sql-execution-plan"
] | 92 | 83 | 62,785 | 11 | 0 | 2008-09-17T02:26:18.930000 | 2008-10-01T12:31:22.673000 |
79,275 | 79,317 | How to skip fields using javascript? | I have a form like this: When user types a value in 'one', I sometimes want to skip the field 'two', depending on what he typed. For example, if user types '123' and uses Tab to move to next field, I want to skip it and go to field three. I tried to use OnBlur and OnEnter, without success. Try 1: | Try to attach tabindex attribute to your elements and then programmaticaly (in javaScript change it): | How to skip fields using javascript? I have a form like this: When user types a value in 'one', I sometimes want to skip the field 'two', depending on what he typed. For example, if user types '123' and uses Tab to move to next field, I want to skip it and go to field three. I tried to use OnBlur and OnEnter, without s... | TITLE:
How to skip fields using javascript?
QUESTION:
I have a form like this: When user types a value in 'one', I sometimes want to skip the field 'two', depending on what he typed. For example, if user types '123' and uses Tab to move to next field, I want to skip it and go to field three. I tried to use OnBlur and ... | [
"javascript",
"firefox",
"focus",
"skip"
] | 1 | 3 | 2,208 | 5 | 0 | 2008-09-17T02:27:20.110000 | 2008-09-17T02:32:29.397000 |
79,322 | 79,569 | Is there a really good web resource on moving to Moose? | The documentation with the module itself is pretty thin, and just tends to point to MOP. | First you should read through the Manual if you haven't already. Then you can go on to read the Cookbook. I think the docs are actually pretty good these days, as long as you read the right ones. You really shouldn't bother looking at most of the docs for any class name starting with " Moose::Meta " unless you're inter... | Is there a really good web resource on moving to Moose? The documentation with the module itself is pretty thin, and just tends to point to MOP. | TITLE:
Is there a really good web resource on moving to Moose?
QUESTION:
The documentation with the module itself is pretty thin, and just tends to point to MOP.
ANSWER:
First you should read through the Manual if you haven't already. Then you can go on to read the Cookbook. I think the docs are actually pretty good ... | [
"perl",
"moose"
] | 9 | 22 | 641 | 5 | 0 | 2008-09-17T02:33:21.360000 | 2008-09-17T03:11:51.893000 |
79,352 | 79,457 | How can I turn a single object into something that is Enumerable in ruby | I have a method that can return either a single object or a collection of objects. I want to be able to run object.collect on the result of that method whether or not it is a single object or a collection already. How can i do this? profiles = ProfileResource.search(params) output = profiles.collect do | profile | prof... | Careful with the flatten approach, if search() returned nested arrays then unexpected behaviour might result. profiles = ProfileResource.search(params) profiles = [profiles] if!profiles.respond_to?(:collect) output = profiles.collect do |profile| profile.to_hash end | How can I turn a single object into something that is Enumerable in ruby I have a method that can return either a single object or a collection of objects. I want to be able to run object.collect on the result of that method whether or not it is a single object or a collection already. How can i do this? profiles = Pro... | TITLE:
How can I turn a single object into something that is Enumerable in ruby
QUESTION:
I have a method that can return either a single object or a collection of objects. I want to be able to run object.collect on the result of that method whether or not it is a single object or a collection already. How can i do th... | [
"ruby"
] | 2 | 6 | 525 | 9 | 0 | 2008-09-17T02:38:02.380000 | 2008-09-17T02:53:15.540000 |
79,356 | 79,859 | What is best for desktop widgets (small footprint and pretty graphics)? | If I were to want to create a nice looking widget to stay running in the background with a small memory footprint, where would I start building the windows application. It's goal is to keep an updated list of items off of a web service. Similar to an RSS reader. note: The data layer will be connecting through REST, whi... | re: Update: Clarification The above sizes, are the memory being used as the process is ran, not the executable. Okay, when you run a tiny C# Win Forms app, the smallest amount of RAM that is reserved for it is around 2 meg, maybe 4 meg. This is just a working set that it creates. It's not actively using all of this mem... | What is best for desktop widgets (small footprint and pretty graphics)? If I were to want to create a nice looking widget to stay running in the background with a small memory footprint, where would I start building the windows application. It's goal is to keep an updated list of items off of a web service. Similar to ... | TITLE:
What is best for desktop widgets (small footprint and pretty graphics)?
QUESTION:
If I were to want to create a nice looking widget to stay running in the background with a small memory footprint, where would I start building the windows application. It's goal is to keep an updated list of items off of a web se... | [
".net",
"c++",
"wpf",
".net-3.5"
] | 4 | 2 | 1,101 | 4 | 0 | 2008-09-17T02:38:22.707000 | 2008-09-17T04:03:56.667000 |
79,360 | 79,449 | How can I prevent deformation when rotating about the line-of-sight in OpenGL? | I've drawn an ellipse in the XZ plane, and set my perspective slightly up on the Y-axis and back on the Z, looking at the center of ellipse from a 45-degree angle, using gluPerspective() to set my viewing frustrum. Unrotated, the major axis of the ellipse spans the width of my viewport. When I rotate 90-degrees about m... | It looks like you're using 1.0 as the aspect when you call gluPerspective(). You should use width/height. For example, if your viewport is 640x480, you would use 1.33333 as the aspect argument. | How can I prevent deformation when rotating about the line-of-sight in OpenGL? I've drawn an ellipse in the XZ plane, and set my perspective slightly up on the Y-axis and back on the Z, looking at the center of ellipse from a 45-degree angle, using gluPerspective() to set my viewing frustrum. Unrotated, the major axis ... | TITLE:
How can I prevent deformation when rotating about the line-of-sight in OpenGL?
QUESTION:
I've drawn an ellipse in the XZ plane, and set my perspective slightly up on the Y-axis and back on the Z, looking at the center of ellipse from a 45-degree angle, using gluPerspective() to set my viewing frustrum. Unrotate... | [
"c",
"opengl"
] | 4 | 5 | 1,274 | 3 | 0 | 2008-09-17T02:38:41.503000 | 2008-09-17T02:51:34.500000 |
79,381 | 79,417 | Accessing Websites through a Different Port? | I am wanting to access a website from a different port than 80 or 8080. Is this possible? I just want to view the website but through a different port. I do not have a router. I know this can be done because I have a browser that accessing websites through different ports, Called XB Browser by Xero Bank. Thanks for the... | If your question is about IIS(or other server) configuration - yes, it's possible. All you need is to create ports mapping under your Default Site or Virtual Directory and assign specific ports to the site you need. For example it is sometimes very useful for web services, when default port is assigned to some UI front... | Accessing Websites through a Different Port? I am wanting to access a website from a different port than 80 or 8080. Is this possible? I just want to view the website but through a different port. I do not have a router. I know this can be done because I have a browser that accessing websites through different ports, C... | TITLE:
Accessing Websites through a Different Port?
QUESTION:
I am wanting to access a website from a different port than 80 or 8080. Is this possible? I just want to view the website but through a different port. I do not have a router. I know this can be done because I have a browser that accessing websites through ... | [
"browser",
"ports"
] | 24 | 11 | 204,786 | 12 | 0 | 2008-09-17T02:41:53.820000 | 2008-09-17T02:46:08.147000 |
79,389 | 79,426 | What is round-robin scheduling? | In a multitasking operating system context, sometimes you hear the term round-robin scheduling. What does it refer to? What other kind of scheduling is there? | Round Robin Scheduling If you are a host in a party of 100 guests, round-robin scheduling would mean that you spend 1 minute (a fixed amount) per guest. You go through each guest one-by-one, and after 100 minutes, you would have spent 1 minute with each guest. More on Wikipedia. There are many other types of scheduling... | What is round-robin scheduling? In a multitasking operating system context, sometimes you hear the term round-robin scheduling. What does it refer to? What other kind of scheduling is there? | TITLE:
What is round-robin scheduling?
QUESTION:
In a multitasking operating system context, sometimes you hear the term round-robin scheduling. What does it refer to? What other kind of scheduling is there?
ANSWER:
Round Robin Scheduling If you are a host in a party of 100 guests, round-robin scheduling would mean t... | [
"operating-system",
"computer-science",
"scheduler"
] | 15 | 24 | 25,104 | 7 | 0 | 2008-09-17T02:43:34.567000 | 2008-09-17T02:47:44.010000 |
79,415 | 79,444 | What are the requirements for an application health monitoring system? | What, at a minimum, should an application health-monitoring system do for you (the developer) and/or your boss (the IT Manager) and/or the operations (on-call) staff? What else should it do above the minimum requirements? Is monitoring the 'infrastructure' applications (ms-exchange, apache, etc.) sufficient or do indiv... | Whether the application is running. Unusual cpu/memory/network usage. Report any unhandled exceptions. Status of various modules (if applicable). Status of external components (databases, webservices, fileservers, etc.) Number of pending background tasks (if applicable). Maybe track usage of the application and report ... | What are the requirements for an application health monitoring system? What, at a minimum, should an application health-monitoring system do for you (the developer) and/or your boss (the IT Manager) and/or the operations (on-call) staff? What else should it do above the minimum requirements? Is monitoring the 'infrastr... | TITLE:
What are the requirements for an application health monitoring system?
QUESTION:
What, at a minimum, should an application health-monitoring system do for you (the developer) and/or your boss (the IT Manager) and/or the operations (on-call) staff? What else should it do above the minimum requirements? Is monito... | [
"monitoring",
"health-monitoring"
] | 11 | 12 | 12,767 | 9 | 0 | 2008-09-17T02:45:41.423000 | 2008-09-17T02:51:12.317000 |
79,434 | 87,196 | Visual Studio 2005: Please stop opening my CS files in "Design Mode"! | I think it's associating my Web Service's CS files with the related ASMX files. But whatever's happening, I can't double-click to open the CS files - I have to "view Code" or it opens in the designer. Anyone know how to turn off this automatic behavior? I just want to edit the code! | Try right-clicking, select "Open with...", mark "CSharp Editor" and select "Set as Default". That works for avoiding the WinForms Designer. | Visual Studio 2005: Please stop opening my CS files in "Design Mode"! I think it's associating my Web Service's CS files with the related ASMX files. But whatever's happening, I can't double-click to open the CS files - I have to "view Code" or it opens in the designer. Anyone know how to turn off this automatic behavi... | TITLE:
Visual Studio 2005: Please stop opening my CS files in "Design Mode"!
QUESTION:
I think it's associating my Web Service's CS files with the related ASMX files. But whatever's happening, I can't double-click to open the CS files - I have to "view Code" or it opens in the designer. Anyone know how to turn off thi... | [
"visual-studio",
"designer"
] | 9 | 17 | 3,293 | 5 | 0 | 2008-09-17T02:48:42.727000 | 2008-09-17T20:20:55.740000 |
79,438 | 79,452 | Which Rails plug in is best for role based permissions? (Please provide one nomination per answer) | I need to add role based permissions to my Rails application, and am wondering what the best plugins out there are to look into. I am currently using the RESTful authentication plugin to handle user authentication. Why is the plug in you suggest better than the other ones out there? | I use, and really like, role_requirement: http://code.google.com/p/rolerequirement/ | Which Rails plug in is best for role based permissions? (Please provide one nomination per answer) I need to add role based permissions to my Rails application, and am wondering what the best plugins out there are to look into. I am currently using the RESTful authentication plugin to handle user authentication. Why is... | TITLE:
Which Rails plug in is best for role based permissions? (Please provide one nomination per answer)
QUESTION:
I need to add role based permissions to my Rails application, and am wondering what the best plugins out there are to look into. I am currently using the RESTful authentication plugin to handle user auth... | [
"ruby-on-rails"
] | 5 | 3 | 7,561 | 5 | 0 | 2008-09-17T02:49:47.233000 | 2008-09-17T02:51:57.337000 |
79,455 | 80,302 | How to select consecutive elements that match a filter | Given this example: (I've just used img tags as an example, that's not what it is in my code) Using jQuery, how would you select the img tags with class "a" that are adjacent to #active (the middle four, in this example)? You could do it fairly easily by looping over all the following and preceding elements, stopping w... | Here's what I came up with in the end. // here's our active element. var $active = $('#active');
// here is the filter we'll be testing against. var filter = "img.a";
// $all will be the final jQuery object with all the consecutively matched elements. // start it out by populating it with the current object. var $all... | How to select consecutive elements that match a filter Given this example: (I've just used img tags as an example, that's not what it is in my code) Using jQuery, how would you select the img tags with class "a" that are adjacent to #active (the middle four, in this example)? You could do it fairly easily by looping ov... | TITLE:
How to select consecutive elements that match a filter
QUESTION:
Given this example: (I've just used img tags as an example, that's not what it is in my code) Using jQuery, how would you select the img tags with class "a" that are adjacent to #active (the middle four, in this example)? You could do it fairly ea... | [
"javascript",
"jquery"
] | 7 | 4 | 2,976 | 6 | 0 | 2008-09-17T02:53:06.557000 | 2008-09-17T05:30:03.387000 |
79,461 | 84,616 | How can I vertically align elements in a div? | I have a div with two images and an h1. All of them need to be vertically aligned within the div, next to each other. One of the images needs to be absolute positioned within the div. What is the CSS needed for this to work on all common browsers? testing... | Wow, this problem is popular. It's based on a misunderstanding in the vertical-align property. This excellent article explains it: Understanding vertical-align, or "How (Not) To Vertically Center Content" by Gavin Kistner. “How to center in CSS” is a great web tool which helps to find the necessary CSS centering attrib... | How can I vertically align elements in a div? I have a div with two images and an h1. All of them need to be vertically aligned within the div, next to each other. One of the images needs to be absolute positioned within the div. What is the CSS needed for this to work on all common browsers? testing... | TITLE:
How can I vertically align elements in a div?
QUESTION:
I have a div with two images and an h1. All of them need to be vertically aligned within the div, next to each other. One of the images needs to be absolute positioned within the div. What is the CSS needed for this to work on all common browsers? testing.... | [
"html",
"css",
"vertical-alignment"
] | 1,068 | 1,138 | 1,997,666 | 29 | 0 | 2008-09-17T02:53:36.477000 | 2008-09-17T15:38:49.320000 |
79,474 | 81,255 | Setting environment variables for Phusion Passenger applications | I've set up Passenger in development (Mac OS X) and it works flawlessly. The only problem came later: now I have a custom GEM_HOME path and ImageMagick binaries installed in "/usr/local". I can put them in one of the shell rc files that get sourced and this solves the environment variables for processes spawned from th... | I know of two solutions. The first (documented here ) is essentially the same as manveru's—set the ENV variable directly in your code. The second is to create a wrapper around the Ruby interpreter that Passenger uses, and is documented here (look for passenger_with_ruby). The gist is that you create (and point Passenge... | Setting environment variables for Phusion Passenger applications I've set up Passenger in development (Mac OS X) and it works flawlessly. The only problem came later: now I have a custom GEM_HOME path and ImageMagick binaries installed in "/usr/local". I can put them in one of the shell rc files that get sourced and th... | TITLE:
Setting environment variables for Phusion Passenger applications
QUESTION:
I've set up Passenger in development (Mac OS X) and it works flawlessly. The only problem came later: now I have a custom GEM_HOME path and ImageMagick binaries installed in "/usr/local". I can put them in one of the shell rc files that ... | [
"ruby-on-rails",
"ruby",
"passenger",
"env"
] | 7 | 12 | 12,238 | 4 | 0 | 2008-09-17T02:56:14.490000 | 2008-09-17T08:54:05.643000 |
79,476 | 79,549 | What's the correct term for "number of std deviations" away from a mean | I've computed the mean & variance of a set of values, and I want to pass along the value that represents the # of std deviations away from mean for each number in the set. Is there a better term for this, or should I just call it num_of_std_devs_from_mean... | Some suggestions here: Standard score (z-value, z-score, normal score) but "sigma" or "stdev_distance" would probably be clearer | What's the correct term for "number of std deviations" away from a mean I've computed the mean & variance of a set of values, and I want to pass along the value that represents the # of std deviations away from mean for each number in the set. Is there a better term for this, or should I just call it num_of_std_devs_fr... | TITLE:
What's the correct term for "number of std deviations" away from a mean
QUESTION:
I've computed the mean & variance of a set of values, and I want to pass along the value that represents the # of std deviations away from mean for each number in the set. Is there a better term for this, or should I just call it ... | [
"statistics"
] | 3 | 9 | 866 | 6 | 0 | 2008-09-17T02:56:28.153000 | 2008-09-17T03:08:08.267000 |
79,490 | 79,540 | linux uptime history | How can I get a history of uptimes for my debian box? After a reboot, I dont see an option for the uptime command to print a history of uptimes. If it matters, I would like to use these uptimes for graphing a page in php to show my webservers uptime lengths between boots. Update: Not sure if it is based on a length of ... | You could create a simple script which runs uptime and dumps it to a file. uptime >> uptime.log Then set up a cron job for it. | linux uptime history How can I get a history of uptimes for my debian box? After a reboot, I dont see an option for the uptime command to print a history of uptimes. If it matters, I would like to use these uptimes for graphing a page in php to show my webservers uptime lengths between boots. Update: Not sure if it is ... | TITLE:
linux uptime history
QUESTION:
How can I get a history of uptimes for my debian box? After a reboot, I dont see an option for the uptime command to print a history of uptimes. If it matters, I would like to use these uptimes for graphing a page in php to show my webservers uptime lengths between boots. Update: ... | [
"linux"
] | 39 | 30 | 53,543 | 14 | 0 | 2008-09-17T02:59:11.737000 | 2008-09-17T03:06:16.633000 |
79,493 | 83,080 | How do I use a vendor Apache with a self-compiled Perl and mod_perl? | I want to use Apple's or RedHat's built-in Apache but I want to use Perl 5.10 and mod_perl. What's the least intrusive way to accomplish this? I want the advantage of free security patching for the vendor's Apache, dav, php, etc., but I care a lot about which version of Perl I use and what's in my @INC path. I don't mi... | Build your version of Perl 5.10 following any special instructions from the mod_perl documentation. Tell Perl configurator to install in some non-standard place, like /usr/local/perl/5.10.0 Use the instructions to build a shared library (or dynamic, or.so) mod_perl against your distribution's Apache, but make sure you ... | How do I use a vendor Apache with a self-compiled Perl and mod_perl? I want to use Apple's or RedHat's built-in Apache but I want to use Perl 5.10 and mod_perl. What's the least intrusive way to accomplish this? I want the advantage of free security patching for the vendor's Apache, dav, php, etc., but I care a lot abo... | TITLE:
How do I use a vendor Apache with a self-compiled Perl and mod_perl?
QUESTION:
I want to use Apple's or RedHat's built-in Apache but I want to use Perl 5.10 and mod_perl. What's the least intrusive way to accomplish this? I want the advantage of free security patching for the vendor's Apache, dav, php, etc., bu... | [
"perl",
"apache",
"mod-perl"
] | 5 | 5 | 1,942 | 3 | 0 | 2008-09-17T02:59:27.587000 | 2008-09-17T13:19:37.720000 |
79,496 | 1,056,322 | How do I import Facebook friends from another website | I am looking for a way to connect to Facebook by allowing the user to enter in their username and password and have our app connect to their account and get their contacts so that they can invite them to join their group on our site. I have written a Facebook app before, but this is not an app as much as it is a connec... | I asked this question awhile ago and before facebook connect was live and well. The best way to really do this is using facebook connect. http://developers.facebook.com/connect.php?tab=website I am currently using this on our live site and using the Facebook Developer Toolkit for.NET on Codeplex here: http://www.codepl... | How do I import Facebook friends from another website I am looking for a way to connect to Facebook by allowing the user to enter in their username and password and have our app connect to their account and get their contacts so that they can invite them to join their group on our site. I have written a Facebook app be... | TITLE:
How do I import Facebook friends from another website
QUESTION:
I am looking for a way to connect to Facebook by allowing the user to enter in their username and password and have our app connect to their account and get their contacts so that they can invite them to join their group on our site. I have written... | [
"facebook",
"language-agnostic"
] | 6 | 4 | 18,222 | 7 | 0 | 2008-09-17T02:59:59.567000 | 2009-06-29T02:22:04.480000 |
79,498 | 79,617 | Unable to receive JSON from JQuery ajax call | I have determined that my JSON, coming from the server, is valid (making the ajax call manually), but I would really like to use JQuery. I have also determined that the "post" URL, being sent to the server, is correct, using firebug. However, the error callback is still being triggered (parse error). I also tried datat... | Here are a few suggestions I would try: 1) the 'datatype' option you have specified should be 'dataType' (case-sensitive I believe) 2) try using the 'contentType' option as so: contentType: "application/json; charset=utf-8" I'm not sure how much that will help as it's used in the request to your post url, not in the re... | Unable to receive JSON from JQuery ajax call I have determined that my JSON, coming from the server, is valid (making the ajax call manually), but I would really like to use JQuery. I have also determined that the "post" URL, being sent to the server, is correct, using firebug. However, the error callback is still bein... | TITLE:
Unable to receive JSON from JQuery ajax call
QUESTION:
I have determined that my JSON, coming from the server, is valid (making the ajax call manually), but I would really like to use JQuery. I have also determined that the "post" URL, being sent to the server, is correct, using firebug. However, the error call... | [
"jquery",
"ajax",
"json"
] | 11 | 20 | 26,973 | 3 | 0 | 2008-09-17T03:00:04.307000 | 2008-09-17T03:22:15.410000 |
79,538 | 79,551 | Scanner cannot be resolved to a type | I just installed Ubuntu 8.04 and Eclipse. I made a very simple Hello World program in order to ensure that everything is running smoothly. When I attempted to use the Scanner class for acquiring some user input I got a very odd error. My code: import java.util.Scanner;
class Test { public static void main (String [] a... | The Scanner class is new in Java 5. I do not know what Hardy's default Java environment is, but it is not Sun's and therefore may be outdated. I recommend installing the package sun-java6-jdk to get the most up-to-date version, then telling Eclipse to use it. | Scanner cannot be resolved to a type I just installed Ubuntu 8.04 and Eclipse. I made a very simple Hello World program in order to ensure that everything is running smoothly. When I attempted to use the Scanner class for acquiring some user input I got a very odd error. My code: import java.util.Scanner;
class Test {... | TITLE:
Scanner cannot be resolved to a type
QUESTION:
I just installed Ubuntu 8.04 and Eclipse. I made a very simple Hello World program in order to ensure that everything is running smoothly. When I attempted to use the Scanner class for acquiring some user input I got a very odd error. My code: import java.util.Scan... | [
"java",
"eclipse",
"ubuntu"
] | 0 | 5 | 26,868 | 5 | 0 | 2008-09-17T03:05:13.390000 | 2008-09-17T03:08:21.183000 |
79,542 | 79,559 | scriptResourceHandler | Does anyone know much about the Asp.Net webconfig element? I'm looking at it because I'm implementing an MS Ajax updatepanel in an existing site, and after doing some looking around, on the web I'm not finding a lot of info about it. And to avoid the flood of replies telling me how inefficient the update panel is, and ... | Given the traversing of the DOM that is actually happening with an update panel it's generally not the content that is hindering performance.. it is the PC/Browser. I know this is exactly what you aren't looking for but unless your panel contains a significant amount of data then compression and caching isn't going to ... | scriptResourceHandler Does anyone know much about the Asp.Net webconfig element? I'm looking at it because I'm implementing an MS Ajax updatepanel in an existing site, and after doing some looking around, on the web I'm not finding a lot of info about it. And to avoid the flood of replies telling me how inefficient the... | TITLE:
scriptResourceHandler
QUESTION:
Does anyone know much about the Asp.Net webconfig element? I'm looking at it because I'm implementing an MS Ajax updatepanel in an existing site, and after doing some looking around, on the web I'm not finding a lot of info about it. And to avoid the flood of replies telling me h... | [
"asp.net",
"ajax",
"asp.net-ajax"
] | 0 | 1 | 1,665 | 2 | 0 | 2008-09-17T03:06:22.717000 | 2008-09-17T03:10:32.300000 |
79,582 | 79,622 | Best win32 compiled scripting language? | What is the best compilable scripting language for Win32? I prefer.EXE's because I don't want to install the runtime on the servers first (my company administrates many via remote), but I need to be able to do things like NTFS permissions and (if possible) APIs over the network. There was a small Perl which appeared to... | Have you considered using an EXE maker? For example, you can code in Python and use py2exe to create a standalone EXE that runs anywhere (it actually packages Python into the exe, so you don't have to install the runtime). | Best win32 compiled scripting language? What is the best compilable scripting language for Win32? I prefer.EXE's because I don't want to install the runtime on the servers first (my company administrates many via remote), but I need to be able to do things like NTFS permissions and (if possible) APIs over the network. ... | TITLE:
Best win32 compiled scripting language?
QUESTION:
What is the best compilable scripting language for Win32? I prefer.EXE's because I don't want to install the runtime on the servers first (my company administrates many via remote), but I need to be able to do things like NTFS permissions and (if possible) APIs ... | [
"windows",
"compiler-construction",
"scripting"
] | 2 | 5 | 1,977 | 5 | 0 | 2008-09-17T03:15:16.207000 | 2008-09-17T03:23:15.483000 |
79,594 | 79,614 | Mapping internal data elements to external vendors' XML schema | I'm considering Altova MapForce (or something similar) to produce either XSLT and/or a Java or C# class to do the translation. Today, we pull data right out of the database and manually build an XML string that we post to a webservice. Should it be db -> (internal)XML -> XSLT -> (External)XML? What do you folks do out ... | I would use one of the out-of-the-box XML serialization classes to do your internal XML generation, and then use XSLT to transform to the external XML. You might generate a schema as well to enforce that the translation code (whatever will drive your XSLT translation) continues to get the XML it is expecting for transl... | Mapping internal data elements to external vendors' XML schema I'm considering Altova MapForce (or something similar) to produce either XSLT and/or a Java or C# class to do the translation. Today, we pull data right out of the database and manually build an XML string that we post to a webservice. Should it be db -> (i... | TITLE:
Mapping internal data elements to external vendors' XML schema
QUESTION:
I'm considering Altova MapForce (or something similar) to produce either XSLT and/or a Java or C# class to do the translation. Today, we pull data right out of the database and manually build an XML string that we post to a webservice. Sho... | [
"c#",
"xml",
"xslt",
"mapping",
"coldfusion"
] | 4 | 3 | 907 | 4 | 0 | 2008-09-17T03:17:33.033000 | 2008-09-17T03:22:02.243000 |
79,602 | 79,670 | How do I get started processing email related to website activity? | I am writing a web application that requires user interaction via email. I'm curious if there is a best practice or recommended source for learning about processing email. I am writing my application in Python, but I'm not sure what mail server to use or how to format the message or subject line to account for automate... | There are some pretty serious concerns here for how to send email automatically, and here are a few: Use an email library. Python includes one called 'email'. This is your friend, it will stop you from doing anything tragically wrong. Read an example from the Python Manual. Some points that will stop you from getting b... | How do I get started processing email related to website activity? I am writing a web application that requires user interaction via email. I'm curious if there is a best practice or recommended source for learning about processing email. I am writing my application in Python, but I'm not sure what mail server to use o... | TITLE:
How do I get started processing email related to website activity?
QUESTION:
I am writing a web application that requires user interaction via email. I'm curious if there is a best practice or recommended source for learning about processing email. I am writing my application in Python, but I'm not sure what ma... | [
"python",
"email"
] | 1 | 4 | 436 | 2 | 0 | 2008-09-17T03:19:29.003000 | 2008-09-17T03:31:07.383000 |
79,612 | 79,645 | How to save a public html page with all media and preserve structure | Looking for a Linux application (or Firefox extension) that will allow me to scrape an HTML mockup and keep the page's integrity. Firefox does an almost perfect job but doesn't grab images referenced in the CSS. The Scrapbook extension for Firefox gets everything, but flattens the directory structure. I wouldn't terrib... | See Website Mirroring With wget wget --mirror –w 2 –p --HTML-extension –-convert-links http://www.yourdomain.com | How to save a public html page with all media and preserve structure Looking for a Linux application (or Firefox extension) that will allow me to scrape an HTML mockup and keep the page's integrity. Firefox does an almost perfect job but doesn't grab images referenced in the CSS. The Scrapbook extension for Firefox get... | TITLE:
How to save a public html page with all media and preserve structure
QUESTION:
Looking for a Linux application (or Firefox extension) that will allow me to scrape an HTML mockup and keep the page's integrity. Firefox does an almost perfect job but doesn't grab images referenced in the CSS. The Scrapbook extensi... | [
"css",
"screen-scraping",
"screen",
"directory-structure"
] | 6 | 7 | 2,882 | 4 | 0 | 2008-09-17T03:21:33.180000 | 2008-09-17T03:26:32.077000 |
79,632 | 81,752 | Ruby/Rails Collection to Collection | I have a two tables joined with a join table - this is just pseudo code: Library Book LibraryBooks What I need to do is if i have the id of a library, i want to get all the libraries that all the books that this library has are in. So if i have Library 1, and Library 1 has books A and B in them, and books A and B are i... | l = Library.find(:all,:include =>:books) l.books.map { |b| b.library_ids }.flatten.uniq Note that map(&:library_ids) is slower than map { |b| b.library_ids } in Ruby 1.8.6, and faster in 1.9.0. I should also mention that if you used:joins instead of include there, it would find the library and related books all in the ... | Ruby/Rails Collection to Collection I have a two tables joined with a join table - this is just pseudo code: Library Book LibraryBooks What I need to do is if i have the id of a library, i want to get all the libraries that all the books that this library has are in. So if i have Library 1, and Library 1 has books A an... | TITLE:
Ruby/Rails Collection to Collection
QUESTION:
I have a two tables joined with a join table - this is just pseudo code: Library Book LibraryBooks What I need to do is if i have the id of a library, i want to get all the libraries that all the books that this library has are in. So if i have Library 1, and Librar... | [
"ruby-on-rails",
"ruby"
] | 6 | 7 | 5,572 | 4 | 0 | 2008-09-17T03:25:18.240000 | 2008-09-17T10:18:44.753000 |
79,662 | 83,024 | Java JFormattedTextField for typing dates | I've been having trouble to make a JFormattedTextField to use dates with the format dd/MM/yyyy. Specifically, as the user types, the cursor should "jump" the slashes, and get directly to the next number position. Also, the JFormattedTextField must verify if the date entered is valid, and reject it somehow if the date i... | You may have to use a regular JTextField and call setDocument() with a custom document. I recommend extending PlainDocument, this makes it easy to validate input as the document changes, and add slashes as appropriate. | Java JFormattedTextField for typing dates I've been having trouble to make a JFormattedTextField to use dates with the format dd/MM/yyyy. Specifically, as the user types, the cursor should "jump" the slashes, and get directly to the next number position. Also, the JFormattedTextField must verify if the date entered is ... | TITLE:
Java JFormattedTextField for typing dates
QUESTION:
I've been having trouble to make a JFormattedTextField to use dates with the format dd/MM/yyyy. Specifically, as the user types, the cursor should "jump" the slashes, and get directly to the next number position. Also, the JFormattedTextField must verify if th... | [
"java",
"validation",
"date",
"mask"
] | 1 | 0 | 2,267 | 2 | 0 | 2008-09-17T03:29:03.147000 | 2008-09-17T13:14:45.470000 |
79,669 | 79,691 | How best to copy entire databases in MS SQL Server? | I need to copy about 40 databases from one server to another. The new databases should have new names, but all the same tables, data and indexes as the original databases. So far I've been: 1) creating each destination database 2) using the " Tasks->Export Data " command to create and populate tables for each database ... | Given that you're performing this on multiple databases -- you want a simple scripted solution, not a point and click solution. This is a backup script that i keep around. Get it working for one file and then modify it for many. (on source server...) BACKUP DATABASE Northwind TO DISK = 'c:\Northwind.bak'
(target serve... | How best to copy entire databases in MS SQL Server? I need to copy about 40 databases from one server to another. The new databases should have new names, but all the same tables, data and indexes as the original databases. So far I've been: 1) creating each destination database 2) using the " Tasks->Export Data " comm... | TITLE:
How best to copy entire databases in MS SQL Server?
QUESTION:
I need to copy about 40 databases from one server to another. The new databases should have new names, but all the same tables, data and indexes as the original databases. So far I've been: 1) creating each destination database 2) using the " Tasks->... | [
"sql-server",
"database"
] | 24 | 49 | 43,465 | 11 | 0 | 2008-09-17T03:30:37.883000 | 2008-09-17T03:34:50.450000 |
79,727 | 88,771 | How are the vxWorks "kernel shell" and "host shell" different? | In the vxWorks RTOS, there is a shell that allows you to issue command to your embedded system. The documentation refers to kernel shell, host shell and target shell. What is the difference between the three? | The target shell and kernel shell are the same. They refer to a shell that runs on the target. You can connect to the shell using either a serial port, or a telnet session. A task runs on the target and parses all the commands received and acts on them, outputting data back to the port. The host shell is a process that... | How are the vxWorks "kernel shell" and "host shell" different? In the vxWorks RTOS, there is a shell that allows you to issue command to your embedded system. The documentation refers to kernel shell, host shell and target shell. What is the difference between the three? | TITLE:
How are the vxWorks "kernel shell" and "host shell" different?
QUESTION:
In the vxWorks RTOS, there is a shell that allows you to issue command to your embedded system. The documentation refers to kernel shell, host shell and target shell. What is the difference between the three?
ANSWER:
The target shell and ... | [
"embedded",
"vxworks",
"rtos"
] | 7 | 9 | 4,515 | 2 | 0 | 2008-09-17T03:41:33.553000 | 2008-09-17T23:50:58.187000 |
79,736 | 668,269 | .Net Gridview alpha sorting, it needs to be numerically sorted | This is my first real question of need for any of those Gridview experts out there in the.NET world. I an creating a Gridview from codebehind and I am holding a bunch of numerical data in the columns. Although, I do add the comma in the number fields from codebehind. When I load it to the Gridview, I have the sorting a... | Instead, I just resorted to the JQUERY Table Sorter. can be found here: tablesorter | .Net Gridview alpha sorting, it needs to be numerically sorted This is my first real question of need for any of those Gridview experts out there in the.NET world. I an creating a Gridview from codebehind and I am holding a bunch of numerical data in the columns. Although, I do add the comma in the number fields from c... | TITLE:
.Net Gridview alpha sorting, it needs to be numerically sorted
QUESTION:
This is my first real question of need for any of those Gridview experts out there in the.NET world. I an creating a Gridview from codebehind and I am holding a bunch of numerical data in the columns. Although, I do add the comma in the nu... | [
"c#",
".net",
"gridview"
] | 0 | 0 | 2,673 | 5 | 0 | 2008-09-17T03:42:58.150000 | 2009-03-20T22:45:16.060000 |
79,737 | 80,813 | What's the best way to export bug tracking data from hosted HP Quality Center? | This question may be too product specifc but I'd like to know if anyone is exporting bug track data from HP Quality Center. HP Quality Center (QC) has an old school COM API but I'd rather use a web service or maybe even screen scraper to export the data into an excel spreadsheet. In any case, what's the best way to exp... | You can use this QC API Code to modify bugs/requirements. TDAPIOLELib.TDConnection connection = new TDAPIOLELib.TDConnection(); connection.InitConnectionEx("http://SERVER:8080/qcbin"); connection.Login("USERNAME", "PASSWORD"); connection.Connect("QCDOMAIN", "QCPROJECT"); TDAPIOLELib.BugFactory bugFactory = connection.B... | What's the best way to export bug tracking data from hosted HP Quality Center? This question may be too product specifc but I'd like to know if anyone is exporting bug track data from HP Quality Center. HP Quality Center (QC) has an old school COM API but I'd rather use a web service or maybe even screen scraper to exp... | TITLE:
What's the best way to export bug tracking data from hosted HP Quality Center?
QUESTION:
This question may be too product specifc but I'd like to know if anyone is exporting bug track data from HP Quality Center. HP Quality Center (QC) has an old school COM API but I'd rather use a web service or maybe even scr... | [
"excel",
"bug-tracking",
"hp-quality-center"
] | 4 | 6 | 12,024 | 4 | 0 | 2008-09-17T03:43:01.193000 | 2008-09-17T07:31:47.120000 |
79,745 | 79,817 | How to determine which version of Direct3D is installed? | We have an application which needs to use Direct3D. Specifically, it needs at least DirectX 9.0c version 4.09.0000.0904. While this should be present on all newer XP machines it might not be installed on older XP machines. How can I programmatically (using C++) determine if it is installed? I want to be able to give an... | Call DirectXSetupGetVersion: http://msdn.microsoft.com/en-us/library/microsoft.directx_sdk.directsetup.directxsetupgetversion You'll need to include dsetup.h Here's the sample code from the site: DWORD dwVersion; DWORD dwRevision; if (DirectXSetupGetVersion(&dwVersion, &dwRevision)) { printf("DirectX version is %d.%d.%... | How to determine which version of Direct3D is installed? We have an application which needs to use Direct3D. Specifically, it needs at least DirectX 9.0c version 4.09.0000.0904. While this should be present on all newer XP machines it might not be installed on older XP machines. How can I programmatically (using C++) d... | TITLE:
How to determine which version of Direct3D is installed?
QUESTION:
We have an application which needs to use Direct3D. Specifically, it needs at least DirectX 9.0c version 4.09.0000.0904. While this should be present on all newer XP machines it might not be installed on older XP machines. How can I programmatic... | [
"c++",
"windows",
"direct3d"
] | 3 | 5 | 7,634 | 4 | 0 | 2008-09-17T03:44:27.570000 | 2008-09-17T03:56:05.373000 |
79,754 | 79,833 | Unittest causing sys.exit() | No matter what I do sys.exit() is called by unittest, even the most trivial examples. I can't tell if my install is messed up or what is going on. IDLE 1.2.2 ==== No Subprocess ==== >>> import unittest >>> >>> class Test(unittest.TestCase): def testA(self): a = 1 self.assertEqual(a,1)
>>> unittest.main() option -n not... | Your example is exiting on my install too. I can make it execute the tests and stay within Python by changing unittest.main() to unittest.TextTestRunner().run(unittest.TestLoader().loadTestsFromTestCase(Test)) More information is available here in the Python Library Reference. | Unittest causing sys.exit() No matter what I do sys.exit() is called by unittest, even the most trivial examples. I can't tell if my install is messed up or what is going on. IDLE 1.2.2 ==== No Subprocess ==== >>> import unittest >>> >>> class Test(unittest.TestCase): def testA(self): a = 1 self.assertEqual(a,1)
>>> u... | TITLE:
Unittest causing sys.exit()
QUESTION:
No matter what I do sys.exit() is called by unittest, even the most trivial examples. I can't tell if my install is messed up or what is going on. IDLE 1.2.2 ==== No Subprocess ==== >>> import unittest >>> >>> class Test(unittest.TestCase): def testA(self): a = 1 self.asser... | [
"python",
"unit-testing"
] | 20 | 15 | 10,356 | 6 | 0 | 2008-09-17T03:46:55.350000 | 2008-09-17T03:59:27.830000 |
79,764 | 79,811 | Wildcard Subdomains | I know there have been a few threads on this before, but I have tried absolutely everything suggested (that I could find) and nothing has worked for me thus far... With that in mind, here is what I'm trying to do: First, I want to allow users to publish pages and give them each a subdomain of their choice (ex: user.exa... | As far as how to set up the DNS subdomain wildcard, that would be a function of your DNS hosting provider. This would be different steps depending on which hosting provider you have and would be a better question for them. Once you've set that up with the DNS host, from your web app you really are just URL rewriting, w... | Wildcard Subdomains I know there have been a few threads on this before, but I have tried absolutely everything suggested (that I could find) and nothing has worked for me thus far... With that in mind, here is what I'm trying to do: First, I want to allow users to publish pages and give them each a subdomain of their ... | TITLE:
Wildcard Subdomains
QUESTION:
I know there have been a few threads on this before, but I have tried absolutely everything suggested (that I could find) and nothing has worked for me thus far... With that in mind, here is what I'm trying to do: First, I want to allow users to publish pages and give them each a s... | [
"subdomain",
"localhost",
"wildcard",
"mamp",
"wildcard-subdomain"
] | 20 | 16 | 34,124 | 8 | 0 | 2008-09-17T03:48:10.683000 | 2008-09-17T03:55:11.773000 |
79,774 | 79,837 | Dealing with Date only dates across timezones in .Net | Ok - a bit of a mouthful. So the problem I have is this - I need to store a Date for expiry where only the date part is required and I don't want any timezone conversion. So for example if I have an expiry set to "08 March 2008" I want that value to be returned to any client - no matter what their timezone is. The prob... | You could create a struct Date that provides access to the details you want/need, like: public struct Date { public int Month; //or string instead of int public int Day; public int Year; } This is lightweight, flexible and gives you full control. | Dealing with Date only dates across timezones in .Net Ok - a bit of a mouthful. So the problem I have is this - I need to store a Date for expiry where only the date part is required and I don't want any timezone conversion. So for example if I have an expiry set to "08 March 2008" I want that value to be returned to a... | TITLE:
Dealing with Date only dates across timezones in .Net
QUESTION:
Ok - a bit of a mouthful. So the problem I have is this - I need to store a Date for expiry where only the date part is required and I don't want any timezone conversion. So for example if I have an expiry set to "08 March 2008" I want that value t... | [
".net",
"date"
] | 2 | 0 | 1,046 | 7 | 0 | 2008-09-17T03:49:15.860000 | 2008-09-17T04:00:48.373000 |
79,780 | 79,812 | Parsing HTTP Headers | I've had a new found interest in building a small, efficient web server in C and have had some trouble parsing POST methods from the HTTP Header. Would anyone have any advice as to how to handle retrieving the name/value pairs from the "posted" data? POST /test HTTP/1.1 Host: test-domain.com:7017 User-Agent: Mozilla/5.... | You can retrieve the name/value pairs by searching for newline newline or more specifically \r\n\r\n (after this, the body of the message will start). Then you can simply split the list by the &, and then split each of those returned strings between the = for name/value pairs. See the HTTP 1.1 RFC. | Parsing HTTP Headers I've had a new found interest in building a small, efficient web server in C and have had some trouble parsing POST methods from the HTTP Header. Would anyone have any advice as to how to handle retrieving the name/value pairs from the "posted" data? POST /test HTTP/1.1 Host: test-domain.com:7017 U... | TITLE:
Parsing HTTP Headers
QUESTION:
I've had a new found interest in building a small, efficient web server in C and have had some trouble parsing POST methods from the HTTP Header. Would anyone have any advice as to how to handle retrieving the name/value pairs from the "posted" data? POST /test HTTP/1.1 Host: test... | [
"c",
"http",
"post",
"header"
] | 18 | 20 | 37,325 | 4 | 0 | 2008-09-17T03:49:47.417000 | 2008-09-17T03:55:14.800000 |
79,789 | 80,134 | Elegant method for drawing hourly bar chart from time-interval data? | I have a list of timesheet entries that show a start and stop time. This is sitting in a MySQL database. I need to create bar charts based on this data with the 24 hours of the day along the bottom and the amount of man-hours worked for each hour of the day. For example, if Alice worked a job from 15:30 to 19:30 and Bo... | Create a table with just time in it from midnight to midnight containing each minute of the day. In the data warehouse world we would call this a time dimension. Here's an example: TIME_DIM -id -time_of_day -interval_15 -interval_30 an example of the data in the table would be id time_of_day interval_15 interval_30 1 0... | Elegant method for drawing hourly bar chart from time-interval data? I have a list of timesheet entries that show a start and stop time. This is sitting in a MySQL database. I need to create bar charts based on this data with the 24 hours of the day along the bottom and the amount of man-hours worked for each hour of t... | TITLE:
Elegant method for drawing hourly bar chart from time-interval data?
QUESTION:
I have a list of timesheet entries that show a start and stop time. This is sitting in a MySQL database. I need to create bar charts based on this data with the 24 hours of the day along the bottom and the amount of man-hours worked ... | [
"sql",
"excel",
"charts",
"group-by"
] | 3 | 2 | 4,157 | 4 | 0 | 2008-09-17T03:51:32.140000 | 2008-09-17T04:55:55.823000 |
79,797 | 79,913 | How to convert local time string to UTC? | How do I convert a datetime string in local time to a string in UTC time? I'm sure I've done this before, but can't find it and SO will hopefully help me (and others) do that in future. Clarification: For example, if I have 2008-09-17 14:02:00 in my local timezone ( +10 ), I'd like to generate a string with the equival... | Thanks @rofly, the full conversion from string to string is as follows: import time time.strftime("%Y-%m-%d %H:%M:%S", time.gmtime(time.mktime(time.strptime("2008-09-17 14:04:00", "%Y-%m-%d %H:%M:%S")))) My summary of the time / calendar functions: time.strptime string --> tuple (no timezone applied, so matches string)... | How to convert local time string to UTC? How do I convert a datetime string in local time to a string in UTC time? I'm sure I've done this before, but can't find it and SO will hopefully help me (and others) do that in future. Clarification: For example, if I have 2008-09-17 14:02:00 in my local timezone ( +10 ), I'd l... | TITLE:
How to convert local time string to UTC?
QUESTION:
How do I convert a datetime string in local time to a string in UTC time? I'm sure I've done this before, but can't find it and SO will hopefully help me (and others) do that in future. Clarification: For example, if I have 2008-09-17 14:02:00 in my local timez... | [
"python",
"datetime",
"utc",
"localtime"
] | 426 | 71 | 799,628 | 26 | 0 | 2008-09-17T03:52:42.700000 | 2008-09-17T04:15:39.290000 |
79,809 | 79,824 | What is the difference between file modification time and file changed time? | I am confused between the term file modification time and file changed time. Can anyone help to make it clearer? | mtime is modification time - contents have changed. ctime is status change time - perms and ownership as well as contents. Wikipedia says: * mtime: time of last modification (ls -l), * ctime: time of last status change (ls -lc) and * atime: time of last access (ls -lu). Note that ctime is not the time of file creation.... | What is the difference between file modification time and file changed time? I am confused between the term file modification time and file changed time. Can anyone help to make it clearer? | TITLE:
What is the difference between file modification time and file changed time?
QUESTION:
I am confused between the term file modification time and file changed time. Can anyone help to make it clearer?
ANSWER:
mtime is modification time - contents have changed. ctime is status change time - perms and ownership a... | [
"operating-system",
"filesystems"
] | 25 | 32 | 13,965 | 1 | 0 | 2008-09-17T03:54:55.237000 | 2008-09-17T03:58:13.717000 |
79,816 | 79,970 | Need javascript code for button press and hold | I'd like a short smallest possible javascript routine that when a mousedown occurs on a button it first responds just like a mouseclick and then if the user keeps the button pressed it responds as if the user was continously sending mouseclicks and after a while with the button held down acts as if the user was acceler... | function holdit(btn, action, start, speedup) { var t;
var repeat = function () { action(); t = setTimeout(repeat, start); start = start / speedup; }
btn.mousedown = function() { repeat(); }
btn.mouseup = function () { clearTimeout(t); } };
/* to use */ holdit(btn, function () { }, 1000, 2); /* x..1000ms..x..500ms..... | Need javascript code for button press and hold I'd like a short smallest possible javascript routine that when a mousedown occurs on a button it first responds just like a mouseclick and then if the user keeps the button pressed it responds as if the user was continously sending mouseclicks and after a while with the b... | TITLE:
Need javascript code for button press and hold
QUESTION:
I'd like a short smallest possible javascript routine that when a mousedown occurs on a button it first responds just like a mouseclick and then if the user keeps the button pressed it responds as if the user was continously sending mouseclicks and after ... | [
"javascript",
"mouse"
] | 20 | 23 | 44,193 | 7 | 0 | 2008-09-17T03:55:36.827000 | 2008-09-17T04:25:29.390000 |
79,843 | 79,933 | What is the best way to load a Hibernate object graph before using it in a UI? | The situation is this: You have a Hibernate context with an object graph that has some lazy loading defined. You want to use the Hibernate objects in your UI as is without having to copy the data somewhere. There are different UI contexts that require different amounts of data. The data is too big to just eager load th... | Let's say you have the Client and at one point you have to something with his Orders and maybe he has a Bonus for his Orders. Then I would define a Repository with a fluent interface that will allow me to say something like: new ClientRepo().LoadClientBy(id).WithOrders().WithBonus().OrderByName(); And there you have th... | What is the best way to load a Hibernate object graph before using it in a UI? The situation is this: You have a Hibernate context with an object graph that has some lazy loading defined. You want to use the Hibernate objects in your UI as is without having to copy the data somewhere. There are different UI contexts th... | TITLE:
What is the best way to load a Hibernate object graph before using it in a UI?
QUESTION:
The situation is this: You have a Hibernate context with an object graph that has some lazy loading defined. You want to use the Hibernate objects in your UI as is without having to copy the data somewhere. There are differ... | [
"java",
"hibernate"
] | 1 | 2 | 2,206 | 3 | 0 | 2008-09-17T04:02:00.993000 | 2008-09-17T04:19:52.180000 |
79,850 | 80,425 | How do you design data models for Bigtable/Datastore (GAE)? | Since the Google App Engine Datastore is based on Bigtable and we know that's not a relational database, how do you design a database schema / data model for applications that use this type of database system? | Designing a bigtable schema is an open process, and basically requires you to think about: The access patterns you will be using and how often each will be used The relationships between your types What indices you are going to need The write patterns you will be using (in order to effectively spread load) GAE's datast... | How do you design data models for Bigtable/Datastore (GAE)? Since the Google App Engine Datastore is based on Bigtable and we know that's not a relational database, how do you design a database schema / data model for applications that use this type of database system? | TITLE:
How do you design data models for Bigtable/Datastore (GAE)?
QUESTION:
Since the Google App Engine Datastore is based on Bigtable and we know that's not a relational database, how do you design a database schema / data model for applications that use this type of database system?
ANSWER:
Designing a bigtable sc... | [
"python",
"database",
"google-app-engine",
"bigtable"
] | 18 | 19 | 8,868 | 3 | 0 | 2008-09-17T04:02:53.720000 | 2008-09-17T06:02:38.567000 |
79,853 | 83,002 | Network Map Algorithm that Detects Unmanaged Layer 2 Switches? | I've inherited a network spread out over a warehouse/front office consisting of approximately 50 desktop PCs, various servers, network printers, and routers/switches. The "intelligent" routers live in the server room. As the company has grown, we've annexed additional space and not very elegantly run various lengths of... | An idea could be to use a program like 3com network director trial version (or The Dude). Use it to discover all of your workstations and anything else with an IP address. Wait for a quiet time and unplug each hub/switch... you'll then at least begin to be able to make a map, the rest will be crawling about following c... | Network Map Algorithm that Detects Unmanaged Layer 2 Switches? I've inherited a network spread out over a warehouse/front office consisting of approximately 50 desktop PCs, various servers, network printers, and routers/switches. The "intelligent" routers live in the server room. As the company has grown, we've annexed... | TITLE:
Network Map Algorithm that Detects Unmanaged Layer 2 Switches?
QUESTION:
I've inherited a network spread out over a warehouse/front office consisting of approximately 50 desktop PCs, various servers, network printers, and routers/switches. The "intelligent" routers live in the server room. As the company has gr... | [
"networking",
"topology"
] | 11 | 4 | 13,937 | 9 | 0 | 2008-09-17T04:03:17.027000 | 2008-09-17T13:12:54.413000 |
79,875 | 79,900 | C# utility to create a CA | I'd like to create a utility in C# to allow someone to easily create a Certificate Authority (CA) in Windows. Any ideas/suggestions? I know I can use OpenSSL to do this. In the end, I'll want this utility to do more than just generate a CA. I'd also like to avoid requiring the installation of OpenSSL in order to run my... | Since OpenSSL is Apache-licensed (i.e. BSD-style), you can simply distribute it as a DLL along with your application. (Maybe build it yourself to have only the features you need and all in a single DLL.) Then use p/invoke calls to talk with this DLL. (Maybe you can even link the native code straight into your.NET execu... | C# utility to create a CA I'd like to create a utility in C# to allow someone to easily create a Certificate Authority (CA) in Windows. Any ideas/suggestions? I know I can use OpenSSL to do this. In the end, I'll want this utility to do more than just generate a CA. I'd also like to avoid requiring the installation of ... | TITLE:
C# utility to create a CA
QUESTION:
I'd like to create a utility in C# to allow someone to easily create a Certificate Authority (CA) in Windows. Any ideas/suggestions? I know I can use OpenSSL to do this. In the end, I'll want this utility to do more than just generate a CA. I'd also like to avoid requiring th... | [
"c#",
"openssl",
"certificate-authority"
] | 1 | 3 | 1,983 | 2 | 0 | 2008-09-17T04:07:25.690000 | 2008-09-17T04:12:48.143000 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.