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
interface UserReference { | |
void dispatchBehavior(@NonNull UserBehavior behavior); | |
} | |
class AnonymousUserReference implements UserReference { | |
@Override | |
public void dispatchBehavior(@NonNull UserBehavior behavior) { | |
behavior.onAnonymous(this); | |
} | |
} |
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
enum UserType { | |
ANONYMOUS, | |
REGULAR, | |
PREMIUM | |
} | |
class MyActivity extends Activity { | |
@Inject | |
CurrentUserProvider _userProvider; | |
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
package pl.brightinventions.samples; | |
import android.content.Context; | |
import android.content.SharedPreferences; | |
import javax.inject.Singleton; | |
public interface CurrentUserProvider { | |
boolean isLoggedIn(); | |
CurrentUser getCurrentUser(); |
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(MyApplication.getCurrentUser() != null){ | |
userInfoStatus.setText(MyApplication.getCurrentUser().getFirstName()); | |
} |
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
button, input, a { | |
&:disabled:not([title=""]) { | |
pointer-events: inherit; | |
} | |
} |
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 android.content.Context; | |
import android.graphics.Bitmap; | |
import android.graphics.BitmapFactory; | |
import android.graphics.drawable.BitmapDrawable; | |
import android.graphics.drawable.Drawable; | |
import android.os.Handler; | |
import android.util.AttributeSet; | |
import android.util.Log; | |
import android.view.ViewGroup; | |
import android.widget.FrameLayout; |
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
template <class T> | |
class Lista { | |
unsigned int rozmiarTablicy; | |
unsigned int liczbaElementow; | |
T* elementy; | |
public: | |
Lista() { | |
elementy = new T[1]; | |
rozmiarTablicy = 1; |
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
/play-services/3.1.36/play-services-3.1.36.aar | |
Read in 5931 method IDs. | |
<root>: 5931 | |
: 1 | |
android: 374 | |
accounts: 2 | |
app: 33 | |
content: 77 | |
pm: 5 | |
res: 14 |
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
select count(ja.id), elem.value::varchar from | |
json_answer ja, | |
json_array_elements(ja.answer) as elem | |
group by elem.value::varchar |
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 android.content.Context; | |
import android.view.View; | |
import android.view.inputmethod.InputMethodManager; | |
import android.widget.EditText; | |
public class KeyboardManagingFocusListener implements View.OnFocusChangeListener { | |
private final EditText editText; |