我正在尝试在网页中显示全宽的vimeo视频.
这就是它现在的样子:
你可以看到黑色是全宽而不是视频.它应该是全宽,没有显示控件,自动播放和循环播放.
我的代码现在看起来像这样:
<iframe src="https://player.vimeo.com/video/208176323?autoplay=1&loop=1&background=1" width="100%" height="500px" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
Run Code Online (Sandbox Code Playgroud)
客户端有vimeo plus但不是vimeo pro.有人可以帮我弄这个吗.
更新:
我已将代码更改为:
<style>
.embed-container {
position: relative;
padding-bottom: 56.25%;
height: 0; overflow: hidden;
max-width: 100%; height: auto;
}
.embed-container iframe, .embed-container object, .embed-container embed {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
</style>
<div class='embed-container'><iframe src='https://player.vimeo.com/video/208791851?autoplay=1&loop=1&background=1' frameborder='0' webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe></div>
Run Code Online (Sandbox Code Playgroud)
但我仍然在底部和顶部有黑色边框.
我已经创建了一个jsfiddle,你也可以看到这个:https://jsfiddle.net/07fkfwz3/ .你在这里看到的视频没有任何边框.
我有三张桌子.
item 与领域
PK id
title
description
type
created
delete
fk user_id
Run Code Online (Sandbox Code Playgroud)
article 与领域
PK item_id (one-to-one with item table),
body
Run Code Online (Sandbox Code Playgroud)
media 与领域
PK id
FK item_id (many-to-one with item table)
url
type
mimetype
isexternal
Run Code Online (Sandbox Code Playgroud)
表中的type字段article是带有值的ENUM ITEM, ARTICLE and IMAGE.
实体是自动生成的.因此,最初文章实体不会扩展项目实体.我不得不改变这一点.
我总是得到这个错误:
Entity 'Beachteam\BeachteamBundle\Entity\Article' has a composite identifier
but uses an ID generator other than manually assigning (Identity, Sequence).
This is not supported.
Run Code Online (Sandbox Code Playgroud)
更新:
删除我的类型变量并修复discriminatormap后,我收到此错误:
Property Beachteam\BeachteamBundle\Entity\Item::$type does not exist
Run Code Online (Sandbox Code Playgroud)
这是我更新的物品实体:
<?php
namespace Beachteam\BeachteamBundle\Entity;
use …Run Code Online (Sandbox Code Playgroud) 我有这样的布局:
滚动到底部时,左列应向下滚动(直到下一个类别).
我的HTML看起来像这样:
<div class="wrapper gray-bg">
<div class="centered">
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-5 col-lg-4 information group">
<h1>Glas</h1>
<hr>
<p class="info">
</p>
<p>Wil je een maximale <strong>lichtinval</strong> en maximale <strong>isolatie</strong>, maar hou je ook van een <strong>strak design</strong>? Kies dan voor onze vlakke lichtkoepels met dubbelwandig of 3-dubbel glas. Ze zien er niet alleen geweldig uit, maar scoren op alle vlakken ongelooflijk goed.</p>
<p></p>
<div class="buttons">
<a href="" class="button">bekijk referenties</a>
<a href="/nl/professional/contact" class="button gray">Vraag offerte</a>
</div>
</div>
<div class="col col-xs-12 col-sm-12 …Run Code Online (Sandbox Code Playgroud) 这是我的PHP文件中的内容:
$session = $m->session;
Run Code Online (Sandbox Code Playgroud)
$ session现在是:
object(stdClass)[31]
public 'id' => string '21112' (length=5)
public 'external_id' => string '' (length=0)
public 'sessiongroupid' => string '1843' (length=4)
public 'eventid' => string '5588' (length=4)
public 'order' => string '0' (length=1)
public 'name' => string 'Ferdau Conference' (length=17)
public 'description' => string 'Ferdau Conference' (length=17)
public 'starttime' => string '2013-04-18 18:00:00' (length=19)
public 'endtime' => string '2013-04-18 18:04:00' (length=19)
public 'speaker' => string '' (length=0)
public 'location' => string 'Waregem' (length=7)
public 'mapid' => …Run Code Online (Sandbox Code Playgroud) 我有一个关于向某个位置显示箭头的问题.这就是我所拥有的:

您可以将当前位置保存在本地存储中.不久之后,当您再进一步30米时,您可以点击第二个按钮"向前一个位置显示方向!" 获得箭头到您以前的位置.这是一个移动网站,因此不是本机应用.
这是我的代码:
<!DOCTYPE html>
<html>
<head>
<!-- JQUERY SCRIPT AND COMPASS SCRIPT AND MODERNIZR SCRIPT -->
<script src="http://code.jquery.com/jquery-1.8.3.js"></script>
</head>
<body>
<div class="container">
<h1>Find your location</h1>
<div class="row">
<div class="span12">
<!-- Save your current location -->
<button class="grey" id="btnFindLocation">Save my current location!</button> <br>
<!-- Show direction to previous location -->
<button class="grey" id="btnShowDirection">Show direction to previous location!</button> <br><br>
<!-- Arrow in direction to location -->
<img id="myarrow" class="deviceorientation" src="http://nielsvroman.be/tapcrowd/arrow.png" />
</div>
</div>
<script>
$(window).ready(function(){
// orientation object to save …Run Code Online (Sandbox Code Playgroud) 我正在使用名为Attendize的开源票证系统.
他们已经将支付提供商Stripe集成在一起.现在我正在尝试与支付提供商Mollie合作.
问题是我一直在绊倒这个错误:
我的代码看起来像这样:
$transaction_data += [
'transactionId' => $event_id . date('YmdHis'),
'returnUrl' => route('showEventCheckoutPaymentReturn', [
'event_id' => $event_id,
'is_payment_successful' => 1
]),
];
$apiKey = "test_gSDS4xNA96AfNmmdwB3fAA47******";
$gateway->setApiKey($apiKey);
$transaction = $gateway->purchase($transaction_data);
$response = $transaction->send();
if ($response->isSuccessful()) {
session()->push('ticket_order_' . $event_id . '.transaction_id',
$response->getTransactionReference());
return $this->completeOrder($event_id);
} elseif ($response->isRedirect()) {
/*
* As we're going off-site for payment we need to store some data in a session so it's available
* when we return
*/ …Run Code Online (Sandbox Code Playgroud) 在我的viewModel中我有:
public class PersonViewModel
{
public Person Person { get; set; }
public int SelectRegionId { get; set; }
public IEnumerable<SelectListItem> Regions { get; set; }
}
Run Code Online (Sandbox Code Playgroud)
但是我在Controller/View中需要做些什么来显示值?我现在拥有的:
控制器:
public ActionResult Create()
{
var model = new ReUzze.Models.PersonViewModel
{
Person = new Person(),
Regions = new SelectList(this.UnitOfWork.RegionRepository.Get(), "Id", "Name")
};
return View(model);
}
Run Code Online (Sandbox Code Playgroud)
视图:
<div class="form-group">
@Html.LabelFor(model => model.Person.Address.Region)
@Html.DropDownListFor(model => model.SelectRegionId, new SelectList(Model.Regions, "Id", "Name"), "Choose... ")
</div>
Run Code Online (Sandbox Code Playgroud)
但它给出了这样的错误:
Cannot implicitly convert type 'System.Web.Mvc.SelectList' to 'System.Collections.Generic.IEnumerable<System.Web.WebPages.Html.SelectListItem>'. An explicit conversion …Run Code Online (Sandbox Code Playgroud) 我想注册一个用户.在我的数据库中,我有一个user带有FK 的表,player_id在我的玩家表中team_id,我的团队表中有一个FK .
这是我的RegisterType表单:
class RegisterType extends AbstractType
{
/**
* @param FormBuilderInterface $builder
* @param array $options
*/
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add('userFirstname', 'text', [
'label' => 'Given name*',
'attr' => [
'placeholder' => 'Enter your given name.',
],
])
->add('userSurname', 'text', [
'label' => 'Family name*',
'attr' => ['placeholder' => 'Enter your family name.'],
])
->add('userType', 'choice', array(
'choices' => array('E' => 'ENTHOUSIAST', 'P' => 'PLAYER', 'T' => …Run Code Online (Sandbox Code Playgroud) 我遇到了以下要执行的SQL查询的问题:
LOAD DATA INFILE 'thelocationofmyfile.csv'
INTO TABLE test_import
FIELDS TERMINATED BY ';'
LINES TERMINATED BY '\r\n'
IGNORE 1 LINES ( ArtID, ArtNamePharmLang, ArtNameFr, ArtNameNl, PubPrice, PercentageRebate, RebateAmount, SellingPrice, Localisation, CnkNr, EanNr, SoldQty, MinThd, MaxThd, QtyInStock, DateLastSale, VatRate, SupplierManufName, BuyPrice, InvCatCode, ArtType, ApbCatCode, ApbLegCode, PharmApbNr );
Run Code Online (Sandbox Code Playgroud)
我想将excel文件的数据加载到我的数据库中的表中.当我在本地运行时一切正常.但是当我在服务器上执行此操作时,我收到以下错误:
Uncaught exception 'PDOException' with message 'SQLSTATE[28000]: Invalid authorization specification: 1045 Access denied for user 'myuser'@'localhost' (using password: YES)'
Run Code Online (Sandbox Code Playgroud)
我正在尝试用PHP(在Zend Framework中)这样做.当我联系托管时,他们说我需要FILE权限才能执行此操作.但这是不好的做法,并没有提出建议.
我也尝试在这样的shell脚本中执行此操作:
#!/bin/bash
/usr/bin/mysql --host=localhost --user=theuser --password=password --database=db_database<<EOFMYSQL
LOAD DATA INFILE 'locationofmyfile.csv'
INTO …Run Code Online (Sandbox Code Playgroud) 当我想将图像上传到我的亚马逊s3水桶时,我遇到了问题.
我正在尝试上传大小为238 KB的jpg图像.我在我的代码中放了一个try/catch来检查错误是什么.我总是得到这个错误:
您建议的上传量小于允许的最小尺寸
我也用1MB和2MB的图像试过这个,同样的错误....
这是我的代码:
<?php
// Include the SDK using the Composer autoloader
require 'AWSSDKforPHP/aws.phar';
use Aws\S3\S3Client;
use Aws\Common\Enum\Size;
$bucket = 'mybucketname';
$keyname = 'images';
$filename = 'thelinktomyimage';
// Instantiate the S3 client with your AWS credentials and desired AWS region
$client = S3Client::factory(array(
'key' => 'key',
'secret' => 'secretkey',
));
// Create a new multipart upload and get the upload ID.
$response = $client->createMultipartUpload(array(
'Bucket' => $bucket,
'Key' => $keyname
));
$uploadId = $response['UploadId'];
// 3. Upload …Run Code Online (Sandbox Code Playgroud) php ×6
javascript ×3
css ×2
html ×2
jquery ×2
mysql ×2
sql ×2
symfony ×2
amazon-s3 ×1
arrays ×1
asp.net ×1
asp.net-mvc ×1
c# ×1
converter ×1
csv ×1
doctrine ×1
doctrine-orm ×1
entity ×1
file-upload ×1
geolocation ×1
heading ×1
json ×1
laravel ×1
minimum-size ×1
mollie ×1
object ×1
omnipay ×1
permissions ×1
video ×1
vimeo ×1
width ×1