File tree Expand file tree Collapse file tree 4 files changed +49
-0
lines changed
Expand file tree Collapse file tree 4 files changed +49
-0
lines changed Original file line number Diff line number Diff line change 1+ Our goal is to generate for you a complete and modern Web app or microservice architecture, unifying:
2+
3+ A high-performance and robust Java stack on the server side with Spring Boot
4+ A sleek, modern, mobile-first front-end with Angular and Bootstrap
5+ A robust microservice architecture with JHipster Registry, Netflix OSS, ELK stack and Docker
6+ A powerful workflow to build your application with Yeoman, Webpack/Gulp and Maven/Gradle
Original file line number Diff line number Diff line change 1+ You can checkout a sample generated AngularJS 1 application here.
2+
3+ You can checkout a sample generated Angular 4 application here.
4+
5+ JHipster is Open Source, and all development is done on GitHub
6+
7+ If you want to code with us, feel free to join!
8+ If you like the project, please give us a star on GitHub
Original file line number Diff line number Diff line change 1+ Install JHipster yarn global add generator-jhipster
2+
3+ Create a new directory and go into it mkdir myApp && cd myApp
4+
5+ Run JHipster and follow instructions on screen jhipster
6+
7+ Model your entities with JDL Studio and download the resulting jhipster-jdl.jh file
8+
9+ Generate your entities with jhipster import-jdl jhipster-jdl.jh
Original file line number Diff line number Diff line change 1+ # -*- coding: utf-8 -*-
2+ # 第 0006 题: 你有一个目录,放了你一个月的日记,都是 txt,为了避免分词的问题,假设内容都是英文,请统计出你认为每篇日记最重要的词。
3+ import operator
4+ import os
5+ import re
6+
7+ rootDir = 'diary/'
8+
9+
10+ def count_words (filename , words ):
11+ wordDict = dict ()
12+ for word in words :
13+ if word .lower () in wordDict :
14+ wordDict [word .lower ()] += 1
15+ else :
16+ wordDict [word .lower ()] = 1
17+ print ('%s word:%s' % (filename , max (wordDict .items (), key = operator .itemgetter (1 ))[0 ]))
18+
19+
20+ for top , dirnames , filenames in os .walk (rootDir ):
21+ for filename in filenames :
22+ file = open (rootDir + filename , 'r' )
23+ str = file .read ()
24+ reObj = re .compile ('\b ?(\w+)\b ?' )
25+ words = reObj .findall (str )
26+ count_words (filename , words )
You can’t perform that action at this time.
0 commit comments