自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(16)
  • 收藏
  • 关注

原创 Leecode题目整理(二)

PAGE 5-12(简单题完结)821. 字符的最短距离给你一个字符串 s 和一个字符 c ,且 c 是 s 中出现过的字符。返回一个整数数组 answer ,其中 answer.length == s.length 且 answer[i] 是 s 中从下标 i到离它 最近 的字符 c 的 距离 。两个下标 i 和 j 之间的 距离 为 abs(i - j) ,其中 abs 是绝对值函数。示例1:输入:s = “loveleetcode”, c = “e”输出:[3,2,1,0,1,

2021-03-25 17:26:34 710

原创 matplotliib学习笔记

import matplotlib.pyplot as pltimport randomfrom pylab import mplmpl.rcParams['font.sans-serif'] = ['SimHei']mpl.rcParams['axes.unicode_minus'] = False#x代表11点到12点的60分钟x = range(60)#y表示60个15到18...

2019-12-23 15:02:02 414

原创 Numpy学习笔记

Numpy是用于处理数字的一个包使用方法为:import numpy as npscore = np.array([[80, 89, 86, 67, 79],[78, 97, 89, 67, 81],[90, 94, 78, 67, 74],[91, 91, 90, 67, 69],[76, 87, 75, 67, 86],[70, 79, 84, 67, 84],...

2019-11-26 11:50:22 101

原创 Python学习笔记

单行注释 #多行注释""" 或者 '''""" '''python是弱类型语言:print("helloworld")#单行注释"""多行注释"""'''多行注释'''my_name = 'alice'print(my_name)并且不允许前面无理由缩进(加空格),前面加无意义的空格会报错pyth...

2019-11-12 20:27:34 801 1

原创 C#的泛型

using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace TExample{ class Program { static void Main(string[] arg...

2019-10-11 15:37:26 130

原创 C#的显示接口实现

using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace InterfaceSample2{ class Program { static void Main(stri...

2019-10-11 11:43:29 278

原创 C#的接口隔离原则

using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace InterfaceSample{ class Program { static void Main(strin...

2019-10-11 11:15:01 297

原创 C#类的实例构造器,静态构造器和实例析构器

using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace ClassExample2{ class Program { static void Main(string[...

2019-10-10 15:02:15 257

原创 C#的委托

C#的委托即为可以包装函数的一个“类”,能够间接调用函数。定义返回值为void,无参类型的委托。如下列代码:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace DelegateExampl...

2019-10-09 16:10:51 122

原创 C#自定义事件的完整定义方法和简化方法

using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading;using System.Threading.Tasks;namespace EventExample2{ class Program { ...

2019-10-09 12:31:42 816

原创 mysql表中重复记录的删除以及关于数据库连接(例如内部连接、左外部连接、右外部连接)的个人理解

首先通过CREATE语句创建表 : CREATE TABLE IF NOT EXISTS tdb_goods( goods_id SMALLINT UNSIGNED PRIMARY KEY AUTO_INCREMENT, goods_name VARCHAR(150) NOT NULL, goods_cate VARCHAR(40) NOT NULL,...

2019-09-21 16:27:03 215

原创 OnTouchEvent方法实现View的拖动效果

方法一通过layout()方法实现,代码如下:@Override public boolean onTouchEvent(MotionEvent event) { int x = (int) event.getX(); int y = (int) event.getY(); switch (event.getAction()) {

2017-05-18 22:20:56 660

原创 View测量之onMeasure方法

自定义View有三个 方法可以调用,onLayout设置view的位置,onMeasure设置宽高,onDraw绘制view,这篇来写其中的一个OnMeasuer方法。在现实生活中,如果我们要去画一个图形,就必须知道他的大小和位置。同样,Android系统在绘制View前,也必须对View进行测量,即告诉系统该画一个多大的View。这个过程在onMeasure方法中进行。举个栗子来展示onMeasu

2017-05-13 22:28:35 449

原创 Android的创建复合控件

新建工程,在values新建resour flie,取名为attrs(attr是attribute 属性的简写,因为有多个属性,所以就取名为attrs )。 先举个栗子<?xml version="1.0" encoding="utf-8"?><resources> <declare-styleable name="myTop"> <attr name="m

2017-05-13 20:38:26 249

原创 导入Android Studio工程

首先在本地用当前版本的Gradle创建一个正常的项目,保证可以编译通过即可。然后,用本地项目中的”gradle”文件夹和”build.gradle”文件,去替换要导入项目中的这两个文件夹。 接下来,再打开这样的项目,就可以使用本地的Gradle对项目进行编译了。摘自Android群英传/

2017-05-13 12:11:00 259

原创 AS改了gradle-wrapper.properties但是还是不能快速导入

解决Android Studio导入新项目的问题当我在AS(Android Studio)上面导入git下了的新项目的时候,往往要等很久的gradle,翻了翻网上的资料,说要改项目的gradle文件夹里面的gradle-wrapper.properties文件内容,具体如下:#Thu May 11 12:36:52 CST 2017distributionBase=GRADLE_USER_HOME

2017-05-11 13:13:19 4945

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除