tombarta.wordpress.com
GCC pure virtual method called | Software Architecture
https://tombarta.wordpress.com/2008/07/10/gcc-pure-virtual-method-called
Html { display: awesome; }. GCC pure virtual method called. July 10, 2008 in C. I spent about two hours today trying to debug a race condition in a multi-threaded C app today… definitely not a fun thing to do. The worst part? The runtime diagnostics weren’t giving me. Useful to work with! Sometimes things just worked, sometimes I got segmentation faults inside old, well-tested parts of the application. At one point, I saw this error pop up:. Lo and behold, I confirmed that polymorphism. Here’s abou...
tombarta.wordpress.com
operator, and assert | Software Architecture
https://tombarta.wordpress.com/2009/12/22/operator-comma-and-assert
Html { display: awesome; }. Operator, and assert. December 22, 2009 in C. How many times have you ever. Used the comma operator in live C or C code? I’ve seen a Boost project use it as convenience notation for small compile-time datasets, but that’s about it. So, here’s an example of an absolutely. Way to use it (yes… this is how I blow off steam at work):. Include stdio.h #include string.h int main(int argc, char * argv) { return argc 1? Puts(foo),0) : (puts(not foo),1) : 1; }. Gcc test.c -E -DNDEBUG.
codeodyssey.se
Code Odyssey - URL-omskrivning - Blog about creative web development
http://www.codeodyssey.se/etiketter/url-omskrivning
Redirecta allt till root med htaccess. Hade fått tillgång till en ftp-server med en väldigt massa filer på från många år tillbaka som är indexerade av google. En herrans röra kan man säga. Denna redirectar endast html och php-filer och fungerar på mappar. Alla anrop på nämnda dokumenttyper skickas till rootmappen. Options FollowSymlinks RewriteEngine On RewriteCond %{THE REQUEST} GET .*(php html htm) HTTP RewriteRule (.*).(php html htm)$ / [R=301,L]. SQL Replace för att skapa Slugs. Brukar lägga til...
tombarta.wordpress.com
GCC Compiler-Defined Macros | Software Architecture
https://tombarta.wordpress.com/2008/08/09/gcc-compiler-defined-macros
Html { display: awesome; }. August 9, 2008 in C. I recently stumbled across an article referencing macros defined by gcc. That list is pretty daunting! If you compare it to GCC Common Predefined Macros. The official source), you realize quite fast that a lot of those macros exist for the benefit of. Library authors—not compiler end users such as myself. So here’s a bit of a smaller list that I usually have up my sleeves:. Use this instead of. Simple, and useful for code that needs to be compatible across...
tombarta.wordpress.com
integer micro-optimizations | Software Architecture
https://tombarta.wordpress.com/2009/12/04/integer-micro-optimizations
Html { display: awesome; }. December 4, 2009 in ASM. I like to sneak bitshifts into interviews—not because they’re used commonly in modern C code, but because they. Used to be common. As a way of getting good performance out of poor compilers. It’s very useful to know the tricks of the past, if you ever find yourself maintaining code written by an earlier generation of programmer. Take this example:. Unsigned imul(unsigned x) { return x * 10; } unsigned bitshift(unsigned x) { return (x 3) (x 1); }. If yo...
tombarta.wordpress.com
C++ stack traces with GCC | Software Architecture
https://tombarta.wordpress.com/2008/08/01/c-stack-traces-with-gcc
Html { display: awesome; }. C stack traces with GCC. August 1, 2008 in C. First, a word of warning:. This is not portable. Secondly… being able to produce stack traces (outside of the debugger) is something that’s usually reserved for languages like Python or Java… but it’s quite nice to have them in C . There’s several hurdles to overcome, however. This part is pretty easy, but unless you’re nosy with the header files in. It’s not likely to stumble upon this by chance. You pass me a buffer created by.
codeodyssey.com
Code Odyssey - ASP.NET - Blog about creative web development
http://www.codeodyssey.com/etiketter/aspnet
How to un-GAC ASP.NET MVC RC2. If you are like me you might have developed lots of web applications using different versions of the ASP.NET MVC framework, and might wonder how the latest installations may affect the ability to run. When upgrading to the latest Release Candidate 2. These old projects will probably build just fine, but there will most likely be some kind of run time error when running locally, like the one I just got and showing below. The CLR checks the GAC first. Luckily I've done this b...
codeodyssey.com
Code Odyssey - Blog about creative web development
http://www.codeodyssey.com/etiketter/url-omskrivning
More about the bad support for URL-rewrite in ASP.NET. I really love developing on ASP.NET with C# and will definitely continue using this technique from Microsoft. But everything can not be perfect. The greatest shortcoming of the framework is to me that there isnt any good native support for URL-rewriting. I have written a bit. One of the greatest critics of the situation is probably Mike Schinkel. This is the guy that started the wiki.welldesignedurls.org. And the companion blog. The first Mike is con...
tombarta.wordpress.com
worpdess | Software Architecture
https://tombarta.wordpress.com/2013/02/24/worpdess
Html { display: awesome; }. February 24, 2013 in CS 527. If the first version has a capital “P”, then my blog host has decided to usurp my editorial control by default. Wonderful. Harder, Better, Stronger, Faster. Ralph Johnson’s Blog. Ancient Domains of Mystery. Order of the Stick. The Perry Bible Fellowship. This looks like a title. And i bet this text will display on my main page. If i had a theme song, I would write the lyrics here. Don’t Click These! Comments feed for this article.
tombarta.wordpress.com
coverage is necessary but not sufficient | Software Architecture
https://tombarta.wordpress.com/2008/05/27/coverage-is-necessary-but-not-sufficient
Html { display: awesome; }. Coverage is necessary but not sufficient. May 27, 2008 in C. I’ve had several conversations with people who seemed overly proud about 100% code-coverage in their unit tests. Obviously, that’s a good thing: the more test cases, the less likelihood of a latent fault existing in the software. But code coverage has its dark side, too. Take a look at this (extremely contrived) C example:. Unsigned int noop(unsigned int x) { unsigned int y = x 4; return y 4; }. It may not be obvious...