解决jqplot与jquery-ui导入必要包时的冲突
对于一个网页中,即要有jqplot的画图,又要有jquery-ui的风格显示!
但在导入必要的包时,出现了问题!
先导入jqplot的必要包:
1 <link type="text/css" rel="stylesheet" href="../css/jQuery/jqPlot/jquery.jqplot.min.css" /> 2 <link type="text/css" rel="stylesheet" href="../css/jQuery/jqPlot/syntaxhighlighter/styles/shCoreDefault.min.css" /> 3 <link type="text/css" rel="stylesheet" href="../css/jQuery/jqPlot/syntaxhighlighter/styles/shThemejqPlot.min.css" /> 4 <script type="text/javascript" src="../js/excanvas.js"></script> 5 <script type="text/javascript" src="../js/jQuery/jquery.min.js"></script> 6 <script type="text/javascript" src="../js/jQuery/jqPlot/staticjquery.jqplot.min.js"></script> 7 <script type="text/javascript" src="../js/jQuery/jqPlot/syntaxhighlighter/scripts/shCore.min.js"></script> 8 <script type="text/javascript" src="../js/jQuery/jqPlot/syntaxhighlighter/scripts/shBrushJScript.min.js"></script> 9 <script type="text/javascript" src="../js/jQuery/jqPlot/syntaxhighlighter/scripts/shBrushXml.min.js"></script>
再导入jquery-ui的必要包:
1 <link rel="stylesheet" href="../css/bootstrap.min.css" media="screen"> 2 <link rel="stylesheet" href="../css/cupertino/jquer121y-ui-1.10.3.custom.css" /> 3 <link rel="stylesheet" href="../css/cupertino/button.select.css" /> 4 <script src="../jquery_ui/jquery-1.9.1.js"></script> 5 <script src="../js/jquery-ui-1.10.3.custom.js"></script> 6 <script src="../js/jquery.ui.datepicker-zh-TW.js"></script>
这样子的话能有jquery-ui的样式,会画不出图表,想当然就是jquery-ui的必要包会跟jqplot的必要包起冲突,而进行覆盖!
如果导入jquery-ui的必要包,再导入jqplot的必要时的顺序的话,这样不能有jquery-ui的样式,但却能画出图来!
解决的方法!如下,将必要包进行混合:
1 <link type="text/css" rel="stylesheet" href="../css/jQuery/jqPlot/jquery.jqplot.min.css" /> 2 <link type="text/css" rel="stylesheet" href="../css/jQuery/jqPlot/syntaxhighlighter/styles/shCoreDefault.min.css" /> 3 <link type="text/css" rel="stylesheet" href="../css/jQuery/jqPlot/syntaxhighlighter/styles/shThemejqPlot.min.css" /> 4 <link rel="stylesheet" href="../css/bootstrap.min.css" media="screen"> 5 <link rel="stylesheet" href="../css/cupertino/jquer121y-ui-1.10.3.custom.css" /> 6 <link rel="stylesheet" href="../css/cupertino/button.select.css" /> 7 8 <script src="../jquery_ui/jquery-1.9.1.js"></script> 9 <script src="../js/jquery.ui.datepicker-zh-TW.js"></script> 10 <script type="text/javascript" src="../js/excanvas.js"></script> 11 <script type="text/javascript" src="../js/jQuery/jquery.min.js"></script> 12 <script type="text/javascript" src="../js/jQuery/jqPlot/staticjquery.jqplot.min.js"></script> 13 <script type="text/javascript" src="../js/jQuery/jqPlot/syntaxhighlighter/scripts/shCore.min.js"></script> 14 <script type="text/javascript" src="../js/jQuery/jqPlot/syntaxhighlighter/scripts/shBrushJScript.min.js"></script> 15 <script type="text/javascript" src="../js/jQuery/jqPlot/syntaxhighlighter/scripts/shBrushXml.min.js"></script> 16 <script src="../js/jquery-ui-1.10.3.custom.js"></script>
出现上面这样子将必要包导入时不会出现覆盖的情况,即能有jquery-ui的样式,但却能画出图来!
简单的字母全排列问题—递归法和STL法
问题描述:求全由小写字母组成的不超过200个字符序列的全排列
如输入序列bbjd,排列结果为:
bbdj
bbjd
bdbj
bdjb
bjbd
bjdb
dbbj
dbjb
djbb
jbbd
jbdb
jdbb
方法一:递归法
代码如下:
#include <stdio.h>
int t[200];
char s[200];
int n = 0;
void permutation(int i)
{
int k;
// a~z的ASCII码在97到122之间
for(k = 97; k < 123; k++)
{
if(t[k])
{
t[s[i] = k]--;
permutation(i + 1);
t[k]++;
}
}
// 只有n个字母全部排好了才输出
n - i || puts(s);
}
int main()
{
int i;
puts("Please Input letter sequence: ");
gets(s);
// t[]记录每个字母的出现频率
// n为待排序列的长度
for(i = 0; s[i] != '