汇编是直接跟硬件打交道的, 于是在学习汇编的同时,不经意间就了解到计算机的工作原理。
这是饭前开胃菜,作者从什么是电流开始,讲加法器、数字逻辑、触发器、CPU 原理、外设等,是计算机(硬件)组成原理的科普向轻松读物
| // | |
| // Basic instrumentation profiler by Cherno | |
| // Usage: include this header file somewhere in your code (eg. precompiled header), and then use like: | |
| // | |
| // Instrumentor::Get().BeginSession("Session Name"); // Begin session | |
| // { | |
| // InstrumentationTimer timer("Profiled Scope Name"); // Place code like this in scopes you'd like to include in profiling | |
| // // Code | |
| // } |
D3D11 essentials:
Minimal D3D11 reference implementation: An uncluttered Direct3D 11 setup + basic rendering primer and API familiarizer. Complete, runnable Windows application contained in a single function and laid out in a linear, step-by-step fashion that should be easy to follow from the code alone. ~200 LOC. No modern C++, OOP or (other) obscuring cruft. View on YouTube
A list of useful commands for the FFmpeg command line tool.
Download FFmpeg: https://www.ffmpeg.org/download.html
Full documentation: https://www.ffmpeg.org/ffmpeg.html
| // Modified from: https://gist.github.com/aksakalli/9191056 | |
| using System; | |
| using System.Collections.Generic; | |
| using System.Net; | |
| using System.IO; | |
| using System.Threading; | |
| namespace MyNamespace | |
| { |
| # _______ __ __ _______ ______ _______ _______ _______ ______ # | |
| #| || | | || || | | _ || || || | # | |
| #| _ || | | ||_ _|| _ || |_| ||_ _|| ___|| _ |# | |
| #| | | || |_| | | | | | | || | | | | |___ | | | |# | |
| #| |_| || | | | | |_| || | | | | ___|| |_| |# | |
| #| || | | | | || _ | | | | |___ | |# | |
| #|_______||_______| |___| |______| |__| |__| |___| |_______||______| # | |
| # # | |
| # Modern CMake practices and importing the QT scripts by adding it to # | |
| # your module path makes things a lot better than it used to be # |
| // Lua C API | |
| #include <lua.hpp> | |
| // C++ input/output streams | |
| #include <iostream> | |
| // MyObject as C++ class | |
| class MyObject{ | |
| private: | |
| double x; | |
| public: |
| #include <stdio.h> | |
| #include <iostream> | |
| #include <string> | |
| #include <curl/curl.h> | |
| using namespace std; | |
| static string data; | |
| size_t writeCallback(char *buf, size_t size, size_t nmemb, void *up) | |
| { |