11 Reusable Code Snippet Topics
Remove Filter Haven't programmed in a long time. Last project was a GCODE pathway generator I wrote several years back. My compiler is obviously several years out of date. Uses time(), itoa(), rand(). Current standard compliant compilers should have <chrono>, <thread>, <random>, and to_string() in suppliment to those more deprecated functions. This … | |
Two version that do exactly the same thing! | |
Cheap, dirty code for Windows and *nix. | |
"Hello World!" done a little differently. Is this safe, unlikely; is there a point to all of this crap, nope; why are parts obfuscated, because I felt like it; was it fun, yes. You'll need the newest version of MinGW to compile, I used options -O2 -Os -s. | |
Got bored, remember a question asked in the forums, and decided to try something similar. | |
A quick way of spying inside of a process. You could also turn this into something like a disassemble, pretty easy, if you wanted too. Quick Notes: The inline assembly is GCC dependent(quick fix for other compilers), and in MinGW you need to link th32 and gid32. The code flow … | |
After flipping through some organic chemistry books I had, I found a interesting little table of basic hydrocarbons. I decided it would be nice to play around with it, by putting together something that could to some accuracy generate them. I am by no means a chemist. You don't even … | |
I decided to find a use for the STL map, and this is what I decided would be cool to practice with. Just have three placed in the code. Could use a function to load the requested elements from a file. | |
From part of a cryptanalysis tool I was writing, the other day. A way of obtaining possible XOR'ed string values. If you ever get to the point in the analysis that you can simply XOR the string to get closer towards your goal, of finding a weakness, this might be … | |
Occasionally there's times when you want to shift a bit over, but you would like to preserve the end of it, for one reason or another. Such as with say you have: [icode]10000001[/icode] but you would like: [icode]00000011[/icode] then latter on back to: [icode]10000001[/icode] Or in Dec 129-into-3, and 3-into-129. … |
The End.