我正在尝试使用Windows Azure配置几个虚拟机.为了节省成本,我在每天结束时关闭虚拟机,并在第二天早上启动它们.
但是,在重新开始工作并启动所有VMS之后,我再也没有远程桌面访问我的机器了.首先我提到了NLA的错误:
远程计算机需要网络级别身份验证,您的计算机不支持.如需帮助,请与系统管理员或技术支持联系.
然后我删除了VM并从现有磁盘重新创建它们.现在我只是得到以下错误:
由于以下原因之一,远程桌面无法连接到远程计算机:
1)未启用对服务器的远程访问2)远程计算机已关闭3)远程计算机在网络上不可用
确保远程计算机已打开并连接到网络,并且已启用远程访问.
在关闭机器之前启用了远程访问.我无法检查远程桌面的设置,因为我无法访问这些计算机.
我该怎么办?
我正在使用 Ubuntu 14.04 在 Azure 中运行 VM。我已经安装了 XFCE 并使用 X2GO 远程桌面到机器。
我已经下载了 VS Code 并解压缩了文件。当我从终端运行代码时,出现以下错误:
WouterDeKort@UbuntuDev:~/tools/web/visual-studio-code$ ./Code
bash: cannot set terminal process group (-1): Inappropriate ioctl for device
bash: no job control in this shell
WouterDeKort@UbuntuDev:~/tools/web/visual-studio-code$ [ , [Error: channel closed] ]
Run Code Online (Sandbox Code Playgroud)
知道我做错了什么吗?
免责声明 ;-) 我是一个完整的 Linux 新手。我今天第一次安装了 Linux,我不知道我在做什么 ;-)
我创建了一个安装了TypeScript 0.8.1和Web Essentials的新Windows 8 JavaScript Blank应用程序.
我已经添加了一个文件foo.ts和bar.ts我的项目.
foo.ts 只包含一个简单的类:
class Foo
{ }
Run Code Online (Sandbox Code Playgroud)
bar.ts包含对foo.ts类栏的引用:
/// <reference path="foo.ts" />
class Bar
{ }
Run Code Online (Sandbox Code Playgroud)
奇怪的是,它bar.js包含Bar和Foo类:
var Foo = (function () {
function Foo() { }
return Foo;
})();
var Bar = (function () {
function Bar() { }
return Bar;
})();
Run Code Online (Sandbox Code Playgroud)
出了什么问题?我正在使用共享reference.ts文件处理更大的项目.突然,我的所有ts文件都被编译到每个javascript文件中.
javascript windows-8 visual-studio-2012 typescript web-essentials
我开始一个新的Web项目,我想我会尝试使用一个框架.我知道CodeIgniter是用PHP4编写的,但是我可以使用MySQL的MySQLi函数,以及PHP5语法(尤其是OO),同时使用CodeIgniter进行编码?我应该使用Kohana吗?
我有以下 PowerShell 片段:
$property = @{
Getter = { 80 };
}
$value = $property.Getter.Invoke()
$value.GetType() # Shows Name = Collection'1 instead of int
Run Code Online (Sandbox Code Playgroud)
我希望$value.GetType()返回Int32,但它返回一个集合。
我不能只获取元素[0],因为有时 Getter 函数会返回一个数组。
我怎样才能解决这个问题?
我抓住将由LINQ to SQL命令发出的SQL并将其存储在我的C#代码中的字符串中.我不想将它发送到控制台,我不想在SQL Studio或LinqPad中单独分析它.我希望有这个字符串,以便我的程序可以用字符串做它想要的.(实际上,我会将它发送到log4net,但那是偶然的).
有谁知道如何得到这个?我知道在你开始遍历迭代器之前,SQL实际上并没有发布到数据库,但我希望也许有一种方法可以事先获得SQL.
我的数组中有 appsettings.json
"steps": [
{
"name": "IMPORT",
"enabled": true
},
{
"name": "IMPORT_XML",
"enabled": true
},
{
"name": "COMPARE",
"enabled": true
},
{
"test_name": "COMPARE_TABLE",
"enabled": true
}]
Run Code Online (Sandbox Code Playgroud)
在我的课堂上,我试图用 IConfigurationRoot _configurationRoot
我试过了:
var procSteps = _configurationRoot.GetSection("steps");
foreach (IConfigurationSection section in procSteps.GetChildren())
{
var key = section.GetValue<string>("test");
var value = section.GetValue<string>("enabled");
}
Run Code Online (Sandbox Code Playgroud)
和:
var procSteps = _configurationRoot.GetSection("ExecutionSteps")
.GetChildren()
.Select(x => x.Value)
.ToArray();
Run Code Online (Sandbox Code Playgroud)
但他们都没有找回我的价值观。有谁知道这是什么情况以及访问此类数组值的正确方法是什么?
我有一个服务,它连续将数据写入一个单独的线程到SQL数据库.如果我试图从同一个表读取相同的服务,因为我已经写入它,我得到这个例外:已经有一个开放与此命令关联的DataReader必须先关闭.那么有人可以帮我如何同时做到这一点吗?
这是我读取数据的代码:
public Collection ReadData(string query){
{
_result = new Collection<string[]>();
string[] tempResult;
SqlDataReader _readerRead;
using (_command = new SqlCommand(query, _readConnection))
{
_readerRead = _command.ExecuteReader();
while (_readerRead.Read())
{
tempResult = new string[4];
tempResult[0] = _reader[0].ToString();
tempResult[1] = _reader[1].ToString();
tempResult[2] = _reader[2].ToString();
tempResult[3] = _reader[3].ToString();
_result.Add(tempResult);
//Console.WriteLine("Name : {0} Type : {1} Value : {2} timestamp : {3}", _reader[0], _reader[1], _reader[2], _reader[3]);
}
if (_readerRead != null)
{
_readerRead.Close();
}
_readConnection.Close();
return _result;
}
}
}
Run Code Online (Sandbox Code Playgroud)
这是写给它的:
public void WriteData(Collection<TagInfo> tagInfoList) …Run Code Online (Sandbox Code Playgroud) 我正在加载一个包含一些Json的文本文件来编辑属性.但是,在修改内容并将其写入文件后,Json变为无效.I
我使用以下PowerShell来修改文件:
$manifest = Get-Content $PathToManifest -Raw | ConvertFrom-Json
#modify Json
Set-Content -Path $PathToManifest -Value ( $manifest | ConvertTo-Json)
Run Code Online (Sandbox Code Playgroud)
我的Json文件中的以下代码段已损坏:
"contributions": [
{
"id": "sample-data-widget",
"type": "ms.vss-dashboards-web.widget",
"targets": ["ms.vss-dashboards-web.widget-catalog"],
"properties": "@{name=Sample Data; description=Create sample data in a VSTS project.; previewImageUrl=img/logo.png; uri=index.html; supportedSizes=System.Object[]; supportedScopes=System.Object[]}"
}]
Run Code Online (Sandbox Code Playgroud)
加载Json并将其写回文件后,目标周围的数组语法就消失了:
"contributions": [
{
"id": "sample-data-widget",
"type": "ms.vss-dashboards-web.widget",
"targets": "ms.vss-dashboards-web.widget-catalog",
"properties": "@{name=Sample Data; description=Create sample data in a VSTS project.; previewImageUrl=img/logo.png; uri=index.html; supportedSizes=System.Object[]; supportedScopes=System.Object[]}"
}]
Run Code Online (Sandbox Code Playgroud)
为什么会这样?有没有办法确保语法不会改变?
c# ×3
json ×2
powershell ×2
.net ×1
appsettings ×1
azure ×1
codeigniter ×1
iaas ×1
javascript ×1
kohana ×1
linq-to-sql ×1
linux ×1
sql-server ×1
typescript ×1
ubuntu ×1
windows-8 ×1