我需要创建lightSlider(http://sachinchoolur.github.io/lightslider/)图库,其中缩略图/ .IsPager旁边有"显示所有照片"(如果缩略图计数> = 5显示按钮).
我尝试按位置:绝对但显示所有按钮超过最后一个缩略图.
$('#lightSlider').lightSlider({
gallery: true,
item: 1,
loop: true,
slideMargin: 0,
thumbItem: 6
});Run Code Online (Sandbox Code Playgroud)
.demo {
width: 420px;
position: relative;
}
ul {
list-style: none outside none;
padding-left: 0;
margin-bottom: 0;
}
li {
display: block;
float: left;
margin-right: 6px;
cursor: pointer;
}
img {
display: block;
height: auto;
max-width: 100%;
}
.show-all {
width: 80px;
height: auto;
background-color: #eee;
border: 1px #ddd;
float: left;
position: absolute;
right: 0;
bottom: 0;
}Run Code Online (Sandbox Code Playgroud)
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<link …Run Code Online (Sandbox Code Playgroud)我需要发送带有附件的简单邮件。现在它发送一封电子邮件,但附件位于电子邮件正文中,如下所示。

--
Content-Type: text/csv;
charset=UTF-8
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename=errors_in_address_table.csv
Content-ID: <5b0e7d6b4abff_10c12ac224c8b0d4994d@development.mail>
Run Code Online (Sandbox Code Playgroud)
当前发送电子邮件的代码
saved_file = Rails.root.join('db', 'fix_db', 'errors_in_address_table.csv')
mailer = ActionMailer::Base.mail(from: 'no-replay@test.com', to: 'test@test.com', subject: 'Errors in database', body: '', content_type: 'multipart/mixed')
mailer.attachments['errors_in_address_table.csv'] = { mime_type: 'text/csv', content: File.read(saved_file) }
mailer.deliver
Run Code Online (Sandbox Code Playgroud)
我试图让它正常工作几个小时。也许一些更有经验的编码员可以帮助我。
我需要在 PostgreSQL 中小写数组内容,lower(array['array_content']))否则array[lower('array_content']))不起作用。实际数组要长得多。
SELECT * FROM kliendi_aadress WHERE lower(linn) LIKE ANY (array['Tallinn', 'Tartu','Narva'])
这甚至可以做到吗?