Racket图的语法(Syntax for Racket plot)
我正在尝试关注如何使用2D绘图的球拍文档 。 不幸的是,我似乎无法让它工作(可能是简单的事情)
我的代码是:
#lang racket (require plot) (plot (function sin (-pi) pi #:label "y = sin(x)"))
而错误是:
compile: unbound identifier in module in: function
我是一个球拍/ lisp新手,所以如果很明显,我只是没有意识到这一点。 我也试过插入
(require racket/gui/base)
以及(plot-new-window? #t)
但那些似乎也没有。我在Ubuntu 12.04上使用racket v5.1.3。 我没有使用Dr. Racket。
I am trying to follow the racket documentation on how to use 2D plotting. Unfortunately, I can't seem to be able to get it to work (probably something simple)
My code is:
#lang racket (require plot) (plot (function sin (-pi) pi #:label "y = sin(x)"))
and the error is:
compile: unbound identifier in module in: function
I am a racket/lisp newbie, so if it is obvious, I just don't realize it. I have also tried inserting
(require racket/gui/base)
as well as(plot-new-window? #t)
but those don't seem to do the trick either.I'm using racket v5.1.3 on Ubuntu 12.04. I am not using Dr. Racket.
原文:https://stackoverflow.com/questions/15727861
更新时间:2022-04-28 06:04
最满意答案
你可以这样做:
- 删除
position: relative
.blabla
- 设置
position: absolute
.wrapper
,.parent
和.child
。.wrapper { position: absolute; width: 1280px; } .parent { position: absolute; } .child { position: absolute; width: 960px; } .blabla { overflow: hidden; background-color: red; height: 90px; margin: 10px; padding: 10px; } .bleble { height: 10px; width: 90px; background-color: blue; } .blibli { height: 150px; width: 60px; background-color: orange; } body { height: 900px; background-color: lightgreen; }
<body> <ul> <li class="blabla span6"> asdfasdf <br> <span>asdfas</span> <div class="bleble"></div> <br> <div class="wrapper"> <div class="parent"> <div class="child"> <div class="blibli">aabasdg</div> </div> </div> </div> </li> </ul> </body>
You can do this by:
- Removing
position: relative
from.blabla
- Setting
position: absolute
on.wrapper
,.parent
and.child
..wrapper { position: absolute; width: 1280px; } .parent { position: absolute; } .child { position: absolute; width: 960px; } .blabla { overflow: hidden; background-color: red; height: 90px; margin: 10px; padding: 10px; } .bleble { height: 10px; width: 90px; background-color: blue; } .blibli { height: 150px; width: 60px; background-color: orange; } body { height: 900px; background-color: lightgreen; }
<body> <ul> <li class="blabla span6"> asdfasdf <br> <span>asdfas</span> <div class="bleble"></div> <br> <div class="wrapper"> <div class="parent"> <div class="child"> <div class="blibli">aabasdg</div> </div> </div> </div> </li> </ul> </body>
相关问答
更多-
我看到你在这里想做什么。 我使用html,css和javascript做了类似的事情,但是我没有使用容器,只是使用下面的代码制作了一个手风琴。