Skip to content

Instantly share code, notes, and snippets.

View KVM-Explorer's full-sized avatar

traveller KVM-Explorer

View GitHub Profile
@looopTools
looopTools / Read File to std::vector<uint8_t> in C++
Created February 1, 2019 13:33
How to read a file from disk to std::vector<uint8_t> in C++
inline std::vector<uint8_t> read_vector_from_disk(std::string file_path)
{
std::ifstream instream(file_path, std::ios::in | std::ios::binary);
std::vector<uint8_t> data((std::istreambuf_iterator<char>(instream)), std::istreambuf_iterator<char>());
return data;
}
@qyzhaojinxi
qyzhaojinxi / 解决问题的思路和方法
Last active August 1, 2022 11:53
解决问题的思路和方法 #问题 #思路 #方法
解决问题的思路和方法
不少开发者在遇到bug或者技术难题时不能够很高效的找到解决方法,这和经验积累有关,
也和各自的思考方式、习惯有关系。当然也有很多人不存在这个问题。这里我用我有限的经验和想法,
聊一下我遇到问题时的一些思路,希望能对存在问题的各位开发者有些参考价值。看不上的可以绕走,不喜勿喷啊。
一、寻找线索