我知道这里有很多这样的错误,但这个查询似乎不同,因为它是一个插入查询。这是表 card_info 的架构:
CREATE TABLE card_info (
card_id mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
card_name_orig varchar(150) NOT NULL,
card_name_html varchar(150) NOT NULL,
card_name_search varchar(150) NOT NULL,
card_name_page varchar(150) NOT NULL,
card_cost varchar(50) DEFAULT NULL,
card_cost_converted tinyint(2) NOT NULL DEFAULT '0',
card_subtype varchar(75) DEFAULT NULL,
card_oracle_text_orig text,
card_oracle_text_html text,
card_power varchar(10) DEFAULT NULL,
card_toughness varchar(10) DEFAULT NULL,
card_loyalty tinyint(1) DEFAULT NULL,
PRIMARY KEY (card_id),
KEY card_name_nd (card_name_search),
KEY card_name_page (card_name_page),
KEY card_cost_converted (card_cost_converted),
KEY card_power (card_power),
KEY card_toughness (card_toughness),
KEY card_loyalty (card_loyalty), …Run Code Online (Sandbox Code Playgroud) 我正在使用视频视图,并动态播放本地存储的视频。
这是我的设置:
videoView.setMediaController(null);
videoView.setOnCompletionListener(myVideoViewCompletionListener);
videoView.setOnErrorListener(videoOnErrorListener);
Run Code Online (Sandbox Code Playgroud)
以下是功能:
private OnErrorListener videoOnErrorListener = new OnErrorListener() {
@Override
public boolean onError(MediaPlayer mp, int what, int extra) {
Log.i(PlayActivity.class.getSimpleName(), "Not played");
do_stuff();
return true;
}
};
MediaPlayer.OnCompletionListener myVideoViewCompletionListener = new MediaPlayer.OnCompletionListener() {
@Override
public void onCompletion(MediaPlayer mp) {
mp.reset();
do_stuff();
}
};
Run Code Online (Sandbox Code Playgroud)
我也尝试过,mp.release()但是IllegalStateException当我想用我的videoview.
我收到这些错误/警告。知道他们做什么或者他们是否会成为问题吗?
E/Mediaplayer: 错误 (1, -2147483648)
W/Mediaplayer:mediaplayer 因未处理的事件而消失
带媒体播放器:这是 IMEDIA_PLAYER_VIDEO_EXIST
带媒体播放器:这是 IMEDIA_PLAYER_VIDEO_EXIST
带媒体播放器:信息/警告 (3, 0)
奇怪的是:每次 videoview 播放视频时都会出现最后 3 行(不知何故是一个循环)。从第二次开始我只得到第一个。
谢谢!
Node * replaceValue(Node * x) const
{
if (x == nullptr)
return nullptr;
if (x->left != nullptr)
replaceValue(x->left);
else
return x;
}
Run Code Online (Sandbox Code Playgroud)
警告:控制到达非空函数的末尾
我应该忽略这个吗?我确保这个函数总是返回一些东西(所有用 nullptr 初始化的指针),但我不希望这个警告继续弹出。如果我在函数末尾添加 return nullptr,那么它就会崩溃。有没有办法解决?
So my table view is not loading anything and I think it's because of this warning that I get. It saids the save function is not being used so how can it load something that is not saved. What I am saving is the indexPath and Section of the row that the user selected via a button action in the row.
Warning:
Result of call to 'save(defaults:)' is unused
Code:
func saveSorting(_ dataIdBlock: (Any) -> String) {
guard let items …Run Code Online (Sandbox Code Playgroud) 我有以下方法:
public byte[] HtmlToDoc(string hmtl, string userId)
{
byte[] data;
var auditor = new ServiceAuditor
{
User = userId
};
try
{
using (var tx = new ServerText())
{
tx.Create();
tx.Load(Server.HtmlDecode(hmtl), StringStreamType.HTMLFormat);
tx.Save(out data, BinaryStreamType.MSWord);
}
}
catch (Exception e)
{
auditor.Errormessage = e.Message + "/n " + e.StackTrace;
data = new byte[0];
}
finally
{
auditor.Save();
auditor.Dispose();
}
return data;
}
Run Code Online (Sandbox Code Playgroud)
我在编译期间收到以下警告:
警告 CA2000:Microsoft.Reliability:在方法“DocCreator.HtmlToDoc(string, string)”中,对象“new ServiceAuditor()”未沿所有异常路径处理。在对象“new ServiceAuditor()”上调用 System.IDisposable.Dispose 在对它的所有引用都超出范围之前。
奇怪的是,即使我正在处理该对象,我也不明白为什么它会抱怨。你能指出问题出在哪里吗?
这是我用 vim 编辑器编写的一个简单程序:
#include <iostream>
using namespace std;
int main()
{
int a;
int b, c ;
a=(b+c+11)/3;
cout << "x=" << a;
cout << "\n";
return 0;
}
Run Code Online (Sandbox Code Playgroud)
我们可以在windows中的Visual Studio中看到警告:
...error(s), 2 warning(s)
...\test1.cpp(7) : warning c4700: local variable 'b' used without having been initialized
...\test1.cpp(7) : warning c4700: local variable 'c' used without having been initialized
Run Code Online (Sandbox Code Playgroud)
但是,当我们使用 gnome-terminal 时,我们看不到警告:
SSS@SSS:~/.cpp$ g++ test1.cpp -o test1
SSS@SSS:~/.cpp$ chmod +x test1
SSS@SSS:~/.cpp$ ./test1
x=10925
SSS@SSS:~/.cpp$
Run Code Online (Sandbox Code Playgroud)
在终端中我们只能看到错误...
如何查看这些警告?
有什么命令可以查看警告吗?
我正在编写我的第一个 R 包,目前正在研究一个使用某些特定图形参数绘制绘图的函数。我希望用户定义的图形参数在绘制完成后恢复,但总是收到相同的警告消息:
opar <- par()
par(oma = c(5, 4, 0, 0) + 0.1, mar = c(0, 0, 1, 1) + 0.1)
par(opar)
Run Code Online (Sandbox Code Playgroud)
警告消息:
1:在 par(opar) 中:无法设置图形参数“cin”
2:在 par(opar) 中:无法设置图形参数“cra”
3:在 par(opar) 中:无法设置图形参数“csi”设置
4:在 par(opar) 中:不能设置图形参数“cxy”
5:在 par(opar) 中:不能设置图形参数“din”
6:在 par(opar) 中:不能设置图形参数“page”
有没有更好的方法来做到这一点?我知道该suppressWarnings()函数,但 1. 我不希望消息被隐藏2. 如果该函数被调用两次,则会出现一条警告消息:
> There were 12 warnings (use warnings() to see them)
Run Code Online (Sandbox Code Playgroud) 以下行给了我一个警告:
for (int i = 0; i < SpamBannListArray.size(); i++)
Run Code Online (Sandbox Code Playgroud)
Run Code Online (Sandbox Code Playgroud)char.cpp: In member function 'bool CHARACTER::SpamListCheck(const char*)': char.cpp:7280: warning: comparison between signed and unsigned integer expressions
为了摆脱上面的警告,我需要改变什么?
我的任务是使用 verilog 实现带有数据存储器的处理器。指令是硬编码的(32 位指令)。我已完成数据存储器的插入。对于加载和存储指令,但是当编译时我得到 - “警告:instruction_reg 的端口 8(目标)需要 8 位,得到 1。”
这是指令集架构的 verilog 代码
<pre><code>
//ALU created
module ALU(out,DATA1,DATA2,Select); //module for ALU
input [7:0]DATA1,DATA2;//8 bit data inputs
input [2:0] Select;//three bit selection
output [7:0]out;//8 bit data output
reg out;//outputt register
always@(DATA1,DATA2,Select)
begin
case(Select)
3'b000: out=DATA1;//forward
3'b001: out=DATA1+DATA2;//add
3'b010: out=DATA1 & DATA2;//and
3'b011: out=DATA1| DATA2; //or
endcase
end
endmodule
//here no need of its test bench
//registerFile created in part2
module Register(clk,busy_wait,INaddr,IN,OUT1addr,OUT1,OUT2addr,OUT2);
input clk;
input [2:0] INaddr;
input [7:0] IN;
input …Run Code Online (Sandbox Code Playgroud) 当一个函数只从测试中调用时,rust 会抱怨它从未被使用过。为什么会发生这种情况以及如何解决这个问题?
例子:
fn greet() {
println!("Hello!")
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_greet() {
greet();
}
}
Run Code Online (Sandbox Code Playgroud)
我收到以下编译器警告:
Compiling playground v0.0.1 (/playground)
warning: function is never used: `greet`
--> src/lib.rs:1:4
|
1 | fn greet() {
| ^^^^^
|
= note: `#[warn(dead_code)]` on by default
warning: 1 warning emitted
Run Code Online (Sandbox Code Playgroud)