Skip to content

Instantly share code, notes, and snippets.

View meldsza's full-sized avatar

Melroy Dsouza meldsza

View GitHub Profile
//LIANG BARKSY ALGORITHM
#include <GL/glut.h>
#include <stdio.h>
double xmin = 50, xmax = 100, ymin = 50, ymax = 100;
double r[4], p[4], q[4];
void init() {
glClearColor(0, 0, 0, 1);
#include <GL/glut.h>
#include <stdio.h>
#include <stdbool.h>
const int INSIDE = 0;
const int LEFT = 1;
const int RIGHT = 2;
const int BOTTOM = 4;
const int TOP = 8;
@meldsza
meldsza / Donation.sol
Last active October 12, 2020 13:54
Donation tracking system
// SPDX-License-Identifier: MIT
pragma solidity >=0.4.22 <0.7.0;
contract Donation {
uint public amount; // amount to be sent
address payable public reciever; // reciever to recieve the amount
address payable public donor; // donor to send the amount
enum State { Created, Completed }
State public state; // state of the transaction
@meldsza
meldsza / report
Last active August 16, 2020 17:48 — forked from rahulCSENITTE/report
report -- digilab
router.post('/upreport/:ReId', multer.single('reportfile'), async function (req, res, next) {
try{
if (!req.file) {
req.flash('error', "Report file not selected")
res.redirect('/hospital/report')
} else {
let doc = await db.collection("request").doc(req.params.ReId)
let mailOptions = {
from: '4nm17cs141@gmail.com',
to: doc.data().email,
@meldsza
meldsza / MercuryTest.java
Created March 11, 2020 04:19
ST LAB Part B Program 1 - 11/03/2020
import org.openqa.selenium.*;
import org.openqa.selenium.firefox.*;
import org.openqa.selenium.support.ui.*;
import org.testng.annotations.*;
/**
* Open http://172.16.2.90/Part_B1/Mercury_Tours_Demo.html and automate the following using annotations in TestNG framework with Selenium WebDriver.
* 1. Verify the title of the homepage
* 2. Click on REGISTER and verify the title of its target page
* 3. Go back to the homepage and verify if it still has the correct title
* 4. Click on SUPPORT and verify if it still has the correct title.
@meldsza
meldsza / anb.l
Last active March 10, 2020 09:48
CD LAB - 10/03/2020
%{
#include "y.tab.h"
%}
%%
[aA] {return A;}
[bB] {return B;}
\n {return NL;}
. {return yytext[0];}
%%
@meldsza
meldsza / delete_customer.html
Created February 26, 2020 05:28
Guru99 Demo popup.html and delete_customer.html
<html>
<!-- Mirrored from demo.guru99.com/test/delete_customer.php by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 26 Feb 2020 05:12:34 GMT -->
<!-- Added by HTTrack --><meta http-equiv="content-type" content="text/html;charset=UTF-8" /><!-- /Added by HTTrack -->
<head>
<meta name="robots" content="nofollow, noindex">
<title>Delete Customer</title>
@meldsza
meldsza / no_of_id.l
Created February 25, 2020 10:07
CD LAB 25-02-2020 no of id
%{
#include <stdio.h>
#include <stdlib.h>
int nc=0;
%}
%option noyywrap
%%
[a-zA-Z_][a-zA-Z_0-9]* {nc++;}
.|\n { }
%%
@meldsza
meldsza / id.l
Created February 25, 2020 09:49
CD LAB 25-02-2020
%{
#include "y.tab.h"
%}
%%
[0-9] {return DIGIT;}
[a-zA-Z] {return LETTER;}
[_] {return UND;}
\n {return NL;}
. {return yytext[0];}
@meldsza
meldsza / CTFResult.json
Created February 18, 2020 16:25
Ctf Result
{
"standings": [
{
"pos": 1,
"team": "skarface",
"score": 17860
},
{
"pos": 2,
"team": "BlyatMans",