obscure

How to debug "Unexpected debug information initialization error -- 'Failed to find a required export in the runtime.'"

I'm getting this error message on all projects (including brand new empty templates) I'm trying to build with Visual Studio 2008: Unexpected debug information initialization error -- 'Failed to find a required export in the runtime.' The Error Help for Compiler Error CS0040 is not very helpful: This error can occur when u...

What obscure syntax ruined your day?

When have you run into syntax that might be dated, never used or just plain obfuscated that you couldn't understand for the life of you. For example, I never knew that comma is an actual operator in C. So when I saw the code if(Foo(), Bar()) I just about blew a gasket trying to figure out what was going on there. I'm curious what ...

What's an example of Ruby code that's "too clever"?

I was having a discussion with some programmer friends who said that they see Ruby programmers (in particular) producing a lot of code that's "too clever". So I'm wondering what would that look like? I'm referring to the unnecessary use of an obscure language feature in a context in which something straightforward would have worked just ...

If this code is not a joke, how on earth does it work?

class Tree def initialize*d;@d,=d;end def to_s;@l||@r?",>":@d;end def total;(@d.is_a?(Numeric)?@d:0)+(@[email protected]: 0)+(@[email protected]: 0);end def insert d alias g instance_variable_get p=lambda{|s,o|d.to_s.send(o,@d.to_s)&& (g(s).nil??instance_variable_set(s,Tree.new(d)):g(s).insert(d))} @d?p[:@l,:]:@d=d end end ...

Protecting media files for embedded Flash Player

For a Flash Player embedded in a site (think MySpace, for instance), how are the files concealed from the user so that he is not able to just download them? I am assuming that given the flash player, running client-side, is able to access the files, they are in fact also downloadable if you know how. But how do sites like MySpace or You...

What are some of the more obscure parts of C++?

I've read quite a few beginner's books on C++, and a little beyond that, but what are some of the more obscure aspects of C++, or where can I find information/tutorials on these? ...

Why don't Firefox and other apps honor my Windows XP settings?

Recently for convenience I set up Windows XP to "Automatically move pointer to the default button in a dialog box" (via Control Panel => Mouse => Pointer Options). For most dialog boxes (e.g. Windows file delete confirmation, Outlook empty deleted items) Windows will follow this directive and automatically position my cursor above the d...

PHP Security when Passing MySQL Unique ID via Get

Lets say I have a website with links to various books on my main page. <a href='books.php?id=1'>Book 1</a> <a href='books.php?id=2'>Book 2</a> <a href='books.php?id=4'>Book 3</a> Books 1-3 are in my system, however id=3 is apart of another catelog that I'm not showing or authorizing through this section of the site. So if a user click...

Is the C preprocessor able to process strings char by char?

I'd like to obscure strings at compile time. I know it can be done in other preprocessors but I haven't found a way to do this with the C preprocessor. ...

Is '@' used in C++?

Is '@' used in C++? In this yacc file it is listed as a token. And i am sure i cant use @ as part of a variable name. Is @ used in C++? and how might i use it? ...

Munging non-printable characters to dots using string.translate()

So I've done this before and it's a surprising ugly bit of code for such a seemingly simple task. The goal is to translate any non-printable character into a . (dot). For my purposes "printable" does exclude the last few characters from string.printable (new-lines, tabs, and so on). This is for printing things like the old MS-DOS debu...

Obscure your Ruby code?

I am in the middle of developing an enterprise application using RoR (first time for us to build an enterprise app on RoR instead of Java), and while we do not have that much problem of obscuring the source code, I was still wondering if this was possible. Whether we could somehow just have a simple EXE or something else, such that our c...

What are some of the less-known and interesting public APIs and frameworks that I can use for iPhone?

What are some of the less-known and interesting public APIs and frameworks that I can use for iPhone? In OS 3.0 they're supposed to be 1000 new APIs more than in 2.2, so which one of these are the most interesting and not so well-known? ...

Ruby &&= edge case

Bit of an edge case, but any idea why &&= would behave this way? I'm using 1.9.2. obj = Object.new obj.instance_eval {@bar &&= @bar} # => nil, expected obj.instance_variables # => [], so obj has no @bar instance variable obj.instance_eval {@bar = @bar && @bar} # ostensibly the same as @bar &&= @bar obj.instance_variables # => [:@bar] #...

detect user picked up phone outgoing call with kdtele in .net

hi every body. i have an app that use kdtele component for communicating with the phones. when i make a call, and the end user pick up the phone, OnVoiceDetected'event don't fire.i use intel3chips v.92 modems.thanks a lot.. ...