我使用此命令成功安装了laravel 5:
composer create-project laravel/laravel test-laravel-5-project dev-develop --prefer-dist
Run Code Online (Sandbox Code Playgroud)
我甚至使用php artisan -V命令验证了已安装的laravel的版本.输出是
Laravel Framework version 5.0-dev
Run Code Online (Sandbox Code Playgroud)
然后我去了app/config/database.php,给了dafault db作为mysql并给出了配置
'mysql' => [ 'driver' => 'mysql', 'host' => env('DB_HOST', 'localhost'), 'database' => env('DB_DATABASE', 'Logintestfive'), 'username'=> env('DB_USERNAME', 'root'), 'password'=> env('DB_PASSWORD', 'manasa'), 'charset'=> 'utf-8', 'collation'=> 'utf-8_unicode_ci', prefix=> '', 'strict'=> false, ]
Run Code Online (Sandbox Code Playgroud)
然后我去localhost:8000/auth/register填写表格并提交数据,这是我得到的错误:
PDOException in Connector.php line 47: SQLSTATE[28000] [1045] Access denied for user 'homestead'@'localhost' (using password: YES)
Run Code Online (Sandbox Code Playgroud)
但是我laravel homestead在我的系统中既没有用于安装laravel 5也没用于vagrant设置laravel宅基地.它告诉我这样:
in Connector.php line 47
at PDO->__construct('mysql:host=localhost;dbname=homestead', 'homestead', …Run Code Online (Sandbox Code Playgroud) 我试图pear通过使用此命令告诉在哪里找到PHPUnit:
sudo pear channel-discover pear.phpunit.de
Run Code Online (Sandbox Code Playgroud)
输出是:
Discovering channel pear.phpunit.de over http:// failed with message: channel-add: Cannot open "http://pear.phpunit.de/channel.xml" (File http://pear.phpunit.de:80/channel.xml not valid (received: HTTP/1.1 410 Gone
))
Trying to discover channel pear.phpunit.de over https:// instead
Discovery of channel "pear.phpunit.de" failed (channel-add: Cannot open "https://pear.phpunit.de/channel.xml" (File https://pear.phpunit.de:443/channel.xml not valid (received: HTTP/1.1 410 Gone
)))
Run Code Online (Sandbox Code Playgroud)
我尝试了以下命令:
sudo pear channel-update pear.php.net
sudo pear upgrade-all
Run Code Online (Sandbox Code Playgroud)
然后我channel-discover再次运行命令.我得到了如上所示的相同错误.
我甚至试过这些命令:
sudo pear config-set auto_discover 1
Run Code Online (Sandbox Code Playgroud)
输出:
config-set succeeded
Run Code Online (Sandbox Code Playgroud)
然后我尝试了这个命令:
sudo pear install pear.phpunit.de/PHPUnit …Run Code Online (Sandbox Code Playgroud) 我为物化模态写了一个简单的代码.
HTML代码:
<a class="waves-effect waves-light btn view" data-target="modal1">View Scores</a>
<!-- Modal Structure -->
<div id="modal1" class="modal">
<div class="modal-content">
<h4>Modal Header</h4>
<p>A bunch of text</p>
</div>
<div class="modal-footer">
<a href="#!" class=" modal-action modal-close waves-effect waves-green btn-flat">Agree</a>
</div>
</div>
Run Code Online (Sandbox Code Playgroud)
JS代码:
$(document).ready(function() {
// the "href" attribute of .modal-trigger must specify the modal ID that wants to be triggered
/*$('.view').click(function (){
$('#modal1').modal('open');
alert('edskjcxnm');
});*/
/*$('.view').leanModal();*/
$('#modal1').modal('open');
});
Run Code Online (Sandbox Code Playgroud)
JSFiddle链接:https://jsfiddle.net/7f6hmgcf/
为什么不工作?
我在 Android studio 3.2.1 中使用androidx navigation architecturewith Kotlin 1.2.71。我的片段代码是:
package com.dell.andnav.fragments
import android.os.Bundle
import android.support.v4.app.Fragment
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.Button
import androidx.navigation.fragment.findNavController
import com.dell.andnav.R
import kotlinx.android.synthetic.main.fragment_welcome.*
/**
* A simple [Fragment] subclass.
* Use the [WelcomeFragment.newInstance] factory method to
* create an instance of this fragment.
*
*/
class WelcomeFragment : Fragment() {
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?,
savedInstanceState: Bundle?): View? {
// Inflate the layout for this fragment
return inflater.inflate(R.layout.fragment_welcome, container, false) …Run Code Online (Sandbox Code Playgroud) 我在一个组中创建了几个静态芯片。我正在使用此链接 ( https://material.io/design/components/chips.html# ) 作为参考。代码如下:
<RelativeLayout
android:id="@+id/inputLayout"
android:layout_width="match_parent"
android:layout_height="100dp"
android:layout_alignParentBottom="true"
android:background="@android:color/white"
android:gravity="bottom"
android:paddingStart="8dp"
android:paddingTop="8dp"
android:paddingEnd="8dp"
android:paddingBottom="9dp">
<ImageView
android:id="@+id/sendBtn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:paddingTop="4dp"
app:srcCompat="@drawable/chatbot_send_btn" />
<EditText
android:id="@+id/queryEditText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_toStartOf="@+id/sendBtn"
android:imeOptions="actionSend"
android:inputType="text"
android:paddingTop="4dp"
android:textSize="18sp" />
<com.google.android.material.chip.ChipGroup
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:layout_above="@id/queryEditText">
<com.google.android.material.chip.Chip
style="@style/Widget.MaterialComponents.Chip.Choice"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="wsfdsd" />
<com.google.android.material.chip.Chip
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="wsfdsd"
style="@style/Widget.MaterialComponents.Chip.Choice"/>
<com.google.android.material.chip.Chip
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="wsfdsd"
style="@style/Widget.MaterialComponents.Chip.Choice"/>
<com.google.android.material.chip.Chip
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="wsfdsd"
style="@style/Widget.MaterialComponents.Chip.Choice"/>
<com.google.android.material.chip.Chip
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="wsfdsd"
style="@style/Widget.MaterialComponents.Chip.Choice"/>
<com.google.android.material.chip.Chip
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="wsfdsd" />
</com.google.android.material.chip.ChipGroup>
</RelativeLayout>
Run Code Online (Sandbox Code Playgroud)
这不会显示所有芯片,它只显示 1 个芯片。如何添加水平滚动?我是否需要动态显示筹码以便我可以添加水平滚动?
我正在尝试使用bootstrap,这是我写的代码:
<!doctype html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="./css/bootstrap.min.css">
<link rel="stylesheet" href="./css/bootstrap-theme.min.css">
<style type="text/css">
.row-centered {
text-align:center;
}
.col-centered {
display:inline-block;
float:none;
text-align:left;
margin-right:-4px;
}
.pos{
position: relative;
top: 240px;
}
</style>
</head>
<body>
<div class="container">
<div class="row row-centered pos">
<div class="col-lg-8 col-centered">
<div class="well"></div>
</div>
<div class="col-lg-8 col-centered">
<div class="well"></div>
</div>
<div class="col-lg-8 col-centered">
<div class="well"></div>
</div>
</div>
</div>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
输出如屏幕截图所示:
但是当我转换为手机屏幕时,我会这样:

我希望div在移动屏幕中显示在中心,一个在一个以上.我该怎么做?但它没有响应.
我使用BIRT和构建了一份报告Data tables.一切都按预期工作.然而height和width的BIRT viewer不是动态的.它们是静态的,因此应用了滚动.所以我写了一个代码,使height和width的BIRT viewer动态.
function resizeFrame(e,f){
var x = document.getElementsByTagName("iframe");
var winW = 1112, winH = 486;
if (document.body && document.body.offsetWidth) {
winW = document.body.offsetWidth;
winH = document.body.offsetHeight;
}
if (document.compatMode=='CSS1Compat' && document.documentElement && document.documentElement.offsetWidth ) {
winW = document.documentElement.offsetWidth;
winH = document.documentElement.offsetHeight;
}
if (window.innerWidth && window.innerHeight) {
winW = window.innerWidth;
winH = window.innerHeight;
}
x[0].style.width = winW + "px";
x[0].style.height = winH …Run Code Online (Sandbox Code Playgroud) 我正在使用sqlcipher我的依赖项.我的build.gradle文件如下:
apply plugin: 'com.android.application'
android {
compileSdkVersion rootProject.ext.compileSdkVersion
defaultConfig {
applicationId "com.dell.prapproval"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode rootProject.ext.versionCode
versionName "$rootProject.ext.versionName"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
// setProperty("archivesBaseName", applicationId + "-v" + versionCode + "(" + versionName + ")")
vectorDrawables.useSupportLibrary = true
multiDexEnabled true
consumerProguardFiles file('proguard.cfg')
ndk {
abiFilters "armeabi-v7a"
}
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
signingConfigs {
config {
keyAlias 'emc_mobile'
keyPassword 'P@ssw0rd'
storeFile file('EMC_MOBILE') …Run Code Online (Sandbox Code Playgroud) 我在 android studio 的 React Native 项目中打开了 android 文件夹,对build.gradle文件进行了所有可能的修改。但是我收到这个重复的错误:
Error:Failed to resolve: com.facebook.react:react-native:0.32.0
Run Code Online (Sandbox Code Playgroud)
我package.json的如下:
{
"name": "empty-project-template",
"private": true,
"scripts": {
"start": "react-native start",
"android": "react-native run-android",
"ios": "react-native run-ios"
},
"dependencies": {
"eslint": "^3.17.0",
"expo": "^30.0.1",
"react": "^16.4.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-30.0.0.tar.gz",
"react-native-elements": "^0.19.1",
"react-native-vector-icons": "^4.2.0",
"react-router": "^4.3.1"
}
}
Run Code Online (Sandbox Code Playgroud)
我的 gradle 文件是:
apply plugin: "com.android.application"
import com.android.build.OutputFile
/**
* The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets
* and bundleReleaseJsAndAssets).
* These …Run Code Online (Sandbox Code Playgroud) 我通过参考文档在Amazon Web Services(AWS)中创建了一个新的Amazon EC2实例.我甚至添加了这样的SSH规则:
Port: 22
Type: SSH
Source: <My IP address>/32
Run Code Online (Sandbox Code Playgroud)
我下载了.pem文件,使用将其转换为.ppk文件PuTTYGEN.然后我在PuTTY中添加了这样的主机名:
ec2-user@<public_DNS>
Run Code Online (Sandbox Code Playgroud)
我选择了default settings,将.ppk文件添加到PuTTY,登录后出现此错误:
连故障排除链接都没有帮助我.
我也在系统日志中收到此错误:
如何通过PuTTY连接到我的Amazon EC2实例?
android ×4
androidx ×2
php ×2
amazon-ec2 ×1
birt ×1
css ×1
gradle ×1
html ×1
javascript ×1
jquery ×1
jsp ×1
kotlin ×1
laravel-5 ×1
materialize ×1
mysql ×1
pear ×1
react-native ×1
reactjs ×1
runtime ×1
ssh ×1