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 PlaygroundSupport | |
import UIKit | |
func makeLabels(left: String, right: String) -> (UIView, UILabel, UILabel) { | |
let leftLb: UILabel = { | |
let label = UILabel(frame: .zero) | |
label.textAlignment = .left | |
label.backgroundColor = .blue | |
label.text = left | |
return label |
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 Foundation | |
func getData(_ urlString: String) -> Data? { | |
guard let url = URL(string: urlString) else { return nil } | |
return try? Data(contentsOf: url) | |
} | |
struct Result { | |
var comments: Int |
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
/* | |
* Name:RFID.pde | |
* Create:www.electrodragon.com | |
* Create date:2011.09.19 | |
* Function:Mifare1 searching card →prevent conflict→ select card →read write pins | |
*/ | |
// the sensor communicates using SPI, so include the library: | |
#include <SPI.h> | |
#define uchar unsigned char |
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 SelfsizingTableView: UITableView { | |
override var intrinsicContentSize: CGSize { | |
return CGSize(width: frame.width, | |
height: contentSize.height + contentInset.top + contentInset.bottom) | |
} | |
override var contentSize: CGSize { | |
didSet { | |
if oldValue != contentSize { |
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
#include "stm32l1xx.h" | |
void delay(unsigned int time) { | |
for (time; time > 0; time--); | |
} | |
int main(void) | |
{ | |
RCC->AHBENR |= RCC_AHBENR_GPIOBEN; |
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 | |
extension UIImage { | |
class func lettersPhoto(_ input: String, | |
size: CGSize = CGSize(width:100, height:100)) -> UIImage? { | |
// Color generation place | |
let bgColor = UIColor.black | |
let height = size.height/2 | |
let letters: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
import PlaygroundSupport | |
import UIKit | |
extension NSLayoutConstraint { | |
class func equalConstraint(item: UIView, attribute: NSLayoutAttribute, toItem: UIView) -> NSLayoutConstraint{ | |
return NSLayoutConstraint(item: item, | |
attribute: attribute, | |
relatedBy: .equal, | |
toItem: toItem, | |
attribute: attribute, |
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
// ==UserScript== | |
// @name Arenda scanner | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Change transparent blocks by filters | |
// @author ftp27 | |
// @match http://www.arenda-piter.ru/workpage.php* | |
// @grant none | |
// ==/UserScript== |
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
############################################################################################## | |
# | |
# On command line: | |
# | |
# make all = Create project | |
# | |
# make clean = Clean project files. | |
# | |
# To rebuild project do "make clean" and "make all". | |
# |
NewerOlder