02 2020 档案

摘要:1 #include <stdio.h> 2 #include <stdlib.h> 3 /* 4 具体思路如下: 5 1.定义一个二维数组chessboard[8][8],用于保存黑白双方棋子的位置。如果数组元素为0,表示该单元格未落子;如果是-1,表示该单元格是黑子;如果是1,则表示该单元格是白 阅读全文
posted @ 2020-02-26 12:37 xuecl 阅读(2187) 评论(0) 推荐(0)
摘要:1 #include <iostream> 2 #include <bitset> 3 using namespace std; 4 int main() 5 { 6 int n,m; 7 int len; 8 string temp; 9 bitset<8> t; 10 while(cin>>n> 阅读全文
posted @ 2020-02-25 17:54 xuecl 阅读(302) 评论(0) 推荐(0)
摘要:1 #include <bits/stdc++.h> 2 using namespace std; 3 4 const int MAX = 100; 5 char arr[MAX][MAX];//存放 “w 和 . ” 6 7 int nx[4] = {0,1,0,-1};//4个坐标(0,1)(1 阅读全文
posted @ 2020-02-25 17:26 xuecl 阅读(308) 评论(0) 推荐(0)
摘要:1 #include <bits/stdc++.h> 2 using namespace std; 3 4 const int MAX = 100; 5 char arr[MAX][MAX]; 6 int n,m; 7 8 void init(); 9 void solve(); 10 void d 阅读全文
posted @ 2020-02-25 17:13 xuecl 阅读(229) 评论(0) 推荐(0)
摘要:1 #include <iostream> 2 using namespace std; 3 4 bool isprime(int a){ 5 6 if(a<=1) return false; 7 8 for(int i=2;i*i<=a;i++){ 9 if(a%i==0) return fals 阅读全文
posted @ 2020-02-23 19:32 xuecl 阅读(156) 评论(0) 推荐(0)
摘要:1 #include <iostream> 2 using namespace std; 3 4 //最大公约数 5 int gcd(int a,int b){ 6 return b?gcd(b,a%b):a; 7 } 8 9 //最小公倍数 10 int lcm(int a,int b){ 11 阅读全文
posted @ 2020-02-23 16:47 xuecl 阅读(167) 评论(0) 推荐(0)
摘要:1 #include <iostream> 2 using namespace std; 3 4 void swap(int* a,int* b){ 5 int temp = 0; 6 temp = *a;*a=*b;*b=temp; 7 } 8 9 void qsort(int arr[],int 阅读全文
posted @ 2020-02-23 15:41 xuecl 阅读(499) 评论(0) 推荐(0)
摘要:1 #include <iostream> 2 using namespace std; 3 const int maxn = 100; 4 5 int merge(int A[],int L1,int R1,int L2,int R2){//L1、R1为第一段区间的左下标与右下标,同理L2、R2 阅读全文
posted @ 2020-02-23 14:50 xuecl 阅读(253) 评论(0) 推荐(0)
摘要:1 #include <iostream> 2 #include <vector> 3 4 using namespace std; 5 6 vector<int> selectSort(vector<int> arr){ 7 8 for(vector<int>::iterator i = arr. 阅读全文
posted @ 2020-02-22 16:22 xuecl 阅读(125) 评论(0) 推荐(0)
摘要:1 #include <bits/stdc++.h> 2 using namespace std; 3 4 void bubbleSort(int a[],int n){ 5 for(int i=0;i<n;i++){ 6 for(int j=0;j<n;j++){ 7 if(a[j]>a[j+1] 阅读全文
posted @ 2020-02-22 16:18 xuecl 阅读(133) 评论(0) 推荐(0)
摘要:一、文件与目录的基本操作 1.ls 列出文件或者目录的信息 ls [ aladffhinrRSt] file|dir a:列出全部文件及目录 l:列出文件及列表的详细信息 2.cd 更换当前目录 cd 相对路径或绝对路径 3.mkdir 新建目录 mkdir 目录名称 4.rm 删除目录或文件 rm 阅读全文
posted @ 2020-02-19 15:32 xuecl 阅读(204) 评论(0) 推荐(0)
摘要:解决措施 settings Danger Zone Make public 1. settings 2. Danger Zone Make public 公共仓库转为私有仓库的操作相同 阅读全文
posted @ 2020-02-14 23:28 xuecl 阅读(2194) 评论(0) 推荐(0)
摘要:apt终端命令apt是Advanced Packaging Tool, 是Ubuntu下的安装包理工具,大部分的软件安装/更新/卸载都是利用apt命令来 实现的, 直接在终端中输入apt 即可以查阅命令的帮助信息 ●常用命令如下: 1.安装软件$ sudo apt install 软件名 2.卸载软 阅读全文
posted @ 2020-02-11 11:30 xuecl 阅读(2602) 评论(0) 推荐(0)
摘要:转:https://www.cnblogs.com/dongxixi/p/11047087.html 阅读全文
posted @ 2020-02-07 17:33 xuecl 阅读(230) 评论(0) 推荐(0)
摘要:转:https://blog.csdn.net/weixin_36296538/article/details/83153070 前言: 最近在琢磨django框架的使用,在上传个人网站服务器上时,再次遇到了找不到静态文件,css、img等样式全无的问题。于是沉下心来,好好研究了django的静态文 阅读全文
posted @ 2020-02-07 17:25 xuecl 阅读(920) 评论(0) 推荐(0)
摘要:1. Django 静态文件分类 Django 静态文件分为两类:static 和 media。 static: 是页面引用的 JS、CSS、Image 等文件 media:是用户上传的文件 2. 生产环境配置 生产环境,通常配置 Nginx 转发静态文件请求,而 Django 处理动态请求。 ng 阅读全文
posted @ 2020-02-07 17:23 xuecl 阅读(874) 评论(0) 推荐(0)
摘要:转:http://www.pythondoc.com/pythontutorial3/index.html#python 阅读全文
posted @ 2020-02-07 17:17 xuecl 阅读(179) 评论(0) 推荐(0)
摘要:用命令 pip install django==2.1.0 装不上, 怎么办? 这样就可以了:pip install 包名 -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com 阅读全文
posted @ 2020-02-07 16:28 xuecl 阅读(340) 评论(0) 推荐(0)
摘要:转: linux之nginx入门 nginx入门与实战 nginx详细介绍 阅读全文
posted @ 2020-02-05 10:05 xuecl 阅读(122) 评论(0) 推荐(0)
摘要:在项目根目录下,运行命令: pip freeze > package.txt 然后项目文件上传到云服务器后,在项目根目录下,运行命令: pip3 install -r package.txt #安装相关依赖包,其中package.txt,是在客户端时,通过pip freeze > package.t 阅读全文
posted @ 2020-02-04 17:26 xuecl 阅读(501) 评论(0) 推荐(0)
摘要:引:django2+uwsgi+nginx上线部署到服务器Ubuntu16.04 阅读全文
posted @ 2020-02-04 16:35 xuecl 阅读(146) 评论(0) 推荐(0)
摘要:转:https://www.cnblogs.com/dylancao/p/10219956.html 一般Ubuntu默认的Python版本都为2.x, 如何改变Python的默认版本呢?假设我们需要把Python3.5设置为默认版本:首先查看Python默认版本: ubuntu@user~$:py 阅读全文
posted @ 2020-02-03 18:29 xuecl 阅读(357) 评论(0) 推荐(0)