我从我的主人(起源)创建了一个分支并将其命名为 TEST-101(大写)。然后我在我的分支上工作并提交并将我的更改推送到原点。当我登录到 Github 时,我可以看到我创建的分支。
我使用了 git bash 并检查了我的本地版本的分支,但我输入的都是小写的:test-101. 然后我使用 Git Gui 并将我的更改提交给以小写输入的分支,当我尝试推送这些更改时,它给了我一个错误:
POST git-receive-pack (390618 bytes)
remote: error: failed to lock refs/heads/test-101
Pushing to ht://example/example/example/example.git
To ht://example/example/example/example.git
! [remote rejected] test-101 -> test-101 (failed to lock)
error: failed to push some refs to 'http://example/example/example/example.git'
Run Code Online (Sandbox Code Playgroud)
(请注意,我在错误中更改了一些私人信息。)
我做了一些阅读,看起来我的本地分支是小写的,而远程分支是大写的可能会导致问题?
在C#中使用相交时,如何忽略数组中句子的大小写?我有以下代码
var rtn = (filters == null) ? pubs : pubs.Where(
r =>
Get<PubDetailPage>(new ContentReference(r.PageId)).FacilitiesArray.Intersect(filters).Count() == filters.Length).ToList();
Run Code Online (Sandbox Code Playgroud)
我得到的问题是在称为过滤器的数组中,我有以下值(注意句子的大小写),例如
值一值二值三
在名为FacilitiesArray(由内容管理)的数组中,我具有以下值(再次注意句子的大小写)
价值一价值二价值三
这只会在匹配结果时过滤掉值一的结果。有什么我可以用来匹配将忽略句子大小写的值的东西,所以无论filers数组中的值1看起来像这个VaLuE oNe还是FacilitiesArray中的值1看起来像这个VALUE ONE。它们将匹配并过滤结果。
我有一个名为blogCategoriesList(其类型为字符串)的列表,其中填充了每个博客类别的值,因为它通过检查类别下拉属性中定义的值来遍历每个页面.因此,如果我在我的网站上有三篇博客帖子,并且类别被定义为足球,飞镖,飞镖那么这就是列表所包含的内容.
我试图做一个if检查验证是否
例子
blogCategoriesList =足球,飞镖,飞镖
如果我在一个将类别设置为飞镖的页面上,那么if测试应该通过,因为列表包含飞镖,并且它在列表中也有多个用于飞镖的条目.
blogCategoriesList =足球,计算机,飞镖
如果我在一个将类别设置为飞镖的页面上,则if测试将失败,因为列表包含飞镖,但它在列表中没有多个用于飞镖的条目.
我一直在尝试使用以下使用groupby的代码,但目前正在努力使其工作.
@if (blogCategoriesList.Contains(Model.Content.GetPropertyValue("category")) && blogCategoriesList.GroupBy(n => n.Equals(Model.Content.GetPropertyValue("category"))).Any(c => c.Count() > 1))
Run Code Online (Sandbox Code Playgroud)
任何帮助都会很棒
非常感谢
保罗
编辑*所以使用下面的建议我已经更新了我的代码
@if (blogCategoriesList.Contains(@Model.Content.GetPropertyValue("category")) && blogCategoriesList.Where(x => x == @Model.Content.GetPropertyValue("category")).Count() > 1)
@if (blogCategoriesList.Contains(@Model.Content.GetPropertyValue("category")) && blogCategoriesList.Where(x => x == @Model.Content.GetPropertyValue("category")).Skip(1).Any())
Run Code Online (Sandbox Code Playgroud)
但现在我的测试总是失败并且没有意义.当前页面属于类别计算.您可以从我的调试中看到类别列表中有多个计算值
我想使用a链类作为jquery中的标识符来获取输入的值.这可能吗?
我有以下代码
<input class="donate-block__value monthly" type="text" id="donation-amount" name="DonationAmount" value="200" />
Run Code Online (Sandbox Code Playgroud)
我尝试了以下导致未定义的
var monthlyDonation = $('.donate-block__value .monthly').val();
var monthlyDonation = $('donate-block__value monthly').val();
console.log(monthlyDonation);
Run Code Online (Sandbox Code Playgroud)
我需要针对课程这可以做到吗?