我希望MSDeploy 在使用同步时跳过其他文件夹中的特定文件夹和文件类型.目前我正在使用CCNet通过同步动词调用MSDeploy来将网站从构建转移到登台服务器.由于目标上的文件是由应用程序/用户上载的文件等创建的,因此我需要排除在目标上删除特定文件夹.此外,还有站点创建的清单文件需要保留在目标上.
目前我已经使用-enableRule:DoNotDeleteRule但是在目的地上留下过时的文件.
<exec>
<executable>$(MsDeploy)</executable>
<baseDirectory>$(ProjectsDirectory)$(projectName)$(ProjectsWorkingDirectory)\Website\</baseDirectory>
<buildArgs>-verb:sync
-source:iisApp="$(ProjectsDirectory)$(projectName)$(ProjectsWorkingDirectory)\Website\"
-dest:iisApp="$(website)/$(websiteFolder)"
-enableRule:DoNotDeleteRule</buildArgs>
<buildTimeoutSeconds>600</buildTimeoutSeconds>
<successExitCodes>0,1,2</successExitCodes>
</exec>
Run Code Online (Sandbox Code Playgroud)
我试图使用跳过操作但遇到问题.最初我删除了DoNotDeleteRule并将其替换为(multiple)skip
<exec>
<executable>$(MsDeploy)</executable
<baseDirectory>$(ProjectsDirectory)$(projectName)$(ProjectsWorkingDirectory)\Website\</baseDirectory>
<buildArgs>-verb:sync
-source:iisApp="$(ProjectsDirectory)$(projectName)$(ProjectsWorkingDirectory)\Website\"
-dest:iisApp="$(website)/$(websiteFolder)"
-skip:objectName=dirPath,absolutePath="assets"
-skip:objectName=dirPath,absolutePath="survey"
-skip:objectName=dirPath,absolutePath="completion/custom/complete*.aspx"
-skip:objectName=dirPath,absolutePath="completion/custom/surveylist*.manifest"
-skip:objectName=dirPath,absolutePath="content/scorecardsupport"
-skip:objectName=dirPath,absolutePath="Desktop/docs"
-skip:objectName=dirPath,absolutePath="_TempImageFiles"</buildArgs>
<buildTimeoutSeconds>600</buildTimeoutSeconds>
<successExitCodes>0,1,2</successExitCodes>
</exec>
Run Code Online (Sandbox Code Playgroud)
但这导致以下结果:
错误:源(iisApp)和目标(contentPath)与给定操作不兼容.
错误计数:1.
所以我从iisApp更改为contentPath而不是dirPath,absolutePath就像这样的目录:
<exec>
<executable>$(MsDeploy)</executable
<baseDirectory>$(ProjectsDirectory)$(projectName)$(ProjectsWorkingDirectory)\Website\</baseDirectory>
<buildArgs>-verb:sync
-source:contentPath="$(ProjectsDirectory)$(projectName)$(ProjectsWorkingDirectory)\Website\"
-dest:contentPath="$(website)/$(websiteFolder)"
-skip:Directory="assets"
-skip:Directory="survey"
-skip:Directory="content/scorecardsupport"
-skip:Directory="Desktop/docs"
-skip:Directory="_TempImageFiles"</buildArgs>
<buildTimeoutSeconds>600</buildTimeoutSeconds>
<successExitCodes>0,1,2</successExitCodes>
</exec>
Run Code Online (Sandbox Code Playgroud)
这给了我一个错误:路径中的非法字符:
<buildresults>
信息:添加MSDeploy.contentPath(MSDeploy.contentPath).
信息:添加contentPath(C:\ WWWRoot\MySite
-skip:Directory = assets
-skip:Directory = survey
-skip:Directory = content/scorecardsupport
-skip:Directory = Desktop/docs
-skip:Directory = _TempImageFiles).
信息:添加dirPath(C:\ WWWRoot\MySite
-skip:Directory = assets
-skip:Directory …
cruisecontrol.net continuous-integration ccnet-config msdeploy
在OSM基础层上,我绘制了一条跟随3个点的线,其中包含一个点数组和对象/方法OpenLayers.Geometry.LineString
现在,我希望这条线路走的路.在互联网上花了几个小时,无法找到解决方案.有这个对象吗?我是否必须首先从瓷砖中获取一些信息?
我可以请一些帮助吗?
下面是我如何绘制直线
function init() {
var epsg4326 = new OpenLayers.Projection("EPSG:4326");
var map = new OpenLayers.Map('map');
var osmLayer = new OpenLayers.Layer.OSM("OSM");
map.addLayer(osmLayer);
var center = new OpenLayers.LonLat(-71.6, -33.7).transform(epsg4326,map.getProjectionObject());
map.setCenter(center,4);
var points = new Array(
new OpenLayers.Geometry.Point(-71.26,-32.47),
new OpenLayers.Geometry.Point(-71.30,-32.97),
new OpenLayers.Geometry.Point(-70.81,-32.89)
);
var myLine = new OpenLayers.Geometry.LineString(points).transform(epsg4326, map.getProjectionObject());
var myLineStyle = {strokeColor:"#0500bd", strokeWidth:3};
var myFeature = new OpenLayers.Feature.Vector(myLine, {}, myLineStyle);
var myVector = new OpenLayers.Layer.Vector("line test");
myVector.addFeatures([myFeature]);
map.addLayers([myVector]);
}
Run Code Online (Sandbox Code Playgroud) 我试图找出如何在mercurial中使用Branch-per-feature方法,但创建了一个分支工作,并将其合并回默认值,我无法将我的更改推回到我的主存储库.什么是最好的办法?

我创建了一个分支"Gauge customization",在该分支中做了一些工作,然后将其合并回默认值.默认情况下进行了一些更改,现在我想将其提交回主存储库.但是当我尝试时,我得到:
abort:push创建新的远程分支:Gauge定制!
提示:使用'hg push --new-branch'创建新的远程分支
我不认为分支会出现在主仓库中,并且通过在本地合并它我可以以某种方式在分支(或可能的分支)中工作,然后当我测试所有内容时,将其推送到主仓库.
Gauge定制分支是否仍然出现?真的,我以为我只会在这个阶段看到默认值?但是我不能正确理解这些工具吗?我应该创建远程分支吗?理想情况下,我希望能够为每个功能打开一个分支,并且在任何时候都有3或4个这样的分支运行(这是我公司的工作方式)所以我现在想要掌握一些事情.
如何使用usort对symfony2控制器内的关联数组进行排序?
//sort
function compare($a, $b)
{
return strnatcmp($a['sort'], $b['sort']);
}
usort($content, 'compare');
Run Code Online (Sandbox Code Playgroud)
这给了我以下错误:
警告:usort()期望参数2是有效的回调,函数'compare'未找到或函数名称无效
就像把它放在像这样的私有函数中一样
// sort
usort($content, '$this->compare');
return $content;
}
//sort
private function compare($a, $b)
{
return strnatcmp($a['sort'], $b['sort']);
}
Run Code Online (Sandbox Code Playgroud)
这没有变化
// sort
usort($content, 'compare');
return $content;
}
//sort
private function compare($a, $b)
{
return strnatcmp($a['sort'], $b['sort']);
}
Run Code Online (Sandbox Code Playgroud) 我目前正在解决与Exchange Web服务相关的问题.问题是,在打开与流式订阅的连接(通过StreamingSubscriptionConnection对象)时,操作在调用Open方法时挂起.以下是挂起的代码,供参考:
_streamingSubscriptionConnection = new StreamingSubscriptionConnection(_exchangeService, _connectionLifetime);
_streamingSubscriptionConnection.AddSubscription(_subscription);
_streamingSubscriptionConnection.OnNotificationEvent += new StreamingSubscriptionConnection.NotificationEventDelegate(OnNotificationEvent);
_streamingSubscriptionConnection.OnSubscriptionError += new StreamingSubscriptionConnection.SubscriptionErrorDelegate(OnSubscriptionError);
_streamingSubscriptionConnection.OnDisconnect += new StreamingSubscriptionConnection.SubscriptionErrorDelegate(OnDisconnect);
_streamingSubscriptionConnection.Open();
Run Code Online (Sandbox Code Playgroud)
它通常需要大约两分钟,然后抛出一个ServiceRequestException消息是:
请求失败了.操作已超时.
值得一提的是,即使我将超时设置为一分钟,它仍然需要超过一分钟然后抛出此异常.该呼叫永远不会超过该Open命令.
我的问题是,过去有没有人遇到过这个问题?此外,是否有任何可用的工具可用于诊断任何连接问题,以确定异常是在我的端,Exchange服务器端,还是中间的某个地方?我已经尝试过Fiddler和Microsoft网络监视器来寻找任何模式,但我很难辨别任何东西.
提前致谢!
编辑:要添加到此,如果我添加跟踪侦听器,我会得到相当多的输出.我可以看到它检索订阅ID,然后尝试连接.当它发出连接请求时,这是在发出Open命令和超时之间记录的内容:
<Trace Tag="EwsRequestHttpHeaders" Tid="10" Time="2013-01-24 19:16:18Z">
POST /ews/exchange.asmx HTTP/1.1
Content-Type: text/xml; charset=utf-8
Accept: text/xml
User-Agent: ExchangeServicesClient/14.03.0032.000
Accept-Encoding: gzip,deflate
</Trace>
<Trace Tag="EwsRequest" Tid="10" Time="2013-01-24 19:16:18Z" Version="14.03.0032.000">
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
<t:RequestServerVersion Version="Exchange2010_SP1" />
</soap:Header>
<soap:Body>
<m:GetStreamingEvents>
<m:SubscriptionIds>
<t:SubscriptionId>GABsdGNmaXN3bXNnY2EwNi5mbmZpcy5jb20QAAAAnQCowdNSt0iTEhqVr8+a1GPHu2t+yM8I</t:SubscriptionId>
</m:SubscriptionIds>
<m:ConnectionTimeout>30</m:ConnectionTimeout>
</m:GetStreamingEvents>
</soap:Body>
</soap:Envelope>
</Trace>
Run Code Online (Sandbox Code Playgroud)
我试图排除网络问题,但是有点困难.此时欢迎任何建议.
我正在开发一个管理我俱乐部用户的个人项目,它托管在免费的Azure软件包上(至少目前为止),部分是作为尝试Azure的实验.创建他们的记录的一部分是添加一张照片,所以我有一个联系人卡片视图,让我可以看到他们是谁,他们来的时间和照片.
我已经安装了ImageResizer,它真的很容易从我的相机调整10MP的照片,并将它们保存到本地文件系统,但似乎为天青我需要使用他们Blobs来将图片上传到Windows Azure网站,这是新的我.ImageResizer上的文档说我需要使用AzureReader2才能使用Azure blob,但它不是免费的.它还在他们的最佳实践#5中说
使用动态调整大小而不是预先调整图像大小.
这不是我想的,在创建用户记录时,我将调整为300x300和75x75(缩略图).但是,如果我应该将全尺寸图像存储为blob并在出路时动态调整大小,那么我可以使用标准方法将blob上传到容器中以将其保存到Azure,然后当我想显示图像时使用ImageResizer和传递每个图像以根据需要调整大小.这种方式不需要使用AzureReader2,或者我误解了它的作用/它是如何工作的?
还有另一种方法可以考虑吗?
我没有尚未实现种植,但这是未来解决时,我已经计算出如何实际存储图像正确
我想删除Appointments通过EWS但它不起作用.我有以下代码:
private void deleteAppointment(object obj)
{
ServicePointManager.ServerCertificateValidationCallback = CertificateValidationCallBack;
ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2010_SP2);
service.Credentials = new WebCredentials(CredentialCache.DefaultNetworkCredentials);
service.AutodiscoverUrl("user@place.com", RedirectionUrlValidationCallback);
ItemId ii = (ItemId)obj;
Appointment a = Appointment.Bind(service, ii);
try
{
a.Delete(DeleteMode.MoveToDeletedItems);
}
catch (ServiceResponseException ex)
{
MessageBox.Show(ex.Message);
}
}
Run Code Online (Sandbox Code Playgroud)
登录到机器上的用户(我)是来自user地址的日历的所有者.但是,如果我尝试删除Appointment的Exception是"对象不能被删除".这ItemId是对的.如果我使用user地址,Credentials它的工作原理.
我已经NHibernate.3.3.2.4000通过 Nuget 安装到我的MVC3项目中,配置它时没有proxyfactory.factory_class:
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
<session-factory>
<property name="dialect">NHibernate.Dialect.MsSql2008Dialect, NHibernate</property>
<property name="connection.connection_string_name">db</property>
<property name="adonet.batch_size">50</property>
<property name="current_session_context_class">web</property>
<property name="query.substitutions">true 1, false 0, yes 'Y', no 'N'</property>
<mapping assembly="TheWorkshop.DomainModel" />
</session-factory>
</hibernate-configuration>
Run Code Online (Sandbox Code Playgroud)
但像这样我收到以下错误:
以下类型不得用作代理: TheWorkshop.DomainModel.Contact:方法 set_DateAdded 应为“公共/受保护的虚拟”或“受保护的内部虚拟”
其中 DateAdded 属性私有设置 DateAdded 值
public virtual DateTime DateAdded
{
get { return _dateAdded; }
private set { _dateAdded = DateTime.Now; }
}
Run Code Online (Sandbox Code Playgroud)
我并不是特别想公开设置器,我的想法是 DateAdded 是自动设置的。
我看到帖子建议我可以proxyfactory.factory_class将
<property name="proxyfactory.factory_class">
NHibernate.ByteCode.Castle.ProxyFactoryFactory,
NHibernate.ByteCode.Castle
</property>
Run Code Online (Sandbox Code Playgroud)
NHibernate.ByteCode.Castle但当我尝试安装时,Nuget 安装并没有删除任何对 的引用,Install-Package NHibernate.Castle …
我正在尝试构建一个动态网格样式计算器,以便用户可以增加某些成本,他们可以根据需要添加尽可能多的行来捕获所有组件细节.我现在需要做的是让我的jQuery的动态了,所以它计算每个Total以及Line Total对于每个已添加的每一行.因为我现在有代码,它只适用于计算器的第一行

$(document).ready(function () {
$('.used-amount input[type="text"]')
.on("propertychange, change, keyup, paste, input", function () {
var usedtotal = $(this).val() * $('.used-cost input[type="text"]').val();
$('.used-total').text(usedtotal);
});
$('.used-cost input[type="text"]')
.on("propertychange, change, keyup, paste, input", function () {
var usedtotal = $(this).val() * $('.used-amount input[type="text"]').val();
$('.used-total').text(usedtotal);
});
$('.wastage-cost input[type="text"]')
.on("propertychange, change, keyup, paste, input", function () {
var usedtotal = $(this).val() * $('.wastage-amount input[type="text"]').val();
$('.wastage-total').text(usedtotal);
});
$('.wastage-cost input[type="text"]')
.on("propertychange, change, keyup, paste, input", function () {
var usedtotal = $(this).val() …Run Code Online (Sandbox Code Playgroud) 我的日期值类型为“ 2013-03-28T15:16:58.000Z”。我想将其转换为“ dd-MMM-yyyy”格式。为此,我使用了以下代码:
public static String getTime(String time)
{
try
{
String tim = time.replace("T", " ");
SimpleDateFormat df1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSSZ", Locale.US);
SimpleDateFormat df2 = new SimpleDateFormat("dd-MMM-yyyy", Locale.US);
return df2.format(df1.parse(tim));
}
catch (ParseException e)
{
return null;
}
}
Run Code Online (Sandbox Code Playgroud)
我从StackOverflow的各种文章中获得了此解决方案。但是此代码仍返回null。谁能告诉我为什么?
c# ×2
.net ×1
android ×1
asp.net-mvc ×1
azure ×1
ccnet-config ×1
date ×1
imageresizer ×1
java ×1
javascript ×1
jquery ×1
json ×1
mercurial ×1
msdeploy ×1
nhibernate ×1
openlayers ×1
php ×1
razor ×1
sorting ×1
symfony ×1
usort ×1