c + + file operation

#include <iostream> #include <fstream> #include <algorithm> #include <string> #include <vector> using namespace std; void ex1_xtra2() { //Enter a file name string file_name; cout << "Please enter a file to be opened: (try input.txt or text.txt) "; cin >> file_name; ...

Posted on Sat, 19 Oct 2019 10:54:14 -0700 by wardo

Deep source code analysis task

Basic concept of task From the system point of view, the task is the smallest running unit competing for system resources. Tencentos tiny is an operating system supporting multi tasks. Tasks can use or wait for CPU, use memory space and other system resources, and run independently of other tasks. In theory, any number of tasks can share the sa ...

Posted on Wed, 16 Oct 2019 13:08:12 -0700 by hussainz2000

Continue to learn freertos message queuing

Write in front: Jay is very busy this month ~ so there is no time to update. Now the gym is closed and renovated. Update it if you have time in the evening! In fact, in the public account did not update this period of time, every day there are brothers to pay attention to my public account, which makes me flattered, thank you for your support h ...

Posted on Tue, 15 Oct 2019 07:04:28 -0700 by PastorHank

Understand thoroughly why arrays (strings) allocated on the stack cannot be used as return values

background Recent preparations From C Language Zero Foundation to PHP Extended Development Practice In the course of the case, the following code fragments are prepared to demonstrate the parsing of http scheme #include <stdio.h> #include <stdlib.h> #include <string.h> char *parse_scheme(const char *url) { char *p = strst ...

Posted on Sun, 13 Oct 2019 02:08:39 -0700 by BMurtagh

Algorithmic complexity O(logn) in detail

I. O(logn) code small proof Let's start with the following code: int cnt = 1; while (cnt < n) { cnt *= 2; //Sequence of Program Steps with Time Complexity O(1) } Since cnt is more approximate to n every time it multiplies by 2, that is to say, after X times, cnt will be larger than N and jump out of the loop, so (2 ^ x = n), that is ...

Posted on Sat, 12 Oct 2019 09:19:54 -0700 by The Chancer

SharpC: A C Interpreter In C# - 0000

Update: igame@May/16/2019: Removed "ExternalFunction": it's redundent. So did the "RegesterExternalFunction". Renamed "InternalFunctions" directory(or namespace) to "ExtraFunctions". Removed Flex/Bison project which based on WinSDK 8.1. Renamed extra function "input" to "inputDlg". Fixed bug: "inputDlg" won't work. When maintaining the new ...

Posted on Fri, 11 Oct 2019 23:04:37 -0700 by tickled_pink

OpenCV [OpenCV] OpenCV Actual Warfare From Beginning to Proficiency 12 - Teach you how to use pointers to access pixels

This article is the twelfth in the OpenCV Practical Warfare Series from Introduction to Proficiency [OpenCV] OpenCV Actual Warfare: An Introduction to OpenCV Macro [OpenCV] OpenCV Practical Operations From Introduction to Proficiency II--How OpenCV Carries out Image Corrosion Operations [OpenCV] O ...

Posted on Thu, 10 Oct 2019 14:39:33 -0700 by drak

Note a pit encountered when crypto's createCipheriv method was used to encrypt node.js

Node.js crypto module A set of encapsulations including hashing, HMAC, encryption, decryption, signature and verification of OpenSSL are provided. Specific methods of use can be referred to in the description of this article: node.js_crypto module. This paper focuses on the pits encountered when using the createCipheriv method. The correspond ...

Posted on Thu, 10 Oct 2019 05:09:41 -0700 by uluru75

Realization of PAT 1059 C Language Competition in C Language

C language competition is a happy competition hosted by computer college. Since the main idea of the competition is for fun, the rules for awarding awards are funny: 0. The champion will win a "mystery prize" (such as a huge collection of student research papers...). 1. Students ranked a ...

Posted on Wed, 09 Oct 2019 20:24:01 -0700 by Yetalia

5 Pointer and Function

1.1 Pointer and Function Parametric 1.1.1 General Reference The essence of C language median value transfer is that when the called function is called, the called function will open up the same type of parameter space in its function stack and save the transferred value in the parameter space. 1.1 ...

Posted on Wed, 09 Oct 2019 01:57:48 -0700 by blyz