Linux marvin 3.16-0.bpo.2-amd64 #1 SMP Debian 3.16.3-2~bpo70+1 (2014-09-21) x86_64 GNU/Linux 我希望能够在我的RPi2上运行它:
import QtQuick 2.1
import QtQuick.Controls 1.1
import QtWebEngine 1.0
ApplicationWindow {
width: 1280
height: 720
visible: true
WebEngineView {
id: webview
url: "http://www.qt-project.org"
anchors.fill: parent
}
}
Run Code Online (Sandbox Code Playgroud)
我已经使用Yocto成功为我的RPi2创建了一个图像,使用这个独特而神奇的葡萄牙语教程,这个用英语写的
在几行之后,我如何能够为我的RPi2生成图像
mkdir -p ~/yocto/dl
cd ~/yocto
git clone -b dizzy git://git.yoctoproject.org/poky poky-dizzy
cd poky-dizzy
git clone git://git.yoctoproject.org/meta-raspberrypi
git clone -b dizzy https://github.com/meta-qt5/meta-qt5.git
git clone -b dizzy git://git.openembedded.org/meta-openembedded
git …Run Code Online (Sandbox Code Playgroud) 我使用paperclip将头像附加到我的用户身上,在我的模型中:
has_attached_file :avatar,
:styles => {square_tiny: '50x50#', square_small: '100x100#', square: '200x200#'}
Run Code Online (Sandbox Code Playgroud)
我有一张表格
<%= form_for(@user_profile,
:url => { :controller => :user_profiles, :action => :update_general_info, :id => @user_profile.id },
:html => { :multipart => true,
:class=> "form-horizontal" }) do |f| %>
<div class="control-group">
<%= f.label :avatar, :class => "control-label" %>
<div class="controls">
<%= f.file_field :avatar %>
</div>
</div>
....
<% end %>
Run Code Online (Sandbox Code Playgroud)
上传工作完美,但我回来编辑我的用户,文件字段显示'没有选择文件'.由于我正在验证该头像的存在,每次用户编辑他的详细信息时,他都必须再次上传他的头像...
我该如何解决这个问题?
我认为这:multipart => true会有所帮助,但事实并非如此.
我想将sails.js(版本0.9.7)应用程序部署到Openshift但是在git push我得到这个日志之后:
debug: Lowering sails...
DEBUG: Starting child process with 'node app.js'
.
.
.
info: Server lifted in `/var/lib/openshift/525ccaba5973caa65100002b/app-root/runtime/repo`
info: To see your app, visit http://127.7.215.1:8080
info: To shut down Sails, press <CTRL> + C at any time.
.
.
debug: --------------------------------------------------------
debug: :: Tue Oct 15 2013 03:03:56 GMT-0400 (EDT)
debug:
debug: Environment : development
debug: Host : 127.7.215.1
debug: Port : 8080
debug: --------------------------------------------------------
.
.
error: Server doesn't seem to …Run Code Online (Sandbox Code Playgroud) 我正在尝试使用Xvfb在Docker容器内运行Chrome无头.但是,虽然ps显示Chrome进程存在,但它没有到达我的测试网站.在Docker外部运行相同的命令是成功的.
Xvfb :0 -screen 0 1024x768x24 &
DISPLAY=:0 google-chrome http://mytestpage.com
Run Code Online (Sandbox Code Playgroud)
在Docker中,我收到以下消息/错误:
Xlib: extension "RANDR" missing on display ":0".
Xlib: extension "RANDR" missing on display ":0".
[1180:1180:1120/051319:ERROR:desktop_window_tree_host_x11.cc(882)] Not implemented reached in virtual void views::DesktopWindowTreeHostX11::InitModalType(ui::ModalType)
[1223:1223:1120/051319:ERROR:sandbox_linux.cc(338)] InitializeSandbox() called with multiple threads in process gpu-process
[1180:1201:1120/051319:ERROR:browser_gpu_channel_host_factory.cc(144)] Failed to create channel.
Run Code Online (Sandbox Code Playgroud)
而
ps au | grep chrome
* root 128 0.1 0.4 533772 69868 ? Sl+ 06:02 0:00 /opt/google/chrome/chrome http://mytestpage.com
* root 139 0.0 0.2 342648 …Run Code Online (Sandbox Code Playgroud) sails.sockets.rooms()和sails.sockets.socketRooms()都已弃用
在文档中:
不推荐使用此方法.请使用应用级代码跟踪您的房间.
我是SailsJS的新手.
问题1:我怎么能开始这个?我应该在哪里声明我的房间数组或哈希?
问题2:如何获取连接的客户端列表?
我正在运行一个SailsJS实例(v0.12.3),我有一个控制器MyModelController处理WebSocket(socket.io)连接,如果用户已经过身份验证,则允许该连接.
module.exports = {
/**
* Socket connection
*/
connect: function(req, res) {
/* Checks it's a socket connection request */
if (!req.isSocket) { return res.badRequest();}
/* Checks it's authenticated */
if (req.session.me) {
User.findOne(req.session.me, function (err, me) {
if (req.param('name')) {
MyModel.findOne({
name: req.param('name')
}).exec(function(err, objectFound) {
/* e.g. Join a room named after the params passed */
sails.sockets.join(req, objectFound.name);
return res.ok({ message: "All is OK!"}});
});
}
});
}
}
} …Run Code Online (Sandbox Code Playgroud) ~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.5 LTS
Release: 16.04
Codename: xenial
Run Code Online (Sandbox Code Playgroud)
$ pm2 list
>>>> In-memory PM2 is out-of-date, do:
>>>> $ pm2 update
In memory PM2 version: 2.4.6
Local PM2 version: 3.0.3
Run Code Online (Sandbox Code Playgroud)
pm2 update
Run Code Online (Sandbox Code Playgroud)
...工作直到我重新启动
npm remove pm2 -g
which pm2
npm install pm2@latest -g
which pm2
sudo reboot
Run Code Online (Sandbox Code Playgroud)
任何指针?
这是我的文件。
这里是我认为问题的核心。
Could not resolve dependency:
npm ERR! peer graphql@"^0.12.0 || ^0.13.0 || ^14.0.0" from graphql-middleware@4.0.2
Run Code Online (Sandbox Code Playgroud)
version: '3.7'
services:
apollo:
container_name: apollo
build:
context: .
dockerfile: Dockerfile
environment:
- NODE_ENV=development
volumes:
- '.:/app'
- '/app/node_modules'
ports:
- 4000:4000
restart: always
Run Code Online (Sandbox Code Playgroud)
# Use the official image as a parent image.
FROM node:current-slim
# Set the working directory.
WORKDIR /app
# Setting environment path.
ENV PATH=/app/node_modules/.bin:$PATH
# Copy the file from your host to your current location.
COPY package.json . …Run Code Online (Sandbox Code Playgroud) 在三星Galaxy S2 Android 6.0.1 + Chrome v55上,当我getUserMedia在页面加载时,会出现获取的视频轨道live.
当我从我的相机中选择后置摄像头时,我会触发另一次我gUM的约束使用那个精确的后面cameraId,视频轨道是ended,我有一个黑色矩形而不是一个流.
var constraints = {
video: {
deviceId: {
exact: defaultVideoDeviceId
}
},
audio: true
};
Run Code Online (Sandbox Code Playgroud)
function gUM(constraints, callback) {
console.debug("WebRTC constraints", constraints);
// Stopping streaming before starting the new one
if (window.streams.local) {
window.streams.local.getTracks().forEach(function(track) {
track.stop();
});
}
navigator.mediaDevices.getUserMedia(constraints)
.then(stream => {
console.debug("New MediaStream > Tracks", stream.getTracks());
window.streams.local = stream;
callback && callback(stream);
})
.catch(err => {
console.log("Raised error …Run Code Online (Sandbox Code Playgroud) 我正在使用旧的NodeJS代码,我想在开始修复其余部分之前清除所有缩进问题.
如何配置ESlint仅显示和修复indent问题?