Skip to content

Instantly share code, notes, and snippets.

View AjayKrP's full-sized avatar

Ajay Kumar AjayKrP

View GitHub Profile
%macro scall 4
mov rax, %1
mov rdi, %2
mov rsi, %3
mov rdx, %4
syscall
%endmacro
%macro exit 0
mov rax, 60
#include <cmath>
#include <iostream>
#include <GL/glut.h>
using namespace std;
GLint n; //2n is number of petals on the rose
// The purpose of myinit() is to set up the colors for the background
// and foreground and to initialize appropriate matrices.
void myinit(){
glClearColor (1.0, 1.0, 1.0, 1.0); //set the background color to white
glColor3f (0.0, 0.0, 0.0); //set the foreground color to black
%macro iomodule 4
mov rax, %1
mov rdi, %2
mov rsi, %3
mov rdx, %4
syscall
%endmacro
%macro myprintf 1
package Test;
import java.util.*;
public class Application {
private static ArrayList<String> bookList;
private static HashMap<Integer, String> studentList;
private static LinkedList<StudentList> studentDatabase;
private static PriorityQueue<String> waitingBooks;
private static Vector<Integer> countLoginedStudent;
private static Integer ID;
package CG;
import javax.swing.*;
import java.awt.*;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.image.BufferedImage;
import java.util.Stack;
public class Application extends JPanel implements MouseListener{
package Test;
import javax.swing.*;
import java.awt.*;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.image.BufferedImage;
import java.util.*;
public class Application extends JPanel implements MouseListener {
private static final int WIDTH = 720;
%macro iomodule 4
mov rax,%1
mov rdi,%2
mov rsi,%3
mov rdx,%4
syscall
%endmacro
Section .data
title: db 0x0A
#include<iostream>
#include<graphics.h>
#include<stdlib.h>
using namespace std;
struct edge
{
int x1,y1,x2,y2,flag;
};
#include<iostream>
#include<stdio.h>
#include<graphics.h>
using namespace std;
class pixel{
protected:
int x1,x2,y1,y2;
void accept();
};
#include<iostream>
#include<math.h>
#include<graphics.h>
#define ROUND(a)((int)(a+0.5))
using namespace std;
class ABC{
private:
int x1,y1,x2,y2,x3,y3,x4,y4;
public:
void accept();