自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(41)
  • 收藏
  • 关注

原创 大规模数据排序,对一亿个int型整数排序,大规模数字在有限内存上排序,外部排序

【代码】对一亿个int型整数排序,大规模数字在有限内存上排序,外部排序。

2024-04-08 17:47:25 124 1

原创 Docker启动容器

Docker启动运行容器

2023-01-12 21:05:19 86

原创 git clone出现错误的解决方案

git 解除SSL验证。

2022-12-21 15:20:09 847

原创 leetcode 最长回文字串

leetcode 最长回文字串最长回文字串递推公式KaTeX parse error: Expected 'EOF', got '&' at position 38: …eft+1,right-1) &̲& (S[left]==S[r…边界条件为j-i<3,即二者index为 相邻或者隔一,则为回文串。例如 aa,aba。class Solution { public String longestPalindrome(String s) {

2022-03-18 00:27:55 303

原创 Mac/linux/windows vscode 一套配置三个平台 C/C++

Mac/linux/windows vscode 一套配置三个平台 C/C++

2021-06-04 18:28:05 878

原创 python数据集处理小工具合集

文件重命名import globimport shutilimport osold_dir = "./label"file_list = glob.glob(old_dir+"./*")for file in file_list: ori_name = os.path.split(file)[1] new_name1 = ori_name.split(".")[0] new_name2 = new_name1+".txt" os.rename(file,ne

2021-04-19 16:48:34 344 1

原创 ubuntu开机自启

sudo vim /etc/systemd/system/jupyter.service[Unit]Description=jupyter notebookAfter=network.target[Service]Type=simpleUser=cjr403EnvironmentFile=/home/cjr403/anaconda3/envs/pytorch/bin/jupyter-notebookExecStart=/home/cjr403/anaconda3/envs/pytorch

2021-01-20 21:09:17 86

原创 自然语言处理的研究方向

research topics in NLPOptical character recognition (OCR) 光学字符识别Given an image representing print test, determine the corresponding text给定一个代表打印测试的图像,确定相应的文本Questing answering 问题回答Given a human-languagge question,determine its answer. Typical

2020-12-22 11:20:51 775

原创 frp内网穿透,配置文件

frp后台运行frpcs.ini[common]bind_port = 8989frpc.ini[common]server_addr = 47.113.192.43server_port = 8989[ssh]type = tcplocal_ip = 127.0.0.1local_port = 22remote_port = 5000[range:VNC]type = tcplocal_ip = 127.0.0.1local_port = 5900remote_po

2020-12-18 09:07:10 355

原创 Anaconda 配置深度学习环境 tensorflow-gpu

1.Anaconda 的下载Anaconda 安装包可以到 https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/ 下载。安装,勾选加入path2.anaconda换源TUNA 还提供了 Anaconda 仓库与第三方源(conda-forge、msys2、pytorch等,查看完整列表)的镜像,各系统都可以通过修改用户目录下的 .condarc 文件。Windows 用户无法直接创建名为 .condarc 的文件,可先执行 conda con

2020-10-26 22:15:11 341 1

原创 简洁的KMP算法,C++实现

字符串模式匹配next数组求解以求c字符之前的最长公共前后缀为例,先假定len为3。前缀对应aba,后缀对应bab,由于前缀第一个字符a 不等于 后缀第一个字符 b,显然len应该减1len减一之后,前缀对应ab,后缀对应ab,见下图。则len定为2,next[j]=2。即next[4]=2;全部代码如下:#include <iostream>#include <cstring>using namespace std;void GetNext(char T[

2020-10-03 10:29:59 150

原创 IDEA快捷键

IDEA快捷键Ctrl+Shift + Enter,语句完成“!”,否定完成,输入表达式时按 “!”键Ctrl+E,最近的文件Ctrl+Shift+E,最近更改的文件Shift+Click,可以关闭文件Ctrl+[ OR ],可以跑到大括号的开头与结尾Ctrl+F12,可以显示当前文件的结构Ctrl+F7,可以查询当前元素在当前文件中的引用,然后按 F3 可以选择Ctrl+N,可以快速打开类Ctrl+Shift+N,可以快速打开文件Alt+Q,可以看到当前方法的声明Ctrl+P,可以

2020-08-18 11:45:06 129

原创 /etc/profile

# /etc/profile: system-wide .profile file for the Bourne shell (sh(1))# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).if [ "${PS1-}" ]; then if [ "${BASH-}" ] && [ "$BASH" != "/bin/sh" ]; then # The file bash.bashrc already s

2020-08-13 20:42:56 711

原创 ubuntu terminal

sudo apt update && sudo apt upgrade && sudo apt install build-essential gdb default-jdk java-11-openjdk-amd64 python3

2020-08-13 20:40:30 77

原创 01-network-manager-all.yaml

network: version: 2 ethernets: ens33: dhcp4: no addresses: [192.168.1.30/24] gateway4: 192.168.1.1 nameservers: addresses: [114.114.114.114,8.8.8.8]

2020-08-13 20:36:04 6434

原创 sources.list

# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiversedeb https://mirrors.tuna.

2020-08-13 20:35:25 217

原创 MatLab 安装过程

我已有我的许可证的文件夹安装密钥09806-07443-53955-64350-21751-41297选择“输入许可证文件的完整路径(包括文件名)”,然后点击“浏览”选择下载文件中的“激活文件”文件夹下的“license_standalone.lic”...

2020-08-03 07:40:13 244

原创 田忌赛马 C++实现

/** * 田忌赛马问题 * @author liule * (1)最快马。若田忌快,则使用田忌最快马对齐王最快马 * (2)最快马。若齐王快,则使用田忌最慢马对齐王最快马 * (3)最快马。两者同速: * ①:最慢马田忌快,则使用田忌最慢马对齐王最慢马。 * ②:最慢马齐王快,则使用田忌最慢马对齐王最快马。 * 以上每一步选择均是最优,因此结果最优。 */#include<iostream>#include<vect

2020-08-02 23:24:35 3807

原创 Java 快排

import java.util.Random;public class QuickSort { public static int partition(int[] arr, int low, int high) { int pivot = arr[low]; while (low < high) { while (low < high && arr[high] >= pivot) {

2020-08-02 22:42:05 68

原创 windows vs code c/c++ 调试配置

使用的编译器为“mingw64”c_cpp_properties.json{ "configurations": [ { "name": "Win32", "includePath": [ "${workspaceFolder}/**" ], "defines": [ "_DEBUG",

2020-07-27 10:35:40 137

原创 LATEX Mathematical Symbols--Typora

2020-07-23 08:43:24 531

原创 我的终极 .vimrc

" All system-wide defaults are set in $VIMRUNTIME/debian.vim and sourced by" the call to :runtime you can find below. If you wish to change any of those" settings, you should do it in this file (/etc/vim/vimrc), since debian.vim" will be overwritten ev

2020-05-16 11:19:28 278

原创 一个简单的动态规划例子

#include<iostream>using namespace std;class dp{private: int arr[7]={1,2,4,1,7,8,3}; int i=sizeof(arr)/sizeof(arr[0]); int n=6; int rec_opt(int arr[],int n); int dp_opt(i...

2020-05-03 15:55:38 119

原创 mytree.cpp

//tree.h#pragma oncetemplate<typename A>class Tree{public: typedef struct node { A data; struct node* left, * right; }node,*tree; tree T,stack[100]; tree p,q; tree queue[100]; vo...

2020-04-26 14:36:52 126

原创 最简洁代码 树的各种遍历,递归非递归

#include<iostream>using namespace std;typedef char TElemType;typedef int Status;typedef struct BitNode{ TElemType data; struct BitNode *lchild,*rchild;}BitNode,*BitTree;Status CreatBitT...

2020-04-26 09:24:19 147

原创 归并排序 mergesort.cpp

#include<iostream>using namespace std;const int N=10;class Mergesort{ private: int arr[N]; int M,L,R; public: void merge(int arr[],int L,int M,int R); ...

2020-04-16 07:57:40 223

原创 求长方形和圆形的面积和周长.cpp

//1.hclass circel{ private: double r; double areacircel(); double lenthcircel(); public: void input(); void output();...

2020-04-15 19:48:09 500

原创 二叉树的一些基本操作,c语言实现

#include<stdio.h>#include<stdlib.h>typedef struct node{ int data; struct node* left; struct node* right;}Node;typedef struct { Node* root;/* data */}Tree;void i...

2020-04-13 11:14:49 217

原创 mergesort.cpp

#include<iostream>using namespace std;void merge(int arr[],int L,int M,int R){ int leftsize = M - L; int rightsize = R - M + 1; int left[leftsize]; int right[rightsize]; i...

2020-04-05 16:57:53 213

原创 heapsort.cpp

#include<iostream>using namespace std;void swap(int tree[],int i,int k){ int temp=tree[i]; tree[i]=tree[k]; tree[k]=temp; }void heapify(int tree[],int i,int n){ if(i >...

2020-04-05 15:58:04 71

原创 quicksort.cpp

#include<iostream>using namespace std;int partition(int A[],int low ,int high){ int pivot=A[low]; while(low<high){ while(low<high&&A[high]>=pivot){ ...

2020-04-04 21:40:19 163

原创 bubblesort.cpp

#include<iostream>using namespace std;void swap(int &a,int &b){ int temp = a; a = b; b = temp;}void bubblesort(int A[],int n){ int i, j; for ( i = 0; i < n-1; i++){ ...

2020-04-04 21:08:22 83

原创 shellsort.cpp

#include<iostream>using namespace std;void shellsort(int A[],int n){ int dk,i,temp,j; for(dk=n/2;dk>=1;dk=dk/2) { for(i=dk;i<n;++i) { if(A[i]<...

2020-04-04 11:41:52 65

原创 searchsort.cpp

#include<iostream>using namespace std;void searchsort(int A[],int n){ int i,j,low,high,mid; for(i=1;i<n;i++) { int temp=A[i]; low=0,high=i-1; while(low...

2020-04-04 11:08:17 76

原创 一个递归的简单实现

#include<iostream>using namespace std;#define maxsize 50double p(int n, double x) { struct stack { int no; //保存n double val; //保存Pn(x)的值 }st[maxsiz...

2020-03-30 11:09:40 139 1

原创 vscode terminal设置

{ "sync.gist": "1e11137686ef7208ef3ef453e835c629", "terminal.integrated.shell.linux": "/bin/sh", "terminal.integrated.cursorBlinking": true, "terminal.integrated.lineHeight": 1.2, "term...

2020-03-27 14:19:09 6234

原创 C/C++ 栈的基本操作

#define maxsize 50#include<iostream>using namespace std;typedef struct{ char data[maxsize]; int top;}stack;void initstack(stack &s){ s.top=-1;}bool stackempty(stack s)...

2020-03-27 14:11:06 301

原创 my gist

1e11137686ef7208ef3ef453e835c629

2020-03-19 14:06:33 64

原创 C/C++的一些代码

```cpp#include<iostream>using namespace std;//尾插法,头插法//按序号查找,按值查找,插入结点,求表长typedef struct node{ int data; //数据域 struct node *next; //指向下一个节点的指针} node,*linklist;linklist Cre...

2020-03-18 21:14:34 937

原创 栈的相关操作 C/C++

//InitStack(S);//StackEmpty(S);//Push(S,x);//Pop(S,x);//GetTop(S,x);//ClearStack(S);//栈顶指针:S.top=-1;栈顶元素:S.data[S.top]//进栈操作:指针+1,再送值到栈顶元素//出栈操作:先取栈顶元素值,再将栈顶指针减1//栈空条件:S.top==-1,栈满条件:S.top=Ma...

2020-02-25 21:57:21 98

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除