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
/* | |
* Copyright (C) 2013 Tomáš Procházka | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
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
public class MainActivity extends AppCompatActivity { | |
public static class Shop { | |
public int id; | |
public String name; | |
public List<Coordinate> coordinates = new ArrayList<>(); | |
@Override | |
public String toString() { | |
String str = id + " (" + name + ") [ "; |
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
// Dagger 1 example | |
@Module( | |
complete = false, | |
library = true | |
) | |
public final class ApiModule { | |
@Provides | |
@Singleton | |
Retrofit provideRetrofit(Gson gson, Application app) { | |
return new Retrofit.Builder() |
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 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 | |
{ |
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
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 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 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 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 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> |
OlderNewer