我想要有不同大小和不同文本数量的图像缩略图.但我希望它们都具有相同的尺寸.就像Bootstrap网站上的这个例子一样.
下面是我目前的代码,在jsFiddle上有一个演示.
我有不同的图像大小,所以这会被打破.Bootstrap有可能吗?
<div class="col-sm-6 col-md-4">
<div class="thumbnail">
<h3>
Fading a RGB LED on BeagleBone Black
</h3><img src="https://learn.adafruit.com/system/guides/images/000/000/322/medium310/overview_web.jpg?" alt="Sample Image">
<div class="caption">
<p>In this tutorial, you will learn how to control the color of an RGB LED using a BeagleBone Black and Python.</p>
</div>
</div>
</div>
<div class="col-sm-6 col-md-4">
<div class="thumbnail">
<h3>
Measuring Light with a BeagleBone Black
</h3><img src="https://learn.adafruit.com/system/guides/images/000/000/316/medium310/overview_web.jpg?" alt="Sample Image">
<div class="caption">
<p>In this tutorial, you will learn how to …Run Code Online (Sandbox Code Playgroud) 我想知道是否可以知道用户数据中的脚本何时完全执行?
data "template_file" "script" {
template = file("${path.module}/installing.sh")
}
data "template_cloudinit_config" "config" {
gzip = false
base64_encode = false
# Main cloud-config configuration file.
part {
filename = "install.sh"
content = "${data.template_file.script.rendered}"
}
}
resource "aws_instance" "web" {
ami = "ami-04e7b4117bb0488e4"
instance_type = "t2.micro"
key_name = "KEY"
vpc_security_group_ids = [aws_default_security_group.default.id]
subnet_id = aws_default_subnet.default_az1.id
associate_public_ip_address = true
iam_instance_profile = "Role_S3"
user_data = data.template_cloudinit_config.config.rendered
tags = {
Name = "Terraform-Ansible"
}
}
Run Code Online (Sandbox Code Playgroud)
在脚本的内容中我有这个。它告诉我 Terraform 成功应用了更改,但脚本仍在运行,有没有办法可以监控它?
#!/usr/bin/env bash
exec > >(tee /var/log/user-data.log|logger -t …Run Code Online (Sandbox Code Playgroud) amazon-ec2 amazon-web-services terraform terraform-provider-aws
我有使用 Express 和 node-github 的节点示例。我正在请求令牌,以便用户可以授权应用程序创建要点。我遇到的问题是,要点是像匿名用户一样创建的。
如果我从代码要点中删除 github.authenticate ,则会以匿名方式创建。如果我离开 github.authenticate ,则不会创建任何要点,也不会显示任何错误。
我认为这个问题在于我必须在哪里找到 github.authenticate。
我有我的回调
app.get('/auth/github/callback',function (req, res) {
var url = Url.parse(req.url);
var path = url.pathname;
var query = querystring.parse(url.query);
var code = req.query.code;
console.log('/callback');
OAuth2.AuthCode.getToken({
code: code,
redirect_uri: 'http://127.0.0.1:3000/auth/github/callback'
}, saveToken);
github.authenticate({
type: "oauth",
token: accessToken
});
res.redirect('home');
function saveToken(error, result) {
if (error) { console.log('Access Token Error', error.message); }
accessToken = OAuth2.AccessToken.create(result);
}
});
Run Code Online (Sandbox Code Playgroud)
这是我的帖子。到这里,要点就创建好了。
app.post('/test', function(req, res){
github.gists.create({
"description": "the description for this gist",
"public": true,
"files": { …Run Code Online (Sandbox Code Playgroud) 我想从我创建的动态LI中获取值.
我找到了这个答案,解释了如何正常使用它.
这是我的代码.这对我在LI上的两个元素非常有用.
<ul class="nav nav-pills nav-stacked" id="listPreReq" style="height: 200px; overflow: auto" role="menu">
<li class="active"><a href="#">Action</a></li>
<li><a href="#">Another action</a></li>
</ul>
$("#listPreReq li").click(function() {
alert($(this).html());
});
Run Code Online (Sandbox Code Playgroud)
但是我有这个选项可以向LI添加更多元素.我添加的所有新元素,它们都不会触发$("#listPreReq li").click事件.不知道为什么.这是一个演示.
$('#btPre').click(function(e) {
var Psize= $("#listPreReq").find("li");
Psize = Psize.size()+1;
$("#listPreReq").append('<li><a href="#">Page '+Psize+'</a></li>');
});
Run Code Online (Sandbox Code Playgroud) 我正在使用javascript动态创建div.我想将样式分配给none.
style ="display:none;"
根据这个问题,我可以用以下选项来做到这一点
publishcontent.style.display="none";
publishcontent.setAttribute("style", "display: none;");
Run Code Online (Sandbox Code Playgroud)
但这不起作用.这是我创建div的方式.我发现的选项无法正常工作.如果我用firebug编辑html并输入style ="display:none;" 有用.
publishpaging=document.createElement("div");
var name="df"+counterName;
publishpaging.id=name;
counterName=counterName+1;
arrayNames.push(name);
counter++;
publishcontent=document.createElement("div");//"<div class='bonecardSmall'></div>";
publishcontent.className = "bonecardSmallP";
publishcontent.id=index.id;
if(arrayNames.length > 1){
//publishpaging.style.display="none";
publishpaging.setAttribute("style", "display: none;");
}
publishpaging.appendChild(publishcontent);
Run Code Online (Sandbox Code Playgroud) 我有这个叉子我用CSS制作的丝带.我们的想法是,它们必须位于导航栏的顶部,就像实际的github图像一样.这就是它现在的样子:http://jsbin.com/womib/1
.ribbon {
background-color: #F38419;
overflow: hidden;
white-space: nowrap;
position: absolute;
left: -50px;
top: 40px;
-webkit-transform: rotate(-45deg);
-moz-transform: rotate(-45deg);
-ms-transform: rotate(-45deg);
-o-transform: rotate(-45deg);
transform: rotate(-45deg);
}
.ribbon a {
border: 1px solid #faa;
color: #fff;
display: block;
font: bold 81.25% 'Helvetica Neue', Helvetica, Arial, sans-serif;
margin: 1px 0;
padding: 10px 50px;
text-align: center;
text-decoration: none;
text-shadow: 0 0 5px #444;
}
Run Code Online (Sandbox Code Playgroud)
我想把它放在导航栏的顶部,但我得到了这个结果.

我有两名选手和比分。在玩家表上,我有两个字段,名称和ID(PK)在得分上,我有几个字段[id_score(PK),优胜者和散客是玩家ID的外键] id比赛和id匹配。
Players
id_players | name
------------+-----------
41 | Antonia
42 | Roberto
43 | Luis
44 | Pedro
45 | Fernando
46 | Alejandra
47 | Rene
48 | Julieta
Scores
id_score | id_matches | winner | looser | id_tournament | round
----------+------------+--------+--------+---------------+-------
19 | 22 | 41 | 42 | 21 | 1
20 | 23 | 43 | 44 | 21 | 1
21 | 24 | 45 | 46 | 21 | 1
22 | 25 …Run Code Online (Sandbox Code Playgroud) css ×4
html ×4
jquery ×3
javascript ×2
amazon-ec2 ×1
count ×1
express ×1
github ×1
group-by ×1
node.js ×1
postgresql ×1
sql-order-by ×1
terraform ×1