我必须以压缩的eclipse项目文件夹的形式提交我的家庭作业.我刚刚在一个非常可靠的程序中丢失了几点,因为我的提交中缺少一些外部库.我查看了我的项目文件夹,无法弄清楚这些库是什么.在eclipse中是否有一个选项会自动将所有外部jar复制到lib文件夹?谢谢!
我正在学习实体框架(5.0和VSExpress 2012),我在将查询绑定到WinForms中的dataGridView时遇到了麻烦.我有下面的代码,当我启动应用程序时它显示我的查询,但我不知道在更改底层数据库中的数据后我需要做什么来更新dataGridView.这样做的最佳方法是什么?我在这做错了什么?
private void Form1_Load(object sender, EventArgs e)
{
using( var ctx = new TimeKeepEntities())
{
var qLoggedIn = from r in ctx.tblTimeRecords
where (r.tblEmployee.Active && !r.ClockOut.HasValue) || System.Data.Objects.EntityFunctions.DiffDays(r.ClockOut, DateTime.Now)<30
select new { Name = r.tblEmployee.Last + ", " + r.tblEmployee.First, r.tblProject.ProjName, r.ClockIn, r.ClockOut };
dataGridView1.DataSource = qLoggedIn.ToList();
}
}
Run Code Online (Sandbox Code Playgroud) 我刚刚发布了一个使用orchard cms创建的网站.我将sitemap.xml添加到根文件夹但无法通过浏览器访问它.我猜我可能需要修改web.config文件,但我不知道如何.
编辑:这是我的webconfig.我不知道如何在这里正确格式化它.我正在访问sitemap.xml woodworkingoc.com/sitemap.xml但得到404.
<?xml version="1.0" encoding="utf-8"?>
<!--
Note: As an alternative to hand editing this file you can use the
web admin tool to configure settings for your application. Use
the Website->Asp.Net Configuration option in Visual Studio.
A full list of settings and comments can be found in
machine.config.comments usually located in
\Windows\Microsoft.Net\Framework\v2.x\Config
-->
<configuration>
<configSections>
<sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor">
<section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor" requirePermission="false" />
<section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor" requirePermission="false" />
</sectionGroup>
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" requirePermission="false" …Run Code Online (Sandbox Code Playgroud) 字符串是不可变的,这是否意味着我总是要通过传递给方法的字符串来做类似的事情?
str= str.toLowerCase();
Run Code Online (Sandbox Code Playgroud)
或是
str.toLowerCase();
Run Code Online (Sandbox Code Playgroud)
精细?我尝试了第二个,它没有给我任何错误,为什么?