给定尺寸为wx 的图像G h,如何用白色环绕图像以产生320 x 480的新图像,其中G居中,被白色包围.传入图像的宽度和高度可能会大于320或480,因此首先我需要对其进行缩放以确保它小于320x480(或等于).
-(UIImage *)whiteVersion:(UIImage *)img {
}
Run Code Online (Sandbox Code Playgroud)
我会使用这些步骤:
Firstly, scale image if needed...then:
1. Create a UIImage of size 320x480
2. Paint the whole thing white
3. Paint G (the image) in the center by using some simple math to find the location
Run Code Online (Sandbox Code Playgroud)
但是,我无法弄清楚第1步或第2步.
我试图运行以下查询,但得到一个错误:
select S
from St
where count(
select *
from L
where L.Wh = S
) = 0
Run Code Online (Sandbox Code Playgroud)
我收到错误:
错误代码1064,SQL状态42000:您的SQL语法中有错误...
我该怎么写这个查询?
想象一下数字 1 到 15
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
Run Code Online (Sandbox Code Playgroud)
现在考虑该列表中的一些值 V 和另一个值 D。
问题是,什么是V-D。
但这里有一个问题:假设这些值是一个循环,而不是线性计数。换句话说,“1”紧邻“15”。
是否有可能获得某种类型的加载项或能够在Mac上编辑/运行Eclipse中的R程序?我在我的Mac上运行Lion.