是否可以检索特定包中的所有过程和函数的名称?我知道它们可以从视图中收集(闻起来像是hack-ish)ALL_SOURCE,但我更倾向于采用更规范的策略.
我负责Oracle数据库,我们没有任何文档.目前我需要知道如何填充表格.
如何找出此表从哪个过程,触发器或其他来源获取其数据?
对于一个类,我被要求编写一个VHDL过程,它接受两个整数输入A和B,并用A代替A + B和B. 我编写了以下程序和testbench.它完成了实现和行为语法检查,但它不会模拟.虽然我没有错误,但我确实收到一些警告,说明A和B处于组合反馈循环中.有人可以解释问题可能是什么吗?
模块:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity Problem2 is
Port ( A : inout integer;
B : inout integer);
end Problem2;
architecture Behavioral of Problem2 is
procedure AB (signal A,B: inout integer) is
begin
A<=A+B after 20 ns;
B<=A-B after 30 ns;
end AB;
begin
AB(A=>A, B=>B);
end Behavioral;
Run Code Online (Sandbox Code Playgroud)
试验台:
LIBRARY ieee;
USE ieee.std_logic_1164.ALL;
ENTITY Problem2_test IS
END Problem2_test;
ARCHITECTURE behavior OF Problem2_test IS
-- Component Declaration for the Unit Under Test (UUT)
COMPONENT Problem2
PORT(
A …Run Code Online (Sandbox Code Playgroud) 有没有办法在 Gnuplot 中使用程序(或类似 C 的函数)?我需要一些非常简单的东西,就像:
function func1()
{
var1 = "string1";
var2 = var1."string2";
return var2;
}
Run Code Online (Sandbox Code Playgroud)
使我的 gnuplot 脚本更加紧凑。
VHDL 中有没有办法拥有泛型类型?因此,例如我想调用一个过程,但我不确定我想提供的信号类型作为参数,是否可以将参数声明为泛型?就像在 C++ 中一样,您将使用模板。
procedure eq_checker(name : string; sig : ANYTHING); should : ANYTHING; at : time) is
if (at = now) then
if sig = should then
report "has same value" severity note;
else
report "has not same value" severity note;
end if;
end if;
end checker;
Run Code Online (Sandbox Code Playgroud)
至少应该可以使用不同的信号类型作为“sig”。
这是一个关于我正在做的大型项目的一小部分的问题.我试过以下但我只是得到了下面的两个错误:
SET SERVEROUTPUT ON
CREATE OR REPLACE PROCEDURE HELLO AS
DECLARE
variable1 NUMBER(1);
variable2 CHAR(1);
BEGIN
DBMS_OUTPUT.PUT_LINE('Hello World');
variable1 := &please_enter_1_or_0;
variable2 := &please_enter_y_or_n;
END;
/
Run Code Online (Sandbox Code Playgroud)
错误(2,5):PLS-00103:当期望以下之一时遇到符号"DECLARE":begin function pragma procedure子类型类型当前游标删除存在于外部语言之前符号"begin"替换为"DECLARE"以继续.
错误(10,8):PLS-00103:当遇到以下情况之一时遇到符号"文件结束":(如果循环mod为空pragma引发返回选择更新,则使用
<< 开始大小写声明结束异常退出) 继续关闭当前删除获取锁定
插入打开回滚保存点设置sql执行提交forall合并管道清除
我们获得了如何标记代码的标记,对于本节,相关标准将是:"脚本是否使用过程?" 和"脚本是否提示正确/错误和团队/个人并正确处理提供的数据?".
项目摘要引用"开发一个提示RIGHT/WRONG的程序(使用&),然后更新表"(其中table是表的名称)
变量的目的是更新现有的记录属性.即如果用户选择1和n然后将记录中的空值更新为2.如果它是1则y然后更新为1,如果0和y/n则更新为0
这些是我写的事实
instructor(ahmed,mohammed, cs101,01).
instructor(sara,salah,cs101,02).
instructor(maryam,faisal,cs101,03).
instructor(ali,hassan,cs311,01).
enrolled(201110202,huda,issa,cs101,01).
enrolled(20110303,mona,amer,cs101,01).
enrolled(20115566,amal,omar,cs101,01).
enrolled(20118899,ahmed,hassan,cs101,01).
Run Code Online (Sandbox Code Playgroud)
规则
teaches(D,S):-
instructor(D,_,C,Z),
enrolled(S,_,_,C,Z).
classmate(s1,s2,C):-
enrolled(s1,_,_,C,Z),
enrolled(s2,_,_,C,Z).
Run Code Online (Sandbox Code Playgroud)
但是,当我运行一个查询,该查询用id教std时20110303,就会出现此错误。我已经检查了所有类型的错误。从语法和逻辑上讲这是正确的,但仍然表示未定义的过程
?- debug.
true.
[debug] ?- teaches(D,20110303).
ERROR: Undefined procedure: teaches/2 (DWIM could not correct goal)
Run Code Online (Sandbox Code Playgroud) 我有一个我不明白的问题:
procedure TMain.THREAD_SYNC(
AProgressBar: TProgressBar;
ARemoteData: array of RemoteDATA;
ALocalData : array of LocalDATA;
Number : integer;
AInfo : TEdit);
Run Code Online (Sandbox Code Playgroud)
如果我为它指定"较小的数组",以下过程可以完美地工作
THREAD_SYNC(Remote,Local,0,Edit1)
Run Code Online (Sandbox Code Playgroud)
当我尝试为它分配一个更大的数组超过30.000条记录然后我得到一个Stack Overflow错误,所以我尝试了googled ...我发现了一些关于使用的东西const所以我把我的程序改为:
procedure TMain.THREAD_SYNC(
AProgressBar: TProgressBar;
ARemoteData: array of RemoteDATA;
const ALocalData : array of LocalDATA;
Number : integer;
AInfo : TEdit);
Run Code Online (Sandbox Code Playgroud)
现在它有效,我的问题是我不明白为什么?
没有const什么区别?
我正在将 PostgreSQL pgadmin4 (4.16v) 与 ASP.NET 应用程序一起使用。我创建了一个如下定义的过程:
CREATE OR REPLACE PROCEDURE public.usp_bind(
)
LANGUAGE 'plpgsql'
AS $BODY$
BEGIN
select district_id,district_name from district_master order by district_name;
END;
$BODY$;
Run Code Online (Sandbox Code Playgroud)
从asp.net应用程序我调用了上面的过程,代码如下:
NpgsqlConnection conn = new NpgsqlConnection();
NpgsqlDataAdapter da = new NpgsqlDataAdapter();
NpgsqlCommand cmd = new NpgsqlCommand();
DataSet ds = new DataSet();
public string dbconstr = dbConnectstr.Connectionstring();
public DataSet getDatafunction(string procedure_, [Optional] string flag_)
{
using (conn = new NpgsqlConnection(dbconstr))
{
//conn.Open();
using (da = new NpgsqlDataAdapter())
{
da.SelectCommand.CommandType = CommandType.StoredProcedure;
da.SelectCommand.CommandText = "CALL …Run Code Online (Sandbox Code Playgroud) 在某些编程语言中,可以将函数标记为已弃用或已过时,然后不能使用或应谨慎使用。有时它甚至会在某处产生警告消息。
Delphi 编程语言中是否可以将过程标记为已弃用?如果可能的话,它是如何运作的?