localhost

Setting DEBUG = False causes 500 Error

匿名 (未验证) 提交于 2019-12-03 08:44:33
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Once I change the DEBUG = False , my site will generate 500 (using wsgi & manage.py runserver), and there is no error info in Apache error log and it will run normally when I change debug to True . I'm using Django 1.5 & Python 2.7.3 here is Apache access log and without any log in apache error log www.beta800.net:80 222.247.56.11 - - [28/Feb/2013:13:42:28 +0800] "GET / HTTP/1.1" 500 257 "-" "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22" www.beta800.net:80 222.247.56.11 - - [28

backbone view - is not defined

匿名 (未验证) 提交于 2019-12-03 08:41:19
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: This really confuses me, I think I'm stupid but I've searched and have done whatever I could. Whenever I declare a view and run BDD test with jasmine, it always returns "undefined is not a function". This is code window.LocationView = Backbone.View.extend({ initialize: function() { // create new marker first this.marker = new google.maps.Marker({ title: this.model.get('name'), draggable: true, animation: google.maps.Animation.DROP, position: new google.maps.LatLng(this.model.get('lat'), this.model.get('long')), // give the position here });

SyntaxError: Unexpected token N in chrome console from angularjs

匿名 (未验证) 提交于 2019-12-03 08:35:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Hi I am getting this error using angularjs through the chrome console: SyntaxError: Unexpected token N at Object.parse (native) at fromJson (http://localhost:3000/assets/angular.js?body=1:803:14) at $HttpProvider.defaults.defaults.transformResponse http://localhost:3000/assets/angular.js?body=1:9471:18) at http://localhost:3000/assets/angular.js?body=1:9446:12 at Array.forEach (native) at forEach (http://localhost:3000/assets/angular.js?body=1:149:11) at transformData (http://localhost:3000/assets/angular.js?body=1:9445:3) at

Invalid request: Invalid HTTP format, parsing fails

匿名 (未验证) 提交于 2019-12-03 08:35:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm constantly getting this error in rails server log: Invalid request: Invalid HTTP format, parsing fails. /home/budkin/gamestown/vendor/cache/ruby/2.0.0/gems/thin-1.6.1/lib/thin/request.rb:84:in `execute' /home/budkin/gamestown/vendor/cache/ruby/2.0.0/gems/thin-1.6.1/lib/thin/request.rb:84:in `parse' /home/budkin/gamestown/vendor/cache/ruby/2.0.0/gems/thin-1.6.1/lib/thin/connection.rb:41:in `receive_data' /home/budkin/gamestown/vendor/cache/ruby/2.0.0/gems/faye-websocket-0.7.2/lib/faye/adapters/thin.rb:44:in `receive_data' /home/budkin

Cannot read property 'protocol' of undefined

匿名 (未验证) 提交于 2019-12-03 08:33:39
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Getting that error in console when trying to get data from a API. Anybody have this issue before? var url = "https://api.website.com/get/?type=events&lat=" + localStorage.getItem('latitude') + "&lng=" + localStorage.getItem('longitude') + "&distance=50"; $http({ headers: { 'Content-type': 'application/json' } }) $http.get(url).success(function (events) { $scope.events = events; }); error: TypeError: Cannot read property 'protocol' of undefined at Gb (http://localhost:38772/www/js/plugins/angular.min.js:114:238) at s (http://localhost:38772

Angular 4.0.1 Can't resolve all parameters

匿名 (未验证) 提交于 2019-12-03 08:30:34
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Trying to update Angular from 4.0.0 to 4.0.1. Everything compiles fine, but when opening a site it crashes with Uncaught Error: Can't resolve all parameters for SomeData: (?, ?, ?). at syntaxError (http://localhost:8084/vendor.bundle.js:67009:34) [<root>] at CompileMetadataResolver._getDependenciesMetadata (http://localhost:8084/vendor.bundle.js:79857:35) [<root>] at CompileMetadataResolver._getTypeMetadata (http://localhost:8084/vendor.bundle.js:79725:26) [<root>] at CompileMetadataResolver._getInjectableMetadata (http://localhost:8084

tensorflow-gpu踩坑实录win10+CUDA9.0+cuDNN7.4.2+tensorflow-gpu1.12

感情迁移 提交于 2019-12-03 08:23:38
之前都是使用tensorflow的cpu版本,没注意自己这台老人机居然有GPU。便决定试一试看看自己电脑能不能跑起GPU。(各种百度谷歌)记录如下: 首先:检查自己的GPU是否可以使用: CUDA: https://developer.nvidia.com/cuda-gpus 居然找到自己的GPU ..哈哈哈(意外) 接下来:需要安装CUDA + cuDNN。 刚开始无脑:使用CUDA10.0 +cuDNN 7 .4.2+tensorflow1.12发现报错如下(没截图): File "C:\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\ pywrap _tensorflow_internal.py", line 24, in swig_import_helper _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description) File "C:\Anaconda3\envs\tensorflow\lib\imp.py", line 243, in load_module return load_dynamic(name, filename, file) File "C:\Anaconda3\envs

入门第一篇:Nginx+Tomcat+Memcached信心增强篇

为君一笑 提交于 2019-12-03 08:20:09
本篇文章只是介绍简单的Nginx+Tomcat+Memcached配置及所需环境,没有详细介绍各项解释及优化配置,按照如下陪可以实现负载均衡,对于初学者来说上手很快,不会一头雾水,增强信心是有帮助的,至于更多更深层次的内容我后面会慢慢介绍更新,同时也希望读者私下里慢慢研究,共同研究进步,当然有这方经验的大牛可以关注下私聊,再下还有些问题请教,谢谢。。。 Nginx+Tomcat+Memcached实现tomcat集群和session共享 有时候服务器需要处理更大的并发量则需要更多的nginx来作为代理转发并需要更多的tomcat节点(当然也有牛人能把tomcat配到数千并发量,这样也不一定需要太多tomcat) 1. nginx环境 1.1下载nginx服务包,在此我使用的是nginx-1.2.9 主要配置conf目录下的配置文件和使用nginx.exe的服务。 在cmd中进入nginx.exe所在的目录, 输入:start nginx启动nginx服务; nginx –s quit或nginx –s stop 停止nginx服务; nginx –s reload刷新nginx的配置文件。 启动nginx没反应,要在任务管理器-进程中查看是否启动。 1.2配置 找到nginx的安装目录:ngin1. 1.2.9/conf/conf文件 nginx

Errors while running hadoop

▼魔方 西西 提交于 2019-12-03 08:12:35
haduser@user-laptop:/usr/local/hadoop$ bin/hadoop dfs -copyFromLocal /tmp/input /user/haduser/input 11/12/14 14:21:00 INFO ipc.Client: Retrying connect to server: localhost/127.0.0.1:54310. Already tried 0 time(s). 11/12/14 14:21:01 INFO ipc.Client: Retrying connect to server: localhost/127.0.0.1:54310. Already tried 1 time(s). 11/12/14 14:21:02 INFO ipc.Client: Retrying connect to server: localhost/127.0.0.1:54310. Already tried 2 time(s). 11/12/14 14:21:03 INFO ipc.Client: Retrying connect to server: localhost/127.0.0.1:54310. Already tried 3 time(s). 11/12/14 14:21:04 INFO ipc.Client:

JAVA企业级应用TOMCAT实战

大兔子大兔子 提交于 2019-12-03 08:11:45
1. Tomcat简介 Tomcat是Apache软件基金会(Apache Software Foundation)的Jakarta 项目中的一个核心项目,由Apache、Sun和其他一些公司及个人共同开发而成。 Tomcat服务器是一个免费的开放源代码的 Web应用服务器 ,属于轻量级应用服务器,在中小型系统和并发访问用户不是很多的场合下被普遍使用,是开发和调试JSP程序的首选。 Tomcat和Nginx、Apache(httpd)、lighttpd等Web服务器一样,具有处理HTML页面的功能,另外它还是一个Servlet和JSP容器,独立的Servlet容器是Tomcat的默认模式。不过,Tomcat处理静态HTML的能力不如Nginx/Apache服务器。 对比php软件,区别? 目前Tomcat最新版本为9.0。Java容器还有resin、weblogic等。 2. Tomcat安装 2.1 软件准备 JDK下载: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html Tomcat下载: http://tomcat.apache.org/ 2.2 部署java环境 [root@tomcat ~]# cd /application/tools/ [root