Skip to content

Instantly share code, notes, and snippets.

View abdalimran's full-sized avatar
💻
Focusing

Abdullah Al Imran abdalimran

💻
Focusing
View GitHub Profile
import javax.swing.JOptionPane;
public class NotifyEvent
{
NotifyEvent(String msg)
{
JOptionPane.showMessageDialog(null,msg,
"Event Notification",
JOptionPane.PLAIN_MESSAGE);
}
import java.util.Date;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
public class ThreadEvents implements Runnable
{
final long timeInterval = 60*1000;
private Thread theThread;
@abdalimran
abdalimran / github.css
Created December 15, 2016 16:09 — forked from theconektd/github.css
Github Markdown CSS - for Markdown Editor Preview
body {
font-family: Helvetica, arial, sans-serif;
font-size: 14px;
line-height: 1.6;
padding-top: 10px;
padding-bottom: 10px;
background-color: white;
padding: 30px; }
body > *:first-child {
library(rgeolocate)
setwd("/home/imran/Documents/")
ipdf <- read.csv("IP_Address.csv")
ipmmdb <- system.file("extdata","GeoLite2-Country.mmdb", package = "rgeolocate")
results <- maxmind(ipdf$IP.Address, ipmmdb,"country_name")
export.results <- data.frame(ipdf$IP.Address, results$country_name)
colnames(export.results) <- c("IP Address", "Country")
library(XML)
#Import your list of IPs
ip.addresses <- read.csv("ip-address.csv")
#This is my API
api.url <- "http://freegeoip.net/xml/"
#Appending API URL before each of the IPs
api.with.ip <- paste(api.url, ip.addresses$IP.Addresses ,sep="")
/* Bismillah hir rahmanir raheem. Thanks to Allah for everything.
Coder: Abdullah Al Imran
Email: abdalimran@gmail.com */
#include<bits/stdc++.h>
using namespace std;
int extendedEuclid(int a, int b, int &x, int &y)
{
/* Bismillah hir rahmanir raheem. Thanks to Allah for everything.
Coder: Abdullah Al Imran
Email: abdalimran@gmail.com */
#include<bits/stdc++.h>
using namespace std;
typedef pair <int,int> pii;
/* Bismillah hir rahmanir raheem. Thanks to Allah for everything.
Coder: Abdullah Al Imran
Email: abdalimran@gmail.com */
#include<bits/stdc++.h>
using namespace std;
int josephus(int n, int k)
{
/* Bismillah hir rahmanir raheem. Thanks to Allah for everything.
Coder: Abdullah Al Imran
Email: abdalimran@gmail.com */
#include<bits/stdc++.h>
using namespace std;
//Normal Algorithm
int lcm(int a, int b)
/* Bismillah hir rahmanir raheem. Thanks to Allah for everything.
Coder: Abdullah Al Imran
Email: abdalimran@gmail.com */
#include<bits/stdc++.h>
using namespace std;
//Recursively
int gcd(int a, int b)