console.error node_modules/react-dom/cjs/react-dom.development.js:506 警告:使用不正确的大小写。对 React 组件使用 PascalCase,对 HTML 元素使用小写。
我有 Jest 和 react-pdf 的问题
我有一张地图Map<Id,Map<Obj1,Obj2>> existingMap and List<Obj1> list; 我需要添加列表值以映射为键和新Map作为值.
我尝试过这样的事情:
existingMap.putAll(list.stream().map(x->x.getId()).collect(
Collectors.toMap(x, x -> Map<Obj1,Obj2>::new);
Run Code Online (Sandbox Code Playgroud)
我该怎么写呢?如何使用参数化构造函数来防止默认?
能否请您推荐更优雅的处理这些案例的方法?
const arr1 = [1, 2, 3];
const arr2 = ['a', 'b', 'c'];
const getCombinations = () => {
const combinations = [];
arr1.forEach(el1 => {
arr2.forEach(el2 => {
combinations.push({
el1,
el2
});
});
});
return combinations;
};
console.log(getCombinations());Run Code Online (Sandbox Code Playgroud)
arrays ×1
dictionary ×1
ecmascript-6 ×1
hashmap ×1
java ×1
java-8 ×1
javascript ×1
lambda ×1
react-native ×1
react-pdf ×1
reactjs ×1