我目前正在开发一个包含多个文件的项目,并且有点复杂(在保持继承权方面).我收到编译错误,我认为它与引用有关.这是我在编译时遇到的错误
videotodatastream.cpp: In member function ‘virtual void Wade::VideoToDataStream::getData(std::string&)’:
videotodatastream.cpp:33: error: no matching function for call to ‘Wade::VideoWrapper::getVideo(Letscher::Video (&)())’
videowrapper.h:10: note: candidates are: virtual void Wade::VideoWrapper::getVideo(Letscher::Video&)
Run Code Online (Sandbox Code Playgroud)
这是它抱怨的路线
Letscher::Video vid();
_vid.getVideo(vid); //Problem line
Run Code Online (Sandbox Code Playgroud)
_vid是VideoWrapper&类型的私人会员数据
VideoWrapper& _vid;
Run Code Online (Sandbox Code Playgroud)
VideoWrapper是一个纯虚拟基类,具有以下方法:
class VideoWrapper {
public:
virtual void setVideo(Letscher::Video& video) = 0;
virtual void getVideo(Letscher::Video& video) = 0;
};
Run Code Online (Sandbox Code Playgroud)
我实际使用的VideoWrapper的子类是RawVideo,它看起来像这样
class RawVideo : public VideoWrapper {
public:
RawVideo(Letscher::Video& video);
virtual void setVideo(Letscher::Video& video);
virtual void getVideo(Letscher::Video& video);
private:
Letscher::Video* …Run Code Online (Sandbox Code Playgroud) 我一直在浏览开发人员网站(%p)上的一些Android示例,我看到%p被用作维度.
我已完成Google搜索,但无法找到有关其含义的任何信息.有人知道吗?
OS X 10.6.5,BASH
当我运行这个:
echo $IP; echo of; echo $IPLINES
Run Code Online (Sandbox Code Playgroud)
我得到这个输出:
219.80.4.150:3128
of
1108
Run Code Online (Sandbox Code Playgroud)
当我运行这个:
echo $IP of $IPLINES
Run Code Online (Sandbox Code Playgroud)
我得到这个输出:
of 1108.150:3128
Run Code Online (Sandbox Code Playgroud)
我期望得到:
219.80.4.150:3128 of 1108
Run Code Online (Sandbox Code Playgroud)
什么会导致我得到的扭曲输出?
实际的脚本是这样的:
#!/bin/bash
IPLINES=`cat a.txt | wc -l | awk '{print $1}'`
if [ $IPLINES > 1 ]; then
LINE=`expr $RANDOM % $IPLINES + 1`
IP=`head -$LINE a.txt | tail -1`
sed -e "${LINE}d" -i .b a.txt
echo $IP of $IPLINES
fi
Run Code Online (Sandbox Code Playgroud) 我正在创建一个网页来获取敏感的客户信息,并希望将其放在SSL安全页面上.
我曾被CA要求提供CSR.
我打算在服务器上安装OpenSSL并创建其中一个.
这是否意味着我创建CSR的服务器与我们安装他们提供给我的证书的服务器相同,还是可以将其安装在其他地方?
是什么将他们提供的证书与我创建的CSR联系起来?
谢谢你的帮助.
这里出了什么问题?
The ResourceConfig instance does not contain any root resource classes.
Dec 10, 2010 10:21:24 AM com.sun.jersey.spi.spring.container.servlet.SpringServlet initiate
SEVERE: Exception occurred when intialization
com.sun.jersey.api.container.ContainerException: The ResourceConfig instance does not contain any root resource classes.
at com.sun.jersey.server.impl.application.RootResourceUriRules.<init>(RootResourceUriRules.java:103)
at com.sun.jersey.server.impl.application.WebApplicationImpl._initiate(WebApplicationImpl.java:1182)
at com.sun.jersey.server.impl.application.WebApplicationImpl.access$600(WebApplicationImpl.java:161)
at com.sun.jersey.server.impl.application.WebApplicationImpl$12.f(WebApplicationImpl.java:698)
at com.sun.jersey.server.impl.application.WebApplicationImpl$12.f(WebApplicationImpl.java:695)
at com.sun.jersey.spi.inject.Errors.processWithErrors(Errors.java:197)
at com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:695)
at com.sun.jersey.spi.spring.container.servlet.SpringServlet.initiate(SpringServlet.java:117)
Run Code Online (Sandbox Code Playgroud)
过滤:
<filter>
<filter-name>JerseyFilter</filter-name>
<filter-class>com.sun.jersey.spi.spring.container.servlet.SpringServlet</filter-class>
<init-param>
<param-name>com.sun.jersey.config.feature.Redirect</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>com.sun.jersey.config.property.JSPTemplatesBasePath</param-name>
<param-value>/views/</param-value>
</init-param>
<init-param>
<param-name>com.sun.jersey.config.property.WebPageContentRegex</param-name>
<param-value>/(images|css|jsp)/.*</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>JerseyFilter</filter-name>
<url-pattern>/myresource/*</url-pattern>
</filter-mapping>
Run Code Online (Sandbox Code Playgroud)
码:
@Path ("/admin")
public class AdminUiResource {
@GET
@Produces …Run Code Online (Sandbox Code Playgroud) 我越来越喜欢backbone.js了.我希望为给定的模型提供多个视图:
我的问题是,我正在寻求一种方法,让一种观点与另一种观点进行沟通,并选出以下内容:
/** Allow a model to keep track of it's views. **/
Backbone.Model.prototype.addView = function (view) {
// Ensure our model has a view array.
if (typeof this.views === 'undefined')
{
this.views = [];
}
// Append our newest view to the array only if it is not already present.
if (_.indexOf(this.views, view) === -1)
{
this.views.push(view);
}
}
/** Allow a model to remove all of it's views.
*
* @param {Object} args Any arguments will …Run Code Online (Sandbox Code Playgroud) 我在JSF支持bean中有以下方法:
public List<Rent> getTopMemebers(){
return rentDAO.findByMonthAndYear(MonthReport, YearReport);
}
Run Code Online (Sandbox Code Playgroud)
我在数据表中显示:
<p:dataTable value="#{rentController.topMemebers}" var="item">
<p:column>
<h:outputText value="#{item.rentid}"/>
</p:column>
...
</p:dataTable>
Run Code Online (Sandbox Code Playgroud)
但我得到以下例外:
SEVERE: Error Rendering View[/admin/index.xhtml]
java.lang.NumberFormatException: For input string: "rentid"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
at java.lang.Integer.parseInt(Integer.java:449)
at java.lang.Integer.parseInt(Integer.java:499)
at javax.el.ArrayELResolver.toInteger(ArrayELResolver.java:375)
at javax.el.ArrayELResolver.getValue(ArrayELResolver.java:195)
at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:175)
at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:72)
at com.sun.el.parser.AstValue.getValue(AstValue.java:116)
at com.sun.el.parser.AstValue.getValue(AstValue.java:163)
at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:219)
at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:102)
at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:190)
at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:178)
at javax.faces.component.UIOutput.getValue(UIOutput.java:168)
at com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getValue(HtmlBasicInputRenderer.java:205)
at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.getCurrentValue(HtmlBasicRenderer.java:338)
at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeEnd(HtmlBasicRenderer.java:164)
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:878)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1620)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1616)
at org.primefaces.component.datatable.DataTableRenderer.encodeRow(DataTableRenderer.java:489)
at org.primefaces.component.datatable.DataTableRenderer.encodeTbody(DataTableRenderer.java:416)
at org.primefaces.component.datatable.DataTableRenderer.encodeMarkup(DataTableRenderer.java:164)
at org.primefaces.component.datatable.DataTableRenderer.encodeEnd(DataTableRenderer.java:80)
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:878)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1620) …Run Code Online (Sandbox Code Playgroud) 在java时你这样做
a % b
Run Code Online (Sandbox Code Playgroud)
如果a是负数,它将返回负结果,而不是像它应该那样回绕到b.解决这个问题的最佳方法是什么?我能想到的唯一方法就是
a < 0 ? b + a : a % b
Run Code Online (Sandbox Code Playgroud) 我今天一直在将一个相当新的项目从ViewPages搬到Razor,一切似乎都很顺利.除了我试图使用Html.Action呈现用户控件,它不会呈现任何东西.
所以我有一个在Home/Index.cshtml中引用的Shared/_Layout.cshtml文件
Index.cshtml具有以下内容:
<article>
@Html.Action("LatestBlogsMainPanelWidget", "Blogs")
...
</article>
Run Code Online (Sandbox Code Playgroud)
我把陷阱放在BlogsController中,所以我知道这是被请求的.我也知道正在返回一个模型,视图引擎正在找到LatestBlogsMainPanelWidget,甚至正在运行一些伪Razor语法代码:@ {var s ="hello"; }
但是这个文件中的普通html没有进入浏览器.我也尝试了其他(以前工作)的部分,它们也不会出现(页面上的查看源确认它不存在).
我也试过替换@ {Html.RenderAction(...); } 没有成功.@ Html.Action的任何一侧都出现HTML,所以我知道Index.cshtml正在显示.
更诡异的_layout文件也有Html.Action命令和他们做似乎罚款.
我真的不确定还有什么要检查,或者如何确认管道正在获取HTML.任何人都可以帮忙吗?
谢谢!
java ×2
algorithm ×1
android ×1
backbone.js ×1
bash ×1
c++ ×1
csr ×1
e-commerce ×1
echo ×1
facelets ×1
https ×1
inheritance ×1
javascript ×1
jersey ×1
jsf ×1
jsf-2 ×1
macos ×1
modulo ×1
openssl ×1
partials ×1
razor ×1
reference ×1
renderaction ×1
ssl ×1