Chinaunix首页 | 论坛 | 博客
  • 博客访问: 832367
  • 博文数量: 180
  • 博客积分: 10029
  • 博客等级: 上将
  • 技术积分: 2185
  • 用 户 组: 普通用户
  • 注册时间: 2009-11-06 09:15
文章存档

2010年(133)

2009年(47)

我的朋友

分类: 系统运维

2010-03-20 22:31:17

# Netlogo Publication Script


# (c) 2004 Steven Brewer; Biology Computer Resource Center
# Free Software under the Creative Commons Attribution License:


# Set the title, which should match the file name of the this file as well 
# as the nlogo and html files all in the same directory

$title="lac_operon"
;

# If you want to have the simulation load when you visit a directory URL,
# add "index.php" to the DirectoryIndex directive in httpd.conf and then
# create a symbolic link to this file from index.php, e.g.
#   ln -s lac_operon.php index.php

# You may need to adjust where the file looks for the netlogoLite.jar files

# this routine parses the html file, grabbing the line with the 
# dimensions of the applet and truncating the top;
$fp fopen ("${title}.html""r"
);
  
$line=0
;
  while (!
feof ($fp
)) {
    
$buffer fgets($fp4096
);
    if(
preg_match("/^\s+width=.*/",$buffer,$matches
)) {
      
$width $buffer
;
    }
    if(
$line>58
) {
      
$rest .= $buffer
;
    }
  
$line
++;
  }

?>


<FONT color=#0000bb><? </FONT><FONT color=#007700>echo </FONT><FONT color=#0000bb>$title</FONT><FONT color=#007700>; </FONT><FONT color=#0000bb>?></FONT>



echo $title?>


echo $title?>.php">Use Netlogo 1.3: 
# We present a form that let's people select which Netlogo engine to use
if ($old
) {
echo 
"\n"
;
}
else {
  echo 
"\n"
;
}
?>



if($old) {
?>


        archive="../../NetLogoLite-1.3.jar"
echo $width?>
           value="echo $title?>.nlogo">
           value="true">

}
else {
?>
        archive="../../NetLogoLite.jar"
echo $width?>
           value="echo $title?>.nlogo">
           value="false">

}
?>


created with
NetLogo



view/download model file:
echo $title?>.nlogo">echo $title?>.nlogo



echo $rest;
 
?>
阅读(1014) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~