ICode9

精准搜索请尝试: 精确搜索
  • 自定义布局以及实现事件的重复处理 2021-09-162021-09-16 21:33:23

    一. 添加自定义的布局: 使用 : <include layout = "xxxx"> public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.

  • 记录 html2canvas 生成海报2021-09-16 18:05:02

    背景 : next.js 根据不同数据生成不同海报 支持 长按保存图片 方案一: 使用canvas 画 难点: 内容较多 确定元素位置 太麻烦 性能消耗大 方案二: html2canvas.js 难点:引入方式 (ssr 项目中 import 引入 得到 undefined ) 渐变色 截图失真 清晰度不够 生成图

  • Sentinel-ClusterBuilderSlot2021-09-15 23:05:04

    ClusterBuilderSlot源码解析 ClusterBuilderSlot里面有这么几个重要的属性 // static 有点意思 实际上全局的一个资源对应一个ClusterNode private static volatile Map<ResourceWrapper, ClusterNode> clusterNodeMap = new HashMap<>(); // For DCL private static

  • go 中的 Context 用法2021-09-15 16:35:29

    context 可以用来告诉子 grountine 什么时候结束。 func worker(ctx context.Context) { defer wg.Done() LABEL: for { fmt.Println("worker......") time.Sleep(time.Second) select { case <-ctx.Done(): //对于没有缓冲区的 chan,如果后面没有人接,那么就要直接跳过

  • Android项目中使用的图片选择器、头像裁剪和图片裁剪 Android 11可用2021-09-15 16:32:44

    在我们开发项目的时候,经常会涉及到头像上传和裁剪,针对这一需求我综合开源项目知乎的Matisse和国外的框架ucrop,实现了图片选择拍照和图片裁剪。 先看一下效果图 实现的方法 1、图片选择器的配置部分 Matisse.from(MainActivity.this) .choose(MimeType.of(M

  • 使用vuex从触发到请求,再到数据渲染?2021-09-15 13:32:24

    import Vuex from 'vuex' import Vue from 'vue' Vue.use(Vuex) let store = new Vuex.Store({ state: { count: 0 }, getters: { showCount (state) { return state.count } }, mutations: { add (state, step = 0) { state

  • SpringBoot高级概述2021-09-15 11:02:27

    内部配置加载顺序 Springboot程序启动时,会从以下位置加载配置文件: file:./config/:当前项目下的/config目录下file:./ :当前项目的根目录classpath:/config/:classpath的/config目录classpath:/ :classpath的根目录 加载顺序为上文的排列顺序,高优先级配置的属性会生效 Condition

  • Spring-IoC注解2021-09-14 23:31:57

    注解的使用 1)Spring配置文件引入context约束   <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:c

  • Spring注解相关的使用2021-09-14 23:02:56

    目录 一、引入外部属性文件配置数据库连接池 1、创建外部properties文件 2、添加druid的pom依赖 3、添加druid.properties 4、创建beans.xml 二、注解的使用 1、非注解的方法 2、注解的方法  三、依赖注入  四、配置注解类 一、引入外部属性文件配置数据库连接池 1、创建外部

  • --H5--2021-09-14 19:01:06

    目录 一、progress 二、input输入框 三、音视频 四、画布-->canvas 一、progress 1.progress 表示运行中的进度 <progress></progress> (1)在HTML中放置progress标签,无内嵌属性和文本时,显示的是整个进度条被填满的状态  (2)给progress设置属性 <progess value='50' max='100'></p

  • Android中软键盘(输入法)收起的方法2021-09-14 17:31:13

    package com.simon.util; import android.app.Activity; import android.content.Context; import android.view.inputmethod.InputMethodManager; public class KeyboardUtils { /** * 隐藏键盘的方法 * * @param context */ public static

  • 设计模式--->策略模式022021-09-13 12:02:17

    策略模式 思想C++策略模式策略模式与简单工厂模式结合 GO策略模式策略模式与简单工厂模式结合 思想 定义了算法家族,分别封装起来,让他们之间可见相互替换,此模式让算法的变化,不会影响到使用算法的客户 场景—>商场促销 C++ 策略模式 /*策略模式*/ #include<iostream> #in

  • flutter flutter_screenutil Looking up a deactivated widget's ancestor is unsafe.2021-09-13 02:00:57

    先强调一下,很多问题可以使用reStart更新试一下下!!!!! 使用flutter_screenutil 报错 Looking up a deactivated widget's ancestor is unsafe. The following assertion was thrown while dispatching notifications for SwiperController: Looking up a deactivated widget's anc

  • SpringBoot整合Swagger32021-09-12 21:01:28

    第一步:引入SpringBoot整合Swagger2的最版版本3.0.0,目前的更新时间为2020年7月 <!--引入SpringBoot整合Swagger3的依赖--> <dependency> <groupId>io.springfox</groupId> <artifactId>springfox-boot-starter</artifactId> <version>3.0.0</ver

  • SpringMVC的九大组件2021-09-12 02:04:01

    SpringMVC的九大组件 SpringMVC是Spring框架中的一个表现层框架,也称为控制层,SpringMVC中有很重要的九大组件 <!-- spring mvc的配置上下文 --> <servlet> <servlet-name>mvc-dispatcher</servlet-name> <servlet-class>org.springframework.web.servlet.Dispa

  • 2021-09-102021-09-11 23:33:15

    IDEA环境搭建和Spring入门(07060118) 一.IDEA环境的搭建 1、IDEA简单介绍 idea全称IntelliJ IDEA,是java语言开发的集成环境,是JetBrains公司的产品。idea提倡的是智能编码,目的是减少程序员的工作,其特色功能有智能的选取、丰富的导航模式、历史记录功能等,最突出的功能是调试(Deb

  • 1.0AuthenticationHttpContextExtensions--HttpContext 扩展函数【IAuthenticationService】2021-09-11 19:03:06

    AuthenticationHttpContextExtensions   using System.Security.Claims; using System.Threading.Tasks; using Microsoft.AspNetCore.Http; using Microsoft.Extensions.DependencyInjection; namespace Microsoft.AspNetCore.Authentication { /// <summary>

  • Spring 使用注解注入对象2021-09-11 18:29:49

    用注解的方式注入属性 jdk1.5开始支持注解,spring2.5开始支持注解。 1.在spring配置文件中引入context文件头 xmlns:context="http://www.springframework.org/schema/context" http://www.springframework.org/schema/context https://www.springframework.org/schema/co

  • SoftInputEditText2021-09-11 11:33:36

    SoftInputEditText import android.content.Context; import android.util.AttributeSet; import android.view.View; import android.view.inputmethod.InputMethodManager; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.a

  • SpringCloud之Ribbon2021-09-11 11:32:33

    1、通过RestTemplate开启负载均衡 新增Configuration配置类,创建RestTemplate实例并通过@LoadBalanced开启负载均衡。 @Configuration public class RestTemplateConfig { @Bean @LoadBalanced protected RestTemplate restTemplate() { return new RestT

  • ASP.NET Core MVC 之过滤器(Filter)2021-09-11 09:34:41

    参考网址:https://www.cnblogs.com/afei-24/p/11334100.html  ASP.NET MVC 中的过滤器允许在执行管道中的特定阶段之前或之后运行代码。可以对全局,也可以对每个控制器或每个操作配置过滤器。 1.过滤器如何工作   不同的过滤器类型在管道中的不同阶段执行,因此具有各自的与其场景

  • grep支持参数:2021-09-11 07:00:45

    -A num, --after-context=num: 在结果中同时输出匹配行之后的num行 -B num, --before-context=num: 在结果中同时输出匹配行之前的num行,有时候我们需要显示几行上下文。 -i, --ignore-case: 忽略大小写 -n, --line-number: 显示行号 -R, -r, --recursive: 递归搜索子目录 -v, --i

  • iOS开发底层之KVO探索上 - 172021-09-10 18:03:46

    文章目录 前言一、KVO是什么?二、KVO注意项1. KVO中的Context有什么作用?2. 忘记移除观察者,而造成程序的崩溃3. 控制某些属性不能使用KVO4. 一对多的观察。5. 对可变数组的KVO。 三、KVO的流程和原理 前言 本章内容主要是围绕KVO进行探索,从KVO的介绍 -》KVO的坑点 -》 KVO

  • Android之Context进阶2021-09-10 12:34:17

    一、Context作用是什么?   下面看下Context源码中的注释: /** * Interface to global information about an application environment. This is * an abstract class whose implementation is provided by * the Android system. It * allows access to application-specif

  • canvas 模糊2021-09-10 11:33:29

    让style以50%的效果展示 创建2倍的canvas <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title></title> <style> </style> <script type="text/javascript"> window.on

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有