To track your health and improve your life.
��
This application was generated using JHipster 5.4.2, and serves as the sample application in the JHipster Mini-Book.
Before you can build this project, you must install and configure the following dependencies on your machine:
After installing Node, you should be able to run the following command to install development tools.You will only need to run this command when dependencies change in package.json.
yarn install
We use yarn scripts and Webpack as our build system.
Run the following commands in two separate terminals to create a blissful development experience where your browserauto-refreshes when files change on your hard drive.
./gradlew
yarn start
Yarn is also used to manage CSS and JavaScript dependencies used in this application. You can upgrade dependencies byspecifying a newer version in package.json. You can also run yarn update
and yarn install
to manage dependencies.Add the help
flag on any command to see how you can use it. For example, yarn help update
.
The yarn run
command will list all of the scripts available to run for this project.
Service workers are commented by default, to enable them please uncomment the following code.
<script>
if ('serviceWorker' in navigator) {
navigator.serviceWorker
.register('./service-worker.js')
.then(function() { console.log('Service Worker Registered'); });
}
</script>
Note: workbox creates the respective service worker and dynamically generate the service-worker.js
For example, to add Leaflet library as a runtime dependency of your application, you would run following command:
yarn add --exact leaflet
To benefit from TypeScript type definitions from DefinitelyTyped repository in development, you would run following command:
yarn add --dev --exact @types/leaflet
Then you would import the JS and CSS files specified in library's installation instructions so that Webpack knows about them:Edit src/main/webapp/app/vendor.ts file:
import 'leaflet/dist/leaflet.js';
Edit src/main/webapp/content/css/vendor.css file:
@import '~leaflet/dist/leaflet.css';
Note: there are still few other things remaining to do for Leaflet that we won't detail here.
For further instructions on how to develop with JHipster, have a look at Using JHipster in development.
You can also use Angular CLI to generate some custom client code.
For example, the following command:
ng generate component my-component
will generate few files:
create src/main/webapp/app/my-component/my-component.component.html
create src/main/webapp/app/my-component/my-component.component.ts
update src/main/webapp/app/app.module.ts
To optimize 21-Points Health for production, run:
./gradlew -Pprod clean bootWar
This will concatenate and minify the client CSS and JavaScript files. It will also modify index.html
so it references these new files.To ensure everything worked, run:
java -jar build/libs/*.war
Then navigate to http://localhost:8080 in your browser.
Refer to Using JHipster in production for more details.
To launch your application's tests, run:
./gradlew test
Unit tests are run by Jest and written with Jasmine. They're located in src/test/javascript/ and can be run with:
yarn test
UI end-to-end tests are powered by Protractor, which is built on top of WebDriverJS. They're located in src/test/javascript/e2eand can be run by starting Spring Boot in one terminal (./gradlew bootRun
) and running the tests (yarn run e2e
) in a second one.
Performance tests are run by Gatling and written in Scala. They're located in src/test/gatling.
To use those tests, you must install Gatling from https://gatling.io/.
For more information, refer to the Running tests page.
Sonar is used to analyse code quality. You can start a local Sonar server (accessible on http://localhost:9001) with:
docker-compose -f src/main/docker/sonar.yml up -d
Then, run a Sonar analysis:
./gradlew -Pprod clean test sonarqube
For more information, refer to the Code quality page.
You can use Docker to improve your JHipster development experience. A number of docker-compose configuration are available in the src/main/docker folder to launch required third party services.
For example, to start a postgresql database in a docker container, run:
docker-compose -f src/main/docker/postgresql.yml up -d
To stop it and remove the container, run:
docker-compose -f src/main/docker/postgresql.yml down
You can also fully dockerize your application and all the services that it depends on.To achieve this, first build a docker image of your app by running:
./gradlew bootWar -Pprod jibDockerBuild
Then run:
docker-compose -f src/main/docker/app.yml up -d
For more information refer to Using Docker and Docker-Compose, this page also contains information on the docker-compose sub-generator (jhipster docker-compose
), which is able to generate docker configurations for one or several JHipster applications.
To configure CI for your project, run the ci-cd sub-generator (jhipster ci-cd
), this will let you generate configuration files for a number of Continuous Integration systems. Consult the Setting up Continuous Integration page for more information.
研究高压结构时,经常需考察同一结构在不同压力下的键长、晶格参数、体积及相对能量的变化,此时需要对所研究的结构在不同压力下进行优化。在优化前务必对KPOINTS进行测试: 问题:低压下经测试使能量收敛的k点也试用于高压下的结构优化吗? 对于下面的方式一产生的KPOINTS不行!原则上高压下经测试使能量收敛的k点可适用于低压。 因为,高压结构拥有更小的晶格参数,对应更长的k空间参数,若在高压下采用N1
A lattice point (x, y) in the first quadrant (x and y are integers greater than or equal to 0), other than the origin, is visible from the origin if the line from (0, 0) to (x, y) does not pass throug
转自:https://www.cnblogs.com/xingkongyihao/p/9124635.html D. Points and Powers of Two standard output There are nn distinct points on a coordinate line, the coordinate of ii-th point equals to xixi. Cho
Given n points on a 2D plane, find the maximum number of points that lie on the same straight line. 求最大的共线点的个数 public class l149_maxpoints_in_line { static class Point{ int x; int
Points, inches and Emus: Measuring units in OfficeOpen XML After I got confused with the OfficeOpen XML (OOXML) measuring units for a couple of hours, I thought I’d share what I found on it. I order t
测试和调试 现在你的代码中已经充溢着Lambda表达式,看起来不错,也很简洁。 但是,大多数时候,我们受雇进行的程序开发工作的要求并不是编写优美的代码,而是编写正确的代码。 通常而言,好的软件工程实践一定少不了单元测试,借此保证程序的行为与预期一致。 测试用例 你编写测试用例,通过这些测试用例确保你代码中的每个组成部分都实现预期的结果。 比如,图形应用的一个简单的 Point 类,可以定义如下:
题目链接: D. Points and Powers of Two time limit per test 4 seconds memory limit per test 256 megabytes input standard input output standard output There are nn distinct points on a coordinate line, the c
因子 sex<-c(1,2);sex sex.f <- factor(sex);sex.f str(sex.f) stu.sex <- sample(1:2,10,replace= T);stu.sex stu.sex.f<-factor(stu.sex);stu.sex.f 有序因子 stu.sex.ord <- ordered(stu.sex, levels = c(1,2));stu.sex
下载地址:https://dl.google.com/android/repository/android-ndk-r21b-linux-x86_64.zip 1.下载 wget https://dl.google.com/android/repository/android-ndk-r21b-linux-x86_64.zip 2.解压 unzip android-ndk-r21b-linux-x
21-Points Health (React Version) This application refers to the book “The JHipster Mini-Book by Matt Raible”. In this application the examples of the book are made using React instead of Angular. This
AJAX,Asynchronous JavaScript and XML(异步的 JavaScript 和 XML), 是与在不重新加载整个页面的情况下,与服务器交换数据并更新部分网页的技术。
宏 宏是用来给语言添加新的结构,新的元素的。它们是一些在读入期(而不是编译期)就会实际代码替换的一个机制。 对于函数来说,它们的所有的参数都会被evaluate的, 而宏则会自动判断哪些参数需要evaluate。 这对于实现像 (if _condition_ _then-expr_ _else-expr_) 这样的结构是非常重要的。 如果 condition 是 true , 那么只有 "then
绝影第一次去公司周总先给他介绍同事:“小李是秘书,小周是程序员……以后你就跟着小周,他很厉害的,要好好跟他学习。” 他对小周点点头,本来想跟他打个招呼,但实在又不好称呼他。周总当然可以叫他小周,自己总不能这样叫他,叫“周哥”,绝影又觉得特别别扭,以前他还很少这样称呼一个人,所以他也就只好跟他点点头。 介绍完,周总安排绝影就坐小周旁边的办公桌,说:“那你们先忙吧,我就不打扰你们了。遇到什么问题要多问
worksheets() 从workbook工作簿中返回一个包含worksheet工作表的list列表。 返回类型:一个worksheet对象列表。 worksheets() 方法返回workbook工作簿中的worksheet工作簿对象列表。如果要对workbook工作簿中的每一个worksheet工作表都进行某项操作,会很有用: for worksheet in workbook.worksh
本章主要总结暂时不方便归到其他章节的题目。