小编Mr1*_*9pm的帖子

如何在eclipse中自动检查/确保所有外部库是否包含lib文件夹?

我必须以压缩的eclipse项目文件夹的形式提交我的家庭作业.我刚刚在一个非常可靠的程序中丢失了几点,因为我的提交中缺少一些外部库.我查看了我的项目文件夹,无法弄清楚这些库是什么.在eclipse中是否有一个选项会自动将所有外部jar复制到lib文件夹?谢谢!

java eclipse

6
推荐指数
1
解决办法
92
查看次数

数据绑定linq查询到Entity Framework 5.0中的datagridView

我正在学习实体框架(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)

c# entity-framework entity-framework-5

6
推荐指数
1
解决办法
2万
查看次数

在使用orchard创建的站点中无法访问sietmap.xml.怎么解决?

我刚刚发布了一个使用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)

orchardcms

6
推荐指数
2
解决办法
2671
查看次数

字符串不变性.更改后我是否必须将其重新分配给同一个变量?

字符串是不可变的,这是否意味着我总是要通过传递给方法的字符串来做类似的事情?

str= str.toLowerCase();
Run Code Online (Sandbox Code Playgroud)

或是

str.toLowerCase();
Run Code Online (Sandbox Code Playgroud)

精细?我尝试了第二个,它没有给我任何错误,为什么?

java

-1
推荐指数
2
解决办法
853
查看次数