3.0.x - > 3.nへのデータ移行
3.0.xのデータを抽出し、DataFixtureで読み込み可能なCSVへ変換する
以下の操作で3.0.xデータを3.nで移行できるようにする(イメージ)
cd /path/to/eccube30
php app/console convert::3n /path/to/eccube3n/src/Resouce/doctrine/import_csv
3.0.x - > 3.nへのデータ移行
3.0.xのデータを抽出し、DataFixtureで読み込み可能なCSVへ変換する
以下の操作で3.0.xデータを3.nで移行できるようにする(イメージ)
cd /path/to/eccube30
php app/console convert::3n /path/to/eccube3n/src/Resouce/doctrine/import_csv
The other day, I saw Harold Cooper's One-line tree in Python via autovivication, and wondered if the same thing was possible in Groovy.
The answer is yes! But you need to define the variable tree
before you can assign it to the self-referential withDefault
closure, hence with Groovy, it's a two-line solution ;-)
Anyway, given:
def tree = { [:].withDefault{ owner.call() } }
@Grab('org.twitter4j:twitter4j-stream:2.2.3') | |
import twitter4j.* | |
new TwitterStreamFactory().instance.with { | |
addListener([onStatus:{println "@${it.user.screenName}: ${it.text}"}] as UserStreamAdapter); user() | |
} |
// PostgreSQL | |
@GrabConfig(systemClassLoader=true) | |
@Grab('postgresql:postgresql:9.0-801.jdbc4') | |
def sql = groovy.sql.Sql.newInstance( | |
"jdbc:postgresql://host.example.org/database", | |
"username", "password", "org.postgresql.Driver") | |
// MySQL | |
@GrabConfig(systemClassLoader=true) |
@Grab('pircbot:pircbot:1.4.2') | |
import org.jibble.pircbot.*; | |
def (host, port, channel) = ['<Server>', <Port>, '<Channel>'] | |
def bot = [:] as PircBot | |
bot.name = 'groovy_bot' | |
bot.encoding = 'ISO-2022-JP' | |
bot.connect host, port | |
bot.joinChannel channel |