-
Vào thư mục vừa tải về, chạy file bootstrap.bat
Hoặc gõ một trong các lệnh sau:
bootstrap vc142 (if you are using Visual Studio 2019) bootstrap vc141 (if you are using Visual Studio 2017)
bootstrap vc140 (if you are using Visual Studio 2015)
| #!/bin/bash | |
| #author: Phung Quoc Viet | |
| #description: read all line from filname then create directorys with format: line/no.line | |
| filename="filename.txt" | |
| n=1 | |
| while read line; do | |
| # reading each line | |
| mkdir "$n. $line" | |
| touch "./$n. $line/$line.cpp" | |
| echo -n "File No.$n: $line" |
| { | |
| "version": "2.0.0", | |
| "tasks": [ | |
| { | |
| "type": "shell", | |
| "label": "C/C++: g++.exe build active file with boost lib", | |
| "command": "g++", | |
| "args": [ | |
| "-g", | |
| "${file}", |
| { | |
| "version": "2.0.0", | |
| "tasks": [ | |
| { | |
| "type": "shell", | |
| "label": "C/C++: g++.exe build active file with boost and opencv lib", | |
| "command": "C:\\Program Files\\mingw-w64\\x86_64-8.1.0-release-posix-seh-rt_v6-rev0\\mingw64\\bin\\g++", | |
| "args": [ | |
| "-g", | |
| "${file}", |
| #include <mutex> | |
| #include <condition_variable> | |
| class Semaphore { | |
| private: | |
| std::mutex mtx; | |
| std::condition_variable cv; | |
| int count; | |
| public: |
| #include <condition_variable> // std::condition_variale | |
| #include <cstdlib> | |
| #include <iostream> | |
| #include <mutex> | |
| #include <thread> | |
| using namespace std; | |
| std::mutex g_mutex; | |
| std::condition_variable g_cv; |
| $ curl --help | |
| Usage: curl [options...] <url> | |
| --abstract-unix-socket <path> Connect via abstract Unix domain socket | |
| --alt-svc <file name> Enable alt-svc with this cache file | |
| --anyauth Pick any authentication method | |
| -a, --append Append to target file when uploading | |
| --basic Use HTTP Basic Authentication | |
| --cacert <file> CA certificate to verify peer against | |
| --capath <dir> CA directory to verify peer against | |
| -E, --cert <certificate[:password]> Client certificate file and password |
| public async Task LogNetworkRequests(IWebDriver driver) | |
| { | |
| INetwork interceptor = driver.Manage().Network; | |
| interceptor.NetworkRequestSent += OnNetworkRequestSent; | |
| interceptor.NetworkResponseReceived += OnNetworkResponseReceived; | |
| await interceptor.StartMonitoring(); | |
| driver.Url = "http://the-internet.herokuapp.com/redirect"; | |
| await interceptor.StopMonitoring(); | |
| } |
| #!/bin/bash | |
| #Kill process then re-build and run | |
| pid=`ps aux | grep LuongThangScraper | grep -v grep | awk {'print $2'}` | |
| if [ -z "$pid" ] | |
| then | |
| echo "LuongThangScraper not found!" | |
| else | |
| echo "LuongThangScraper running on PID = " $pid | |
| kill -9 "$pid" |
| #include <iostream> | |
| #include <mutex> | |
| #include <condition_variable> | |
| #include <thread> | |
| #include <vector> | |
| class ReadWriteLock { | |
| public: | |
| void read(std::function<void()> reader) { | |
| std::unique_lock<std::mutex> lock(mutex_); |