我有以下图片:
alex@alexvps:~$ sudo docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
<none> <none> 70c0e19168cf 5 days ago 1.069 GB
<none> <none> c2ce80b62174 8 days ago 399.2 MB
<none> <none> 60afe4036d97 8 days ago 325.1 MB
Run Code Online (Sandbox Code Playgroud)
当我尝试删除其中一个时,我得到:
alex@alexvps:~$ sudo docker rmi 60afe4036d97
Error: Conflict, 60afe4036d97 wasn't deleted
2014/01/28 00:54:00 Error: failed to remove one or more images
Run Code Online (Sandbox Code Playgroud)
我该如何删除它们?为什么会有这样的冲突?
我想用Jekyll创建一个网站.不是博客.有没有办法避免在网址和网页文件名中指定创建日期?
我认为Jekyll背后的想法非常棒,但它似乎与博客生成内容有关,而在更一般的用例中也可能有用.
我正在尝试在blob列中编写和更新pdf文档,但我只能更新blob,只写入比以前存储的数据更多的数据.如果我尝试用较小的文档数据更新blob列,我只会得到一个损坏的pdf.
首先使用empty_blob()函数初始化blob列.我在下面编写了示例Java类来测试此行为.我第一次以'true'作为main方法的第一个参数运行它,所以在第一行中存储了大约31kB的文档,在第二行中存储了一个278kB的文档.然后我用'false'作为参数运行它,这样两行应该更新交换文件.结果是,只有当我写入比现有数据更多的数据时才能得到正确的结果.
如何编写一种以可靠的方式编写和更新blob的方法而不必担心二进制数据的大小?
import static org.apache.commons.io.IOUtils.copy;
import java.io.FileInputStream;
import java.io.OutputStream;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import oracle.jdbc.OracleDriver;
import oracle.jdbc.OracleResultSet;
import oracle.sql.BLOB;
import org.apache.commons.lang.ArrayUtils;
/**
* Prerequisites:
* 1) a table named 'x' must exists [create table x (i number, j blob);]
* 2) that table should have two columns [insert into x (i, j) values (1, empty_blob()); insert into x (i, j) values (2, empty_blob()); commit;]
* 3) download lsp.pdf from http://www.objectmentor.com/resources/articles/lsp.pdf
* …Run Code Online (Sandbox Code Playgroud) 我尝试使用以下模板创建一个 EC2 实例:
Parameters:
KeyName:
Default: TestKeyPair
Description: Name of an existing EC2 KeyPair to enable SSH access to the instance
Type: AWS::EC2::KeyPair::KeyName
Resources:
Dev:
Properties:
ImageId: ami-4e79ed36
InstanceType: t2.micro
KeyName: !Ref 'KeyName'
SecurityGroups:
- !Ref 'SSH'
Type: AWS::EC2::Instance
Run Code Online (Sandbox Code Playgroud)
但我得到:
An error occurred (ValidationError) when calling the CreateChangeSet operation: Template format error: Unresolved resource dependencies [SSH] in the Resources block of the template
Run Code Online (Sandbox Code Playgroud)
我无法理解模板中有什么问题,因为名为“SSH”的安全组已经存在:
$ aws ec2 describe-security-groups --group-names SSH
....
"IpPermissions": [
{
"ToPort": 22,
"IpRanges": [
{
"CidrIp": …Run Code Online (Sandbox Code Playgroud) Cfengine和Chef之间的功能有何不同?
我写了一个验证输入字符串的正则表达式.它必须至少有8个字符长度(由字母数字和标点字符组成),并且必须至少有一个数字和一个字母字符.所以我想出了正则表达式:
^(?=.*[0-9])(?=.*[a-zA-Z])[a-zA-Z0-9-,._;:]{8,}$
Run Code Online (Sandbox Code Playgroud)
现在我必须用不支持前瞻的语言重写这个正则表达式,我应该如何重写该正则表达式?
有效输入是:
1foo,bar
foo,bar1
1fooobar
foooobar1
fooo11bar
1234x567
a1234567
Run Code Online (Sandbox Code Playgroud)
输入无效:
fooo,bar
1234-567
.1234567
Run Code Online (Sandbox Code Playgroud) 我正在尝试使用频道的用户列表{{self.say(channel, "WHO",100)}}.我该如何得到答复?我应该覆盖哪种方法?
我有一个“项目”对象列表,如:
public class Item {
private String name;
private int qty;
public Item() { }
public Item(String name, int qty) {
this.name = name;
this.qty = qty;
}
public List<Item> unpack() {
List<Item> items = new ArrayList<>();
items.add(new Item("foo", 2));
items.add(new Item("bar", 3));
items.add(new Item("baz", 1));
List<Item> unpackedItems = unpack(items);
System.out.println(unpackedItems.size()); // it should be == 6
return unpackedItems;
}
private List<Item> unpack(List<Item> items) {
// ..
}
}
Run Code Online (Sandbox Code Playgroud)
有没有办法使用流“解包”这些对象,以便在数量大于 1 时最终重复项目列表,因此最后我将拥有数量等于 1 的对象?
我至少会检查一份文件是否声称它符合PDF/A.
我怎么能用iText做到这一点?
我尝试使用Firefox 4.0来使用localStorage对象来保存一些用于填充http://host1.example.com/index.html表单的 值,并获取这些值以自动填充http: //host2.example.com/index.html但它不起作用.
相同的原始策略是否适用于URL而不是域?