为什么以下代码无法将我连接到集线器?
****我没有使用Azure函数****
我将天蓝色钥匙放在哪里?
如何建立这个复杂的网址?
这类似于我原来的天蓝色密钥AccessKey = 09988588488378383azudjGHG / E =&Version = 1123.0“;
我知道服务器和集线器正在运行,因为我使用Java创建了示例,并且该示例正在运行(请参见下面的实现)。
无论我尝试使用哪个URL,我都将“断开连接”。
public event EventHandler<MessageEventArgs> OnReceivedMessage;
public void bindConnectionMessage(bool useHttps)
{
string urlRoot = "test.signalr.net/?AccessKey=Iwillneversharethiskeyjajajajaj####/E=&Version=1123.0";
var url = $"http{(useHttps ? "s" : string.Empty)}://{urlRoot}/ChatHub";
hubConnection =
new HubConnectionBuilder().WithUrl
(url)
.Build();
hubConnection.On<string>("Send", (message) =>
{
var finalMessage = $"Sending something {message}";
OnReceivedMessage?.Invoke(this, new MessageEventArgs(finalMessage));
});
hubConnection.On<string>("Echo", (message) =>
{
var finalMessage = $"says {message}";
OnReceivedMessage?.Invoke(this, new MessageEventArgs(finalMessage));
});
hubConnection.StartAsync();
Debug.WriteLine(IsConnected);
}
Run Code Online (Sandbox Code Playgroud) 我无法在我的 mac 终端或 VSTS 代码上运行 npm install。请参阅下面尝试运行的命令
这里有错误
我的第二个命令有格式错误
vsts-npm-auth -config .npmrc zsh: exec format error: vsts-npm-auth
Run Code Online (Sandbox Code Playgroud)
npm install正如你所看到的,我什至无法通过第一个命令。
我尝试清除代理分配代理并且我的网络完全正常,我 ping https://registry.npmjs.com并且它工作正常我也这样做了
-npm 配置集注册表https://registry.npmjs.org/
npm ERR! code ENOTFOUND
npm ERR! errno ENOTFOUND
npm ERR! network request to https://registry.npmjs.com--always-auth/vsts-npm-auth failed, reason: getaddrinfo ENOTFOUND registry.npmjs.com--always-auth
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a …Run Code Online (Sandbox Code Playgroud) 工具栏颜色默认为白色,我想将其更改为蓝色。我能够改变几乎所有的东西,但不是那个。
工具栏.axml
<android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/colorPrimary"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
android:popupTheme="@style/ThemeOverlay.AppCompat.Light" />
Run Code Online (Sandbox Code Playgroud)
样式文件
<style name="MyTheme.Base" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="android:textColorPrimary">#1b2b32</item>
<item name="android:textColorSecondary">#1c4d9e</item>
Run Code Online (Sandbox Code Playgroud)
尝试打开我的应用设置,以便用户可以看到我的应用所需的权限。用类似的例子找不到任何东西。*
if (item.Name == "Privacy preferences")
{
switch (Device.RuntimePlatform)
{
case Device.iOS:
Device.OpenUri(
new Uri(FORGOT WHAT TO PUT IN HERE .. APP/SETTINGS?);
break;
case Device.Android:
Device.OpenUri(
new Uri();
break;
}
Run Code Online (Sandbox Code Playgroud)
*