我正在使用cakephp,并希望显示属于类别'X'的所有提交,我有4个具有HABTM关系的表.
用户 - >(hasMany) - >提交< - >(hasAndBelongsToMany)< - >类别
但我想使用$ this-> paginate()这样做,并且对于每个提交,我想显示发布提交的用户.
用户表
Id | Name
-----+-------------------
1 | User 1
2 | User 2
Run Code Online (Sandbox Code Playgroud)
提交表
Id | Name | User_id
-----+-------------------+--------------
1 | Submission 1 | 1
2 | Submission 2 | 2
Run Code Online (Sandbox Code Playgroud)
分类表
Id | Name
-----+-------------------
1 | Category 1
2 | Category 2
Run Code Online (Sandbox Code Playgroud)
SubmissionCategory表
Id | Submission_id | Category_id
-----+-------------------+-------------------
1 | 1 | 1
2 | 1 | 2
3 | 2 | 1 …Run Code Online (Sandbox Code Playgroud) 我必须为Java构建一个软件编辑器,所以想想一个非常简化的Netbeans/Eclipse.我想要做的第一个区域是语法高亮显示.
我发现了一些库/开源编辑器,如jEdit,BlueJ和jsyntaxpane,它们对于构建我自己的库有用.
我正在寻找的是任何文献/期刊/书籍/文章,它们解释了编写语法荧光笔的过程.
以下代码将始终以#<Errno::ECONNRESET: Connection reset by peer - SSL_connect>错误消息结束。
它可能会在 5 秒或 30 分钟后失败。
require 'net/https'
http = Net::HTTP.new('newproduct.zendesk.com', 443)
http.use_ssl = true
req = Net::HTTP::Head.new('/')
while true
res = http.start { http.request(req) }
end
Run Code Online (Sandbox Code Playgroud)
在 Mac 和 Linux 上运行时都会发生这种情况,并导致我的批处理作业失败。
看起来很难调试,但是有什么我应该注意的吗?
cakephp ×1
editor ×1
java ×1
paginate ×1
relationship ×1
ruby ×1
ssl ×1
text-editor ×1
zendesk ×1