根据这一消息 - 甲骨文终于针对Java非付款人 - 在推出Sun六年后.Oracle Java SE的
某些组件需要额外的许可证才能用于商业用途.以下是Oracle Java SE Advanced&Suite产品的主要功能:
我想删除这些商业组件以防止可能的许可证问题.这就是我到目前为止所做的.
对于JMC,我删除$JDK_HOME/lib/missioncontrol/*
并执行$JDK_HOME/bin/jmc.exe
.一个对话框,其中包含以下消息:
Jmc可执行启动程序无法找到其随播共享库.
我也删除$JDK_HOME/bin/jmc.exe
和$JDK_HOME/bin/jmc.ini
.
对于JFR,我删除$JRE_HOME/bin/jfr.dll
,$JRE_HOME/lib/jfr.jar
,$JRE_HOME/lib/jfr/*
以及执行java -XX:+UnlockCommercialFeatures -XX:+FlightRecorder pkg.MyTest
核查.JVM未启动,它打印以下消息:
VM初始化期间发生错误
无法开始跟踪后端.
我的问题是:
Java Usage Tracker (JUT)
?我不知道该组件在哪里.在 SQLDeveloper 中,有一项功能可以在您将表从连接浏览器拖放到工作表时生成查询。有一个窗口询问是否要生成选择、更新或删除查询。我已标记一次选择并选中该框以不再询问。现在,当我拖放时,我总是可以选择而不弹出窗口。
如何在不重新安装 SQLDeveloper 的情况下更改生成的查询(我需要插入而不是选择)?
美好的一天.我有一个功能:
create function get_n(search tt.pp%type)
return number
is rc number;
begin
select count(*)
into rc
from tt
where tt.pp=search;
return (rc);
end;
/
Run Code Online (Sandbox Code Playgroud)
我可以得到结果
variable qwe number;
begin
select get_n('sample')
into :qwe
from dual;
end;
print qwe;
Run Code Online (Sandbox Code Playgroud)
所以,它成功运作.但是部分:我print
执行其他时不能执行(PLS-00103:遇到符号"PRINT"......).这真的很奇怪.
我尝试从匿名块中的函数获取结果并打印它:
declare
qwe number;
begin
select get_n('sample')
into :qwe
from dual;
dbms_output.put_line(qwe);
exception
when others
then dbms_output.put_line(sqlerrm);
end;
/
Run Code Online (Sandbox Code Playgroud)
它不打印任何东西.为什么?
如何编译我目前在Oracle表中保存的PL/SQL源代码?(我正在从USER_SOURCE视图中复制源代码,然后我将删除这些对象,并希望从我保存的副本中恢复.)
我确信有一种简单的方法,但我只是没有输入正确的搜索条件.
让我们考虑一个用户定义类型的表.
create or replace type reftype is object (id number, name varchar2(40), details varchar2(1000));
create table testref(c1 reftype);
insert into testref values (REFTYPE(4, 'asd', 'aaa'));
insert into testref values (REFTYPE(3, 'asf', 'baa'));
insert into testref values (REFTYPE(2, 'asg', 'aba'));
insert into testref values (REFTYPE(1, 'ash', 'aab'));
/
select * from testref;
Run Code Online (Sandbox Code Playgroud)
选择返回包含用户类型对象的列.当我在SQL*plus中执行它时,我会看到:
SQL> select * from testref
REFTYPE(4, 'asd', 'aaa')
REFTYPE(3, 'asf', 'baa')
REFTYPE(2, 'asg', 'aba')
REFTYPE(1, 'ash', 'aab')
Run Code Online (Sandbox Code Playgroud)
如何编写查询以将此类输出作为文本返回(假设为varchar2).
SQL> select substr(c1,1,4) from testref;
select substr(c1,1,4) from testref
* …
Run Code Online (Sandbox Code Playgroud) 我有数字数据:
123.42
12.54
1.02
2.99
Run Code Online (Sandbox Code Playgroud)
对于每一个,我想获得最接近 0.5 步的数字。所以
func(123.42)=123.0
func(12.54)=12.5
func(1.02)=1.0
func(2.99)=2.5
Run Code Online (Sandbox Code Playgroud)
有什么线索吗?我正在尝试,trunc((x-floor(x))*5)/5)
但什么也得不到。
我的代码旨在从用户那里获取一个简短的文本和标题,并将它们添加到数据库中两次,并且无法理解原因.
<?php ("session.php"); ?>
<?php require_once("connect.php"); ?>
<?php include("header.php"); ?>
<?php
//if the submit button is pressed then the INSERT SQL statement is submitted to database
//if (isset($_POST['testimonial_title']) && isset($_SESSION['testimonial_text'])) {
if(isset($_POST["submit_button"])){
$title=$_POST["testimonial_title"];
$text=$_POST["testimonial_text"];
//create the sql statement
$sql=
"INSERT INTO testimonials
(testimonial_title, testimonial_text, student_ID)
VALUES(
'$title',
'$text',
1);"; //for simplicity the student_ID is kept the same
$result = mysqli_query($con,$sql);
if(!mysqli_query($con, $sql))
{
echo "Journal entry was not entered successfully";
}
else{
echo "Journal entry was entered successfully";
}
mysqli_close($con); …
Run Code Online (Sandbox Code Playgroud)