尽管低于配额,但我无法在 Azure 中创建任何新的 SP。如果我运行:
az ad sp create-for-rbac
Run Code Online (Sandbox Code Playgroud)
我明白了
The directory object quota limit for the Principal has been exceeded. Please ask your administrator to increase the quota limit or delete objects to reduce the used quota.
Run Code Online (Sandbox Code Playgroud)
当我这样做时:
az ad sp list --show-mine | grep objectId | wc -l
Run Code Online (Sandbox Code Playgroud)
或这个
az ad app list --show-mine | grep displayName | wc -l
Run Code Online (Sandbox Code Playgroud)
它表明我不拥有很多应用程序/服务主体(默认限制为 250。)
我知道如果我有这个HTML:
<ul>
<li class="list-item test">1</li>
<li class="list-item">2</li>
<li class="list-item">3</li>
</ul>
Run Code Online (Sandbox Code Playgroud)
然后我可以在jQuery中执行以下操作:
$('ul > li').is('.test');
Run Code Online (Sandbox Code Playgroud)
并且它将返回true,因为其中一个LI具有类测试.我想要的是一个方法,只有当所有元素都匹配选择器时才返回true:
$('ul > li').all('.test'); // false;
$('ul > li').all('.list-item'); // true
Run Code Online (Sandbox Code Playgroud)
这样的事情存在吗?
谢谢,
乔
如果我有这样的课程:
public abstract class ActionBase
{
public abstract bool RunRemote();
public abstract void RunLocal();
public void Run()
{
if (RunRemote())
{
var connection = new SQLiteConnection("Data Source=Data.db;Version=3;");
connection.Open();
var cmd = new SQLiteCommand("UPDATE Actions SET Complete = 1 WHERE Id = @Id", connection);
cmd.Parameters.Add(new SQLiteParameter("@Id", Id));
cmd.ExecuteNonQuery();
cmd.Dispose();
connection.Dispose();
}
RunLocal();
}
}
Run Code Online (Sandbox Code Playgroud)
我想要的是只将Run()公开为public,但是abstract和virtual不能标记为private.有没有干净的方法(例如不使用代表等)
谢谢,
乔
我正在实现一个对象树.此树中的每个类都有一些属性和GetHashCode()方法.我打算做的是组合所有属性的哈希值,然后将该哈希值与子节点的哈希值结合起来.我现在不在Visual Studio前面,但代码看起来像这样:
class Node
{
public int Prop1 {get; set;}
public string Prop2 {get; set;}
public IEnumerable<Node> Children {get; set; }
private int _hash;
public override int GetHashCode()
{
if (_hash == 0)
{
_hash = 17;
_hash = _hash * 31 + Prop1.GetHashCode();
_hash = _hash * 31 + Prop2.GetHashCode();
foreach(var child in Children)
{
_hash = _hash * 31 + child.GetHasCode();
}
}
return _hash;
}
}
Run Code Online (Sandbox Code Playgroud)
这应该工作但是我担心结束这么大的值,我溢出int 32类型.是否有一种不同的类型可以防止这种情况,但我仍然可以作为一个int返回?我曾经想过使用模数和uint,但我怎么会把它重新转换成有效的int?我可以这样做:
unit _hash = 0;
public override int GetHashCode()
{ …Run Code Online (Sandbox Code Playgroud) 如果我有以下HTML:
<div>
<span></span>
<span>I want this one</span>
</div>
<div>
<span></span>
<span>I want this one</span>
</div>
Run Code Online (Sandbox Code Playgroud)
我怎样才能获得最后两个跨度?
如果我这样做,$('div').find('span:last')或者$('div').find('span').last()我只获得最后一个?
谢谢,
乔