基本需求:

用例图:

存储过程:

  1. CREATE PROCEDURE [dbo].[BioErpCrmChannelDocument_ADD]
  2. @DocumentID int,
  3. @ChannelID int
  4. AS
  5. INSERT INTO [BioErpCrmChannelDocument](
  6. [DocumentID],[ChannelID]
  7. )VALUES(
  8. @DocumentID,@ChannelID
  9. )
  1. CREATE PROCEDURE BioErpCrmChannelDocument_Update
  2. @ChannelDocumentID int,
  3. @DocumentID int,
  4. @ChannelID int,
  5. @DeleteState bit
  6. AS
  7. UPDATE [BioErpCrmChannelDocument] SET
  8. [DocumentID] = @DocumentID,[ChannelID] = @ChannelID,[DeleteState] = @DeleteState
  9. WHERE ChannelDocumentID=@ChannelDocumentID
  1. CREATE VIEW dbo.View_CRMChannelDocumentInfo
  2. AS
  3. SELECT dbo.BioErpCrmManageChannel.ChannelName, dbo.UserManager.UserName, dbo.BioCrmCorrelationDocument.DocumentID, dbo.BioCrmCorrelationDocument.Subject,
  4. dbo.BioCrmCorrelationDocument.Name, dbo.BioCrmCorrelationDocument.Type, dbo.BioCrmCorrelationDocument.DocumentLevel,
  5. dbo.BioCrmCorrelationDocument.DocumentSize, dbo.BioCrmCorrelationDocument.ExetendName, dbo.BioCrmCorrelationDocument.[Content],
  6. dbo.BioCrmCorrelationDocument.UserID, dbo.BioCrmCorrelationDocument.UploadTime, dbo.BioCrmCorrelationDocument.Remark,
  7. dbo.BioErpCrmChannelDocument.DeleteState, dbo.BioErpCrmChannelDocument.ChannelDocumentID, dbo.BioErpCrmChannelDocument.ChannelID
  8. FROM dbo.BioErpCrmChannelDocument INNER JOIN
  9. dbo.BioCrmCorrelationDocument ON dbo.BioErpCrmChannelDocument.DocumentID = dbo.BioCrmCorrelationDocument.DocumentID INNER JOIN
  10. dbo.UserManager ON dbo.BioCrmCorrelationDocument.UserID = dbo.UserManager.UserId INNER JOIN
  11. dbo.BioErpCrmManageChannel ON dbo.BioErpCrmChannelDocument.ChannelID = dbo.BioErpCrmManageChannel.ChannelID

BLL代码:

  1. public class ChannelDocumentBLL
  2. {
  3. /// <summary>
  4. /// 文档信息添加
  5. /// </summary>
  6. /// <param name="document">文档对象</param>
  7. /// <returns>int</returns>
  8. public int BioErpCrmChannelDocumentAdd(BioErpCrmChannelDocument document)
  9. {
  10. SqlParameter[] pars = new SqlParameter[]{
  11. new SqlParameter("@DocumentID",document.DocumentID),
  12. new SqlParameter("@ChannelID",document.ChannelID)
  13. };
  14.  
  15. return DataBaseHelper.ExcuteSqlReturnInt("BioErpCrmChannelDocument_ADD", CommandType.StoredProcedure, pars);
  16. }
  17.  
  18. /// <summary>
  19. /// 修改文档对象
  20. /// </summary>
  21. /// <param name="document">文档对象</param>
  22. /// <returns>int</returns>
  23. public int BioErpCrmChannelDocumentUpdate(BioErpCrmChannelDocument document)
  24. {
  25. SqlParameter[] pars = new SqlParameter[]{
  26. new SqlParameter("@ChannelDocumentID",document.ChannelDocumentID),
  27. new SqlParameter("@DocumentID",document.DocumentID),
  28. new SqlParameter("@ChannelID",document.ChannelID),
  29. new SqlParameter("@DeleteState",document.DeleteState)
  30. };
  31. return DataBaseHelper.ExcuteSqlReturnInt("BioErpCrmChannelDocument_Update", CommandType.StoredProcedure, pars);
  32. }
  33.  
  34. /// <summary>
  35. /// 根据ID查询文档的详细信息
  36. /// </summary>
  37. /// <param name="id"></param>
  38. /// <returns></returns>
  39. public ViewCRMChannelDocumentInfo getChannelDocumentViewByDocumentID(string id)
  40. {
  41. SqlDataReader reader= CommTool.SqlComm.GetDataReaderByCondition("View_CRMChannelDocumentInfo", "*", " DocumentID=" + id);
  42. ViewCRMChannelDocumentInfo view= null;
  43. if (reader.Read())
  44. {
  45. view = new ViewCRMChannelDocumentInfo()
  46. {
  47. UserName = reader["UserName"].ToString(),
  48. ChannelName = reader["ChannelName"].ToString(),
  49. DocumentID = int.Parse(reader["DocumentID"].ToString()),
  50. UserID = int.Parse(reader["UserID"].ToString()),
  51. UploadTime = Convert.ToDateTime(reader["UploadTime"].ToString()),
  52. Type = reader["Type"].ToString(),
  53. Subject = reader["Subject"].ToString(),
  54. Remark = reader["Remark"].ToString(),
  55. Name = reader["Name"].ToString(),
  56. ExetendName = reader["ExetendName"].ToString(),
  57. DocumentSize = long.Parse(reader["DocumentSize"].ToString()),
  58. DocumentLevel = reader["DocumentLevel"].ToString()
  59.  
  60. };
  61.  
  62. }
  63. reader.Close();
  64. return view;
  65. }
  66.  
  67. }

前端代码:

  1. <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ChannelDocumentAdd.aspx.cs" Inherits="BioErpWeb.CRMSystem.CrmChannelDocument.ChannelDocumentAdd" %>
  2.  
  3. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  4.  
  5. <html xmlns="http://www.w3.org/1999/xhtml">
  6. <head runat="server">
  7. <title></title>
  8. <link href="../../Styles/ERPBaseStyle.css" rel="stylesheet" type="text/css" />
  9. <link href="../../Styles/CalenderStyle.css" rel="stylesheet" type="text/css" />
  10. <script src="../../JS/ChannelChoose.js" type="text/javascript"></script>
  11. <script src="../../Scripts/jquery-1.4.1.min.js" type="text/javascript"></script>
  12. <script src="../../Scripts/jquery.validate.js" type="text/javascript"></script>
  13. <script src="../../Scripts/ValidateMessage_ZW.js" type="text/javascript"></script>
  14.  
  15. <script type="text/javascript">
  16. $(document).ready(function () {
  17. $("#form1").validate();
  18. });
  19.  
  20. </script>
  21. </head>
  22. <body>
  23. <form id="form1" runat="server">
  24. <div>
  25. <table class="maintable">
  26. <tr>
  27. <td colspan="2" class="titlebar"><span>渠道文档信息上传</span></td>
  28. </tr>
  29. <tr>
  30. <td>主题</td><td><asp:TextBox ID="txtsubJect" runat="server" CssClass="required"></asp:TextBox></td>
  31. </tr>
  32. <tr>
  33. <td>
  34. 文档等级</td>
  35. <td>
  36. <asp:DropDownList ID="ddlLevel" runat="server">
  37. <asp:ListItem Selected="True">一般文件</asp:ListItem>
  38. <asp:ListItem>重要文件</asp:ListItem>
  39. <asp:ListItem>非常重要文件</asp:ListItem>
  40. <asp:ListItem>特别重要</asp:ListItem>
  41. </asp:DropDownList>
  42. </td>
  43. </tr>
  44. <tr>
  45. <td>
  46. 文档选择</td>
  47. <td>
  48. <asp:FileUpload ID="FileUpload1" runat="server" />
  49. </td>
  50. </tr>
  51. <tr>
  52. <td>
  53. 所属渠道
  54. </td>
  55. <td >
  56. <asp:TextBox ID="txtSuperChannelID" runat="server"></asp:TextBox><input type="button" value="选择" style=" width:100px;" onclick="showChannel()" />
  57. </td>
  58. </tr>
  59. <tr>
  60. <td>
  61. 说明</td>
  62. <td >
  63. <asp:TextBox ID="txtRemark" TextMode="MultiLine" Rows="5" runat="server"
  64. Width="380px"></asp:TextBox>
  65. </td>
  66. </tr>
  67. <tr>
  68. <td colspan="2" class="bottomtd">
  69.  
  70. <asp:Button ID="btnSubmit" runat="server" Text="文档信息上传"
  71. onclick="btnSubmit_Click" />
  72.  
  73. <asp:Button ID="btnReturn" runat="server" Text="返回列表" UseSubmitBehavior="false" onclick="btnReturn_Click"
  74. />
  75. </td>
  76. </tr>
  77.  
  78. </table>
  79. <br />
  80. </div>
  81. </form>
  82. </body>
  83. </html>

后端代码:

  1. public partial class ChannelDocumentAdd : System.Web.UI.Page
  2. {
  3.  
  4. protected void Page_Load(object sender, EventArgs e)
  5. {
  6. Session["Userid"] = "29";
  7. if (!IsPostBack)
  8. {
  9.  
  10. }
  11. }
  12.  
  13. protected void btnSubmit_Click(object sender, EventArgs e)
  14. {
  15. BioCrmCorrelationDocument document = new BioCrmCorrelationDocument();
  16. document.Subject = this.txtsubJect.Text;
  17. document.Name = DateTime.Now.ToString("yyyyMMddhhmmss") + this.FileUpload1.FileName;
  18. document.UserID = int.Parse(Session["Userid"].ToString());
  19. document.Remark = this.txtRemark.Text;
  20. document.DocumentLevel = this.ddlLevel.SelectedValue;
  21. document.Content = this.FileUpload1.FileBytes;
  22. document.DocumentSize = this.FileUpload1.FileContent.Length;
  23. document.Type = this.FileUpload1.PostedFile.ContentType;
  24. document.ExetendName = System.IO.Path.GetExtension(this.FileUpload1.FileName);
  25.  
  26. //物理文件上传
  27. string filepath = Server.MapPath(@"\Files\CRMChannelFiles\");
  28. Comm.FileUpLoad(this.FileUpload1, filepath, document.Name);
  29. BioCrmCorrelationDocumentBLL documentbll = new BioCrmCorrelationDocumentBLL();
  30. //文档信息添加 包括文件上传(转换为二进制数组后上传)
  31. int documentid = documentbll.BioCrmCorrelationDocumentAdd(document);
  32. if (documentid != 0)
  33. {
  34. BioErpCrmChannelDocument channeldocument = new BioErpCrmChannelDocument();
  35. channeldocument.ChannelID = int.Parse(this.txtSuperChannelID.Text.ToString());
  36. channeldocument.DocumentID = documentid;
  37.  
  38. ChannelDocumentBLL channelbll = new ChannelDocumentBLL();
  39. int count= channelbll.BioErpCrmChannelDocumentAdd(channeldocument);
  40. if (count != 0)
  41. {
  42. ClientScript.RegisterStartupScript(this.GetType(), "test", "alert('添加成功')", true);
  43. }
  44. else
  45. {
  46. SqlComm.DeleteTableByCondition("BioCrmCorrelationDocument", " DocumentID=" + documentid);
  47. ClientScript.RegisterStartupScript(this.GetType(), "test", "alert('添加失败')", true);
  48. }
  49. }
  50. }
  51. }

渠道文档管理显示界面:

  1. <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ChannelDocumentListShow.aspx.cs" Inherits="BioErpWeb.CRMSystem.CrmChannelDocument.ChannelDocumentListShow" %>
  2.  
  3. <%@ Register assembly="AspNetPager" namespace="Wuqi.Webdiyer" tagprefix="webdiyer" %>
  4.  
  5. <%@ Register src="../../UserControl/CRMChannelMenuBar.ascx" tagname="CRMMenuBar" tagprefix="uc1" %>
  6.  
  7. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  8.  
  9. <html xmlns="http://www.w3.org/1999/xhtml">
  10. <head runat="server">
  11. <title></title>
  12. <link href="../../Styles/ERPBaseStyle.css" rel="stylesheet" type="text/css" />
  13. <link href="../../Styles/AspNetPagerStyle.css" rel="stylesheet" type="text/css" />
  14. <link href="../../Scripts/jquery-ui-1.7.custom.css" rel="stylesheet" type="text/css" />
  15. <script src="../../Scripts/jquery-1.4.1.js" type="text/javascript"></script>
  16. <script src="../../Scripts/jquery-ui-1.7.custom.min.js" type="text/javascript"></script>
  17. <style type="text/css">
  18. td{ text-align:center;}
  19. .tdsearch{ line-height:30px;}
  20. .menubar{ background:url(../Web/images/block_hd_bg.png); height:25px; width:100%;}
  21. .menubar ul{ margin:0px; padding:0px; list-style:none;}
  22. .menubar ul li{ display:inline; line-height:25px;}
  23. .menubar ul li a{display:inline-block; text-align:center; width:100px; color:#0066CC; text-decoration:none;}
  24.  
  25. </style>
  26. <script type="text/javascript">
  27. $().ready(function () {
  28. $("#txtDate").datepicker({dateFormat:'yy-mm-dd'});
  29. });
  30. </script>
  31. </head>
  32. <body>
  33. <form id="form1" runat="server">
  34. <div>
  35.  
  36. <uc1:CRMMenuBar ID="CRMMenuBar1" runat="server" />
  37.  
  38. </div>
  39. <div>
  40. <table class="maintable" style=" width:900px;">
  41. <tr>
  42. <td colspan="5" class="titlebar">
  43. <span>渠道文档管理</span>
  44. </td>
  45. </tr>
  46. <tr>
  47. <td class="tdsearch">
  48. <asp:Label ID="Label1" runat="server" Text="文档主题:"></asp:Label>
  49. <asp:TextBox ID="txtName" runat="server"></asp:TextBox>
  50. </td>
  51. <td class="tdsearch">
  52. <asp:Label ID="Label2" runat="server" Text="渠道名:"></asp:Label>
  53. <asp:TextBox ID="txtCName" runat="server"></asp:TextBox>
  54. </td>
  55. <td class="tdsearch">
  56. <asp:Label ID="Label3" runat="server" Text="上传时间:"></asp:Label>
  57. <asp:TextBox ID="txtDate" runat="server"></asp:TextBox>
  58.  
  59. </td>
  60.  
  61. <td class="tdsearch">
  62. <asp:ImageButton ID="imgbutnSearch" Width="60" Height="22" runat="server"
  63. ImageUrl="~/Web/images/Btnsearch.gif" onclick="imgbutnSearch_Click" /> 
  64. <asp:ImageButton ID="imgbtnNew" runat="server" Width="60" Height="22"
  65. ImageUrl="~/Web/images/btnadd.gif" onclick="imgbtnNew_Click"/>
  66. </td>
  67. </tr>
  68. <tr>
  69. <td colspan="5" class="bottomtd">
  70. <asp:GridView ID="GridView1" Width="100%" runat="server" AutoGenerateColumns="False" DataKeyNames="DocumentID">
  71. <Columns>
  72. <asp:TemplateField HeaderText="文档主题" HeaderStyle-HorizontalAlign="Center">
  73. <ItemTemplate>
  74. <asp:Label ID="Label4" runat="server" Text='<%# Eval("Subject") %>'></asp:Label>
  75. </ItemTemplate>
  76. <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
  77. <ItemStyle HorizontalAlign="Center" />
  78. </asp:TemplateField>
  79. <asp:TemplateField HeaderText="文档名" HeaderStyle-HorizontalAlign="Center">
  80. <ItemTemplate>
  81. <asp:Label ID="Label5" runat="server" Text='<%# Eval("Name") %>'></asp:Label>
  82. </ItemTemplate>
  83.  
  84. <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
  85. <ItemStyle HorizontalAlign="Center" />
  86. </asp:TemplateField>
  87. <asp:TemplateField HeaderText="所属渠道" HeaderStyle-HorizontalAlign="Center">
  88. <ItemTemplate>
  89. <asp:Label ID="Label6" runat="server" Text='<%# Eval("ChannelName") %>'></asp:Label>
  90. </ItemTemplate>
  91. <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
  92. <ItemStyle HorizontalAlign="Center" />
  93. </asp:TemplateField>
  94. <asp:TemplateField HeaderText="文件级别" HeaderStyle-HorizontalAlign="Center">
  95. <ItemTemplate>
  96. <asp:Label ID="Label7" runat="server" Text='<%# Eval("DocumentLevel") %>'></asp:Label>
  97. </ItemTemplate>
  98. <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
  99. <ItemStyle HorizontalAlign="Center" />
  100. </asp:TemplateField>
  101. <asp:TemplateField HeaderText="上传时间" HeaderStyle-HorizontalAlign="Center">
  102. <ItemTemplate>
  103. <asp:Label ID="Label9" runat="server" Text='<%# Convert.ToDateTime( Eval("UploadTime")).ToString("yyyy-MM-dd") %>'></asp:Label>
  104. </ItemTemplate>
  105. <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
  106. <ItemStyle HorizontalAlign="Center" />
  107. </asp:TemplateField>
  108.  
  109. <asp:TemplateField HeaderText="上传用户" HeaderStyle-HorizontalAlign="Center">
  110. <ItemTemplate>
  111. <asp:Label ID="Label9" runat="server" Text='<%# Eval("UserName") %>'></asp:Label>
  112. </ItemTemplate>
  113. <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
  114. <ItemStyle HorizontalAlign="Center" />
  115. </asp:TemplateField>
  116.  
  117. <asp:HyperLinkField DataNavigateUrlFields="DocumentID"
  118. DataNavigateUrlFormatString="DocumentEditAndDown.aspx?ID={0}" HeaderText="操作"
  119. Text="下载/编辑">
  120. <HeaderStyle HorizontalAlign="Center" />
  121. <ItemStyle HorizontalAlign="Center" />
  122. </asp:HyperLinkField>
  123. </Columns>
  124. </asp:GridView>
  125. </td>
  126. </tr>
  127. <tr>
  128. <td colspan="5">
  129. <webdiyer:AspNetPager ID="AspNetPager1" runat="server" CssClass="paginator" CurrentPageButtonClass="cpb"
  130. onpagechanged="AspNetPager1_PageChanged">
  131. </webdiyer:AspNetPager>
  132. </td>
  133. </tr>
  134. </table>
  135. </div>
  136. </form>
  137. </body>
  138. </html>

后端代码:

  1. public partial class ChannelDocumentListShow : System.Web.UI.Page
  2. {
  3.  
  4. public static int pageindex = 0;
  5. public static int pagesize = 10;
  6. public static string condition = "";
  7.  
  8. protected void Page_Load(object sender, EventArgs e)
  9. {
  10. Session["Userid"] = "29";
  11. if (Session["Userid"] == null)
  12. {
  13. Response.Redirect(@"..\Web\UserLogin.aspx");
  14. return;
  15. }
  16.  
  17. if (!IsPostBack)
  18. {
  19. getallPageList();
  20. }
  21. }
  22.  
  23. /// <summary>
  24. /// 查询所有联系人信息
  25. /// </summary>
  26. private void getallPageList()
  27. {
  28. string id = Session["Userid"].ToString();
  29. condition += " and UserID=" + id;
  30. if (UserLogin.user.RoleId == 6) //市场部经理
  31. {
  32. condition += " or UserID !=" + id;
  33. }
  34. this.AspNetPager1.RecordCount = SqlComm.getDataCountByCondition("dbo.View_CRMChannelDocumentInfo", condition);
  35. this.AspNetPager1.PageSize = pagesize;
  36. this.GridView1.DataSource = SqlComm.getDataByPageIndex("dbo.View_CRMChannelDocumentInfo", "*", "DocumentID", condition, pageindex, pagesize);
  37. this.GridView1.DataBind();
  38. }
  39.  
  40. protected void AspNetPager1_PageChanged(object sender, EventArgs e)
  41. {
  42. pageindex = this.AspNetPager1.CurrentPageIndex - 1;
  43. getallPageList();
  44. }
  45.  
  46. protected void imgbutnSearch_Click(object sender, ImageClickEventArgs e)
  47. {
  48. pageindex = 0;
  49. condition = "";
  50. if (txtName.Text.Trim() != null && this.txtName.Text.Trim().Length != 0)
  51. {
  52. condition = condition + " and Subject like '" + txtName.Text + "%'";
  53. }
  54.  
  55. if (this.txtCName.Text.Trim() != null && this.txtCName.Text.Trim().Length != 0)
  56. {
  57. condition = condition + " and ChannelName like '" + txtCName.Text + "%'";
  58. }
  59.  
  60. if (this.txtDate.Text.Trim() != null && this.txtDate.Text.Trim().Length!=0)
  61. {
  62. condition = condition + " and (UploadTime >= '" + this.txtDate.Text + "' AND UploadTime< '" + Convert.ToDateTime(this.txtDate.Text).AddDays(1) + "')";
  63. }
  64. getallPageList();
  65. }
  66.  
  67. protected void btnNew_Click(object sender, EventArgs e)
  68. {
  69.  
  70. }
  71.  
  72. protected void imgbtnNew_Click(object sender, ImageClickEventArgs e)
  73. {
  74. Server.Transfer("ChannelDocumentAdd.aspx");
  75. }
  76.  
  77. }

ERP渠道文档管理(二十四)的更多相关文章

  1. React文档(二十四)高阶组件

    高阶组件(HOC)是React里的高级技术为了应对重用组件的逻辑.HOCs本质上不是React API的一部分.它是从React的组合性质中显露出来的模式. 具体来说,一个高阶组件就是一个获取一个组件 ...

  2. ERP渠道文档详细和修改(二十五)

    前端代码: <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ChannelD ...

  3. 『.NET Core CLI工具文档』(十四)dotnet-install 脚本参考

    说明:本文是个人翻译文章,由于个人水平有限,有不对的地方请大家帮忙更正. 原文:dotnet-install scripts reference 翻译:dotnet-install 脚本参考 名称 d ...

  4. React文档(二十二)context

    React中,通过React组件可以很容易地追踪数据流.当你关注一个组件,你可以发现哪一个props被传递了,这样使得你的应用很容被推断. 在一些情况下,你想要传递数据通过组件树而不需要去手动在每一层 ...

  5. React文档(二十)不使用JSX

    JSX并不是使用React的一个强制需求.当你不需要在你的构造环境里设置编译那么不使用JSX会很方便. 每一个JSX元素只是调用React.createElement(componnet, props ...

  6. Elastic Stack 笔记(四)Elasticsearch5.6 索引及文档管理

    博客地址:http://www.moonxy.com 一.前言 在 Elasticsearch 中,对文档进行索引等操作时,既可以通过 RESTful 接口进行操作,也可以通过 Java 也可以通过 ...

  7. VMware vSphere 服务器虚拟化之二十四 桌面虚拟化之手动池管理物理机

    VMware vSphere 服务器虚拟化之二十四 桌面虚拟化之手动池管理物理机 VMwareView手动池可以管理物理计算机 说明: 环境基于实验二十三 1.准备一台Windows 7的物理计算机名 ...

  8. 四十三.MongoDB副本集 MongoDB文档管理

    一.部署MongoDB副本集 1.1 启用副本集配置并指定集群名称 rs1 1.2 定义集群成员列表 部署好机器51,52,53:51上配置 bind_ip=192.168.4.51(要改) port ...

  9. 如何基于WPF写一款数据库文档管理工具(二)

    系列目录 基于WPF重复造轮子,写一款数据库文档管理工具(一) 本篇重点 上次发表了基于WPF重复造轮子,写一款数据库文档管理工具(一) 得到不少人支持,文章一度上到了博客园推荐表首页,看来大家对这个 ...

随机推荐

  1. 服务端增加WCF服务全局异常处理机制

    服务端增加WCF服务全局异常处理机制,任一WCF服务或接口方式出现异常,将统一调用WCF_ExceptionHandler.ProvideFault方法,因此不需要每个方法使用try catch写法. ...

  2. python接口自动化感悟

    一个方法对应一个接口,每个方法都要有登陆 成一个独立的逻辑功能块

  3. luogu1312

    有趣的题面 超有趣的dfs大模拟,码了巨久,卡时过了此题qaq #include <cstdio> #include <cstring> #include <algori ...

  4. 【BZOJ1449】[JSOI2009]球队收益(网络流,费用流)

    [BZOJ1449][JSOI2009]球队收益(网络流,费用流) 题面 BZOJ 洛谷 题解 首先对于一支队伍而言,总共进行多少场比赛显然是已知的,假设是\(n_i\)场,那么它的贡献是:\(C_i ...

  5. c/c++ 判断两个实型的关系

    etc. minv=1e-10 or less x>y : x>y-minv x<y : x<y+minv x=y : fabs(x-y)<minv

  6. Python 内置函数---map()

    描述 map() 实现对一个可迭代对象中的每一个元素都应用一个函数 将被传入的函数作用到一个可迭代对象的每一个元素上,并且返回了包含了所有这些函数调用结果的一个迭代器. 由于map期待传入一个函数并会 ...

  7. 压力测试以及编译安装httpd2.4

    压力测试以及编译安装httpd2.4 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 一.使用 deflate_module模块压缩页面优化传输速度 我们的httpd软件自带的有一个 ...

  8. 最长回文子串问题-Manacher算法

    转:http://blog.csdn.net/dyx404514/article/details/42061017 Manacher算法 算法总结第三弹 manacher算法,前面讲了两个字符串相算法 ...

  9. bzoj千题计划211:bzoj1996: [Hnoi2010]chorus 合唱队

    http://www.lydsy.com/JudgeOnline/problem.php?id=1996 f[i][j][0/1] 表示已经排出队形中的[i,j],最后一个插入的人在[i,j]的i或j ...

  10. c# yield关键字原理详解

    c# yield关键字的用法 1.yield实现的功能 yield return: 先看下面的代码,通过yield return实现了类似用foreach遍历数组的功能,说明yield return也 ...