Skip to content

Instantly share code, notes, and snippets.

View iahmadgad's full-sized avatar
🔻
Stands with Ghaza

Ahmad Asaad iahmadgad

🔻
Stands with Ghaza
View GitHub Profile
@agnostic-apollo
agnostic-apollo / Android-Phantom,Cached-And-Empty-Processes.md
Last active June 19, 2024 23:49
Android Phantom, Cached And Empty Processes
@nicknapoli82
nicknapoli82 / cs50_Tideman_cycle-explanation.md
Last active July 3, 2024 20:50
My attempt at clarifying how cycles work for the Tideman algorithm

A Way to Look at Tideman Lock Pairs

I've observed that there is a little bit of a disconnect in understanding what it is that needs to be done to properly implement the lock_pairs function for cs50 Tideman. The goal of this little write-up is simply an attempt at explaining what the problem actually is, and why a cycle imposes a problem.

First:
If you are unfamiliar with the actual problem, or have not read through the entire cs50 Tideman problem description. Then I think you should start there.
cs50 Tideman

Second:
This little write-up is only narrowing in on the idea of cycles, and a way to think about what a cycle is and determine if locking a pair in the pairs array would create that cycle. This does not talk about any other part of the Tideman problem.

@Einstrasse
Einstrasse / bits-stdc++.h
Created December 3, 2019 14:52
bits/stdc++.h header file
// C++ includes used for precompiling -*- C++ -*-
// Copyright (C) 2003-2015 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
@GabrielMMelo
GabrielMMelo / sudo-termux
Created January 22, 2019 12:33
Install sudo in Termux (Android)
apt install git
git clone https://gitlab.com/st42/termux-sudo
cd termux-sudo
cat sudo > /data/data/com.termux/files/usr/bin/sudo
chmod 700 /data/data/com.termux/files/usr/bin/sudo
@fnky
fnky / ANSI.md
Last active July 8, 2024 17:33
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@VirajKanse
VirajKanse / gist:1c0db872cd7685632c02f8826397f190
Last active June 21, 2024 04:16
GCC / Clang C/C++ Compiler On Android Using Termux (Linux Environment)
Install Termux App.
type "apt update"
Then We have to install a text editor to write our code so type "apt install vim" for vim text editor
or u can also use nano text editor for nano type "apt install nano"
Now Clang Installation type "apt install clang" and wait for download completes.
now to create a file simply type vim filename.c or .cpp or nano filename.c or cpp
then u will able to write ur code .
write.....to save ur code simply press esc then type ":wq"
now code is ready to compile
type "clang filename.c -o filename"
@parmentf
parmentf / GitCommitEmoji.md
Last active July 8, 2024 18:07
Git Commit message Emoji
@nalin-adh
nalin-adh / SwapCharacter.cpp
Created November 10, 2015 16:49
A C++ program to swap two character data using function.
#include<iostream>
#include<conio.h>
using namespace std;
void swap(char &,char &);
int main(){
char ch1,ch2;
cout<<"Enter first character = ";cin>>ch1;
@danleyb2
danleyb2 / MultiOperatorsCalc.java
Last active June 18, 2023 14:04
Multiple operators in a single string calculator in java
package com.company;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* Logic 1
*
@simhanature
simhanature / SortUsingDifferentArray
Created December 9, 2014 07:06
Sort an array based on another array
import java.util.Arrays;
import java.util.Comparator;
public class TestSort {
private static void printTable(String caption, Integer[] orderArray,
Integer[] arrayToBeSorted, Integer[] sortOrder){
System.out.println(caption+
"\nNo Num Color"+
"\n----------------");