我正在开发一个小应用程序,并考虑将BLAST或其他本地对齐搜索集成到我的应用程序中.我的搜索只提出了需要安装并作为外部程序调用的程序.
有没有办法从头开始实现它?也许是任何预制的图书馆?
我想在SQL Server中创建一个具有最小值和最大值的数字序列.如果数字达到最大限制,我想循环.有谁能够帮我??
我想编写一个接受这样的XML文档的模式:
<plugin>
<label text="blabla" />
<line />
<break />
<textbox name="mytextbox" length="8" required="true" />
<checkbox name="mycheckbox" checked="true" />
<combobox name="mycombo">
<option value="one">Option One</option>
<option value="two" selected="true">Option One</option>
</combobox>
<break />
</plugin>
Run Code Online (Sandbox Code Playgroud)
所以我希望插件包含set {combobox,checkbox,textbox,label,line,break}的元素.我写过这个XSD,但这是错的:
<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="NewDataSet" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xs:element name="plugin">
<xs:complexType>
<xs:sequence>
<xs:choice>
<xs:element name="line" />
<xs:element name="break" />
<xs:element name="label">
<xs:complexType>
<xs:attribute name="text" type="xs:string" />
<xs:attribute name="bold" type="xs:boolean" />
<xs:attribute name="width" type="xs:positiveInteger" />
</xs:complexType>
</xs:element>
<xs:element name="textbox">
<xs:complexType>
<xs:attribute name="name" type="xs:string" />
<xs:attribute name="width" type="xs:positiveInteger" /> …Run Code Online (Sandbox Code Playgroud) 我有一个相对较大的数据集(16,000 + x~31).换句话说,它足够大,我不想在Excel中逐行操作它.数据采用以下形式:
block site day X1 X2
1 1 1 0.4 5.1
1 1 2 0.8 1.1
1 1 3 1.1 4.2
1 2 1 ... ...
1 2 2
1 2 3
2 3 1
2 3 2
2 3 3
2 4 1
2 4 2
2 4 3
Run Code Online (Sandbox Code Playgroud)
正如您所看到的,站点计数是连续的,但我想要一个列,其中站点编号与每个块重置.例如,我想要下面这样的东西:
block site day X1 X2 site2
1 1 1 0.4 5.1 1
1 1 2 0.8 1.1 1
1 1 3 1.1 4.2 1
1 2 1 …Run Code Online (Sandbox Code Playgroud) 我正在使用docjure,它的select-columns函数需要一个列映射.我想抓住我的所有列而不必手动指定它.如何生成以下作为惰性无限向量序列[:A:B:C:D:E ...:AA:AB:AC ....:ZZ ......:XFD]?
C ++ 11引入emplace了在序列内部就位构造元素的功能。这是对insert元素进行复制或移动的补充。
但是,在的多个重载中insert,只有单个元素插入版本,
即
iterator insert( const_iterator p, T const& x);
iterator insert( const_iterator p, T&& x );
Run Code Online (Sandbox Code Playgroud)
有一个emplace版本,
template< class... Args >
iterator emplace(const_iterator p, Args&&... x);
Run Code Online (Sandbox Code Playgroud)
是否有任何理由不允许n使用来就地构建元素emplace?
虽然像
template< class... Args >
iterator emplace(const_iterator p,size_type n,Args&&... x);
Run Code Online (Sandbox Code Playgroud)
就像相应的 insert
iterator insert(const_iterator p,size_type n,const_reference x);
Run Code Online (Sandbox Code Playgroud)
可能会与其他重载冲突,将构造函数参数用作tuple,或使用一些特殊标记(例如in_place_t可能会消除歧义)。
编辑
建议的功能emplace_n对于vector可能像下面给出的一个行为
template<class... Args>
iterator emplace_n(const_iterator p,size_type n,Args&&... x)
{
size_type const …Run Code Online (Sandbox Code Playgroud) 我试图加载一个包含无限混合元素序列的XML文件(在XSD中的序列中选择)该文件看起来像这样:
<RootNode>
<ElementB>...</ElementB>
<ElementA>...</ElementA>
<ElementA>...</ElementA>
<ElementC>...</ElementC>
<ElementB>...</ElementB>
<ElementA>...</ElementA>
<ElementB>...</ElementB>
</RootNode>
Run Code Online (Sandbox Code Playgroud)
我使用xml.Unmarshal初始化并填充这些结构:
type RootNode struct {
ElementA []ElementA
ElementB []ElementB
ElementC []ElementC
}
type ElementA struct {
}
type ElementB struct {
}
type ElementC struct {
}
Run Code Online (Sandbox Code Playgroud)
我在这里有工作例子http://play.golang.org/p/ajIReJS35F.问题是我需要知道原始序列中元素的索引.通过该描述,此信息将丢失.
有没有办法在同一个数组中加载ElementA,ElementB或ElementC类型的元素?更一般地说,将混合元素列表映射到go结构的最佳方法是什么?
任何人都可以帮我解决我的问题吗?
问题是:
假设1:我们有未定义的子字符串数量(s1,s2,s3,...),每个子字符串是100个数字的序列(整数在20000000和80000000之间),它们是随机选择的.我们对制作此子字符串的数字和子字符串的数量一无所知.这里重要的是子串中数字的顺序而不是它们之间的关系
假设2:我们有一个包含数百万个数字的大而长的字符串,这个长字符串由假设1中提到的子字符串的重复组成.该字符串的名称是"S".
我们简化如下例子:每个子字符串包含四个数字而不是100个数字,每个数字在20到80之间而不是20000000和80000000:我们有"S"字符串,我们的算法必须找到子字符串s1和s2和s3从字符串"S".
S= 71,59,32,51,45,22,53,25,66,72,71,26,32,28,45,72,59,51,53,66,59,51,53,66,59,51,53,66,22,59,51,25,72,32,26,53,28,66,45,72,71,32,45,72,71,32,45,72, ... .
Run Code Online (Sandbox Code Playgroud)
该算法的输出如下:
S1= 59,51,53,66
S2= 22,25,26,28
S3= 71,32,45,72
Run Code Online (Sandbox Code Playgroud)
注意:如果我们幸运的话,子字符串可以在没有组合的情况下以字符串"s"出现,并且一个接一个地重复.
我想要找到子字符串数(s1,s2,s3s,...)的算法,并找到使字符串为"S"的子字符串(s1,s2,s3,...).
非常感谢.
在UML序列图中 - 如果在中途满足条件时流量应该停止,那么如何用备用/可选片段最好地表示它?
即 - 如果不满足停止条件,则继续流动几个步骤.如果备用片段覆盖自停止条件以来的所有步骤,使所有步骤超过备用片段的一部分,或者是否有一个符号来处理小的备用片段内的停止(仅限于条件)?
我想生成一个序列,从上周五到周四结束,如果序列在周六和周日开始,则在前一周的周五结束.也就是说,假设今天是2018-05-09,那么上周五是2018-05-04,如果今天是2018-05-12,那么上周五也是 2018-05-04.所以我写道:
(Date.today, *.earlier(:1day) ... ( *.day-of-week==5 && *.week[1]+1==Date.today.week[1] )).tail # Output: 2018-05-06
Run Code Online (Sandbox Code Playgroud)
但结果2018-05-06却不是2018-05-04.
然后我用了一个Junction:
(Date.today, *.earlier(:1day) ... all( *.day-of-week==5, *.week[1]+1==Date.today.week[1] )).tail # Output: 2018-05-04
Run Code Online (Sandbox Code Playgroud)
为什么&&在第一种情况下是错的?该...经营者说:
右侧将有一个端点,可以是Inf或*表示"无限"列表(其元素仅按需生成),一个表达式将在True时结束序列,或其他元素如Junctions.
&&操作员出了什么问题?