小编use*_*331的帖子

jQuery关闭悬停?

我在这里有此代码:

$('.fa').hover(function(){
    $('#hiddenStuff').show();    
});
Run Code Online (Sandbox Code Playgroud)

当用户将鼠标悬停在该元素上时,会出现另一个元素,当您将鼠标悬停在.fa元素上时,如何使该元素消失?

jquery

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

Swift 将 JSON 解析为模型对象

我在这里有这个方法,它完全按照我的需要返回我的数据:

func getTestData() -> [Any]?
    {
        return [GradingData(lot: "lot", andColumns: "andColumns", SLAIssuedFinalGrading: true, SLAIssuedFinalGradingDate: "SLAIssuedFinalGradingDate", CityApprovalIssued: true, CityCommentReceived: false, GradingRepair: "GradingRepair", CurbStopRepair: "CurbStopRepair", SplashPadDownSpout: "SplashPadDownSpout", RYCBOtherRepairs: "RYCBOtherRepairs", Comments: "Comments", columnCamera: "", DepositReceived: false), GradingData(lot: "lot", andColumns: "andColumns2", SLAIssuedFinalGrading: false, SLAIssuedFinalGradingDate: "SLAIssuedFinalGradingDate", CityApprovalIssued: false, CityCommentReceived: false, GradingRepair: "GradingRepair", CurbStopRepair: "CurbStopRepair", SplashPadDownSpout: "SplashPadDownSpout", RYCBOtherRepairs: "RYCBOtherRepairs", Comments: "Comments", columnCamera: "", DepositReceived: false)]
    }
Run Code Online (Sandbox Code Playgroud)

现在我正在尝试调用 API 并返回完全相同的结构:

func GetLandGradingData(_ community: String, completion: @escaping (_ result: [GradingData]) -> Void)
    {

        let escapedCommunity = community.addingPercentEncoding(withAllowedCharacters: CharacterSet.urlQueryAllowed) …
Run Code Online (Sandbox Code Playgroud)

parsing json ios swift

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

Bootstrap 在桌子上冻结头

我试图冻结我的 html 表 (thead) 中的第一行,但是当我尝试以下 CSS 代码时:

table {
    width: 100% !important;
}

thead, tbody {
    display: block;
}

tr:after {
    content: ' ';
    display: block;
    visibility: hidden;
    clear: both;
}

thead th {
    height: 30px;
}

tbody {
    height: 500px;
    overflow-y: auto;
}
Run Code Online (Sandbox Code Playgroud)

thead 与 tbody 的大小不同。tbody 是可滚动的,thead 处于固定位置,但不一样,tr 聚集在一起。这是我的 HTML:

<table id="MVCGridTable_Grid" class="table table-striped table-bordered">
    <thead>
        <tr>
            <th>aaa</th>
            <th>aaa</th>
            <th>aaa</th>
            <th>aaa</th>
            <th>aaa</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>
                aaa
            </td>
            <td>
                aaa
            </td>
            <td>
                aaa
            </td>
            <td>
                aaa
            </td> …
Run Code Online (Sandbox Code Playgroud)

html css twitter-bootstrap

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

MySQL Insert语句未执行

我试图像这样运行mySQL插入语句:

function insertAppointment($connection, $id, $firstname, $lastname, $email, $phone, $date, $time){

                $sql = "INSERT INTO `appointments` (firstname, lastname, email, phone, app_date, app_time) VALUES ('" . $id . "', '" . $firstname . "', '" . $lastname . "', '" . $email . "', " . $date . ", " . $time . ")";
                $connection->query($sql);

        }
Run Code Online (Sandbox Code Playgroud)

$ connection是我的连接字符串,这不是问题.我可以将它用于select语句,如下所示:

function getTakenDates($connection){

                $query = mysqli_query($connection, "SELECT app_date, app_time FROM `appointments`");
                $results = array();
                while($row = mysqli_fetch_assoc($query)){
                        $results[] = $row;
                }
                return $results;

        }
Run Code Online (Sandbox Code Playgroud)

php mysql

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

ASP.NET 将项目添加到数组

我定义了这个数组:

string[] emailAddress = {};
Run Code Online (Sandbox Code Playgroud)

我想做的是将项目添加到这个数组中,如下所示:

emailAddress[] = de.Properties["mail"][0].ToString();
Run Code Online (Sandbox Code Playgroud)

我收到无法将字符串转换为数组错误。如何将项目添加到数组中?

c# asp.net

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

C# double 值返回 NaN

我在这里有这个代码:

public double ProgressBar
{
    get
    {
        return ((double)Completed / Progress);
    }
}
Run Code Online (Sandbox Code Playgroud)

但是当两个值(已完成和进度)都为 0 时,它总是返回 NaN。

我也试过:

public double ProgressBar
{
    get
    {
        return ((double)Completed / (double)Progress);
    }
}
Run Code Online (Sandbox Code Playgroud)

相同的结果 NaN

我究竟做错了什么?

c#

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

ASP.NET将项添加到列表中

我正在尝试将项目添加到列表中:

List<string> newList = new List<string>();
foreach (var x in dbTimeSlots.Data)
{
    newList.Add(x.id.ToString());
    newList.Add(x.timeSlot + " - " + x.dateSlot);
}
Run Code Online (Sandbox Code Playgroud)

然而,当我只有40时,我的列表返回80个项目,这是因为id将是一个项目,时间和日期将是另一个项目,我需要它们作为一行,但每行应该有一个id对象和日期和时间对象.我希望这有道理,请帮助!!!!

c# asp.net

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

标签 统计

c# ×3

asp.net ×2

css ×1

html ×1

ios ×1

jquery ×1

json ×1

mysql ×1

parsing ×1

php ×1

swift ×1

twitter-bootstrap ×1