小编And*_*son的帖子

Div高度100%格式化问题

我试图让侧边栏填充标题和脚之间的高度.正如你所看到的那样,它会落​​后于页脚.我希望它停在页脚的顶部.任何帮助都会很棒!

演示:http://www.jsfiddle.net/pEbhK/

HTML:

<div class="header">
        <h2>Development Area</h2>
</div>
<div class="sidebar">
        <h2>Current Projects</h2>
    <ul>
        <li>iCalendar</li>
        <li>MyBand - Student Center</li>
    </ul>
        <h2>Future Projects</h2>
    <ul>
        <li>Mobile Application</li>
        <li>RSS Feed</li>
    </ul>
</div>
<div class="clear"></div>
<div class="footer">&copy; 2013</div>
Run Code Online (Sandbox Code Playgroud)

CSS:

html, body, h1, h2 {
    margin:0px;
    padding:0px;
}
.clear {
    clear:both;
}
.header {
    display:inline-block;
    width:100%;
    background:#ABBFF2;
    height:100px;
    border-bottom: 5px solid #7F9DEB;
    text-align:center;
}
.header h2 {
    padding-top:38px;
}
.sidebar {
    position: fixed;
    height:100%;
    width:250px;
    background:#ABBFF2;
    border-right:5px solid #7F9DEB;
    float:left;
}
.sidebar h2 …
Run Code Online (Sandbox Code Playgroud)

html css3

2
推荐指数
1
解决办法
105
查看次数

MySql查询无法正常工作

我正在尝试查询数据库以仅选择show = 0的记录

这是我的查询,但它为show列返回0和1

SELECT * FROM menu WHERE 'SHOW' = 0;
Run Code Online (Sandbox Code Playgroud)

表结构:

Table: menu
Columns:
  id    int(2) AI PK
  url   text
  name  text
  title text
  show  int(1)
Run Code Online (Sandbox Code Playgroud)

表中的数据

| id |     url     | name | title | show |
------------------------------------------
| 1  | /index.php  | Home | Home  | 0    |
| 2  | /index2.php | Home | Home2 | 1    |
Run Code Online (Sandbox Code Playgroud)

mysql database

2
推荐指数
1
解决办法
40
查看次数

ColdFusion Script传递2个变量

我试图在ColdFusion函数中返回两个变量.

我知道你可以使用&符号在C++中做到这一点.

我的代码:

<cfscript>

function browserDetect(browser,version) {

      browser="some value string";
      version="some other value string";
}
</cfscript>
Run Code Online (Sandbox Code Playgroud)

其他页面:

<cfoutput>#BrowserName# and #BrowserVer#</cfoutput>
Run Code Online (Sandbox Code Playgroud)

coldfusion coldfusion-10

0
推荐指数
1
解决办法
207
查看次数

复制构造函数出错

我的程序在尝试为我的阵列分配新内存时保持染色.通过调用添加单词功能.任何帮助都会很棒!

完整代码下载@ http://www.johnsoncomputertechnologies.org/pgm2demo.zip

#include <iomanip>    //Standard IO Manipulators Library
#include <algorithm>
#include <iostream>   //Standard input/output library
#include <string>     //Standard string Library
#include <cassert>    //Error handeling Library
#include "pgm2.h"
using namespace std;
    dictionary::dictionary()
    {
        wordptr = new value_type[DICTONARY_CAPACITY];
        deffptr = new value_type[DICTONARY_CAPACITY];
        used = 0;
    }

    dictionary::dictionary(const dictionary& other)
    {
        value_type *wordptr;
        value_type *deffptr;
        wordptr = new value_type[other.capacity];
        deffptr = new value_type[other.capacity];
        used = other.used;
        capacity = other.capacity + 1;
        copy(wordptr, other.wordptr + used, other.wordptr);
        copy(deffptr, other.deffptr + used, other.deffptr);

    } …
Run Code Online (Sandbox Code Playgroud)

c++ memory-management copy-constructor

-1
推荐指数
1
解决办法
75
查看次数