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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
126,011 | 126,742 | Monitoring a server-side process on Rails application using AJAX XMLHttpRequest | I'm using the following in the web page but can't get a response from the server while it's processing <% form_for(:fmfile,:url => '/fmfiles',:html => {:method =>:post,:name => 'Form_Import',:enctype => 'multipart/form-data' } ) do |f| %>... <%= f.file_field:document,:accept => 'text/xml',:name => 'fmfile_document' %> ... | If you are not seeing messages in your log file for the call to 'progress_monitor' then it is possible that the request is never being sent. Try this: Try using the full URL instead of the relative URL for the Ajax.Request. I have had problems with relative URLs on some browsers with the Ajax.Request. Enable Firebug or... | Monitoring a server-side process on Rails application using AJAX XMLHttpRequest I'm using the following in the web page but can't get a response from the server while it's processing <% form_for(:fmfile,:url => '/fmfiles',:html => {:method =>:post,:name => 'Form_Import',:enctype => 'multipart/form-data' } ) do |f| %>..... | TITLE:
Monitoring a server-side process on Rails application using AJAX XMLHttpRequest
QUESTION:
I'm using the following in the web page but can't get a response from the server while it's processing <% form_for(:fmfile,:url => '/fmfiles',:html => {:method =>:post,:name => 'Form_Import',:enctype => 'multipart/form-dat... | [
"javascript",
"ruby-on-rails",
"ajax",
"xmlhttprequest"
] | 0 | 2 | 1,459 | 1 | 0 | 2008-09-24T08:23:52.790000 | 2008-09-24T12:12:53.567000 |
126,012 | 126,040 | View Temporary Table Created from Stored Procedure | I have a stored procedure in SQL 2005. The Stored Procedure is actually creating temporary tables in the beginning of SP and deleting it in the end. I am now debugging the SP in VS 2005. In between the SP i would want to know the contents into the temporary table. Can anybody help in in viewing the contents of the temp... | There are several kinds of temporary tables, I think you could use the table which is not dropped after SP used it. Just make sure you don't call the same SP twice or you'll get an error trying to create an existing table. Or just drop the temp table after you see it's content. So instead of using a table variable ( @t... | View Temporary Table Created from Stored Procedure I have a stored procedure in SQL 2005. The Stored Procedure is actually creating temporary tables in the beginning of SP and deleting it in the end. I am now debugging the SP in VS 2005. In between the SP i would want to know the contents into the temporary table. Can ... | TITLE:
View Temporary Table Created from Stored Procedure
QUESTION:
I have a stored procedure in SQL 2005. The Stored Procedure is actually creating temporary tables in the beginning of SP and deleting it in the end. I am now debugging the SP in VS 2005. In between the SP i would want to know the contents into the tem... | [
"sql",
"sql-server",
"stored-procedures"
] | 6 | 15 | 72,003 | 6 | 0 | 2008-09-24T08:24:00.687000 | 2008-09-24T08:31:59.527000 |
126,028 | 126,553 | How to write an installer that checks for OpenGL support? | We have a 3D viewer that uses OpenGL, but our clients sometimes complain about it "not working". We suspect that most of these issues stem from them trying to use, what is in effect a modern 3d real-time game, on a business laptop computer. How can we, in the Windows MSI installer we use, check for support for OpenGL? ... | Depends on what the customers mean by "not working". It could be one of: it does not install/launch at all, because of lack of some OpenGL support. it launches, but crashes further on. it launches, does not crash, but rendering is corrupt. it launches and renders everything correctly, but performance is abysmal. All Wi... | How to write an installer that checks for OpenGL support? We have a 3D viewer that uses OpenGL, but our clients sometimes complain about it "not working". We suspect that most of these issues stem from them trying to use, what is in effect a modern 3d real-time game, on a business laptop computer. How can we, in the Wi... | TITLE:
How to write an installer that checks for OpenGL support?
QUESTION:
We have a 3D viewer that uses OpenGL, but our clients sometimes complain about it "not working". We suspect that most of these issues stem from them trying to use, what is in effect a modern 3d real-time game, on a business laptop computer. How... | [
"windows",
"opengl",
"windows-installer"
] | 6 | 10 | 2,917 | 3 | 0 | 2008-09-24T08:29:02.560000 | 2008-09-24T11:17:37.070000 |
126,036 | 434,848 | Checking stack usage at compile time | Is there a way to know and output the stack size needed by a function at compile time in C? Here is what I would like to know: Let's take some function: void foo(int a) { char c[5]; char * s; //do something return; } When compiling this function, I would like to know how much stack space it will consume whent it is cal... | Linux kernel code runs on a 4K stack on x86. Hence they care. What they use to check that, is a perl script they wrote, which you may find as scripts/checkstack.pl in a recent kernel tarball (2.6.25 has got it). It runs on the output of objdump, usage documentation is in the initial comment. I think I already used it f... | Checking stack usage at compile time Is there a way to know and output the stack size needed by a function at compile time in C? Here is what I would like to know: Let's take some function: void foo(int a) { char c[5]; char * s; //do something return; } When compiling this function, I would like to know how much stack ... | TITLE:
Checking stack usage at compile time
QUESTION:
Is there a way to know and output the stack size needed by a function at compile time in C? Here is what I would like to know: Let's take some function: void foo(int a) { char c[5]; char * s; //do something return; } When compiling this function, I would like to kn... | [
"c",
"compiler-construction",
"callstack"
] | 35 | 13 | 12,251 | 7 | 0 | 2008-09-24T08:30:33.167000 | 2009-01-12T08:59:27.627000 |
126,044 | 128,164 | Delphi 2009 + Unicode + Char-size | I just got Delphi 2009 and have previously read some articles about modifications that might be necessary because of the switch to Unicode strings. Mostly, it is mentioned that sizeof(char) is not guaranteed to be 1 anymore. But why would this be interesting regarding string manipulation? For example, if I use an AnsiS... | With Unicode SizeOf(SomeChar) <> Length(SomeChar). Essentially the length of a string is less then the sum of the size of its char s. As long as you don't assume SizeOf(Char) = 1, or SizeOf(SomeString[x]) = 1 (since both are FALSE now) or try to interchange byte s with char s, then you shouldn't have any trouble. Any p... | Delphi 2009 + Unicode + Char-size I just got Delphi 2009 and have previously read some articles about modifications that might be necessary because of the switch to Unicode strings. Mostly, it is mentioned that sizeof(char) is not guaranteed to be 1 anymore. But why would this be interesting regarding string manipulati... | TITLE:
Delphi 2009 + Unicode + Char-size
QUESTION:
I just got Delphi 2009 and have previously read some articles about modifications that might be necessary because of the switch to Unicode strings. Mostly, it is mentioned that sizeof(char) is not guaranteed to be 1 anymore. But why would this be interesting regarding... | [
"delphi",
"unicode",
"delphi-2009"
] | 6 | 5 | 4,733 | 7 | 0 | 2008-09-24T08:33:07.527000 | 2008-09-24T16:20:03.350000 |
126,068 | 126,081 | How would you implement database updates via email? | I'm building a public website which has its own domain name with pop/smtp mail services. I'm considering giving users the option to update their data via email - something similar to the functionality found in Flickr or Blogger where you email posts to a special email address. The email data is then processed and store... | For starters you need to have hosting that allows you to create a catch-all mailbox. Secondly you need a good POP3 or IMAP library, which is not included AFAIK in the.NET stack. Then you would write a Command Line application or a Service that regularly checks the mailbox, pulls messages, inserts content in db based on... | How would you implement database updates via email? I'm building a public website which has its own domain name with pop/smtp mail services. I'm considering giving users the option to update their data via email - something similar to the functionality found in Flickr or Blogger where you email posts to a special email... | TITLE:
How would you implement database updates via email?
QUESTION:
I'm building a public website which has its own domain name with pop/smtp mail services. I'm considering giving users the option to update their data via email - something similar to the functionality found in Flickr or Blogger where you email posts ... | [
"asp.net",
"database",
"email"
] | 3 | 3 | 1,137 | 6 | 0 | 2008-09-24T08:44:54.457000 | 2008-09-24T08:49:11.203000 |
126,070 | 126,087 | Decode an UTF8 email header | I have an email subject of the form: =?utf-8?B?T3.....?= The body of the email is utf-8 base64 encoded - and has decoded fine. I am current using Perl's Email::MIME module to decode the email. What is the meaning of the =?utf-8 delimiter and how do I extract information from this string? | The encoded-word tokens (as per RFC 2047 ) can occur in values of some headers. They are parsed as follows: =????= Charset is UTF-8 in this case, the encoding is B which means base64 (the other option is Q which means Quoted Printable). To read it, first decode the base64, then treat it as UTF-8 characters. Also read t... | Decode an UTF8 email header I have an email subject of the form: =?utf-8?B?T3.....?= The body of the email is utf-8 base64 encoded - and has decoded fine. I am current using Perl's Email::MIME module to decode the email. What is the meaning of the =?utf-8 delimiter and how do I extract information from this string? | TITLE:
Decode an UTF8 email header
QUESTION:
I have an email subject of the form: =?utf-8?B?T3.....?= The body of the email is utf-8 base64 encoded - and has decoded fine. I am current using Perl's Email::MIME module to decode the email. What is the meaning of the =?utf-8 delimiter and how do I extract information fro... | [
"perl",
"email",
"utf-8",
"header"
] | 26 | 42 | 34,281 | 5 | 0 | 2008-09-24T08:45:35.703000 | 2008-09-24T08:51:41.087000 |
126,073 | 126,264 | Modular web apps | I've been looking into OSGi recently and think it looks like a really good idea for modular Java apps. However, I was wondering how OSGi would work in a web application, where you don't just have code to worry about - also HTML, images, CSS, that sort of thing. At work we're building an application which has multiple '... | You are very right in thinking there are synergies here, we have a modular web app where the app itself is assembled automatically from independent components (OSGi bundles) where each bundle contributes its own pages, resources, css and optionally javascript. We don't use JSF (Spring MVC here) so I can't comment on th... | Modular web apps I've been looking into OSGi recently and think it looks like a really good idea for modular Java apps. However, I was wondering how OSGi would work in a web application, where you don't just have code to worry about - also HTML, images, CSS, that sort of thing. At work we're building an application whi... | TITLE:
Modular web apps
QUESTION:
I've been looking into OSGi recently and think it looks like a really good idea for modular Java apps. However, I was wondering how OSGi would work in a web application, where you don't just have code to worry about - also HTML, images, CSS, that sort of thing. At work we're building ... | [
"java",
"web-applications",
"jsf",
"modularity"
] | 31 | 36 | 10,676 | 8 | 0 | 2008-09-24T08:46:05.233000 | 2008-09-24T09:47:43.137000 |
126,100 | 4,889,658 | How to efficiently count the number of keys/properties of an object in JavaScript | What's the fastest way to count the number of keys/properties of an object? Is it possible to do this without iterating over the object? I.e., without doing: var count = 0; for (k in myobj) if (myobj.hasOwnProperty(k)) ++count; (Firefox did provide a magic __count__ property, but this was removed somewhere around versi... | To do this in any ES5 -compatible environment, such as Node.js, Chrome, Internet Explorer 9+, Firefox 4+, or Safari 5+: Object.keys(obj).length Browser compatibility Object.keys documentation (includes a method you can add to non-ES5 browsers) | How to efficiently count the number of keys/properties of an object in JavaScript What's the fastest way to count the number of keys/properties of an object? Is it possible to do this without iterating over the object? I.e., without doing: var count = 0; for (k in myobj) if (myobj.hasOwnProperty(k)) ++count; (Firefox d... | TITLE:
How to efficiently count the number of keys/properties of an object in JavaScript
QUESTION:
What's the fastest way to count the number of keys/properties of an object? Is it possible to do this without iterating over the object? I.e., without doing: var count = 0; for (k in myobj) if (myobj.hasOwnProperty(k)) +... | [
"javascript",
"performance",
"properties",
"count",
"key"
] | 2,004 | 3,159 | 1,031,416 | 19 | 0 | 2008-09-24T08:56:21.263000 | 2011-02-03T17:47:20.957000 |
126,102 | 132,791 | EPiServer Development | Aside from Episerver.com What other websites do people who develop using EPiServer use as development resources!? Been using coderesort.com but I find that it lacks examples of how to do stuff. Many thanks, J | Regarding missing examples on CodeResort, did you register and log in? It is running on Trac, which means all modules (committed to the hosted Subversion repository) is available with full source code, directly browsable. There is lots of code in there! See https://www.coderesort.com/p/epicode/browser /Steve | EPiServer Development Aside from Episerver.com What other websites do people who develop using EPiServer use as development resources!? Been using coderesort.com but I find that it lacks examples of how to do stuff. Many thanks, J | TITLE:
EPiServer Development
QUESTION:
Aside from Episerver.com What other websites do people who develop using EPiServer use as development resources!? Been using coderesort.com but I find that it lacks examples of how to do stuff. Many thanks, J
ANSWER:
Regarding missing examples on CodeResort, did you register and... | [
"api",
"sdk",
"episerver"
] | 10 | 4 | 1,776 | 9 | 0 | 2008-09-24T08:57:17.627000 | 2008-09-25T11:48:01.530000 |
126,109 | 126,930 | Mnesia write fails | I defined a record named log. I want to create an mnesia table with name log_table. When I try to write a record to table, I get bad_type error as follows: (node1@kitt)4> mnesia:create_table(log_table, [{ram_copies, [node()]}, {attributes, record_info(fields, log)}]). {atomic,ok}
(node1@kitt)5> mnesia:dirty_write(log_... | By default the record name is assumed to be the same as the table name. To fix this you should either name your table just log or append the option {record_name, log} in your table options (as you've done in your fix). It is usually good practice to let your record and table be named the same thing, it makes the code e... | Mnesia write fails I defined a record named log. I want to create an mnesia table with name log_table. When I try to write a record to table, I get bad_type error as follows: (node1@kitt)4> mnesia:create_table(log_table, [{ram_copies, [node()]}, {attributes, record_info(fields, log)}]). {atomic,ok}
(node1@kitt)5> mnes... | TITLE:
Mnesia write fails
QUESTION:
I defined a record named log. I want to create an mnesia table with name log_table. When I try to write a record to table, I get bad_type error as follows: (node1@kitt)4> mnesia:create_table(log_table, [{ram_copies, [node()]}, {attributes, record_info(fields, log)}]). {atomic,ok}
(... | [
"erlang",
"mnesia"
] | 4 | 7 | 2,767 | 3 | 0 | 2008-09-24T08:59:01.710000 | 2008-09-24T12:51:38.343000 |
126,114 | 127,671 | Calculate client-server time difference in Borland Starteam server 8 | Problem. I need a way to find Starteam server time through Starteam Java SDK 8.0. Version of server is 8.0.172 so method Server.getCurrentTime() is not available since it was added only in server version 9.0. Motivation. My application needs to use views at specific dates. So if there's some difference in system time b... | After some investigation I haven't found any cleaner solution than using a temporary item. My app requests the item's time of creation and compares it with local time. Here's the method I use to get server time: public Date getCurrentServerTime() { Folder rootFolder = project.getDefaultView().getRootFolder();
Topic ne... | Calculate client-server time difference in Borland Starteam server 8 Problem. I need a way to find Starteam server time through Starteam Java SDK 8.0. Version of server is 8.0.172 so method Server.getCurrentTime() is not available since it was added only in server version 9.0. Motivation. My application needs to use vi... | TITLE:
Calculate client-server time difference in Borland Starteam server 8
QUESTION:
Problem. I need a way to find Starteam server time through Starteam Java SDK 8.0. Version of server is 8.0.172 so method Server.getCurrentTime() is not available since it was added only in server version 9.0. Motivation. My applicati... | [
"java",
"time",
"starteam"
] | 1 | 2 | 1,129 | 4 | 0 | 2008-09-24T09:00:46.370000 | 2008-09-24T14:57:23.780000 |
126,116 | 126,121 | Linux commands from Java | Is it possbile to execute linux commands with java? I am trying to create a web servlet to allow ftp users to change their passwords without ssh login access. I would like to execute the next commands: # adduser -s /sbin/nologin clientA -d /home/mainclient/clientA # passwd clientA # cd /home/mainclient; chgrp -R maincl... | Check out this. However, doing what you are talking about is way outside spec, and I wouldnt reccommend it. To get it to work you are going to either run your app server as root, or use some other mechanism to give the user the app server is running as permission to execute these privileged commands. One small screw-up... | Linux commands from Java Is it possbile to execute linux commands with java? I am trying to create a web servlet to allow ftp users to change their passwords without ssh login access. I would like to execute the next commands: # adduser -s /sbin/nologin clientA -d /home/mainclient/clientA # passwd clientA # cd /home/ma... | TITLE:
Linux commands from Java
QUESTION:
Is it possbile to execute linux commands with java? I am trying to create a web servlet to allow ftp users to change their passwords without ssh login access. I would like to execute the next commands: # adduser -s /sbin/nologin clientA -d /home/mainclient/clientA # passwd cli... | [
"java",
"linux"
] | 6 | 9 | 11,970 | 5 | 0 | 2008-09-24T09:01:40.783000 | 2008-09-24T09:04:12.680000 |
126,138 | 126,366 | How do I handle multiple streams in Java? | I'm trying to run a process and do stuff with its input, output and error streams. The obvious way to do this is to use something like select(), but the only thing I can find in Java that does that is Selector.select(), which takes a Channel. It doesn't appear to be possible to get a Channel from an InputStream or Outp... | As you said, the solution outlined in this Answer is the traditional way of reading both stdout and stderr from a Process. A thread-per-stream is the way to go, even though it is slightly annoying. | How do I handle multiple streams in Java? I'm trying to run a process and do stuff with its input, output and error streams. The obvious way to do this is to use something like select(), but the only thing I can find in Java that does that is Selector.select(), which takes a Channel. It doesn't appear to be possible to... | TITLE:
How do I handle multiple streams in Java?
QUESTION:
I'm trying to run a process and do stuff with its input, output and error streams. The obvious way to do this is to use something like select(), but the only thing I can find in Java that does that is Selector.select(), which takes a Channel. It doesn't appear... | [
"java",
"process",
"io"
] | 5 | 4 | 6,989 | 2 | 0 | 2008-09-24T09:07:41 | 2008-09-24T10:16:41.193000 |
126,141 | 126,193 | How do you find out which version of GTK+ is installed on Ubuntu? | I need to determine which version of GTK+ is installed on Ubuntu Man does not seem to help | This suggestion will tell you which minor version of 2.0 is installed. Different major versions will have different package names because they can co-exist on the system (in order to support applications built with older versions). Even for development files, which normally would only let you have one version on the sy... | How do you find out which version of GTK+ is installed on Ubuntu? I need to determine which version of GTK+ is installed on Ubuntu Man does not seem to help | TITLE:
How do you find out which version of GTK+ is installed on Ubuntu?
QUESTION:
I need to determine which version of GTK+ is installed on Ubuntu Man does not seem to help
ANSWER:
This suggestion will tell you which minor version of 2.0 is installed. Different major versions will have different package names becaus... | [
"linux",
"ubuntu",
"gtk",
"gnome"
] | 111 | 85 | 223,565 | 14 | 0 | 2008-09-24T09:08:05.027000 | 2008-09-24T09:26:40.533000 |
126,155 | 126,206 | C# Array XML Serialization | I found a problem with the XML Serialization of C#. The output of the serializer is inconsistent between normal Win32 and WinCE (but surprisingly WinCE has the IMO correcter output). Win32 simply ignores the Class2 XmlRoot("c2") Attribute. Does anyone know a way how to get the WinCE like output on Win32 (because i don'... | Try [XmlArrayItem("c2")] [XmlRoot("c1")] public class Class1 { [XmlArray("items")] [XmlArrayItem("c2")] public Class2[] Items; } or [XmlType("c2")] [XmlType("c2")] public class Class2 { [XmlAttribute("name")] public string Name; } | C# Array XML Serialization I found a problem with the XML Serialization of C#. The output of the serializer is inconsistent between normal Win32 and WinCE (but surprisingly WinCE has the IMO correcter output). Win32 simply ignores the Class2 XmlRoot("c2") Attribute. Does anyone know a way how to get the WinCE like outp... | TITLE:
C# Array XML Serialization
QUESTION:
I found a problem with the XML Serialization of C#. The output of the serializer is inconsistent between normal Win32 and WinCE (but surprisingly WinCE has the IMO correcter output). Win32 simply ignores the Class2 XmlRoot("c2") Attribute. Does anyone know a way how to get t... | [
"c#",
"xml",
"serialization"
] | 29 | 45 | 77,496 | 1 | 0 | 2008-09-24T09:12:20.053000 | 2008-09-24T09:29:18.470000 |
126,161 | 126,536 | Where do the responsibilities of a Db Abstraction in PHP start and end? | In PHP, what is the best practice for laying out the responsibilities of a Db Abstraction Layer? Is OOP a good idea in terms of performance? How much should be generic object code, and how much should be very specific functions? | In most applications I have written, there are generally two different types of data access. One is for transactional operations: retrieving specific objects from the datastore, modifying them and saving them back. I've found a solid ORM to be the best solution here. Don't try writing your own (as interesting as it mig... | Where do the responsibilities of a Db Abstraction in PHP start and end? In PHP, what is the best practice for laying out the responsibilities of a Db Abstraction Layer? Is OOP a good idea in terms of performance? How much should be generic object code, and how much should be very specific functions? | TITLE:
Where do the responsibilities of a Db Abstraction in PHP start and end?
QUESTION:
In PHP, what is the best practice for laying out the responsibilities of a Db Abstraction Layer? Is OOP a good idea in terms of performance? How much should be generic object code, and how much should be very specific functions?
... | [
"php",
"sql",
"mysql",
"database"
] | 2 | 0 | 208 | 2 | 0 | 2008-09-24T09:13:44.187000 | 2008-09-24T11:12:18.737000 |
126,164 | 126,198 | How to delegate interface implementation to other class in C# | Assume the following class: public class MyEnum: IEnumerator { private List _myList = new List ();... } It is necessary to implement the IEnumerator methods in MyEnum. But is it possible to 'delegate' or redirect the implementation for IEnumerator directly to _myList without needing to implement the IEnumerator methods... | Method 1: Continue to use encapsulation and forward calls to the List implementation. class SomeObject { }
class MyEnum: IEnumerable { private List _myList = new List ();
public void Add(SomeObject o) { _myList.Add(o); }
public IEnumerator GetEnumerator() { return _myList.GetEnumerator(); }
IEnumerator IEnumerable.... | How to delegate interface implementation to other class in C# Assume the following class: public class MyEnum: IEnumerator { private List _myList = new List ();... } It is necessary to implement the IEnumerator methods in MyEnum. But is it possible to 'delegate' or redirect the implementation for IEnumerator directly t... | TITLE:
How to delegate interface implementation to other class in C#
QUESTION:
Assume the following class: public class MyEnum: IEnumerator { private List _myList = new List ();... } It is necessary to implement the IEnumerator methods in MyEnum. But is it possible to 'delegate' or redirect the implementation for IEnu... | [
"c#",
"interface"
] | 10 | 8 | 5,632 | 7 | 0 | 2008-09-24T09:14:16.883000 | 2008-09-24T09:27:31.920000 |
126,167 | 126,376 | ASP.NET - how to show a error page when uploading big file (Maximum request length exceeded)? | Application able to record error in OnError, but we are not able to do any redirect or so to show something meaningfull to user. Any ideas? I know that we can set maxRequestLength in web.config, but anyway user can exceed this limit and some normal error need to be displayed. | As you say you can setup maxRequestLength in your web.config (overriding the default 4MB of your machine.config) and if this limits is exceeded you usually get a HTTP 401.1 error. In order to handle a generic HTTP error at application level you can setup a CustomError section in your web.config within the system.web se... | ASP.NET - how to show a error page when uploading big file (Maximum request length exceeded)? Application able to record error in OnError, but we are not able to do any redirect or so to show something meaningfull to user. Any ideas? I know that we can set maxRequestLength in web.config, but anyway user can exceed this... | TITLE:
ASP.NET - how to show a error page when uploading big file (Maximum request length exceeded)?
QUESTION:
Application able to record error in OnError, but we are not able to do any redirect or so to show something meaningfull to user. Any ideas? I know that we can set maxRequestLength in web.config, but anyway us... | [
".net",
"asp.net",
"file-upload",
"maxrequestlength",
"application-onerror"
] | 12 | 6 | 11,351 | 6 | 0 | 2008-09-24T09:15:28.317000 | 2008-09-24T10:21:38.670000 |
126,179 | 126,215 | Does an index < or > MySQL queries? | If I have a query like, DELETE FROM table WHERE datetime_field < '2008-01-01 00:00:00' does having the datetime_field column indexed help? i.e. is the index only useful when using equality (or inequality) testing, or is it useful when doing an ordered comparison as well? (Suggestions for better executing this query, wi... | Maybe. In general, if there is such an index, it will use a range scan on that index if there is no "better" index on the query. However, if the optimiser decides that the range would end up being too big (i.e. include more than, say 1/3 of the rows), it probably won't use the index at all, as a table scan would be lik... | Does an index < or > MySQL queries? If I have a query like, DELETE FROM table WHERE datetime_field < '2008-01-01 00:00:00' does having the datetime_field column indexed help? i.e. is the index only useful when using equality (or inequality) testing, or is it useful when doing an ordered comparison as well? (Suggestions... | TITLE:
Does an index < or > MySQL queries?
QUESTION:
If I have a query like, DELETE FROM table WHERE datetime_field < '2008-01-01 00:00:00' does having the datetime_field column indexed help? i.e. is the index only useful when using equality (or inequality) testing, or is it useful when doing an ordered comparison as ... | [
"mysql",
"optimization",
"indexing"
] | 10 | 11 | 2,598 | 5 | 0 | 2008-09-24T09:21:54.947000 | 2008-09-24T09:33:08.600000 |
126,182 | 126,221 | Is it possible to "autopopulate" fields in IE? | the company I work for want to use a "hosted payment form" to charge our customers. A question came up on how we can populate the "payment form" automatically with information from one of our other system. We have no control over the hosed payment form, and we have to use IE. Is this possible at all? And if so, how can... | Assuming that you are essentially embedding the contents of a remote form in a frame/iframe, the you should be able to use some javascript to set values for the fields - field.value = "xxxx". That solution of course depends on the form remaining the same - any changes to the remote form will require you to update your ... | Is it possible to "autopopulate" fields in IE? the company I work for want to use a "hosted payment form" to charge our customers. A question came up on how we can populate the "payment form" automatically with information from one of our other system. We have no control over the hosed payment form, and we have to use ... | TITLE:
Is it possible to "autopopulate" fields in IE?
QUESTION:
the company I work for want to use a "hosted payment form" to charge our customers. A question came up on how we can populate the "payment form" automatically with information from one of our other system. We have no control over the hosed payment form, a... | [
"c#",
"internet-explorer"
] | 2 | 2 | 794 | 2 | 0 | 2008-09-24T09:23:00.293000 | 2008-09-24T09:34:49.393000 |
126,196 | 126,874 | .NET Compact Framework Can you get grids which have multi line text in cells? | Is it possible to show multiple lines of text in grid cells using the.NET Compact framework? We need to create a grid where the middle column contains an address. We'd like to show this over multiple lines and (possibly) apply some formatting to the final line. e.g. 123 Anywhere Street Birmingham B1 2DU tel: 0123 55555... | Take a look at Ilya Tumanov's example of custom formatting data in the DataGrid. He does custom painting of cells in it. | .NET Compact Framework Can you get grids which have multi line text in cells? Is it possible to show multiple lines of text in grid cells using the.NET Compact framework? We need to create a grid where the middle column contains an address. We'd like to show this over multiple lines and (possibly) apply some formatting... | TITLE:
.NET Compact Framework Can you get grids which have multi line text in cells?
QUESTION:
Is it possible to show multiple lines of text in grid cells using the.NET Compact framework? We need to create a grid where the middle column contains an address. We'd like to show this over multiple lines and (possibly) app... | [
".net",
"windows-mobile",
"compact-framework",
"mobile"
] | 3 | 1 | 1,729 | 3 | 0 | 2008-09-24T09:27:20.003000 | 2008-09-24T12:37:09.937000 |
126,207 | 126,219 | Best practices for consistent and comprehensive address storage in a database | Are there any best practices (or even standards) to store addresses in a consistent and comprehensive way in a database? To be more specific, I believe at this stage that there are two cases for address storage: you just need to associate an address to a person, a building or any item (the most common case). Then a fla... | I'd use an Address table, as you've suggested, and I'd base it on the data tracked by xAL. | Best practices for consistent and comprehensive address storage in a database Are there any best practices (or even standards) to store addresses in a consistent and comprehensive way in a database? To be more specific, I believe at this stage that there are two cases for address storage: you just need to associate an ... | TITLE:
Best practices for consistent and comprehensive address storage in a database
QUESTION:
Are there any best practices (or even standards) to store addresses in a consistent and comprehensive way in a database? To be more specific, I believe at this stage that there are two cases for address storage: you just nee... | [
"database",
"standards",
"modeling"
] | 27 | 3 | 19,004 | 9 | 0 | 2008-09-24T09:29:53.943000 | 2008-09-24T09:34:34.510000 |
126,228 | 126,248 | Problem: .NET code runs from one directory, but not another, on same disk | Our application is a hybrid Win32 unmanaged application and a.NET 2.0 managed application. The Win32 part is the main executable, which at some point loads and hosts the.NET 2.0 runtime and loads some managed modules to open new winforms windows. We've had our share of CASPOL-type problems, but today we have a very odd... | My first stab would be to run process monitor from MS-Sysinternals, and look what calls/results are different for these two occasions. Maybe that would give you some hints to work on (different results for the same call, some errors in the problem run that are not in the good one...) You can download process monitor fr... | Problem: .NET code runs from one directory, but not another, on same disk Our application is a hybrid Win32 unmanaged application and a.NET 2.0 managed application. The Win32 part is the main executable, which at some point loads and hosts the.NET 2.0 runtime and loads some managed modules to open new winforms windows.... | TITLE:
Problem: .NET code runs from one directory, but not another, on same disk
QUESTION:
Our application is a hybrid Win32 unmanaged application and a.NET 2.0 managed application. The Win32 part is the main executable, which at some point loads and hosts the.NET 2.0 runtime and loads some managed modules to open new... | [
".net",
"crash",
"directory",
"citrix"
] | 3 | 1 | 550 | 4 | 0 | 2008-09-24T09:37:33.847000 | 2008-09-24T09:42:42.773000 |
126,230 | 126,906 | Resources and guides to UI virtualization in WPF | UI Virtualization is an awkward terminology that describes WPF UI controls that load and and dispose child elements on demand (based on their visibility) to reduce memory footprint. ListBox and ListView use a class called VirtualizingStackPanel by default to achieve higher performance. I found this control, which is re... | Dan Crevier has a small tutorial on building a VirtualisingTilePanel. Ben Constable has written a tutorial on IScrollInfo, which is an essential part of the virtualisation: Part 1, Part 2, Part 3 and Part 4. | Resources and guides to UI virtualization in WPF UI Virtualization is an awkward terminology that describes WPF UI controls that load and and dispose child elements on demand (based on their visibility) to reduce memory footprint. ListBox and ListView use a class called VirtualizingStackPanel by default to achieve high... | TITLE:
Resources and guides to UI virtualization in WPF
QUESTION:
UI Virtualization is an awkward terminology that describes WPF UI controls that load and and dispose child elements on demand (based on their visibility) to reduce memory footprint. ListBox and ListView use a class called VirtualizingStackPanel by defau... | [
".net",
"wpf",
"performance",
"user-interface",
"ui-virtualization"
] | 13 | 17 | 6,733 | 1 | 0 | 2008-09-24T09:38:35.887000 | 2008-09-24T12:46:12.397000 |
126,236 | 126,596 | Unit Testing data? | Our software manages a lot of data feeds from various sources: real time replicated databases, files FTPed automatically, scheduled running of database stored procedures to cache snapshots of data from linked servers and numerous other methods of acquiring data. We need to verify and validate this data: has an import e... | Unit testing is not analogous to what you need to do. Its more along the lines of integration testing or acceptance testing. But that's beside the point. Your system has a heavy requirement for validation of data coming into the system. Data comes into the system by various means, and I would assume it needs to be veri... | Unit Testing data? Our software manages a lot of data feeds from various sources: real time replicated databases, files FTPed automatically, scheduled running of database stored procedures to cache snapshots of data from linked servers and numerous other methods of acquiring data. We need to verify and validate this da... | TITLE:
Unit Testing data?
QUESTION:
Our software manages a lot of data feeds from various sources: real time replicated databases, files FTPed automatically, scheduled running of database stored procedures to cache snapshots of data from linked servers and numerous other methods of acquiring data. We need to verify an... | [
"validation",
"unit-testing",
"test-data",
"data-scrubbing"
] | 1 | 1 | 2,645 | 2 | 0 | 2008-09-24T09:39:29.770000 | 2008-09-24T11:30:51.127000 |
126,238 | 127,619 | Need advice: Structure of Rails views for submenus? | Imagine to have two RESTful controllers (UsersController, OffersController) and a PagesController (used for static content such as index, about and so on) in your application. You have the following routes defined: map.with_options:controller => 'pages' do |pages| pages.root:action => 'index' # static home page pages.a... | One thing you could play with is yield and content_for, used with a few partials for the menus. For example you could put each section of the menu in a partial and then modify your layout to something like: <%= yield(:menu) %> You then can then specify in your views content_for and put whatever partials you want into t... | Need advice: Structure of Rails views for submenus? Imagine to have two RESTful controllers (UsersController, OffersController) and a PagesController (used for static content such as index, about and so on) in your application. You have the following routes defined: map.with_options:controller => 'pages' do |pages| pag... | TITLE:
Need advice: Structure of Rails views for submenus?
QUESTION:
Imagine to have two RESTful controllers (UsersController, OffersController) and a PagesController (used for static content such as index, about and so on) in your application. You have the following routes defined: map.with_options:controller => 'pag... | [
"ruby-on-rails",
"ruby"
] | 4 | 6 | 2,440 | 2 | 0 | 2008-09-24T09:40:40.487000 | 2008-09-24T14:47:05.193000 |
126,242 | 126,258 | How do I turn a relative URL into a full URL? | This is probably explained more easily with an example. I'm trying to find a way of turning a relative URL, e.g. "/Foo.aspx" or "~/Foo.aspx" into a full URL, e.g. http://localhost/Foo.aspx. That way when I deploy to test or stage, where the domain under which the site runs is different, I will get http://test/Foo.aspx ... | Have a play with this (modified from here ) public string ConvertRelativeUrlToAbsoluteUrl(string relativeUrl) { return string.Format("http{0}://{1}{2}", (Request.IsSecureConnection)? "s": "", Request.Url.Host, Page.ResolveUrl(relativeUrl) ); } | How do I turn a relative URL into a full URL? This is probably explained more easily with an example. I'm trying to find a way of turning a relative URL, e.g. "/Foo.aspx" or "~/Foo.aspx" into a full URL, e.g. http://localhost/Foo.aspx. That way when I deploy to test or stage, where the domain under which the site runs ... | TITLE:
How do I turn a relative URL into a full URL?
QUESTION:
This is probably explained more easily with an example. I'm trying to find a way of turning a relative URL, e.g. "/Foo.aspx" or "~/Foo.aspx" into a full URL, e.g. http://localhost/Foo.aspx. That way when I deploy to test or stage, where the domain under wh... | [
"asp.net"
] | 68 | 60 | 66,377 | 13 | 0 | 2008-09-24T09:41:35.320000 | 2008-09-24T09:46:35.027000 |
126,260 | 126,314 | Objections against Java Webstart? | Since the release of Adobe AIR I am wondering why Java Web Start has not gained more attention in the past as to me it seems to be very similar, but web start is available for a much longer time. Is it mainly because of bad marketing from Sun, or are there more technical concerns other than the need of having the right... | In my company we used Java Web Start to deploy Eclipse RCP applications. It was a pain to setup, but it works very well once in place. So the only recommendation I could make is to start small, to get the hang of it. Deploying one simple application first. Trying to deploy a complete product that is already made withou... | Objections against Java Webstart? Since the release of Adobe AIR I am wondering why Java Web Start has not gained more attention in the past as to me it seems to be very similar, but web start is available for a much longer time. Is it mainly because of bad marketing from Sun, or are there more technical concerns other... | TITLE:
Objections against Java Webstart?
QUESTION:
Since the release of Adobe AIR I am wondering why Java Web Start has not gained more attention in the past as to me it seems to be very similar, but web start is available for a much longer time. Is it mainly because of bad marketing from Sun, or are there more techni... | [
"java",
"java-web-start"
] | 20 | 20 | 2,718 | 6 | 0 | 2008-09-24T09:47:20.297000 | 2008-09-24T10:03:58.853000 |
126,271 | 127,172 | Key value pairs in relational database | Does someone have experience with storing key-value pairs in a database? I've been using this type of table: CREATE TABLE key_value_pairs ( itemid varchar(32) NOT NULL, itemkey varchar(32) NOT NULL, itemvalue varchar(32) NOT NULL, CONSTRAINT ct_primarykey PRIMARY KEY(itemid,itemkey) ) Then for example the following row... | Before you continue on your approach, I would humbly suggest you step back and consider if you really want to store this data in a "Key-Value Pair"table. I don't know your application but my experience has shown that every time I have done what you are doing, later on I wish I had created a color table, a fabric table ... | Key value pairs in relational database Does someone have experience with storing key-value pairs in a database? I've been using this type of table: CREATE TABLE key_value_pairs ( itemid varchar(32) NOT NULL, itemkey varchar(32) NOT NULL, itemvalue varchar(32) NOT NULL, CONSTRAINT ct_primarykey PRIMARY KEY(itemid,itemke... | TITLE:
Key value pairs in relational database
QUESTION:
Does someone have experience with storing key-value pairs in a database? I've been using this type of table: CREATE TABLE key_value_pairs ( itemid varchar(32) NOT NULL, itemkey varchar(32) NOT NULL, itemvalue varchar(32) NOT NULL, CONSTRAINT ct_primarykey PRIMARY... | [
"sql",
"database"
] | 84 | 152 | 133,852 | 19 | 0 | 2008-09-24T09:50:19.353000 | 2008-09-24T13:37:54.753000 |
126,274 | 126,335 | Setting a Sharepoint Site Theme through a Web Service? | Is it possible to change a Sharepoint 2007 Site Theme through a Web Service? I know it can be done through the Object Model with (i think) SPWeb.ApplyTheme, but I did not see anything in the available Web Services, apart from CustomizeCss in Webs.asmx, which does not seem to be exactly what I need. | This is not possible out of the box. However, you can write your own custom SharePoint web service that exposes this feature to you. A walkthrough on how to make your own custom web service in SharePoint can be found here: http://msdn.microsoft.com/en-us/library/ms464040.aspx Another way would be to create your own the... | Setting a Sharepoint Site Theme through a Web Service? Is it possible to change a Sharepoint 2007 Site Theme through a Web Service? I know it can be done through the Object Model with (i think) SPWeb.ApplyTheme, but I did not see anything in the available Web Services, apart from CustomizeCss in Webs.asmx, which does n... | TITLE:
Setting a Sharepoint Site Theme through a Web Service?
QUESTION:
Is it possible to change a Sharepoint 2007 Site Theme through a Web Service? I know it can be done through the Object Model with (i think) SPWeb.ApplyTheme, but I did not see anything in the available Web Services, apart from CustomizeCss in Webs.... | [
"sharepoint"
] | 2 | 3 | 680 | 1 | 0 | 2008-09-24T09:52:11.143000 | 2008-09-24T10:10:01.740000 |
126,277 | 126,291 | Making something both a C identifier and a string? | Say you want to generate a matched list of identifiers and strings enum { NAME_ONE, NAME_TWO, NAME_THREE };
myFunction(NAME_ONE, "NAME_ONE"); myFunction(NAME_TWO, "NAME_TWO"); myFunction(NAME_THREE, "NAME_THREE");..without repeating yourself, and without auto-generating the code, using C/C++ macros Initial guess: You ... | For your second #define, you need to use the # preprocessor operator, like this: #define myDefine(a) myFunc(a, #a); That converts the argument to a string. | Making something both a C identifier and a string? Say you want to generate a matched list of identifiers and strings enum { NAME_ONE, NAME_TWO, NAME_THREE };
myFunction(NAME_ONE, "NAME_ONE"); myFunction(NAME_TWO, "NAME_TWO"); myFunction(NAME_THREE, "NAME_THREE");..without repeating yourself, and without auto-generati... | TITLE:
Making something both a C identifier and a string?
QUESTION:
Say you want to generate a matched list of identifiers and strings enum { NAME_ONE, NAME_TWO, NAME_THREE };
myFunction(NAME_ONE, "NAME_ONE"); myFunction(NAME_TWO, "NAME_TWO"); myFunction(NAME_THREE, "NAME_THREE");..without repeating yourself, and wit... | [
"c",
"c-preprocessor",
"preprocessor-directive"
] | 16 | 29 | 9,354 | 2 | 0 | 2008-09-24T09:52:32.267000 | 2008-09-24T09:55:18.203000 |
126,279 | 126,285 | C99 stdint.h header and MS Visual Studio | To my amazement I just discovered that the C99 stdint.h is missing from MS Visual Studio 2003 upwards. I'm sure they have their reasons, but does anyone know where I can download a copy? Without this header I have no definitions for useful types such as uint32_t, etc. | Turns out you can download a MS version of this header from: https://github.com/mattn/gntp-send/blob/master/include/msinttypes/stdint.h A portable one can be found here: http://www.azillionmonkeys.com/qed/pstdint.h Thanks to the Software Rambling s blog. NB: The Public Domain version of the header, mentioned by Michael... | C99 stdint.h header and MS Visual Studio To my amazement I just discovered that the C99 stdint.h is missing from MS Visual Studio 2003 upwards. I'm sure they have their reasons, but does anyone know where I can download a copy? Without this header I have no definitions for useful types such as uint32_t, etc. | TITLE:
C99 stdint.h header and MS Visual Studio
QUESTION:
To my amazement I just discovered that the C99 stdint.h is missing from MS Visual Studio 2003 upwards. I'm sure they have their reasons, but does anyone know where I can download a copy? Without this header I have no definitions for useful types such as uint32_... | [
"c++",
"c",
"visual-studio",
"c99"
] | 119 | 85 | 146,761 | 7 | 0 | 2008-09-24T09:53:01.890000 | 2008-09-24T09:54:09.377000 |
126,288 | 126,300 | Has anyone been able to get SharePoint using NTLM working with SQUID as a reverse proxy? | We have a SQUID reverse proxy and a MOSS 2007 portal. All sites are using NTLM. We cannot get it working with SQUID as a reverse proxy. Any ideas where to start? | Can you switch to Kerberos instead of NTLM? You're encountering the "Double-Hop Issue", whereby NTLM authentication cannot traverse proxies or servers. This is outlined at this location: http://blogs.msdn.com/knowledgecast/archive/2007/01/31/the-double-hop-problem.aspx And over here: http://support.microsoft.com/defaul... | Has anyone been able to get SharePoint using NTLM working with SQUID as a reverse proxy? We have a SQUID reverse proxy and a MOSS 2007 portal. All sites are using NTLM. We cannot get it working with SQUID as a reverse proxy. Any ideas where to start? | TITLE:
Has anyone been able to get SharePoint using NTLM working with SQUID as a reverse proxy?
QUESTION:
We have a SQUID reverse proxy and a MOSS 2007 portal. All sites are using NTLM. We cannot get it working with SQUID as a reverse proxy. Any ideas where to start?
ANSWER:
Can you switch to Kerberos instead of NTLM... | [
"sharepoint",
"ntlm",
"squid"
] | 0 | 2 | 8,906 | 2 | 0 | 2008-09-24T09:54:26.317000 | 2008-09-24T09:56:47.047000 |
126,297 | 126,446 | Automatic Casts redux | After I messed up the description of my previous post on this I have sat down and tried to convey my exact intent. I have a class called P which performs some distinct purpose. I also have PW which perform some distinct purpose on P. PW has no member variables, just member functions. From this description you would ass... | You could try overriding operator* and operator-> to return access to the embedded p. Something like this might do the trick: class P { public: void a( ) { std::cout << "a" << std::endl; } };
class PW { public: PW(P& p): p(p) { }
void b( ) { std::cout << "b" << std::endl; }
P & operator*() { return p; } P * operator... | Automatic Casts redux After I messed up the description of my previous post on this I have sat down and tried to convey my exact intent. I have a class called P which performs some distinct purpose. I also have PW which perform some distinct purpose on P. PW has no member variables, just member functions. From this des... | TITLE:
Automatic Casts redux
QUESTION:
After I messed up the description of my previous post on this I have sat down and tried to convey my exact intent. I have a class called P which performs some distinct purpose. I also have PW which perform some distinct purpose on P. PW has no member variables, just member functi... | [
"c++",
"casting"
] | 0 | 2 | 145 | 3 | 0 | 2008-09-24T09:56:18.403000 | 2008-09-24T10:46:39.220000 |
126,320 | 126,411 | Undoing specific revisions in Subversion | Suppose I have a set of commits in a repository folder... 123 (250 new files, 137 changed files, 14 deleted files) 122 (150 changed files) 121 (renamed folder) 120 (90 changed files) 119 (115 changed files, 14 deleted files, 12 added files) 118 (113 changed files) 117 (10 changed files) I want to get a working copy tha... | To undo revisions 118 and 120: svn up -r HEAD # get latest revision svn merge -c -120. # undo revision 120 svn merge -c -118. # undo revision 118 svn commit # after solving problems (if any) Also see the description in Undoing changes. Note the minus in the -c -120 argument. The -c (or --change ) switch is supported si... | Undoing specific revisions in Subversion Suppose I have a set of commits in a repository folder... 123 (250 new files, 137 changed files, 14 deleted files) 122 (150 changed files) 121 (renamed folder) 120 (90 changed files) 119 (115 changed files, 14 deleted files, 12 added files) 118 (113 changed files) 117 (10 change... | TITLE:
Undoing specific revisions in Subversion
QUESTION:
Suppose I have a set of commits in a repository folder... 123 (250 new files, 137 changed files, 14 deleted files) 122 (150 changed files) 121 (renamed folder) 120 (90 changed files) 119 (115 changed files, 14 deleted files, 12 added files) 118 (113 changed fil... | [
"svn",
"undo",
"cherry-pick"
] | 33 | 37 | 17,484 | 3 | 0 | 2008-09-24T10:05:23.390000 | 2008-09-24T10:34:52.727000 |
126,331 | 126,371 | Specifying a non-.NET dependency in Visual Studio | I'm calling a non-.NET dll from my project using P/Invoke, meaning that the.dll must always be present in the.exe's directory. Is there any way to tell Visual Studio of this dependency, so that it will automatically copy the.dll to the output directory when compiling, and will automatically include the.dll in the setup... | You can copy/link this file(s) to the project, and in properties windows set "Build Action" to "None" and "Copy to Output Directory" to "Copy if newer" or "Copy always". Or you can use a "Pre-Build Events" & "Post-Build Events" where you can specify any batch scripts. I prefere the second option, because this way is mo... | Specifying a non-.NET dependency in Visual Studio I'm calling a non-.NET dll from my project using P/Invoke, meaning that the.dll must always be present in the.exe's directory. Is there any way to tell Visual Studio of this dependency, so that it will automatically copy the.dll to the output directory when compiling, a... | TITLE:
Specifying a non-.NET dependency in Visual Studio
QUESTION:
I'm calling a non-.NET dll from my project using P/Invoke, meaning that the.dll must always be present in the.exe's directory. Is there any way to tell Visual Studio of this dependency, so that it will automatically copy the.dll to the output directory... | [
".net",
"visual-studio",
"dll",
"dependencies"
] | 8 | 5 | 3,508 | 3 | 0 | 2008-09-24T10:09:09.933000 | 2008-09-24T10:18:05.810000 |
126,337 | 146,733 | Which Ruby XML library would you recommend for a 2.4MB XML file? | I have a 2.4 MB XML file, an export from Microsoft Project (hey I'm the victim here!) from which I am requested to extract certain details for re-presentation. Ignoring the intelligence or otherwise of the request, which library should I try first from a Ruby perspective? I'm aware of the following (in no particular or... | Hpricot is probably the best tool for you -- it is easy to use and should handle 2mg file with no problem. Speedwise libxml should be the best. I used libxml2 binding for python few months ago (at that moment rb-libxml was stale). Streaming interface worked the best for me (LibXML::XML::Reader in ruby gem). It allows t... | Which Ruby XML library would you recommend for a 2.4MB XML file? I have a 2.4 MB XML file, an export from Microsoft Project (hey I'm the victim here!) from which I am requested to extract certain details for re-presentation. Ignoring the intelligence or otherwise of the request, which library should I try first from a ... | TITLE:
Which Ruby XML library would you recommend for a 2.4MB XML file?
QUESTION:
I have a 2.4 MB XML file, an export from Microsoft Project (hey I'm the victim here!) from which I am requested to extract certain details for re-presentation. Ignoring the intelligence or otherwise of the request, which library should I... | [
"xml",
"ruby"
] | 16 | 3 | 4,427 | 2 | 0 | 2008-09-24T10:10:25.813000 | 2008-09-28T21:05:31.247000 |
126,345 | 126,354 | Is it safe to redirect to the same URL? | I have URLs of the form http://domain/image/⟨uuid⟩/42x42/some_name.png. The Web server (nginx) is configured to look for a file /some/path/image/⟨uuid⟩/thumbnail_42x42.png, and if it does not exist, it sends the URL to the backend (Django via mod_wsgi) which then generates the thumbnail. Then the backend emits a 302 re... | If it doesn't, the client's broken. Most clients will follow redirect loops until a maximum value. So yes, it should be fine until your backend doesn't generate the thumbnail for any reason. You could instead change URLs to be http://domain/djangoapp/generate_thumbnail and that'll return the thumbnail and the proper co... | Is it safe to redirect to the same URL? I have URLs of the form http://domain/image/⟨uuid⟩/42x42/some_name.png. The Web server (nginx) is configured to look for a file /some/path/image/⟨uuid⟩/thumbnail_42x42.png, and if it does not exist, it sends the URL to the backend (Django via mod_wsgi) which then generates the th... | TITLE:
Is it safe to redirect to the same URL?
QUESTION:
I have URLs of the form http://domain/image/⟨uuid⟩/42x42/some_name.png. The Web server (nginx) is configured to look for a file /some/path/image/⟨uuid⟩/thumbnail_42x42.png, and if it does not exist, it sends the URL to the backend (Django via mod_wsgi) which the... | [
"http",
"browser",
"compatibility"
] | 13 | 4 | 4,845 | 2 | 0 | 2008-09-24T10:12:05.387000 | 2008-09-24T10:14:01.340000 |
126,364 | 126,494 | "cannot find -lpq" when trying to install psycopg2 | Intro: I'm trying to migrate our Trac SQLite to a PostgreSQL backend, to do that I need psycopg2. After clicking past the embarrassing rant on www.initd.org I downloaded the latest version and tried running setup.py install. This didn't work, telling me I needed mingw. So I downloaded and installed mingw. Problem: I no... | Have you tried the binary build of psycopg2 for windows? If that works with your python then it mitigates the need to build by hand. I've seen random people ask this question on various lists and it seems one recommendation is to build postgresql by hand to work around this problem. | "cannot find -lpq" when trying to install psycopg2 Intro: I'm trying to migrate our Trac SQLite to a PostgreSQL backend, to do that I need psycopg2. After clicking past the embarrassing rant on www.initd.org I downloaded the latest version and tried running setup.py install. This didn't work, telling me I needed mingw.... | TITLE:
"cannot find -lpq" when trying to install psycopg2
QUESTION:
Intro: I'm trying to migrate our Trac SQLite to a PostgreSQL backend, to do that I need psycopg2. After clicking past the embarrassing rant on www.initd.org I downloaded the latest version and tried running setup.py install. This didn't work, telling ... | [
"python",
"postgresql",
"trac"
] | 1 | 2 | 1,453 | 2 | 0 | 2008-09-24T10:16:00.230000 | 2008-09-24T10:59:27.770000 |
126,367 | 126,412 | Controlling access to an internal collection in c# - Pattern required | This is kind of hard to explain, I hope my English is sufficient: I have a class "A" which should maintain a list of objects of class "B" (like a private List). A consumer of class "A" should be able to add items to the list. After the items are added to the list, the consumer should not be able to modify them again, l... | To prevent editing the list or its items you have to make them immutable, which means you have to return a new instance of an element on every request. See Eric Lippert's excellent series of "Immutability in C#": http://blogs.msdn.com/ericlippert/archive/tags/Immutability/C_2300_/default.aspx (you have to scroll down a... | Controlling access to an internal collection in c# - Pattern required This is kind of hard to explain, I hope my English is sufficient: I have a class "A" which should maintain a list of objects of class "B" (like a private List). A consumer of class "A" should be able to add items to the list. After the items are adde... | TITLE:
Controlling access to an internal collection in c# - Pattern required
QUESTION:
This is kind of hard to explain, I hope my English is sufficient: I have a class "A" which should maintain a list of objects of class "B" (like a private List). A consumer of class "A" should be able to add items to the list. After ... | [
"c#",
"design-patterns",
"collections",
"data-access"
] | 5 | 4 | 1,386 | 8 | 0 | 2008-09-24T10:16:49.243000 | 2008-09-24T10:34:54.270000 |
126,369 | 126,400 | In Scrum, where does the detail sit? | We've been using Scrum on a few projects now with varying success and I now have a query relating to documentation. In Scrum, you obviously have the product backlog ("The application begins by bringing up the last document the user was working with.") and the sprint task backlog ("Implement forgot password screen"). Ho... | Sprint backlog The sprint backlog is a greatly detailed document containing information about how the team is going to implement the requirements for the upcoming sprint. Tasks are broken down into hours with no task being more than 16 hours. If a task is greater than 16 hours, it should be broken down further. Tasks o... | In Scrum, where does the detail sit? We've been using Scrum on a few projects now with varying success and I now have a query relating to documentation. In Scrum, you obviously have the product backlog ("The application begins by bringing up the last document the user was working with.") and the sprint task backlog ("I... | TITLE:
In Scrum, where does the detail sit?
QUESTION:
We've been using Scrum on a few projects now with varying success and I now have a query relating to documentation. In Scrum, you obviously have the product backlog ("The application begins by bringing up the last document the user was working with.") and the sprin... | [
"scrum"
] | 5 | 8 | 855 | 4 | 0 | 2008-09-24T10:17:34.577000 | 2008-09-24T10:31:31.657000 |
126,381 | 126,384 | Non colliding hash algorithm for strings up to 255 characters | I am looking for a hash-algorithm, to create as close to a unique hash of a string (max len = 255) as possible, that produces a long integer (DWORD). I realize that 26^255 >> 2^32, but also know that the number of words in the English language is far less than 2^32. The strings I need to 'hash' would be mostly single w... | See here for a previous iteration of this question (and the answer). | Non colliding hash algorithm for strings up to 255 characters I am looking for a hash-algorithm, to create as close to a unique hash of a string (max len = 255) as possible, that produces a long integer (DWORD). I realize that 26^255 >> 2^32, but also know that the number of words in the English language is far less th... | TITLE:
Non colliding hash algorithm for strings up to 255 characters
QUESTION:
I am looking for a hash-algorithm, to create as close to a unique hash of a string (max len = 255) as possible, that produces a long integer (DWORD). I realize that 26^255 >> 2^32, but also know that the number of words in the English langu... | [
"algorithm",
"hash"
] | 1 | 2 | 1,257 | 5 | 0 | 2008-09-24T10:23:43.767000 | 2008-09-24T10:26:38.783000 |
126,382 | 126,962 | Define small row height in Reporting Services 2005 | I want to specify a small row height in a Reporting Services report of about 3pt. While the report looks ok in the previewer, once deployed, the row height resets to the standard row height. I have adjusted the "CanGrow" and "CanShrink" settings as well as the padding, lineHeight, font size, etc... | I've found that one way to fix this is to put a single underscore in each column of the row. The problem is actually with the way a blank row is outputted. If you view the source of the outputted report you will see that the row you are trying to keep short will output like so: Those blank spaces ( ) is what is causing... | Define small row height in Reporting Services 2005 I want to specify a small row height in a Reporting Services report of about 3pt. While the report looks ok in the previewer, once deployed, the row height resets to the standard row height. I have adjusted the "CanGrow" and "CanShrink" settings as well as the padding,... | TITLE:
Define small row height in Reporting Services 2005
QUESTION:
I want to specify a small row height in a Reporting Services report of about 3pt. While the report looks ok in the previewer, once deployed, the row height resets to the standard row height. I have adjusted the "CanGrow" and "CanShrink" settings as we... | [
"reporting-services",
"report"
] | 3 | 4 | 2,741 | 1 | 0 | 2008-09-24T10:24:07.730000 | 2008-09-24T12:58:01.993000 |
126,401 | 126,473 | SQL server 2005 numeric precision loss | Debugging some finance-related SQL code found a strange issue with numeric(24,8) mathematics precision. Running the following query on your MSSQL you would get A + B * C expression result to be 0.123457 SELECT A, B, C, A + B * C FROM ( SELECT CAST(0.12345678 AS NUMERIC(24,8)) AS A, CAST(0 AS NUMERIC(24,8)) AS B, CAST(5... | Just as addition of the float type is inaccurate, multiplication of the decimal types can be inaccurate (or cause inaccuracy) if you exceed the precision. See Data Type Conversion and decimal and numeric. Since you multiplied NUMERIC(24,8) and NUMERIC(24,8), and SQL Server will only check the type not the content, it p... | SQL server 2005 numeric precision loss Debugging some finance-related SQL code found a strange issue with numeric(24,8) mathematics precision. Running the following query on your MSSQL you would get A + B * C expression result to be 0.123457 SELECT A, B, C, A + B * C FROM ( SELECT CAST(0.12345678 AS NUMERIC(24,8)) AS A... | TITLE:
SQL server 2005 numeric precision loss
QUESTION:
Debugging some finance-related SQL code found a strange issue with numeric(24,8) mathematics precision. Running the following query on your MSSQL you would get A + B * C expression result to be 0.123457 SELECT A, B, C, A + B * C FROM ( SELECT CAST(0.12345678 AS N... | [
"sql-server",
"floating-point",
"type-conversion",
"casting",
"floating-accuracy"
] | 5 | 7 | 9,277 | 3 | 0 | 2008-09-24T10:31:37.993000 | 2008-09-24T10:54:31.947000 |
126,406 | 126,420 | Change database files location in MySQL administrator? | I would like to change the database files location of MySQL administrator to another drive of my computer. (I run Windows XP SP2 and MySQL Administrator 1.2.8.) --Under the startup variable --> General Parameters --> I changed Data directory: from C:/Program Files/MySQL/MySQL Server 5.0/data to D:/....., but after I st... | Normally it works like this: shut down MySQL change the [mysqld] and [mysqld_safe] datadir variable in the MySQL configuration change the basedir variable in the same section. move the location over restart MySQL If that doesn't work I have no idea. On linux you can try to move the socket to a new location too, but tha... | Change database files location in MySQL administrator? I would like to change the database files location of MySQL administrator to another drive of my computer. (I run Windows XP SP2 and MySQL Administrator 1.2.8.) --Under the startup variable --> General Parameters --> I changed Data directory: from C:/Program Files/... | TITLE:
Change database files location in MySQL administrator?
QUESTION:
I would like to change the database files location of MySQL administrator to another drive of my computer. (I run Windows XP SP2 and MySQL Administrator 1.2.8.) --Under the startup variable --> General Parameters --> I changed Data directory: from... | [
"mysql"
] | 15 | 21 | 48,363 | 5 | 0 | 2008-09-24T10:32:45.947000 | 2008-09-24T10:36:42.940000 |
126,409 | 126,455 | Eliminating `switch` statements | What are ways of eliminating the use of switch statements in code? | Switch-statements are not an antipattern per se, but if you're coding object oriented you should consider if the use of a switch is better solved with polymorphism instead of using a switch statement. With polymorphism, this: foreach (var animal in zoo) { switch (typeof(animal)) { case "dog": echo animal.bark(); break;... | Eliminating `switch` statements What are ways of eliminating the use of switch statements in code? | TITLE:
Eliminating `switch` statements
QUESTION:
What are ways of eliminating the use of switch statements in code?
ANSWER:
Switch-statements are not an antipattern per se, but if you're coding object oriented you should consider if the use of a switch is better solved with polymorphism instead of using a switch stat... | [
"design-patterns",
"language-agnostic"
] | 201 | 291 | 173,333 | 23 | 0 | 2008-09-24T10:34:13.947000 | 2008-09-24T10:49:24.877000 |
126,430 | 656,841 | Is it possible to change the natural order of columns in Postgres? | Is it possible to change the natural order of columns in Postgres 8.1? I know that you shouldn't rely on column order - it's not essential to what I am doing - I only need it to make some auto-generated stuff come out in a way that is more pleasing, so that the field order matches all the way from pgadmin through the b... | You can actually just straight up change the column order, but I'd hardly recommend it, and you should be very careful if you decide to do it. eg. # CREATE TABLE test (a int, b int, c int); # INSERT INTO test VALUES (1,2,3); # SELECT * FROM test; a | b | c ---+---+--- 1 | 2 | 3 (1 row) Now for the tricky bit, you need ... | Is it possible to change the natural order of columns in Postgres? Is it possible to change the natural order of columns in Postgres 8.1? I know that you shouldn't rely on column order - it's not essential to what I am doing - I only need it to make some auto-generated stuff come out in a way that is more pleasing, so ... | TITLE:
Is it possible to change the natural order of columns in Postgres?
QUESTION:
Is it possible to change the natural order of columns in Postgres 8.1? I know that you shouldn't rely on column order - it's not essential to what I am doing - I only need it to make some auto-generated stuff come out in a way that is ... | [
"postgresql"
] | 40 | 18 | 38,275 | 9 | 0 | 2008-09-24T10:39:12.170000 | 2009-03-18T03:06:10.273000 |
126,450 | 126,778 | Call Stack at Runtime | I want to access the call stack at runtime in a Native C++ application. I am not using the IDE. How do I display the call stack? Update: I have a function which is called from many points all over the application. It crashes on rare occasions. I was looking for a way to get name of the caller and log it. | I believe that this page has the answer you are looking for. You said Visual C so I assume you mean windows. | Call Stack at Runtime I want to access the call stack at runtime in a Native C++ application. I am not using the IDE. How do I display the call stack? Update: I have a function which is called from many points all over the application. It crashes on rare occasions. I was looking for a way to get name of the caller and ... | TITLE:
Call Stack at Runtime
QUESTION:
I want to access the call stack at runtime in a Native C++ application. I am not using the IDE. How do I display the call stack? Update: I have a function which is called from many points all over the application. It crashes on rare occasions. I was looking for a way to get name ... | [
"c++",
"debugging",
"visual-c++",
"stack-trace",
"callstack"
] | 6 | 1 | 11,857 | 6 | 0 | 2008-09-24T10:48:03.100000 | 2008-09-24T12:20:03.910000 |
126,472 | 3,812,096 | How to stop right click dead-locking Visual Studio 2008 | I have a very serious problem with Visual Studio 2008. Occasionally when I right-click (for go to definition, set next statement etc) when I'm debugging, Visual Studio will just dead-lock and go into not responding mode. Has anyone had the same problem? Does anyone know how to solve it? Edit: I'm using SP1 with a coupl... | This issue no longer occurs for me since I've moved to Windows7. If you're unfortunate to be stuck with Windows Vista still, I did discover that it only hung on right-click when waiting for the intellisense database to be built (see the bottom left corner for it's progress). The only "fix" I had was to wait for intelli... | How to stop right click dead-locking Visual Studio 2008 I have a very serious problem with Visual Studio 2008. Occasionally when I right-click (for go to definition, set next statement etc) when I'm debugging, Visual Studio will just dead-lock and go into not responding mode. Has anyone had the same problem? Does anyon... | TITLE:
How to stop right click dead-locking Visual Studio 2008
QUESTION:
I have a very serious problem with Visual Studio 2008. Occasionally when I right-click (for go to definition, set next statement etc) when I'm debugging, Visual Studio will just dead-lock and go into not responding mode. Has anyone had the same p... | [
"visual-studio-2008",
"crash",
"deadlock"
] | 11 | 3 | 6,621 | 13 | 0 | 2008-09-24T10:54:16.127000 | 2010-09-28T11:09:41.153000 |
126,513 | 130,159 | PHP and MS Access: Number of Records returned by SELECT query | I am running following PHP code to interact with a MS Access database. $odbc_con = new COM("ADODB.Connection"); $constr = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=". $db_path. ";"; $odbc_con -> open($constr);
$rs_select = $odbc_con -> execute ("SELECT * FROM Main"); Using ($rs_select -> RecordCount) gives -1 tho... | ADODB has its own rules for what recordcount is returned depending on the type of recordset you've defined. See: MS Knowledge Base article 194973 W3C Schools article In the example above, the PHP COM() object is used to instantiate ADODB, a COM interface for generic database access. According to the PHP documentation, ... | PHP and MS Access: Number of Records returned by SELECT query I am running following PHP code to interact with a MS Access database. $odbc_con = new COM("ADODB.Connection"); $constr = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=". $db_path. ";"; $odbc_con -> open($constr);
$rs_select = $odbc_con -> execute ("SELECT... | TITLE:
PHP and MS Access: Number of Records returned by SELECT query
QUESTION:
I am running following PHP code to interact with a MS Access database. $odbc_con = new COM("ADODB.Connection"); $constr = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=". $db_path. ";"; $odbc_con -> open($constr);
$rs_select = $odbc_con -... | [
"php",
"database",
"ms-access"
] | 3 | 1 | 5,454 | 5 | 0 | 2008-09-24T11:04:46.023000 | 2008-09-24T21:43:40.777000 |
126,524 | 126,533 | Iterate a list with indexes | I could swear I've seen the function (or method) that takes a list, like this [3, 7, 19] and makes it into iterable list of tuples, like so: [(0,3), (1,7), (2,19)] to use it instead of: for i in range(len(name_of_list)): name_of_list[i] = something but I can't remember the name and googling "iterate list" gets nothing. | >>> a = [3,4,5,6] >>> for i, val in enumerate(a):... print i, val... 0 3 1 4 2 5 3 6 >>> | Iterate a list with indexes I could swear I've seen the function (or method) that takes a list, like this [3, 7, 19] and makes it into iterable list of tuples, like so: [(0,3), (1,7), (2,19)] to use it instead of: for i in range(len(name_of_list)): name_of_list[i] = something but I can't remember the name and googling ... | TITLE:
Iterate a list with indexes
QUESTION:
I could swear I've seen the function (or method) that takes a list, like this [3, 7, 19] and makes it into iterable list of tuples, like so: [(0,3), (1,7), (2,19)] to use it instead of: for i in range(len(name_of_list)): name_of_list[i] = something but I can't remember the ... | [
"python",
"list"
] | 222 | 394 | 340,514 | 6 | 0 | 2008-09-24T11:08:52.053000 | 2008-09-24T11:11:41.173000 |
126,526 | 713,567 | Unit Testing of .NET Add-In for Microsoft Office | Has anyone got any suggestions for unit testing a Managed Application Add-In for Office? I'm using NUnit but I had the same issues with MSTest. The problem is that there is a.NET assembly loaded inside the Office application (in my case, Word) and I need a reference to that instance of the.NET assembly. I can't just in... | This is how I resolved it. Just about everything in my add-in runs from the Click method of a button in the UI. I have changed all those Click methods to consist only of a simple, parameterless call. I then created a new file (Partial Class) called EntryPoint that had lots of very short Friend Subs, each of which was u... | Unit Testing of .NET Add-In for Microsoft Office Has anyone got any suggestions for unit testing a Managed Application Add-In for Office? I'm using NUnit but I had the same issues with MSTest. The problem is that there is a.NET assembly loaded inside the Office application (in my case, Word) and I need a reference to t... | TITLE:
Unit Testing of .NET Add-In for Microsoft Office
QUESTION:
Has anyone got any suggestions for unit testing a Managed Application Add-In for Office? I'm using NUnit but I had the same issues with MSTest. The problem is that there is a.NET assembly loaded inside the Office application (in my case, Word) and I nee... | [
"vb.net",
"ms-office",
"add-in"
] | 6 | 3 | 2,392 | 2 | 0 | 2008-09-24T11:09:22.253000 | 2009-04-03T11:32:37.697000 |
126,528 | 127,649 | How can I get <asp:menu> working in Safari? | On the safari browser, the standard doesn't render well at all. How can this be fixed? | Thanks for the advice, it led me into the following solution; I created a file named "safari.browser" and placed it in the App_Browsers directory. The content of this file is shown below; As I understand it, this tells ASP.NET not to use the adaptor it would normally use to render the control content and instead use up... | How can I get <asp:menu> working in Safari? On the safari browser, the standard doesn't render well at all. How can this be fixed? | TITLE:
How can I get <asp:menu> working in Safari?
QUESTION:
On the safari browser, the standard doesn't render well at all. How can this be fixed?
ANSWER:
Thanks for the advice, it led me into the following solution; I created a file named "safari.browser" and placed it in the App_Browsers directory. The content of ... | [
"safari",
"aspmenu"
] | 1 | 3 | 1,426 | 4 | 0 | 2008-09-24T11:10:12.300000 | 2008-09-24T14:53:40.843000 |
126,555 | 127,170 | Custom painting Windows Forms Scrollbar? | I know how to do custom drawing of a standalone Windows Forms ScrollBar because there are plenty of examples at places like codeproject.com. But how do you custom draw the scrollbars in controls you do not create yourself? For example a Panel can show scrollbars but how would I ensure that the scrollbars it shows are c... | The scrollbars you see most often, including those built into most winforms controls, are rendered by Windows and there is no way to override their appearance in WinForms short of implementing an entirely custom solution which completely takes over the rendering and behavior of the common scrollbar control. There are s... | Custom painting Windows Forms Scrollbar? I know how to do custom drawing of a standalone Windows Forms ScrollBar because there are plenty of examples at places like codeproject.com. But how do you custom draw the scrollbars in controls you do not create yourself? For example a Panel can show scrollbars but how would I ... | TITLE:
Custom painting Windows Forms Scrollbar?
QUESTION:
I know how to do custom drawing of a standalone Windows Forms ScrollBar because there are plenty of examples at places like codeproject.com. But how do you custom draw the scrollbars in controls you do not create yourself? For example a Panel can show scrollbar... | [
"winforms",
"scrollbar",
"skinning"
] | 4 | 1 | 2,298 | 1 | 0 | 2008-09-24T11:18:07.817000 | 2008-09-24T13:37:41.337000 |
126,557 | 126,643 | Why does Firefox 2 display fonts larger than specified in CSS? | I have a webpage where Firefox 2 displays the font certain, really specific elements, larger than than what I specified in the CSS. When I look at the affected element (mostly td elements as far as I can tell) with Firebug, I see that the font-size is inherited from the body (11px, so its not a relative size). No style... | This is a reasonably well known annoyance: TABLEs and TDs will inherit all font styles except font-size, at least in XHTML. To "fix" this, set the font size also for the TABLE or TD element. So to clarify, this is not Firefox-specific. Did you test in other browsers? | Why does Firefox 2 display fonts larger than specified in CSS? I have a webpage where Firefox 2 displays the font certain, really specific elements, larger than than what I specified in the CSS. When I look at the affected element (mostly td elements as far as I can tell) with Firebug, I see that the font-size is inher... | TITLE:
Why does Firefox 2 display fonts larger than specified in CSS?
QUESTION:
I have a webpage where Firefox 2 displays the font certain, really specific elements, larger than than what I specified in the CSS. When I look at the affected element (mostly td elements as far as I can tell) with Firebug, I see that the ... | [
"css",
"firefox",
"font-size"
] | 2 | 8 | 1,750 | 1 | 0 | 2008-09-24T11:18:47.473000 | 2008-09-24T11:40:19.683000 |
126,584 | 130,950 | Displaying Tiff files in SSRS reports | I have a requirement to be be able to embed scanned tiff images into some SSRS reports. When I design a report in VS2005 and add an image control the tiff image displays perfectly however when I build it. I get the warning: Warning 2 [rsInvalidMIMEType] The value of the MIMEType property for the image ‘image1’ is “imag... | Assuming you're delivering the image file via IIS, use an ASP.NET page to change image formats and mime type to something that you can use. Response.ContentType = "image/png"; Response.Clear(); using (Bitmap bmp = new Bitmap(tifFilepath)) bmp.Save(Response.OutputStream, ImageFormat.Png); Response.End(); | Displaying Tiff files in SSRS reports I have a requirement to be be able to embed scanned tiff images into some SSRS reports. When I design a report in VS2005 and add an image control the tiff image displays perfectly however when I build it. I get the warning: Warning 2 [rsInvalidMIMEType] The value of the MIMEType pr... | TITLE:
Displaying Tiff files in SSRS reports
QUESTION:
I have a requirement to be be able to embed scanned tiff images into some SSRS reports. When I design a report in VS2005 and add an image control the tiff image displays perfectly however when I build it. I get the warning: Warning 2 [rsInvalidMIMEType] The value ... | [
"sql-server-2005",
"reporting-services",
"tiff"
] | 2 | 3 | 4,955 | 3 | 0 | 2008-09-24T11:28:44.017000 | 2008-09-25T01:19:07.140000 |
126,587 | 126,633 | How do I attach a MSSQL 2000 database with only an MDF file | I have an old server with a defunct evaluation version of SQL 2000 on it (from 2006), and two databases which were sitting on it. For some unknown reason, the LDF log files are missing. Presumed deleted. I have the mdf files (and in one case an ndf file too) for the databases which used to exist on that server, and I a... | I found this answer, which worked with my SQL 2000 machines: How to attach a database with a non-cleanly detached MDF file. Step 1: Make a new database with same name, and which uses the same files as the old one on the new server. Step 2: Stop SQL server, and move your mdf files (and any ndf files you have) over the t... | How do I attach a MSSQL 2000 database with only an MDF file I have an old server with a defunct evaluation version of SQL 2000 on it (from 2006), and two databases which were sitting on it. For some unknown reason, the LDF log files are missing. Presumed deleted. I have the mdf files (and in one case an ndf file too) f... | TITLE:
How do I attach a MSSQL 2000 database with only an MDF file
QUESTION:
I have an old server with a defunct evaluation version of SQL 2000 on it (from 2006), and two databases which were sitting on it. For some unknown reason, the LDF log files are missing. Presumed deleted. I have the mdf files (and in one case ... | [
"sql-server",
"database",
"recovery"
] | 6 | 6 | 13,963 | 2 | 0 | 2008-09-24T11:29:24.903000 | 2008-09-24T11:38:28.067000 |
126,594 | 126,646 | Installing a font on a client machine | I'm using Visual Studio 2008 and the built-in installation tools for a C# client application. How can I use this installer to install a font on the client machine (if it's not already there)? | In VS2005 (so I assume 2008 as well), right click on the File System on Target Machine, Add Special Folder -> Fonts Folder, then place your font file there. | Installing a font on a client machine I'm using Visual Studio 2008 and the built-in installation tools for a C# client application. How can I use this installer to install a font on the client machine (if it's not already there)? | TITLE:
Installing a font on a client machine
QUESTION:
I'm using Visual Studio 2008 and the built-in installation tools for a C# client application. How can I use this installer to install a font on the client machine (if it's not already there)?
ANSWER:
In VS2005 (so I assume 2008 as well), right click on the File S... | [
"c#",
"visual-studio-2008",
"installation",
"fonts"
] | 8 | 11 | 6,832 | 4 | 0 | 2008-09-24T11:30:33.513000 | 2008-09-24T11:41:26.513000 |
126,601 | 126,614 | Accessing the windows admin shares when not connected to a network | I'm finding that I can't access the admin shares on an XP64 box when there's no network connection. Trying to browse to \\localhost\c$ fails (although obviously browsing c: works). Reason for the question is that the NANT build script for our application uses this format to copy files from one local directory to anothe... | You could install a loopback adapter to fool the computer into thinking it's on a network. http://support.microsoft.com/kb/839013 | Accessing the windows admin shares when not connected to a network I'm finding that I can't access the admin shares on an XP64 box when there's no network connection. Trying to browse to \\localhost\c$ fails (although obviously browsing c: works). Reason for the question is that the NANT build script for our applicatio... | TITLE:
Accessing the windows admin shares when not connected to a network
QUESTION:
I'm finding that I can't access the admin shares on an XP64 box when there's no network connection. Trying to browse to \\localhost\c$ fails (although obviously browsing c: works). Reason for the question is that the NANT build script ... | [
"windows-xp"
] | 0 | 2 | 212 | 1 | 0 | 2008-09-24T11:32:17.283000 | 2008-09-24T11:34:33.877000 |
126,607 | 126,669 | What is the "Fountain Development Model"? | It is mentioned on the Systems Development Life Cycle page on Wikipedia: To manage this, a number of system development life cycle (SDLC) models have been created: waterfall, fountain, spiral, build and fix, rapid prototyping, incremental, and synchronize and stabilize. I found a few things on Google, but I felt that t... | Waterfall is a model that enforces control and avoids parallelism; every requirement for a task has to be fulfilled before starting the task. Fountain says that a new task can be started before all requirements are met, because not all requirements are necessary at the start of the task. Think of this: Super Mario Game... | What is the "Fountain Development Model"? It is mentioned on the Systems Development Life Cycle page on Wikipedia: To manage this, a number of system development life cycle (SDLC) models have been created: waterfall, fountain, spiral, build and fix, rapid prototyping, incremental, and synchronize and stabilize. I found... | TITLE:
What is the "Fountain Development Model"?
QUESTION:
It is mentioned on the Systems Development Life Cycle page on Wikipedia: To manage this, a number of system development life cycle (SDLC) models have been created: waterfall, fountain, spiral, build and fix, rapid prototyping, incremental, and synchronize and ... | [
"process",
"sdlc"
] | 5 | 6 | 10,594 | 3 | 0 | 2008-09-24T11:33:36.563000 | 2008-09-24T11:47:31.773000 |
126,631 | 126,696 | Passing JS function to applet for as event listener | Is it possible to pass a function/callback from javascript to a java applet? For example i have an applet with a button that when pressed it will call the passed js callback function onCommand() { alert('Button pressed from applet'); } applet.onCommand(onCommand); | I tend to use something I derived from the reflection example at the bottom of this page, as then you don't need to meddle with your classpath to get it to compile Then I just pass JSON strings around between the applet and javascript | Passing JS function to applet for as event listener Is it possible to pass a function/callback from javascript to a java applet? For example i have an applet with a button that when pressed it will call the passed js callback function onCommand() { alert('Button pressed from applet'); } applet.onCommand(onCommand); | TITLE:
Passing JS function to applet for as event listener
QUESTION:
Is it possible to pass a function/callback from javascript to a java applet? For example i have an applet with a button that when pressed it will call the passed js callback function onCommand() { alert('Button pressed from applet'); } applet.onComma... | [
"java",
"javascript",
"events",
"applet"
] | 4 | 4 | 2,917 | 3 | 0 | 2008-09-24T11:38:17.160000 | 2008-09-24T11:57:11.733000 |
126,635 | 126,662 | .Net Menustrip background colour range | I need to put a control to the right of my MenuStrip. The MenuStrip fades in colour away from the BackColor on the left hand side to something whiter on the right, and ideally I would like to make my small control blend in by having the same backColor as the menustrip has on that side. Does anyone know how that colour ... | The tool strip renderer draws a gradient between two colors that are defined in the ProfessionalColorTable that is passed into the ToolStripProfessionalRenderer constructor. It uses the MenuStripGradientBegin and MenuStripGradientEnd values. So you need to recover these two values and then draw your background appropri... | .Net Menustrip background colour range I need to put a control to the right of my MenuStrip. The MenuStrip fades in colour away from the BackColor on the left hand side to something whiter on the right, and ideally I would like to make my small control blend in by having the same backColor as the menustrip has on that ... | TITLE:
.Net Menustrip background colour range
QUESTION:
I need to put a control to the right of my MenuStrip. The MenuStrip fades in colour away from the BackColor on the left hand side to something whiter on the right, and ideally I would like to make my small control blend in by having the same backColor as the menu... | [
".net",
"user-interface",
"controls"
] | 0 | 2 | 1,292 | 3 | 0 | 2008-09-24T11:38:40.030000 | 2008-09-24T11:46:06.470000 |
126,656 | 127,132 | Opensource Implementation of the Alias Method | I am doing a project at the moment, and in the interest of code reuse, I went looking for a library that can perform some probabilistic accept/reject of an item: i.e., there are three people (a, b c), and each of them have a probability P{i} of getting an item, where p{a} denotes the probability of a. These probabiliti... | Would something like this do? Put all p{i}'s in the array, function will return an index to the person who gets the item. Executes in O(n). public int selectPerson(float[] probabilies, Random r) { float t = r.nextFloat(); float p = 0.0f;
for (int i = 0; i < probabilies.length; i++) { p += probabilies[i]; if (t < p) { ... | Opensource Implementation of the Alias Method I am doing a project at the moment, and in the interest of code reuse, I went looking for a library that can perform some probabilistic accept/reject of an item: i.e., there are three people (a, b c), and each of them have a probability P{i} of getting an item, where p{a} d... | TITLE:
Opensource Implementation of the Alias Method
QUESTION:
I am doing a project at the moment, and in the interest of code reuse, I went looking for a library that can perform some probabilistic accept/reject of an item: i.e., there are three people (a, b c), and each of them have a probability P{i} of getting an ... | [
"java",
"statistics",
"random",
"probability"
] | 0 | 1 | 936 | 3 | 0 | 2008-09-24T11:45:01.513000 | 2008-09-24T13:30:47.657000 |
126,658 | 540,619 | What is a good source for geometric algorithms? | I am looking for any good sources for geometric algorithms specifically; The simple stuff like when two lines cross and so on is easy enough (and easy to find), but I would like to find somewhere with algorithms for the more tricky things, such as finding the shape formed by expanding a given polygon by some amount; fa... | In the end, I did find exactly what I was looking for: Real-Time Collision Detection by Christer Ericson. This is wonderful, and I recommend it strongly. Not so much on curved sides etc, but for the essential stuff on how to actually program geometrical hit testing and so on properly, it seems hard to beat. | What is a good source for geometric algorithms? I am looking for any good sources for geometric algorithms specifically; The simple stuff like when two lines cross and so on is easy enough (and easy to find), but I would like to find somewhere with algorithms for the more tricky things, such as finding the shape formed... | TITLE:
What is a good source for geometric algorithms?
QUESTION:
I am looking for any good sources for geometric algorithms specifically; The simple stuff like when two lines cross and so on is easy enough (and easy to find), but I would like to find somewhere with algorithms for the more tricky things, such as findin... | [
"algorithm",
"geometry",
"computational-geometry"
] | 24 | 2 | 1,444 | 9 | 0 | 2008-09-24T11:45:20.593000 | 2009-02-12T09:33:38.147000 |
126,667 | 126,674 | Why does maven 2 try to download dependencies that I already have? | When I launch the "mvn install" command, maven sometimes tries to download dependencies that it has already downloaded. That's expected for SNAPSHOT but why does maven do that for other JARs? I know I can avoid that behavior by "-o" flag but I just wonder what the cause is. | I'd look for dependencies that don't have a specified version number. Maven will periodically check to make sure that it has the most up-to-date version of these artifacts. | Why does maven 2 try to download dependencies that I already have? When I launch the "mvn install" command, maven sometimes tries to download dependencies that it has already downloaded. That's expected for SNAPSHOT but why does maven do that for other JARs? I know I can avoid that behavior by "-o" flag but I just wond... | TITLE:
Why does maven 2 try to download dependencies that I already have?
QUESTION:
When I launch the "mvn install" command, maven sometimes tries to download dependencies that it has already downloaded. That's expected for SNAPSHOT but why does maven do that for other JARs? I know I can avoid that behavior by "-o" fl... | [
"java",
"maven-2"
] | 6 | 9 | 5,474 | 4 | 0 | 2008-09-24T11:47:15.580000 | 2008-09-24T11:49:01.083000 |
126,678 | 126,996 | Unable to close OledbDataReader to Sybase Database in VB.NET | I don't seem to be able to close the OledbDataReader object after reading data from it. Here is the relevant code - Dim conSyBase As New OleDb.OleDbConnection("Provider=Sybase.ASEOLEDBProvider.2;Server Name=xx.xx.xx.xx;Server Port Address=5000;Initial Catalog=xxxxxxxxxx;User ID=xxxxxxxx;Password=xxxxxxxxx;")
conSyBase... | I found the answer! Before drSyBase.Close() You need to call the cancel method of the Command object cmdSyBase.Cancel() I believe that this may be specific to Sybase databases | Unable to close OledbDataReader to Sybase Database in VB.NET I don't seem to be able to close the OledbDataReader object after reading data from it. Here is the relevant code - Dim conSyBase As New OleDb.OleDbConnection("Provider=Sybase.ASEOLEDBProvider.2;Server Name=xx.xx.xx.xx;Server Port Address=5000;Initial Catalog... | TITLE:
Unable to close OledbDataReader to Sybase Database in VB.NET
QUESTION:
I don't seem to be able to close the OledbDataReader object after reading data from it. Here is the relevant code - Dim conSyBase As New OleDb.OleDbConnection("Provider=Sybase.ASEOLEDBProvider.2;Server Name=xx.xx.xx.xx;Server Port Address=50... | [
"vb.net",
"sybase",
"data-access"
] | 1 | 3 | 1,907 | 3 | 0 | 2008-09-24T11:51:20.810000 | 2008-09-24T13:04:17.627000 |
126,689 | 126,717 | How do I reserve low memory (pre OS)? | Background: I need to reserve an amount of memory below 0xA0000 prior to my operating system starts. To do this I change the 0040:0013 (or 0x413) word which is the amount of low memory available in KiB. However, Windows and other operating systems use E820h/INT15h to query the memory layout and some BIOS:es doesn't ref... | I don't think so, but if you are not doing a bootloader, you could para-virtualize the os. You could look at Xen hypervisor for it. | How do I reserve low memory (pre OS)? Background: I need to reserve an amount of memory below 0xA0000 prior to my operating system starts. To do this I change the 0040:0013 (or 0x413) word which is the amount of low memory available in KiB. However, Windows and other operating systems use E820h/INT15h to query the memo... | TITLE:
How do I reserve low memory (pre OS)?
QUESTION:
Background: I need to reserve an amount of memory below 0xA0000 prior to my operating system starts. To do this I change the 0040:0013 (or 0x413) word which is the amount of low memory available in KiB. However, Windows and other operating systems use E820h/INT15h... | [
"boot",
"bios",
"bda"
] | 3 | 1 | 610 | 1 | 0 | 2008-09-24T11:54:02.553000 | 2008-09-24T12:03:28.880000 |
126,700 | 128,319 | How does SOA service discovery (UDDI) work in practice? | I'm just reading up on SOA and the service registry / UDDI get mentioned regularly. It sounds nice but how is used in reality? Is the registry meant to decouple a logical service from its' physical implementation (port, url etc)? Is the registry meant to be browsed by a human looking for an interesting service to play ... | I find it to be more theoretically useful than practically useful. It is infrequently implemented and infrequently used. In reality, DNS provides a sufficient abstraction tool for the location of resources on the network. | How does SOA service discovery (UDDI) work in practice? I'm just reading up on SOA and the service registry / UDDI get mentioned regularly. It sounds nice but how is used in reality? Is the registry meant to decouple a logical service from its' physical implementation (port, url etc)? Is the registry meant to be browse... | TITLE:
How does SOA service discovery (UDDI) work in practice?
QUESTION:
I'm just reading up on SOA and the service registry / UDDI get mentioned regularly. It sounds nice but how is used in reality? Is the registry meant to decouple a logical service from its' physical implementation (port, url etc)? Is the registry ... | [
"architecture",
"soa",
"uddi"
] | 8 | 10 | 5,692 | 3 | 0 | 2008-09-24T11:59:13.227000 | 2008-09-24T16:50:46.363000 |
126,710 | 127,342 | How accurate can I expect the time to be from a stratum 0 NTP server on the same subnet on ethernet? | I have an application that depends on gpsd and ntpd to accurately set the system time on a linux machine. gpsd is fed NMEA + PPS The application is punping ~25MB per second over the network and I think the loading on the system is causing jitter in the time somehow. (loaded PCI express bus causing irregular interrupt l... | Best info I could find on NTP accuracy, seems to point at 1-2 ms in a LAN setting: NTP v4 with kernel mods to support it, is capable of much better than 1ms accuracy, possibly as good as 1ns. According to [Dave Mills] article, NTP v3 is accurate to 1-2ms in a LAN and 10s of ms in WAN nets. http://www.cis.udel.edu/~mill... | How accurate can I expect the time to be from a stratum 0 NTP server on the same subnet on ethernet? I have an application that depends on gpsd and ntpd to accurately set the system time on a linux machine. gpsd is fed NMEA + PPS The application is punping ~25MB per second over the network and I think the loading on th... | TITLE:
How accurate can I expect the time to be from a stratum 0 NTP server on the same subnet on ethernet?
QUESTION:
I have an application that depends on gpsd and ntpd to accurately set the system time on a linux machine. gpsd is fed NMEA + PPS The application is punping ~25MB per second over the network and I think... | [
"time",
"gps",
"time-precision",
"ntpd",
"gps-time"
] | 4 | 4 | 4,988 | 3 | 0 | 2008-09-24T12:00:59.617000 | 2008-09-24T14:05:09.990000 |
126,711 | 129,871 | How to make Wget handle an HTTP 100-Continue response? | I am trying to POST a HTML (contained in a file) to a URL using Wget like this: wget -O- --debug --header=Content-Type:text/html --post-file=index.html http://localhost/www/encoder.ashx The URL to which the HTML is being posted is a Web application end-point implemented using ASP.NET. The server replies with a 100 (Con... | I looked at the source code to wget for Windows, and as far as I can tell the debug output is coming from the generic error condition when wget fails to parse the response properly. Looks like this is just a limitation of wget, so you'll probably have to use curl or some other method to avoid encountering this issue. | How to make Wget handle an HTTP 100-Continue response? I am trying to POST a HTML (contained in a file) to a URL using Wget like this: wget -O- --debug --header=Content-Type:text/html --post-file=index.html http://localhost/www/encoder.ashx The URL to which the HTML is being posted is a Web application end-point implem... | TITLE:
How to make Wget handle an HTTP 100-Continue response?
QUESTION:
I am trying to POST a HTML (contained in a file) to a URL using Wget like this: wget -O- --debug --header=Content-Type:text/html --post-file=index.html http://localhost/www/encoder.ashx The URL to which the HTML is being posted is a Web applicatio... | [
"http",
"wget"
] | 1 | 1 | 3,884 | 1 | 0 | 2008-09-24T12:01:25.717000 | 2008-09-24T20:47:47.217000 |
126,716 | 129,122 | Immutable Styles in Silverlight 2 | Anyone found a good pattern for getting around immutable styles in Silverlight 2? What I mean is does anyone have a workaround for the fact that you cannot switch the style of an element programmatically once it has been set, i.e. the second line here will throw a catastrophic failure exception: this.TestButton.Style =... | It's not possible. The best workaround I've seen is from Nikhil Kothari at Microsoft: http://www.nikhilk.net/Silverlight-Themes.aspx There is a major drawback to defining styles centrally in App.xaml anyway, which is that it breaks all designer support when you reference those styles from other user controls. I haven't... | Immutable Styles in Silverlight 2 Anyone found a good pattern for getting around immutable styles in Silverlight 2? What I mean is does anyone have a workaround for the fact that you cannot switch the style of an element programmatically once it has been set, i.e. the second line here will throw a catastrophic failure ... | TITLE:
Immutable Styles in Silverlight 2
QUESTION:
Anyone found a good pattern for getting around immutable styles in Silverlight 2? What I mean is does anyone have a workaround for the fact that you cannot switch the style of an element programmatically once it has been set, i.e. the second line here will throw a cat... | [
"silverlight",
"xaml",
"coding-style"
] | 2 | 2 | 488 | 3 | 0 | 2008-09-24T12:02:39.020000 | 2008-09-24T18:57:43.533000 |
126,737 | 126,826 | Prisoner's Dilemma Algorithm | After watching The Dark Knight I became rather enthralled with the concept of the Prisoner's Dilemma. There must be an algorithm that that maximizes one's own gain given a situation. For those that find this foreign: http://en.wikipedia.org/wiki/Prisoner%27s_dilemma Very, very interesting stuff. Edit: The question is, ... | Since there is only one choice to make, and in the absence of any changeable inputs, your algorithm is either going to be: cooperate = true;...or... cooperate = false It's more interesting to find a strategy for the Iterated Prisoner's Dilemma, which is something many people have done. For example http://www.iterated-p... | Prisoner's Dilemma Algorithm After watching The Dark Knight I became rather enthralled with the concept of the Prisoner's Dilemma. There must be an algorithm that that maximizes one's own gain given a situation. For those that find this foreign: http://en.wikipedia.org/wiki/Prisoner%27s_dilemma Very, very interesting s... | TITLE:
Prisoner's Dilemma Algorithm
QUESTION:
After watching The Dark Knight I became rather enthralled with the concept of the Prisoner's Dilemma. There must be an algorithm that that maximizes one's own gain given a situation. For those that find this foreign: http://en.wikipedia.org/wiki/Prisoner%27s_dilemma Very, ... | [
"algorithm",
"performance",
"game-theory"
] | 7 | 12 | 7,285 | 13 | 0 | 2008-09-24T12:11:36.097000 | 2008-09-24T12:26:36 |
126,744 | 126,754 | What good tools are available to create online help for .net applications? | I have a winforms application that presently ships with a chm file for context-sensitive help documentation (not API docs), created using MS HTML Help Workshop. I'd like to move to online documentation (don't have to ship it with the product, can update it easily, etc). What tools are recommended for this sort of thing... | Most commercial help systems have an option to generate the help as a set of HTML pages that could then be uploaded to a website. Certinaly HelpStudio does which I use myself. You could also try out Doc-2-Help which is also a major player in the help market as well. | What good tools are available to create online help for .net applications? I have a winforms application that presently ships with a chm file for context-sensitive help documentation (not API docs), created using MS HTML Help Workshop. I'd like to move to online documentation (don't have to ship it with the product, ca... | TITLE:
What good tools are available to create online help for .net applications?
QUESTION:
I have a winforms application that presently ships with a chm file for context-sensitive help documentation (not API docs), created using MS HTML Help Workshop. I'd like to move to online documentation (don't have to ship it wi... | [
"c#",
"winforms",
"chm"
] | 0 | 2 | 1,863 | 1 | 0 | 2008-09-24T12:13:10.040000 | 2008-09-24T12:16:16.743000 |
126,751 | 127,108 | Compilation fails randomly: "cannot open program database" | During a long compilation with Visual Studio 2005 (version 8.0.50727.762), I sometimes get the following error in several files in some project: fatal error C1033: cannot open program database 'v:\temp\apprtctest\win32\release\vc80.pdb' (The file mentioned is either vc80.pdb or vc80.idb in the project's temp dir.) The ... | It is possible that an antivirus or a similar program is touching the pdb file on write - an antivirus is the most likely suspect in this scenario. I'm afraid that I can only give you some general pointers, based on my past experience in setting nightly builds in our shop. Some of these may sound trivial, but I'm inclu... | Compilation fails randomly: "cannot open program database" During a long compilation with Visual Studio 2005 (version 8.0.50727.762), I sometimes get the following error in several files in some project: fatal error C1033: cannot open program database 'v:\temp\apprtctest\win32\release\vc80.pdb' (The file mentioned is e... | TITLE:
Compilation fails randomly: "cannot open program database"
QUESTION:
During a long compilation with Visual Studio 2005 (version 8.0.50727.762), I sometimes get the following error in several files in some project: fatal error C1033: cannot open program database 'v:\temp\apprtctest\win32\release\vc80.pdb' (The f... | [
"c++",
"visual-studio",
"visual-studio-2005",
"compiler-errors",
"nightly-build"
] | 43 | 24 | 49,614 | 16 | 0 | 2008-09-24T12:15:11.377000 | 2008-09-24T13:26:11.067000 |
126,759 | 130,645 | Qt Jambi: QAbstractListModel not displaying in QListView | I've created an implementation of the QAbstractListModel class in Qt Jambi 4.4 and am finding that using the model with a QListView results in nothing being displayed, however using the model with a QTableView displays the data correctly. Below is my implementation of QAbstractListModel: public class FooListModel exten... | I'm not experienced in Jambi, but shouldn't you be returning a QVariant from method data() instead of returning a Foo? It's not clear to me how the view is going to know how to convert the Foo into a string for display. Also, any chance I could sell you the easier-to-use QStandardModel and QStandardModelItem instead of... | Qt Jambi: QAbstractListModel not displaying in QListView I've created an implementation of the QAbstractListModel class in Qt Jambi 4.4 and am finding that using the model with a QListView results in nothing being displayed, however using the model with a QTableView displays the data correctly. Below is my implementati... | TITLE:
Qt Jambi: QAbstractListModel not displaying in QListView
QUESTION:
I've created an implementation of the QAbstractListModel class in Qt Jambi 4.4 and am finding that using the model with a QListView results in nothing being displayed, however using the model with a QTableView displays the data correctly. Below ... | [
"java",
"qt",
"qt-jambi",
"qabstractlistmodel"
] | 1 | 1 | 1,490 | 2 | 0 | 2008-09-24T12:17:12.963000 | 2008-09-24T23:40:33.227000 |
126,772 | 126,831 | How to force a web browser NOT to cache images | Background I am writing and using a very simple CGI-based (Perl) content management tool for two pro-bono websites. It provides the website administrator with HTML forms for events where they fill the fields (date, place, title, description, links, etc.) and save it. On that form I allow the administrator to upload an ... | Armin Ronacher has the correct idea. The problem is random strings can collide. I would use: Where "1222259157.415" is the current time on the server. Generate time by Javascript with performance.now() or by Python with time.time() | How to force a web browser NOT to cache images Background I am writing and using a very simple CGI-based (Perl) content management tool for two pro-bono websites. It provides the website administrator with HTML forms for events where they fill the fields (date, place, title, description, links, etc.) and save it. On th... | TITLE:
How to force a web browser NOT to cache images
QUESTION:
Background I am writing and using a very simple CGI-based (Perl) content management tool for two pro-bono websites. It provides the website administrator with HTML forms for events where they fill the fields (date, place, title, description, links, etc.) ... | [
"html",
"image",
"caching",
"browser-cache",
"image-caching"
] | 155 | 234 | 278,481 | 20 | 0 | 2008-09-24T12:19:18.187000 | 2008-09-24T12:27:06.420000 |
126,781 | 126,807 | C++ union in C# | I'm translating a library written in C++ to C#, and the keyword 'union' exists once. In a struct. What's the correct way of translating it into C#? And what does it do? It looks something like this; struct Foo { float bar;
union { int killroy; float fubar; } as; } | You can use explicit field layouts for that: [StructLayout(LayoutKind.Explicit)] public struct SampleUnion { [FieldOffset(0)] public float bar; [FieldOffset(4)] public int killroy; [FieldOffset(4)] public float fubar; } Untested. The idea is that two variables have the same position in your struct. You can of course on... | C++ union in C# I'm translating a library written in C++ to C#, and the keyword 'union' exists once. In a struct. What's the correct way of translating it into C#? And what does it do? It looks something like this; struct Foo { float bar;
union { int killroy; float fubar; } as; } | TITLE:
C++ union in C#
QUESTION:
I'm translating a library written in C++ to C#, and the keyword 'union' exists once. In a struct. What's the correct way of translating it into C#? And what does it do? It looks something like this; struct Foo { float bar;
union { int killroy; float fubar; } as; }
ANSWER:
You can use... | [
"c#",
"c++",
"unions"
] | 86 | 98 | 69,612 | 7 | 0 | 2008-09-24T12:20:32.800000 | 2008-09-24T12:24:41.107000 |
126,787 | 126,843 | Checking for code changes in all imported python modules | Almost every Python web framework has a simple server that runs a wsgi application and automatically reloads the imported modules every time the source gets changed. I know I can look at the code and see how it's done, but that may take some time and I'm asking just out of curiosity. Does anyone have any idea how this ... | As the author of one of the reloader mechanisms (the one in werkzeug) I can tell you that it doesn't work. What all the reloaders do is forking one time and restarting the child process if a monitor thread notices that one module changed on the file system. Inline reload() ing doesn't work because references to the rel... | Checking for code changes in all imported python modules Almost every Python web framework has a simple server that runs a wsgi application and automatically reloads the imported modules every time the source gets changed. I know I can look at the code and see how it's done, but that may take some time and I'm asking j... | TITLE:
Checking for code changes in all imported python modules
QUESTION:
Almost every Python web framework has a simple server that runs a wsgi application and automatically reloads the imported modules every time the source gets changed. I know I can look at the code and see how it's done, but that may take some tim... | [
"python"
] | 2 | 2 | 352 | 2 | 0 | 2008-09-24T12:21:02.957000 | 2008-09-24T12:28:50.253000 |
126,790 | 129,402 | If you already know LISP, why would you also want to learn F#? | What is the added value for learning F# when you are already familiar with LISP? | Static typing (with type inference) Algebraic data types Pattern matching Extensible pattern matching with active patterns. Currying (with a nice syntax) Monadic programming, called 'workflows', provides a nice way to do asynchronous programming. A lot of these are relatively recent developments in the programming lang... | If you already know LISP, why would you also want to learn F#? What is the added value for learning F# when you are already familiar with LISP? | TITLE:
If you already know LISP, why would you also want to learn F#?
QUESTION:
What is the added value for learning F# when you are already familiar with LISP?
ANSWER:
Static typing (with type inference) Algebraic data types Pattern matching Extensible pattern matching with active patterns. Currying (with a nice syn... | [
"f#",
"functional-programming",
"lisp"
] | 7 | 19 | 3,313 | 11 | 0 | 2008-09-24T12:22:03.623000 | 2008-09-24T19:41:23.130000 |
126,794 | 126,848 | Find two consecutive rows | I'm trying to write a query that will pull back the two most recent rows from the Bill table where the Estimated flag is true. The catch is that these need to be consecutive bills. To put it shortly, I need to enter a row in another table if a Bill has been estimated for the last two bill cycles. I'd like to do this wi... | Assuming the rows have sequential IDs, something like this may be what you're looking for: select top 1 * from Bills b1 inner join Bills b2 on b1.id = b2.id - 1 where b1.IsEstimate = 1 and b2.IsEstimate = 1 order by b1.BillDate desc | Find two consecutive rows I'm trying to write a query that will pull back the two most recent rows from the Bill table where the Estimated flag is true. The catch is that these need to be consecutive bills. To put it shortly, I need to enter a row in another table if a Bill has been estimated for the last two bill cycl... | TITLE:
Find two consecutive rows
QUESTION:
I'm trying to write a query that will pull back the two most recent rows from the Bill table where the Estimated flag is true. The catch is that these need to be consecutive bills. To put it shortly, I need to enter a row in another table if a Bill has been estimated for the ... | [
"sql",
"sql-server",
"database"
] | 5 | 12 | 4,828 | 4 | 0 | 2008-09-24T12:22:53.607000 | 2008-09-24T12:29:35.807000 |
126,798 | 126,981 | Java: Invalid Keystore format Error | Does anyone know how to solve this java error? java.io.IOException: Invalid keystore format I get it when I try and access the certificate store from the Java option in control panels. It's stopping me from loading applets that require elevated privileges. Error Image | I was able to reproduce the error by mangling the trusted.certs file at directory C:\Documents and Settings\CDay\Application Data\Sun\Java\Deployment\security. Deleting the file fixed the problem. | Java: Invalid Keystore format Error Does anyone know how to solve this java error? java.io.IOException: Invalid keystore format I get it when I try and access the certificate store from the Java option in control panels. It's stopping me from loading applets that require elevated privileges. Error Image | TITLE:
Java: Invalid Keystore format Error
QUESTION:
Does anyone know how to solve this java error? java.io.IOException: Invalid keystore format I get it when I try and access the certificate store from the Java option in control panels. It's stopping me from loading applets that require elevated privileges. Error Ima... | [
"java",
"keystore"
] | 4 | 4 | 55,980 | 5 | 0 | 2008-09-24T12:23:19.283000 | 2008-09-24T13:01:58.457000 |
126,800 | 126,847 | Is there a way to determine if an exception is occurring? | In a destructor, is there a way to determine if an exception is currently being processed? | You can use std::uncaught_exception(), but it might not do what you think it does: see GoTW#47 for more information. | Is there a way to determine if an exception is occurring? In a destructor, is there a way to determine if an exception is currently being processed? | TITLE:
Is there a way to determine if an exception is occurring?
QUESTION:
In a destructor, is there a way to determine if an exception is currently being processed?
ANSWER:
You can use std::uncaught_exception(), but it might not do what you think it does: see GoTW#47 for more information. | [
"c++",
"exception",
"destructor"
] | 1 | 7 | 369 | 3 | 0 | 2008-09-24T12:23:43.137000 | 2008-09-24T12:29:34.760000 |
126,801 | 130,710 | Ruby on Rails - Why use tests? | I'm confused about what the various testing appliances in Ruby on Rails are for. I have been using the framework for about 6 months but I've never understood the testing part of it. The only testing I've used is JUnit3 in Java and that only briefly. Everything I've read about it just shows testing validations. Shouldn'... | Shouldn't the validations in rails just work? It seems more like testing the framework than testing the your code. Why would you need to test validations? The validations in Rails do work -- in fact, there are unit tests in the Rails codebase to ensure it. When you test a model's validation, you're testing the specific... | Ruby on Rails - Why use tests? I'm confused about what the various testing appliances in Ruby on Rails are for. I have been using the framework for about 6 months but I've never understood the testing part of it. The only testing I've used is JUnit3 in Java and that only briefly. Everything I've read about it just show... | TITLE:
Ruby on Rails - Why use tests?
QUESTION:
I'm confused about what the various testing appliances in Ruby on Rails are for. I have been using the framework for about 6 months but I've never understood the testing part of it. The only testing I've used is JUnit3 in Java and that only briefly. Everything I've read ... | [
"ruby-on-rails",
"ruby",
"testing"
] | 14 | 27 | 2,091 | 6 | 0 | 2008-09-24T12:23:45.600000 | 2008-09-25T00:01:35.720000 |
126,804 | 126,820 | What should I know about Git before I start using it? | I have used "traditional" version control systems to maintain source code repositories on past projects. I am starting a new project with a distributed team and I can see advantages to using a distributed system. Given that I understand SourceSafe, CVS, and Subversion; what suggestions do you have for a Git newbie? | The Git - SVN Crash Course is a good read for getting going. | What should I know about Git before I start using it? I have used "traditional" version control systems to maintain source code repositories on past projects. I am starting a new project with a distributed team and I can see advantages to using a distributed system. Given that I understand SourceSafe, CVS, and Subversi... | TITLE:
What should I know about Git before I start using it?
QUESTION:
I have used "traditional" version control systems to maintain source code repositories on past projects. I am starting a new project with a distributed team and I can see advantages to using a distributed system. Given that I understand SourceSafe,... | [
"git",
"version-control"
] | 8 | 12 | 684 | 5 | 0 | 2008-09-24T12:24:12.480000 | 2008-09-24T12:26:00.230000 |
126,829 | 126,875 | Pattern for trying different methods when exception is thrown | Here's a question to expose my lack of experience: I have a method DoSomething() which throws an exception if it doesn't manage to do it cleanly. If it fails, I try the less accurate method DoSomethingApproximately() several times in the hope that it will find a sufficiently good solution; if this also fails I finally ... | You should never use exceptions for control flow of your application. In your case I'd bunch the three methods together into a single method and have it return which particular approach succeeded, maybe with an enum or something like that. | Pattern for trying different methods when exception is thrown Here's a question to expose my lack of experience: I have a method DoSomething() which throws an exception if it doesn't manage to do it cleanly. If it fails, I try the less accurate method DoSomethingApproximately() several times in the hope that it will fi... | TITLE:
Pattern for trying different methods when exception is thrown
QUESTION:
Here's a question to expose my lack of experience: I have a method DoSomething() which throws an exception if it doesn't manage to do it cleanly. If it fails, I try the less accurate method DoSomethingApproximately() several times in the ho... | [
"design-patterns",
"exception"
] | 3 | 4 | 270 | 4 | 0 | 2008-09-24T12:27:02.660000 | 2008-09-24T12:37:21.747000 |
126,837 | 126,972 | How to solve "An attempt to attach an auto-named database for file..." SQL error? | I've got a local.mdf SQL database file that I am using for an integration testing project. Everything works fine on the initial machine I created the project, database, etc. on, but when I try to run the project on another machine I get the following: System.Data.SqlClient.SqlException: A connection was successfully es... | I'm going to answer my own question as I have the solution. I was relying on the automatic connection string which had an incorrect "AttachDbFilename" property set to a location that was fine on the original machine but which did not exist on the new machine. I'm going to have to dynamically build the connection string... | How to solve "An attempt to attach an auto-named database for file..." SQL error? I've got a local.mdf SQL database file that I am using for an integration testing project. Everything works fine on the initial machine I created the project, database, etc. on, but when I try to run the project on another machine I get t... | TITLE:
How to solve "An attempt to attach an auto-named database for file..." SQL error?
QUESTION:
I've got a local.mdf SQL database file that I am using for an integration testing project. Everything works fine on the initial machine I created the project, database, etc. on, but when I try to run the project on anoth... | [
"sql-server",
"linq-to-sql"
] | 3 | 3 | 7,103 | 2 | 0 | 2008-09-24T12:28:00.410000 | 2008-09-24T13:00:26.760000 |
126,853 | 127,539 | How do I set the UI language in vim? | I saw this on reddit, and it reminded me of one of my vim gripes: It shows the UI in German. I want English. But since my OS is set up in German (the standard at our office), I guess vim is actually trying to be helpful. What magic incantations must I perform to get vim to switch the UI language? I have tried googling ... | As Ken noted, you want the:language command. Note that putting this in your.vimrc or.gvimrc won’t help you with the menus in gvim, since their definition is loaded once at startup, very early on, and not re-read again later. So you really do need to set LC_ALL (or more specifically LC_MESSAGES ) in your environment – o... | How do I set the UI language in vim? I saw this on reddit, and it reminded me of one of my vim gripes: It shows the UI in German. I want English. But since my OS is set up in German (the standard at our office), I guess vim is actually trying to be helpful. What magic incantations must I perform to get vim to switch th... | TITLE:
How do I set the UI language in vim?
QUESTION:
I saw this on reddit, and it reminded me of one of my vim gripes: It shows the UI in German. I want English. But since my OS is set up in German (the standard at our office), I guess vim is actually trying to be helpful. What magic incantations must I perform to ge... | [
"vim",
"user-interface"
] | 112 | 36 | 76,251 | 16 | 0 | 2008-09-24T12:30:32.120000 | 2008-09-24T14:32:20.567000 |
126,863 | 157,371 | Use custom objects as the source for Microsoft Reports (.rdlc) | In some instances, I prefer working with custom objects instead of strongly typed datasets and data rows. However, it seems like Microsoft Reporting (included with VS2005) requires strongly typed datasets. Is there a way to use my custom objects to design and populate reports? | I found the answer. Yes, it's possible. You just have to add a custom object as a datasource in visual studio. http://www.gotreportviewer.com/objectdatasources/index.html | Use custom objects as the source for Microsoft Reports (.rdlc) In some instances, I prefer working with custom objects instead of strongly typed datasets and data rows. However, it seems like Microsoft Reporting (included with VS2005) requires strongly typed datasets. Is there a way to use my custom objects to design a... | TITLE:
Use custom objects as the source for Microsoft Reports (.rdlc)
QUESTION:
In some instances, I prefer working with custom objects instead of strongly typed datasets and data rows. However, it seems like Microsoft Reporting (included with VS2005) requires strongly typed datasets. Is there a way to use my custom o... | [
"object",
"reporting",
"rdlc"
] | 2 | 6 | 14,979 | 3 | 0 | 2008-09-24T12:33:36.887000 | 2008-10-01T12:38:41.393000 |
126,868 | 126,910 | How can I debug a C# COM assembly when it's being called from a native win32 application? | I'm developing a C# assembly which is to be called via COM from a Delphi 7 (iow, native win32, not.net) application. So far, it seems to work. I've exported a TLB file, imported that into my Delphi project, and I can create my C# object and call its functions. So that's great, but soon I'm going to really want to use V... | In the VS2008 project properties page, on the Debug tab, there's an option to set a different Start Action. This can be used to run an external program (e.g. your Delphi app) when you press F5. | How can I debug a C# COM assembly when it's being called from a native win32 application? I'm developing a C# assembly which is to be called via COM from a Delphi 7 (iow, native win32, not.net) application. So far, it seems to work. I've exported a TLB file, imported that into my Delphi project, and I can create my C# ... | TITLE:
How can I debug a C# COM assembly when it's being called from a native win32 application?
QUESTION:
I'm developing a C# assembly which is to be called via COM from a Delphi 7 (iow, native win32, not.net) application. So far, it seems to work. I've exported a TLB file, imported that into my Delphi project, and I... | [
"c#",
".net",
"windows",
"delphi",
"com"
] | 8 | 12 | 5,752 | 3 | 0 | 2008-09-24T12:35:20.283000 | 2008-09-24T12:47:12.237000 |
126,870 | 127,865 | Best design for lookup-and-possibly-change method | I am designing a class that stores (caches) a set of data. I want to lookup a value, if the class contains the value then use it and modify a property of the class. I am concerned about the design of the public interface. Here is how the class is going to be used: ClassItem *pClassItem = myClass.Lookup(value); if (pCla... | Two things. The first solution is close. Don't however, return ClassItem *. Return an "opaque object". An integer index or other hash code that's opaque (meaningless) to the client, but usable by the myClass instance. Then lookup returns an index, which modify can subsequently use. void *index = myClass.lookup( value )... | Best design for lookup-and-possibly-change method I am designing a class that stores (caches) a set of data. I want to lookup a value, if the class contains the value then use it and modify a property of the class. I am concerned about the design of the public interface. Here is how the class is going to be used: Class... | TITLE:
Best design for lookup-and-possibly-change method
QUESTION:
I am designing a class that stores (caches) a set of data. I want to lookup a value, if the class contains the value then use it and modify a property of the class. I am concerned about the design of the public interface. Here is how the class is going... | [
"oop"
] | 0 | 1 | 180 | 3 | 0 | 2008-09-24T12:35:37.977000 | 2008-09-24T15:26:04.070000 |
126,885 | 126,903 | Data Comparison | We have a SQL Server table containing Company Name, Address, and Contact name (among others). We regularly receive data files from outside sources that require us to match up against this table. Unfortunately, the data is slightly different since it is coming from a completely different system. For example, we have "12... | Here's something I wrote for a nearly identical stack (we needed to standardize the manufacturer names for hardware and there were all sorts of variations). This is client side though (VB.Net to be exact) -- and use the Levenshtein distance algorithm (modified for better results): Public Shared Function FindMostSimilar... | Data Comparison We have a SQL Server table containing Company Name, Address, and Contact name (among others). We regularly receive data files from outside sources that require us to match up against this table. Unfortunately, the data is slightly different since it is coming from a completely different system. For exam... | TITLE:
Data Comparison
QUESTION:
We have a SQL Server table containing Company Name, Address, and Contact name (among others). We regularly receive data files from outside sources that require us to match up against this table. Unfortunately, the data is slightly different since it is coming from a completely differen... | [
"sql-server",
"textmatching"
] | 5 | 4 | 469 | 5 | 0 | 2008-09-24T12:40:17.823000 | 2008-09-24T12:44:55.677000 |
126,894 | 127,086 | Visual Studio 2005 - Refactor multiple attributes in same time? | I use the right button>Refactor>Encapsultate field to have my accessor every time. The problem is when I create new class, I can have more than 10 attributes and it's long to do 1 by 1 every accessor. Is there a faster way to create them? Thank you for your time. | If you create a new class, you can use code snippets to create encapsulated fields instead of first creating field and then encapsulating it. In C#, the shortcuts are prop and propg (for private set). | Visual Studio 2005 - Refactor multiple attributes in same time? I use the right button>Refactor>Encapsultate field to have my accessor every time. The problem is when I create new class, I can have more than 10 attributes and it's long to do 1 by 1 every accessor. Is there a faster way to create them? Thank you for you... | TITLE:
Visual Studio 2005 - Refactor multiple attributes in same time?
QUESTION:
I use the right button>Refactor>Encapsultate field to have my accessor every time. The problem is when I create new class, I can have more than 10 attributes and it's long to do 1 by 1 every accessor. Is there a faster way to create them?... | [
".net",
"visual-studio",
"refactoring"
] | 2 | 2 | 2,248 | 3 | 0 | 2008-09-24T12:42:50.190000 | 2008-09-24T13:21:38.583000 |
126,896 | 127,242 | git-svn merges and commit details | we are using git-svn to manage branches of an SVN repo. We are facing the following problem: after a number of commits by user X in the branch, user Y would like to use git-svn to merge the changes in branch to trunk. The problem we're seeing is that the commit messages for all the individual merge operations look as i... | The git-svn man page recommends that you don't use merge. ""It is recommended that you run git-svn fetch and rebase (not pull or merge)"". Having said that, you can do what you like:-) There are 2 issues here. First is that svn only stores the commiter, not the author of a patch as git does. So when Y commits the merge... | git-svn merges and commit details we are using git-svn to manage branches of an SVN repo. We are facing the following problem: after a number of commits by user X in the branch, user Y would like to use git-svn to merge the changes in branch to trunk. The problem we're seeing is that the commit messages for all the ind... | TITLE:
git-svn merges and commit details
QUESTION:
we are using git-svn to manage branches of an SVN repo. We are facing the following problem: after a number of commits by user X in the branch, user Y would like to use git-svn to merge the changes in branch to trunk. The problem we're seeing is that the commit messag... | [
"svn",
"git",
"merge"
] | 5 | 13 | 3,296 | 3 | 0 | 2008-09-24T12:43:12.263000 | 2008-09-24T13:48:49.767000 |
126,897 | 127,060 | What is the equivalent of the SQLite datetime function in PostgreSQL? | The question is pretty self-explanatory. I'm looking for a PostgreSQL equivalent to the SQLite datetime function. | OK, thanks for the answers, they helped point me in the right direction. What I actually was looking for was to_timestamp. | What is the equivalent of the SQLite datetime function in PostgreSQL? The question is pretty self-explanatory. I'm looking for a PostgreSQL equivalent to the SQLite datetime function. | TITLE:
What is the equivalent of the SQLite datetime function in PostgreSQL?
QUESTION:
The question is pretty self-explanatory. I'm looking for a PostgreSQL equivalent to the SQLite datetime function.
ANSWER:
OK, thanks for the answers, they helped point me in the right direction. What I actually was looking for was ... | [
"sqlite",
"postgresql"
] | 2 | 2 | 3,798 | 3 | 0 | 2008-09-24T12:43:15.290000 | 2008-09-24T13:15:41.420000 |
126,898 | 126,975 | Organizing the source code base when mixing two or more languages (like Java and C++) | I ran into a problem a few days ago when I had to introduce C++ files into a Java project. It started with a need to measure the CPU usage of the Java process and it was decided that the way to go was to use JNI to call out to a native library (a shared library on a Unix machine) written in C. The problem was to find a... | "I didn't like this because I have only two C files and it seemed very odd to split the source base at the language level like this" Why does it seem odd? Consider this project: project1\src\java project1\src\cpp project1\src\python Or, if you decide to split things up into modules: project1\module1\src\java project1\m... | Organizing the source code base when mixing two or more languages (like Java and C++) I ran into a problem a few days ago when I had to introduce C++ files into a Java project. It started with a need to measure the CPU usage of the Java process and it was decided that the way to go was to use JNI to call out to a nativ... | TITLE:
Organizing the source code base when mixing two or more languages (like Java and C++)
QUESTION:
I ran into a problem a few days ago when I had to introduce C++ files into a Java project. It started with a need to measure the CPU usage of the Java process and it was decided that the way to go was to use JNI to c... | [
"codebase",
"polyglot"
] | 13 | 9 | 4,365 | 7 | 0 | 2008-09-24T12:43:16.257000 | 2008-09-24T13:00:52.517000 |
126,917 | 126,971 | Methods for caching PHP objects to file? | In ASPNET, I grew to love the Application and Cache stores. They're awesome. For the uninitiated, you can just throw your data-logic objects into them, and hey-presto, you only need query the database once for a bit of data. By far one of the best ASPNET features, IMO. I've since ditched Windows for Linux, and therefor... | Serializing is quite safe and commonly used. There is an alternative however, and that is to cache to memory. Check out memcached and APC, they're both free and highly performant. This article on different caching techniques in PHP might also be of interest. | Methods for caching PHP objects to file? In ASPNET, I grew to love the Application and Cache stores. They're awesome. For the uninitiated, you can just throw your data-logic objects into them, and hey-presto, you only need query the database once for a bit of data. By far one of the best ASPNET features, IMO. I've sinc... | TITLE:
Methods for caching PHP objects to file?
QUESTION:
In ASPNET, I grew to love the Application and Cache stores. They're awesome. For the uninitiated, you can just throw your data-logic objects into them, and hey-presto, you only need query the database once for a bit of data. By far one of the best ASPNET featur... | [
"php",
"caching"
] | 26 | 18 | 18,220 | 8 | 0 | 2008-09-24T12:48:37.320000 | 2008-09-24T13:00:03.470000 |
126,925 | 126,959 | How can I ensure a dialog will be modal when opened from an IE BHO? | I have an Internet Explorer Browser Helper Object (BHO), written in c#, and in various places I open forms as modal dialogs. Sometimes this works but in some cases it doesn't. The case that I can replicate at present is where IE is running javascript to open other child windows... I guess it's getting a bit confused so... | It wasn't my intention to answer my own question, but... It seems that if you pass in the correct IWin32Window to the ShowDialog() method it works fine. The trick is how to get this. Here's how I did this, where 'siteObject' is the object passed in to the SetSite() method of the BHO: IWebBrowser2 browser = siteObject a... | How can I ensure a dialog will be modal when opened from an IE BHO? I have an Internet Explorer Browser Helper Object (BHO), written in c#, and in various places I open forms as modal dialogs. Sometimes this works but in some cases it doesn't. The case that I can replicate at present is where IE is running javascript t... | TITLE:
How can I ensure a dialog will be modal when opened from an IE BHO?
QUESTION:
I have an Internet Explorer Browser Helper Object (BHO), written in c#, and in various places I open forms as modal dialogs. Sometimes this works but in some cases it doesn't. The case that I can replicate at present is where IE is ru... | [
"c#",
"internet-explorer",
"bho"
] | 1 | 1 | 1,092 | 2 | 0 | 2008-09-24T12:50:31.683000 | 2008-09-24T12:57:49.730000 |
126,939 | 127,052 | Log4Net/C# - Disable default logging | I am using log4net in a C# project, in the production environment, I want to disable all the logging, but when some fatal error occures it should log all the previous 512 messages in to a file.I have successfully configured this, and it is working fine. It logs the messages in to a file when some fatal error occures. B... | Remove the BasicConfigurator.Configure() line. That's what that line does -- adds a ConsoleAppender pointing to Console.Out. | Log4Net/C# - Disable default logging I am using log4net in a C# project, in the production environment, I want to disable all the logging, but when some fatal error occures it should log all the previous 512 messages in to a file.I have successfully configured this, and it is working fine. It logs the messages in to a ... | TITLE:
Log4Net/C# - Disable default logging
QUESTION:
I am using log4net in a C# project, in the production environment, I want to disable all the logging, but when some fatal error occures it should log all the previous 512 messages in to a file.I have successfully configured this, and it is working fine. It logs the... | [
"c#",
"log4net"
] | 7 | 7 | 8,694 | 2 | 0 | 2008-09-24T12:54:16.697000 | 2008-09-24T13:14:39.393000 |
126,966 | 127,182 | Is there a good lightweight multiplatform C++ timer queue? | What I'm looking for is a simple timer queue possibly with an external timing source and a poll method (in this way it will be multi-platform). Each enqueued message could be an object implementing a simple interface with a virtual onTimer() member function. | Boost::ASIO contains an asynchronous timer implementation. That might work for you. | Is there a good lightweight multiplatform C++ timer queue? What I'm looking for is a simple timer queue possibly with an external timing source and a poll method (in this way it will be multi-platform). Each enqueued message could be an object implementing a simple interface with a virtual onTimer() member function. | TITLE:
Is there a good lightweight multiplatform C++ timer queue?
QUESTION:
What I'm looking for is a simple timer queue possibly with an external timing source and a poll method (in this way it will be multi-platform). Each enqueued message could be an object implementing a simple interface with a virtual onTimer() m... | [
"c++",
"queue",
"timer"
] | 3 | 4 | 4,094 | 3 | 0 | 2008-09-24T12:58:48.857000 | 2008-09-24T13:39:07.120000 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.