我正在尝试创建一个数据与时间相关的图表.我想给每个子弹提供年,月,日,小时,分钟和秒.但是如果用户放大,我希望X轴不显示分钟和秒.
我的问题:我必须为chart.dataDateFormat和我的数据的"date"参数指定什么日期格式?
到目前为止,这是我的代码.请让我知道我应该改变什么.谢谢.
<script type="text/javascript">
var chart;
var chartData = [
{
"date": "2012-01-01",
"value": 0.24
},
{
"date": "2012-01-02",
"value": 0.28
},
{
"date": "2012-01-03",
"value": 0.34
},
{
"date": "2012-01-04",
"value": 0.30
},
{
"date": "2012-01-05",
"value": 0.27
}
];
AmCharts.ready(function () {
// SERIAL CHART
chart = new AmCharts.AmSerialChart();
chart.pathToImages = "/images/";
chart.dataProvider = chartData;
chart.dataDateFormat = "YYYY-MM-DD";
chart.categoryField = "date";
// AXES
// category
var categoryAxis = chart.categoryAxis;
categoryAxis.parseDates = true; // as our data is …Run Code Online (Sandbox Code Playgroud) 我试图设置一个按钮,以便用户可以下载保存在服务器上的文件。
protected void btnDownloadHtmlFile_Click(object sender, EventArgs e)
{
string path = @"D:\web\mytestwebsite.com\www\temp\test.html";
if (!File.Exists(path))
{
File.Create(path);
}
TextWriter tw = new StreamWriter(path);
tw.WriteLine("<head></head><body>test</body>");
tw.Close();
WebClient webclient = new WebClient();
webclient.DownloadFile(@"D:\web\mytestwebsite.com\www\temp\test.html", @"C:\web\test.html");
}
Run Code Online (Sandbox Code Playgroud)
Could not find a part of the path 'C:\web\test.html'.
如果我更改为相同结果
webclient.DownloadFile(new Uri("http://mytestwebsite.com/temp/test.html"), @"C:\web\test.html");
Run Code Online (Sandbox Code Playgroud)
如果我换了
webclient.DownloadFile(@"D:\web\mytestwebsite.com\www\temp\test.html", "test.html");
Run Code Online (Sandbox Code Playgroud)
要么
webclient.DownloadFile(new Uri("http://mytestwebsite.com/temp/test.html"), "test.html");
Run Code Online (Sandbox Code Playgroud)
我获得对路径'C:\ Windows \ SysWOW64 \ inetsrv \ test.html'的访问被拒绝。
最后,我进入文件夹C:\ Windows \ SysWOW64 \ inetsrv,授予NETWORK SERVICE权限,但是它说访问被拒绝。我在服务器上以管理员身份登录。
我读了一些关于此的文章,但似乎没有任何作用,或者我错过了一些东西。
什么是使用WebcClient.DownloadFile的正确方法?
我正在尝试在运行 Windows Small Business Server 2011 Standard 和 SQL Server 2008 R2 RTM 的测试服务器上设置 SQL Server 代理。Sql Server Agent 节点不显示在 Sql Management Studio 中。
以下是我根据我阅读的论坛了解到的信息:
根据这些事实,有人有解决方案吗?
谢谢
我正在运行存储过程,其中我有以下查询
SELECT TOP 1 @TopValue = t2.myDecimal
from table1 t1, table2 t2
where t1.ID = t2.table1ID
and CONVERT( VARCHART(8), t1.Created, 112 ) = @stringYYYYMMDD
and t1.Term = @Label"
Run Code Online (Sandbox Code Playgroud)
TopRate是十进制(8,6)stringYYYYMMDD是一个字符串,表示格式为YYYYMMDD的日期标签是一个简单的varchar(8)
为我的数据集的每一行调用此查询,可以是10到5000.如果我对此查询发表评论,则过程执行时间不到2秒.包含查询后,它永远不会结束.
我正在使用Microsoft SQL Server管理工作室2008 R2
谢谢您的帮助