我刚刚开始使用Laravel,我收到以下错误:
未知列'updated_at'插入gebruikers(naam,wachtwoord,updated_at,created_at)
我知道错误来自迁移表时的时间戳列,但我没有使用该updated_at字段.我曾经使用它,当我按照Laravel教程,但现在我正在制作(或试图制作)我自己的东西.即使我不使用时间戳,我也会收到此错误.我似乎无法找到它被使用的地方.这是代码:
调节器
public function created()
{
if (!User::isValidRegister(Input::all())) {
return Redirect::back()->withInput()->withErrors(User::$errors);
}
// Register the new user or whatever.
$user = new User;
$user->naam = Input::get('naam');
$user->wachtwoord = Hash::make(Input::get('password'));
$user->save();
return Redirect::to('/users');
}
Run Code Online (Sandbox Code Playgroud)
路线
Route::get('created', 'UserController@created');
Run Code Online (Sandbox Code Playgroud)
模型
public static $rules_register = [
'naam' => 'unique:gebruikers,naam'
];
public static $errors;
protected $table = 'gebruikers';
public static function isValidRegister($data)
{
$validation = Validator::make($data, static::$rules_register);
if ($validation->passes()) {
return true;
}
static::$errors = $validation->messages();
return false;
}
Run Code Online (Sandbox Code Playgroud)
我一定是忘记了什么......我在这里做错了什么?
这是一个截图:

task : Codeception PHP Testing Framework v1.6.2
Powered by PHPUnit 3.7.19 by Sebastian Bergmann.
Suite selenium_acceptance started
Trying to see the welcome page of newweather (welcomeCept.php)
issue : it sits as it is and waiting for phantomJS to respond and below is what phantomJS screen is showing :
[INFO - 2014-03-13T01:42:51.575Z] SessionManagerReqHand - _postNewSessionCommand - New Session Created: ca14e740-aa50-11e3-bb6b-75468ba86108
[INFO - 2014-03-13T01:47:42.806Z] SessionManagerReqHand - _cleanupWindowlessSessions - Asynchronous Sessions clean-up phase starting NOW
[INFO - 2014-03-13T01:52:42.806Z] SessionManagerReqHand - _cleanupWindowlessSessions - …Run Code Online (Sandbox Code Playgroud) 当我尝试连接到我的C#应用程序中的Oracle数据库并尝试单击按钮时出现此错误:
"Oracle.DataAcces.Client.OracleConnection"的类型初始值设定项引发了异常
我访问数据库的代码:
static string column;
static string OracleServer = "Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=something)(HOST=something)(PORT=something)) (CONNECT_DATA=(SERVICE_NAME=name)));User Id=something;Password=something;";
public void read()
{
try
{
var conn = new OracleConnection(OracleServer);
conn.Open();
OracleCommand cmd = new OracleCommand("select * from t1", conn);
OracleDataReader reader = cmd.ExecuteReader();
while (reader.Read())
{
var column1 = reader["vermogen"];
column = (column1.ToString());
listBox1.Items.Add(column);
}
conn.Close();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
Run Code Online (Sandbox Code Playgroud)
现在我使用引用Oracle.DataAccess并作为代码:using Oracle.DataAccess.Client;
应用程序是应用程序中的arcgis添加,我将其转换为表单应用程序,它确实连接到数据库.但我必须在添加应用程序中使用它.
我从来没有遇到过这个错误,我在Oracle数据库方面没有经验,我想知道是什么导致了这个错误?当我运行应用程序时,我没有得到任何错误.但是,当我单击应用程序的用户界面的按钮时,我收到此错误.
我该怎么做才能丢失错误以及导致错误的原因?
事先,我已经读过这个问题:
如何防止PHP将带有0000-00-00值的DateTime对象转换为-0001-11-30
但是当我运行这段代码时,我不知道为何 00:00:00更改为-0001-11-30 00:00:00:
$date = date_create('0000-00-00 00:00:00');
echo date_format($date, 'Y-m-d H:i:s');
Run Code Online (Sandbox Code Playgroud)
当我用0001-00-00 00:00:00尝试时,我得到:
0000-11-30 00:00:00
Run Code Online (Sandbox Code Playgroud)
和0001-01-01 00:00:00我得到:
0001-01-01 00:00:00
Run Code Online (Sandbox Code Playgroud)
和0000-00-01 00:00:00:
-0001-12-01 00:00:00
Run Code Online (Sandbox Code Playgroud)
是否有任何具体原因导致它在不存在的日期之前总是一年/一天/一个月?
函数date_create或date_format有问题吗?
我注意到时间以正确的方式显示,这可能是因为时间00:00:00存在.
我收到了一个我无法解决的错误:
Error 1 'System.Windows.Forms.Label' does not contain a definition for 'Copy'
and no extension method 'Copy' accepting a first argument of
type'System.Windows.Forms.Label'
could be found (are you missing a using directive or an assembly reference?)
//path 156 22 FileWatcherEigen
Run Code Online (Sandbox Code Playgroud)
那是我的错误.有人可以帮我解释一下出了什么问题吗?
这是我的代码:
using System;
using System.IO;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
private bool pause = false;
private bool cut1 = false;
private …Run Code Online (Sandbox Code Playgroud) 所以我正在阅读这个名为"学习Python第四版"的PDF教程.现在我找到了一个我不理解的部分,因为我几乎是Python的初学者.我在谈论这部分:

现在我没有得到第一个例子的解释.它确实说:
It turns out that there are two ways to print every object: with full precision(as in the first result shown here)
但这是怎么回事with full precision?
它可能只是很容易解释文本中的python程序员,但我似乎没有得到它.
我正在尝试使用Laravel 官方文档中的 Telescope 包,我遵循了前两个步骤:
composer require laravel/telescope
Run Code Online (Sandbox Code Playgroud)
和
php artisan telescope:install
Run Code Online (Sandbox Code Playgroud)
在安装之前,我的命令行中一切正常。我得到了错误:
ErrorException : file_get_contents(path\app\Providers/TelescopeServiceProvider.php: 无法打开流:没有这样的文件或目录:vendor\laravel\telescope\src\Console\InstallCommand.php
所以,当然,我用谷歌搜索了这个问题并找到了这个,我检查了我的提供者的文件夹是否存在。它确实存在并且确实TelescopeServiceProvider.php不存在。我尝试php artisan telescope:install再次运行该命令,它向我提供了以下消息:
望远镜脚手架安装成功。
我认为这很奇怪,但好吧,我进入了文档的下一步:
migrate命令:
php artisan migrate所以我运行了那个命令,我得到了消息:
没什么好迁移的。
所以显然这不正确。如果 TelescopeServiceProvider 现在存在,我在“假”安装成功消息后检查了它,但它仍然没有。
我做错了什么,我该如何解决这个问题?
我在网上关于在ubuntu上安装magento的教程,但是我在配置中得到了这个错误:php extension mcrypt must be loaded.我已经尝试过了:sudo apt-get install php5-mcrypt但这对我没用.我有同样的问题卷曲,但当我尝试:sudo apt-get install php5-curl它确实适合我.我如何使用mcrypt解决这个问题?我已经尝试重启网络服务器.
例如,如果我的网址看起来像index.php?category = IT%20&%20Soft.然后我尝试打印"$ _GET [category]"我只得到"IT"而不是"IT&Soft".这有什么不对?这令我很沮丧.
我在C#中添加了arcmap的应用程序,我尝试连接我的文件地理数据库.所以当我试图运行它时,我收到了这个错误:
Error 1 Interop type 'ESRI.ArcGIS.DataSourcesGDB.FileGDBWorkspaceFactoryClass' cannot be embedded. Use the applicable interface instead.
Run Code Online (Sandbox Code Playgroud)
然后是添加的路径
我之前从未见过这个错误,我想知道出了什么问题.
这是它的主要代码:
public IWorkspace FileGdbWorkspaceFromPropertySet(string database)
{
IPropertySet propertySet = new PropertySetClass();
propertySet.SetProperty("DATABASE", database);
IWorkspaceFactory workspaceFactory = new FileGDBWorkspaceFactoryClass();
return workspaceFactory.Open(propertySet, 0);
}
Run Code Online (Sandbox Code Playgroud)
所以错误在这一行:
IWorkspaceFactory workspaceFactory = new FileGDBWorkspaceFactoryClass();
Run Code Online (Sandbox Code Playgroud)
我希望有人可以向我提供这个错误的解释,也可以解决我的问题.
出了什么问题?