如何截取其他人的pdf文件中的图片(矢量图) 最近写论文,需要将其他PDF中的图片转为矢量图。可以用adobe acrobat先将别人的pdf中的图片截取出来;之后另存为相应的格式即可。我直接存为word格式,就可以编辑图片,而且图片并未失真。找了一圈感觉自己这个方法还挺实用的。...
面试题 02.06. 回文链表 # Definition for singly-linked list.# class ListNode:# def __init__(self, x):# self.val = x# self.next = Noneclass Solution: def isPalindrome(self, head: ListNode) -> bool: cur = head result = [] whi.
160. 相交链表 # Definition for singly-linked list.# class ListNode:# def __init__(self, x):# self.val = x# self.next = Noneclass Solution: def getIntersectionNode(self, headA: ListNode, headB: ListNode) -> ListNode: curA = hea...
338. 比特位计数 class Solution: def countBits(self, n: int) -> List[int]: result = [] for i in range(0,n+1): result.append(list(bin(i)).count("1")) return result
面试题 16.06. 最小差 class Solution: def smallestDifference(self, a: List[int], b: List[int]) -> int: a.sort() b.sort() result = 2147483647 i = 0 j = 0 while (i < len(a) and j < len(b)): result = min(r...
面试题 01.02. 判定是否互为字符重排 class Solution: def CheckPermutation(self, s1: str, s2: str) -> bool: if len(s1) > len(s2): sum = s1 else: sum = s2 for i in sum: #print(i) if ...
面试题 01.01. 判定字符是否唯一 class Solution: def isUnique(self, astr: str) -> bool: for i in astr: if astr.count(i) == 1: continue else: return False return True
Keras实现cifar10分类 from tensorflow.keras.datasets import cifar10from tensorflow.python.keras.utils import np_utilsfrom tensorflow.keras.models import Sequentialfrom tensorflow.python.keras.layers.core import Dense, ...
minist手写数字识别(CNN) import numpyfrom tensorflow.keras.datasets import mnistfrom tensorflow.keras.models import Sequentialfrom tensorflow.keras.layers import Densefrom tensorflow.keras.layers import Dropoutfrom tens...
mnist手写识别数据集(Keras实现) import numpy #导入数据库from tensorflow.keras.datasets import mnistfrom tensorflow.keras.models import Sequentialfrom tensorflow.keras.layers import Densefrom tensorflow.keras.utils import to_catego...
cifar10-图像识别相关代码 import urllibimport osimport tarfileimport numpy as npimport pickle as pkimport tensorflow as tftf.compat.v1.disable_eager_execution() #下载、解压CIFAR数据集url='https://www.cs.toronto.edu/~kriz/cif...
简单反弹球 #include <iostream>#include <stdio.h>#include <stdlib.h>using namespace std;int main(){ int i,j; int x=0,y=5; int top=0,height=10;//上下边框 int left=0,right=10;//...
PAT-A-1052 Linked List Sorting //// main.cpp// first//// Created by 刘玖周 on 2019/9/16.// Copyright © 2019年 刘玖周. All rights reserved.//#include <stdio.h>#include <algorithm>using namespace std;#include <...
PAT-A1032-sharing //// main.cpp// first//// Created by 刘玖周 on 2019/9/16.// Copyright © 2019年 刘玖周. All rights reserved.//#include <stdio.h>#include <string.h>const int maxn=100010;struct NODE{...
PATA-1032 sharing //// main.cpp// first//// Created by 刘玖周 on 2019/9/16.// Copyright © 2019年 刘玖周. All rights reserved.//#include <stdio.h>#include <string.h>const int maxn=100010;struct NODE{...
PATA-1032 sharing //// main.cpp// first//// Created by 刘玖周 on 2019/9/16.// Copyright © 2019年 刘玖周. All rights reserved.//#include <stdio.h>#include <string.h>const int maxn=100010;struct NODE{...
mciSendString的介绍 转载至:http://blog.sina.com.cn/s/blog_149e9d2ec0102wzcn.html使用MCI API,源文件中需要包含头文件Mmsystem.h,在Project->Settings->Link->Object/libraymodule中加入库 Winmm.lib。 VS2008在源文件加上#include"mmsystem.h" #...
关于GetAsyncKeyState 0x8000 & GetKeyState(VK_SHIFT); 这句是判断是否有按下shift键 为什么GetAsyncKeyState()& 首先说明,有好多程序或书上是0x8000f,这个f不是十六进制的f而是代表浮点数。其实& 8000才是本质。小鱼我整理后自己写了点东西,总结一下 首先介绍一下几个概念: 按位与运算符"&":是双目运算符,其...
PAT(B.1075 链表元素分类) 1075 链表元素分类 (25 分)给定一个单链表,请编写程序将链表元素进行分类排列,使得所有负值元素都排在非负值元素的前面,而 [0, K] 区间内的元素都排在大于 K 的元素前面。但每一类内部元素的顺序是不能改变的。例如:给定链表为 18→7→-4→0→5→-6→10→11→-2,K 为 10,则输出应该为 -4→-6→-2→7→0→5→10→18→11。输入格式:每个输入包含一个...
PAT(B.1085 PAT单位排行) 1085 PAT单位排行 (25 分)每次 PAT 考试结束后,考试中心都会发布一个考生单位排行榜。本题就请你实现这个功能。输入格式:输入第一行给出一个正整数 N(≤105 ),即考生人数。随后 N 行,每行按下列格式给出一个考生的信息:准考证号 得分 学校其中准考证号是由 6 个字符组成的字符串,其首字母表示考试的级别:B代表乙级,A代表甲级,T代表顶级;得分是 [0...