小编Mic*_* LB的帖子

如何修复错误; '错误:Bootstrap工具提示需要Tether(http://github.hubspot.com/tether/)'

我正在使用Bootstrap V4,并在控制台中记录以下错误;

错误:Bootstrap工具提示需要Tether(http://github.hubspot.com/tether/)

我试图通过安装Tether删除错误,但它没有奏效.我通过包含以下代码行'安装'Tether;

<link rel="stylesheet" href="http://www.atlasestateagents.co.uk/css/tether.min.css">
<script src="http://www.atlasestateagents.co.uk/javascript/tether.min.js"></script>
Run Code Online (Sandbox Code Playgroud)

我是否正确安装了系绳?

任何人都可以帮我删除此错误?

如果您希望在我的网站上查看错误,请单击此处并加载您的控制台.

javascript twitter-bootstrap tether bootstrap-4

175
推荐指数
9
解决办法
16万
查看次数

PHP中的负(负)零等于0?

我有一个非常基本的MySQL查询,它从数据库表中读取行,并将行值添加或减去定义为$ total_balance的PHP字符串.

例如;

$statement_details_query = mysqli_query($con,"SELECT transaction_nominal_code, SUM(transaction_debit) as TotalDebit, SUM(transaction_credit) as TotalCredit FROM accounts_transaction GROUP BY transaction_nominal_code") or die(mysql_error());

while($statement_details = mysqli_fetch_array( $statement_details_query )) {

$balance = $statement_details['TotalCredit'] - $statement_details['TotalDebit'];

$total_balance = $total_balance + $balance;

}

echo number_format($total_balance, 2, '.', ',');
Run Code Online (Sandbox Code Playgroud)

我的问题是,-0和0之间有什么区别?

php mysql

10
推荐指数
1
解决办法
3314
查看次数

如何使用PHP和MySQL从两个有条件链接的表中有效地SUM和SUBTRACT

对于以下查询是否有更有效的解决方案.我尽力研究这个话题,但很难知道实际搜索的内容......

$tenant_balance = 0;

$total_charge_amount_query = mysqli_query($con, "
    SELECT  tenant_charge_id, tenant_charge_total_amount
        FROM  accounts_tenant_charge
        WHERE  tenant_charge_tenancy_id='{$tenancy_details['tenancy_id']}'"
     ) or die(mysql_error());  

while($total_charge_amount_row = mysqli_fetch_array( $total_charge_amount_query )) {

    $tenant_balance = $tenant_balance +  $total_charge_amount_row['tenant_charge_total_amount'];

    $total_payment_amount_query = mysqli_query($con, "
        SELECT  tenant_charge_payment_amount
            FROM  accounts_tenant_charge_payment
            WHERE  tenant_charge_payment_tenant_charge_id =
                    '{$total_charge_amount_row['tenant_charge_id']}"
                 ) or die(mysql_error());

    while($total_payment_amount_row = mysqli_fetch_array( $total_payment_amount_query )) {

        $tenant_balance = $tenant_balance - $total_payment_amount_row['tenant_charge_payment_amount'];

    }
}

echo '&pound;' . number_format($tenant_balance, 2, '.', ',');
Run Code Online (Sandbox Code Playgroud)

我在下面添加了数据库表结构和一些数据.

表格1

-- phpMyAdmin SQL Dump
-- version 4.0.10.7
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- …
Run Code Online (Sandbox Code Playgroud)

php mysql performance

6
推荐指数
1
解决办法
784
查看次数

使用Bootstrap v4将按钮对齐到"卡"的右侧

我是Bootstrap的新手,并且认为我会使用他们的v4 alpha版本.

我正在尝试将以下示例中的"安排评估"按钮(靠近页面底部)对齐到右侧,同时将其他文本对齐到左侧.我还需要文本和按钮在中间垂直对齐.

http://www.atlasestateagents.co.uk/mlb/landlords/services-and-fees.php

你能帮我吗?

<div class="card card-block card-blue clearfix">
    <p class="card-text">Want to know how much rent you could achieve for your property?&nbsp;<a href="#" class="btn btn-blue-outline pull-right">Arrange a Valuation</a></p>
  </div>
Run Code Online (Sandbox Code Playgroud)

html css twitter-bootstrap twitter-bootstrap-4 bootstrap-4

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

如何使用jQuery/Javascript将0.0099999999999909舍入到0.01?

var figure = 0.0099999999999909;
alert(figure.toFixed(2));
Run Code Online (Sandbox Code Playgroud)

我读过这篇文章,但我仍然被困住了.

有没有办法使用jQuery/Javascript将0.0099999999999909舍入到0.01?

我在代码片段上的示例实际上有效,但它不在我的实际代码中;

// allocate button

$( "#allocate_total_amount_paid" ).click(function() {
    var totalAmountPaid = parseFloat($("#total_amount_paid").val());
    $( ".amount_received" ).each(function( index ) {
        var thisAmount = $(this).attr("max");
        if (thisAmount <= totalAmountPaid) {
            // If we have enough for this payment, pay it in full
            $(this).val(thisAmount).trigger('input');
            // and then subtract from the total payment
            totalAmountPaid -= thisAmount;
        } else {
            // We don't have enough, so just pay what we have available
            $(this).val(totalAmountPaid).trigger('input');
            // Now we have …
Run Code Online (Sandbox Code Playgroud)

javascript jquery rounding

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

如何格式化英国银行的分类代码?

作为表格的一部分,我收集了用户的银行详细信息,其中包括他们的分类代码。例如,分类代码以六个数字存储在数据库中771731

我更喜欢以这种格式(不带连字符)存储排序代码,因为它使我可以更轻松地在网站的其他区域使用。我想在网站的一个区域中输出排序代码,但77-17-31使用PHP 格式输出。

我已经在Google上搜索了解决方案,但令人惊讶的是,发现的很少。

php format bank

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