小编Dwz*_*wza的帖子

blockui需要jquery v1.2.3或更高版本,您使用的是v.1.11.1

我正在使用更高版本.

所谓的错误是(警报)

blockui requires jquery v1.2.3 or later you are using v.1.11.1
Run Code Online (Sandbox Code Playgroud)

即时通讯不使用wordpress或任何其他类似的程序/应用程序...

所以wordpress的解决方案无济于事.我有一个使用jquery和jquery ui的私人项目......

有谁知道这个问题以及如何解决这个问题?

jquery jquery-ui

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

更改按钮的功能

目前我有一个显示器,我有一个按钮START,点击此按钮,计时器启动,它被2个按钮取代.这两个按钮是提交和走开.在提交每个按钮时,运行一个脚本.点击提交按钮,启动test.php.

一切都很好,但我无法做出很少的改变

第一

我希望结合开始和提交按钮,即

a)点击开始按钮,计时器应该开始,

b)应该出现2个新按钮

c)脚本test.php应该运行.

如果我可以改变开始按钮的文本提交并保持按钮相同并点击开始按钮运行上述3个功能,那将是很好的,但是也欢迎不同的方面

第二

当计时器的时间到达0:00时,它应该重置到其初始阶段,按钮也应该变为其原始状态,即

a)2个按钮应该消失并被开始按钮取代

b)时钟应显示其初始值,即2:00

js代码的一部分.整个代码@fiddle

/*******Code for the three buttons*********/
$(document).ready(function (){
        $("#startClock").click(function (){
                $("#startClock").fadeOut(function(){
$("#walkaway").fadeIn().delay(120000).fadeOut();
$("#submitamt").fadeIn().delay(120000).fadeOut(function(){
        $("#startClock").fadeIn();
        });
    })
});
});

/*******Code for running test.php script*********/
$(document).ready(function(){
$('#submitamt').click(function(){
    var txtbox = $('#txt').val();
    var hiddenTxt = $('#hidden').val();

        $.ajax({
            type:'post',
             url:'test.php',
            data:{txt:txtbox,hidden:hiddenTxt},
            cache:false,
            success: function(returndata){
                $('#proddisplay').html(returndata);
                console.log(returndata)
            }
        });
})
})

/*******Code for starting the clock*********/
$('#startClock').click(function () {
    var counter = 120;
    setInterval(function () {
        counter--;
        if (counter >= 0) { …
Run Code Online (Sandbox Code Playgroud)

html javascript jquery javascript-events

9
推荐指数
1
解决办法
120
查看次数

例如按钮的 Google Sheets 脚本参数

是否可以在签名脚本上传递参数?

我有一个电子表格,并为每个电子表格制作了几个签名功能的按钮。

示例函数:

function foo(){
    return "bar";
}
Run Code Online (Sandbox Code Playgroud)

在单元格上调用此函数

=foo()
Run Code Online (Sandbox Code Playgroud)

返回我bar,将此函数签名到按钮

foo
Run Code Online (Sandbox Code Playgroud)

什么也没返回给我,但它当然有效。我的意思是脚本无法将字符串返回到图像(实际上是我的按钮)。无论如何...

带参数的示例函数:

=foo()
Run Code Online (Sandbox Code Playgroud)

在单元格中调用脚本

foo
Run Code Online (Sandbox Code Playgroud)

hello world按预期返回我

将此签名到我的按钮

function foo(bar){
    return bar;
}
Run Code Online (Sandbox Code Playgroud)

导致错误,因为按钮找不到脚本。他正在搜索一个函数名称foo('hello world'),但(...)与该函数无关。

那么签名脚本时如何传递参数呢?

目前我有 26 个函数(全部相同,只有 1 个参数变化)来解决这个问题。但是通过传递参数,我可以使用 2 个函数而不是 26 个函数来完成所有这些操作。

excel spreadsheet google-sheets google-sheets-api

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

jquery,使用类定义添加div

所以我在这里看到如何添加一个div,在这里如何添加一个类,但我在组合这两个时遇到了麻烦.我想在div sparkLineContainer中生成一大堆具有特定类和id的div.

我有包含div

<div id="#sparkLineContainer"></div>
Run Code Online (Sandbox Code Playgroud)

我想在其中添加一堆以下内容

    <div id="#sparkLineContainer">
        <div class="sparkLines" id="id1">Some stuff here</div>
        <div class="sparkLines" id="id2">Some stuff here</div>
        <div class="sparkLines" id="id3">Some stuff here</div>
// and so on
    </div>
Run Code Online (Sandbox Code Playgroud)

片段 - 我没有走得很远,我很难过

$('#sparkContainer').add("div");  \\ How do I add the id and class to this div?
                                  \\ And as a repeat the function will it overwrite this?
Run Code Online (Sandbox Code Playgroud)

我试图用这个功能.

function renderSparklines (array1, sparkLineName, id) {
// array1 is the data for the spark line
// sparkLineName is the name …
Run Code Online (Sandbox Code Playgroud)

html javascript jquery add

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

划分为箭头形状

是否有可能像箭一样塑造div?

我已经看到了这一点,但在大多数页面中,它都是用几个div构建的,我只想使用一个.

形状应该看起来像

 ______________
|              \
|______________/
Run Code Online (Sandbox Code Playgroud)

我用一些样品尝试了一点点,但我无法让它成为我想要的形状.正如您所看到的,可以构建更加困难的形状.

谁知道如何实现这一目标?

html css css3 css-shapes

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

获得第一个Smarty Array-Element

我怎样才能获得第一个智能数组元素?

其实我知道怎么做...但我有以下问题.

我得到一个看起来像这样的数组

[DATA] => Array
        (
            [12] => Array
                (
                    [content] => foobar
                )

            [1] => Array
                (
                    [content] =>  
                )

            [2] => Array
                (
                    [content] =>  
                )

            [3] => Array
                (
                    [content] =>  
                )

 //this is a snipit of {$myVar|@print_r}
Run Code Online (Sandbox Code Playgroud)

这一直持续到 [11]

由于某种原因,没有[0][12]在这个位置.

我不知道这是否总是12,但我知道它总是在第一个位置.

我不能对这个数组进行排序,因为有另一个数组具有相同的排序顺序,我必须保留此顺序以便以后输出.

有没有办法选择第一个元素而不使用array[0]array.0

信息:我正在开发的项目使用Smarty 2

编辑

  • 如果我知道如何:)我会重新索引数组:)

由于现在几个小时后回答,我临时解决了我的问题.

为了解决这个问题,我{php}在smarty中打开,得到了我需要的数组,将它分成两个数组(当然重新索引它们就这样开始0).比我0 从每个数组临时保存pos 到临时数组.0用下划线(_)覆盖orig ,0然后将它们多重排序,将原始值放回并将它们传递回$this->_tpl_vars非常复杂的方式.(全部在tpl内)

{php}
    // get …
Run Code Online (Sandbox Code Playgroud)

arrays smarty smarty2

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

如何使用 Inno Setup 将十六进制数据添加到注册表中?

我想知道当我想将十六进制数据添加到注册表中时我必须写什么?

我有

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\FOOBAR]
"Type"=dword:00000110
"ImagePath"=hex(2):43,00,3a,00,5c,00,73,00,64,00,69,00,62,00,61,00,73,00,65,00,\
 5c,00,64,00,62,00,6e,00,74,00,35,00,73,00,76,00,2e,00,65,00,78,00,65,00,00,\
 00
Run Code Online (Sandbox Code Playgroud)

我想通过我的 Inno-Script 将其添加到注册表中。

第一个值很简单......

Root: "HKLM"; Subkey: "SYSTEM\CurrentControlSet\Services\FOOBAR"; ValueType: dword; ValueName: "Type"; ValueData: "00000110"
Run Code Online (Sandbox Code Playgroud)

但是十六进制部分是什么?我找不到类似的东西,HEXDWORD是否意味着如果我有这样的数据,我必须进行一些转换?

我有第二个类似的值,但实际上它似乎不同,因为有hex:...和没有hex(2):...

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Centura SQLBase\Security]
"Security"=hex:01,00,14,80,b8,00,00,00,c4,00,00,00,14,00,00,00,30,00,00,00,02,\
 00,1c,00,01,00,00,00,02,80,14,00,ff,01,0f,00,01,01,00,00,00,00,00,01,00,00,\
 00,00,02,00,88,00,06,00,00,00,00,00,14,00,fd,01,02,00,01,01,00,00,00,00,00,\
 05,12,00,00,00,00,00,18,00,ff,01,0f,00,01,02,00,00,00,00,00,05,20,00,00,00,\
 20,02,00,00,00,00,14,00,8d,01,02,00,01,01,00,00,00,00,00,05,04,00,00,00,00,\
 00,14,00,8d,01,02,00,01,01,00,00,00,00,00,05,06,00,00,00,00,00,14,00,00,01,\
 00,00,01,01,00,00,00,00,00,05,0b,00,00,00,00,00,18,00,ff,01,0f,00,01,02,00,\
 00,00,00,00,05,20,00,00,00,25,02,00,00,01,01,00,00,00,00,00,05,12,00,00,00,\
 01,01,00,00,00,00,00,05,12,00,00,00
Run Code Online (Sandbox Code Playgroud)

inno-setup

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

将删除按钮添加到附加元素

我的代码附在下面.

$('#aprod').on('click', function() {
    $('#ln1').clone().appendTo('#page3_inside');
    prodnum = prodnum + 1;
    $('#conf_prodnum').val(prodnum);
});

$('body').on('click', '.del', function() {
 	$(this).closest('tr').remove();
});
Run Code Online (Sandbox Code Playgroud)
<html>
<head>
    <meta name="generator"
    content="HTML Tidy for HTML5 (experimental) for Windows https://github.com/w3c/tidy-html5/tree/c63cc39" />
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
    <title></title>
</head>
<body>
    <form>
        <input type='button' value='Add Another Product' id='aprod' />
    </form>
    <table id='page3_inside'>
        <tr id='ln1'>
            <td>
                <label for="product_name">Product Name</label>
                <br />
                <select class='input name_of_product' style='width:150px; height:34px;' name="name_of_product[]">
                    <option value="">Select from List</option>
                </select>
            </td>
            <td>
                <label for="product_cat">Product Category</label>
                <br />
                <input type='text' class="input product_category" name="product_category[]"
                style="font-family:verdana; width:150px; …
Run Code Online (Sandbox Code Playgroud)

html javascript jquery

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

c#将方法限制为其他方法

我有一个包含几种方法的类,例如:

class mySqlTool{

    private string _values, _table, _condition, _result;

    public mySqlTool Select(string values = null){
        //this is REQUIRED
        _values = string.Format("select {0} ", values);
        return this;
    }

    public mySqlTool Update(string table){
        //this is REQUIRED
        _table = table;
        return this;
    }

    public mySqlTool Set(string name, String value){
        //this is REQUIRED
        //handle name and value
        return this;
    }

    public mySqlTool From(string table = null){
        //this is REQUIRED
        _table = table;
        return this;
    }
    public mySqlTool Where(string condition = null){
        //this is OPTIONAL …
Run Code Online (Sandbox Code Playgroud)

c# method-chaining chaining

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

Symfony 4:Dotenv :: populate返回none

我正在尝试在生产中运行Symfony4应用程序,我收到以下错误:

Uncaught TypeError: Return value of Symfony\\Component\\Dotenv\\Dotenv::populate() 
must be an instance of Symfony\\Component\\Dotenv\\void, 
none returned in /var/www/html/vendor/symfony/dotenv/Dotenv.php:95
Stack trace:
#0 /var/www/html/vendor/symfony/dotenv/Dotenv.php(57): 
    Symfony\\Component\\Dotenv\\Dotenv->populate(Array)
#1 /var/www/html/public/index.php(12): 
    Symfony\\Component\\Dotenv\\Dotenv->load('/var/www/html/s...')
#2 {main}
    thrown in /var/www/html/vendor/symfony/dotenv/Dotenv.php on line 95
Run Code Online (Sandbox Code Playgroud)

在本地,该应用程序运行正常.一旦它转移到生产,它就会破裂.

知道为什么会这样吗?

symfony symfony4

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