关于GridView的横向合并数据信息
此为asp.net
运行展示:
前端代码:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm4.aspx.cs" Inherits="Web.WebForm4" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<style type="text/css">
.model_s {
width: 90px; }
.model_er {
width:50px;
} .GridViewStyle {
border-right: 2px solid #A7A6AA;
border-bottom: 2px solid #A7A6AA;
border-left: 2px solid white;
border-top: 2px solid white;
padding: 4px;
} .GridViewStyle a {
color:#0026ff;
} .GridViewHeaderStyle th {
border-left: 1px solid #000000;
border-right: 1px solid #000000;
} .GridViewHeaderStyle {
background-color: #5D7B9D;
font-weight: bold;
color: White;
} .GridViewFooterStyle {
background-color: #5D7B9D;
/*background-color: #b6ff00;*/
font-weight: bold;
color: White;
} .GridViewRowStyle {
background-color: #F7F6F3;
color: #333333;
} .GridViewAlternatingRowStyle {
background-color: #FFFFFF;
color: #284775;
} .GridViewRowStyle td, .GridViewAlternatingRowStyle td {
border: 1px solid #000000;
} .GridViewSelectedRowStyle {
background-color: #E2DED6;
font-weight: bold;
color: #333333;
} .GridViewPagerStyle {
background-color: #284775;
color: #FFFFFF;
} .GridViewPagerStyle table /* to center the paging links*/ {
margin: 0 auto 0 auto;
} #set_ms {
width: 1000px;
border: 0px solid #000000;
margin: 0 auto;
} #sss {
width: 900px;
border: 1px solid #000000;
margin: 100px auto;
}
.modd {
float:right;
}
.user_s {
display:none;
}
</style>
</head>
<body>
<form id="form1" runat="server"> <div id="sss" style="display:block">
<asp:GridView ID="GrvInfo1" runat="server" AutoGenerateColumns="False" OnDataBound="GrvInfo1_DataBound"
OnRowCreated="GrvInfo1_RowCreated" CssClass="GridViewStyle" OnRowDataBound="GrvInfo1_RowDataBound">
<Columns>
<asp:TemplateField HeaderText="序号" SortExpression="stu1" ItemStyle-CssClass="model_s">
<ItemTemplate>
<asp:Label ID="lblstu1" runat="server" Text='<%# Eval("stu1") %>'></asp:Label>
</ItemTemplate>
<ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
</asp:TemplateField>
<asp:TemplateField HeaderText="组别" SortExpression="stu2" ItemStyle-CssClass="model_s">
<ItemTemplate>
<asp:Label ID="lblstu2" runat="server" Text='<%# Eval("stu2") %>'></asp:Label>
</ItemTemplate>
<ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
</asp:TemplateField>
<asp:TemplateField HeaderText="姓名" SortExpression="stu3" ItemStyle-CssClass="model_s">
<ItemTemplate>
<asp:Label ID="lblstu3" runat="server" Text='<%# Eval("stu3") %>'></asp:Label>
</ItemTemplate>
<ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
</asp:TemplateField>
<asp:TemplateField HeaderText="一" SortExpression="stu4_1">
<ItemTemplate>
<asp:Label ID="lblstu4_1" runat="server" Text='<%# Eval("stu4_1") %>'></asp:Label>
</ItemTemplate>
<ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
</asp:TemplateField>
<asp:TemplateField HeaderText="二" SortExpression="stu4_2">
<ItemTemplate>
<asp:Label ID="lblstu4_2" runat="server" Text='<%# Eval("stu4_2") %>'></asp:Label>
</ItemTemplate>
<ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
</asp:TemplateField>
<asp:TemplateField HeaderText="三" SortExpression="stu4_3">
<ItemTemplate>
<asp:Label ID="lblstu4_3" runat="server" Text='<%# Eval("stu4_3") %>'></asp:Label>
</ItemTemplate>
<ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
</asp:TemplateField>
<asp:TemplateField HeaderText="四" SortExpression="stu4_4">
<ItemTemplate>
<asp:Label ID="lblstu4_4" runat="server" Text='<%# Eval("stu4_4") %>'></asp:Label>
</ItemTemplate>
<ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
</asp:TemplateField>
<asp:TemplateField HeaderText="五" SortExpression="stu4_5">
<ItemTemplate>
<asp:Label ID="lblstu4_5" runat="server" Text='<%# Eval("stu4_5") %>'></asp:Label>
</ItemTemplate>
<ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
</asp:TemplateField>
<asp:TemplateField HeaderText="六" SortExpression="stu4_6" ItemStyle-CssClass="model_s">
<ItemTemplate>
<asp:Label ID="lblstu4_6" runat="server" Text='<%# Eval("stu4_6") %>'></asp:Label>
</ItemTemplate>
<ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
</asp:TemplateField>
<asp:TemplateField HeaderText="日" SortExpression="stu4_7" ItemStyle-CssClass="model_s">
<ItemTemplate>
<asp:Label ID="lblstu4_7" runat="server" Text='<%# Eval("stu4_7") %>'></asp:Label>
</ItemTemplate>
<ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
</asp:TemplateField>
</Columns>
<FooterStyle CssClass="GridViewFooterStyle" />
<RowStyle CssClass="GridViewRowStyle" />
<SelectedRowStyle CssClass="GridViewSelectedRowStyle" />
<PagerStyle CssClass="GridViewPagerStyle" />
<AlternatingRowStyle CssClass="GridViewAlternatingRowStyle" />
<HeaderStyle CssClass="GridViewHeaderStyle" />
</asp:GridView>
</div>
</form>
<script type="text/javascript">
var _oldColor;
function SetNewColor(source)
{ _oldColor = source.style.backgroundColor; source.style.backgroundColor = '#999999'; }
function SetOldColor(source)
{ source.style.backgroundColor = _oldColor; }
</script>
</body>
</html>
后端代码:
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{ this.GrvInfo1.DataSource = new List<ste_ff>()
{
new ste_ff(){stu1="",stu2="南区部",stu3="纪文义",stu4_1="牵头南区工作",stu4_2="牵头南区工作",stu4_3="牵头南区工作",stu4_4="牵头南区工作",stu4_5="牵头南区工作",stu4_6="休息",stu4_7="休息" },
new ste_ff(){stu1="",stu2="南区部",stu3="纪文义1",stu4_1="水泵状态建设",stu4_2="水泵状态建设",stu4_3="水泵状态建设",stu4_4="付款督办",stu4_5="付款督办",stu4_6="休息",stu4_7="休息"},
new ste_ff(){stu1="",stu2="中区部",stu3="纪文义2",stu4_1="双月会准备1",stu4_2="双月会准备2",stu4_3="双月会准备2",stu4_4="制度文库修订汇报",stu4_5="制度文库修订汇报",stu4_6="休息",stu4_7="休息"},
new ste_ff(){stu1="",stu2="中区部",stu3="纪文义3",stu4_1="培训课件审核汇报",stu4_2="培训课件审核汇报",stu4_3="培训课件审核汇报",stu4_4="培训课件审核汇报",stu4_5="培训课件审核汇报",stu4_6="休息",stu4_7="休息"},
new ste_ff(){stu1="",stu2="北区部",stu3="纪文义4",stu4_1="牵头南区工作1",stu4_2="牵头南区工作1",stu4_3="牵头南区工作",stu4_4="牵头南区工作",stu4_5="牵头南区工作",stu4_6="休息",stu4_7="休息"},
};
this.GrvInfo1.DataBind();
}
}
#region 下周计划
protected void GrvInfo1_DataBound(object sender, EventArgs e)
{
//合并行
CommonClass_s.UnitRow_s(GrvInfo1, , "lblstu2");
//合并列
CommonClass_s.UnitCell_s(GrvInfo1, , "lblstu4_1", "lblstu4_2", "lblstu4_3", "lblstu4_4", "lblstu4_5");
} public class CommonClass_s
{
#region 合并行(相同值)-普通列 /// <summary>
/// 合并行(普通列)
/// </summary>
/// <param name=“gv”>所对应的GridView对象</param>
/// <param name=“columnIndex”>所对应要合并的列的索引</param>
public static void UnitRow_s(GridView gv, int columnIndex)
{
int i;
string lastType;
int lastCell;
if (gv.Rows.Count > )
{
lastType = gv.Rows[].Cells[columnIndex].Text;
gv.Rows[].Cells[columnIndex].RowSpan = ;
lastCell = ;
for (i = ; i < gv.Rows.Count; i++)
{
if (gv.Rows[i].Cells[columnIndex].Text == lastType)
{
gv.Rows[i].Cells[columnIndex].Visible = false;
gv.Rows[lastCell].Cells[columnIndex].RowSpan++;
}
else
{
lastType = gv.Rows[i].Cells[columnIndex].Text;
lastCell = i;
gv.Rows[i].Cells[columnIndex].RowSpan = ;
}
}
}
} #endregion #region 合并行(相同值)-模板列 /// <summary>
/// 合并行(模板列)
/// </summary>
/// <param name=“gv”>所对应的GridView对象</param>
/// <param name=“columnIndex”>所对应要合并的列的索引</param>
/// <param name=“lblName”>模板列里面Lable的Id</param>
public static void UnitRow_s(GridView gv, int columnIndex, string lblName)
{
int i;
string lastType;
int lastCell;
if (gv.Rows.Count > )
{
lastType = (gv.Rows[].Cells[columnIndex].FindControl(lblName) as Label).Text;
gv.Rows[].Cells[columnIndex].RowSpan = ;
lastCell = ;
for (i = ; i < gv.Rows.Count; i++)
{
if ((gv.Rows[i].Cells[columnIndex].FindControl(lblName) as Label).Text == lastType)
{
gv.Rows[i].Cells[columnIndex].Visible = false;
gv.Rows[lastCell].Cells[columnIndex].RowSpan++;
}
else
{
lastType = (gv.Rows[i].Cells[columnIndex].FindControl(lblName) as Label).Text;
lastCell = i;
gv.Rows[i].Cells[columnIndex].RowSpan = ;
}
}
}
} #endregion #region 合并列(相同值)-普通列 /// <summary>
/// 合并列(普通列)
/// </summary>
/// <param name="gv">所对应的GridView对象</param>
/// <param name="columnIndex">所对应要合并的列的索引</param>
public static void UnitCell_s(GridView gv, int columnIndex)
{
int i;
string lastType;
if (gv.Rows.Count > )
{
for (i = ; i < gv.Rows.Count; i++)
{
lastType = gv.Rows[i].Cells[columnIndex].Text;
gv.Rows[i].Cells[columnIndex].ColumnSpan = ;
if (gv.Rows[i].Cells[columnIndex + ].Text == lastType)
{
gv.Rows[i].Cells[columnIndex + ].Visible = false;
gv.Rows[i].Cells[columnIndex].ColumnSpan++;
}
else
{
lastType = gv.Rows[i].Cells[columnIndex].Text;
gv.Rows[i].Cells[columnIndex].ColumnSpan = ;
}
}
}
} #endregion #region 合并列(相同值)-模板列 /// <summary>
/// 合并行(模板列)
/// </summary>
/// <param name=“gv”>所对应的GridView对象</param>
/// <param name=“columnIndex”>所对应要合并的列的索引</param>
/// <param name=“lblName1”>模板列里面Lable1的Id</param>
/// /// <param name=“lblName1”>模板列里面Lable2的Id</param>
public static void UnitCell_s(GridView gv, int columnIndex, string lblName1, string lblName2, string lblName3, string lblName4, string lblName5)
{
int i;
string lastType1;
string lastType2;
string lastType3;
string lastType4;
string lastType5;
int num_set = ;//单表格列的列宽
if (gv.Rows.Count > )
{
for (i = ; i < gv.Rows.Count; i++)
{
int models = ;
int mnw = ;
lastType1 = (gv.Rows[i].Cells[columnIndex].FindControl(lblName1) as Label).Text;
lastType2 = (gv.Rows[i].Cells[columnIndex + ].FindControl(lblName2) as Label).Text;
lastType3 = (gv.Rows[i].Cells[columnIndex + ].FindControl(lblName3) as Label).Text;
lastType4 = (gv.Rows[i].Cells[columnIndex + ].FindControl(lblName4) as Label).Text;
lastType5 = (gv.Rows[i].Cells[columnIndex + ].FindControl(lblName5) as Label).Text;
string model_r = lastType1 + "," + lastType2 + "," + lastType3 + "," + lastType4 + "," + lastType5;
string[] model_uu = model_r.Trim().Split(',');
gv.Rows[i].Cells[columnIndex].ColumnSpan = ; ///=================== if (lastType1 == lastType2)
{
gv.Rows[i].Cells[columnIndex + ].Visible = false;
gv.Rows[i].Cells[columnIndex].ColumnSpan = ;
gv.Columns[columnIndex].ItemStyle.Width = num_set * ;
}
if (lastType2 == lastType3)
{
gv.Rows[i].Cells[columnIndex + ].Visible = false;
if (lastType1 == lastType3)
{
gv.Rows[i].Cells[columnIndex].ColumnSpan = ;
gv.Columns[columnIndex].ItemStyle.Width = num_set * ;
}
else
{
gv.Rows[i].Cells[columnIndex + ].ColumnSpan = ;
gv.Columns[columnIndex + ].ItemStyle.Width = num_set * ;
} }
if (lastType3 == lastType4)
{
gv.Rows[i].Cells[columnIndex + ].Visible = false;
if (lastType1 == lastType4)
{
gv.Rows[i].Cells[columnIndex].ColumnSpan = ;
gv.Columns[columnIndex].ItemStyle.Width = num_set * ;
}
else
{
if (lastType2 == lastType4)
{
gv.Rows[i].Cells[columnIndex + ].ColumnSpan = ;
gv.Columns[columnIndex + ].ItemStyle.Width = num_set * ;
}
else
{
gv.Rows[i].Cells[columnIndex + ].ColumnSpan = ;
gv.Columns[columnIndex + ].ItemStyle.Width = num_set * ;
}
}
}
if (lastType4 == lastType5)
{
gv.Rows[i].Cells[columnIndex + ].Visible = false;
if (lastType1 == lastType5)
{
gv.Rows[i].Cells[columnIndex].ColumnSpan = ;
gv.Columns[columnIndex].ItemStyle.Width = num_set * ;
}
else
{
if (lastType2 == lastType5)
{
gv.Rows[i].Cells[columnIndex + ].ColumnSpan = ;
gv.Columns[columnIndex + ].ItemStyle.Width = num_set * ;
}
else
{
if (lastType3 == lastType5)
{
gv.Rows[i].Cells[columnIndex + ].ColumnSpan = ;
gv.Columns[columnIndex + ].ItemStyle.Width = num_set * ;
}
else
{
gv.Rows[i].Cells[columnIndex + ].ColumnSpan = ;
gv.Columns[columnIndex + ].ItemStyle.Width = num_set * ;
}
}
}
}
}
}
} #endregion
} protected void GrvInfo1_RowCreated(object sender, GridViewRowEventArgs e)
{
//获取下周所有日期 #region 对获取下周日期的特殊转换(获取下周一时间) DateTime currentTime = DateTime.Now;
int week = Convert.ToInt32(currentTime.DayOfWeek);
week = week == ? : week;
var start_time_next_week = currentTime.AddDays( - week + );//下周星期一
string set_time = start_time_next_week.ToString("yyyy-MM-dd"); #endregion string[] set_num = set_time.Trim().Split('-');
int Year_s = ;//年
int Month_s = ;//月
int Day_s = ;//日
Year_s = Convert.ToInt32(set_num[]);
Month_s = Convert.ToInt32(set_num[]);
Day_s = Convert.ToInt32(set_num[]);
DateTime someDay = new DateTime(Year_s, Month_s, Day_s); //此处换成你实际的日期
int wd = (int)someDay.DayOfWeek;
string date_time1 = null;//用于接收日期字符 for (int i = - wd; i < - wd; i++)
{
DateTime currentDay = someDay.AddDays(i);
DateTime dt = DateTime.Parse(currentDay.ToShortDateString());
date_time1 += dt.Day.ToString() + ",";
}
date_time1 = date_time1.Remove(date_time1.Length - , );
string[] date_time2 = date_time1.Trim().Split(',');
switch (e.Row.RowType)
{
case DataControlRowType.Header://行是标题行
TableCellCollection personHeader = e.Row.Cells;//标题行的单元格集合
personHeader.Clear();//清空 //添加一个表头 比如以及表头有三列 那么序号就是 0 1 2
personHeader.Add(new TableHeaderCell());
personHeader[].Attributes.Add("rowspan", ""); //跨2行
personHeader[].Attributes.Add("colspan", ""); //跨1列
personHeader[].Attributes.Add("bgcolor", "DarkGreen");
personHeader[].Text = "序号"; personHeader.Add(new TableHeaderCell());
personHeader[].Attributes.Add("rowspan", ""); //跨2行
personHeader[].Attributes.Add("colspan", ""); //跨1列
personHeader[].Attributes.Add("bgcolor", "DarkGreen");
personHeader[].Text = "组别"; personHeader.Add(new TableHeaderCell());
personHeader[].Attributes.Add("rowspan", ""); //跨2行
personHeader[].Attributes.Add("colspan", ""); //跨1列
personHeader[].Attributes.Add("bgcolor", "DarkGreen");
personHeader[].Text = "姓名"; personHeader.Add(new TableHeaderCell());
personHeader[].Attributes.Add("colspan", ""); //跨3列
personHeader[].Attributes.Add("bgcolor", "green");
personHeader[].Text = "" + date_time2[] + ""; personHeader.Add(new TableHeaderCell());
personHeader[].Attributes.Add("colspan", ""); //跨3列
personHeader[].Attributes.Add("bgcolor", "green");
personHeader[].Text = "" + date_time2[] + ""; personHeader.Add(new TableHeaderCell());
personHeader[].Attributes.Add("colspan", ""); //跨3列
personHeader[].Attributes.Add("bgcolor", "green");
personHeader[].Text = "" + date_time2[] + ""; personHeader.Add(new TableHeaderCell());
personHeader[].Attributes.Add("colspan", ""); //跨3列
personHeader[].Attributes.Add("bgcolor", "green");
personHeader[].Text = "" + date_time2[] + ""; personHeader.Add(new TableHeaderCell());
personHeader[].Attributes.Add("colspan", ""); //跨3列
personHeader[].Attributes.Add("bgcolor", "green");
personHeader[].Text = "" + date_time2[] + ""; personHeader.Add(new TableHeaderCell());
personHeader[].Attributes.Add("colspan", ""); //跨3列
personHeader[].Attributes.Add("bgcolor", "green");
personHeader[].Text = "" + date_time2[] + ""; personHeader.Add(new TableHeaderCell());
personHeader[].Attributes.Add("colspan", ""); //跨3列
personHeader[].Attributes.Add("bgcolor", "green");
personHeader[].Text = "" + date_time2[] + "</th></tr><tr>"; //再添加一个表头
personHeader.Add(new TableHeaderCell());
personHeader[].Attributes.Add("bgcolor", "Khaki");
personHeader[].Text = "一";
personHeader.Add(new TableHeaderCell());
personHeader[].Attributes.Add("bgcolor", "Khaki");
personHeader[].Text = "二";
personHeader.Add(new TableHeaderCell());
personHeader[].Attributes.Add("bgcolor", "Khaki");
personHeader[].Text = "三";
personHeader.Add(new TableHeaderCell());
personHeader[].Attributes.Add("bgcolor", "Khaki");
personHeader[].Text = "四";
personHeader.Add(new TableHeaderCell());
personHeader[].Attributes.Add("bgcolor", "Khaki");
personHeader[].Text = "五";
personHeader.Add(new TableHeaderCell());
personHeader[].Attributes.Add("bgcolor", "Khaki");
personHeader[].Text = "六";
personHeader.Add(new TableHeaderCell());
personHeader[].Attributes.Add("bgcolor", "Khaki");
personHeader[].Text = "日"; //还可以继续添加
//记住不论多少行表头,每个列的序号是一次递增的,而且需要换行 —</th></tr><tr> break;
}
}
#endregion
行颜色渐变
protected void GrvInfo1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{ e.Row.Attributes.Add("onMouseOver", "SetNewColor(this);");
e.Row.Attributes.Add("onMouseOut", "SetOldColor(this);");
}
}
ste_ff类:
public class ste_ff
{
public string stu1 { set; get; } public string stu1_1 { set; get; }
public string stu2 { set; get; }
public string stu3 { set; get; }
public string stu4_1 { set; get; }
public string stu4_2 { set; get; }
public string stu4_3 { set; get; }
public string stu4_4 { set; get; }
public string stu4_5 { set; get; }
public string stu4_6 { set; get; }
public string stu4_7 { set; get; } public string stu5_1 { set; get; }
public string stu5_2 { set; get; }
public string stu5_3 { set; get; }
public string stu5_4 { set; get; }
public string stu5_5 { set; get; }
public string stu5_6 { set; get; }
public string stu5_7 { set; get; } /// <summary>用于接收星期一ID</summary>
public string stu_ID1 { set; get; }
/// <summary>用于接收星期二ID</summary>
public string stu_ID2 { set; get; }
/// <summary>用于接收星期三ID</summary>
public string stu_ID3 { set; get; }
/// <summary>用于接收星期四ID</summary>
public string stu_ID4 { set; get; }
/// <summary>用于接收星期五ID</summary>
public string stu_ID5 { set; get; }
/// <summary>用于接收星期六ID</summary>
public string stu_ID6 { set; get; }
/// <summary>用于接收星期七ID</summary>
public string stu_ID7 { set; get; }
}
关于GridView的横向合并数据信息的更多相关文章
- Pandas 横向合并DataFrame数据
需要将两个DataFrame进行横向拼接: 对 A_DataFrame 拼接一列数据: 数据样例如下: 将右侧source_df中的 “$factor” 列拼接到左侧qlib_df中,但左侧数据是分钟 ...
- R语言中数据框的横向合并与纵向合并
#横向合并ID<-c(1,2,3,4)name<-c("Jim","Tony","Lisa","Tom")s ...
- datagridview 纵向 横向 合并单元格
datagridview 单元格合并:纵向以及横向合并参考了csdn上不知哪位的代码,具体哪位找不到连接了. 纵向合并: /// <summary> /// 纵向合并,即合并数据项的值 / ...
- Android 横向列表GridView 实现横向滚动
Android 横向列表实现,可左右滑动,如下图 1.主界面布局代码:activity_main.xml a.包裹HorizontalScrollView控件是GirdView横向滚动的基本条件b.G ...
- 用python+selenium获取北上广深成五地PM2.5数据信息并按空气质量排序
从http://www.pm25.com/shenzhen.html抓取北京,深圳,上海,广州,成都的pm2.5指数,并按照空气质量从优到差排序,保存在txt文档里 代码如下: #coding=utf ...
- table_横向合并_纵向合并
colspan是横向合并; rowspan是纵向合并; <caption></caption>表格标题(自动居中)
- 数据库合并数据sql
1.sql2000中只能用自定义的函数解决 )) , 'aa') , 'bb') , 'aaa') , 'bbb') , 'ccc') go )) ) as begin ) select @str = ...
- Saiku设置展示table数据不隐藏空的行数据信息(二十六)
Saiku设置展示table数据不隐藏空的行数据信息 saiku有个 非空的字段 按钮,点击这个后,会自动的把空的行数据信息给隐藏掉,这里我们来设置一下让其行数据不隐藏,为空的就为空. 主要更改两个文 ...
- SqlServer中的UNION操作符在合并数据时去重的原理以及UNION运算符查询结果默认排序的问题
本文出处:http://www.cnblogs.com/wy123/p/7884986.html 周围又有人在讨论UNION和UNION ALL,对于UNION和UNION ALL,网上说的最多的就是 ...
随机推荐
- UIAutomator2的API文档(一)
检查并维持设备端守护进程处于运行状态,应该是重启了atx守护进程:d.healthcheck() 1.隐式等待 import uiautomator2 as u2serialno = '7f3dec6 ...
- 《腾讯网UED体验设计之旅》读后感
*:first-child { margin-top: 0 !important; } body > *:last-child { margin-bottom: 0 !important; } ...
- switch-case与if-else的转换
对学会成绩大于60分的,输出合格,低于60分的输出不合格 import java.util.Scanner; public class TestSwitch3 { public static void ...
- Bank1
Bank1: package banking1; //账户 public class Account { private double balance;// 账户余额 public Account(d ...
- 【已解决】Ubuntu U盘启动出现“Failed to load ldlinux.c32”问题
利用UltraISO制作了Ubuntu的U盘启动,在USB启动时出现了 Failed to load ldlinux.c32 Boot failed: please change disks and ...
- 一文说通Dotnet Core的中间件
前几天,公众号后台有朋友在问Core的中间件,所以专门抽时间整理了这样一篇文章. 一.前言 中间件(Middleware)最初是一个机械上的概念,说的是两个不同的运动结构中间的连接件.后来这个概念 ...
- Java实现 LeetCode 836 矩形重叠(暴力)
836. 矩形重叠 矩形以列表 [x1, y1, x2, y2] 的形式表示,其中 (x1, y1) 为左下角的坐标,(x2, y2) 是右上角的坐标. 如果相交的面积为正,则称两矩形重叠.需要明确的 ...
- java实现第四届蓝桥杯振兴中华
振兴中华 题目描述 小明参加了学校的趣味运动会,其中的一个项目是:跳格子. 地上画着一些格子,每个格子里写一个字,如下所示:(也可参见p1.jpg) 从我做起振 我做起振兴 做起振兴中 起振兴中华 比 ...
- idea 启动命令行的时候提示不能创建PTY
问题描述: 昨天上午,凯哥还在好好的使用idea,中午的时候,360扫描,好像要升级还是要干嘛的,没细看,然后凯哥就点击确定.结果到下午使用idea的Terminal 命令行的时候提示,如下图错误: ...
- 聊一聊高并发高可用那些事 - Kafka篇
目录 为什么需要消息队列 1.异步 :一个下单流程,你需要扣积分,扣优惠卷,发短信等,有些耗时又不需要立即处理的事,可以丢到队列里异步处理. 2.削峰 :按平常的流量,服务器刚好可以正常负载.偶尔推出 ...