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
class ViewController: UIViewController { | |
let disposeBag = DisposeBag() | |
var prefetchMaster : ConnectableObservable<Int>! | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
prefetchMaster = Observable.interval(1, scheduler: MainScheduler.instance).publish() | |
print("Published") | |
let subscriber = prefetchMaster.subscribe{ |
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 | |
import RxSwift | |
import RxCocoa | |
import Alamofire | |
class ViewController: UIViewController { | |
let disposeBag = DisposeBag() | |
@IBOutlet weak var firstname: UITextField! | |
@IBOutlet weak var lastname: UITextField! | |
@IBOutlet weak var employeeId: 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
import UIKit | |
import RxSwift | |
import RxCocoa | |
import Alamofire | |
class ViewController: UIViewController { | |
let disposeBag = DisposeBag() | |
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
import UIKit | |
import RxSwift | |
import RxCocoa | |
import Alamofire | |
import RxSwiftExt | |
class ViewController: UIViewController { | |
let disposeBag = DisposeBag() | |
@IBOutlet weak var textField: 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
<receiver android:name=".BatteryLowReceiver"> | |
<intent-filter> | |
<action android:name="android.intent.action.BATTERY_LOW" /> | |
</intent-filter> | |
</receiver> |
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
public class BatteryLowReceiver extends BroadcastReceiver { | |
@Override | |
public void onReceive(Context context, Intent intent) { | |
if (intent.getAction().equals(Intent.ACTION_BATTERY_LOW)) { | |
//Battery Level Notificaiton | |
} | |
} | |
} |
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
class ConcatOperator { | |
var disposeBag : DisposeBag = DisposeBag() | |
func getEmployeeData(){ | |
getEmployeeFromCacheAndFallBackToOnline() | |
.subscribe(onNext: { (goodReceiptPOList) in | |
print(goodReceiptPOList.count) | |
}, onError: { | |
(error) in |
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
class Employee: NSObject { | |
var employeeName : String? | |
var employeeId : String? | |
} |
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
TextView textView = new TextView(this); | |
textView.setText("Test"); | |
textView.setId("Your Id"); | |
textView.setOnClickListener(new View.OnClickListener() { | |
@Override public void onClick(View view) { | |
changeTextViewAttributes() | |
} | |
}); | |
RelativeLayout.LayoutParams layoutParams = | |
new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, |
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 java.util.*; | |
import java.io.*; | |
import java.security.*; | |
public class ChangePassword | |
{ | |
private final static JKS j = new JKS(); | |
public static void main(String[] args) throws Exception | |
{ |