我的项目结构如下:
Read.aspx采用一个参数说"输出",这是由id及其注释传递的文章的细节 ArticlesController.cs
现在我想写,然后阅读评论:: write()&Read()funct inCommentsController.cs
对于读其评论文章中,我想打电话Views/Articles/Read.aspx从CommentsController.cs通过从通过输出参数CommentsController.cs
我怎样才能做到这一点?
代码在这里:
public class CommentsController : AppController
{
public ActionResult write()
{
//some code
commentRepository.Add(comment);
commentRepository.Save();
//works fine till here, Data saved in db
return RedirectToAction("Read", new { article = comment.article_id });
}
public ActionResult Read(int article)
{
ArticleRepository ar = new ArticleRepository();
var output = ar.Find(article);
//Now I want to redirect to Articles/Read.aspx with output parameter. …Run Code Online (Sandbox Code Playgroud) 我正在尝试加载一个大的Keynote文件(~150MB)UIWebView,我不断得到内存警告和我的应用程序崩溃.
有没有解决的办法?
打开这么大的文件而不在另一个应用程序中打开它们的正确方法是什么?
我想在我的标题中点击我的Logo并链接到主页但我不确切知道如何做到这一点.
我的代码:
导航菜单:
HTML
<div id="myMenu">
<div class="myWrapper">
<nav>
<div class="logo"></div>
</nav>
</div>
</div>
Run Code Online (Sandbox Code Playgroud)
CSS
#myMenu
{
width: 100%;
height: 30px;
z-index: 999;
background-color: #252e30;
}
.myWrapper
{
max-width: 660px;
margin: 0 auto;
}
.logo
{
display: inline-block;
width: 156px;
height: 30px;
margin-top: 5px;
background-size: auto 43px;
background-image: url(../images/mylogo.png);
background-repeat: no-repeat;
}
Run Code Online (Sandbox Code Playgroud)
我希望我的徽标可以点击并链接到页面:Homepage.cshtml
我正在绘制一个点图,并且该图应该每5秒更新一次新数据。最小和最大范围始终固定
当前,当我从服务器获取新数据时,确实会将新数据合并到现有的source.data中并绘制出完整的图形。
因此,我不想一次又一次地重绘完整的数据。随着source.data长度的增加,性能下降。因此,除了重新绘制完整的数据,我还可以仅将新数据添加到现有图形中
请在这里找到源代码
var source = [
{
data: [],
show: true,
label: "Constellation",
name: "Constellation",
color: "#0000FF",
points: {
show: true,
radius: 2,
fillColor: '#0000FF'
},
lines: {
show: false
}
}
]
var options = {...}
$.getJSON(URL , function(data) {
...
$.merge(source[0].data, new_data);
plotObj = $.plot("#placeholder", source, options);
}
Run Code Online (Sandbox Code Playgroud)