-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
phillf
committed
May 12, 2012
1 parent
94d92a9
commit a2e4ad6
Showing
15 changed files
with
431 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/nbproject/private/ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
#!/bin/bash -x | ||
|
||
# | ||
# Generated - do not edit! | ||
# | ||
|
||
# Macros | ||
TOP=`pwd` | ||
CND_PLATFORM=GNU-MacOSX | ||
CND_CONF=Default | ||
CND_DISTDIR=dist | ||
CND_BUILDDIR=build | ||
NBTMPDIR=${CND_BUILDDIR}/${CND_CONF}/${CND_PLATFORM}/tmp-packaging | ||
TMPDIRNAME=tmp-packaging | ||
OUTPUT_PATH=MissingOutputInProject | ||
OUTPUT_BASENAME=MissingOutputInProject | ||
PACKAGE_TOP_DIR=areacalc/ | ||
|
||
# Functions | ||
function checkReturnCode | ||
{ | ||
rc=$? | ||
if [ $rc != 0 ] | ||
then | ||
exit $rc | ||
fi | ||
} | ||
function makeDirectory | ||
# $1 directory path | ||
# $2 permission (optional) | ||
{ | ||
mkdir -p "$1" | ||
checkReturnCode | ||
if [ "$2" != "" ] | ||
then | ||
chmod $2 "$1" | ||
checkReturnCode | ||
fi | ||
} | ||
function copyFileToTmpDir | ||
# $1 from-file path | ||
# $2 to-file path | ||
# $3 permission | ||
{ | ||
cp "$1" "$2" | ||
checkReturnCode | ||
if [ "$3" != "" ] | ||
then | ||
chmod $3 "$2" | ||
checkReturnCode | ||
fi | ||
} | ||
|
||
# Setup | ||
cd "${TOP}" | ||
mkdir -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package | ||
rm -rf ${NBTMPDIR} | ||
mkdir -p ${NBTMPDIR} | ||
|
||
# Copy files and create directories and links | ||
cd "${TOP}" | ||
makeDirectory "${NBTMPDIR}/areacalc" | ||
copyFileToTmpDir "${OUTPUT_PATH}" "${NBTMPDIR}/${PACKAGE_TOP_DIR}bin/${OUTPUT_BASENAME}" 0755 | ||
|
||
|
||
# Generate tar file | ||
cd "${TOP}" | ||
rm -f ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/areacalc.tar | ||
cd ${NBTMPDIR} | ||
tar -vcf ../../../../${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/areacalc.tar * | ||
checkReturnCode | ||
|
||
# Cleanup | ||
cd "${TOP}" | ||
rm -rf ${NBTMPDIR} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<configurationDescriptor version="80"> | ||
<logicalFolder name="root" displayName="root" projectFiles="true" kind="ROOT"> | ||
<df name="areacalc" root="."> | ||
<df name="bin"> | ||
</df> | ||
<df name="src"> | ||
</df> | ||
<in>areacalc.cpp</in> | ||
</df> | ||
<logicalFolder name="ExternalFiles" | ||
displayName="Important Files" | ||
projectFiles="false" | ||
kind="IMPORTANT_FILES_FOLDER"> | ||
<itemPath>src/Makefile</itemPath> | ||
</logicalFolder> | ||
</logicalFolder> | ||
<sourceFolderFilter>^(nbproject)$</sourceFolderFilter> | ||
<sourceRootList> | ||
<Elem>.</Elem> | ||
</sourceRootList> | ||
<projectmakefile>src/Makefile</projectmakefile> | ||
<confs> | ||
<conf name="Default" type="0"> | ||
<toolsSet> | ||
<remote-sources-mode>LOCAL_SOURCES</remote-sources-mode> | ||
<compilerSet>default</compilerSet> | ||
</toolsSet> | ||
<makefileType> | ||
<makeTool> | ||
<buildCommandWorkingDir>src</buildCommandWorkingDir> | ||
<buildCommand>${MAKE} -f Makefile</buildCommand> | ||
<cleanCommand>${MAKE} -f Makefile clean</cleanCommand> | ||
<executablePath></executablePath> | ||
</makeTool> | ||
</makefileType> | ||
</conf> | ||
</confs> | ||
</configurationDescriptor> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://www.netbeans.org/ns/project/1"> | ||
<type>org.netbeans.modules.cnd.makeproject</type> | ||
<configuration> | ||
<data xmlns="http://www.netbeans.org/ns/make-project/1"> | ||
<name>areacalc</name> | ||
<c-extensions/> | ||
<cpp-extensions>cpp</cpp-extensions> | ||
<header-extensions/> | ||
<sourceEncoding>UTF-8</sourceEncoding> | ||
<make-dep-projects/> | ||
<sourceRootList> | ||
<sourceRootElem>.</sourceRootElem> | ||
</sourceRootList> | ||
<confList> | ||
<confElem> | ||
<name>Default</name> | ||
<type>0</type> | ||
</confElem> | ||
</confList> | ||
</data> | ||
</configuration> | ||
</project> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
all: | ||
g++ main.cpp -o ../bin/areacalc |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/* | ||
* File: areacalc.cpp | ||
* Author: Phill Fernandes <pfernandes@techweekmedia.com> | ||
* | ||
* Created on May 11, 2012, 9:43 PM | ||
*/ | ||
#include "header.h" | ||
#include "calculations.h" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/* | ||
* calculations.h | ||
* dev-xcode | ||
* | ||
* Created by Phillip Fernandes on 11/11/10. | ||
* Copyright 2010 TechWeek Media, Inc. All rights reserved. | ||
* | ||
* | ||
* This file includes all the shape calculation header files. | ||
* | ||
*/ | ||
|
||
#include "square.h" | ||
#include "rectangle.h" | ||
#include "triangle.h" | ||
#include "paralellogram.h" | ||
#include "rhombus.h" | ||
#include "trapezoid.h" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/bash | ||
clear | ||
echo "Compiling main.cpp" | ||
g++ *.cpp -c | ||
echo " " | ||
echo "Linking Libraries" | ||
g++ *.o -ldl -lpthread -o a2manager | ||
echo " " | ||
echo "Cleaning Up" | ||
rm usefulFuncs.o vhostMgmt.o specialDeployments.o main.o startStop.o | ||
echo " " | ||
echo "DONE" | ||
echo " " | ||
sleep 3 | ||
clear |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/* | ||
* header.h | ||
* dev-xcode | ||
* | ||
* Created by Phillip Fernandes on 11/19/10. | ||
* Copyright 2010 TechWeek Media, Inc. All rights reserved. | ||
* | ||
*/ | ||
//#include "GfdOogleTech.h" | ||
#include<iostream> | ||
using namespace std | ||
|
||
int header() | ||
{ | ||
cout << "Area Calculator" << endl << endl; | ||
|
||
return 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
* paralellogram.h | ||
* dev-xcode | ||
* | ||
* Created by Phillip Fernandes on 11/11/10. | ||
* Copyright 2010 TechWeek Media, Inc. All rights reserved. | ||
* | ||
*/ | ||
|
||
int paralellogram() | ||
{ | ||
|
||
system(clearcommand); | ||
header(); | ||
|
||
double base; | ||
double height; | ||
double area; | ||
|
||
cout << "Base: "; | ||
getnum(base, ;); | ||
|
||
cout << "Height: "; | ||
getnum(height, ;); | ||
|
||
area = base * height; | ||
|
||
cout << "Work: " << base << " * " << height << " = " << area << endl; | ||
cout << "Final " << area << endl; | ||
|
||
system(sleepcommand); | ||
|
||
system(clearcommand); | ||
|
||
return 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
* rectangle.h | ||
* dev-xcode | ||
* | ||
* Created by Phillip Fernandes on 11/11/10. | ||
* Copyright 2010 TechWeek Media, Inc. All rights reserved. | ||
* | ||
*/ | ||
|
||
int rectangle() | ||
{ | ||
|
||
system(clearcommand); | ||
header(); | ||
|
||
double base; | ||
double height; | ||
double area; | ||
|
||
cout << "Base: "; | ||
getnum(base, ;); | ||
|
||
cout << "Height: "; | ||
getnum(height, ;); | ||
|
||
area = base * height; | ||
|
||
cout << "Work: " << base << " * " << height << " = " << area << endl; | ||
cout << "Final " << area << endl; | ||
|
||
system(sleepcommand); | ||
|
||
system(clearcommand); | ||
|
||
return 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
* rhombus.h | ||
* dev-xcode | ||
* | ||
* Created by Phillip Fernandes on 11/11/10. | ||
* Copyright 2010 TechWeek Media, Inc. All rights reserved. | ||
* | ||
*/ | ||
|
||
int rhombus() | ||
{ | ||
|
||
system(clearcommand); | ||
header(); | ||
|
||
double d1; | ||
double d2; | ||
double area; | ||
|
||
cout << "Diagonal 1: "; | ||
getnum(d1, ;); | ||
|
||
cout << "Diagonal 1: "; | ||
getnum(d2, ;); | ||
|
||
area = d1 * d2; | ||
|
||
cout << "Work: " << d1 << " * " << d2 << " = " << area << endl; | ||
cout << "Final " << area << endl; | ||
|
||
system(sleepcommand); | ||
|
||
system(clearcommand); | ||
|
||
return 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
* square.h | ||
* dev-xcode | ||
* | ||
* Created by Phillip Fernandes on 11/11/10. | ||
* Copyright 2010 TechWeek Media, Inc. All rights reserved. | ||
* | ||
*/ | ||
|
||
int square() | ||
{ | ||
|
||
system(clearcommand); | ||
header(); | ||
|
||
double base; | ||
double height; | ||
double area; | ||
|
||
cout << "Base: "; | ||
getnum(base, ;); | ||
|
||
cout << "Height: "; | ||
getnum(height, ;); | ||
|
||
area = base * height; | ||
|
||
cout << "Work: " << base << " * " << height << " = " << area << endl; | ||
cout << "Final " << area << endl; | ||
|
||
system(sleepcommand); | ||
|
||
system(clearcommand); | ||
|
||
return 0; | ||
} |
Oops, something went wrong.