小编shi*_*hin的帖子

MySQL中的列和表名称是否区分大小写?

如果我有一个名为列名category_idCategory_Id,它们有什么不同?

如果我已经叫表categoryCategory,它们有什么不同?

mysql collation case-sensitive

64
推荐指数
3
解决办法
3万
查看次数

git .ignore不在目录中工作

我有以下.gitignore文件

# file named .gitignore

system/application/config/database.php
system/application/config/config.php
system/logs
modules/recaptcha/config/*
Run Code Online (Sandbox Code Playgroud)

但是,当我在config和recapcha.php中添加任何更改时,git status警告我如下.当我向database.php添加任何更改时.它没有显示它的状态

shin@shin-Latitude-E5420:/var/www/myapp$ git status
# On branch master
# Your branch is ahead of 'origin/master' by 1 commit.
#
# Changes not staged for commit:
#   (use "git add <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)
#
#   modified:   modules/recaptcha/config/recaptcha.php
#   modified:   system/application/config/config.php
#
no changes added to commit (use "git add" and/or "git commit -a")
Run Code Online (Sandbox Code Playgroud)

我怎样才能解决这个问题?

提前致谢. …

git

46
推荐指数
3
解决办法
4万
查看次数

phpinfo的error_reporting 22527中的22527是什么

在我的本地开发环境中,我使用PHP版本5.3.3-1ubuntu9.2.

现在,当我看到error_reporting时,值为22527.

什么是22527?

我检查了http://www.php.net/manual/en/errorfunc.constants.php,但我找不到这个号码.

谁能告诉我它是什么?

我需要将其更改为E_ALL | E_STRICT?

提前致谢.

php phpinfo

43
推荐指数
2
解决办法
5万
查看次数

如何使用jquery清空文本区域中的消息?

- 更新 -

我想在回调中的textarea中清空消息.

谁能告诉我如何清空它?

我尝试了$("#message").empty(),但它没有清空它.

提前致谢.

 <form method="post" id="form" action="index.php/admin/messages/insertShoutBox">

    <input name="user" id="nick" value="admin" type="hidden">
    <p class="messagelabel"><label class="messagelabel">Message</label>
    <textarea id="message" name="message" rows="2" cols="40"></textarea>
    <input disabled="disabled" id="send" value="Sending..." type="submit"></p>

</form>
Run Code Online (Sandbox Code Playgroud)

完整代码

 $("#form").submit(function(){
    if(checkForm()){
        var nick = inputUser.attr("value");
        var message = inputMessage.attr("value");
        //we deactivate submit button while sending
        $("#send").attr({ disabled:true, value:"Sending..." });
        $("#send").blur();
        //send the post to shoutbox.php
        $.ajax({
            type: "POST", 
            url: "index.php/admin/dashboard/insertShoutBox", 
            data: $('#form').serialize(),
            complete: function(data){
                messageList.html(data.responseText);
                updateShoutbox();
                 $('#message').val('').empty();
                //reactivate the send button
                $("#send").attr({ disabled:false, value:"SUBMIT !" });
            }
         }); …
Run Code Online (Sandbox Code Playgroud)

jquery

41
推荐指数
1
解决办法
10万
查看次数

__FILE__是什么意思?

我有来自Codeigniter的以下代码 index.php

我的理解是,

如果/在字符串中的位置$system_folder(在这种情况下CIcore_1_7_1)是false,如果realpath函数存在AND(?)不false, $system_folder被分配到(?) /$system_folder.其他$system_folder被分配给$system_folder替换\\/.

Q1.realpath函数意味着什么?

Q2.这是什么意思?

@realpath(dirname(__FILE__))
Run Code Online (Sandbox Code Playgroud)

Q3.我对吗?我有任何误解吗?

Q4.您需要以下哪种情况?

str_replace("\\", "/", $system_folder)
Run Code Online (Sandbox Code Playgroud)
$system_folder = "CIcore_1_7_1";

/*
|---------------------------------------------------------------
| SET THE SERVER PATH
|---------------------------------------------------------------
|
| Let's attempt to determine the full-server path to the "system"
| folder in order to reduce the possibility of path problems.
| Note: We only attempt this if the user hasn't specified a …
Run Code Online (Sandbox Code Playgroud)

php codeigniter constants path

37
推荐指数
3
解决办法
6万
查看次数

如果我可以使用WHERE,为什么需要使用外键?

关于MySQL中外键的初学者问题.

w3school它说,

一个表中的FOREIGN KEY指向另一个表中的PRIMARY KEY.

而且还有WHERE,

WHERE id = page_id
Run Code Online (Sandbox Code Playgroud)

因此,如果我可以使用WHERE来链接表,那么拥有外键的主要目的是什么?

mysql foreign-keys

36
推荐指数
3
解决办法
2万
查看次数

android:layout_weight如何工作?

当我有以下内容时,它显示顶部布局,四种颜色的面积比底部布局面积小得多.

根据此文档,当您添加更多内容时layout_weight,它应该增加区域,但在代码中会减少.

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">

  <LinearLayout
      android:orientation="horizontal"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:layout_weight="4">
      <TextView
          android:text="red"
          android:gravity="center_horizontal"
          android:background="#aa0000"
          android:layout_width="wrap_content"
          android:layout_height="fill_parent"
          android:layout_weight="3"/>
      <TextView
          android:text="green"
          android:gravity="center_horizontal"
          android:background="#00aa00"
          android:layout_width="wrap_content"
          android:layout_height="fill_parent"
          android:layout_weight="1"/>
      <TextView
          android:text="blue"
          android:gravity="center_horizontal"
          android:background="#0000aa"
          android:layout_width="wrap_content"
          android:layout_height="fill_parent"
          android:layout_weight="1"/>
      <TextView
          android:text="yellow"
          android:gravity="center_horizontal"
          android:background="#aaaa00"
          android:layout_width="wrap_content"
          android:layout_height="fill_parent"
          android:layout_weight="1"/>
  </LinearLayout>

  <LinearLayout
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:layout_weight="1">
    <TextView
        android:text="row one"
        android:textSize="15pt"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_weight="1"/>
    <TextView
        android:text="row two"
        android:textSize="15pt"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_weight="1"/>
    <TextView
        android:text="row three"
        android:textSize="15pt"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_weight="1"/>
    <TextView
        android:text="row four"
        android:textSize="15pt"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content" …
Run Code Online (Sandbox Code Playgroud)

android

36
推荐指数
5
解决办法
6万
查看次数

如何在body标签中添加一个类?

我想用jQuery向body标签添加一个类.

例如,如果URL是http://www.mywebsite.com/about_us.asp,我想在body标签中添加前五个字母,在本例中为"about":

<body class="about">
Run Code Online (Sandbox Code Playgroud)

我怎样才能做到这一点?

jquery

32
推荐指数
2
解决办法
10万
查看次数

如何在mySQL中订购1,2,3而不是1,10,11,12

以下代码按id,1,10,11,12的顺序输出.

我想把它变成1,2,3,4 ......

谁能告诉我应该做什么呢.

$Q = $this->db->query('SELECT P.*, C.Name AS CatName FROM products AS P LEFT JOIN categories C ON C.id = P.category_id');
Run Code Online (Sandbox Code Playgroud)

提前致谢.

mysql sql-order-by

30
推荐指数
5
解决办法
3万
查看次数

MySQL中的INSERT和UPDATE有什么区别?

它似乎INSERTUPDATE我做同样的事情.

有什么时候我应该使用INSERT而不是UPDATE反之亦然?

mysql sql sql-update sql-insert

28
推荐指数
2
解决办法
5万
查看次数