- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有以下代码:
import UIKit
import Alamofire
class TestTableViewController: UIViewController,UITableViewDelegate,UITableViewDataSource {
@IBOutlet weak var tableView: UITableView!
var productsArray = [AnyObject]()
override func viewDidLoad() {
super.viewDidLoad()
Alamofire.request("#######").responseJSON { response in
let result = response.result
if let dict = result.value {
self.productsArray = dict as! [AnyObject]
self.tableView.reloadData()
}
}
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return productsArray.count
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "cell", for: indexPath) as? BundlesTableViewCell
let title = productsArray[indexPath.row]["productCode"]
cell?.titileLabel.text = title as? String
return cell!
}
/*
// MARK: - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
// Get the new view controller using segue.destinationViewController.
// Pass the selected object to the new view controller.
}
*/
}
我想在附加单元格之前先检查 productCode,如果相同则什么都不做
我的 json 是这样的:
[{"dateCreated":1474391278000,"dateModified":1494504694000,"uuid":"b31366c3-805b-11e6-873b-005056ad572a","retired":false,"description":"SMS 25","name":"SMS 25","status":"ACTIVE","allowMultiple":false,"renewable":false,"allowPrepaid":true,"allowPostPaid":false,"amount":0.01,"type":"SMS","deplete":true,"renew":false,"partyCode":"smsbundle","expiryValue":24,"reminderExpiryValue":0,"productCode":"SMS BUNDLES","walletName":"Go_SMS25","commercialDescription":"25 DAILY SMS"},{"dateCreated":1474391281000,"dateModified":1493129974000,"uuid":"b313753e-805b-11e6-873b-005056ad572a","retired":false,"description":"FACEBOOK 15","name":"FACEBOOK 15","status":"ACTIVE","allowMultiple":false,"renewable":true,"allowPrepaid":true,"allowPostPaid":false,"amount":0.01,"type":"DATA","deplete":false,"renew":false,"partyCode":"facebook","expiryValue":720,"reminderExpiryValue":0,"productCode":"FACEBOOK BUNDLES","walletName":"Monthly_Facebook","commercialDescription":"Monthly Facebook"},{"dateCreated":1474391284000,"dateModified":1494504715000,"uuid":"b313778b-805b-11e6-873b-005056ad572a","retired":false,"description":"TWITTER WEEKLY","name":"TWITTER WEEKLY","status":"ACTIVE","allowMultiple":false,"renewable":true,"allowPrepaid":true,"allowPostPaid":false,"amount":0.01,"type":"DATA","deplete":false,"renew":false,"partyCode":"twitter","expiryValue":168,"reminderExpiryValue":0,"productCode":"TWITTER BUNDLES","walletName":"Weekly Twitter","commercialDescription":"Weelkly Twitter"},{"dateCreated":1474391290000,"dateModified":1493129967000,"uuid":"b3137979-805b-11e6-873b-005056ad572a","retired":false,"description":"TWITTER MONTHLY","name":"TWITTER MONTHLY","status":"ACTIVE","allowMultiple":false,"renewable":true,"allowPrepaid":true,"allowPostPaid":false,"amount":0.01,"type":"DATA","deplete":false,"renew":false,"partyCode":"twitter","expiryValue":720,"reminderExpiryValue":0,"productCode":"TWITTER BUNDLES","walletName":"Monthly_Twitter","commercialDescription":"Monthly Twitter"},{"dateCreated":1474391294000,"dateModified":1494509144000,"uuid":"b3137b4e-805b-11e6-873b-005056ad572a","retired":false,"description":"MEGA 50c","name":"MEGA 50c","status":"ACTIVE","allowMultiple":true,"renewable":false,"allowPrepaid":true,"allowPostPaid":false,"amount":0.01,"type":"VOICE, SMS, DATA","deplete":false,"renew":true,"partyCode":"hiebundle","expiryValue":24,"reminderExpiryValue":0,"productCode":"MEGA BOOST BUNDLES","walletName":"MEGA 50c","commercialDescription":"USD0.50 MEGA-BOOST BUNDLE"},{"dateCreated":1474391303000,"dateModified":1494406607000,"uuid":"b3137eda-805b-11e6-873b-005056ad572a","retired":false,"description":"DATA BUNDLE 50c","name":"DATA BUNDLE 50c","status":"ACTIVE","allowMultiple":true,"renewable":false,"allowPrepaid":true,"allowPostPaid":false,"amount":0.5,"type":"DATA","deplete":true,"renew":false,"partyCode":"zsmart2","expiryValue":720,"reminderExpiryValue":0,"productCode":"DATA BUNDLES","walletName":"Gprs_bundle","commercialDescription":"4.8MB DATA BUNDLE"},{"dateCreated":1474391306000,"dateModified":1494406630000,"uuid":"b3138741-805b-11e6-873b-005056ad572a","retired":false,"description":"DATA BUNDLE USD1","name":"DATA BUNDLE USD1","status":"ACTIVE","allowMultiple":true,"renewable":false,"allowPrepaid":true,"allowPostPaid":false,"amount":1.0,"type":"DATA","deplete":true,"renew":false,"partyCode":"zsmart2","expiryValue":720,"reminderExpiryValue":0,"productCode":"DATA BUNDLES","walletName":"Gprs_bundle","commercialDescription":"9.5MB DATA BUNDLE"},{"dateCreated":1474391309000,"dateModified":1494406690000,"uuid":"b313f2b0-805b-11e6-873b-005056ad572a","retired":false,"description":"DATA BUNDLE USD3","name":"DATA BUNDLE USD3","status":"ACTIVE","allowMultiple":true,"renewable":false,"allowPrepaid":true,"allowPostPaid":false,"amount":3.0,"type":"DATA","deplete":true,"renew":false,"partyCode":"zsmart2","expiryValue":720,"reminderExpiryValue":0,"productCode":"DATA BUNDLES","walletName":"Gprs_bundle","commercialDescription":"76MB DATA BUNDLE"},{"dateCreated":1474391313000,"dateModified":1494406700000,"uuid":"b313f533-805b-11e6-873b-005056ad572a","retired":false,"description":"DATA BUNDLE USD5","name":"DATA BUNDLE USD5","status":"ACTIVE","allowMultiple":true,"renewable":false,"allowPrepaid":true,"allowPostPaid":false,"amount":5.0,"type":"DATA","deplete":true,"renew":false,"partyCode":"zsmart2","expiryValue":720,"reminderExpiryValue":0,"productCode":"DATA BUNDLES","walletName":"Gprs_bundle","commercialDescription":"142.5MB DATA BUNDLE"},{"dateCreated":1474391317000,"dateModified":1494400047000,"uuid":"b313f73e-805b-11e6-873b-005056ad572a","retired":false,"description":"DATA BUNDLE USD10","name":"DATA BUNDLE USD10","status":"ACTIVE","allowMultiple":true,"renewable":false,"allowPrepaid":true,"allowPostPaid":false,"amount":10.0,"type":"DATA","deplete":true,"renew":false,"partyCode":"zsmart2","expiryValue":720,"reminderExpiryValue":0,"productCode":"DATA BUNDLES","walletName":"Gprs_bundle","commercialDescription":"304MB DATA BUNDLE"},{"dateCreated":1474391320000,"dateModified":1493129857000,"uuid":"b313f938-805b-11e6-873b-005056ad572a","retired":false,"description":"DATA BUNDLE USD20","name":"DATA BUNDLE USD20","status":"ACTIVE","allowMultiple":true,"renewable":false,"allowPrepaid":true,"allowPostPaid":false,"amount":20.0,"type":"DATA","deplete":true,"renew":false,"partyCode":"zsmart2","expiryValue":720,"reminderExpiryValue":0,"productCode":"DATA BUNDLES","walletName":"Gprs_bundle","commercialDescription":"800MB DATA BUNDLE"},{"dateCreated":1474391324000,"dateModified":1494406791000,"uuid":"b3140331-805b-11e6-873b-005056ad572a","retired":false,"description":"DATA BUNDLE USD45","name":"DATA BUNDLE USD45","status":"ACTIVE","allowMultiple":true,"renewable":false,"allowPrepaid":true,"allowPostPaid":false,"amount":45.0,"type":"DATA","deplete":true,"renew":false,"partyCode":"zsmart2","expiryValue":720,"reminderExpiryValue":0,"productCode":"DATA BUNDLES","walletName":"Gprs_bundle","commercialDescription":"2000MB DATA BUNDLE"},{"dateCreated":1474391327000,"dateModified":1494406722000,"uuid":"b3140569-805b-11e6-873b-005056ad572a","retired":false,"description":"DATA BUNDLE USD75","name":"DATA BUNDLE USD75","status":"ACTIVE","allowMultiple":true,"renewable":false,"allowPrepaid":true,"allowPostPaid":false,"amount":75.0,"type":"DATA","deplete":true,"renew":false,"partyCode":"zsmart2","expiryValue":720,"reminderExpiryValue":0,"productCode":"DATA BUNDLES","walletName":"Gprs_bundle","commercialDescription":"4000MB DATA BUNDLE"},{"dateCreated":1474391330000,"dateModified":1493129121000,"uuid":"b3140759-805b-11e6-873b-005056ad572a","retired":false,"description":"10MIN CROSSNET VOICE BUNDLE","name":"10MIN CROSSNET VOICE BUNDLE","status":"ACTIVE","allowMultiple":true,"renewable":false,"allowPrepaid":true,"allowPostPaid":false,"amount":0.01,"type":"VOICE","deplete":true,"renew":false,"partyCode":"telecel_go","expiryValue":24,"reminderExpiryValue":0,"productCode":"CROSSNET VOICE BUNDLES","walletName":"Go_SVB1","commercialDescription":"10MINS CROSSNET VOICE BUNDLE"},{"dateCreated":1474391334000,"dateModified":1494509383000,"uuid":"b3140a76-805b-11e6-873b-005056ad572a","retired":false,"description":"MEGA 1","name":"MEGA 1","status":"ACTIVE","allowMultiple":true,"renewable":false,"allowPrepaid":true,"allowPostPaid":false,"amount":0.01,"type":"VOICE, SMS, DATA","deplete":true,"renew":false,"partyCode":"hiebundle","expiryValue":24,"reminderExpiryValue":24,"productCode":"MEGA BOOST BUNDLES","walletName":"MEGA 1","commercialDescription":"USD1 MEGA-BOOST BUNDLE"},{"dateCreated":1474391337000,"dateModified":1494509412000,"uuid":"b3140dd0-805b-11e6-873b-005056ad572a","retired":false,"description":"MEGA 2","name":"MEGA 2","status":"ACTIVE","allowMultiple":true,"renewable":false,"allowPrepaid":true,"allowPostPaid":false,"amount":0.01,"type":"VOICE, SMS, DATA","deplete":false,"renew":false,"partyCode":"hiebundle","expiryValue":48,"reminderExpiryValue":0,"productCode":"MEGA BOOST BUNDLES","walletName":"MEGA 2","commercialDescription":"USD2 MEGA-BOOST BUNDLE"},{"dateCreated":1474391340000,"dateModified":1494509486000,"uuid":"b3141030-805b-11e6-873b-005056ad572a","retired":false,"description":"MEGA 5","name":"MEGA 5","status":"ACTIVE","allowMultiple":true,"renewable":false,"allowPrepaid":true,"allowPostPaid":false,"amount":0.01,"type":"VOICE, SMS, DATA","deplete":true,"renew":false,"partyCode":"hiebundle","expiryValue":720,"reminderExpiryValue":0,"productCode":"MEGA BOOST BUNDLES","walletName":"MEGA 5","commercialDescription":"USD5 MEGA-BOOST BUNDLE"},{"dateCreated":1474391343000,"dateModified":1494509528000,"uuid":"b3141223-805b-11e6-873b-005056ad572a","retired":false,"description":"MEGA 10","name":"MEGA 10","status":"ACTIVE","allowMultiple":true,"renewable":false,"allowPrepaid":true,"allowPostPaid":false,"amount":0.01,"type":"VOICE, SMS, DATA","deplete":false,"renew":false,"partyCode":"hiebundle","expiryValue":720,"reminderExpiryValue":0,"productCode":"MEGA BOOST BUNDLES","walletName":"MEGA 10","commercialDescription":"USD10 MEGA-BOOST BUNDLE"},{"dateCreated":1474391362000,"dateModified":1493129806000,"uuid":"b3141405-805b-11e6-873b-005056ad572a","retired":false,"description":"20MIN CROSSNET VOICE BUNDLE","name":"20MIN CROSSNET VOICE BUNDLE","status":"ACTIVE","allowMultiple":true,"renewable":false,"allowPrepaid":true,"allowPostPaid":false,"amount":0.01,"type":"VOICE","deplete":true,"renew":false,"partyCode":"telecel_go","expiryValue":48,"reminderExpiryValue":0,"productCode":"CROSSNET VOICE BUNDLES","walletName":"Go_SVB2","commercialDescription":"20MINS CROSSNET VOICE BUNDLE"},{"dateCreated":1474391366000,"dateModified":1493129791000,"uuid":"b31415ea-805b-11e6-873b-005056ad572a","retired":false,"description":"50MIN CROSSNET VOICE BUNDLE","name":"50MIN CROSSNET VOICE BUNDLE","status":"ACTIVE","allowMultiple":true,"renewable":false,"allowPrepaid":true,"allowPostPaid":false,"amount":0.01,"type":"VOICE","deplete":true,"renew":false,"partyCode":"telecel_go","expiryValue":72,"reminderExpiryValue":0,"productCode":"CROSSNET VOICE BUNDLES","walletName":"Go_SVB5","commercialDescription":"50MINS CROSSNET VOICE BUNDLE"},{"dateCreated":1474391376000,"dateModified":1493129143000,"uuid":"b31417cf-805b-11e6-873b-005056ad572a","retired":false,"description":"INTERNATIONAL VOICE 4 MINS","name":"INTERNATIONAL VOICE 4 MINS","status":"ACTIVE","allowMultiple":true,"renewable":false,"allowPrepaid":true,"allowPostPaid":false,"amount":0.01,"type":"VOICE","deplete":false,"renew":false,"partyCode":"Int_vbundles","expiryValue":24,"reminderExpiryValue":0,"productCode":"INTERNATIONAL VOICE BUNDLES","walletName":"International_voice","commercialDescription":"4 MINS INTERNATIONAL VOICE BUNDLE"},{"dateCreated":1474391379000,"dateModified":1493129766000,"uuid":"b31419af-805b-11e6-873b-005056ad572a","retired":false,"description":"INTERNATIONAL VOICE 8 MINS","name":"INTERNATIONAL VOICE 8 MINS","status":"ACTIVE","allowMultiple":true,"renewable":false,"allowPrepaid":true,"allowPostPaid":false,"amount":0.01,"type":"VOICE","deplete":false,"renew":false,"partyCode":"Int_vbundles","expiryValue":72,"reminderExpiryValue":0,"productCode":"INTERNATIONAL VOICE BUNDLES","walletName":"Int_Voice2","commercialDescription":"8 MINS INTERNATIONAL VOICE BUNDLE"},{"dateCreated":1474391381000,"dateModified":1493129756000,"uuid":"b3141b8f-805b-11e6-873b-005056ad572a","retired":false,"description":"INTERNATIONAL VOICE 20 MINS","name":"INTERNATIONAL VOICE 20 MINS","status":"ACTIVE","allowMultiple":true,"renewable":false,"allowPrepaid":true,"allowPostPaid":false,"amount":0.01,"type":"VOICE","deplete":false,"renew":false,"partyCode":"Int_vbundles","expiryValue":168,"reminderExpiryValue":0,"productCode":"INTERNATIONAL VOICE BUNDLES","walletName":"Int_Voice5","commercialDescription":"20 MINS INTERNATIONAL VOICE BUNDLE"},{"dateCreated":1474391385000,"dateModified":1493129748000,"uuid":"b3141d2c-805b-11e6-873b-005056ad572a","retired":false,"description":"INTERNATIONAL VOICE 40 MINS","name":"INTERNATIONAL VOICE 40 MINS","status":"ACTIVE","allowMultiple":true,"renewable":false,"allowPrepaid":true,"allowPostPaid":false,"amount":0.01,"type":"VOICE","deplete":false,"renew":false,"partyCode":"Int_vbundles","expiryValue":240,"reminderExpiryValue":0,"productCode":"INTERNATIONAL VOICE BUNDLES","walletName":"Int_Voice10","commercialDescription":"40 MINS INTERNATIONAL VOICE BUNDLE"},{"dateCreated":1474391389000,"dateModified":1493129739000,"uuid":"b3141ec0-805b-11e6-873b-005056ad572a","retired":false,"description":"INTERNATIONAL VOICE 80 MINS","name":"INTERNATIONAL VOICE 80 MINS","status":"ACTIVE","allowMultiple":true,"renewable":false,"allowPrepaid":true,"allowPostPaid":false,"amount":0.01,"type":"VOICE","deplete":false,"renew":false,"partyCode":"Int_vbundles","expiryValue":360,"reminderExpiryValue":0,"productCode":"INTERNATIONAL VOICE BUNDLES","walletName":"Int_Voice20","commercialDescription":"80 MINS INTERNATIONAL VOICE BUNDLE"},{"dateCreated":1474391392000,"dateModified":1493129725000,"uuid":"b3142052-805b-11e6-873b-005056ad572a","retired":false,"description":"NIGHT DATA USD1","name":"NIGHT DATA USD1","status":"ACTIVE","allowMultiple":true,"renewable":false,"allowPrepaid":true,"allowPostPaid":false,"amount":0.01,"type":"DATA","deplete":false,"renew":false,"partyCode":"NiteDataBndle","expiryValue":48,"reminderExpiryValue":0,"productCode":"NIGHT DATA BUNDLES","walletName":"Gprs_night1","commercialDescription":"350MB NIGHT DATA"},{"dateCreated":1474391398000,"dateModified":1493129709000,"uuid":"b31421eb-805b-11e6-873b-005056ad572a","retired":false,"description":"NIGHT DATA USD2","name":"NIGHT DATA USD2","status":"ACTIVE","allowMultiple":true,"renewable":false,"allowPrepaid":true,"allowPostPaid":false,"amount":0.01,"type":"DATA","deplete":false,"renew":false,"partyCode":"NiteDataBndle","expiryValue":120,"reminderExpiryValue":0,"productCode":"NIGHT DATA BUNDLES","walletName":"Gprs_night2","commercialDescription":"800MB NIGHT DATA"},{"dateCreated":1474391401000,"dateModified":1493129655000,"uuid":"b31424e8-805b-11e6-873b-005056ad572a","retired":false,"description":"NIGHT DATA USD3","name":"NIGHT DATA USD3","status":"ACTIVE","allowMultiple":true,"renewable":false,"allowPrepaid":true,"allowPostPaid":false,"amount":0.01,"type":"DATA","deplete":false,"renew":false,"partyCode":"NiteDataBndle","expiryValue":168,"reminderExpiryValue":0,"productCode":"NIGHT DATA BUNDLES","walletName":"Gprs_night3","commercialDescription":"1024MB NIGHT DATA"},{"dateCreated":1474391406000,"dateModified":1493129640000,"uuid":"b3142694-805b-11e6-873b-005056ad572a","retired":false,"description":"DAY DATA USD1","name":"DAY DATA USD1","status":"ACTIVE","allowMultiple":false,"renewable":false,"allowPrepaid":true,"allowPostPaid":false,"amount":0.01,"type":"DATA","deplete":false,"renew":false,"partyCode":"Daily_dbndle","expiryValue":24,"reminderExpiryValue":0,"productCode":"DAY DATA BUNDLES","walletName":"Daily_Data1","commercialDescription":"300MB DAILY DATA BUNDLE"},{"dateCreated":1474391410000,"dateModified":1493129633000,"uuid":"b314282d-805b-11e6-873b-005056ad572a","retired":false,"description":"DAY DATA USD2","name":"DAY DATA USD2","status":"ACTIVE","allowMultiple":false,"renewable":false,"allowPrepaid":true,"allowPostPaid":false,"amount":0.01,"type":"DATA","deplete":true,"renew":false,"partyCode":"Daily_dbndle","expiryValue":24,"reminderExpiryValue":0,"productCode":"DAY DATA BUNDLES","walletName":"Daily_Data2","commercialDescription":"1000MB DAILY DATA BUNDLE"},{"dateCreated":1475756166000,"dateModified":1493129533000,"uuid":"bdd958f3-6351-401e-a2e6-e59fd77bea3e","retired":false,"description":"KENAKO WEEKLY","name":"KENAKO WEEKLY","status":"ACTIVE","allowMultiple":false,"renewable":false,"allowPrepaid":true,"allowPostPaid":true,"amount":0.01,"type":"DATA","deplete":false,"renew":false,"partyCode":"doubledata","expiryValue":7,"reminderExpiryValue":0,"productCode":"KENAKO BUNDLES","walletName":"Kenako_Weekly","commercialDescription":"KENAKO WEEKLY"},{"dateCreated":1475756256000,"dateModified":1493129526000,"uuid":"b268d2d4-f445-4262-9c98-6a8832adb5a4","retired":false,"description":"KENAKO MONTHLY","name":"KENAKO MONTHLY","status":"ACTIVE","allowMultiple":false,"renewable":false,"allowPrepaid":true,"allowPostPaid":true,"amount":0.01,"type":"DATA","deplete":false,"renew":false,"partyCode":"doubledata","expiryValue":30,"reminderExpiryValue":0,"productCode":"KENAKO BUNDLES","walletName":"Kenako_Monthly","commercialDescription":"KENAKO MONTHLY"},{"dateCreated":1491299602000,"dateModified":1493129516000,"uuid":"1bdcb54c-70f6-40dc-90f0-dd80bb013f32","retired":false,"description":"100MIN CROSSNET VOICE BUNDLE","name":"100MIN CROSSNET VOICE BUNDLE","status":"ACTIVE","allowMultiple":true,"renewable":false,"allowPrepaid":true,"allowPostPaid":false,"amount":0.01,"type":"VOICE","deplete":true,"renew":false,"partyCode":"telecel_go","expiryValue":720,"reminderExpiryValue":0,"productCode":"CROSSNET VOICE BUNDLES","walletName":"Go_SVB10","commercialDescription":"100MINS CROSSNET VOICE BUNDLE"},{"dateCreated":1474391422000,"dateModified":1493129501000,"uuid":"b3142cc2-805b-11e6-873b-005056ad572a","retired":false,"description":"USD0.50 for 125","name":"SMS 50","status":"ACTIVE","allowMultiple":false,"renewable":true,"allowPrepaid":true,"allowPostPaid":false,"amount":0.01,"type":"SMS","deplete":true,"renew":false,"partyCode":"smsbundle","expiryValue":168,"reminderExpiryValue":0,"productCode":"SMS BUNDLES","walletName":"Go_SMS50","commercialDescription":"125 WEEKLY SMS"},{"dateCreated":1474391425000,"dateModified":1493129492000,"uuid":"b3142e74-805b-11e6-873b-005056ad572a","retired":false,"description":"USD1.50 for 450","name":"SMS 150","status":"ACTIVE","allowMultiple":false,"renewable":true,"allowPrepaid":true,"allowPostPaid":false,"amount":0.01,"type":"SMS","deplete":true,"renew":false,"partyCode":"smsbundle","expiryValue":720,"reminderExpiryValue":0,"productCode":"SMS BUNDLES","walletName":"Go_SMS150","commercialDescription":"450 MONTHLY SMS"},{"dateCreated":1474391430000,"dateModified":1493129482000,"uuid":"b3142ffd-805b-11e6-873b-005056ad572a","retired":false,"description":"USD3.00 for 1000 SMS","name":"SMS 300","status":"ACTIVE","allowMultiple":false,"renewable":true,"allowPrepaid":true,"allowPostPaid":false,"amount":0.01,"type":"SMS","deplete":true,"renew":false,"partyCode":"smsbundle","expiryValue":720,"reminderExpiryValue":0,"productCode":"SMS BUNDLES","walletName":"Go_SMS300","commercialDescription":"1000 MONTHLY SMS"},{"dateCreated":1474391435000,"dateModified":1494509666000,"uuid":"b3143187-805b-11e6-873b-005056ad572a","retired":false,"description":"Whatsapp Daily - USD0.35","name":"Whatsapp_Daily","status":"ACTIVE","allowMultiple":false,"renewable":true,"allowPrepaid":true,"allowPostPaid":false,"amount":0.01,"type":"DATA","deplete":false,"renew":false,"partyCode":"whatsapp","expiryValue":24,"reminderExpiryValue":0,"productCode":"WHATSAPP BUNDLES","walletName":"Whatsapp_Daily","commercialDescription":"Daily Whatsapp"},{"dateCreated":1474391439000,"dateModified":1493129474000,"uuid":"b314330e-805b-11e6-873b-005056ad572a","retired":false,"description":"Whatsapp Weekly - USD1.00","name":"Weekly Whatsapp","status":"ACTIVE","allowMultiple":false,"renewable":true,"allowPrepaid":true,"allowPostPaid":false,"amount":0.01,"type":"DATA","deplete":false,"renew":false,"partyCode":"whatsapp","expiryValue":168,"reminderExpiryValue":0,"productCode":"WHATSAPP BUNDLES","walletName":"Weekly Whatsapp","commercialDescription":"Weekly Whatsapp"},{"dateCreated":1474391444000,"dateModified":1493129195000,"uuid":"b314348f-805b-11e6-873b-005056ad572a","retired":false,"description":"Whatsapp Monthly - USD2.85","name":"Monthly Whatsapp","status":"ACTIVE","allowMultiple":false,"renewable":true,"allowPrepaid":true,"allowPostPaid":false,"amount":0.01,"type":"DATA","deplete":false,"renew":false,"partyCode":"whatsapp","expiryValue":720,"reminderExpiryValue":0,"productCode":"WHATSAPP BUNDLES","walletName":"Monthly Whatsapp","commercialDescription":"Monthly Whatsapp"},{"dateCreated":1474391447000,"dateModified":1493129185000,"uuid":"b3143616-805b-11e6-873b-005056ad572a","retired":false,"description":"Facebook Daily","name":"FACEBOOK 5","status":"ACTIVE","allowMultiple":false,"renewable":true,"allowPrepaid":true,"allowPostPaid":false,"amount":0.01,"type":"DATA","deplete":false,"renew":false,"partyCode":"facebook","expiryValue":24,"reminderExpiryValue":0,"productCode":"FACEBOOK BUNDLES","walletName":"Facebook_Daily","commercialDescription":"Daily Facebook"},{"dateCreated":1474391451000,"dateModified":1493129176000,"uuid":"b314379e-805b-11e6-873b-005056ad572a","retired":false,"description":"Weekly Facebook - USD1.00","name":"FACEBOOK 10","status":"ACTIVE","allowMultiple":false,"renewable":true,"allowPrepaid":true,"allowPostPaid":false,"amount":0.01,"type":"DATA","deplete":false,"renew":false,"partyCode":"facebook","expiryValue":168,"reminderExpiryValue":0,"productCode":"FACEBOOK BUNDLES","walletName":"Facebook_Weekly","commercialDescription":"Weekly Facebook"}]
所以我想选择产品代码。 json 有很多产品,但大多数产品共享相同的产品代码,所以我想选择产品代码而不重新选择我之前选择的产品
最佳答案
在重新加载 tableView
之前,您需要从 self.productsArray
中删除重复的元素。
要删除重复元素,请参阅:https://stackoverflow.com/a/25739498/5716829
关于ios - 使用 Swift 删除重复的单元格 tableView,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44285405/
我在网上搜索但没有找到任何合适的文章解释如何使用 javascript 使用 WCF 服务,尤其是 WebScriptEndpoint。 任何人都可以对此给出任何指导吗? 谢谢 最佳答案 这是一篇关于
我正在编写一个将运行 Linux 命令的 C 程序,例如: cat/etc/passwd | grep 列表 |剪切-c 1-5 我没有任何结果 *这里 parent 等待第一个 child (chi
所以我正在尝试处理文件上传,然后将该文件作为二进制文件存储到数据库中。在我存储它之后,我尝试在给定的 URL 上提供文件。我似乎找不到适合这里的方法。我需要使用数据库,因为我使用 Google 应用引
我正在尝试制作一个宏,将下面的公式添加到单元格中,然后将其拖到整个列中并在 H 列中复制相同的公式 我想在 F 和 H 列中输入公式的数据 Range("F1").formula = "=IF(ISE
问题类似于this one ,但我想使用 OperatorPrecedenceParser 解析带有函数应用程序的表达式在 FParsec . 这是我的 AST: type Expression =
我想通过使用 sequelize 和 node.js 将这个查询更改为代码取决于在哪里 select COUNT(gender) as genderCount from customers where
我正在使用GNU bash,版本5.0.3(1)-发行版(x86_64-pc-linux-gnu),我想知道为什么简单的赋值语句会出现语法错误: #/bin/bash var1=/tmp
这里,为什么我的代码在 IE 中不起作用。我的代码适用于所有浏览器。没有问题。但是当我在 IE 上运行我的项目时,它发现错误。 而且我的 jquery 类和 insertadjacentHTMl 也不
我正在尝试更改标签的innerHTML。我无权访问该表单,因此无法编辑 HTML。标签具有的唯一标识符是“for”属性。 这是输入和标签的结构:
我有一个页面,我可以在其中返回用户帖子,可以使用一些 jquery 代码对这些帖子进行即时评论,在发布新评论后,我在帖子下插入新评论以及删除 按钮。问题是 Delete 按钮在新插入的元素上不起作用,
我有一个大约有 20 列的“管道分隔”文件。我只想使用 sha1sum 散列第一列,它是一个数字,如帐号,并按原样返回其余列。 使用 awk 或 sed 执行此操作的最佳方法是什么? Accounti
我需要将以下内容插入到我的表中...我的用户表有五列 id、用户名、密码、名称、条目。 (我还没有提交任何东西到条目中,我稍后会使用 php 来做)但由于某种原因我不断收到这个错误:#1054 - U
所以我试图有一个输入字段,我可以在其中输入任何字符,但然后将输入的值小写,删除任何非字母数字字符,留下“。”而不是空格。 例如,如果我输入: 地球的 70% 是水,-!*#$^^ & 30% 土地 输
我正在尝试做一些我认为非常简单的事情,但出于某种原因我没有得到想要的结果?我是 javascript 的新手,但对 java 有经验,所以我相信我没有使用某种正确的规则。 这是一个获取输入值、检查选择
我想使用 angularjs 从 mysql 数据库加载数据。 这就是应用程序的工作原理;用户登录,他们的用户名存储在 cookie 中。该用户名显示在主页上 我想获取这个值并通过 angularjs
我正在使用 autoLayout,我想在 UITableViewCell 上放置一个 UIlabel,它应该始终位于单元格的右侧和右侧的中心。 这就是我想要实现的目标 所以在这里你可以看到我正在谈论的
我需要与 MySql 等效的 elasticsearch 查询。我的 sql 查询: SELECT DISTINCT t.product_id AS id FROM tbl_sup_price t
我正在实现代码以使用 JSON。 func setup() { if let flickrURL = NSURL(string: "https://api.flickr.com/
我尝试使用for循环声明变量,然后测试cols和rols是否相同。如果是,它将运行递归函数。但是,我在 javascript 中执行 do 时遇到问题。有人可以帮忙吗? 现在,在比较 col.1 和
我举了一个我正在处理的问题的简短示例。 HTML代码: 1 2 3 CSS 代码: .BB a:hover{ color: #000; } .BB > li:after {
我是一名优秀的程序员,十分优秀!