我是榆树的新人.看到一种允许你开发前端内容的函数式语言很有意思.现在,即使我很好地遵循这里描述的步骤,我仍然遇到模块问题.
代码是
module Main where
import Html exposing ( Html )
import Signal
main : Signal Html.Html
main = Html.text "This should work."
|> Signal.constant
Run Code Online (Sandbox Code Playgroud)
我以前elm-reactor -a='localhost'能够查看我的输出.但我收到一个错误,无法找到模块"HTML":
I cannot find find module 'Html'.
Module 'Main' is trying to import it.
Potential problems could be:
* Misspelled the module name
* Need to add a source directory or new dependency to elm-package.json
Run Code Online (Sandbox Code Playgroud)
(注意双重"发现"嘿嘿)修复建议没有帮助我.或者可能是因为我无法正确理解.json文件的使用.
ELM-的package.json:
{
"version": "1.0.0",
"summary": "testing elm",
"license": "BSD3",
"source-directories": [
".",
"./bin/"
], …Run Code Online (Sandbox Code Playgroud) 对于一个项目(涉及房地产)我已经包括一个联系表格,如果访客有兴趣购买/租用房地产,访客可以联系房地产经纪人.
我正在使用Symfony2及其库.对于联系邮件,我使用的是Swiftmailer库.好吧,我有下一个处理表单提交的代码.在那里,我创建了一个邮件对象,以便能够发送邮件.它工作,但我想提供一个错误解决服务,如果发送器/接收器的smtp主机有问题.
这是代码,
$data = $contactForm->getData();
try {
// create body text
$body = $app['twig']->render('mailTemplate.twig', array('data' => $data, 'immoid' => $immoID));
// set mail
$mail = \Swift_Message::newInstance()
->setSubject('Contact reaction on your immo offer.')
->setFrom($app['swiftconfig']['sender'])
->setTo($contactinfo['contactmail'])
->setBody($body, 'text/html');
// send mail
$app['mailer']->send($mail);
// redirect if successfull
$app->redirect($app['url_generator']->generate('immoDetail', array('immoID' => $immoID)));
}
catch (Swift_TransportException $STe) {
// logging error
$string = date("Y-m-d H:i:s") . ' - ' . $STe->getMessage() . PHP_EOL;
file_put_contents("errorlog.txt", $string, FILE_APPEND);
// send error note to user
$errorMsg = …Run Code Online (Sandbox Code Playgroud) 您好,我的课程有一个单独的项目,我必须将节日的所有活动放在一个页面上.这是一个javascript课程,所以大多数任务应该用javascript处理.
问题是,为了提供一个好的网站,我正在使用一个加载gif文件,其中包含一条消息,用户必须等到AJAX的数据被采集和处理.
这是我的HTML代码段
<!-- showing loading screen -->
<div id="startup">
<h3>Please wait until the data is done with loading</h3>
<img src="images/ajax_load.gif" alt="loading icon" id="load_icon" />
</div>
<!-- actual content (will be displayed after loading phase) -->
<div id="siteContent">
<div id="top">
<label><input type="checkbox" name="cbDisabilities" id="cbDisabilities">Accessible for disabilities</label>
<label><input type="checkbox" name="cbFree" id="cbFree">for free</label>
<select id="selectCat">
<option selected="selected"> </option>
</select>
</div>
<div id="mapBox"></div>
<div id="dateBox" class="layout"></div>
<div id="eventBox" class="layout borders"></div>
</div>
<footer>
<p>Gentse Feesten Infos – © name here TODO</p>
</footer>
Run Code Online (Sandbox Code Playgroud)
有了上面的内容,我还有两个div的下一个CSS, …