1.1 分 很多技术都运用了分的编程思想,这里来举几个例子,这些都是分的思想 集中式服务发展到分布式服务 从Collections.synchronizedMap(x)到1.7ConcurrentHashMap再到1.8ConcurrentHashMap,细化锁的粒度的同时依旧保证线程安全 从Ato ...
分类:
其他好文 时间:
2020-05-12 20:50:28
阅读次数:
79
在看Collections工具类代码时,发现翻转数组的逻辑,感觉很有趣。思想:折半交换 public static void main(String[] args) { // TODO Auto-generated method stub int[] n = new int[] {1,2,3,4,5 ...
分类:
编程语言 时间:
2020-05-12 15:25:49
阅读次数:
63
using System.Collections; using System.Collections.Generic; using UnityEngine; public class Cam : MonoBehaviour { void Start() { } void Update() { if ...
分类:
移动开发 时间:
2020-05-11 15:26:13
阅读次数:
152
展开微信小程序访问Token安全验证的API接口API//添加一个自定义过滤器using Newtonsoft.Json;using System;using System.Collections.Generic;using System.IO;using System.Linq;using Sys ...
分类:
微信 时间:
2020-05-11 01:17:01
阅读次数:
446
基于单列集合实现 package com.demo03; import java.util.ArrayList; import java.util.Collections; public class doudizhu { public static void main(String[] args) ...
分类:
其他好文 时间:
2020-05-11 00:42:01
阅读次数:
80
typename:元组名称 field_names: 元组中元素的名称 rename: 如果元素名称中含有 python 的关键字,则必须设置为 rename=True verbose: 默认就好 import collections 两种方法来给 namedtuple 定义方法名 User = c ...
分类:
其他好文 时间:
2020-05-10 21:27:31
阅读次数:
82
1、采用TCP自定义协议通讯,协议由02(byte) + json字符串(byte[]) +03(byte)组成。 Socket_Client.cs 服务端using System;using System.Collections.Generic;using System.Net;using Sys ...
1. 依赖包 MongoDB.Driver; MongoDB.Json; MongoDB.Bson; 2. 上代码 1 using MongoDB.Driver; 2 using System; 3 using System.Collections.Generic; 4 using System.T ...
分类:
数据库 时间:
2020-05-09 15:25:28
阅读次数:
95
写在前面 不得不说,有些小伙伴的学习热情真高,学完了Lambda表达式的语法,想来几个典型案例再强化下。于是问冰河能否给几个Lambda表达式的典型使用示例。于是乎,便有了这篇文章。 案例一 需求 调用Collections.sort()方法,通过定制排序比较两个Employee(先比较年龄,年龄相 ...
分类:
编程语言 时间:
2020-05-07 00:36:42
阅读次数:
80
using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using FineUICore; using Microsoft.AspNetCore.Authoriz ...
分类:
其他好文 时间:
2020-05-06 21:34:28
阅读次数:
86