把redirect: '/product'
放到第一個(gè)路由對(duì)象上就好了
改成這樣
routes: [
{
path: '/',
name: 'Index',
redirect: '/product',
component: Index,
children: [
{
path: '/product',
name: 'Product',
component: Product
},
{
path: '/work',
component: Work
},
{
path: '/contact',
component: Contact
}
]
},
]
是不是沒(méi)有權(quán)限寫呀
我記得weex debug是不支持windows的,不知道是不是記錯(cuò)了...
nums = soup.select('.pc_temp_songlist > ul:nth-of-type(1) > li > span:nth-of-type(3) > strong:nth-of-type(1)')
titles = soup.select('.pc_temp_songlist > ul:nth-of-type(1) > li > a:nth-of-type(4)')
times = soup.select('.pc_temp_songlist > ul:nth-of-type(1) > li > span:nth-of-type(5) > span:nth-of-type(4)')
這個(gè)數(shù)據(jù)解析有問(wèn)題啊,所以當(dāng)然沒(méi)有打印輸出了
你覺(jué)得卡住,每次循環(huán)要sleep 7秒,而且輸出為空造成的假象吧
以下代碼供參考:
import requests
from bs4 import BeautifulSoup
url='http://www.kugou.com/yy/rank/...{}-8888.html?from=rank'
def get_info(url):
res=requests.get(url)
soup=BeautifulSoup(res.text,'lxml')
infoes=soup.select('div.pc_temp_songlist ul li ')
for info in infoes:
nums=info.select('span.pc_temp_num')[0].text.strip()
singer,name=info['title'].split('-',1)
times=info.select('span.pc_temp_tips_r span.pc_temp_time')[0].text.strip()
print({'名次':nums,'歌手':singer,'歌名':name,'時(shí)長(zhǎng)':times})
if __name__=='__main__':
urls = [url.format(i) for i in range(1, 24)]
for url in urls:
get_info(url)
grep
需要添加參數(shù) --line-buffered
,才能過(guò)濾 continuous stream.docker logs
使用 grep
某些環(huán)境下需要添加 2>&1
才有效果, docker logs xx -f 2>&1| grep --line-buffered xxx
參考
How to 'grep' a continuous stream?
docker logs <container id> | grep <some value> doesn't work
!previous
條件被你吃了?怎么會(huì)每次都為now呢?
你的情況用acl來(lái)分配權(quán)限比較好
例如 nginx 配置
處理接口
location ^ ~ /apiA {
proxy_pass http://127.0.0.3000;
}
location ^ ~ /apiB {
proxy_pass http://127.0.0.3004;
}
你試著按下Tab
解決了,因?yàn)間ithub登錄成功后是 http 方式跳轉(zhuǎn)過(guò)去的,所以 express-session 需要設(shè)置下 secure: false
app.use(session({
secret: 'Stefanie Sun',
store: sessionStore,
resave: true, // 強(qiáng)制更新 session
saveUninitialized: true, //
cookie: {
maxAge: 3 * 3600 * 1000, // 過(guò)期時(shí)
secure: false // http 訪問(wèn)時(shí) secure 為 false
},
rolling: true
}))
怪我沒(méi)有仔細(xì)看文檔=。=
docker run -it 鏡像:版本 /bin/bash
生成容器后可以進(jìn)去看有哪些軟件。
Dockerfile看不到的。
如果你這個(gè)頁(yè)面的數(shù)據(jù)不是實(shí)時(shí)更新變化的,進(jìn)入頁(yè)面獲取數(shù)據(jù)應(yīng)該是在ionViewDidLoad()函數(shù),會(huì)被緩存起來(lái),這樣就可以避免返回刷新出現(xiàn)卡頓,你用Enter之類的函數(shù)是重新獲取數(shù)據(jù)的。
謝邀~問(wèn)題是否解決?
可能是提取插件ExtractPlugin
版本的問(wèn)題。
跟名字空間有關(guān), eval()
官方文檔是這樣的:
eval(expression, globals=None, locals=None)
其中有:
globals
: 全局名字空間locals
: 局部名字空間兩個(gè)可選屬性.如果這兩個(gè)都不寫, eval
默認(rèn)只能識(shí)別標(biāo)準(zhǔn)的 builtins
模塊.
你定義的 f()
函數(shù)的局部名字空間不包含實(shí)例 o
:
class A:
def __init__(self):
self.a = 10
o = A()
o.a # 10
def f(o, a):
print(eval(o + '.' + a, globals())
f('o', 'a')
Ai好像只支持Flash導(dǎo)出吧,我記得Adobe有個(gè)Animate CC是用來(lái)做動(dòng)畫的,還可以直接輸出網(wǎng)頁(yè)不過(guò)沒(méi)試過(guò)……感覺(jué)SVG動(dòng)畫還是手寫方便。
用css動(dòng)畫實(shí)現(xiàn),參考https://cn.vuejs.org/v2/guide...
按照你所說(shuō),在controller 中執(zhí)行休眠的時(shí)候,符合差不多同時(shí)執(zhí)行的規(guī)律
但是如果在controller 調(diào)用service,service執(zhí)行休眠的時(shí)候,兩個(gè)間隔時(shí)間比較長(zhǎng),但又小于休眠時(shí)間,具體代碼如下
@RestController
@RequestMapping("/test")
public class TestController {
private static final Logger logger = LoggerFactory.getLogger(TestController.class);
@Autowired
private IUserService userService;
@GetMapping("/user")
public Object testUser() {
logger.info("testController:{}", this.toString());
logger.info("userService:{}", userService.toString());
userService.get(1l);
return "ok";
}
@RequestMapping("/foo2")
public Object foo2(HttpServletRequest request) throws InterruptedException {
String param = request.getParameter("p");
logger.error("param:{}", param);
long start = System.currentTimeMillis();
Thread.sleep(10000);
long end = System.currentTimeMillis();
logger.error("time:{}", end - start);
return end - start;
}
}
@Override
public void get(Long id) {
logger.error("get start...{}", this.toString());
try {
Thread.sleep(30000l);
} catch (InterruptedException e) {
e.printStackTrace();
}
logger.error("get end...{}", this.toString());
}
結(jié)果如下:
2018-03-28 15:53:04.559 INFO 21776 --- [io-8080-exec-10] c.e.m.web.controller.TestController : testController:com.example.multimodule.web.controller.TestController@189ebbd
2018-03-28 15:53:04.559 INFO 21776 --- [io-8080-exec-10] c.e.m.web.controller.TestController : userService:com.example.multimodule.service.service.impl.UserServiceImpl@2a12ba65
2018-03-28 15:53:04.559 ERROR 21776 --- [io-8080-exec-10] c.e.m.s.service.impl.UserServiceImpl : get start...com.example.multimodule.service.service.impl.UserServiceImpl@2a12ba65
2018-03-28 15:53:25.665 INFO 21776 --- [nio-8080-exec-4] c.e.m.web.controller.TestController : testController:com.example.multimodule.web.controller.TestController@189ebbd
2018-03-28 15:53:25.665 INFO 21776 --- [nio-8080-exec-4] c.e.m.web.controller.TestController : userService:com.example.multimodule.service.service.impl.UserServiceImpl@2a12ba65
2018-03-28 15:53:25.665 ERROR 21776 --- [nio-8080-exec-4] c.e.m.s.service.impl.UserServiceImpl : get start...com.example.multimodule.service.service.impl.UserServiceImpl@2a12ba65
2018-03-28 15:53:34.559 ERROR 21776 --- [io-8080-exec-10] c.e.m.s.service.impl.UserServiceImpl : get end...com.example.multimodule.service.service.impl.UserServiceImpl@2a12ba65
2018-03-28 15:53:55.665 ERROR 21776 --- [nio-8080-exec-4] c.e.m.s.service.impl.UserServiceImpl : get end...com.example.multimodule.service.service.impl.UserServiceImpl@2a12ba65
2018-03-28 15:54:01.853 ERROR 21776 --- [nio-8080-exec-8] c.e.m.web.controller.TestController : param:aaaaa
2018-03-28 15:54:03.788 ERROR 21776 --- [nio-8080-exec-5] c.e.m.web.controller.TestController : param:bbbb
2018-03-28 15:54:11.854 ERROR 21776 --- [nio-8080-exec-8] c.e.m.web.controller.TestController : time:10000
2018-03-28 15:54:13.788 ERROR 21776 --- [nio-8080-exec-5] c.e.m.web.controller.TestController : time:10000
可以看到兩次執(zhí)行foo2請(qǐng)求,基本是同時(shí)執(zhí)行,但兩次執(zhí)行user,中間間隔時(shí)間較長(zhǎng)
因?yàn)槲以?agent
里邊做了一下處理,所有我懷疑是不是 javassist
沒(méi)有被加載,導(dǎo)致我獲取不到 ClassPool
wangEditor 貼下關(guān)于編輯器的代碼
北大青鳥APTECH成立于1999年。依托北京大學(xué)優(yōu)質(zhì)雄厚的教育資源和背景,秉承“教育改變生活”的發(fā)展理念,致力于培養(yǎng)中國(guó)IT技能型緊缺人才,是大數(shù)據(jù)專業(yè)的國(guó)家
北大青鳥中博軟件學(xué)院創(chuàng)立于2003年,作為華東區(qū)著名互聯(lián)網(wǎng)學(xué)院和江蘇省首批服務(wù)外包人才培訓(xùn)基地,中博成功培育了近30000名軟件工程師走向高薪崗位,合作企業(yè)超4
中公教育集團(tuán)創(chuàng)建于1999年,經(jīng)過(guò)二十年潛心發(fā)展,已由一家北大畢業(yè)生自主創(chuàng)業(yè)的信息技術(shù)與教育服務(wù)機(jī)構(gòu),發(fā)展為教育服務(wù)業(yè)的綜合性企業(yè)集團(tuán),成為集合面授教學(xué)培訓(xùn)、網(wǎng)
達(dá)內(nèi)教育集團(tuán)成立于2002年,是一家由留學(xué)海歸創(chuàng)辦的高端職業(yè)教育培訓(xùn)機(jī)構(gòu),是中國(guó)一站式人才培養(yǎng)平臺(tái)、一站式人才輸送平臺(tái)。2014年4月3日在美國(guó)成功上市,融資1
曾工作于聯(lián)想擔(dān)任系統(tǒng)開發(fā)工程師,曾在博彥科技股份有限公司擔(dān)任項(xiàng)目經(jīng)理從事移動(dòng)互聯(lián)網(wǎng)管理及研發(fā)工作,曾創(chuàng)辦藍(lán)懿科技有限責(zé)任公司從事總經(jīng)理職務(wù)負(fù)責(zé)iOS教學(xué)及管理工作。
浪潮集團(tuán)項(xiàng)目經(jīng)理。精通Java與.NET 技術(shù), 熟練的跨平臺(tái)面向?qū)ο箝_發(fā)經(jīng)驗(yàn),技術(shù)功底深厚。 授課風(fēng)格 授課風(fēng)格清新自然、條理清晰、主次分明、重點(diǎn)難點(diǎn)突出、引人入勝。
精通HTML5和CSS3;Javascript及主流js庫(kù),具有快速界面開發(fā)的能力,對(duì)瀏覽器兼容性、前端性能優(yōu)化等有深入理解。精通網(wǎng)頁(yè)制作和網(wǎng)頁(yè)游戲開發(fā)。
具有10 年的Java 企業(yè)應(yīng)用開發(fā)經(jīng)驗(yàn)。曾經(jīng)歷任德國(guó)Software AG 技術(shù)顧問(wèn),美國(guó)Dachieve 系統(tǒng)架構(gòu)師,美國(guó)AngelEngineers Inc. 系統(tǒng)架構(gòu)師。