Chinaunix首页 | 论坛 | 博客
  • 博客访问: 7204037
  • 博文数量: 510
  • 博客积分: 12019
  • 博客等级: 上将
  • 技术积分: 6836
  • 用 户 组: 普通用户
  • 注册时间: 2005-08-01 16:46
文章分类

全部博文(510)

文章存档

2022年(2)

2021年(6)

2020年(59)

2019年(4)

2018年(10)

2017年(5)

2016年(2)

2015年(4)

2014年(4)

2013年(16)

2012年(47)

2011年(65)

2010年(46)

2009年(34)

2008年(52)

2007年(52)

2006年(80)

2005年(22)

发布时间:2018-10-27 12:04:55

setting.py配置STATIC_URL = '/static/'STATICFILES_DIRS = (     os.path.join(BASE_DIR, 'ybwapp/res/img').replace('\\', '/'),)其中BASE_DIR, 'ybwapp/res/img' 为资源的物理存储路径外部访问url时候要有static,如下https://ybw.jtxtong.com/static/picture/test.jpg 真实物理存储为 BAS.........【阅读全文】

阅读(1721) | 评论(0) | 转发(0)

发布时间:2018-10-27 12:01:38

Nginx转发后端配置server {#listen       8822;listen       443 ssl;server_name  abc.XXX.com;                    #同个端口443可配置多个,也就是按照域名转发ssl_certificate  /root/xcx/certificate/.........【阅读全文】

阅读(1840) | 评论(0) | 转发(0)

发布时间:2018-10-20 18:15:40

转载:https://blog.csdn.net/t8116189520/article/details/78899801# coding:utf8import requests def downimage(i):    # 构建session    sess = requests.Session()    # 建立请求头    headers={"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) App.........【阅读全文】

阅读(1665) | 评论(0) | 转发(0)

发布时间:2018-10-03 15:35:35

#-*- coding:utf-8 -*-import urllibimport urllib2# 1. 导入Python SSL处理模块import sslimport timeimport sysimport random import codecsfrom bs4 import BeautifulSoupreload(sys)  sys.setdefaultencoding('utf8')  def  getUrl(url):   # 1. 表示忽略未经.........【阅读全文】

阅读(2198) | 评论(0) | 转发(0)

发布时间:2018-10-03 15:01:53

1、nohup 重定向时候,print 输出不能定向到文件解决办法:加-uYou can run Python with the -u flag to avoid output bufferingnohup python -u  fetch.py  >error.txt 2>&1 &......【阅读全文】

阅读(1154) | 评论(0) | 转发(0)
给主人留下些什么吧!~~

136777462312017-09-09 21:24

回复  |  举报

AAAA888AA82013-11-21 19:26

用 sed 寫一個程式, 從 stdin 讀進, 過濾後寫到 stdout. 過濾條件如下: 
將 comment 刪除. 
若 commnet 刪除後為一空行, 則刪掉這行. 
若為一空行, 則刪掉這行. 
若 $ 後接一串數字, 則把 $ 刪除. 
把 $klim 換成 $milk 
把 $milk 換成 $oak 
範例如下: 
=======this-is-my-prompt====== cat IN-5 
# this is a comment line.
$klim owes $milk $1000    # comment here
$milk wins $oak 20000
Klim owes milk $$1000     # comment
                          # comment line also
milk wins $oak $20000
=======this-is-my-prompt====== ./ex5 < IN-5 
$milk owes $oak 1000    
$oak wins $oak 20000
Klim owes milk $1000 
milk wins $oak 20000

想請問這串 若 $ 後接一串數字, 則把 $ 刪除. 
爬了不少聞問過不少人 都沒辦法只刪除前面的$ 請問這要怎麼打..

回复  |  举报

电影vs程序员2013-08-22 18:08

想问您问题,可以加好友吗

回复  |  举报

mmlikex2012-02-02 16:50

您好 希望您能加我Q 393172958 我想问您点关于socket端口 的问题

回复  |  举报

chinaunix网友2009-04-12 19:34

您的作业还真是五花八门,总能找到我想要的,谢谢!

回复 |  删除 |  举报
留言热议
请登录后留言。

登录 注册