惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - 【当耐特】
罗磊的独立博客
J
Java Code Geeks
博客园_首页
量子位
腾讯CDC
阮一峰的网络日志
阮一峰的网络日志
Jina AI
Jina AI
WordPress大学
WordPress大学
宝玉的分享
宝玉的分享
人人都是产品经理
人人都是产品经理
博客园 - 叶小钗
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Security Latest
Security Latest
Cloudbric
Cloudbric
Last Week in AI
Last Week in AI
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - 聂微东
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
C
CXSECURITY Database RSS Feed - CXSecurity.com
IT之家
IT之家
雷峰网
雷峰网
Apple Machine Learning Research
Apple Machine Learning Research
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
C
Cybersecurity and Infrastructure Security Agency CISA
L
Lohrmann on Cybersecurity
爱范儿
爱范儿
月光博客
月光博客
Spread Privacy
Spread Privacy
T
Tailwind CSS Blog
C
CERT Recently Published Vulnerability Notes
S
Schneier on Security
V
Vulnerabilities – Threatpost
Cisco Talos Blog
Cisco Talos Blog
美团技术团队
Simon Willison's Weblog
Simon Willison's Weblog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
博客园 - 司徒正美
The Cloudflare Blog
G
GRAHAM CLULEY
I
Intezer
博客园 - 三生石上(FineUI控件)
有赞技术团队
有赞技术团队
P
Privacy International News Feed
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Hugging Face - Blog
Hugging Face - Blog
大猫的无限游戏
大猫的无限游戏
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
P
Privacy & Cybersecurity Law Blog
Engineering at Meta
Engineering at Meta

博客园 - 但用此心

在CentOS中使用 yum 安装MongoDB及服务器端配置 yum安装mongodb 不错的文章 windows 下,go语言 交叉编译 linux 下 安装go go http 文件下载 go练习5--生成md5 go练习4--json 序列号反序列化 go练习2-go的学习资料 go练习1-翻转字符串 php 定界符 mysql 修改默认配置 提高性能 eclipse 的代码着色插件 --Eclipse Color Theme 将tomcat添加为linux系统服务 在centos linux上安装jdk7 使用excel 展现数据库内容 java 查看线程死锁 linux 配置 java 环境变量 win7 安装windows 服务 报错 System.Security.SecurityException 解决方法 An exception occurred during the Install phase. System.Security.SecurityException: The so
go练习3 --map的操作
但用此心 · 2014-09-12 · via 博客园 - 但用此心
func T2_1() {
    // 键值string , 值 int 类型
    m1 := map[string]int{}
    //添加一个元素
    m1["str1"] = 1
    fmt.Println(m1)
    //直接覆盖
    m1["str1"] = 2
    fmt.Println(m1)
    if v, ok := m1["str1"]; ok { // 判断 key 是否存在。
        fmt.Println(v)
    }
    fmt.Println(m1["c"]) // 对于不存在的 key,直接返回 \0,不会出错。
    delete(m1, "str1")   //删除元素

    fmt.Println(m1)

    //预先给 make 函数⼀一个合理元素数量参数,有助于提升性能。
    //因为事先申请⼀一⼤大块内存,可避免后续操作时频繁扩张。
    m2 := make(map[string]int, 1000)
    m2["str2"] = 200
    fmt.Println(m2)
    // len 返回实际存储的元素数目,cap 不起作用
    fmt.Println(len(m2))
}