编辑testme.php/ tmp中的文件.
<?php
echo "test";
?>
Run Code Online (Sandbox Code Playgroud)
编辑一个标题为" test上传文件"的新帖子/tmp/testme.php,并使用网址将其发布http://home.local/wp/?p=4785.
我想看看testme中的内容,点击它,在wordpress中弹出新窗口.

继续点击它.test在网页中显示.
我的期望:1.
只需点击testme测试帖一次.
2.显示testme.php 纯文本,
<?php
echo "test";
?>
Run Code Online (Sandbox Code Playgroud)
而不是执行的结果testme.php.
test
Run Code Online (Sandbox Code Playgroud)
我根据一些材料进行配置show php file as plain text in apache.
sudo vim /etc/apache2/sites-available/000-default.conf
<VirtualHost *:80>
ServerName www.home.local
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
<Directory /var/www/html>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
allow from all
php_flag engine off
AddType text/plain php
</Directory>
</VirtualHost>
Run Code Online (Sandbox Code Playgroud)
重启apache2(在debian中构建). …
要ssh登录我的vps,代码可以成功运行.
import tweepy
consumer_key="xxx"
consumer_secret="xxx"
access_token="xxx"
access_token_secret="xxx"
auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
auth.set_access_token(access_token, access_token_secret)
api = tweepy.API(auth)
tweets = api.user_timeline(screen_name="realDonaldTrump",weet_mode="extended",count=200)
for info in tweets:
print(info.text)
Run Code Online (Sandbox Code Playgroud)
设置与代理相关的所有软件,并测试socks代理.
url="https://www.youtube.com/watch?v=l9AC98amjSA"
youtube-dl --proxy socks5://127.0.0.1:1080 $url -o /tmp/downName
Run Code Online (Sandbox Code Playgroud)
经验证,youtube上的视频可以通过socks5代理下载.
所有与代理相关的软件都处于良好状态.
现在我想在我的本地电脑中设置socks5代理,根据上面的代码只改变了一行.
api = tweepy.API(auth,proxy="127.0.0.1:1080")
Run Code Online (Sandbox Code Playgroud)
错误信息如下.
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 588, in urlopen
self._prepare_proxy(conn)
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 803, in _prepare_proxy
conn.connect()
File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 291, in connect
self._tunnel()
File "/usr/lib/python3.5/http/client.py", line 827, in _tunnel
(version, code, message) = response._read_status()
File "/usr/lib/python3.5/http/client.py", line 258, …Run Code Online (Sandbox Code Playgroud) 网页上说,有两种方法可以在HTML文件中使用tern_for_vim插件.
这两种方法都可以工作,它们都无法使js完成菜单自动弹出.
方法一:
1.vim test.html
2.:setlocal omnifunc=tern#Complete
3.To input `<C-X><C-O>` after `document.`
Run Code Online (Sandbox Code Playgroud)
现在js完成弹出.
这种方法还有两个问题.
1.写入setlocal omnifunc=tern#Complete .vimrc无法正常工作.
为什么?
2.如何让js完成菜单自动弹出 document.,而不是输入<C-X><C-O>?
方法2:
sudo cp .vim/bundle/tern_for_vim/after/ftplugin/javascript_tern.vim .vim/bundle/tern_for_vim/after/ftplugin/html_tern.vim
Run Code Online (Sandbox Code Playgroud)
你应该输入<C-X><C-O>后document. 才能调用JS完成菜单编辑HTML文件.
编辑的js文件的js完成菜单无法document.自动弹出.
1.如何让js完成菜单自动弹出 document.,而不是输入<C-X><C-O>?(与Method1中的第二项相同.)
单元格d2包含一个数字,假设它是4。
我想将偏移量的参考设置为a5。
"a"&text(d2+1,0)可以表达串a5,我想从调用范围内的数据a5,直到 a9。
OFFSET("a"&text(d2+1,0),0,0,5,1)
Run Code Online (Sandbox Code Playgroud)
为什么Excel中的offset函数不能接受"a"&text(d2+1,0)为a5?
如何在Excel中修复偏移函数表达式?
我创建了一个子主题,DejaVu Sans Mono为每个html元素都设置了font-family 。
vim /var/www/html/wp-content/themes/twentyfourteen-child/style.css
*{
font-family:"DejaVu Sans Mono" !important;
}
Run Code Online (Sandbox Code Playgroud)
我twentyfourteen-child以wordpress为主题。
每个处于编辑状态的字符都不是 DejaVu Sans Mono。

帖子中的每个字符都在发布 DejaVu Sans Mono 之后。

DejaVu Sans Mono 编辑帖子时如何设置字体系列?
使用ffprobe获取持续时间。
ffprobe test.mp3 2>&1 | awk -F'[ ,]' '/Duration/{print $4}'
00:03:51.05
Run Code Online (Sandbox Code Playgroud)
使用-t参数设置持续时间。
ffplay -t '231' test.mp3
Run Code Online (Sandbox Code Playgroud)
当test.mp3结束时,ffplay命令无法停止。
视频播放结束后如何关闭ffplay?
div.test被设置为自动高度,没有固定高度.
.test {
top: 0px;
right: 0px;
bottom: 0px;
left: 0px;
background: yellow;
width: 200px;
height: auto;
padding: 10px;
}Run Code Online (Sandbox Code Playgroud)
<div class="test">
it is a test info for my div .
</div>Run Code Online (Sandbox Code Playgroud)
现在要添加一个position:absolute;in css,所有其他css属性保持不变.
.test {
top: 0px;
right: 0px;
bottom: 0px;
left: 0px;
background: yellow;
width: 200px;
height: auto;
padding: 10px;
position: absolute;
}Run Code Online (Sandbox Code Playgroud)
<div class="test">
it is a test info for my div .
</div>Run Code Online (Sandbox Code Playgroud)
div.test的高度被放大了,为什么?
ls test.mp4 test.sh 1>/tmp/text 2>&1
cat /tmp/text
ls: cannot access test.sh: No such file or directory
test.mp4
Run Code Online (Sandbox Code Playgroud)
为什么结果不是以下顺序?
test.mp4
ls: cannot access test.sh: No such file or directory
Run Code Online (Sandbox Code Playgroud)
也许1>/tmp/text先执行,然后在test.sh之前找到test.mp4。
效果如何?
html ×2
wordpress ×2
autocomplete ×1
bash ×1
css ×1
ffmpeg ×1
file-upload ×1
font-family ×1
javascript ×1
ms-office ×1
offset ×1
php ×1
proxy ×1
redirect ×1
tweepy ×1
vim-plugin ×1