override func numberOfSections(in tableView: UITableView) -> Int {
// You need to return minimum one to show the cell inside the tableview
return 1
}
override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
// return the number of rows i...
For custom tableview cell you need a class that is subclass from UITableViewCell, an example class you can see below.
class TableViewCell: UITableViewCell {
@IBOutlet weak var lblTitle: UILabel!
override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
}
overrid...
The simple, yet powerful use of the ISE is e.g. writing code in the top section (with intuitive syntax coloring) and run the code by simply marking it and hitting the F8 key.
function Get-Sum
{
foreach ($i in $Input)
{$Sum += $i}
$Sum
1..10 | Get-Sum
#output
55
An example, to remove a "Key2" key with a value of "Value2" from the hash table, using the remove operator:
$hashTable = @{
Key1 = 'Value1'
Key2 = 'Value2'
}
$hashTable.Remove("Key2", "Value2")
$hashTable
#Output
Name ...
JavaScript now have the Append and Prepend methods which was present in jQuery
The main advantage of append and prepend is unlike appendChild and insertBefore, it can take any number of arguments either HTML element or plain text(which will be converted to text nodes).
To append say 1 div, 1 text ...
var sck = "wss://site.com/wss-handler";
var wss = new WebSocket(sck);
This uses the wss instead of ws to make a secure web socket connection which make use of HTTPS instead of HTTP