所以,不确定发生了什么.但我有存储过程,它在SQL 2k中不断从我的数据库中消失.
我可以再次添加它,然后尝试从我的Web应用程序执行它,我得到一个例外,说存储过程无法找到.那么生病回到管理层再刷新它又消失了!?!
这是存储过程的配置:
set ANSI_NULLS OFF
set QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[USP_Equipment_Delete]
@EquipmentID int
AS
DELETE FROM [dbo].[Equipment]
WHERE
[EquipmentID] = @EquipmentID
Run Code Online (Sandbox Code Playgroud)
我的其他存储过程都没有消失.这是唯一的一个.我在那里很容易100.它们都使用相同的SQLHelper类.这个只是一直消失!!! ?? !!
任何帮助或建议表示赞赏!
非常感谢!
当您在构造函数中指定新参数时,Resharper 提供了非常有用的引入和初始化字段 xxx操作,例如:
Constructor (int parameter)
Run Code Online (Sandbox Code Playgroud)
唯一的(小)麻烦是它将新领域放在课程的开头 - 我喜欢将私人部位尽可能远离陌生人的窥视;)。
但是,如果类中已经有一些私有字段,Resharper 会“正确”地将新字段放在这些字段旁边(注意引号,我不想在这个问题上引发激烈的争论),即使它们是在课程结束时。
有没有办法强制 Resharper始终将新字段放在课程末尾?
更新:好的,我忘了提及我了解“选项中的类型成员布局”功能,但是有关如何修改模板以实现字段放置的一些具体帮助会很好。
下面的问题来自Kathy Sierra和Bert Bates的Java SCJP5一书.给定一个声明为的方法:
public static <E extends Number> List<E> process(List<E> nums)
Run Code Online (Sandbox Code Playgroud)
程序员想要使用这样的方法:
// INSERT DECLARATIONS HERE
output = process(input);
Run Code Online (Sandbox Code Playgroud)
可以在// INSERT DECLARATIONS这里放置哪一对声明以允许代码编译?(选择所有适用的选项.)
一个.
ArrayList<Integer> input = null;
ArrayList<Integer> output = null;
Run Code Online (Sandbox Code Playgroud)
B.
ArrayList<Integer> input = null;
List<Integer> output = null;
Run Code Online (Sandbox Code Playgroud)
C.
ArrayList<Integer> input = null;
List<Number> output = null;
Run Code Online (Sandbox Code Playgroud)
D.
List<Number> input = null;
ArrayList<Integer> output = null;
Run Code Online (Sandbox Code Playgroud)
E.
List<Number> input = null;
List<Number> output = null;
Run Code Online (Sandbox Code Playgroud)
F.
List<Integer> input = null;
List<Integer> output = null;
Run Code Online (Sandbox Code Playgroud)
G.以上都不是.
给出的正确答案是:B,E,F和书中的解释说明:
"返回类型肯定被声明为List,而不是ArrayList所以A,D是错误的......." …
我有一个项目,其中我的业务层是使用DI构建的,但我正在尝试额外的步骤并使用Windsor来管理对象构造.
我们只是说我有一个预先存在的数据层(我不想修改),可以通过以下界面访问:
interface IDataFactory {
IDataService Service { get; }
}
Run Code Online (Sandbox Code Playgroud)
我的业务层中的一系列类依赖于通过IDataFactory公开的服务:
IFactory factory = DataFactory.NewFactory();
IBusinessService service = new ConcreteBusinessService(factory.Service);
Run Code Online (Sandbox Code Playgroud)
我知道为了将IBusinessService注册到Castle Windsor容器,我会使用类似于此的代码:
IWindsorContainer container = new WindsorContainer();
container.AddComponent("businessService", typeof(IBusinessService), typeof(ConcreteBusinessService));
Run Code Online (Sandbox Code Playgroud)
但对于我的生活,我无法弄清楚如何使用我现有的工厂对象从我的数据层注册服务.从本质上讲,我想说:
container.AddComponent("dataService", typeof(IDataService), factory.service);
Run Code Online (Sandbox Code Playgroud)
Windsor似乎要我说容器.AddComponent("dataService",typeof(IDataService),typeOf(SomeConcreteDataService)),但在这个例子中,ConcreteDataService是该程序集的内部,因此在我的程序中不可访问.
鉴于我的程序集不知道SomeConcreteDataService,我将如何进行数据服务的连接?
这个问题与我自己的问题非常类似,除了我的情况,AddComponent("计算器",typeof(ICalcService),typeof(CalculatorService),"Create"); 调用不起作用 - CalculatorService将在另一个程序集内部,不可用于组件连接容器.
我刚刚安装了SQL Server 2008 Developer Edition,我正在尝试使用SQLCMD.exe进行连接,但是我收到以下错误:
H:\>sqlcmd.exe -S ".\SQL2008"
Msg 18452, Level 14, State 1, Server DEVBOX\SQL2008, Line 1
Login failed. The login is from an untrusted domain and cannot be used with Windows authentication.
Run Code Online (Sandbox Code Playgroud)
SQL Server实例配置为使用SQL Server和Windows身份验证模式.如果我指定-U sa然后我可以成功登录,但我想使用Windows身份验证.使用SSMS与Windows身份验证连接似乎工作正常.
我们的工作簿是服务器生成的SpreadsheetML,它不能包含任何 VBA代码.不幸的是,创建本机Excel文件或Excel 2007 XML文件也不是一种选择.
因此,我有一个Excel加载项(VBA,而不是XLL),我们的每个用户都会安装这些加载项以添加我们的工作簿所需的一些额外的UDF等.
这很好用,但是现在我需要有一个宏,每次用户更改任何单元格中的文本时都需要执行,无论他们当时正在使用什么工作簿.
到目前为止,我已在我的加载项中创建了一个新的类模块(SheetChangeHandler),其代码如下:
Option Explicit
Private WithEvents App As Application
Private Sub Class_Initialize()
Set App = Application
End Sub
Private Sub App_SheetChange(ByVal Sh As Object, ByVal Source As Range)
Debug.Print "Changed"
On Error GoTo Finish
App.EnableEvents = False
DoWorkOnChangedStuff Sh, Source
Finish:
App.EnableEvents = True
End Sub
Run Code Online (Sandbox Code Playgroud)
在我的加载项中,我添加了一行来实例化新类:
Public MySheetHandler As New SheetChangeHandler
Run Code Online (Sandbox Code Playgroud)
我的理解是,这应该使Excel 为所有打开的工作簿发送Add-In 所有 SheetChange事件,而不需要包含任何宏代码的工作簿.
但它没有工作......没有调试行,当我更改任何工作表上的单元格时,我的DoWorkOnChangedStuff代码没有被调用.
有任何想法吗?
是否可以在UITableView的UITableViewCell中更改响应从左到右"我想删除此行"滑动显示的视图?
目前,"删除"按钮似乎忽略了所有其他UITableViewCell自定义选项.
我正在构建一个小应用程序,它为我提供了磁盘上的可用空间.
我想添加一个显示磁盘状态的功能,例如,如果它处于休眠状态.操作系统是Windows.
如何才能做到这一点?当然,代码不应该唤醒磁盘找出来;)
C#中的解决方案会很好,但我猜任何解决方案都会...
谢谢你的帮助.
我想结合Ctrl+ R到'isearch-backward并绑定Ctrl+ Shift+ R来'tags-apropos,但我不能在两个按键之间区分.
emacs可以区分Ctrl+ R和Ctrl+ Shift+ R吗?什么应该进入我的.emacs文件以允许此键绑定?
来自asp.net MVC的免费晚餐书
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Edit(int id, FormCollection formValues) {
Dinner dinner = dinnerRepository.GetDinner(id);
UpdateModel(dinner);
dinnerRepository.Save();
return RedirectToAction("Details", new { id = dinner.DinnerID });
}
Run Code Online (Sandbox Code Playgroud)
如何将此行转换为vb.net?
return RedirectToAction("Details", new { id = dinner.DinnerID });
Run Code Online (Sandbox Code Playgroud)
更多新的{id = dinner.DinnerID}部分
谢谢
c# ×3
sql-server ×2
add-in ×1
asp.net-mvc ×1
coding-style ×1
dns ×1
emacs ×1
events ×1
excel ×1
excel-vba ×1
hardware ×1
iphone ×1
java ×1
key-bindings ×1
polymorphism ×1
resharper ×1
security ×1
types ×1
uikit ×1
uitableview ×1
vb.net ×1
vba ×1
windows ×1