小编Iam*_*sol的帖子

jQuery Mobile溢出的li-desc

如何强制标题可见,下面的文字溢出为省略号?当页面宽度超过768px时,我无法使用BlackBerry列表项.

http://jsfiddle.net/TeNXG/14/

<div data-role="page" data-theme="a" id="demo-page" class="my-page" data-url="demo-page">
<div data-role="header">
    <h1>News</h1>
    <a href="grid-listview.html" data-shadow="false" data-iconshadow="false" data-icon="arrow-l" data-iconpos="notext" data-rel="back" data-ajax="false">Back</a>
</div><!-- /header -->
<div data-role="content">
    <ul data-role="listview">
        <li><a href="#">
            <img src="http://view.jquerymobile.com/master/docs/_assets/img/apple.png">
            <h2>iOS 6.1</h2>
            <p>Apple released iOS 6.1</p>
            <p class="ui-li-aside">iOS</p>
        </a></li>
        <li><a href="#">
            <img src="http://view.jquerymobile.com/master/docs/_assets/img/blackberry_10.png">
            <h2>BlackBerry 10</h2>
            <p>BlackBerry launched the Z10 and Q10 with the new BB10 OS and more and stuff and lots of stuff and overflowing and stuff and wow so much text man holy mess even more let's see …
Run Code Online (Sandbox Code Playgroud)

overflow jquery-mobile responsive-design

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

add_header期望3个参数而不仅仅是键/值

我遇到此错误消息:

TypeError: add_header() takes exactly 3 arguments (2 given)

使用这些参数时:

testService("SomeServiceName", "POST", "[redacted valid url]", ('Content-type','application/json'), [redacted valid json])

通常这个错误意味着我没有将"self"作为参数传递,但是看到这个方法没有在类中调用,我不知道该怎么做.我已经尝试将self in作为参数传递给参数和方法内部.我已经尝试将标题括在括号和括号中.当我传递"self"时,我收到self未定义的错误消息,当我使用括号而不是括号时,我得到与上面相同的错误.

有魔术Python调试技巧的人吗?非常感谢您抽出宝贵的时间来检查这个!

def testService(name, verb, url, header="", requestBody=""):

#Log out the name of the request we're testing
if (name is not None) or (name.strip() is not ""):
    print "Checking  " + name + "\n\n"

    # Make URL with StoreNumber
    if (url is not None) or (url is not ""):
        testUrl = url

        # If specified verb is GET …
Run Code Online (Sandbox Code Playgroud)

python urllib2 request-headers

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