2017/05/17

自転車タイヤのサイズ表記の見方

 700 × 25 C

700 → タイヤの外径を、ミリメートルで示しています。
25 → タイヤの幅(太さ)を、ミリメートルで示しています。
C → リム(鉄部分?)の大きさ
を表す記号です

2017/05/07

exec-maven-plugin java angular

pomファイルに下記を追加:
<build>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>exec-maven-plugin</artifactId>
                <configuration>
                    <mainClass>com.example.DemoApplication</mainClass>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>exec-maven-plugin</artifactId>
                <configuration>
                    <workingDirectory>${project.basedir}/src/main/angular</workingDirectory>
                    <executable>ng.cmd</executable>
                    <arguments>
                        <argument>build</argument>
                        <argument>--watch</argument>
                        <argument>--output-path=${project.basedir}/src/main/resources/static</argument>
                    </arguments>
                </configuration>
            </plugin>
        </plugins>
    </build>


IDEのdebug configurationのmaven goadsに
exec:exec
を記載してangular buildを実行する
exec:javaでspringを実行する

 うまくいきました!!
次はangularのhot swapping ね!!

2017/05/06

spring-boot:run does not stop the tomcat

eclipseでmvn spring-boot:run を停止して、tomcatがまだ生きる

the port has been usedになる。


The best way to "fix" that is to not do it. Why would you need to run a maven goal from eclipse when you can just right click in the main class and Run As->Java Application?

boot dashboardも回避できる。
=> boot dashboardの仕組みは?単純に実行したことを思えたかな?
   あとで調べる

spring-boot hot swapping にする

・pomフィアルに下記を追記する

    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-devtools</artifactId>
            <optional>true</optional>
        </dependency>
    </dependencies>
  
・IDEの自動ビルドを有効にする


他に、devtoolsはcacheを無効にしている。
properties.put("spring.thymeleaf.cache", "false");
properties.put("spring.freemarker.cache", "false");
properties.put("spring.groovy.template.cache", "false");
properties.put("spring.mustache.cache", "false");
properties.put("server.session.persistent", "true");
properties.put("spring.h2.console.enabled", "true");
properties.put("spring.resources.cache-period", "0");
properties.put("spring.resources.chain.cache", "false");
properties.put("spring.template.provider.cache", "false");
properties.put("spring.mvc.log-resolved-exception", "true");
properties.put("server.jsp-servlet.init-parameters.development", "true");

また、
By default, any entry on the classpath that points to a folder will be monitored for changes. Note that certain resources such as static assets and view templates do not need to restart the application.

HERE:

 https://docs.spring.io/spring-boot/docs/current/reference/html/using-boot-devtools.html#using-boot-devtools-restart-exclude

2017/04/19

持ち家のコスト

【諸費用参考例】


・物件(新築マンション):専有面積…75m2


・物件価格:3000万円(消費税込み、うち建物評価額2000万円)

・固定資産税評価額:建物…1300万円、土地…600万円


・住宅ローン(民間融資):借入金額2400万円(元利均等、30年)






取得




項目 金額(万円)

1 土地 1000  
2 建物 2000  
3 消費税     役所
4 売買契約 印紙税 1.5  
5 土地所有権移転登記 登録免許税 6  
6 建物所有権保存登記 登録免許税 1.9  
7 不動産取得税 3  
  水道負担金    
8 司法書士に登記依頼の場合、司法書士報酬 10   司法書士
9 住宅ローン契約 印紙税 2   銀行
10 融資手数料 5  
11 融資保証料 47  
12 団体信用生命保険料 6.7 ローンの年数*6.7
13 引越し代     引越し業者
14 家具など    
15 仲介手数料     不動産業者


83.1

維持



1 火災保険料 5 一年分
2 地震保険料 5 一年分
3 日割り固定資産税 6  

eclipse error

workspace\.metadata/.log

eclipse.exe -clean

治らない。。

marketplaceのおすすめがおるさい。。
general ->editer->関連付けられていないファイルのオープンを「text editor]にする

2017/02/06

python

import os
print(os.getcwd())
=>install directory!

import math
dir(math)
=>to see that in math module

from math import ceil
print ceil(4.5)
=>not necessary to use math.

import tkinter
import tkinter.filedialog
tk = tkinter.Tk()
tk.withdraw()        # 小ウィンドウを表示しないようにする。
args = { “initialdir” : “c:/”,
“filetypes” : [(“テキストファイル”, “*.txt”)],
“title” : “テスト”
}
print (tkinter.filedialog.askopenfilename(**args))
input(“press enter”)
=>open the file


myword=u"あいうえお”
=>japanese words is unicode 2 bytes
myword=myword.decode('utf-8')
->read in utf,out in utf

def my_methord():