现在我正在使用此函数表情符号:
function emoticons($text) {
$icons = array(
':)' => '<img src="/images/blank.gif" alt="smile" class="icon_smile" />',
':-)' => '<img src="/images/blank.gif" alt="smile" class="icon_smile" />',
':D' => '<img src="/images/blank.gif" alt="smile" class="icon_laugh" />',
':d' => '<img src="/images/blank.gif" alt="laugh" class="icon_laugh" />',
';)' => '<img src="/images/blank.gif" alt="wink" class="icon_wink" />',
':P' => '<img src="/images/blank.gif" alt="tounge" class="icon_tounge" />',
':-P' => '<img src="/images/blank.gif" alt="tounge" class="icon_tounge" />',
':-p' => '<img src="/images/blank.gif" alt="tounge" class="icon_tounge" />',
':p' => '<img src="/images/blank.gif" alt="tounge" class="icon_tounge" />',
':(' => '<img src="/images/blank.gif" alt="sad face" class="icon_sad" />',
':o' => …Run Code Online (Sandbox Code Playgroud) 我曾经在 PhpStorm 中获取任何未使用的常量或类常量的突出显示。
现在我不能让它再工作了。也许这是一个插件,我不确定。
我试过的:
未使用的常量的声明/突出显示用于自动显示而无需运行任何检查或命令。
我想用jquery只删除前两个BR标签.
<div id="system">
<BR CLEAR="ALL"><BR>// I want to remove both BR.
...
<BR>...
...
<BR>
Run Code Online (Sandbox Code Playgroud)
我假设这样的事情.但我不确定.
$('#system br').remove();
Run Code Online (Sandbox Code Playgroud)
谁能告诉我怎么做呢?
我用a password_verify检查我的哈希密码.我有PHP 5.5:
$this->db_connection = new mysqli(DB_HOST, DB_USER, DB_PASS, DB_NAME);
// if no connection errors (= working database connection)
if (!$this->db_connection->connect_errno) {
// escape the POST stuff
$user_name = $this->db_connection->real_escape_string($_POST['user_name']);
// database query, getting all the info of the selected user (allows login via email address in the
// username field)
$sql = "SELECT user_name, user_email, user_password_hash
FROM users
WHERE user_name = '" . $user_name . "' OR user_email = '" . $user_name . "';";
$result_of_login_check = $this->db_connection->query($sql);
// …Run Code Online (Sandbox Code Playgroud) 我是javascript的新手,我正在尝试创建一个水平滚动div: -
你可以看到菜单链接转到每种颜色,但我想把它放在一个250x250px的容器内,所以只有1种颜色可见,然后你点击任何一个链接,它滚动到那种颜色.
希望有人可以帮我指点几点.
谢谢!
jQuery(document).ready(function ($) {
$(".scroll").click(function (event) {
event.preventDefault();
$('html,body').animate({
scrollLeft: $(this.hash).offset().left
}, 200);
});
});Run Code Online (Sandbox Code Playgroud)
.container {
white-space: nowrap;
}
.child-element {
min-width: 250px;
display: inline-block;
height: 250px;
}
.child1 {
background-color: purple;
}
.child2 {
background-color: orange;
}
.child3 {
background-color: black;
}
.child4 {
background-color: green;
}
.child5 {
background-color: blue;
}
.child6 {
background-color: red;
}Run Code Online (Sandbox Code Playgroud)
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<a href="#purple" class="scroll">PURPLE</a>
<a href="#orange" class="scroll">ORANGE</a>
<a href="#black" class="scroll">BLACK</a>
<a href="#green" class="scroll">GREEN</a>
<a href="#blue" …Run Code Online (Sandbox Code Playgroud)有没有办法让密钥过期的剩余时间?目前,我正在使用 Laravel 文件缓存驱动程序。
我做了一个带有标签的离子2
ionic starts project1 tabs --v2
Run Code Online (Sandbox Code Playgroud)
然后我添加了一个页面和一个提供者:
ionic g provider authService
ionic g page loginPage
Run Code Online (Sandbox Code Playgroud)
登录成功后我设置了root:
this.nav.setRoot(TabsPage)
Run Code Online (Sandbox Code Playgroud)
它导航到HomePage.我在注销时设置了root:
this.nav.setRoot(LoginPage)
Run Code Online (Sandbox Code Playgroud)
问题是当我退出选项卡面板时仍然出现并且所有页面似乎仍然可以导航到.
当我退出并隐藏选项卡面板时,如何破坏所有页面?
我正在尝试将 ionic 应用程序部署到 android 设备上几个小时。我已经改变了图标和飞溅。
然后我这样做:
ionic resources
Run Code Online (Sandbox Code Playgroud)
我获得:
然后我这样做:
ionic platform rm android
ionic platform add android
ionic run android
Run Code Online (Sandbox Code Playgroud)
但我总是使用 ionic 的默认图标和飞溅值。我在资源文件夹中看到过,并且在 android 文件夹中有正确的图像。
你能看出我做错了什么吗?
我的查询是这样的:
<?php
public function getListReviews()
{
$reviews = Review::where('user_id', auth()->user()->id)
->get();
return $reviews;
}
Run Code Online (Sandbox Code Playgroud)
从查询中,它可以按ID获取所有评论数据
我想要获取用户照片,商店照片和产品照片
我想用口才:关系
我如何通过口才:关系?
我的审查模式是这样的:
<?php
namespace App;
use Jenssegers\Mongodb\Eloquent\Model as Eloquent;
use Jenssegers\Mongodb\Eloquent\HybridRelations;
class Review extends Eloquent
{
use HybridRelations;
protected $connection = 'mongodb';
protected $fillable = ['user_id', 'user_name', 'product_id', 'product_name', 'store_id', 'store_name', 'invoice_number', 'rating', 'comments', 'created_at', 'updated_at'];
public function user()
{
return $this->belongsTo(User::class);
}
}
Run Code Online (Sandbox Code Playgroud)
我的用户模型是这样的:
<?php
namespace App;
...
class User extends Authenticatable
{
...
protected $fillable = ['name', 'email', 'password', 'birth_date', 'mobile_number', …Run Code Online (Sandbox Code Playgroud) 这是我的迁移架构:
public function up()
{
Schema::create('objects', function (Blueprint $table) {
$table->increments('id');
$table->timestamp('timestamp1');
$table->timestamp('timestamp2');
});
}
Run Code Online (Sandbox Code Playgroud)
但是当我执行时php artisan migrate,我收到此错误:
Illuminate\Database\QueryException : SQLSTATE[42000]: 语法错误或访问冲突:1067 'timestamp2' 的默认值无效(SQL:创建表
objects(idint unsigned not null auto_increment 主键,timestamp1timestamp not null,timestamp2timestamp not null)默认字符集utf8mb4 整理 utf8mb4_unicode_ci)
我必须指出,当我删除 2$table->timestamp(...);行之一时,它可以工作,但当两者都存在时就不行。而Object.php模型是空的,因为它可以。我做错了吗?
我已经阅读了这篇文章,但即使我更改timestamp(...)为时不再有错误dateTime(...),我也只想要时间戳。