小编Rya*_*sch的帖子

如何使用RefCursor返回类型测试Oracle存储过程?

我正在寻找关于如何在SQL Developer或Embarcardero Rapid XE2中测试Oracle存储过程的一个很好的解释.谢谢.

oracle stored-procedures ref-cursor rapidsql plsqldeveloper

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

now()默认值都显示相同的时间戳

我用列创建了表(类型:timestamp with timezone)并将其默认值设置为now()(current_timestamp()).

我在单个函数中的单独语句中运行一系列插入,我注意到所有时间戳都等于(ms),是否为整个函数调用或事务缓存和共享了函数值?

postgresql timestamp transactions postgresql-9.1

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

如何使用Magick.Net调整jpeg质量

我试图将两个图像的图像质量设置为10%,并将图像大小调整为40x40.

using (var images = new MagickImageCollection {designFile, swatchFile})
{
    MagickImage sprite = images.AppendHorizontally();
    sprite.Format = MagickFormat.Jpeg;
    sprite.SetOption(MagickFormat.Jpeg, "quality", "10%");
    sprite.SetOption(MagickFormat.Jpeg, "size", "40x40"); ;

    sprite.Write(spriteFile);
}
Run Code Online (Sandbox Code Playgroud)

不幸的是SetOption,Format调用似乎并没有影响写入的文件sprite.Write()

.net c# imagemagick imagemagick-convert magick.net

10
推荐指数
1
解决办法
7628
查看次数

处理Kinesis Stream时,AWS Lambda限制

有人可以解释Lambda订阅Kinesis项目创建事件时事件会发生什么.AWS中的帐户有100个并发请求的限制,因此如果将100,000个项目添加到kinesis中如何处理事件,它们是否排队等待下一个可用的并发lambda?

amazon-web-services amazon-kinesis aws-lambda

10
推荐指数
1
解决办法
3410
查看次数

RestSharp RestRequest.AddBody不使用Newton.Json属性

var obj = new MyObject();
Run Code Online (Sandbox Code Playgroud)

我遇到RestSharp的问题RestRequest.AddBody(obj); 正确序列化对象.

class MyObject
{
   [JsonProperty(PropertyName="a")]
   public A{get;set;}

   [JsonProperty(PropertyName="b")]
   public B{get;set;}
}
Run Code Online (Sandbox Code Playgroud)

问题是AddBody序列化器没有考虑我的JsonProperty属性,我似乎可以弄清楚如何在RestRequest或RestClient上设置序列化器?

c# restsharp

8
推荐指数
2
解决办法
6889
查看次数

无服务器框架将Lambda添加到现有VPC和子网

是否可以创建无服务器框架Lambda部署,其中Lambda部署到现有VPC的SecurityGroup中?我不希望服务部署或它的堆栈拥有一个网络工件?

aws-cloudformation aws-sdk aws-lambda aws-api-gateway serverless-framework

8
推荐指数
3
解决办法
2479
查看次数

如何使用nodeJs将jsreport渲染保存到文件?

我是node.js和jsreport的新手,但我尝试做的是使用node.js在内存中创建一个pdf,然后将其保存到磁盘.我需要这个,因为它将作为AWS Lambda函数运行.

var fs = require('fs');
require("jsreport").render("<h1>Hi there!</h1>").then(function(out) {
    //pipe pdf with "Hi there!"
    fs.writeFile('C:\\helloworld.pdf', out, function (err) {
        if (err) return console.log(err);
        console.log('Hello World > helloworld.txt');
    });
fs.close();
    console.log("The End");
});
Run Code Online (Sandbox Code Playgroud)

虽然运行输出pdf将无法在Adobe Reader中打开,因此我假设文件输出不是有效的PDF.

这需要npm install jsreport

javascript node.js jsreport

7
推荐指数
1
解决办法
2307
查看次数

具有自定义 SNS MessageAttributes 的 S3 SNS 通知

是否可以将 CustomAttributes 添加到从 S3 对象创建事件通知启动的 SNS 发布?我正在尝试将内容提升到上下文以促进消息过滤?

amazon-s3 amazon-web-services amazon-sns

6
推荐指数
0
解决办法
2071
查看次数

如何将自定义类型数组传递给Postgres函数

我有自定义类型

CREATE TYPE mytype as (id uuid, amount numeric(13,4));
Run Code Online (Sandbox Code Playgroud)

我想将它传递给具有以下签名的函数:

CREATE FUNCTION myschema.myfunction(id uuid, mytypes mytype[])
  RETURNS BOOLEAN AS...
Run Code Online (Sandbox Code Playgroud)

如何在postgres查询中调用它,并且不可避免地从PHP中调用?

php sql postgresql plpgsql postgresql-9.1

5
推荐指数
2
解决办法
2788
查看次数

如何将php数组传递给postgres函数

我正在努力将PHP数组传递给以下函数.

$recipients = array();
$recipients['6c2f7451-bac8-4cdd-87ce-45d55d152078'] = 5.00;
$recipients['8c2f3421-bac8-4cdd-87ce-45d55d152074'] = 10.00;

$originator = '5630cc6d-f994-43ff-abec-1ebb74d39a3f';
$params = array($originator, $recipients);

pg_query_params(_conn, 'SELECT widgetallocationrequest($1, $2)', $params);

$results = pg_fetch_all(pg_query_params);
...
Run Code Online (Sandbox Code Playgroud)

该函数接受自定义类型的数组:

CREATE TYPE widgetallocationrequest AS (id uuid, amount numeric(13,4));
Run Code Online (Sandbox Code Playgroud)

并枚举每个项目并执行一项操作:

CREATE FUNCTION distributeWidgets(pid uuid, precipients widgetallocationrequest[])
 RETURNS BOOLEAN AS
 $BODY$
{
FOREACH v_recipient IN ARRAY precipients
LOOP
    ...do something
END LOOP;
}
  RETURN TRUE;
END;
$BODY$
LANGUAGE plpgsql VOLATILE STRICT
COST 100;

***(if the specific code sample contains errors it's only pseudocode, i'm really …
Run Code Online (Sandbox Code Playgroud)

php postgresql postgresql-9.1

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