小编Luk*_*Zaz的帖子

Bootstrap模式不会拉伸以适应内容

尽管在其他页面上工作正常,但模式不会延伸到适合它的内容并且最终会变得太短.似乎唯一能解决的问题是添加另一个divp元素,其下面有任何内容,我宁愿不必这样做.

HTML:

<!-- Donate modal -->
    <div class="modal fade" id="donate" tabindex="-3" role="dialog" aria-labelledby="donateToDev" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                    <h4 class="modal-title" id="donateTitle">Donate</h5>
                </div>
                <div class="modal-body">
                    <p class="text-center">There's nothing to unlock by donating, but you will be considered awesome by the dev! Who doesn't like being awesome?</p>
                    <div class="text-center">
                        <div style="float:left;display:inline;">
                            PAYPAL
                        </div>
                        <div style="float:right;display:inline;">
                            <p class="bold text-center">Or you could donate with <a href="http://dogecoin.com">Dogecoin</a>:
                            <p class="code">doge donate address here</p>
                        </div>
                    </div> …
Run Code Online (Sandbox Code Playgroud)

html css jquery twitter-bootstrap

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

TypeError:'str'对象不可调用(我没有调用它?)

我正在尝试将一个函数写入一个文件,其中有4个不同的字符串变量传递到写入的内容中,但无论出于何种原因,我都会这样:

Traceback (most recent call last):
  File "C:\Python Files\writePy\writePy.py", line 34, in <module>
    indent = writeIf(mFile, genCond(), lFile, indent)
  File "C:\Python Files\writePy\writePy.py", line 23, in writeIf
    file.write('%sif (%s %s %s):' (indentation, cond[0], cond[1], cond[2]))
TypeError: 'str' object is not callable
Run Code Online (Sandbox Code Playgroud)

这是我的主要代码:

# Main code
lFile = open('OperationLog.txt', mode='w') # Log file for changes
mFile = open('Evolve.txt', mode='w+') # File to be edited
indent = 0 # Indentation for written code

# Write two IF statements with a randomized condition to …
Run Code Online (Sandbox Code Playgroud)

python string file function

1
推荐指数
2
解决办法
785
查看次数

无法访问公共类属性

我正在尝试创建一个应该在其代码中包含这些变量的新类:

class Map
{
    // Variable declaration
    public int Width { get; set; } // Width of map in tiles
    public int Height { get; set; } // Height of map in tiles
    public int TileWidth { get; set; }
    public int TileHeight { get; set; }
}
Run Code Online (Sandbox Code Playgroud)

但出于某种原因,在Game1.cs中创建一个新的Map类之后,我似乎无法解决诸如Width和Height之类的问题.

public class Game1 : Microsoft.Xna.Framework.Game
{
    GraphicsDeviceManager graphics;
    public static SpriteBatch spriteBatch;

    // etc...

    // Class initialization
    Map map = new Map();

    map.Width = 10; // Won't work, says it is …
Run Code Online (Sandbox Code Playgroud)

c# variables class

0
推荐指数
1
解决办法
5537
查看次数

标签 统计

c# ×1

class ×1

css ×1

file ×1

function ×1

html ×1

jquery ×1

python ×1

string ×1

twitter-bootstrap ×1

variables ×1