This file contains hidden or 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 | |
| class EmojiReadViewController: UIViewController { | |
| @IBOutlet weak var labelAndroidToIOS: UILabel! | |
| override func viewDidLoad() { | |
| super.viewDidLoad() | |
| var dataFromAndroid = "😊😁 loream ipsum qeqeura dafult" |
This file contains hidden or 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
| // For Int | |
| import UIKit | |
| class MentionHalfBoldViewController: UIViewController { | |
| override func viewDidLoad() { | |
| super.viewDidLoad() | |
| let txt = "Lorem ipsum @[1484987415095898:274:Page Four] dolores" |
This file contains hidden or 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 Photos | |
| import UIKit | |
| class ImageFolderViewController: UIViewController, UIImagePickerControllerDelegate, UINavigationControllerDelegate { | |
| @IBOutlet weak var fotoImg: UIImageView! | |
| override func viewDidLoad() { | |
| super.viewDidLoad() | |
| } | |
This file contains hidden or 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
| // | |
| // CustomAlbum.swift | |
| // TestPart5 | |
| // | |
| // Created by Jeri Purnama on 10/10/18. | |
| // Copyright © 2018 jeriPm. All rights reserved. | |
| // | |
| import Foundation | |
| import Photos |
This file contains hidden or 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
| // NumberBeforeStringVC.swift | |
| // For Test Part 4 | |
| // | |
| // Created by Jeri PM on 05/10/18. | |
| // Copyright © 2018 Jeri PM. All rights reserved. | |
| // | |
| class NumberStringVC: UIViewController { | |
| @IBOutlet weak var texField: UITextField! | |
| @IBOutlet weak var texField1: UITextField! |
This file contains hidden or 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
| // | |
| // CustomTableView.swift | |
| // FoodLibrary | |
| // | |
| // Created by Jerry PM on 03/10/18. | |
| // Copyright © 2018 jeriPm. All rights reserved. | |
| // custom uitableview datasource | |
| import Foundation | |
| import UIKit |
This file contains hidden or 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
| // Test Change Date Format | |
| let format = DateFormatter() | |
| format.dateFormat = "yyyy-MM-dd" // from this format | |
| let formatPrint = DateFormatter() | |
| formatPrint.dateFormat = "dd MMMM yyyy" // to this format "IND Date" | |
| // Process change format | |
| if let date = format.date(from: ("2018-10-01"){ |
This file contains hidden or 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
| //JeriPM | |
| // How to select an element of array Swift | |
| import UIKit | |
| class ExampleViewController: UIViewController { | |
| var exArray = ["one", "two", "three"] | |
| override func viewDidLoad() { |
This file contains hidden or 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
| <h1>vertices</h1> | |
| <input id="SLID" type="range" min="1" max="21" value="10"><input id="TEXT"> | |
| <canvas id="CNVS" width="1024" height="1024"></canvas><hr/> | |
| <script> | |
| const vs=`attribute vec4 a;uniform float vt; | |
| void main(){ | |
| gl_PointSize=1.0; | |
| float th=vt*a.z/2.0; | |
| gl_Position=a; | |
| gl_Position.xy*=mat2(cos(th),-sin(th),sin(th),cos(th)); |
This file contains hidden or 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 | |
| //color RGB | |
| extension UIColor { | |
| convenience init(r: CGFloat, g: CGFloat, b: CGFloat) { | |
| self.init(red: r / 255, green: g / 255, blue: b / 255, alpha: 1) | |
| } | |
| } | |
| // trimmingCharacters removes only leading and trailing white spaces. |