Genetic algorithm for TSP (C + + implementation)

[question definition] 1. Traveling salesman problem Given a group of n cities and the direct distance between them, find a closed journey, so that each city just passes through once and the total travel distance is the shortest. TSP problem, also known as the problem of cargo carrier, is an old prob ...

Added by PhpxZ on Sun, 16 Feb 2020 06:53:15 +0200

Regular expression crawling Chinese ancient poetry net and Douban popular books

1, Crawling through the Chinese poetry net import re import requests def handler_url(url):     header={         "User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.87 Safari/537.36"     }     reponse=requests.get(url,header)     text=reponse.text     titles=re.findall(r'<div\sclass ...

Added by sanju on Sat, 15 Feb 2020 17:42:46 +0200

golang | windows platform golang environment building (after passing the pit)

background My environment Windows 10 (detailed version doesn't matter) go latest version vscode editor (not IDE, IDE needs money for goland) Guangzhou China Mobile Network golang installation download The official website https://golang.org can't be opened in China. All the reasons are clear. Do ...

Added by Crysma on Fri, 14 Feb 2020 13:40:11 +0200

The selenium geckodriver executable using Python must be in PATH

I'm a new programmer. I started to use Python about two months ago. Now I'm studying Sweigart's "automatically writing boring things in Python text". I am using IDLE and have installed selenium module and Firefox browser. Whenever I try to run the webdriver function, I get the following information: from selenium import webdriver b ...

Added by Dongowarrior on Fri, 14 Feb 2020 09:48:31 +0200

Gets the list of parameters passed in a Windows batch script (. bat)

I want to find the Windows batch copy, which corresponds to Bash's $@, which contains a list of all the parameters passed to the script. Or do I have to shift? #1 building The method to retrieve all parameters in the script is as follows: @ECHO off ECHO The %~nx0 script args are... for %%I IN (%*) DO ECHO %%I pause #2 building ...

Added by R_P on Wed, 12 Feb 2020 16:06:34 +0200

ROS learning record external control of raspberry pie Pixhawk (one stop to the end)

Preface Last time When it comes to learning ROS, it's mainly because we are doing many UAV cooperative control projects. It's said that ROS can be used to control Pixhawk UAV with raspberry pie. In this way, the source code of flight control can not be modified, and raspberry pie can be used for image ...

Added by trp on Tue, 11 Feb 2020 09:32:07 +0200

In depth -- CNN convolutional neural network using tf cnn for mnist handwritten digital code demonstration project

Return to home directory Back to CNN convolutional neural network directory The last chapter: Depth part -- CNN convolutional neural network (3) On ROI pooling and ROI Align and interpolation   In this section, I will elaborate on the demonstration project of mnist handwritten digit code using tf ...

Added by ibolui on Sun, 09 Feb 2020 15:55:37 +0200

Video player based on FFmpeg and SDL -- SDL video display

Video player based on FFmpeg and SDL (3) - SDL video display SDL introduction SDL (Simple DirectMedia Layer) is a set of open source cross platform multimedia development library written in C language. SDL provides several functions to control image, sound, output and input, so that developers can ...

Added by Pickle on Sun, 09 Feb 2020 12:26:14 +0200

Native js+WebGL for 3D Picture Effect

Overseas parties may have encountered this cool 3d picture effect when playing F***book: Just go through this entry on the client side- Or this entry for the web page version: Can be generated.Don't know how to play please refer to the official Help Manual .Let's teach you how to do this today. Don't worry, all the code doesn't add up ...

Added by dirtyfrenchman on Sat, 08 Feb 2020 20:50:11 +0200

Concurrent Go Language Foundation

1.1 Concurrent and Parallel Concurrent: Perform multiple tasks at the same time (chat with multiple friends using WeChat) Parallel: Perform multiple tasks at the same time (360 in windows is antivirus, and you're also writing code) The concurrency of the Go language is achieved through goroutine.Goroutines are similar to threads and are user-f ...

Added by Thethug on Sat, 08 Feb 2020 18:34:44 +0200