我认为在算法编程方面没问题,如果这是正确的术语?我曾经在20世纪80年代作为业余爱好使用turbo pascal和8086汇编语言.但是只有非常小的项目,而且从那以后的20年里,我还没有真正做过任何编程.因此,我正像溺水的游泳运动员一样努力去理解.
所以也许这是一个非常非常的问题,或者我根本没有任何意义,但是我说有一个像这样的对象:
class Something : IDoer
{
void Do(ISomethingElse x)
{
x.DoWhatEverYouWant(42);
}
}
Run Code Online (Sandbox Code Playgroud)
然后我做
var Thing1 = new Something();
var Thing2 = new Something();
Thing1.Do(blah);
Thing2.Do(blah);
Run Code Online (Sandbox Code Playgroud)
Thing1 = Thing2?"new Something()"会创造什么吗?或者与静态类没什么不同,除了我可以传递它并将其交换出来等.
Thing1(blah)和Thing2(blah)对象在内存中的"Do"程序是否在同一位置?我的意思是在执行它时,是否意味着有两个Something.Do程序或只有一个?
你有没有人在.NET 4.0框架中使用NHibernate?
谢谢SDS
我正在基于CRM系统中的动态对象在VS2010中生成实体包装器.除了实体代码之外,我还想添加一个EntityBase,所有实体都从中继承.如果该文件之前存在于该项目中,则不应添加该文件.我正在使用IWizard实现为生成器提供对象名称等.
是否可以在IWizard实现中确定是否添加项目(如果项目之前存在)?如何在ShouldAddProjectItem方法中或之前保留项目句柄及其项目?
到目前为止我的代码(未完成):
public class EntityWizardImplementation : IWizard
{
public void BeforeOpeningFile(ProjectItem projectItem)
{
//Note: Nothing here.
}
public void ProjectFinishedGenerating(Project project)
{
//Note: Nothing here.
}
public void ProjectItemFinishedGenerating(ProjectItem projectItem)
{
//Note: Nothing here.
}
public void RunFinished()
{
//Note: Nothing here.
}
public void RunStarted(object automationObject, Dictionary<string, string> replacementsDictionary, WizardRunKind runKind, object[] customParams)
{
try
{
var window = new WizardWindow();
// Replace parameters gathered from the wizard
replacementsDictionary.Add("$crmEntity$", window.CrmEntity);
replacementsDictionary.Add("$crmOrganization$", window.CrmOrganization);
replacementsDictionary.Add("$crmMetadataServiceUrl$", window.CrmMetadataUrl);
window.Close();
}
catch (SoapException …Run Code Online (Sandbox Code Playgroud) 我定义了以下枚举.我使用下划线,因为这个枚举用于日志记录,我不想通过使用自定义属性产生反射的开销.我们使用非常繁重的日志记录.现在要求将"LoginFailed_InvalidAttempt1"更改为"LoginFailed Attempt1".如果我更改此枚举,我将不得不在应用程序中更改其值.我可以用记录SP中的空格替换下划线.有什么办法可以在不影响整个应用的情况下改变它.请建议.
public enum ActionType
{
None,
Created,
Modified,
Activated,
Inactivated,
Deleted,
Login,
Logout,
ChangePassword,
ResetPassword,
InvalidPassword,
LoginFailed_LockedAccount,
LoginFailed_InActiveAccount,
LoginFailed_ExpiredAccount,
ForgotPassword,
LoginFailed_LockedAccount_InvalidAttempts,
LoginFailed_InvalidAttempt1,
LoginFailed_InvalidAttempt2,
LoginFailed_InvalidAttempt3,
ForgotPassword_InvalidAttempt1,
ForgotPassword_InvalidAttempt2,
ForgotPassword_InvalidAttempt3,
SessionTimeOut,
ForgotPassword_LockedAccount,
LockedAccount,
ReLogin,
ChangePassword_Due_To_Expiration,
ChangePassword_AutoExpired
}
Run Code Online (Sandbox Code Playgroud) 我在哪里可以找到posgresql文件夹中创建的临时表?如果我这样做,select * from temp_table;那么我得到了结果,但是在PgAdmin中看不到我数据库的结构?
我试图通过包含十六进制值的元素对我的转换输出进行排序.
<xsl:sort select="Generation/Sirio/Code" data-type="number"/>
值是普通的旧十六进制:00 01 02 ... 0A ... FF但它们的排序方式如下:0A FF 00 01 02这表示排序方法一旦涉及到字符就会失败.
我该如何解决这个问题?
非常感谢你!
我正在尝试编译PHP 5.3中引入的功能列表.
我必须在时间允许的情况下退房.我想按照功能的有用性顺序执行此操作.
问题是主观的,这就是重点.我希望最终得到一个按社区喜欢的顺序排列的列表.
对于那些需要在2012年或2013年进行历史研究的人来说,这样的清单可能会有用,而且到目前为止我还没有找到一个关于SO的人.
请为每个答案命名一个特定功能,谢谢过去!
我有一个css类,如:
.foo {
background-color: red;
}
Run Code Online (Sandbox Code Playgroud)
然后我有一个为列表指定的类:
.list1 li {
background-color: tan;
}
Run Code Online (Sandbox Code Playgroud)
是否可以将一个样式类设置为仅指向另一个?就像是:
.list1 li {
.foo;
}
Run Code Online (Sandbox Code Playgroud)
不确定如何表达 - 我只是希望.list li样式是我为.foo类定义的.
我有'服务'表和以下列描述如下
我犹豫是否命名这些列如下
IsVerificationRequired
IsEmailActivationRequired
IsMobileActivationRequired
Run Code Online (Sandbox Code Playgroud)
要么
RequireVerification
RequireEmailActivation
RequireMobileActivation
Run Code Online (Sandbox Code Playgroud)
我无法确定哪种方式最好.所以,以上建议的名称之一是最好的还是还有其他更好的名称?
我想创建一个在iTunes中搜索我的名字的URL.基本上,单击它应该在搜索框中打开带有我姓名的iTunes,并且应该加载或加载结果.
如何制作此网址?