Which header should I include for DXTrace? - directx

I can't find the header which has the DXTrace function in it.
Which should I include?

you should include <DxErr.h>
You can find out more about DirectX SDK here:
http://msdn.microsoft.com/en-us/library/ee663275(v=vs.85).aspx

Related

clang-format header include guard

I'd like for the clang-format to check that each of my headers have the proper include guard.
For example, for the file dopelib/dopestuff/whatitisyo.h, I'd like the code to be formatted like this:
#ifndef DOPELIB_DOPESTUFF_WHATITISYO_H
#define DOPELIB_DOPESTUFF_WHATITISYO_H
/** Code here. **/
#endif // DOPELIB_DOPESTUFF_WHATITISYO_H
Can clnag-format check this structure and make sure that the include guard is there and that it is named appropriately with the file name in the #ifndef (sort of what cpplint does)?
As far as I know, clang-format doesn't currently support this.
However, you can do exactly this with clang-tidy (documented here). Invoke it like this:
clang-tidy -checks='-*,llvm-header-guard' -fix-errors myIncludeFile.h
Explanation:
The -* tells clang-tidy to disable all checks
The llvm-header-guard tells clang-tidy to enable the check which deals with include guards (documented here)
The -fix-errors tells clang-tidy to fix any resulting issues, even if it runs into other errors parsing the file
The llvm-header-guard expected format of the include-guards is exactly what you requested above; for example the file mydir/myfile.h would use MYDIR_MYFILE_H. I don't see any documentation which actually specifies that this is the format it uses, but I've verified at least version 6.0.0 does use that format.
Also see: clang include fixer, which does something similar.
The accepted solution may not work if
The project has a different file structure
Uses some extensions that clang does not understand
I have a script here: https://github.com/milasudril/texpainter/blob/master/devtools/include_guard_fix.py

Code Documentation in Dart

Do we have any code documentation syntax and tool support for generating Code Documentation out of Dart Application Code, something similar to Doxygen for C/C++. I prefer to use Markdown styled syntax than doxygen-syntax.
The DartDoc tool (which uses markdown) creates API documentation (as found at api.dartlang.org )
This describes the api reference for using DartDoc in your own code
The Readme.txt here, shows how you can format your code comments to generate API doc
///I am the beerclass
class BeerClass{
///this is a beer variable
String beername;
///this is a beer method
String get getBeer => "beer for the people";
}
Just go in the Darteditor: Tools->Generate Dartdoc. You get a new directory docs and you start index.html in your browser. Your class, variable and method have now documentation.

What crossplatform libraries do you recommend for Haxe?

I have already investigated.
I found nme,neash...Physaxe Do you know others?
format
hscript
utest
haxealtdate
hxJson2
xpath
ArrayTools/HashTools/IterTools/ListTools/StatTools
You can find all of them on the haxelib page.

HMAC-SHA-512 implemention for ActionScript

As mentioned by the title, I would like to find an implementation for HMAC-SHA-512 written for ActionScript. I was able to find a library that provide HMAC-SHA-256 with other functions, however, I am looking for HMAC-SHA-512 specifically.
Thank you
Edit:
Or, since actionscript and javascript have the same origin, can some one port this javascript version into actionscript?
http://pajhome.org.uk/crypt/md5/sha512.html
Edit 2:
I already ported the code from javascript to actionscript. The code can be found in one of the answers in this question
Porting SHA-512 Javascript implementation to Actionscript
Checkout this library:
http://code.google.com/p/as3crypto/
Though only does:
SHA-256,SHA-224,SHA-1,MD5, and MD2
So I guess that doesn't answer your question.
But best Crypto library for actionscript I've seen.
The implementation you link to doesn't seem to be using any features that aren't supported by ActionScript 3. Just surround the whole thing with public class SHA512 { }, and prefix the first five functions with public.
Edit: You will also need to convert function int64 to it's own class (or possibly use Number, though I'm not sure if you will lose precision for 64-bit integers).
Just found all of SHA-2 (SHA-224, SHA-256, SHA-384, SHA-512) implemented at http://code.google.com/p/flame/. Also it provides HMAC implementation. Didn't try it yet but looks what you're looking for.

How can I check for a specified header file in Waf?

I'm using waf to build a C program. I'd like to check for the existence of a particular header file during the configuration phase. Is there a way to do that?
Ah, a bit of googling found the answer to my question: You can use the check method on Configuration objects, like so:
def configure(conf):
conf.check(header_name="stdbool.h")

Resources