我知道我的问题一定是非常愚蠢的,因为我找不到任何关于它的事情,即使是在堆栈溢出中,但这对我来说确实是个问题.
我按照这个文档,几乎一切顺利,直到"mysite.sock"发生.它发生的是这样的:
server unix:///path/to/your/mysite/mysite.sock; # for a file socket
# server 127.0.0.1:8001; # for a web port socket (we'll use this first)
Run Code Online (Sandbox Code Playgroud)
这个文档没有提到关于"mysite.sock"的任何内容,经过一天的搜索,我什么都没发现,我的__CODE__
网站需要在48小时内上线,所以我不得不寻求帮助.
我在我的Mac上使用docker image sequenceiq/spark来研究这些火花例子,在研究过程中,我根据这个答案将该图像中的火花升级到1.6.1 ,并且当我开始这个Simple Data Operations
例子时出现错误,这里是什么事情发生了:
当我运行df = sqlContext.read.format("jdbc").option("url",url).option("dbtable","people").load()
它时引发错误,并且pyspark控制台的完整堆栈如下:
Python 2.6.6 (r266:84292, Jul 23 2015, 15:22:56)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-11)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
16/04/12 22:45:28 WARN NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
Welcome to
____ __
/ __/__ ___ _____/ /__
_\ \/ _ \/ _ `/ __/ '_/
/__ / .__/\_,_/_/ /_/\_\ …
Run Code Online (Sandbox Code Playgroud) 我读过这个,但我使用的是Django 1.5,我的urls.py看起来像这样:
url(r'^admin/$', include(admin.site.urls)),
Run Code Online (Sandbox Code Playgroud)
由于退出有问题,我会告诉你我有一个应用程序帐户,并在根urls.py中看起来像:
url(r'^accounts/', include('accounts.urls', namespace="accounts")),
Run Code Online (Sandbox Code Playgroud)
在accounts/urls.py中,有一些关于注销的内容,它看起来像这样:
url(r'^logout/$', views.logout, name='logout'),
Run Code Online (Sandbox Code Playgroud)
所以任何人都可以告诉我这怎么会导致这个错误?非常感谢你.
我在google和此处的SO中都搜索了很多,但没有找到答案。
我使用jekyll,然后在“关于我”页面中嵌入此内容,给定iframe
如下所示:
<iframe frameborder="no" border="0" marginwidth="0" marginheight="0" width=298 height=52 src="http://music.163.com/outchain/player?type=2&id=29750802&auto=0&height=32"></iframe>
Run Code Online (Sandbox Code Playgroud)
我在我的“关于我”页面中使用了它,如下所示:
{% raw %}
<iframe frameborder="no" border="0" marginwidth="0" marginheight="0" width=298 height=52 src="http://music.163.com/outchain/player?type=2&id=29750802&auto=0&height=32"></iframe>
{% endraw %}
Run Code Online (Sandbox Code Playgroud)
看起来不错,但是没有用,不是我想要的,而是显示原始文本,而不是iframe
。
我已经尝试了几乎所有内容,但仍然无法正常工作...
我是PHP新手,我不明白为什么下面代码的最终结果是'233'而不是'231',foreach中的$ a是不是临时变量?
<?php
$a = '1';
$c = array('2', '3');
foreach($c as $a){
echo $a ;
}
echo $a;
?>
Run Code Online (Sandbox Code Playgroud)
有人可以帮忙吗?THKS.
更新2014-11-28现在我知道我的问题是什么.正如已接受的答案和这个答案所指出的那样,无论foreach
是while
行为还是行为functions
,它们都只是正常的句子$a='3';
.所以现在我知道这是我的误解,而且不仅仅是php
因为我在python中尝试过,它也是一样的.
a = 123
b = [1, 2, 3]
for a in b:
print a
print a
Run Code Online (Sandbox Code Playgroud) django ×2
django-admin ×1
docker ×1
for-loop ×1
html ×1
iframe ×1
jdbc ×1
jekyll ×1
mysql ×1
nginx ×1
php ×1
pyspark ×1
pyspark-sql ×1
python ×1
while-loop ×1