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

推荐订阅源

人人都是产品经理
人人都是产品经理
T
Threatpost
Google DeepMind News
Google DeepMind News
WordPress大学
WordPress大学
Recorded Future
Recorded Future
小众软件
小众软件
N
Netflix TechBlog - Medium
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
H
Hackread – Cybersecurity News, Data Breaches, AI and More
L
LangChain Blog
博客园 - 聂微东
美团技术团队
F
Fortinet All Blogs
I
InfoQ
U
Unit 42
酷 壳 – CoolShell
酷 壳 – CoolShell
阮一峰的网络日志
阮一峰的网络日志
The Cloudflare Blog
罗磊的独立博客
Stack Overflow Blog
Stack Overflow Blog
J
Java Code Geeks
S
SegmentFault 最新的问题
The GitHub Blog
The GitHub Blog
Vercel News
Vercel News
GbyAI
GbyAI
有赞技术团队
有赞技术团队
博客园 - 【当耐特】
H
Help Net Security
B
Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
aimingoo的专栏
aimingoo的专栏
C
Check Point Blog
Jina AI
Jina AI
The Register - Security
The Register - Security
Hugging Face - Blog
Hugging Face - Blog
Microsoft Azure Blog
Microsoft Azure Blog
博客园 - 叶小钗
Recent Announcements
Recent Announcements
D
DataBreaches.Net
IT之家
IT之家
雷峰网
雷峰网
Y
Y Combinator Blog
W
WeLiveSecurity
P
Proofpoint News Feed
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
量子位
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
博客园 - 司徒正美
月光博客
月光博客
The Hacker News
The Hacker News

博客园 - 但用此心

在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))
}