bizarre

C++ template gotchas

just now I had to dig through the website to find out why template class template member function was giving syntax errors: template<class C> class F00 { template<typename T> bar(); }; ... Foo<C> f; f.bar<T>(); // syntax error here I now realize that template brackets are treated as relational operators. To do what was intended th...

How is the value of this variable changing in my C code?

Hi, I have come across a very odd problem in C that I have never encountered before. I have narrowed it down to the following very simple snippet. The variables are global and of type: int cpd; int nPart; And here is the relevant code snippet which I gradually stripped down to the very minimum needed to produce the issue: ...

How long can a webpage be?

Bit of a bizarre question, but does anyone know the actual limit to the length of a webpage, and why it is the limit? As an experiment, I'm using HTML and CSS to make a site that represents a journey to a scale of 1:1. I have a ul list of markers along the way that I have separated with large margins in the css. However, the longest mar...

Java AbstractAction sometimes not detecting escape key - bizarre behaviour

In a master/detail view I have a series of text fields (and one or two other controls) that all pertain to the detail of the currently selected item. They all share the same DocumentListener so if you change any of them a pair of "save"/"discard" buttons become enabled. The buttons invoke a method and I can happily save/discard items. H...

Using certain functions from stdlib.h or stdio.h causes syntax errors

I'm working on some C code in Visual Studio 2005 on Win7 Pro x64. The code is correct; it compiles and runs on MinGW under Eclipse. However, using certain functions from the standard C libraries like stdio or stdlib causes the following lines to exhibit syntax errors when the code is built in VS2005. As an example: #include<time.h> #...

Python bizarre class problem

Hi, I have the following piece of code where I try to override a method: import Queue class PriorityQueue(Queue.PriorityQueue): def put(self, item): super(PriorityQueue, self).put((item.priority, item)) However, when I run it I get TypeError exception: super() argument 1 must be type, not classobj What is the problem? ...

Bizarre IE checkbox bug?

I have some perfectly mundane code that puts 4 check-boxes in a 2x2 table. In Internet Explorer (but not in Firefox,Chrome,Opera, or Safari) the the two rightmost check-boxes will not toggle on and off. Well, they do, rarely, but only in a random haphazard manner. Please note that I have no JavaScript triggers associated with these ch...

COMException (0x800A13E9) - Word interop services

I am getting this stacktrace: System.Runtime.InteropServices.COMException (0x800A13E9): Word ðú÷ì ááòéä. at Microsoft.Office.Interop.Word.Documents.Add(Object& Template, Object& NewTemplate, Object& DocumentType, Object& Visible) at Crm.DocumentGeneration.Printing.DocumentsPrinter.MergeDocuments(ApplicationClass& wordApp, IEnume...