007. Producer consumer queue (read and write first and last)

The so-called producer consumer queue is the queue that a thread reads and a thread writes What we have implemented here is an unlocked producer consumer queue. The key points of the algorithm are as follows: 1.pop only modifies the head node, and push only modifies the tail node 2. Ensure that head and ...

Posted by naskoo on Tue, 14 Jan 2020 02:05:27 -0800

01 tensorflow linear regression

Article directory Preparation Important concepts Graph and Session Computation flow Data preparation Prepare the placeholder Initialization parameters / weights Calculate forecast results Calculate loss value Initialize optimizer Specify the number of iterations and execute graph in the session Oper ...

Posted by mapleshilc on Mon, 13 Jan 2020 23:12:46 -0800

How to add a browser tab icon (favicon) to a website?

I've been working on the site and I want to add a small icon to the browser tab. How do I do this in HTML and where do I need to put it in my code (such as a title)? I have a. png logo file that I want to convert to an icon. Relevant: HTML set image on browser tab . #1 building I have successfully done this for my website. The ...

Posted by soianyc on Mon, 13 Jan 2020 05:50:32 -0800

c++ new feature: regular expression

After c++11, regular expressions are formally included in the standard library, including the function modules of regex [match], regex [search] and regex [replace]. Through regular expressions, you can easily complete the operation of serializing sequence of specific patterns. Before using regular expre ...

Posted by LHBraun on Mon, 13 Jan 2020 05:46:38 -0800

ch05 code reuse for function writing

Article directory Code reuse and function writing Benefits of code reuse cost reliability Uniformity Use the require() function and the include() function require() function -- introduce code require() function -- making web site template Use auto prepend file and auto append file Using PHP func ...

Posted by MrSheen on Mon, 13 Jan 2020 03:47:13 -0800

Preliminary reptile summary

1, Basic steps of crawling web pages 1.1 determine crawling data The function of a crawler is to crawl the data needed in a large number of web pages, and determine what data is needed before that. Taking the second-hand house price as an example, if we need to do a cross-sectional regression analy ...

Posted by eagle1771 on Mon, 13 Jan 2020 03:06:21 -0800

OpenGL experiment one drawing simple graph

OpenGL Experiment 1 OpenGL (English: Open Graphics Library) is a cross language, cross platform application programming interface (API) for rendering 2D, 3D vector graphics. This interface consists of nearly 350 different function calls, which are used to draw from simple graphics bits to complex 3D s ...

Posted by CrimsonSoul on Mon, 13 Jan 2020 02:52:18 -0800

samba configuration shared user home directory

1. Install samba first sudo apt-get update sudo apt-get install samba openssh-server 2. Edit Samba configuration file sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.bak sudo vi /etc/samba/smb.conf Find the [homes] item, which is commented out by default, cancel the comment, and then modify the specific content as follows: #================== ...

Posted by digitalhuman on Sun, 12 Jan 2020 09:30:35 -0800

c - operation 5: tank battle (unfinished)

c - operation 5: tank battle (unfinished) General view & bullshit area Code (all) FormMain.cs Program.cs Bullet.cs Tank.cs Extant bug General view & bullshit area Why don't you finish it? Explain to yourself. It's not because you're lazy. It's not because you don't have time... Reason ...

Posted by dougp23 on Sun, 12 Jan 2020 06:18:04 -0800

The program written by Golang injects some version information, and the debugging speed is naturally several times faster!

background Print git submission information compilation information when Go program runs Golang compiling information injection program When debug ging, we need to know what version of go program is currently running Don't waste time trying to confirm the version External parameters can be injected during go build compilation Let go progra ...

Posted by dcav on Sun, 12 Jan 2020 06:05:50 -0800