我正在使用这个package.json我用于谷歌地图的组件的库是这个
{
"name": "webpack-win",
"version": "1.0.0",
"description": "none",
...
"dependencies": {
"alt": "^0.18.1",
"alt-container": "^1.0.0",
"google-map-react": "^0.9.3",
"history": "^1.17.0",
"material-design-icons": "^2.1.3",
"material-ui": "^0.14.1",
"open-browser-webpack-plugin": "0.0.2",
"react": "^0.14.5",
"react-dom": "^0.14.5",
"react-router": "^1.0.3",
"react-tap-event-plugin": "^0.2.1"
},
...
}
Run Code Online (Sandbox Code Playgroud)
我的标记画在闪光灯然后它们消失了,谷歌地图永远不会渲染,我的组件是基于谷歌地图反应的简单地图的例子,当我尝试在React-Router中渲染它时,没有显示App的儿童属性似乎是空值.
import React from 'react';
import shouldPureComponentUpdate from 'react-pure-render/function';
import GoogleMap from 'google-map-react';
import MyGreatPlace from './MapPlace.js';
export default class SimpleMapPage extends React.Component {
static propTypes = {
center: React.PropTypes.array,
zoom: React.PropTypes.number,
greatPlaceCoords: React.PropTypes.any
};
static defaultProps = {
center: [59.938043, …Run Code Online (Sandbox Code Playgroud) 我正在尝试添加文档,根据弹性搜索文档,我们可以添加文档,即使我们不提供id ... 请参阅此处
我正在尝试添加文档,即使它没有任何ID.在弹性搜索中,我该怎么做?我目前的代码看起来像这样
var params = _.defaults({}, {
index: index,
type: type, //'customer'
id: data.id || null,
body: data
})
debug(params)
return this.client.create(params);
Run Code Online (Sandbox Code Playgroud)
上面的代码给出了这个错误
{"error":"无法使用这些参数构建路径.至少提供索引,类型,ID"}
任何提示都会有所帮助,谢谢
我试图找到在弹性搜索中按ID查找的最常见用法。
我正在使用核心OOP模型.我在哪里遇到一些问题.
使用"this"关键字.这是我想要实现的示例代码.
class equation {
// some properties
};
class equationSolver{
public:
static void method1(equation eq, double dt);
}
class simpleMotion : public equation{};
class DragProjectile : public simpleMotion{
void updateVariables(double time){
equationSolver::method1(this, time); // I am getting error cannot convert
// "DragProjectile" to "equation"
}
Run Code Online (Sandbox Code Playgroud)
如果你能提供帮助,我会很高兴的.提前致谢