一、说明 Golang设计者为了编程方便,提供了一些函数,这些函数可以直接使用,我们称为Go的内置函数。 二、常用函数 1. func len(v Type) int 函数len返回 v 的长度 数组:v中元素的数量 数组指针:*v中元素的数量(v为nil时panic) 切片、映射:v中元素的数量; ...
分类:
其他好文 时间:
2021-05-24 08:24:57
阅读次数:
0
数据类型 java是一种强类型语言 数据类型: 不同数据类型的空间不同 数据类型分类: 基本数据类型:整数型(byte 1字节、short 2、int 4、long 8)、浮点型(float 4、double 8)、布尔型(boolean 1)、字符型(char 2)口诀:12484812 引用数据 ...
分类:
编程语言 时间:
2021-05-24 08:20:47
阅读次数:
0
//php查询数据 static public function selfs($id){ return self::where('id',$id)->first();}//内置验证 $this->validate(request(),[ 'username'=>'required', 'pwd'=> ...
分类:
微信 时间:
2021-05-24 08:18:55
阅读次数:
0
C++提供了4种类型转换操作符来应对不同场合的应用。 操作符 注释 const_cast 去const属性 static_cast 静态类型转换,例如int转换成char dynamic_cast 动态类型转换,如子类和父类的多态类型转换 reinterpret_cast 仅仅重新解释类型,但没有进 ...
分类:
其他好文 时间:
2021-05-24 08:17:13
阅读次数:
0
一、值类型 和 引用类型 概述 值类型:基本数据类型int系列,float系列,bool,string,数组和结构体 struct 引用类型:指针,slice切片,map,管道chan,interface等都是引用数据类型 二、值类型和引用类型的使用特点 1、值类型:变量直接存储值,内存通常在栈中分 ...
分类:
其他好文 时间:
2021-05-24 08:14:52
阅读次数:
0
Cpp primer plus notes ch2. get start #include 预处理器编译指令。 using namespace 编译指令。 void关键字显示说明不接受任何参数。 //myfirst.cpp #include <iostream> int main(void) { u ...
分类:
其他好文 时间:
2021-05-24 08:11:29
阅读次数:
0
#include <stdio.h> int main (void) { signed short int a1;//有符号short unsigned short int a2;//无符号short signed int b1; unsigned int b2; signed long int c ...
分类:
编程语言 时间:
2021-05-24 08:09:05
阅读次数:
0
i++:先引用后加 ++I:先加后引用 示例代码: public static void main(String... args) { int a = 88; int c = a++; System.out.println(a); System.out.println(c); int b = 99; ...
分类:
其他好文 时间:
2021-05-24 08:08:47
阅读次数:
0
###双指针算法: 核心思想就是缩减时间复杂度 for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { 时间复杂度是O(n * n) } } 双指针模板 for (i = 0; j = 0; j < n; j++) { while (j ...
分类:
其他好文 时间:
2021-05-24 08:01:14
阅读次数:
0
List接口 三大特点:1.有序的collection,2.有索引,3.允许存储重复元素 有序:存储与取出元素顺序是一致的 List接口中常用的方法 public void add (int index,E element) 将指定元素,添加到该集合中指定位置上 public E get(int i ...
分类:
编程语言 时间:
2021-05-24 07:55:05
阅读次数:
0