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
import { Alert } from 'react-native'; | |
Alert.alert( | |
'Route', | |
'clicked!', | |
[{ text: 'OK', onPress: () => console.log('OK Pressed') }], | |
{ cancelable: false } | |
); |
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
// inside the Class outside function | |
let userSettings = UserDefaults.standard | |
// Setter | |
userSettings.set("foo", forKey: "foobar") | |
// Getter | |
let foo = userSettings.string(forKey: "foobar") |
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
dismiss(animated: true, completion: nil) |
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
let stringOriginal = "http://www.google.de/json?origin with space" | |
let stringUrlEnc = stringOriginal.addingPercentEncoding(withAllowedCharacters: .urlHostAllowed) |
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
let alert = UIAlertController(title: "Error", message: "Please, fill the Form", preferredStyle: .alert) | |
alert.addAction(UIAlertAction(title: "Ok", style: .default)) | |
self.present(alert, animated: true, completion: nil) |
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
// Between import and class | |
struct Constants { | |
static var stringVar = "foo" | |
static var intVar = 34 | |
} | |
// Call it like: | |
Constants.stringVar = "bar" |
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
import UIKit | |
import GoogleMobileAds | |
class ViewController: UIViewController { | |
@IBOutlet weak var bannerView: GADBannerView! | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
// Do any additional setup after loading the view, typically from a nib. |
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
if ($('.vimeo-iframe').length > 0) { | |
oWindowWidth = $(window).outerWidth(); | |
oWindowHeight = $(window).outerHeight(); | |
windowWidth = $(window).outerWidth() - 10; | |
windowHeight = $(window).outerHeight() - 128; | |
wCalc = ((windowWidth * 100)/1280); | |
hCalc = ((windowHeight * 100)/720); | |
rwCalc = 1280 * (hCalc/100); | |
rhCalc = 720 * (wCalc/100); | |
if (oWindowWidth < 1280) { |
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
/** Connect to the Database by TYPO3_DB */ | |
/** @var DatabaseConnection $db */ | |
$db = $GLOBALS['TYPO3_DB']; | |
//Execute Query | |
$result = $db->exec_SELECTgetRows('SELECT * FROM tx_test_tabelle'); | |
//Get Results | |
return $result; |
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
/* Mobile */ | |
@media only screen and (min-device-width : 375px) and (max-device-width : 667px) { | |
} | |
/* Tablet Portrait */ | |
@media only screen and (min-device-width : 768px) and (max-device-width : 1024px) and (orientation : portrait) { | |
} | |
/* Tablet Landscape */ | |
@media only screen and (min-device-width : 768px) and (max-device-width : 1024px) and (orientation : landscape) { |