我正在尝试制作带视频的旋转木马.使用图像工作正常,即使在移动视图中,图像也能响应.但是对于视频,宽度是响应但不是高度.基本上我想用旋转木马图像但用视频来实现相同的竞争.我在网上尝试了很多技巧,但没有人这样做.我的视频是1024/552px
尽力而为.你可以看到你是否加载了一个小宽度的小提琴,它保持相同的高度,它没有响应,但旋转木马/视频的宽度是(它虽然在两侧裁剪视频).它与图像没有相同的比例.正如您将看到的,我在第二张幻灯片中包含了一张图片,以进一步展示我的问题.
https://jsfiddle.net/687bsb21/1/
这是代码:
<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
<ol class="carousel-indicators">
<li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
<li data-target="#carousel-example-generic" data-slide-to="1"></li>
</ol>
<!-- Wrapper for slides -->
<div class="carousel-inner" role="listbox">
<div class="item active">
<div align="center">
<video autoplay loop>
<source src="http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4" width="1024" height="552" type="video/mp4">
Your browser does not support the video tag.
</video>
</div>
<div class="carousel-caption">
<h3>hello</h3>
<p>hello</p>
</div>
</div>
<div class="item">
<img src="http://dummyimage.com/1024x552/000/fff" class="img-responsive" alt="asfds">
<div class="carousel-caption">
<h3>hello</h3>
<p>hello.</p>
</div>
</div>
<a class="left carousel-control" href="#carouselHelp" role="button" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
<span class="sr-only">Previous</span> …Run Code Online (Sandbox Code Playgroud) 在 Meteor 中,我使用 MongoDB 来存储对象的集合。插入了大约 500k 文档。
我使用Objets.find({ "_id": { "$in": objIds } });其中 objIds 是 _id 数组。当我的数组长度为 1000 时,这工作正常,但当我尝试使用 13145 _ids 时,应用程序停止响应。
显然 _id 字段上已经有一个索引,并且此搜索可能永远不会发生,但我不确定这是否是正常行为。$in 运算符有最大长度吗?在文档中找不到。
这是我在 Meteor 中的发布:
Meteor.publish('objetsByIds', function objetsByIdsPublication(objIds) {
return Objets.find({ "_id": { "$in": objIds } });
})
Run Code Online (Sandbox Code Playgroud) 我正在尝试在Google App Engine中运行Python应用程序.用户界面不起作用,所以我尝试使用命令行.我尝试重启我的电脑,我尝试用"dev_appserver.py --port = 9999"更改端口.但它仍然说Unable to bind localhost:8000:
raise BindError('Unable to bind %s:%s' % self.bind_addr)
google.appengine.tools.devappserver2.wsgi_server.BindError: Unable to bind localhost:8000
Run Code Online (Sandbox Code Playgroud) 今天我在这里阅读这篇文章,介绍如何在我的GAE REST API中使用One To Many关系.
https://cloud.google.com/appengine/articles/modeling
我认为这非常简单,但后来我意识到我使用的是ndb而不是db,所以我不能使用db.ReferenceProperty.
在这里,我有一个模型路线
class Route(ndb.Model):
driver_id = ndb.IntegerProperty()
requester_id = ndb.IntegerProperty()
startpoint = ndb.GeoPtProperty(required=True)
endpoint = ndb.GeoPtProperty(required=True)
regular = ndb.BooleanProperty(required=True)
date_and_time = ndb.DateTimeProperty(required=True)
places_available = ndb.IntegerProperty()
val_lift = ndb.IntegerProperty()
Run Code Online (Sandbox Code Playgroud)
在这里,我有我的模型RegularDays,如果收到的JSON中的Regular为True,将使用它
class RegularDays(ndb.Model):
route = db.ReferenceProperty(Route,
collection_name='regular_days')
Monday = ndb.BooleanProperty(required=True)
Tuesday = ndb.BooleanProperty(required=True)
Wednesday = ndb.BooleanProperty(required=True)
Thursday = ndb.BooleanProperty(required=True)
Friday = ndb.BooleanProperty(required=True)
Saturday = ndb.BooleanProperty(required=True)
Sunday = ndb.BooleanProperty(required=True)
Run Code Online (Sandbox Code Playgroud)
所以我要做的就是这个.
if newroute.regular:
RegularDays(route=newroute,
Monday=route_json['Days']['Monday'],
Tuesday=route_json['Days']['Tuesday'],
Wednesday=['Days']['Wednesday'],
Thursday=route_json['Days']['Thursday'],
Friday=route_json['Days']['Friday'],
Saturday=route_json['Days']['Saturday'],
Sunday=route_json['Days']['Sunday']).put()
Run Code Online (Sandbox Code Playgroud)
但现在我对如何更改此代码非常困惑,因此它适用于NDB.
谢谢你的帮忙
我试着在MuleSoft的网站上建议教程.
我首先从这个例子开始:
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns:tracking="http://www.mulesoft.org/schema/mule/ee/tracking" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
xmlns:spring="http://www.springframework.org/schema/beans" version="EE-3.6.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.mulesoft.org/schema/mule/ee/tracking http://www.mulesoft.org/schema/mule/ee/tracking/current/mule-tracking-ee.xsd">
<http:listener-config name="HTTP_Listener_Configuration" host="localhost" port="8084" doc:name="HTTP Listener Configuration"/>
<flow name="basic_tutorialFlow">
<http:listener config-ref="HTTP_Listener_Configuration" path="/" doc:name="HTTP"/>
<expression-filter expression="#[payload != '/favicon.ico']" doc:name="Expression"/>
<logger level="INFO" doc:name="Logger" message="Current payload is #[payload]"/>
<set-payload doc:name="Set Payload" value="#['Hello, ' + message.inboundProperties.'http.request.path' + '. Today is ' + server.dateTime.format('dd/MM/yy') + '.' ]"/>
</flow>
</mule>
Run Code Online (Sandbox Code Playgroud)
可在此处找到http://www.mulesoft.org/documentation/display/current/Basic+Studio+Tutorial
我使用拖放功能制作它,之后我在网站上复制了代码,以确保它不是我的错误.
当我输入没有有效负载的URL时,它运行良好.我收到了这个回复
你好, /.今天是2015年1月23日.
但是,当我在教程中添加有效负载时,它不起作用:
资源未找到.
我也尝试了其他例子,只要我不输入有效载荷就可以了.以下是控制台告诉我的内容:
INFO 2015-01-23 10:33:55,614 [[basic_tutorial].HTTP_Listener_Configuration.worker.01] org.mule.api.processor.LoggerMessageProcessor: Current …Run Code Online (Sandbox Code Playgroud) 基本上我和我的伴侣在一个学校项目上工作,我们使用Dropbox来处理所有事情,但是使用PHP它会使WAMP和一切都变得复杂.我想知道是否有可能在C:\ wamp\www \中有一个php文件,它会指向Dropbox C:\ Users\Myname\Dropbox上的其他文件,这样我们就可以轻松地一起使用Dropbox了.在localhost中,我们可以访问Dropbox中的文件,而不仅仅是来自www的文件.我试过'包含'但无济于事.
提前致谢.
一段时间后,我发现自己读了这个,在apache中添加一个别名到dropbox文件夹,然后用本地主机你可以访问它.
您好我正在尝试在Mule ESB中记录POST内容的内容,因为另一端接收除了二进制的ContactId之外的所有内容.我们正在尝试确定错误的位置.这是流程.
<flow name="ContactUpdate">
<http:inbound-endpoint exchange-pattern="request-response" host="host" port="port" path="ContactUpdate" doc:name="HTTP"/>
<logger level="INFO" doc:name="Logger" message="#[payload]"/>
<ws:consumer config-ref="Web_Service_Consumer" operation="UpdateContact" doc:name="UpdateContact"/>
</flow>
Run Code Online (Sandbox Code Playgroud)
在日志中,我只能看到内容的长度和其他信息,但不能看到POST中发送的正文的实际内容.有可能做这样的事吗?
谢谢你的帮助