我有这个数据结构,每个团队都有开始/结束日期的问题列表.
对于每个团队,我想合并具有相同密钥和重叠日期的问题,在结果发布中,开始日期将是较小的日期,而结束日期将是更大的日期.
我试图用很少的for循环来做,但我想知道什么是最好的Pythonic方法来做到这一点.
我想仅在同一团队中合并具有相同密钥的问题并且具有重叠日期.
问题不是按时间顺序排列的.
输入:
{
'Team A': [{
'start': '11/Jul/13 1:49 PM',
'end': '10/Oct/13 5:16 PM',
'issue': 'KEY-12678'
}, {
'start': '3/Oct/13 10:40 AM',
'end': '11/Nov/13 1:02 PM',
'issue': 'KEY-12678'
}],
'Team B': [{
'start': '5/Sep/13 3:35 PM',
'end': '08/Nov/13 3:35 PM',
'issue': 'KEY-12679'
}, {
'start': '19/Aug/13 5:05 PM',
'end': '10/Sep/13 5:16 PM',
'issue': 'KEY-12679'
}, {
'start': '09/Jul/13 9:15 AM',
'end': '29/Jul/13 9:15 AM',
'issue': 'KEY-12680'
}]
}
Run Code Online (Sandbox Code Playgroud)
输出:
{
'Team …Run Code Online (Sandbox Code Playgroud) 我在.net MVC4中运行的jquerymobile中有此页面
<div data-role="header" data-theme="b" data-position="fixed">
<h3 style="color:white;">
Name
</h3>
<a href="#" data_icon="back"> Back </a>
<div data-role="fieldcontain" class="test_row">
<fieldset data-role="controlgroup" data-type="horizontal" class="test_row">
<input id="radio3" name="testType" value="2" type="radio" checked="checked" class="test_type">
<label for="radio3" class="test_type">All tests</label>
<input id="radio1" name="testType" value="0" type="radio" class="test_type">
<label id="test_type_label" for="radio1" class="test_type" >Automated</label>
<input id="radio2" name="testType" value="1" type="radio" class="test_type">
<label for="radio2" class="test_type">Manual</label>
</fieldset>
</div>
</div>
Run Code Online (Sandbox Code Playgroud)
CSS
.test_row .ui-btn {
text-align: center;
}
.ui-field-contain .ui-controlgroup-controls {
width: 100%;
}
.ui-controlgroup-controls .ui-radio {
width: 33.3%;
}
Run Code Online (Sandbox Code Playgroud)
http://jsfiddle.net/ruds5/jsfiddle
调整结果大小时,中间词(自动)被截断为较短的形式,末尾带有"...".
是否可以防止在单词结尾处截断?