Skip to content

Instantly share code, notes, and snippets.

View afzafri's full-sized avatar
🎯
Focusing

Afif Zafri afzafri

🎯
Focusing
View GitHub Profile
@afzafri
afzafri / deeplink.html
Created October 11, 2018 07:30
Tutorial on how to include deep linking to mobile app
@afzafri
afzafri / Display Android Progress Bar (loading spinner).md
Last active September 16, 2018 04:22
Show simple progress bar (circular spinner) for Android App activity

XML codes for Layout file

  • First, include these codes to your activity layout XML file.
  • FrameLayout is used as it can be on top (overlay) other layout components.
  • The background of the FrameLayout is set to Android default background color. You can change it to any color you want, or even transparent.
  • Progress bar (circular spinner) is for showing the animation. Layout gravity set to center to make it center on the page.
<FrameLayout
    android:id="@+id/loadingFrame"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
@afzafri
afzafri / WebAppFiles.md
Last active February 21, 2019 01:14
List of Web App related plugins and libraries that I have used. Save for future use
@afzafri
afzafri / TutorialsByAfif.md
Last active February 8, 2018 18:40
List of tutorials that I have done
@afzafri
afzafri / confirmReqFB.js
Created January 1, 2018 17:39
Auto confirm and delete Facebook friends request script 2018
/*
Usage:
Open this page: https://www.facebook.com/friends/requests/
Open console (F12), copy and paste the script and enter
*/
var butArea = document.getElementsByClassName("ruResponseButtons");
for(i=0;i<butArea.length;i++)
{
var confirmBut = butArea[i].getElementsByTagName("button")[0];
confirmBut.click();
@afzafri
afzafri / ilearnBulkFileDL.js
Last active December 25, 2017 14:53
i-Learn Bulk Files Downloader
// i-Learn Bulk Files Downloader
// Usage: copy the scripts, go to the files directory page, press F12 (open console), paste the code and enter
console.log("i-Learn Bulk Files Downloader - Afif Zafri");
var tr = document.getElementsByTagName("tr");
for(i=2;i<tr.length-1;i++)
{
var td = tr[i].getElementsByTagName("td")[5];
var url = td.getElementsByTagName("a")[0]['href'];
window.open(url, '_blank');
@afzafri
afzafri / autoEntranceExitSurvey.js
Last active March 10, 2018 14:00
Latest i-learn v3.0 UiTM Entrance and Exit Survey autofill form
// Entrance Exit survey autofill form script
// Usage: copy the scripts, go to the Entrance/Exit page, press F12 (open console), paste the code and enter
console.log("Entrance Exit survey autofill form script - Afif Zafri");
var msg = "Choose option: \n" +
"(1) - Entrance Survey \n" +
"(2) - Exit Survey \n";
var opt = prompt(msg);
@afzafri
afzafri / autoSuFO.js
Last active December 25, 2017 14:54
Latest i-learn v3.0 UiTM SuFO autofill form
// SuFO autofill form script
// Usage: copy the scripts, go to the SuFO page, press F12 (open console), paste the code and enter
console.log("SuFO autofill form script - Afif Zafri");
// loop all 24 questions
for(y=0; y<24; y++)
{
// get all radios
var questionNo = document.getElementsByName('data[AnalyticSufo][answer'+y+']');
@afzafri
afzafri / RDP.java
Created December 3, 2017 15:57
Recursive Descent Parser for LL(1) Grammar. A mini project for my course, CSC569 Principles of Compiler. This codes are taken from the text book, but we modified the Grammar Rules according to the questions given.
import java.io.* ;
import java.util.* ;
class RDP // Recursive Decent Parser
{
char inp;
public static void main(String[] args) throws IOException
{
System.out.print("Please enter an input string : ");
InputStreamReader stdin = new InputStreamReader(System. in );