编程笔记
-
C++ 第40课转进制
#include <iostream> #include <string> using namespace std; int main() { /*string a; int p = 1; int s = 0; cout<<"请输入一个二进制数:"; cin>>a; for(int i = a.length()-1;i>=0…
-
Rust 字符串插值 All In One
Rust 字符串插值 All In One extern crate wasm_bindgen; use wasm_bindgen::prelude::*; #[wasm_bindgen] extern { pub fn alert(s: &str); } #[wasm_bindgen] pub fn greet(name: &str) { // Rust 字符串…
-
ping
import os,threading ip=input('请输入要检测的ip:').strip().split('.')[0:3] ip='.'.join(ip) def detect(i): address=ip+'.%s'%i res=os.popen('ping -n 2 %s '%address) res=''.join(res) if res.find('TTL=') …
-
12.6 动态绑定属性和方法
# class Student: def __init__(self,name,age): self.name=name self.age=age def eat(self): print(self.name+'在吃饭') stu1=Student('张三',20) stu2=Student('李四',30) print(id(stu1)) print(id(stu2)) ''' …
-
pyChar编辑器笔记
1、添加镜像源地址 清华: https://pypi.tuna.tsinghua.edu.cn/simple 豆瓣: https://pypi.douban.com/simple/ 阿里: https://mirrors.aliyun.com/pypi/simple/ 参考: https://www.cnblogs.com/kaibindirver/p/14646…
-
mybatis 面经总结
全自动ORM与半自动ORM的区别:都是对JDBC的封装,全自动把SQL也封装了,程序员不需要写sql,mybatis没有封装sql,只封装了加载驱动、建立连接、创建 Statement 对象、处理返回结果、关闭连接。 MyBatis 的 xml 映射…
-
洛谷 CF508A Pasha and Pixels 题解
题目传送门 CF传送门 话说这道题咋这么多坑! 具体思路 把全部位置第一次染成黑色的轮次是第几轮,时间复杂度为 /(/varTheta(k)/) ,接着从点 /(1,1/) 一直到点 /(n-1,m-1/) 全部都判断一遍 ,时间复杂度为 /(/varT…
-
css 清除浮动
清除浮动 让浮动的子元素撑开父级元素的高度 方案1 给父元素设置高度。(缺点:父元素高度无法自适应) 方案2 给父级元素开启BFC。浮动盒子的特点和定位盒子的特点:高宽都由内容撑开(缺点:ie6,ie7没…
-
cadence 打印 pdf
重新编号 需要原理图中有 title block,然后在 annotate 中,下方有个 annotate as per pm page ordering,这个就是重排页面序号的。 简单打印 直接 print 即可。 智能 pdf 需要安装 pdf creator 和 ghostscript,…