新SSB检测工具 – ssbdiagnose

The ssbdiagnose utility analyzes the configuration between two Service Broker services, or for a single service. The utility also analyzes running conversations for errors. If a running conversation encounters errors, ssbdiagnose analyzes the Service Broker configuration that is used by the conversation. Errors are reported either in the command prompt window as human-readable text, or as formatted XML that can be redirected to a file or another program.

Ssbdiagnose.exe is a command line application that comes with Microsoft SQL Server 2008. It usually resides in C:\%ProgramFiles%\Microsoft SQL Server\100\Tools\Binn . The documentation can be found here.

ssbdiagnose 实用工具可报告 Service Broker 会话或 Service Broker 服务配置中的问题。可为两个服务或单个服务执行配置检查。检查出的问题在命令提示符窗口以可读文本的形式报告,或输出为可重定向到文件或其他程序的格式化 XML。

关于 ssbdiagnose 工具的具体用法,可以参考如下链接:

How to Communicate Between SSBS Applications Across Instances

发表在 Service Broker/Service Bus | 标签为 | 留下评论

NopCommerce 完全开源的电子商务解决方案

NopCommerce 完全开源的电子商务解决方案

http://www.nopcommerce.com/default.aspx

发表在 电子商务系统 | 标签为 , , | 留下评论

Service Broker – 消息按序发送或到达的问题

To remain in the same order the messages have to be sent on the same conversation. If You generate a SSB conversation per message (as most examples show) then the order they’re delivered is not guaranteed.

如需要保证SSB 消息按序到达,需要确保消息在相同的对话中传递。如果每一个SSB 消息都创建一个新的对话(多数情况下),SSB 消息将不能确保按序到达。

Each time you use the BEGIN DIALOG statement you’re creating a new conversation. Do this just once, then send all the messages on that same conversation and you’ll get the sequence you expect.

每一次使用 BEGIN DIALOG 语句,将创建一个新的对话。如仅仅创建一个对话,然后所有的消息在相同的对话中传递,将可以确保消息按序到达。

service broker message process order

关于SSB Message Ordering 的另外一段描述,摘录如下:

Message Ordering

In traditional reliable messaging applications, it’s easy to get messages delivered out of order. For example, application A sends messages 1, 2, and 3. Application B receives and acknowledges 1 and 3, but experiences an error with 2, so application A resends it. However, now 2 is received after 3. Traditionally, programmers dealt with this problem by writing the application so that order didn’t matter, or by temporarily caching 3 until 2 arrived so the messages could be processed in order. In contrast, Service Broker handles this transparently, so all messages in a dialog are received in the order sent, with no gaps in the message sequence.

A related problem is duplicate delivery. In the previous example, if application B received message 2, but the acknowledgement message back to application A was lost, application A would resend 2 and application B would now receive 2 twice. Again, Service Broker ensures that messages are never delivered twice, even if the power is lost in the middle of a transaction.

发表在 Service Broker/Service Bus | 标签为 | 留下评论

TFS 2010选择过程模板-MSF for Agile 与 MSF for CMMI 之间的主要差异

下图演示随 MSF for Agile 和 MSF for CMMI 过程模板提供的四种工作项类型的工作流状态。 这些工作流状态之间的主要差异在于,MSF for CMMI 中的工作项始终从“已建议”状态而不是“活动”状态开始。

此外,MSF for Agile 工作流为任务提供更简单的双状态过程,而 MSF for CMMI 工作流提供四状态过程。

MSF for CMMI

需求状态图


任务状态图

MSDN原文链接

发表在 小工具/技巧 | 标签为 | 留下评论

定制TFS 2010 工作项和工作流(Work items and workflows)

根据实际的工作需要,可以对 TFS 2010 提供的默认work item 工作项(如用户情景、任务、bug等等)进行定制。

下面提供了具体的定制化操作步骤:

How to customize TFS 2010 work items and workflows

How to add a new field called ‘Due Date’ in Bug and Task work items

TFS 2005 Customize Work Item Template and Process Template

下面是一个定制完成的用户情景(User Story)UI:

发表在 小工具/技巧 | 标签为 , | 留下评论

UIView – 动态切换窗口

下面的范例代码实现两个View 动态切换。

- (IBAction)switchViews:(id)sender {

//开始准备动画
[UIView beginAnimations:@"View Flip" context:nil];

//设置动画持续时间
[UIView setAnimationDuration:1.25];

//设置动画曲线
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];

if(self.yellowViewController.view.superview == nil){
if(self.yellowViewController == nil){
self.yellowViewController = [[BIDYellowViewController alloc]
initWithNibName:@”YellowView” bundle:nil];
}
//设置动画效果
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight
forView:self.view cache:YES];

[blueViewController.view removeFromSuperview];
[self.view insertSubview:self.yellowViewController.view atIndex:0];
}else {
if(self.blueViewController == nil){
self.blueViewController = [[BIDBlueViewController alloc]
initWithNibName:@”BlueView” bundle: nil];
}
//设置动画效果
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromLeft
forView:self.view cache:YES];

[yellowViewController.view removeFromSuperview];
[self.view insertSubview:self.blueViewController.view atIndex:0];
}

//提交动画
[UIView commitAnimations];

}

这个是怎么样实现的呢? 原理解释:

这是由UIView类里面的beginAnimation:方法来现实的,就是这句

[UIView beginAnimations:@“View Flip” context:nil];

并且用setAnimationDuration:方法来制定动态的时间:(这里我们定义的是1.25秒钟,都是以秒为单位)

[UIView setAnimationDuration:1.25];

再用到setAnimationCurve:方法来设置动画的旋转曲度变化

[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];

然后,通过setAnimationTransition:方法可以定义在动画的类型。

在这个动画的结尾,需要用到commitAnimations:方法 [UIView commitAnimations]; 提交动画。

发表在 Mac/iOS/iPhone/iPad | 留下评论

#import和@Class的区别

You need to #import the file, but you can do that in your implementation file (.m), and use the @class declaration in your header file.
@class does not (usually) remove the need to #import files, it just moves the requirement down closer to where the information is useful.

Three simple rules:
•    Only #import the super class in header files.
•    #import all classes you send messages to in implementation file.
•    Forward declarations for everything else.

英文链接

异常信息:

property view cannot be found in forward class object — 属性view 无法在前置class对象中找到

首先检查前置class对象(forward class object)的定义是否存在该属性view的定义。

发表在 Mac/iOS/iPhone/iPad | 评论关闭

The Unarchiver – Mac 下RAR解压缩图形化工具(免费)

Mac 下除了可以使用RAR/Unrar 命令行工具以外 - Mac OS X 命令行窗口使用 rar / unrar 命令

还可以使用免费的RAR 图形化解压缩工具 - The Unarchiver,可免费在 Mac App Store下载。任何rar 压缩包双击后自动解压到原文件夹内,非常方便,推荐下载。

发表在 Mac/iOS/iPhone/iPad | 标签为 | 评论关闭

Mac OS X 命令行窗口使用 rar / unrar 命令

在Mac OS X系统中默认不支持 RAR 文件的解压缩。下面演示如何在Mac OS X系统中使用 rar 命令行操作。

1. 首先从rarlab 网站下载 rar / unrar 工具;

2. 解压缩下载的 tar.gz 压缩包(rarosx-4.1.0.tar.gz),在下载目录downloads下自动创建一个rar的目录,其中有rar / unrar 文件;

3. 进入命令窗口 - /Applications/Utilities,或者通过Launchpad 进入,如下图所示;

4. 进入刚刚解压缩的rar 目录,使用 cd downloads/rar 进入;

5. 使用如下命令分别安装 unrar 和 rar 命令;

~$: sudo install -c -o $USER unrar /bin
说明:$USER is a default environment variable in the bash shell which contains your username.
sudo 需要输入password,和你登录到Mac OS X 系统的password一致。

下面安装rar 命令:

~$: sudo install -c -o $USER rar /bin

6. 测试 unrar 和 rar 命令;

~$: unrar

如果 unrar 和 rar 正确安装,则会显示响应的unrar 和 rar 用法。

~$: unrar x compressed-package.rar

解压缩 compressed-package.rar 压缩包,如果文件名有空格,则需要使用单引号包起来,如下所示:

unrar x ‘Sams Teach Yourself iOS 5 Application Development in 24 Hours 3rd Edition.part1.rar’

英文参考连接- How to command-line unrar on Mac OS X

发表在 Mac/iOS/iPhone/iPad | 标签为 | 一条评论

ViewController的view outlet继承自父类UIViewController

In general,  a ViewController’s view outlet will connect to the view in the nib. The view outlet is inherited from the parent class, UIViewController, and gives the controller access to the view it controls. When we changed the underlying class of the file’s owner, the existing outlet connections were broken. So, we need to reestablish the connection from the controller to its view. Control-drag from the File’s Owner icon to the View icon, and select the view outlet to do that.

一般而言,一个ViewController的view outlet 将连接nib中View,view outlet是继承自父类 UIViewController,ViewController 就可以访问其控制的视图。当我们更改file‘s owner的底层类时,将会破坏现有的outlet连接。因此,我们需要重新建立从controller到对应View 之间的连接。按住Control 按钮,并拖拉 File’s Owner 图标到View 图标上,同时选中view outlet 来建立连接。

发表在 Mac/iOS/iPhone/iPad | 评论关闭