当我打开XAMPP并单击启动MySQL按钮时,它给了我一个错误。 我刚才启动了它,但现在它不工作了。

12:19:12 PM [mysql] Attempting to start MySQL app... 12:19:12 PM [mysql] Status change detected: running 12:19:13 PM [mysql] Status change detected: stopped 12:19:13 PM [mysql] Error: MySQL shutdown unexpectedly. 12:19:13 PM [mysql] This may be due to a blocked port, missing dependencies, 12:19:13 PM [mysql] improper privileges, a crash, or a shutdown by another method 12:19:13 PM [mysql] Press the Logs button to view error logs and check 12:19:13 PM [mysql] the Windows Event Viewer for more clues 12:19:13 PM [mysql] If you need more help, copy and post this 12:19:13 PM [mysql] entire log window on the forums

以下是错误日志的内容:

2013-08-02 12:19:12 4536 [Note] Plugin 'FEDERATED' is disabled. 2013-08-02 12:19:12 f64 InnoDB: Warning: Using innodb_additional_mem_pool_size is DEPRECATED. This option may be removed in future releases, together with the option innodb_use_sys_malloc and with the InnoDB's internal memory allocator. 2013-08-02 12:19:12 4536 [Note] InnoDB: The InnoDB memory heap is disabled 2013-08-02 12:19:12 4536 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions 2013-08-02 12:19:12 4536 [Note] InnoDB: Compressed tables use zlib 1.2.3 2013-08-02 12:19:12 4536 [Note] InnoDB: Not using CPU crc32 instructions 2013-08-02 12:19:12 4536 [Note] InnoDB: Initializing buffer pool, size = 16.0M 2013-08-02 12:19:12 4536 [Note] InnoDB: Completed initialization of buffer pool 2013-08-02 12:19:12 4536 [Note] InnoDB: Highest supported file format is Barracuda. 2013-08-02 12:19:12 4536 [Note] InnoDB: The log sequence numbers 0 and 0 in ibdata files do not match the log sequence number 1616798 in the ib_logfiles! 2013-08-02 12:19:12 4536 [Note] InnoDB: Database was not shutdown normally! 2013-08-02 12:19:12 4536 [Note] InnoDB: Starting crash recovery. 2013-08-02 12:19:12 4536 [Note] InnoDB: Reading tablespace information from the .ibd files...

最重要的错误信息在这里:

2013-08-02 12:19:12 4536 [ERROR] InnoDB: 试图打开先前打开的表空间。 以前的表空间mysql/innodb_table_stats在filepath: .\mysql\innodb_table_stats.ibd使用的是空间ID: 1。 在文件路径:.\xat\payments.ibd下无法打开空间ID: 1的表空间xat/payments

日志的其余部分:

InnoDB: Error: could not open single-table tablespace file .\xat\payments.ibd InnoDB: We do not continue the crash recovery, because the table may become InnoDB: corrupt if we cannot apply the log records in the InnoDB log to it. InnoDB: To fix the problem and start mysqld: InnoDB: 1) If there is a permission problem in the file and mysqld cannot InnoDB: open the file, you should modify the permissions. InnoDB: 2) If the table is not needed, or you can restore it from a backup, InnoDB: then you can remove the .ibd file, and InnoDB will do a normal InnoDB: crash recovery and ignore that table. InnoDB: 3) If the file system or the disk is broken, and you cannot remove InnoDB: the .ibd file, you can set innodb_force_recovery > 0 in my.cnf InnoDB: and force InnoDB to continue crash recovery here.

这些错误的原因是什么?我该如何纠正它们?

我想使用ggplot2包并排放置两个图,即执行par(mfrow=c(1,2))的等效操作。

例如,我想让下面两个图以相同的比例并排显示。

x <- rnorm(100)
eps <- rnorm(100,0,.2)
qplot(x,3*x+eps)
qplot(x,2*x+eps)

我需要把它们放到同一个数据帧里吗?

qplot(displ, hwy, data=mpg, facets = . ~ year) + geom_smooth()

我刚刚重新安装XAMPP,当我试图在XAMPP控制面板中启动我的Apache服务器时,我现在得到以下错误:

16:50:25  [Apache]     Status change detected: running
16:50:26  [Apache]     Status change detected: stopped
16:50:26  [Apache]     Error: Apache shutdown unexpectedly.
16:50:26  [Apache]     This may be due to a blocked port, missing dependencies,
16:50:26  [Apache]     improper privileges, a crash, or a shutdown by another method.
16:50:26  [Apache]     Press the Logs button to view error logs and check
16:50:26  [Apache]     the Windows Event Viewer for more clues
16:50:26  [Apache]     If you need more help, copy and post this
16:50:26  [Apache]     entire log window on the forums

我怎么解决这个问题?

我有一个带有两个y轴的图,使用twinx()。我也给了线条标签,并想用legend()显示它们,但我只成功地获得了图例中一个轴的标签:

import numpy as np
import matplotlib.pyplot as plt
from matplotlib import rc
rc('mathtext', default='regular')

fig = plt.figure()
ax = fig.add_subplot(111)
ax.plot(time, Swdown, '-', label = 'Swdown')
ax.plot(time, Rn, '-', label = 'Rn')
ax2 = ax.twinx()
ax2.plot(time, temp, '-r', label = 'temp')
ax.legend(loc=0)
ax.grid()
ax.set_xlabel("Time (h)")
ax.set_ylabel(r"Radiation ($MJ\,m^{-2}\,d^{-1}$)")
ax2.set_ylabel(r"Temperature ($^\circ$C)")
ax2.set_ylim(0, 35)
ax.set_ylim(-20,100)
plt.show()

所以我只得到图例中第一个轴的标签,而不是第二个轴的标签“temp”。如何将第三个标签添加到图例中?

我在控制面板的“系统”中的环境变量中创建了两个新变量,一个用于用户变量,一个用于系统变量。它们都被命名为JAVA_HOME,并且都指向

C: \ Sun jdk \ SDK \ \ bin

但出于某种原因,我在运行Java命令时仍然会得到以下错误…

BUILD FAILED
C:\Users\Derek\Desktop\eclipse\eclipse\glassfish\setup.xml:161: The following error  occurred while executing this line:
C:\Users\Derek\Desktop\eclipse\eclipse\glassfish\setup.xml:141: The following error occurred while executing this line:
C:\Users\Derek\Desktop\eclipse\eclipse\glassfish\setup.xml:137: Please set java.home to a JDK installation

Total time: 1 second
C:\Users\Derek\Desktop\eclipse\eclipse\glassfish>lib\ant\bin\ant -f setup.xml
Unable to locate tools.jar. Expected to find it in C:\Program Files\Java\jre6\lib\tools.jar
Buildfile: setup.xml

我该如何解决这个问题?

只是想知道BeginInvoke()和Invoke()之间的区别是什么?

主要是它们各自的用途。

编辑:创建线程对象和调用调用之间的区别是什么在委托上调用BeginInvoke() ?还是说它们是一样的?

我正在学习使用matplotlib通过研究示例,许多示例似乎包括如下一行在创建一个单一的图之前…

fig, ax = plt.subplots()

下面是一些例子。

修改标记标签文本 http://matplotlib.org/examples/pylab_examples/boxplot_demo2.html

我看到这个函数被使用了很多次,即使这个例子只是试图创建一个图表。还有其他好处吗?subplots()的官方演示在创建单个图表时也使用f, ax = subplots,并且只在后面引用ax。这是他们使用的代码。

# Just a figure and one subplot
f, ax = plt.subplots()
ax.plot(x, y)
ax.set_title('Simple plot')
struct SemanticDirection;

fn main() {}
warning: struct is never used: `SemanticDirection`
 --> src/main.rs:1:1
  |
1 | struct SemanticDirection;
  | ^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: #[warn(dead_code)] on by default

我将在任何严重的情况下重新打开这些警告,但我只是在修补语言,这让我很抓狂。

我尝试添加#[允许(dead_code)]到我的代码,但这并不管用。

我在Ubuntu 12.04中同时安装了python2.7和python3.2。 符号链接python链接到python2.7。

当我输入:

sudo pip install package-name

它将默认安装python2版本的package-name。

有些包同时支持python2和python3。 如何通过pip安装python3版本的package-name ?