Skip to content

Instantly share code, notes, and snippets.

View mirjalal's full-sized avatar
👨‍💻
Composing

Mirjalal mirjalal

👨‍💻
Composing
View GitHub Profile
@Robogeek95
Robogeek95 / scheduling.md
Created December 15, 2020 09:15
Ayomide algorithm

1. FCFS CPU SCHEDULING ALGORITHM

For FCFS scheduling algorithm, read the number of processes/jobs in the system, their CPU burst times. The scheduling is performed on the basis of arrival time of the processes irrespective of their other parameters. Each process will be executed according to its arrival time. Calculate the waiting time and turnaround time of each of the processes accordingly.

Algorithm:

#include<stdio.h>

// #include<conio.h>
@mrk-han
mrk-han / emulator-install-using-avdmanager.md
Last active July 11, 2024 01:51
Installing and creating Emulators with AVDMANAGER (For Continuous Integration Server or Local Use)

Install and Create Emulators using AVDMANAGER and SDKMANAGER

TL;DR

For an emulator that mimics a Pixel 5 Device with Google APIs and ARM architecture (for an M1/M2 Macbook):

  1. List All System Images Available for Download: sdkmanager --list | grep system-images

  2. Download Image: sdkmanager --install "system-images;android-30;google_atd;arm64-v8a"

@xaverkapeller
xaverkapeller / SortedListAdapter.java
Last active November 16, 2020 05:33
Implementation of a RecyclverView Adapter base class which uses a SortedList internally
import android.content.Context;
import android.support.v7.util.SortedList;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
@cmriddle
cmriddle / CSS Only Box Breathing Visualizer.markdown
Created May 15, 2016 07:58
CSS Only Box Breathing Visualizer
@helderdarocha
helderdarocha / AnimatedLoaderComp.svg
Created May 9, 2016 16:11
SVG Loader Example 1 (using SMIL animations)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@arikw
arikw / main-lang-by-country.json
Created May 9, 2016 15:41
A single main language per country. Useful when a fallback language is needed for web visitors. The country can be extracted from their ip (e.g., using maxmind).
{
"af": {
"countryName": "Afghanistan",
"langName": "Pashto",
"countryCodes": {
"iso3166_1": "af",
"GEC": "af"
},
"langCodes": {
"iso639_1": "ps"
/**
* This evaluator can be used to perform type interpolation between integer
* values that represent ARGB colors.
* <p/>
* 2015/03/26 강성우 : ArgbEvaluator가 API 21이상 에서만 동작하기 때문에 따로 구현 하였음.
*/
public class ArgbEvaluatorCompat implements TypeEvaluator {
private static final ArgbEvaluatorCompat sInatance = new ArgbEvaluatorCompat();
/**
public class TextWatcherAdapter
implements TextWatcher {
private final EditText view;
private final TextWatcherListener listener;
public TextWatcherAdapter(EditText editText, TextWatcherListener listener) {
this.view = editText;
this.listener = listener;
}
public class ClearableEditText
extends EditText
implements View.OnTouchListener, View.OnFocusChangeListener, TextWatcherAdapter.TextWatcherListener {
public interface OnTextClearedListener {
void wasClearedText();
}
private Drawable drawables;
private OnTextClearedListener textClearedListener;
SELECT CAST(@TIME_PERIOD_START AS DATE) AS PERIOD_START,
CAST(@TIME_PERIOD_END AS DATE) AS PERIOD_END,
c.CLIENT_NAME,
p.GRP_ID,
COUNT(DISTINCT u.USR_ID) AS USER_COUNT,
COUNT(DISTINCT COALESCE(up.CHILD_ID, u.USR_ID)) AS STUDENT_COUNT
FROM CLIENTS c
INNER JOIN CLIENT_PACKAGES cp ON (c.CLIENT_ID = cp.CLIENT_ID)
INNER JOIN PACKAGES p ON (p.GRP_ID = cp.GRP_ID)
INNER JOIN GROUPS g ON (p.GRP_ID = g.GRP_ID)