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_identifier": "levinyonatan", | |
"profile_pic_url": "https://miro.medium.com/v2/resize:fit:2400/1*x9Kj4IcodThKIKw249Rjtg.jpeg", | |
"background_cover_image_url": "https://s3.us-west-000.backblazeb2.com/proxycurl/person/levinyonatan/cover?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=0004d7f56a0400b0000000001%2F20230605%2Fus-west-000%2Fs3%2Faws4_request&X-Amz-Date=20230605T074014Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=83f8feb228ee767a694c71180d9f4ad5abb62b8775ca5c8192326e32247dd6a6", | |
"first_name": "Yonatan (Yoni)", | |
"last_name": "Levin", | |
"full_name": "Yonatan (Yoni) Levin", | |
"follower_count": null, | |
"occupation": "R&D Team Leader at monday.com", | |
"headline": "Startups person. Community leader. Doer. \\nLove to take things from 0 to 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
{ | |
"public_identifier": "levinyonatan", | |
"profile_pic_url": "https://miro.medium.com/v2/resize:fit:2400/1*x9Kj4IcodThKIKw249Rjtg.jpeg", | |
"background_cover_image_url": "https://s3.us-west-000.backblazeb2.com/proxycurl/person/levinyonatan/cover?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=0004d7f56a0400b0000000001%2F20230607%2Fus-west-000%2Fs3%2Faws4_request&X-Amz-Date=20230607T062927Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=9da9c62061281e41113414b8375d9e3ae1b9d9a981231d87194555b43d4e0c0e", | |
"first_name": "Yonatan (Yoni)", | |
"last_name": "Levin", | |
"full_name": "Yonatan (Yoni) Levin", | |
"follower_count": null, | |
"occupation": "R&D Team Leader at monday.com", | |
"headline": "Startups person. Community leader. Doer. \nLove to take things from 0 to 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
class CDataStream<T>( | |
private val taskRunner: ITaskRunner | |
) : IDataStream<T> { | |
private val channel = BroadcastChannel<T>(Channel.CONFLATED) | |
private var value: T? = null | |
override fun observe(observer: (T) -> Unit): IObservationManager { | |
val subscription = channel.openSubscription() | |
this.value?.let(observer) |
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 implements MainActivityView { | |
@BindView(R.id.lv_am_movie_list) ListView listView; | |
@BindView(R.id.pb_am_loading) ProgressBar progressBar; | |
public static MainPresenter mainPresenter; | |
@Override protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main); |
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
@Module public class AppModule { | |
private Application application; | |
public AppModule(Application application) { | |
this.application = application; | |
} | |
@Provides @Singleton Context providesAppContext() { | |
return application.getApplicationContext(); |
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 NewOrderPresenter extends BasePresenter<NewOrderView> { | |
//... | |
private int insertOrder(Order order) { | |
//turn order to ContentValues object (used by SQL to insert values to Table) | |
ContentValues values = order.createLocalOrder(order); | |
//call resolver to insert data to the Order table | |
Uri uri = context.getContentResolver().insert(KolGeneContract.OrderEntry.CONTENT_URI, values); | |
//get Id for order. | |
if (uri != null) { |
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 com.squareup.leakcanary.AnalysisResult; | |
import com.squareup.leakcanary.DisplayLeakService; | |
import com.squareup.leakcanary.HeapDump; | |
import android.util.Log; | |
import okhttp3.MediaType; | |
import okhttp3.MultipartBody; | |
import okhttp3.RequestBody; | |
import retrofit2.Call; |
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 BackgroundService extends Service { | |
@Override public int onStartCommand(Intent intent, int i, int i1) { | |
if (observer == null) { | |
observer = new OrdersObserver(new Handler()); | |
getContext().getContentResolver() | |
.registerContentObserver(KolGeneContract.OrderEntry.CONTENT_URI, true, observer); | |
} | |
} | |
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 SendOrderService extends IntentService { | |
@Override protected void onHandleIntent(Intent intent) { | |
int orderId = intent.getIntExtra(ORDER_ID, 0); | |
if (orderId == 0 || orderId == -1) { | |
return; | |
} | |
Cursor c = null; | |
try { |
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 SyncOrderService extends GcmTaskService { | |
//... | |
public static void scheduleOrderSending(Context context, int id) { | |
GcmNetworkManager manager = GcmNetworkManager.getInstance(context); | |
Bundle bundle = new Bundle(); | |
bundle.putInt(SyncOrderService.ORDER_ID, id); | |
OneoffTask task = new OneoffTask.Builder().setService(SyncOrderService.class) | |
.setTag(SyncOrderService.getTaskTag(id)) | |
.setExecutionWindow(0L, 30L) | |
.setExtras(bundle) |
NewerOlder