首页 > 其他
Observer设计模式
委托、方法(将方法绑定到委托) using System; using System.Collections.Generic; using System.Text; namespace Delegate { //定义委托,它定义了可以代表的方法的类型 public delegate void Gre ...
分类:其他   时间:2021-05-21 12:12:07    收藏:0  评论:0  赞:0  阅读:11
使用Data Ability读取系统设置项
SystemSettingUtil工具类 `public class SystemSettingUtil { private static final int LOG_DOMAIN = 218107648; private static final String TAG = "SystemSetti ...
分类:其他   时间:2021-05-21 12:11:51    收藏:0  评论:0  赞:0  阅读:17
【数据结构】链表篇
作者:李春港 出处:https://www.cnblogs.com/lcgbk/p/14792404.html 一、数据结构 数据结构:在计算机中对数据按一定的方式进行组织 数据结构:线性关系 链式存储 链式存储:单向链表(v) 单向循环链表 双向链表 双向循环链表(v) 内核循环链表(v) 1、单 ...
分类:其他   时间:2021-05-21 12:11:32    收藏:0  评论:0  赞:0  阅读:13
剑指 Offer 47. 礼物的最大价值
1. 题目: 在一个 m*n 的棋盘的每一格都放有一个礼物,每个礼物都有一定的价值(价值大于 0)。你可以从棋盘的左上角开始拿格子里的礼物,并每次向右或者向下移动一格、直到到达棋盘的右下角。给定一个棋盘及其上面的礼物的价值,请计算你最多能拿到多少价值的礼物? 来源:力扣(LeetCode)链接:ht ...
分类:其他   时间:2021-05-21 12:11:17    收藏:0  评论:0  赞:0  阅读:7
jdk动态代理
// 1.必须要有接口方法 public interface TargetClass { void sayHello(); int add(int a, int b); } // 2.目标对象实现了接口方法 public class TargetClassImpl implements Target ...
分类:其他   时间:2021-05-21 12:10:36    收藏:0  评论:0  赞:0  阅读:13
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock
安装完docker后,执行docker相关命令,出现: ”Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fv ...
分类:其他   时间:2021-05-21 12:10:15    收藏:0  评论:0  赞:0  阅读:27
Codeforces Round #721 (Div. 2) C. Sequence Pair Weight(计算贡献/STL)
The weight of a sequence is defined as the number of unordered pairs of indexes (𝑖,𝑗)(i,j) (here 𝑖<𝑗i<j) with same value (𝑎𝑖=𝑎𝑗ai=aj). For exa ...
分类:其他   时间:2021-05-21 12:08:28    收藏:0  评论:0  赞:0  阅读:13
awk实用语法
比较两个文件前2列,两列一致,第三列相减 awk -F ":" 'NR==FNR{a[$1,$2]=$3} NR>FNR {print $1,$2,$3-a[$1,$2]}' file1 file2 |awk -F "[[:space:]]" '$3 ^/0/ {print}' 第二列等于11,第三 ...
分类:其他   时间:2021-05-21 12:07:56    收藏:0  评论:0  赞:0  阅读:23
awk 两个文件中记录的对比
Linux中awk抽取包含某字段的整行 awk '{if($ 0~“listAuths”)print}' xxx.log 发现 需要的是将一个文件中的内容与另一个文件中的进行匹配 并输出属于A,同时也属于B文件,则将B文件下该行内容打印出来 方法1: awk 'NR==FNR{a[$1];next} ...
分类:其他   时间:2021-05-21 12:07:44    收藏:0  评论:0  赞:0  阅读:23
RedisTemplate中opsForValue的使用 (复制粘贴的,没有练习,找时间回顾 )
Spring 封装了 RedisTemplate 对象来进行对redis的各种操作,它支持所有的 redis 原生的 api。 查阅点资料下面总结看下Redis中opsForValue()方法的使用介绍:1、set(K key, V value) 新增一个字符串类型的值,key是键,value是值。 ...
分类:其他   时间:2021-05-21 12:07:19    收藏:0  评论:0  赞:0  阅读:40
文件操作与文件流
文本文件:数据的存储方式为ASCII码形式 二进制文件:数据的存储方式为二进制(01)形式 fopen&fwrite #include <stdio.h> #include <string.h> #include <iostream> using namespace std; int main() ...
分类:其他   时间:2021-05-21 12:07:06    收藏:0  评论:0  赞:0  阅读:15
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
今天打开centos7,由于没设置开机自启,当我启动docker时,发现与docker有关的命令都会报错,百度过,说什么重装docker啥的,我都试过,但是还是解决不了问题,下面我贴出问题集: 1. 例如我查看版本信息 2.重启容器 3. systemctl status docker 查看dock ...
分类:其他   时间:2021-05-21 12:06:26    收藏:0  评论:0  赞:0  阅读:18
根据经纬度,方位角,距离,计算新的经纬度
直接上代码 function destination(lng,lat, heading, distance) { //计算扇形的眯点坐标 heading = (heading + 360) % 360; var rad = Math.PI / 180, radInv = 180 / Math.PI, ...
分类:其他   时间:2021-05-21 12:04:36    收藏:0  评论:0  赞:0  阅读:32
CFgym102394I - Interesting Permutation
题目 DreamGrid has an interesting permutation of \(1,2,...,n\) denoted by \(a_1,a_2,...a_n\). For each \(1 \le i \le n\), \(f_i = \max\{a_1,a_2...,a_i\} ...
分类:其他   时间:2021-05-21 12:04:24    收藏:0  评论:0  赞:0  阅读:16
Vue-cil3 配置路径别名详解
Cli3工具中,配置路径别名 最近用Vue Cli3脚手架搭建了Vue项目,发现没有build目录了,里面的webpack相关的也没了,看了官方文档后,查了资料后,发现都在vue.config.js里来配置了 配置路径别名,方便引用,不用写那么长 配置前: import TodoList from ...
分类:其他   时间:2021-05-21 12:04:15    收藏:0  评论:0  赞:0  阅读:13
openlayers光圈扩散功能
上代码之间,可以直接浏览器运行 <!DOCTYPE html> <html> <head> <title>Icon Symbolizer</title> <link rel="stylesheet" href="https://openlayers.org/en/v3.20.1/css/ol.css ...
分类:其他   时间:2021-05-21 12:03:45    收藏:0  评论:0  赞:0  阅读:24
剑指 Offer 57 - II. 和为s的连续正数序列
1. 题目: 输入一个正整数 target ,输出所有和为 target 的连续正整数序列(至少含有两个数)。 序列内的数字由小到大排列,不同序列按照首个数字从小到大排列。 来源:力扣(LeetCode)链接:https://leetcode-cn.com/problems/he-wei-sde-l ...
分类:其他   时间:2021-05-21 12:02:11    收藏:0  评论:0  赞:0  阅读:15
IE浏览器下bootStrap form-control input输入框不显示兼容性问题
问题背景 采用了如下代码. 主要时bootstrap 搜索框。 再IE11下表现出 input 明明 value有值,但是显示不出来的问题。 排查发现form-control样式去后功能正常,但是样式需要重写。 最后解决css如下。 <div class="input-group"> <input ...
分类:其他   时间:2021-05-21 12:01:55    收藏:0  评论:0  赞:0  阅读:13
3D相册 复仇者联盟
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title></title> <style type="text/css"> html{ perspective: 800px; } .cube{ width: 200px; height: ...
分类:其他   时间:2021-05-21 12:01:46    收藏:0  评论:0  赞:0  阅读:22
QT -- QT5.15以后不再提供离线安装版
Due to The Qt Company offering changes, open source offline installers are not available any more since Qt 5.15. Read more about offering changes in t ...
分类:其他   时间:2021-05-21 12:01:29    收藏:0  评论:0  赞:0  阅读:14
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!