‘WebElement’ object has no attribute ‘sendKeys’

1.应广大市民反映,为减少人员集聚,自2020年2月24日(含)起,暂停“门店自取”口罩预约方式。

2.前期市民放弃预约各门店购买资格的口罩,将于2月23日在“门店自取”预约系统中全部投放,当天预约成功的市民可在2月25日(含)前到预约门店购买,逾期不再保留。

3.市民可继续通过“快递配送”方式自愿预约购买。自2月25日(含)起,“快递配送”预约系统开放时间,按照快递公司不同分为每天上午9:30和10:00两个时段。邮政、顺丰等量承担配送任务,市民可自行选择配送公司。

因为一个病毒导致很多事情都变的面目全非,口罩、消毒液都成了紧俏用品。为了能够买到口罩,就需要弥补手速过慢的问题。手速太慢了是抢不到口罩的,所以此时就需要自动提交数据。找到网址之后。很容易就可以定位到所有的输入框:

Continue Reading

iOS iap receipt 服务器校验

import json
import requests

SAND_BOX_VERIFY_URL = 'https://sandbox.itunes.apple.com/verifyReceipt'
VERIFY_URL = 'https://buy.itunes.apple.com/verifyReceipt'

#  /**
#          * 服务器二次验证代码
#          * 21000 App Store不能读取你提供的JSON对象
#          * 21002 receipt-data域的数据有问题
#          * 21003 receipt无法通过验证
#          * 21004 提供的shared secret不匹配你账号中的shared secret
#          * 21005 receipt服务器当前不可用
#          * 21006 receipt合法,但是订阅已过期。服务器接收到这个状态码时,receipt数据仍然会解码并一起发送
#          * 21007 receipt是Sandbox receipt,但却发送至生产系统的验证服务
#          * 21008 receipt是生产receipt,但却发送至Sandbox环境的验证服务
#          */


def verify_receipt_with_apple(receipt, is_sandbox=False):
    jsonStr = json.dumps({"receipt-data": receipt})

    headers = {'Content-Type': 'application/json'}
    url = VERIFY_URL
    if is_sandbox:
        url = SAND_BOX_VERIFY_URL
    rep = requests.post(url=url, data=jsonStr, headers=headers)
    # print(rep.text)
    return rep.text


def verify_receipt_with_apple_json(receipt, is_sandbox=False):
    resp = verify_receipt_with_apple(receipt, is_sandbox)
    try:
        json_data = json.loads(resp)
    except:
        return None
    return json_data

if __name__ == "__main__":
    receipt = "MIITrQYJKoZIhvcNAQcCoIITnjCCE5oCAQExCzAJBgUrDgMCGg"

    js = verify_receipt_with_apple_json(recpt, True)

    print(js['receipt'])

    print(js['receipt']['in_app'])
    print(js['receipt']['in_app'][0])

Continue Reading

Alec Radford’s animations for optimization algorithms[FW]

Alec Radford has created some great animations comparing optimization algorithms SGDMomentumNAGAdagradAdadeltaRMSprop (unfortunately no Adam) on low dimensional problems. Also check out his presentation on RNNs.

Noisy moons: This is logistic regression on noisy moons dataset from sklearn which shows the smoothing effects of momentum based techniques (which also results in over shooting and correction). The error surface is visualized as an average over the whole dataset empirically, but the trajectories show the dynamics of minibatches on noisy data. The bottom chart is an accuracy plot.”

Beale’s function: Due to the large initial gradient, velocity based techniques shoot off and bounce around – adagrad almost goes unstable for the same reason. Algos that scale gradients/step sizes like adadelta and RMSProp proceed more like accelerated SGD and handle large gradients with more stability.”

Continue Reading

OSX app 启动后在程序坞不显示

用回mac之后发现各种神奇的问题,比如cocos运行之后在程序坞中找不到,开的窗口多了之后每次想找到他得翻半天(主要是不会各种神奇的快捷键)。

要解决这个问题也不难,退出cocos,在启动台内找到cocos直接拖到程序坞。然后重新启动cocos应该就能出现了

 

已损坏,无法打开。您应该将它移到废纸篓

安装破解版的app或者非appstroe的app经常会遇到这个问题。出现这个情况,通过下面的方法并不能解决:

  1. 系统偏好设置-任何来源“——不管用
  2. 没有任何来源字样,搞定之后勾上任何来源,不管用

实际上问题是出在了mac的quarantine flag上,如果要修复这个问题需要用到下面的命令:

sudo xattr -rd com.apple.quarantine /Applications/xxx.app

com.apple.quarantine属性:

Type: com.apple.quarantine
Subtypes: none
Serialisation: none
Data type: UTF-8 string containing Gatekeeper score, the system time of download, the downloading app or agent, and a UUID for the event
Example: <30303833 3b353833 37316533 633b5361 66617269 2e617070 3b334239 32393643 302d4336 46342d34 3942332d 42414331 2d424342 32323946 46453744 36> «0083;58371e3c;Safari.app;3B9296C0-C6F4-49B3-BAC1-BCB229FFE7D6»
macOS: El Capitan, Sierra, High Sierra
System use: very uncommon
App use: all downloaded apps
Document use: common, notably Zip and other archives which have been downloaded
Other usage: none

Purpose: flags requirement to perform full Gatekeeper check on downloaded app (or executable).
Continue Reading

Mac OSX Guest账号无法登录

去年OSX更新之后Guest账号就无法登录,很久之前发了weibo,@苹果的官方支持,但是也没人理我~~ 这个账号对于自己来说并没有什么太大的用处,但是家里的小朋友有时候会想随便玩玩电脑,假装自己在工作。没有这个账号还真的十分蛋疼。

今天又想到了这个问题,就想看看有什么办法解决这个问题没。整个账号设置看起来十分正常:

 

Continue Reading