小编rus*_*kin的帖子

如何实际使用ClojureScript?

我没有得到ClojureScript的想法.例如,我正在编写一个Web应用程序,我需要编写一些javascript.我应该使用ClojureScript为我生成javascript吗?寻求一些指导.

谢谢

clojure clojurescript

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

作者的意思是"平台层"

我正在阅读这篇文章" http://lethain.com/introduction-to-architecting-systems-for-scale/ ".最后,作者提到了平台层.我不明白这一层的范围及其优点.你能澄清一下吗?

谢谢

architecture

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

不理解回调和非阻塞示例 - Node.js

在动手节点一书中,作者举了一个阻塞I\O的例子,

var post = db.query("select * from posts where id = 1");
doSomethingWithPost(post)
doSomethingElse();
Run Code Online (Sandbox Code Playgroud)

作者说在第1行完成执行db查询之前没有执行任何操作

然后,他显示了非阻塞代码

callback = function(post){
doSomethingWithPost(post)
}

db.query("select * from posts where id = 1",callback);
doSomethingElse();
Run Code Online (Sandbox Code Playgroud)

在查询执行之前,这也不会阻塞吗?

因此,在查询完成之前,不会执行doSomethingElse.

node.js

6
推荐指数
2
解决办法
5141
查看次数

Django开发服务器不处理ajax请求

我正在制作一个简单的ajax请求但由于某种原因request.is_ajax返回false.我正在使用jquery和Django开发服务器.

    $('#save').click(
function()
{
    $.ajax({
    type: "POST",
    url: "/order/start",

    });

});
Run Code Online (Sandbox Code Playgroud)

在views.py中

if request.POST and 'save' in request.POST :
    if request.is_ajax()== True:
Run Code Online (Sandbox Code Playgroud)

但是,它不会返回true,在runserver上我看到错误

Exception happened during processing of request from ('127.0.0.1', 1625)
Traceback (most recent call last):

  File "c:\python27\lib\SocketServer.py", line 284, in _handle_request_noblock
    self.process_request(request, client_address)
  File "c:\python27\lib\SocketServer.py", line 310, in process_request
    self.finish_request(request, client_address)
  File "c:\python27\lib\SocketServer.py", line 323, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "c:\python27\lib\site-packages\django\core\servers\basehttp.py", line 56
, in __init__
    BaseHTTPRequestHandler.__init__(self, *args, **kwargs)
  File "c:\python27\lib\SocketServer.py", line 641, in __init__
    self.finish()
  File …
Run Code Online (Sandbox Code Playgroud)

django

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

无法与jqgrid一起使用editRow

这条线grid.editRow(id, true);- 给出错误.

uncaught TypeError: Object #<Object> has no method 'editRow'

怎么解决这个问题?

<script type="text/javascript">
    jQuery(document).ready(function () {
        jQuery("#list").jqGrid({
            url: '/Home/GridData/',
            datatype: 'json',
            mtype: 'POST',
            colNames: ['Id', 'Votes', 'Title'],
            colModel: [
      { name: 'Id', index: 'Id', width: 40, align: 'left' },
      { name: 'Votes', index: 'Votes', width: 40, align: 'left', editable: true, edittype: 'text' },
      { name: 'Title', index: 'Title', width: 400, align: 'left'}],
            pager: jQuery('#pager'),
            rowNum: 10,
            rowList: [10, 20, 50],
            sortname: 'Id',
            sortorder: "desc",
            viewrecords: true,
            imgpath: …
Run Code Online (Sandbox Code Playgroud)

jquery jqgrid

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

标签 统计

architecture ×1

clojure ×1

clojurescript ×1

django ×1

jqgrid ×1

jquery ×1

node.js ×1