小编Sun*_*kor的帖子

从Windows Phone 8获取国家/地区名称

我有截图

在此输入图像描述

我打算找回应该是"尼日利亚"的国家.在完成System.Globalization类之后,我找到了下面的代码片段

System.Globalization.RegionInfo.CurrentRegion.EnglishName
Run Code Online (Sandbox Code Playgroud)

但我得到的是"美国",这是上图所示的"地区格式".我无法检索国家/地区值设置吗?

c# windows-phone-7 windows-phone-8

9
推荐指数
1
解决办法
5050
查看次数

发送ISO8583请求时出现NullPointerException

我正在尝试使用以下代码向终端发送ISO8583请求:

try {
        XMLParser packager = new XMLParser(this.xmlFile);


        final ISOMsg isoMsg = new ISOMsg();
        isoMsg.setPackager(packager);
        isoMsg.setMTI("0800");
        isoMsg.set(3, "xxxxxx");
        isoMsg.set(7, "xxxxxxxxxx");    //MMDDhhmmss
        isoMsg.set(11, "xxxxxx");
        isoMsg.set(12, "084500");       //Time of the message HHmmss
        isoMsg.set(13, "0621");         //Date MMDD
        isoMsg.set(41, "xxxxxxxx");
        isoMsg.set(62,"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");
        isoMsg.set(63,"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");
        BaseChannel channel = new BaseChannel() {};
        channel.setLogger(logger, "server-request-channel");
        channel.setHeader(isoMsg.pack());
        channel.setHost("xx.xx.xx.xx", xxxxx);
        ISOMUX isoMux = new ISOMUX(channel) {
            @Override
            protected String getKey(ISOMsg m) throws ISOException {
                return super.getKey(m);
            }
        };

        isoMux.setLogger(logger, "server-request-mux");
        new Thread(isoMux).start();
        ISORequest req = new ISORequest(isoMsg);
        isoMux.queue(req);
        req.setLogger(logger, "server-request-logger");
        ISOMsg …
Run Code Online (Sandbox Code Playgroud)

java android jpos iso8583

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

使用 lxml 检索类属性的名称

我正在开发一个使用 lxml 来废弃页面的 python 项目,并且我面临着检索 span 类属性名称的挑战。html 片段如下:

<tr class="nogrid">
  <td class="date">12th January 2016</td> 
  <td class="time">11:22pm</td> 
  <td class="category">Clothing</td>   
  <td class="product">
    <span class="brand">carlos santos</span>
  </td> 
  <td class="size">10</td> 
  <td class="name">polo</td> 
</tr>
....
Run Code Online (Sandbox Code Playgroud)

如何检索下面的跨度类属性的值:

<span class="brand">carlos santos</span>
Run Code Online (Sandbox Code Playgroud)

html python lxml

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

标签 统计

android ×1

c# ×1

html ×1

iso8583 ×1

java ×1

jpos ×1

lxml ×1

python ×1

windows-phone-7 ×1

windows-phone-8 ×1