- 博客(222)
- 收藏
- 关注
原创 Vue学习(7)过滤器
全局过滤器 + 局部过滤器<!-- * @Author: your name * @Date: 2020-04-01 16:31:40 * @LastEditTime: 2020-04-01 16:47:51 * @LastEditors: Please set LastEditors * @Description: 过滤器 * @FilePath: \x\10.html -...
2020-04-01 16:49:54
225
原创 Vue学习(6)插槽
slot 插槽<!-- * @Author: your name * @Date: 2020-04-01 14:15:10 * @LastEditTime: 2020-04-01 14:32:29 * @LastEditors: Please set LastEditors * @Description: In User Settings Edit * @FilePath: \...
2020-04-01 16:31:19
385
原创 PAT(A)1149 Dangerous Goods Packaging (25分)
Sample Input6 320001 2000220003 2000420005 2000620003 2000120005 2000420004 200064 00001 20004 00002 200035 98823 20002 20003 20006 100103 12345 67890 23333Sample OutputNoYesYes思路:...
2020-04-01 00:18:06
160
原创 Vue学习(5)父子组件的简单通信
简单通信父—>子1.父组件绑定自定义属性2.子组件props接收3.子组件任意使用子—>父1.父组件绑定自定义方法2.子组件 $emit(‘事件名’, value) 触发3.传入父组件<!-- * @Author: your name * @Date: 2020-03-31 19:50:40 * @LastEditTime: 2020-03-31 20...
2020-03-31 20:21:51
200
原创 Vue学习(4)局部组件
<!-- * @Author: your name * @Date: 2020-03-30 21:56:55 * @LastEditTime: 2020-03-30 22:28:13 * @LastEditors: Please set LastEditors * @Description: 组件 * @FilePath: \x\04.html--><!DOCTY...
2020-03-30 22:30:23
196
原创 Vue学习(3)双向数据绑定
Data --> View --> Data2 --> View2<!-- * @Author: your name * @Date: 2020-03-30 21:33:46 * @LastEditTime: 2020-03-30 21:54:16 * @LastEditors: Please set LastEditors * @Description: Vu...
2020-03-30 21:56:30
224
原创 Vue学习(2)指令
<!-- * @Author: your name * @Date: 2020-02-01 11:19:29 * @LastEditTime: 2020-03-30 21:32:11 * @LastEditors: Please set LastEditors * @Description: In User Settings Edit * @FilePath: \x\vue-or...
2020-03-30 21:46:33
282
转载 Vue学习(1)创建
安装npm install vue引用<script type="text/javascript" src="./node_modules/vue/dist/vue.js"></script>新建vue对象var x = new Vue({ el: '#app', data: { ...
2020-03-30 14:30:26
230
原创 PAT(A)1090 Highest Price in Supply Chain (25分)
Sample Input9 1.80 1.001 5 4 4 -1 4 5 3 6Sample Output1.85 2思路:深搜就行了。代码#include <bits/stdc++.h>using namespace std;int a[100001];int b[100001];int xmax = 0;vector<int>...
2020-03-29 20:22:06
136
原创 PTA(A)1055 The World's Richest (25分)
Sample Input12 4Zoe_Bill 35 2333Bob_Volk 24 5888Anny_Cin 95 999999Williams 30 -22Cindy 76 76000Alice 18 88888Joe_Mike 32 3222Michael 5 300000Rosemary 40 5888Dobby 24 5888Billy 24 5888Nob...
2020-03-29 16:13:56
265
原创 PTA(A)1112 Stucked Keyboard (20分)
Sample Input3caseee1__thiiis_iiisss_a_teeeeeestSample Outputeicase1__this_isss_a_teest思路:确定是哪几个,输出时往后跳几位。代码#include <bits/stdc++.h>using namespace std;map<char, int>mp;...
2020-03-29 13:23:46
166
原创 linux 命令行报-bash: XXX command not found的解决办法
环境变量设置问题1、export PATH=/usr/bin:/usr/sbin:/bin:/sbin让命令行暂先可以使用2、vi .bash_profile 打开环境变量设置,检查问题3、重启即可
2020-03-29 11:30:54
1690
原创 Codeforces Round #629 (Div. 3)题解
写在前面: 只有三道,第四道思路有了没出来。A. Divisibility Problemtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given two positive integers a and b. In...
2020-03-27 10:43:07
767
原创 八种排序算法大集合(选择排序,插入排序,希尔排序,冒泡排序,快速排序,桶排序,基数排序,归并排序,堆排序)
八种排序的实现代码#include <iostream>#include <algorithm>#include <cstdio>#include <cstdlib>#include <ctime>using namespace std;// 输出结果void Print_Array(int* arr, int n)...
2020-03-23 22:25:03
211
原创 将python环境转化为32bit/64bit
64bit --> 32bitset CONDA_FORCE_32BIT=1 conda info # 查看当前环境32bit --> 64bitset CONDA_FORCE_32BIT=conda info # 查看当前环境
2020-03-19 20:45:37
2659
原创 面试题64. 求1+2+…+n(短路效应)
求 1+2+…+n ,要求不能使用乘除法、for、while、if、else、switch、case等关键字及条件判断语句(A?B:C)。示例 1:输入: n = 3输出: 6示例 2:输入: n = 9输出: 45限制:1 <= n <= 10000思路: 很骚,题目简单,但看了限制,懵了,看了大佬的题解才茅塞顿开。(其实还是不是很懂)不能循环,那就只能考虑递归,...
2020-03-12 14:49:55
264
原创 Python sklearn train_test_split库分割测试集和训练集
from sklearn.model_selection import train_test_splitlabels = np.array(data['flag'])data = data.drop('flag', axis=1)# 取列索引data_list = list(data.columns)data = np.array(data)train_data, test_dat...
2020-03-06 21:12:27
1297
原创 VMWare安装CentOS7虚拟机,一步到底,新手首选
安装CentOS7点击创建新的虚拟机。选择新的虚拟机选择典型指定安装源选择安装位置,第一个原则考虑放到不同的硬盘,第二个考虑硬盘接口速度对于NameNode,由于我们在此节点进行开发,所以大小选择40G。为了提高安装速度,选择自定义硬件。Win10系统需要4G内存,4+2+1+1+1超配CPU根据自己电脑配置选择,一定勾选虚拟化Intel VT-x/EPT或AMD-...
2020-03-03 21:21:26
810
原创 Kriging(克里金)算法 pyhton 基于pykriging包实现
Kriging算法一种空间插值算法,可以根据数据拟合一个曲面,可以用于预测数值,帮助颜色插值等。pykriging官网数据X_train = [] # position - 位置,里面的内容是[x, y]y_train = [] # value - 权重,对应上面每一个位置的权重Kriging模型训练kriging_model = kriging(X_train, y_train,...
2020-02-29 00:28:16
11033
23
原创 python - pandas - pd.read_csv()读入有中文的csv
正常读入有中文内心崩溃。。。然后pd.read_csv(add, engine=‘python’)完美解决。
2020-02-26 20:10:35
1022
原创 Codeforces Round #624 (Div. 3)题解
写在前面: 很久没有好好打,松懈了,只打出三道,而且有错误,第四道是经典枚举,没想到是很不应该的。A. Add Odd or Subtract Eventime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given t...
2020-02-25 00:55:48
2526
7
原创 PAT(A)1077 Kuchiguse (20point(s))
Sample Input3Itai nyan~Ninjin wa iyadanyan~uhhh nyan~Sample Outputnyan~思路:找最后有几位会重复,暴力就行。注意输入。代码#include <iostream>#include <algorithm>#include <cstdio>#include &l...
2020-02-12 22:29:41
162
原创 Codeforces Round #618 (Div. 2)(题解)
A. Non-zerotime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputGuy-Manuel and Thomas have an array a of n integers [a1,a2,…,an]. In one step they ...
2020-02-10 00:46:40
853
原创 python 截取XML中bndbox的坐标中的图像,另存为jpg
文件目录Annotations中是XML文件。JPEGImages中是对应的JPG文件XML文件要截取bndbox坐标中的内容。python代码# -*- coding: utf-8 -*-# @Time : 2020/2/8 22:14# @Author : SanZhi# @File : get_xml.py# @Software: PyCharmimp...
2020-02-08 23:00:35
1358
2
原创 PAT(A)1063 Set Similarity (25point(s))
Sample Input33 99 87 1014 87 101 5 877 99 101 18 5 135 18 9921 21 3Sample Output50.0%33.3%思路:判重,然后算重复率。我本来想用map判重,最后一个点会超时,set在插入的时候就可以直接去重。代码#include <iostream>#include <...
2020-02-08 22:50:54
148
原创 Codeforces Round #617 (Div. 3)(题解)
写在前面: 啊啊啊!又是思路对了写不出来。。。掉分场。。。A. Array with Odd Sumtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given an array a consisting of n i...
2020-02-05 22:45:16
541
原创 Codeforces Round #616 (Div. 2)(题解)
写在前面: 疫情严重,希望武汉与中国一起加油。这次就做出两题,第三题没读完,实在是比较慢。A. Even But Not Eventime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputLet’s define a number ebne...
2020-02-03 11:02:22
4276
原创 PAT(A)1121 Damn Single (25point(s))
Sample Input311111 2222233333 4444455555 66666755555 44444 10000 88888 22222 11111 23333Sample Output510000 23333 44444 55555 88888思路:map记录输出。代码#include <iostream>#include <...
2020-02-02 11:23:28
173
原创 PAT(A)1141 PAT Ranking of Institutions (25point(s))
Sample Input10A57908 85 AuB57908 54 LanXA37487 60 auT28374 67 CMUT32486 24 hypuA66734 92 cmuB76378 71 AUA47780 45 lanxA72809 100 pkuA03274 45 hypuSample Output51 cmu 192 21 au 192 3...
2020-02-02 11:21:47
209
原创 PAT(A)1040 Longest Symmetric String (25point(s))
Sample InputIs PAT&TAP symmetric?Sample Output11思路:判断最长回文串。代码#include <iostream>#include <algorithm>#include <cstdio>#include <string>#include <cstring&g...
2020-02-02 11:20:10
129
原创 PAT(A)1052 Linked List Sorting (25point(s))
Sample Input5 0000111111 100 -100001 0 2222233333 100000 1111112345 -1 3333322222 1000 12345Sample Output5 1234512345 -1 0000100001 0 1111111111 100 2222222222 1000 3333333333 100000 -...
2020-02-02 11:18:28
169
原创 PAT(A)1073 Scientific Notation (20point(s))
Sample Input+1.23400E-03Sample Output0.00123400思路:模拟一下就可。代码#include <iostream>#include <algorithm>#include <cstdio>#include <string>#include <cstring>#in...
2020-02-02 11:15:35
227
原创 PAT(A)1144 The Missing Number (20point(s))
Sample Input105 -25 9 6 1 3 4 2 5 17Sample Output7思路:排序后找到最靠近的缺少的数,注意第一个大于1就是1.代码#include <iostream>#include <algorithm>#include <cstdio>#include <string>#inclu...
2020-02-02 11:13:40
163
原创 PAT(A)1124 Raffle for Weibo Followers (20point(s))
Sample Input9 3 2Imgonnawin!PickMePickMeMeMeeeLookHereImgonnawin!TryAgainAgainTryAgainAgainImgonnawin!TryAgainAgainSample OutputPickMeImgonnawin!TryAgainAgain思路:map记录,如果第一个就大了则是ke...
2020-02-02 11:11:23
176
原创 PAT(A)1125 Chain the Ropes (25point(s))
Sample Input810 15 12 3 4 13 1 15Sample Output14思路:贪心,然后求不大于的最小值。代码#include <iostream>#include <algorithm>#include <cstdio>#include <string>#include <cstrin...
2020-02-02 11:09:03
145
原创 PAT(A)1109 Group Photo (25point(s))
Sample Input10 3Tom 188Mike 170Eva 168Tim 160Joe 190Ann 168Bob 175Nick 186Amy 160John 159Sample OutputBob Tom Joe NickAnn Mike EvaTim Amy John思路:排序求解。代码#include<iostream>...
2020-02-02 11:06:49
131
原创 PAT(A)1132 Cut Integer (20point(s))
Sample Input3167334233312345678Sample OutputYesNoNo思路:可能要大数,所以直接上python。模拟题意。代码# -*- coding: utf-8 -*-# @Time : 2020/2/1 21:11# @Author : SanZhi# @File : PAT.py# @Software...
2020-02-02 11:04:53
167
原创 PAT(A)1081 Rational Sum (20分)(模拟)
Sample Input52/5 4/15 1/30 -2/60 8/3Sample Output3 1/3思路:思路不难,情况比较多,注意输出的格式。1、整数部分、分数部分都不为0,正常输出。2、整数部分为0,只输出分数。3、分数部分为0,只输出整数。4、整数部分、分数部分都为0,输出0。我忘了最后一个情况,卡了最后一个点。。。代码#include <i...
2020-01-25 17:59:01
114
原创 PAT(A)1045 Favorite Color Stripe (30分)
Sample Input65 2 3 1 5 612 2 2 4 1 5 5 6 3 1 1 5 6Sample Output7思路:把不符合要求的数去掉,然后按照给定的序列号作为下标。代码#include <iostream>#include <algorithm>#include <cstdio>#include <s...
2020-01-25 16:52:42
147
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅