我必须删除列表中的重复对象.它是来自对象Blog的List,如下所示:
public class Blog {
private String title;
private String author;
private String url;
private String description;
...
}
Run Code Online (Sandbox Code Playgroud)
复制对象是一个对象,其标题,作者,URL和描述等于其他对象.
我无法改变这个对象.我不能把新的方法放在上面.
我该怎么做呢?
我有一个父组件和一个子组件,我想通过使用{... this.props}将属性从Parent传递给Child,我不想在图片中有任何动作或缩减器,是否可以这样做?
我的孩子组件是这样的: -
import React, { Component } from 'react'
import ReactDOM from 'react-dom'
class SampleChild extends Component {
constructor(props) {
super(props)
}
render(){
return(
<div>This is Parent</div>
)
}
}
SampleChild.propTypes={
Header:React.PropTypes.string.isRequired
}
export default SampleChild
Run Code Online (Sandbox Code Playgroud)
我的父组件是这样的: -
import React, { Component } from 'react'
import ReactDOM from 'react-dom'
class SampleParent extends Component {
constructor(props) {
super(props)
}
render(){
return(
<div><SampleChild {...this.props}/></div>
)
}
}
export default SampleParent
Run Code Online (Sandbox Code Playgroud)
现在我如何将SampleParent组件中的Header属性传递给SampleChild?请帮助我.
我想转储一个数据库.
我有三张桌子:
table1 table2 table3
从table1我想要架构加数据.
从table2和table3我只想要架构.
我怎么做?
我想做一个SQL查询来获取一个和号,但我不知道如何构造这个查询.
select count(*) from table1 where commom_fk in (1234);
select count(*) from table2 where commom_fk in (1234);
select count(*) from table3 where commom_fk in (1234);
select count(*) from table4 where commom_fk in (1234);
select count(*) from table5 where commom_fk in (1234);
Run Code Online (Sandbox Code Playgroud)
我想在一个查询中总结这些结果,这是一种方法吗?
谢谢你们.-----*
这回答了.但是,如果我想用多个common_fk做这件事?
postgresql ×2
sql ×2
backup ×1
collections ×1
database ×1
dump ×1
java ×1
react-redux ×1
reactjs ×1