我想这应该是一个简单的因为我必须做错事.
这是我的代码,我正在尝试在Delphi中做一个策略模式:
unit Pattern;
interface
type
TContext = class;
IStrategy = interface
function Move(c: TContext): integer;
end;
TStrategy1 = class(TInterfacedObject, IStrategy)
public
function Move(c: TContext): integer;
end;
TStrategy2 = class(TInterfacedObject, IStrategy)
public
function Move(c: TContext): integer;
end;
TContext = class
const
START = 5;
private
FStrategy: IStrategy;
public
FCounter: integer;
constructor Create;
function Algorithm(): integer;
procedure SwitchStrategy();
end;
implementation
{ TStrategy1 }
function TStrategy1.Move(c: TContext): integer;
begin
c.FCounter := c.FCounter + 1;
Result := c.FCounter;
end;
{ TStrategy2 }
function …Run Code Online (Sandbox Code Playgroud) 我经常得到:我在另一个单元中定义的接口类型的未声明标识符.这是我有的:
unit Drawers;
interface
implementation
type
IDrawer = interface
['{070B4742-89C6-4A69-80E2-9441F170F876}']
procedure Draw();
end;
end.
Run Code Online (Sandbox Code Playgroud)
unit Field;
interface
uses
Graphics, Classes, Drawers;
TField = class(TInterfacedObject, IField)
private
FSymbolDrawer: IDrawer;
Run Code Online (Sandbox Code Playgroud)
在FSymbolDrawer我得到编译器错误.
当然我有抽屉用途; 在定义TField的单元中.
这是关于什么的?
谢谢
结合我发现的两个例子:
http://alistapart.com/article/holygrail
http://mystrd.at/modern-clean-css-sticky-footer/
我想出了这个布局.
它很棒,但我希望3列100%的高度.
有人可以帮忙吗?
谢谢
由SO编辑器验证在文本中包含jsfiddle的html和css脚本的正文:
<div id="header">This is the header.</div>
<div id="container">
<div id="center" class="column">
<h1>This is the main content.</h1>
<p>Text Text</p>
</div>
</div>
<div id="footer">This is the footer.</div>
Run Code Online (Sandbox Code Playgroud)
/*** The Essential Code ***/
* /* For CSS Reset */
{
padding: 0;
margin: 0;
}
html {
position: relative;
min-height: 100%;
}
body {
min-width: 630px; /* 2 x (LC fullwidth + CC padding) + RC fullwidth */
margin: 0 0 100px; /* bottom = …Run Code Online (Sandbox Code Playgroud) 我正在构建一个自动邮件处理器应用程序,我正在逐个解析电子邮件.如果解析其中一条消息失败,我想将该消息标记为未读?如何将邮件标记为未读?
谢谢
我想为使用Jasper生成的每个报告添加免责声明页面.这将是一个包含静态文本的页面,并且对于每个报表都是相同的.但它需要生成为报告的最后一页或第一页.有没有办法创建这样的解决方案?
您是否可以为模型创建自定义数据注释,可以在T4模板中读取类似于View的属性.是否读取了文件夹?我想添加数据注释参数,比如我将构建视图的Scaffold.
谢谢