小编Geo*_*Jor的帖子

如何使用jshint警告定义角度自定义包?

我刚刚将moment.js安装到我的angularjs应用程序中.

但jshint一直警告说没有定义时刻.

  public/js/services/notifications.js
 16 |        console.log(moment.locale('fr'));
                         ^ 'moment' is not defined.
Run Code Online (Sandbox Code Playgroud)

jshint angularjs

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

(Watir webdriver)在OSX 10.9中使用多个显示时,如何将浏览器移动到另一个屏幕

我知道有一个名为browser.window.move_to(0,0)的函数可以将浏览器移动到不同的位置,但OSX 10.9对它来说是全新的.

是否有任何方法可以将浏览器移动到另一个桌面?例如,在"桌面2"中触发命令的控制台,但我希望浏览器显示在"桌面1"中.

非常感谢!

ruby selenium watir watir-webdriver selenium-webdriver

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

无法使用pip安装lxml

这是我用来安装lxml的命令:

sudo pip install lxml
Run Code Online (Sandbox Code Playgroud)

我在清理阶段收到以下消息:

Cleaning up...
Command /usr/bin/python -c "import setuptools,     tokenize;__file__='/private/tmp/pip_build_root/lxml/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-rUFjFN-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /private/tmp/pip_build_root/lxml
Storing debug log for failure in /Users/georgejor/Library/Logs/pip.log
Run Code Online (Sandbox Code Playgroud)

在那之后,我得到了:

ImportError: No module named lxml
Run Code Online (Sandbox Code Playgroud)

请帮忙.谢谢!

以下输出来自pip.log:

----------------------------------------
Cleaning up...
  Removing temporary dir /private/tmp/pip_build_root...
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/private/tmp/pip_build_root/lxml/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-rUFjFN-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /private/tmp/pip_build_root/lxml
Exception information:
Traceback (most …
Run Code Online (Sandbox Code Playgroud)

python lxml

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

browserSync的modRewrite不适用于带有gulp的路径'app/index.html'的angularjs html5mode

当我运行gulp时,服务器启动了消息:无法获取/.当我指向localhost:3000/app/index.html时,该站点重定向到localhost:3000/home并正常工作.但是,当我重新加载页面时,它给出:无法获取/ home.

请查看以下配置以查看是否遗漏了任何内容:

访问路径:app/index.html

这是我的gulpfile.js:

var gulp = require('gulp'),
nodemon = require('gulp-nodemon'),
jshint = require('gulp-jshint'),
browserSync = require('browser-sync')
modRewrite  = require('connect-modrewrite');

gulp.task('lint', function () {
  gulp.src('app/js/*.js').pipe(jshint());
});

gulp.task('serve', function() {
  browserSync({
      server: {
          baseDir: "./",
          middleware: [
              modRewrite([
                  '!\\.\\w+$ /index.html [L]'
              ])
          ]
      }
  });
});

gulp.task('default', ['lint', 'serve'], function() {
  gulp.watch('app/js/*.js', ['lint', browserSync.reload]);
});
Run Code Online (Sandbox Code Playgroud)

角度路径文件:

  $urlRouterProvider.otherwise("/home");

  $stateProvider
    .state('home', {
      url: "/home",
      templateUrl: "app/partials/home.html",
      controller: 'HomeCtrl'
    })
...
Run Code Online (Sandbox Code Playgroud)

非常感谢!

Github:https://github.com/yhjor1212/angular-fire-powder

mod-rewrite node.js angularjs gulp browser-sync

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

仅使用引导程序的轮播

我现在正在使用语义UI而不包含Bootstrap,因为它们之间存在一些冲突。但是我非常喜欢bootstrap的Carousel功能。我可以选择将其包含在我的项目中吗?非常感谢!

javascript twitter-bootstrap angular-ui-bootstrap twitter-bootstrap-3 semantic-ui

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

'NoneType'对象在BeautifulSoup中使用'find_all'无法调用

这是我的代码,使用find_all,但它适用于.find():

import requests
from BeautifulSoup import BeautifulSoup

r = requests.get(URL_DEFINED)
print r.status_code

soup = BeautifulSoup(r.text)
print soup.find_all('ul')
Run Code Online (Sandbox Code Playgroud)

这就是我得到的:

Traceback (most recent call last):


File "scraper.py", line 19, in <module>
    print soup.find_all('ul')
TypeError: 'NoneType' object is not callable
Run Code Online (Sandbox Code Playgroud)

python beautifulsoup

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