This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <QApplication> | |
#include "mainwindow.h" | |
int main(int argc, char *argv[]) | |
{ | |
QApplication a(argc, argv); | |
MainWindow w; | |
w.show(); | |
return a.exec(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <cstdarg> | |
using namespace std; | |
double average (int num, ...) | |
{ | |
va_list arguments; | |
va_list arg2; | |
double sum = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* 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. | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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*&)’ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
struct linkedlist{ | |
int data; | |
linkedlist *link; | |
}; | |
main(){ | |
int info; | |
linkedlist *n[10], *ptr, *avail, *save, *loc; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
struct linkedlist{ | |
int data; | |
linkedlist *link; | |
linkedlist *prev; | |
}; | |
main(){ | |
linkedlist *first, *sec, *third, *fourth, *fifth, *ptr, *ele, *ptr1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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 |