我制作了一些Java 1.6-Oracle11g-JDBC(使用OJDBC 6)代码(如下).我得到一个例外 - java.sql.SQLException: Missing IN or OUT parameter at index:: 1
为什么会发生这种情况,我该如何解决?
我的输出是 -
create CREATE TABLE employee(emp_name varchar(25),emp_address varchar(25))
insert INSERT INTO employee(jim,germany) values(?,?)
Exception: java.sql.SQLException: Missing IN or OUT parameter at index:: 1
Run Code Online (Sandbox Code Playgroud)
代码是 -
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.sql.Statement;
public class Oracle {
public static void main(String[]args)
{
try
{
Connection con = DriverManager.getConnection("jdbc:oracle:thin:@//localhost:1521/xe", "newman", "123456");
Statement stmt = con.createStatement();
String create = "CREATE TABLE employee(emp_name varchar(25),emp_address varchar(25))";
System.out.println("create " …Run Code Online (Sandbox Code Playgroud) 所以有点C++代码:
void func( const std::string& theString )
{
std::string theString( theString );
theString += " more string";
std::cout << theString;
}
Run Code Online (Sandbox Code Playgroud)
用GCC 4.8和编译好VS 2013.根据我的C++知识,代码是可以的,一个局部变量theString被带入范围,然后隐藏theString在函数参数中.在theString构造点,唯一theString的范围是传递给std::string构造函数的函数参数.std::string然后命名构造theString,它进入范围并theString在代码中稍后使用.唷!
但是,GCC似乎theString传递给std::string构造函数的行为是本地theString(尚未构造)导致编译的程序崩溃.使用VS 2013,代码编译并运行良好.
所以,
我有一个React对象数组,我想根据其中一个道具的值对它们进行排序.
var arr=[];
arr[0] = <Fruit name="orange" count={10}/>
arr[1] = <Fruit name"apple" count={5}/>
Run Code Online (Sandbox Code Playgroud)
是否内置了React函数,我可以使用它按照水果的升序排序这个数组count?
< script type = "text/javascript" >
$(function() {
var oAllLinksTable = $("#mydatatable").dataTable({
"bProcessing": false,
"bServerSide": true,
"sAjaxSource": "/myreports/data?Id=" + id,
"sPaginationType": "full_numbers",
"bDestroy": true
});
});
< /script>
Run Code Online (Sandbox Code Playgroud)
我的表格如下
<table id="headertagstable" style="width: 100%;" class="grid-table04 margin-b-20">
<thead>
<tr>
<th width="10%" align="left" valign="middle">
SI No
</th>
<th width="40%" align="left" class="black-link-first" valign="middle">
Name
</th>
<th width="25%" align="left" valign="middle">
Date
</th>
<th width="25%" align="left" valign="middle">
Place
</th>
</tr>
</thead>
</table>
Run Code Online (Sandbox Code Playgroud)
除序列号外,一切正常.如何使用jquery添加序列号?
我必须以这样的方式完成方法maxElem(节点节点),方法maxElem()返回二叉树中包含的最大值.
我怎样才能做到这一点?我不知道如何去做..
public class BinaryTree {
protected class Node {
protected Integer element;
protected Node left;
protected Node right;
Node(int element) {
this.element = element;
left = right = null;
}
Node(int element, Node left, Node right) {
this.element = element;
this.left = left;
this.right = right;
}
} //end Node class
public class NodeReference {
private Node node;
private NodeReference(Node node) {
this.node = node;
}
public int getElement() {
return node.element;
}
public void …Run Code Online (Sandbox Code Playgroud) BufferedImage image = ImageIO.read(new File(img path));
int width = image.getWidth();
int height = image.getHeight();
int[][] result = new int[height][width];
for (int row = 0; row < height; row++) {
for (int col = 0; col < width; col++) {
result[row][col] = image.getRGB(row, col);
}
}
Run Code Online (Sandbox Code Playgroud)
这是我得到的例外:
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: Coordinate out of bounds!
at sun.awt.image.ByteInterleavedRaster.getDataElements(ByteInterleavedRaster.java:301)
at java.awt.image.BufferedImage.getRGB(BufferedImage.java:871)
at PlantExtraction.main(PlantExtraction.java:46)
Run Code Online (Sandbox Code Playgroud)
我怎样才能消除这些异常?
我刚刚安装了Android Studio 1.0,我正在尝试编译我在Eclipse上开发的代码.
但是当我编译代码时,我的图像文件中会显示很多错误,如下所示:
Error:Can't have more than one marked region along edge. - Found at pixel #16 along bottom edge.
Run Code Online (Sandbox Code Playgroud)
为什么它出现在Android Studio而不是Eclipse中?Eclipse编译器和Android Studio之间有区别吗?
对不起我的英语不好!;)
谢谢