问题列表 - 第40761页

AJAX页面加载但DIV没有扩展以适应其内容

我正在尝试将AJAX内容加载到空,但div不会调整大小到正在加载的内容的大小.相反,它看起来像是与z-index影响重叠空div.

是否有一些关于设置div的指南?

这是我的设置:

我的XHTML:

<div id="wrap">
    <div id="main-content">
        <div id="content-fill">
            <div id="files_left_pane">static content</div>
            <div id="files_right_pane">ajax content</div>
        </div>
    </div>
</div>
Run Code Online (Sandbox Code Playgroud)

我的CSS:

* { padding: 0; margin: 0; }
#wrap {
    position: relative;
    margin: 0 auto;
    width: 955px;
    padding: 0px;
    border-left: 1px solid #BDBDBD;
    border-right: 1px solid #BDBDBD;
    border-bottom: 1px solid #BDBDBD;
}
#content-fill { }
#files_left_pane { float: left; height: 100%; }
#files_left_pane { float: left; height: 100%; }
Run Code Online (Sandbox Code Playgroud)

这是处理AJAX的代码:

    function cabinet_tabs(){

        $(".tab_content").hide(); //Hide all content
        $("#files_left_pane > ul.tabs li:first").addClass("active").show(); //Activate …
Run Code Online (Sandbox Code Playgroud)

ajax jquery

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

Hashmap实现计算每个字符的出现次数

下面的代码是计算每个字符的出现次数,它应该打印计数.但是使用我试过的代码我只得到1我不知道我应该做的改变.请帮我.

import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.HashMap;
import java.util.Map;

class Count_CharMap {
public static void main(String[] args) {
    try
    {
        FileInputStream file = new FileInputStream("D:\\trial.txt");
        DataInputStream dis = new DataInputStream(file);
        BufferedReader br = new BufferedReader(new InputStreamReader(dis));
        String Contents="";
        String str="";

        while ((Contents = br.readLine()) != null) {
            str+=Contents;
        }

        char[]char_array =str.toCharArray();
        int count = 0;
        char ch = char_array[count];
        Map<Character,Integer> charCounter=new HashMap<Character,Integer>();
        for(int i=0;i<str.length();i++)
        {
            if(charCounter.containsKey(char_array[i]))
            {
                charCounter.put(ch, charCounter.get(ch)+1);
            } 
            else
            {
                charCounter.put(ch, 1); …
Run Code Online (Sandbox Code Playgroud)

java collections

9
推荐指数
2
解决办法
5万
查看次数

通过https over http提供CDN内容的优点

所有谷歌的CDN 都通过http s提供.通过https over http服务他们有什么好处吗?

google-cdn

3
推荐指数
2
解决办法
1967
查看次数

复制没有LOCK权限的postgres数据库

我需要将postgres数据库从一个服务器复制到另一个服务器,但我拥有的凭据没有锁定数据库的权限,因此pg_dump失败.我对相关数据库有完整的读/更新/插入权限.

如何制作此数据库的副本?我并不担心不一致(它是开发服务器上的一个小型数据库,因此提取过程中出现不一致的风险很小)

[编辑]完整错误:

$ pg_dump --username=bob mydatabase > /tmp/dump.sql 
pg_dump: SQL command failed 
pg_dump: Error message from server: ERROR:  permission denied for relation sl_node 
pg_dump: The command was: LOCK TABLE _replication.sl_node IN ACCESS SHARE MODE  
Run Code Online (Sandbox Code Playgroud)

database postgresql

29
推荐指数
4
解决办法
4万
查看次数

如何在NSUserDefaults中存储浮动

我想存储一个floatNSUserDefaults.

我还需要检查浮点值是否存在..如果我不需要在其中指定一些值.

并检索它...对于上面我有下面的代码,但它给了我一个错误.

NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];

if ([defaults boolForKey:@"HANDWRITING_SIZE_SLIDER"] == YES) {
  self.sizeSlider.value = 10.0;
} else {
  self.sizeSlider.value = [[NSUserDefaults standardUserDefaults] floatForKey:@"HANDWRITING_SIZE_SLIDER"]];      
}
Run Code Online (Sandbox Code Playgroud)

谢谢你的帮助

iphone objective-c nsuserdefaults iphone-sdk-3.0 ios

3
推荐指数
1
解决办法
2568
查看次数

使用jquery计算空格数?

问题:我需要一个解决方案,通过使用jquery查找list标签内复选框前面的空格数

   <li id='list_id'>
    &nbsp;&nbsp;<input type="checkbox" name="check">good
   </li>
Run Code Online (Sandbox Code Playgroud)

javascript jquery

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

.NET 将配置设置保存到 PerUserRoaming 位置

我有一个带有 Settings.settings 文件的 VS2010 解决方案。用户设置保存到本地设置文件夹,这是一个问题,因为这些设置不会漫游。

目前,设置文件会自动保存到:

Dim config_initial As System.Configuration.Configuration = System.Configuration.ConfigurationManager.OpenExeConfiguration(System.Configuration.ConfigurationUserLevel.PerUserRoamingAndLocal)
Console.WriteLine("Local user config path: {0}", config_initial.FilePath)
Run Code Online (Sandbox Code Playgroud)

( C:\Documents and Settings\%username%\Local Settings\Application Data\%company%\%application%.exe_Url_%hash%\%version%\user.config)

有没有办法将此文件保存到由以下标识的文件路径:

Dim config_new As System.Configuration.Configuration = System.Configuration.ConfigurationManager.OpenExeConfiguration(System.Configuration.ConfigurationUserLevel.PerUserRoaming)
Console.WriteLine("User config path: {0}", config_new.FilePath)
Run Code Online (Sandbox Code Playgroud)

( C:\Documents and Settings\%username%\Application Data\%company%\%application%.exe_Url_%hash%\%version%\user.config)

我只是My.Settings.Save()在应用程序当前终止时使用或自动保存。

.net vb.net configuration-files roaming-profile

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

在jQuery ajax加载或更新后,我丢失了mouseover事件

在使用.load更新我的div后,即将项添加到我的列表中,我使用了firebug并看到列表已更新.但是,我丢失了鼠标悬停事件,该事件在页面首次加载时起作用....在我的脚本中我有:

// hide and show are css classes that display none and block respectively

function openList(){
    $("#miniList").removeClass().addClass("show");
}
function closeList(){
    $("#miniList").removeClass().addClass("hide");
}
...
$(document).ready(function() {
    $("#miniList").mouseover(function() {
        openList();
    })
    $("#miniList").mouseout(function() {
        closeList();
     })
});
Run Code Online (Sandbox Code Playgroud)
function addItemToDiv(id, ref, num) {
    $("#miniList").load("/list/ajax_updateList.jsp", {
        'action' : 'additem',
        'pid' : id,
        'pref' : ref,
        'qty' : num
    });
}
Run Code Online (Sandbox Code Playgroud)

...当然,这在第一次加载页面时工作正常,但是当我将项目添加到列表时,DOM会更新,但鼠标悬停效果不再起作用.

任何想法都受到欢迎.提前谢谢了.

javascript ajax jquery javascript-events

5
推荐指数
1
解决办法
4977
查看次数

为什么<?xml version ="1.0"encoding ="UTF-8"?>不应该放在最顶端?

请通过在HTML页面的最顶部放置以下声明来解释我有什么问题(如果有的话)

<?xml version="1.0" encoding="UTF-8"?>
Run Code Online (Sandbox Code Playgroud)

html xml xhtml utf-8

3
推荐指数
1
解决办法
6177
查看次数

Blob数据类型?

blob数据类型也可以存储视频数据吗?

sqlite iphone ios

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