我刚刚将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) 我知道有一个名为browser.window.move_to(0,0)的函数可以将浏览器移动到不同的位置,但OSX 10.9对它来说是全新的.
是否有任何方法可以将浏览器移动到另一个桌面?例如,在"桌面2"中触发命令的控制台,但我希望浏览器显示在"桌面1"中.
非常感谢!
这是我用来安装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) 当我运行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)
非常感谢!
我现在正在使用语义UI而不包含Bootstrap,因为它们之间存在一些冲突。但是我非常喜欢bootstrap的Carousel功能。我可以选择将其包含在我的项目中吗?非常感谢!
javascript twitter-bootstrap angular-ui-bootstrap twitter-bootstrap-3 semantic-ui
这是我的代码,使用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) angularjs ×2
python ×2
browser-sync ×1
gulp ×1
javascript ×1
jshint ×1
lxml ×1
mod-rewrite ×1
node.js ×1
ruby ×1
selenium ×1
semantic-ui ×1
watir ×1