问题列表 - 第25810页

在MS Word字段中显示日期差异

我有个简历,想在开业时自动更新我的年龄.那么,我应该在MS Word字段中插入什么公式?

就像是:

{= {DATE} - {"01/01/1983"} }

ms-word word-field fieldcodes

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

GWT中的TreeItem ClickHandler

使用标准GWT 2.0.3 API,如何将Clickhandler添加到TreeItem?我希望实现对服务器的异步调用,该服务器将检索扩展的结果TreeItem.

遗憾的是FastTree在GXT应用程序中不起作用.因此,我回到了需要将处理程序附加到TreeItems 的原始步骤!

这段代码是否有明显的挫折:

Tree.addSelectionHandler(new SelectionHandler<TreeItem>()
{
    @Override
    public void onSelection(SelectionEvent event()
    {
        if(event.getSelectedItem == someTreeItem)
        {
            //Something
        }
    }
});
Run Code Online (Sandbox Code Playgroud)

gwt

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

如何使用Facebook Graph API执行FQL查询

我正在寻找一种使用新的Open Graph API执行FQL(facebook查询语言)查询的方法.

有谁知道我怎么做到这一点?

通过以下优秀示例找到答案:http: //code.google.com/p/facebook-cpp-graph-api/

facebook-fql facebook-graph-api

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

在HTML中访问SVG

我使用SVG inisde我的xhtml文件.我无法访问id ="Wert"的文本.有什么不对,我想将颜色从蓝色变为红色.

Untitled Page

<script type="text/javascript">
    function OnLoad() {
        setTimeout("timer()", 1000);
    }

    function timer() {
        var randomnumber = Math.floor(Math.random() * 101); // Zahlen von 0..100

        var svgdocument = document.svgid.getSVGDocument( 'svgid');
        svgtext = svgdocument.getElement.ById('Wert');
        svgtext.setattribute('style','fill:red');


        setTimeout("timer()", 1000);
    }
</script>
Run Code Online (Sandbox Code Playgroud)

40

html javascript svg

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

在Django之外使用模型和表单?

是否可以在Django环境之外使用Django Model和Form运行视图文件?

python django django-models

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

如何同时迭代两个IEnumerables?

我有两个枚举:IEnumerable<A> list1IEnumerable<B> list2.我想同时迭代它们,如:

foreach((a, b) in (list1, list2))
{
    // use a and b
}
Run Code Online (Sandbox Code Playgroud)

如果它们不包含相同数量的元素,则应抛出异常.

做这个的最好方式是什么?

c# iteration ienumerable

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

shell脚本的跨平台getopt

我刚刚发现这getopt不是跨平台的(特别是对于FreeBSD和Linux).这个问题的最佳解决方法是什么?

bash shell cross-platform getopt

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

jQuery:选中复选框后提交表单

我有一个表单,当我点击一个复选框时,我想自动更新它.这是我目前的代码:

$('.option img').click(function() {
     $("#views-exposed-form-Portfolio-page-1").submit();
});
Run Code Online (Sandbox Code Playgroud)

但是,在提交表单之前不会存储所选复选框,因此选择无效.

谢谢

jquery

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

jQuery $ .ajax在IE8中不起作用,但它适用于FireFox和Chrome

我有以下ajax调用,它在Firefox和Chrome中完美运行但不是IE:

function getAJAXdates( startDate, numberOfNights, opts ) {

    var month   =   startDate.getMonth() + 1;
    var day     =   startDate.getDate();
    var year    =   startDate.getFullYear();
    var d       =   new Date();

    var randNum =   Math.floor(Math.random()*100000000);

    $.ajax({
        type        :   "GET",
        dataType    :   "json",
        url         :   "/availability/ajax/bookings?rand="+randNum,    
        cache       :   false,
        data        :   'month='+month+'&day='+day+'&year='+year+'&nights='+numberOfNights,
        contentType :   'application/json; charset=utf8',
        success     :   function(data) {
            console.log('@data: '+data);
            insertCellData(data, opts, startDate);
        },
        error:function(xhr, status, errorThrown) {
            console.log('@Error: '+errorThrown);
            console.log('@Status: '+status);
            console.log('@Status Text: '+xhr.statusText);
        }
    });
}
Run Code Online (Sandbox Code Playgroud)

我知道所有变量都传递了正确的内容,$ .ajax确实传递了所有参数/值.

这是我得到的错误:

日志:@Error:未定义日志:@Status:parsererror日志:@Status文本:好的

我知道IE上的缓存问题并实现了一个随机参数来清除它. …

javascript ajax jquery internet-explorer json

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

吞噬了jQuery AJAX回调中引发的异常?

除了在每个回调中添加try..catch块之外,有没有办法处理jQuery中从AJAX回调引发的异常?在这种情况下不会调用错误函数.

$.ajax(
{
    url: 'myurl.rails',
    success: function( data )
    {
        throw 'Oh no!';
    },
    error: function ( xhr, textStatus, errorThrown )
    {
        console.log( 'AJAX call failed', xhr, textStatus, errorThrown );
    }               
} );
Run Code Online (Sandbox Code Playgroud)

javascript ajax jquery exception

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