小编use*_*502的帖子

yii\base\ErrorException - 找不到类'app\controllers\EntryForm'

我刚刚在Yii v 2.0.0的"基本"版本上尝试了使用表单教程.我一步一步地跟着它,但我想有些事情是错的.我有EntryForm模型,SiteController有actionEntry,两个视图也在那里.

错误跟踪:

1. in /usr/share/nginx/html/basic/controllers/SiteController.php at line 99

}

public function actionAbout()
{
    return $this->render('about');
}

public function actionEntry()
{
    $model = new EntryForm;

    if ($model->load(Yii::$app->request->post()) && $model->validate()) {
        // valid data received in $model

        // do something meaningful here about $model ...

        return $this->render('entry-confirm', ['model' => $model]);
    } else {
        // either the page is initially displayed or there is some validation error

2. yii\base\ErrorHandler::handleFatalError() 
Run Code Online (Sandbox Code Playgroud)

php yii yii2

7
推荐指数
1
解决办法
1万
查看次数

Java HotSpot(TM)64位服务器VM警告,CentOS,SmartGit,SmartSvn

在运行随SmartGit提供的shell脚本时,

  Java HotSpot(TM) 64-Bit Server VM warning: You have loaded library /home/User/.smartgit/6/jna-tmp/com/sun/jna/linux-i386/libjnidispatch.so which might have disabled stack guard. The VM will try to fix the stack guard now.

  It's highly recommended that you fix the library with 'execstack -c <libfile>', or link it with '-z noexecstack'.
Run Code Online (Sandbox Code Playgroud)

虽然它打开很好,但我做了提交,

java: cairo-misc.c:380: _cairo_operator_bounded_by_source: Assertion `NOT_REACHED' failed.
smartgithg.sh: line 100:   394 Aborted                 $_JAVA_EXEC $_VM_PROPERTIES -Xmx${SMARTGITHG_MAX_HEAP_SIZE} -Xverify:none -Dsmartgit.vm-xmx=${SMARTGITHG_MAX_HEAP_SIZE} -jar "$SMARTGIT_HOME/lib/bootloader.jar" "$@
Run Code Online (Sandbox Code Playgroud)

在研究了一下,我发现,

  1. 应该使用64位库.(如果这是原因请告诉我该怎么做).

  2. 找不到正确的JRE.下载了一个新的JRE并在shell脚本中提供了它的路径.同样的警告和崩溃.

可能导致这种情况的原因,我该如何解决?

java jvm smartsvn smartgit

6
推荐指数
1
解决办法
5099
查看次数

使用javascript计算短语中每个单词的出现次数

例如对于输入 "olly olly in come free"

程序应该返回:

olly: 2 in: 1 come: 1 free: 1

测试写成:

var words = require('./word-count');

describe("words()", function() {
  it("counts one word", function() {
    var expectedCounts = { word: 1 };
    expect(words("word")).toEqual(expectedCounts);
  });

//more tests here
});
Run Code Online (Sandbox Code Playgroud)
  1. 如何从 word-count.js 文件开始?创建一个方法 words() 或模块 Words() 并在其中创建一个 expectedCount 方法并导出它?

  2. 我将字符串视为数组还是对象?在对象的情况下,我如何开始将它们分解成单词并迭代计数?

javascript jasmine

1
推荐指数
1
解决办法
2707
查看次数

标签 统计

jasmine ×1

java ×1

javascript ×1

jvm ×1

php ×1

smartgit ×1

smartsvn ×1

yii ×1

yii2 ×1