我使用play 2.0.1来构建我的应用程序.我也使用Ebean作为后端层,mysql作为数据库到目前为止.Java作为语言.
题:
是不是有CRUD模块(动态)或crud创建模块?我在互联网上看了一下,很难找到关于新游戏框架2.x的东西.
根据这个帖子,没有... [play-framework] [2.0] CRUD Administration.
但是有些答案很古老.也许有些东西正在筹备中?
提前致谢.
我想在服务器上为加密的PDF生成证书(目前已自签名).我感兴趣的是有关如何使用TCPDF的工作流程.
我做了什么:
1)生成密钥:
openssl req -x509 -nodes -days 365000 -newkey rsa:1024
openssl pkcs12 -export -in tcpdf.crt -out tcpdf.p12
Run Code Online (Sandbox Code Playgroud)
2)然后用.crt- 文件生成PDF
3)然后我启动了acrobat reader并安装了证书(tcpdf.p12).我使用了Document-> security settings - > digital id
4)我可以导入安全设置但仍然无法打开PDF.不知道我做得对吗?acrobat reader 9.5.4会打开一个输入密码的对话框,会发生什么.我输入密码并出现错误 - >未知错误 - > CRecipientList-218
5)我使用的代码(基本相同)
$certificate = 'file://../tcpdf.crt';
$info = array(
'Name' => 'TCPDF',
'Location' => 'Office',
'Reason' => 'Testing TCPDF',
'ContactInfo' => 'http://www.tcpdf.org',
);
$pdf->setSignature($certificate, $certificate, 'tcpdfdemo', '', 2, $info);
$pdf->SetProtection($permissions=array('print', 'copy'), $user_pass='', owner_pass=null, $mode=1, $pubkeys=array(array('c' => 'file://../tcpdf.crt', 'p' => array('print'))));
Run Code Online (Sandbox Code Playgroud)
我结合了以下示例:
我来自eclipselink并尝试通过Hibernate自己工作.
让我们假设我们有一个类Car和一个类Wheel.该Car班有n个轮子.两个实体都通过双向关联连接.更重要的是,Wheel我有一个Car参考:
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "car_id")
private Car car;
Run Code Online (Sandbox Code Playgroud)
加一个吸气剂.
现在我想用它的id获取一个轮子.从我EntityManager(不是冬眠Session).我初始化EntityManager如下:
EntityManagerFactory emf = Persistence.createEntityManagerFactory(PERSISTENCE_UNIT_NAME);
EntityManager em = emf.createEntityManager();
Run Code Online (Sandbox Code Playgroud)
下一步是获取这样的轮子:
Wheel wheel = em.find(Wheel.class, 1);
Run Code Online (Sandbox Code Playgroud)
轮子返回想要的类和它的罚款.现在我想知道哪辆车是车轮的母车,例如:
Car car = wheel.getCar();
Run Code Online (Sandbox Code Playgroud)
使用eclipselink,实际的汽车将被加载.使用hibernate代替加载代理类.
我到目前为止唯一的解决方案是设置FetchType.EAGER或直接获取加入关系.我意识到Hibernate中的SQL语句仍在执行,但没有真正的对象传递.之后
Hibernate.initalize(car)
Run Code Online (Sandbox Code Playgroud)
我无法检索汽车实体.
有没有办法在不形成查询或急切获取的情况下获得预期的对象?
关于在 php 中使用 pkcs7 签署电子邮件的文档,我必须使用先前生成的证书。
在 openssl 中准确生成此示例所需文件的命令是什么? http://www.php.net/manual/it/function.openssl-pkcs7-sign.php
<?php
// the message you want to sign so that recipient can be sure it was you that
// sent it
$data = <<<EOD
You have my authorization to spend $10,000 on dinner expenses.
The CEO
EOD;
// save message to file
$fp = fopen("msg.txt", "w");
fwrite($fp, $data);
fclose($fp);
// encrypt it
if (openssl_pkcs7_sign("msg.txt", "signed.txt", "mycert.pem",
array("file://mycert.pem", "mypassphrase"),
array("To" => "joes@example.com", // keyed syntax
"From: HQ <ceo@example.com>", // indexed syntax
"Subject" …Run Code Online (Sandbox Code Playgroud) 我很高兴git ingeneral,egit和github.
问题:
假设我在c:/ username/workspace name"Test"中有一个eclipse项目.所以我对它进行了版本化并将其推送到github.现在我可以在github的github目录下看到我的所有文件.在example/src中."Test"目录未进行版本控制.只有存储库的名称是"Test".我的下一步是删除我的本地文件并再次获取我的项目(用于测试).之后我不得不再次导入我的项目(但我不得不使用新的项目向导)在egit视图上.不幸的是,还检测到了错误的scala版本.(是一个游戏框架项目).所以我在项目视图上有一个很大的感叹号.
我的问题:
为了让每个人都参与其中,github项目的最佳实践是什么?项目文件夹下的一切?显然,一些信息在整个过程中丢失了.
每次有人克隆存储库时,如何防止生成新项目?
在工作区内使用git的最佳实践如何?Eclipse警告不要将项目放在工作区内.
我来自颠覆背景:/.也许是一个普遍的误解.
提前致谢
java ×2
php ×2
certificate ×1
crud ×1
eclipse ×1
eclipselink ×1
egit ×1
frameworks ×1
git ×1
hibernate ×1
jpa ×1
openssl ×1
proxy ×1
tcpdf ×1