小编Dev*_*ate的帖子

最古老的记录差异?

我试图确定表中最早的记录,结果却有矛盾.

场景1

SELECT TOP 10 * FROM Ens_Util.Log ORDER BY TimeLogged ASC

SELECT TOP 10 text, TimeLogged, TraceCat, Type FROM Ens_Util.Log ORDER BY TimeLogged ASC

Text                            TimeLogged          TraceCat    Type
Email sent via mailserv:25      2016-05-08 01:00:01 (null)      4
[Requested record not found]    2016-05-08 01:01:13 (null)      2
[Requested record not found]    2016-05-08 01:04:39 (null)      2
[Requested record not found]    2016-05-08 01:04:53 (null)      2
[Requested record not found]    2016-05-08 01:05:22 (null)      2
[Requested record not found]    2016-05-08 01:05:45 (null)      2
[Requested record not …
Run Code Online (Sandbox Code Playgroud)

sql intersystems-cache

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

为什么这个调用getQuery不起作用?什么是修复?

/search.aspx?Search=test

function getQuery(name) {
    var match = RegExp('[?&]' + name + '=([^&]*)').exec(window.location.search);
    return match && decodeURIComponent(match[1].replace(/\+/g, ' '));
};


if (getQuery('SearchType') == '') {
   $("#txtSearch").val(getQuery('Search'));
};
Run Code Online (Sandbox Code Playgroud)

如果我省略if语句并只设置文本框的值它工作正常,所以我显然知道我的getQuery函数正在工作.这显然与SearchType不是'的事实有关,它不是什么.我试过"if(getQuery('SearchType'))但是这也不起作用.

必须是一个简单的答案...总有我的问题:)

jquery query-string

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

nth-child(单数)没有按预期工作

为什么我使用时每一行都有红色背景nth-child(odd)

<div id="ClientTable">
    <div class="ClientTableHeaderRow"><span class="ClientTableHeaderColumn">Full Name</span></div>
    <div class="ClientTableRow"><span class="ClientName">Umpa Beeson</span></div>
    <div class="ClientTableRow"><span class="ClientName">Umpa Beeson</span></div>
    <div class="ClientTableRow"><span class="ClientName">Umpa Beeson</span></div>
    <div class="ClientTableRow"><span class="ClientName">Umpa Beeson</span></div>
</div>?
Run Code Online (Sandbox Code Playgroud)
#ClientTable    {position: relative;
                 display: table;
                 margin-top: 20px;
                 width: 100%;}

#ClientTable:nth-child(odd) {background-color:#FF0000;}                 

.ClientTableHeaderRow, .ClientTableRow {display: table-row; }
.ClientTableHeaderRow {font-weight: bold;}
.ClientTableHeaderRow span, .ClientTableRow span {display: table-cell;}?
Run Code Online (Sandbox Code Playgroud)

查看jsFiddle

预期结果是每隔一行为红色.相反,正如您所看到的,每一行都是红色的.
PS Umpa是我的猫.

css css-selectors css3

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

用变量调用script_execute

我正在使用GameMaker:Studio Pro并尝试执行存储在变量中的脚本,如下所示:

script = close_dialog;
script_execute(script);
Run Code Online (Sandbox Code Playgroud)

它不起作用.它显然正在寻找一个名为"script"的脚本.谁知道我怎么能做到这一点?

gml game-maker

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

除了ID和时间戳之外,所有字段都相同时获取第一条记录?

这是我目前的查询:

SELECT  TOP 6 *
FROM    HS_IHE_ATNA_Repository.Aggregation
WHERE   EventType = 'Retrieve Document Set'
Run Code Online (Sandbox Code Playgroud)

它返回看起来类似于此的数据:

ID     TimeStamp    tid    Fruit      Color       User     EventType
1      12:30:31     001    Apple      Red         Paul     Retrieve Document Set
2      12:30:32     001    Apple      Red         Paul     Retrieve Document Set
3      12:31:03     002    Orange     Orange      Steve    Retrieve Document Set
4      12:31:04     002    Orange     Orange      Steve    Retrieve Document Set
5      12:34:12     003    Banana     Yellow      Paul     Retrieve Document Set
6      12:34:13     003    Banana     Yellow      Paul     Retrieve Document Set
Run Code Online (Sandbox Code Playgroud)

我希望我的查询只返回记录1,3和5.基本上,所有东西都有一个独特的tid.我怎样才能做到这一点?

sql intersystems-cache

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

Jqueryui对话框"resizeable:false"不起作用?

以下是我的代码.当它打开模态时,即使它被设置为false,它也可以调整大小.这不是预期的.所有其他参数按预期工作(高度,宽度,位置,可拖动,模态).

    //MODAL IFRAME POPUP FOR EDITS/adds
    $("#modalDiv").dialog({
        modal: true,
        autoOpen: false,
        height: '400',
        width: '400',
        position: ['150','200'],
        draggable: true,
        resizeable: false,
        title: ''
    });

    //catch a click on an item with the class "add" open modal div.
    $('.add').live('click', function () {
        var thing = $(this).attr('add')
        url = 'add/' + thing + '.aspx?appid=' + $('.lblAppID').html();
        $('#modalIFrame').attr('src', url);
        $('#modalDiv').dialog('open');
        return false;
    });
Run Code Online (Sandbox Code Playgroud)

但是,如果我从模态iframe中调用以下代码,则会使其无法实现(如预期的那样).

window.parent.$("#modalDiv").dialog("option", "resizable", false);
Run Code Online (Sandbox Code Playgroud)

这很有效,但最好是我想知道我错过了什么......我确信这是愚蠢的.救命?

javascript jquery jquery-ui

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

循环嵌套聚合物元素?

据我在这里这里的文档中所知,以下内容应该是正确的.但它不起作用.我没有错.我的页面只是说"测试测试"(你会在代码中看到原因).怎么了?

注意我在一个博客条目中直接使用core-ajax工作正常,所以我知道我的数据很好等

slog-entry.html 这是我的演示博客应用中每个条目的元素

<link rel="import" href="../polymer/polymer.html">
<link href="../core-ajax/core-ajax.html" rel="import">

<polymer-element name="slog-entry" noscript>
    <template>
        <h1>{{entry.Title}}</h1>
        <p>{{entry.Text}}</p>
        <span>{{entry.timestamp}}</span>
    </template>
</polymer-element>
Run Code Online (Sandbox Code Playgroud)

slog-entries.html 这是我博客应用中条目集合的元素

<link rel="import" href="../polymer/polymer.html">
<link href="../slog-entry/slog-entry.html" rel="import">
<polymer-element name="slog-entries" noscript>
    <template>
        <core-ajax auto
                   url="https://<server>/entries.json"
                   response="{{entries}}">
        </core-ajax>
        test
        <template repeat="{{entry in entries}}">
            <slog-entry bind="{{entry}}"></slog-entry>
        </template>
    </template>
</polymer-element>
Run Code Online (Sandbox Code Playgroud)

slog.html 这是索引

<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>Status Log 0.1b</title>
    <script src="templates/platform/platform.js"></script>
    <link href="templates/slog-entries/slog-entries.html" rel="import">
    <link href="templates/polymer/polymer.html" rel="import">
</head>
<body>
test
    <slog-entries></slog-entries>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)

更新以下是DOM的样子:

在此输入图像描述

polymer

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

禁用和启用计时器会导致第二个实例?

我在窗体上有一个启动和停止按钮,用于启动和停止重复的SQL查询,该查询将数据发送到pubnub通道.当我启动表单并单击开始时,我看到了我对订阅客户端的期望.但是,如果我单击停止然后再次启动,我现在会获得重复数据.第三次给我三份数据,等等.是什么导致了这个?以下是启动和停止方法:

private void btnQuery1Start_Click(object sender, EventArgs e)
{

    lblQuery1Status.Text = "Status: Running";
    btnQuery1Start.Enabled = false;
    txtQuery1Interval.Enabled = false;
    btnQuery1Stop.Enabled = true;
    query1Timer.Elapsed += new ElapsedEventHandler(doQuery1);
    query1Timer.Interval = Convert.ToInt32(txtQuery1Interval.Text) * 1000;
    query1Timer.Enabled = true;

}
private void btnQuery1Stop_Click(object sender, EventArgs e)
{
    btnQuery1Start.Enabled = true;
    btnQuery1Stop.Enabled = false;
    txtQuery1Interval.Enabled = true;
    query1Timer.Enabled = false;
    lblQuery1Status.Text = "Status: Stopped";
}
Run Code Online (Sandbox Code Playgroud)

我可以发布,doQuery1如果有必要,但它使用OdbcConnection和数据读取器获得单个整数结果然后它序列化Newtonsoft.Json并使用它发送Pubnub.publish().我希望尽管这是显而易见的,我只是在btnQuery1Start_Click()上面的方法中遗漏了.

c# timer

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

setTimeout阻塞问题

我在写了一篇"生命游戏" .我在一个名为的函数中完成了所有逻辑doGeneration().我可以从控制台反复调用它,一切都按计划进行,但是,如果我把它放在while循环中,执行会阻止UI,我只看到最终结果(最终).

while (existence) {
    doGeneration();
}
Run Code Online (Sandbox Code Playgroud)

如果我添加一个setTimeout(),即使是15的生成限制,浏览器实际上也会崩溃(Canary,Chrome).

while (existence) {
    setTimeout(function() {
        doGeneration();
    },100);
}
Run Code Online (Sandbox Code Playgroud)

如何在doGeneration()不阻止DOM/UI的情况下每隔一秒左右调用一次?

javascript jquery conways-game-of-life

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

adb logcat,只显示自定义日志事件?

我正在使用adb logcat -s Unity从我的Android版本查看日志输出.但是,我得到了许多我并不总是需要的东西:

08-10 15:53:25.956 17278 17297 D Unity   : Sensor :        Accelerometer ( 1) ; 0.002394 / 0.00s ; BMI160 accelerometer / Bosch
08-10 15:53:25.960 17278 17297 D Unity   : Choreographer available: Enabling VSYNC timing
08-10 15:53:26.133 17278 17297 I Unity   : Launching UI...
08-10 15:53:26.133 17278 17297 I Unity   : UnityEngine.DebugLogHandler:Internal_Log(LogType, String, Object)
08-10 15:53:26.133 17278 17297 I Unity   : UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
08-10 15:53:26.133 17278 17297 I Unity   : UnityEngine.Logger:Log(LogType, Object)
08-10 15:53:26.133 …
Run Code Online (Sandbox Code Playgroud)

android adb unity-game-engine android-logcat

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