This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* be sure that the slider's continuous property is also set. | |
* On the other hand, if you don't want the event to fire as the user is sliding and only when they finish sliding, | |
* set continuous to NO (or uncheck in IB) | |
*/ | |
class ViewController: UIViewController { | |
@IBOutlet weak var slider: UISlider! | |
override func viewDidLoad() { | |
super.viewDidLoad() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ViewController: UIViewController, UICollectionViewDelegate { | |
func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { | |
// Check whether there is any selected cell or not | |
if collectionView.indexPathsForSelectedItems?.count ?? 0 > 0 { // if there is an already selected cells | |
// check if selected cell indexPath is one of the indexPathsForSelectedItems | |
if collectionView.indexPathsForSelectedItems!.contains(indexPath) { | |
// if yes, deselect it | |
collectionView.deselectItem(at: indexPath, animated: true) | |
} else { | |
// if no, not specified what to do here => personal suggestion would be to update the selected cells |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CreateComplaintRequest(departmentID=2, typeID=1, subject=543, message=234, postedFiles=[PostedFile(fileName=IMG_20200308_125515.jpg, mimeType=image/jpeg, bytesArray=/9j/4QG1RXhpZgAATU0AKgAAAAgABwEQAAIAAAAaAAAAYgEAAAQAAAABAAAEOAEBAAQAAAABAAAH | |
gAEyAAIAAAAUAAAAfAESAAMAAAABAAEAAIdpAAQAAAABAAAAlwEPAAIAAAAHAAAAkAAAAABBbmRy | |
b2lkIFNESyBidWlsdCBmb3IgeDg2ADIwMjA6MDM6MDggMTI6NTU6MTYAR29vZ2xlAAAQgp0ABQAA | |
AAEAAAFdgpoABQAAAAEAAAFlkpIAAgAAAAQxMzkAkpEAAgAAAAQxMzkAkpAAAgAAAAQxMzkAkgoA | |
BQAAAAEAAAFtkgkAAwAAAAEAAAAAiCcAAwAAAAEAZAAAkAQAAgAAABQAAAF1kAMAAgAAABQAAAGJ | |
oAMABAAAAAEAAAeApAMAAwAAAAEAAAAAoAIABAAAAAEAAAQ4kgIABQAAAAEAAAGdkgEACgAAAAEA | |
AAGlkAAABwAAAAQwMjIwAAAAAAAAARgAAABkAJiWgDuaygAAABOIAAAD6DIwMjA6MDM6MDggMTI6 | |
NTU6MTYAMjAyMDowMzowOCAxMjo1NToxNgAAAAEpAAAAZAAAGfMAAAPo/+AAEEpGSUYAAQEAAAEA | |
AQAA/9sAQwACAQEBAQECAQEBAgICAgIEAwICAgIFBAQDBAYFBgYGBQYGBgcJCAYHCQcGBggLCAkK | |
CgoKCgYICwwLCgwJCgoK/9sAQwECAgICAgIFAwMFCgcGBwoKCgoKCgoKCgoKCgoKCgoKCgoKCgoK |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct OccType: Codable { | |
var id: Int = 0 | |
var type: String = "" | |
var createdAt: String? = nil | |
var updatedAt: String? = nil | |
var image: String? = nil | |
enum CodingKeys: String, CodingKey { | |
case id, type | |
case createdAt = "created_at" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Book { | |
var bookTitle: String = String() | |
var bookAuthor: String = String() | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fs = window.RequestFileSystem || window.webkitRequestFileSystem; | |
if (fs == null || fs == undefined) { | |
console.log("check failed"); | |
} | |
fs(window.TEMPORARY, 100, function() { | |
console.log("Not in Incognito mode"); | |
}, function() { | |
console.log("In Incognito mode"); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* | |
* @author Ahmed Moussa | |
*/ | |
public class JavaApplication1 { | |
String name; | |
int age; | |
public JavaApplication1() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$soap_request = <<<XML | |
<?xml version="1.0" encoding="UTF-8"?> | |
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:dood="http://xmlns.oracle.com/apps/scm/doo/decomposition/receiveTransform/receiveSalesOrder/DooDecompReceiveOrderExternalComposite" xmlns:mod="http://xmlns.oracle.com/apps/scm/doo/decomposition/receiveTransform/receiveSalesOrder/model/" xmlns:mod1="http://xmlns.oracle.com/apps/scm/doo/processOrder/model/"> | |
<soapenv:Header /> | |
<soapenv:Body> | |
<dood:process> | |
<dood:OrchestrationOrderRequest> | |
<!--Optional:--> | |
<mod:SourceTransactionIdentifier>[email protected]</mod:SourceTransactionIdentifier> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:dood="http://xmlns.oracle.com/apps/scm/doo/decomposition/receiveTransform/receiveSalesOrder/DooDecompReceiveOrderExternalComposite" xmlns:mod="http://xmlns.oracle.com/apps/scm/doo/decomposition/receiveTransform/receiveSalesOrder/model/" xmlns:mod1="http://xmlns.oracle.com/apps/scm/doo/processOrder/model/"> | |
<soapenv:Header /> | |
<soapenv:Body> | |
<dood:process> | |
<dood:OrchestrationOrderRequest> | |
<!--Optional:--> | |
<mod:SourceTransactionIdentifier>[email protected]</mod:SourceTransactionIdentifier> | |
<mod:SourceTransactionSystem>OPS</mod:SourceTransactionSystem> | |
<mod:SourceTransactionNumber>100006</mod:SourceTransactionNumber> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
infix operator ++ | |
infix operator -- | |
extension Int { | |
/// decress the value by one | |
/// | |
/// - Parameter num: value to decress | |
static prefix func --(_ num: inout Int) -> Int { | |
num -= 1 |
NewerOlder