This command is for Ubuntu based distros
sudo apt install aria2 youtube-dl
chmod +x [course_name].sh
[alias] | |
wip = for-each-ref --sort='authordate:iso8601' --format=' %(color:green)%(authordate:relative)%09%(color:white)%(refname:short)' refs/heads | |
class SampleValidator( | |
val balance: Long?, | |
val amount: Long?, | |
val acceptedTerms: Boolean? | |
) : Validator<SampleValidator> { | |
override fun validate(): Validation<SampleValidator> { | |
return when { | |
balance ?: 0 <= 0 -> Validation.Invalid("بالانس شما کافی نیست") | |
amount ?: 0 <= 0 -> Validation.Invalid("مبلغ وارد شده صحیح نیست") | |
amount ?: 0 > balance ?: 0 -> Validation.Invalid("مبلغ وارد شده بیشتر از بالانس شماست") |
private class HttpInterceptor implements Interceptor { | |
@Override | |
public Response intercept(Chain chain) throws IOException { | |
Request request = chain.request(); | |
//Build new request | |
Request.Builder builder = request.newBuilder(); | |
builder.header("Accept", "application/json"); //if necessary, say to consume JSON | |
public static class ExampleViewHolder extends RecyclerView.ViewHolder | |
implements View.OnClickListener { | |
private int originalHeight = 0; | |
private boolean isViewExpanded = false; | |
private YourCustomView yourCustomView | |
public ExampleViewHolder(View v) { | |
super(v); | |
v.setOnClickListener(this); |
public class DataBaseHelper extends SQLiteOpenHelper{ | |
//The Android's default system path of your application database. | |
//replace com.binarybricks.shippingwithsqllite with you Application package nae | |
//This should be same as which you used package section in your manifest | |
private static String DB_PATH = "/data/data/com.binarybricks.shippingwithsqllite/databases/"; | |
//replace this with name of your db file which you copied into asset folder | |
private static String DB_NAME = "dexterology"; | |
#region Using | |
using System; | |
using System.Security.Cryptography; | |
using System.Text; | |
#endregion | |
namespace YourApp.Security.Cryptography | |
{ |