小编Hem*_*mal的帖子

与Angular.js一起使用

我试图使用footable(http://themergency.com/footable-demo/responsive-container.htm)和angular.js.

在此输入图像描述

随着窗口大小的减小,仅在单击加号时显示第3,4,5列.

Angular.js提供了过滤功能,所以当我输入一些搜索字符串时,如下所示:

在此输入图像描述

表中的行被过滤.

现在的问题是当我尝试删除此搜索字符串时,如下所示:

在此输入图像描述

所有行都会再次显示,但UI会失真.

我试图在angular.js中使用回调

$scope.$watch('searchStringID', function() {
$('#tableId').trigger('footable_initialize');
}
Run Code Online (Sandbox Code Playgroud)

但是没有用,如果有人可以建议如何解决这个问题.

谢谢.

angularjs angularjs-directive footable

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

多线程编程中有用的数据结构

除了可以在多线程程序中使用的众所周知的数据结构,如并发堆栈、并发队列、并发列表、并发散列。是否还有其他鲜为人知但有用的数据结构可用于并行/多线程编程。

即使它们是经过一些优化的上述数据结构的一些不同版本,也请分享。

请务必包括一些参考资料。

编辑:将继续列出我发现的内容

1)ConcurrentCuckooHashing(ConcurrentHashing的优化版)

2) ConcurrentSkipList

concurrency multithreading computer-science data-structures

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

Web2py第三方认证

我使用web2py在python中创建了一个webapp,它使用Janrain进行第三方认证.
在我的本地服务器上它工作得非常好,但是现在当我在pythonanywhere上部署时,身份验证会给我以下错误

"class'urllib2.URLError'urlopen错误隧道连接失败:403 Forbidden"

===========

  File "/usr/lib/python2.7/urllib2.py", line 127, in urlopen
    return _opener.open(url, data, timeout)
  File "/usr/lib/python2.7/urllib2.py", line 404, in open
    response = self._open(req, data)
  File "/usr/lib/python2.7/urllib2.py", line 422, in _open
    '_open', req)
  File "/usr/lib/python2.7/urllib2.py", line 382, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.7/urllib2.py", line 1222, in https_open
    return self.do_open(httplib.HTTPSConnection, req)
  File "/usr/lib/python2.7/urllib2.py", line 1184, in do_open
    raise URLError(err)
URLError: <urlopen error Tunnel connection failed: 403 Forbidden>
Run Code Online (Sandbox Code Playgroud)

==========================

对于第三方身份验证,我使用过yahoomail id.

janrain python-2.7 pythonanywhere

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

在使用ng-repeat和angularjs中的过滤器过滤行时需要回调

我正在使用angularjs,ng-repeat来填充datagrid中的所需数据.

Something like this:
<input type="text" placeholder="Search" ng-model="query">
<tr ng-repeat="item in items | filter:query">
  <td>{{item.someData}}</td>
  <td>{{item.someOthrData}}</td>
</tr>
Run Code Online (Sandbox Code Playgroud)

当我输入一些查询字符串来过滤数据网格中的行时,在行结束时,我需要一个回调,来做一些特定于应用程序的东西.

如果有人能够建议什么是正确的方法来做到这一点.

谢谢.

angularjs angular-ui angularjs-directive angularjs-ng-repeat

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