A site for solving at least some of your technical problems...
A site for solving at least some of your technical problems...
A Unix operating system created by the University of Berkeley.
As I am working on my as2js compiler, I stumble on a couple of problems with the for() loop parsing because of the in keyword. That made me think and the for() statement was actually a very funny one. Yes! You can actually write something like this and it compiles:
int zero; for(3;2;1) zero;
As you can see, all 3 entries in the for() statement are valid expressions and therefore the compiler can compile that code. This creates a loop that runs forever, similar to:
but much less clear to read, obviously.
Now that's food for thought, isn't it?
If you are like me and write DTDs to check your XML files to make sure you don't have too many mistakes in them, then you probably have had this problem before.
The #PCDATA has a very special behavior and it is really restrained as follow:
Something like this:
<!ELEMENT Z (P | (#PCDATA | A | B | C)* | Q)+>
does not work because you use + and #PCDATA is within a sub-group.
What you need ...
Today I opened a document where I had to make a few edits and LibreOffice decided to tell me:
Readonly content cannot be changed.
No modifications will be accepted.
There is a screenshot of that message:
The error may be justified, I do not know, but apparently not too many people know how to unlock a document. I found pages and pages that tell people to check the read/write protection of the file, as if a read-only file on disk could not be updated in the editor... (yes! you cannot write it back, but you can edit it and do a Save As ...)
One person, though, had the correct answer to ...
In the last few days I've been trying to find the reason for a slowness in one very specific case in a software. It looks like it crashes and since it includes many try/catch with (...) it certainly captures the fact, but contrary to what it is expected to do, this one does not get logged! In any event, I wanted to prove that the area where we first were looking was not affected, and sure enough it was not. The problem is somewhere else. However, to prove that I needed to have a way to log milli-seconds because things happen very fast and a 1 second decimation is definitively not enough.
As I write programs, mainly in C++, I document them using the Doxygen tool. This is a very powerful parser that is capable to finding functions, variables, macros, and many other things in the source code and attach the corresponding documentation to those functions, variables, macros, etc.
This is extremly practical when creating large projects or libraries that you want to share with others.
One problem though, by default it seems like global functions (and thus C functions) and variables do not make it to the documentation, when C++ classes work fine.
There are two potential issues:
A little while ago I had a problem with the Thunderbird Sent folder.
I'm not too sure what had happened but it just wouldn't work right.
I found a page talking about the problem here:
The solution that worked for me is actually documented in that post. Ther eit is:
One thing that I quickly do on my browsers is turn off warnings about non-secure data when browsing secure pages (with HTTPS .)
It's rarely a problem and with all those features you like to have (Facebook, Twitter, AddThis, ShareThis, Google Plus, and othe fun widgets...) it's hard to avoid. Actually, many times the problem lies in one of these scripts and thus you cannot just fix your website. Without that 3rd party script owner fixing their code, it just won't work at all.
Now, once in a while I work on a customer website and they really want to have a 100% clean slate. Thus,
It has always been weird to me to see that the delete operator was not actually going to call all the destructor on objects. That is, if you create a class B that derives from a class A, deleting an object when cast to A does not (by default) call the destructor defined in class B.
The result is that ALL classes should define their destructor as virtual. This doesn't make sense because you shouldn't have to have a virtual table in all your objects just for the destructor to work right. On the other hand, class A has no way to know that it will be derived by class B so its destructor
Today I finally found out how to fix the path of the forums.
The name of the vocabulary is "Forums". To access it as expected in pathauto, you use [vocab-raw].
The result of [vocab-raw] is "forums" (all lowercase.)
Then, by default, pathauto adds the list of categories to the path. This is done using the [catpath-raw]. Say you have a forum named "Linux Stuff", [catpath-raw] will return "Linux Stuff" as is. This makes sense because paths on Linux are case sensitive (actually, it's the same thing with Apache wherever you are using it, although it's a
I have to use Qt these days. It's a good system, but there are a few tricks to know about.
As I was starting to write a test, the test needed a lot of numbers but nothing much otherwise. So I decided to limit the #include to a minimum by deleting all of those that I did not need.
The result was this error:
"Cannot create a QWidget when no GUI is being used"
I looked into it and sure enough people talking about it say: Well... where is your GUI?
Great, but I don't see how that helps me in fixing the problem, does it do it for you? Neither?!
Find the page/content you are looking for with our index.
A hard drive is a device that save a large quantity of data for later recollection.
Most hard drives today use a magnetic system to save the data. However, those do get really hot and tend to break easily because they use a mechanical head (after 4 to 5 years.) Yet, they have an incredible capacity with drives that can hold as much as 2Tb.
New modern drives use flash technology. This is like your USB thumb drive. It does not get hot, it is silent, it has much faster read access (no head to move.) It has two drawback: (1) it has a rather slow write and (2) the capacity is still quite small (at time of writing we are starting to get 128Gb drives...) The price is also much higher, but if you consider that these drives will probably last you twice as long as the magnetic drives and you won't need extraneous cooling systems, overall, it probably still worth it.