PastDays
RSS
No reproduction or republication without written permission.
written by ... sakag_blue @ machine.homeunix.org
(or........... sakag_blue @ users.sourceforge.net)
Home
Powered by ThingamaBlog
| GoogleSearch In This Weblog... |
|
|
さよなら、こんな毎日…
|
JLoom 1.3
:: 2007.11.05 9:32.05 ::
|
|
http://jloom.sourceforge.net/
JLoom is a JSP like template language for text generation - e.g. source
code, HTML, XML. JLoom templates are modular encapsulated. Parameters
can be any Java type, even Generics or Varargs. There is a plugin for
Eclipse and a command line tool.
Permalink
Categories: {template_engine}
|
|
|
JSqsh 0.9.4 もちょこっと
:: 2007.09.28 16:40.28 ::
|
|
http://jsqsh.wiki.sourceforge.net/
JSqsh (pronounced jay-skwish) is a Java re-implementation of a tool that I originally authored called sqsh (also hosted on SourceForge). The original sqsh was a Sybase-specific console based tool (i.e. non-graphical) that combined the ability to query the database with much of the functionality of a shell, such as piping the results of queries out to external programs (grep, more, etc.), expanding variables, redirecting output to files, command line editing, etc.
で、なぜTemplate_Engineかっていうと…こちら。
Under the hood, jsqsh uses an engine called Velocity to implement its variable expansion logic. This means that you have access to more than just basic variable expansion; velocity supports its own small language with if/then/else logic and much more. For a detailed reference on Velocity, see the Velocity Users Guide.
ちょこっとだけWinXP/JRE1.6/h2-2006-08-31で…以下。
C:\temp\jsqsh-0.9.4-win\jsqsh-0.9.4\bin のディレクトリ
2007/09/28 15:24 <DIR> .
2007/09/28 15:24 <DIR> ..
2007/09/27 15:11 436,661 JavaGetline.dll
2007/09/27 15:11 22,792 jsqsh.dll
2007/09/27 15:11 19,456 jsqsh.exe
3 個のファイル 478,909 バイト
2 個のディレクトリ 11,625,619,456 バイトの空き領域
C:\temp\jsqsh-0.9.4-win\jsqsh-0.9.4\bin>jsqsh.exe
WELCOME TO SQSH!
It looks like this is the first time that you've run sqsh (or
you just typed '\help welcome' at the sqsh prompt). If this is
the first time you have run sqsh, you will find that you have
a shiney new directory called '.jsqsh' in your home directory
and that this directory contains a couple of files that you
should be aware of:
drivers.xml - Sqsh comes pre-defined to understand how to use
a fixed number of JDBC drivers, however this file may be
used to teach it how to recognize other JDBC drivers. The
file is pretty well commented, so hopefully it is enough
to get you started.
sqshrc - Everything contained in this file is executed just
as if you had typed commands at the sqsh prompt and is
the place where you can set variables and configure sqsh
to your likings.
Sqsh is intended to be self-documenting. If you would like
to see this information again, then type '\help welcome' at
the sqsh prompt, or run '\help' to see a list of all help
topics that are available.
JSqsh Release 0.9.4, Copyright (C) 2007, Scott C. Gray
Type \help for available help topics
1>
1> \help
+----------+-----------------+--------------------------------------------------
-------------+
| Type | Name | Description
|
+----------+-----------------+--------------------------------------------------
-------------+
| Command | \alias | Creates an alias
|
| Command | \buf-append | Appends the contents of one SQL buffer into anoth
er |
| Command | \buf-copy | Copies the contents of one SQL buffer into anothe
r |
| Command | \buf-edit | Edits a SQL buffer
|
| Command | \buf-load | Loads an external file into a SQL buffer
|
| Command | \connect | Establishes a connection to a database.
|
| Command | \databases | Displays set of available databases (catalogs)
|
| Command | \describe | Displays a description of a table (or view)
|
| Command | \drivers | Displays a list of JDBC drivers known by sqsh.
|
| Command | \echo | Displays a line of text.
|
| Command | \end | Ends the current session
|
| Command | \go | Executes the contents of the current buffer
|
| Command | \help | Displays help for a sqsh command
|
| Command | \history | Displays a history of SQL statements executed
|
| Command | \macro | Creates a velocimacro from the current buffer
|
| Command | \quit | Exits sqsh
|
| Command | \reset | Clears the current SQL buffer of its contents.
|
| Command | \session | Displays set of sessions or switches to another s
ession. |
| Command | \set | Sets a variable or displays all variables.
|
| Command | \tables | Displays tables, views, synonyms, etc.
|
| Command | \unset | Removes a sqsh variable.
|
| Command | \wrap | Used internally for testing of sqsh's word-wrappi
ng facility. |
| Variable | autocommit | Contains the connection's current auto-commit sta
tus |
| Variable | classpath | Defines JDBC driver locations
|
| Variable | connected | Indicates whether or not the current session is c
onnected |
| Variable | database | Contains the connection's current database
|
| Variable | dflt_autocommit | Controls the autocommit setting for new connectio
ns |
| Variable | dflt_database | Controls the default database for new connections
|
| Variable | expand | Determines if SQL will have variable expansion pe
rformed |
| Variable | fmt_date | Controls the representation of date
|
| Variable | fmt_datetime | Controls the representation of datatimes
|
| Variable | fmt_float | Controls the representation of floating point val
ues |
| Variable | fmt_int | Controls the representation of integer values
|
| Variable | fmt_time | Controls the representation of time
|
| Variable | histsize | Controls the number of SQL statements retained in
history |
| Variable | id | Contains the session id of the current session
|
| Variable | interactive | Whether or not the current session is interactive
|
| Variable | lineno | Contains the current line number being entered
|
| Variable | maxlen | The maximum display width of a column
|
| Variable | maxrows | Limits the size of query results
|
| Variable | null | Controls the representation of nulls
|
| Variable | prompt | Defines the query prompt
|
| Variable | shell | Defines the O/S shell used to execute commands
|
| Variable | style | Controls the display style of SQL output
|
| Variable | terminator | Defines the SQL statement terminator
|
| Topic | buffers | SQL buffers and how they are referenced.
|
| Topic | jni | Features provided by the sqsh JNI layer
|
| Topic | license | Displays the sqsh license
|
| Topic | readline | Describes sqsh's use of GNU Readline
|
| Topic | welcome | The sqsh welcome message
|
+----------+-----------------+--------------------------------------------------
-------------+
1>
1> drivers
2> \drivers
+-----------------+-------------+----------------------------------------------+
----------------------------------------------+
| Target | Name | URL |
Class |
+-----------------+-------------+----------------------------------------------+
----------------------------------------------+
| IBM DB2 | db2 | jdbc:db2://${server}:${port} |
COM.ibm.db2.jdbc.net.DB2Driver |
| MS SQL Server | mssql | jdbc:microsoft:sqlserver://${server}:${port} |
com.microsoft.sqlserver.jdbc.SQLServerDriver |
| * MS SQL Server | mssql-jtds | jdbc:jtds:sqlserver://${server}:${port} |
net.sourceforge.jtds.jdbc.Driver |
| MySQL | mysql | jdbc:mysql://${server}:${port} |
org.gjt.mm.mysql.Driver |
| Oracle | oracle | jdbc:oracle:thin:@${server}:${port}:${SID} |
oracle.jdbc.driver.OracleDriver |
| PostgreSQL | pgsql | jdbc:postgresql://${server}:${port} |
org.postgresql.Driver |
| Sybase | sybase | jdbc:sybase:Tds:${server}:${port} |
com.sybase.jdbc2.jdbc.SybDriver |
| * Sybase | sybase-jtds | jdbc:jtds:sybase://${server}:${port} |
net.sourceforge.jtds.jdbc.Driver |
+-----------------+-------------+----------------------------------------------+
----------------------------------------------+
2> quit
*****H2に関してはDriverが同梱されていないので
$HOMEにある.jsqsh/drivers.xmlを編集、以下のようなエントリを追加します。*****
<Driver name="h2"
target="H2"
class="org.h2.Driver"
analyzer="org.sqsh.analyzers.TSQLAnalyzer"
url="jdbc:h2:tcp://${server}:${port}/test">
<Variable name="server">localhost</Variable>
<Variable name="port">9092</Variable>
</Driver>
*****で、再度実行。*****
C:\temp\jsqsh-0.9.4-win\jsqsh-0.9.4\bin>jsqsh.exe
JSqsh Release 0.9.4, Copyright (C) 2007, Scott C. Gray
Type \help for available help topics
1> \drivers
+-----------------+-------------+----------------------------------------------+
----------------------------------------------+
| Target | Name | URL |
Class |
+-----------------+-------------+----------------------------------------------+
----------------------------------------------+
| IBM DB2 | db2 | jdbc:db2://${server}:${port} |
COM.ibm.db2.jdbc.net.DB2Driver |
| * H2 | h2 | jdbc:h2:tcp://${server}:${port}/test |
org.h2.Driver |
| MS SQL Server | mssql | jdbc:microsoft:sqlserver://${server}:${port} |
com.microsoft.sqlserver.jdbc.SQLServerDriver |
| * MS SQL Server | mssql-jtds | jdbc:jtds:sqlserver://${server}:${port} |
net.sourceforge.jtds.jdbc.Driver |
| MySQL | mysql | jdbc:mysql://${server}:${port} |
org.gjt.mm.mysql.Driver |
| Oracle | oracle | jdbc:oracle:thin:@${server}:${port}:${SID} |
oracle.jdbc.driver.OracleDriver |
| PostgreSQL | pgsql | jdbc:postgresql://${server}:${port} |
org.postgresql.Driver |
| Sybase | sybase | jdbc:sybase:Tds:${server}:${port} |
com.sybase.jdbc2.jdbc.SybDriver |
| * Sybase | sybase-jtds | jdbc:jtds:sybase://${server}:${port} |
net.sourceforge.jtds.jdbc.Driver |
+-----------------+-------------+----------------------------------------------+
----------------------------------------------+
1> \connect -d h2 -U SASA -S localhost -p 9092
Password:*******
[localhost][SASA] 1>
[localhost][SASA] 1> select count(*) from AAAAA;
+----------+
| COUNT(*) |
+----------+
| 2 |
+----------+
1 rows in results (first row: 0ms; total: 16ms)
[localhost][SASA] 1>
[localhost][SASA] 2> \echo "sasasa"
sasasa
[localhost][SASA] 2>
[localhost][SASA] 3> \set wo="aaa"
[localhost][SASA] 4> \echo $wo
aaa
\set文に日本語が設定できるとうれしいんだけどなあ…。
Permalink
Categories: {database} {Script_on_Java} {template_engine}
|
|
|
VelocityWeb 1.0
:: 2007.09.04 15:17.52 ::
|
|
http://velocityweb.sourceforge.net/
VelocityWeb is a zero-configuration web application framework for J2EE.
It provides new technology for developing/unit testing without J2EE
server.It uses Velocity HTML files as view and Apache Common DBUtils as
DAO with pattern TRANSACTION_PER_REQUEST.
Easy layout for web
pages, uniform success/fail page, simple O/R mapping using ANSI/ISO
SQL(DBUtils), generated DAO classes for normal case such as
insert/update/delete/get by PK.
Permalink
Categories: {database} {template_engine}
|
|
|
JRubyでHamlを
:: 2007.07.26 15:49.01 ::
|
|
http://haml.hamptoncatlin.com/
Haml is a markup language that’s used to cleanly and simply describe the XHTML of any web document without the use of inline code. Haml functions as a replacement for inline page templating systems such as PHP, ASP, and ERB, the templating language used in most Ruby on Rails applications. However, Haml avoids the need for explicitly coding XHTML into the template, because it itself is a description of the XHTML, with some code to generate dynamic content.
ということでgemでのインストールから…。
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\>cd temp
C:\temp>cd jruby-bin-1.0
C:\temp\jruby-bin-1.0>cd jruby-1.0
C:\temp\jruby-bin-1.0\jruby-1.0>dir
ドライブ C のボリューム ラベルがありません。
ボリューム シリアル番号は 4012-70A2 です
C:\temp\jruby-bin-1.0\jruby-1.0 のディレクトリ
2007/07/26 13:22 <DIR> .
2007/07/26 13:22 <DIR> ..
2007/07/26 13:22 <DIR> bin
2007/06/07 10:39 458 COPYING
2007/06/07 10:39 11,649 COPYING.CPL
2007/06/07 10:39 15,144 COPYING.GPL
2007/06/07 10:39 26,430 COPYING.LGPL
2007/07/26 13:22 <DIR> docs
2007/07/26 13:22 <DIR> lib
2007/06/07 10:39 1,666 README
2007/07/26 13:22 <DIR> samples
5 個のファイル 55,347 バイト
6 個のディレクトリ 9,770,463,232 バイトの空き領域
C:\temp\jruby-bin-1.0\jruby-1.0>bin\gem install haml
Successfully installed haml-1.7.0
Installing ri documentation for haml-1.7.0...
While generating documentation for haml-1.7.0
... MESSAGE: Unhandled special: Special: type=17, text="<!-- This is the billa
bong element -->"
... RDOC args: --ri --op C:/temp/jruby-bin-1.0/jruby-1.0/lib/ruby/gems/1.8/doc/h
aml-1.7.0/ri --title Haml --main README --exclude lib/haml/buffer.rb --line-numb
ers --inline-source --quiet lib VERSION MIT-LICENSE README
(continuing with the rest of the installation)
Installing RDoc documentation for haml-1.7.0...
C:\temp\jruby-bin-1.0\jruby-1.0>bin\jruby.bat bin\haml
Usage: haml [options] (haml file) (output file)
Description:
Uses the Haml engine to parse the specified template
and outputs the result to the specified file.
Options:
--rails RAILS_DIR Install Haml from the Gem to a Rails projec
t
--stdin Read input from standard input instead of a
n input file
--stdout Print output to standard output instead of
an output file
-s, --stdio Read input from standard input and print ou
tput to standard output
--trace Show a full traceback on error
-?, -h, --help Show this message
-v, --version Print version
C:\temp\jruby-bin-1.0\jruby-1.0>
C:\temp\jruby-bin-1.0\jruby-1.0>bin\jruby.bat bin\haml -s
#main
.note
%h2 わわわわー
^Z
<div id='main'>
<div class='note'>
<h2>わわわわー</h2>
</div>
</div>
うーん、動作してるようにも思えるけど…。
C:\temp\jruby-bin-1.0\jruby-1.0>more bin\haml_test_2.rb
#main
.note
%h2 わわわわー
%ul
%li
Haml is indented with
%strong two spaces *only*
%li
The first character of any line is called
the "control character"
%li Haml magically takes care of indention for you
%li It looks complicated until you look closely.
%li
Haml does have blocks. Except, not in this example.
We turned them off for security.
%li If you see any errors here, please let me know
.note
You can get more information by reading the
%a{:href => "http://haml.hamptoncatlin.com/reference"}
Official Haml Reference
.note
%p
This example doesn't allow ruby to be
executed, but real Haml does in Rails.
%p
This would be done with an = at the end
or beginning of a line.
%p
Read the documentation for more information
C:\temp\jruby-bin-1.0\jruby-1.0>
C:\temp\jruby-bin-1.0\jruby-1.0>bin\jruby.bat bin\haml --stdout bin\haml_test_2.
rb
NoMethodError on line /temp/jruby-bin-1.0/jruby-1.0/lib/ruby/gems/1.8/gems/haml-
1.7.0/lib/haml/engine.rb:232:in `do_precompile': undefined method `rstrip' for n
il:NilClass
Use --trace to see traceback
C:\temp\jruby-bin-1.0\jruby-1.0>bin\jruby.bat bin\haml
C:\temp\jruby-bin-1.0\jruby-1.0>
C:\temp\jruby-bin-1.0\jruby-1.0>bin\jruby.bat bin\haml bin\haml_test_2.rb bin\ha
ml_test.html
NoMethodError on line /temp/jruby-bin-1.0/jruby-1.0/lib/ruby/gems/1.8/gems/haml-
1.7.0/lib/haml/engine.rb:232:in `do_precompile': undefined method `rstrip' for n
il:NilClass
Use --trace to see traceback
C:\temp\jruby-bin-1.0\jruby-1.0>
C:\temp\jruby-bin-1.0\jruby-1.0>
C:\temp\jruby-bin-1.0\jruby-1.0>
空行があるとエラーになるみたい…これはバグなのかしらん?
時間があるときに…ということで。とりあえず、以下。
C:\temp\jruby-bin-1.0\jruby-1.0>
C:\temp\jruby-bin-1.0\jruby-1.0>
C:\temp\jruby-bin-1.0\jruby-1.0>more bin\haml_test_2.rb
#main
.note
%h2 わわわわー
%ul
%li
Haml is indented with
%strong two spaces *only*
%li
The first character of any line is called
the "control character"
%li Haml magically takes care of indention for you
%li It looks complicated until you look closely.
%li
Haml does have blocks. Except, not in this example.
We turned them off for security.
%li If you see any errors here, please let me know
.note
You can get more information by reading the
%a{:href => "http://haml.hamptoncatlin.com/reference"}
Official Haml Reference
.note
%p
This example doesn't allow ruby to be
executed, but real Haml does in Rails.
%p
This would be done with an = at the end
or beginning of a line.
%p
Read the documentation for more information
C:\temp\jruby-bin-1.0\jruby-1.0>
C:\temp\jruby-bin-1.0\jruby-1.0>
C:\temp\jruby-bin-1.0\jruby-1.0>
C:\temp\jruby-bin-1.0\jruby-1.0>
C:\temp\jruby-bin-1.0\jruby-1.0>bin\jruby.bat bin\haml --stdout bin\haml_test_2.
rb
<div id='main'>
<div class='note'>
<h2>わわわわー</h2>
<ul>
<li>
Haml is indented with
<strong>two spaces *only*</strong>
</li>
<li>
The first character of any line is called
the "control character"
</li>
<li>Haml magically takes care of indention for you</li>
<li>It looks complicated until you look closely.</li>
<li>
Haml does have blocks. Except, not in this example.
We turned them off for security.
</li>
<li>If you see any errors here, please let me know</li>
</ul>
</div>
<div class='note'>
You can get more information by reading the
<a href='http://haml.hamptoncatlin.com/reference'>
Official Haml Reference
</a>
</div>
<div class='note'>
<p>
This example doesn't allow ruby to be
executed, but real Haml does in Rails.
</p>
<p>
This would be done with an = at the end
or beginning of a line.
</p>
<p>
Read the documentation for more information
</p>
</div>
</div>
C:\temp\jruby-bin-1.0\jruby-1.0>
きっちり動作確認したほうがいいかも…のHaml on JRubyでした。動作環境はWinXP/JRE1.6.0_01/JRuby 1.0/Haml1.7.0です。
Permalink
Categories: {Script_on_Java} {template_engine}
|
|
|
JSSP - JavaScript Server Pages 0.1alpha
:: 2007.07.26 8:23.52 ::
|
|
http://jssp.sourceforge.net
JavaScript Server Pages is a way to execute JavaScript on a web server
similar to ASP, PHP or JSP. It requires a web server that can run Java
Servlets (such as Tomcat, JBoss or others).
Permalink
Categories: {Script_on_Java} {template_engine}
|
|
|
JSTE: Javascript templates 0.11
:: 2007.07.08 12:46.30 ::
|
|
http://jste.sourceforge.net/
JSTE is a Java-based templating language for producing dynamic content,
which is typically useful in web applications. JSTE's purpose is similar
to that of JSP, Velocity and FreeMarker, with the key difference that
JSTE uses Javascript for the computational aspects of template
expansion. This enables template authors to employ the full power of
Javascript, including functions, closures, objects and delegation, in
creating templates.
Permalink
Categories: {template_engine}
|
|
|
The Milyn Project
:: 2007.07.08 12:09.34 ::
|
|
http://docs.codehaus.org/display/MILYN/Home
The Milyn Project is building Open-Source Java components for performing
Data Transformation and Analysis.
で、その中の「Smooks」…。
Smooks is a Java framework for performing Fragment based Data
Transformation and Analysis using existing technologies such as XSL,
StringTemplate, Java and Groovy. Smooks allows you to mix and match
different technologies within the context of a single message transform,
but does so in a way that provides a degree of isolation between the
different technologies. This helps to maintain the portability of your
transformation/analysis logic.
Permalink
Categories: {Script_on_Java} {template_engine} {XML}
|
|
|
MVEL 1.2 Pre 0
:: 2007.07.07 13:41.22 ::
|
|
http://docs.codehaus.org/display/MVEL/Home
MVEL is similar to other offerings such as OGNL, and offers many of the
same functionalities in that respect.
MVEL is general
purpose. It may be useful as an extension to anything from use in JSP
Tag Libraries, to the configuration facilities of your
library/framework. In addition to being an expression language, MVEL
also comes packaged with an equally high-performance templating system
similar to Velocity and FreeMarker.
Permalink
Categories: {Script_on_Java} {template_engine} {XML}
|
|
|
XWiki 1.0
:: 2007.07.02 7:16.38 ::
|
|
http://www.xwiki.org/xwiki/bin/view/Main/
あ、こんなことも。
XWiki integrates both Velocity and Groovy scripting. Together, these two
mechanisms allow you to create basic to complex web applications at the
XWiki page (or view) layer without the need for compiling code or
deploying software components. In other words, you can use Velocity and
Groovy script syntax in addition to wiki and HTML syntax as the contents
of an XWiki page.
Permalink
Categories: {CMS-Wiki-Blog} {Script_on_Java} {template_engine}
|
|
|
Release of Anakia 1.0 and Texen 1.0
:: 2007.05.19 11:19.57 ::
|
|
http://www.apachenews.org/archives/000989.html
Both Anakia and Texen were previously part of the core Velocity engine
distribution but have been split off into their own packages to simplify
maintenance and facilitate different release cycles. To avoid namespace
conflict, org.apache.velocity .anakia has been moved to
org.apache.anakiaand org.apache.velocity.texen has been changed to
org.apache.texen.
Permalink
Categories: {template_engine}
|
|
|
velocity2js 0.3
:: 2007.05.13 11:02.32 ::
|
|
http://velocity2js.sourceforge.net/
Support for the "velocityCount" variable was added along with support
for internationalization. Generated JavaScript files are now UTF-8. The
use of methods in #foreach was fixed. In the Ant task, error messages
were improved by linking to the source code in Netbeans, fileset support
was added, support for relative paths was added, and the ability to
specify the output JavaScript filename was added. Examples were improved.
Permalink
Categories: {template_engine}
|
|
|
velocity2js 0.2
:: 2007.05.02 15:31.25 ::
|
|
http://velocity2js.sourceforge.net/
Velocity2Js is a program which can generate JavaScript functions out of
Apache Velocity templates. These functions can be used in AJAX based Web
applications. Velocity2Js provides an ant task to integrate template
transformation in an existing build process.
Permalink
Categories: {template_engine}
|
|
|
Site re-construction & re-Start feed RSS
:: 2007.05.01 9:47.00 ::
|
Hi folks,
We are almost finishing re-construction of our weblog site.
Sorry, but past entry's urls were changed a little bit.
if you need, please change your bookmark.
And, we start to feed RSS again.
please pay attention that
No reproduction or republication without written permission.
thanks in advance,
http://machine.homeunix.org/weblog/
--------
ども。
このサイトの再構築の作業がほぼ終わったので
更新を再開します。
・ご覧の通り、タイトルをURLそのままにしました。
ほんとに「さよなら、こんな毎日・・・」に
なっちゃいましたね。
・文字コードをUTF-8にしました。
・過去のエントリ・カテゴリ別のページは
すべてURLが変わっています。
ご注意のほど。
・RSSに関してもfeedを再開しました。こちらも
UTF-8になってるはずです。
今のところ「http://machine.homeunix.org」の中の人は
「http://machine.homeunix.org」以外のサイトで
なにか公開する予定はありません。
ということでこれまでと同じように
続けていこうと思っていますが、
「週刊SourceForge」に関しては
その継続を含めて
まだ検討中ということで。
すいません。
Permalink
Categories: {CMS-Wiki-Blog} {database} {dinner-dinner-dinner} {ETC} {memo} {Script_on_Java} {SourceForge/Freshmeat} {template_engine} {testtool} {this_site} {workflow} {XML} {xul}
|
|
|