小编Ken*_*ter的帖子

在Oracle PL/SQL中针对模式验证XML文件

我需要根据XSD验证传入的文件.两者都将在服务器文件系统上.

我看过了dbms_xmlschema,但是有问题让它发挥作用.

使用Java可以更容易吗?
我可以在数据库中放入的最简单的类是什么?

这是一个简单的例子:

DECLARE
  v_schema_url       VARCHAR2(200) := 'http://www.example.com/schema.xsd';
  v_blob             bLOB;
  v_clob             CLOB;
  v_xml XMLTYPE;
BEGIN
  begin
    dbms_xmlschema.deleteschema(v_schema_url);
  exception
    when others then
     null;
  end;

  dbms_xmlschema.registerSchema(schemaURL => v_schema_url,
                                schemaDoc => '
<xs:schema targetNamespace="http://www.example.com" 
xmlns:ns="http://www.example.com" 
xmlns:xs="http://www.w3.org/2001/XMLSchema" 
elementFormDefault="qualified" attributeFormDefault="unqualified" version="3.0">
<xs:element name="something"  type="xs:string"/>
</xs:schema>',
                                local => TRUE);

  v_xml := XMLTYPE.createxml('<something xmlns="http://www.xx.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://www.example.com/schema.xsd">
data
</something>');

  IF v_xml.isschemavalid(v_schema_url) = 1 THEN
    dbms_output.put_line('valid');
  ELSE
    dbms_output.put_line('not valid');
  END IF;
END;
Run Code Online (Sandbox Code Playgroud)

这会生成以下错误:

ORA-01031: insufficient privileges
ORA-06512: at "XDB.DBMS_XDBZ0", line 275
ORA-06512: at "XDB.DBMS_XDBZ", line …
Run Code Online (Sandbox Code Playgroud)

xml oracle ora-06512

6
推荐指数
2
解决办法
2万
查看次数

cron命令wget -q在服务器上创建文件吗?

目前,我有一个与cron一起运行的php函数.它是检查时间戳并关闭主题的功能.要检查时间戳并进行实时更新,我必须使用cron.我用这个命令运行cron

wget -q http://www.example.com/program/timecheck
Run Code Online (Sandbox Code Playgroud)

一切似乎都很完美,所以我没有检查我的服务器很长时间.但今天,我查了一下,发现在根目录下创建了超过500,000个名为timecheck的文件.

我检查了代码,确定没有用于创建文件的代码.

我想知道的是,是因为wget -q命令?如果那是我应该使用什么命令来执行URL?

谢谢你的帮助.

带着敬意,

cron wget

6
推荐指数
1
解决办法
8433
查看次数

如何使用ajax调用跨域web api?

jQuery.ajax({
           type: "GET",
           url: 'http://example.com/restaurant/VeryLogin(username,password)',
           dataType: "json",

           success: function (data) {
               alert(data);
           },
           error: function (XMLHttpRequest, textStatus, errorThrown) {
               alert("error");
           }
       });
Run Code Online (Sandbox Code Playgroud)

它提醒成功,但数据为空.url返回xml数据,如果我们指定dataType,我们可以获取json数据,但是这里没有获取任何数据.

任何帮助赞赏.

asp.net ajax wcf-web-api

6
推荐指数
1
解决办法
2万
查看次数

PHPmailer在hotmail中向垃圾邮件发送邮件.怎么修?

我正在使用phpmailer类发送电子邮件.目前gmail和yahoo不会将电子邮件标记为垃圾邮件,但Hotmail始终如此.我怎么能阻止这个?我的代码如下.

require_once('../PHPMailer/class.phpmailer.php');
//include("class.smtp.php"); // optional, gets called from within class.phpmailer.php if not already loaded

$mail = new PHPMailer();

$mail->IsSMTP();    // set mailer to use SMTP
$mail->Host = "mail.example.com";    // specify main and backup server
$mail->SMTPAuth = true;    // turn on SMTP authentication
$mail->Username = "xxx";    // SMTP username -- CHANGE --
$mail->Password = "xxx";    // SMTP password -- CHANGE --
$mail->Port = "25";    // SMTP Port

$mail->From = "no-repy@example.com";    //From Address -- CHANGE --
$mail->FromName = "xxx";    //From Name -- …
Run Code Online (Sandbox Code Playgroud)

php email spam hotmail phpmailer

6
推荐指数
1
解决办法
2万
查看次数

当z-index为负值时,onclick无法在webkit或mozilla中运行

我有以下div设置,只适用于IE9.在Moz和Webkit上,onclick不会触发.如果我将z-index变为0,则onclick可以工作,但我对网站中的其他元素有可见性问题.有没有办法通过负z-指数获得onclick?

<div id="adbg" style="margin: 0pt auto; height: 1000px; width: 100%; position: fixed; cursor: pointer; z-index: -1;">
<div OnClick="window.open('/bgClicks/2');" style="background: #fff url('http://www.example.com/img/bg/w_1.jpg') no-repeat center top fixed; height: 100%; width: 100%; margin: 0pt auto; cursor: pointer;"></div>
</div>
<div id="wrapper">
Run Code Online (Sandbox Code Playgroud)

javascript css z-index onclick

6
推荐指数
1
解决办法
1300
查看次数

在Powershell中使用Soap complexType来保持Soap服务的热度

我正在编写一个powershell脚本,每隔10分钟就会对一个soap webservice进行ping操作,以保持它的热度和活力,从而提高性能.我们已经在IIS中尝试了许多技术,其中包括应用程序池空闲超时以及为wsdl创建http req.但似乎我们必须向sql服务器发出真正的请求,否则空闲90分钟将使其对要求变慢.

我必须构建一个相当复杂的搜索对象,以便能够进行智能搜索,以保持服务层缓存和热.肥皂请求应如下所示:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:fund="http://www.example.com/cmw/fff/fund" xmlns:tcm="http://www.example.com/cmw/fff/">
   <soapenv:Body>
     <fund:Get>
        <!--Optional:-->
        <fund:inputDTO>
           <fund:Fund>
              <fund:Identity>
                 <fund:Isin>SE9900558666</fund:Isin>
                 <fund:FundBaseCurrencyId>SEK</fund:FundBaseCurrencyId>
              </fund:Identity>
           </fund:Fund>
           <fund:InputContext>
              <tcm:ExtChannelId>Channelman</tcm:ExtChannelId>
              <tcm:ExtId>Rubberduck</tcm:ExtId>
              <tcm:ExtPosReference>Rubberduck</tcm:ExtPosReference>
              <tcm:ExtUser>Rubberduck</tcm:ExtUser>
              <tcm:LanguageId>809</tcm:LanguageId>
           </fund:InputContext>
        </fund:inputDTO>
     </fund:Get>
   </soapenv:Body>
</soapenv:Envelope>`
Run Code Online (Sandbox Code Playgroud)

我尝试使用New-WebServiceProxy,它在powershellguy的这个例子中非常优雅.我从technet构建我自己的对象作为这个例子.

到目前为止我尝试过的powershell代码是这样的:

$fundSrvc = New-WebServiceProxy -uri http://myColdServer:82/WSFund.svc?wsdl -NameSpace "tcm"
# all the type are now defined since we called New-WebServiceProxy they are prefixed
# with ns tcm
[tcm.FundInput] $myFundGoofer = new-object tcm.FundInput 
[tcm.Fund] $myFund = new-object tcm.Fund
[tcm.Context] $myInputContext = new-object tcm.Context
[tcm.FundIdentity] $myFundIdentity = …
Run Code Online (Sandbox Code Playgroud)

powershell soap wsdl

6
推荐指数
1
解决办法
1万
查看次数

C++ rest sdk POST表单数据json

是否可以发布C++ rest SDK(卡萨布兰卡)的"表单数据"?我有一个给定的Web服务,它在"表单数据"中查找帖子数据,而不是在正文中.

这是C++代码:

http_client client(L"http://localhost/posttest/jsontest.php");

// Manually build up an HTTP request with header and request URI.
http_request request(methods::POST);
request.headers().add(L"Content-Type", L"application/json");
request.headers().add(L"Content-Length", L"100");
request.headers().add(L"Host", L"example.com");
request.headers().add(L"X-Requested-With", L"XMLHttpRequest");
request.set_body(obj);
return client.request(request).then([id](http_response response)
{
    if (response.status_code() == status_codes::OK)
    {
        return response.extract_json();
    }
    else {
        /* Print bad status code */
        wcout << L"Server returned returned status code " << response.status_code() << L'.' << std::endl;
    }
    return pplx::task_from_result(json::value());
})
Run Code Online (Sandbox Code Playgroud)

Web服务只能使用这样的数据(我不能修改它):

$arr = [$_POST['code']];
header('Content-Type: application/json');
echo json_encode($arr);
Run Code Online (Sandbox Code Playgroud)

(这只是一个示例PHP代码,我用于测试)

c++ rest json casablanca

6
推荐指数
1
解决办法
8482
查看次数

COPY失败:stat / var / lib / docker / tmp / docker-builder700869788 / private:无此类文件或目录

我收到一个错误:

COPY失败:stat / var / lib / docker / tmp / docker-builder700869788 / private:无此类文件或目录。

我在Dockerfile中写道:

FROM "centos"

    RUN mkdir ~/.ssh
    COPY ./private ~/.ssh/id_rsa
    RUN yum install -y https://centos7.iuscommunity.org/ius-release.rpm
    RUN yum install -y wget
    RUN yum update -y
Run Code Online (Sandbox Code Playgroud)

当我跑步时docker build ./ -t docker/app,出现错误:

Status: Downloaded newer image for centos:latest
 ---> ff426288ea90
Step 2/22 : RUN mkdir ~/.ssh
 ---> Running in 49d3950mwpion
Removing intermediate container 49d73360f899
 ---> 24shentufhckm
Step 3/22 : COPY ./private ~/.ssh/id_rsa
COPY failed: stat /var/lib/docker/tmp/docker-builder700869788/private: no such …
Run Code Online (Sandbox Code Playgroud)

linux ssh docker

6
推荐指数
1
解决办法
6363
查看次数

VSCode v1.43 远程 ssh 无法连接。v1.42 有效

我正在使用远程 ssh扩展从我的 MAC 连接到 CENTOS 7.4 机器。在v1.42 中一切正常。我昨天更新到v1.43,现在 VSCode 无法连接。我收到以下错误,它“挂起”,直到我选择关闭远程连接。我切换回 v1.42,它工作正常。还有人看到这个吗?

[11:48:35.614] stderr> Authenticated to 172.18.116.204 ([172.18.116.204]:22).
[11:48:35.704] > Warning: no access to tty (Bad file descriptor).
[11:48:35.707] > Thus no job control in this shell.
[11:48:36.308] stderr> stty: 
[11:48:36.308] stderr> standard input: Inappropriate ioctl for device
[11:48:36.309] stderr> 
[11:48:38.151] stderr> stty: 
[11:48:38.152] stderr> standard input: Inappropriate ioctl for device
[11:48:38.152] > ready: 552eb5fb743e
[11:48:38.180] > Linux 3.10.0-693.el7.x86_64 #1 SMP Tue Aug 22 21:09:27 …
Run Code Online (Sandbox Code Playgroud)

ssh remote-access visual-studio-code

6
推荐指数
1
解决办法
2195
查看次数

将TCP MySQL连接重定向到代理

我有一个Delphi应用程序,它连接到Internet上的MySQL发布数据库,地址如mysql01.example.com:3306.

但是,我的客户端计算机位于代理后面,如果我通过代理,我就可以连接.我使用ZeosLib进行连接,它没有代理身份验证.

是否可以使用某种代理转发程序转发到代理的连接?还有其他可能解决这个问题吗?

非常感谢.

mysql delphi proxy zeos

5
推荐指数
1
解决办法
699
查看次数