星期四, 4月 08, 2010

【網路空間設定】

最近作專題,需要用到一些在PHP.INI 裡面設定路徑,
然而 空間是免費的所以很多都沒有辦法條....


ini_set("display_errors",1);//可以顯示錯誤

set_include_path( "/...../pear_data/PEAR");//裡面填 需要用的路徑


星期六, 4月 03, 2010

【fancybox】AJAX來進行POST傳送

html 裡面的href 在網址的最後面
 放入#1 意思就是 $_POST['selector'] = 1

【html】
<a href="http://.../SummaryView/#1" class="adinfo2">
title="摘要"&gt;顯示摘要</a>
</code>

【JS】
<script type="text/javascript">
...
$(".adinfo2").fancybox({
ajax : {
  type: "POST"
}
});
....
</script>


【PHP】
//使用 selector 接收
echo $_POST['selector'];
?>




星期一, 3月 29, 2010

字型大小blogger

http://mingray.blogspot.com/2009/08/blogger.html
看到可以加入 調整字型的工具!!
效果很棒!!!

星期三, 12月 02, 2009

matlab 2009 12/03 w01


% program file w1_20091203.m
clear all;
close all;
x_n = [2 1 1/2 1/4];
nx = [-1 0 1 2];
h_n = [1 1 1 1 ];
nh = [0 1 2 3];
y_n = conv(x_n,h_n);
y_n2 = conv(h_n,x_n);

n0 = nx(1) + nh(1);
N = length(nx)+length(nh)-1;
n = n0:n0 + N-1;

subplot(211);
stem(n,y_n,'b');
grid;

subplot(212);
stem(n,y_n2,'r');
grid;

matlab 2009 12/03 w01


% program file w1_20091203.m
clear all;
close all;
n_x = [2 1 1/2 1/4];
nx = [-1 0 1 2];
h_n = [1 1 1 1 ];
nh = [0 1 2 3];
y_n = conv(n_x,h_n);

n0 = nx(1) + nh(1);
N = length(nx)+length(nh)-1;
n = n0:n0 + N-1;

subplot(111);
stem(n,y_n,'b');
grid;

星期三, 11月 18, 2009

matlab 2009 11/19 02


% program file lab20091119w1.m
clear all;
clf;
x_n = 10*ones(1,800);
r = 2;
l = 1;
ts = 0.01;
a = [1/ts + r/l -1/ts];
b = [1/l];
y_n = filter(b,a,x_n);
n = 0:1:800-1;

l2= 5;
a2 = [1/ts + r/l2 -1/ts];
b2 = [1/l2];
y2_n = filter(b2,a2,x_n);

x2_n = 10*(n>=50);
y2_n = filter(b2,a2,x2_n);

subplot(211);
stem(n,x2_n,'b');
grid;
subplot(212);
stem(n,y2_n,'b');
grid;


matlab 2009 11/19 01


% program file lab20091119w1.m
clear all;
clf;
x_n = 10*ones(1,400);
r = 2;
l = 1;
ts = 0.01;
a = [1/ts + r/l -1/ts];
b = [1/l];
y_n = filter(b,a,x_n);
n = 0:1:400-1;

subplot(211);
stem(n,x_n,'b');
grid;
subplot(212);
stem(n,y_n,'b');
grid;