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
//****************TJBinder.h**************// | |
// | |
// BindProxy.h | |
// HelloBind | |
// | |
// Created by Janos Tolgyesi on 29/03/14. | |
// Copyright (c) 2014 Neosperience SpA. All rights reserved. | |
// | |
#import "UIView+TJBinder.h" |
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
//Input array | |
var arr = ["31415926535897932384626433832795", "4", "66", "100"]; | |
func comp(s1 : String, s2:String) -> Bool { | |
let length1 = s1.characters.count | |
let length2 = s2.characters.count | |
if length1 < length2 { |
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 : Jeevan Rao | |
* Date : 13/0/2017 | |
* Swift : V3.1 | |
*/ | |
/* UI + UX Tricks */ | |
//Selection style of table view cell (other than Default grey / Blue/ none) | |
let selectionColorView = UIView() |
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
/* Sample code to connect MySQL DB in NodeJS | |
* Table name: user | |
* Test Result : Pass | |
* Pre-requesties : NodeJS installed with Express, MySql dependencies. | |
*/ | |
var express = require("express") | |
var mysql = require('mysql') | |
var app = express() |
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 WebKit | |
class ViewController: UIViewController, WKNavigationDelegate { | |
@IBOutlet weak var demoWebView: WKWebView! | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
let url = URL(string: "https://ioscreator.com")! |
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
//Custom class | |
class ExclusiveCollectionView : UIView, UICollectionViewDelegate, UICollectionViewDataSource { | |
@IBOutlet weak var exCollectionView: UICollectionView! | |
//Inits | |
class func instanceFromNib() -> ExclusiveCollectionView { | |
return UINib(nibName: "ExclusiveCollectionView", bundle: nil).instantiate(withOwner: nil, options: nil)[0] as! ExclusiveCollectionView | |
} |
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 styles: [UIFontTextStyle] = [ | |
// iOS 11 | |
.largeTitle, | |
// iOS 9 | |
.title1, .title2, .title3, .callout, | |
// iOS 7 | |
.headline, .subheadline, .body, .footnote, .caption1, .caption2, | |
] | |
for style in styles { |
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 #available(iOS 12.0, *) { | |
_yourOTPTextField.textContentType = .oneTimeCode | |
} |
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
#!/bin/sh | |
#Script will print all the keys in the Localization.string file from Xcode. | |
#First we have to copy the content and paste into a text file. | |
echo "***START***" | |
#Read line by line | |
while read line; do | |
#Convert string (by split with ;) to array | |
IFS='=' read -ra itemArray <<< "$line" | |
#Print first item in the array | |
for i in "${itemArray[0]}"; do |
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
#!/bin/sh | |
#*****Reading ******# | |
#From user | |
read -p "Enter Name: " userName | |
echo $userName | |
#From text file - line by line | |
while read line; do | |
echo $line |
OlderNewer