Skip to content

Instantly share code, notes, and snippets.

View shaina7837's full-sized avatar

Shaina Sabarwal shaina7837

View GitHub Profile
#include <QApplication>
#include "mainwindow.h"
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
MainWindow w;
w.show();
return a.exec();
#include <iostream>
#include <cstdarg>
using namespace std;
double average (int num, ...)
{
va_list arguments;
va_list arg2;
double sum = 0;
/*
* OpenSCAD (www.openscad.org)
* Copyright (C) 2009-2011 Clifford Wolf <clifford@clifford.at> and
* Marius Kintel <marius@kintel.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
src/mainwin.cc: In constructor ‘MainWindow::MainWindow(const QString&)’:
src/mainwin.cc:167:83: error: no matching function for call to ‘LegacyEditor::LegacyEditor()’
src/mainwin.cc:167:83: note: candidates are:
src/legacyeditor.h:17:2: note: LegacyEditor::LegacyEditor(QWidget*)
src/legacyeditor.h:17:2: note: candidate expects 1 argument, 0 provided
src/legacyeditor.h:13:7: note: LegacyEditor::LegacyEditor(const LegacyEditor&)
src/legacyeditor.h:13:7: note: candidate expects 1 argument, 0 provided
src/mainwin.cc:170:44: error: no match for call to ‘(LegacyEditor) (QWidget*&)’
module example001()
{
function r_from_dia(d) = d / 2;
module rotcy(rot, r, h) {
rotate(90, rot)
cylinder(r = r, h = h, center = true);
}
difference() {
/* MERGE SORT */
#include <iostream>
#include <vector>
using namespace std;
void mergepass (vector<int> &a, int low, int mid, int high)
{
vector<int> b(20);
int h = low, i = low, j = mid+1, k;
@shaina7837
shaina7837 / quicksort.cpp
Created November 24, 2013 06:36
quick sort
/* QUICK SORT */
#include <iostream>
#include <vector>
using namespace std;
void quick(vector<int> a, int n, int beg, int end)
{
int left, right, loc = beg;
while(left != right){
#include <iostream>
using namespace std;
struct linkedlist{
int data;
linkedlist *link;
};
main(){
int info;
linkedlist *n[10], *ptr, *avail, *save, *loc;
#include <iostream>
using namespace std;
struct linkedlist{
int data;
linkedlist *link;
linkedlist *prev;
};
main(){
linkedlist *first, *sec, *third, *fourth, *fifth, *ptr, *ele, *ptr1;
#include <GL/glut.h>
#include <cmath>
void line(float x, float y)
{
glClearColor(1.0, 1.0, 1.0, 1.0); //defining for background color
glClear(GL_COLOR_BUFFER_BIT); //assigning the defined color to background
glColor3f(0.0, 0.0, 0.0); // color of the object to be displayed
glOrtho(-1.0, 1.0, -1.0, 1.0, -1.0, 1.0);//representing the real world dimensions in 2D screen and defining the coordinate limits
glPointSize(2);
glBegin(GL_LINES); //start drawing polygon