Dear Prof Dan.
Thanks to reply my post.
I also don't know about XMLRPC exactly, but I can show the process.
XMLRPC is Remote Procedure Control to use XML. So I have sagemath
server and another blog server. I can use sage code in blog server
using XMLRPC.
So I write the post on my blog like this.
Simple Test!
[sagemath]A = matrix(4, 2, [1, 0, 1, 1, 1, 2, 1, 3])
print(A)[/sagemath]
[sagemath]b = matrix(4, 1, [1, 3, 4, 4])
print(b)[/sagemath]
[sagemath]A.rank()[/sagemath]
[sagemath]Ad = ((A.transpose() * A).inverse()) * A.transpose()
print(Ad)[/sagemath]
[sagemath]lssx = Ad * b
print(lssx)[/sagemath]
[sagemath]x = var('x')
P = point(((0, 1), (1, 3), (2, 4), (3, 4)))
P += plot(lssx[0, 0] + lssx[1, 0] * x, -1, 5, rgbcolor='red')
P.show(xmin=-1, xmax=5, ymin=0, ymax=5)[/sagemath]
Then wordpress plugin make worksheet based on txt like this.
http://nosyu.mireene.kr/wp/wordpress/26
system:sage
{{{
A = matrix(4, 2, [1, 0, 1, 1, 1, 2, 1, 3])
print(A)
}}}
{{{
b = matrix(4, 1, [1, 3, 4, 4])
print(b)
}}}
{{{
A.rank()
}}}
{{{
Ad = ((A.transpose() * A).inverse()) * A.transpose()
print(Ad)
}}}
{{{
lssx = Ad * b
print(lssx)
}}}
{{{
x = var('x')
P = point(((0, 1), (1, 3), (2, 4), (3, 4)))
P += plot(lssx[0, 0] + lssx[1, 0] * x, -1, 5, rgbcolor='red')
P.show(xmin=-1, xmax=5, ymin=0, ymax=5)
}}}
Then send this to sagemath server to use XMLRPC.
Sagemath server got this, and make the worksheet, evaluate each cell,
publish it and return the worksheet with result.
http://nosyu.mireene.kr/wp/wordpress/29
system:sage
{{{id=0|
A = matrix(4, 2, [1, 0, 1, 1, 1, 2, 1, 3])
print(A)
///
[1 0]
[1 1]
[1 2]
[1 3]
}}}
{{{id=1|
b = matrix(4, 1, [1, 3, 4, 4])
print(b)
///
[1]
[3]
[4]
[4]
}}}
{{{id=2|
A.rank()
///
2
}}}
{{{id=3|
Ad = ((A.transpose() * A).inverse()) * A.transpose()
print(Ad)
///
[ 7/10 2/5 1/10 -1/5]
[-3/10 -1/10 1/10 3/10]
}}}
{{{id=4|
lssx = Ad * b
print(lssx)
///
[3/2]
[ 1]
}}}
{{{id=5|
x = var('x')
P = point(((0, 1), (1, 3), (2, 4), (3, 4)))
P += plot(lssx[0, 0] + lssx[1, 0] * x, -1, 5, rgbcolor='red')
P.show(xmin=-1, xmax=5, ymin=0, ymax=5)
///
}}}
Then blog server receive this worksheet, and chage the good looking
format like this.
Simple Test!
<blockquote>
<div style="padding: 10px; background-color: #c9edff;">sage : A =
matrix(4, 2, [1, 0, 1, 1, 1, 2, 1, 3])
print(A)</div>
[1 0]
[1 1]
[1 2]
[1 3]</blockquote>
<blockquote>
<div style="padding: 10px; background-color: #c9edff;">sage : b =
matrix(4, 1, [1, 3, 4, 4])
print(b)</div>
[1]
[3]
[4]
[4]</blockquote>
<blockquote>
<div style="padding: 10px; background-color: #c9edff;">sage : A.rank()
</div>
2</blockquote>
<blockquote>
<div style="padding: 10px; background-color: #c9edff;">sage : Ad =
((A.transpose() * A).inverse()) * A.transpose()
print(Ad)</div>
[ 7/10 2/5 1/10 -1/5]
[-3/10 -1/10 1/10 3/10]</blockquote>
<blockquote>
<div style="padding: 10px; background-color: #c9edff;">sage : lssx =
Ad * b
print(lssx)</div>
[3/2]
[ 1]</blockquote>
<blockquote>
<div style="padding: 10px; background-color: #c9edff;">sage : x = var
('x')
P = point(((0, 1), (1, 3), (2, 4), (3, 4)))
P += plot(lssx[0, 0] + lssx[1, 0] * x, -1, 5, rgbcolor='red')
P.show(xmin=-1, xmax=5, ymin=0, ymax=5)</div>
<span style="color: black;"><img src="
http://NoSyu.homeip.net:8000/
home/pub/76/cells/5/sage0.png" alt="" /></span></blockquote>
http://nosyu.mireene.kr/wp/wordpress/?p=29
So I make XMLRPC class in sagemath server and wordpress XMLRPC client
plugin.
I think this code's license is GPL.
But how can I show this source?
upload the file? attach the code in this message?
Thanks again to reply my post.
Have a good day!^^
------------------------------------------------------------------------
누구나가 다, 자기 옆에서 눈물을 흘리며 신음하는 불행한 사람들에 비해 자기가 훨씬 더 불행하다고 생각하지요. 이게 바로 우리
가련한 인간들의 오만 중 하나입니다.
- 몬테크리스토 백작
it is the infirmity of our nature always to believe ourselves much
more unhappy than those who groan by our sides!
- The Count of Monte Cristo
c'est un des orgueils de notre pauvre humanité, que chaque homme se
croie plus malheureux qu'un autre malheureux qui pleure et qui gémit à
côté de lui
- Le Comte de Monte-Cristo
박진영 - Bak JinYeong
학부재학생 - Undergraduate
컴퓨터공학전공 - Department of Computer Engineering
정보통신공학부 - School of Information & Communication Engineering
성균관대학교 - SungKyunKwan University
블로그 -
http://nosyu.pe.kr
이메일 -
don...@skku.edu
> signature.asc
> < 1K보기다운로드