小编wog*_*and的帖子

Angular形式不在表中工作

我创建了一个放在桌子下面的div中的工作表单;

<div class="row">
  <form class="form-signin" ng-submit="controller.add.save()">
    <h2 class="form-signin-heading">Add an item:</h2>
    <label for="inputName" class="sr-only">Name</label>
    <input type="text" name="name" id="inputName" class="form-control" placeholder="Name" required autofocus ng-model="controller.add.name">
    <label for="inputDescription" class="sr-only">Description</label>
    <textarea name="description" id="inputDescription" class="form-control" placeholder="Description" ng-model="controller.add.description">
    </textarea>
    <button class="btn btn-lg btn-primary btn-block" type="submit">Add</button>
  </form>
</div>
Run Code Online (Sandbox Code Playgroud)

然后我决定将表格移到上面的表格中;

<tr>
  <form ng-submit="controller.add.save()">
    <td>Add an item</td>
    <td><input type="text" name="name" id="newName" class="form-control" placeholder="Name" required ng-model="controller.add.name"></td>
    <td><textarea name="description" id="newDescription" class="form-control" placeholder="Description" ng-model="controller.add.description"></textarea></td>
    <td><button class="btn btn-xs btn-primary" type="submit">Add</button></td>
  </form>
</tr>
Run Code Online (Sandbox Code Playgroud)

但现在表格不再适用了.我究竟做错了什么?

html forms html-table angularjs angularjs-forms

5
推荐指数
1
解决办法
5678
查看次数

503错误推送到远程

我在推送到Github时遇到503错误:

$ git push github develop
Counting objects: 22, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (22/22), done.
Writing objects: 100% (22/22), 4.16 KiB | 0 bytes/s, done.
Total 22 (delta 16), reused 0 (delta 0)
error: RPC failed; HTTP 503 curl 22 The requested URL returned error: 503 Service Unavailable
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly
Everything up-to-date
Run Code Online (Sandbox Code Playgroud)

我已经检查了他们的状态页和“所有系统都在运行”,所以我认为它必须与我的配置有关。我的.gitconfig文件只有我的名字和电子邮件:

[user]
    name = Bradley …
Run Code Online (Sandbox Code Playgroud)

git http github

5
推荐指数
1
解决办法
3195
查看次数

使用jquery追加整个div及其所有元素

使用jQuery我想在发生点击事件时追加整个div.我试过了,但它不起作用.

当用户点击Add another image我想要将整个div标签附加其所有元素时.

这是我的代码:

<form method="post" id="form_property" enctype="multipart/form-data">
    <div class="row">
        <div class="span4" id="image">
             <h3><strong>4.</strong> <span>Add Images to your Property</span></h3>

            <div class="fileupload fileupload-new control-group" data-provides="fileupload">
                <label class="control-label" for="inputPropertyPrice">Image files</label>
                <div class="input-append">
                    <div class="uneditable-input"> <i class="icon-file fileupload-exists"></i>
 <span class="fileupload-preview"></span>

                    </div> <span class="btn btn-file">
                                        <span class="fileupload-new">Select file</span>
 <span class="fileupload-exists">Change</span>

                    <input type="file" name="files1" accept="image/*" />
                    </span>
                </div>
            </div>
        </div>
        <!-- /.span4 -->
    </div>
    <!-- /.row -->
    <br/> <a id="another_image" class="btn btn-primary btn-small list-your-property" href="#">Add Another Image</a>
    <br/>
    <br/>
    <input type="submit" name="submit" …
Run Code Online (Sandbox Code Playgroud)

html javascript jquery

4
推荐指数
1
解决办法
4797
查看次数

如何设置表格边框小于单元格高度

我希望表格单元格之间的分隔边框是其高度的一半

看预览图:在此输入图像描述

这是小提琴链接:

小提琴链接

#details_gdr {
    height: 50px;
    line-height: 25px !important;
    margin-top: 3px;
}

#details_gdr tbody tr:not(:last-child) {
    height: 25px;
    border-bottom: 1px solid #D0E0EA;
}

#details_gdr tbody tr th:not(:last-child) {
    border-right: 1px solid #D0E0EA;
}

#details_gdr tbody tr th {
    width: 28px;
    text-align: center !important;
}
Run Code Online (Sandbox Code Playgroud)

html css html-table

4
推荐指数
1
解决办法
1755
查看次数

为什么围绕一个整数需要括号来调用它上面的方法?

这不起作用.

>>> 10.__str__()
  File "<stdin>", line 1
    10.__str__()
             ^
SyntaxError: invalid syntax
Run Code Online (Sandbox Code Playgroud)

但这很有效.

>>> (10).__str__()
'10'
Run Code Online (Sandbox Code Playgroud)

为什么围绕整数需要括号才能调用其方法?列表或其他数据类型似乎不需要它.

>>> [1, 2].__str__()
'[1, 2]'
>>> {'a': 'foo'}.__str__()
"{'a': 'foo'}"
Run Code Online (Sandbox Code Playgroud)

python syntax

4
推荐指数
1
解决办法
332
查看次数

Null合并算子与铸造

我升级到PHP 7并开始使用null coalesce运算符来转换像

$email = isset($_SESSION['email']) ? $_SESSION['email'] : '';
Run Code Online (Sandbox Code Playgroud)

$email = $_SESSION['email'] ?? '';
Run Code Online (Sandbox Code Playgroud)

但如果我也在施法,我无法弄清楚如何做到这一点.例如,旧的陈述

$id = isset($_GET['id']) ? (int) $_GET['id'] : 0;
Run Code Online (Sandbox Code Playgroud)

我会想到像

$id = (int) $_GET['id'] ?? 0;
Run Code Online (Sandbox Code Playgroud)

应该工作,但它似乎没有在某种意义上,如果$_GET['id']没有设置,$id解决,0但我收到通知

注意:未定义的索引:第2行的test.php中的id

php null-coalescing-operator php-7

4
推荐指数
1
解决办法
821
查看次数

错误:“功能”对象没有属性“执行”

在Mac OS上使用Python 3.4,mysql。已经安装了mysql,pymysql,mysqlclient-python

import pymysql
import pymysql.cursors
import _mysql

connection = pymysql.connect(host='localhost',user='sth',password ='', db = 'mydb')
query = "INSERT INTO mydb (card, price,color,index1) VALUES ('cardeeef','3.24','B','frsss')"
cur = connection.cursor
cur.execute(query)
results =cur.fetchall()
Run Code Online (Sandbox Code Playgroud)

不知道还需要什么,所以它知道“ .execute”

mysql python-3.x

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

使用 ConfigFileApplicationContextInitializer 不会解析 @Value 的默认值

当我使用:

@ContextConfiguration(classes = { DmiVehicleRTExportConfig.class },
  initializers = ConfigFileApplicationContextInitializer.class)
Run Code Online (Sandbox Code Playgroud)

我的集成测试因以下属性而失败:

${oauth2client.prematureTimeout:600}
Run Code Online (Sandbox Code Playgroud)

没有得到 600 的默认值。

这是通过使用解决的:SpringApplicationConfiguration但我想使用ConfigFileApplicationContextInitializer.class而不是SpringApplicationConfiguration.

谢谢。

spring-boot

3
推荐指数
1
解决办法
4653
查看次数

Git将不同分支中的旧提交推送到新分支

我已经在GIT上挣扎了一段时间,因为它做了一些奇怪的事情。

我有一个初始代码的基本提交。

好的,接下来我创建一个分支来进行编辑,提交和推送:

git checkout -b feature/feature1
git commit -m "added feature1"
git push origin feature/feature1
Run Code Online (Sandbox Code Playgroud)

现在,我对该功能进行拉取请求。

之后,我更改分支并更新例如:

git checkout -b chore/update-framework
git commit -m "updated framework"
git push origin chore/update-framework
Run Code Online (Sandbox Code Playgroud)

在这一点上,当我尝试第二次推送的请求时,它包含了所有功能的第一次提交。因此,该提交中所有更改的文件都在新的请求中,而旧的请求仅包含功能文件。

我究竟做错了什么?

git github pull-request

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

本地主机页面无法通过 Mamp 工作

自上周以来,我一直在使用 Mamp 3.5 在本地创建一个 Wordpress 站点。但突然间我在加载时收到此错误:

localhost:8888/wordpress :“本地主机页面不起作用本地主机当前无法处理此请求。HTTP 错误 500”

我不知道出了什么问题以及导致此错误的原因。我已经尝试过的解决方案:

  • 将端口更改为 80 和 3306
  • 重新安装 MAMP
  • 检查我的主机文件的本地主机设置
  • 尝试使用旧版本的 PHP,即 5.6

php wordpress mamp localhost

3
推荐指数
1
解决办法
7887
查看次数