目前Rails 4.0.2已安装在我的Windows机器中,我将其用于多个 Rails 项目。但是,我确实想将Rails 3.2.8版本用于另一个项目。
3.2.8所以,我的问题是:我可以在单个项目上指定版本,并通过确保安装4.0.2所有依赖项来保留所有其余项目吗?3.2.8
我需要一些帮助来理解Event: 'login'Electron Framework 中的功能是如何工作的。它是浏览器中常见的密码自动填充/记住密码功能的低级实现吗?我想用它来自动填充网页登录流程中的密码,例如
const electron = require('electron')
const {app,BrowserWindow} = electron
app.on('ready', ()=>{
let win = new BrowserWindow({
width:800,
height:600
})
//This is where I'm confused
app.on('login', (event, webContents, request, authInfo, callback) => {
event.preventDefault();
callback('my_username', 'my_password');
});
//How to implement autofill to https://accounts.google.com?
win.loadURL('https://accounts.google.com')
});
Run Code Online (Sandbox Code Playgroud)
我正在测试本机反应,并且可以在模拟器上正常运行开发服务器。当我去构建 apk 以在真实设备上进行测试时,我得到一个
应用程序未安装错误
系统
构建apk的步骤
keytool -genkey -v -keystore my-app-key.keystore -alias my-app-alias -keyalg RSA -keysize 2048 -validity 10000
react-native bundle --platform android --dev false --entry-file index.android.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/cd android && ./gradlew assembleRelease
app-release-unsigned.apk我是否缺少任何内容以及生成的文件应该是什么unsigned.apk?
我overflow:visible;在Ionic Framework头像上使用规则存在问题ion-item。我想创建一个聊天气泡,旁边带有用户图像。我成功地使图像从其父对象溢出了,但是结果是我设置在ion-item边框上的边框半径消失了。没有边框半径,边框可以正确显示。
而我希望达到的目标。
这是我的CSS
.item-content,.item, p {
overflow: visible;
}
.item-avatar {
margin-left:15%;
max-width: 50%;
border-radius: 10px;
margin-top:10px;
}
.item-avatar .item-content > img:first-child, .item-avatar-left {
left:-50px;
overflow: hidden;
}
Run Code Online (Sandbox Code Playgroud)
这是我的视图模板。
<ion-view view-title="Chats">
<ion-content>
<ion-list>
<ion-item class="item-remove-animate item-avatar item-icon-right" ng-repeat="chat in chats" type="item-text-wrap" href="#/tab/chats/{{chat.id}}">
<img class = "avatar" ng-src="{{chat.face}}">
<h2>{{chat.name}}</h2>
<p>{{chat.lastText}}</p>
<p>{{chat.id}}</p>
<i class="icon ion-chevron-right icon-accessory"></i>
<ion-option-button class="button-assertive" ng-click="remove(chat)">
Delete
</ion-option-button>
</ion-item>
</ion-list>
</ion-content>
</ion-view>
Run Code Online (Sandbox Code Playgroud) 我的Express服务器里有
userbase = {'Fitz': '84Iw3MNEIMaed0GoAAAD'}; //Exapmle user to receive message and associated socket id
//Sending message to Example user
socket.on('send_msg',function(data_from_client){
//Testing for receivers socketId
console.log(userbase[data_from_client.to_user]);//This returns the socket id for Fitz in userbase successfully i.e 84Iw3MNEIMaed0GoAAAD
socket.broadcast.to(userbase[data_from_client.to_user]).emit('get_msg',{msg:data_server.msg});
});
Run Code Online (Sandbox Code Playgroud)
当我在客户端设置此事件的处理程序时,我感到惊讶,因为'get_msg'我什么也没得到。
.factory('SocketFctry',function(){
var socket = io('http://localhost:3002')
return socket;
})
.controller('ChatCtrl', function($scope,SocketFctry) {
SocketFctry.on('get_msg',function(received_message){
console.log(received_message);
$scope.$apply();
})
});
Run Code Online (Sandbox Code Playgroud)
我的其他客户端处理程序工作正常。
SocketFctry.on('new_user', function(users,my_id){
console.log(users);
$scope.online_users = users;
$scope.$apply();
})
Run Code Online (Sandbox Code Playgroud)
我的 socket.io 版本是 1.3.7 。我在这里遗漏了什么吗?