Implementing my own GNU stricmp, wcsicmp etc for wchar* stuff - c++

Ok. I need to implement methods like these. Is there a way to view the source code online for methods like these, so I can just add them into my own .h and .cpp files? will this work and where can I see the source.

These functions are part of glibc,
you can find it here http://www.gnu.org/s/libc/ .
You can download release version via ftp or get current version
via git (you can find links on html url above), as I know there is no access to code via web to separate files,
but may be, may be codesearch http://www.google.com/codesearch, can show them, but I never try.

Related

How to get symbols from just my own code using DIA SDK

I'm using the DIA SDK to get symbol information from .pdb files. For example, I want to use this to get a list of classes, functions, member variables, and so on from a project.
After some messing around I've been able to get this information, however I'm also getting a lot of extra stuff that isn't my own code but is added in after (by the standard library and such).
I've tried filtering this based on the source file of the given symbol, however get_sourceFileName() seems to be unreliable, usually not returning any value.
Any help would be appreciated, whether it's getting get_sourceFileName() to work properly or some other way of filtering out objects from code that isn't part of the project.
Note that I know there are alternatives to the DIA SDK that would make this easier, such as libclang, however those are not an option for this project for various reasons.

How can I compile my ColdFusion code for sourceless distribution, and have it be unreadable?

I've been tasked with creating a deployable version of a ColdFusion web app to be installed on a clients server. I'm trying to find a way to give them a compiled version of our code, and my first inclination was to use the CFCompile utility that I found here. However, after running CFCompile, most of the code in the CFM files is still readable. The only thing that appears to be obfuscated at all is the actual ColdFusion code - all of the SQL Queries are still perfectly readable. (Example in the screenshot below)
The HTML and JavaScript are also still readable in the compiled code, but that doesn't matter as those can be seen in a web browser anyways.
Is there another way to distribute my source code in a format that is completely unreadable to the user? I'm guessing that for whatever method I choose, there will be some way of decompiling the code. That's not an issue, I just need to find a way to make it more difficult than opening the file and seeing the queries.
Hostek has a pretty good write up on the subject over on their site - How to Encrypt or Compile ColdFusion Files.
Basically, from that article:
Using cfcompile.bat
The cfcompile.bat utility will compile all .cfm and .cfc files within a given directory into Java bytecode. This has the effect of making your source code unreadable, and it also prevents ColdFusion from having to compile your ColdFusion files on first use which provides a small performance enhancement.
More details about using cfcompile.bat can be found in ColdFusion's Documentation
Using cfencode.exe
The cfencode.exe utility will apply basic encryption to a specific file or directory. If used to encrypt a directory, it will apply encryption to ALL files in the directory which can break any JS, CSS, images, or other non-ColdFusion files.
They do also include this note at the bottom:
Note: Encrypting your site files with cfencode does not guarantee absolute security of your source code, but it does add a layer of obfuscation to help prevent unauthorized individuals from viewing the source.
The article goes on to give basic instructions on how to use each.
Adobe has this note on their site regarding cfencode:
Note: You can also use the cfencode utility, located in the cf_root/bin directory, to obscure ColdFusion pages that you distribute. Although this technique cannot prevent persistent hackers from determining the contents of your pages, it does prevent inspection of the pages. The cfencode utility is not available on OS X.
I would also add that it will be trivial for anyone familiar with ColdFusion to decode anything encoded with this utility because they also provide the decoder.

How to change back to code from html created by doxygen

I batch create the documents from the code by using doxygen. However, I lost code and I didn't lose the document. I want to convert the code back from the documents. Is there any option in doxygen to do this? Thank you very much.
By the way, the documents are all html files
Doxygen is a documentation generator; it's job is to go from code to documentation. As such, it has no functionality for reversing this process. Especially since the generated HTML can change from version to version.
Documentation conversion is also an inherently lossy process. Unless you outputted all of your source code into the documentation, you're not going to be able to reconstruct everything. The best you might do is rebuild most aspects of some headers, but even then, anything that goes undocumented (like header include files and such) won't be in the HTML.

How Can A .dll File Read a .txt File?

I would like my Browser Helper Object which is simply a .dll, to be able to read a text file. I have tried using a pointer to a FILE, as well as ifstream in("file name goes here"). Before implementing these two methods of reading files into the BHO, I tested them individually, and made sure each example dealt with similar data types and locations. Both of them worked without a problem, yet testing the BHO reveals that the file cant even be opened. I have searched google for an alternative method, and after exhausting all other options, I'm hoping that someone would be able to provide me with some guidance/resource. Anything is appreciated; I will keep trying to find a solution and will post what I can in the event that someone else may have the same problem.
Are you providing an absolute path to the file? If you're just using a relative path you may not be in the same working directory while running IE.
I think you might be a victim of the IE protected mode.
http://www.codeproject.com/KB/vista-security/PMSurvivalGuide.aspx
Under protected mode your addin might not have access to registry and file system as you might like.

Where can I get templates for MediaWiki?

I have noticed that a lot of mediawiki-based websites use such templates as Robelbox, Ambox etc. Where can I get them and how should they be installed?
It's a PITA and unfortunately (unlike extensions or media files) there is no repository of canned templates. Templates load other templates which load others in turn, etc.
Go to Wikipedia and copy the name of the template you're after, go to Special:Export and paste the name of the template in the big text box, e.g. Template:Infobox. Check "Include templates" and check "Include only the current revision, not the full history", (or the file will be too big). Click Export to dump a .xml file of the template. Then import this into the destination wiki.
After it has been imported open the template for editing, check the list below the edit box "Pages transcluded onto the current version of this page:". If there are any red links repeat the above steps for these templates as well. You might also need to copy styles in MediaWiki:Common.css page and Javascript in MediaWiki:Common.js before everything works. Finally edit the templates to customize for your wiki.
If it still doesn't work and you have messy pages of braces and if statements, then you need to install the ParserFunctions extension. If there is {{#invoke: }} in template code you'll also need to install the Scribunto extension.
MediaWiki Help:Templates explains the process in more detail.
You can directly copy templates from Wikipedia. A nice example is the Keypress template.
This task is a bit more involved than just exporting and importing.
A "simple" overview can be found here -> How to add Wikipedia templates to your own Mediawiki
Upgrade our MediaWiki to the latest stable version, hoping to match Wikipedia’s one.
Install the Scribunto extension and properly configure it.
Export/Import the LUA modules used by the (meta)templates you want to use and import them in your MediaWiki.
Export/Import the Wikipedia templates you want to use, together with all the required metatemplates, and import them in your
MediaWiki.
Copy the relevant CSS classes from the Wikipedia’s Common.css file and paste them in your MediaWiki’s Common.css.
Activate MediaWiki IstantCommons feature to automatically fetch the Template image files from the commons.wikipedia.com repository.