Skip to content

Instantly share code, notes, and snippets.

View ForgottenProgramme's full-sized avatar

Mahe Iram Khan ForgottenProgramme

View GitHub Profile
//JAVA CODE TO FIND THE LONGEST COMMON SUBSEQUENCE
//MAHE IRAM KHAN
//18COB058
public class LongestCommonSubsequence {
int lcs(char[] X, char[] Y, int p, int q)
{
if (p == 0 || q == 0)
return 0;
if (X[p - 1] == Y[q - 1])
#!/usr/bin/env python
import sys
from datetime import datetime
HELP_MESSAGE = '''Usage :-
$ ./todo add "todo item" # Add a new todo
$ ./todo ls # Show remaining todos
$ ./todo del NUMBER # Delete a todo
$ ./todo done NUMBER # Complete a todo
$ ./todo help # Show usage
$ ./todo report # Statistics'''
/*
Sample JS implementation of Todo CLI that you can attempt to port:
https://gist.github.com/jasim/99c7b54431c64c0502cfe6f677512a87
*/
/* Returns date with the format: 2021-02-04 */
let getToday: unit => string = %raw(`
function() {
let date = new Date();
return new Date(date.getTime() - (date.getTimezoneOffset() * 60000))
function Square(props) {
return (
<button className="square" onClick={props.onClick}>
{props.value}
</button>
);
}
class Board extends React.Component {
renderSquare(i) {
/*
Sample JS implementation of Todo CLI that you can attempt to port:
https://gist.github.com/jasim/99c7b54431c64c0502cfe6f677512a87
*/
/* Returns date with the format: 2021-02-04 */
let getToday: unit => string = %raw(`
function() {
let date = new Date();
return new Date(date.getTime() - (date.getTimezoneOffset() * 60000))
@ForgottenProgramme
ForgottenProgramme / bezier.py
Created March 24, 2021 08:32
Code for plotting Bezier curve [ Mahe Iram Khan ]
import tkinter as tk
from tkinter import *
import math
import numpy as np
import time
lines = []
a = []
const1 = 1000
// Mahe Iram Khan
// 18 COB 058
// GI 2028
// Cousins of a node in a given binary tree
// Cousins are defined as children of a sibling node
#include <bits/stdc++.h>
using namespace std;
// Node struct
// Mahe Iram Khan
// 18 COB 058
// GI 2028
// Cousins of a node in a given binary tree
// Cousins are defined as children of a sibling node
#include <bits/stdc++.h>
using namespace std;
// Node struct
#!/usr/bin/env python
import sys
from datetime import datetime
HELP_MESSAGE = """/
Usage :-
$ ./todo add "todo item" # Add a new todo
$ ./todo ls # Show remaining todos
$ ./todo del NUMBER # Delete a todo
$ ./todo done NUMBER # Complete a todo
$ ./todo help # Show usage
@ForgottenProgramme
ForgottenProgramme / todo.py
Created June 26, 2021 08:09
Todo Manager CLI tool (Python) Mahe Iram Khan
#!/usr/bin/env python
import sys
from datetime import datetime
HELP_MESSAGE = """/
Usage :-
$ ./todo add "todo item" # Add a new todo
$ ./todo ls # Show remaining todos
$ ./todo del NUMBER # Delete a todo
$ ./todo done NUMBER # Complete a todo
$ ./todo help # Show usage