Similar Posts
Win32 Programming: Operation on Files
ByEric MaHere, we show some example code on Win32. The code are operations on file on Win32 OSes. The code here uses some MFC classes. Recursively show the files from a path: void Show(const char *folderPath) { CFileFind finder; CString path(folderPath); path += “*.*”; BOOL bWorking = finder.FindFile(path); while (bWorking) { bWorking = finder.FindNextFile(); cout <<…
How migration thread works inside of Linux Kernel
Abstract In computer systems, resources have to be balanced so that the performance will be better based on the same hardware. In Linux Kernel system, we will see some migration kernel threads running as daemons to do this kind of jobs as follows. In this article, we will discuss how Linux Kernel balances its hardware/software…
How to process a file line by line in PHP?
ByQ AIn PHP, how to process a file line by line? The file is a plain text line like input.txt. As an example, the process can be to just print it out. In PHP, you can use this code snippet to process a file line by line: if ( ($fhandle = fopen(“./input.txt”, “r”) !== FALSE )…
Reading JSON from URL in R
ByDanielR is good at analyzing data. Many data are provided as JSON from RESTful APIs with an URL. R natively support many data format. For JSON, we can use some libraries. For reading JSON from URL, we can use the “jsonlite” package. In this example, we use an example of fetching BTC prices of last…
Printing a file in hexadecimal format of all content on Linux?
ByEric MaHow to print a binary file in hexadecimal format of all content? Use xxd: xxd file.txt or xxd -p file.txt Read more: Printing Integers in Hexadecimal Format in Python How to sort a file by hexadecimal numbers on Linux using sort command? How to read the whole file content into a string in Go? How…
Sybil Attack 101
Distributed systems, such as peer-to-peer networks, , and other decentralized platforms, have become increasingly popular due to their potential to offer more robust, scalable, and secure solutions. However, these systems face unique challenges and vulnerabilities, one of which is the Sybil attack. Named after the psychiatric case study “Sybil,” in which a person exhibits multiple…
