My name is Dennis (Trey) Ivy, Jr. and I am a software developer and consultant. I firmly believe in hard work, honesty and perseverance. My current goal is to continually improve my skill set and find a position that will afford me opportunities for professional growth and financial stability. My long-term goal is to own a successful small business. To learn more about me, please visit my facebook profile and send me a friend request. Please feel free to reach out and call me for an interview. You may also click on the infographic for a summary of the results from an online personality profile test taken at talentoday.com. I scored as assertive, outgoing, determined and proactive.
I believe education is a life-long endeavor. I learn best from reading, practice and self-study, but I appreciate a good teacher. I enjoy learning anything new and I always excel in my academic pursuits.
My primary specialty is getting computer systems to talk to each other. Keeping enterprise applications and systems in sync with both internal tools and external vendor systems is no small task, especially on large scale implementations. As integrations evolve from periodic batch process flat files to real time transactional syncs performed via Rest API calls the landscape and range of possible data interchange methodologies and architectures continues to expand. Today's companies demand more robust solutions and flexibility that allow them to leverage legacy talent, stay competitive in a fast paced international business landscape and reduce overhead. As an experienced integrations architect, I help guide approaches, recommend industry best practices and troubleshoot performance bottlenecks to keep clients innovative and connected with their partners and service providers.
Data in transit is at its most vulnerable. Understanding and leveraging the latest encryption tools and protecting personal data is no longer optional, its essential. Designing and configuring access policies and working to refine corporate security governance standards and protocols is all part of an effective and secure integrations architecture. I work with companies of all sizes and levels of sophistication spanning across multiple industries in both the public and private sectors to design safe transmission system that minimize risk and adhere to industry leading best practices.
I have a solid grasp of object oriented programming. I'm well-versed in strongly-typed and interpreted c-based languages including C#, Java, python, etc. I try to stay current with all the pertinent libraries and plugins so I can increase productivity and speed up the development process. I truly enjoy learning about design patterns and algorithms and I'm (somewhat) active on programming challenge sites such as Hackerank and TopCoder, etc. I like solving complicated programming problems and learning about new and interesting ways to reduce asymptotic complexity and improve run-time. Feel free to browse my hackerrank profile , check out my github , or jump to code samples .
I'm also experienced in web development and design. Most recently, I've worked with the .NET core platform but in the past I've used web forms and ASP.NET MVC as well as WebForm/MVC hybrids using ORMs such as hibernate and Entity. I've also done a lot of experimentation and programming in the LAMP stack (Linux, Apache, MySQL, PHP) I have extensive experience with SOAP and REST web services and APIs such as google, facebook, ebay, etc. I also know JSON, XML, XSLT, etc. Please visit some of the sites I'm currenrly developeing to learn more.
I have excellent leadership skills and know how to motivate people. In the military I served as a squad leader and platoon leader. I also had my own personal training business for two years and I got daily practice leading both small and medium sized groups, as well as individuals. Additionally, I've managed and supervised employees, subcontractors, laborers and peers. I'm comfortable serving in a leadership role and equally comfortable following orders.
I have good project management skills and experience across a wide array of industries leading everything from large and medium enterprise integrations implementations to cellular network tower installations and buildouts. I am organized, diligent and communicative and bring projects in on time and under budget with a high rate of customer satisfaction in a demanding and competitive industry. I know that documentation in all phases of the project management process is key and I strive to always be available for my clients. I hate the idea that something is 'not my job' or cannot be done and I work with stakeholders and team members to find solutions and workarounds.
2018 - Present |
IBM |
Armonk, NY |
Coordinate with clients, third-party vendors, workday and internal team members to establish timelines, identify deliverables, design and build solutions, provide production support, etc.
Bring projects in on time and under budge with high net promoter scores and customer satisfaction
Large and Medium Enterprise Clients including customer such as Newscorp, Horizon Blue Cross Blue Shield of NJ, SunRun, etc.
Way too many vendors to list, but everything from financial institutions to time tracking vendors to benefits providers to SSO and Identity Management, to retirement savings, etc. Here are a few:
2015 - 2018 |
Onesource Virtual |
Irving, TX |
Coordinate with clients, third-party vendors, workday and internal team members to establish timelines, deliverables, design, build, production and support efforts
Bring projects in on time and under budge with high net promoter scores and customer satisfaction
Large and Medium Enterprise Clients including customer such as Walmart, Jet.com, The Children's Place, FINRA and others.
Way too many vendors to list, but everything from financial institutions to time tracking vendors to benefits providers to SSO and Identity Management, to retirement savings to restricted stock purchases, etc. Here are a few:
2014 - 2015 |
Selerix Inc |
McKinney, TX |
Design lookback report to identify transitional employees trending towards health care eligibility as well as logic to populate IRS Forms:
Resulting influx of clients utilizing ACA reporting revitalized the company and increased sales and revenue.
2012 - 2014 |
Fitness-IQ.com, LLC |
Dallas, TX |
2005-2007 |
Berliner Communications |
Forney, TX |
2001-2004 |
United States Army |
Monterey, CA |
This program helps detect and prevent fraudulent credit card purchases. The solution is DRY and fast with an asymptotic complexity of Θ(n log n) The majority of the code is defensive programming and error handling. Data is read from a file and creates a dictionary of objects indexed by transaction id. LINQ queries filter the list down to possible fraudulent entries. You can view the problem description , download this file , or see all my solutions on github
/* solves the problem posted at http://www.hackerrank.com/challenges/fraud-prevention */
using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;
class FraudPrevention
{
static void Main(String[] args)
{
var file = new System.IO.StreamReader(@"C:\path\file.txt");
Console.SetIn(file);
int numRecords = int.Parse(Console.ReadLine());
var FraudulentOrders = new HashSet
();
var Orderz = new Dictionary ();
for (int i = 0; i < numRecords; i++)
{
var o = new Order(Console.ReadLine().Split(','));
Orderz[o.OrderID] = o;
}
foreach (var deal in Order.DealIDs)
{
if (deal.Value.Count > 1)
{
var byDeal = new List (); //create a list of orders (small list)
foreach (var id in deal.Value) //foreach item with this deal ID
{
byDeal.Add(Orderz[id]); //create a list of objects
}
var byEmail = byDeal.GroupBy (x => x.Email ).Where(x => x.Count() > 1 ).SelectMany(x => x);
var byAdds = byDeal.GroupBy (x => x.Address).Where(x => x.Count() > 1 ).SelectMany(x => x);
var byE_CC = byEmail.GroupBy(x => x.ccNum ).Where(x => x.Count() >= 1).SelectMany(x => x);
var byA_CC = byAdds.GroupBy (x => x.ccNum ).Where(x => x.Count() == 1).SelectMany(x => x);
foreach (var item in byE_CC)
{
FraudulentOrders.Add(item.OrderID);
}
foreach (var item in byA_CC)
{
FraudulentOrders.Add(item.OrderID);
}
}
}
var answer = new StringBuilder();
foreach (var item in FraudulentOrders.OrderBy(x => x))
{
answer.Append(item + ",");
}
Console.WriteLine(answer.ToString().Substring(0, answer.Length - 1));
}
///
/// the order class
///
public class Order
{
///
/// a unique collection of orderids
///
private HashSet OrderIDs = new HashSet (); //ensures orderID uniqueness
///
/// a collection of deal ids
///
public static Dictionary > DealIDs = new Dictionary >();
///
/// the id for the order
///
public int OrderID { get; set; }
///
/// the id for the deal
///
public int DealID { get; set; }
///
/// the full email
///
public Tuple
{
get { return new Tuple (this.User, this.Domain); }
}
///
/// the user
///
public string User { get; set; }
///
/// the email domain
///
public string Domain { get; set; }
///
/// a tuple representation of the address
///
public Tuple Address
{
get { return new Tuple (this.Street, this.City, this.State, this.Zip); }
}
///
/// the city
///
public string City { get; set; }
///
/// the street address
///
public string Street { get; set; }
///
/// the state
///
public string State { get; set; }
///
/// the zip code
///
public int Zip { get; set; }
///
/// the credit card number
///
public long ccNum { get; set; }
///
/// constructor which takes a string array
///
///
public Order(string[] s)
{
if (s.Length != 8)
{
throw new Exception("Wrong Number of fields in record");
}
try
{
var orderID = int.Parse(s[0]);
if (!this.OrderIDs.Add(orderID))
{
throw new Exception("Order ID is not Unique!");
}
else
{
this.OrderID = orderID;
}
}
catch (Exception e)
{
throw new Exception("Order ID creation Error:", e);
}
try
{
this.DealID = int.Parse(s[1]);
if (DealIDs.ContainsKey(this.DealID))
{
DealIDs[this.DealID].Add(this.OrderID);
}
else
{
DealIDs.Add(this.DealID, new List ()); //add key and initialize list
DealIDs[this.DealID].Add(this.OrderID); //and add this to the list
}
}
catch
{
throw new Exception("Deal ID creation Error");
}
try
{
var email = s[2].ToLower();
int pos = email.IndexOf("@");
if (pos < 0)
{
throw new Exception("Must contain @");
}
var user = email.Substring(0, pos); //split
var domain = email.Substring(pos + 1);
if (!domain.Contains("."))
{
throw new Exception("Domain Error, no '.' found");
}
while (user.Contains("."))
{
pos = user.IndexOf("."); //find them
user = user.Remove(pos, 1); //and remove them
}
if (user.Contains("+"))
{
pos = user.IndexOf("+"); //find the first
user = user.Remove(pos); //and remove everything after
}
this.User = user;
this.Domain = domain;
}
catch (Exception e)
{
throw new Exception("Invalid Email Address:", e);
}
try
{
var street = s[3].ToLower();
var city = s[4].ToLower();
var state = s[5].ToLower();
var zip = s[6];
int pos = zip.IndexOf('-');
if (pos > 0)
{
zip = zip.Remove(pos, 1);
}
try
{
this.Zip = int.Parse(zip);
}
catch
{
throw new Exception("Zipcode Error");
}
if (street.Contains("street"))
{
street = street.Replace("street", "st.");
}
if (street.Contains("road"))
{
street = street.Replace("road", "rd.");
}
switch (state)
{
case "illinois":
state = "il";
break;
case "new york":
state = "ny";
break;
case "california":
state = "ca";
break;
//todo: implement additional states switches
}
this.Street = street;
this.City = city;
this.State = state;
}
catch (Exception e)
{
throw new Exception("Problem with Address:", e);
}
var cc = s[7].Trim();
try
{
this.ccNum = long.Parse(cc);
}
catch
{
throw new Exception("Credit Card Number contains invalid characters");
}
}
///
/// Overrides the ToString() method to provide additional information for debugging
///
///
public override string ToString()
{
StringBuilder sb = new StringBuilder();
sb.Append( "================================" +
"\n Order Details:" +
"\n================================" +
"\nOrderID = " + this.OrderID +
"\nDealID = " + this.DealID +
"\nEmail = " + this.User + "@" + this.Domain +
"\nccNum = " + this.ccNum +
"\nAddress = " + this.Street +
"\n " + this.City + ", " +
this.State.ToUpper() + ", " +
this.Zip);
return sb.ToString();
}
}
}
The following program uses object oriented python to solve the problemset posted at the Massechusetts Institute of Technology Open CourseWare (MIT OCW) site, Course number 6.00SC, Lecture 24. The goal of this particular problem is to find the fastest way around the MIT campus and compare a brute force technique with a dynamic programming solution. I enjoyed watching the lectures and working through all the problem sets for this online course. For an extra challenge, I reworked all the solutions, unit tests and helper functions from Python 2.x to Python 3 This is the final problem set for the class. If you're interested, I posted all my answers to all the problem sets on github To download this file, click the icon
###################################################################
## Dennis Tracy Ivy, Jr.
## 04/2/2014
## self study of MIT 6.00
## ps11 - optimization, dynamic programming, graphs, etc
###################################################################
import string
#class for node objects
class Node(object):
def __init__(self, name):
self.name = str(name)
def getName(self):
return self.name
def __str__(self):
return self.name
def __repr__(self):
return self.name
def __eq__(self, other):
return self.name == other.name
def __ne__(self, other):
return not self.__eq__(other)
#class for edges
class Edge(object):
def __init__(self, src, dest):
self.src = src
self.dest = dest
def getSource(self):
return self.src
def getDestination(self):
return self.dest
def __str__(self):
return str(self.src) + '->' + str(self.dest)
#weighted edges(extends edge)
class WEdge(Edge):
def __init__(self, src, dest, distance, outdoor):
self.src = src
self.dest = dest
self.distance = int(distance)
self.outdoor = int(outdoor)
def getSource(self):
return self.src
def getDestination(self):
return self.dest
def getDistance(self):
return int(self.distance)
def getOutdoorDistance(self):
return int(self.outdoor)
def __str__(self):
return str(self.src.getName().rjust(2) ) + '->' + \
str(self.dest.getName().ljust(2) ) + \
' distance=' + str(self.distance).rjust(3) + \
' outdoor=' + str(self.outdoor).rjust(3)
#digraph
class Digraph(object):
def __init__(self):
self.nodes = []
self.edges = {}
#add a node to the graph
def addNode(self, node):
if node in self.nodes:
#print("Duplicate Node!")
raise ValueError('Duplicate node')
else:
if type(node) != Node:
raise TypeError
self.nodes.append(node)
self.edges[str(node)] = []
#add an edge to the graph
def addEdge(self, edge):
src = edge.getSource()
dest = edge.getDestination()
if not(src in self.nodes and dest in self.nodes):
#print ("Node not in graph!")
raise ValueError('Node not in graph')
self.edges[str(src)].append(edge)
#get this nodes children
def childrenOf(self, node):
return self.edges[ str(node) ]
#check if node exists in graph
def hasNode(self, node):
if node in self.nodes:
return True
else: return False
#calc the path length
def calcPathLength(self, path, toPrint=False):
distances=[]
outdoors=[]
for i in range (0,len(path)-1):
d,o = self.distanceFromParentToChild(Node(path[i]),Node(path[i+1]))
distances.append(d)
outdoors.append(o)
if toPrint==True:
print (str(sum(distances)).rjust(3), "/", str(sum(outdoors)).ljust(3))
return ( sum(distances), sum(outdoors) )
#distance from parent node to child node
def distanceFromParentToChild(self, src, dest):
for i in self.edges[str(src)]:
if i.getDestination() == dest:
return (i.getDistance(), i.getOutdoorDistance())
#pretty print
def __str__(self):
res = ''
for k in sorted(self.edges):
for d in self.edges[k]:
res = res + str(d) + '\n'
return res[:-1]
#read the map and create a digraph
def load_map(mapFilename):
print ("Loading map from file...")
g=Digraph()
if type(mapFilename) != str:
raise FileNotFoundError("Trouble opening" + mapFilename)
with open(mapFilename, 'r') as f:
for line in f:
try:
src,dest,dist,outdoor = line.split()
except:
raise Exception("Trouble reading from file" + mapFilename)
src_node = Node(src)
dest_node = Node(dest)
if not g.hasNode(src_node) : g.addNode(src_node)
if not g.hasNode(dest_node) : g.addNode(dest_node)
edge=WEdge(src_node,dest_node,dist,outdoor)
g.addEdge(edge)
#with open("graph.txt", 'w') as out:
# out.write(str(g))
#print(g)
return g
###################################################################
#recursive function to find the shortest path thru the graph using
#brute force exhaustive depth first search
###################################################################
def bruteForceSearch(digraph, start, end, maxTotalDist, maxDistOutdoors, visited=None, counter=0):
if visited == None : visited = []
try:
start = Node(start)
end = Node(end)
except:
raise ChildProcessError('Unable to create nodes')
if not ( digraph.hasNode(start) and digraph.hasNode(end) ):
raise ValueError("Start or End does not exist")
path = [str(start)]
if start == end : return path
shortest = None
bestPath = None
for node in digraph.childrenOf(start):
destination = node.getDestination()
if ( str(destination) not in visited ):
visited = visited + [str(destination)]
newPath = bruteForceSearch(digraph,
destination,
end,
maxTotalDist,
maxDistOutdoors,
visited,
counter=counter+1)
if newPath == None :
continue
currentPath,outdoor=digraph.calcPathLength(path + newPath)
if outdoor > maxDistOutdoors or currentPath > maxTotalDist:
visited.remove(str(destination))
continue
currentPath, outdoor=digraph.calcPathLength(newPath)
if bestPath == None or (currentPath < bestPath):
shortest = newPath
bestPath,outdoor = digraph.calcPathLength(shortest)
if shortest != None:
return path + shortest
else :
if counter==0: raise ValueError
return None
###################################################################
#recursive function to find the shortest path thru the graph using
#directed depth first search w/memoization/dynamic programming
###################################################################
def directedDFS(digraph, start, end, maxTotalDist, maxDistOutdoors,visited = None, memo = None, counter=0):
if visited == None : visited = []
if memo == None : memo = {}
start = Node(start)
end = Node(end)
if not (digraph.hasNode(start) and digraph.hasNode(end)):
raise ValueError("Start or End does not exist")
path = [str(start)]
if start == end : return path
shortest = None
bestPath = None
for node in digraph.childrenOf(start):
destination = node.getDestination()
if ( str(destination) not in visited ):
visited = visited + [str(destination)]
try:
newPath = memo[str(destination),str(end)]
except:
newPath = directedDFS (digraph,
destination,
end,
maxTotalDist,
maxDistOutdoors,
visited,
memo,
counter=counter+1)
if newPath == None :
continue
currentPath,outdoor=digraph.calcPathLength(path + newPath)
if outdoor > maxDistOutdoors or currentPath > maxTotalDist:
visited.remove(str(destination))
try:
del(memo[str(destination),str(end)])
except:
pass
continue
currentPath, outdoor=digraph.calcPathLength(newPath)
if bestPath == None or (currentPath < bestPath):
shortest = newPath
bestPath,outdoor = digraph.calcPathLength(shortest)
memo[str(destination), str(end)] = newPath
if shortest != None:
return path + shortest
else :
if counter==0: raise ValueError
return None
###################################################################
#### The following unit tests are part of this assignment,
###################################################################
if __name__ == '__main__':
LARGE_DIST = 1000000
digraph = load_map("mit_map.txt")
# Test case 1
print ("---------------")
print ("Test case 1:")
print ("Find the shortest-path from Building 32 to 56")
expectedPath1 = ['32', '56']
print ("Expected: ", expectedPath1)
brutePath1 = bruteForceSearch(digraph, '32', '56', LARGE_DIST, LARGE_DIST)
print ("Brute-force: ", brutePath1)
dfsPath1 = directedDFS(digraph, '32', '56', LARGE_DIST, LARGE_DIST)
print ("DFS: ", dfsPath1)
# Test case 2
print ("---------------")
print ("Test case 2:")
print ("Find the shortest-path from Building 32 to 56 without going outdoors")
expectedPath2 = ['32', '36', '26', '16', '56']
print ("Expected: ", expectedPath2)
brutePath2 = bruteForceSearch(digraph, '32', '56', LARGE_DIST, 0)
print ("Brute-force: ", brutePath2)
dfsPath2 = directedDFS(digraph, '32', '56', LARGE_DIST, 0)
print ("DFS: ", dfsPath2)
# Test case 3
print ("---------------")
print ("Test case 3:")
print ("Find the shortest-path from Building 2 to 9")
expectedPath3 = ['2', '3', '7', '9']
print ("Expected: ", expectedPath3)
brutePath3 = bruteForceSearch(digraph, '2', '9', LARGE_DIST, LARGE_DIST)
print ("Brute-force: ", brutePath3)
dfsPath3 = directedDFS(digraph, '2', '9', LARGE_DIST, LARGE_DIST)
print ("DFS: ", dfsPath3)
# Test case 4
print ("---------------")
print ("Test case 4:")
print ("Find the shortest-path from Building 2 to 9 without going outdoors")
expectedPath4 = ['2', '4', '10', '13', '9']
print ("Expected: ", expectedPath4)
brutePath4 = bruteForceSearch(digraph, '2', '9', LARGE_DIST, 0)
print ("Brute-force: ", brutePath4)
dfsPath4 = directedDFS(digraph, '2', '9', LARGE_DIST, 0)
print ("DFS: ", dfsPath4)
# Test case 5
print ("---------------")
print ("Test case 5:")
print ("Find the shortest-path from Building 1 to 32")
expectedPath5 = ['1', '4', '12', '32']
print ("Expected: ", expectedPath5)
brutePath5 = bruteForceSearch(digraph, '1', '32', LARGE_DIST, LARGE_DIST)
print ("Brute-force: ", brutePath5)
dfsPath5 = directedDFS(digraph, '1', '32', LARGE_DIST, LARGE_DIST)
print ("DFS: ", dfsPath5)
# Test case 6
print ("---------------")
print ("Test case 6:")
print ("Find the shortest-path from Building 1 to 32 without going outdoors")
expectedPath6 = ['1', '3', '10', '4', '12', '24', '34', '36', '32']
print ("Expected: ", expectedPath6)
brutePath6 = bruteForceSearch(digraph, '1', '32', LARGE_DIST, 0)
print ("Brute-force: ", brutePath6)
dfsPath6 = directedDFS(digraph, '1', '32', LARGE_DIST, 0)
print ("DFS: ", dfsPath6)
# Test case 7
print ("---------------")
print ("Test case 7:")
print ("Find the shortest-path from Building 8 to 50 without going outdoors")
bruteRaisedErr = 'No'
dfsRaisedErr = 'No'
try:
bruteForceSearch(digraph, '8', '50', LARGE_DIST, 0)
except ValueError:
bruteRaisedErr = 'Yes'
try:
directedDFS(digraph, '8', '50', LARGE_DIST, 0)
except ValueError:
dfsRaisedErr = 'Yes'
print ("Expected: No such path! Should throw a value error.")
print ("Did brute force search raise an error?", bruteRaisedErr)
print ("Did DFS search raise an error?", dfsRaisedErr)
# Test case 8
print ("---------------")
print ("Test case 8:")
print ("Find the shortest-path from Building 10 to 32 without walking")
print ("more than 100 meters in total")
bruteRaisedErr = 'No'
dfsRaisedErr = 'No'
try:
x=bruteForceSearch(digraph, '10', '32', 100, LARGE_DIST)
except ValueError:
bruteRaisedErr = 'Yes'
try:
y=directedDFS(digraph, '10', '32', 100, LARGE_DIST)
except ValueError:
dfsRaisedErr = 'Yes'
print ("Expected: No such path! Should throw a value error.")
print ("Did brute force search raise an error?", bruteRaisedErr)
print ("Did DFS search raise an error?", dfsRaisedErr)
This is a simple javascript function for crunching numbers to calculate body fat percentage. I wrote it a few years ago when I was first learning javascript. It uses four distinct formulas to calculate body fat using various accepted methods such as the U.S. Naval method, circumference measurement, height/weight/BMI ratio, etc. It reads values from a web form , branches based on sex, performs the calculations and displays the results to the user. My JavaScript skills have evolved since writing this. I use jquery a lot now, but I selected this example because its an original script that displayes an understanding of JavaScript, the DOM and how to apply some basic Math skills to a real world programming problem. To download this file, click the icon. Another good example is the custom jQuery for this online résumé
/*
this function calculates body fat percentage using four different
methods and displays results to the user. live version at
http://www.fitness-iq.com/tools.php#bodyFatCalc
*/
function CalcBodyFat()
{
CalcBodyFat.sexEnum = {
male : 1,
female : 0
}
//get common data
var vWeight = document.BodyFatCalc.weight.value - 0;
var vWaist = document.BodyFatCalc.waist.value - 0;
var vWaistMetric = vWaist * 2.54;
var vNeck = document.BodyFatCalc.neck.value - 0;
var vNeckMetric = vNeck * 2.54;
var vFeet = document.BodyFatCalc.feet.value - 0;
var vInch = document.BodyFatCalc.inches.value - 0;
var vHeight = vInch + (vFeet * 12); //in inches
var vHeightMetric = vHeight * 2.54;
var vHeightMeters = vHeightMetric / 100; //convert centimeters to meters
var vHips = document.BodyFatCalc.hips.value - 0;
var vHipsMetric = vHips * 2.54;
var vSex = '';
var log10 = Math.log(10);
var vBMI = (vWeight * 703) / Math.pow(vHeight,2);
var vAge = document.BodyFatCalc.age.value - 0;
if (document.BodyFatCalc.sex[0].checked == true) {
vSex = CalcBodyFat.sexEnum.male;
} else if (document.BodyFatCalc.sex[1].checked == true) {
vSex = CalcBodyFat.sexEnum.female;
}
//check if man or woman
if (vSex == CalcBodyFat.sexEnum.male) {
//if male, calculate using method 1
var vFactor1 = (vWeight * 1.082) + 94.42;
var vFactor2 = vWaist * 4.15;
var vLeanBodyMass = vFactor1 - vFactor2;
var vFatWeight = vWeight - vLeanBodyMass;
var vBodyFatPercent1 = (vFatWeight * 100) / vWeight;
//calculate using method 2
var vDiff = vWaistMetric - vNeckMetric;
var vLogDiff = Math.log(vDiff) / Math.log(10);
var vLogHeight = Math.log(vHeightMetric) / log10;
var vBodyDensity = 1.0324 - ( 0.19077 * vLogDiff ) + ( 0.15456 * vLogHeight );
var vBodyFatPercent2 = (495 / vBodyDensity ) - 450;
//calculate using method 4
var vBodyFatPercent4 = (1.20 * vBMI) + (0.23 * vAge) - (10.8 * 1) - 5.4;
}
else if( vSex == CalcBodyFat.sexEnum.female) //if its a girl!!!
{
//if female
var vWrist = document.BodyFatCalc.wrist.value -0;
var vForeArm = document.BodyFatCalc.forearm.value - 0;
//calculate using method 1
//get factors
var vFactor1 = ( vWeight * 0.732 ) + 8.987;
var vFactor2 = vWrist / 3.14;
var vFactor3 = vWaist * 0.157;
var vFactor4 = vHips * 0.249;
var vFactor5 = vForeArm * 0.434;
//calc lbm and fat %
var vLeanBodyMass = vFactor1 + vFactor2 - vFactor3 - vFactor4 + vFactor5;
var vFatWeight = vWeight - vLeanBodyMass;
var vBodyFatPercent1 = ( vFatWeight * 100 ) / vWeight;
var vHipsMetric = vHips * 2.54;
var vDiff = (vWaistMetric + vHipsMetric) - vNeckMetric;
var vLogDiff = Math.log(vDiff) / log10;
var vLogHeight = Math.log(vHeightMetric) / log10;
var vBodyDensity = 1.29579 - ( 0.35004 * vLogDiff ) + ( 0.22100 * vLogHeight );
var vBodyFatPercent2 = (495 / vBodyDensity ) - 450;
}
//calculate using method 3
var vBodyFatPercent3 = ( vHipsMetric /( vHeightMeters * Math.sqrt(vHeightMeters))) - 18;
//calculate using method 4
var vBodyFatPercent4 = (1.20 * vBMI) + (0.23 * vAge) - (10.8 * vSex) - 5.4;
//get averages
var vAvgBodyFatPercent = ( vBodyFatPercent1 + vBodyFatPercent2 + vBodyFatPercent3 + vBodyFatPercent4 ) / 4;
var vAvgAthlete = ( vBodyFatPercent1 + vBodyFatPercent2 ) / 2;
//display resulting individual methods
document.BodyFatCalc.method1.value = vBodyFatPercent1.toFixed(2);
document.BodyFatCalc.method2.value = vBodyFatPercent2.toFixed(2);
document.BodyFatCalc.method3.value = vBodyFatPercent3.toFixed(2);
document.BodyFatCalc.method4.value = vBodyFatPercent4.toFixed(2);
//and averages
document.BodyFatCalc.avgAthlete.value = vAvgAthlete.toFixed(2);
document.BodyFatCalc.bodyFatPercent.value = vAvgBodyFatPercent.toFixed(2);
//and update form data elsewhere for user convenience
document.BMICalc.BMIheightFeet.value = vFeet;
document.BMICalc.BMIheightInch.value = vInch;
document.BMICalc.BMIweight.value = vWeight;
document.idealWeightCalc.currentWeight.value = vWeight;
document.idealWeightCalc.currentBodyFat.value = vAvgAthlete.toFixed(2);
document.CalcIdeal.feet.value = vFeet;
document.CalcIdeal.inch.value = vInch;
document.HRZoneCalc.age.value = vAge;
}
This online résumé is a good example of my HTML5 and CSS3 skills. I designed it to be mobile first, cross-browser and to scale elegantly through the different common viewport sizes and orientations so If you view it at different sizes the site has a slightly different look. I hand-coded and tested this site in about 4 days using mostly Visual Studio 2013 and Photoshop CS6. Feel free to view source. I kept it human readable. For your convenience, I've referenced an earlier iteration of the custom style sheet for this page below as well. Please be advised this style is one of many applied to this page. I'm also using a stylized version of bootstrap 3.1, and google's prettyprint for code syntax highlighting.
/*
custom style for http://trey.fitness-iq.com
first portion uses media queries to position the
selfie picture based on layout.
*/
@media(max-width: 767px){
#selfie{
position:relative;
width:100%;
}
}
@media(min-width:768px) and (max-width:992px){
#selfie{
position:fixed;
width:150px;
}
}
@media(min-width:993px) and (max-width:1199px){
#selfie{
position:fixed;
width:200px;
}
}
@media(min-width:1200px){
#selfie{
position:fixed;
width:250px;
}
}
@media screen and (orientation:portrait){
#selfie{
position:relative;
width:100%;
}
}
.img-center{
margin:auto;
}
section{
margin-top:-70px;
padding-top:70px;
}
.code-tab-content{
padding:20px;
}
.code-tab-content p{
margin-bottom:20px;
}
#imgZoomRadar{
cursor:zoom-in;
cursor:-webkit-zoom-in;
cursor:-moz-zoom-in;
margin-left:20px;
margin-top:20px;
opacity:.8;
}
.schools{
opacity:.8;
padding:0px 30px 0px 30px;
}
.zeroPad {
padding: 0px;
background-color: transparent;
}
.work-arrow{
text-shadow : 3px 3px 3px #000;
text-align:right;
margin-top:-30px;
}
.work-table{
width:100%;
margin-top:40px;
background-color:transparent;
border:0px;
border-top-left-radius:10px;
border-top-right-radius:10px;
}
.work-details{
background-color: #2e3337;
border-bottom:solid thin black;
border-left:solid thin black;
border-right:solid thin black;
border-top:none;
border-bottom-left-radius:10px;
border-bottom-right-radius:10px;
padding:20px;
}
.work-headline{
padding:20px;
font-weight: bold;
border:solid thin black;
background: linear-gradient(to bottom, #333, #0d0e17);
}
.work-history{
cursor:pointer;
}
.work-historyX{
cursor:pointer;
}
.caroselPics{
max-height:400px;
height:400px;
display:block;
margin-left:auto;
margin-right:auto;
}
p{
padding-left:20px;
}
.edu{
padding-top:5px;
padding-bottom:20px;
}
.imageShadow{
border:solid thin black;
box-shadow:0px 0px 5px #777;
}
.marginLeft20{
margin-left:20px;
}
.langs{
margin:auto;
opacity:.9;
}
.langs td{
border:solid thin black;
padding:20px;
}
.blu{
padding:20px;
background-color:#333;
background: linear-gradient(to bottom, #333, #0d0e17);
color:white;
opacity:.85;
fill-opacity:.6;
text-shadow:2px 2px 2px #000;
text-align:center;
border:solid thin black;
}
.contactInfo{
padding-top:15px;
text-align:right;
}
a{
color:#6781e5;
}
I have a lot of experience working with PHP. I've created some really custom dynamic apps using PHP, AJAX and HTML. Here's a quick little script I wrote to automate some web admin tasks. I do all my own photography and found myself creating a lot of thumbnails for product shots. Creating each one by hand got old real quick so I hacked this little script together to speed things up. It creates high quality thumbnail images for all the picture files in a given directory. First it checks to see if the thumbnail already exists. If not, it creates a high quality thumbnail image with a max-width and/or max-height, while maintaining the original aspect ratio. It names the newly created .jpg file according to a naming convention I used for this project. Its not very robust or highly portable but it served my purposes at the time. To download this file, click the icon
//create high quality aspect true thumbnails for all the files in a given directory
if ($handle = opendir('path/to/directory/')) {
echo "Directory handle: $handle\n";
echo "Processing Entries:\n";
while (false !== ($entry = readdir($handle))) {
$isThumb = strpos($entry, 'thumb');
if ($entry != "." && $entry != ".." && $isThumb === FALSE) {
//echo "$entry\n";//debugging
$filename = $entry; //for readability, now that we know its a valid filename.
$width = 175; // maximum width
$height = 175; // maximum height
header('Content-Type: image/jpeg'); // set content type
// Get new dimensions
list($width_orig, $height_orig) = getimagesize($filename);
$ratio_orig = $width_orig/$height_orig;
if ($width/$height > $ratio_orig) {
$width = $height*$ratio_orig;
}
else {
$height = $width/$ratio_orig;
}
// Resample image
$image_p = imagecreatetruecolor($width, $height);
$image = imagecreatefromjpeg($filename);
imagecopyresampled($image_p, $image, 0, 0, 0, 0, $width, $height, $width_orig, $height_orig);
// Output
$newFileName = "thumb-" . $filename;
//echo "thumb $newFileName created"; //debug
imagejpeg($image_p, $newFileName, 100);
imagedestroy($image_p);
}
}
closedir($handle);
}
For convenience, You can download my resume, certifications and code samples here.