码迷,mamicode.com
首页 >  
搜索关键字:func    ( 15298个结果
【Project】JS的Map对象前后交互问题
这是我在项目中写的一个Map对象: let map = new Map(); for (let i = 0; i < type_checked_value.length; i++) { let type_id = type_checked_value[i] map.set('type_' + typ ...
分类:Web程序   时间:2020-07-10 00:04:18    阅读次数:82
golang-switch结构辨析有话
此文基于switch的注意事项而发,其中某些情况可能并不常见,但还是小心为好,能够帮助我们精简代码(编译环境:cmder) 匹配项不精准 ①某些case可能永远匹配不到,造成浪费 package main import "fmt" func test(char byte) byte { return ...
分类:其他好文   时间:2020-07-09 22:33:34    阅读次数:77
Leetcode题库-实现strStr()
实现 strStr() 函数。 给定一个 haystack 字符串和一个 needle 字符串,在 haystack 字符串中找出 needle 字符串出现的第一个位置 (从0开始)。如果不存在,则返回 -1。 示例 1: 输入: haystack = "hello", needle = "ll"输 ...
分类:其他好文   时间:2020-07-09 12:16:10    阅读次数:68
python 3 基础之包
包 包是一个分层次的文件目录结构,它定义了一个由模块及子包,和子包下的子包等组成的 Python 的应用环境。 简单来说,包就是文件夹,但该文件夹下必须存在 __init__.py 文件, 该文件的内容可以为空。__init__.py 用于标识当前文件夹是一个包 1、包中的__init__.py _ ...
分类:编程语言   时间:2020-07-09 12:11:42    阅读次数:57
golang socket编程,实现http协议
https://studygolang.com/articles/11796 package main import ( "log" "net" ) func handleConnection(conn net.Conn) error { defer conn.Close() var request ...
分类:Web程序   时间:2020-07-08 21:28:55    阅读次数:80
c++11中的线程、锁和条件变量
void func(int i, double d, const string& s) { cout << i << ", " << d << ", " << s << endl; } int main() { thread t(func, 1, 12.50, "sample"); t.join() ...
分类:编程语言   时间:2020-07-08 19:59:08    阅读次数:81
golang 几种字符串的连接方式
#golang 几种字符串的连接方式 最近在做性能优化,有个函数里面的耗时特别长,看里面的操作大多是一些字符串拼接的操作,而字符串拼接在 golang 里面其实有很多种实现。 实现方法 1. 直接使用运算符 func BenchmarkAddStringWithOperator(b *testing ...
分类:其他好文   时间:2020-07-08 16:59:31    阅读次数:75
VUE-03 数据响应
一、基本数据类型 1 <!DOCTYPE html> 2 <html lang="en"> 3 <head> 4 <meta charset="UTF-8"> 5 <title>Title</title> 6 </head> 7 <body> 8 <div id="app"> 9 <!--页面从上向 ...
分类:其他好文   时间:2020-07-08 16:51:25    阅读次数:43
call_user_func的使用
<?php function demo01($a) { echo $a; } call_user_func("demo01", "hello world"); 输出 1.配合命令行参数使用 <?php //把第一个参数做为回调参数使用 $i = getopt("i:"); $i = $i['i']; ...
分类:其他好文   时间:2020-07-08 13:17:32    阅读次数:63
【刷题-LeetCode】162 Find Peak Element
Find Peak Element A peak element is an element that is greater than its neighbors. Given an input array nums, where nums[i] ≠ nums[i+1], find a peak e ...
分类:其他好文   时间:2020-07-08 13:03:15    阅读次数:33
15298条   上一页 1 ... 65 66 67 68 69 ... 1530 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!